@app-studio/components 0.11.6 → 0.11.8

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 (785) hide show
  1. package/dist/files/media/BlockEditor-drag-and-drop.md +61 -0
  2. package/dist/files/media/BlockEditor.mdx +106 -0
  3. package/dist/files/media/Button.mdx +1 -1
  4. package/dist/files/media/Checkbox.mdx +1 -1
  5. package/dist/files/media/ColorInput.mdx +1 -1
  6. package/dist/files/media/ColorPicker.mdx +1 -1
  7. package/dist/files/media/CountryPicker.mdx +1 -1
  8. package/dist/files/media/DatePicker.mdx +1 -1
  9. package/dist/files/media/EmojiPicker.mdx +22 -1
  10. package/dist/files/media/Markdown.mdx +99 -0
  11. package/dist/files/media/OTPInput.mdx +2 -2
  12. package/dist/files/media/Select.mdx +1 -1
  13. package/dist/files/media/Switch.mdx +2 -2
  14. package/dist/files/media/TextArea.mdx +8 -8
  15. package/dist/files/media/TextField.mdx +9 -9
  16. package/dist/index.d.ts +649 -511
  17. package/dist/native/components/Accordion/Accordion/Accordion.props.d.ts +1 -1
  18. package/dist/native/components/Accordion/Accordion/Accordion.state.js +1 -1
  19. package/dist/native/components/Accordion/Accordion/Accordion.view.d.ts +1 -1
  20. package/dist/native/components/Accordion/Accordion/Accordion.view.js +1 -1
  21. package/dist/native/components/Accordion/Accordion/Accordion.view.native.d.ts +1 -1
  22. package/dist/native/components/Accordion/Accordion/Accordion.view.native.js +1 -1
  23. package/dist/native/components/Accordion/Accordion.js +1 -1
  24. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.props.d.ts +1 -1
  25. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.state.js +1 -1
  26. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.type.d.ts +1 -1
  27. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.d.ts +1 -1
  28. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.js +1 -1
  29. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.native.d.ts +1 -1
  30. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.native.js +1 -1
  31. package/dist/native/components/ActionSheet/ActionSheet.d.ts +1 -1
  32. package/dist/native/components/ActionSheet/ActionSheet.js +1 -1
  33. package/dist/native/components/Alert/Alert/Alert.props.d.ts +1 -1
  34. package/dist/native/components/Alert/Alert/Alert.state.d.ts +1 -1
  35. package/dist/native/components/Alert/Alert/Alert.state.js +1 -1
  36. package/dist/native/components/Alert/Alert/Alert.view.d.ts +1 -1
  37. package/dist/native/components/Alert/Alert/Alert.view.js +1 -1
  38. package/dist/native/components/Alert/Alert/Alert.view.native.d.ts +1 -1
  39. package/dist/native/components/Alert/Alert/Alert.view.native.js +1 -1
  40. package/dist/native/components/Alert/Alert.d.ts +1 -1
  41. package/dist/native/components/Alert/Alert.js +1 -1
  42. package/dist/native/components/AppRoot/AppRoot.d.ts +1 -1
  43. package/dist/native/components/AppRoot/AppRoot.js +1 -1
  44. package/dist/native/components/AppRoot/AppRoot.native.d.ts +1 -1
  45. package/dist/native/components/AppRoot/AppRoot.native.js +1 -1
  46. package/dist/native/components/AppRoot/AppRoot.types.d.ts +1 -1
  47. package/dist/native/components/AspectRatio/AspectRatio/AspectRatio.view.d.ts +1 -1
  48. package/dist/native/components/AspectRatio/AspectRatio/AspectRatio.view.js +1 -1
  49. package/dist/native/components/AspectRatio/AspectRatio.d.ts +1 -1
  50. package/dist/native/components/AspectRatio/AspectRatio.js +1 -1
  51. package/dist/native/components/AttachmentGroup/AttachmentGroup/AttachmentGroup.d.ts +1 -1
  52. package/dist/native/components/AttachmentGroup/AttachmentGroup/AttachmentGroup.js +1 -1
  53. package/dist/native/components/AudioInput/AudioInput/AudioInput.state.js +1 -1
  54. package/dist/native/components/AudioInput/AudioInput/AudioInput.view.d.ts +1 -1
  55. package/dist/native/components/AudioInput/AudioInput/AudioInput.view.js +1 -1
  56. package/dist/native/components/AudioInput/AudioInput.d.ts +1 -1
  57. package/dist/native/components/AudioInput/AudioInput.js +1 -1
  58. package/dist/native/components/AudioInput/AudioWaveform/AudioWaveform.d.ts +1 -1
  59. package/dist/native/components/AudioInput/AudioWaveform/AudioWaveform.js +1 -1
  60. package/dist/native/components/AudioInput/AudioWaveform/AudioWaveform.view.d.ts +1 -1
  61. package/dist/native/components/AudioInput/AudioWaveform/AudioWaveform.view.js +1 -1
  62. package/dist/native/components/AudioInput/useAudioRecording.js +1 -1
  63. package/dist/native/components/AudioInput/useAudioRecording.native.js +1 -1
  64. package/dist/native/components/Avatar/Avatar/Avatar.props.d.ts +1 -1
  65. package/dist/native/components/Avatar/Avatar/Avatar.state.d.ts +1 -1
  66. package/dist/native/components/Avatar/Avatar/Avatar.state.js +1 -1
  67. package/dist/native/components/Avatar/Avatar/Avatar.view.d.ts +1 -1
  68. package/dist/native/components/Avatar/Avatar/Avatar.view.js +1 -1
  69. package/dist/native/components/Avatar/Avatar.d.ts +1 -1
  70. package/dist/native/components/Avatar/Avatar.js +1 -1
  71. package/dist/native/components/Background/Background/Background.props.d.ts +1 -1
  72. package/dist/native/components/Background/Background/Background.view.d.ts +1 -1
  73. package/dist/native/components/Background/Background/Background.view.js +1 -1
  74. package/dist/native/components/Background/Background/Background.view.native.d.ts +1 -1
  75. package/dist/native/components/Background/Background/Background.view.native.js +1 -1
  76. package/dist/native/components/Background/Background.d.ts +1 -1
  77. package/dist/native/components/Background/Background.js +1 -1
  78. package/dist/native/components/Badge/Badge/Badge.view.d.ts +1 -1
  79. package/dist/native/components/Badge/Badge/Badge.view.js +1 -1
  80. package/dist/native/components/Badge/Badge.d.ts +1 -1
  81. package/dist/native/components/Badge/Badge.js +1 -1
  82. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.content.d.ts +16 -0
  83. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.content.js +197 -0
  84. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.content.js.map +1 -0
  85. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.controls.d.ts +14 -0
  86. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.controls.js +119 -0
  87. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.controls.js.map +1 -0
  88. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.dom.d.ts +9 -0
  89. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.dom.js +247 -0
  90. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.dom.js.map +1 -0
  91. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.keyboard.d.ts +16 -0
  92. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.keyboard.js +397 -0
  93. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.keyboard.js.map +1 -0
  94. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.model.d.ts +47 -0
  95. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.model.js +504 -0
  96. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.model.js.map +1 -0
  97. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.navigation.d.ts +6 -0
  98. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.navigation.js +198 -0
  99. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.navigation.js.map +1 -0
  100. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.props.d.ts +74 -0
  101. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.props.js +51 -0
  102. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.props.js.map +1 -0
  103. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.selection.d.ts +13 -0
  104. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.selection.js +33 -0
  105. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.selection.js.map +1 -0
  106. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.state.d.ts +117 -0
  107. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.state.js +405 -0
  108. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.state.js.map +1 -0
  109. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.transactions.d.ts +8 -0
  110. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.transactions.js +177 -0
  111. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.transactions.js.map +1 -0
  112. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.d.ts +6 -0
  113. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.js +493 -0
  114. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.js.map +1 -0
  115. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.native.d.ts +6 -0
  116. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.native.js +150 -0
  117. package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.native.js.map +1 -0
  118. package/dist/native/components/BlockEditor/BlockEditor.d.ts +3 -0
  119. package/dist/native/components/BlockEditor/BlockEditor.js +8 -0
  120. package/dist/native/components/BlockEditor/BlockEditor.js.map +1 -0
  121. package/dist/native/components/Button/Button/Button.props.d.ts +1 -1
  122. package/dist/native/components/Button/Button/Button.state.d.ts +1 -1
  123. package/dist/native/components/Button/Button/Button.state.js +1 -1
  124. package/dist/native/components/Button/Button/Button.view.d.ts +1 -1
  125. package/dist/native/components/Button/Button/Button.view.js +1 -1
  126. package/dist/native/components/Button/Button/Button.view.native.d.ts +1 -1
  127. package/dist/native/components/Button/Button/Button.view.native.js +1 -1
  128. package/dist/native/components/Button/Button.d.ts +1 -1
  129. package/dist/native/components/Button/Button.js +1 -1
  130. package/dist/native/components/Card/Card/Card.context.d.ts +1 -1
  131. package/dist/native/components/Card/Card/Card.context.js +1 -1
  132. package/dist/native/components/Card/Card/Card.state.d.ts +1 -1
  133. package/dist/native/components/Card/Card/Card.state.js +1 -1
  134. package/dist/native/components/Card/Card/Card.view.d.ts +1 -1
  135. package/dist/native/components/Card/Card/Card.view.js +1 -1
  136. package/dist/native/components/Card/Card.js +1 -1
  137. package/dist/native/components/Carousel/Carousel/Carousel.context.d.ts +1 -1
  138. package/dist/native/components/Carousel/Carousel/Carousel.context.js +1 -1
  139. package/dist/native/components/Carousel/Carousel/Carousel.state.js +1 -1
  140. package/dist/native/components/Carousel/Carousel/Carousel.view.d.ts +1 -1
  141. package/dist/native/components/Carousel/Carousel/Carousel.view.js +1 -1
  142. package/dist/native/components/Carousel/Carousel/Carousel.view.native.d.ts +1 -1
  143. package/dist/native/components/Carousel/Carousel/Carousel.view.native.js +1 -1
  144. package/dist/native/components/Carousel/Carousel.js +1 -1
  145. package/dist/native/components/Chart/Chart/BarChart.d.ts +1 -1
  146. package/dist/native/components/Chart/Chart/BarChart.js +1 -1
  147. package/dist/native/components/Chart/Chart/BarChart.native.d.ts +1 -1
  148. package/dist/native/components/Chart/Chart/BarChart.native.js +1 -1
  149. package/dist/native/components/Chart/Chart/Chart.state.d.ts +2 -2
  150. package/dist/native/components/Chart/Chart/Chart.state.js +1 -1
  151. package/dist/native/components/Chart/Chart/Chart.view.d.ts +1 -1
  152. package/dist/native/components/Chart/Chart/Chart.view.js +1 -1
  153. package/dist/native/components/Chart/Chart/ChartTooltip.d.ts +1 -1
  154. package/dist/native/components/Chart/Chart/ChartTooltip.js +1 -1
  155. package/dist/native/components/Chart/Chart/LineChart.d.ts +1 -1
  156. package/dist/native/components/Chart/Chart/LineChart.js +1 -1
  157. package/dist/native/components/Chart/Chart/LineChart.native.d.ts +1 -1
  158. package/dist/native/components/Chart/Chart/LineChart.native.js +1 -1
  159. package/dist/native/components/Chart/Chart/PieChart.d.ts +1 -1
  160. package/dist/native/components/Chart/Chart/PieChart.js +1 -1
  161. package/dist/native/components/Chart/Chart/PieChart.native.d.ts +1 -1
  162. package/dist/native/components/Chart/Chart/PieChart.native.js +1 -1
  163. package/dist/native/components/Chart/Chart.d.ts +1 -1
  164. package/dist/native/components/Chart/Chart.js +1 -1
  165. package/dist/native/components/ChatInput/AttachmentGroup.d.ts +1 -1
  166. package/dist/native/components/ChatInput/AttachmentGroup.js +1 -1
  167. package/dist/native/components/ChatInput/AudioRecorder.d.ts +1 -1
  168. package/dist/native/components/ChatInput/AudioRecorder.js +1 -1
  169. package/dist/native/components/ChatInput/ChatInput/ChatInput.state.d.ts +7 -7
  170. package/dist/native/components/ChatInput/ChatInput/ChatInput.state.js +1 -1
  171. package/dist/native/components/ChatInput/ChatInput/ChatInput.view.d.ts +1 -1
  172. package/dist/native/components/ChatInput/ChatInput/ChatInput.view.js +1 -1
  173. package/dist/native/components/ChatInput/ChatInput.d.ts +1 -1
  174. package/dist/native/components/ChatInput/ChatInput.js +1 -1
  175. package/dist/native/components/ChatInput/ChatUploader.d.ts +1 -1
  176. package/dist/native/components/ChatInput/ChatUploader.js +1 -1
  177. package/dist/native/components/ChatInput/EditableInput.d.ts +1 -1
  178. package/dist/native/components/ChatInput/EditableInput.js +1 -1
  179. package/dist/native/components/ChatInput/EditableInput.native.d.ts +1 -1
  180. package/dist/native/components/ChatInput/EditableInput.native.js +1 -1
  181. package/dist/native/components/ChatInput/GuideTip.d.ts +1 -1
  182. package/dist/native/components/ChatInput/GuideTip.js +1 -1
  183. package/dist/native/components/ChatInput/MessageInput.d.ts +1 -1
  184. package/dist/native/components/ChatInput/MessageInput.js +2 -2
  185. package/dist/native/components/ChatInput/MessageInput.js.map +1 -1
  186. package/dist/native/components/ChatInput/MessageInput.native.d.ts +1 -1
  187. package/dist/native/components/ChatInput/MessageInput.native.js +1 -1
  188. package/dist/native/components/ChatInput/PromptExamples.d.ts +1 -1
  189. package/dist/native/components/ChatInput/PromptExamples.js +1 -1
  190. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.state.d.ts +2 -2
  191. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.state.js +1 -1
  192. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.style.d.ts +1 -1
  193. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.d.ts +1 -1
  194. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.js +2 -2
  195. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.js.map +1 -1
  196. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.native.d.ts +1 -1
  197. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.native.js +1 -1
  198. package/dist/native/components/ChatWidget/ChatWidget.d.ts +1 -1
  199. package/dist/native/components/ChatWidget/ChatWidget.js +1 -1
  200. package/dist/native/components/ChatWidget/Widget/ChatWidgetWidget.d.ts +1 -1
  201. package/dist/native/components/ChatWidget/Widget/ChatWidgetWidget.js +1 -1
  202. package/dist/native/components/ChatWidget/Widget/ChatWidgetWidget.native.d.ts +1 -1
  203. package/dist/native/components/ChatWidget/Widget/ChatWidgetWidget.native.js +1 -1
  204. package/dist/native/components/ChatWidget/Widget/useContextSelector.d.ts +1 -1
  205. package/dist/native/components/ChatWidget/Widget/useContextSelector.js +1 -1
  206. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.state.d.ts +2 -2
  207. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.state.js +1 -1
  208. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.d.ts +1 -1
  209. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.js +1 -1
  210. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.native.d.ts +1 -1
  211. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.native.js +1 -1
  212. package/dist/native/components/ColorPicker/ColorPicker.d.ts +1 -1
  213. package/dist/native/components/ColorPicker/ColorPicker.js +1 -1
  214. package/dist/native/components/Command/Command/Command.props.d.ts +1 -1
  215. package/dist/native/components/Command/Command/Command.state.d.ts +3 -3
  216. package/dist/native/components/Command/Command/Command.state.js +1 -1
  217. package/dist/native/components/Command/Command/Command.type.d.ts +1 -1
  218. package/dist/native/components/Command/Command/Command.view.d.ts +1 -1
  219. package/dist/native/components/Command/Command/Command.view.js +1 -1
  220. package/dist/native/components/Command/Command/Command.view.native.d.ts +1 -1
  221. package/dist/native/components/Command/Command/Command.view.native.js +1 -1
  222. package/dist/native/components/Command/Command/CommandOverlay.d.ts +1 -1
  223. package/dist/native/components/Command/Command/CommandOverlay.js +1 -1
  224. package/dist/native/components/Command/Command/CommandOverlay.native.d.ts +1 -1
  225. package/dist/native/components/Command/Command/CommandOverlay.native.js +1 -1
  226. package/dist/native/components/Command/Command/CommandTextInput.d.ts +1 -1
  227. package/dist/native/components/Command/Command/CommandTextInput.js +1 -1
  228. package/dist/native/components/Command/Command/CommandTextInput.native.d.ts +1 -1
  229. package/dist/native/components/Command/Command/CommandTextInput.native.js +1 -1
  230. package/dist/native/components/Command/Command.js +1 -1
  231. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.props.d.ts +1 -1
  232. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.state.d.ts +1 -1
  233. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.state.js +1 -1
  234. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.type.d.ts +1 -1
  235. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.d.ts +1 -1
  236. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.js +1 -1
  237. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.native.d.ts +1 -1
  238. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.native.js +1 -1
  239. package/dist/native/components/ContextMenu/ContextMenu.js +1 -1
  240. package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.state.d.ts +1 -1
  241. package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.state.js +1 -1
  242. package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.view.d.ts +1 -1
  243. package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.view.js +1 -1
  244. package/dist/native/components/CookieConsent/CookieConsent.d.ts +1 -1
  245. package/dist/native/components/CookieConsent/CookieConsent.js +1 -1
  246. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.d.ts +1 -1
  247. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.js +1 -1
  248. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.native.d.ts +1 -1
  249. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.native.js +1 -1
  250. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.view.d.ts +1 -1
  251. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.view.js +1 -1
  252. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.view.native.d.ts +1 -1
  253. package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.view.native.js +1 -1
  254. package/dist/native/components/DragAndDrop/DragAndDrop.d.ts +1 -1
  255. package/dist/native/components/DragAndDrop/DragAndDrop.js +1 -1
  256. package/dist/native/components/Drawer/Drawer/Drawer.layout.d.ts +1 -1
  257. package/dist/native/components/Drawer/Drawer/Drawer.layout.js +1 -1
  258. package/dist/native/components/Drawer/Drawer/Drawer.props.d.ts +1 -1
  259. package/dist/native/components/Drawer/Drawer/Drawer.view.d.ts +1 -1
  260. package/dist/native/components/Drawer/Drawer/Drawer.view.js +1 -1
  261. package/dist/native/components/Drawer/Drawer/Drawer.view.native.d.ts +1 -1
  262. package/dist/native/components/Drawer/Drawer/Drawer.view.native.js +1 -1
  263. package/dist/native/components/Drawer/Drawer.js +1 -1
  264. package/dist/native/components/DropZone/DropZone/DropZone.state.js +1 -1
  265. package/dist/native/components/DropZone/DropZone/DropZone.view.d.ts +1 -1
  266. package/dist/native/components/DropZone/DropZone/DropZone.view.js +1 -1
  267. package/dist/native/components/DropZone/DropZone/DropZone.view.native.d.ts +1 -1
  268. package/dist/native/components/DropZone/DropZone/DropZone.view.native.js +1 -1
  269. package/dist/native/components/DropZone/DropZone.d.ts +1 -1
  270. package/dist/native/components/DropZone/DropZone.js +1 -1
  271. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.props.d.ts +1 -1
  272. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.state.d.ts +2 -2
  273. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.state.js +1 -1
  274. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.type.d.ts +1 -1
  275. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.d.ts +1 -1
  276. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.js +1 -1
  277. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.native.d.ts +1 -1
  278. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.native.js +1 -1
  279. package/dist/native/components/DropdownMenu/DropdownMenu.js +1 -1
  280. package/dist/native/components/EditComponent/EditComponent.d.ts +1 -1
  281. package/dist/native/components/EditComponent/EditComponent.js +1 -1
  282. package/dist/native/components/EditComponent/EditPanel.d.ts +1 -1
  283. package/dist/native/components/EditComponent/EditPanel.js +1 -1
  284. package/dist/native/components/EditComponent/EditToolbar.d.ts +1 -1
  285. package/dist/native/components/EditComponent/EditToolbar.js +1 -1
  286. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.data.d.ts +3 -0
  287. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.data.js +3011 -0
  288. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.data.js.map +1 -0
  289. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.props.d.ts +30 -2
  290. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.props.js +18 -1
  291. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.props.js.map +1 -1
  292. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.state.d.ts +24 -3
  293. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.state.js +147 -113
  294. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.state.js.map +1 -1
  295. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.style.d.ts +2 -2
  296. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.style.js +1 -2211
  297. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.style.js.map +1 -1
  298. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.d.ts +1 -1
  299. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.js +160 -90
  300. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.js.map +1 -1
  301. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.native.d.ts +1 -1
  302. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.native.js +61 -85
  303. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.native.js.map +1 -1
  304. package/dist/native/components/EmojiPicker/EmojiPicker.d.ts +1 -1
  305. package/dist/native/components/EmojiPicker/EmojiPicker.js +1 -1
  306. package/dist/native/components/File/File.d.ts +1 -1
  307. package/dist/native/components/File/File.js +1 -1
  308. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.props.d.ts +1 -1
  309. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.state.d.ts +1 -1
  310. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.state.js +1 -1
  311. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.d.ts +1 -1
  312. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.js +1 -1
  313. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.native.d.ts +1 -1
  314. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.native.js +1 -1
  315. package/dist/native/components/Form/Checkbox/Checkbox.d.ts +1 -1
  316. package/dist/native/components/Form/Checkbox/Checkbox.js +1 -1
  317. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.props.d.ts +1 -1
  318. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.state.d.ts +4 -4
  319. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.state.js +1 -1
  320. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.d.ts +1 -1
  321. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.js +1 -1
  322. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.native.d.ts +1 -1
  323. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.native.js +1 -1
  324. package/dist/native/components/Form/ColorInput/ColorInput.d.ts +1 -1
  325. package/dist/native/components/Form/ColorInput/ColorInput.js +1 -1
  326. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.context.d.ts +1 -1
  327. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.context.js +1 -1
  328. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.props.d.ts +1 -1
  329. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.provider.d.ts +1 -1
  330. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.provider.js +1 -1
  331. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.state.js +1 -1
  332. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.d.ts +1 -1
  333. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.js +1 -1
  334. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.native.d.ts +1 -1
  335. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.native.js +1 -1
  336. package/dist/native/components/Form/ComboBox/ComboBox.d.ts +1 -1
  337. package/dist/native/components/Form/ComboBox/ComboBox.js +1 -1
  338. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.state.d.ts +1 -1
  339. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.state.js +1 -1
  340. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.d.ts +1 -1
  341. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.js +1 -1
  342. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.native.d.ts +1 -1
  343. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.native.js +1 -1
  344. package/dist/native/components/Form/CountryPicker/CountryPicker.d.ts +1 -1
  345. package/dist/native/components/Form/CountryPicker/CountryPicker.js +1 -1
  346. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.state.d.ts +1 -1
  347. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.state.js +1 -1
  348. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.view.d.ts +1 -1
  349. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.view.js +1 -1
  350. package/dist/native/components/Form/DatePicker/DatePicker.d.ts +1 -1
  351. package/dist/native/components/Form/DatePicker/DatePicker.js +1 -1
  352. package/dist/native/components/Form/Label/Label/Label.view.d.ts +1 -1
  353. package/dist/native/components/Form/Label/Label/Label.view.js +1 -1
  354. package/dist/native/components/Form/Label/Label/Label.view.native.d.ts +1 -1
  355. package/dist/native/components/Form/Label/Label/Label.view.native.js +1 -1
  356. package/dist/native/components/Form/Label/Label.d.ts +1 -1
  357. package/dist/native/components/Form/Label/Label.js +1 -1
  358. package/dist/native/components/Form/Password/Password/Password.props.d.ts +1 -1
  359. package/dist/native/components/Form/Password/Password/Password.state.d.ts +1 -1
  360. package/dist/native/components/Form/Password/Password/Password.state.js +1 -1
  361. package/dist/native/components/Form/Password/Password/Password.type.d.ts +1 -1
  362. package/dist/native/components/Form/Password/Password.d.ts +1 -1
  363. package/dist/native/components/Form/Password/Password.js +1 -1
  364. package/dist/native/components/Form/Password/example/Default.d.ts +1 -1
  365. package/dist/native/components/Form/Password/example/Default.js +1 -1
  366. package/dist/native/components/Form/Password/example/DisabledInput.d.ts +1 -1
  367. package/dist/native/components/Form/Password/example/DisabledInput.js +1 -1
  368. package/dist/native/components/Form/Password/example/ErrorInput.d.ts +1 -1
  369. package/dist/native/components/Form/Password/example/ErrorInput.js +3 -5
  370. package/dist/native/components/Form/Password/example/ErrorInput.js.map +1 -1
  371. package/dist/native/components/Form/Password/example/HelperText.d.ts +1 -1
  372. package/dist/native/components/Form/Password/example/HelperText.js +2 -4
  373. package/dist/native/components/Form/Password/example/HelperText.js.map +1 -1
  374. package/dist/native/components/Form/Radio/Radio/Radio.props.d.ts +1 -1
  375. package/dist/native/components/Form/Radio/Radio/Radio.state.d.ts +1 -1
  376. package/dist/native/components/Form/Radio/Radio/Radio.state.js +1 -1
  377. package/dist/native/components/Form/Radio/Radio/Radio.view.d.ts +1 -1
  378. package/dist/native/components/Form/Radio/Radio/Radio.view.js +1 -1
  379. package/dist/native/components/Form/Radio/Radio/Radio.view.native.d.ts +1 -1
  380. package/dist/native/components/Form/Radio/Radio/Radio.view.native.js +1 -1
  381. package/dist/native/components/Form/Radio/Radio.d.ts +1 -1
  382. package/dist/native/components/Form/Radio/Radio.js +1 -1
  383. package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.props.d.ts +1 -1
  384. package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.state.js +1 -1
  385. package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.view.d.ts +1 -1
  386. package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.view.js +1 -1
  387. package/dist/native/components/Form/Radio/RadioGroup.d.ts +1 -1
  388. package/dist/native/components/Form/Radio/RadioGroup.js +1 -1
  389. package/dist/native/components/Form/Select/Select/Select.state.d.ts +1 -1
  390. package/dist/native/components/Form/Select/Select/Select.state.js +1 -1
  391. package/dist/native/components/Form/Select/Select/Select.view.d.ts +1 -1
  392. package/dist/native/components/Form/Select/Select/Select.view.js +1 -1
  393. package/dist/native/components/Form/Select/Select/Select.view.native.d.ts +1 -1
  394. package/dist/native/components/Form/Select/Select/Select.view.native.js +1 -1
  395. package/dist/native/components/Form/Select/Select.d.ts +1 -1
  396. package/dist/native/components/Form/Select/Select.js +1 -1
  397. package/dist/native/components/Form/Selector/Selector/Selector.state.d.ts +1 -1
  398. package/dist/native/components/Form/Selector/Selector/Selector.state.js +1 -1
  399. package/dist/native/components/Form/Selector/Selector/Selector.view.d.ts +1 -1
  400. package/dist/native/components/Form/Selector/Selector/Selector.view.js +1 -1
  401. package/dist/native/components/Form/Selector/Selector/Selector.view.native.d.ts +1 -1
  402. package/dist/native/components/Form/Selector/Selector/Selector.view.native.js +1 -1
  403. package/dist/native/components/Form/Selector/Selector.d.ts +1 -1
  404. package/dist/native/components/Form/Selector/Selector.js +1 -1
  405. package/dist/native/components/Form/Switch/Switch/Switch.state.d.ts +1 -1
  406. package/dist/native/components/Form/Switch/Switch/Switch.state.js +1 -1
  407. package/dist/native/components/Form/Switch/Switch/Switch.view.d.ts +1 -1
  408. package/dist/native/components/Form/Switch/Switch/Switch.view.js +1 -1
  409. package/dist/native/components/Form/Switch/Switch/Switch.view.native.d.ts +1 -1
  410. package/dist/native/components/Form/Switch/Switch/Switch.view.native.js +1 -1
  411. package/dist/native/components/Form/Switch/Switch.d.ts +1 -1
  412. package/dist/native/components/Form/Switch/Switch.js +1 -1
  413. package/dist/native/components/Form/TagInput/TagInput/TagInput.props.d.ts +1 -1
  414. package/dist/native/components/Form/TagInput/TagInput/TagInput.state.d.ts +4 -4
  415. package/dist/native/components/Form/TagInput/TagInput/TagInput.state.js +1 -1
  416. package/dist/native/components/Form/TagInput/TagInput/TagInput.view.d.ts +1 -1
  417. package/dist/native/components/Form/TagInput/TagInput/TagInput.view.js +1 -1
  418. package/dist/native/components/Form/TagInput/TagInput.d.ts +1 -1
  419. package/dist/native/components/Form/TagInput/TagInput.js +1 -1
  420. package/dist/native/components/Form/TextArea/TextArea/TextArea.state.d.ts +4 -4
  421. package/dist/native/components/Form/TextArea/TextArea/TextArea.state.js +1 -1
  422. package/dist/native/components/Form/TextArea/TextArea/TextArea.view.d.ts +1 -1
  423. package/dist/native/components/Form/TextArea/TextArea/TextArea.view.js +1 -1
  424. package/dist/native/components/Form/TextArea/TextArea/TextArea.view.native.d.ts +1 -1
  425. package/dist/native/components/Form/TextArea/TextArea/TextArea.view.native.js +3 -3
  426. package/dist/native/components/Form/TextArea/TextArea/TextArea.view.native.js.map +1 -1
  427. package/dist/native/components/Form/TextArea/TextArea.d.ts +1 -1
  428. package/dist/native/components/Form/TextArea/TextArea.js +1 -1
  429. package/dist/native/components/Form/TextField/TextField/TextField.props.d.ts +1 -1
  430. package/dist/native/components/Form/TextField/TextField/TextField.state.d.ts +4 -4
  431. package/dist/native/components/Form/TextField/TextField/TextField.state.js +1 -1
  432. package/dist/native/components/Form/TextField/TextField/TextField.view.d.ts +1 -1
  433. package/dist/native/components/Form/TextField/TextField/TextField.view.js +1 -1
  434. package/dist/native/components/Form/TextField/TextField/TextField.view.native.d.ts +1 -1
  435. package/dist/native/components/Form/TextField/TextField/TextField.view.native.js +1 -1
  436. package/dist/native/components/Form/TextField/TextField.d.ts +1 -1
  437. package/dist/native/components/Form/TextField/TextField.js +1 -1
  438. package/dist/native/components/Formik/AttachmentPreview.d.ts +1 -1
  439. package/dist/native/components/Formik/AttachmentPreview.js +1 -1
  440. package/dist/native/components/Formik/Formik.ChatInput.d.ts +1 -1
  441. package/dist/native/components/Formik/Formik.ChatInput.js +1 -1
  442. package/dist/native/components/Formik/Formik.Checkbox.d.ts +1 -1
  443. package/dist/native/components/Formik/Formik.Checkbox.js +1 -1
  444. package/dist/native/components/Formik/Formik.ColorInput.d.ts +1 -1
  445. package/dist/native/components/Formik/Formik.ColorInput.js +1 -1
  446. package/dist/native/components/Formik/Formik.ComboBox.d.ts +1 -1
  447. package/dist/native/components/Formik/Formik.ComboBox.js +1 -1
  448. package/dist/native/components/Formik/Formik.CountryPicker.d.ts +1 -1
  449. package/dist/native/components/Formik/Formik.CountryPicker.js +1 -1
  450. package/dist/native/components/Formik/Formik.DatePicker.d.ts +1 -1
  451. package/dist/native/components/Formik/Formik.DatePicker.js +1 -1
  452. package/dist/native/components/Formik/Formik.EmojiPicker.d.ts +1 -1
  453. package/dist/native/components/Formik/Formik.EmojiPicker.js +2 -3
  454. package/dist/native/components/Formik/Formik.EmojiPicker.js.map +1 -1
  455. package/dist/native/components/Formik/Formik.Form.d.ts +1 -1
  456. package/dist/native/components/Formik/Formik.Form.js +1 -1
  457. package/dist/native/components/Formik/Formik.IconPicker.d.ts +1 -1
  458. package/dist/native/components/Formik/Formik.IconPicker.js +1 -1
  459. package/dist/native/components/Formik/Formik.OTPInput.d.ts +1 -1
  460. package/dist/native/components/Formik/Formik.OTPInput.js +1 -1
  461. package/dist/native/components/Formik/Formik.Password.d.ts +1 -1
  462. package/dist/native/components/Formik/Formik.Password.js +1 -1
  463. package/dist/native/components/Formik/Formik.Radio.d.ts +1 -1
  464. package/dist/native/components/Formik/Formik.Radio.js +1 -1
  465. package/dist/native/components/Formik/Formik.Select.d.ts +1 -1
  466. package/dist/native/components/Formik/Formik.Select.js +1 -1
  467. package/dist/native/components/Formik/Formik.Selector.d.ts +1 -1
  468. package/dist/native/components/Formik/Formik.Selector.js +1 -1
  469. package/dist/native/components/Formik/Formik.Slider.d.ts +1 -1
  470. package/dist/native/components/Formik/Formik.Slider.js +1 -1
  471. package/dist/native/components/Formik/Formik.Switch.d.ts +1 -1
  472. package/dist/native/components/Formik/Formik.Switch.js +1 -1
  473. package/dist/native/components/Formik/Formik.TagInput.d.ts +1 -1
  474. package/dist/native/components/Formik/Formik.TagInput.js +1 -1
  475. package/dist/native/components/Formik/Formik.TextArea.d.ts +1 -1
  476. package/dist/native/components/Formik/Formik.TextArea.js +1 -1
  477. package/dist/native/components/Formik/Formik.TextField.d.ts +1 -1
  478. package/dist/native/components/Formik/Formik.TextField.js +1 -1
  479. package/dist/native/components/Formik/Formik.Toggle.d.ts +1 -1
  480. package/dist/native/components/Formik/Formik.Toggle.js +1 -1
  481. package/dist/native/components/Formik/Formik.ToggleGroup.d.ts +1 -1
  482. package/dist/native/components/Formik/Formik.ToggleGroup.js +1 -1
  483. package/dist/native/components/Formik/Formik.Uploader.d.ts +1 -1
  484. package/dist/native/components/Formik/Formik.Uploader.js +1 -1
  485. package/dist/native/components/Gradient/Gradient/Gradient.view.d.ts +1 -1
  486. package/dist/native/components/Gradient/Gradient/Gradient.view.js +1 -1
  487. package/dist/native/components/Gradient/Gradient/Gradient.view.native.d.ts +1 -1
  488. package/dist/native/components/Gradient/Gradient/Gradient.view.native.js +1 -1
  489. package/dist/native/components/Gradient/Gradient.d.ts +1 -1
  490. package/dist/native/components/Gradient/Gradient.js +1 -1
  491. package/dist/native/components/HoverCard/HoverCard/HoverCard.props.d.ts +1 -1
  492. package/dist/native/components/HoverCard/HoverCard/HoverCard.state.d.ts +2 -2
  493. package/dist/native/components/HoverCard/HoverCard/HoverCard.state.js +1 -1
  494. package/dist/native/components/HoverCard/HoverCard/HoverCard.style.d.ts +1 -1
  495. package/dist/native/components/HoverCard/HoverCard/HoverCard.view.d.ts +1 -1
  496. package/dist/native/components/HoverCard/HoverCard/HoverCard.view.js +1 -1
  497. package/dist/native/components/HoverCard/HoverCard/HoverCard.view.native.d.ts +1 -1
  498. package/dist/native/components/HoverCard/HoverCard/HoverCard.view.native.js +1 -1
  499. package/dist/native/components/HoverCard/HoverCard.js +1 -1
  500. package/dist/native/components/Icon/Icon.d.ts +1 -1
  501. package/dist/native/components/Icon/Icon.js +1 -1
  502. package/dist/native/components/Icon/Icon.native.d.ts +1 -1
  503. package/dist/native/components/Icon/Icon.native.js +1 -1
  504. package/dist/native/components/IconPicker/IconPicker/IconPicker.state.d.ts +2 -2
  505. package/dist/native/components/IconPicker/IconPicker/IconPicker.state.js +1 -1
  506. package/dist/native/components/IconPicker/IconPicker/IconPicker.view.d.ts +1 -1
  507. package/dist/native/components/IconPicker/IconPicker/IconPicker.view.js +1 -1
  508. package/dist/native/components/IconPicker/IconPicker/IconPicker.view.native.d.ts +1 -1
  509. package/dist/native/components/IconPicker/IconPicker/IconPicker.view.native.js +1 -1
  510. package/dist/native/components/IconPicker/IconPicker.d.ts +1 -1
  511. package/dist/native/components/IconPicker/IconPicker.js +1 -1
  512. package/dist/native/components/Input/FieldContainer/FieldContainer/FieldContainer.props.d.ts +1 -1
  513. package/dist/native/components/Input/FieldContainer/FieldContainer.d.ts +1 -1
  514. package/dist/native/components/Input/FieldContainer/FieldContainer.js +1 -1
  515. package/dist/native/components/Input/FieldContent/FieldContent/FieldContent.props.d.ts +1 -1
  516. package/dist/native/components/Input/FieldContent/FieldContent.d.ts +1 -1
  517. package/dist/native/components/Input/FieldContent/FieldContent.js +1 -1
  518. package/dist/native/components/Input/FieldIcons/FieldIcons.d.ts +1 -1
  519. package/dist/native/components/Input/FieldIcons/FieldIcons.js +1 -1
  520. package/dist/native/components/Input/FieldLabel/FieldLabel/FieldLabel.props.d.ts +1 -1
  521. package/dist/native/components/Input/FieldLabel/FieldLabel.d.ts +1 -1
  522. package/dist/native/components/Input/FieldLabel/FieldLabel.js +1 -1
  523. package/dist/native/components/Input/FieldLayout/FieldLayout/FieldLayout.props.d.ts +1 -1
  524. package/dist/native/components/Input/FieldLayout/FieldLayout.d.ts +1 -1
  525. package/dist/native/components/Input/FieldLayout/FieldLayout.js +1 -1
  526. package/dist/native/components/Input/FieldWrapper/FieldWrapper.d.ts +1 -1
  527. package/dist/native/components/Input/FieldWrapper/FieldWrapper.js +1 -1
  528. package/dist/native/components/Input/HelperText/HelperText.d.ts +1 -1
  529. package/dist/native/components/Input/HelperText/HelperText.js +1 -1
  530. package/dist/native/components/Input/HelperText/HelperText.props.d.ts +1 -1
  531. package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.d.ts +1 -1
  532. package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.js +1 -1
  533. package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.native.d.ts +1 -1
  534. package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.native.js +1 -1
  535. package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.types.d.ts +1 -1
  536. package/dist/native/components/Link/Link/Link.props.d.ts +1 -1
  537. package/dist/native/components/Link/Link/Link.state.d.ts +1 -1
  538. package/dist/native/components/Link/Link/Link.state.js +1 -1
  539. package/dist/native/components/Link/Link/Link.view.d.ts +1 -1
  540. package/dist/native/components/Link/Link/Link.view.js +1 -1
  541. package/dist/native/components/Link/Link/Link.view.native.d.ts +1 -1
  542. package/dist/native/components/Link/Link/Link.view.native.js +1 -1
  543. package/dist/native/components/Link/Link.d.ts +1 -1
  544. package/dist/native/components/Link/Link.js +1 -1
  545. package/dist/native/components/Loader/Loader/Loader.props.d.ts +1 -1
  546. package/dist/native/components/Loader/Loader/Loader.view.d.ts +1 -1
  547. package/dist/native/components/Loader/Loader/Loader.view.js +1 -1
  548. package/dist/native/components/Loader/Loader/Loader.view.native.d.ts +1 -1
  549. package/dist/native/components/Loader/Loader/Loader.view.native.js +1 -1
  550. package/dist/native/components/Loader/Loader.d.ts +1 -1
  551. package/dist/native/components/Loader/Loader.js +1 -1
  552. package/dist/native/components/Markdown/Markdown/Markdown.content.d.ts +6 -0
  553. package/dist/native/components/Markdown/Markdown/Markdown.content.js +29 -0
  554. package/dist/native/components/Markdown/Markdown/Markdown.content.js.map +1 -0
  555. package/dist/native/components/Markdown/Markdown/Markdown.props.d.ts +16 -0
  556. package/dist/native/components/Markdown/Markdown/Markdown.props.js +2 -0
  557. package/dist/native/components/Markdown/Markdown/Markdown.props.js.map +1 -0
  558. package/dist/native/components/Markdown/Markdown/Markdown.view.d.ts +1 -0
  559. package/dist/native/components/Markdown/Markdown/Markdown.view.js +2 -0
  560. package/dist/native/components/Markdown/Markdown/Markdown.view.js.map +1 -0
  561. package/dist/native/components/Markdown/Markdown/Markdown.view.native.d.ts +3 -0
  562. package/dist/native/components/Markdown/Markdown/Markdown.view.native.js +8 -0
  563. package/dist/native/components/Markdown/Markdown/Markdown.view.native.js.map +1 -0
  564. package/dist/native/components/Markdown/Markdown.d.ts +3 -0
  565. package/dist/native/components/Markdown/Markdown.js +4 -0
  566. package/dist/native/components/Markdown/Markdown.js.map +1 -0
  567. package/dist/native/components/MediaPreview.d.ts +1 -1
  568. package/dist/native/components/MediaPreview.js +1 -1
  569. package/dist/native/components/Menubar/Menubar/Menubar.props.d.ts +1 -1
  570. package/dist/native/components/Menubar/Menubar/Menubar.state.d.ts +2 -2
  571. package/dist/native/components/Menubar/Menubar/Menubar.state.js +1 -1
  572. package/dist/native/components/Menubar/Menubar/Menubar.type.d.ts +1 -1
  573. package/dist/native/components/Menubar/Menubar/Menubar.view.d.ts +1 -1
  574. package/dist/native/components/Menubar/Menubar/Menubar.view.js +1 -1
  575. package/dist/native/components/Menubar/Menubar/Menubar.view.native.d.ts +1 -1
  576. package/dist/native/components/Menubar/Menubar/Menubar.view.native.js +1 -1
  577. package/dist/native/components/Menubar/Menubar.js +1 -1
  578. package/dist/native/components/Message/Message/Message.layout.d.ts +1 -1
  579. package/dist/native/components/Message/Message/Message.layout.js +1 -1
  580. package/dist/native/components/Message/Message/Message.layout.native.d.ts +1 -1
  581. package/dist/native/components/Message/Message/Message.layout.native.js +1 -1
  582. package/dist/native/components/Message/Message/Message.view.d.ts +1 -1
  583. package/dist/native/components/Message/Message/Message.view.js +1 -1
  584. package/dist/native/components/Modal/Modal/Modal.layout.d.ts +1 -1
  585. package/dist/native/components/Modal/Modal/Modal.layout.js +1 -1
  586. package/dist/native/components/Modal/Modal/Modal.props.d.ts +1 -1
  587. package/dist/native/components/Modal/Modal/Modal.view.d.ts +1 -1
  588. package/dist/native/components/Modal/Modal/Modal.view.js +1 -1
  589. package/dist/native/components/Modal/Modal/Modal.view.native.d.ts +1 -1
  590. package/dist/native/components/Modal/Modal/Modal.view.native.js +1 -1
  591. package/dist/native/components/Modal/Modal.js +1 -1
  592. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.props.d.ts +1 -1
  593. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.state.d.ts +2 -2
  594. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.state.js +1 -1
  595. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.type.d.ts +1 -1
  596. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.d.ts +1 -1
  597. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.js +1 -1
  598. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.native.d.ts +1 -1
  599. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.native.js +1 -1
  600. package/dist/native/components/NavigationMenu/NavigationMenu.js +1 -1
  601. package/dist/native/components/OTPInput/OTPInput/OTPInput.state.d.ts +7 -7
  602. package/dist/native/components/OTPInput/OTPInput/OTPInput.state.js +1 -1
  603. package/dist/native/components/OTPInput/OTPInput/OTPInput.view.d.ts +1 -1
  604. package/dist/native/components/OTPInput/OTPInput/OTPInput.view.js +1 -1
  605. package/dist/native/components/OTPInput/OTPInput/OTPInput.view.native.d.ts +1 -1
  606. package/dist/native/components/OTPInput/OTPInput/OTPInput.view.native.js +1 -1
  607. package/dist/native/components/OTPInput/OTPInput.d.ts +1 -1
  608. package/dist/native/components/OTPInput/OTPInput.js +1 -1
  609. package/dist/native/components/PageLayout/PageLayout.d.ts +1 -1
  610. package/dist/native/components/PageLayout/PageLayout.js +1 -1
  611. package/dist/native/components/PageLayout/PageLayout.types.d.ts +1 -1
  612. package/dist/native/components/Pagination/Pagination/Pagination.state.js +1 -1
  613. package/dist/native/components/Pagination/Pagination/Pagination.view.d.ts +1 -1
  614. package/dist/native/components/Pagination/Pagination/Pagination.view.js +1 -1
  615. package/dist/native/components/Pagination/Pagination/Pagination.view.native.d.ts +1 -1
  616. package/dist/native/components/Pagination/Pagination/Pagination.view.native.js +1 -1
  617. package/dist/native/components/Pagination/Pagination.d.ts +1 -1
  618. package/dist/native/components/Pagination/Pagination.js +1 -1
  619. package/dist/native/components/Portal/Portal.d.ts +1 -1
  620. package/dist/native/components/Portal/Portal.js +1 -1
  621. package/dist/native/components/Portal/Portal.native.d.ts +1 -1
  622. package/dist/native/components/Portal/Portal.native.js +1 -1
  623. package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.d.ts +1 -1
  624. package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.js +1 -1
  625. package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.native.d.ts +1 -1
  626. package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.native.js +1 -1
  627. package/dist/native/components/ProgressBar/ProgressBar.d.ts +1 -1
  628. package/dist/native/components/ProgressBar/ProgressBar.js +1 -1
  629. package/dist/native/components/Resizable/Resizable/Resizable.props.d.ts +1 -1
  630. package/dist/native/components/Resizable/Resizable/Resizable.state.d.ts +2 -2
  631. package/dist/native/components/Resizable/Resizable/Resizable.state.js +1 -1
  632. package/dist/native/components/Resizable/Resizable/Resizable.view.d.ts +1 -1
  633. package/dist/native/components/Resizable/Resizable/Resizable.view.js +1 -1
  634. package/dist/native/components/Resizable/Resizable/Resizable.view.native.d.ts +1 -1
  635. package/dist/native/components/Resizable/Resizable/Resizable.view.native.js +1 -1
  636. package/dist/native/components/Resizable/Resizable.js +1 -1
  637. package/dist/native/components/Router/Router.d.ts +1 -1
  638. package/dist/native/components/Router/Router.js +1 -1
  639. package/dist/native/components/Router/Router.match.d.ts +1 -1
  640. package/dist/native/components/Router/Router.match.js +1 -1
  641. package/dist/native/components/Router/Router.native.d.ts +1 -1
  642. package/dist/native/components/Router/Router.native.js +1 -1
  643. package/dist/native/components/Router/Router.types.d.ts +1 -1
  644. package/dist/native/components/Separator/Separator/Separator.view.d.ts +1 -1
  645. package/dist/native/components/Separator/Separator/Separator.view.js +1 -1
  646. package/dist/native/components/Separator/Separator/Separator.view.native.d.ts +1 -1
  647. package/dist/native/components/Separator/Separator/Separator.view.native.js +1 -1
  648. package/dist/native/components/Separator/Separator.d.ts +1 -1
  649. package/dist/native/components/Separator/Separator.js +1 -1
  650. package/dist/native/components/ShareButton/ShareButton/ShareButton.props.d.ts +1 -1
  651. package/dist/native/components/ShareButton/ShareButton/ShareButton.state.js +1 -1
  652. package/dist/native/components/ShareButton/ShareButton/ShareButton.state.native.js +1 -1
  653. package/dist/native/components/ShareButton/ShareButton/ShareButton.view.d.ts +1 -1
  654. package/dist/native/components/ShareButton/ShareButton/ShareButton.view.js +1 -1
  655. package/dist/native/components/ShareButton/ShareButton.d.ts +1 -1
  656. package/dist/native/components/ShareButton/ShareButton.js +1 -1
  657. package/dist/native/components/Sidebar/Sidebar/Sidebar.props.d.ts +1 -1
  658. package/dist/native/components/Sidebar/Sidebar/Sidebar.state.js +1 -1
  659. package/dist/native/components/Sidebar/Sidebar/Sidebar.view.d.ts +1 -1
  660. package/dist/native/components/Sidebar/Sidebar/Sidebar.view.js +1 -1
  661. package/dist/native/components/Sidebar/Sidebar/Sidebar.view.native.d.ts +1 -1
  662. package/dist/native/components/Sidebar/Sidebar/Sidebar.view.native.js +1 -1
  663. package/dist/native/components/Sidebar/Sidebar.js +1 -1
  664. package/dist/native/components/Slider/Slider/Slider.state.d.ts +1 -1
  665. package/dist/native/components/Slider/Slider/Slider.state.js +1 -1
  666. package/dist/native/components/Slider/Slider/Slider.view.d.ts +1 -1
  667. package/dist/native/components/Slider/Slider/Slider.view.js +1 -1
  668. package/dist/native/components/Slider/Slider/Slider.view.native.d.ts +1 -1
  669. package/dist/native/components/Slider/Slider/Slider.view.native.js +1 -1
  670. package/dist/native/components/Slider/Slider.d.ts +1 -1
  671. package/dist/native/components/Slider/Slider.js +1 -1
  672. package/dist/native/components/SplashScreen/SplashScreen.d.ts +1 -1
  673. package/dist/native/components/SplashScreen/SplashScreen.js +1 -1
  674. package/dist/native/components/SplashScreen/SplashScreen.types.d.ts +1 -1
  675. package/dist/native/components/StatusIndicator/StatusIndicator/StatusIndicator.view.d.ts +1 -1
  676. package/dist/native/components/StatusIndicator/StatusIndicator/StatusIndicator.view.js +1 -1
  677. package/dist/native/components/StatusIndicator/StatusIndicator.d.ts +1 -1
  678. package/dist/native/components/StatusIndicator/StatusIndicator.js +1 -1
  679. package/dist/native/components/Table/Table/Table.context.d.ts +1 -1
  680. package/dist/native/components/Table/Table/Table.context.js +1 -1
  681. package/dist/native/components/Table/Table/Table.props.d.ts +1 -1
  682. package/dist/native/components/Table/Table/Table.state.d.ts +1 -1
  683. package/dist/native/components/Table/Table/Table.state.js +1 -1
  684. package/dist/native/components/Table/Table/Table.view.d.ts +1 -1
  685. package/dist/native/components/Table/Table/Table.view.js +1 -1
  686. package/dist/native/components/Table/Table/TableScroll.d.ts +1 -1
  687. package/dist/native/components/Table/Table/TableScroll.js +1 -1
  688. package/dist/native/components/Table/Table/TableScroll.native.d.ts +1 -1
  689. package/dist/native/components/Table/Table/TableScroll.native.js +1 -1
  690. package/dist/native/components/Table/Table.d.ts +1 -1
  691. package/dist/native/components/Table/Table.js +1 -1
  692. package/dist/native/components/Tabs/Tabs/TabHeader.d.ts +1 -1
  693. package/dist/native/components/Tabs/Tabs/TabHeader.js +1 -1
  694. package/dist/native/components/Tabs/Tabs/Tabs.props.d.ts +1 -1
  695. package/dist/native/components/Tabs/Tabs/Tabs.state.js +1 -1
  696. package/dist/native/components/Tabs/Tabs/Tabs.type.d.ts +1 -1
  697. package/dist/native/components/Tabs/Tabs/Tabs.view.d.ts +1 -1
  698. package/dist/native/components/Tabs/Tabs/Tabs.view.js +1 -1
  699. package/dist/native/components/Tabs/Tabs/Tabs.view.native.d.ts +1 -1
  700. package/dist/native/components/Tabs/Tabs/Tabs.view.native.js +1 -1
  701. package/dist/native/components/Tabs/Tabs.d.ts +1 -1
  702. package/dist/native/components/Tabs/Tabs.js +1 -1
  703. package/dist/native/components/TextArea/TextArea.d.ts +1 -1
  704. package/dist/native/components/TextArea/TextArea.js +1 -1
  705. package/dist/native/components/TextArea/TextArea.native.d.ts +1 -1
  706. package/dist/native/components/TextArea/TextArea.native.js +1 -1
  707. package/dist/native/components/Title/Title/SlideEffect.d.ts +1 -1
  708. package/dist/native/components/Title/Title/SlideEffect.js +1 -1
  709. package/dist/native/components/Title/Title/SlideEffect.native.d.ts +1 -1
  710. package/dist/native/components/Title/Title/SlideEffect.native.js +1 -1
  711. package/dist/native/components/Title/Title/Title.state.d.ts +1 -1
  712. package/dist/native/components/Title/Title/Title.state.js +1 -1
  713. package/dist/native/components/Title/Title/Title.view.d.ts +1 -1
  714. package/dist/native/components/Title/Title/Title.view.js +1 -1
  715. package/dist/native/components/Title/Title/Title.view.native.d.ts +1 -1
  716. package/dist/native/components/Title/Title/Title.view.native.js +1 -1
  717. package/dist/native/components/Title/Title/TypewriterEffect.d.ts +1 -1
  718. package/dist/native/components/Title/Title/TypewriterEffect.js +1 -1
  719. package/dist/native/components/Title/Title/TypewriterEffect.native.d.ts +1 -1
  720. package/dist/native/components/Title/Title/TypewriterEffect.native.js +1 -1
  721. package/dist/native/components/Title/Title.d.ts +1 -1
  722. package/dist/native/components/Title/Title.js +1 -1
  723. package/dist/native/components/Toast/Toast/Toast.view.d.ts +1 -1
  724. package/dist/native/components/Toast/Toast/Toast.view.js +1 -1
  725. package/dist/native/components/Toast/Toast/Toast.view.native.d.ts +1 -1
  726. package/dist/native/components/Toast/Toast/Toast.view.native.js +1 -1
  727. package/dist/native/components/Toast/Toast.d.ts +1 -1
  728. package/dist/native/components/Toast/Toast.js +1 -1
  729. package/dist/native/components/Toggle/Toggle/Toggle.state.d.ts +2 -2
  730. package/dist/native/components/Toggle/Toggle/Toggle.state.js +1 -1
  731. package/dist/native/components/Toggle/Toggle/Toggle.view.d.ts +1 -1
  732. package/dist/native/components/Toggle/Toggle/Toggle.view.js +1 -1
  733. package/dist/native/components/Toggle/Toggle/Toggle.view.native.d.ts +1 -1
  734. package/dist/native/components/Toggle/Toggle/Toggle.view.native.js +1 -1
  735. package/dist/native/components/Toggle/Toggle.d.ts +1 -1
  736. package/dist/native/components/Toggle/Toggle.js +1 -1
  737. package/dist/native/components/ToggleGroup/ToggleGroup/ToggleGroup.state.d.ts +1 -1
  738. package/dist/native/components/ToggleGroup/ToggleGroup/ToggleGroup.state.js +1 -1
  739. package/dist/native/components/ToggleGroup/ToggleGroup/ToggleGroup.view.d.ts +1 -1
  740. package/dist/native/components/ToggleGroup/ToggleGroup/ToggleGroup.view.js +1 -1
  741. package/dist/native/components/ToggleGroup/ToggleGroup.d.ts +1 -1
  742. package/dist/native/components/ToggleGroup/ToggleGroup.js +1 -1
  743. package/dist/native/components/Tooltip/Tooltip/Tooltip.props.d.ts +1 -1
  744. package/dist/native/components/Tooltip/Tooltip/Tooltip.state.d.ts +2 -2
  745. package/dist/native/components/Tooltip/Tooltip/Tooltip.state.js +1 -1
  746. package/dist/native/components/Tooltip/Tooltip/Tooltip.view.d.ts +1 -1
  747. package/dist/native/components/Tooltip/Tooltip/Tooltip.view.js +1 -1
  748. package/dist/native/components/Tooltip/Tooltip/Tooltip.view.native.d.ts +1 -1
  749. package/dist/native/components/Tooltip/Tooltip/Tooltip.view.native.js +1 -1
  750. package/dist/native/components/Tooltip/Tooltip.js +1 -1
  751. package/dist/native/components/Uploader/Uploader/Uploader.state.d.ts +1 -1
  752. package/dist/native/components/Uploader/Uploader/Uploader.state.js +1 -1
  753. package/dist/native/components/Uploader/Uploader/Uploader.view.d.ts +1 -1
  754. package/dist/native/components/Uploader/Uploader/Uploader.view.js +1 -1
  755. package/dist/native/components/Uploader/Uploader.d.ts +1 -1
  756. package/dist/native/components/Uploader/Uploader.js +1 -1
  757. package/dist/native/components/index.d.ts +7 -0
  758. package/dist/native/components/index.js +5 -0
  759. package/dist/native/components/index.js.map +1 -1
  760. package/dist/native/design-system/DesignSystemProvider.d.ts +1 -1
  761. package/dist/native/design-system/DesignSystemProvider.js +1 -1
  762. package/dist/native/pages/designSystem.page.d.ts +1 -1
  763. package/dist/native/pages/designSystem.page.js +1 -1
  764. package/dist/web.cjs.js +55 -11
  765. package/dist/web.cjs.js.map +1 -1
  766. package/dist/web.esm.js +15921 -12341
  767. package/dist/web.esm.js.map +1 -1
  768. package/dist/web.umd.js +55 -11
  769. package/dist/web.umd.js.map +1 -1
  770. package/docs/app-studio/README.md +1 -1
  771. package/docs/components/BlockEditor-drag-and-drop.md +61 -0
  772. package/docs/components/BlockEditor.mdx +106 -0
  773. package/docs/components/ColorInput.mdx +1 -1
  774. package/docs/components/EmojiPicker.mdx +20 -0
  775. package/docs/components/Form.mdx +5 -5
  776. package/docs/components/Formik.mdx +23 -23
  777. package/docs/components/Markdown.mdx +99 -0
  778. package/docs/components/OTPInput.mdx +1 -1
  779. package/docs/components/TagInput.mdx +1 -1
  780. package/docs/components/TextArea.mdx +2 -2
  781. package/docs/components/TextField.mdx +3 -3
  782. package/docs/getting-started/component-usage.md +2 -2
  783. package/docs/getting-started/react-native.md +13 -2
  784. package/docs/tutorials/basic/creating-a-simple-form.md +4 -4
  785. package/package.json +1 -2
package/dist/web.umd.js CHANGED
@@ -1,9 +1,9 @@
1
- (function(F,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("react/jsx-runtime"),require("react"),require("app-studio"),require("react-dom"),require("zustand"),require("react-router-dom"),require("formik")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","app-studio","react-dom","zustand","react-router-dom","formik"],r):(F=typeof globalThis<"u"?globalThis:F||self,r(F.AppStudioWeb={},F.jsxRuntime,F.React,F.appStudio,F.ReactDOM,F.zustand,F.ReactRouterDOM,F.Formik))})(this,function(F,r,h,i,Pc,vo,it,Ee){"use strict";var zb=Object.defineProperty;var Mb=(F,r,h)=>r in F?zb(F,r,{enumerable:!0,configurable:!0,writable:!0,value:h}):F[r]=h;var Ze=(F,r,h)=>Mb(F,typeof r!="symbol"?r+"":r,h);var wo,Pn;const ct=(e="id")=>`${e}-${Math.random().toString(36).substring(2,9)}`,Vc=({type:e="single",value:o,defaultValue:t,onValueChange:n,collapsible:a=!1})=>{const l=o!==void 0,c=o??t,s=()=>e==="multiple"?Array.isArray(c)?c:c?[c]:[]:Array.isArray(c)?c[0]:c,[d,g]=h.useState(s()),m=h.useMemo(()=>ct("accordion"),[]),f=l?o:d,p=h.useMemo(()=>f===void 0?[]:Array.isArray(f)?f:[f],[f]);h.useEffect(()=>{l&&(e==="multiple"&&!Array.isArray(o)?(console.warn('Accordion with type="multiple" received non-array value:',o),g(o?[String(o)]:[])):e==="single"&&Array.isArray(o)?(console.warn('Accordion with type="single" received array value:',o),g(o.length>0?o[0]:void 0)):g(o))},[o,l,e]);const u=h.useCallback(k=>{let x;if(e==="single")f===k&&a?x=void 0:f!==k?x=k:x=f;else{const C=Array.isArray(f)?f:[];C.includes(k)?x=C.filter(S=>S!==k):x=[...C,k],Array.isArray(x)&&x.length===0&&(x=[])}l||g(x),n&&n(x)},[e,f,a,l,n]),y=h.useCallback(k=>p.includes(k),[p]);return{expandedItems:p,toggleItem:u,isItemExpanded:y,type:e,collapsible:a,baseId:m}},Ac={square:{borderRadius:0},rounded:{borderRadius:8}},Ec={default:{borderWidth:0,style:{backgroundColor:"transparent"},transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.15s ease, background-color 0.15s ease",_hover:{borderColor:"color-gray-300"}},filled:{backgroundColor:"color-gray-50",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-100"}}},Dc={metadata:{id:"default",label:"Default",sourcePath:"",sourceTitle:"Default adaptive design system (light + dark)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},theme:{primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626",onPrimary:"#ffffff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200"},tokens:{rawCssVars:{primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626"},colors:[{name:"primary",value:"#2563eb",role:"primary"},{name:"secondary",value:"#7c3aed",role:"secondary"},{name:"success",value:"#16a34a",role:"success"},{name:"warning",value:"#d97706",role:"warning"},{name:"error",value:"#dc2626",role:"error"}],typography:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace",fontSizes:["12px","13px","14px","16px","18px","22px","28px","36px","48px","64px"],fontWeights:["400","500","600","700","800"],lineHeights:["1.0","1.1","1.2","1.4","1.5","1.6"]},spacing:["2px","4px","8px","12px","16px","24px","32px","48px","64px"],radii:["2px","4px","6px","8px","12px","16px","9999px"],shadows:["0 1px 2px rgba(0,0,0,0.04)","0 4px 12px rgba(0,0,0,0.08)","0 12px 32px rgba(0,0,0,0.12)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:8,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:600,fontStyle:"normal"},text:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 2px rgba(0,0,0,0.04)"},header:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"9999px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral-clear"}},st={airbnb:{metadata:{id:"airbnb",label:"Airbnb",sourcePath:"design.md/html/airbnb.html",sourceTitle:"Design System Inspiration of Airbnb",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},theme:{primary:"#ff385c",secondary:"#222222",success:"#428bff",warning:"#460479",error:"#c13515",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#ff385c","primary-active":"#e00b41","primary-disabled":"#ffd1da",error:"#c13515",luxe:"#460479",plus:"#92174d",ink:"#222222",body:"#3f3f3f",muted:"#6a6a6a","muted-soft":"#929292",hairline:"#dddddd","hairline-soft":"#ebebeb","border-strong":"#c1c1c1",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#f2f2f2","on-primary":"#ffffff","legal-link":"#428bff",shadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",display:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",text:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, sans-serif"},colors:[{name:"primary",value:"#ff385c",role:"primary"},{name:"primary-active",value:"#e00b41",role:"primary active"},{name:"primary-disabled",value:"#ffd1da",role:"primary disabled"},{name:"error",value:"#c13515",role:"error"},{name:"luxe",value:"#460479",role:"luxe"},{name:"plus",value:"#92174d",role:"plus"},{name:"ink",value:"#222222",role:"ink"},{name:"body",value:"#3f3f3f",role:"body"},{name:"muted",value:"#6a6a6a",role:"muted"},{name:"muted-soft",value:"#929292",role:"muted soft"},{name:"hairline",value:"#dddddd",role:"hairline"},{name:"hairline-soft",value:"#ebebeb",role:"hairline soft"},{name:"border-strong",value:"#c1c1c1",role:"border strong"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#f2f2f2",role:"surface strong"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"legal-link",value:"#428bff",role:"legal link"},{name:"shadow",value:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",role:"shadow"}],typography:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","48px","18px","20px","11px","28px","13px","12px","8px","64px","21px","10px","24px","36px","15px"],fontWeights:["400","600","700","500"],lineHeights:["1.5","1.1","1.43","1.25","2","1","1.2","1.35","1.4"]},spacing:["2px","4px","5px","6px","7px","8px","10px","11px","12px","13px","14px","16px","20px","23px","24px","28px","32px","40px","48px","56px"],radii:["9999px","8px","14px","4px","6px","3px"],shadows:["rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0","var(--shadow)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},header:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"14px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:16},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:16},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"14px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"14px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:16,pillRadius:9999,badgeRadius:6,voice:"warm-welcoming"}},apple:{metadata:{id:"apple",label:"Apple",sourcePath:"design.md/html/apple.html",sourceTitle:"Design System Inspiration of Apple",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},theme:{primary:"#0071E3",secondary:"#1d1d1f",success:"#0071e3",warning:"#272729",error:"#2997ff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#0066cc","primary-focus":"#0071e3","primary-on-dark":"#2997ff",ink:"#1d1d1f",body:"#1d1d1f","body-on-dark":"#ffffff","body-muted":"#cccccc","ink-muted-80":"#333333","ink-muted-48":"#7a7a7a","divider-soft":"#f0f0f0",hairline:"#e0e0e0",canvas:"#ffffff","canvas-parchment":"#f5f5f7","surface-pearl":"#fafafc","surface-tile-1":"#272729","surface-tile-2":"#2a2a2c","surface-tile-3":"#252527","surface-black":"#000000","surface-chip-translucent":"rgba(210, 210, 215, 0.64)","on-primary":"#ffffff","on-dark":"#ffffff",display:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",text:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#0071E3",role:"primary"},{name:"primary-focus",value:"#0071e3",role:"primary focus"},{name:"primary-on-dark",value:"#2997ff",role:"primary on dark"},{name:"ink",value:"#1d1d1f",role:"ink"},{name:"body",value:"#1d1d1f",role:"body"},{name:"body-on-dark",value:"#ffffff",role:"body on dark"},{name:"body-muted",value:"#cccccc",role:"body muted"},{name:"ink-muted-80",value:"#333333",role:"ink muted 80"},{name:"ink-muted-48",value:"#7a7a7a",role:"ink muted 48"},{name:"divider-soft",value:"#f0f0f0",role:"divider soft"},{name:"hairline",value:"#e0e0e0",role:"hairline"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"canvas-parchment",value:"#f5f5f7",role:"canvas parchment"},{name:"surface-pearl",value:"#fafafc",role:"surface pearl"},{name:"surface-tile-1",value:"#272729",role:"surface tile 1"},{name:"surface-tile-2",value:"#2a2a2c",role:"surface tile 2"},{name:"surface-tile-3",value:"#252527",role:"surface tile 3"},{name:"surface-black",value:"#000000",role:"surface black"},{name:"surface-chip-translucent",value:"rgba(210, 210, 215, 0.64)",role:"surface chip translucent"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"}],typography:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["17px","14px","56px","21px","12px","40px","24px","13px","18px","28px","11px","34px","44px","32px","19px"],fontWeights:["400","600","300","700"],lineHeights:["1.47","1.07","1.19","1.1","1.43","1.5","1","1.14","2.0","2.41","1.2","1.35"]},spacing:["5px","6px","7px","8px","10px","11px","12px","14px","15px","16px","18px","20px","21px","22px","24px","28px","32px","44px","48px","50px"],radii:["9999px","18px","28px","24px","8px","11px","50%","12px","4px","6px","3px"],shadows:["0 5px 30px rgba(0, 0, 0, 0.22)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:8,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:18,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 5px 30px rgba(0, 0, 0, 0.22)"},header:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"18px"},trigger:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:18},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:18},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"18px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"18px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"light",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"flat",signatureMotif:"◯",density:"spacious",surfaceTone:"paper",cardRadius:18,pillRadius:9999,badgeRadius:8,voice:"minimal-precise"}},coinbase:{metadata:{id:"coinbase",label:"Coinbase",sourcePath:"design.md/html/coinbase.html",sourceTitle:"Design System Inspiration of Coinbase",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap"]},theme:{primary:"#0052ff",secondary:"#0a0b0d",success:"#16a34a",warning:"#003ecc",error:"#dc2626",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#0052ff","primary-active":"#003ecc","primary-disabled":"#a8b8cc",ink:"#0a0b0d",body:"#5b616e",muted:"#7c828a","muted-soft":"#a8acb3",hairline:"#dee1e6","hairline-soft":"#eef0f3",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#eef0f3","surface-dark":"#0a0b0d","surface-dark-elevated":"#16181c","on-primary":"#ffffff","on-dark":"#ffffff","on-dark-soft":"#a8acb3","semantic-up":"#05b169","semantic-down":"#cf202f","accent-yellow":"#f4b000",display:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",text:"'Inter', 'Coinbase Sans', sans-serif",mono:"'JetBrains Mono', 'Coinbase Mono', monospace"},colors:[{name:"primary",value:"#0052ff",role:"primary"},{name:"primary-active",value:"#003ecc",role:"primary active"},{name:"primary-disabled",value:"#a8b8cc",role:"primary disabled"},{name:"ink",value:"#0a0b0d",role:"ink"},{name:"body",value:"#5b616e",role:"body"},{name:"muted",value:"#7c828a",role:"muted"},{name:"muted-soft",value:"#a8acb3",role:"muted soft"},{name:"hairline",value:"#dee1e6",role:"hairline"},{name:"hairline-soft",value:"#eef0f3",role:"hairline soft"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#eef0f3",role:"surface strong"},{name:"surface-dark",value:"#0a0b0d",role:"surface dark"},{name:"surface-dark-elevated",value:"#16181c",role:"surface dark elevated"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-soft",value:"#a8acb3",role:"on dark soft"},{name:"semantic-up",value:"#05b169",role:"semantic up"},{name:"semantic-down",value:"#cf202f",role:"semantic down"},{name:"accent-yellow",value:"#f4b000",role:"accent yellow"}],typography:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",monoFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontSizes:["16px","14px","72px","18px","13px","36px","12px","44px","11px","52px","28px","40px","32px","48px","26px"],fontWeights:["500","600","400","700"],lineHeights:["1.5","1.2","1.05","1.15","1.0","1.09","1","1.35","1.4"]},spacing:["4px","5px","6px","8px","10px","11px","12px","13px","14px","15px","16px","19px","20px","24px","28px","32px","40px","44px","48px","56px"],radii:["100px","24px","20px","16px","9999px","14px","12px","8px","6px","3px"],shadows:["0 16px 40px rgba(0,0,0,0.5)","0 16px 40px rgba(0,0,0,0.4)","0 4px 12px rgba(0,0,0,0.04)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 16px 40px rgba(0,0,0,0.5)"},header:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"16px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"16px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"◆",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"trustworthy-financial"}},figma:{metadata:{id:"figma",label:"Figma",sourcePath:"design.md/html/figma.html",sourceTitle:"Design System Inspiration of Figma",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300..700&family=JetBrains+Mono:wght@400;500&display=swap"]},theme:{primary:"#F24E1E",secondary:"#A259FF",success:"#0ACF83",warning:"#FFC700",error:"#FF7262",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#000000","on-primary":"#ffffff",ink:"#000000",canvas:"#ffffff","inverse-canvas":"#000000","inverse-ink":"#ffffff",hairline:"#e6e6e6","hairline-soft":"#f1f1f1","surface-soft":"#f7f7f5","block-lime":"#dceeb1","block-lilac":"#c5b0f4","block-cream":"#f4ecd6","block-pink":"#efd4d4","block-mint":"#c8e6cd","block-coral":"#f3c9b6","block-navy":"#1f1d3d","accent-magenta":"#ff3d8b","semantic-success":"#1ea64a",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",mono:"'JetBrains Mono', 'SF Mono', Menlo, monospace"},colors:[{name:"primary",value:"#F24E1E",role:"primary"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#000000",role:"ink"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"inverse-canvas",value:"#000000",role:"inverse canvas"},{name:"inverse-ink",value:"#ffffff",role:"inverse ink"},{name:"hairline",value:"#e6e6e6",role:"hairline"},{name:"hairline-soft",value:"#f1f1f1",role:"hairline soft"},{name:"surface-soft",value:"#f7f7f5",role:"surface soft"},{name:"block-lime",value:"#dceeb1",role:"block lime"},{name:"block-lilac",value:"#c5b0f4",role:"block lilac"},{name:"block-cream",value:"#f4ecd6",role:"block cream"},{name:"block-pink",value:"#efd4d4",role:"block pink"},{name:"block-mint",value:"#c8e6cd",role:"block mint"},{name:"block-coral",value:"#f3c9b6",role:"block coral"},{name:"block-navy",value:"#1f1d3d",role:"block navy"},{name:"accent-magenta",value:"#ff3d8b",role:"accent magenta"},{name:"semantic-success",value:"#1ea64a",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",monoFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontSizes:["18px","16px","80px","20px","12px","40px","14px","11px","26px","24px","32px","13px","10px","56px","36px"],fontWeights:["320","330","480","600","500","700"],lineHeights:["1.45","1.0","1.4","1.1","1.6","1.35","1","1.2"]},spacing:["5px","6px","8px","10px","12px","14px","16px","20px","22px","24px","28px","32px","36px","40px","44px","48px","56px","64px","96px","100px"],radii:["50px","8px","9999px","24px","6px","2px","3px"],shadows:["0 0 0 2px rgba(0,0,0,0.08)","none","0 4px 16px rgba(0,0,0,0.06)","0 12px 32px rgba(0,0,0,0.18)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 2px rgba(0,0,0,0.08)"},header:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"12px"},trigger:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"✦",density:"comfortable",surfaceTone:"paper",cardRadius:8,pillRadius:9999,badgeRadius:4,voice:"playful-creative"}},linear:{metadata:{id:"linear",label:"Linear",sourcePath:"design.md/html/linear.html",sourceTitle:"Design System Inspiration of Linear",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400&display=swap"]},theme:{primary:"#5e6ad2",secondary:"#828fff",success:"#27a644",warning:"#5e69d1",error:"#828fff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#5e6ad2","primary-hover":"#828fff","primary-focus":"#5e69d1","on-primary":"#ffffff",ink:"#f7f8f8","ink-muted":"#d0d6e0","ink-subtle":"#8a8f98","ink-tertiary":"#62666d",canvas:"#010102","surface-1":"#0f1011","surface-2":"#141516","surface-3":"#18191a","surface-4":"#191a1b",hairline:"#23252a","hairline-strong":"#34343a","hairline-tertiary":"#3e3e44","semantic-success":"#27a644",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",mono:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace"},colors:[{name:"primary",value:"#5e6ad2",role:"primary"},{name:"primary-hover",value:"#828fff",role:"primary hover"},{name:"primary-focus",value:"#5e69d1",role:"primary focus"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#f7f8f8",role:"ink"},{name:"ink-muted",value:"#d0d6e0",role:"ink muted"},{name:"ink-subtle",value:"#8a8f98",role:"ink subtle"},{name:"ink-tertiary",value:"#62666d",role:"ink tertiary"},{name:"canvas",value:"#08090A",role:"canvas"},{name:"surface-1",value:"#0f1011",role:"surface 1"},{name:"surface-2",value:"#141516",role:"surface 2"},{name:"surface-3",value:"#18191a",role:"surface 3"},{name:"surface-4",value:"#191a1b",role:"surface 4"},{name:"hairline",value:"#23252a",role:"hairline"},{name:"hairline-strong",value:"#34343a",role:"hairline strong"},{name:"hairline-tertiary",value:"#3e3e44",role:"hairline tertiary"},{name:"semantic-success",value:"#27a644",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",monoFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontSizes:["16px","14px","80px","18px","13px","56px","15px","12px","11px","28px","40px","22px","10px","36px"],fontWeights:["400","500","600","700"],lineHeights:["1.50","1.05","1.20","1.10","1.5","1.6","1.25","1","1.2","1.35","1.4"]},spacing:["2px","5px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","48px","56px","64px","80px","96px","120px"],radii:["8px","12px","9999px","16px","4px","2px","6px","3px"],shadows:["rgba(255,255,255,0.05) 0 0.5px 0 0.5px","0 0 0 2px rgba(94,105,209,0.25)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-on-primary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"theme-on-primary",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",letterSpacing:"-0.025em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(255,255,255,0.05) 0 0.5px 0 0.5px"},header:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.025em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.025em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.025em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.025em",accentTreatment:"gradient",signatureMotif:"↗",density:"tight",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"speed-clarity"}},nike:{metadata:{id:"nike",label:"Nike",sourcePath:"design.md/html/nike.html",sourceTitle:"Design System Inspiration of Nike",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},theme:{primary:"color-black",secondary:"#FA5400",success:"#76E0B5",warning:"#1151ff",error:"#d30005",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{ink:"#111111","on-primary":"#ffffff",canvas:"#ffffff","soft-cloud":"#f5f5f5",charcoal:"#39393b",ash:"#4b4b4d",mute:"#707072",stone:"#9e9ea0",hairline:"#cacacb","hairline-soft":"#e5e5e5",sale:"#d30005","sale-deep":"#780700",success:"#007d48","success-bright":"#1eaa52",info:"#1151ff","info-deep":"#0034e3","accent-pink":"#ed1aa0","accent-pink-soft":"#ffb0dd","accent-purple-soft":"#beaffd","accent-purple-pale":"#d6d1ff","accent-teal":"#0a7281","accent-pink-deep":"#4c012d","font-display":"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif","font-ui":"'Inter', 'Helvetica Now Text Medium', Helvetica, Arial, sans-serif","font-body":"'Inter', 'Helvetica Now Text', Helvetica, Arial, sans-serif"},colors:[{name:"ink",value:"#111111",role:"ink"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"soft-cloud",value:"#f5f5f5",role:"soft cloud"},{name:"charcoal",value:"#39393b",role:"charcoal"},{name:"ash",value:"#4b4b4d",role:"ash"},{name:"mute",value:"#707072",role:"mute"},{name:"stone",value:"#9e9ea0",role:"stone"},{name:"hairline",value:"#cacacb",role:"hairline"},{name:"hairline-soft",value:"#e5e5e5",role:"hairline soft"},{name:"sale",value:"#d30005",role:"sale"},{name:"sale-deep",value:"#780700",role:"sale deep"},{name:"success",value:"#76E0B5",role:"success"},{name:"success-bright",value:"#1eaa52",role:"success bright"},{name:"info",value:"#1151ff",role:"info"},{name:"info-deep",value:"#0034e3",role:"info deep"},{name:"accent-pink",value:"#ed1aa0",role:"accent pink"},{name:"accent-pink-soft",value:"#ffb0dd",role:"accent pink soft"},{name:"accent-purple-soft",value:"#beaffd",role:"accent purple soft"},{name:"accent-purple-pale",value:"#d6d1ff",role:"accent purple pale"},{name:"accent-teal",value:"#0a7281",role:"accent teal"},{name:"accent-pink-deep",value:"#4c012d",role:"accent pink deep"}],typography:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","15px","14px","96px","18px","12px","56px","13px","11px","24px","40px","64px","48px","32px"],fontWeights:["700","500","600"],lineHeights:["1.5","0.92","1","1.4","1.6","0.9","1.2","1.75","1.7","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","12px","14px","16px","18px","20px","24px","28px","30px","32px","36px","40px","44px","48px","56px"],radii:["9999px","24px","14px","6px","3px"],shadows:["0 0 0 12px var(--soft-cloud)","0 20px 30px -10px rgba(0,0,0,0.18)","0 0 0 2px var(--canvas), 0 0 0 4px var(--ink)","inset 0 -1px 0 var(--hairline-soft)"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"},content:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"italic"},text:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 12px var(--soft-cloud)"},header:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"italic"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"theme-secondary",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"theme-secondary",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"italic"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},description:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"italic",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"athletic-bold"}},notion:{metadata:{id:"notion",label:"Notion",sourcePath:"design.md/html/notion.html",sourceTitle:"Design System Inspiration of Notion",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},theme:{primary:"#5645d4",secondary:"#ff64c8",success:"#1aae39",warning:"#dd5b00",error:"#ff64c8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#5645d4","primary-pressed":"#4534b3","primary-deep":"#3a2a99","on-primary":"#ffffff","brand-navy":"#0a1530","brand-navy-deep":"#070f24","link-blue":"#0075de","brand-pink":"#ff64c8","brand-orange":"#dd5b00","brand-purple":"#7b3ff2","brand-purple-800":"#391c57","brand-orange-deep":"#793400","brand-green":"#1aae39","brand-yellow":"#f5d75e","brand-teal":"#2a9d99","tint-peach":"#ffe8d4","tint-rose":"#fde0ec","tint-mint":"#d9f3e1","tint-lavender":"#e6e0f5","tint-sky":"#dcecfa","tint-yellow":"#fef7d6","tint-yellow-bold":"#f9e79f","tint-cream":"#f8f5e8",canvas:"#ffffff",surface:"#f6f5f4","surface-soft":"#fafaf9",hairline:"#e5e3df","hairline-soft":"#ede9e4","hairline-strong":"#c8c4be","hairline-dark":"rgba(255,255,255,0.16)","ink-deep":"#000000",ink:"#1a1a1a",charcoal:"#37352f",slate:"#5d5b54",steel:"#787671",stone:"#a4a097",muted:"#bbb8b1","on-dark":"#ffffff","on-dark-muted":"#a4a097"},colors:[{name:"primary",value:"#5645d4",role:"primary"},{name:"primary-pressed",value:"#4534b3",role:"primary pressed"},{name:"primary-deep",value:"#3a2a99",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"brand-navy",value:"#0a1530",role:"brand navy"},{name:"brand-navy-deep",value:"#070f24",role:"brand navy deep"},{name:"link-blue",value:"#0075de",role:"link blue"},{name:"brand-pink",value:"#ff64c8",role:"brand pink"},{name:"brand-orange",value:"#dd5b00",role:"brand orange"},{name:"brand-purple",value:"#7b3ff2",role:"brand purple"},{name:"brand-purple-800",value:"#391c57",role:"brand purple 800"},{name:"brand-orange-deep",value:"#793400",role:"brand orange deep"},{name:"brand-green",value:"#1aae39",role:"brand green"},{name:"brand-yellow",value:"#f5d75e",role:"brand yellow"},{name:"brand-teal",value:"#2a9d99",role:"brand teal"},{name:"tint-peach",value:"#ffe8d4",role:"tint peach"},{name:"tint-rose",value:"#fde0ec",role:"tint rose"},{name:"tint-mint",value:"#d9f3e1",role:"tint mint"},{name:"tint-lavender",value:"#e6e0f5",role:"tint lavender"},{name:"tint-sky",value:"#dcecfa",role:"tint sky"},{name:"tint-yellow",value:"#fef7d6",role:"tint yellow"},{name:"tint-yellow-bold",value:"#f9e79f",role:"tint yellow bold"},{name:"tint-cream",value:"#f8f5e8",role:"tint cream"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface",value:"#f6f5f4",role:"surface"},{name:"surface-soft",value:"#fafaf9",role:"surface soft"},{name:"hairline",value:"#e5e3df",role:"hairline"},{name:"hairline-soft",value:"#ede9e4",role:"hairline soft"},{name:"hairline-strong",value:"#c8c4be",role:"hairline strong"},{name:"hairline-dark",value:"rgba(255,255,255,0.16)",role:"hairline dark"},{name:"ink-deep",value:"#000000",role:"ink deep"},{name:"ink",value:"#1a1a1a",role:"ink"},{name:"charcoal",value:"#37352f",role:"charcoal"},{name:"slate",value:"#5d5b54",role:"slate"},{name:"steel",value:"#787671",role:"steel"},{name:"stone",value:"#a4a097",role:"stone"},{name:"muted",value:"#bbb8b1",role:"muted"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-muted",value:"#a4a097",role:"on dark muted"}],typography:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","15px","12px","80px","18px","48px","16px","13px","22px","11px","56px","36px","10px","20px","28px"],fontWeights:["500","600","400","700"],lineHeights:["1.55","1","1.05","1.15","1.4","1.3","1.5","1.1","1.2","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","11px","12px","14px","15px","16px","18px","20px","24px","31px","32px","40px","44px","48px","56px"],radii:["6px","8px","16px","50%","12px","9999px","4px","3px"],shadows:["rgba(15, 15, 15, 0.20) 0px 24px 48px -8px","rgba(15,15,15,0.04) 0px 1px 2px 0px","rgba(15,15,15,0.08) 0px 4px 12px 0px","rgba(15,15,15,0.20) 0px 24px 48px -8px","rgba(15,15,15,0.16) 0px 16px 48px -8px"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",letterSpacing:"0em",textTransform:"none",fontWeight:400,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(15, 15, 15, 0.20) 0px 24px 48px -8px"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:10},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:10},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"0em",accentTreatment:"flat",signatureMotif:"◇",density:"comfortable",surfaceTone:"paper",cardRadius:10,pillRadius:9999,badgeRadius:4,voice:"thoughtful-quiet"}},revolut:{metadata:{id:"revolut",label:"Revolut",sourcePath:"design.md/html/revolut.html",sourceTitle:"Design System Inspiration of Revolut",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},theme:{primary:"#1361F0",secondary:"#101D31",success:"#16a34a",warning:"#d97706",error:"#e61e49",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#494fdf","primary-bright":"#4f55f1","primary-deep":"#3a40c4","on-primary":"#ffffff",ink:"#191c1f",body:"#1f2226",charcoal:"#3a3d40",mute:"#505a63",ash:"#5c5e60",stone:"#8d969e",faint:"#c9c9cd","on-dark":"#ffffff","on-dark-mute":"rgba(255,255,255,0.72)","canvas-light":"#ffffff","canvas-dark":"#000000","surface-soft":"#f4f4f4","surface-card":"#ffffff","surface-deep":"#0a0a0a","surface-elevated":"#16181a","hairline-light":"#e2e2e7","hairline-dark":"rgba(255,255,255,0.12)","hairline-strong":"#191c1f","divider-soft":"rgba(255,255,255,0.06)",teal:"#00a87e","light-blue":"#007bc2","blue-link":"#376cd5","light-green":"#428619","green-text":"#006400",yellow:"#b09000",warning:"#ec7e00",pink:"#e61e49",danger:"#e23b4a","deep-red":"#8b0000",brown:"#936d62","font-display":"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif","font-ui":"'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#1361F0",role:"primary"},{name:"primary-bright",value:"#4f55f1",role:"primary bright"},{name:"primary-deep",value:"#3a40c4",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#191c1f",role:"ink"},{name:"body",value:"#1f2226",role:"body"},{name:"charcoal",value:"#3a3d40",role:"charcoal"},{name:"mute",value:"#505a63",role:"mute"},{name:"ash",value:"#5c5e60",role:"ash"},{name:"stone",value:"#8d969e",role:"stone"},{name:"faint",value:"#c9c9cd",role:"faint"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-mute",value:"rgba(255,255,255,0.72)",role:"on dark mute"},{name:"canvas-light",value:"#ffffff",role:"canvas light"},{name:"canvas-dark",value:"#000000",role:"canvas dark"},{name:"surface-soft",value:"#f4f4f4",role:"surface soft"},{name:"surface-card",value:"#ffffff",role:"surface card"},{name:"surface-deep",value:"#0a0a0a",role:"surface deep"},{name:"surface-elevated",value:"#16181a",role:"surface elevated"},{name:"hairline-light",value:"#e2e2e7",role:"hairline light"},{name:"hairline-dark",value:"rgba(255,255,255,0.12)",role:"hairline dark"},{name:"hairline-strong",value:"#191c1f",role:"hairline strong"},{name:"divider-soft",value:"rgba(255,255,255,0.06)",role:"divider soft"},{name:"teal",value:"#00a87e",role:"teal"},{name:"light-blue",value:"#007bc2",role:"light blue"},{name:"blue-link",value:"#376cd5",role:"blue link"},{name:"light-green",value:"#428619",role:"light green"},{name:"green-text",value:"#006400",role:"green text"},{name:"yellow",value:"#b09000",role:"yellow"},{name:"warning",value:"#d97706",role:"warning"},{name:"pink",value:"#e61e49",role:"pink"},{name:"danger",value:"#e23b4a",role:"danger"},{name:"deep-red",value:"#8b0000",role:"deep red"},{name:"brown",value:"#936d62",role:"brown"}],typography:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","18px","12px","96px","56px","24px","13px","32px","11px","64px","44px"],fontWeights:["600","500","700"],lineHeights:["1.5","1.0","1.56","1.4","1.33","1.19","1.6","1.2","1.35"]},spacing:["4px","6px","8px","10px","12px","13px","14px","16px","20px","24px","27px","28px","32px","36px","40px","48px","56px","64px","80px","88px"],radii:["9999px","20px","28px","36px","24px","12px","3px"],shadows:[]},components:{button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:20,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:20},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:20},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"24px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"pill",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"gradient",signatureMotif:"★",density:"comfortable",surfaceTone:"glass",cardRadius:20,pillRadius:9999,badgeRadius:9999,voice:"bold-fintech"}},shopify:{metadata:{id:"shopify",label:"Shopify",sourcePath:"design.md/html/shopify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},theme:{primary:"#008060",secondary:"#202223",success:"#008060",warning:"#FFC453",error:"#D72C0D",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},tokens:{rawCssVars:{white:"#FFFFFF",black:"#000000","neon-green":"#36F4A4",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"neon-green",value:"#36F4A4",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"color-aloe",color:"color-white",borderColor:"color-aloe",borderRadius:6,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-muted",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-muted"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-muted",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-muted",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-muted"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-muted"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"commerce-friendly"}},spacex:{metadata:{id:"spacex",label:"SpaceX",sourcePath:"design.md/html/spaceX.html",sourceTitle:"Design System Preview: SpaceX (Light)",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Share+Tech&display=swap"]},theme:{primary:"color-black",secondary:"#a3a3a3",success:"#4ade80",warning:"#fbbf24",error:"#ef4444",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{black:"#000000",spectral:"#f0f0fa","ghost-bg":"rgba(240,240,250,0.1)","ghost-border":"rgba(240,240,250,0.35)",overlay:"rgba(0,0,0,0.5)",font:"'Share Tech', Arial, Verdana, sans-serif"},colors:[{name:"black",value:"#000000",role:"black"},{name:"spectral",value:"#f0f0fa",role:"spectral"},{name:"ghost-bg",value:"rgba(240,240,250,0.1)",role:"ghost bg"},{name:"ghost-border",value:"rgba(240,240,250,0.35)",role:"ghost border"},{name:"overlay",value:"rgba(0,0,0,0.5)",role:"overlay"}],typography:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","13px","12px","48px","10px","32px","11px","9px","14px"],fontWeights:["700","400","600"],lineHeights:["1.50","1.00","1.70","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","18px","20px","24px","28px","32px","48px","60px","64px","72px","80px","120px"],radii:["32px","4px","2px","3px"],shadows:[]},components:{button:{config:{variants:{ghost:{backgroundColor:"color-gray-50",borderColor:"color-gray-200"}}},variant:"ghost",size:"md",shape:"square",color:"theme-primary",textColor:"theme-primary",views:{container:{borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",color:"color-white",borderColor:"color-gray-50",borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.06em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-200"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-200",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"32px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},content:{color:"color-gray-200"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:2},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-200",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.06em",fontStyle:"normal"},caption:{color:"color-gray-200",fontStyle:"italic",letterSpacing:"0.06em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:2},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-200"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},eyebrow:{color:"color-gray-200"},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},description:{color:"color-gray-200"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.06em",accentTreatment:"glow",signatureMotif:"⚡",density:"tight",surfaceTone:"mono",cardRadius:2,pillRadius:0,badgeRadius:0,voice:"technical-mission"}},spotify:{metadata:{id:"spotify",label:"Spotify",sourcePath:"design.md/html/spotify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},theme:{primary:"#1DB954",secondary:"#C1FBD4",success:"#1DB954",warning:"#D4F9E0",error:"#D4D4D8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#000000"},tokens:{rawCssVars:{white:"#FFFFFF",black:"#000000","spotify-green":"#1DB954",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"spotify-green",value:"#1DB954",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},components:{button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"pill",typeWeight:"black",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"matte",cardRadius:8,pillRadius:9999,badgeRadius:9999,voice:"rhythmic-vibrant"}},stripe:{metadata:{id:"stripe",label:"Stripe",sourcePath:"design.md/html/stripe.html",sourceTitle:"Design System Preview: Stripe (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Code+Pro:wght@400;500;700&display=swap"]},theme:{primary:"#635BFF",secondary:"#f96bee",success:"#15be53",warning:"#9b6829",error:"#ea2261",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{purple:"#533afd","purple-hover":"#4434d4","purple-deep":"#2e2b8c","purple-light":"#b9b9f9","purple-mid":"#665efd",navy:"#061b31","dark-navy":"#0d253d","brand-dark":"#1c1e54",white:"#ffffff",ruby:"#ea2261",magenta:"#f96bee","magenta-light":"#ffd7ef",success:"#15be53","success-text":"#108c3d",lemon:"#9b6829",slate:"#64748d","dark-slate":"#273951",border:"#e5edf5","border-purple":"#b9b9f9","border-soft":"#d6d9fc","shadow-blue":"rgba(50,50,93,0.25)","shadow-dark-blue":"rgba(3,3,39,0.25)","shadow-black":"rgba(0,0,0,0.1)","shadow-ambient":"rgba(23,23,23,0.08)","shadow-soft":"rgba(23,23,23,0.06)","shadow-card":"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","shadow-ambient-card":"rgba(23,23,23,0.08) 0px 15px 35px 0px","shadow-subtle":"rgba(23,23,23,0.06) 0px 3px 6px 0px","font-primary":"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif","font-mono":"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace"},colors:[{name:"purple",value:"#533afd",role:"purple"},{name:"purple-hover",value:"#4434d4",role:"purple hover"},{name:"purple-deep",value:"#2e2b8c",role:"purple deep"},{name:"purple-light",value:"#b9b9f9",role:"purple light"},{name:"purple-mid",value:"#665efd",role:"purple mid"},{name:"navy",value:"#061b31",role:"navy"},{name:"dark-navy",value:"#0d253d",role:"dark navy"},{name:"brand-dark",value:"#1c1e54",role:"brand dark"},{name:"white",value:"#ffffff",role:"white"},{name:"ruby",value:"#ea2261",role:"ruby"},{name:"magenta",value:"#f96bee",role:"magenta"},{name:"magenta-light",value:"#ffd7ef",role:"magenta light"},{name:"success",value:"#15be53",role:"success"},{name:"success-text",value:"#108c3d",role:"success text"},{name:"lemon",value:"#9b6829",role:"lemon"},{name:"slate",value:"#64748d",role:"slate"},{name:"dark-slate",value:"#273951",role:"dark slate"},{name:"border",value:"#e5edf5",role:"border"},{name:"border-purple",value:"#b9b9f9",role:"border purple"},{name:"border-soft",value:"#d6d9fc",role:"border soft"},{name:"shadow-blue",value:"rgba(50,50,93,0.25)",role:"shadow blue"},{name:"shadow-dark-blue",value:"rgba(3,3,39,0.25)",role:"shadow dark blue"},{name:"shadow-black",value:"rgba(0,0,0,0.1)",role:"shadow black"},{name:"shadow-ambient",value:"rgba(23,23,23,0.08)",role:"shadow ambient"},{name:"shadow-soft",value:"rgba(23,23,23,0.06)",role:"shadow soft"},{name:"shadow-card",value:"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px",role:"shadow card"},{name:"shadow-ambient-card",value:"rgba(23,23,23,0.08) 0px 15px 35px 0px",role:"shadow ambient card"},{name:"shadow-subtle",value:"rgba(23,23,23,0.06) 0px 3px 6px 0px",role:"shadow subtle"}],typography:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",monoFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontSizes:["16px","14px","48px","18px","12px","32px","13px","11px","10px","22px"],fontWeights:["100 900","300","400","500","700","600"],lineHeights:["1.40","1.15","1.10","1.50","1.2","1.35","1.4"]},spacing:["1px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["0 0 6px 6px","4px","6px","2px","3px"],shadows:["rgba(50,50,93,0.25)","rgba(3,3,39,0.25)","rgba(0,0,0,0.1)","rgba(23,23,23,0.08)","rgba(23,23,23,0.06)","rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","rgba(23,23,23,0.08) 0px 15px 35px 0px","rgba(23,23,23,0.06) 0px 3px 6px 0px","var(--shadow-subtle)","var(--shadow-card)","0 0 0 1px theme-primary","0 0 0 1px var(--ruby)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(23,23,23,0.06) 0px 3px 6px 0px"},header:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"6px"},trigger:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"gradient",signatureMotif:"↗",density:"comfortable",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"refined-fintech"}},tesla:{metadata:{id:"tesla",label:"Tesla",sourcePath:"design.md/html/tesla.html",sourceTitle:"Design System Inspired by Tesla",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap"]},theme:{primary:"#3E6AE1",secondary:"#171A20",success:"#3E6AE1",warning:"#5C5E62",error:"#171A20",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},tokens:{rawCssVars:{"electric-blue":"#3E6AE1","pure-white":"#FFFFFF","carbon-dark":"#171A20",graphite:"#393C41",pewter:"#5C5E62","silver-fog":"#8E8E8E","cloud-gray":"#EEEEEE","pale-silver":"#D0D1D2","light-ash":"#F4F4F4","frosted-glass":"rgba(255,255,255,0.75)",overlay:"rgba(128,128,128,0.65)","subtle-shadow":"rgba(0,0,0,0.05)","font-display":"'Inter', -apple-system, Arial, sans-serif","font-text":"'Inter', -apple-system, Arial, sans-serif"},colors:[{name:"electric-blue",value:"#3E6AE1",role:"electric blue"},{name:"pure-white",value:"#FFFFFF",role:"pure white"},{name:"carbon-dark",value:"#171A20",role:"carbon dark"},{name:"graphite",value:"#393C41",role:"graphite"},{name:"pewter",value:"#5C5E62",role:"pewter"},{name:"silver-fog",value:"#8E8E8E",role:"silver fog"},{name:"cloud-gray",value:"#EEEEEE",role:"cloud gray"},{name:"pale-silver",value:"#D0D1D2",role:"pale silver"},{name:"light-ash",value:"#F4F4F4",role:"light ash"},{name:"frosted-glass",value:"rgba(255,255,255,0.75)",role:"frosted glass"},{name:"overlay",value:"rgba(128,128,128,0.65)",role:"overlay"},{name:"subtle-shadow",value:"rgba(0,0,0,0.05)",role:"subtle shadow"}],typography:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","40px","28px","13px","12px","11px","17px","16px"],fontWeights:["400","500","700","600"],lineHeights:["1.43","48px","20px","1.2","1.3","36px","1.35","1.4"]},spacing:["4px","6px","8px","10px","12px","14px","16px","20px","24px","32px","40px","48px","56px","60px","64px","80px","100px"],radii:["4px","4px 4px 0 0","0 0 4px 4px","12px","3px"],shadows:["rgba(0,0,0,0.05)","0 1px 0 var(--pewter)"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:0,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.05)"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"theme-warning"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"theme-warning",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, Arial, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:0},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},content:{color:"theme-warning"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:0},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"theme-warning",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"normal"},caption:{color:"theme-warning",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:0},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"4px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:0},item:{color:"theme-warning"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},eyebrow:{color:"theme-warning"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},description:{color:"theme-warning"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"sharp",typeWeight:"light",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▲",density:"spacious",surfaceTone:"mono",cardRadius:0,pillRadius:0,badgeRadius:0,voice:"futurist-clean"}},uber:{metadata:{id:"uber",label:"Uber",sourcePath:"design.md/html/uber.html",sourceTitle:"Design System Preview: Uber (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700&display=swap"]},theme:{primary:"color-black",secondary:"#efefef",success:"#06C167",warning:"#e2e2e2",error:"#000000",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{"color-black":"#000000","color-white":"#ffffff","color-hover-gray":"#e2e2e2","color-hover-light":"#f3f3f3","color-chip-gray":"#efefef","color-body-gray":"#4b4b4b","color-muted-gray":"#afafaf","shadow-card":"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","shadow-medium":"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","shadow-float":"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","shadow-press":"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","font-display":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","font-body":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","bg-page":"#ffffff","bg-card":"#ffffff","bg-nav":"rgba(255,255,255,0.92)","text-primary":"#000000","text-secondary":"#4b4b4b","text-tertiary":"#afafaf","border-color":"#efefef","section-label-color":"#000000"},colors:[{name:"color-black",value:"#000000",role:"color black"},{name:"color-white",value:"#ffffff",role:"color white"},{name:"color-hover-gray",value:"#e2e2e2",role:"color hover gray"},{name:"color-hover-light",value:"#f3f3f3",role:"color hover light"},{name:"color-chip-gray",value:"#efefef",role:"color chip gray"},{name:"color-body-gray",value:"#4b4b4b",role:"color body gray"},{name:"color-muted-gray",value:"#afafaf",role:"color muted gray"},{name:"shadow-card",value:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px",role:"shadow card"},{name:"shadow-medium",value:"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px",role:"shadow medium"},{name:"shadow-float",value:"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px",role:"shadow float"},{name:"shadow-press",value:"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset",role:"shadow press"},{name:"bg-page",value:"#ffffff",role:"bg page"},{name:"bg-card",value:"#ffffff",role:"bg card"},{name:"bg-nav",value:"rgba(255,255,255,0.92)",role:"bg nav"},{name:"text-primary",value:"#000000",role:"text primary"},{name:"text-secondary",value:"#4b4b4b",role:"text secondary"},{name:"text-tertiary",value:"#afafaf",role:"text tertiary"},{name:"border-color",value:"#efefef",role:"border color"},{name:"section-label-color",value:"#000000",role:"section label color"}],typography:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","18px","14px","64px","20px","12px","36px","13px","24px","28px"],fontWeights:["700","500","400","600"],lineHeights:["1.50","1.10","1.22","1.33","2.0","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","50px","60px","64px","80px","100px","120px","140px"],radii:["8px","999px","12px","16px","4px","3px"],shadows:["rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","var(--shadow-card)","var(--shadow-float)","var(--shadow-medium)","0 0 0 1px color-black","rgba(0,0,0,0.12) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 2px 8px 0px","rgba(0,0,0,0.08) 0px 0px 0px 999px inset"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px"},header:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"theme-warning"},content:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},footer:{borderColor:"theme-warning"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"theme-warning",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"theme-warning",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-warning"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"theme-warning"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-warning"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-warning",backgroundColor:"color-white",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"theme-warning",borderRadius:4},thead:{backgroundColor:"color-white",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"theme-warning",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-warning"},td:{color:"theme-primary",borderColor:"theme-warning",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",borderRadius:4},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-warning",radius:"8px",views:{container:{backgroundColor:"theme-warning",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"theme-warning",views:{container:{borderColor:"theme-warning"},label:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"theme-warning"},surface:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"motion-utility"}},vercel:{metadata:{id:"vercel",label:"Vercel",sourcePath:"design.md/html/vercel.html",sourceTitle:"Design System Preview: Vercel (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap"]},theme:{primary:"color-black",secondary:"#0072f5",success:"#0a72ef",warning:"#de1d8d",error:"#ff5b4f",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{black:"#171717",white:"#ffffff","gray-50":"#fafafa","gray-100":"#ebebeb","gray-400":"#808080","gray-500":"#666666","gray-600":"#4d4d4d","link-blue":"#0072f5","focus-blue":"hsl(212,100%,48%)","ship-red":"#ff5b4f","preview-pink":"#de1d8d","develop-blue":"#0a72ef","console-blue":"#0070f3","console-purple":"#7928ca","console-pink":"#eb367f","badge-bg":"#ebf5ff","badge-text":"#0068d6","shadow-ring":"rgba(0,0,0,0.08) 0px 0px 0px 1px","shadow-ring-light":"rgb(235,235,235) 0px 0px 0px 1px","shadow-subtle":"rgba(0,0,0,0.04) 0px 2px 2px 0px","shadow-card":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","shadow-card-full":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","font-sans":"'Geist', system-ui, -apple-system, Arial, sans-serif","font-mono":"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace"},colors:[{name:"black",value:"#171717",role:"black"},{name:"white",value:"#ffffff",role:"white"},{name:"gray-50",value:"#fafafa",role:"gray 50"},{name:"gray-100",value:"#ebebeb",role:"gray 100"},{name:"gray-400",value:"#808080",role:"gray 400"},{name:"gray-500",value:"#666666",role:"gray 500"},{name:"gray-600",value:"#4d4d4d",role:"gray 600"},{name:"link-blue",value:"#0072f5",role:"link blue"},{name:"focus-blue",value:"hsl(212,100%,48%)",role:"focus blue"},{name:"ship-red",value:"#ff5b4f",role:"ship red"},{name:"preview-pink",value:"#de1d8d",role:"preview pink"},{name:"develop-blue",value:"#0a72ef",role:"develop blue"},{name:"console-blue",value:"#0070f3",role:"console blue"},{name:"console-purple",value:"#7928ca",role:"console purple"},{name:"console-pink",value:"#eb367f",role:"console pink"},{name:"badge-bg",value:"#ebf5ff",role:"badge bg"},{name:"badge-text",value:"#0068d6",role:"badge text"},{name:"shadow-ring",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px",role:"shadow ring"},{name:"shadow-ring-light",value:"rgb(235,235,235) 0px 0px 0px 1px",role:"shadow ring light"},{name:"shadow-subtle",value:"rgba(0,0,0,0.04) 0px 2px 2px 0px",role:"shadow subtle"},{name:"shadow-card",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card"},{name:"shadow-card-full",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card full"}],typography:{fontFamily:"var(--font-sans)",monoFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontSizes:["16px","14px","48px","20px","12px","32px","13px","11px","10px","36px"],fontWeights:["400","600","500","700"],lineHeights:["1.50","1.00","1.80","1.25","1.2","1.35","1.4"]},spacing:["2px","4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["6px","8px","9999px","3px"],shadows:["rgba(0,0,0,0.08) 0px 0px 0px 1px","rgb(235,235,235) 0px 0px 0px 1px","rgba(0,0,0,0.04) 0px 2px 2px 0px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","var(--shadow-ring)","var(--shadow-ring-light)","var(--shadow-card)","var(--shadow-card-full)","0 0 0 2px var(--focus-blue)","0 0 0 2px var(--ship-red)"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:4,fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"var(--font-sans)",letterSpacing:"-0.04em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"var(--font-sans)",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},header:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"var(--font-sans)"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.04em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"var(--font-sans)"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"6px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"6px"},trigger:{color:"theme-primary",fontFamily:"var(--font-sans)"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.04em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.04em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"var(--font-sans)"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"var(--font-sans)"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"var(--font-sans)"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.04em",accentTreatment:"flat",signatureMotif:"▲",density:"comfortable",surfaceTone:"mono",cardRadius:4,pillRadius:4,badgeRadius:4,voice:"deploy-geometric"}}},$c=Object.values(st),An=Dc,To=e=>!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.toString.call(e)==="[object Object]",dt=e=>e,Be=(...e)=>{const o={};return e.forEach(t=>{To(t)&&Object.entries(t).forEach(([n,a])=>{if(a!=null){if(To(a)&&To(o[n])){o[n]=Be(o[n],a);return}o[n]=a}})}),o},En=e=>{if(Array.isArray(e)||!To(e))return e;const o={};for(const[t,n]of Object.entries(e))n!==null&&(o[t]=To(n)?En(n):n);return o},Lc=new Set(["button"]),_c=["backgroundColor","background","borderColor","color"],Dn=new Set,Bc=(e,o)=>{if(process.env.NODE_ENV!=="production"&&!(!o||!Lc.has(e))&&!Dn.has(e))for(const[t,n]of Object.entries(o)){if(!To(n))continue;const a=_c.filter(l=>n[l]!=null);if(a.length>0){Dn.add(e),console.warn(`[design-system] components.${e}.views.${t} sets ${a.join(", ")} — view styles apply above every variant, so this flattens ghost/outline/subtle into solid blocks. Move colors to components.${e}.config.variants.<variant> (merged under each variant); keep views to shape and typography.`);return}}},gt=(e,o)=>{if(!o)return{};const t=o.components[e]||{},n=dt(En(t));return Bc(e,n.views),n},$n=(e,o,t)=>{const{config:n,...a}=o,l=gt(e,t),c=Be(l,n||{});return dt(Be(c,a))},Ln=h.createContext({isEnabled:!1}),ht=({children:e,config:o,configId:t,mode:n})=>{const a=o||(t?st[t]:null)||An,{themeMode:l}=i.useTheme(),c=n??l??a.metadata.defaultAppearance,s=h.useMemo(()=>({config:a,configId:a.metadata.id,isEnabled:!0}),[a]);return r.jsx(Ln.Provider,{value:s,children:r.jsx(i.ThemeProvider,{theme:a.theme,mode:c,transparentWrapper:!0,children:r.jsx("div",{"data-design-system":a.metadata.id,"data-appearance":c,style:{display:"contents"},children:e})})})},xr=()=>h.useContext(Ln),Io=e=>{const{config:o}=xr();return gt(e,o)},pe=(e,o)=>{const{config:t}=xr();return $n(e,o,t)},_n=h.createContext({expandedItems:[],toggleItem:()=>{},isItemExpanded:()=>!1,type:"single",collapsible:!1,baseId:""}),Oc=({children:e,value:o})=>r.jsx(_n.Provider,{value:o,children:e}),Bn=()=>{const e=h.useContext(_n);if(!e)throw new Error("useAccordionContext must be used within an AccordionProvider");return e},Nc=({value:e,children:o,isDisabled:t=!1,views:n,...a})=>{var p;const{isItemExpanded:l,baseId:c}=Bn(),s=Io("accordion"),d=Be({item:(p=s.views)==null?void 0:p.container},n),g=l(e),m=`${c}-trigger-${e}`,f=`${c}-content-${e}`;return r.jsx(i.View,{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",overflow:"hidden",opacity:t?.5:1,pointerEvents:t?"none":"auto","data-state":g?"open":"closed","data-disabled":t?"":void 0,...d==null?void 0:d.item,...a,children:h.Children.map(o,u=>h.isValidElement(u)?h.cloneElement(u,{...u.props,value:e,isExpanded:g,isDisabled:t,triggerId:m,contentId:f}):u)})},qc=({children:e,value:o,isExpanded:t,isDisabled:n,triggerId:a,contentId:l,views:c,asChild:s=!1,...d})=>{var y;const{toggleItem:g}=Bn(),m=Io("accordion"),f=Be({container:(y=m.views)==null?void 0:y.trigger},c),u={id:a,"aria-expanded":t,"aria-controls":l,"aria-disabled":n,"data-state":t?"open":"closed","data-disabled":n?"":void 0,onClick:()=>{o&&!n&&g(o)},padding:16,cursor:n?"not-allowed":"pointer",alignItems:"center",justifyContent:"space-between",width:"100%",style:{backgroundColor:"transparent"},...f==null?void 0:f.container,...d};if(s&&h.isValidElement(e)){const k=h.Children.only(e);return h.cloneElement(k,{...u,...k.props})}return r.jsxs(i.Horizontal,{...u,children:[e,r.jsx(i.View,{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:t?"rotate(180deg)":"rotate(0deg)",...f==null?void 0:f.icon,children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M16.59 8.59L12 13.17L7.41 8.59L6 10L12 16L18 10L16.59 8.59Z",fill:"currentColor"})})})]})},Uc=({children:e,isExpanded:o,isDisabled:t,triggerId:n,contentId:a,views:l,...c})=>{var S;const s=Io("accordion"),d=Be({container:(S=s.views)==null?void 0:S.content},l),g=260,m=h.useRef(null),f=h.useRef(null),[p,u]=h.useState(!!o),[y,k]=h.useState(o?"none":"0px"),[x,C]=h.useState(o?1:0);return h.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]),h.useEffect(()=>{var v;if(f.current&&(clearTimeout(f.current),f.current=null),o){u(!0),requestAnimationFrame(()=>{var I;const b=((I=m.current)==null?void 0:I.scrollHeight)??0;k(`${b}px`),C(1)});return}const w=((v=m.current)==null?void 0:v.scrollHeight)??0;k(`${w}px`),C(1),requestAnimationFrame(()=>{k("0px"),C(0)}),f.current=setTimeout(()=>{u(!1)},g)},[o,e]),h.useEffect(()=>{var v;if(!o||!p)return;const w=((v=m.current)==null?void 0:v.scrollHeight)??0;k(`${w}px`)},[e,o,p]),p?r.jsx(i.View,{id:a,role:"region","aria-labelledby":n,overflow:"hidden",maxHeight:y,opacity:x,transition:`max-height ${g}ms cubic-bezier(0.22, 1, 0.36, 1), opacity ${g}ms ease`,"data-state":o?"open":"closed","data-disabled":t?"":void 0,style:{backgroundColor:"transparent"},...d==null?void 0:d.container,...c,children:r.jsx(i.View,{ref:m,padding:16,children:e})}):null},Gc=({children:e,shape:o="rounded",variant:t="default",views:n,baseId:a,type:l,collapsible:c,themeMode:s,...d})=>r.jsx(i.Vertical,{width:"100%","data-orientation":"vertical",...Ac[o],...Ec[t],...n==null?void 0:n.container,...d,children:e}),De=e=>{const o=pe("accordion",e),{children:t,type:n="single",value:a,defaultValue:l,onValueChange:c,collapsible:s=!1,shape:d="rounded",variant:g="default",views:m,...f}=o,p=Array.isArray(l)?l:l?[l]:void 0,u=Vc({type:n,value:a,defaultValue:l??p,onValueChange:c,collapsible:s});return r.jsx(Oc,{value:{expandedItems:u.expandedItems,toggleItem:u.toggleItem,isItemExpanded:u.isItemExpanded,type:u.type,collapsible:u.collapsible,baseId:u.baseId},children:r.jsx(Gc,{shape:d,variant:g,views:m,baseId:u.baseId,type:u.type,collapsible:u.collapsible,...f,children:t})})};De.Item=Nc,De.Trigger=qc,De.Content=Uc;const Yc=({isOpen:e,defaultOpen:o=!1,value:t,defaultValue:n,isMulti:a=!1,onOpenChange:l,onClose:c})=>{const s=typeof e=="boolean",d=t!==void 0,g=n??(a?[]:""),[m,f]=h.useState(o),[p,u]=h.useState(g),y=s?!!e:m,k=d?t:p,x=h.useCallback(w=>{s||f(w),l==null||l(w),w||c==null||c()},[s,c,l]),C=h.useCallback(()=>{x(!1)},[x]),S=h.useCallback(w=>{d||u(w)},[d]);return{isSheetOpen:y,selectedValue:k,setSelectedValue:S,closeSheet:C}},ft=({children:e,containerId:o="portal-root"})=>{const[t,n]=h.useState(null);return h.useEffect(()=>{let a=document.getElementById(o),l=!1;return a||(l=!0,a=document.createElement("div"),a.setAttribute("id",o),document.body.appendChild(a)),n(a),()=>{l&&a&&a.parentNode&&a.childNodes.length===0&&a.parentNode.removeChild(a)}},[o]),t?Pc.createPortal(e,t):null},mt=new Map,Kc=(e,o,t)=>(mt.has(e)||mt.set(e,h.lazy(()=>import("lucide-react/dynamicIconImports").then(n=>{const a=n.default[e];return a?a():{default:()=>r.jsx(r.Fragment,{children:o||t})}}))),mt.get(e)),On=h.memo(({widthHeight:e,color:o="currentColor",transform:t,orientation:n="up",children:a,...l})=>r.jsx(i.View,{widthHeight:e,color:o,display:"flex",alignItems:"center",justifyContent:"center",transform:t||(n==="left"?"rotate(-90deg)":n==="right"?"rotate(90deg)":n==="up"?"rotate(0deg)":n==="down"?"rotate(180deg)":"none"),...l,children:a})),kr=h.memo(({name:e="circle",widthHeight:o=24,color:t="currentColor",filled:n=!1,strokeWidth:a=1,size:l,children:c,fallback:s,...d})=>{const{getColor:g}=i.useTheme(),m=l||o,f=h.useMemo(()=>{const y=g(t);return{fill:n?y:"none",stroke:y,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round"}},[n,t,a,g]);if(!e)return r.jsx(On,{widthHeight:o,color:t,...d,children:c});const p=e.toLowerCase().replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),u=Kc(p,s,c);return r.jsx(On,{widthHeight:m,color:t,...d,children:r.jsx(h.Suspense,{fallback:s||null,children:r.jsx(u,{size:m,...f})})})}),G=(e,o={})=>{const t=n=>r.jsx(kr,{name:e,...o,...n});return t.displayName=`${e}Icon`,t},Xc=G("user",{filled:!1}),Jc=G("circle-help",{filled:!1}),Qc=G("folder",{filled:!1}),he=G("chevron-up",{filled:!1}),Zc=G("grip-vertical",{filled:!1}),go=G("file",{filled:!1}),Rc=G("video",{filled:!1}),es=G("image",{filled:!1}),Fo=G("volume",{filled:!1}),os=G("twitter",{filled:!1}),rs=G("x",{filled:!1}),ts=G("twitch",{filled:!1}),He=G("x",{filled:!1,strokeWidth:2}),ns=G("instagram",{filled:!1}),as=G("youtube",{filled:!1}),ls=G("facebook",{filled:!1}),is=G("linkedin",{filled:!1}),cs=G("at-sign",{filled:!1}),Nn=G("minus",{filled:!1}),Re=G("info",{filled:!1}),qn=G("play",{filled:!1}),ss=G("pause",{filled:!1}),ds=G("heart",{filled:!1}),gs=G("star",{filled:!1}),hs=G("save",{filled:!1}),pt=G("triangle-alert",{filled:!1}),fs=G("battery",{filled:!1}),ms=G("bookmark",{filled:!1}),ps=G("cloud",{filled:!1}),us=G("copy",{filled:!1}),Cr=G("trash",{filled:!1}),ys=Cr,bs=G("edit",{filled:!1}),ut=G("mic",{filled:!1}),wr=G("square",{filled:!1}),yt=G("send",{filled:!1}),bt=G("loader",{filled:!1}),Xo=G("paperclip",{filled:!1}),Sr=G("search",{filled:!1}),xs=G("home",{filled:!1}),Un=G("settings",{filled:!1}),ks=G("download",{filled:!1}),Gn=G("share",{filled:!1}),Jo=G("check",{filled:!1}),Cs=G("plus",{filled:!1}),xt=G("eye-off",{filled:!1}),kt=G("eye",{filled:!1}),ws=G("lock",{filled:!1}),Ss=G("user",{filled:!1}),Yn=G("external-link",{filled:!1}),Ct=G("check-circle",{filled:!1}),vr=G("alert-circle",{filled:!1}),vs=G("bell",{filled:!1}),Ts=G("file-text",{filled:!1}),Is=G("bar-chart",{filled:!1}),Fs=G("moon",{filled:!1}),Kn=G("panel-left",{filled:!1}),wt=G("upload",{filled:!1}),zs=Jo,Ms=e=>r.jsx(he,{orientation:"left",...e}),Ws=G("zoom-out",{filled:!1}),Hs=G("type",{filled:!1}),js=G("shapes",{filled:!1}),Ps=G("rotate-cw",{filled:!1}),Vs=G("gift",{filled:!1}),As=G("shield",{filled:!1}),Es=G("log-out",{filled:!1}),Ds=G("power",{filled:!1}),$s=G("link",{filled:!1}),Ls=G("layout",{filled:!1}),_s=G("zap",{filled:!1}),Bs=G("credit-card",{filled:!1}),Os=G("more-horizontal",{filled:!1}),Ns=Cr,qs=G("filter",{filled:!1}),Us=G("calendar",{filled:!1}),Gs=G("clock",{filled:!1}),Ys=G("map-pin",{filled:!1}),Ks=G("menu",{filled:!1}),Xs=G("refresh-cw",{filled:!1}),Js=G("printer",{filled:!1}),Qs=G("wand",{filled:!1}),Zs=G("thumbs-down",{filled:!1}),Rs=G("thumbs-up",{filled:!1}),ed=G("camera",{filled:!1}),od=G("bluetooth",{filled:!1}),rd=G("unlock",{filled:!1}),td=G("wifi",{filled:!1}),nd=G("arrow-right",{filled:!1}),ad=G("arrow-up",{filled:!1}),ld=G("loader",{filled:!1}),id=G("sliders-horizontal",{filled:!1}),cd=G("crop",{filled:!1}),sd=G("zoom-in",{filled:!1}),dd=G("grip-horizontal",{filled:!1}),Xn=G("mouse-pointer-2",{filled:!1}),gd={sm:{minHeight:44,paddingVertical:10,paddingHorizontal:16},md:{minHeight:52,paddingVertical:12,paddingHorizontal:18},lg:{minHeight:60,paddingVertical:14,paddingHorizontal:20}},zo={sm:{label:14,description:12},md:{label:16,description:13},lg:{label:18,description:14}},Jn=(e,o)=>e.id??e.value??`action-sheet-item-${o}`,Qn=e=>e.value??e.id,Zn=e=>e.disabled||e.isDisabled||e.divider,hd=(e,o)=>{if(typeof e.selected=="boolean")return e.selected;const t=Qn(e);return t?Array.isArray(o)?o.includes(t):o===t:!1},fd=({isSheetOpen:e,closeSheet:o,selectedValue:t,setSelectedValue:n,isClosePrevented:a=!1,dismissOnBackdropPress:l=!0,title:c,description:s,header:d,children:g,items:m=[],isMulti:f=!1,closeOnSelect:p,onSelect:u,onChange:y,showCancel:k=!1,cancelLabel:x="Cancel",onCancel:C,showHandle:S=!0,size:w="md",maxHeight:v="88vh",views:b,animationType:I,...T})=>{if(!e)return null;const j=()=>{a||o()},E=()=>{l&&j()},D=()=>{C==null||C(),j()},W=A=>{var V;if(Zn(A))return;const H=Qn(A);let z=t;if(H){if(f){const M=Array.isArray(t)?t:t?[t]:[];z=M.includes(H)?M.filter(L=>L!==H):[...M,H]}else z=H;n(z),u==null||u(H,A),y==null||y(z,A)}(V=A.onPress)==null||V.call(A,A),(A.closeOnSelect??p??!f)&&j()};return r.jsx(ft,{children:r.jsx(i.View,{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9999,backgroundColor:"color-dark-50-360",display:"flex",justifyContent:"flex-end",onClick:E,...b==null?void 0:b.overlay,children:r.jsxs(i.Vertical,{width:"100%",maxWidth:520,maxHeight:v,marginHorizontal:"auto",backgroundColor:"color-white",borderTopLeftRadius:24,borderTopRightRadius:24,paddingTop:8,paddingBottom:12,overflow:"hidden",boxShadow:"0 -18px 48px rgba(15, 23, 42, 0.18)",onClick:A=>A.stopPropagation(),...b==null?void 0:b.container,...b==null?void 0:b.sheet,...T,children:[S&&r.jsx(i.View,{width:36,height:4,borderRadius:999,backgroundColor:"color-gray-300",alignSelf:"center",marginTop:4,marginBottom:8,...b==null?void 0:b.handle}),(c||s)&&r.jsxs(i.Vertical,{paddingHorizontal:20,paddingTop:6,paddingBottom:12,gap:4,...b==null?void 0:b.header,children:[c&&r.jsx(i.Text,{fontSize:18,lineHeight:24,fontWeight:"600",color:"color-gray-900",...b==null?void 0:b.title,children:c}),s&&r.jsx(i.Text,{fontSize:13,lineHeight:18,color:"color-gray-500",...b==null?void 0:b.description,children:s})]}),d,r.jsxs(i.Vertical,{overflowY:"auto",paddingBottom:4,...b==null?void 0:b.content,children:[m.map((A,H)=>{if(A.divider)return r.jsx(i.View,{height:1,backgroundColor:"color-gray-200",marginVertical:6,...b==null?void 0:b.divider},Jn(A,H));const z=hd(A,t),P=Zn(A),V=P?"color-gray-400":A.destructive?"color-red-600":z?"theme-primary":"color-gray-900";return r.jsxs(i.Horizontal,{alignItems:"center",gap:12,opacity:P?.5:1,cursor:P?"not-allowed":"pointer",onClick:()=>W(A),...gd[w],...b==null?void 0:b.item,children:[A.icon&&r.jsx(i.View,{flexShrink:0,...b==null?void 0:b.itemIcon,children:A.icon}),r.jsxs(i.Vertical,{flex:1,gap:2,children:[typeof A.label=="string"?r.jsx(i.Text,{fontSize:zo[w].label,lineHeight:zo[w].label+6,fontWeight:z?"600":"400",color:V,...b==null?void 0:b.itemLabel,children:A.label}):A.label,A.description&&r.jsx(i.Text,{fontSize:zo[w].description,lineHeight:zo[w].description+5,color:"color-gray-500",...b==null?void 0:b.itemDescription,children:A.description})]}),z&&r.jsx(Jo,{widthHeight:18,color:"theme-primary",...b==null?void 0:b.itemIndicator})]},Jn(A,H))}),g]}),k&&r.jsx(i.View,{marginTop:8,paddingHorizontal:12,paddingTop:8,borderTopWidth:1,borderTopColor:"color-gray-200",children:r.jsx(i.Horizontal,{minHeight:52,alignItems:"center",justifyContent:"center",borderRadius:14,backgroundColor:"color-gray-100",cursor:"pointer",onClick:D,...b==null?void 0:b.cancelButton,children:r.jsx(i.Text,{fontSize:zo[w].label,lineHeight:zo[w].label+6,fontWeight:"600",color:"color-gray-900",...b==null?void 0:b.cancelLabel,children:x})})})]})})})},md=e=>{const o=Yc(e);return r.jsx(fd,{...e,...o})},pd=e=>{const o=e==="dark";return{default:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",boxShadow:o?"0 1px 3px rgba(0, 0, 0, 0.3)":"0 1px 2px rgba(0, 0, 0, 0.05)"},content:{color:"color-gray-700"},icon:{color:"color-gray-500"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:o?"0 1px 3px rgba(29, 78, 216, 0.25)":"0 1px 2px rgba(59, 130, 246, 0.05)"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",borderColor:"color-green-200",boxShadow:o?"0 1px 3px rgba(34, 197, 94, 0.2)":"0 1px 2px rgba(34, 197, 94, 0.05)"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},error:{container:{backgroundColor:"color-red-50",borderColor:"color-red-200",boxShadow:o?"0 1px 3px rgba(239, 68, 68, 0.2)":"0 1px 2px rgba(239, 68, 68, 0.05)"},content:{color:"color-red-700"},icon:{color:"color-red-500"}},warning:{container:{backgroundColor:"color-orange-50",borderColor:"color-orange-200",boxShadow:o?"0 1px 3px rgba(249, 115, 22, 0.2)":"0 1px 2px rgba(249, 115, 22, 0.05)"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}}}},ud={default:"alert",info:"status",success:"status",error:"alert",warning:"alert"},yd=h.memo(({icon:e,title:o="",views:t,description:n="",variant:a="default",themeMode:l,children:c,...s})=>{const{themeMode:d}=i.useTheme(),g=l||d,m=h.useMemo(()=>pd(g),[g]),f=()=>{var y;if(e)return e;const u={size:20,color:((y=t==null?void 0:t.icon)==null?void 0:y.color)??m[a].icon.color};switch(a){case"info":return r.jsx(Re,{...u});case"success":return r.jsx(Ct,{...u});case"error":return r.jsx(vr,{...u});case"warning":default:return r.jsx(pt,{...u})}};return r.jsxs(i.Horizontal,{role:ud[a],gap:12,padding:"12px 16px",flexWrap:"nowrap",alignItems:"flex-start",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:m[a].container.borderColor,backgroundColor:m[a].container.backgroundColor,boxShadow:m[a].container.boxShadow,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...t==null?void 0:t.container,...s,children:[r.jsx(i.View,{alignSelf:"flex-start",marginTop:"2px",...t==null?void 0:t.icon,children:f()}),r.jsxs(i.Vertical,{gap:4,children:[o?r.jsx(i.Text,{fontSize:"14px",fontWeight:"600",lineHeight:"20px",color:m[a].content.color,...t==null?void 0:t.title,children:o}):null,r.jsx(i.Text,{fontSize:"12px",fontWeight:"400",lineHeight:"16px",color:m[a].content.color,...t==null?void 0:t.description,children:n||c})]})]})}),St=e=>{const o=pe("alert",e);return r.jsx(yd,{...o})},bd=({ratio:e=16/9,children:o,views:t,...n})=>r.jsx(i.View,{width:"100%",position:"relative",overflow:"hidden",paddingTop:`${1/e*100}%`,borderRadius:8,...n,...t==null?void 0:t.center,children:r.jsx(i.View,{position:"absolute",top:0,right:0,bottom:0,left:0,...t==null?void 0:t.view,children:o})}),Rn=({ratio:e,children:o,...t})=>r.jsx(bd,{ratio:e,...t,children:o});function xd(e,o,t){return Math.min(Math.max(e,o),t)}const kd=({bars:e,isPaused:o,...t})=>{const a=[6,16,23,24,18,9,14,22,24,20,11,12,20,24,21,13,9,19,24,23,16,7,17,23,23,18,8,15,22,24,20,10];return r.jsx(i.Horizontal,{alignItems:"center",minWidth:120,gap:2,height:24,width:"100%",maxWidth:"100%",...t,children:e.map((l,c)=>r.jsx(i.View,{width:3,borderRadius:2,backgroundColor:o?"color-gray-300":l>=0?"theme-primary":"color-gray-300",style:{height:`${l>=0?xd(l*300,6,24):a[c%a.length]}px`}},c))})},vt=({analyserNode:e,isPaused:o,...t})=>{const n=h.useRef(null),a=60,l=32,[c,s]=h.useState([]);return h.useEffect(()=>{if(!e){s(Array(a).fill(-1));return}const d=e.frequencyBinCount,g=new Uint8Array(d),m=()=>{e.getByteTimeDomainData(g);let f=0;for(let u=0;u<d;u++){const y=(g[u]-128)/128;f+=y*y}const p=Math.sqrt(f/d);h.startTransition(()=>{s(u=>{const k=[...u,p].slice(-a);return k.length<a?[...Array(a-k.length).fill(-1),...k]:k})})};return n.current=setInterval(m,l),()=>{n.current&&clearInterval(n.current)}},[e]),r.jsx(kd,{bars:c,isPaused:o,...t})},Tr=vo.create(e=>({visible:!1,title:"",subtitle:"",variant:"info",isClosable:!1,views:{},action:()=>{},actionText:"",showIcon:!1,timeout:3e3,show:(o,t="",n="",a,l,c,s,d,g)=>e({visible:!0,variant:o,title:t,subtitle:n,isClosable:a,views:l,action:c,actionText:s,showIcon:d,timeout:g}),hide:()=>e({visible:!1})})),ea=(e,o,t,n)=>{Tr.getState().show(e,o,t,n==null?void 0:n.isClosable,n==null?void 0:n.views,n==null?void 0:n.action,n==null?void 0:n.actionText,n==null?void 0:n.showIcon,n==null?void 0:n.timeout)},oa=()=>{Tr.getState().hide()},Cd={info:{container:{backgroundColor:"color-white",border:"rgba(191, 219, 254, 0.95)"},icon:{color:"theme-primary",name:"InformationIcon"},content:{color:"color-gray-900"},close:{color:"color-gray-500",name:"CloseIcon"}},success:{container:{backgroundColor:"#F0FDF4",border:"#BBF7D0"},icon:{color:"#16A34A",name:"SuccessIcon"},content:{color:"#14532D"},close:{color:"#15803D",name:"CloseIcon"}},error:{container:{backgroundColor:"#FEF2F2",border:"#FECACA"},icon:{color:"#DC2626",name:"ErrorIcon"},content:{color:"#7F1D1D"},close:{color:"#B91C1C",name:"CloseIcon"}},warning:{container:{backgroundColor:"#FFF7ED",border:"#FED7AA"},icon:{color:"#EA580C",name:"WarningIcon"},content:{color:"#9A3412"},close:{color:"#C2410C",name:"CloseIcon"}}},ra=({variant:e,hide:o,title:t,subtitle:n,theme:a,action:l,actionText:c,showIcon:s=!1,isClosable:d=!1,timeout:g=3e3,views:m})=>{var C,S;h.useEffect(()=>{if(g&&!d){const w=setTimeout(()=>{o()},g);return()=>{clearTimeout(w)}}},[]);const f=a??Cd,p=!!(l&&c),u={borderWidth:1,borderStyle:"solid",borderRadius:12,borderColor:`${f[e].container.border}`,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.06)"},y={info:"#3b82f6",success:"#4ade80",warning:"#f97316",error:"#ef4444"}[e],k={info:r.jsx(Re,{widthHeight:24,color:y,...m==null?void 0:m.icon}),success:r.jsx(Ct,{widthHeight:24,color:y,...m==null?void 0:m.icon}),warning:r.jsx(pt,{widthHeight:24,color:y,...m==null?void 0:m.icon}),error:r.jsx(vr,{widthHeight:24,color:y,...m==null?void 0:m.icon})}[e],x=s&&k;return r.jsxs(i.Horizontal,{role:"messageContent",gap:12,width:"100%",maxWidth:520,flexWrap:"nowrap",position:"relative",alignItems:"flex-start",padding:"12px 14px",color:`${f[e].content.color}`,backgroundColor:`${f[e].container.backgroundColor}`,onClick:d?()=>{}:()=>{o()},...u,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...m==null?void 0:m.container,children:[x&&k,r.jsxs(i.Vertical,{gap:4,width:"100%",children:[r.jsx(i.Text,{size:"md",weight:"semiBold",...m==null?void 0:m.title,children:t}),n&&r.jsx(i.Text,{size:"sm",lineHeight:"20px",color:f[e].content.color,...m==null?void 0:m.subtitle,children:n})]}),p&&r.jsx(i.View,{as:"button",type:"button",onClick:l,backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:f[e].container.border,borderRadius:"9999px",padding:"6px 12px",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",...m==null?void 0:m.actionText,children:r.jsx(i.Text,{whiteSpace:"nowrap",size:"sm",weight:"semiBold",color:f[e].content.color,children:c})}),d&&r.jsx(i.View,{position:"absolute",zIndex:1e4,right:8,top:8,onClick:()=>{o()},cursor:"pointer",padding:"4px",borderRadius:"9999px",transition:"background-color 0.2s ease",...(C=m==null?void 0:m.closingIcon)==null?void 0:C.container,children:r.jsx(He,{widthHeight:16,color:f[e].close.color,...(S=m==null?void 0:m.closingIcon)==null?void 0:S.icon})})]})},wd=({container:e,theme:o,position:t="topRight"})=>{const{visible:n,title:a,variant:l,subtitle:c,isClosable:s,views:d,action:g,actionText:m,showIcon:f,timeout:p}=Tr(),u={topLeft:{top:6,left:8},topRight:{top:6,right:8},bottomLeft:{bottom:8,left:6},bottomRight:{bottom:8,right:6}}[t],y=()=>r.jsx(ra,{variant:l,subtitle:c,show:n,title:a,theme:o,isClosable:s,views:d,action:g,actionText:m,showIcon:f,timeout:p,hide:()=>oa()}),k=e?h.cloneElement(e,{},y()):r.jsx(i.View,{position:"absolute",zIndex:1e4,...u,children:y()});return n?k:null},Sd=(e,o)=>{if(typeof document>"u")return;const t=document.createElement("video");t.preload="metadata",t.onloadedmetadata=()=>{t.currentTime=1},t.oncanplay=()=>{const n=document.createElement("canvas");n.width=t.videoWidth,n.height=t.videoHeight;const a=n.getContext("2d");if(a){a.drawImage(t,0,0,n.width,n.height);const l=n.toDataURL("image/jpeg");o(l)}URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(e)},vd=({maxSize:e=100*1024*1024,onFileSelect:o,onMultipleFileSelect:t,validateFile:n,thumbnail:a,multiple:l=!1,onError:c=s=>{ea("error","Error",s)}})=>{const s=h.useRef(null),d=h.useRef(null),[g,m]=h.useState(null),[f,p]=h.useState([]),[u,y]=h.useState(null),[k,x]=h.useState(null),[C,S]=h.useState(a||null),w=h.useCallback(b=>{const I=b.target.files;if(y(null),!I||I.length===0){c("No file selected"),y("No file selected");return}if(l){const T=Array.from(I),j=[];for(const E of T){if(E.size>e){c(`File ${E.name} exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File ${E.name} exceeds ${Math.round(e/(1024*1024))}MB.`);continue}if(n){const D=n(E);if(D){c(`${E.name}: ${D}`),y(`${E.name}: ${D}`);continue}}j.push(E)}j.length>0&&(p(j),t&&t(j))}else{const T=I[0];if(T.size>e){c(`File exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File exceeds ${Math.round(e/(1024*1024))}MB.`);return}if(n){const j=n(T);if(j){c(j),y(j);return}}x(URL.createObjectURL(T)),T.type.startsWith("video/")&&Sd(T,S),o&&(m(T),o(T))}},[e,o,t,n,l]),v=()=>{const b=s.current;b&&typeof b.click=="function"&&b.click()};return h.useEffect(()=>()=>{typeof URL<"u"&&typeof URL.revokeObjectURL=="function"&&(k&&URL.revokeObjectURL(k),C&&URL.revokeObjectURL(C))},[k,C]),{previewUrl:k,thumbnailUrl:C,errorMessage:u,fileInputRef:s,videoRef:d,selectedFile:g,selectedFiles:f,handleFileChange:w,handleClick:v}},Td=({accept:e,isLoading:o=!1,progress:t=0,icon:n,text:a,previewUrl:l,thumbnailUrl:c,errorMessage:s,fileInputRef:d,videoRef:g,selectedFile:m,selectedFiles:f,handleFileChange:p,handleClick:u,multiple:y=!1,containerProps:k,errorMessageProps:x,progressProps:C,videoProps:S,imageProps:w,iconProps:v,textProps:b,fileType:I,previewUrl:T,renderError:j=({errorMessage:P,errorMessageProps:V,themeMode:M})=>r.jsx(i.Text,{color:"red",fontSize:12,marginTop:8,...V,...z==null?void 0:z.text,children:P}),renderText:E=({text:P,textProps:V})=>r.jsx(i.Text,{marginTop:8,...V,...z==null?void 0:z.text,children:P}),renderFile:D=({selectedFile:P,textProps:V})=>P?r.jsxs(i.Center,{marginTop:8,gap:10,flexDirection:"column",...z==null?void 0:z.container,children:[r.jsx(i.Text,{maxLines:2,...V,...z==null?void 0:z.text,children:P.name}),r.jsxs(i.Text,{...V,...z==null?void 0:z.text,children:["(",Math.round(P.size/1024)," KB)"]})]}):null,renderVideo:W=({selectedFile:P,videoRef:V,videoProps:M})=>r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...z==null?void 0:z.view,children:r.jsx(i.View,{as:"video",width:"100%",height:"100%",src:P?URL.createObjectURL(P):void 0,style:{objectFit:"cover"},ref:V,...M,...z==null?void 0:z.view})}),renderImage:A=({previewUrl:P,imageProps:V})=>(console.log("Rendering image with URL:",P),r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...z==null?void 0:z.view,children:r.jsx(i.Image,{src:P,alt:"Preview",width:"100%",height:"100%",objectFit:"cover",style:{maxHeight:"100%",maxWidth:"100%"},...V,...z==null?void 0:z.image})})),renderProgress:H=({progress:P,progressProps:V})=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",...V,...z==null?void 0:z.horizontal,children:[r.jsx(i.View,{height:4,backgroundColor:"color-black-100",width:"100%",borderRadius:2,...z==null?void 0:z.view,children:r.jsx(i.View,{height:4,width:`${P}%`,borderRadius:2,backgroundColor:"color-dark-50",...z==null?void 0:z.view})}),r.jsxs(i.Text,{fontSize:12,...z==null?void 0:z.text,children:[P,"%"]})]}),views:z={}})=>{const P=T||l;return r.jsxs(i.Center,{onClick:u,cursor:"pointer",border:"1px solid color-black-100",borderRadius:8,padding:16,flexDirection:"column",overflow:"hidden",position:"relative",height:m&&t===100?"200px":"auto",...k,...z==null?void 0:z.container,children:[t===100&&I==="image"&&P&&A({previewUrl:P,imageProps:w}),t===100&&I==="video"&&c&&W({selectedFile:m,thumbnailUrl:c,videoRef:g,videoProps:S,imageProps:w}),t===100&&I==="file"&&m&&D({selectedFile:m,textProps:b}),t<100&&(n||r.jsx(wt,{widthHeight:32,...v})),!o&&!m&&a&&E({text:a,textProps:b}),o&&H({progress:t,progressProps:C}),!o&&s&&j({errorMessage:s,errorMessageProps:x}),r.jsx(i.Input,{type:"file",ref:d,onChange:p,accept:e,multiple:y,style:{display:"none"},...z==null?void 0:z.view})]})},Ir=({accept:e="*/*",icon:o,text:t,maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:c,isLoading:s=!1,progress:d=0,fileType:g,multiple:m=!1,...f})=>{const{previewUrl:p,thumbnailUrl:u,errorMessage:y,videoRef:k,fileInputRef:x,selectedFile:C,selectedFiles:S,handleFileChange:w,handleClick:v}=vd({maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:c,multiple:m}),I=(()=>{if(g)return g;if(C)return C.type.startsWith("image/")?"image":C.type.startsWith("video/")?"video":"file"})();return r.jsx(Td,{handleClick:v,accept:e,isLoading:s,progress:d,icon:o,text:t,maxSize:n,onFileSelect:a,validateFile:c,errorMessage:y,handleFileChange:w,selectedFile:C,selectedFiles:S,videoRef:k,fileInputRef:x,previewUrl:p,thumbnailUrl:u,fileType:I,multiple:m,...f})};function Id(e){const o=Math.floor(e/60),t=e%60;return`${o}:${t.toString().padStart(2,"0")}`}function Fd({onAudio:e,recording:o,paused:t,audioBlob:n,analyserNode:a,duration:l,error:c,startRecording:s,stopRecording:d,pauseRecording:g,resumeRecording:m,resetRecording:f,handleFileChange:p,...u}){const[y,k]=h.useState(null);h.useEffect(()=>{if(n){const S=URL.createObjectURL(n);return k({url:S,label:`recording-${Date.now()}.webm`}),()=>{URL.revokeObjectURL(S)}}return()=>{}},[n]);const x=()=>{y!=null&&y.url&&URL.revokeObjectURL(y.url),k(null),f()},C=S=>{e(S),y!=null&&y.url&&URL.revokeObjectURL(y.url),k({url:URL.createObjectURL(S),label:S.name})};return r.jsxs(i.Vertical,{gap:"10px",width:"100%",...u,children:[r.jsxs(i.Horizontal,{gap:12,alignItems:"center",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsx(Ir,{accept:"audio/*",icon:r.jsx(Xo,{widthHeight:16}),maxSize:100*1024*1024,onFileSelect:C,fileType:"file",multiple:!1,renderError:({errorMessage:S})=>null,views:{container:{width:"36px",height:"36px",cursor:"pointer",border:"1px solid color-gray-200",borderRadius:"10px",backgroundColor:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"}}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"10px",width:"36px",height:"36px"},validateFile:S=>S.size>100*1024*1024?"File size exceeds 100MB limit":S.type.startsWith("audio/")?null:"Only audio files are allowed"}),r.jsx(i.View,{as:"button",type:"button",onClick:o?d:s,width:"36px",height:"36px",minWidth:"36px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"theme-primary",color:"color-white",borderRadius:"999px",border:"0",cursor:"pointer",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.92},children:o?r.jsx(wr,{widthHeight:14,color:"color-white",filled:!1}):r.jsx(ut,{widthHeight:18,color:"color-white",filled:!1})}),r.jsx(i.View,{flex:1,minWidth:120,children:r.jsx(vt,{analyserNode:o?a:null,isPaused:!o||t})}),r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",whiteSpace:"nowrap",children:Id(l)})]}),y&&!o&&r.jsxs(i.Vertical,{gap:"8px",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:8,children:[r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:y.label}),r.jsx(i.View,{as:"button",type:"button",onClick:x,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:"0",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",children:r.jsx(He,{widthHeight:14,color:"currentColor"})})]}),r.jsx(i.View,{as:"audio",controls:!0,src:y.url,width:"100%"})]}),c&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",color:"color-red-500",children:c})]})}function ta(){const[e,o]=h.useState(!1),[t,n]=h.useState(!1),[a,l]=h.useState(0),[c,s]=h.useState(null),[d,g]=h.useState(null),[m,f]=h.useState(null),p=h.useRef(null),u=h.useRef(null),y=h.useRef(null),k=h.useRef(null),x=h.useRef([]),C=h.useRef(null),S=typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm",w=h.useCallback(()=>{p.current&&(p.current.state!=="inactive"&&p.current.stop(),p.current=null),k.current&&(k.current.getTracks().forEach(E=>E.stop()),k.current=null),u.current&&(u.current.close(),u.current=null),y.current&&(y.current.disconnect(),y.current=null),g(null),C.current&&(clearInterval(C.current),C.current=null)},[]),v=h.useCallback(async()=>{w(),s(null),l(0),x.current=[];try{const E=await navigator.mediaDevices.getUserMedia({audio:!0});k.current=E;const D=MediaRecorder.isTypeSupported(S)?S:void 0,W=new MediaRecorder(E,D?{mimeType:D}:void 0);p.current=W;const A=new(window.AudioContext||window.webkitAudioContext);u.current=A;const H=A.createMediaStreamSource(E),z=A.createAnalyser();z.fftSize=256,z.smoothingTimeConstant=.8,H.connect(z),y.current=z,g(z),W.ondataavailable=P=>{P.data.size>0&&x.current.push(P.data)},W.onstop=()=>{const P=new Blob(x.current,{type:W.mimeType||S});f(P),w()},W.start(),o(!0),n(!1),C.current=setInterval(()=>{l(P=>P+1)},1e3)}catch{s("Microphone access denied or unavailable."),w()}},[w]),b=h.useCallback(()=>{p.current&&p.current.state!=="inactive"&&p.current.stop(),o(!1),n(!1),C.current&&(clearInterval(C.current),C.current=null)},[]),I=h.useCallback(()=>{p.current&&p.current.state==="recording"&&(p.current.pause(),n(!0),C.current&&(clearInterval(C.current),C.current=null))},[]),T=h.useCallback(()=>{p.current&&p.current.state==="paused"&&(p.current.resume(),n(!1),C.current||(C.current=setInterval(()=>{l(E=>E+1)},1e3)))},[]),j=h.useCallback(()=>{w(),o(!1),n(!1),f(null),l(0),s(null),x.current=[]},[w]);return h.useEffect(()=>()=>w(),[w]),{recording:e,paused:t,audioBlob:m,analyserNode:d,duration:a,error:c,startRecording:v,stopRecording:b,pauseRecording:I,resumeRecording:T,resetRecording:j}}function zd(e){const{onAudio:o}=e,{recording:t,paused:n,audioBlob:a,analyserNode:l,duration:c,error:s,startRecording:d,stopRecording:g,pauseRecording:m,resumeRecording:f,resetRecording:p}=ta();return h.useEffect(()=>{if(a&&o){const y=new File([a],"recording.webm",{type:a.type||"audio/webm;codecs=opus"});o(y)}},[a,o]),{recording:t,paused:n,audioBlob:a,analyserNode:l,duration:c,error:s,startRecording:d,stopRecording:g,pauseRecording:m,resumeRecording:f,resetRecording:p,handleFileChange:y=>{var x;const k=(x=y.target.files)==null?void 0:x[0];k&&o&&o(k)}}}function Md(e){const o=zd(e);return r.jsx(Fd,{...e,...o})}const Wd=()=>{const[e,o]=h.useState(!1);return{imageError:e,setImageError:o}},Hd={xs:24,sm:32,md:44,lg:56,xl:72},Tt={container:{borderRadius:"50%",overflow:"hidden",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"theme-primary",transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},fallback:{fontWeight:"600",color:"color-white",letterSpacing:"-0.02em"},image:{objectFit:"cover",transition:"opacity 0.2s ease"}},jd=({src:e,size:o="md",fallback:t="IM",views:n,imageError:a,setImageError:l,onClick:c=()=>{},children:s})=>{const d=Hd[o],g={...Tt.image,...(n==null?void 0:n.image)||{}};return r.jsxs(i.Center,{"data-role":"avatar",width:d,height:d,...Tt.container,borderColor:a?"color-gray-400":"transparent",onClick:c,...n==null?void 0:n.container,children:[!a&&e?r.jsx(i.Image,{alt:"",src:e,style:g,width:d,height:d,onError:()=>l(!0)}):r.jsx(i.Text,{size:o,...Tt.fallback,...n==null?void 0:n.fallback,children:t}),s]})},na=e=>{const o=pe("avatar",e),{src:t,size:n,views:a,fallback:l,onClick:c,children:s}=o,{imageError:d,setImageError:g}=Wd();return r.jsx(jd,{src:t,size:n,views:a,fallback:l,imageError:d,setImageError:g,onClick:c,children:s})},Pd={xs:{minWidth:"16px",height:"16px",padding:"0 4px",fontSize:"9px",fontWeight:"600",lineHeight:"12px",letterSpacing:"-0.01em"},sm:{minWidth:"20px",height:"20px",padding:"0 6px",fontSize:"10px",fontWeight:"600",lineHeight:"14px",letterSpacing:"-0.01em"},md:{minWidth:"24px",height:"24px",padding:"0 8px",fontSize:"12px",fontWeight:"600",lineHeight:"16px",letterSpacing:"-0.01em"},lg:{minWidth:"28px",height:"28px",padding:"0 10px",fontSize:"14px",fontWeight:"600",lineHeight:"20px",letterSpacing:"-0.01em"},xl:{minWidth:"32px",height:"32px",padding:"0 12px",fontSize:"16px",fontWeight:"600",lineHeight:"24px",letterSpacing:"-0.01em"}},Vd={xs:{gap:"6px",padding:"3px 8px 3px 3px"},sm:{gap:"8px",padding:"4px 10px 4px 4px"},md:{gap:"12px",padding:"6px 16px 6px 6px"},lg:{gap:"12px",padding:"7px 18px 7px 7px"},xl:{gap:"14px",padding:"8px 20px 8px 8px"}},Ad={xs:{padding:"2px 6px",fontSize:"9px",lineHeight:"12px"},sm:{padding:"3px 8px",fontSize:"10px",lineHeight:"14px"},md:{padding:"6px 12px",fontSize:"11px",lineHeight:"14px"},lg:{padding:"7px 14px",fontSize:"12px",lineHeight:"16px"},xl:{padding:"8px 16px",fontSize:"13px",lineHeight:"18px"}},aa={xs:{fontSize:"11px",lineHeight:"14px"},sm:{fontSize:"12px",lineHeight:"16px"},md:{fontSize:"13px",lineHeight:"18px"},lg:{fontSize:"14px",lineHeight:"20px"},xl:{fontSize:"15px",lineHeight:"22px"}},Ed={square:0,rounded:"8px",pill:"9999px"},Dd={"top-right":{top:"4px",right:"4px",position:"absolute"},"top-left":{top:"4px",left:"4px",position:"absolute"},"bottom-right":{bottom:"4px",right:"4px",position:"absolute"},"bottom-left":{bottom:"4px",left:"4px",position:"absolute"}},$d=e=>({display:"inline-flex",height:"auto",minWidth:"auto",backgroundColor:"color-white-600",color:"color-gray-900",borderWidth:"1px",borderStyle:"solid",borderColor:"color-white",backdropFilter:"blur(12px)",boxShadow:"0 1px 2px rgba(15, 23, 42, 0.08)",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",_hover:{backgroundColor:"color-white-800",boxShadow:"0 2px 8px rgba(15, 23, 42, 0.1)"}}),Ld=e=>({filled:{backgroundColor:"theme-primary",color:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",color:"theme-primary",style:{backgroundColor:"transparent"},transition:"border-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},link:{borderWidth:0,borderStyle:"none",borderColor:"theme-primary",color:"theme-primary",textDecoration:"underline",style:{backgroundColor:"transparent",textUnderlineOffset:"2px",textDecorationThickness:"1px"},transition:"opacity 0.2s ease",_hover:{opacity:.8}},ghost:{color:"color-gray-500",borderWidth:0,borderStyle:"solid",borderColor:"color-gray-500",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-100"}}}),la=e=>({default:{indicator:{backgroundColor:"color-gray-400"},label:{color:"inherit"}},info:{indicator:{backgroundColor:"color-blue-500"},label:{color:"inherit"}},success:{indicator:{backgroundColor:"color-green-500"},label:{color:"inherit"}},warning:{indicator:{backgroundColor:"color-orange-500"},label:{color:"inherit"}},error:{indicator:{backgroundColor:"color-red-500"},label:{color:"inherit"}}}),_d=h.memo(({content:e,children:o,icon:t,pastil:n,pastilContent:a,action:l,position:c,shape:s="pill",variant:d="filled",size:g="md",isAuto:m=!1,views:f,themeMode:p,backgroundColor:u,color:y,borderColor:k,...x})=>{const{themeMode:C}=i.useTheme(),S=p||C,w=h.useMemo(()=>Ld()[d],[S,d]),v=h.useMemo(()=>$d(),[S]),b=h.useMemo(()=>la(),[S]),I=a!=null,T=l!=null,j=I||T,E=o??e,D=E!=null,W=m&&typeof E=="string"&&/^(color|theme|light|dark)-/.test(E)?E:void 0,A=h.useMemo(()=>{const z={width:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"6px",borderRadius:Ed[s],...Pd[g],...w,...j?Vd[g]:{},...j?v:{},...c?Dd[c]:{},...f==null?void 0:f.container};return d!=="filled"&&!j&&(w.color!==void 0&&(z.color=w.color),w.borderColor!==void 0&&(z.borderColor=w.borderColor),w.backgroundColor!==void 0&&(z.backgroundColor=w.backgroundColor),w&&w.style&&(z.style={...z.style||{},...w.style})),T||x.onClick!==void 0||(delete z._hover,delete z._active),u!==void 0&&(z.backgroundColor=u,k===void 0&&(z.borderColor=u)),k!==void 0&&(z.borderColor=k),y!==void 0&&(z.color=y),W&&(z.backgroundColor=W,z.borderColor=W,z.color="color-white"),z},[T,x.onClick,u,y,k,s,g,d,w,j,v,c,W,f==null?void 0:f.container]);let H="currentColor";return typeof n=="string"?n in b?H=b[n].indicator.backgroundColor:H=n:n===!0&&(H="color-green-500",d==="filled"&&(H="color-white")),r.jsxs(i.Center,{"data-role":"badge",...A,...x,children:[t&&r.jsx(i.View,{"data-role":"badge-icon",...f==null?void 0:f.icon,children:t}),I&&r.jsx(i.Text,{"data-role":"badge-pastil-content",backgroundColor:"color-gray-900",borderRadius:"9999px",color:"color-white",fontWeight:"700",letterSpacing:0,textTransform:"uppercase",whiteSpace:"nowrap",...Ad[g],...f==null?void 0:f.pastilContent,children:a}),n&&r.jsx(i.View,{"data-role":"badge-pastil",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:H,...f==null?void 0:f.pastil}),D&&r.jsx(i.Text,{"data-role":"badge-text",color:j?"color-gray-900":A.color,fontWeight:j?"700":"600",textAlign:"center",letterSpacing:j?0:"0.02em",whiteSpace:"nowrap",...j?aa[g]:{},...f==null?void 0:f.text,children:E}),T&&r.jsx(i.Text,{"data-role":"badge-action",color:"color-gray-400",fontWeight:"500",letterSpacing:0,whiteSpace:"nowrap",...aa[g],...f==null?void 0:f.action,children:l})]})}),Fe=e=>{const o=pe("badge",e);return r.jsx(_d,{...o})},Bd={xs:12,sm:14,md:16,lg:18,xl:20},Od=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,It=h.forwardRef(({children:e,href:o,iconSize:t="sm",underline:n="default",isExternal:a=!1,views:l={},to:c,isHovered:s,setIsHovered:d,_hover:g,...m},f)=>r.jsxs(i.Element,{as:"a",ref:f,href:o,display:"inline-flex",gap:3,alignItems:"center",flexWrap:"nowrap",color:"inherit",textDecoration:n==="underline"?"underline":"none",_hover:n==="hover"?{textDecoration:"underline",...g}:g,...a?{target:"_blank",rel:"noopener noreferrer"}:{},...l.text,...m,children:[e,a&&r.jsx(Yn,{widthHeight:Bd[t]})]}));It.displayName="LinkAnchor";const ia=h.forwardRef(({to:e="/",onClick:o,...t},n)=>{const a=it.useHref(e),l=it.useNavigate(),c=s=>{o==null||o(s),!(s.defaultPrevented||s.button!==0||t.target&&t.target!=="_self"||s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)&&(s.preventDefault(),l(e))};return r.jsx(It,{...t,to:e,href:a,onClick:c,ref:n})});ia.displayName="RouterLinkAnchor";const ca=h.forwardRef((e,o)=>{const t=it.useInRouterContext(),{href:n,to:a="/",isExternal:l}=e;return t&&!l&&n==null&&!Od.test(a)?r.jsx(ia,{...e,ref:o}):r.jsx(It,{...e,href:n??a,ref:o})});ca.displayName="LinkView";const sa=h.forwardRef((e,o)=>r.jsx(ca,{ref:o,...e}));sa.displayName="Link";const Ft=sa,zt={xs:14,sm:18,md:22,lg:26,xl:30},Mt={fast:50,normal:100,slow:300},Nd=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),qd=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=l(t,{themeMode:n||c}),d=typeof e=="number"?e:zt[e],[g,m]=h.useState(0);return h.useEffect(()=>{const f=setInterval(()=>{m(p=>p+45)},Mt[o]);return()=>clearInterval(f)},[o]),r.jsxs(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:`${d}px`,height:`${d}px`,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:`rotate(${g}deg)`},...a,children:[r.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),r.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("g",{id:"SVGRepo_iconCarrier",children:r.jsx("path",{d:"M21 12a9 9 0 11-6.219-8.56"})})]})},Ud=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=l(t,{themeMode:n||c}),d=typeof e=="number"?e:zt[e],[g,m]=h.useState(0);return h.useEffect(()=>{const f=setInterval(()=>{m(p=>p+45)},Mt[o]);return()=>clearInterval(f)},[o]),r.jsxs(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${g}deg)`},...a,children:[r.jsx("circle",{cx:"10",cy:"25",r:"4",fill:s}),r.jsx("circle",{cx:"25",cy:"25",r:"4",fill:s}),r.jsx("circle",{cx:"40",cy:"25",r:"4",fill:s})]})},Gd=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=l(t,{themeMode:n||c}),d=typeof e=="number"?e:zt[e],[g,m]=h.useState(0);return h.useEffect(()=>{const f=setInterval(()=>{m(p=>p+45)},Mt[o]);return()=>clearInterval(f)},[o]),r.jsx(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${g}deg)`},...a,children:r.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:s,strokeWidth:"5",strokeDasharray:"1,10"})})},Yd=({size:e,children:o,textColor:t,loaderColor:n,type:a="default",speed:l="normal",textPosition:c="right",views:s,...d})=>{const{getColor:g}=i.useTheme(),m=u=>Nd(u)?u:g(u||"theme-loading");n=m(n||d.color||"theme-loading"),t=m(t||d.color||"theme-loading");const f={size:e,speed:l,color:n},p={default:r.jsx(qd,{...f}),dotted:r.jsx(Ud,{...f}),quarter:r.jsx(Gd,{...f})};return r.jsxs(i.Center,{gap:10,flexDirection:c==="top"||c==="bottom"?"column":"row",...d,...s==null?void 0:s.container,children:[(c==="left"||c==="top")&&o&&r.jsx(i.View,{color:t,...s==null?void 0:s.text,children:o}),p[a],(c==="right"||c==="bottom")&&o&&r.jsx(i.View,{color:t,...s==null?void 0:s.text,children:o})]})},eo=e=>{const o=pe("loader",e);return r.jsx(Yd,{...o})},Kd=/^(color|theme|light|dark)-/,Xd=e=>Kd.test(e),Jd=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},Mo=(e,o)=>Xd(e)?`${Jd(e)}-${o}`:`color-mix(in srgb, ${e} ${Math.round(o/10)}%, transparent)`,da={xs:{minHeight:24,paddingHorizontal:12,paddingVertical:5,fontSize:10,fontWeight:500,lineHeight:12,letterSpacing:"-0.01em"},sm:{minHeight:32,paddingHorizontal:16,paddingVertical:7,fontSize:12,fontWeight:500,lineHeight:16,letterSpacing:"-0.01em"},md:{minHeight:40,paddingHorizontal:20,paddingVertical:9,fontSize:14,fontWeight:500,lineHeight:20,letterSpacing:"-0.01em"},lg:{minHeight:48,paddingHorizontal:24,paddingVertical:11,fontSize:16,fontWeight:500,lineHeight:24,letterSpacing:"-0.01em"},xl:{minHeight:56,paddingHorizontal:28,paddingVertical:13,fontSize:20,fontWeight:500,lineHeight:28,letterSpacing:"-0.01em"}},Qo={square:0,rounded:8,pill:999},Qd={xs:{width:16,height:16,padding:6},sm:{width:20,height:20,padding:6},md:{width:24,height:24,padding:8},lg:{width:24,height:24,padding:12},xl:{width:28,height:28,padding:14}},Oe=e=>/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,Zd=(e,o,t=!1,n)=>{const a=t?o:e,l=t?e:o,c=t?o:e,d=(e==="theme-primary"||n&&e===n.primary)&&(n!=null&&n.onPrimary)?n.onPrimary:l,g=`0 0 0 2px ${Oe("color-white")}, 0 0 0 4px ${Oe(c)}`;return{filled:{backgroundColor:a,color:d,borderWidth:1,borderStyle:"solid",borderColor:a,_hover:{opacity:.92},_active:{opacity:.96},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},empty:{color:c,borderWidth:1,borderStyle:"solid",borderColor:Mo(c,t?400:250),backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, opacity 0.2s ease"},outline:{color:c,borderWidth:1,borderStyle:"solid",borderColor:Mo(c,t?400:250),backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{color:c,borderWidth:0,borderStyle:"solid",borderColor:c,backgroundColor:"transparent",_hover:{opacity:.86},_active:{opacity:.94},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, color 0.2s ease"},link:{color:c,borderWidth:0,borderStyle:"none",borderColor:c,minHeight:"auto",paddingHorizontal:"4px",paddingVertical:"10px",textDecoration:"underline",backgroundColor:"transparent",style:{textUnderlineOffset:"2px",textDecorationThickness:"1px",textDecorationColor:Oe(c)},_hover:{opacity:.8},_active:{opacity:.9},_focusVisible:{outline:"none",boxShadow:g},transition:"opacity 0.2s ease"},subtle:{backgroundColor:Mo(c,t?200:100),color:c,borderWidth:1,borderStyle:"solid",borderColor:Mo(c,t?400:250),_hover:{backgroundColor:Mo(c,t?300:180)},_active:{backgroundColor:Mo(c,t?380:240)},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}}},Rd=h.memo(({children:e,icon:o,leftIcon:t,rightIcon:n,isLoading:a,iconPosition:l="left",loaderPosition:c="left",size:s="md",resolvedTextColor:d,isIconRounded:g,loaderProps:m,views:f})=>{const p=["left","right"].includes(l)?i.Horizontal:i.Vertical,u=da[s];return r.jsxs(p,{gap:8,alignItems:"center",justifyContent:"center",fontSize:u.fontSize,fontWeight:u.fontWeight,lineHeight:u.lineHeight,letterSpacing:u.letterSpacing,whiteSpace:"nowrap",color:d,...f==null?void 0:f.content,children:[a&&c==="left"&&r.jsx(eo,{size:s==="xs"||s==="sm"?"sm":"md",color:d,...m,...f==null?void 0:f.loader}),t&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:t}),o&&["left","top"].includes(l)&&!a&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:o}),e,o&&["right","bottom"].includes(l)&&!a&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:o}),n&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:n}),a&&c==="right"&&r.jsx(eo,{size:s==="xs"||s==="sm"?"sm":"md",color:d,...m,...f==null?void 0:f.loader})]})}),e0=e=>{const o=Qo[e];return typeof o=="number"?o:typeof o=="string"&&parseInt(o,10)||0},o0=({asComponent:e,isDisabled:o,isLoading:t,isWrapped:n=!1,borderRadius:a,width:l,height:c,baseStyles:s,sizeStyles:d,iconPad:g,mainTone:m,resolvedTextColor:f,children:p,borderWidth:u=0,...y})=>r.jsx(i.Element,{as:e,disabled:!!(o||t),display:n?"flex":"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:a,width:l,height:c,...s,...d,...g,backgroundColor:(s==null?void 0:s.backgroundColor)||(n?m:void 0),color:f,borderWidth:n?0:void 0,cursor:o?"default":"pointer",...y,children:p}),r0=({shape:e,isDisabled:o,onClick:t,shadow:n,borderWidth:a,isAuto:l,isFilled:c,views:s,children:d,...g})=>r.jsx(i.Element,{as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:Qo[e],cursor:o?"default":"pointer",onClick:t,boxShadow:n,padding:a,width:c?"100%":l?"fit-content":void 0,...s==null?void 0:s.container,...g,children:d}),t0=({variant:e,animation:o,to:t,isDisabled:n,isLoading:a,isAuto:l,isFilled:c,isExternal:s,shape:d="rounded",shadow:g,onClick:m,views:f,baseStyles:p,sizeStyles:u,iconPad:y,containerRef:k,resolvedTextColor:x,content:C,size:S,mainTone:w,borderMovingDuration:v=2,borderMovingGradientColors:b=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:I="#705CFF",animatedStrokeTextColor:T="color-gray-900",...j})=>{var A;const E=e0(d),D=t?r.jsx(Ft,{to:t,isExternal:s,color:"currentColor",textDecoration:"inherit",_hover:{color:"currentColor"},...f==null?void 0:f.link,children:C}):C,W={isDisabled:n,isLoading:a,baseStyles:p,sizeStyles:u,iconPad:y,resolvedTextColor:x,mainTone:w,children:D};if(o==="borderMoving"&&b){const z={from:{backgroundPosition:"0% 50%"},to:{backgroundPosition:"200% 50%"},duration:`${v}s`,timingFunction:"linear",iterationCount:"infinite"};return r.jsx(r0,{shape:d,isDisabled:n,onClick:m,shadow:g,borderWidth:3,isAuto:l,isFilled:c,views:f,background:`linear-gradient(90deg, ${Oe(b[0])}, ${Oe(b[1])}, ${Oe(b[2])}, ${Oe(b[0])})`,backgroundSize:"200% 100%",animate:z,...j,children:r.jsx(o0,{asComponent:t?"div":"button",isWrapped:!0,borderRadius:Math.max(0,E-3),width:"100%",height:"100%",...W})})}if(o==="animatedStroke"){const H=Oe(I),z=Oe(T),P=1e3,V={from:{strokeWidth:"8px",strokeDasharray:`0 ${P}`,strokeDashoffset:-Math.round(P*.63)},to:{strokeWidth:"3px",strokeDasharray:`${P}`,strokeDashoffset:0},duration:"0.9s",timingFunction:"ease-in",fillMode:"forwards"},M=["group",(A=f==null?void 0:f.container)==null?void 0:A.className,j==null?void 0:j.className].filter(Boolean).join(" ");return r.jsxs(i.Element,{ref:k,as:t?"div":"button",type:t?void 0:"button",disabled:!!(!t&&(n||a)),onClick:m,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:c?"100%":l?"fit-content":void 0,borderRadius:Qo[d],boxShadow:g,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",color:z,backgroundColor:"transparent",borderWidth:0,...f==null?void 0:f.container,...j,className:M,children:[r.jsx(i.View,{as:"svg",position:"absolute",top:0,right:0,bottom:0,left:0,width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",pointerEvents:"none",zIndex:1,"aria-hidden":"true",children:r.jsx(i.View,{as:"rect",x:"0",y:"0",height:"100%",width:"100%",rx:E,ry:E,fill:"transparent",stroke:H,strokeWidth:"8px",strokeDasharray:`0 ${P}`,strokeDashoffset:-Math.round(P*.63),pathLength:P,on:{groupHover:{animate:V}}})}),r.jsx(i.View,{position:"relative",zIndex:0,children:D})]})}if(o==="borderReveal"){const z=Oe((b==null?void 0:b[0])||w||"#000000"),V=v*.75/4,M=`linear-gradient(90deg, ${z} 50%, transparent 50%)`,L=`linear-gradient(180deg, ${z} 50%, transparent 50%)`,_=`linear-gradient(270deg, ${z} 50%, transparent 50%)`,O=`linear-gradient(0deg, ${z} 50%, transparent 50%)`,N="100% 0, 100% 100%, 0 100%, 0 0",U="0 0, 100% 0, 100% 100%, 0 100%",X=`0s, ${V}s, ${V*2}s, ${V*2}s`,oe=`${V*2}s, ${V*2}s, ${V}s, 0s`,B=4;return r.jsx(i.Element,{ref:k,as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:Qo[d],cursor:n?"default":"pointer",onClick:m,boxShadow:g,padding:3,background:`
2
- ${M} no-repeat,
3
- ${L} no-repeat,
1
+ (function(A,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("react/jsx-runtime"),require("react"),require("app-studio"),require("react-dom"),require("zustand"),require("react-router-dom"),require("formik")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","app-studio","react-dom","zustand","react-router-dom","formik"],r):(A=typeof globalThis<"u"?globalThis:A||self,r(A.AppStudioWeb={},A.jsxRuntime,A.React,A.appStudio,A.ReactDOM,A.zustand,A.ReactRouterDOM,A.Formik))})(this,function(A,r,h,c,fs,Wo,It,Oe){"use strict";var xx=Object.defineProperty;var kx=(A,r,h)=>r in A?xx(A,r,{enumerable:!0,configurable:!0,writable:!0,value:h}):A[r]=h;var ao=(A,r,h)=>kx(A,typeof r!="symbol"?r+"":r,h);var jo,Zn;const Eo=(e="id")=>`${e}-${Math.random().toString(36).substring(2,9)}`,ms=({type:e="single",value:o,defaultValue:t,onValueChange:n,collapsible:a=!1})=>{const l=o!==void 0,i=o??t,g=()=>e==="multiple"?Array.isArray(i)?i:i?[i]:[]:Array.isArray(i)?i[0]:i,[s,d]=h.useState(g()),f=h.useMemo(()=>Eo("accordion"),[]),u=l?o:s,m=h.useMemo(()=>u===void 0?[]:Array.isArray(u)?u:[u],[u]);h.useEffect(()=>{l&&(e==="multiple"&&!Array.isArray(o)?(console.warn('Accordion with type="multiple" received non-array value:',o),d(o?[String(o)]:[])):e==="single"&&Array.isArray(o)?(console.warn('Accordion with type="single" received array value:',o),d(o.length>0?o[0]:void 0)):d(o))},[o,l,e]);const p=h.useCallback(x=>{let b;if(e==="single")u===x&&a?b=void 0:u!==x?b=x:b=u;else{const C=Array.isArray(u)?u:[];C.includes(x)?b=C.filter(k=>k!==x):b=[...C,x],Array.isArray(b)&&b.length===0&&(b=[])}l||d(b),n&&n(b)},[e,u,a,l,n]),y=h.useCallback(x=>m.includes(x),[m]);return{expandedItems:m,toggleItem:p,isItemExpanded:y,type:e,collapsible:a,baseId:f}},ps={square:{borderRadius:0},rounded:{borderRadius:8}},ys={default:{borderWidth:0,style:{backgroundColor:"transparent"},transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.15s ease, background-color 0.15s ease",_hover:{borderColor:"color-gray-300"}},filled:{backgroundColor:"color-gray-50",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-100"}}},bs={metadata:{id:"default",label:"Default",sourcePath:"",sourceTitle:"Default adaptive design system (light + dark)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},theme:{primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626",onPrimary:"#ffffff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200"},tokens:{rawCssVars:{primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626"},colors:[{name:"primary",value:"#2563eb",role:"primary"},{name:"secondary",value:"#7c3aed",role:"secondary"},{name:"success",value:"#16a34a",role:"success"},{name:"warning",value:"#d97706",role:"warning"},{name:"error",value:"#dc2626",role:"error"}],typography:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace",fontSizes:["12px","13px","14px","16px","18px","22px","28px","36px","48px","64px"],fontWeights:["400","500","600","700","800"],lineHeights:["1.0","1.1","1.2","1.4","1.5","1.6"]},spacing:["2px","4px","8px","12px","16px","24px","32px","48px","64px"],radii:["2px","4px","6px","8px","12px","16px","9999px"],shadows:["0 1px 2px rgba(0,0,0,0.04)","0 4px 12px rgba(0,0,0,0.08)","0 12px 32px rgba(0,0,0,0.12)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:8,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:600,fontStyle:"normal"},text:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 2px rgba(0,0,0,0.04)"},header:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"9999px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral-clear"}},Ft={airbnb:{metadata:{id:"airbnb",label:"Airbnb",sourcePath:"design.md/html/airbnb.html",sourceTitle:"Design System Inspiration of Airbnb",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},theme:{primary:"#ff385c",secondary:"#222222",success:"#428bff",warning:"#460479",error:"#c13515",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#ff385c","primary-active":"#e00b41","primary-disabled":"#ffd1da",error:"#c13515",luxe:"#460479",plus:"#92174d",ink:"#222222",body:"#3f3f3f",muted:"#6a6a6a","muted-soft":"#929292",hairline:"#dddddd","hairline-soft":"#ebebeb","border-strong":"#c1c1c1",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#f2f2f2","on-primary":"#ffffff","legal-link":"#428bff",shadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",display:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",text:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, sans-serif"},colors:[{name:"primary",value:"#ff385c",role:"primary"},{name:"primary-active",value:"#e00b41",role:"primary active"},{name:"primary-disabled",value:"#ffd1da",role:"primary disabled"},{name:"error",value:"#c13515",role:"error"},{name:"luxe",value:"#460479",role:"luxe"},{name:"plus",value:"#92174d",role:"plus"},{name:"ink",value:"#222222",role:"ink"},{name:"body",value:"#3f3f3f",role:"body"},{name:"muted",value:"#6a6a6a",role:"muted"},{name:"muted-soft",value:"#929292",role:"muted soft"},{name:"hairline",value:"#dddddd",role:"hairline"},{name:"hairline-soft",value:"#ebebeb",role:"hairline soft"},{name:"border-strong",value:"#c1c1c1",role:"border strong"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#f2f2f2",role:"surface strong"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"legal-link",value:"#428bff",role:"legal link"},{name:"shadow",value:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",role:"shadow"}],typography:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","48px","18px","20px","11px","28px","13px","12px","8px","64px","21px","10px","24px","36px","15px"],fontWeights:["400","600","700","500"],lineHeights:["1.5","1.1","1.43","1.25","2","1","1.2","1.35","1.4"]},spacing:["2px","4px","5px","6px","7px","8px","10px","11px","12px","13px","14px","16px","20px","23px","24px","28px","32px","40px","48px","56px"],radii:["9999px","8px","14px","4px","6px","3px"],shadows:["rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0","var(--shadow)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},header:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"14px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:16},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:16},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"14px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"14px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:16,pillRadius:9999,badgeRadius:6,voice:"warm-welcoming"}},apple:{metadata:{id:"apple",label:"Apple",sourcePath:"design.md/html/apple.html",sourceTitle:"Design System Inspiration of Apple",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},theme:{primary:"#0071E3",secondary:"#1d1d1f",success:"#0071e3",warning:"#272729",error:"#2997ff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#0066cc","primary-focus":"#0071e3","primary-on-dark":"#2997ff",ink:"#1d1d1f",body:"#1d1d1f","body-on-dark":"#ffffff","body-muted":"#cccccc","ink-muted-80":"#333333","ink-muted-48":"#7a7a7a","divider-soft":"#f0f0f0",hairline:"#e0e0e0",canvas:"#ffffff","canvas-parchment":"#f5f5f7","surface-pearl":"#fafafc","surface-tile-1":"#272729","surface-tile-2":"#2a2a2c","surface-tile-3":"#252527","surface-black":"#000000","surface-chip-translucent":"rgba(210, 210, 215, 0.64)","on-primary":"#ffffff","on-dark":"#ffffff",display:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",text:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#0071E3",role:"primary"},{name:"primary-focus",value:"#0071e3",role:"primary focus"},{name:"primary-on-dark",value:"#2997ff",role:"primary on dark"},{name:"ink",value:"#1d1d1f",role:"ink"},{name:"body",value:"#1d1d1f",role:"body"},{name:"body-on-dark",value:"#ffffff",role:"body on dark"},{name:"body-muted",value:"#cccccc",role:"body muted"},{name:"ink-muted-80",value:"#333333",role:"ink muted 80"},{name:"ink-muted-48",value:"#7a7a7a",role:"ink muted 48"},{name:"divider-soft",value:"#f0f0f0",role:"divider soft"},{name:"hairline",value:"#e0e0e0",role:"hairline"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"canvas-parchment",value:"#f5f5f7",role:"canvas parchment"},{name:"surface-pearl",value:"#fafafc",role:"surface pearl"},{name:"surface-tile-1",value:"#272729",role:"surface tile 1"},{name:"surface-tile-2",value:"#2a2a2c",role:"surface tile 2"},{name:"surface-tile-3",value:"#252527",role:"surface tile 3"},{name:"surface-black",value:"#000000",role:"surface black"},{name:"surface-chip-translucent",value:"rgba(210, 210, 215, 0.64)",role:"surface chip translucent"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"}],typography:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["17px","14px","56px","21px","12px","40px","24px","13px","18px","28px","11px","34px","44px","32px","19px"],fontWeights:["400","600","300","700"],lineHeights:["1.47","1.07","1.19","1.1","1.43","1.5","1","1.14","2.0","2.41","1.2","1.35"]},spacing:["5px","6px","7px","8px","10px","11px","12px","14px","15px","16px","18px","20px","21px","22px","24px","28px","32px","44px","48px","50px"],radii:["9999px","18px","28px","24px","8px","11px","50%","12px","4px","6px","3px"],shadows:["0 5px 30px rgba(0, 0, 0, 0.22)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:8,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:18,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 5px 30px rgba(0, 0, 0, 0.22)"},header:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"18px"},trigger:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:18},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:18},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"18px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"18px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"light",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"flat",signatureMotif:"◯",density:"spacious",surfaceTone:"paper",cardRadius:18,pillRadius:9999,badgeRadius:8,voice:"minimal-precise"}},coinbase:{metadata:{id:"coinbase",label:"Coinbase",sourcePath:"design.md/html/coinbase.html",sourceTitle:"Design System Inspiration of Coinbase",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap"]},theme:{primary:"#0052ff",secondary:"#0a0b0d",success:"#16a34a",warning:"#003ecc",error:"#dc2626",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#0052ff","primary-active":"#003ecc","primary-disabled":"#a8b8cc",ink:"#0a0b0d",body:"#5b616e",muted:"#7c828a","muted-soft":"#a8acb3",hairline:"#dee1e6","hairline-soft":"#eef0f3",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#eef0f3","surface-dark":"#0a0b0d","surface-dark-elevated":"#16181c","on-primary":"#ffffff","on-dark":"#ffffff","on-dark-soft":"#a8acb3","semantic-up":"#05b169","semantic-down":"#cf202f","accent-yellow":"#f4b000",display:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",text:"'Inter', 'Coinbase Sans', sans-serif",mono:"'JetBrains Mono', 'Coinbase Mono', monospace"},colors:[{name:"primary",value:"#0052ff",role:"primary"},{name:"primary-active",value:"#003ecc",role:"primary active"},{name:"primary-disabled",value:"#a8b8cc",role:"primary disabled"},{name:"ink",value:"#0a0b0d",role:"ink"},{name:"body",value:"#5b616e",role:"body"},{name:"muted",value:"#7c828a",role:"muted"},{name:"muted-soft",value:"#a8acb3",role:"muted soft"},{name:"hairline",value:"#dee1e6",role:"hairline"},{name:"hairline-soft",value:"#eef0f3",role:"hairline soft"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#eef0f3",role:"surface strong"},{name:"surface-dark",value:"#0a0b0d",role:"surface dark"},{name:"surface-dark-elevated",value:"#16181c",role:"surface dark elevated"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-soft",value:"#a8acb3",role:"on dark soft"},{name:"semantic-up",value:"#05b169",role:"semantic up"},{name:"semantic-down",value:"#cf202f",role:"semantic down"},{name:"accent-yellow",value:"#f4b000",role:"accent yellow"}],typography:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",monoFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontSizes:["16px","14px","72px","18px","13px","36px","12px","44px","11px","52px","28px","40px","32px","48px","26px"],fontWeights:["500","600","400","700"],lineHeights:["1.5","1.2","1.05","1.15","1.0","1.09","1","1.35","1.4"]},spacing:["4px","5px","6px","8px","10px","11px","12px","13px","14px","15px","16px","19px","20px","24px","28px","32px","40px","44px","48px","56px"],radii:["100px","24px","20px","16px","9999px","14px","12px","8px","6px","3px"],shadows:["0 16px 40px rgba(0,0,0,0.5)","0 16px 40px rgba(0,0,0,0.4)","0 4px 12px rgba(0,0,0,0.04)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 16px 40px rgba(0,0,0,0.5)"},header:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"16px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"16px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"◆",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"trustworthy-financial"}},figma:{metadata:{id:"figma",label:"Figma",sourcePath:"design.md/html/figma.html",sourceTitle:"Design System Inspiration of Figma",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300..700&family=JetBrains+Mono:wght@400;500&display=swap"]},theme:{primary:"#F24E1E",secondary:"#A259FF",success:"#0ACF83",warning:"#FFC700",error:"#FF7262",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#000000","on-primary":"#ffffff",ink:"#000000",canvas:"#ffffff","inverse-canvas":"#000000","inverse-ink":"#ffffff",hairline:"#e6e6e6","hairline-soft":"#f1f1f1","surface-soft":"#f7f7f5","block-lime":"#dceeb1","block-lilac":"#c5b0f4","block-cream":"#f4ecd6","block-pink":"#efd4d4","block-mint":"#c8e6cd","block-coral":"#f3c9b6","block-navy":"#1f1d3d","accent-magenta":"#ff3d8b","semantic-success":"#1ea64a",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",mono:"'JetBrains Mono', 'SF Mono', Menlo, monospace"},colors:[{name:"primary",value:"#F24E1E",role:"primary"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#000000",role:"ink"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"inverse-canvas",value:"#000000",role:"inverse canvas"},{name:"inverse-ink",value:"#ffffff",role:"inverse ink"},{name:"hairline",value:"#e6e6e6",role:"hairline"},{name:"hairline-soft",value:"#f1f1f1",role:"hairline soft"},{name:"surface-soft",value:"#f7f7f5",role:"surface soft"},{name:"block-lime",value:"#dceeb1",role:"block lime"},{name:"block-lilac",value:"#c5b0f4",role:"block lilac"},{name:"block-cream",value:"#f4ecd6",role:"block cream"},{name:"block-pink",value:"#efd4d4",role:"block pink"},{name:"block-mint",value:"#c8e6cd",role:"block mint"},{name:"block-coral",value:"#f3c9b6",role:"block coral"},{name:"block-navy",value:"#1f1d3d",role:"block navy"},{name:"accent-magenta",value:"#ff3d8b",role:"accent magenta"},{name:"semantic-success",value:"#1ea64a",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",monoFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontSizes:["18px","16px","80px","20px","12px","40px","14px","11px","26px","24px","32px","13px","10px","56px","36px"],fontWeights:["320","330","480","600","500","700"],lineHeights:["1.45","1.0","1.4","1.1","1.6","1.35","1","1.2"]},spacing:["5px","6px","8px","10px","12px","14px","16px","20px","22px","24px","28px","32px","36px","40px","44px","48px","56px","64px","96px","100px"],radii:["50px","8px","9999px","24px","6px","2px","3px"],shadows:["0 0 0 2px rgba(0,0,0,0.08)","none","0 4px 16px rgba(0,0,0,0.06)","0 12px 32px rgba(0,0,0,0.18)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 2px rgba(0,0,0,0.08)"},header:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"12px"},trigger:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"✦",density:"comfortable",surfaceTone:"paper",cardRadius:8,pillRadius:9999,badgeRadius:4,voice:"playful-creative"}},linear:{metadata:{id:"linear",label:"Linear",sourcePath:"design.md/html/linear.html",sourceTitle:"Design System Inspiration of Linear",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400&display=swap"]},theme:{primary:"#5e6ad2",secondary:"#828fff",success:"#27a644",warning:"#5e69d1",error:"#828fff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#5e6ad2","primary-hover":"#828fff","primary-focus":"#5e69d1","on-primary":"#ffffff",ink:"#f7f8f8","ink-muted":"#d0d6e0","ink-subtle":"#8a8f98","ink-tertiary":"#62666d",canvas:"#010102","surface-1":"#0f1011","surface-2":"#141516","surface-3":"#18191a","surface-4":"#191a1b",hairline:"#23252a","hairline-strong":"#34343a","hairline-tertiary":"#3e3e44","semantic-success":"#27a644",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",mono:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace"},colors:[{name:"primary",value:"#5e6ad2",role:"primary"},{name:"primary-hover",value:"#828fff",role:"primary hover"},{name:"primary-focus",value:"#5e69d1",role:"primary focus"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#f7f8f8",role:"ink"},{name:"ink-muted",value:"#d0d6e0",role:"ink muted"},{name:"ink-subtle",value:"#8a8f98",role:"ink subtle"},{name:"ink-tertiary",value:"#62666d",role:"ink tertiary"},{name:"canvas",value:"#08090A",role:"canvas"},{name:"surface-1",value:"#0f1011",role:"surface 1"},{name:"surface-2",value:"#141516",role:"surface 2"},{name:"surface-3",value:"#18191a",role:"surface 3"},{name:"surface-4",value:"#191a1b",role:"surface 4"},{name:"hairline",value:"#23252a",role:"hairline"},{name:"hairline-strong",value:"#34343a",role:"hairline strong"},{name:"hairline-tertiary",value:"#3e3e44",role:"hairline tertiary"},{name:"semantic-success",value:"#27a644",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",monoFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontSizes:["16px","14px","80px","18px","13px","56px","15px","12px","11px","28px","40px","22px","10px","36px"],fontWeights:["400","500","600","700"],lineHeights:["1.50","1.05","1.20","1.10","1.5","1.6","1.25","1","1.2","1.35","1.4"]},spacing:["2px","5px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","48px","56px","64px","80px","96px","120px"],radii:["8px","12px","9999px","16px","4px","2px","6px","3px"],shadows:["rgba(255,255,255,0.05) 0 0.5px 0 0.5px","0 0 0 2px rgba(94,105,209,0.25)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-on-primary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"theme-on-primary",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",letterSpacing:"-0.025em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(255,255,255,0.05) 0 0.5px 0 0.5px"},header:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.025em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.025em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.025em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.025em",accentTreatment:"gradient",signatureMotif:"↗",density:"tight",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"speed-clarity"}},nike:{metadata:{id:"nike",label:"Nike",sourcePath:"design.md/html/nike.html",sourceTitle:"Design System Inspiration of Nike",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},theme:{primary:"color-black",secondary:"#FA5400",success:"#76E0B5",warning:"#1151ff",error:"#d30005",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{ink:"#111111","on-primary":"#ffffff",canvas:"#ffffff","soft-cloud":"#f5f5f5",charcoal:"#39393b",ash:"#4b4b4d",mute:"#707072",stone:"#9e9ea0",hairline:"#cacacb","hairline-soft":"#e5e5e5",sale:"#d30005","sale-deep":"#780700",success:"#007d48","success-bright":"#1eaa52",info:"#1151ff","info-deep":"#0034e3","accent-pink":"#ed1aa0","accent-pink-soft":"#ffb0dd","accent-purple-soft":"#beaffd","accent-purple-pale":"#d6d1ff","accent-teal":"#0a7281","accent-pink-deep":"#4c012d","font-display":"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif","font-ui":"'Inter', 'Helvetica Now Text Medium', Helvetica, Arial, sans-serif","font-body":"'Inter', 'Helvetica Now Text', Helvetica, Arial, sans-serif"},colors:[{name:"ink",value:"#111111",role:"ink"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"soft-cloud",value:"#f5f5f5",role:"soft cloud"},{name:"charcoal",value:"#39393b",role:"charcoal"},{name:"ash",value:"#4b4b4d",role:"ash"},{name:"mute",value:"#707072",role:"mute"},{name:"stone",value:"#9e9ea0",role:"stone"},{name:"hairline",value:"#cacacb",role:"hairline"},{name:"hairline-soft",value:"#e5e5e5",role:"hairline soft"},{name:"sale",value:"#d30005",role:"sale"},{name:"sale-deep",value:"#780700",role:"sale deep"},{name:"success",value:"#76E0B5",role:"success"},{name:"success-bright",value:"#1eaa52",role:"success bright"},{name:"info",value:"#1151ff",role:"info"},{name:"info-deep",value:"#0034e3",role:"info deep"},{name:"accent-pink",value:"#ed1aa0",role:"accent pink"},{name:"accent-pink-soft",value:"#ffb0dd",role:"accent pink soft"},{name:"accent-purple-soft",value:"#beaffd",role:"accent purple soft"},{name:"accent-purple-pale",value:"#d6d1ff",role:"accent purple pale"},{name:"accent-teal",value:"#0a7281",role:"accent teal"},{name:"accent-pink-deep",value:"#4c012d",role:"accent pink deep"}],typography:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","15px","14px","96px","18px","12px","56px","13px","11px","24px","40px","64px","48px","32px"],fontWeights:["700","500","600"],lineHeights:["1.5","0.92","1","1.4","1.6","0.9","1.2","1.75","1.7","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","12px","14px","16px","18px","20px","24px","28px","30px","32px","36px","40px","44px","48px","56px"],radii:["9999px","24px","14px","6px","3px"],shadows:["0 0 0 12px var(--soft-cloud)","0 20px 30px -10px rgba(0,0,0,0.18)","0 0 0 2px var(--canvas), 0 0 0 4px var(--ink)","inset 0 -1px 0 var(--hairline-soft)"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"},content:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"italic"},text:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 12px var(--soft-cloud)"},header:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"italic"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"theme-secondary",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"theme-secondary",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"italic"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},description:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"italic",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"athletic-bold"}},notion:{metadata:{id:"notion",label:"Notion",sourcePath:"design.md/html/notion.html",sourceTitle:"Design System Inspiration of Notion",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},theme:{primary:"#5645d4",secondary:"#ff64c8",success:"#1aae39",warning:"#dd5b00",error:"#ff64c8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#5645d4","primary-pressed":"#4534b3","primary-deep":"#3a2a99","on-primary":"#ffffff","brand-navy":"#0a1530","brand-navy-deep":"#070f24","link-blue":"#0075de","brand-pink":"#ff64c8","brand-orange":"#dd5b00","brand-purple":"#7b3ff2","brand-purple-800":"#391c57","brand-orange-deep":"#793400","brand-green":"#1aae39","brand-yellow":"#f5d75e","brand-teal":"#2a9d99","tint-peach":"#ffe8d4","tint-rose":"#fde0ec","tint-mint":"#d9f3e1","tint-lavender":"#e6e0f5","tint-sky":"#dcecfa","tint-yellow":"#fef7d6","tint-yellow-bold":"#f9e79f","tint-cream":"#f8f5e8",canvas:"#ffffff",surface:"#f6f5f4","surface-soft":"#fafaf9",hairline:"#e5e3df","hairline-soft":"#ede9e4","hairline-strong":"#c8c4be","hairline-dark":"rgba(255,255,255,0.16)","ink-deep":"#000000",ink:"#1a1a1a",charcoal:"#37352f",slate:"#5d5b54",steel:"#787671",stone:"#a4a097",muted:"#bbb8b1","on-dark":"#ffffff","on-dark-muted":"#a4a097"},colors:[{name:"primary",value:"#5645d4",role:"primary"},{name:"primary-pressed",value:"#4534b3",role:"primary pressed"},{name:"primary-deep",value:"#3a2a99",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"brand-navy",value:"#0a1530",role:"brand navy"},{name:"brand-navy-deep",value:"#070f24",role:"brand navy deep"},{name:"link-blue",value:"#0075de",role:"link blue"},{name:"brand-pink",value:"#ff64c8",role:"brand pink"},{name:"brand-orange",value:"#dd5b00",role:"brand orange"},{name:"brand-purple",value:"#7b3ff2",role:"brand purple"},{name:"brand-purple-800",value:"#391c57",role:"brand purple 800"},{name:"brand-orange-deep",value:"#793400",role:"brand orange deep"},{name:"brand-green",value:"#1aae39",role:"brand green"},{name:"brand-yellow",value:"#f5d75e",role:"brand yellow"},{name:"brand-teal",value:"#2a9d99",role:"brand teal"},{name:"tint-peach",value:"#ffe8d4",role:"tint peach"},{name:"tint-rose",value:"#fde0ec",role:"tint rose"},{name:"tint-mint",value:"#d9f3e1",role:"tint mint"},{name:"tint-lavender",value:"#e6e0f5",role:"tint lavender"},{name:"tint-sky",value:"#dcecfa",role:"tint sky"},{name:"tint-yellow",value:"#fef7d6",role:"tint yellow"},{name:"tint-yellow-bold",value:"#f9e79f",role:"tint yellow bold"},{name:"tint-cream",value:"#f8f5e8",role:"tint cream"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface",value:"#f6f5f4",role:"surface"},{name:"surface-soft",value:"#fafaf9",role:"surface soft"},{name:"hairline",value:"#e5e3df",role:"hairline"},{name:"hairline-soft",value:"#ede9e4",role:"hairline soft"},{name:"hairline-strong",value:"#c8c4be",role:"hairline strong"},{name:"hairline-dark",value:"rgba(255,255,255,0.16)",role:"hairline dark"},{name:"ink-deep",value:"#000000",role:"ink deep"},{name:"ink",value:"#1a1a1a",role:"ink"},{name:"charcoal",value:"#37352f",role:"charcoal"},{name:"slate",value:"#5d5b54",role:"slate"},{name:"steel",value:"#787671",role:"steel"},{name:"stone",value:"#a4a097",role:"stone"},{name:"muted",value:"#bbb8b1",role:"muted"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-muted",value:"#a4a097",role:"on dark muted"}],typography:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","15px","12px","80px","18px","48px","16px","13px","22px","11px","56px","36px","10px","20px","28px"],fontWeights:["500","600","400","700"],lineHeights:["1.55","1","1.05","1.15","1.4","1.3","1.5","1.1","1.2","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","11px","12px","14px","15px","16px","18px","20px","24px","31px","32px","40px","44px","48px","56px"],radii:["6px","8px","16px","50%","12px","9999px","4px","3px"],shadows:["rgba(15, 15, 15, 0.20) 0px 24px 48px -8px","rgba(15,15,15,0.04) 0px 1px 2px 0px","rgba(15,15,15,0.08) 0px 4px 12px 0px","rgba(15,15,15,0.20) 0px 24px 48px -8px","rgba(15,15,15,0.16) 0px 16px 48px -8px"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",letterSpacing:"0em",textTransform:"none",fontWeight:400,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(15, 15, 15, 0.20) 0px 24px 48px -8px"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:10},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:10},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"0em",accentTreatment:"flat",signatureMotif:"◇",density:"comfortable",surfaceTone:"paper",cardRadius:10,pillRadius:9999,badgeRadius:4,voice:"thoughtful-quiet"}},revolut:{metadata:{id:"revolut",label:"Revolut",sourcePath:"design.md/html/revolut.html",sourceTitle:"Design System Inspiration of Revolut",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},theme:{primary:"#1361F0",secondary:"#101D31",success:"#16a34a",warning:"#d97706",error:"#e61e49",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#494fdf","primary-bright":"#4f55f1","primary-deep":"#3a40c4","on-primary":"#ffffff",ink:"#191c1f",body:"#1f2226",charcoal:"#3a3d40",mute:"#505a63",ash:"#5c5e60",stone:"#8d969e",faint:"#c9c9cd","on-dark":"#ffffff","on-dark-mute":"rgba(255,255,255,0.72)","canvas-light":"#ffffff","canvas-dark":"#000000","surface-soft":"#f4f4f4","surface-card":"#ffffff","surface-deep":"#0a0a0a","surface-elevated":"#16181a","hairline-light":"#e2e2e7","hairline-dark":"rgba(255,255,255,0.12)","hairline-strong":"#191c1f","divider-soft":"rgba(255,255,255,0.06)",teal:"#00a87e","light-blue":"#007bc2","blue-link":"#376cd5","light-green":"#428619","green-text":"#006400",yellow:"#b09000",warning:"#ec7e00",pink:"#e61e49",danger:"#e23b4a","deep-red":"#8b0000",brown:"#936d62","font-display":"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif","font-ui":"'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#1361F0",role:"primary"},{name:"primary-bright",value:"#4f55f1",role:"primary bright"},{name:"primary-deep",value:"#3a40c4",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#191c1f",role:"ink"},{name:"body",value:"#1f2226",role:"body"},{name:"charcoal",value:"#3a3d40",role:"charcoal"},{name:"mute",value:"#505a63",role:"mute"},{name:"ash",value:"#5c5e60",role:"ash"},{name:"stone",value:"#8d969e",role:"stone"},{name:"faint",value:"#c9c9cd",role:"faint"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-mute",value:"rgba(255,255,255,0.72)",role:"on dark mute"},{name:"canvas-light",value:"#ffffff",role:"canvas light"},{name:"canvas-dark",value:"#000000",role:"canvas dark"},{name:"surface-soft",value:"#f4f4f4",role:"surface soft"},{name:"surface-card",value:"#ffffff",role:"surface card"},{name:"surface-deep",value:"#0a0a0a",role:"surface deep"},{name:"surface-elevated",value:"#16181a",role:"surface elevated"},{name:"hairline-light",value:"#e2e2e7",role:"hairline light"},{name:"hairline-dark",value:"rgba(255,255,255,0.12)",role:"hairline dark"},{name:"hairline-strong",value:"#191c1f",role:"hairline strong"},{name:"divider-soft",value:"rgba(255,255,255,0.06)",role:"divider soft"},{name:"teal",value:"#00a87e",role:"teal"},{name:"light-blue",value:"#007bc2",role:"light blue"},{name:"blue-link",value:"#376cd5",role:"blue link"},{name:"light-green",value:"#428619",role:"light green"},{name:"green-text",value:"#006400",role:"green text"},{name:"yellow",value:"#b09000",role:"yellow"},{name:"warning",value:"#d97706",role:"warning"},{name:"pink",value:"#e61e49",role:"pink"},{name:"danger",value:"#e23b4a",role:"danger"},{name:"deep-red",value:"#8b0000",role:"deep red"},{name:"brown",value:"#936d62",role:"brown"}],typography:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","18px","12px","96px","56px","24px","13px","32px","11px","64px","44px"],fontWeights:["600","500","700"],lineHeights:["1.5","1.0","1.56","1.4","1.33","1.19","1.6","1.2","1.35"]},spacing:["4px","6px","8px","10px","12px","13px","14px","16px","20px","24px","27px","28px","32px","36px","40px","48px","56px","64px","80px","88px"],radii:["9999px","20px","28px","36px","24px","12px","3px"],shadows:[]},components:{button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:20,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:20},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:20},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"24px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"pill",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"gradient",signatureMotif:"★",density:"comfortable",surfaceTone:"glass",cardRadius:20,pillRadius:9999,badgeRadius:9999,voice:"bold-fintech"}},shopify:{metadata:{id:"shopify",label:"Shopify",sourcePath:"design.md/html/shopify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},theme:{primary:"#008060",secondary:"#202223",success:"#008060",warning:"#FFC453",error:"#D72C0D",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},tokens:{rawCssVars:{white:"#FFFFFF",black:"#000000","neon-green":"#36F4A4",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"neon-green",value:"#36F4A4",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"color-aloe",color:"color-white",borderColor:"color-aloe",borderRadius:6,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-muted",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-muted"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-muted",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-muted",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-muted"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-muted"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"commerce-friendly"}},spacex:{metadata:{id:"spacex",label:"SpaceX",sourcePath:"design.md/html/spaceX.html",sourceTitle:"Design System Preview: SpaceX (Light)",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Share+Tech&display=swap"]},theme:{primary:"color-black",secondary:"#a3a3a3",success:"#4ade80",warning:"#fbbf24",error:"#ef4444",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{black:"#000000",spectral:"#f0f0fa","ghost-bg":"rgba(240,240,250,0.1)","ghost-border":"rgba(240,240,250,0.35)",overlay:"rgba(0,0,0,0.5)",font:"'Share Tech', Arial, Verdana, sans-serif"},colors:[{name:"black",value:"#000000",role:"black"},{name:"spectral",value:"#f0f0fa",role:"spectral"},{name:"ghost-bg",value:"rgba(240,240,250,0.1)",role:"ghost bg"},{name:"ghost-border",value:"rgba(240,240,250,0.35)",role:"ghost border"},{name:"overlay",value:"rgba(0,0,0,0.5)",role:"overlay"}],typography:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","13px","12px","48px","10px","32px","11px","9px","14px"],fontWeights:["700","400","600"],lineHeights:["1.50","1.00","1.70","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","18px","20px","24px","28px","32px","48px","60px","64px","72px","80px","120px"],radii:["32px","4px","2px","3px"],shadows:[]},components:{button:{config:{variants:{ghost:{backgroundColor:"color-gray-50",borderColor:"color-gray-200"}}},variant:"ghost",size:"md",shape:"square",color:"theme-primary",textColor:"theme-primary",views:{container:{borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",color:"color-white",borderColor:"color-gray-50",borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.06em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-200"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-200",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"32px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},content:{color:"color-gray-200"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:2},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-200",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.06em",fontStyle:"normal"},caption:{color:"color-gray-200",fontStyle:"italic",letterSpacing:"0.06em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:2},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-200"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},eyebrow:{color:"color-gray-200"},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},description:{color:"color-gray-200"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.06em",accentTreatment:"glow",signatureMotif:"⚡",density:"tight",surfaceTone:"mono",cardRadius:2,pillRadius:0,badgeRadius:0,voice:"technical-mission"}},spotify:{metadata:{id:"spotify",label:"Spotify",sourcePath:"design.md/html/spotify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},theme:{primary:"#1DB954",secondary:"#C1FBD4",success:"#1DB954",warning:"#D4F9E0",error:"#D4D4D8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#000000"},tokens:{rawCssVars:{white:"#FFFFFF",black:"#000000","spotify-green":"#1DB954",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"spotify-green",value:"#1DB954",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},components:{button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"pill",typeWeight:"black",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"matte",cardRadius:8,pillRadius:9999,badgeRadius:9999,voice:"rhythmic-vibrant"}},stripe:{metadata:{id:"stripe",label:"Stripe",sourcePath:"design.md/html/stripe.html",sourceTitle:"Design System Preview: Stripe (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Code+Pro:wght@400;500;700&display=swap"]},theme:{primary:"#635BFF",secondary:"#f96bee",success:"#15be53",warning:"#9b6829",error:"#ea2261",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{purple:"#533afd","purple-hover":"#4434d4","purple-deep":"#2e2b8c","purple-light":"#b9b9f9","purple-mid":"#665efd",navy:"#061b31","dark-navy":"#0d253d","brand-dark":"#1c1e54",white:"#ffffff",ruby:"#ea2261",magenta:"#f96bee","magenta-light":"#ffd7ef",success:"#15be53","success-text":"#108c3d",lemon:"#9b6829",slate:"#64748d","dark-slate":"#273951",border:"#e5edf5","border-purple":"#b9b9f9","border-soft":"#d6d9fc","shadow-blue":"rgba(50,50,93,0.25)","shadow-dark-blue":"rgba(3,3,39,0.25)","shadow-black":"rgba(0,0,0,0.1)","shadow-ambient":"rgba(23,23,23,0.08)","shadow-soft":"rgba(23,23,23,0.06)","shadow-card":"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","shadow-ambient-card":"rgba(23,23,23,0.08) 0px 15px 35px 0px","shadow-subtle":"rgba(23,23,23,0.06) 0px 3px 6px 0px","font-primary":"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif","font-mono":"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace"},colors:[{name:"purple",value:"#533afd",role:"purple"},{name:"purple-hover",value:"#4434d4",role:"purple hover"},{name:"purple-deep",value:"#2e2b8c",role:"purple deep"},{name:"purple-light",value:"#b9b9f9",role:"purple light"},{name:"purple-mid",value:"#665efd",role:"purple mid"},{name:"navy",value:"#061b31",role:"navy"},{name:"dark-navy",value:"#0d253d",role:"dark navy"},{name:"brand-dark",value:"#1c1e54",role:"brand dark"},{name:"white",value:"#ffffff",role:"white"},{name:"ruby",value:"#ea2261",role:"ruby"},{name:"magenta",value:"#f96bee",role:"magenta"},{name:"magenta-light",value:"#ffd7ef",role:"magenta light"},{name:"success",value:"#15be53",role:"success"},{name:"success-text",value:"#108c3d",role:"success text"},{name:"lemon",value:"#9b6829",role:"lemon"},{name:"slate",value:"#64748d",role:"slate"},{name:"dark-slate",value:"#273951",role:"dark slate"},{name:"border",value:"#e5edf5",role:"border"},{name:"border-purple",value:"#b9b9f9",role:"border purple"},{name:"border-soft",value:"#d6d9fc",role:"border soft"},{name:"shadow-blue",value:"rgba(50,50,93,0.25)",role:"shadow blue"},{name:"shadow-dark-blue",value:"rgba(3,3,39,0.25)",role:"shadow dark blue"},{name:"shadow-black",value:"rgba(0,0,0,0.1)",role:"shadow black"},{name:"shadow-ambient",value:"rgba(23,23,23,0.08)",role:"shadow ambient"},{name:"shadow-soft",value:"rgba(23,23,23,0.06)",role:"shadow soft"},{name:"shadow-card",value:"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px",role:"shadow card"},{name:"shadow-ambient-card",value:"rgba(23,23,23,0.08) 0px 15px 35px 0px",role:"shadow ambient card"},{name:"shadow-subtle",value:"rgba(23,23,23,0.06) 0px 3px 6px 0px",role:"shadow subtle"}],typography:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",monoFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontSizes:["16px","14px","48px","18px","12px","32px","13px","11px","10px","22px"],fontWeights:["100 900","300","400","500","700","600"],lineHeights:["1.40","1.15","1.10","1.50","1.2","1.35","1.4"]},spacing:["1px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["0 0 6px 6px","4px","6px","2px","3px"],shadows:["rgba(50,50,93,0.25)","rgba(3,3,39,0.25)","rgba(0,0,0,0.1)","rgba(23,23,23,0.08)","rgba(23,23,23,0.06)","rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","rgba(23,23,23,0.08) 0px 15px 35px 0px","rgba(23,23,23,0.06) 0px 3px 6px 0px","var(--shadow-subtle)","var(--shadow-card)","0 0 0 1px theme-primary","0 0 0 1px var(--ruby)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(23,23,23,0.06) 0px 3px 6px 0px"},header:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"6px"},trigger:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"gradient",signatureMotif:"↗",density:"comfortable",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"refined-fintech"}},tesla:{metadata:{id:"tesla",label:"Tesla",sourcePath:"design.md/html/tesla.html",sourceTitle:"Design System Inspired by Tesla",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap"]},theme:{primary:"#3E6AE1",secondary:"#171A20",success:"#3E6AE1",warning:"#5C5E62",error:"#171A20",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},tokens:{rawCssVars:{"electric-blue":"#3E6AE1","pure-white":"#FFFFFF","carbon-dark":"#171A20",graphite:"#393C41",pewter:"#5C5E62","silver-fog":"#8E8E8E","cloud-gray":"#EEEEEE","pale-silver":"#D0D1D2","light-ash":"#F4F4F4","frosted-glass":"rgba(255,255,255,0.75)",overlay:"rgba(128,128,128,0.65)","subtle-shadow":"rgba(0,0,0,0.05)","font-display":"'Inter', -apple-system, Arial, sans-serif","font-text":"'Inter', -apple-system, Arial, sans-serif"},colors:[{name:"electric-blue",value:"#3E6AE1",role:"electric blue"},{name:"pure-white",value:"#FFFFFF",role:"pure white"},{name:"carbon-dark",value:"#171A20",role:"carbon dark"},{name:"graphite",value:"#393C41",role:"graphite"},{name:"pewter",value:"#5C5E62",role:"pewter"},{name:"silver-fog",value:"#8E8E8E",role:"silver fog"},{name:"cloud-gray",value:"#EEEEEE",role:"cloud gray"},{name:"pale-silver",value:"#D0D1D2",role:"pale silver"},{name:"light-ash",value:"#F4F4F4",role:"light ash"},{name:"frosted-glass",value:"rgba(255,255,255,0.75)",role:"frosted glass"},{name:"overlay",value:"rgba(128,128,128,0.65)",role:"overlay"},{name:"subtle-shadow",value:"rgba(0,0,0,0.05)",role:"subtle shadow"}],typography:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","40px","28px","13px","12px","11px","17px","16px"],fontWeights:["400","500","700","600"],lineHeights:["1.43","48px","20px","1.2","1.3","36px","1.35","1.4"]},spacing:["4px","6px","8px","10px","12px","14px","16px","20px","24px","32px","40px","48px","56px","60px","64px","80px","100px"],radii:["4px","4px 4px 0 0","0 0 4px 4px","12px","3px"],shadows:["rgba(0,0,0,0.05)","0 1px 0 var(--pewter)"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:0,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.05)"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"theme-warning"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"theme-warning",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, Arial, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:0},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},content:{color:"theme-warning"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:0},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"theme-warning",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"normal"},caption:{color:"theme-warning",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:0},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"4px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:0},item:{color:"theme-warning"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},eyebrow:{color:"theme-warning"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},description:{color:"theme-warning"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"sharp",typeWeight:"light",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▲",density:"spacious",surfaceTone:"mono",cardRadius:0,pillRadius:0,badgeRadius:0,voice:"futurist-clean"}},uber:{metadata:{id:"uber",label:"Uber",sourcePath:"design.md/html/uber.html",sourceTitle:"Design System Preview: Uber (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700&display=swap"]},theme:{primary:"color-black",secondary:"#efefef",success:"#06C167",warning:"#e2e2e2",error:"#000000",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{"color-black":"#000000","color-white":"#ffffff","color-hover-gray":"#e2e2e2","color-hover-light":"#f3f3f3","color-chip-gray":"#efefef","color-body-gray":"#4b4b4b","color-muted-gray":"#afafaf","shadow-card":"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","shadow-medium":"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","shadow-float":"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","shadow-press":"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","font-display":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","font-body":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","bg-page":"#ffffff","bg-card":"#ffffff","bg-nav":"rgba(255,255,255,0.92)","text-primary":"#000000","text-secondary":"#4b4b4b","text-tertiary":"#afafaf","border-color":"#efefef","section-label-color":"#000000"},colors:[{name:"color-black",value:"#000000",role:"color black"},{name:"color-white",value:"#ffffff",role:"color white"},{name:"color-hover-gray",value:"#e2e2e2",role:"color hover gray"},{name:"color-hover-light",value:"#f3f3f3",role:"color hover light"},{name:"color-chip-gray",value:"#efefef",role:"color chip gray"},{name:"color-body-gray",value:"#4b4b4b",role:"color body gray"},{name:"color-muted-gray",value:"#afafaf",role:"color muted gray"},{name:"shadow-card",value:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px",role:"shadow card"},{name:"shadow-medium",value:"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px",role:"shadow medium"},{name:"shadow-float",value:"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px",role:"shadow float"},{name:"shadow-press",value:"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset",role:"shadow press"},{name:"bg-page",value:"#ffffff",role:"bg page"},{name:"bg-card",value:"#ffffff",role:"bg card"},{name:"bg-nav",value:"rgba(255,255,255,0.92)",role:"bg nav"},{name:"text-primary",value:"#000000",role:"text primary"},{name:"text-secondary",value:"#4b4b4b",role:"text secondary"},{name:"text-tertiary",value:"#afafaf",role:"text tertiary"},{name:"border-color",value:"#efefef",role:"border color"},{name:"section-label-color",value:"#000000",role:"section label color"}],typography:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","18px","14px","64px","20px","12px","36px","13px","24px","28px"],fontWeights:["700","500","400","600"],lineHeights:["1.50","1.10","1.22","1.33","2.0","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","50px","60px","64px","80px","100px","120px","140px"],radii:["8px","999px","12px","16px","4px","3px"],shadows:["rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","var(--shadow-card)","var(--shadow-float)","var(--shadow-medium)","0 0 0 1px color-black","rgba(0,0,0,0.12) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 2px 8px 0px","rgba(0,0,0,0.08) 0px 0px 0px 999px inset"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px"},header:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"theme-warning"},content:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},footer:{borderColor:"theme-warning"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"theme-warning",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"theme-warning",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-warning"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"theme-warning"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-warning"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-warning",backgroundColor:"color-white",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"theme-warning",borderRadius:4},thead:{backgroundColor:"color-white",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"theme-warning",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-warning"},td:{color:"theme-primary",borderColor:"theme-warning",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",borderRadius:4},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-warning",radius:"8px",views:{container:{backgroundColor:"theme-warning",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"theme-warning",views:{container:{borderColor:"theme-warning"},label:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"theme-warning"},surface:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"motion-utility"}},vercel:{metadata:{id:"vercel",label:"Vercel",sourcePath:"design.md/html/vercel.html",sourceTitle:"Design System Preview: Vercel (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap"]},theme:{primary:"color-black",secondary:"#0072f5",success:"#0a72ef",warning:"#de1d8d",error:"#ff5b4f",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{black:"#171717",white:"#ffffff","gray-50":"#fafafa","gray-100":"#ebebeb","gray-400":"#808080","gray-500":"#666666","gray-600":"#4d4d4d","link-blue":"#0072f5","focus-blue":"hsl(212,100%,48%)","ship-red":"#ff5b4f","preview-pink":"#de1d8d","develop-blue":"#0a72ef","console-blue":"#0070f3","console-purple":"#7928ca","console-pink":"#eb367f","badge-bg":"#ebf5ff","badge-text":"#0068d6","shadow-ring":"rgba(0,0,0,0.08) 0px 0px 0px 1px","shadow-ring-light":"rgb(235,235,235) 0px 0px 0px 1px","shadow-subtle":"rgba(0,0,0,0.04) 0px 2px 2px 0px","shadow-card":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","shadow-card-full":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","font-sans":"'Geist', system-ui, -apple-system, Arial, sans-serif","font-mono":"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace"},colors:[{name:"black",value:"#171717",role:"black"},{name:"white",value:"#ffffff",role:"white"},{name:"gray-50",value:"#fafafa",role:"gray 50"},{name:"gray-100",value:"#ebebeb",role:"gray 100"},{name:"gray-400",value:"#808080",role:"gray 400"},{name:"gray-500",value:"#666666",role:"gray 500"},{name:"gray-600",value:"#4d4d4d",role:"gray 600"},{name:"link-blue",value:"#0072f5",role:"link blue"},{name:"focus-blue",value:"hsl(212,100%,48%)",role:"focus blue"},{name:"ship-red",value:"#ff5b4f",role:"ship red"},{name:"preview-pink",value:"#de1d8d",role:"preview pink"},{name:"develop-blue",value:"#0a72ef",role:"develop blue"},{name:"console-blue",value:"#0070f3",role:"console blue"},{name:"console-purple",value:"#7928ca",role:"console purple"},{name:"console-pink",value:"#eb367f",role:"console pink"},{name:"badge-bg",value:"#ebf5ff",role:"badge bg"},{name:"badge-text",value:"#0068d6",role:"badge text"},{name:"shadow-ring",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px",role:"shadow ring"},{name:"shadow-ring-light",value:"rgb(235,235,235) 0px 0px 0px 1px",role:"shadow ring light"},{name:"shadow-subtle",value:"rgba(0,0,0,0.04) 0px 2px 2px 0px",role:"shadow subtle"},{name:"shadow-card",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card"},{name:"shadow-card-full",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card full"}],typography:{fontFamily:"var(--font-sans)",monoFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontSizes:["16px","14px","48px","20px","12px","32px","13px","11px","10px","36px"],fontWeights:["400","600","500","700"],lineHeights:["1.50","1.00","1.80","1.25","1.2","1.35","1.4"]},spacing:["2px","4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["6px","8px","9999px","3px"],shadows:["rgba(0,0,0,0.08) 0px 0px 0px 1px","rgb(235,235,235) 0px 0px 0px 1px","rgba(0,0,0,0.04) 0px 2px 2px 0px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","var(--shadow-ring)","var(--shadow-ring-light)","var(--shadow-card)","var(--shadow-card-full)","0 0 0 2px var(--focus-blue)","0 0 0 2px var(--ship-red)"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:4,fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"var(--font-sans)",letterSpacing:"-0.04em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"var(--font-sans)",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},header:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"var(--font-sans)"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.04em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"var(--font-sans)"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"6px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"6px"},trigger:{color:"theme-primary",fontFamily:"var(--font-sans)"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.04em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.04em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"var(--font-sans)"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"var(--font-sans)"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"var(--font-sans)"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.04em",accentTreatment:"flat",signatureMotif:"▲",density:"comfortable",surfaceTone:"mono",cardRadius:4,pillRadius:4,badgeRadius:4,voice:"deploy-geometric"}}},xs=Object.values(Ft),ea=bs,Ao=e=>!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.toString.call(e)==="[object Object]",zt=e=>e,Ke=(...e)=>{const o={};return e.forEach(t=>{Ao(t)&&Object.entries(t).forEach(([n,a])=>{if(a!=null){if(Ao(a)&&Ao(o[n])){o[n]=Ke(o[n],a);return}o[n]=a}})}),o},oa=e=>{if(Array.isArray(e)||!Ao(e))return e;const o={};for(const[t,n]of Object.entries(e))n!==null&&(o[t]=Ao(n)?oa(n):n);return o},ks=new Set(["button"]),Cs=["backgroundColor","background","borderColor","color"],ra=new Set,ws=(e,o)=>{if(process.env.NODE_ENV!=="production"&&!(!o||!ks.has(e))&&!ra.has(e))for(const[t,n]of Object.entries(o)){if(!Ao(n))continue;const a=Cs.filter(l=>n[l]!=null);if(a.length>0){ra.add(e),console.warn(`[design-system] components.${e}.views.${t} sets ${a.join(", ")} — view styles apply above every variant, so this flattens ghost/outline/subtle into solid blocks. Move colors to components.${e}.config.variants.<variant> (merged under each variant); keep views to shape and typography.`);return}}},Mt=(e,o)=>{if(!o)return{};const t=o.components[e]||{},n=zt(oa(t));return ws(e,n.views),n},ta=(e,o,t)=>{const{config:n,...a}=o,l=Mt(e,t),i=Ke(l,n||{});return zt(Ke(i,a))},na=h.createContext({isEnabled:!1}),jt=({children:e,config:o,configId:t,mode:n})=>{const a=o||(t?Ft[t]:null)||ea,{themeMode:l}=c.useTheme(),i=n??l??a.metadata.defaultAppearance,g=h.useMemo(()=>({config:a,configId:a.metadata.id,isEnabled:!0}),[a]);return r.jsx(na.Provider,{value:g,children:r.jsx(c.ThemeProvider,{theme:a.theme,mode:i,transparentWrapper:!0,children:r.jsx("div",{"data-design-system":a.metadata.id,"data-appearance":i,style:{display:"contents"},children:e})})})},Ar=()=>h.useContext(na),Ho=e=>{const{config:o}=Ar();return Mt(e,o)},Te=(e,o)=>{const{config:t}=Ar();return ta(e,o,t)},aa=h.createContext({expandedItems:[],toggleItem:()=>{},isItemExpanded:()=>!1,type:"single",collapsible:!1,baseId:""}),Ss=({children:e,value:o})=>r.jsx(aa.Provider,{value:o,children:e}),la=()=>{const e=h.useContext(aa);if(!e)throw new Error("useAccordionContext must be used within an AccordionProvider");return e},vs=({value:e,children:o,isDisabled:t=!1,views:n,...a})=>{var m;const{isItemExpanded:l,baseId:i}=la(),g=Ho("accordion"),s=Ke({item:(m=g.views)==null?void 0:m.container},n),d=l(e),f=`${i}-trigger-${e}`,u=`${i}-content-${e}`;return r.jsx(c.View,{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",overflow:"hidden",opacity:t?.5:1,pointerEvents:t?"none":"auto","data-state":d?"open":"closed","data-disabled":t?"":void 0,...s==null?void 0:s.item,...a,children:h.Children.map(o,p=>h.isValidElement(p)?h.cloneElement(p,{...p.props,value:e,isExpanded:d,isDisabled:t,triggerId:f,contentId:u}):p)})},Ts=({children:e,value:o,isExpanded:t,isDisabled:n,triggerId:a,contentId:l,views:i,asChild:g=!1,...s})=>{var y;const{toggleItem:d}=la(),f=Ho("accordion"),u=Ke({container:(y=f.views)==null?void 0:y.trigger},i),p={id:a,"aria-expanded":t,"aria-controls":l,"aria-disabled":n,"data-state":t?"open":"closed","data-disabled":n?"":void 0,onClick:()=>{o&&!n&&d(o)},padding:16,cursor:n?"not-allowed":"pointer",alignItems:"center",justifyContent:"space-between",width:"100%",style:{backgroundColor:"transparent"},...u==null?void 0:u.container,...s};if(g&&h.isValidElement(e)){const x=h.Children.only(e);return h.cloneElement(x,{...p,...x.props})}return r.jsxs(c.Horizontal,{...p,children:[e,r.jsx(c.View,{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:t?"rotate(180deg)":"rotate(0deg)",...u==null?void 0:u.icon,children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M16.59 8.59L12 13.17L7.41 8.59L6 10L12 16L18 10L16.59 8.59Z",fill:"currentColor"})})})]})},Is=({children:e,isExpanded:o,isDisabled:t,triggerId:n,contentId:a,views:l,...i})=>{var k;const g=Ho("accordion"),s=Ke({container:(k=g.views)==null?void 0:k.content},l),d=260,f=h.useRef(null),u=h.useRef(null),[m,p]=h.useState(!!o),[y,x]=h.useState(o?"none":"0px"),[b,C]=h.useState(o?1:0);return h.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]),h.useEffect(()=>{var T;if(u.current&&(clearTimeout(u.current),u.current=null),o){p(!0),requestAnimationFrame(()=>{var F;const w=((F=f.current)==null?void 0:F.scrollHeight)??0;x(`${w}px`),C(1)});return}const S=((T=f.current)==null?void 0:T.scrollHeight)??0;x(`${S}px`),C(1),requestAnimationFrame(()=>{x("0px"),C(0)}),u.current=setTimeout(()=>{p(!1)},d)},[o,e]),h.useEffect(()=>{var T;if(!o||!m)return;const S=((T=f.current)==null?void 0:T.scrollHeight)??0;x(`${S}px`)},[e,o,m]),m?r.jsx(c.View,{id:a,role:"region","aria-labelledby":n,overflow:"hidden",maxHeight:y,opacity:b,transition:`max-height ${d}ms cubic-bezier(0.22, 1, 0.36, 1), opacity ${d}ms ease`,"data-state":o?"open":"closed","data-disabled":t?"":void 0,style:{backgroundColor:"transparent"},...s==null?void 0:s.container,...i,children:r.jsx(c.View,{ref:f,padding:16,children:e})}):null},Fs=({children:e,shape:o="rounded",variant:t="default",views:n,baseId:a,type:l,collapsible:i,themeMode:g,...s})=>r.jsx(c.Vertical,{width:"100%","data-orientation":"vertical",...ps[o],...ys[t],...n==null?void 0:n.container,...s,children:e}),Ne=e=>{const o=Te("accordion",e),{children:t,type:n="single",value:a,defaultValue:l,onValueChange:i,collapsible:g=!1,shape:s="rounded",variant:d="default",views:f,...u}=o,m=Array.isArray(l)?l:l?[l]:void 0,p=ms({type:n,value:a,defaultValue:l??m,onValueChange:i,collapsible:g});return r.jsx(Ss,{value:{expandedItems:p.expandedItems,toggleItem:p.toggleItem,isItemExpanded:p.isItemExpanded,type:p.type,collapsible:p.collapsible,baseId:p.baseId},children:r.jsx(Fs,{shape:s,variant:d,views:f,baseId:p.baseId,type:p.type,collapsible:p.collapsible,...u,children:t})})};Ne.Item=vs,Ne.Trigger=Ts,Ne.Content=Is;const zs=({isOpen:e,defaultOpen:o=!1,value:t,defaultValue:n,isMulti:a=!1,onOpenChange:l,onClose:i})=>{const g=typeof e=="boolean",s=t!==void 0,d=n??(a?[]:""),[f,u]=h.useState(o),[m,p]=h.useState(d),y=g?!!e:f,x=s?t:m,b=h.useCallback(S=>{g||u(S),l==null||l(S),S||i==null||i()},[g,i,l]),C=h.useCallback(()=>{b(!1)},[b]),k=h.useCallback(S=>{s||p(S)},[s]);return{isSheetOpen:y,selectedValue:x,setSelectedValue:k,closeSheet:C}},nr=({children:e,containerId:o="portal-root"})=>{const[t,n]=h.useState(null);return h.useEffect(()=>{let a=document.getElementById(o),l=!1;return a||(l=!0,a=document.createElement("div"),a.setAttribute("id",o),document.body.appendChild(a)),n(a),()=>{l&&a&&a.parentNode&&a.childNodes.length===0&&a.parentNode.removeChild(a)}},[o]),t?fs.createPortal(e,t):null},Wt=new Map,Ms=(e,o,t)=>(Wt.has(e)||Wt.set(e,h.lazy(()=>import("lucide-react/dynamicIconImports").then(n=>{const a=n.default[e];return a?a():{default:()=>r.jsx(r.Fragment,{children:o||t})}}))),Wt.get(e)),ia=h.memo(({widthHeight:e,color:o="currentColor",transform:t,orientation:n="up",children:a,...l})=>r.jsx(c.View,{widthHeight:e,color:o,display:"flex",alignItems:"center",justifyContent:"center",transform:t||(n==="left"?"rotate(-90deg)":n==="right"?"rotate(90deg)":n==="up"?"rotate(0deg)":n==="down"?"rotate(180deg)":"none"),...l,children:a})),ar=h.memo(({name:e="circle",widthHeight:o=24,color:t="currentColor",filled:n=!1,strokeWidth:a=1,size:l,children:i,fallback:g,...s})=>{const{getColor:d}=c.useTheme(),f=l||o,u=h.useMemo(()=>{const y=d(t);return{fill:n?y:"none",stroke:y,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round"}},[n,t,a,d]);if(!e)return r.jsx(ia,{widthHeight:o,color:t,...s,children:i});const m=e.toLowerCase().replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),p=Ms(m,g,i);return r.jsx(ia,{widthHeight:f,color:t,...s,children:r.jsx(h.Suspense,{fallback:g||null,children:r.jsx(p,{size:f,...u})})})}),ee=(e,o={})=>{const t=n=>r.jsx(ar,{name:e,...o,...n});return t.displayName=`${e}Icon`,t},js=ee("user",{filled:!1}),Ws=ee("circle-help",{filled:!1}),Es=ee("folder",{filled:!1}),we=ee("chevron-up",{filled:!1}),ca=ee("grip-vertical",{filled:!1}),po=ee("file",{filled:!1}),As=ee("video",{filled:!1}),Hs=ee("image",{filled:!1}),Vo=ee("volume",{filled:!1}),Vs=ee("twitter",{filled:!1}),Ps=ee("x",{filled:!1}),Ds=ee("twitch",{filled:!1}),Le=ee("x",{filled:!1,strokeWidth:2}),$s=ee("instagram",{filled:!1}),Ls=ee("youtube",{filled:!1}),Bs=ee("facebook",{filled:!1}),_s=ee("linkedin",{filled:!1}),Os=ee("at-sign",{filled:!1}),sa=ee("minus",{filled:!1}),lo=ee("info",{filled:!1}),da=ee("play",{filled:!1}),Ns=ee("pause",{filled:!1}),qs=ee("heart",{filled:!1}),Us=ee("star",{filled:!1}),Gs=ee("save",{filled:!1}),Et=ee("triangle-alert",{filled:!1}),Ys=ee("battery",{filled:!1}),Ks=ee("bookmark",{filled:!1}),Xs=ee("cloud",{filled:!1}),Js=ee("copy",{filled:!1}),Hr=ee("trash",{filled:!1}),Qs=Hr,Zs=ee("edit",{filled:!1}),At=ee("mic",{filled:!1}),Vr=ee("square",{filled:!1}),Ht=ee("send",{filled:!1}),Vt=ee("loader",{filled:!1}),lr=ee("paperclip",{filled:!1}),Pr=ee("search",{filled:!1}),Rs=ee("home",{filled:!1}),ga=ee("settings",{filled:!1}),ed=ee("download",{filled:!1}),ua=ee("share",{filled:!1}),ir=ee("check",{filled:!1}),od=ee("plus",{filled:!1}),Pt=ee("eye-off",{filled:!1}),Dt=ee("eye",{filled:!1}),rd=ee("lock",{filled:!1}),td=ee("user",{filled:!1}),ha=ee("external-link",{filled:!1}),$t=ee("check-circle",{filled:!1}),Dr=ee("alert-circle",{filled:!1}),nd=ee("bell",{filled:!1}),ad=ee("file-text",{filled:!1}),ld=ee("bar-chart",{filled:!1}),id=ee("moon",{filled:!1}),fa=ee("panel-left",{filled:!1}),Lt=ee("upload",{filled:!1}),cd=ir,sd=e=>r.jsx(we,{orientation:"left",...e}),dd=ee("zoom-out",{filled:!1}),gd=ee("type",{filled:!1}),ud=ee("shapes",{filled:!1}),hd=ee("rotate-cw",{filled:!1}),fd=ee("gift",{filled:!1}),md=ee("shield",{filled:!1}),pd=ee("log-out",{filled:!1}),yd=ee("power",{filled:!1}),bd=ee("link",{filled:!1}),xd=ee("layout",{filled:!1}),kd=ee("zap",{filled:!1}),Cd=ee("credit-card",{filled:!1}),wd=ee("more-horizontal",{filled:!1}),Sd=Hr,vd=ee("filter",{filled:!1}),Td=ee("calendar",{filled:!1}),Id=ee("clock",{filled:!1}),Fd=ee("map-pin",{filled:!1}),zd=ee("menu",{filled:!1}),Md=ee("refresh-cw",{filled:!1}),jd=ee("printer",{filled:!1}),Wd=ee("wand",{filled:!1}),Ed=ee("thumbs-down",{filled:!1}),Ad=ee("thumbs-up",{filled:!1}),Hd=ee("camera",{filled:!1}),Vd=ee("bluetooth",{filled:!1}),Pd=ee("unlock",{filled:!1}),Dd=ee("wifi",{filled:!1}),$d=ee("arrow-right",{filled:!1}),Ld=ee("arrow-up",{filled:!1}),Bd=ee("loader",{filled:!1}),_d=ee("sliders-horizontal",{filled:!1}),Od=ee("crop",{filled:!1}),Nd=ee("zoom-in",{filled:!1}),qd=ee("grip-horizontal",{filled:!1}),ma=ee("mouse-pointer-2",{filled:!1}),Ud={sm:{minHeight:44,paddingVertical:10,paddingHorizontal:16},md:{minHeight:52,paddingVertical:12,paddingHorizontal:18},lg:{minHeight:60,paddingVertical:14,paddingHorizontal:20}},Po={sm:{label:14,description:12},md:{label:16,description:13},lg:{label:18,description:14}},pa=(e,o)=>e.id??e.value??`action-sheet-item-${o}`,ya=e=>e.value??e.id,ba=e=>e.disabled||e.isDisabled||e.divider,Gd=(e,o)=>{if(typeof e.selected=="boolean")return e.selected;const t=ya(e);return t?Array.isArray(o)?o.includes(t):o===t:!1},Yd=({isSheetOpen:e,closeSheet:o,selectedValue:t,setSelectedValue:n,isClosePrevented:a=!1,dismissOnBackdropPress:l=!0,title:i,description:g,header:s,children:d,items:f=[],isMulti:u=!1,closeOnSelect:m,onSelect:p,onChange:y,showCancel:x=!1,cancelLabel:b="Cancel",onCancel:C,showHandle:k=!0,size:S="md",maxHeight:T="88vh",views:w,animationType:F,...v})=>{if(!e)return null;const z=()=>{a||o()},j=()=>{l&&z()},H=()=>{C==null||C(),z()},E=M=>{var V;if(ba(M))return;const I=ya(M);let W=t;if(I){if(u){const P=Array.isArray(t)?t:t?[t]:[];W=P.includes(I)?P.filter(_=>_!==I):[...P,I]}else W=I;n(W),p==null||p(I,M),y==null||y(W,M)}(V=M.onPress)==null||V.call(M,M),(M.closeOnSelect??m??!u)&&z()};return r.jsx(nr,{children:r.jsx(c.View,{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9999,backgroundColor:"color-dark-50-360",display:"flex",justifyContent:"flex-end",onClick:j,...w==null?void 0:w.overlay,children:r.jsxs(c.Vertical,{width:"100%",maxWidth:520,maxHeight:T,marginHorizontal:"auto",backgroundColor:"color-white",borderTopLeftRadius:24,borderTopRightRadius:24,paddingTop:8,paddingBottom:12,overflow:"hidden",boxShadow:"0 -18px 48px rgba(15, 23, 42, 0.18)",onClick:M=>M.stopPropagation(),...w==null?void 0:w.container,...w==null?void 0:w.sheet,...v,children:[k&&r.jsx(c.View,{width:36,height:4,borderRadius:999,backgroundColor:"color-gray-300",alignSelf:"center",marginTop:4,marginBottom:8,...w==null?void 0:w.handle}),(i||g)&&r.jsxs(c.Vertical,{paddingHorizontal:20,paddingTop:6,paddingBottom:12,gap:4,...w==null?void 0:w.header,children:[i&&r.jsx(c.Text,{fontSize:18,lineHeight:24,fontWeight:"600",color:"color-gray-900",...w==null?void 0:w.title,children:i}),g&&r.jsx(c.Text,{fontSize:13,lineHeight:18,color:"color-gray-500",...w==null?void 0:w.description,children:g})]}),s,r.jsxs(c.Vertical,{overflowY:"auto",paddingBottom:4,...w==null?void 0:w.content,children:[f.map((M,I)=>{if(M.divider)return r.jsx(c.View,{height:1,backgroundColor:"color-gray-200",marginVertical:6,...w==null?void 0:w.divider},pa(M,I));const W=Gd(M,t),D=ba(M),V=D?"color-gray-400":M.destructive?"color-red-600":W?"theme-primary":"color-gray-900";return r.jsxs(c.Horizontal,{alignItems:"center",gap:12,opacity:D?.5:1,cursor:D?"not-allowed":"pointer",onClick:()=>E(M),...Ud[S],...w==null?void 0:w.item,children:[M.icon&&r.jsx(c.View,{flexShrink:0,...w==null?void 0:w.itemIcon,children:M.icon}),r.jsxs(c.Vertical,{flex:1,gap:2,children:[typeof M.label=="string"?r.jsx(c.Text,{fontSize:Po[S].label,lineHeight:Po[S].label+6,fontWeight:W?"600":"400",color:V,...w==null?void 0:w.itemLabel,children:M.label}):M.label,M.description&&r.jsx(c.Text,{fontSize:Po[S].description,lineHeight:Po[S].description+5,color:"color-gray-500",...w==null?void 0:w.itemDescription,children:M.description})]}),W&&r.jsx(ir,{widthHeight:18,color:"theme-primary",...w==null?void 0:w.itemIndicator})]},pa(M,I))}),d]}),x&&r.jsx(c.View,{marginTop:8,paddingHorizontal:12,paddingTop:8,borderTopWidth:1,borderTopColor:"color-gray-200",children:r.jsx(c.Horizontal,{minHeight:52,alignItems:"center",justifyContent:"center",borderRadius:14,backgroundColor:"color-gray-100",cursor:"pointer",onClick:H,...w==null?void 0:w.cancelButton,children:r.jsx(c.Text,{fontSize:Po[S].label,lineHeight:Po[S].label+6,fontWeight:"600",color:"color-gray-900",...w==null?void 0:w.cancelLabel,children:b})})})]})})})},Kd=e=>{const o=zs(e);return r.jsx(Yd,{...e,...o})},Xd=e=>{const o=e==="dark";return{default:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",boxShadow:o?"0 1px 3px rgba(0, 0, 0, 0.3)":"0 1px 2px rgba(0, 0, 0, 0.05)"},content:{color:"color-gray-700"},icon:{color:"color-gray-500"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:o?"0 1px 3px rgba(29, 78, 216, 0.25)":"0 1px 2px rgba(59, 130, 246, 0.05)"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",borderColor:"color-green-200",boxShadow:o?"0 1px 3px rgba(34, 197, 94, 0.2)":"0 1px 2px rgba(34, 197, 94, 0.05)"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},error:{container:{backgroundColor:"color-red-50",borderColor:"color-red-200",boxShadow:o?"0 1px 3px rgba(239, 68, 68, 0.2)":"0 1px 2px rgba(239, 68, 68, 0.05)"},content:{color:"color-red-700"},icon:{color:"color-red-500"}},warning:{container:{backgroundColor:"color-orange-50",borderColor:"color-orange-200",boxShadow:o?"0 1px 3px rgba(249, 115, 22, 0.2)":"0 1px 2px rgba(249, 115, 22, 0.05)"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}}}},Jd={default:"alert",info:"status",success:"status",error:"alert",warning:"alert"},Qd=h.memo(({icon:e,title:o="",views:t,description:n="",variant:a="default",themeMode:l,children:i,...g})=>{const{themeMode:s}=c.useTheme(),d=l||s,f=h.useMemo(()=>Xd(d),[d]),u=()=>{var y;if(e)return e;const p={size:20,color:((y=t==null?void 0:t.icon)==null?void 0:y.color)??f[a].icon.color};switch(a){case"info":return r.jsx(lo,{...p});case"success":return r.jsx($t,{...p});case"error":return r.jsx(Dr,{...p});case"warning":default:return r.jsx(Et,{...p})}};return r.jsxs(c.Horizontal,{role:Jd[a],gap:12,padding:"12px 16px",flexWrap:"nowrap",alignItems:"flex-start",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:f[a].container.borderColor,backgroundColor:f[a].container.backgroundColor,boxShadow:f[a].container.boxShadow,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...t==null?void 0:t.container,...g,children:[r.jsx(c.View,{alignSelf:"flex-start",marginTop:"2px",...t==null?void 0:t.icon,children:u()}),r.jsxs(c.Vertical,{gap:4,children:[o?r.jsx(c.Text,{fontSize:"14px",fontWeight:"600",lineHeight:"20px",color:f[a].content.color,...t==null?void 0:t.title,children:o}):null,r.jsx(c.Text,{fontSize:"12px",fontWeight:"400",lineHeight:"16px",color:f[a].content.color,...t==null?void 0:t.description,children:n||i})]})]})}),Bt=e=>{const o=Te("alert",e);return r.jsx(Qd,{...o})},Zd=({ratio:e=16/9,children:o,views:t,...n})=>r.jsx(c.View,{width:"100%",position:"relative",overflow:"hidden",paddingTop:`${1/e*100}%`,borderRadius:8,...n,...t==null?void 0:t.center,children:r.jsx(c.View,{position:"absolute",top:0,right:0,bottom:0,left:0,...t==null?void 0:t.view,children:o})}),xa=({ratio:e,children:o,...t})=>r.jsx(Zd,{ratio:e,...t,children:o});function Rd(e,o,t){return Math.min(Math.max(e,o),t)}const e0=({bars:e,isPaused:o,...t})=>{const a=[6,16,23,24,18,9,14,22,24,20,11,12,20,24,21,13,9,19,24,23,16,7,17,23,23,18,8,15,22,24,20,10];return r.jsx(c.Horizontal,{alignItems:"center",minWidth:120,gap:2,height:24,width:"100%",maxWidth:"100%",...t,children:e.map((l,i)=>r.jsx(c.View,{width:3,borderRadius:2,backgroundColor:o?"color-gray-300":l>=0?"theme-primary":"color-gray-300",style:{height:`${l>=0?Rd(l*300,6,24):a[i%a.length]}px`}},i))})},_t=({analyserNode:e,isPaused:o,...t})=>{const n=h.useRef(null),a=60,l=32,[i,g]=h.useState([]);return h.useEffect(()=>{if(!e){g(Array(a).fill(-1));return}const s=e.frequencyBinCount,d=new Uint8Array(s),f=()=>{e.getByteTimeDomainData(d);let u=0;for(let p=0;p<s;p++){const y=(d[p]-128)/128;u+=y*y}const m=Math.sqrt(u/s);h.startTransition(()=>{g(p=>{const x=[...p,m].slice(-a);return x.length<a?[...Array(a-x.length).fill(-1),...x]:x})})};return n.current=setInterval(f,l),()=>{n.current&&clearInterval(n.current)}},[e]),r.jsx(e0,{bars:i,isPaused:o,...t})},$r=Wo.create(e=>({visible:!1,title:"",subtitle:"",variant:"info",isClosable:!1,views:{},action:()=>{},actionText:"",showIcon:!1,timeout:3e3,show:(o,t="",n="",a,l,i,g,s,d)=>e({visible:!0,variant:o,title:t,subtitle:n,isClosable:a,views:l,action:i,actionText:g,showIcon:s,timeout:d}),hide:()=>e({visible:!1})})),ka=(e,o,t,n)=>{$r.getState().show(e,o,t,n==null?void 0:n.isClosable,n==null?void 0:n.views,n==null?void 0:n.action,n==null?void 0:n.actionText,n==null?void 0:n.showIcon,n==null?void 0:n.timeout)},Ca=()=>{$r.getState().hide()},o0={info:{container:{backgroundColor:"color-white",border:"rgba(191, 219, 254, 0.95)"},icon:{color:"theme-primary",name:"InformationIcon"},content:{color:"color-gray-900"},close:{color:"color-gray-500",name:"CloseIcon"}},success:{container:{backgroundColor:"#F0FDF4",border:"#BBF7D0"},icon:{color:"#16A34A",name:"SuccessIcon"},content:{color:"#14532D"},close:{color:"#15803D",name:"CloseIcon"}},error:{container:{backgroundColor:"#FEF2F2",border:"#FECACA"},icon:{color:"#DC2626",name:"ErrorIcon"},content:{color:"#7F1D1D"},close:{color:"#B91C1C",name:"CloseIcon"}},warning:{container:{backgroundColor:"#FFF7ED",border:"#FED7AA"},icon:{color:"#EA580C",name:"WarningIcon"},content:{color:"#9A3412"},close:{color:"#C2410C",name:"CloseIcon"}}},wa=({variant:e,hide:o,title:t,subtitle:n,theme:a,action:l,actionText:i,showIcon:g=!1,isClosable:s=!1,timeout:d=3e3,views:f})=>{var C,k;h.useEffect(()=>{if(d&&!s){const S=setTimeout(()=>{o()},d);return()=>{clearTimeout(S)}}},[]);const u=a??o0,m=!!(l&&i),p={borderWidth:1,borderStyle:"solid",borderRadius:12,borderColor:`${u[e].container.border}`,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.06)"},y={info:"#3b82f6",success:"#4ade80",warning:"#f97316",error:"#ef4444"}[e],x={info:r.jsx(lo,{widthHeight:24,color:y,...f==null?void 0:f.icon}),success:r.jsx($t,{widthHeight:24,color:y,...f==null?void 0:f.icon}),warning:r.jsx(Et,{widthHeight:24,color:y,...f==null?void 0:f.icon}),error:r.jsx(Dr,{widthHeight:24,color:y,...f==null?void 0:f.icon})}[e],b=g&&x;return r.jsxs(c.Horizontal,{role:"messageContent",gap:12,width:"100%",maxWidth:520,flexWrap:"nowrap",position:"relative",alignItems:"flex-start",padding:"12px 14px",color:`${u[e].content.color}`,backgroundColor:`${u[e].container.backgroundColor}`,onClick:s?()=>{}:()=>{o()},...p,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...f==null?void 0:f.container,children:[b&&x,r.jsxs(c.Vertical,{gap:4,width:"100%",children:[r.jsx(c.Text,{size:"md",weight:"semiBold",...f==null?void 0:f.title,children:t}),n&&r.jsx(c.Text,{size:"sm",lineHeight:"20px",color:u[e].content.color,...f==null?void 0:f.subtitle,children:n})]}),m&&r.jsx(c.View,{as:"button",type:"button",onClick:l,backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:u[e].container.border,borderRadius:"9999px",padding:"6px 12px",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",...f==null?void 0:f.actionText,children:r.jsx(c.Text,{whiteSpace:"nowrap",size:"sm",weight:"semiBold",color:u[e].content.color,children:i})}),s&&r.jsx(c.View,{position:"absolute",zIndex:1e4,right:8,top:8,onClick:()=>{o()},cursor:"pointer",padding:"4px",borderRadius:"9999px",transition:"background-color 0.2s ease",...(C=f==null?void 0:f.closingIcon)==null?void 0:C.container,children:r.jsx(Le,{widthHeight:16,color:u[e].close.color,...(k=f==null?void 0:f.closingIcon)==null?void 0:k.icon})})]})},r0=({container:e,theme:o,position:t="topRight"})=>{const{visible:n,title:a,variant:l,subtitle:i,isClosable:g,views:s,action:d,actionText:f,showIcon:u,timeout:m}=$r(),p={topLeft:{top:6,left:8},topRight:{top:6,right:8},bottomLeft:{bottom:8,left:6},bottomRight:{bottom:8,right:6}}[t],y=()=>r.jsx(wa,{variant:l,subtitle:i,show:n,title:a,theme:o,isClosable:g,views:s,action:d,actionText:f,showIcon:u,timeout:m,hide:()=>Ca()}),x=e?h.cloneElement(e,{},y()):r.jsx(c.View,{position:"absolute",zIndex:1e4,...p,children:y()});return n?x:null},t0=(e,o)=>{if(typeof document>"u")return;const t=document.createElement("video");t.preload="metadata",t.onloadedmetadata=()=>{t.currentTime=1},t.oncanplay=()=>{const n=document.createElement("canvas");n.width=t.videoWidth,n.height=t.videoHeight;const a=n.getContext("2d");if(a){a.drawImage(t,0,0,n.width,n.height);const l=n.toDataURL("image/jpeg");o(l)}URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(e)},n0=({maxSize:e=100*1024*1024,onFileSelect:o,onMultipleFileSelect:t,validateFile:n,thumbnail:a,multiple:l=!1,onError:i=g=>{ka("error","Error",g)}})=>{const g=h.useRef(null),s=h.useRef(null),[d,f]=h.useState(null),[u,m]=h.useState([]),[p,y]=h.useState(null),[x,b]=h.useState(null),[C,k]=h.useState(a||null),S=h.useCallback(w=>{const F=w.target.files;if(y(null),!F||F.length===0){i("No file selected"),y("No file selected");return}if(l){const v=Array.from(F),z=[];for(const j of v){if(j.size>e){i(`File ${j.name} exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File ${j.name} exceeds ${Math.round(e/(1024*1024))}MB.`);continue}if(n){const H=n(j);if(H){i(`${j.name}: ${H}`),y(`${j.name}: ${H}`);continue}}z.push(j)}z.length>0&&(m(z),t&&t(z))}else{const v=F[0];if(v.size>e){i(`File exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File exceeds ${Math.round(e/(1024*1024))}MB.`);return}if(n){const z=n(v);if(z){i(z),y(z);return}}b(URL.createObjectURL(v)),v.type.startsWith("video/")&&t0(v,k),o&&(f(v),o(v))}},[e,o,t,n,l]),T=()=>{const w=g.current;w&&typeof w.click=="function"&&w.click()};return h.useEffect(()=>()=>{typeof URL<"u"&&typeof URL.revokeObjectURL=="function"&&(x&&URL.revokeObjectURL(x),C&&URL.revokeObjectURL(C))},[x,C]),{previewUrl:x,thumbnailUrl:C,errorMessage:p,fileInputRef:g,videoRef:s,selectedFile:d,selectedFiles:u,handleFileChange:S,handleClick:T}},a0=({accept:e,isLoading:o=!1,progress:t=0,icon:n,text:a,previewUrl:l,thumbnailUrl:i,errorMessage:g,fileInputRef:s,videoRef:d,selectedFile:f,selectedFiles:u,handleFileChange:m,handleClick:p,multiple:y=!1,containerProps:x,errorMessageProps:b,progressProps:C,videoProps:k,imageProps:S,iconProps:T,textProps:w,fileType:F,previewUrl:v,renderError:z=({errorMessage:D,errorMessageProps:V,themeMode:P})=>r.jsx(c.Text,{color:"red",fontSize:12,marginTop:8,...V,...W==null?void 0:W.text,children:D}),renderText:j=({text:D,textProps:V})=>r.jsx(c.Text,{marginTop:8,...V,...W==null?void 0:W.text,children:D}),renderFile:H=({selectedFile:D,textProps:V})=>D?r.jsxs(c.Center,{marginTop:8,gap:10,flexDirection:"column",...W==null?void 0:W.container,children:[r.jsx(c.Text,{maxLines:2,...V,...W==null?void 0:W.text,children:D.name}),r.jsxs(c.Text,{...V,...W==null?void 0:W.text,children:["(",Math.round(D.size/1024)," KB)"]})]}):null,renderVideo:E=({selectedFile:D,videoRef:V,videoProps:P})=>r.jsx(c.View,{width:"100%",height:"100%",position:"relative",...W==null?void 0:W.view,children:r.jsx(c.View,{as:"video",width:"100%",height:"100%",src:D?URL.createObjectURL(D):void 0,style:{objectFit:"cover"},ref:V,...P,...W==null?void 0:W.view})}),renderImage:M=({previewUrl:D,imageProps:V})=>(console.log("Rendering image with URL:",D),r.jsx(c.View,{width:"100%",height:"100%",position:"relative",...W==null?void 0:W.view,children:r.jsx(c.Image,{src:D,alt:"Preview",width:"100%",height:"100%",objectFit:"cover",style:{maxHeight:"100%",maxWidth:"100%"},...V,...W==null?void 0:W.image})})),renderProgress:I=({progress:D,progressProps:V})=>r.jsxs(c.Horizontal,{gap:8,alignItems:"center",...V,...W==null?void 0:W.horizontal,children:[r.jsx(c.View,{height:4,backgroundColor:"color-black-100",width:"100%",borderRadius:2,...W==null?void 0:W.view,children:r.jsx(c.View,{height:4,width:`${D}%`,borderRadius:2,backgroundColor:"color-dark-50",...W==null?void 0:W.view})}),r.jsxs(c.Text,{fontSize:12,...W==null?void 0:W.text,children:[D,"%"]})]}),views:W={}})=>{const D=v||l;return r.jsxs(c.Center,{onClick:p,cursor:"pointer",border:"1px solid color-black-100",borderRadius:8,padding:16,flexDirection:"column",overflow:"hidden",position:"relative",height:f&&t===100?"200px":"auto",...x,...W==null?void 0:W.container,children:[t===100&&F==="image"&&D&&M({previewUrl:D,imageProps:S}),t===100&&F==="video"&&i&&E({selectedFile:f,thumbnailUrl:i,videoRef:d,videoProps:k,imageProps:S}),t===100&&F==="file"&&f&&H({selectedFile:f,textProps:w}),t<100&&(n||r.jsx(Lt,{widthHeight:32,...T})),!o&&!f&&a&&j({text:a,textProps:w}),o&&I({progress:t,progressProps:C}),!o&&g&&z({errorMessage:g,errorMessageProps:b}),r.jsx(c.Input,{type:"file",ref:s,onChange:m,accept:e,multiple:y,style:{display:"none"},...W==null?void 0:W.view})]})},Lr=({accept:e="*/*",icon:o,text:t,maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:i,isLoading:g=!1,progress:s=0,fileType:d,multiple:f=!1,...u})=>{const{previewUrl:m,thumbnailUrl:p,errorMessage:y,videoRef:x,fileInputRef:b,selectedFile:C,selectedFiles:k,handleFileChange:S,handleClick:T}=n0({maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:i,multiple:f}),F=(()=>{if(d)return d;if(C)return C.type.startsWith("image/")?"image":C.type.startsWith("video/")?"video":"file"})();return r.jsx(a0,{handleClick:T,accept:e,isLoading:g,progress:s,icon:o,text:t,maxSize:n,onFileSelect:a,validateFile:i,errorMessage:y,handleFileChange:S,selectedFile:C,selectedFiles:k,videoRef:x,fileInputRef:b,previewUrl:m,thumbnailUrl:p,fileType:F,multiple:f,...u})};function l0(e){const o=Math.floor(e/60),t=e%60;return`${o}:${t.toString().padStart(2,"0")}`}function i0({onAudio:e,recording:o,paused:t,audioBlob:n,analyserNode:a,duration:l,error:i,startRecording:g,stopRecording:s,pauseRecording:d,resumeRecording:f,resetRecording:u,handleFileChange:m,...p}){const[y,x]=h.useState(null);h.useEffect(()=>{if(n){const k=URL.createObjectURL(n);return x({url:k,label:`recording-${Date.now()}.webm`}),()=>{URL.revokeObjectURL(k)}}return()=>{}},[n]);const b=()=>{y!=null&&y.url&&URL.revokeObjectURL(y.url),x(null),u()},C=k=>{e(k),y!=null&&y.url&&URL.revokeObjectURL(y.url),x({url:URL.createObjectURL(k),label:k.name})};return r.jsxs(c.Vertical,{gap:"10px",width:"100%",...p,children:[r.jsxs(c.Horizontal,{gap:12,alignItems:"center",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsx(Lr,{accept:"audio/*",icon:r.jsx(lr,{widthHeight:16}),maxSize:100*1024*1024,onFileSelect:C,fileType:"file",multiple:!1,renderError:({errorMessage:k})=>null,views:{container:{width:"36px",height:"36px",cursor:"pointer",border:"1px solid color-gray-200",borderRadius:"10px",backgroundColor:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"}}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"10px",width:"36px",height:"36px"},validateFile:k=>k.size>100*1024*1024?"File size exceeds 100MB limit":k.type.startsWith("audio/")?null:"Only audio files are allowed"}),r.jsx(c.View,{as:"button",type:"button",onClick:o?s:g,width:"36px",height:"36px",minWidth:"36px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"theme-primary",color:"color-white",borderRadius:"999px",border:"0",cursor:"pointer",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.92},children:o?r.jsx(Vr,{widthHeight:14,color:"color-white",filled:!1}):r.jsx(At,{widthHeight:18,color:"color-white",filled:!1})}),r.jsx(c.View,{flex:1,minWidth:120,children:r.jsx(_t,{analyserNode:o?a:null,isPaused:!o||t})}),r.jsx(c.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",whiteSpace:"nowrap",children:l0(l)})]}),y&&!o&&r.jsxs(c.Vertical,{gap:"8px",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsxs(c.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:8,children:[r.jsx(c.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:y.label}),r.jsx(c.View,{as:"button",type:"button",onClick:b,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:"0",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",children:r.jsx(Le,{widthHeight:14,color:"currentColor"})})]}),r.jsx(c.View,{as:"audio",controls:!0,src:y.url,width:"100%"})]}),i&&r.jsx(c.Text,{fontSize:"11px",lineHeight:"16px",color:"color-red-500",children:i})]})}function Sa(){const[e,o]=h.useState(!1),[t,n]=h.useState(!1),[a,l]=h.useState(0),[i,g]=h.useState(null),[s,d]=h.useState(null),[f,u]=h.useState(null),m=h.useRef(null),p=h.useRef(null),y=h.useRef(null),x=h.useRef(null),b=h.useRef([]),C=h.useRef(null),k=typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm",S=h.useCallback(()=>{m.current&&(m.current.state!=="inactive"&&m.current.stop(),m.current=null),x.current&&(x.current.getTracks().forEach(j=>j.stop()),x.current=null),p.current&&(p.current.close(),p.current=null),y.current&&(y.current.disconnect(),y.current=null),d(null),C.current&&(clearInterval(C.current),C.current=null)},[]),T=h.useCallback(async()=>{S(),g(null),l(0),b.current=[];try{const j=await navigator.mediaDevices.getUserMedia({audio:!0});x.current=j;const H=MediaRecorder.isTypeSupported(k)?k:void 0,E=new MediaRecorder(j,H?{mimeType:H}:void 0);m.current=E;const M=new(window.AudioContext||window.webkitAudioContext);p.current=M;const I=M.createMediaStreamSource(j),W=M.createAnalyser();W.fftSize=256,W.smoothingTimeConstant=.8,I.connect(W),y.current=W,d(W),E.ondataavailable=D=>{D.data.size>0&&b.current.push(D.data)},E.onstop=()=>{const D=new Blob(b.current,{type:E.mimeType||k});u(D),S()},E.start(),o(!0),n(!1),C.current=setInterval(()=>{l(D=>D+1)},1e3)}catch{g("Microphone access denied or unavailable."),S()}},[S]),w=h.useCallback(()=>{m.current&&m.current.state!=="inactive"&&m.current.stop(),o(!1),n(!1),C.current&&(clearInterval(C.current),C.current=null)},[]),F=h.useCallback(()=>{m.current&&m.current.state==="recording"&&(m.current.pause(),n(!0),C.current&&(clearInterval(C.current),C.current=null))},[]),v=h.useCallback(()=>{m.current&&m.current.state==="paused"&&(m.current.resume(),n(!1),C.current||(C.current=setInterval(()=>{l(j=>j+1)},1e3)))},[]),z=h.useCallback(()=>{S(),o(!1),n(!1),u(null),l(0),g(null),b.current=[]},[S]);return h.useEffect(()=>()=>S(),[S]),{recording:e,paused:t,audioBlob:f,analyserNode:s,duration:a,error:i,startRecording:T,stopRecording:w,pauseRecording:F,resumeRecording:v,resetRecording:z}}function c0(e){const{onAudio:o}=e,{recording:t,paused:n,audioBlob:a,analyserNode:l,duration:i,error:g,startRecording:s,stopRecording:d,pauseRecording:f,resumeRecording:u,resetRecording:m}=Sa();return h.useEffect(()=>{if(a&&o){const y=new File([a],"recording.webm",{type:a.type||"audio/webm;codecs=opus"});o(y)}},[a,o]),{recording:t,paused:n,audioBlob:a,analyserNode:l,duration:i,error:g,startRecording:s,stopRecording:d,pauseRecording:f,resumeRecording:u,resetRecording:m,handleFileChange:y=>{var b;const x=(b=y.target.files)==null?void 0:b[0];x&&o&&o(x)}}}function s0(e){const o=c0(e);return r.jsx(i0,{...e,...o})}const d0=()=>{const[e,o]=h.useState(!1);return{imageError:e,setImageError:o}},g0={xs:24,sm:32,md:44,lg:56,xl:72},Ot={container:{borderRadius:"50%",overflow:"hidden",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"theme-primary",transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},fallback:{fontWeight:"600",color:"color-white",letterSpacing:"-0.02em"},image:{objectFit:"cover",transition:"opacity 0.2s ease"}},u0=({src:e,size:o="md",fallback:t="IM",views:n,imageError:a,setImageError:l,onClick:i=()=>{},children:g})=>{const s=g0[o],d={...Ot.image,...(n==null?void 0:n.image)||{}};return r.jsxs(c.Center,{"data-role":"avatar",width:s,height:s,...Ot.container,borderColor:a?"color-gray-400":"transparent",onClick:i,...n==null?void 0:n.container,children:[!a&&e?r.jsx(c.Image,{alt:"",src:e,style:d,width:s,height:s,onError:()=>l(!0)}):r.jsx(c.Text,{size:o,...Ot.fallback,...n==null?void 0:n.fallback,children:t}),g]})},va=e=>{const o=Te("avatar",e),{src:t,size:n,views:a,fallback:l,onClick:i,children:g}=o,{imageError:s,setImageError:d}=d0();return r.jsx(u0,{src:t,size:n,views:a,fallback:l,imageError:s,setImageError:d,onClick:i,children:g})},h0={xs:{minWidth:"16px",height:"16px",padding:"0 4px",fontSize:"9px",fontWeight:"600",lineHeight:"12px",letterSpacing:"-0.01em"},sm:{minWidth:"20px",height:"20px",padding:"0 6px",fontSize:"10px",fontWeight:"600",lineHeight:"14px",letterSpacing:"-0.01em"},md:{minWidth:"24px",height:"24px",padding:"0 8px",fontSize:"12px",fontWeight:"600",lineHeight:"16px",letterSpacing:"-0.01em"},lg:{minWidth:"28px",height:"28px",padding:"0 10px",fontSize:"14px",fontWeight:"600",lineHeight:"20px",letterSpacing:"-0.01em"},xl:{minWidth:"32px",height:"32px",padding:"0 12px",fontSize:"16px",fontWeight:"600",lineHeight:"24px",letterSpacing:"-0.01em"}},f0={xs:{gap:"6px",padding:"3px 8px 3px 3px"},sm:{gap:"8px",padding:"4px 10px 4px 4px"},md:{gap:"12px",padding:"6px 16px 6px 6px"},lg:{gap:"12px",padding:"7px 18px 7px 7px"},xl:{gap:"14px",padding:"8px 20px 8px 8px"}},m0={xs:{padding:"2px 6px",fontSize:"9px",lineHeight:"12px"},sm:{padding:"3px 8px",fontSize:"10px",lineHeight:"14px"},md:{padding:"6px 12px",fontSize:"11px",lineHeight:"14px"},lg:{padding:"7px 14px",fontSize:"12px",lineHeight:"16px"},xl:{padding:"8px 16px",fontSize:"13px",lineHeight:"18px"}},Ta={xs:{fontSize:"11px",lineHeight:"14px"},sm:{fontSize:"12px",lineHeight:"16px"},md:{fontSize:"13px",lineHeight:"18px"},lg:{fontSize:"14px",lineHeight:"20px"},xl:{fontSize:"15px",lineHeight:"22px"}},p0={square:0,rounded:"8px",pill:"9999px"},y0={"top-right":{top:"4px",right:"4px",position:"absolute"},"top-left":{top:"4px",left:"4px",position:"absolute"},"bottom-right":{bottom:"4px",right:"4px",position:"absolute"},"bottom-left":{bottom:"4px",left:"4px",position:"absolute"}},b0=e=>({display:"inline-flex",height:"auto",minWidth:"auto",backgroundColor:"color-white-600",color:"color-gray-900",borderWidth:"1px",borderStyle:"solid",borderColor:"color-white",backdropFilter:"blur(12px)",boxShadow:"0 1px 2px rgba(15, 23, 42, 0.08)",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",_hover:{backgroundColor:"color-white-800",boxShadow:"0 2px 8px rgba(15, 23, 42, 0.1)"}}),x0=e=>({filled:{backgroundColor:"theme-primary",color:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",color:"theme-primary",style:{backgroundColor:"transparent"},transition:"border-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},link:{borderWidth:0,borderStyle:"none",borderColor:"theme-primary",color:"theme-primary",textDecoration:"underline",style:{backgroundColor:"transparent",textUnderlineOffset:"2px",textDecorationThickness:"1px"},transition:"opacity 0.2s ease",_hover:{opacity:.8}},ghost:{color:"color-gray-500",borderWidth:0,borderStyle:"solid",borderColor:"color-gray-500",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-100"}}}),Ia=e=>({default:{indicator:{backgroundColor:"color-gray-400"},label:{color:"inherit"}},info:{indicator:{backgroundColor:"color-blue-500"},label:{color:"inherit"}},success:{indicator:{backgroundColor:"color-green-500"},label:{color:"inherit"}},warning:{indicator:{backgroundColor:"color-orange-500"},label:{color:"inherit"}},error:{indicator:{backgroundColor:"color-red-500"},label:{color:"inherit"}}}),k0=h.memo(({content:e,children:o,icon:t,pastil:n,pastilContent:a,action:l,position:i,shape:g="pill",variant:s="filled",size:d="md",isAuto:f=!1,views:u,themeMode:m,backgroundColor:p,color:y,borderColor:x,...b})=>{const{themeMode:C}=c.useTheme(),k=m||C,S=h.useMemo(()=>x0()[s],[k,s]),T=h.useMemo(()=>b0(),[k]),w=h.useMemo(()=>Ia(),[k]),F=a!=null,v=l!=null,z=F||v,j=o??e,H=j!=null,E=f&&typeof j=="string"&&/^(color|theme|light|dark)-/.test(j)?j:void 0,M=h.useMemo(()=>{const W={width:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"6px",borderRadius:p0[g],...h0[d],...S,...z?f0[d]:{},...z?T:{},...i?y0[i]:{},...u==null?void 0:u.container};return s!=="filled"&&!z&&(S.color!==void 0&&(W.color=S.color),S.borderColor!==void 0&&(W.borderColor=S.borderColor),S.backgroundColor!==void 0&&(W.backgroundColor=S.backgroundColor),S&&S.style&&(W.style={...W.style||{},...S.style})),v||b.onClick!==void 0||(delete W._hover,delete W._active),p!==void 0&&(W.backgroundColor=p,x===void 0&&(W.borderColor=p)),x!==void 0&&(W.borderColor=x),y!==void 0&&(W.color=y),E&&(W.backgroundColor=E,W.borderColor=E,W.color="color-white"),W},[v,b.onClick,p,y,x,g,d,s,S,z,T,i,E,u==null?void 0:u.container]);let I="currentColor";return typeof n=="string"?n in w?I=w[n].indicator.backgroundColor:I=n:n===!0&&(I="color-green-500",s==="filled"&&(I="color-white")),r.jsxs(c.Center,{"data-role":"badge",...M,...b,children:[t&&r.jsx(c.View,{"data-role":"badge-icon",...u==null?void 0:u.icon,children:t}),F&&r.jsx(c.Text,{"data-role":"badge-pastil-content",backgroundColor:"color-gray-900",borderRadius:"9999px",color:"color-white",fontWeight:"700",letterSpacing:0,textTransform:"uppercase",whiteSpace:"nowrap",...m0[d],...u==null?void 0:u.pastilContent,children:a}),n&&r.jsx(c.View,{"data-role":"badge-pastil",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:I,...u==null?void 0:u.pastil}),H&&r.jsx(c.Text,{"data-role":"badge-text",color:z?"color-gray-900":M.color,fontWeight:z?"700":"600",textAlign:"center",letterSpacing:z?0:"0.02em",whiteSpace:"nowrap",...z?Ta[d]:{},...u==null?void 0:u.text,children:j}),v&&r.jsx(c.Text,{"data-role":"badge-action",color:"color-gray-400",fontWeight:"500",letterSpacing:0,whiteSpace:"nowrap",...Ta[d],...u==null?void 0:u.action,children:l})]})}),Ve=e=>{const o=Te("badge",e);return r.jsx(k0,{...o})},C0={xs:12,sm:14,md:16,lg:18,xl:20},w0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Nt=h.forwardRef(({children:e,href:o,iconSize:t="sm",underline:n="default",isExternal:a=!1,views:l={},to:i,isHovered:g,setIsHovered:s,_hover:d,...f},u)=>r.jsxs(c.Element,{as:"a",ref:u,href:o,display:"inline-flex",gap:3,alignItems:"center",flexWrap:"nowrap",color:"inherit",textDecoration:n==="underline"?"underline":"none",_hover:n==="hover"?{textDecoration:"underline",...d}:d,...a?{target:"_blank",rel:"noopener noreferrer"}:{},...l.text,...f,children:[e,a&&r.jsx(ha,{widthHeight:C0[t]})]}));Nt.displayName="LinkAnchor";const Fa=h.forwardRef(({to:e="/",onClick:o,...t},n)=>{const a=It.useHref(e),l=It.useNavigate(),i=g=>{o==null||o(g),!(g.defaultPrevented||g.button!==0||t.target&&t.target!=="_self"||g.metaKey||g.altKey||g.ctrlKey||g.shiftKey)&&(g.preventDefault(),l(e))};return r.jsx(Nt,{...t,to:e,href:a,onClick:i,ref:n})});Fa.displayName="RouterLinkAnchor";const za=h.forwardRef((e,o)=>{const t=It.useInRouterContext(),{href:n,to:a="/",isExternal:l}=e;return t&&!l&&n==null&&!w0.test(a)?r.jsx(Fa,{...e,ref:o}):r.jsx(Nt,{...e,href:n??a,ref:o})});za.displayName="LinkView";const Ma=h.forwardRef((e,o)=>r.jsx(za,{ref:o,...e}));Ma.displayName="Link";const Br=Ma,qt={xs:14,sm:18,md:22,lg:26,xl:30},Ut={fast:50,normal:100,slow:300},S0=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),v0=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:i}=c.useTheme(),g=l(t,{themeMode:n||i}),s=typeof e=="number"?e:qt[e],[d,f]=h.useState(0);return h.useEffect(()=>{const u=setInterval(()=>{f(m=>m+45)},Ut[o]);return()=>clearInterval(u)},[o]),r.jsxs(c.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:`${s}px`,height:`${s}px`,viewBox:"0 0 24 24",fill:"none",stroke:g,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:`rotate(${d}deg)`},...a,children:[r.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),r.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("g",{id:"SVGRepo_iconCarrier",children:r.jsx("path",{d:"M21 12a9 9 0 11-6.219-8.56"})})]})},T0=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:i}=c.useTheme(),g=l(t,{themeMode:n||i}),s=typeof e=="number"?e:qt[e],[d,f]=h.useState(0);return h.useEffect(()=>{const u=setInterval(()=>{f(m=>m+45)},Ut[o]);return()=>clearInterval(u)},[o]),r.jsxs(c.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${s}px`,height:`${s}px`,style:{transform:`rotate(${d}deg)`},...a,children:[r.jsx("circle",{cx:"10",cy:"25",r:"4",fill:g}),r.jsx("circle",{cx:"25",cy:"25",r:"4",fill:g}),r.jsx("circle",{cx:"40",cy:"25",r:"4",fill:g})]})},I0=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:i}=c.useTheme(),g=l(t,{themeMode:n||i}),s=typeof e=="number"?e:qt[e],[d,f]=h.useState(0);return h.useEffect(()=>{const u=setInterval(()=>{f(m=>m+45)},Ut[o]);return()=>clearInterval(u)},[o]),r.jsx(c.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${s}px`,height:`${s}px`,style:{transform:`rotate(${d}deg)`},...a,children:r.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:g,strokeWidth:"5",strokeDasharray:"1,10"})})},F0=({size:e,children:o,textColor:t,loaderColor:n,type:a="default",speed:l="normal",textPosition:i="right",views:g,...s})=>{const{getColor:d}=c.useTheme(),f=p=>S0(p)?p:d(p||"theme-loading");n=f(n||s.color||"theme-loading"),t=f(t||s.color||"theme-loading");const u={size:e,speed:l,color:n},m={default:r.jsx(v0,{...u}),dotted:r.jsx(T0,{...u}),quarter:r.jsx(I0,{...u})};return r.jsxs(c.Center,{gap:10,flexDirection:i==="top"||i==="bottom"?"column":"row",...s,...g==null?void 0:g.container,children:[(i==="left"||i==="top")&&o&&r.jsx(c.View,{color:t,...g==null?void 0:g.text,children:o}),m[a],(i==="right"||i==="bottom")&&o&&r.jsx(c.View,{color:t,...g==null?void 0:g.text,children:o})]})},io=e=>{const o=Te("loader",e);return r.jsx(F0,{...o})},z0=/^(color|theme|light|dark)-/,M0=e=>z0.test(e),j0=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},Do=(e,o)=>M0(e)?`${j0(e)}-${o}`:`color-mix(in srgb, ${e} ${Math.round(o/10)}%, transparent)`,ja={xs:{minHeight:24,paddingHorizontal:12,paddingVertical:5,fontSize:10,fontWeight:500,lineHeight:12,letterSpacing:"-0.01em"},sm:{minHeight:32,paddingHorizontal:16,paddingVertical:7,fontSize:12,fontWeight:500,lineHeight:16,letterSpacing:"-0.01em"},md:{minHeight:40,paddingHorizontal:20,paddingVertical:9,fontSize:14,fontWeight:500,lineHeight:20,letterSpacing:"-0.01em"},lg:{minHeight:48,paddingHorizontal:24,paddingVertical:11,fontSize:16,fontWeight:500,lineHeight:24,letterSpacing:"-0.01em"},xl:{minHeight:56,paddingHorizontal:28,paddingVertical:13,fontSize:20,fontWeight:500,lineHeight:28,letterSpacing:"-0.01em"}},cr={square:0,rounded:8,pill:999},W0={xs:{width:16,height:16,padding:6},sm:{width:20,height:20,padding:6},md:{width:24,height:24,padding:8},lg:{width:24,height:24,padding:12},xl:{width:28,height:28,padding:14}},Xe=e=>/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,E0=(e,o,t=!1,n)=>{const a=t?o:e,l=t?e:o,i=t?o:e,s=(e==="theme-primary"||n&&e===n.primary)&&(n!=null&&n.onPrimary)?n.onPrimary:l,d=`0 0 0 2px ${Xe("color-white")}, 0 0 0 4px ${Xe(i)}`;return{filled:{backgroundColor:a,color:s,borderWidth:1,borderStyle:"solid",borderColor:a,_hover:{opacity:.92},_active:{opacity:.96},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},empty:{color:i,borderWidth:1,borderStyle:"solid",borderColor:Do(i,t?400:250),backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, opacity 0.2s ease"},outline:{color:i,borderWidth:1,borderStyle:"solid",borderColor:Do(i,t?400:250),backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{color:i,borderWidth:0,borderStyle:"solid",borderColor:i,backgroundColor:"transparent",_hover:{opacity:.86},_active:{opacity:.94},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, color 0.2s ease"},link:{color:i,borderWidth:0,borderStyle:"none",borderColor:i,minHeight:"auto",paddingHorizontal:"4px",paddingVertical:"10px",textDecoration:"underline",backgroundColor:"transparent",style:{textUnderlineOffset:"2px",textDecorationThickness:"1px",textDecorationColor:Xe(i)},_hover:{opacity:.8},_active:{opacity:.9},_focusVisible:{outline:"none",boxShadow:d},transition:"opacity 0.2s ease"},subtle:{backgroundColor:Do(i,t?200:100),color:i,borderWidth:1,borderStyle:"solid",borderColor:Do(i,t?400:250),_hover:{backgroundColor:Do(i,t?300:180)},_active:{backgroundColor:Do(i,t?380:240)},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}}},A0=h.memo(({children:e,icon:o,leftIcon:t,rightIcon:n,isLoading:a,iconPosition:l="left",loaderPosition:i="left",size:g="md",resolvedTextColor:s,isIconRounded:d,loaderProps:f,views:u})=>{const m=["left","right"].includes(l)?c.Horizontal:c.Vertical,p=ja[g];return r.jsxs(m,{gap:8,alignItems:"center",justifyContent:"center",fontSize:p.fontSize,fontWeight:p.fontWeight,lineHeight:p.lineHeight,letterSpacing:p.letterSpacing,whiteSpace:"nowrap",color:s,...u==null?void 0:u.content,children:[a&&i==="left"&&r.jsx(io,{size:g==="xs"||g==="sm"?"sm":"md",color:s,...f,...u==null?void 0:u.loader}),t&&r.jsx(c.View,{color:s,...u==null?void 0:u.icon,children:t}),o&&["left","top"].includes(l)&&!a&&r.jsx(c.View,{color:s,...u==null?void 0:u.icon,children:o}),e,o&&["right","bottom"].includes(l)&&!a&&r.jsx(c.View,{color:s,...u==null?void 0:u.icon,children:o}),n&&r.jsx(c.View,{color:s,...u==null?void 0:u.icon,children:n}),a&&i==="right"&&r.jsx(io,{size:g==="xs"||g==="sm"?"sm":"md",color:s,...f,...u==null?void 0:u.loader})]})}),H0=e=>{const o=cr[e];return typeof o=="number"?o:typeof o=="string"&&parseInt(o,10)||0},V0=({asComponent:e,isDisabled:o,isLoading:t,isWrapped:n=!1,borderRadius:a,width:l,height:i,baseStyles:g,sizeStyles:s,iconPad:d,mainTone:f,resolvedTextColor:u,children:m,borderWidth:p=0,...y})=>r.jsx(c.Element,{as:e,disabled:!!(o||t),display:n?"flex":"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:a,width:l,height:i,...g,...s,...d,backgroundColor:(g==null?void 0:g.backgroundColor)||(n?f:void 0),color:u,borderWidth:n?0:void 0,cursor:o?"default":"pointer",...y,children:m}),P0=({shape:e,isDisabled:o,onClick:t,shadow:n,borderWidth:a,isAuto:l,isFilled:i,views:g,children:s,...d})=>r.jsx(c.Element,{as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:cr[e],cursor:o?"default":"pointer",onClick:t,boxShadow:n,padding:a,width:i?"100%":l?"fit-content":void 0,...g==null?void 0:g.container,...d,children:s}),D0=({variant:e,animation:o,to:t,isDisabled:n,isLoading:a,isAuto:l,isFilled:i,isExternal:g,shape:s="rounded",shadow:d,onClick:f,views:u,baseStyles:m,sizeStyles:p,iconPad:y,containerRef:x,resolvedTextColor:b,content:C,size:k,mainTone:S,borderMovingDuration:T=2,borderMovingGradientColors:w=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:F="#705CFF",animatedStrokeTextColor:v="color-gray-900",...z})=>{var M;const j=H0(s),H=t?r.jsx(Br,{to:t,isExternal:g,color:"currentColor",textDecoration:"inherit",_hover:{color:"currentColor"},...u==null?void 0:u.link,children:C}):C,E={isDisabled:n,isLoading:a,baseStyles:m,sizeStyles:p,iconPad:y,resolvedTextColor:b,mainTone:S,children:H};if(o==="borderMoving"&&w){const W={from:{backgroundPosition:"0% 50%"},to:{backgroundPosition:"200% 50%"},duration:`${T}s`,timingFunction:"linear",iterationCount:"infinite"};return r.jsx(P0,{shape:s,isDisabled:n,onClick:f,shadow:d,borderWidth:3,isAuto:l,isFilled:i,views:u,background:`linear-gradient(90deg, ${Xe(w[0])}, ${Xe(w[1])}, ${Xe(w[2])}, ${Xe(w[0])})`,backgroundSize:"200% 100%",animate:W,...z,children:r.jsx(V0,{asComponent:t?"div":"button",isWrapped:!0,borderRadius:Math.max(0,j-3),width:"100%",height:"100%",...E})})}if(o==="animatedStroke"){const I=Xe(F),W=Xe(v),D=1e3,V={from:{strokeWidth:"8px",strokeDasharray:`0 ${D}`,strokeDashoffset:-Math.round(D*.63)},to:{strokeWidth:"3px",strokeDasharray:`${D}`,strokeDashoffset:0},duration:"0.9s",timingFunction:"ease-in",fillMode:"forwards"},P=["group",(M=u==null?void 0:u.container)==null?void 0:M.className,z==null?void 0:z.className].filter(Boolean).join(" ");return r.jsxs(c.Element,{ref:x,as:t?"div":"button",type:t?void 0:"button",disabled:!!(!t&&(n||a)),onClick:f,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:i?"100%":l?"fit-content":void 0,borderRadius:cr[s],boxShadow:d,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",color:W,backgroundColor:"transparent",borderWidth:0,...u==null?void 0:u.container,...z,className:P,children:[r.jsx(c.View,{as:"svg",position:"absolute",top:0,right:0,bottom:0,left:0,width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",pointerEvents:"none",zIndex:1,"aria-hidden":"true",children:r.jsx(c.View,{as:"rect",x:"0",y:"0",height:"100%",width:"100%",rx:j,ry:j,fill:"transparent",stroke:I,strokeWidth:"8px",strokeDasharray:`0 ${D}`,strokeDashoffset:-Math.round(D*.63),pathLength:D,on:{groupHover:{animate:V}}})}),r.jsx(c.View,{position:"relative",zIndex:0,children:H})]})}if(o==="borderReveal"){const W=Xe((w==null?void 0:w[0])||S||"#000000"),V=T*.75/4,P=`linear-gradient(90deg, ${W} 50%, transparent 50%)`,_=`linear-gradient(180deg, ${W} 50%, transparent 50%)`,q=`linear-gradient(270deg, ${W} 50%, transparent 50%)`,N=`linear-gradient(0deg, ${W} 50%, transparent 50%)`,G="100% 0, 100% 100%, 0 100%, 0 0",X="0 0, 100% 0, 100% 100%, 0 100%",$=`0s, ${V}s, ${V*2}s, ${V*2}s`,O=`${V*2}s, ${V*2}s, ${V}s, 0s`,B=4;return r.jsx(c.Element,{ref:x,as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:cr[s],cursor:n?"default":"pointer",onClick:f,boxShadow:d,padding:3,background:`
2
+ ${P} no-repeat,
4
3
  ${_} no-repeat,
5
- ${O} no-repeat
6
- `,backgroundSize:`200% ${B}px, ${B}px 200%, 200% ${B}px, ${B}px 200%`,backgroundPosition:N,transitionProperty:"background-position",transitionDuration:`${V}s`,transitionTimingFunction:"linear",transitionDelay:oe,_hover:{backgroundPosition:U,transitionDelay:X},width:c?"100%":l?"fit-content":void 0,...f==null?void 0:f.container,...j,children:r.jsx(i.View,{as:t?"div":"button",disabled:!!(n||a),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:Math.max(0,E-3),width:"100%",height:"100%",...p,...u,...y,backgroundColor:(p==null?void 0:p.backgroundColor)||w,color:x,borderWidth:0,cursor:n?"default":"pointer",children:D})})}return r.jsx(i.Element,{ref:k,as:e==="link"&&t?"div":"button",type:e==="link"&&t?void 0:"button",disabled:!!(n||a),...u,...y,display:"inline-flex",alignItems:"center",justifyContent:"center",width:c?"100%":l?"fit-content":void 0,borderRadius:Qo[d],boxShadow:g,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",onClick:m,...p,...f==null?void 0:f.container,...j,children:D})},n0=h.memo(h.forwardRef(({variant:e="filled",size:o="md",shape:t="rounded",iconPosition:n="left",loaderPosition:a="left",backgroundColor:l,color:c,textColor:s,explicitTextColor:d,reversed:g=!1,isAuto:m=!0,isFilled:f,isDisabled:p,isLoading:u,isIconRounded:y,isIcon:k,isHovered:x,icon:C,leftIcon:S,rightIcon:w,startIcon:v,endIcon:b,children:I,to:T,isExternal:j,shadow:E,onClick:D,views:W={},animation:A,loaderProps:H,config:z,ariaLabel:P,borderMovingDuration:V=2,borderMovingGradientColors:M=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:L="#705CFF",animatedStrokeTextColor:_="color-gray-900",...O},N)=>{const X=p?"theme-disabled":u?"theme-loading":l??c??"theme-primary",oe=d??s??"color-white",{config:B}=xr(),$=B==null?void 0:B.theme,q=h.useMemo(()=>{const re=Zd(X,oe,g,$);return z!=null&&z.variants&&Object.keys(z.variants).forEach(ie=>{re[ie]&&(re[ie]=Be(re[ie],z.variants[ie]))}),re},[X,oe,g,$,z==null?void 0:z.variants]),J=q[e]??q.filled,Y=d?{...J,color:d}:J,Z=(Y==null?void 0:Y.color)??oe,ee=r.jsx(Rd,{icon:C,leftIcon:S??v,rightIcon:w??b,isLoading:u,iconPosition:n,loaderPosition:a,size:o,resolvedTextColor:Z,isIconRounded:y,loaderProps:H,views:W,children:I}),ne=da[o],K=y||k?Qd[o]:{};return r.jsx(t0,{variant:e,animation:A,to:T,isDisabled:p,isLoading:u,isAuto:m,isFilled:f,isExternal:j,shape:t,shadow:E,onClick:D,views:W,baseStyles:Y,sizeStyles:ne,iconPad:K,resolvedTextColor:Z,content:ee,size:o,mainTone:X,borderMovingDuration:V,borderMovingGradientColors:M,animatedStrokeAccentColor:L,animatedStrokeTextColor:_,containerRef:N,...P!==void 0?{"aria-label":P}:{},...O})})),de=e=>{const[o,t]=i.useHover(),n=pe("button",e),a=e.textColor??(e.backgroundColor!=null&&e.color!=null?e.color:void 0);return r.jsx(n0,{isHovered:t,...n,explicitTextColor:a})},a0={sm:{padding:"12px"},md:{padding:"16px"},lg:{padding:"24px"}},l0={square:0,rounded:"8px",pill:"24px"},i0=e=>{const o=e==="dark";return{default:{backgroundColor:"color-white",border:"none",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},outlined:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.2s ease, box-shadow 0.2s ease",_hover:{borderColor:"color-gray-300",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.05)"}},elevated:{backgroundColor:"color-white",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.35), 0px 1px 2px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.08), 0px 1px 2px rgba(0, 0, 0, 0.06)",border:"none",transition:"box-shadow 0.2s ease",_hover:{boxShadow:o?"0px 4px 6px rgba(0, 0, 0, 0.4), 0px 2px 4px rgba(0, 0, 0, 0.35)":"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.06)"}}}},Fr=e=>(e.themeMode,{container:{backgroundColor:"color-white",color:"color-gray-900",borderRadius:"8px",overflow:"hidden",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},header:{padding:"16px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"theme-primary",fontWeight:600,fontSize:14},content:{padding:"16px",color:"color-gray-600",fontSize:12,lineHeight:"18px"},footer:{padding:"16px",borderTop:"1px solid",borderColor:"color-gray-100",justifyContent:"flex-end",gap:8}}),ga=h.createContext({}),Wt=()=>h.useContext(ga),Ht=({children:e,views:o,style:t,themeMode:n,...a})=>{var g;const l=i.useTheme(),{styles:c}=Wt(),s=Fr(l).header,d={...s,...c==null?void 0:c.header,...a,style:{...s==null?void 0:s.style,...(g=c==null?void 0:c.header)==null?void 0:g.style,...t}};return r.jsx(i.Vertical,{gap:8,...d,children:e})},jt=({children:e,views:o,style:t,themeMode:n,...a})=>{var g;const l=i.useTheme(),{styles:c}=Wt(),s=Fr(l).content,d={...s,...c==null?void 0:c.content,...a,style:{...s==null?void 0:s.style,...(g=c==null?void 0:c.content)==null?void 0:g.style,...t}};return r.jsx(i.Vertical,{gap:12,...d,children:e})},Pt=({children:e,views:o,style:t,themeMode:n,...a})=>{var g;const l=i.useTheme(),{styles:c}=Wt(),s=Fr(l).footer,d={...s,...c==null?void 0:c.footer,...a,style:{...s==null?void 0:s.style,...(g=c==null?void 0:c.footer)==null?void 0:g.style,...t}};return r.jsx(i.Vertical,{gap:8,...d,children:e})},c0=({variant:e="default",size:o="md",shape:t="rounded",children:n,header:a,footer:l,isFullWidth:c=!1,views:s,style:d,themeMode:g,config:m,...f})=>{var b,I;const p=i.useTheme(),u=Fr(p),y=((b=a0[o])==null?void 0:b.padding)||"16px",k=h.useMemo(()=>({styles:{container:{...u.container,borderRadius:l0[t],...s==null?void 0:s.container},header:{...u.header,padding:y,...s==null?void 0:s.header},content:{...u.content,padding:y,...s==null?void 0:s.content},footer:{...u.footer,padding:y,...s==null?void 0:s.footer}}}),[u,s,y,t]),x=h.Children.toArray(n).some(T=>h.isValidElement(T)&&(T.type===Ht||T.type===jt||T.type===Pt)),{themeMode:C}=p,w=i0(g||C)[e],v={width:c?"100%":"auto",overflow:"hidden",...w,...k.styles.container,...f,style:{...(I=k.styles.container)==null?void 0:I.style,...d}};return r.jsx(ga.Provider,{value:k,children:r.jsx(i.View,{...v,children:x?n:r.jsxs(i.Vertical,{width:"100%",children:[a&&r.jsx(Ht,{children:a}),r.jsx(jt,{children:n}),l&&r.jsx(Pt,{children:l})]})})})},we=e=>{const o=pe("card",e);return r.jsx(c0,{...o})};we.Header=Ht,we.Content=jt,we.Footer=Pt;const s0=({defaultActiveIndex:e=0,activeIndex:o,onChange:t,autoPlay:n=!1,autoPlayInterval:a=3e3,pauseOnHover:l=!0,infinite:c=!0,totalSlides:s,stepIndices:d})=>{const g=h.useRef(s||0),[m,f]=h.useState(s||0),p=h.useRef(new Set),u=h.useRef(0),y=h.useMemo(()=>ct("carousel-content"),[]),[k,x]=h.useState(o!==void 0?o:e),[C,S]=h.useState(!1),[w,v]=h.useState(!1),[b,I]=h.useState(0),[T,j]=h.useState(0),E=h.useRef(null);h.useEffect(()=>{o!==void 0&&x(o)},[o]);const D=h.useCallback(U=>{let X=U;c?U<0?X=m-1:U>=m&&(X=0):X=Math.max(0,Math.min(U,m-1)),d&&d.length>0&&(d.includes(X)||(X=d.reduce((B,$)=>Math.abs($-X)<Math.abs(B-X)?$:B))),o===void 0&&x(X),t&&t(X)},[o,c,t,m]),W=h.useCallback(()=>{D(k+1)},[k,D]),A=h.useCallback(()=>{D(k-1)},[k,D]);h.useEffect(()=>(n&&!C&&!w&&(E.current=setInterval(()=>{W()},a)),()=>{E.current&&clearInterval(E.current)}),[n,a,C,w,W,l]);const H=h.useCallback(()=>{l&&S(!0)},[l]),z=h.useCallback(()=>{S(!1)},[]),P=h.useCallback(U=>{v(!0),"touches"in U?(I(U.touches[0].clientX),j(U.touches[0].clientY)):(I(U.clientX),j(U.clientY))},[]),V=h.useCallback(U=>{if(!w)return;let X,oe;"touches"in U?(X=U.touches[0].clientX,oe=U.touches[0].clientY):(X=U.clientX,oe=U.clientY);const B=X-b,$=oe-T;Math.abs(B)>Math.abs($)&&Math.abs(B)>50&&(B>0?A():W(),v(!1))},[w,b,T,W,A]),M=h.useCallback(()=>{v(!1)},[]),L=h.useCallback(()=>{const U=u.current++;p.current.add(U);const X=p.current.size;return g.current=X,f(X),U},[]),_=h.useCallback(U=>{p.current.delete(U);const X=p.current.size;if(g.current=X,f(X),X>0&&k>=X){const oe=Math.max(0,X-1);o===void 0&&x(oe),t&&t(oe)}},[k,o,t]),O=c||k>0,N=c||k<m-1;return{activeIndex:k,totalSlides:m,goToSlide:D,nextSlide:W,prevSlide:A,canGoNext:N,canGoPrevious:O,handleMouseEnter:H,handleMouseLeave:z,handleDragStart:P,handleDragMove:V,handleDragEnd:M,registerSlide:L,unregisterSlide:_,contentId:y,infinite:c}},d0={dot:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},line:{width:"20px",height:"4px",borderRadius:"2px",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},number:{minWidth:"24px",height:"24px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",transition:"background-color 0.3s ease"}},g0={dot:{backgroundColor:"theme-primary"},line:{backgroundColor:"theme-primary"},number:{backgroundColor:"theme-primary",color:"color-white"}},zr={width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"color-white",color:"color-gray-800",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 2px 5px rgba(0, 0, 0, 0.1)",zIndex:1,transition:"background-color 0.3s ease",_hover:{backgroundColor:"color-gray-100"}},Zo=()=>({container:{position:"relative",overflow:"hidden"},content:{overflow:"hidden",width:"100%",height:"100%"},innerContainer:{display:"flex",transitionProperty:"transform",transitionDuration:"300ms",transitionTimingFunction:"ease-in-out",height:"100%"},item:{flex:"0 0 100%",minWidth:0,position:"relative",height:"100%"},prevButton:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)",zIndex:10,...zr},nextButton:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",zIndex:10,...zr}}),ha=h.createContext(null),Mr=()=>{const e=h.useContext(ha);if(!e)throw new Error("Carousel compound components must be used within <Carousel>");return e},fa=({children:e,isActive:o,index:t,views:n,...a})=>r.jsx(i.View,{flexShrink:0,width:"100%",height:"100%",display:o?"block":"none",...n,...a,children:e}),ma=({views:e,children:o,...t})=>{const{goToPrevious:n,canGoPrevious:a,styles:l}=Mr(),s={...Zo().prevButton,...l==null?void 0:l.prevButton,...e==null?void 0:e.prevButton};return r.jsx(de,{"aria-label":"Previous slide",onClick:()=>n(),isDisabled:!a,...s,...t,children:o??r.jsx(he,{orientation:"left",widthHeight:16})})},pa=({views:e,children:o,...t})=>{const{goToNext:n,canGoNext:a,styles:l}=Mr(),s={...Zo().nextButton,...l==null?void 0:l.nextButton,...e==null?void 0:e.nextButton};return r.jsx(de,{"aria-label":"Next slide",onClick:()=>n(),isDisabled:!a,...s,...t,children:o??r.jsx(he,{orientation:"right",widthHeight:16})})},ua=({children:e,views:o,...t})=>{const{registerSlide:n,unregisterSlide:a,styles:l}=Mr(),c=h.useRef(null);h.useEffect(()=>{const g=n();return c.current=g,()=>{c.current!==null&&a(c.current)}},[n,a]);const d={...Zo().item,...l==null?void 0:l.item,...o==null?void 0:o.item};return r.jsx(i.View,{role:"group","aria-roledescription":"slide",...d,...t,children:e})},ya=({children:e,views:o,style:t,...n})=>{const{currentIndex:a,styles:l,contentId:c}=Mr(),s=Zo(),d={...s.content,...l==null?void 0:l.content,...o==null?void 0:o.content},g={...s.innerContainer,...l==null?void 0:l.innerContainer,...o==null?void 0:o.innerContainer},m=`-${a*100}%`;return r.jsx(i.View,{...d,...n,style:{...d==null?void 0:d.style,...t},id:c,"aria-live":"polite",children:r.jsx(i.View,{...g,style:{...g==null?void 0:g.style,transform:`translateX(${m})`},children:e})})},h0=({children:e,defaultActiveIndex:o=0,activeIndex:t,onChange:n,showNavigation:a=!0,navigationPosition:l="inside",prevButton:c,nextButton:s,showIndicators:d=!0,indicatorPosition:g="bottom",indicatorVariant:m="dot",autoPlay:f=!1,autoPlayInterval:p=3e3,pauseOnHover:u=!0,infinite:y=!0,direction:k="horizontal",transitionDuration:x=300,views:C,stepIndices:S,themeMode:w,...v})=>{const b=h.useMemo(()=>h.Children.toArray(e),[e]),I=s0({defaultActiveIndex:o,activeIndex:t,onChange:n,autoPlay:f,autoPlayInterval:p,pauseOnHover:u,infinite:y,totalSlides:b.length}),{activeIndex:T,totalSlides:j,goToSlide:E,nextSlide:D,prevSlide:W,handleMouseEnter:A,handleMouseLeave:H,handleDragStart:z,handleDragMove:P,handleDragEnd:V}=I,M=()=>{if(!a)return null;const O=c||r.jsx(i.View,{as:"button","aria-label":"Previous slide",...zr,...C==null?void 0:C.prevButton,children:"❮"}),N=s||r.jsx(i.View,{as:"button","aria-label":"Next slide",...zr,...C==null?void 0:C.nextButton,children:"❯"});return r.jsxs(r.Fragment,{children:[r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",left:l==="inside"?"10px":"-40px",onClick:W,cursor:!y&&T===0?"not-allowed":"pointer",opacity:!y&&T===0?.5:1,children:O}),r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",right:l==="inside"?"10px":"-40px",onClick:D,cursor:!y&&T===b.length-1?"not-allowed":"pointer",opacity:!y&&T===b.length-1?.5:1,children:N})]})},L=()=>d?r.jsx(i.Horizontal,{position:"absolute",left:"0",right:"0",justifyContent:"center",...g==="top"?{top:"10px"}:{bottom:"10px"},...C==null?void 0:C.indicators,children:b.map((O,N)=>r.jsx(i.View,{onClick:()=>E(N),cursor:"pointer",...d0[m],...N===T?{...g0[m]}:{},...C==null?void 0:C.indicator,...N===T?C==null?void 0:C.activeIndicator:{},children:m==="number"&&N+1},N))}):null;return h.useMemo(()=>h.Children.toArray(e).some(O=>h.isValidElement(O)&&(O.type===ya||O.type===ua||O.type===ma||O.type===pa)),[e])?r.jsx(ha.Provider,{value:{currentIndex:T,totalSlides:j,goToSlide:E,goToNext:D,goToPrevious:W,canGoNext:I.canGoNext,canGoPrevious:I.canGoPrevious,registerSlide:I.registerSlide,unregisterSlide:I.unregisterSlide,styles:{...Zo(),...C},contentId:I.contentId,infinite:y},children:r.jsx(i.View,{role:"region","aria-roledescription":"carousel","aria-label":"Carousel",position:"relative",width:"100%",height:"100%",overflow:"hidden",...C==null?void 0:C.container,...v,children:e})}):r.jsxs(i.View,{position:"relative",width:"100%",height:"100%",overflow:"hidden",onMouseEnter:A,onMouseLeave:H,onTouchStart:z,onTouchMove:P,onTouchEnd:V,onMouseDown:z,onMouseMove:P,onMouseUp:V,...C==null?void 0:C.container,...v,children:[r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...C==null?void 0:C.slideWrapper,children:b.map((O,N)=>r.jsx(fa,{isActive:N===T,index:N,views:C==null?void 0:C.slide,children:O},N))}),M(),L()]})},$e=e=>r.jsx(h0,{...e});$e.Slide=fa,$e.Content=ya,$e.Item=ua,$e.Previous=ma,$e.Next=pa;const Le={blue:"color-blue-500",green:"color-green-500",purple:"color-purple-500",orange:"color-orange-500",red:"color-red-500",teal:"color-teal-500",pink:"color-pink-500",indigo:"color-indigo-500",yellow:"color-yellow-500",cyan:"color-cyan-500"},ba=[Le.blue,Le.green,Le.purple,Le.orange,Le.red,Le.teal,Le.pink,Le.indigo,Le.yellow,Le.cyan],Wo=ba,f0={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},m0={fontSize:"18px",fontWeight:"700",marginBottom:"24px",textAlign:"center",color:"color-gray-900"},p0={display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginTop:"16px",gap:"12px"},u0={display:"flex",alignItems:"center",padding:"4px 8px",borderRadius:"6px",cursor:"pointer",transition:"background-color 0.2s ease",_hover:{backgroundColor:"color-gray-50"}},y0={width:"10px",height:"10px",borderRadius:"50%",marginRight:"8px"},b0={fontSize:"13px",fontWeight:"500",color:"color-gray-600"},Wr={position:"absolute",backgroundColor:"color-white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0px 12px 24px rgba(15, 23, 42, 0.18)",border:"1px solid color-gray-200",fontSize:"14px",display:"flex",flexDirection:"column",pointerEvents:"none",zIndex:100},xa={stroke:"color-gray-100",strokeWidth:"1px",strokeDasharray:"4 4"},Hr={stroke:"color-gray-200",strokeWidth:"1px"},jr={fontSize:"12px",fill:"color-gray-500",fontWeight:"500"},x0={rx:"4px",ry:"4px",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{filter:"brightness(1.1)"}},k0={strokeWidth:"3px",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transition:"stroke-width 0.2s ease"},C0={r:"5px",strokeWidth:"2.5px",stroke:"color-white",cursor:"pointer",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{r:"7px"}},Pr={strokeWidth:"2px",stroke:"color-white",cursor:"pointer",transition:"all 0.3s ease",_hover:{transform:"scale(1.02)"}},Vt={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-white-800",borderRadius:"4px",zIndex:10,padding:"24px",textAlign:"center"},w0={...Vt},S0={...Vt,backgroundColor:"rgba(254, 242, 242, 0.8)",color:"color-red-600"},v0={...Vt,backgroundColor:"rgba(249, 250, 251, 0.8)",color:"color-gray-500"},T0=({data:e,dataPoints:o,animated:t=!0,animationDuration:n=500,showTooltips:a=!0})=>{const[l,c]=h.useState(t?0:1),[s,d]=h.useState({visible:!1,x:0,y:0,content:null}),g=h.useRef(null),m=h.useRef(null);h.useEffect(()=>{if(!t){c(1);return}const S=Date.now(),w=()=>{const v=Date.now()-S,b=Math.min(v/n,1);c(b),b<1&&(g.current=requestAnimationFrame(w))};return g.current=requestAnimationFrame(w),()=>{g.current&&cancelAnimationFrame(g.current)}},[t,n]);const[f,p]=h.useState(new Set),u=h.useCallback(S=>{p(w=>{const v=new Set(w);return v.has(S)?v.delete(S):v.add(S),v})},[]),y=h.useCallback(()=>e?{...e,series:e.series.map((S,w)=>({...S,color:S.color||Wo[w%Wo.length],hidden:f.has(S.name)}))}:o?o.map((S,w)=>({...S,color:S.color||Wo[w%Wo.length],hidden:f.has(S.label)})):null,[e,o,f]),k=h.useCallback((S,w,v)=>{a&&d({visible:!0,x:S,y:w,content:v})},[a]),x=h.useCallback(()=>{d(S=>({...S,visible:!1}))},[]),C=h.useCallback(()=>{if(!m.current)return{width:0,height:0};const{width:S,height:w}=m.current.getBoundingClientRect();return{width:S,height:w}},[]);return{animationProgress:l,tooltip:s,containerRef:m,processedData:y,showTooltip:k,hideTooltip:x,getChartDimensions:C,toggleSeries:u}},I0=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onBarClick:l,showTooltip:c,hideTooltip:s,views:d})=>{const{getColor:g}=i.useTheme(),m={top:20,right:20,bottom:40,left:50},f=o-m.left-m.right,p=t-m.top-m.bottom,u=h.useMemo(()=>{let b=0;return e.series.forEach(I=>{I.data.forEach(T=>{b=Math.max(b,T)})}),b},[e]),y=e.labels.length,k=e.series.length,x=f/y,C=x*.8/k,S=x*.2/(k+1),w=u||10,v=h.useMemo(()=>{const I=[];for(let T=0;T<=5;T++){const j=w/5*T;I.push(j)}return I},[u]);return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((b,I)=>{const T=b.color?g(b.color):"black";return r.jsxs("linearGradient",{id:`bar-gradient-${I}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:T,stopOpacity:1}),r.jsx("stop",{offset:"100%",stopColor:T,stopOpacity:.7})]},`bar-gradient-${I}`)})}),r.jsx("line",{x1:m.left,y1:t-m.bottom,x2:o-m.right,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),r.jsx("line",{x1:m.left,y1:m.top,x2:m.left,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),e.labels.map((b,I)=>{const T=m.left+(I+.5)*x,j=t-m.bottom+20;return r.jsx("text",{x:T,y:j,textAnchor:"middle",...jr,...d==null?void 0:d.axisLabel,children:b},`x-label-${I}`)}),v.map((b,I)=>{const T=t-m.bottom-b/w*p;return r.jsxs(h.Fragment,{children:[r.jsx("text",{x:m.left-10,y:T,textAnchor:"end",dominantBaseline:"middle",...jr,...d==null?void 0:d.axisLabel,children:b.toFixed(0)}),a&&r.jsx("line",{x1:m.left,y1:T,x2:o-m.right,y2:T,...xa,...d==null?void 0:d.grid})]},`y-tick-${I}`)}),e.series.map((b,I)=>b.hidden?null:r.jsx(h.Fragment,{children:b.data.map((T,j)=>{const E=T/w*p*n,D=m.left+j*x+S*(I+1)+C*I,W=t-m.bottom-E,A=e.labels[j],H=e.series.reduce((L,_)=>{const O=_.data[j];return L+(typeof O=="number"?O:0)},0),z=H>0?(T/H*100).toFixed(1):null,P=b.color?g(b.color):"black",V=L=>{const _=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"180px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:b.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:P})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:A}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:T.toLocaleString()})]}),z!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${z}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:H.toLocaleString()})]})]})]}),O=L.currentTarget.getBoundingClientRect(),N=O.left+O.width/2,U=O.top;c(N,U,_)},M=()=>{l&&l(b.name,j)};return r.jsx("rect",{x:D,y:W,width:C,height:E,fill:`url(#bar-gradient-${I})`,onMouseEnter:V,onMouseMove:V,onMouseLeave:s,onClick:M,...x0,...d==null?void 0:d.bar},`bar-${I}-${j}`)})},`series-${I}`))]})},F0=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onPointClick:l,showTooltip:c,hideTooltip:s,views:d})=>{const{getColor:g}=i.useTheme(),m={top:20,right:20,bottom:40,left:40},f=o-m.left-m.right,p=t-m.top-m.bottom,u=h.useMemo(()=>{let S=0;return e.series.forEach(w=>{w.data.forEach(v=>{S=Math.max(S,v)})}),S},[e]),y=u||10,k=h.useMemo(()=>{const w=[];for(let v=0;v<=5;v++){const b=y/5*v;w.push(b)}return w},[u]),x=S=>{if(S.length<2)return"";const w=S.map((b,I)=>({x:m.left+I/(e.labels.length-1)*f,y:t-m.bottom-b/y*p*n}));let v=`M ${w[0].x},${w[0].y}`;for(let b=0;b<w.length-1;b++){const I=w[b===0?b:b-1],T=w[b],j=w[b+1],E=w[b+2===w.length?b+1:b+2],D=T.x+(j.x-I.x)/6,W=T.y+(j.y-I.y)/6,A=j.x-(E.x-T.x)/6,H=j.y-(E.y-T.y)/6;v+=` C ${D},${W} ${A},${H} ${j.x},${j.y}`}return v},C=S=>{if(S.length<2)return"";const w=x(S),v=m.left,b=m.left+f,I=t-m.bottom;return`${w} L ${b},${I} L ${v},${I} Z`};return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((S,w)=>{const v=S.color?g(S.color):"black";return r.jsxs("linearGradient",{id:`gradient-${w}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:v,stopOpacity:.3}),r.jsx("stop",{offset:"100%",stopColor:v,stopOpacity:0})]},`gradient-${w}`)})}),r.jsx("line",{x1:m.left,y1:t-m.bottom,x2:o-m.right,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),r.jsx("line",{x1:m.left,y1:m.top,x2:m.left,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),e.labels.map((S,w)=>{const v=m.left+w/(e.labels.length-1)*f,b=t-m.bottom+20;return r.jsx("text",{x:v,y:b,textAnchor:"middle",...jr,...d==null?void 0:d.axisLabel,children:S},`x-label-${w}`)}),k.map((S,w)=>{const v=t-m.bottom-S/y*p;return r.jsxs(h.Fragment,{children:[r.jsx("text",{x:m.left-10,y:v,textAnchor:"end",dominantBaseline:"middle",...jr,...d==null?void 0:d.axisLabel,children:S.toFixed(0)}),a&&r.jsx("line",{x1:m.left,y1:v,x2:o-m.right,y2:v,...xa,...d==null?void 0:d.grid})]},`y-tick-${w}`)}),e.series.map((S,w)=>{if(S.hidden)return null;const v=S.color?g(S.color):"black";return r.jsxs(h.Fragment,{children:[r.jsx("path",{d:C(S.data),fill:`url(#gradient-${w})`,...d==null?void 0:d.area}),r.jsx("path",{d:x(S.data),stroke:v,...k0,...d==null?void 0:d.line}),S.data.map((b,I)=>{const T=m.left+I/(e.labels.length-1)*f,j=t-m.bottom-b/y*p*n,E=e.labels[I],D=e.series.reduce((M,L)=>{const _=L.data[I];return M+(typeof _=="number"?_:0)},0),W=D>0?(b/D*100).toFixed(1):null,A=I>0&&typeof S.data[I-1]=="number"?S.data[I-1]:null,H=typeof A=="number"?b-A:null,z=typeof H=="number"?`${H>=0?"+":""}${H.toLocaleString()}`:null,P=M=>{const L=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:S.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:v})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:E}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:b.toLocaleString()})]}),z!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Change"}),r.jsx(i.Text,{fontWeight:"medium",children:z})]}),W!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${W}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:D.toLocaleString()})]})]})]}),_=M.currentTarget.getBoundingClientRect(),O=_.left+_.width/2,N=_.top+_.height/2;c(O,N,L)},V=()=>{l&&l(S.name,I)};return r.jsx("circle",{cx:T,cy:j,fill:v,onMouseEnter:P,onMouseMove:P,onMouseLeave:s,onClick:V,...C0,...d==null?void 0:d.point},`point-${w}-${I}`)})]},`series-${w}`)})]})},z0=({dataPoints:e,width:o,height:t,animationProgress:n,isDonut:a=!1,onSliceClick:l,showTooltip:c,hideTooltip:s,views:d})=>{const{getColor:g}=i.useTheme(),{ref:m,relation:f}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),p=h.useRef(null);h.useEffect(()=>{p.current&&m&&(m.current=p.current)},[p,m]);const y=Math.min(o,t)/2*.8,k=o/2,x=t/2,C=a?y*.6:0,S=h.useMemo(()=>e.filter(b=>!b.hidden),[e]),w=h.useMemo(()=>S.reduce((b,I)=>b+I.value,0),[S]),v=h.useMemo(()=>{if(w===0)return[{path:a?[`M ${k} ${x-y}`,`A ${y} ${y} 0 1 1 ${k} ${x+y}`,`A ${y} ${y} 0 1 1 ${k} ${x-y}`,`M ${k} ${x-C}`,`A ${C} ${C} 0 1 0 ${k} ${x+C}`,`A ${C} ${C} 0 1 0 ${k} ${x-C}`,"Z"].join(" "):[`M ${k} ${x}`,`M ${k} ${x-y}`,`A ${y} ${y} 0 1 1 ${k} ${x+y}`,`A ${y} ${y} 0 1 1 ${k} ${x-y}`,"Z"].join(" "),color:"#E2E8F0",label:"Total",value:0,percentage:"0%",labelX:k,labelY:x,startAngle:0,endAngle:Math.PI*2,index:-1}];const b=[];let I=-Math.PI/2;for(let T=0;T<S.length;T++){const E=S[T].value/w,D=E*2*Math.PI*n,A=Math.max(0,D-.02),H=I+A,z=k+Math.cos(I)*y,P=x+Math.sin(I)*y,V=k+Math.cos(H)*y,M=x+Math.sin(H)*y,L=k+Math.cos(I)*C,_=x+Math.sin(I)*C,O=k+Math.cos(H)*C,N=x+Math.sin(H)*C,U=A>Math.PI?1:0;let X;a?X=[`M ${z} ${P}`,`A ${y} ${y} 0 ${U} 1 ${V} ${M}`,`L ${O} ${N}`,`A ${C} ${C} 0 ${U} 0 ${L} ${_}`,"Z"].join(" "):X=[`M ${k} ${x}`,`L ${z} ${P}`,`A ${y} ${y} 0 ${U} 1 ${V} ${M}`,"Z"].join(" ");const oe=I+A/2,B=a?(y+C)/2:y*.7,$=k+Math.cos(oe)*B,q=x+Math.sin(oe)*B,J=`${(E*100).toFixed(1)}%`,Y=S[T].color||Wo[T%Wo.length],Z=g(Y);b.push({path:X,color:Z,label:S[T].label,value:S[T].value,percentage:J,labelX:$,labelY:q,startAngle:I,endAngle:H,index:T,originalIndex:e.findIndex(ee=>ee.label===S[T].label)}),I=H}return b},[S,w,y,k,x,C,n,a,e]);return r.jsxs("svg",{ref:p,width:o,height:t,style:{overflow:"visible"},children:[a&&r.jsxs("g",{pointerEvents:"none",children:[r.jsx("circle",{cx:k,cy:x,r:C,fill:"white"}),r.jsx("text",{x:k,y:x-8,textAnchor:"middle",dominantBaseline:"middle",fontSize:"14px",fontWeight:"500",fill:"color-gray-500",children:"Total"}),r.jsx("text",{x:k,y:x+12,textAnchor:"middle",dominantBaseline:"middle",fontSize:"20px",fontWeight:"800",fill:"color-gray-900",children:w.toLocaleString()})]}),v.map((b,I)=>{const T=D=>{const W=w>0?b.value/w*100:0,A=w>0?Math.max(0,100-W):null,H=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:b.label}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:b.color})]}),r.jsxs(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",b.index+1," of ",S.length]}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:b.value.toLocaleString()})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:b.percentage})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Total"}),r.jsx(i.Text,{fontWeight:"medium",children:w.toLocaleString()})]}),A!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Remaining"}),r.jsx(i.Text,{fontWeight:"medium",children:`${A.toFixed(1)}%`})]})]})]});let z=D.clientX,P=D.clientY;if(p.current){const V=p.current.getBoundingClientRect();z=V.left+b.labelX,P=V.top+b.labelY}c(z,P,H)},j=()=>{b.index!==-1&&l&&l(e[b.index],b.index)},E=b.index===-1;return r.jsxs("g",{children:[r.jsx("path",{d:b.path,fill:b.color,onMouseEnter:E?void 0:T,onMouseMove:E?void 0:T,onMouseLeave:E?void 0:s,onClick:j,...Pr,style:{...Pr==null?void 0:Pr.style,cursor:E?"default":"pointer"},...d==null?void 0:d.pie}),!E&&b.endAngle-b.startAngle>.25&&r.jsx("text",{x:b.labelX,y:b.labelY,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"11px",fontWeight:"800",pointerEvents:"none",paintOrder:"stroke",stroke:"rgba(0,0,0,0.2)",strokeWidth:"2px",children:b.percentage})]},`slice-${I}`)})]})},M0=({visible:e,x:o,y:t,content:n,maxDistance:a=100,views:l})=>{const c=h.useRef(null),[s,d]=h.useState({left:0,top:0});return h.useEffect(()=>{if(!e||!c.current||typeof window>"u"||typeof c.current.getBoundingClientRect!="function")return;const m=c.current.getBoundingClientRect(),f=m.width||200,p=m.height||100,u=20,y=16;let k=o-f/2,x=t-p-u;x<y&&(x=t+u),k+f>window.innerWidth-y?k=window.innerWidth-f-y:k<y&&(k=y),x=Math.max(y,Math.min(x,window.innerHeight-p-y)),d({left:k,top:x})},[e,o,t]),e?r.jsx(i.View,{ref:c,position:"fixed",left:`${s.left}px`,top:`${s.top}px`,...Wr,...l==null?void 0:l.tooltip,style:{...Wr==null?void 0:Wr.style,pointerEvents:"none",transition:"all 0.1s ease-out"},children:n}):null},W0=({type:e,data:o,dataPoints:t,title:n,showLegend:a=!0,legendPosition:l="bottom",showGrid:c=!0,showTooltips:s=!0,animated:d=!0,animationDuration:g=500,responsive:m=!0,aspectRatio:f=16/9,width:p=200,height:u=200,views:y,onDataPointClick:k,onSeriesClick:x,isLoading:C=!1,error:S,noData:w,loadingIndicator:v,errorIndicator:b,noDataIndicator:I,"aria-label":T,themeMode:j,...E})=>{const{animationProgress:D,tooltip:W,containerRef:A,processedData:H,showTooltip:z,hideTooltip:P,getChartDimensions:V,toggleSeries:M}=T0({data:o,dataPoints:t,animated:d,animationDuration:g,showTooltips:s}),L=H(),{width:_,height:O}=V(),N=p||_,U=u||(m?_/f:O),X=()=>{if(!a||!L)return null;let Z=[];return e==="pie"||e==="donut"?Array.isArray(L)&&(Z=L):L&&L.series&&(Z=L.series),!Z||Z.length===0?null:r.jsx(i.Horizontal,{flexWrap:"wrap",justifyContent:"flex-start",marginTop:l==="bottom"?"16px":0,marginBottom:l==="top"?"16px":0,...p0,...y==null?void 0:y.legend,children:Z.map((ee,ne)=>{const K=ee.hidden,re=ee.name||ee.label;return r.jsxs(i.View,{...u0,onClick:()=>M(re),opacity:K?.4:1,...y==null?void 0:y.legendItem,children:[r.jsx(i.View,{backgroundColor:ee.color,...y0,opacity:K?.3:1}),r.jsx(i.Text,{...b0,textDecoration:K?"line-through":"none",children:re})]},`legend-${ne}`)})})},oe=()=>{if(!L)return null;switch(e){case"bar":return r.jsx(I0,{data:L,width:N,height:U,animationProgress:D,showGrid:c,onBarClick:x,showTooltip:z,hideTooltip:P,views:y});case"line":case"area":return r.jsx(F0,{data:L,width:N,height:U,animationProgress:D,showGrid:c,onPointClick:x,showTooltip:z,hideTooltip:P,views:y});case"pie":case"donut":return r.jsx(z0,{dataPoints:L,width:N,height:U,animationProgress:D,isDonut:e==="donut",onSliceClick:k,showTooltip:z,hideTooltip:P,views:y});default:return null}},B=()=>C?r.jsx(i.View,{...w0,...y==null?void 0:y.loadingOverlay,children:v||r.jsx(i.Center,{children:r.jsx(eo,{size:"lg"})})}):null,$=()=>S?r.jsx(i.View,{...S0,...y==null?void 0:y.errorOverlay,children:b||r.jsx(i.Text,{fontWeight:"medium",children:typeof S=="string"?S:"An error occurred"})}):null,q=()=>w?r.jsx(i.View,{...v0,...y==null?void 0:y.noDataOverlay,children:I||r.jsx(i.Text,{children:typeof w=="string"?w:"No data available"})}):null,J=T??(typeof n=="string"?n:"Chart"),Y=!S&&!C&&!w;return r.jsxs(i.View,{ref:A,role:"region","aria-label":J,"aria-busy":C,...f0,...y==null?void 0:y.container,...E,children:[n&&r.jsx(i.Text,{...m0,children:n}),Y&&l==="top"&&X(),r.jsxs(i.View,{flex:1,width:"100%",position:"relative",...y==null?void 0:y.chart,children:[Y&&oe(),B(),$(),q(),r.jsx(M0,{visible:s&&W.visible,x:W.x,y:W.y,content:W.content,maxDistance:100,views:y})]}),Y&&l==="bottom"&&X()]})},H0=e=>r.jsx(W0,{...e}),j0=(e=365)=>{const[o,t]=h.useState(!1),[n,a]=h.useState(null),l="app-studio-cookie-consent";h.useEffect(()=>{if(typeof localStorage>"u")return;const g=localStorage.getItem(l);a(g!==null?g==="true":!1)},[]);const c=g=>{if(typeof localStorage<"u"){localStorage.setItem(l,String(g));const m=new Date;m.setDate(m.getDate()+e),localStorage.setItem(`${l}-expires`,m.toISOString())}a(g)};return{isHovered:o,setIsHovered:t,hasConsent:n,acceptCookies:()=>{c(!0)},resetConsent:()=>{typeof localStorage<"u"&&(localStorage.removeItem(l),localStorage.removeItem(`${l}-expires`)),a(!1)}}},P0=e=>({default:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-gray-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-gray-600",borderColor:"color-gray-300",hoverBackgroundColor:"color-gray-100"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-800",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}},primary:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-700"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-700",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}}}),V0=({title:e="Nous utilisons des cookies",description:o="Ce site utilise des cookies pour améliorer votre expérience. En continuant à naviguer sur ce site, vous acceptez notre utilisation des cookies conformément à notre politique de confidentialité.",acceptButtonText:t="Accepter",customizeButtonText:n="Personnaliser",position:a="bottom",variant:l="default",onAccept:c,onCustomize:s,views:d,showCustomizeButton:g=!0,cookieExpiration:m=365,themeMode:f,...p})=>{const{themeMode:u}=i.useTheme(),{hasConsent:y,acceptCookies:k}=j0(m),C=P0()[l];if(y)return null;const S=()=>{k(),c&&c()},w=()=>{s&&s()};return r.jsx(i.View,{style:{position:"fixed",left:16,right:16,zIndex:1e3,...a==="bottom"?{bottom:16}:{top:16}},padding:16,borderWidth:"1px",borderStyle:"solid",borderRadius:8,maxWidth:"800px",marginLeft:"auto",marginRight:"auto",transition:"opacity 0.3s ease, transform 0.3s ease",...C.container,...d==null?void 0:d.container,...p,children:r.jsxs(i.Vertical,{gap:12,maxWidth:1200,marginLeft:"auto",marginRight:"auto",children:[e&&r.jsx(i.Text,{fontWeight:"bold",fontSize:18,color:"color-black",...d==null?void 0:d.title,children:e}),o&&r.jsx(i.Text,{fontSize:14,color:"color-black",...d==null?void 0:d.description,children:o}),r.jsxs(i.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...d==null?void 0:d.buttonGroup,children:[g&&r.jsx(de,{variant:"outline",onClick:w,size:"sm",...d==null?void 0:d.customizeButton,children:n}),r.jsx(de,{variant:"filled",onClick:S,size:"sm",...d==null?void 0:d.acceptButton,children:t})]})]})})},A0=e=>r.jsx(V0,{...e}),E0=e=>{const{size:o,variant:t,onOpenChange:n}=e||{},[a,l]=h.useState(!1),[c,s]=h.useState({x:0,y:0}),[d,g]=h.useState(null),m=h.useRef(null),f=h.useRef(null),p=h.useMemo(()=>ct("contextmenu-content"),[]),u=h.useCallback(k=>{s({x:k.clientX,y:k.clientY}),l(!0),n==null||n(!0)},[n]),y=h.useCallback(()=>{l(!1),g(null),n==null||n(!1)},[n]);return h.useEffect(()=>{const k=S=>{f.current&&!f.current.contains(S.target)&&y()},x=()=>{a&&y()},C=S=>{S.key==="Escape"&&a&&y()};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",k),window.addEventListener("resize",x),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",k),window.removeEventListener("resize",x),document.removeEventListener("keydown",C)}},[a,y]),{isOpen:a,setIsOpen:l,position:c,setPosition:s,activeSubmenuId:d,setActiveSubmenuId:g,size:o,variant:t,triggerRef:m,contentRef:f,contentId:p,openMenu:u,closeMenu:y}},ka={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},D0={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Ca={hover:{backgroundColor:"color-gray-100"}},wa=h.createContext({isOpen:!1,setIsOpen:()=>{},position:{x:0,y:0},setPosition:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null},contentRef:{current:null},contentId:"contextmenu-content",closeMenu:()=>{},openMenu:()=>{}}),$0=({children:e,value:o})=>r.jsx(wa.Provider,{value:o,children:e}),Vr=()=>{const e=h.useContext(wa);if(!e)throw new Error("useContextMenuContext must be used within a ContextMenuProvider");return e},Sa=({children:e,disableNativeContextMenu:o=!0,asChild:t=!1,isDisabled:n=!1,views:a,...l})=>{const{triggerRef:c,contentId:s,openMenu:d}=Vr(),m={ref:c,onContextMenu:f=>{if(!n)if(o&&f.preventDefault(),d)d(f);else{const{setIsOpen:p,setPosition:u}=Vr();u({x:f.clientX,y:f.clientY}),p(!0)}},"aria-controls":s,"aria-haspopup":"menu","data-disabled":n?"":void 0,...t&&h.isValidElement(e)&&e.props.isDisabled===void 0&&{isDisabled:n},...a==null?void 0:a.container,...l};if(t&&h.isValidElement(e)){const f=h.Children.only(e);return h.cloneElement(f,{...m,...f.props})}return r.jsx(i.View,{...m,children:e})},At=({items:e,children:o,position:t,side:n="right",align:a="start",views:l,style:c,...s})=>{const{isOpen:d,position:g,contentRef:m,contentId:f,variant:p}=Vr(),u=h.useRef(null),y=m||u,{ref:k,relation:x}=i.useElementPosition({}),[C,S]=h.useState({x:0,y:0});if(h.useEffect(()=>{if(d&&y.current){const v=t||g,b=y.current.offsetWidth,I=y.current.offsetHeight,T=window.innerWidth,j=window.innerHeight;let E=v.x,D=v.y;x&&(x.space.horizontal==="left"?E=v.x-b:E=v.x,x.space.vertical==="top"?D=v.y-I:D=v.y),E+b>T&&(E=T-b-8),E<8&&(E=8),D+I>j&&(D=j-I-8),D<8&&(D=8),S({x:E,y:D})}},[d,g,t,n,a,y,x]),!d)return null;const w={position:"fixed",top:`${C.y}px`,left:`${C.x}px`,zIndex:1e3,transformOrigin:"top left"};return r.jsxs(i.View,{id:f||"context-menu",ref:y,role:"menu",tabIndex:-1,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:{...w,...c},...D0[p],...l==null?void 0:l.menu,...l==null?void 0:l.content,...s,children:[e&&e.map((v,b)=>v.divider?r.jsx(Ta,{views:l},`divider-${b}`):r.jsx(va,{item:v,views:l},v.id)),o]})},va=({item:e,children:o,onSelect:t,isDisabled:n=!1,views:a,variant:l,shape:c,isLoading:s,loaderProps:d,loaderPosition:g,icon:m,iconPosition:f,isFilled:p,isAuto:u,isIconRounded:y,isHovered:k,shadow:x,ariaLabel:C,animation:S,textColor:w,reversed:v,borderMovingDuration:b,borderMovingGradientColors:I,animatedStrokeAccentColor:T,animatedStrokeTextColor:j,to:E,isExternal:D,config:W,...A})=>{const{activeSubmenuId:H,setActiveSubmenuId:z,size:P,closeMenu:V}=Vr();if(e){const[_,O]=h.useState(!1),N=e.items&&e.items.length>0,U=H===e.id,[X,oe]=h.useState({x:0,y:0}),B=e.disabled||n,$=()=>{O(!0),N&&z(e.id)},q=()=>{O(!1)},J=()=>{B||!N&&e.onClick&&(e.onClick(),V&&V())},{ref:Y,relation:Z}=i.useElementPosition({});return h.useEffect(()=>{if(U&&Y.current){const ee=Y.current.getBoundingClientRect(),ne=window.innerWidth,K=200;let re=!1;if(Z)re=Z.space.horizontal==="left";else{const ie=ne-ee.right,ge=ee.left;re=ie<K&&ge>ie}oe({x:re?ee.left-K:ee.right,y:ee.top})}},[U,e.items,Z]),r.jsxs(i.View,{ref:Y,role:"menuitem",display:"flex",alignItems:"center",cursor:B?"not-allowed":"pointer",opacity:B?.5:1,position:"relative","aria-disabled":B,"data-disabled":B?"":void 0,...ka[P],_hover:B?{}:Ca.hover,backgroundColor:_&&!B?"color-gray-100":"transparent",onMouseEnter:$,onMouseLeave:q,onClick:J,...a==null?void 0:a.item,...A,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),r.jsx(i.View,{flexGrow:1,children:e.label}),N&&r.jsx(i.View,{marginLeft:8,...a==null?void 0:a.submenuIndicator,children:r.jsx(he,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),U&&N&&r.jsx(At,{items:e.items||[],position:X,side:"right",align:"start",views:a})]})}const M=_=>{n||(t==null||t(_),V&&V())},L=E?{as:"a",href:E,color:"inherit",textDecoration:"none",...D?{target:"_blank",rel:"noopener noreferrer"}:{}}:{};return r.jsx(i.View,{role:"menuitem",onClick:M,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,"aria-disabled":n,"data-disabled":n?"":void 0,...ka[P],_hover:n?{}:Ca.hover,...L,...a==null?void 0:a.item,...A,children:o})},Ta=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.divider,...o}),L0=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.separator,...o}),_0=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,views:l,themeMode:c,onOpenChange:s,...d})=>!o||o.length===0?r.jsx(r.Fragment,{children:e}):r.jsxs(r.Fragment,{children:[r.jsx(Sa,{disableNativeContextMenu:a,views:l,...d,children:e}),r.jsx(At,{items:o,views:l})]}),Ho=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,onOpenChange:l,views:c,...s})=>{const d=E0({size:t,variant:n,onOpenChange:l}),{isOpen:g,setIsOpen:m,position:f,setPosition:p,activeSubmenuId:u,setActiveSubmenuId:y,triggerRef:k,contentRef:x,contentId:C,openMenu:S,closeMenu:w}=d;return r.jsx($0,{value:{isOpen:g,setIsOpen:m,position:f,setPosition:p,activeSubmenuId:u,setActiveSubmenuId:y,size:t,variant:n,triggerRef:k,contentRef:x,contentId:C,openMenu:S,closeMenu:w,styles:c},children:r.jsx(_0,{items:o,size:t,variant:n,disableNativeContextMenu:a,views:c,...s,children:e})})};Ho.Trigger=Sa,Ho.Content=At,Ho.Item=va,Ho.Divider=Ta,Ho.Separator=L0;const B0=({src:e,color:o,views:t,themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=o?{fill:l(o,{themeMode:c}),stroke:l(o,{themeMode:c})}:{};return r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",...a,...t==null?void 0:t.container,children:r.jsx(i.Image,{...s,content:'url("'+e+'")',width:"100%",height:"100%",...t==null?void 0:t.image})})},O0=({path:e,...o})=>r.jsx(i.Image,{src:e,...o}),Ia=(e,o)=>o?Array.isArray(e)?e:e===""?[]:[e]:Array.isArray(e)?e[0]??"":e,Fa=({placeholder:e,isMulti:o,options:t,value:n,defaultValue:a,id:l})=>{const c=h.useId().replace(/[^a-zA-Z0-9_-]/g,""),s=l??`select-${c}`,d=n!==void 0,[g,m]=h.useState(!1),[f,p]=h.useState(!1),[u,y]=h.useState(()=>a!==void 0?Ia(a,o):o?[]:e?"":Array.isArray(t)&&t.length>0?t[0].value:""),k=d?Ia(n,o):u,x=h.useCallback(b=>{d||y(b)},[d]),[C,S]=h.useState(0),[w,v]=h.useState(!0);return{id:s,value:k,setValue:x,hide:w,setHide:v,isHovered:g,setIsHovered:m,isFocused:f,setIsFocused:p,highlightedIndex:C,setHighlightedIndex:S}},Et=({children:e,views:o={helperText:{}},...t})=>r.jsx(i.Text,{fontSize:"11px",fontWeight:"400",letterSpacing:"-0.01em",lineHeight:"16px",marginVertical:0,marginHorizontal:0,color:"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...o.helperText,...t,children:e}),Ue=h.forwardRef(({children:e,helperText:o,error:t=!1,views:n,...a},l)=>r.jsxs(i.Vertical,{ref:l,gap:4,position:"relative",width:"100%",boxSizing:"border-box",marginVertical:0,...a,...n==null?void 0:n.container,children:[e,!t&&o&&r.jsx(Et,{marginTop:0,...n==null?void 0:n.helperText,children:o}),t&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",marginTop:0,marginHorizontal:0,fontWeight:"500",color:"color-red-500",transition:"color 0.2s ease, opacity 0.2s ease",...n==null?void 0:n.error,children:t})]}));Ue.displayName="FieldContainer";const N0={default:{borderRadius:"8px"},square:{borderRadius:0},rounded:{borderRadius:"8px"},pill:{borderRadius:"9999px"}},q0={xs:"10px",sm:"11px",md:"11px",lg:"12px",xl:"12px"},U0={outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},default:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},none:{border:"none",style:{backgroundColor:"transparent"},color:"inherit",transition:"background-color 0.2s ease"}},G0={xs:{minHeight:24,paddingVertical:4,paddingHorizontal:10},sm:{minHeight:32,paddingVertical:7,paddingHorizontal:10},md:{minHeight:40,paddingVertical:9,paddingHorizontal:12},lg:{minHeight:48,paddingVertical:11,paddingHorizontal:14},xl:{minHeight:56,paddingVertical:13,paddingHorizontal:16}},Y0=e=>{const{minHeight:o,paddingVertical:t,paddingHorizontal:n}=G0[e];return{minHeight:`${o}px`,paddingTop:`${t}px`,paddingBottom:`${t}px`,paddingLeft:`${n}px`,paddingRight:`${n}px`}},oo=({label:e,shadow:o,children:t,value:n,size:a="md",shape:l="default",variant:c="default",error:s=!1,showLabel:d=!1,isFocused:g=!1,isHovered:m=!1,isDisabled:f=!1,isReadOnly:p=!1,views:u={pickerBox:{}},...y})=>{const{themeMode:k}=i.useTheme(),x=k==="dark",S=s?"color-red-500":(m||g)&&!f?"theme-primary":"color-gray-200";return r.jsx(i.Horizontal,{gap:8,width:"100%",boxSizing:"border-box",display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",borderStyle:"solid",borderColor:S,backgroundColor:x?"color-gray-900":"color-white",fontSize:i.Typography.fontSizes[a],cursor:f?"not-allowed":p?"auto":"text",opacity:f?.7:1,transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...Y0(a),...typeof o=="object"&&o!==null?o:{},...N0[l],...U0[c],...u==null?void 0:u.container,...y,children:t})},Ro=({children:e,...o})=>r.jsx(i.Horizontal,{gap:10,right:10,zIndex:500,flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",...o,children:e}),K0={h1:{fontSize:96,letterSpacing:-1.5},h2:{fontSize:60,letterSpacing:-.5},h3:{fontSize:48,letterSpacing:0},h4:{fontSize:34,letterSpacing:.25},h5:{fontSize:24,letterSpacing:0},h6:{fontSize:20,letterSpacing:.15}},X0=({children:e,heading:o,isItalic:t=!1,isUnderlined:n=!1,isStriked:a=!1,weight:l="normal",size:c="sm",dropDown:s,error:d,isDisabled:g,helperText:m,views:f,...p})=>{const u=o?K0[o]:{};return r.jsx(i.Element,{as:"label",width:"100%",fontSize:c,fontStyle:t?"italic":"normal",fontWeight:i.Typography.fontWeights[l],textDecoration:a?"line-through":n?"underline":"none",...d?{color:"color-red-500"}:g?{color:"color-gray-400"}:{},...g?{cursor:"not-allowed"}:{},...u,...p,children:e})},er=e=>r.jsx(X0,{...e}),ho=({children:e,size:o="md",error:t=!1,color:n="theme-primary",views:a={label:{}},helperText:l,...c})=>r.jsx(er,{position:"static",fontSize:q0[o],letterSpacing:"-0.01em",whiteSpace:"nowrap",fontWeight:500,color:t?"color-red-500":"inherit",transition:"color 0.2s ease",...a.label,...c,children:e}),jo=({children:e,...o})=>r.jsx(i.Vertical,{display:"flex",flexDirection:"column",gap:4,flex:1,width:"100%",maxWidth:"100%",boxSizing:"border-box",...o,children:e}),za={xs:12,sm:14,md:16,lg:18,xl:20},J0={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},Q0={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"}},Z0={padding:"10px 12px",cursor:"pointer",borderRadius:8,margin:"2px 4px",transition:"all 0.15s ease-in-out"},Ar={default:{},highlighted:{backgroundColor:"color-gray-100"},selected:{backgroundColor:"color-gray-100"},selectedHighlighted:{backgroundColor:"color-gray-200"}},Ma={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},R0={padding:"4px 8px",borderRadius:8,backgroundColor:"color-gray-100",fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},eg={scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.15) transparent"},og=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},rg=({isHovered:e,setIsHovered:o=()=>{},option:t,size:n="md",callback:a=()=>{},style:l,isSelected:c=!1,...s})=>{const d=(f,p)=>{f.stopPropagation(),f.preventDefault(),typeof a=="function"&&a(p)},g=()=>o(!e),m=()=>c&&e?Ar.selectedHighlighted:c?Ar.selected:e?Ar.highlighted:Ar.default;return r.jsxs(i.Element,{as:"li",role:"option","aria-selected":c,display:"flex",alignItems:"center",justifyContent:"space-between",listStyleType:"none",...Z0,...m(),onMouseEnter:g,onMouseLeave:g,onClick:f=>d(f,t.value),...s,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[n],fontWeight:c?"500":"400",lineHeight:"14px",color:c?"color-gray-900":"color-gray-700",...l,children:t.label}),c&&r.jsx(i.Element,{as:"span","aria-hidden":"true",color:"theme-primary",fontSize:"14px",marginLeft:8,display:"flex",alignItems:"center",children:"✓"})]})},tg=({size:e="md",views:o={field:{},text:{}},value:t,isDisabled:n,placeholder:a,removeOption:l=()=>{},options:c})=>{const s=(o==null?void 0:o.field)||{},d=(o==null?void 0:o.text)||{},g=Array.isArray(t)&&t.length>0,m={margin:0,width:"95%",height:"100%",border:"none",paddingVertical:0,paddingHorizontal:0,fontSize:i.Typography.fontSizes[e],fontWeight:"400",letterSpacing:"-0.01em",color:n?"color-gray-400":"color-gray-900",cursor:n?"not-allowed":"pointer",transition:"all 0.2s ease-in-out",...g?{}:{maxLines:1,minWidth:0},...s,...d,style:{backgroundColor:"transparent",...s.style,...d.style}},f=c.length>0&&c.find(p=>p.value===t);return r.jsx(i.Text,{...m,children:(t===""||Array.isArray(t)&&t.length===0)&&a?a:r.jsx(r.Fragment,{children:typeof t=="string"?(f&&f.label)??t:Array.isArray(t)&&t.length>0?r.jsx(i.Horizontal,{gap:6,children:t.map(p=>r.jsx(lg,{option:p,removeOption:l},p))}):r.jsx("span",{children:t})})})},ng=({id:e,name:o,value:t,onChange:n,isMulti:a=!1,isDisabled:l=!1,isReadOnly:c=!1,options:s=[],defaultValue:d,...g})=>{const m=f=>{n&&n(a?Array.from(f.target.selectedOptions,p=>p.value):f.target.value)};return r.jsx(i.Element,{id:e,name:o,as:"select",opacity:0,width:1,height:1,overflow:"hidden",position:"absolute",pointerEvents:"none",tabIndex:-1,"aria-hidden":"true",value:t,disabled:l,readOnly:c,onChange:m,multiple:a,...g,children:s.length>0&&s.map(f=>r.jsx("option",{value:f.value,children:f.label},f.value))})},ag=({size:e,views:o={},options:t,callback:n=()=>{},highlightedIndex:a,setHighlightedIndex:l=()=>{},selectedValue:c,listboxId:s,getOptionId:d})=>{const g=f=>n(f),m=f=>Array.isArray(c)?c.includes(f):c===f;return r.jsx(i.Element,{as:"ul",role:"listbox",id:s,display:"flex",flexDirection:"column",margin:0,padding:"4px",...J0,style:eg,...o==null?void 0:o.dropDown,children:t&&t.length>0&&t.map((f,p)=>r.jsx(rg,{id:d?d(p):void 0,size:e,style:o.text,option:f,callback:g,isSelected:m(f.value),isHovered:p===a,setIsHovered:()=>{},onMouseEnter:()=>l(p)},f.value))})},lg=({option:e,size:o="md",removeOption:t=()=>{},...n})=>{const a=()=>t(e);return r.jsxs(i.Horizontal,{gap:6,alignItems:"center",onClick:l=>l.stopPropagation(),...R0,_hover:{backgroundColor:"color-gray-200"},...n,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[o],fontWeight:"500",color:"color-gray-700",children:e}),r.jsx(i.Element,{as:"button",type:"button","aria-label":`Remove ${e}`,onClick:a,display:"flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",transition:"all 0.2s ease-in-out",_hover:{color:"color-gray-700"},children:r.jsx(He,{color:"inherit",widthHeight:za[o]})})]})},Wa=({id:e,name:o,label:t,value:n,placeholder:a,helperText:l,hide:c=!1,error:s=!1,isMulti:d=!1,isFocused:g=!1,isHovered:m=!1,isDisabled:f=!1,isReadOnly:p=!1,isRequired:u=!1,isAutoFocus:y=!1,options:k=[],shadow:x={},size:C="md",shape:S="default",variant:w="default",views:v={text:{},icon:{},dropDown:{},selectBox:{},label:{},helperText:{}},onChange:b=()=>{},setHide:I=()=>{},setValue:T=()=>{},setIsHovered:j=()=>{},setIsFocused:E=()=>{},setHighlightedIndex:D,highlightedIndex:W,isScrollable:A,"aria-label":H,...z})=>{const P=h.useId(),V=e??`select-${P.replace(/[^a-zA-Z0-9_-]/g,"")}`,M=`${V}-native`,L=`${V}-label`,_=`${V}-listbox`,O=K=>`${V}-option-${K}`,{ref:N,relation:U,updateRelation:X}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),oe=h.useRef(null),B=()=>{var ge;if(!N.current)return{};const K=N.current.getBoundingClientRect(),re={position:"fixed",left:K.left,width:K.width,zIndex:1e4};return((ge=U==null?void 0:U.space)==null?void 0:ge.vertical)==="top"?{...re,bottom:window.innerHeight-K.top+8}:{...re,top:K.bottom+8}};h.useEffect(()=>{const K=()=>I(!0);return document.addEventListener("closeAllSelects",K),()=>document.removeEventListener("closeAllSelects",K)},[I]),h.useEffect(()=>{var K;y&&!f&&!p&&((K=N.current)==null||K.focus())},[]),h.useEffect(()=>{const K=re=>{!re.target.closest(`#${V}`)&&!c&&I(!0)};return document.addEventListener("click",K),()=>{document.removeEventListener("click",K)}},[V,c,I]);const $=()=>j(!m),q=()=>E(!0),J=K=>{document.dispatchEvent(new Event("closeAllSelects")),K&&K.stopPropagation&&K.stopPropagation();const re=!c;I(re),E(!re)},Y=h.useCallback(K=>{if(I(!0),document.dispatchEvent(new Event("closeAllSelects")),d&&Array.isArray(n)){if(!n.includes(K)){const re=[...n,K];T(re),b&&b(re)}}else T(K),b&&b(K);E(!0)},[d,n,I,T,b,E]),Z=K=>{if(Array.isArray(n)&&n.includes(K)){const re=n.filter(ie=>ie!==K);T(re),b&&b(re)}},ee=!!t,ne=og(v);return r.jsx(Ue,{ref:N,position:"relative",width:"100%",display:"inline-block",id:V,role:"combobox","aria-haspopup":"listbox","aria-expanded":!c,"aria-labelledby":!H&&ee?L:void 0,"aria-label":H,"aria-controls":_,"aria-activedescendant":!c&&k.length>0?O(W??0):void 0,"aria-disabled":f||void 0,"aria-required":u||void 0,tabIndex:f||p?-1:0,helperText:l,error:s,views:ne,onKeyDown:K=>{if(f||p||K.target!==K.currentTarget)return;if(c){(K.key==="Enter"||K.key===" "||K.key==="ArrowDown")&&(K.preventDefault(),document.dispatchEvent(new Event("closeAllSelects")),I(!1),E(!0));return}const re=W??0;if(K.key==="ArrowDown")K.preventDefault(),D==null||D(Math.min(re+1,k.length-1));else if(K.key==="ArrowUp")K.preventDefault(),D==null||D(Math.max(re-1,0));else if(K.key==="Enter"){K.preventDefault();const ie=k[re];ie&&Y(ie.value)}else K.key==="Escape"&&(K.preventDefault(),I(!0))},onClick:K=>{K.stopPropagation(),f||p||J(K)},children:r.jsxs(oo,{label:t,size:C,error:s,shape:S,views:v,shadow:x,variant:w,value:n,color:"theme-primary",isHovered:m,isDisabled:f,isReadOnly:p,isFocused:g,showLabel:ee,onMouseEnter:$,onMouseLeave:$,position:"relative",...v==null?void 0:v.content,children:[r.jsxs(jo,{children:[ee&&r.jsx(ho,{id:L,htmlFor:M,color:"theme-primary",error:s,...v==null?void 0:v.label,children:t}),r.jsx(ng,{id:M,name:o,options:k,onChange:b,value:n,isDisabled:f,isReadOnly:p,isMulti:d,required:u||void 0,onFocus:q,...z}),r.jsx(tg,{options:k,size:C,views:v,value:n,isDisabled:f,placeholder:a,removeOption:Z})]}),r.jsx(Ro,{children:!p&&!f&&r.jsx(i.Element,{display:"flex",alignItems:"center",justifyContent:"center",style:c?Ma.closed:Ma.open,children:r.jsx(he,{color:"inherit",widthHeight:za[C],style:v.icon,orientation:"down"})})}),!c&&k.length>0&&r.jsx(ft,{children:r.jsx(i.Element,{ref:oe,onClick:K=>K.stopPropagation(),style:{...B(),...Q0.enter},children:r.jsx(ag,{size:C,views:v,options:k,callback:Y,highlightedIndex:W,setHighlightedIndex:D,selectedValue:n,listboxId:_,getOptionId:O})})})]})})},or=e=>{const o=pe("select",e),t={...o,options:o.options||[]},n=Fa(t);return r.jsx(Wa,{...n,...t,value:n.value,onClick:a=>{a.stopPropagation(),o.onClick&&o.onClick(a)}})},Ha=({isDisabled:e,isChecked:o})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(o||!1),[c,s]=h.useState(o||!1);return h.useEffect(()=>{o!==void 0&&(l(o),s(o))},[o]),{isHovered:t,setIsHovered:n,on:a,setOn:l,value:c,setValue:s}},ja={xs:{height:"10px",width:"10px"},sm:{height:"14px",width:"14px"},md:{height:"18px",width:"18px"},lg:{height:"22px",width:"22px"},xl:{height:"26px",width:"26px"}},ig={xs:{height:"20px",width:"40px"},sm:{height:"24px",width:"48px"},md:{height:"28px",width:"56px"},lg:{height:"32px",width:"64px"},xl:{height:"36px",width:"72px"}},cg={xs:{height:"22px",width:"52px"},sm:{height:"26px",width:"62px"},md:{height:"30px",width:"72px"},lg:{height:"34px",width:"84px"},xl:{height:"38px",width:"96px"}},sg={xs:"9px",sm:"10px",md:"11px",lg:"12px",xl:"13px"},Er={xs:{paddingVertical:5,paddingHorizontal:3},sm:{paddingVertical:5,paddingHorizontal:3},md:{paddingVertical:5,paddingHorizontal:5},lg:{paddingVertical:5,paddingHorizontal:5},xl:{paddingVertical:5,paddingHorizontal:5}},Ge={default:{active:"theme-primary",inactive:"color-gray-300",knob:"color-white",disabled:"color-gray-200"},states:{hover:{active:"theme-primary",inactive:"color-gray-400",activeOpacity:.9},focus:{active:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},inactive:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px color-gray-200"}}}},Pa={slider:{transition:"all 0.2s ease-in-out"},knob:{transition:"all 0.2s ease-in-out"}},dg=e=>r.jsx(i.Input,{type:"checkbox",...e}),Va=({id:e,name:o,label:t,inActiveChild:n,isChecked:a,activeChild:l,labelPosition:c="right",shadow:s={},size:d="sm",value:g=!1,isHovered:m=!1,isDisabled:f=!1,isReadOnly:p=!1,on:u,setOn:y=()=>{},onChange:k,setValue:x=()=>{},setIsHovered:C=()=>{},helperText:S,description:w,views:v={slider:{},circle:{},label:{}},...b})=>{const I=h.useId(),T=e??I,[j,E]=h.useState(!1),D=typeof a=="boolean"?a:g,A=!!(l||n)?cg[d]:ig[d],H=`${Er[d].paddingHorizontal}px`,z=`${Er[d].paddingHorizontal+2}px`,P=`calc(${ja[d].width} + ${Er[d].paddingHorizontal}px + 4px)`,V=sg[d],M=B=>{if(!p&&!f){const $=B.target.checked;x($),y($),k&&k($)}},L=()=>C(!0),_=()=>C(!1),O=B=>{let $=!0;try{$=B.target.matches(":focus-visible")}catch{}E($)},N=()=>E(!1),U=`${T}-description`,X={container:{gap:12,display:"flex",height:"fit-content",width:"fit-content",alignItems:"center",cursor:f?"not-allowed":p?"default":"pointer",opacity:f?.6:1,transition:"all 0.2s ease-in-out",...v.label}},oe=r.jsxs(er,{htmlFor:T,onMouseEnter:L,onMouseLeave:_,...X.container,children:[c==="left"&&t&&r.jsx(i.Text,{fontWeight:"500",color:f?"color-gray-400":"inherit",transition:"color 0.2s ease, opacity 0.2s ease",children:t}),r.jsxs(i.View,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",marginBottom:4,borderRadius:"9999px",backgroundColor:f?Ge.default.disabled:D?m?Ge.states.hover.active:Ge.default.active:m?Ge.states.hover.inactive:Ge.default.inactive,opacity:!f&&D&&m?Ge.states.hover.activeOpacity:1,cursor:"pointer",...Pa.slider,...s,...Er[d],...A,...v.slider,...j?D?Ge.states.focus.active:Ge.states.focus.inactive:{},children:[r.jsx(dg,{id:T,name:o,role:"switch","aria-checked":D,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:2,cursor:f?"not-allowed":p?"default":"pointer",checked:D,onChange:M,onFocus:O,onBlur:N,disabled:f,readOnly:p,"aria-describedby":w?U:void 0,...b}),l&&D&&r.jsx(i.View,{marginLeft:z,marginRight:P,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:V,color:"color-white",fontWeight:600,children:l}),r.jsx(i.View,{position:"absolute",top:"50%",left:D?void 0:H,right:D?H:void 0,borderRadius:"50%",backgroundColor:Ge.default.knob,boxShadow:m?"0 4px 10px rgba(15, 23, 42, 0.18)":"0 1px 3px rgba(15, 23, 42, 0.18)",transform:`translateY(-50%) ${m?"scale(1.05)":"scale(1)"}`,...Pa.knob,zIndex:1,...ja[d],...v.circle}),n&&!D&&r.jsx(i.View,{marginLeft:P,marginRight:z,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:V,color:"color-white",fontWeight:600,children:n})]}),c==="right"&&t&&r.jsx(i.Text,{fontWeight:"500",color:f?"color-gray-400":"inherit",transition:"all 0.2s ease-in-out",children:t})]});return w?r.jsxs(i.Vertical,{gap:4,width:"fit-content",children:[oe,r.jsx(i.Text,{id:U,color:"color-gray-500",fontSize:"14px",lineHeight:"20px",children:w})]}):oe},Dt=e=>{const o=pe("switch",e),t=Ha(o);return r.jsx(Va,{...t,...o})},Aa=({placeholder:e,isMulti:o,options:t,id:n})=>{const a=h.useId().replace(/[^a-zA-Z0-9_-]/g,""),l=n??`selector-${a}`,c=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[s,d]=h.useState(!1),[g,m]=h.useState(!1),[f,p]=h.useState(c),[u,y]=h.useState(!0);return{id:l,value:f,setValue:p,hide:u,setHide:y,isHovered:s,setIsHovered:d,isFocused:g,setIsFocused:m}},Ea=({id:e,name:o,label:t,value:n,views:a={},options:l=[],helperText:c,error:s=!1,isDisabled:d=!1,isReadOnly:g=!1,onChange:m=()=>{},setValue:f=()=>{},hide:p,setHide:u,isHovered:y,setIsHovered:k,isFocused:x,setIsFocused:C,placeholder:S,isMulti:w,shape:v,variant:b,size:I,shadow:T,isScrollable:j,"aria-label":E,...D})=>{const W=h.useId(),A=e??W,H=`${A}-label`,z=`${A}-helper-text`,P=!!c,V=h.useCallback(M=>{d||g||(f(M.value),m&&m(M.value))},[f,m,d,g]);return r.jsxs(Ue,{id:A,width:"100%",views:a,...D,children:[t&&r.jsxs(i.Horizontal,{fontSize:"10px",letterSpacing:"wider",color:"color-black-500",fontWeight:"bold",marginBottom:12,alignItems:"center",gap:6,style:{textTransform:"uppercase"},children:[r.jsx(Re,{widthHeight:14})," ",r.jsx(i.Text,{id:H,children:t})]}),r.jsx(i.Horizontal,{gap:0,role:"radiogroup","aria-labelledby":!E&&t?H:void 0,"aria-label":E,"aria-describedby":P?z:void 0,"aria-readonly":g||void 0,"aria-invalid":s?!0:void 0,children:l.map((M,L,_)=>{const O=n===M.value,N=M.color??"theme-primary",U=O?N:"color-gray-200",X=O?N:"color-gray-500",oe=L===0,B=L===_.length-1,$=B||O;return r.jsx(i.View,{as:"button",type:"button",role:"radio","aria-checked":O,disabled:d,onClick:()=>V(M),flex:1,minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",paddingVertical:6,paddingHorizontal:12,fontSize:"12px",fontWeight:O?"bold":"normal",cursor:d?"not-allowed":g?"default":"pointer",backgroundColor:"transparent",color:X,borderStyle:"solid",borderColor:U,borderTopWidth:1,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:$?1:0,borderRadius:oe?"6px 0 0 6px":B?"0 6px 6px 0":"0",zIndex:O?1:0,transition:"color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease",...a.item,children:M.label},M.value)})}),r.jsx("input",{type:"hidden",id:`${A}-input`,name:o,value:Array.isArray(n)?n.join(","):n,onChange:()=>{}}),P&&r.jsx(i.Text,{id:z,fontSize:"11px",lineHeight:"16px",marginTop:0,fontWeight:s?"500":"400",color:s?"color-red-500":"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...a.helperText,children:c})]})},gg=e=>{const o={...e,options:e.options||[]},t=Aa(o);return r.jsx(Ea,{...t,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},Da=({label:e,placeholder:o,value:t})=>{const[n,a]=h.useState(e??o),[l,c]=h.useState(!1),[s,d]=h.useState(t||""),[g,m]=h.useState(!1);return h.useMemo(()=>{a(g&&!s?o??"":e??o)},[s,g,e,o]),{hint:n,setHint:a,isHovered:l,setIsHovered:c,value:s,setValue:d,isFocused:g,setIsFocused:m}},hg=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},fg=(e,o)=>{if(o!=="pill")return e;if(typeof e=="number")return Math.min(e,28);if(typeof e=="string"){const t=Number.parseFloat(e);if(Number.isFinite(t)&&e.trim().endsWith("px"))return`${Math.min(t,28)}px`}return"28px"},$a=({id:e,name:o,hint:t,error:n,value:a,label:l,shadow:c,helperText:s,placeholder:d,size:g="sm",shape:m="default",variant:f="default",isHovered:p=!1,isFocused:u=!1,isEditable:y=!0,isReadOnly:k=!1,isDisabled:x=!1,isAutoFocus:C=!1,isRequired:S,required:w,labelProps:v,maxRows:b=3,maxCols:I=30,onBlur:T=()=>{},onChange:j,onFocus:E,setHint:D=()=>{},setValue:W=()=>{},setIsFocused:A=()=>{},setIsHovered:H=()=>{},onChangeText:z,inputRef:P,views:V={label:{},helperText:{}},...M})=>{const L=h.useId(),_=e??L,O=!!l,N={xs:{minHeight:"72px",shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:"88px",shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:"104px",shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:"120px",shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:"136px",shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},U=(V==null?void 0:V.field)||{},X=(V==null?void 0:V.container)||{},oe=fg(X.borderRadius,m),B={...V,container:{...X,...oe!==void 0?{borderRadius:oe}:{},overflow:"hidden"}},$=hg(V),q={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:N[g].minHeight,maxHeight:"calc(100vh - 100px)",border:"none",on:{focus:{outline:"none"}},fontSize:N[g].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:x?"color-gray-400":"color-gray-900",cursor:x?"not-allowed":"text",opacity:x?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",...U,style:{backgroundColor:"transparent",...U.style}},J=()=>{A(!0),E&&E()},Y=ee=>{T(ee),A(!1)},Z=ee=>{const ne=typeof ee=="string"?ee:ee.target.value;W(ne),z&&z(ne),j&&j(ne)};return r.jsx(Ue,{helperText:s,error:n,views:$,children:r.jsx(oo,{label:l,size:g,error:n,shape:m,views:B,shadow:c,variant:f,value:a,color:"theme-primary",isHovered:p,isDisabled:x,isReadOnly:k,isFocused:u,showLabel:O,alignItems:"flex-start",minHeight:N[g].minHeight,paddingTop:N[g].shellPaddingY,paddingBottom:N[g].shellPaddingY,paddingLeft:N[g].shellPaddingX,paddingRight:N[g].shellPaddingX,onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1),...B==null?void 0:B.content,children:r.jsxs(jo,{...V==null?void 0:V.warper,children:[O&&r.jsx(ho,{htmlFor:_,color:"theme-primary",error:n,...v,...V==null?void 0:V.label,children:l}),r.jsx(i.Element,{ref:P,as:"textarea",id:_,name:o,rows:b,cols:I,value:a,readOnly:k||!y,disabled:x,autoFocus:C,...S??w?{required:!0,"aria-required":!0}:{},placeholder:d||t,onBlur:Y,onFocus:J,onChange:ee=>Z(ee),...q,...M,style:{resize:x||k||!y?"none":"vertical",...q.style,...M.style||{}},...V==null?void 0:V.textarea})]})})})},$t=e=>{const o=pe("textarea",e),t=Da(o);return r.jsx($a,{...t,...o})},Lt=({label:e,placeholder:o,value:t})=>{const[n,a]=h.useState(e??o),[l,c]=h.useState(!1),[s,d]=h.useState(!1),[g,m]=h.useState(t);return h.useMemo(()=>{a(l&&!g?o??"":e??o)},[g,l,e,o]),{hint:n,setHint:a,isFocused:l,setIsFocused:c,isHovered:s,setIsHovered:d,setValue:m,value:g}},rr=({id:e,name:o,label:t,hint:n,value:a,onChange:l,left:c,right:s,helperText:d,placeholder:g,onChangeText:m,shadow:f={},views:p={container:{},field:{},label:{},helperText:{},text:{}},size:u="md",shape:y="default",variant:k="default",error:x=!1,isFocused:C=!1,isHovered:S=!1,isDisabled:w=!1,isReadOnly:v=!1,isClearable:b=!0,isAutoFocus:I=!1,isRequired:T,required:j,labelProps:E,leftIcon:D,rightIcon:W,setHint:A=()=>{},setIsFocused:H=()=>{},setIsHovered:z=()=>{},setValue:P=()=>{},onClick:V=()=>{},onFocus:M,onBlur:L=()=>{},themeMode:_,inputRef:O,...N})=>{const U=h.useId(),X=e??U,{getColor:oe,themeMode:B}=i.useTheme(),$=oe(w?"color-gray-400":"color-gray-500",{themeMode:_||B}),q=!!t,J={xs:{minHeight:24,shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:32,shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:40,shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:48,shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:56,shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},Y=(p==null?void 0:p.field)||{},Z="0 0 0 1000px var(--theme-canvas) inset",ee={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:"auto",border:"none",backgroundColor:"transparent",fontSize:J[u].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:w?"color-gray-400":"color-gray-900",cursor:w?"not-allowed":"text",opacity:w?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",_focus:{outline:"none",_placeholder:{opacity:.7}},_placeholder:{color:"color-gray-400",opacity:1,transition:"opacity 0.2s ease-out"},_selection:{backgroundColor:"color-mix(in srgb, var(--theme-primary) 20%, transparent)"},_webkitAutofill:{boxShadow:Z,WebkitBoxShadow:Z,WebkitTextFillColor:"var(--theme-text)",transition:"background-color 5000s ease-in-out 0s"},_webkitContactsAutoFillButton:{visibility:"hidden",pointerEvents:"none",position:"absolute",right:0},...Y},ne=()=>{H(!0),M&&M()},K=()=>z(!0),re=()=>z(!1),ie=ce=>{L&&L(ce),H(!1)},ge=ce=>{typeof ce=="string"?(P(ce),m&&m(ce),l&&l(ce)):(P(ce.target.value),m&&m(ce.target.value),l&&l(ce.target.value))},We=()=>{P(""),m&&m(""),l&&l(""),L({target:{name:o}})},{container:le,content:te,...ae}=p||{};return r.jsx(Ue,{helperText:d,error:x,views:ae,children:r.jsxs(oo,{label:t,size:u,error:x,shape:y,views:p,shadow:f,variant:k,value:a,color:"theme-primary",isHovered:S,isDisabled:w,isReadOnly:v,isFocused:C,showLabel:q,onMouseEnter:K,onMouseLeave:re,children:[c,D&&r.jsx(Ro,{children:D}),r.jsxs(jo,{children:[q&&r.jsx(ho,{htmlFor:X,color:"theme-primary",error:x,...E,...p==null?void 0:p.label,children:t}),r.jsx(i.Input,{ref:O,type:"text",id:X,name:o,readOnly:v,disabled:w,autoFocus:I,...T??j?{required:!0,"aria-required":!0}:{},placeholder:g||n,onFocus:ne,onBlur:ie,autoComplete:"off",...ee,...N,onChange:ge,value:a})]}),b&&a&&!v&&!w&&r.jsx(Ro,{children:r.jsx(He,{size:20,color:$,onClick:We,cursor:"pointer",borderRadius:"50%",transition:"background-color 0.2s ease, transform 0.2s ease",_hover:{backgroundColor:"color-gray-100",transform:"scale(1.05)"},_active:{transform:"scale(0.95)"}})}),W&&r.jsx(Ro,{children:W}),s]})})},je=e=>{const o=pe("input",e),t=Lt(o);return r.jsx(rr,{...t,...o})},La=({defaultIsSelected:e=!1})=>{const[o,t]=h.useState(!1),[n,a]=h.useState(e);return{isHovered:o,setIsHovered:t,isSelected:n,setIsSelected:a}},mg={xs:{height:"12px",width:"12px"},sm:{height:"16px",width:"16px"},md:{height:"20px",width:"20px"},lg:{height:"24px",width:"24px"},xl:{height:"28px",width:"28px"}},_a={xs:10,sm:14,md:16,lg:20,xl:24},pg={selected:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},unselected:{backgroundColor:"transparent",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",color:"inherit",transition:"all 0.2s ease-in-out"},indeterminate:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},Dr={hover:{selected:{opacity:.9},unselected:{borderColor:"color-gray-400",backgroundColor:"color-gray-50"},indeterminate:{opacity:.9}},focus:{selected:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},unselected:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},indeterminate:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}},disabled:{selected:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},unselected:{borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},indeterminate:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"}},error:{selected:{backgroundColor:"color-red-500",borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"},indeterminate:{backgroundColor:"color-red-500",borderColor:"color-red-500"}}},Ba=({id:e,icon:o,name:t,label:n,isChecked:a,onChange:l,onValueChange:c,shadow:s={},labelPosition:d="right",size:g="md",error:m=!1,isSelected:f=!1,isHovered:p=!1,isDisabled:u=!1,isReadOnly:y=!1,isIndeterminate:k=!1,defaultIsSelected:x=!1,setIsSelected:C=()=>{},setIsHovered:S=()=>{},views:w={checkbox:{},label:{}},infoText:v,helperText:b,...I})=>{const T=h.useId(),j=e??T,E=h.useRef(null),[D,W]=h.useState(!1),A=!!(a||f);h.useEffect(()=>{E.current&&(E.current.indeterminate=k)},[k]);const H=()=>S(!p),z=()=>{!y&&!u&&(C&&C(!f),l&&l(!a),c&&c(!a))},P=k?"indeterminate":a||f?"selected":"unselected",V=m?Dr.error[P]:u?Dr.disabled[P]:p?Dr.hover[P]:{},M={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",color:m?"color-red-600":u?"color-gray-400":"inherit",cursor:u?"not-allowed":y?"default":"pointer",opacity:u?.6:1,transition:"all 0.2s ease-in-out",...w.label},checkbox:{...pg[P],...V,borderRadius:6,...mg[g],transition:"all 0.2s ease-in-out",...s,...w.checkbox}},L=`${j}-info`,_=`${j}-error`,O=[v?L:"",m?_:""].filter(Boolean).join(" ")||void 0;return r.jsxs(i.Vertical,{...M.container,children:[r.jsx(er,{htmlFor:j,onMouseEnter:H,onMouseLeave:H,size:i.Typography.fontSizes[g],cursor:"inherit",children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",d==="left"&&n&&r.jsx(i.Text,{size:g,fontWeight:"500",...w==null?void 0:w.label,children:n}),r.jsxs(i.Center,{position:"relative",...M.checkbox,...D?Dr.focus[P]:{},children:[r.jsx(i.Input,{ref:E,type:"checkbox",id:j,name:t,checked:A,"aria-checked":k?"mixed":void 0,onChange:z,onFocus:()=>W(!0),onBlur:()=>W(!1),disabled:u,readOnly:y,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:u?"not-allowed":y?"default":"pointer","aria-describedby":O,...I}),k?r.jsx(Nn,{widthHeight:_a[g],color:"color-white",transition:"opacity 0.2s ease"}):(a||f)&&(o??r.jsx(Jo,{widthHeight:_a[g],color:"color-white",transition:"opacity 0.2s ease"}))]}),d==="right"&&n&&r.jsx(i.Text,{size:g,fontWeight:"500",...w==null?void 0:w.label,children:n})]})}),v&&r.jsx(i.Text,{id:L,marginLeft:d==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...w==null?void 0:w.infoText,children:v}),m&&r.jsx(i.Text,{id:_,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"all 0.2s ease-in-out",children:m})]})},_t=e=>{const o=pe("checkbox",e),t=La(o);return r.jsx(Ba,{...t,...o})},Oa=({defaultIsSelected:e=!1,isChecked:o})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(o!==void 0?o:e);return h.useEffect(()=>{o!==void 0&&l(o)},[o]),{isHovered:t,setIsHovered:n,isSelected:a,setIsSelected:l}},ug={xs:{height:"16px",width:"16px"},sm:{height:"20px",width:"20px"},md:{height:"24px",width:"24px"},lg:{height:"28px",width:"28px"},xl:{height:"32px",width:"32px"}},yg={xs:{height:"8px",width:"8px"},sm:{height:"10px",width:"10px"},md:{height:"12px",width:"12px"},lg:{height:"14px",width:"14px"},xl:{height:"16px",width:"16px"}},bg={selected:{borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid"},unselected:{borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"}}},xg={selected:{backgroundColor:"theme-primary"},unselected:{style:{backgroundColor:"transparent"}}},Bt={hover:{selected:{borderColor:"color-blue-600"},unselected:{borderColor:"color-gray-400"}},disabled:{selected:{borderColor:"color-gray-300",opacity:.6},unselected:{borderColor:"color-gray-300",opacity:.6}},error:{selected:{borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"}}},Ot={hover:{selected:{backgroundColor:"color-blue-600"},unselected:{style:{backgroundColor:"transparent"}}},disabled:{selected:{backgroundColor:"color-gray-300",opacity:.6},unselected:{opacity:.6,style:{backgroundColor:"transparent"}}},error:{selected:{backgroundColor:"color-red-500"},unselected:{style:{backgroundColor:"transparent"}}}},Na=({id:e,icon:o,name:t,label:n,value:a,isChecked:l,onChange:c,onValueChange:s,shadow:d={},labelPosition:g="right",size:m="md",error:f=!1,isSelected:p=!1,isHovered:u=!1,isDisabled:y=!1,isReadOnly:k=!1,defaultIsSelected:x=!1,setIsSelected:C=()=>{},setIsHovered:S=()=>{},views:w={radio:{},label:{}},infoText:v,helperText:b,...I})=>{const T=h.useId(),j=e??T,[E,D]=h.useState(!1),W=()=>S(!u),A=()=>{!k&&!y&&(C&&C(!0),c&&c(a??""),s&&s(a??""))},H=l||p?"selected":"unselected",z=f?Bt.error[H]:y?Bt.disabled[H]:u?Bt.hover[H]:{},P=f?Ot.error[H]:y?Ot.disabled[H]:u?Ot.hover[H]:{},V={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",selected:{borderColor:"theme-primary"},color:f?"color-red-600":y?"color-gray-400":"inherit",cursor:y?"not-allowed":k?"default":"pointer",opacity:y?.6:1,transition:"all 0.2s ease-in-out",...w.label},radio:{...bg[H],...z,borderRadius:"50%",selected:{backgroundColor:"theme-primary"},backgroundColor:"color-white",...ug[m],transition:"all 0.2s ease-in-out",...d,...w.radio},dot:{...xg[H],...P,borderRadius:"50%",...yg[m],transition:"all 0.2s ease-in-out"}},M=`${j}-info`,L=`${j}-error`,_=[v?M:"",f?L:""].filter(Boolean).join(" ")||void 0;return r.jsxs(i.Vertical,{...V.container,children:[r.jsx(er,{htmlFor:j,onMouseEnter:W,onMouseLeave:W,size:i.Typography.fontSizes[m],cursor:"inherit",children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",g==="left"&&n&&r.jsx(i.Text,{size:m,fontWeight:"500",...w==null?void 0:w.label,children:n}),r.jsxs(i.Center,{position:"relative",...V.radio,...E?{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}:{},children:[r.jsx(i.Input,{type:"radio",id:j,name:t,value:a??"",checked:!!(l||p),onChange:A,onFocus:()=>D(!0),onBlur:()=>D(!1),disabled:y,readOnly:k,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:y?"not-allowed":k?"default":"pointer","aria-describedby":_,...I}),(l||p)&&r.jsx(i.View,{...V.dot})]}),g==="right"&&n&&r.jsx(i.Text,{size:m,fontWeight:"500",...w==null?void 0:w.label,children:n})]})}),v&&r.jsx(i.Text,{id:M,marginLeft:g==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...w==null?void 0:w.infoText,children:v}),f&&r.jsx(i.Text,{id:L,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"color 0.2s ease, opacity 0.2s ease",children:f})]})},Nt=e=>{const o=pe("radio",e),t=Oa(o);return r.jsx(Na,{...t,...o})},kg=({value:e,defaultValue:o="",onChange:t})=>{const[n,a]=h.useState(e!==void 0?e:o);return h.useEffect(()=>{e!==void 0&&a(e)},[e]),{selectedValue:n,setSelectedValue:c=>{e===void 0&&a(c),t&&t(c)}}},Cg=({children:e,name:o,label:t,helperText:n,error:a,selectedValue:l,setSelectedValue:c,direction:s="vertical",spacing:d=8,isDisabled:g=!1,isReadOnly:m=!1,views:f={container:{},label:{},helperText:{}},onChange:p,value:u,defaultValue:y,...k})=>{const x=s==="vertical"?i.Vertical:i.Horizontal,C=h.Children.map(e,I=>{if(h.isValidElement(I)){const T={name:o,isChecked:I.props.value===l,isDisabled:g||I.props.isDisabled,isReadOnly:m||I.props.isReadOnly,onChange:j=>{c(j),I.props.onChange&&I.props.onChange(j)}};return h.cloneElement(I,T)}return I}),S=h.useId(),w=`${S}-label`,v=`${S}-helper`,b=!!(n||a);return r.jsxs(i.Vertical,{gap:d,width:"100%",role:"radiogroup","aria-labelledby":t?w:void 0,"aria-describedby":b?v:void 0,"aria-invalid":a?!0:void 0,...f.container,...k,children:[t&&r.jsx(i.Text,{id:w,fontWeight:"600",fontSize:"14px",color:a?"color-red-600":"inherit",marginBottom:4,...f.label,children:t}),r.jsx(x,{gap:d,children:C}),b&&r.jsx(i.Text,{id:v,fontWeight:a?"500":"400",fontSize:"14px",lineHeight:"20px",color:a?"color-red-500":"color-gray-500",marginTop:4,transition:"color 0.2s ease, opacity 0.2s ease",...f.helperText,children:a||n})]})},wg=e=>{const o=kg(e);return r.jsx(Cg,{...o,...e})},fo=e=>Math.min(255,Math.max(0,Math.round(e))),Sg=e=>{const o=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!o)return null;let t=o[1];return t.length===3&&(t=t.split("").map(n=>n+n).join("")),{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}},vg=e=>{const o=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?{r:fo(Number(o[1])),g:fo(Number(o[2])),b:fo(Number(o[3]))}:null},Tg=(e,o,t)=>{const n=(e%360+360)%360,a=Math.min(100,Math.max(0,o))/100,l=Math.min(100,Math.max(0,t))/100,c=(1-Math.abs(2*l-1))*a,s=c*(1-Math.abs(n/60%2-1)),d=l-c/2;let g;return n<60?g=[c,s,0]:n<120?g=[s,c,0]:n<180?g=[0,c,s]:n<240?g=[0,s,c]:n<300?g=[s,0,c]:g=[c,0,s],{r:fo((g[0]+d)*255),g:fo((g[1]+d)*255),b:fo((g[2]+d)*255)}},Ig=e=>{const o=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?Tg(Number(o[1]),Number(o[2]),Number(o[3])):null},Fg=e=>Sg(e)??vg(e)??Ig(e),zg=({r:e,g:o,b:t})=>{const n=e/255,a=o/255,l=t/255,c=Math.max(n,a,l),s=Math.min(n,a,l),d=c-s,g=(c+s)/2;if(d===0)return{h:0,s:0,l:Math.round(g*100)};const m=d/(1-Math.abs(2*g-1));let f;return c===n?f=(a-l)/d%6:c===a?f=(l-n)/d+2:f=(n-a)/d+4,f=Math.round(f*60),f<0&&(f+=360),{h:f,s:Math.round(m*100),l:Math.round(g*100)}},qt=e=>fo(e).toString(16).padStart(2,"0"),$r=(e,o)=>{if(!o||!e)return e;const t=Fg(e);if(!t)return e;switch(o){case"hex":return`#${qt(t.r)}${qt(t.g)}${qt(t.b)}`;case"rgb":return`rgb(${t.r}, ${t.g}, ${t.b})`;case"hsl":{const{h:n,s:a,l}=zg(t);return`hsl(${n}, ${a}%, ${l}%)`}}},qa=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,onOpen:l,onClose:c,closeOnSelect:s=!0,maxRecentColors:d=8,showRecentColors:g=!0,isAutoFocus:m=!1,colorFormat:f}=e,[p,u]=h.useState(!1),[y,k]=h.useState(o??t),[x,C]=h.useState(""),[S,w]=h.useState([]),[v,b]=h.useState(!1),[I,T]=h.useState(!1),j=h.useRef(null),E=h.useRef(null);h.useEffect(()=>{o!==void 0&&k(o)},[o]),h.useEffect(()=>{if(g&&typeof localStorage<"u")try{const M=localStorage.getItem("colorInput-recentColors");M&&w(JSON.parse(M))}catch(M){console.warn("Failed to load recent colors from localStorage:",M)}},[g]),h.useEffect(()=>{const M=j.current;m&&M&&typeof M.focus=="function"&&M.focus()},[m]),h.useEffect(()=>{if(typeof document>"u")return;const M=L=>{p&&j.current&&E.current&&!j.current.contains(L.target)&&!E.current.contains(L.target)&&P()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[p]);const D=h.useCallback(M=>{g&&w(L=>{const _=L.filter(N=>N!==M),O=[M,..._].slice(0,d);try{typeof localStorage<"u"&&localStorage.setItem("colorInput-recentColors",JSON.stringify(O))}catch(N){console.warn("Failed to save recent colors to localStorage:",N)}return O})},[g,d]),W=h.useCallback(()=>{const M=!p;u(M),M?l==null||l():c==null||c()},[p,l,c]),A=h.useCallback(M=>{k(M),D(M);const L=$r(M,f);n==null||n(L),a==null||a(L),s&&(u(!1),c==null||c())},[n,a,s,c,D,f]),H=h.useCallback(M=>{C(M)},[]),z=h.useCallback(()=>{x&&(A(x),C(""))},[x,A]),P=h.useCallback(()=>{u(!1),c==null||c()},[c]),V=h.useCallback(M=>{k(M),n==null||n($r(M,f))},[n,f]);return{isOpen:p,selectedColor:y,recentColors:S,customColor:x,isFocused:v,isHovered:I,handleToggle:W,handleColorSelect:A,handleCustomColorChange:H,handleCustomColorSubmit:z,handleClose:P,setIsFocused:b,setIsHovered:T,setValue:V,triggerRef:j,dropdownRef:E}},tr={container:{position:"relative",display:"inline-block",width:"fit-content"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300",padding:"8px 12px",borderRadius:8},dropdown:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",gap:"8px"},recentColors:{display:"flex",gap:"4px",flexWrap:"wrap"}},Mg={xs:{height:"28px",fontSize:"10px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 16px"},xl:{height:"56px",fontSize:"20px",padding:"16px 20px"}},Wg={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Hg={default:{backgroundColor:"color-white",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},outline:{backgroundColor:"transparent",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},none:{backgroundColor:"transparent",borderColor:"transparent",borderWidth:"0px"}},jg=[{name:"Red 500",value:"color-red-500"},{name:"Orange 500",value:"color-orange-500"},{name:"Yellow 500",value:"color-yellow-500"},{name:"Green 500",value:"color-green-500"},{name:"Blue 500",value:"color-blue-500"},{name:"Indigo 500",value:"color-indigo-500"},{name:"Purple 500",value:"color-purple-500"},{name:"Pink 500",value:"color-pink-500"},{name:"Red 300",value:"color-red-300"},{name:"Orange 300",value:"color-orange-300"},{name:"Yellow 300",value:"color-yellow-300"},{name:"Green 300",value:"color-green-300"},{name:"Blue 300",value:"color-blue-300"},{name:"Indigo 300",value:"color-indigo-300"},{name:"Purple 300",value:"color-purple-300"},{name:"Pink 300",value:"color-pink-300"},{name:"Red 700",value:"color-red-700"},{name:"Orange 700",value:"color-orange-700"},{name:"Yellow 700",value:"color-yellow-700"},{name:"Green 700",value:"color-green-700"},{name:"Blue 700",value:"color-blue-700"},{name:"Indigo 700",value:"color-indigo-700"},{name:"Purple 700",value:"color-purple-700"},{name:"Pink 700",value:"color-pink-700"},{name:"Gray 100",value:"color-gray-100"},{name:"Gray 300",value:"color-gray-300"},{name:"Gray 500",value:"color-gray-500"},{name:"Gray 700",value:"color-gray-700"},{name:"Gray 900",value:"color-gray-900"},{name:"White",value:"color-white"},{name:"Black",value:"color-black"},{name:"Transparent",value:"transparent"}],Ua=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:l={},size:c="md",shape:s="default",variant:d="default",shadow:g,error:m=!1,isDisabled:f=!1,isReadOnly:p=!1,isFocused:u=!1,isHovered:y=!1,predefinedColors:k=jg,showCustomInput:x=!0,showRecentColors:C=!0,isOpen:S=!1,selectedColor:w="",recentColors:v=[],customColor:b="",handleToggle:I=()=>{},handleColorSelect:T=()=>{},handleCustomColorChange:j=()=>{},handleCustomColorSubmit:E=()=>{},handleClose:D,setIsFocused:W=()=>{},setIsHovered:A=()=>{},setValue:H,triggerRef:z,dropdownRef:P,onChange:V,onChangeComplete:M,onBlur:L,onFocus:_,onOpen:O,onClose:N,colorFormat:U,maxRecentColors:X,closeOnSelect:oe,value:B,defaultValue:$,"aria-label":q,...J})=>{const{getColor:Y}=i.useTheme(),Z=h.useId(),ee=e??Z,ne=`${ee}-label`,K=`${ee}-listbox`,re=`${ee}-helper-text`,ie=`${ee}-error-text`,ge=!!m&&typeof m=="string",We=[a?re:null,ge?ie:null].filter(Boolean).join(" ")||void 0,le={...tr.container,...l==null?void 0:l.container},te={...tr.trigger,...Mg[c],...Wg[s],...Hg[d],...m&&{borderColor:"color-red-500"},...f&&{opacity:.6,cursor:"not-allowed"},...u&&{borderColor:"theme-primary",boxShadow:"0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px rgba(29, 78, 216, 0.16)"},...y&&!f&&{borderColor:"color-gray-400"},...l==null?void 0:l.trigger,...g&&g},ae={...tr.dropdown,...l==null?void 0:l.dropdown},ce={...tr.colorGrid,...l==null?void 0:l.colorGrid},ye={...tr.recentColors,...l==null?void 0:l.recentColors},Q=w||"color-gray-200";return r.jsxs(i.View,{...le,...J,children:[t&&r.jsx(er,{id:ne,htmlFor:ee,size:c,isDisabled:f,error:m,views:l==null?void 0:l.label,children:t}),o&&r.jsx("input",{type:"hidden",name:o,value:$r(w,U)}),r.jsxs(i.View,{ref:z,id:ee,onClick:f||p?void 0:I,onKeyDown:R=>{f||p||(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),I())},onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onFocus:()=>{W(!0),_&&_()},onBlur:R=>{W(!1),L&&L(R)},tabIndex:f?-1:0,role:"button","aria-expanded":S,"aria-haspopup":"listbox","aria-controls":S?K:void 0,"aria-labelledby":!q&&t?ne:void 0,"aria-label":q??(t?void 0:n),"aria-describedby":We,"aria-invalid":m?!0:void 0,width:"fit-content",gap:8,...te,children:[r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:Q,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"}),!p&&!f&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:S?"up":"down"})]}),S&&r.jsxs(i.View,{ref:P,...ae,children:[r.jsx(i.View,{id:K,role:"listbox","aria-labelledby":t?ne:void 0,"aria-label":t?void 0:"Color options",...ce,children:k.map((R,be)=>r.jsx(i.View,{role:"option","aria-selected":w===R.value,"aria-label":R.name,tabIndex:0,width:"24px",height:"24px",borderRadius:"8px",backgroundColor:R.value,borderWidth:"2px",borderStyle:"solid",borderColor:w===R.value?"theme-primary":"transparent",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>T(R.value),onKeyDown:Ie=>{(Ie.key==="Enter"||Ie.key===" ")&&(Ie.preventDefault(),T(R.value))},title:R.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"},...l==null?void 0:l.colorSwatch},be))}),C&&v.length>0&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Recent Colors"}),r.jsx(i.Horizontal,{gap:4,flexWrap:"wrap",...ye,children:v.map((R,be)=>r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"8px",backgroundColor:R,borderWidth:"1px",borderStyle:"solid",borderColor:w===R?"theme-primary":"color-gray-300",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>T(R),title:R,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"}},be))})]}),x&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Custom Color"}),r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(je,{value:b,onChange:j,placeholder:"#000000 or rgb(0,0,0)","aria-label":"Custom color",size:"sm",style:{flex:1},views:l==null?void 0:l.customInput}),r.jsx(i.Element,{as:"button",type:"button",padding:"8px 12px",backgroundColor:"theme-primary",border:"none",borderRadius:"8px",cursor:"pointer",onClick:E,transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"color-blue-700"},children:r.jsx(i.Text,{color:"color-white",fontSize:"12px",fontWeight:"500",children:"Add"})})]})]})]}),a&&r.jsx(i.Text,{id:re,fontSize:"12px",color:m?"color-red-500":"color-gray-600",marginTop:"4px",...l==null?void 0:l.helperText,children:a}),ge&&r.jsx(i.Text,{id:ie,fontSize:"12px",color:"color-red-500",marginTop:"4px",...l==null?void 0:l.error,children:m})]})},Pg=e=>{const o=qa(e);return r.jsx(Ua,{...o,...e})},Ut=[{name:"Afghanistan",dial_code:"+93",emoji:"🇦🇫",code:"AF"},{name:"Aland Islands",dial_code:"+358",emoji:"🇦🇽",code:"AX"},{name:"Albania",dial_code:"+355",emoji:"🇦🇱",code:"AL"},{name:"Algeria",dial_code:"+213",emoji:"🇩🇿",code:"DZ"},{name:"AmericanSamoa",dial_code:"+1684",emoji:"🇦🇸",code:"AS"},{name:"Andorra",dial_code:"+376",emoji:"🇦🇩",code:"AD"},{name:"Angola",dial_code:"+244",emoji:"🇦🇴",code:"AO"},{name:"Anguilla",dial_code:"+1264",emoji:"🇦🇮",code:"AI"},{name:"Antarctica",dial_code:"+672",emoji:"🇦🇶",code:"AQ"},{name:"Antigua and Barbuda",dial_code:"+1268",emoji:"🇦🇬",code:"AG"},{name:"Argentina",dial_code:"+54",emoji:"🇦🇷",code:"AR"},{name:"Armenia",dial_code:"+374",emoji:"🇦🇲",code:"AM"},{name:"Aruba",dial_code:"+297",emoji:"🇦🇼",code:"AW"},{name:"Australia",dial_code:"+61",emoji:"🇦🇺",code:"AU"},{name:"Austria",dial_code:"+43",emoji:"🇦🇹",code:"AT"},{name:"Azerbaijan",dial_code:"+994",emoji:"🇦🇿",code:"AZ"},{name:"Bahamas",dial_code:"+1242",emoji:"🇧🇸",code:"BS"},{name:"Bahrain",dial_code:"+973",emoji:"🇧🇭",code:"BH"},{name:"Bangladesh",dial_code:"+880",emoji:"🇧🇩",code:"BD"},{name:"Barbados",dial_code:"+1246",emoji:"🇧🇧",code:"BB"},{name:"Belarus",dial_code:"+375",emoji:"🇧🇾",code:"BY"},{name:"Belgium",dial_code:"+32",emoji:"🇧🇪",code:"BE"},{name:"Belize",dial_code:"+501",emoji:"🇧🇿",code:"BZ"},{name:"Benin",dial_code:"+229",emoji:"🇧🇯",code:"BJ"},{name:"Bermuda",dial_code:"+1441",emoji:"🇧🇲",code:"BM"},{name:"Bhutan",dial_code:"+975",emoji:"🇧🇹",code:"BT"},{name:"Bolivia, Plurinational State of",dial_code:"+591",emoji:"🇧🇴",code:"BO"},{name:"Bosnia and Herzegovina",dial_code:"+387",emoji:"🇧🇦",code:"BA"},{name:"Botswana",dial_code:"+267",emoji:"🇧🇼",code:"BW"},{name:"Brazil",dial_code:"+55",emoji:"🇧🇷",code:"BR"},{name:"British Indian Ocean Territory",dial_code:"+246",emoji:"🇮🇴",code:"IO"},{name:"Brunei Darussalam",dial_code:"+673",emoji:"🇧🇳",code:"BN"},{name:"Bulgaria",dial_code:"+359",emoji:"🇧🇬",code:"BG"},{name:"Burkina Faso",dial_code:"+226",emoji:"🇧🇫",code:"BF"},{name:"Burundi",dial_code:"+257",emoji:"🇧🇮",code:"BI"},{name:"Cambodia",dial_code:"+855",emoji:"🇰🇭",code:"KH"},{name:"Cameroon",dial_code:"+237",emoji:"🇨🇲",code:"CM"},{name:"Canada",dial_code:"+1",emoji:"🇨🇦",code:"CA"},{name:"Cape Verde",dial_code:"+238",emoji:"🇨🇻",code:"CV"},{name:"Cayman Islands",dial_code:"+345",emoji:"🇰🇾",code:"KY"},{name:"Central African Republic",dial_code:"+236",emoji:"🇨🇫",code:"CF"},{name:"Chad",dial_code:"+235",emoji:"🇹🇩",code:"TD"},{name:"Chile",dial_code:"+56",emoji:"🇨🇱",code:"CL"},{name:"China",dial_code:"+86",emoji:"🇨🇳",code:"CN"},{name:"Christmas Island",dial_code:"+61",emoji:"🇨🇽",code:"CX"},{name:"Cocos (Keeling) Islands",dial_code:"+61",emoji:"🇨🇨",code:"CC"},{name:"Colombia",dial_code:"+57",emoji:"🇨🇴",code:"CO"},{name:"Comoros",dial_code:"+269",emoji:"🇰🇲",code:"KM"},{name:"Congo",dial_code:"+242",emoji:"🇨🇬",code:"CG"},{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243",emoji:"🇨🇩",code:"CD"},{name:"Cook Islands",dial_code:"+682",emoji:"🇨🇰",code:"CK"},{name:"Costa Rica",dial_code:"+506",emoji:"🇨🇷",code:"CR"},{name:"Cote d'Ivoire",dial_code:"+225",emoji:"🇨🇮",code:"CI"},{name:"Croatia",dial_code:"+385",emoji:"🇭🇷",code:"HR"},{name:"Cuba",dial_code:"+53",emoji:"🇨🇺",code:"CU"},{name:"Cyprus",dial_code:"+357",emoji:"🇨🇾",code:"CY"},{name:"Czech Republic",dial_code:"+420",emoji:"🇨🇿",code:"CZ"},{name:"Denmark",dial_code:"+45",emoji:"🇩🇰",code:"DK"},{name:"Djibouti",dial_code:"+253",emoji:"🇩🇯",code:"DJ"},{name:"Dominica",dial_code:"+1767",emoji:"🇩🇲",code:"DM"},{name:"Dominican Republic",dial_code:"+1849",emoji:"🇩🇴",code:"DO"},{name:"Ecuador",dial_code:"+593",emoji:"🇪🇨",code:"EC"},{name:"Egypt",dial_code:"+20",emoji:"🇪🇬",code:"EG"},{name:"El Salvador",dial_code:"+503",emoji:"🇸🇻",code:"SV"},{name:"Equatorial Guinea",dial_code:"+240",emoji:"🇬🇶",code:"GQ"},{name:"Eritrea",dial_code:"+291",emoji:"🇪🇷",code:"ER"},{name:"Estonia",dial_code:"+372",emoji:"🇪🇪",code:"EE"},{name:"Ethiopia",dial_code:"+251",emoji:"🇪🇹",code:"ET"},{name:"Falkland Islands (Malvinas)",dial_code:"+500",emoji:"🇫🇰",code:"FK"},{name:"Faroe Islands",dial_code:"+298",emoji:"🇫🇴",code:"FO"},{name:"Fiji",dial_code:"+679",emoji:"🇫🇯",code:"FJ"},{name:"Finland",dial_code:"+358",emoji:"🇫🇮",code:"FI"},{name:"France",dial_code:"+33",emoji:"🇫🇷",code:"FR"},{name:"French Guiana",dial_code:"+594",emoji:"🇬🇫",code:"GF"},{name:"French Polynesia",dial_code:"+689",emoji:"🇵🇫",code:"PF"},{name:"Gabon",dial_code:"+241",emoji:"🇬🇦",code:"GA"},{name:"Gambia",dial_code:"+220",emoji:"🇬🇲",code:"GM"},{name:"Georgia",dial_code:"+995",emoji:"🇬🇪",code:"GE"},{name:"Germany",dial_code:"+49",emoji:"🇩🇪",code:"DE"},{name:"Ghana",dial_code:"+233",emoji:"🇬🇭",code:"GH"},{name:"Gibraltar",dial_code:"+350",emoji:"🇬🇮",code:"GI"},{name:"Greece",dial_code:"+30",emoji:"🇬🇷",code:"GR"},{name:"Greenland",dial_code:"+299",emoji:"🇬🇱",code:"GL"},{name:"Grenada",dial_code:"+1473",emoji:"🇬🇩",code:"GD"},{name:"Guadeloupe",dial_code:"+590",emoji:"🇬🇵",code:"GP"},{name:"Guam",dial_code:"+1671",emoji:"🇬🇺",code:"GU"},{name:"Guatemala",dial_code:"+502",emoji:"🇬🇹",code:"GT"},{name:"Guernsey",dial_code:"+44",emoji:"🇬🇬",code:"GG"},{name:"Guinea",dial_code:"+224",emoji:"🇬🇳",code:"GN"},{name:"Guinea-Bissau",dial_code:"+245",emoji:"🇬🇼",code:"GW"},{name:"Guyana",dial_code:"+595",emoji:"🇬🇾",code:"GY"},{name:"Haiti",dial_code:"+509",emoji:"🇭🇹",code:"HT"},{name:"Holy See (Vatican City State)",dial_code:"+379",emoji:"🇻🇦",code:"VA"},{name:"Honduras",dial_code:"+504",emoji:"🇭🇳",code:"HN"},{name:"Hong Kong",dial_code:"+852",emoji:"🇭🇰",code:"HK"},{name:"Hungary",dial_code:"+36",emoji:"🇭🇺",code:"HU"},{name:"Iceland",dial_code:"+354",emoji:"🇮🇸",code:"IS"},{name:"India",dial_code:"+91",emoji:"🇮🇳",code:"IN"},{name:"Indonesia",dial_code:"+62",emoji:"🇮🇩",code:"ID"},{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98",emoji:"🇮🇷",code:"IR"},{name:"Iraq",dial_code:"+964",emoji:"🇮🇷",code:"IQ"},{name:"Ireland",dial_code:"+353",emoji:"🇮🇪",code:"IE"},{name:"Isle of Man",dial_code:"+44",emoji:"🇮🇲",code:"IM"},{name:"Israel",dial_code:"+972",emoji:"🇮🇱",code:"IL"},{name:"Italy",dial_code:"+39",emoji:"🇮🇹",code:"IT"},{name:"Jamaica",dial_code:"+1876",emoji:"🇯🇲",code:"JM"},{name:"Japan",dial_code:"+81",emoji:"🇯🇵",code:"JP"},{name:"Jersey",dial_code:"+44",emoji:"🇯🇪",code:"JE"},{name:"Jordan",dial_code:"+962",emoji:"🇯🇴",code:"JO"},{name:"Kazakhstan",dial_code:"+77",emoji:"🇰🇿",code:"KZ"},{name:"Kenya",dial_code:"+254",emoji:"🇰🇪",code:"KE"},{name:"Kiribati",dial_code:"+686",emoji:"🇰🇮",code:"KI"},{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850",emoji:"🇰🇵",code:"KP"},{name:"Korea, Republic of South Korea",dial_code:"+82",emoji:"🇰🇷",code:"KR"},{name:"Kuwait",dial_code:"+965",emoji:"🇰🇼",code:"KW"},{name:"Kyrgyzstan",dial_code:"+996",emoji:"🇰🇬",code:"KG"},{name:"Laos",dial_code:"+856",emoji:"🇱🇦",code:"LA"},{name:"Latvia",dial_code:"+371",emoji:"🇱🇻",code:"LV"},{name:"Lebanon",dial_code:"+961",emoji:"🇱🇧",code:"LB"},{name:"Lesotho",dial_code:"+266",emoji:"🇱🇸",code:"LS"},{name:"Liberia",dial_code:"+231",emoji:"🇱🇷",code:"LR"},{name:"Libyan Arab Jamahiriya",dial_code:"+218",emoji:"🇱🇾",code:"LY"},{name:"Liechtenstein",dial_code:"+423",emoji:"🇱🇮",code:"LI"},{name:"Lithuania",dial_code:"+370",emoji:"🇱🇹",code:"LT"},{name:"Luxembourg",dial_code:"+352",emoji:"🇱🇺",code:"LU"},{name:"Macao",dial_code:"+853",emoji:"🇲🇴",code:"MO"},{name:"Macedonia",dial_code:"+389",emoji:"🇲🇰",code:"MK"},{name:"Madagascar",dial_code:"+261",emoji:"🇲🇬",code:"MG"},{name:"Malawi",dial_code:"+265",emoji:"🇲🇼",code:"MW"},{name:"Malaysia",dial_code:"+60",emoji:"🇲🇾",code:"MY"},{name:"Maldives",dial_code:"+960",emoji:"🇲🇻",code:"MV"},{name:"Mali",dial_code:"+223",emoji:"🇲🇱",code:"ML"},{name:"Malta",dial_code:"+356",emoji:"🇲🇹",code:"MT"},{name:"Marshall Islands",dial_code:"+692",emoji:"🇲🇭",code:"MH"},{name:"Martinique",dial_code:"+596",emoji:"🇲🇶",code:"MQ"},{name:"Mauritania",dial_code:"+222",emoji:"🇲🇷",code:"MR"},{name:"Mauritius",dial_code:"+230",emoji:"🇲🇺",code:"MU"},{name:"Mayotte",dial_code:"+262",emoji:"🇾🇹",code:"YT"},{name:"Mexico",dial_code:"+52",emoji:"🇲🇽",code:"MX"},{name:"Micronesia, Federated States of Micronesia",dial_code:"+691",emoji:"🇫🇲",code:"FM"},{name:"Moldova",dial_code:"+373",emoji:"🇲🇩",code:"MD"},{name:"Monaco",dial_code:"+377",emoji:"🇲🇨",code:"MC"},{name:"Mongolia",dial_code:"+976",emoji:"🇲🇳",code:"MN"},{name:"Montenegro",dial_code:"+382",emoji:"🇲🇪",code:"ME"},{name:"Montserrat",dial_code:"+1664",emoji:"🇲🇸",code:"MS"},{name:"Morocco",dial_code:"+212",emoji:"🇲🇦",code:"MA"},{name:"Mozambique",dial_code:"+258",emoji:"🇲🇿",code:"MZ"},{name:"Myanmar",dial_code:"+95",emoji:"🇲🇲",code:"MM"},{name:"Namibia",emoji:"🇳🇦",dial_code:"+264",code:"NA"},{name:"Nauru",dial_code:"+674",emoji:"🇳🇷",code:"NR"},{name:"Nepal",dial_code:"+977",emoji:"🇳🇵",code:"NP"},{name:"Netherlands",dial_code:"+31",emoji:"🇳🇱",code:"NL"},{name:"Netherlands Antilles",dial_code:"+599",emoji:"🇧🇶",code:"AN"},{name:"New Caledonia",dial_code:"+687",emoji:"🇳🇨",code:"NC"},{name:"New Zealand",dial_code:"+64",emoji:"🇳🇿",code:"NZ"},{name:"Nicaragua",dial_code:"+505",emoji:"🇳🇮",code:"NI"},{name:"Niger",dial_code:"+227",emoji:"🇳🇪",code:"NE"},{name:"Nigeria",dial_code:"+234",emoji:"🇳🇬",code:"NG"},{name:"Niue",dial_code:"+683",emoji:"🇳🇺",code:"NU"},{name:"Norfolk Island",dial_code:"+672",emoji:"🇳🇫",code:"NF"},{name:"Northern Mariana Islands",dial_code:"+1670",emoji:"🇲🇵",code:"MP"},{name:"Norway",dial_code:"+47",emoji:"🇳🇴",code:"NO"},{name:"Oman",dial_code:"+968",emoji:"🇴🇲",code:"OM"},{name:"Pakistan",dial_code:"+92",emoji:"🇵🇰",code:"PK"},{name:"Palau",dial_code:"+680",emoji:"🇵🇼",code:"PW"},{name:"Palestinian Territory, Occupied",dial_code:"+970",emoji:"🇵🇸",code:"PS"},{name:"Panama",dial_code:"+507",emoji:"🇵🇦",code:"PA"},{name:"Papua New Guinea",dial_code:"+675",emoji:"🇵🇬",code:"PG"},{name:"Paraguay",dial_code:"+595",emoji:"🇵🇾",code:"PY"},{name:"Peru",dial_code:"+51",emoji:"🇵🇪",code:"PE"},{name:"Philippines",dial_code:"+63",emoji:"🇵🇭",code:"PH"},{name:"Pitcairn",dial_code:"+872",emoji:"🇵🇳",code:"PN"},{name:"Poland",dial_code:"+48",emoji:"🇵🇱",code:"PL"},{name:"Portugal",dial_code:"+351",emoji:"🇵🇹",code:"PT"},{name:"Puerto Rico",dial_code:"+1939",emoji:"🇵🇷",code:"PR"},{name:"Qatar",dial_code:"+974",emoji:"🇶🇦",code:"QA"},{name:"Romania",dial_code:"+40",emoji:"🇷🇴",code:"RO"},{name:"Russia",dial_code:"+7",emoji:"🇷🇺",code:"RU"},{name:"Rwanda",dial_code:"+250",emoji:"🇷🇼",code:"RW"},{name:"Reunion",dial_code:"+262",emoji:"🇷🇪",code:"RE"},{name:"Saint Barthelemy",dial_code:"+590",emoji:"🇧🇱",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",emoji:"🇸🇭",code:"SH"},{name:"Saint Kitts and Nevis",dial_code:"+1869",emoji:"🇰🇳",code:"KN"},{name:"Saint Lucia",dial_code:"+1758",emoji:"🇱🇨",code:"LC"},{name:"Saint Martin",dial_code:"+590",emoji:"🇲🇫",code:"MF"},{name:"Saint Pierre and Miquelon",dial_code:"+508",emoji:"🇵🇲",code:"PM"},{name:"Saint Vincent and the Grenadines",dial_code:"+1784",emoji:"🇻🇨",code:"VC"},{name:"Samoa",dial_code:"+685",emoji:"🇼🇸",code:"WS"},{name:"San Marino",dial_code:"+378",emoji:"🇸🇲",code:"SM"},{name:"Sao Tome and Principe",dial_code:"+239",emoji:"🇸🇹",code:"ST"},{name:"Saudi Arabia",dial_code:"+966",emoji:"🇸🇦",code:"SA"},{name:"Senegal",dial_code:"+221",emoji:"🇸🇳",code:"SN"},{name:"Serbia",dial_code:"+381",emoji:"🇷🇸",code:"RS"},{name:"Seychelles",dial_code:"+248",emoji:"🇸🇨",code:"SC"},{name:"Sierra Leone",dial_code:"+232",emoji:"🇸🇱",code:"SL"},{name:"Singapore",dial_code:"+65",emoji:"🇸🇬",code:"SG"},{name:"Slovakia",dial_code:"+421",emoji:"🇸🇰",code:"SK"},{name:"Slovenia",dial_code:"+386",emoji:"🇸🇮",code:"SI"},{name:"Solomon Islands",dial_code:"+677",emoji:"🇸🇧",code:"SB"},{name:"Somalia",dial_code:"+252",emoji:"🇸🇴",code:"SO"},{name:"South Africa",dial_code:"+27",emoji:"🇿🇦",code:"ZA"},{name:"South Sudan",dial_code:"+211",emoji:"🇸🇸",code:"SS"},{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",emoji:"🇬🇸",code:"GS"},{name:"Spain",dial_code:"+34",emoji:"🇪🇸",code:"ES"},{name:"Sri Lanka",dial_code:"+94",emoji:"🇱🇰",code:"LK"},{name:"Sudan",dial_code:"+249",emoji:"🇸🇩",code:"SD"},{name:"Suriname",dial_code:"+597",emoji:"🇸🇷",code:"SR"},{name:"Svalbard and Jan Mayen",dial_code:"+47",emoji:"🇸🇯",code:"SJ"},{name:"Swaziland",dial_code:"+268",emoji:"🇸🇿",code:"SZ"},{name:"Sweden",dial_code:"+46",emoji:"🇸🇪",code:"SE"},{name:"Switzerland",dial_code:"+41",emoji:"🇨🇭",code:"CH"},{name:"Syrian Arab Republic",dial_code:"+963",emoji:"🇸🇾",code:"SY"},{name:"Taiwan",dial_code:"+886",emoji:"🇹🇼",code:"TW"},{name:"Tajikistan",dial_code:"+992",emoji:"🇹🇯",code:"TJ"},{name:"Tanzania, United Republic of Tanzania",dial_code:"+255",emoji:"🇹🇿",code:"TZ"},{name:"Thailand",dial_code:"+66",emoji:"🇹🇭",code:"TH"},{name:"Timor-Leste",dial_code:"+670",emoji:"🇹🇱",code:"TL"},{name:"Togo",dial_code:"+228",emoji:"🇹🇬",code:"TG"},{name:"Tokelau",dial_code:"+690",emoji:"🇹🇰",code:"TK"},{name:"Tonga",dial_code:"+676",emoji:"🇹🇴",code:"TO"},{name:"Trinidad and Tobago",dial_code:"+1868",emoji:"🇹🇹",code:"TT"},{name:"Tunisia",dial_code:"+216",emoji:"🇹🇳",code:"TN"},{name:"Turkey",dial_code:"+90",emoji:"🇹🇷",code:"TR"},{name:"Turkmenistan",dial_code:"+993",emoji:"🇹🇲",code:"TM"},{name:"Turks and Caicos Islands",dial_code:"+1649",emoji:"🇹🇨",code:"TC"},{name:"Tuvalu",dial_code:"+688",emoji:"🇹🇻",code:"TV"},{name:"Uganda",dial_code:"+256",emoji:"🇺🇬",code:"UG"},{name:"Ukraine",dial_code:"+380",emoji:"🇺🇦",code:"UA"},{name:"United Arab Emirates",dial_code:"+971",emoji:"🇦🇪",code:"AE"},{name:"United Kingdom",dial_code:"+44",emoji:"🇬🇧",code:"GB"},{name:"United States",dial_code:"+1",emoji:"🇺🇸",code:"US"},{name:"Uruguay",dial_code:"+598",emoji:"🇺🇾",code:"UY"},{name:"Uzbekistan",dial_code:"+998",emoji:"🇺🇿",code:"UZ"},{name:"Vanuatu",dial_code:"+678",emoji:"🇻🇺",code:"VU"},{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58",emoji:"🇻🇪",code:"VE"},{name:"Vietnam",dial_code:"+84",emoji:"🇻🇳",code:"VN"},{name:"Virgin Islands, British",dial_code:"+1284",emoji:"🇻🇬",code:"VG"},{name:"Virgin Islands, U.S.",dial_code:"+1340",emoji:"🇻🇮",code:"VI"},{name:"Wallis and Futuna",dial_code:"+681",emoji:"🇼🇫",code:"WF"},{name:"Yemen",dial_code:"+967",emoji:"🇾🇪",code:"YE"},{name:"Zambia",dial_code:"+260",emoji:"🇿🇲",code:"ZM"},{name:"Zimbabwe",dial_code:"+263",emoji:"🇿🇼",code:"ZW"}],Ga=({placeholder:e})=>{const[o,t]=h.useState(Ut),[n,a]=h.useState(e??Ut[0].name),[l,c]=h.useState(!0),[s,d]=h.useState(!1),[g,m]=h.useState(!1);return{hide:l,setHide:c,newOptions:o,setNewOptions:t,isHovered:g,setIsHovered:m,isFocused:s,setIsFocused:d,value:n,setValue:a}},Ya={xs:8,sm:10,md:12,lg:14,xl:16},Vg=({size:e,...o})=>r.jsx(i.Element,{as:"ul",...o}),Ag=e=>r.jsx(i.Input,{type:"text",...e}),Eg=({size:e,...o})=>r.jsx(i.Element,{as:"li",...o}),Dg=({id:e,option:o,size:t="md",isSelected:n=!1,isHighlighted:a=!1,callback:l=()=>{},views:c={text:{}}})=>{const s=d=>{d&&d.stopPropagation&&d.stopPropagation(),l(o??"")};return r.jsx(Eg,{id:e,margin:0,role:"option","aria-selected":n,listStyleType:"none",fontWeight:"normal",paddingVertical:6,paddingHorizontal:12,onClick:s,fontSize:i.Typography.fontSizes[t],backgroundColor:a?"color-gray-100":void 0,_hover:{backgroundColor:"color-gray-100",transition:"all 0.15s ease-in-out"},...c.text,children:o})},$g=({id:e,size:o,views:t={dropDown:{}},options:n=[],selectedOption:a,highlightedIndex:l=-1,callback:c=()=>{}})=>{const s=d=>c(d);return r.jsx(Vg,{id:e,role:"listbox",margin:0,padding:0,top:"100%",width:"100%",display:"flex",zIndex:1e3,overflow:"auto",maxHeight:"300px",borderRadius:12,position:"absolute",flexDirection:"column",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",...t.dropDown,children:n.map((d,g)=>r.jsx(Dg,{id:e?`${e}-option-${g}`:void 0,size:o,option:d.name,isSelected:d.name===a,isHighlighted:g===l,callback:s,...t.text},d.code))})},Ka=({id:e,name:o,label:t,value:n,placeholder:a,helperText:l,hide:c=!1,error:s=!1,isHovered:d=!1,isFocused:g=!1,isAutoFocus:m=!1,isDisabled:f=!1,isReadOnly:p=!1,shadow:u={},newOptions:y=[],size:k="md",variant:x="default",shape:C="default",onChange:S,onBlur:w=()=>{},setHide:v=()=>{},setNewOptions:b=()=>{},setIsHovered:I=()=>{},setIsFocused:T=()=>{},setValue:j=()=>{},selected:E,views:D={text:{},icon:{},label:{},dropDown:{},helperText:{}},themeMode:W,...A})=>{const{getColor:H,themeMode:z}=i.useTheme(),P=h.useId(),V=e??P,M=`${V}-listbox`,[L,_]=h.useState(-1),O=H("color-gray-500",{themeMode:W||z}),N=()=>T(!0),U=Y=>{v(!c),_(-1),j(Y),S&&S(Y)},X=()=>{!f&&!p&&v(!c)},oe=Y=>{const Z=Y.target.value,ee=Ut.filter(ne=>ne.name.toLowerCase().startsWith(Z.toLowerCase()));c&&v(!1),b(ee),_(ee.length>0?0:-1),S&&S(Z)},B=Y=>{f||p||(Y.key==="ArrowDown"?(Y.preventDefault(),c?(v(!1),_(y.length>0?0:-1)):_(Math.min(L+1,y.length-1))):Y.key==="ArrowUp"?c||(Y.preventDefault(),_(Math.max(L-1,0))):Y.key==="Enter"?!c&&L>=0&&y[L]&&(Y.preventDefault(),U(y[L].name)):Y.key==="Escape"&&(c||(v(!0),_(-1))))},$=Y=>{w(Y),T(!1)},q=!!t,J={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none"}},transition:"all 0.2s ease-in-out",fontSize:i.Typography.fontSizes[k],backgroundColor:"transparent",color:f?"color-gray-400":"color-gray-900",cursor:f?"not-allowed":p?"auto":"pointer",...D.field};return r.jsxs(Ue,{helperText:l,error:s,views:D,onClick:X,children:[r.jsxs(oo,{label:t,size:k,error:s,shape:C,views:D,shadow:u,variant:x,value:n,color:"theme-primary",isDisabled:f,isReadOnly:p,isFocused:g,showLabel:q,_hover:!f&&!s?{borderColor:"theme-primary"}:void 0,children:[r.jsxs(jo,{children:[q&&r.jsx(ho,{htmlFor:V,color:"theme-primary",error:s,views:D,children:t}),r.jsx(Ag,{id:V,name:o,placeholder:a,readOnly:p,disabled:f,autoFocus:m,role:"combobox","aria-expanded":!c,"aria-controls":c?void 0:M,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":!c&&L>=0?`${M}-option-${L}`:void 0,onBlur:$,onFocus:N,onKeyDown:B,...J,...A,value:n,onChange:oe})]}),r.jsx(Ro,{children:c?r.jsx(he,{orientation:"down",widthHeight:Ya[k],color:O,style:D.icon}):r.jsx(he,{orientation:"up",widthHeight:Ya[k],color:O,style:D.icon})})]}),!c&&r.jsx($g,{id:M,size:k,views:D,options:y,selectedOption:n,highlightedIndex:L,callback:U})]})},Lg=e=>{const o=Ga(e);return r.jsx(Ka,{...o,...e})};function Lr(e){"@babel/helpers - typeof";return Lr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Lr(e)}function ze(e,o){if(o.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+o.length+" present")}function _g(e){return ze(1,arguments),e instanceof Date||Lr(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ne(e){ze(1,arguments);var o=Object.prototype.toString.call(e);return e instanceof Date||Lr(e)==="object"&&o==="[object Date]"?new Date(e.getTime()):typeof e=="number"||o==="[object Number]"?new Date(e):((typeof e=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Bg(e){if(ze(1,arguments),!_g(e)&&typeof e!="number")return!1;var o=Ne(e);return!isNaN(Number(o))}function mo(e){if(e===null||e===!0||e===!1)return NaN;var o=Number(e);return isNaN(o)?o:o<0?Math.ceil(o):Math.floor(o)}function Og(e,o){ze(2,arguments);var t=Ne(e).getTime(),n=mo(o);return new Date(t+n)}function Ng(e,o){ze(2,arguments);var t=mo(o);return Og(e,-t)}var qg=864e5;function Ug(e){ze(1,arguments);var o=Ne(e),t=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var n=o.getTime(),a=t-n;return Math.floor(a/qg)+1}function _r(e){ze(1,arguments);var o=1,t=Ne(e),n=t.getUTCDay(),a=(n<o?7:0)+n-o;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}function Xa(e){ze(1,arguments);var o=Ne(e),t=o.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(t+1,0,4),n.setUTCHours(0,0,0,0);var a=_r(n),l=new Date(0);l.setUTCFullYear(t,0,4),l.setUTCHours(0,0,0,0);var c=_r(l);return o.getTime()>=a.getTime()?t+1:o.getTime()>=c.getTime()?t:t-1}function Gg(e){ze(1,arguments);var o=Xa(e),t=new Date(0);t.setUTCFullYear(o,0,4),t.setUTCHours(0,0,0,0);var n=_r(t);return n}var Yg=6048e5;function Kg(e){ze(1,arguments);var o=Ne(e),t=_r(o).getTime()-Gg(o).getTime();return Math.round(t/Yg)+1}var Xg={};function Br(){return Xg}function Or(e,o){var t,n,a,l,c,s,d,g;ze(1,arguments);var m=Br(),f=mo((t=(n=(a=(l=o==null?void 0:o.weekStartsOn)!==null&&l!==void 0?l:o==null||(c=o.locale)===null||c===void 0||(s=c.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:m.weekStartsOn)!==null&&n!==void 0?n:(d=m.locale)===null||d===void 0||(g=d.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&t!==void 0?t:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Ne(e),u=p.getUTCDay(),y=(u<f?7:0)+u-f;return p.setUTCDate(p.getUTCDate()-y),p.setUTCHours(0,0,0,0),p}function Ja(e,o){var t,n,a,l,c,s,d,g;ze(1,arguments);var m=Ne(e),f=m.getUTCFullYear(),p=Br(),u=mo((t=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(c=o.locale)===null||c===void 0||(s=c.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:p.firstWeekContainsDate)!==null&&n!==void 0?n:(d=p.locale)===null||d===void 0||(g=d.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(f+1,0,u),y.setUTCHours(0,0,0,0);var k=Or(y,o),x=new Date(0);x.setUTCFullYear(f,0,u),x.setUTCHours(0,0,0,0);var C=Or(x,o);return m.getTime()>=k.getTime()?f+1:m.getTime()>=C.getTime()?f:f-1}function Jg(e,o){var t,n,a,l,c,s,d,g;ze(1,arguments);var m=Br(),f=mo((t=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(c=o.locale)===null||c===void 0||(s=c.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:m.firstWeekContainsDate)!==null&&n!==void 0?n:(d=m.locale)===null||d===void 0||(g=d.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&t!==void 0?t:1),p=Ja(e,o),u=new Date(0);u.setUTCFullYear(p,0,f),u.setUTCHours(0,0,0,0);var y=Or(u,o);return y}var Qg=6048e5;function Zg(e,o){ze(1,arguments);var t=Ne(e),n=Or(t,o).getTime()-Jg(t,o).getTime();return Math.round(n/Qg)+1}function se(e,o){for(var t=e<0?"-":"",n=Math.abs(e).toString();n.length<o;)n="0"+n;return t+n}var ro={y:function(o,t){var n=o.getUTCFullYear(),a=n>0?n:1-n;return se(t==="yy"?a%100:a,t.length)},M:function(o,t){var n=o.getUTCMonth();return t==="M"?String(n+1):se(n+1,2)},d:function(o,t){return se(o.getUTCDate(),t.length)},a:function(o,t){var n=o.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(o,t){return se(o.getUTCHours()%12||12,t.length)},H:function(o,t){return se(o.getUTCHours(),t.length)},m:function(o,t){return se(o.getUTCMinutes(),t.length)},s:function(o,t){return se(o.getUTCSeconds(),t.length)},S:function(o,t){var n=t.length,a=o.getUTCMilliseconds(),l=Math.floor(a*Math.pow(10,n-3));return se(l,t.length)}},Po={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Rg={G:function(o,t,n){var a=o.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(o,t,n){if(t==="yo"){var a=o.getUTCFullYear(),l=a>0?a:1-a;return n.ordinalNumber(l,{unit:"year"})}return ro.y(o,t)},Y:function(o,t,n,a){var l=Ja(o,a),c=l>0?l:1-l;if(t==="YY"){var s=c%100;return se(s,2)}return t==="Yo"?n.ordinalNumber(c,{unit:"year"}):se(c,t.length)},R:function(o,t){var n=Xa(o);return se(n,t.length)},u:function(o,t){var n=o.getUTCFullYear();return se(n,t.length)},Q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return se(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return se(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(o,t,n){var a=o.getUTCMonth();switch(t){case"M":case"MM":return ro.M(o,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(o,t,n){var a=o.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return se(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(o,t,n,a){var l=Zg(o,a);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):se(l,t.length)},I:function(o,t,n){var a=Kg(o);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):se(a,t.length)},d:function(o,t,n){return t==="do"?n.ordinalNumber(o.getUTCDate(),{unit:"date"}):ro.d(o,t)},D:function(o,t,n){var a=Ug(o);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):se(a,t.length)},E:function(o,t,n){var a=o.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(o,t,n,a){var l=o.getUTCDay(),c=(l-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return se(c,2);case"eo":return n.ordinalNumber(c,{unit:"day"});case"eee":return n.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(l,{width:"short",context:"formatting"});case"eeee":default:return n.day(l,{width:"wide",context:"formatting"})}},c:function(o,t,n,a){var l=o.getUTCDay(),c=(l-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return se(c,t.length);case"co":return n.ordinalNumber(c,{unit:"day"});case"ccc":return n.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(l,{width:"narrow",context:"standalone"});case"cccccc":return n.day(l,{width:"short",context:"standalone"});case"cccc":default:return n.day(l,{width:"wide",context:"standalone"})}},i:function(o,t,n){var a=o.getUTCDay(),l=a===0?7:a;switch(t){case"i":return String(l);case"ii":return se(l,t.length);case"io":return n.ordinalNumber(l,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(o,t,n){var a=o.getUTCHours(),l=a/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(o,t,n){var a=o.getUTCHours(),l;switch(a===12?l=Po.noon:a===0?l=Po.midnight:l=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(o,t,n){var a=o.getUTCHours(),l;switch(a>=17?l=Po.evening:a>=12?l=Po.afternoon:a>=4?l=Po.morning:l=Po.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(o,t,n){if(t==="ho"){var a=o.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return ro.h(o,t)},H:function(o,t,n){return t==="Ho"?n.ordinalNumber(o.getUTCHours(),{unit:"hour"}):ro.H(o,t)},K:function(o,t,n){var a=o.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):se(a,t.length)},k:function(o,t,n){var a=o.getUTCHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):se(a,t.length)},m:function(o,t,n){return t==="mo"?n.ordinalNumber(o.getUTCMinutes(),{unit:"minute"}):ro.m(o,t)},s:function(o,t,n){return t==="so"?n.ordinalNumber(o.getUTCSeconds(),{unit:"second"}):ro.s(o,t)},S:function(o,t){return ro.S(o,t)},X:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();if(c===0)return"Z";switch(t){case"X":return Za(c);case"XXXX":case"XX":return po(c);case"XXXXX":case"XXX":default:return po(c,":")}},x:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();switch(t){case"x":return Za(c);case"xxxx":case"xx":return po(c);case"xxxxx":case"xxx":default:return po(c,":")}},O:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Qa(c,":");case"OOOO":default:return"GMT"+po(c,":")}},z:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Qa(c,":");case"zzzz":default:return"GMT"+po(c,":")}},t:function(o,t,n,a){var l=a._originalDate||o,c=Math.floor(l.getTime()/1e3);return se(c,t.length)},T:function(o,t,n,a){var l=a._originalDate||o,c=l.getTime();return se(c,t.length)}};function Qa(e,o){var t=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),l=n%60;if(l===0)return t+String(a);var c=o;return t+String(a)+c+se(l,2)}function Za(e,o){if(e%60===0){var t=e>0?"-":"+";return t+se(Math.abs(e)/60,2)}return po(e,o)}function po(e,o){var t=o||"",n=e>0?"-":"+",a=Math.abs(e),l=se(Math.floor(a/60),2),c=se(a%60,2);return n+l+t+c}var Ra=function(o,t){switch(o){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},el=function(o,t){switch(o){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},eh=function(o,t){var n=o.match(/(P+)(p+)?/)||[],a=n[1],l=n[2];if(!l)return Ra(o,t);var c;switch(a){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;case"PPPP":default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",Ra(a,t)).replace("{{time}}",el(l,t))},oh={p:el,P:eh};function rh(e){var o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return o.setUTCFullYear(e.getFullYear()),e.getTime()-o.getTime()}var th=["D","DD"],nh=["YY","YYYY"];function ah(e){return th.indexOf(e)!==-1}function lh(e){return nh.indexOf(e)!==-1}function ol(e,o,t){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ih={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ch=function(o,t,n){var a,l=ih[o];return typeof l=="string"?a=l:t===1?a=l.one:a=l.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function Gt(e){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=o.width?String(o.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var sh={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},dh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gh={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},hh={date:Gt({formats:sh,defaultWidth:"full"}),time:Gt({formats:dh,defaultWidth:"full"}),dateTime:Gt({formats:gh,defaultWidth:"full"})},fh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mh=function(o,t,n,a){return fh[o]};function nr(e){return function(o,t){var n=t!=null&&t.context?String(t.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var l=e.defaultFormattingWidth||e.defaultWidth,c=t!=null&&t.width?String(t.width):l;a=e.formattingValues[c]||e.formattingValues[l]}else{var s=e.defaultWidth,d=t!=null&&t.width?String(t.width):e.defaultWidth;a=e.values[d]||e.values[s]}var g=e.argumentCallback?e.argumentCallback(o):o;return a[g]}}var ph={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},uh={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},yh={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},bh={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},xh={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},kh={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Ch=function(o,t){var n=Number(o),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},wh={ordinalNumber:Ch,era:nr({values:ph,defaultWidth:"wide"}),quarter:nr({values:uh,defaultWidth:"wide",argumentCallback:function(o){return o-1}}),month:nr({values:yh,defaultWidth:"wide"}),day:nr({values:bh,defaultWidth:"wide"}),dayPeriod:nr({values:xh,defaultWidth:"wide",formattingValues:kh,defaultFormattingWidth:"wide"})};function ar(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],l=o.match(a);if(!l)return null;var c=l[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(s)?vh(s,function(f){return f.test(c)}):Sh(s,function(f){return f.test(c)}),g;g=e.valueCallback?e.valueCallback(d):d,g=t.valueCallback?t.valueCallback(g):g;var m=o.slice(c.length);return{value:g,rest:m}}}function Sh(e,o){for(var t in e)if(e.hasOwnProperty(t)&&o(e[t]))return t}function vh(e,o){for(var t=0;t<e.length;t++)if(o(e[t]))return t}function Th(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=o.match(e.matchPattern);if(!n)return null;var a=n[0],l=o.match(e.parsePattern);if(!l)return null;var c=e.valueCallback?e.valueCallback(l[0]):l[0];c=t.valueCallback?t.valueCallback(c):c;var s=o.slice(a.length);return{value:c,rest:s}}}var Ih=/^(\d+)(th|st|nd|rd)?/i,Fh=/\d+/i,zh={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Mh={any:[/^b/i,/^(a|c)/i]},Wh={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Hh={any:[/1/i,/2/i,/3/i,/4/i]},jh={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ph={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Vh={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ah={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Eh={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Dh={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},$h={ordinalNumber:Th({matchPattern:Ih,parsePattern:Fh,valueCallback:function(o){return parseInt(o,10)}}),era:ar({matchPatterns:zh,defaultMatchWidth:"wide",parsePatterns:Mh,defaultParseWidth:"any"}),quarter:ar({matchPatterns:Wh,defaultMatchWidth:"wide",parsePatterns:Hh,defaultParseWidth:"any",valueCallback:function(o){return o+1}}),month:ar({matchPatterns:jh,defaultMatchWidth:"wide",parsePatterns:Ph,defaultParseWidth:"any"}),day:ar({matchPatterns:Vh,defaultMatchWidth:"wide",parsePatterns:Ah,defaultParseWidth:"any"}),dayPeriod:ar({matchPatterns:Eh,defaultMatchWidth:"any",parsePatterns:Dh,defaultParseWidth:"any"})},Lh={code:"en-US",formatDistance:ch,formatLong:hh,formatRelative:mh,localize:wh,match:$h,options:{weekStartsOn:0,firstWeekContainsDate:1}},_h=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Oh=/^'([^]*?)'?$/,Nh=/''/g,qh=/[a-zA-Z]/;function Uh(e,o,t){var n,a,l,c,s,d,g,m,f,p,u,y,k,x;ze(2,arguments);var C=String(o),S=Br(),w=(n=(a=void 0)!==null&&a!==void 0?a:S.locale)!==null&&n!==void 0?n:Lh,v=mo((l=(c=(s=(d=void 0)!==null&&d!==void 0?d:void 0)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&c!==void 0?c:(g=S.locale)===null||g===void 0||(m=g.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&l!==void 0?l:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=mo((f=(p=(u=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&u!==void 0?u:S.weekStartsOn)!==null&&p!==void 0?p:(k=S.locale)===null||k===void 0||(x=k.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:0);if(!(b>=0&&b<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!w.localize)throw new RangeError("locale must contain localize property");if(!w.formatLong)throw new RangeError("locale must contain formatLong property");var I=Ne(e);if(!Bg(I))throw new RangeError("Invalid time value");var T=rh(I),j=Ng(I,T),E={firstWeekContainsDate:v,weekStartsOn:b,locale:w,_originalDate:I},D=C.match(Bh).map(function(W){var A=W[0];if(A==="p"||A==="P"){var H=oh[A];return H(W,w.formatLong)}return W}).join("").match(_h).map(function(W){if(W==="''")return"'";var A=W[0];if(A==="'")return Gh(W);var H=Rg[A];if(H)return lh(W)&&ol(W,o,String(e)),ah(W)&&ol(W,o,String(e)),H(j,W,w.localize,E);if(A.match(qh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+A+"`");return W}).join("");return D}function Gh(e){var o=e.match(Oh);return o?o[1].replace(Nh,"'"):e}const Yt=e=>typeof e=="string"?e:void 0,rl=({value:e,defaultValue:o}={})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(!1),[c,s]=h.useState(()=>Yt(e)??Yt(o)??Uh(new Date,"yyyy-MM-dd")),d=Yt(e);return h.useEffect(()=>{d!==void 0&&s(d)},[d]),{date:c,setDate:s,isHovered:t,setIsHovered:n,isFocused:a,setIsFocused:l}},Yh=e=>r.jsx(i.Input,{type:"date",...e}),tl=({id:e,name:o,label:t,date:n,children:a,helperText:l,shadow:c={},size:s="md",variant:d="default",shape:g="default",views:m={container:{},label:{},helperText:{},text:{},field:{}},error:f=!1,isHovered:p=!1,isFocused:u=!1,isDisabled:y=!1,isReadOnly:k=!1,setDate:x=()=>{},setIsFocused:C=()=>{},setIsHovered:S=()=>{},onChange:w,onChangeText:v,value:b,defaultValue:I,...T})=>{const{themeMode:j}=i.useTheme(),E=h.useId(),D=e??E,W=!!t,A=()=>S(!p),H=()=>C(!0),z=V=>{typeof V=="string"?(x(V),v&&v(V)):(x(V.target.value),w&&w(V.target.value))},P={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none",backgroundColor:"transparent"}},transition:"all 0.2s ease-in-out",fontSize:i.Typography.fontSizes[s],backgroundColor:"transparent",color:y?"color-gray-400":"color-gray-900",cursor:y?"not-allowed":k?"auto":"pointer",...m.field};return r.jsx(Ue,{helperText:l,error:f,views:m,children:r.jsx(oo,{label:t,size:s,error:f,shape:g,views:m,shadow:c,color:"theme-primary",variant:d,value:n,isHovered:p,isDisabled:y,isReadOnly:k,isFocused:u,showLabel:W,onMouseEnter:A,onMouseLeave:A,children:r.jsxs(jo,{children:[W&&r.jsx(ho,{htmlFor:D,color:"theme-primary",error:f,views:m,children:t}),r.jsx(Yh,{id:D,name:o,role:"textbox","aria-label":!W&&typeof t=="string"?t:void 0,onFocus:H,disabled:y,readOnly:k,...P,...T,...v&&{onChangeText:z},onChange:z,value:n})]})})})},Kh=e=>{const o=rl(e);return r.jsx(tl,{...o,...e})},nl=e=>{const o=Lt(e),[t,n]=h.useState(!1);return{isVisible:t,setIsVisible:n,...e,...o}},al={xs:14,sm:16,md:16,lg:18,xl:20},Xh=({visibleIcon:e,hiddenIcon:o,...t})=>{const{isVisible:n,setIsVisible:a,...l}=nl(t),c=al[t.size??"md"]??al.md,s=c-2;return r.jsx(rr,{...l,type:n?"text":"password",isClearable:!1,right:r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",width:`${c}px`,height:`${c}px`,minWidth:`${c}px`,color:"color-gray-500",cursor:t.isDisabled?"not-allowed":"pointer",transition:"color 0.2s ease",onClick:()=>{t.isDisabled||a(!n)},children:n?e??r.jsx(kt,{widthHeight:s}):o??r.jsx(xt,{widthHeight:s})})})},ll=(e,o,t)=>{const[n,a]=h.useState(e),[l,c]=h.useState(o?{value:o,label:o}:e[0]),[s,d]=h.useState([]),[g,m]=h.useState(0),[f,p]=h.useState(t??""),[u,y]=h.useState(!1);return{filteredItems:n,setFilteredItems:a,selectedItem:l,setSelectedItem:c,selectedItems:s,setSelectedItems:d,highlightedIndex:g,setHighlightedIndex:m,searchQuery:f,setSearchQuery:p,isDropdownVisible:u,setIsDropdownVisible:y}},Jh={xs:12,sm:14,md:16,lg:20,xl:24},Qh={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},il={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"},initial:{opacity:0,transform:"translateY(-8px) scale(0.96)"}},Zh={padding:"8px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-100",backgroundColor:"color-gray-50",borderTopLeftRadius:10,borderTopRightRadius:10},Rh={padding:"8px 10px",cursor:"pointer",borderRadius:8,margin:"1px 4px",transition:"all 0.15s ease-in-out"},ef={padding:"24px 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},cl={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},of={display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",backgroundColor:"color-gray-100",borderRadius:8,fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},sl=({placeholder:e,items:o,showTick:t=!0,onSelect:n,searchEnabled:a=!0,left:l,right:c,label:s,filteredItems:d,setSelectedItem:g,selectedItem:m,selectedItems:f,setSelectedItems:p,highlightedIndex:u,setHighlightedIndex:y,searchQuery:k,setSearchQuery:x,setFilteredItems:C,views:S,isDropdownVisible:w,setIsDropdownVisible:v,isMulti:b=!1,searchPlaceholder:I,size:T="md",...j})=>{const E=h.useId(),D=j.id??E,W=`${D}-dropdown`,A=`${D}-label`,{ref:H,relation:z}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),P=h.useRef(null),[V,M]=h.useState(!1),[L,_]=h.useState(!1),O=()=>{var Y;const B=L?il.enter:il.initial;if(!H.current)return{};const $=H.current.getBoundingClientRect(),q={position:"fixed",left:$.left,width:$.width,zIndex:1e4,...B};return((Y=z==null?void 0:z.space)==null?void 0:Y.vertical)==="top"?{...q,bottom:window.innerHeight-$.top+6}:{...q,top:$.bottom+6}};h.useEffect(()=>{if(w){const B=setTimeout(()=>_(!0),10);return()=>clearTimeout(B)}_(!1)},[w]),h.useEffect(()=>{const B=$=>{!$.composedPath().some(Y=>(Y==null?void 0:Y.id)===W)&&H.current&&!H.current.contains($.target)&&v(!1)};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]);const N=B=>{if(x(B),B==="")C(o);else{const $=o.filter(q=>q.label.toLowerCase().includes(B.toLowerCase()));C($)}y(0)},U=B=>{if(b){const $=f.some(J=>J.value===B.value);let q;$?q=f.filter(J=>J.value!==B.value):q=[...f,B],p(q),n==null||n(q)}else g(B),n==null||n(B),v(!1)},X=(B,$)=>{B.stopPropagation();const q=f.filter(J=>J.value!==$.value);p(q),n==null||n(q)},oe=B=>b?f.some($=>$.value===B.value):B.value===m.value;return r.jsxs(i.Horizontal,{flexWrap:"nowrap",gap:15,alignItems:"center",width:"100%",...j,children:[s&&r.jsx(i.Text,{id:A,views:S==null?void 0:S.label,children:s}),r.jsxs(i.View,{position:"relative",width:"100%",children:[r.jsx("div",{ref:H,role:"combobox",tabIndex:0,"aria-expanded":w,"aria-haspopup":"listbox","aria-controls":w?W:void 0,"aria-labelledby":s?A:void 0,onClick:()=>v(!w),onKeyDown:B=>{B.key==="Enter"||B.key===" "||B.key==="ArrowDown"?(B.preventDefault(),v(!0)):B.key==="Escape"&&v(!1)},style:{width:"100%"},children:r.jsxs(oo,{size:T,isHovered:V,isFocused:w,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),cursor:"pointer",views:{container:S==null?void 0:S.container},children:[r.jsxs(i.Horizontal,{gap:10,alignItems:"center",flex:1,minWidth:0,flexWrap:b?"wrap":"nowrap",...S==null?void 0:S.labelContainer,children:[l,b?f.length>0?r.jsx(i.Horizontal,{gap:6,flexWrap:"wrap",alignItems:"center",children:f.map(B=>r.jsxs(i.Horizontal,{...of,_hover:{backgroundColor:"color-gray-200"},children:[B.icon&&r.jsx(i.View,{flexShrink:0,children:B.icon}),r.jsx(i.Text,{size:"sm",color:"color-gray-700",weight:"medium",children:B.label}),r.jsx(He,{widthHeight:12,color:"color-gray-500",cursor:"pointer",onClick:$=>X($,B)})]},B.value))}):r.jsx(i.Text,{weight:"medium",flexGrow:1,color:"color-gray-500",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...S==null?void 0:S.label,children:e}):r.jsxs(r.Fragment,{children:[m.icon&&m.label!==e&&r.jsx(i.View,{children:m.icon}),r.jsx(i.Text,{weight:"medium",flexGrow:1,color:m.label===e?"color-gray-500":"color-gray-800",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...S==null?void 0:S.label,children:m.label})]})]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",flexShrink:0,children:[c,r.jsx(i.View,{style:w?cl.open:cl.closed,children:r.jsx(he,{widthHeight:Jh[T],orientation:"down",color:w?"color-gray-700":"color-gray-400"})})]})]})}),w&&r.jsx(ft,{children:r.jsxs(i.View,{ref:P,id:W,role:"listbox","aria-labelledby":s?A:void 0,...Qh,style:O(),...S==null?void 0:S.dropdown,children:[a&&r.jsx(i.View,{...Zh,children:r.jsx(rr,{id:`${D}-search`,name:`${j.name??D}-search`,width:"100%",type:"search",autoFocus:!0,value:k,onChange:B=>N(B),hint:I||e||"Search...","aria-label":I||"Search",isClearable:!1,left:r.jsx(Sr,{widthHeight:14,color:"color-gray-400"}),views:{container:{width:"100%",padding:"0",backgroundColor:"transparent",borderColor:"color-gray-200",...S==null?void 0:S.text},field:{fontSize:"13px"}}})}),d.length>0&&r.jsx(i.View,{margin:0,padding:"4px",children:d.map((B,$)=>{const q=oe(B),J=$===u;return r.jsxs(i.Horizontal,{role:"option","aria-selected":q,justifyContent:"space-between",alignItems:"center",...Rh,backgroundColor:q&&J?"color-blue-100":q?"color-blue-50":J?"color-gray-100":"transparent",onMouseEnter:()=>y($),onClick:()=>U(B),...S==null?void 0:S.item,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[B.icon&&r.jsx(i.View,{flexShrink:0,children:B.icon}),r.jsx(i.Text,{size:"sm",color:q?"theme-primary":"color-gray-800",weight:q?"medium":"normal",children:B.label})]}),q&&t&&r.jsx(Jo,{widthHeight:16,color:"theme-primary"})]},B.value)})}),d.length===0&&r.jsxs(i.Vertical,{...ef,children:[r.jsx(Sr,{widthHeight:24,color:"color-gray-300"}),r.jsx(i.Text,{color:"color-gray-500",size:"sm",align:"center",children:"No results found"}),r.jsx(i.Text,{color:"color-gray-400",size:"xs",align:"center",children:"Try a different search term"})]})]})})]})]})},rf=({id:e,name:o,items:t,placeholder:n,searchPlaceholder:a,...l})=>{const c=ll(t,n,a);return r.jsx(sl,{id:e,name:o,items:t,searchPlaceholder:a,...c,...l})},dl=e=>{const{tags:o,defaultTags:t=[],onTagsChange:n,onTagAdd:a,onTagRemove:l,maxTags:c,minTagLength:s=1,maxTagLength:d=50,allowDuplicates:g=!1,separators:m=["enter","comma"],isDisabled:f=!1,isReadOnly:p=!1}=e,[u,y]=h.useState(""),[k,x]=h.useState(()=>(o||t||[]).map((z,P)=>({id:`tag-${P}-${Date.now()}`,value:z}))),[C,S]=h.useState(!1),[w,v]=h.useState(!1),b=o&&Array.isArray(o)?o.map((H,z)=>({id:`tag-${z}-${Date.now()}`,value:H})):k;h.useEffect(()=>{o&&Array.isArray(o)&&x(o.map((H,z)=>({id:`tag-${z}-${Date.now()}`,value:H})))},[o]);const I=h.useCallback(H=>{const z=H.trim();return!(z.length<s||z.length>d||!g&&b.map(V=>V.value.toLowerCase()).includes(z.toLowerCase())||c&&b.length>=c)},[b,s,d,g,c]),T=h.useCallback(H=>{if(f||p)return;const z=H.trim();if(!z||!I(z))return;const P={id:`tag-${Date.now()}-${Math.random()}`,value:z},V=[...b,P],M=V.map(L=>L.value);o||x(V),n==null||n(M),a==null||a(z),y("")},[b,I,n,a,f,p,o]),j=h.useCallback(H=>{if(f||p)return;const z=b[H];if(!z)return;const P=b.filter((M,L)=>L!==H),V=P.map(M=>M.value);o||x(P),n==null||n(V),l==null||l(z.value,H)},[b,n,l,f,p,o]),E=h.useCallback(H=>{if(f||p)return;const z=H.target.value;if(m.includes("comma")&&z.includes(",")){const P=z.split(","),V=P[0],M=P.slice(1).join(",");V.trim()&&T(V),y(M);return}y(z)},[T,m,f,p]),D=h.useCallback(H=>{if(f||p)return;const{key:z}=H;if(m.includes("enter")&&z==="Enter"){H.preventDefault(),u.trim()&&T(u);return}if(m.includes("tab")&&z==="Tab"&&u.trim()){H.preventDefault(),T(u);return}if(m.includes("space")&&z===" "&&u.trim()){H.preventDefault(),T(u);return}if(z==="Backspace"&&!u&&b.length>0){H.preventDefault(),j(b.length-1);return}},[T,j,u,b,m,f,p]),W=h.useCallback(()=>{var H;S(!0),(H=e.onFocus)==null||H.call(e)},[e.onFocus]),A=h.useCallback(()=>{var H;S(!1),u.trim()&&T(u),(H=e.onBlur)==null||H.call(e)},[T,u,e.onBlur]);return{inputValue:u,setInputValue:y,tags:b,setTags:x,isFocused:C,setIsFocused:S,isHovered:w,setIsHovered:v,addTag:T,removeTag:j,handleInputChange:E,handleKeyDown:D,handleFocus:W,handleBlur:A,validateTag:I}},tf=({tag:e,onRemove:o,isRemovable:t,size:n,views:a,isDisabled:l,isReadOnly:c})=>{const[s,d]=h.useState(!1),g={xs:{padding:"2px 8px",fontSize:"10px",iconSize:10},sm:{padding:"4px 10px",fontSize:"12px",iconSize:12},md:{padding:"6px 14px",fontSize:"14px",iconSize:14},lg:{padding:"8px 16px",fontSize:"16px",iconSize:16},xl:{padding:"10px 18px",fontSize:"18px",iconSize:18}}[n]||{padding:"6px 14px",fontSize:"14px",iconSize:14};return r.jsxs(i.Horizontal,{alignItems:"center",gap:6,padding:g.padding,backgroundColor:"theme-primary-100",borderRadius:"9999px",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary-250",transition:"all 0.15s ease-in-out",opacity:l?.6:1,maxWidth:"100%",minWidth:0,_hover:!l&&!c?{backgroundColor:"theme-primary-180",borderColor:"theme-primary-400"}:{},...a==null?void 0:a.tag,children:[r.jsx(i.Text,{fontSize:g.fontSize,color:l?"color-gray-400":"theme-primary",maxLines:1,minWidth:0,...a==null?void 0:a.tagText,children:e}),t&&!l&&!c&&r.jsx(i.View,{cursor:"pointer",padding:"2px",borderRadius:"50%",transition:"all 0.15s ease-in-out",backgroundColor:s?"color-red-100":"transparent",opacity:s?1:.7,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:m=>{m.stopPropagation(),o()},_hover:{backgroundColor:"color-red-100"},...a==null?void 0:a.tagRemove,children:r.jsx(He,{widthHeight:g.iconSize,color:s?"color-red-500":"color-gray-400"})})]})},gl=({id:e,name:o,label:t,placeholder:n="Type and press Enter to add tags...",helperText:a,error:l=!1,inputValue:c="",tags:s=[],left:d,right:g,shadow:m={},views:f={},size:p="md",shape:u="default",variant:y="default",isDisabled:k=!1,isReadOnly:x=!1,isAutoFocus:C=!1,isRemovable:S=!0,isFocused:w=!1,isHovered:v=!1,maxTags:b,handleInputChange:I,handleKeyDown:T,handleFocus:j,handleBlur:E,removeTag:D,setIsHovered:W,onClick:A,setInputValue:H,setIsFocused:z,addTag:P,defaultTags:V,onTagsChange:M,onTagAdd:L,onTagRemove:_,minTagLength:O,maxTagLength:N,allowDuplicates:U,separators:X,menuItems:oe,onMenuItemSelect:B,onFocus:$,onBlur:q,validateTag:J,...Y})=>{const{getColor:Z,themeMode:ee}=i.useTheme(),ne=!!(t&&(w||s.length>0||c)),K=b&&s.length>=b,re={border:"none",outline:"none",backgroundColor:"transparent",fontSize:i.Typography.fontSizes[p],color:k?"color-gray-400":"color-gray-800",flex:1,minWidth:"120px",transition:"all 0.2s ease-in-out",...f==null?void 0:f.input};return r.jsx(Ue,{error:!!l,helperText:typeof l=="string"?l:a,views:f,...Y,children:r.jsxs(oo,{label:t,shadow:m,value:s.length>0||c?"has-content":"",size:p,shape:u,variant:y,error:!!l,showLabel:ne,isFocused:w,isHovered:v,isDisabled:k,isReadOnly:x,views:{...f,container:{...f==null?void 0:f.container,...f==null?void 0:f.inputContainer}},onClick:A,onMouseEnter:()=>W==null?void 0:W(!0),onMouseLeave:()=>W==null?void 0:W(!1),children:[d,r.jsxs(jo,{children:[t&&r.jsx(ho,{size:p,error:!!l,views:f,children:t}),r.jsxs(i.Horizontal,{alignItems:"center",gap:8,flexWrap:"wrap",width:"100%",minHeight:i.Typography.fontSizes[p],padding:"0",...f==null?void 0:f.tagsContainer,children:[s.map((ie,ge)=>r.jsx(tf,{tag:ie.value,onRemove:()=>D==null?void 0:D(ge),isRemovable:S,size:p,views:f,isDisabled:k,isReadOnly:x},ie.id)),!K&&r.jsx(i.Input,{id:e,name:o,type:"text",value:c,placeholder:s.length===0?n:"",disabled:k,readOnly:x,autoFocus:C,onChange:I,onKeyDown:T,onFocus:j,onBlur:E,autoComplete:"off",...re}),K&&r.jsxs(i.Text,{fontSize:i.Typography.fontSizes[p],color:"color-gray-500",fontStyle:"italic",...f==null?void 0:f.placeholder,children:["Maximum ",b," tags reached"]})]})]}),g]})})},nf=e=>{const o=dl(e),{tags:t,...n}=e,{setTags:a,...l}=o;return r.jsx(gl,{...l,...n})};function af(e){const o=setTimeout(e,0),t=setTimeout(e,10),n=setTimeout(e,50);return[o,t,n]}const hl=({value:e,defaultValue:o="",length:t=6,onChange:n,onChangeText:a,onComplete:l,onKeyDown:c,onKeyPress:s,onBlur:d,onFocus:g,isReadOnly:m,isDisabled:f,pattern:p,stepValues:u,pasteTransformer:y})=>{var oe,B;const k=e!==void 0,x=k?e:o,[C,S]=h.useState(String(x??"").slice(0,t)||""),[w,v]=h.useState(!1),[b,I]=h.useState(!1),[T,j]=h.useState(null),[E,D]=h.useState(null),W=h.useRef(null),A=h.useRef(null),H=h.useRef({value:C,onChange:n||(()=>{}),isIOS:typeof window<"u"&&((B=(oe=window==null?void 0:window.CSS)==null?void 0:oe.supports)==null?void 0:B.call(oe,"-webkit-touch-callout","none"))}),z=h.useRef({prev:[null,null,"none"]}),P=p?typeof p=="string"?new RegExp(p):p:null;h.useEffect(()=>{if(k&&e!==C){const $=String(e??"").slice(0,t)||"";S($)}},[k,e,t,C]);const V=h.useCallback($=>{let q=$;if(u&&u.length>0&&$){const J=parseInt($,10);if(!isNaN(J)){let Y=u[0],Z=Math.abs(J-Y);for(let ee=1;ee<u.length;ee++){const ne=Math.abs(J-u[ee]);ne<Z&&(Z=ne,Y=u[ee])}q=Y.toString()}}S(q),n&&n(q),a&&a(q),l&&q.length===t&&l(q)},[n,a,l,t,u,k]),M=h.useCallback($=>{$&&W.current!==$&&Object.defineProperty(W,"current",{value:$,writable:!0})},[]),L=h.useCallback($=>{var Y,Z,ee,ne;const q=typeof $=="string"?$:((Y=$==null?void 0:$.currentTarget)==null?void 0:Y.value)??((Z=$==null?void 0:$.target)==null?void 0:Z.value)??((ee=$==null?void 0:$.nativeEvent)==null?void 0:ee.text)??"",J=String(q).slice(0,t);if(J.length>0&&P&&!P.test(J)){(ne=$==null?void 0:$.preventDefault)==null||ne.call($);return}V(J),W.current&&(W.current.value=J)},[t,P,V,W]),_=h.useCallback(()=>{const $=W.current;if($&&typeof $.setSelectionRange=="function"){const q=typeof $.value=="string"?$.value.length:0,J=Math.min(q,t-1),Y=q;$.setSelectionRange(J,Y),j(J),D(Y)}v(!0),g&&g()},[t,g]),O=h.useCallback($=>{v(!1),d&&d($)},[d]),N=h.useCallback($=>{c&&c($)},[]),U=h.useCallback($=>{s&&s($)},[]),X=h.useCallback($=>{const q=W.current;if(!$.clipboardData||!q)return;const J=$.clipboardData.getData("text/plain"),Y=y?y(J):J;$.preventDefault();const Z=q.selectionStart||0,ee=q.selectionEnd||0,re=(Z!==ee?C.slice(0,Z)+Y+C.slice(ee):C.slice(0,Z)+Y+C.slice(Z)).slice(0,t);if(re.length>0&&P&&!P.test(re))return;q.value=re,V(re),S(re);const ie=Math.min(re.length,t-1),ge=re.length;q.setSelectionRange(ie,ge),j(ie),D(ge)},[t,y,P,V,C,S]);return h.useEffect(()=>{const $=W.current,q=A.current;if(!$||!q||typeof document>"u")return;H.current.value!==$.value&&H.current.onChange&&H.current.onChange($.value),z.current.prev=[$.selectionStart,$.selectionEnd,$.selectionDirection];function J(){if(document.activeElement!==$){j(null),D(null);return}const K=($==null?void 0:$.selectionStart)??null,re=($==null?void 0:$.selectionEnd)??null,ie=($==null?void 0:$.selectionDirection)??null,ge=($==null?void 0:$.maxLength)??0,We=($==null?void 0:$.value)??"",le=z.current.prev;let te=-1,ae=-1,ce="none";if(We.length!==0&&K!==null&&re!==null){const be=K===re,Ie=K===We.length&&We.length<ge;if(be&&!Ie){const ve=K;if(ve===0)te=0,ae=1,ce="forward";else if(ve===ge)te=ve-1,ae=ve,ce="backward";else if(ge>1&&We.length>1){let Je=0;if(le[0]!==null&&le[1]!==null){ce=ve<le[1]?"backward":"forward";const co=le[0]===le[1]&&le[0]<ge;ce==="backward"&&!co&&(Je=-1)}te=Je+ve,ae=Je+ve+1}}te!==-1&&ae!==-1&&te!==ae&&W.current&&W.current.setSelectionRange(te,ae,ce)}const ye=te!==-1?te:K,Q=ae!==-1?ae:re,R=ce!=="none"?ce:ie;j(ye),D(Q),z.current.prev=[ye,Q,R]}document.addEventListener("selectionchange",J,{capture:!0}),J(),document.activeElement===$&&v(!0);const Y=q,Z=()=>{var K;Y&&typeof((K=Y.style)==null?void 0:K.setProperty)=="function"&&Y.style.setProperty("--root-height",`${$.clientHeight}px`)};Z();const ee=typeof window<"u"?window.ResizeObserver:void 0,ne=typeof ee=="function"?new ee(Z):null;return ne==null||ne.observe($),()=>{document.removeEventListener("selectionchange",J,{capture:!0}),ne==null||ne.disconnect()}},[]),h.useEffect(()=>{if(typeof Event>"u")return;const $=af(()=>{var ee,ne,K;const q=W.current;q&&typeof q.dispatchEvent=="function"&&q.dispatchEvent(new Event("input"));const J=(ee=W.current)==null?void 0:ee.selectionStart,Y=(ne=W.current)==null?void 0:ne.selectionEnd,Z=(K=W.current)==null?void 0:K.selectionDirection;J!==null&&Y!==null&&J!==void 0&&Y!==void 0&&(j(J),D(Y),z.current.prev=[J,Y,Z||"none"])});return()=>$.forEach(clearTimeout)},[C,w]),{value:C,setValue:V,isFocused:w,setIsFocused:v,isHovered:b,setIsHovered:I,inputRef:W,containerRef:A,mirrorSelectionStart:T,mirrorSelectionEnd:E,setMirrorSelectionStart:j,setMirrorSelectionEnd:D,setInputRef:M,handleChange:L,handleFocus:_,handleBlur:O,handleKeyDown:N,handleKeyPress:U,handlePaste:X}},lf=h.createContext({slots:[],isFocused:!1,isHovering:!1}),cf=`
4
+ ${q} no-repeat,
5
+ ${N} no-repeat
6
+ `,backgroundSize:`200% ${B}px, ${B}px 200%, 200% ${B}px, ${B}px 200%`,backgroundPosition:G,transitionProperty:"background-position",transitionDuration:`${V}s`,transitionTimingFunction:"linear",transitionDelay:O,_hover:{backgroundPosition:X,transitionDelay:$},width:i?"100%":l?"fit-content":void 0,...u==null?void 0:u.container,...z,children:r.jsx(c.View,{as:t?"div":"button",disabled:!!(n||a),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:Math.max(0,j-3),width:"100%",height:"100%",...m,...p,...y,backgroundColor:(m==null?void 0:m.backgroundColor)||S,color:b,borderWidth:0,cursor:n?"default":"pointer",children:H})})}return r.jsx(c.Element,{ref:x,as:e==="link"&&t?"div":"button",type:e==="link"&&t?void 0:"button",disabled:!!(n||a),...p,...y,display:"inline-flex",alignItems:"center",justifyContent:"center",width:i?"100%":l?"fit-content":void 0,borderRadius:cr[s],boxShadow:d,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",onClick:f,...m,...u==null?void 0:u.container,...z,children:H})},$0=h.memo(h.forwardRef(({variant:e="filled",size:o="md",shape:t="rounded",iconPosition:n="left",loaderPosition:a="left",backgroundColor:l,color:i,textColor:g,explicitTextColor:s,reversed:d=!1,isAuto:f=!0,isFilled:u,isDisabled:m,isLoading:p,isIconRounded:y,isIcon:x,isHovered:b,icon:C,leftIcon:k,rightIcon:S,startIcon:T,endIcon:w,children:F,to:v,isExternal:z,shadow:j,onClick:H,views:E={},animation:M,loaderProps:I,config:W,ariaLabel:D,borderMovingDuration:V=2,borderMovingGradientColors:P=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:_="#705CFF",animatedStrokeTextColor:q="color-gray-900",...N},G)=>{const $=m?"theme-disabled":p?"theme-loading":l??i??"theme-primary",O=s??g??"color-white",{config:B}=Ar(),L=B==null?void 0:B.theme,U=h.useMemo(()=>{const le=E0($,O,d,L);return W!=null&&W.variants&&Object.keys(W.variants).forEach(he=>{le[he]&&(le[he]=Ke(le[he],W.variants[he]))}),le},[$,O,d,L,W==null?void 0:W.variants]),K=U[e]??U.filled,J=s?{...K,color:s}:K,ne=(J==null?void 0:J.color)??O,re=r.jsx(A0,{icon:C,leftIcon:k??T,rightIcon:S??w,isLoading:p,iconPosition:n,loaderPosition:a,size:o,resolvedTextColor:ne,isIconRounded:y,loaderProps:I,views:E,children:F}),ce=ja[o],Q=y||x?W0[o]:{};return r.jsx(D0,{variant:e,animation:M,to:v,isDisabled:m,isLoading:p,isAuto:f,isFilled:u,isExternal:z,shape:t,shadow:j,onClick:H,views:E,baseStyles:J,sizeStyles:ce,iconPad:Q,resolvedTextColor:ne,content:re,size:o,mainTone:$,borderMovingDuration:V,borderMovingGradientColors:P,animatedStrokeAccentColor:_,animatedStrokeTextColor:q,containerRef:G,...D!==void 0?{"aria-label":D}:{},...N})})),ye=e=>{const[o,t]=c.useHover(),n=Te("button",e),a=e.textColor??(e.backgroundColor!=null&&e.color!=null?e.color:void 0);return r.jsx($0,{isHovered:t,...n,explicitTextColor:a})},L0={sm:{padding:"12px"},md:{padding:"16px"},lg:{padding:"24px"}},B0={square:0,rounded:"8px",pill:"24px"},_0=e=>{const o=e==="dark";return{default:{backgroundColor:"color-white",border:"none",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},outlined:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.2s ease, box-shadow 0.2s ease",_hover:{borderColor:"color-gray-300",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.05)"}},elevated:{backgroundColor:"color-white",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.35), 0px 1px 2px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.08), 0px 1px 2px rgba(0, 0, 0, 0.06)",border:"none",transition:"box-shadow 0.2s ease",_hover:{boxShadow:o?"0px 4px 6px rgba(0, 0, 0, 0.4), 0px 2px 4px rgba(0, 0, 0, 0.35)":"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.06)"}}}},_r=e=>(e.themeMode,{container:{backgroundColor:"color-white",color:"color-gray-900",borderRadius:"8px",overflow:"hidden",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},header:{padding:"16px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"theme-primary",fontWeight:600,fontSize:14},content:{padding:"16px",color:"color-gray-600",fontSize:12,lineHeight:"18px"},footer:{padding:"16px",borderTop:"1px solid",borderColor:"color-gray-100",justifyContent:"flex-end",gap:8}}),Wa=h.createContext({}),Gt=()=>h.useContext(Wa),Yt=({children:e,views:o,style:t,themeMode:n,...a})=>{var d;const l=c.useTheme(),{styles:i}=Gt(),g=_r(l).header,s={...g,...i==null?void 0:i.header,...a,style:{...g==null?void 0:g.style,...(d=i==null?void 0:i.header)==null?void 0:d.style,...t}};return r.jsx(c.Vertical,{gap:8,...s,children:e})},Kt=({children:e,views:o,style:t,themeMode:n,...a})=>{var d;const l=c.useTheme(),{styles:i}=Gt(),g=_r(l).content,s={...g,...i==null?void 0:i.content,...a,style:{...g==null?void 0:g.style,...(d=i==null?void 0:i.content)==null?void 0:d.style,...t}};return r.jsx(c.Vertical,{gap:12,...s,children:e})},Xt=({children:e,views:o,style:t,themeMode:n,...a})=>{var d;const l=c.useTheme(),{styles:i}=Gt(),g=_r(l).footer,s={...g,...i==null?void 0:i.footer,...a,style:{...g==null?void 0:g.style,...(d=i==null?void 0:i.footer)==null?void 0:d.style,...t}};return r.jsx(c.Vertical,{gap:8,...s,children:e})},O0=({variant:e="default",size:o="md",shape:t="rounded",children:n,header:a,footer:l,isFullWidth:i=!1,views:g,style:s,themeMode:d,config:f,...u})=>{var w,F;const m=c.useTheme(),p=_r(m),y=((w=L0[o])==null?void 0:w.padding)||"16px",x=h.useMemo(()=>({styles:{container:{...p.container,borderRadius:B0[t],...g==null?void 0:g.container},header:{...p.header,padding:y,...g==null?void 0:g.header},content:{...p.content,padding:y,...g==null?void 0:g.content},footer:{...p.footer,padding:y,...g==null?void 0:g.footer}}}),[p,g,y,t]),b=h.Children.toArray(n).some(v=>h.isValidElement(v)&&(v.type===Yt||v.type===Kt||v.type===Xt)),{themeMode:C}=m,S=_0(d||C)[e],T={width:i?"100%":"auto",overflow:"hidden",...S,...x.styles.container,...u,style:{...(F=x.styles.container)==null?void 0:F.style,...s}};return r.jsx(Wa.Provider,{value:x,children:r.jsx(c.View,{...T,children:b?n:r.jsxs(c.Vertical,{width:"100%",children:[a&&r.jsx(Yt,{children:a}),r.jsx(Kt,{children:n}),l&&r.jsx(Xt,{children:l})]})})})},We=e=>{const o=Te("card",e);return r.jsx(O0,{...o})};We.Header=Yt,We.Content=Kt,We.Footer=Xt;const N0=({defaultActiveIndex:e=0,activeIndex:o,onChange:t,autoPlay:n=!1,autoPlayInterval:a=3e3,pauseOnHover:l=!0,infinite:i=!0,totalSlides:g,stepIndices:s})=>{const d=h.useRef(g||0),[f,u]=h.useState(g||0),m=h.useRef(new Set),p=h.useRef(0),y=h.useMemo(()=>Eo("carousel-content"),[]),[x,b]=h.useState(o!==void 0?o:e),[C,k]=h.useState(!1),[S,T]=h.useState(!1),[w,F]=h.useState(0),[v,z]=h.useState(0),j=h.useRef(null);h.useEffect(()=>{o!==void 0&&b(o)},[o]);const H=h.useCallback(X=>{let $=X;i?X<0?$=f-1:X>=f&&($=0):$=Math.max(0,Math.min(X,f-1)),s&&s.length>0&&(s.includes($)||($=s.reduce((B,L)=>Math.abs(L-$)<Math.abs(B-$)?L:B))),o===void 0&&b($),t&&t($)},[o,i,t,f]),E=h.useCallback(()=>{H(x+1)},[x,H]),M=h.useCallback(()=>{H(x-1)},[x,H]);h.useEffect(()=>(n&&!C&&!S&&(j.current=setInterval(()=>{E()},a)),()=>{j.current&&clearInterval(j.current)}),[n,a,C,S,E,l]);const I=h.useCallback(()=>{l&&k(!0)},[l]),W=h.useCallback(()=>{k(!1)},[]),D=h.useCallback(X=>{T(!0),"touches"in X?(F(X.touches[0].clientX),z(X.touches[0].clientY)):(F(X.clientX),z(X.clientY))},[]),V=h.useCallback(X=>{if(!S)return;let $,O;"touches"in X?($=X.touches[0].clientX,O=X.touches[0].clientY):($=X.clientX,O=X.clientY);const B=$-w,L=O-v;Math.abs(B)>Math.abs(L)&&Math.abs(B)>50&&(B>0?M():E(),T(!1))},[S,w,v,E,M]),P=h.useCallback(()=>{T(!1)},[]),_=h.useCallback(()=>{const X=p.current++;m.current.add(X);const $=m.current.size;return d.current=$,u($),X},[]),q=h.useCallback(X=>{m.current.delete(X);const $=m.current.size;if(d.current=$,u($),$>0&&x>=$){const O=Math.max(0,$-1);o===void 0&&b(O),t&&t(O)}},[x,o,t]),N=i||x>0,G=i||x<f-1;return{activeIndex:x,totalSlides:f,goToSlide:H,nextSlide:E,prevSlide:M,canGoNext:G,canGoPrevious:N,handleMouseEnter:I,handleMouseLeave:W,handleDragStart:D,handleDragMove:V,handleDragEnd:P,registerSlide:_,unregisterSlide:q,contentId:y,infinite:i}},q0={dot:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},line:{width:"20px",height:"4px",borderRadius:"2px",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},number:{minWidth:"24px",height:"24px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",transition:"background-color 0.3s ease"}},U0={dot:{backgroundColor:"theme-primary"},line:{backgroundColor:"theme-primary"},number:{backgroundColor:"theme-primary",color:"color-white"}},Or={width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"color-white",color:"color-gray-800",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 2px 5px rgba(0, 0, 0, 0.1)",zIndex:1,transition:"background-color 0.3s ease",_hover:{backgroundColor:"color-gray-100"}},sr=()=>({container:{position:"relative",overflow:"hidden"},content:{overflow:"hidden",width:"100%",height:"100%"},innerContainer:{display:"flex",transitionProperty:"transform",transitionDuration:"300ms",transitionTimingFunction:"ease-in-out",height:"100%"},item:{flex:"0 0 100%",minWidth:0,position:"relative",height:"100%"},prevButton:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)",zIndex:10,...Or},nextButton:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",zIndex:10,...Or}}),Ea=h.createContext(null),Nr=()=>{const e=h.useContext(Ea);if(!e)throw new Error("Carousel compound components must be used within <Carousel>");return e},Aa=({children:e,isActive:o,index:t,views:n,...a})=>r.jsx(c.View,{flexShrink:0,width:"100%",height:"100%",display:o?"block":"none",...n,...a,children:e}),Ha=({views:e,children:o,...t})=>{const{goToPrevious:n,canGoPrevious:a,styles:l}=Nr(),g={...sr().prevButton,...l==null?void 0:l.prevButton,...e==null?void 0:e.prevButton};return r.jsx(ye,{"aria-label":"Previous slide",onClick:()=>n(),isDisabled:!a,...g,...t,children:o??r.jsx(we,{orientation:"left",widthHeight:16})})},Va=({views:e,children:o,...t})=>{const{goToNext:n,canGoNext:a,styles:l}=Nr(),g={...sr().nextButton,...l==null?void 0:l.nextButton,...e==null?void 0:e.nextButton};return r.jsx(ye,{"aria-label":"Next slide",onClick:()=>n(),isDisabled:!a,...g,...t,children:o??r.jsx(we,{orientation:"right",widthHeight:16})})},Pa=({children:e,views:o,...t})=>{const{registerSlide:n,unregisterSlide:a,styles:l}=Nr(),i=h.useRef(null);h.useEffect(()=>{const d=n();return i.current=d,()=>{i.current!==null&&a(i.current)}},[n,a]);const s={...sr().item,...l==null?void 0:l.item,...o==null?void 0:o.item};return r.jsx(c.View,{role:"group","aria-roledescription":"slide",...s,...t,children:e})},Da=({children:e,views:o,style:t,...n})=>{const{currentIndex:a,styles:l,contentId:i}=Nr(),g=sr(),s={...g.content,...l==null?void 0:l.content,...o==null?void 0:o.content},d={...g.innerContainer,...l==null?void 0:l.innerContainer,...o==null?void 0:o.innerContainer},f=`-${a*100}%`;return r.jsx(c.View,{...s,...n,style:{...s==null?void 0:s.style,...t},id:i,"aria-live":"polite",children:r.jsx(c.View,{...d,style:{...d==null?void 0:d.style,transform:`translateX(${f})`},children:e})})},G0=({children:e,defaultActiveIndex:o=0,activeIndex:t,onChange:n,showNavigation:a=!0,navigationPosition:l="inside",prevButton:i,nextButton:g,showIndicators:s=!0,indicatorPosition:d="bottom",indicatorVariant:f="dot",autoPlay:u=!1,autoPlayInterval:m=3e3,pauseOnHover:p=!0,infinite:y=!0,direction:x="horizontal",transitionDuration:b=300,views:C,stepIndices:k,themeMode:S,...T})=>{const w=h.useMemo(()=>h.Children.toArray(e),[e]),F=N0({defaultActiveIndex:o,activeIndex:t,onChange:n,autoPlay:u,autoPlayInterval:m,pauseOnHover:p,infinite:y,totalSlides:w.length}),{activeIndex:v,totalSlides:z,goToSlide:j,nextSlide:H,prevSlide:E,handleMouseEnter:M,handleMouseLeave:I,handleDragStart:W,handleDragMove:D,handleDragEnd:V}=F,P=()=>{if(!a)return null;const N=i||r.jsx(c.View,{as:"button","aria-label":"Previous slide",...Or,...C==null?void 0:C.prevButton,children:"❮"}),G=g||r.jsx(c.View,{as:"button","aria-label":"Next slide",...Or,...C==null?void 0:C.nextButton,children:"❯"});return r.jsxs(r.Fragment,{children:[r.jsx(c.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",left:l==="inside"?"10px":"-40px",onClick:E,cursor:!y&&v===0?"not-allowed":"pointer",opacity:!y&&v===0?.5:1,children:N}),r.jsx(c.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",right:l==="inside"?"10px":"-40px",onClick:H,cursor:!y&&v===w.length-1?"not-allowed":"pointer",opacity:!y&&v===w.length-1?.5:1,children:G})]})},_=()=>s?r.jsx(c.Horizontal,{position:"absolute",left:"0",right:"0",justifyContent:"center",...d==="top"?{top:"10px"}:{bottom:"10px"},...C==null?void 0:C.indicators,children:w.map((N,G)=>r.jsx(c.View,{onClick:()=>j(G),cursor:"pointer",...q0[f],...G===v?{...U0[f]}:{},...C==null?void 0:C.indicator,...G===v?C==null?void 0:C.activeIndicator:{},children:f==="number"&&G+1},G))}):null;return h.useMemo(()=>h.Children.toArray(e).some(N=>h.isValidElement(N)&&(N.type===Da||N.type===Pa||N.type===Ha||N.type===Va)),[e])?r.jsx(Ea.Provider,{value:{currentIndex:v,totalSlides:z,goToSlide:j,goToNext:H,goToPrevious:E,canGoNext:F.canGoNext,canGoPrevious:F.canGoPrevious,registerSlide:F.registerSlide,unregisterSlide:F.unregisterSlide,styles:{...sr(),...C},contentId:F.contentId,infinite:y},children:r.jsx(c.View,{role:"region","aria-roledescription":"carousel","aria-label":"Carousel",position:"relative",width:"100%",height:"100%",overflow:"hidden",...C==null?void 0:C.container,...T,children:e})}):r.jsxs(c.View,{position:"relative",width:"100%",height:"100%",overflow:"hidden",onMouseEnter:M,onMouseLeave:I,onTouchStart:W,onTouchMove:D,onTouchEnd:V,onMouseDown:W,onMouseMove:D,onMouseUp:V,...C==null?void 0:C.container,...T,children:[r.jsx(c.View,{width:"100%",height:"100%",position:"relative",...C==null?void 0:C.slideWrapper,children:w.map((N,G)=>r.jsx(Aa,{isActive:G===v,index:G,views:C==null?void 0:C.slide,children:N},G))}),P(),_()]})},qe=e=>r.jsx(G0,{...e});qe.Slide=Aa,qe.Content=Da,qe.Item=Pa,qe.Previous=Ha,qe.Next=Va;const Ue={blue:"color-blue-500",green:"color-green-500",purple:"color-purple-500",orange:"color-orange-500",red:"color-red-500",teal:"color-teal-500",pink:"color-pink-500",indigo:"color-indigo-500",yellow:"color-yellow-500",cyan:"color-cyan-500"},$a=[Ue.blue,Ue.green,Ue.purple,Ue.orange,Ue.red,Ue.teal,Ue.pink,Ue.indigo,Ue.yellow,Ue.cyan],$o=$a,Y0={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},K0={fontSize:"18px",fontWeight:"700",marginBottom:"24px",textAlign:"center",color:"color-gray-900"},X0={display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginTop:"16px",gap:"12px"},J0={display:"flex",alignItems:"center",padding:"4px 8px",borderRadius:"6px",cursor:"pointer",transition:"background-color 0.2s ease",_hover:{backgroundColor:"color-gray-50"}},Q0={width:"10px",height:"10px",borderRadius:"50%",marginRight:"8px"},Z0={fontSize:"13px",fontWeight:"500",color:"color-gray-600"},qr={position:"absolute",backgroundColor:"color-white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0px 12px 24px rgba(15, 23, 42, 0.18)",border:"1px solid color-gray-200",fontSize:"14px",display:"flex",flexDirection:"column",pointerEvents:"none",zIndex:100},La={stroke:"color-gray-100",strokeWidth:"1px",strokeDasharray:"4 4"},Ur={stroke:"color-gray-200",strokeWidth:"1px"},Gr={fontSize:"12px",fill:"color-gray-500",fontWeight:"500"},R0={rx:"4px",ry:"4px",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{filter:"brightness(1.1)"}},eg={strokeWidth:"3px",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transition:"stroke-width 0.2s ease"},og={r:"5px",strokeWidth:"2.5px",stroke:"color-white",cursor:"pointer",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{r:"7px"}},Yr={strokeWidth:"2px",stroke:"color-white",cursor:"pointer",transition:"all 0.3s ease",_hover:{transform:"scale(1.02)"}},Jt={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-white-800",borderRadius:"4px",zIndex:10,padding:"24px",textAlign:"center"},rg={...Jt},tg={...Jt,backgroundColor:"rgba(254, 242, 242, 0.8)",color:"color-red-600"},ng={...Jt,backgroundColor:"rgba(249, 250, 251, 0.8)",color:"color-gray-500"},ag=({data:e,dataPoints:o,animated:t=!0,animationDuration:n=500,showTooltips:a=!0})=>{const[l,i]=h.useState(t?0:1),[g,s]=h.useState({visible:!1,x:0,y:0,content:null}),d=h.useRef(null),f=h.useRef(null);h.useEffect(()=>{if(!t){i(1);return}const k=Date.now(),S=()=>{const T=Date.now()-k,w=Math.min(T/n,1);i(w),w<1&&(d.current=requestAnimationFrame(S))};return d.current=requestAnimationFrame(S),()=>{d.current&&cancelAnimationFrame(d.current)}},[t,n]);const[u,m]=h.useState(new Set),p=h.useCallback(k=>{m(S=>{const T=new Set(S);return T.has(k)?T.delete(k):T.add(k),T})},[]),y=h.useCallback(()=>e?{...e,series:e.series.map((k,S)=>({...k,color:k.color||$o[S%$o.length],hidden:u.has(k.name)}))}:o?o.map((k,S)=>({...k,color:k.color||$o[S%$o.length],hidden:u.has(k.label)})):null,[e,o,u]),x=h.useCallback((k,S,T)=>{a&&s({visible:!0,x:k,y:S,content:T})},[a]),b=h.useCallback(()=>{s(k=>({...k,visible:!1}))},[]),C=h.useCallback(()=>{if(!f.current)return{width:0,height:0};const{width:k,height:S}=f.current.getBoundingClientRect();return{width:k,height:S}},[]);return{animationProgress:l,tooltip:g,containerRef:f,processedData:y,showTooltip:x,hideTooltip:b,getChartDimensions:C,toggleSeries:p}},lg=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onBarClick:l,showTooltip:i,hideTooltip:g,views:s})=>{const{getColor:d}=c.useTheme(),f={top:20,right:20,bottom:40,left:50},u=o-f.left-f.right,m=t-f.top-f.bottom,p=h.useMemo(()=>{let w=0;return e.series.forEach(F=>{F.data.forEach(v=>{w=Math.max(w,v)})}),w},[e]),y=e.labels.length,x=e.series.length,b=u/y,C=b*.8/x,k=b*.2/(x+1),S=p||10,T=h.useMemo(()=>{const F=[];for(let v=0;v<=5;v++){const z=S/5*v;F.push(z)}return F},[p]);return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((w,F)=>{const v=w.color?d(w.color):"black";return r.jsxs("linearGradient",{id:`bar-gradient-${F}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:v,stopOpacity:1}),r.jsx("stop",{offset:"100%",stopColor:v,stopOpacity:.7})]},`bar-gradient-${F}`)})}),r.jsx("line",{x1:f.left,y1:t-f.bottom,x2:o-f.right,y2:t-f.bottom,...Ur,...s==null?void 0:s.axis}),r.jsx("line",{x1:f.left,y1:f.top,x2:f.left,y2:t-f.bottom,...Ur,...s==null?void 0:s.axis}),e.labels.map((w,F)=>{const v=f.left+(F+.5)*b,z=t-f.bottom+20;return r.jsx("text",{x:v,y:z,textAnchor:"middle",...Gr,...s==null?void 0:s.axisLabel,children:w},`x-label-${F}`)}),T.map((w,F)=>{const v=t-f.bottom-w/S*m;return r.jsxs(h.Fragment,{children:[r.jsx("text",{x:f.left-10,y:v,textAnchor:"end",dominantBaseline:"middle",...Gr,...s==null?void 0:s.axisLabel,children:w.toFixed(0)}),a&&r.jsx("line",{x1:f.left,y1:v,x2:o-f.right,y2:v,...La,...s==null?void 0:s.grid})]},`y-tick-${F}`)}),e.series.map((w,F)=>w.hidden?null:r.jsx(h.Fragment,{children:w.data.map((v,z)=>{const j=v/S*m*n,H=f.left+z*b+k*(F+1)+C*F,E=t-f.bottom-j,M=e.labels[z],I=e.series.reduce((_,q)=>{const N=q.data[z];return _+(typeof N=="number"?N:0)},0),W=I>0?(v/I*100).toFixed(1):null,D=w.color?d(w.color):"black",V=_=>{const q=r.jsxs(c.View,{display:"flex",flexDirection:"column",minWidth:"180px",children:[r.jsxs(c.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(c.Text,{fontWeight:"semibold",children:w.name}),r.jsx(c.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:D})]}),r.jsx(c.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:M}),r.jsxs(c.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(c.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(c.Text,{color:"color-gray-500",children:"Value"}),r.jsx(c.Text,{fontWeight:"medium",children:v.toLocaleString()})]}),W!==null&&r.jsxs(c.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(c.Text,{color:"color-gray-500",children:"Share"}),r.jsx(c.Text,{fontWeight:"medium",children:`${W}%`})]}),r.jsxs(c.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(c.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(c.Text,{fontWeight:"medium",children:I.toLocaleString()})]})]})]}),N=_.currentTarget.getBoundingClientRect(),G=N.left+N.width/2,X=N.top;i(G,X,q)},P=()=>{l&&l(w.name,z)};return r.jsx("rect",{x:H,y:E,width:C,height:j,fill:`url(#bar-gradient-${F})`,onMouseEnter:V,onMouseMove:V,onMouseLeave:g,onClick:P,...R0,...s==null?void 0:s.bar},`bar-${F}-${z}`)})},`series-${F}`))]})},ig=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onPointClick:l,showTooltip:i,hideTooltip:g,views:s})=>{const{getColor:d}=c.useTheme(),f={top:20,right:20,bottom:40,left:40},u=o-f.left-f.right,m=t-f.top-f.bottom,p=h.useMemo(()=>{let k=0;return e.series.forEach(S=>{S.data.forEach(T=>{k=Math.max(k,T)})}),k},[e]),y=p||10,x=h.useMemo(()=>{const S=[];for(let T=0;T<=5;T++){const w=y/5*T;S.push(w)}return S},[p]),b=k=>{if(k.length<2)return"";const S=k.map((w,F)=>({x:f.left+F/(e.labels.length-1)*u,y:t-f.bottom-w/y*m*n}));let T=`M ${S[0].x},${S[0].y}`;for(let w=0;w<S.length-1;w++){const F=S[w===0?w:w-1],v=S[w],z=S[w+1],j=S[w+2===S.length?w+1:w+2],H=v.x+(z.x-F.x)/6,E=v.y+(z.y-F.y)/6,M=z.x-(j.x-v.x)/6,I=z.y-(j.y-v.y)/6;T+=` C ${H},${E} ${M},${I} ${z.x},${z.y}`}return T},C=k=>{if(k.length<2)return"";const S=b(k),T=f.left,w=f.left+u,F=t-f.bottom;return`${S} L ${w},${F} L ${T},${F} Z`};return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((k,S)=>{const T=k.color?d(k.color):"black";return r.jsxs("linearGradient",{id:`gradient-${S}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:T,stopOpacity:.3}),r.jsx("stop",{offset:"100%",stopColor:T,stopOpacity:0})]},`gradient-${S}`)})}),r.jsx("line",{x1:f.left,y1:t-f.bottom,x2:o-f.right,y2:t-f.bottom,...Ur,...s==null?void 0:s.axis}),r.jsx("line",{x1:f.left,y1:f.top,x2:f.left,y2:t-f.bottom,...Ur,...s==null?void 0:s.axis}),e.labels.map((k,S)=>{const T=f.left+S/(e.labels.length-1)*u,w=t-f.bottom+20;return r.jsx("text",{x:T,y:w,textAnchor:"middle",...Gr,...s==null?void 0:s.axisLabel,children:k},`x-label-${S}`)}),x.map((k,S)=>{const T=t-f.bottom-k/y*m;return r.jsxs(h.Fragment,{children:[r.jsx("text",{x:f.left-10,y:T,textAnchor:"end",dominantBaseline:"middle",...Gr,...s==null?void 0:s.axisLabel,children:k.toFixed(0)}),a&&r.jsx("line",{x1:f.left,y1:T,x2:o-f.right,y2:T,...La,...s==null?void 0:s.grid})]},`y-tick-${S}`)}),e.series.map((k,S)=>{if(k.hidden)return null;const T=k.color?d(k.color):"black";return r.jsxs(h.Fragment,{children:[r.jsx("path",{d:C(k.data),fill:`url(#gradient-${S})`,...s==null?void 0:s.area}),r.jsx("path",{d:b(k.data),stroke:T,...eg,...s==null?void 0:s.line}),k.data.map((w,F)=>{const v=f.left+F/(e.labels.length-1)*u,z=t-f.bottom-w/y*m*n,j=e.labels[F],H=e.series.reduce((P,_)=>{const q=_.data[F];return P+(typeof q=="number"?q:0)},0),E=H>0?(w/H*100).toFixed(1):null,M=F>0&&typeof k.data[F-1]=="number"?k.data[F-1]:null,I=typeof M=="number"?w-M:null,W=typeof I=="number"?`${I>=0?"+":""}${I.toLocaleString()}`:null,D=P=>{const _=r.jsxs(c.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(c.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(c.Text,{fontWeight:"semibold",children:k.name}),r.jsx(c.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:T})]}),r.jsx(c.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:j}),r.jsxs(c.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(c.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(c.Text,{color:"color-gray-500",children:"Value"}),r.jsx(c.Text,{fontWeight:"medium",children:w.toLocaleString()})]}),W!==null&&r.jsxs(c.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(c.Text,{color:"color-gray-500",children:"Change"}),r.jsx(c.Text,{fontWeight:"medium",children:W})]}),E!==null&&r.jsxs(c.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(c.Text,{color:"color-gray-500",children:"Share"}),r.jsx(c.Text,{fontWeight:"medium",children:`${E}%`})]}),r.jsxs(c.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(c.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(c.Text,{fontWeight:"medium",children:H.toLocaleString()})]})]})]}),q=P.currentTarget.getBoundingClientRect(),N=q.left+q.width/2,G=q.top+q.height/2;i(N,G,_)},V=()=>{l&&l(k.name,F)};return r.jsx("circle",{cx:v,cy:z,fill:T,onMouseEnter:D,onMouseMove:D,onMouseLeave:g,onClick:V,...og,...s==null?void 0:s.point},`point-${S}-${F}`)})]},`series-${S}`)})]})},cg=({dataPoints:e,width:o,height:t,animationProgress:n,isDonut:a=!1,onSliceClick:l,showTooltip:i,hideTooltip:g,views:s})=>{const{getColor:d}=c.useTheme(),{ref:f,relation:u}=c.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),m=h.useRef(null);h.useEffect(()=>{m.current&&f&&(f.current=m.current)},[m,f]);const y=Math.min(o,t)/2*.8,x=o/2,b=t/2,C=a?y*.6:0,k=h.useMemo(()=>e.filter(w=>!w.hidden),[e]),S=h.useMemo(()=>k.reduce((w,F)=>w+F.value,0),[k]),T=h.useMemo(()=>{if(S===0)return[{path:a?[`M ${x} ${b-y}`,`A ${y} ${y} 0 1 1 ${x} ${b+y}`,`A ${y} ${y} 0 1 1 ${x} ${b-y}`,`M ${x} ${b-C}`,`A ${C} ${C} 0 1 0 ${x} ${b+C}`,`A ${C} ${C} 0 1 0 ${x} ${b-C}`,"Z"].join(" "):[`M ${x} ${b}`,`M ${x} ${b-y}`,`A ${y} ${y} 0 1 1 ${x} ${b+y}`,`A ${y} ${y} 0 1 1 ${x} ${b-y}`,"Z"].join(" "),color:"#E2E8F0",label:"Total",value:0,percentage:"0%",labelX:x,labelY:b,startAngle:0,endAngle:Math.PI*2,index:-1}];const w=[];let F=-Math.PI/2;for(let v=0;v<k.length;v++){const j=k[v].value/S,H=j*2*Math.PI*n,M=Math.max(0,H-.02),I=F+M,W=x+Math.cos(F)*y,D=b+Math.sin(F)*y,V=x+Math.cos(I)*y,P=b+Math.sin(I)*y,_=x+Math.cos(F)*C,q=b+Math.sin(F)*C,N=x+Math.cos(I)*C,G=b+Math.sin(I)*C,X=M>Math.PI?1:0;let $;a?$=[`M ${W} ${D}`,`A ${y} ${y} 0 ${X} 1 ${V} ${P}`,`L ${N} ${G}`,`A ${C} ${C} 0 ${X} 0 ${_} ${q}`,"Z"].join(" "):$=[`M ${x} ${b}`,`L ${W} ${D}`,`A ${y} ${y} 0 ${X} 1 ${V} ${P}`,"Z"].join(" ");const O=F+M/2,B=a?(y+C)/2:y*.7,L=x+Math.cos(O)*B,U=b+Math.sin(O)*B,K=`${(j*100).toFixed(1)}%`,J=k[v].color||$o[v%$o.length],ne=d(J);w.push({path:$,color:ne,label:k[v].label,value:k[v].value,percentage:K,labelX:L,labelY:U,startAngle:F,endAngle:I,index:v,originalIndex:e.findIndex(re=>re.label===k[v].label)}),F=I}return w},[k,S,y,x,b,C,n,a,e]);return r.jsxs("svg",{ref:m,width:o,height:t,style:{overflow:"visible"},children:[a&&r.jsxs("g",{pointerEvents:"none",children:[r.jsx("circle",{cx:x,cy:b,r:C,fill:"white"}),r.jsx("text",{x,y:b-8,textAnchor:"middle",dominantBaseline:"middle",fontSize:"14px",fontWeight:"500",fill:"color-gray-500",children:"Total"}),r.jsx("text",{x,y:b+12,textAnchor:"middle",dominantBaseline:"middle",fontSize:"20px",fontWeight:"800",fill:"color-gray-900",children:S.toLocaleString()})]}),T.map((w,F)=>{const v=H=>{const E=S>0?w.value/S*100:0,M=S>0?Math.max(0,100-E):null,I=r.jsxs(c.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(c.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(c.Text,{fontWeight:"semibold",children:w.label}),r.jsx(c.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:w.color})]}),r.jsxs(c.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",w.index+1," of ",k.length]}),r.jsxs(c.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(c.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(c.Text,{color:"color-gray-500",children:"Value"}),r.jsx(c.Text,{fontWeight:"medium",children:w.value.toLocaleString()})]}),r.jsxs(c.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(c.Text,{color:"color-gray-500",children:"Share"}),r.jsx(c.Text,{fontWeight:"medium",children:w.percentage})]}),r.jsxs(c.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(c.Text,{color:"color-gray-500",children:"Total"}),r.jsx(c.Text,{fontWeight:"medium",children:S.toLocaleString()})]}),M!==null&&r.jsxs(c.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(c.Text,{color:"color-gray-500",children:"Remaining"}),r.jsx(c.Text,{fontWeight:"medium",children:`${M.toFixed(1)}%`})]})]})]});let W=H.clientX,D=H.clientY;if(m.current){const V=m.current.getBoundingClientRect();W=V.left+w.labelX,D=V.top+w.labelY}i(W,D,I)},z=()=>{w.index!==-1&&l&&l(e[w.index],w.index)},j=w.index===-1;return r.jsxs("g",{children:[r.jsx("path",{d:w.path,fill:w.color,onMouseEnter:j?void 0:v,onMouseMove:j?void 0:v,onMouseLeave:j?void 0:g,onClick:z,...Yr,style:{...Yr==null?void 0:Yr.style,cursor:j?"default":"pointer"},...s==null?void 0:s.pie}),!j&&w.endAngle-w.startAngle>.25&&r.jsx("text",{x:w.labelX,y:w.labelY,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"11px",fontWeight:"800",pointerEvents:"none",paintOrder:"stroke",stroke:"rgba(0,0,0,0.2)",strokeWidth:"2px",children:w.percentage})]},`slice-${F}`)})]})},sg=({visible:e,x:o,y:t,content:n,maxDistance:a=100,views:l})=>{const i=h.useRef(null),[g,s]=h.useState({left:0,top:0});return h.useEffect(()=>{if(!e||!i.current||typeof window>"u"||typeof i.current.getBoundingClientRect!="function")return;const f=i.current.getBoundingClientRect(),u=f.width||200,m=f.height||100,p=20,y=16;let x=o-u/2,b=t-m-p;b<y&&(b=t+p),x+u>window.innerWidth-y?x=window.innerWidth-u-y:x<y&&(x=y),b=Math.max(y,Math.min(b,window.innerHeight-m-y)),s({left:x,top:b})},[e,o,t]),e?r.jsx(c.View,{ref:i,position:"fixed",left:`${g.left}px`,top:`${g.top}px`,...qr,...l==null?void 0:l.tooltip,style:{...qr==null?void 0:qr.style,pointerEvents:"none",transition:"all 0.1s ease-out"},children:n}):null},dg=({type:e,data:o,dataPoints:t,title:n,showLegend:a=!0,legendPosition:l="bottom",showGrid:i=!0,showTooltips:g=!0,animated:s=!0,animationDuration:d=500,responsive:f=!0,aspectRatio:u=16/9,width:m=200,height:p=200,views:y,onDataPointClick:x,onSeriesClick:b,isLoading:C=!1,error:k,noData:S,loadingIndicator:T,errorIndicator:w,noDataIndicator:F,"aria-label":v,themeMode:z,...j})=>{const{animationProgress:H,tooltip:E,containerRef:M,processedData:I,showTooltip:W,hideTooltip:D,getChartDimensions:V,toggleSeries:P}=ag({data:o,dataPoints:t,animated:s,animationDuration:d,showTooltips:g}),_=I(),{width:q,height:N}=V(),G=m||q,X=p||(f?q/u:N),$=()=>{if(!a||!_)return null;let ne=[];return e==="pie"||e==="donut"?Array.isArray(_)&&(ne=_):_&&_.series&&(ne=_.series),!ne||ne.length===0?null:r.jsx(c.Horizontal,{flexWrap:"wrap",justifyContent:"flex-start",marginTop:l==="bottom"?"16px":0,marginBottom:l==="top"?"16px":0,...X0,...y==null?void 0:y.legend,children:ne.map((re,ce)=>{const Q=re.hidden,le=re.name||re.label;return r.jsxs(c.View,{...J0,onClick:()=>P(le),opacity:Q?.4:1,...y==null?void 0:y.legendItem,children:[r.jsx(c.View,{backgroundColor:re.color,...Q0,opacity:Q?.3:1}),r.jsx(c.Text,{...Z0,textDecoration:Q?"line-through":"none",children:le})]},`legend-${ce}`)})})},O=()=>{if(!_)return null;switch(e){case"bar":return r.jsx(lg,{data:_,width:G,height:X,animationProgress:H,showGrid:i,onBarClick:b,showTooltip:W,hideTooltip:D,views:y});case"line":case"area":return r.jsx(ig,{data:_,width:G,height:X,animationProgress:H,showGrid:i,onPointClick:b,showTooltip:W,hideTooltip:D,views:y});case"pie":case"donut":return r.jsx(cg,{dataPoints:_,width:G,height:X,animationProgress:H,isDonut:e==="donut",onSliceClick:x,showTooltip:W,hideTooltip:D,views:y});default:return null}},B=()=>C?r.jsx(c.View,{...rg,...y==null?void 0:y.loadingOverlay,children:T||r.jsx(c.Center,{children:r.jsx(io,{size:"lg"})})}):null,L=()=>k?r.jsx(c.View,{...tg,...y==null?void 0:y.errorOverlay,children:w||r.jsx(c.Text,{fontWeight:"medium",children:typeof k=="string"?k:"An error occurred"})}):null,U=()=>S?r.jsx(c.View,{...ng,...y==null?void 0:y.noDataOverlay,children:F||r.jsx(c.Text,{children:typeof S=="string"?S:"No data available"})}):null,K=v??(typeof n=="string"?n:"Chart"),J=!k&&!C&&!S;return r.jsxs(c.View,{ref:M,role:"region","aria-label":K,"aria-busy":C,...Y0,...y==null?void 0:y.container,...j,children:[n&&r.jsx(c.Text,{...K0,children:n}),J&&l==="top"&&$(),r.jsxs(c.View,{flex:1,width:"100%",position:"relative",...y==null?void 0:y.chart,children:[J&&O(),B(),L(),U(),r.jsx(sg,{visible:g&&E.visible,x:E.x,y:E.y,content:E.content,maxDistance:100,views:y})]}),J&&l==="bottom"&&$()]})},gg=e=>r.jsx(dg,{...e}),ug=(e=365)=>{const[o,t]=h.useState(!1),[n,a]=h.useState(null),l="app-studio-cookie-consent";h.useEffect(()=>{if(typeof localStorage>"u")return;const d=localStorage.getItem(l);a(d!==null?d==="true":!1)},[]);const i=d=>{if(typeof localStorage<"u"){localStorage.setItem(l,String(d));const f=new Date;f.setDate(f.getDate()+e),localStorage.setItem(`${l}-expires`,f.toISOString())}a(d)};return{isHovered:o,setIsHovered:t,hasConsent:n,acceptCookies:()=>{i(!0)},resetConsent:()=>{typeof localStorage<"u"&&(localStorage.removeItem(l),localStorage.removeItem(`${l}-expires`)),a(!1)}}},hg=e=>({default:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-gray-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-gray-600",borderColor:"color-gray-300",hoverBackgroundColor:"color-gray-100"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-800",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}},primary:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-700"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-700",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}}}),fg=({title:e="Nous utilisons des cookies",description:o="Ce site utilise des cookies pour améliorer votre expérience. En continuant à naviguer sur ce site, vous acceptez notre utilisation des cookies conformément à notre politique de confidentialité.",acceptButtonText:t="Accepter",customizeButtonText:n="Personnaliser",position:a="bottom",variant:l="default",onAccept:i,onCustomize:g,views:s,showCustomizeButton:d=!0,cookieExpiration:f=365,themeMode:u,...m})=>{const{themeMode:p}=c.useTheme(),{hasConsent:y,acceptCookies:x}=ug(f),C=hg()[l];if(y)return null;const k=()=>{x(),i&&i()},S=()=>{g&&g()};return r.jsx(c.View,{style:{position:"fixed",left:16,right:16,zIndex:1e3,...a==="bottom"?{bottom:16}:{top:16}},padding:16,borderWidth:"1px",borderStyle:"solid",borderRadius:8,maxWidth:"800px",marginLeft:"auto",marginRight:"auto",transition:"opacity 0.3s ease, transform 0.3s ease",...C.container,...s==null?void 0:s.container,...m,children:r.jsxs(c.Vertical,{gap:12,maxWidth:1200,marginLeft:"auto",marginRight:"auto",children:[e&&r.jsx(c.Text,{fontWeight:"bold",fontSize:18,color:"color-black",...s==null?void 0:s.title,children:e}),o&&r.jsx(c.Text,{fontSize:14,color:"color-black",...s==null?void 0:s.description,children:o}),r.jsxs(c.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...s==null?void 0:s.buttonGroup,children:[d&&r.jsx(ye,{variant:"outline",onClick:S,size:"sm",...s==null?void 0:s.customizeButton,children:n}),r.jsx(ye,{variant:"filled",onClick:k,size:"sm",...s==null?void 0:s.acceptButton,children:t})]})]})})},mg=e=>r.jsx(fg,{...e}),pg=e=>{const{size:o,variant:t,onOpenChange:n}=e||{},[a,l]=h.useState(!1),[i,g]=h.useState({x:0,y:0}),[s,d]=h.useState(null),f=h.useRef(null),u=h.useRef(null),m=h.useMemo(()=>Eo("contextmenu-content"),[]),p=h.useCallback(x=>{g({x:x.clientX,y:x.clientY}),l(!0),n==null||n(!0)},[n]),y=h.useCallback(()=>{l(!1),d(null),n==null||n(!1)},[n]);return h.useEffect(()=>{const x=k=>{u.current&&!u.current.contains(k.target)&&y()},b=()=>{a&&y()},C=k=>{k.key==="Escape"&&a&&y()};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",x),window.addEventListener("resize",b),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",x),window.removeEventListener("resize",b),document.removeEventListener("keydown",C)}},[a,y]),{isOpen:a,setIsOpen:l,position:i,setPosition:g,activeSubmenuId:s,setActiveSubmenuId:d,size:o,variant:t,triggerRef:f,contentRef:u,contentId:m,openMenu:p,closeMenu:y}},Ba={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},yg={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},_a={hover:{backgroundColor:"color-gray-100"}},Oa=h.createContext({isOpen:!1,setIsOpen:()=>{},position:{x:0,y:0},setPosition:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null},contentRef:{current:null},contentId:"contextmenu-content",closeMenu:()=>{},openMenu:()=>{}}),bg=({children:e,value:o})=>r.jsx(Oa.Provider,{value:o,children:e}),Kr=()=>{const e=h.useContext(Oa);if(!e)throw new Error("useContextMenuContext must be used within a ContextMenuProvider");return e},Na=({children:e,disableNativeContextMenu:o=!0,asChild:t=!1,isDisabled:n=!1,views:a,...l})=>{const{triggerRef:i,contentId:g,openMenu:s}=Kr(),f={ref:i,onContextMenu:u=>{if(!n)if(o&&u.preventDefault(),s)s(u);else{const{setIsOpen:m,setPosition:p}=Kr();p({x:u.clientX,y:u.clientY}),m(!0)}},"aria-controls":g,"aria-haspopup":"menu","data-disabled":n?"":void 0,...t&&h.isValidElement(e)&&e.props.isDisabled===void 0&&{isDisabled:n},...a==null?void 0:a.container,...l};if(t&&h.isValidElement(e)){const u=h.Children.only(e);return h.cloneElement(u,{...f,...u.props})}return r.jsx(c.View,{...f,children:e})},Qt=({items:e,children:o,position:t,side:n="right",align:a="start",views:l,style:i,...g})=>{const{isOpen:s,position:d,contentRef:f,contentId:u,variant:m}=Kr(),p=h.useRef(null),y=f||p,{ref:x,relation:b}=c.useElementPosition({}),[C,k]=h.useState({x:0,y:0});if(h.useEffect(()=>{if(s&&y.current){const T=t||d,w=y.current.offsetWidth,F=y.current.offsetHeight,v=window.innerWidth,z=window.innerHeight;let j=T.x,H=T.y;b&&(b.space.horizontal==="left"?j=T.x-w:j=T.x,b.space.vertical==="top"?H=T.y-F:H=T.y),j+w>v&&(j=v-w-8),j<8&&(j=8),H+F>z&&(H=z-F-8),H<8&&(H=8),k({x:j,y:H})}},[s,d,t,n,a,y,b]),!s)return null;const S={position:"fixed",top:`${C.y}px`,left:`${C.x}px`,zIndex:1e3,transformOrigin:"top left"};return r.jsxs(c.View,{id:u||"context-menu",ref:y,role:"menu",tabIndex:-1,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:{...S,...i},...yg[m],...l==null?void 0:l.menu,...l==null?void 0:l.content,...g,children:[e&&e.map((T,w)=>T.divider?r.jsx(Ua,{views:l},`divider-${w}`):r.jsx(qa,{item:T,views:l},T.id)),o]})},qa=({item:e,children:o,onSelect:t,isDisabled:n=!1,views:a,variant:l,shape:i,isLoading:g,loaderProps:s,loaderPosition:d,icon:f,iconPosition:u,isFilled:m,isAuto:p,isIconRounded:y,isHovered:x,shadow:b,ariaLabel:C,animation:k,textColor:S,reversed:T,borderMovingDuration:w,borderMovingGradientColors:F,animatedStrokeAccentColor:v,animatedStrokeTextColor:z,to:j,isExternal:H,config:E,...M})=>{const{activeSubmenuId:I,setActiveSubmenuId:W,size:D,closeMenu:V}=Kr();if(e){const[q,N]=h.useState(!1),G=e.items&&e.items.length>0,X=I===e.id,[$,O]=h.useState({x:0,y:0}),B=e.disabled||n,L=()=>{N(!0),G&&W(e.id)},U=()=>{N(!1)},K=()=>{B||!G&&e.onClick&&(e.onClick(),V&&V())},{ref:J,relation:ne}=c.useElementPosition({});return h.useEffect(()=>{if(X&&J.current){const re=J.current.getBoundingClientRect(),ce=window.innerWidth,Q=200;let le=!1;if(ne)le=ne.space.horizontal==="left";else{const he=ce-re.right,ue=re.left;le=he<Q&&ue>he}O({x:le?re.left-Q:re.right,y:re.top})}},[X,e.items,ne]),r.jsxs(c.View,{ref:J,role:"menuitem",display:"flex",alignItems:"center",cursor:B?"not-allowed":"pointer",opacity:B?.5:1,position:"relative","aria-disabled":B,"data-disabled":B?"":void 0,...Ba[D],_hover:B?{}:_a.hover,backgroundColor:q&&!B?"color-gray-100":"transparent",onMouseEnter:L,onMouseLeave:U,onClick:K,...a==null?void 0:a.item,...M,children:[e.icon&&r.jsx(c.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),r.jsx(c.View,{flexGrow:1,children:e.label}),G&&r.jsx(c.View,{marginLeft:8,...a==null?void 0:a.submenuIndicator,children:r.jsx(we,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),X&&G&&r.jsx(Qt,{items:e.items||[],position:$,side:"right",align:"start",views:a})]})}const P=q=>{n||(t==null||t(q),V&&V())},_=j?{as:"a",href:j,color:"inherit",textDecoration:"none",...H?{target:"_blank",rel:"noopener noreferrer"}:{}}:{};return r.jsx(c.View,{role:"menuitem",onClick:P,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,"aria-disabled":n,"data-disabled":n?"":void 0,...Ba[D],_hover:n?{}:_a.hover,..._,...a==null?void 0:a.item,...M,children:o})},Ua=({views:e,...o})=>r.jsx(c.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.divider,...o}),xg=({views:e,...o})=>r.jsx(c.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.separator,...o}),kg=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,views:l,themeMode:i,onOpenChange:g,...s})=>!o||o.length===0?r.jsx(r.Fragment,{children:e}):r.jsxs(r.Fragment,{children:[r.jsx(Na,{disableNativeContextMenu:a,views:l,...s,children:e}),r.jsx(Qt,{items:o,views:l})]}),Lo=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,onOpenChange:l,views:i,...g})=>{const s=pg({size:t,variant:n,onOpenChange:l}),{isOpen:d,setIsOpen:f,position:u,setPosition:m,activeSubmenuId:p,setActiveSubmenuId:y,triggerRef:x,contentRef:b,contentId:C,openMenu:k,closeMenu:S}=s;return r.jsx(bg,{value:{isOpen:d,setIsOpen:f,position:u,setPosition:m,activeSubmenuId:p,setActiveSubmenuId:y,size:t,variant:n,triggerRef:x,contentRef:b,contentId:C,openMenu:k,closeMenu:S,styles:i},children:r.jsx(kg,{items:o,size:t,variant:n,disableNativeContextMenu:a,views:i,...g,children:e})})};Lo.Trigger=Na,Lo.Content=Qt,Lo.Item=qa,Lo.Divider=Ua,Lo.Separator=xg;const Cg=({src:e,color:o,views:t,themeMode:n,...a})=>{const{getColor:l,themeMode:i}=c.useTheme(),g=o?{fill:l(o,{themeMode:i}),stroke:l(o,{themeMode:i})}:{};return r.jsx(c.View,{display:"flex",alignItems:"center",justifyContent:"center",...a,...t==null?void 0:t.container,children:r.jsx(c.Image,{...g,content:'url("'+e+'")',width:"100%",height:"100%",...t==null?void 0:t.image})})},wg=({path:e,...o})=>r.jsx(c.Image,{src:e,...o}),Ga=(e,o)=>o?Array.isArray(e)?e:e===""?[]:[e]:Array.isArray(e)?e[0]??"":e,Ya=({placeholder:e,isMulti:o,options:t,value:n,defaultValue:a,id:l})=>{const i=h.useId().replace(/[^a-zA-Z0-9_-]/g,""),g=l??`select-${i}`,s=n!==void 0,[d,f]=h.useState(!1),[u,m]=h.useState(!1),[p,y]=h.useState(()=>a!==void 0?Ga(a,o):o?[]:e?"":Array.isArray(t)&&t.length>0?t[0].value:""),x=s?Ga(n,o):p,b=h.useCallback(w=>{s||y(w)},[s]),[C,k]=h.useState(0),[S,T]=h.useState(!0);return{id:g,value:x,setValue:b,hide:S,setHide:T,isHovered:d,setIsHovered:f,isFocused:u,setIsFocused:m,highlightedIndex:C,setHighlightedIndex:k}},Zt=({children:e,views:o={helperText:{}},...t})=>r.jsx(c.Text,{fontSize:"11px",fontWeight:"400",letterSpacing:"-0.01em",lineHeight:"16px",marginVertical:0,marginHorizontal:0,color:"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...o.helperText,...t,children:e}),Ze=h.forwardRef(({children:e,helperText:o,error:t=!1,views:n,...a},l)=>r.jsxs(c.Vertical,{ref:l,gap:4,position:"relative",width:"100%",boxSizing:"border-box",marginVertical:0,...a,...n==null?void 0:n.container,children:[e,!t&&o&&r.jsx(Zt,{marginTop:0,...n==null?void 0:n.helperText,children:o}),t&&r.jsx(c.Text,{fontSize:"11px",lineHeight:"16px",marginTop:0,marginHorizontal:0,fontWeight:"500",color:"color-red-500",transition:"color 0.2s ease, opacity 0.2s ease",...n==null?void 0:n.error,children:t})]}));Ze.displayName="FieldContainer";const Sg={default:{borderRadius:"8px"},square:{borderRadius:0},rounded:{borderRadius:"8px"},pill:{borderRadius:"9999px"}},vg={xs:"10px",sm:"11px",md:"11px",lg:"12px",xl:"12px"},Tg={outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},default:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},none:{border:"none",style:{backgroundColor:"transparent"},color:"inherit",transition:"background-color 0.2s ease"}},Ig={xs:{minHeight:24,paddingVertical:4,paddingHorizontal:10},sm:{minHeight:32,paddingVertical:7,paddingHorizontal:10},md:{minHeight:40,paddingVertical:9,paddingHorizontal:12},lg:{minHeight:48,paddingVertical:11,paddingHorizontal:14},xl:{minHeight:56,paddingVertical:13,paddingHorizontal:16}},Fg=e=>{const{minHeight:o,paddingVertical:t,paddingHorizontal:n}=Ig[e];return{minHeight:`${o}px`,paddingTop:`${t}px`,paddingBottom:`${t}px`,paddingLeft:`${n}px`,paddingRight:`${n}px`}},co=({label:e,shadow:o,children:t,value:n,size:a="md",shape:l="default",variant:i="default",error:g=!1,showLabel:s=!1,isFocused:d=!1,isHovered:f=!1,isDisabled:u=!1,isReadOnly:m=!1,views:p={pickerBox:{}},...y})=>{const{themeMode:x}=c.useTheme(),b=x==="dark",k=g?"color-red-500":(f||d)&&!u?"theme-primary":"color-gray-200";return r.jsx(c.Horizontal,{gap:8,width:"100%",boxSizing:"border-box",display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",borderStyle:"solid",borderColor:k,backgroundColor:b?"color-gray-900":"color-white",fontSize:c.Typography.fontSizes[a],cursor:u?"not-allowed":m?"auto":"text",opacity:u?.7:1,transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...Fg(a),...typeof o=="object"&&o!==null?o:{},...Sg[l],...Tg[i],...p==null?void 0:p.container,...y,children:t})},dr=({children:e,...o})=>r.jsx(c.Horizontal,{gap:10,right:10,zIndex:500,flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",...o,children:e}),zg={h1:{fontSize:96,letterSpacing:-1.5},h2:{fontSize:60,letterSpacing:-.5},h3:{fontSize:48,letterSpacing:0},h4:{fontSize:34,letterSpacing:.25},h5:{fontSize:24,letterSpacing:0},h6:{fontSize:20,letterSpacing:.15}},Mg=({children:e,heading:o,isItalic:t=!1,isUnderlined:n=!1,isStriked:a=!1,weight:l="normal",size:i="sm",dropDown:g,error:s,isDisabled:d,helperText:f,views:u,...m})=>{const p=o?zg[o]:{};return r.jsx(c.Element,{as:"label",width:"100%",fontSize:i,fontStyle:t?"italic":"normal",fontWeight:c.Typography.fontWeights[l],textDecoration:a?"line-through":n?"underline":"none",...s?{color:"color-red-500"}:d?{color:"color-gray-400"}:{},...d?{cursor:"not-allowed"}:{},...p,...m,children:e})},gr=e=>r.jsx(Mg,{...e}),yo=({children:e,size:o="md",error:t=!1,color:n="theme-primary",views:a={label:{}},helperText:l,...i})=>r.jsx(gr,{position:"static",fontSize:vg[o],letterSpacing:"-0.01em",whiteSpace:"nowrap",fontWeight:500,color:t?"color-red-500":"inherit",transition:"color 0.2s ease",...a.label,...i,children:e}),Bo=({children:e,...o})=>r.jsx(c.Vertical,{display:"flex",flexDirection:"column",gap:4,flex:1,width:"100%",maxWidth:"100%",boxSizing:"border-box",...o,children:e}),Ka={xs:12,sm:14,md:16,lg:18,xl:20},jg={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},Wg={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"}},Eg={padding:"10px 12px",cursor:"pointer",borderRadius:8,margin:"2px 4px",transition:"all 0.15s ease-in-out"},Xr={default:{},highlighted:{backgroundColor:"color-gray-100"},selected:{backgroundColor:"color-gray-100"},selectedHighlighted:{backgroundColor:"color-gray-200"}},Xa={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},Ag={padding:"4px 8px",borderRadius:8,backgroundColor:"color-gray-100",fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},Hg={scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.15) transparent"},Vg=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},Pg=({isHovered:e,setIsHovered:o=()=>{},option:t,size:n="md",callback:a=()=>{},style:l,isSelected:i=!1,...g})=>{const s=(u,m)=>{u.stopPropagation(),u.preventDefault(),typeof a=="function"&&a(m)},d=()=>o(!e),f=()=>i&&e?Xr.selectedHighlighted:i?Xr.selected:e?Xr.highlighted:Xr.default;return r.jsxs(c.Element,{as:"li",role:"option","aria-selected":i,display:"flex",alignItems:"center",justifyContent:"space-between",listStyleType:"none",...Eg,...f(),onMouseEnter:d,onMouseLeave:d,onClick:u=>s(u,t.value),...g,children:[r.jsx(c.Text,{fontSize:c.Typography.fontSizes[n],fontWeight:i?"500":"400",lineHeight:"14px",color:i?"color-gray-900":"color-gray-700",...l,children:t.label}),i&&r.jsx(c.Element,{as:"span","aria-hidden":"true",color:"theme-primary",fontSize:"14px",marginLeft:8,display:"flex",alignItems:"center",children:"✓"})]})},Dg=({size:e="md",views:o={field:{},text:{}},value:t,isDisabled:n,placeholder:a,removeOption:l=()=>{},options:i})=>{const g=(o==null?void 0:o.field)||{},s=(o==null?void 0:o.text)||{},d=Array.isArray(t)&&t.length>0,f={margin:0,width:"95%",height:"100%",border:"none",paddingVertical:0,paddingHorizontal:0,fontSize:c.Typography.fontSizes[e],fontWeight:"400",letterSpacing:"-0.01em",color:n?"color-gray-400":"color-gray-900",cursor:n?"not-allowed":"pointer",transition:"all 0.2s ease-in-out",...d?{}:{maxLines:1,minWidth:0},...g,...s,style:{backgroundColor:"transparent",...g.style,...s.style}},u=i.length>0&&i.find(m=>m.value===t);return r.jsx(c.Text,{...f,children:(t===""||Array.isArray(t)&&t.length===0)&&a?a:r.jsx(r.Fragment,{children:typeof t=="string"?(u&&u.label)??t:Array.isArray(t)&&t.length>0?r.jsx(c.Horizontal,{gap:6,children:t.map(m=>r.jsx(Bg,{option:m,removeOption:l},m))}):r.jsx("span",{children:t})})})},$g=({id:e,name:o,value:t,onChange:n,isMulti:a=!1,isDisabled:l=!1,isReadOnly:i=!1,options:g=[],defaultValue:s,...d})=>{const f=u=>{n&&n(a?Array.from(u.target.selectedOptions,m=>m.value):u.target.value)};return r.jsx(c.Element,{id:e,name:o,as:"select",opacity:0,width:1,height:1,overflow:"hidden",position:"absolute",pointerEvents:"none",tabIndex:-1,"aria-hidden":"true",value:t,disabled:l,readOnly:i,onChange:f,multiple:a,...d,children:g.length>0&&g.map(u=>r.jsx("option",{value:u.value,children:u.label},u.value))})},Lg=({size:e,views:o={},options:t,callback:n=()=>{},highlightedIndex:a,setHighlightedIndex:l=()=>{},selectedValue:i,listboxId:g,getOptionId:s})=>{const d=u=>n(u),f=u=>Array.isArray(i)?i.includes(u):i===u;return r.jsx(c.Element,{as:"ul",role:"listbox",id:g,display:"flex",flexDirection:"column",margin:0,padding:"4px",...jg,style:Hg,...o==null?void 0:o.dropDown,children:t&&t.length>0&&t.map((u,m)=>r.jsx(Pg,{id:s?s(m):void 0,size:e,style:o.text,option:u,callback:d,isSelected:f(u.value),isHovered:m===a,setIsHovered:()=>{},onMouseEnter:()=>l(m)},u.value))})},Bg=({option:e,size:o="md",removeOption:t=()=>{},...n})=>{const a=()=>t(e);return r.jsxs(c.Horizontal,{gap:6,alignItems:"center",onClick:l=>l.stopPropagation(),...Ag,_hover:{backgroundColor:"color-gray-200"},...n,children:[r.jsx(c.Text,{fontSize:c.Typography.fontSizes[o],fontWeight:"500",color:"color-gray-700",children:e}),r.jsx(c.Element,{as:"button",type:"button","aria-label":`Remove ${e}`,onClick:a,display:"flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",transition:"all 0.2s ease-in-out",_hover:{color:"color-gray-700"},children:r.jsx(Le,{color:"inherit",widthHeight:Ka[o]})})]})},Ja=({id:e,name:o,label:t,value:n,placeholder:a,helperText:l,hide:i=!1,error:g=!1,isMulti:s=!1,isFocused:d=!1,isHovered:f=!1,isDisabled:u=!1,isReadOnly:m=!1,isRequired:p=!1,isAutoFocus:y=!1,options:x=[],shadow:b={},size:C="md",shape:k="default",variant:S="default",views:T={text:{},icon:{},dropDown:{},selectBox:{},label:{},helperText:{}},onChange:w=()=>{},setHide:F=()=>{},setValue:v=()=>{},setIsHovered:z=()=>{},setIsFocused:j=()=>{},setHighlightedIndex:H,highlightedIndex:E,isScrollable:M,"aria-label":I,...W})=>{const D=h.useId(),V=e??`select-${D.replace(/[^a-zA-Z0-9_-]/g,"")}`,P=`${V}-native`,_=`${V}-label`,q=`${V}-listbox`,N=Q=>`${V}-option-${Q}`,{ref:G,relation:X,updateRelation:$}=c.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),O=h.useRef(null),B=()=>{var ue;if(!G.current)return{};const Q=G.current.getBoundingClientRect(),le={position:"fixed",left:Q.left,width:Q.width,zIndex:1e4};return((ue=X==null?void 0:X.space)==null?void 0:ue.vertical)==="top"?{...le,bottom:window.innerHeight-Q.top+8}:{...le,top:Q.bottom+8}};h.useEffect(()=>{const Q=()=>F(!0);return document.addEventListener("closeAllSelects",Q),()=>document.removeEventListener("closeAllSelects",Q)},[F]),h.useEffect(()=>{var Q;y&&!u&&!m&&((Q=G.current)==null||Q.focus())},[]),h.useEffect(()=>{const Q=le=>{!le.target.closest(`#${V}`)&&!i&&F(!0)};return document.addEventListener("click",Q),()=>{document.removeEventListener("click",Q)}},[V,i,F]);const L=()=>z(!f),U=()=>j(!0),K=Q=>{document.dispatchEvent(new Event("closeAllSelects")),Q&&Q.stopPropagation&&Q.stopPropagation();const le=!i;F(le),j(!le)},J=h.useCallback(Q=>{if(F(!0),document.dispatchEvent(new Event("closeAllSelects")),s&&Array.isArray(n)){if(!n.includes(Q)){const le=[...n,Q];v(le),w&&w(le)}}else v(Q),w&&w(Q);j(!0)},[s,n,F,v,w,j]),ne=Q=>{if(Array.isArray(n)&&n.includes(Q)){const le=n.filter(he=>he!==Q);v(le),w&&w(le)}},re=!!t,ce=Vg(T);return r.jsx(Ze,{ref:G,position:"relative",width:"100%",display:"inline-block",id:V,role:"combobox","aria-haspopup":"listbox","aria-expanded":!i,"aria-labelledby":!I&&re?_:void 0,"aria-label":I,"aria-controls":q,"aria-activedescendant":!i&&x.length>0?N(E??0):void 0,"aria-disabled":u||void 0,"aria-required":p||void 0,tabIndex:u||m?-1:0,helperText:l,error:g,views:ce,onKeyDown:Q=>{if(u||m||Q.target!==Q.currentTarget)return;if(i){(Q.key==="Enter"||Q.key===" "||Q.key==="ArrowDown")&&(Q.preventDefault(),document.dispatchEvent(new Event("closeAllSelects")),F(!1),j(!0));return}const le=E??0;if(Q.key==="ArrowDown")Q.preventDefault(),H==null||H(Math.min(le+1,x.length-1));else if(Q.key==="ArrowUp")Q.preventDefault(),H==null||H(Math.max(le-1,0));else if(Q.key==="Enter"){Q.preventDefault();const he=x[le];he&&J(he.value)}else Q.key==="Escape"&&(Q.preventDefault(),F(!0))},onClick:Q=>{Q.stopPropagation(),u||m||K(Q)},children:r.jsxs(co,{label:t,size:C,error:g,shape:k,views:T,shadow:b,variant:S,value:n,color:"theme-primary",isHovered:f,isDisabled:u,isReadOnly:m,isFocused:d,showLabel:re,onMouseEnter:L,onMouseLeave:L,position:"relative",...T==null?void 0:T.content,children:[r.jsxs(Bo,{children:[re&&r.jsx(yo,{id:_,htmlFor:P,color:"theme-primary",error:g,...T==null?void 0:T.label,children:t}),r.jsx($g,{id:P,name:o,options:x,onChange:w,value:n,isDisabled:u,isReadOnly:m,isMulti:s,required:p||void 0,onFocus:U,...W}),r.jsx(Dg,{options:x,size:C,views:T,value:n,isDisabled:u,placeholder:a,removeOption:ne})]}),r.jsx(dr,{children:!m&&!u&&r.jsx(c.Element,{display:"flex",alignItems:"center",justifyContent:"center",style:i?Xa.closed:Xa.open,children:r.jsx(we,{color:"inherit",widthHeight:Ka[C],style:T.icon,orientation:"down"})})}),!i&&x.length>0&&r.jsx(nr,{children:r.jsx(c.Element,{ref:O,onClick:Q=>Q.stopPropagation(),style:{...B(),...Wg.enter},children:r.jsx(Lg,{size:C,views:T,options:x,callback:J,highlightedIndex:E,setHighlightedIndex:H,selectedValue:n,listboxId:q,getOptionId:N})})})]})})},ur=e=>{const o=Te("select",e),t={...o,options:o.options||[]},n=Ya(t);return r.jsx(Ja,{...n,...t,value:n.value,onClick:a=>{a.stopPropagation(),o.onClick&&o.onClick(a)}})},Qa=({isDisabled:e,isChecked:o})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(o||!1),[i,g]=h.useState(o||!1);return h.useEffect(()=>{o!==void 0&&(l(o),g(o))},[o]),{isHovered:t,setIsHovered:n,on:a,setOn:l,value:i,setValue:g}},Za={xs:{height:"10px",width:"10px"},sm:{height:"14px",width:"14px"},md:{height:"18px",width:"18px"},lg:{height:"22px",width:"22px"},xl:{height:"26px",width:"26px"}},_g={xs:{height:"20px",width:"40px"},sm:{height:"24px",width:"48px"},md:{height:"28px",width:"56px"},lg:{height:"32px",width:"64px"},xl:{height:"36px",width:"72px"}},Og={xs:{height:"22px",width:"52px"},sm:{height:"26px",width:"62px"},md:{height:"30px",width:"72px"},lg:{height:"34px",width:"84px"},xl:{height:"38px",width:"96px"}},Ng={xs:"9px",sm:"10px",md:"11px",lg:"12px",xl:"13px"},Jr={xs:{paddingVertical:5,paddingHorizontal:3},sm:{paddingVertical:5,paddingHorizontal:3},md:{paddingVertical:5,paddingHorizontal:5},lg:{paddingVertical:5,paddingHorizontal:5},xl:{paddingVertical:5,paddingHorizontal:5}},Re={default:{active:"theme-primary",inactive:"color-gray-300",knob:"color-white",disabled:"color-gray-200"},states:{hover:{active:"theme-primary",inactive:"color-gray-400",activeOpacity:.9},focus:{active:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},inactive:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px color-gray-200"}}}},Ra={slider:{transition:"all 0.2s ease-in-out"},knob:{transition:"all 0.2s ease-in-out"}},qg=e=>r.jsx(c.Input,{type:"checkbox",...e}),el=({id:e,name:o,label:t,inActiveChild:n,isChecked:a,activeChild:l,labelPosition:i="right",shadow:g={},size:s="sm",value:d=!1,isHovered:f=!1,isDisabled:u=!1,isReadOnly:m=!1,on:p,setOn:y=()=>{},onChange:x,setValue:b=()=>{},setIsHovered:C=()=>{},helperText:k,description:S,views:T={slider:{},circle:{},label:{}},...w})=>{const F=h.useId(),v=e??F,[z,j]=h.useState(!1),H=typeof a=="boolean"?a:d,M=!!(l||n)?Og[s]:_g[s],I=`${Jr[s].paddingHorizontal}px`,W=`${Jr[s].paddingHorizontal+2}px`,D=`calc(${Za[s].width} + ${Jr[s].paddingHorizontal}px + 4px)`,V=Ng[s],P=B=>{if(!m&&!u){const L=B.target.checked;b(L),y(L),x&&x(L)}},_=()=>C(!0),q=()=>C(!1),N=B=>{let L=!0;try{L=B.target.matches(":focus-visible")}catch{}j(L)},G=()=>j(!1),X=`${v}-description`,$={container:{gap:12,display:"flex",height:"fit-content",width:"fit-content",alignItems:"center",cursor:u?"not-allowed":m?"default":"pointer",opacity:u?.6:1,transition:"all 0.2s ease-in-out",...T.label}},O=r.jsxs(gr,{htmlFor:v,onMouseEnter:_,onMouseLeave:q,...$.container,children:[i==="left"&&t&&r.jsx(c.Text,{fontWeight:"500",color:u?"color-gray-400":"inherit",transition:"color 0.2s ease, opacity 0.2s ease",children:t}),r.jsxs(c.View,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",marginBottom:4,borderRadius:"9999px",backgroundColor:u?Re.default.disabled:H?f?Re.states.hover.active:Re.default.active:f?Re.states.hover.inactive:Re.default.inactive,opacity:!u&&H&&f?Re.states.hover.activeOpacity:1,cursor:"pointer",...Ra.slider,...g,...Jr[s],...M,...T.slider,...z?H?Re.states.focus.active:Re.states.focus.inactive:{},children:[r.jsx(qg,{id:v,name:o,role:"switch","aria-checked":H,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:2,cursor:u?"not-allowed":m?"default":"pointer",checked:H,onChange:P,onFocus:N,onBlur:G,disabled:u,readOnly:m,"aria-describedby":S?X:void 0,...w}),l&&H&&r.jsx(c.View,{marginLeft:W,marginRight:D,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:V,color:"color-white",fontWeight:600,children:l}),r.jsx(c.View,{position:"absolute",top:"50%",left:H?void 0:I,right:H?I:void 0,borderRadius:"50%",backgroundColor:Re.default.knob,boxShadow:f?"0 4px 10px rgba(15, 23, 42, 0.18)":"0 1px 3px rgba(15, 23, 42, 0.18)",transform:`translateY(-50%) ${f?"scale(1.05)":"scale(1)"}`,...Ra.knob,zIndex:1,...Za[s],...T.circle}),n&&!H&&r.jsx(c.View,{marginLeft:D,marginRight:W,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:V,color:"color-white",fontWeight:600,children:n})]}),i==="right"&&t&&r.jsx(c.Text,{fontWeight:"500",color:u?"color-gray-400":"inherit",transition:"all 0.2s ease-in-out",children:t})]});return S?r.jsxs(c.Vertical,{gap:4,width:"fit-content",children:[O,r.jsx(c.Text,{id:X,color:"color-gray-500",fontSize:"14px",lineHeight:"20px",children:S})]}):O},Rt=e=>{const o=Te("switch",e),t=Qa(o);return r.jsx(el,{...t,...o})},ol=({placeholder:e,isMulti:o,options:t,id:n})=>{const a=h.useId().replace(/[^a-zA-Z0-9_-]/g,""),l=n??`selector-${a}`,i=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[g,s]=h.useState(!1),[d,f]=h.useState(!1),[u,m]=h.useState(i),[p,y]=h.useState(!0);return{id:l,value:u,setValue:m,hide:p,setHide:y,isHovered:g,setIsHovered:s,isFocused:d,setIsFocused:f}},rl=({id:e,name:o,label:t,value:n,views:a={},options:l=[],helperText:i,error:g=!1,isDisabled:s=!1,isReadOnly:d=!1,onChange:f=()=>{},setValue:u=()=>{},hide:m,setHide:p,isHovered:y,setIsHovered:x,isFocused:b,setIsFocused:C,placeholder:k,isMulti:S,shape:T,variant:w,size:F,shadow:v,isScrollable:z,"aria-label":j,...H})=>{const E=h.useId(),M=e??E,I=`${M}-label`,W=`${M}-helper-text`,D=!!i,V=h.useCallback(P=>{s||d||(u(P.value),f&&f(P.value))},[u,f,s,d]);return r.jsxs(Ze,{id:M,width:"100%",views:a,...H,children:[t&&r.jsxs(c.Horizontal,{fontSize:"10px",letterSpacing:"wider",color:"color-black-500",fontWeight:"bold",marginBottom:12,alignItems:"center",gap:6,style:{textTransform:"uppercase"},children:[r.jsx(lo,{widthHeight:14})," ",r.jsx(c.Text,{id:I,children:t})]}),r.jsx(c.Horizontal,{gap:0,role:"radiogroup","aria-labelledby":!j&&t?I:void 0,"aria-label":j,"aria-describedby":D?W:void 0,"aria-readonly":d||void 0,"aria-invalid":g?!0:void 0,children:l.map((P,_,q)=>{const N=n===P.value,G=P.color??"theme-primary",X=N?G:"color-gray-200",$=N?G:"color-gray-500",O=_===0,B=_===q.length-1,L=B||N;return r.jsx(c.View,{as:"button",type:"button",role:"radio","aria-checked":N,disabled:s,onClick:()=>V(P),flex:1,minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",paddingVertical:6,paddingHorizontal:12,fontSize:"12px",fontWeight:N?"bold":"normal",cursor:s?"not-allowed":d?"default":"pointer",backgroundColor:"transparent",color:$,borderStyle:"solid",borderColor:X,borderTopWidth:1,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:L?1:0,borderRadius:O?"6px 0 0 6px":B?"0 6px 6px 0":"0",zIndex:N?1:0,transition:"color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease",...a.item,children:P.label},P.value)})}),r.jsx("input",{type:"hidden",id:`${M}-input`,name:o,value:Array.isArray(n)?n.join(","):n,onChange:()=>{}}),D&&r.jsx(c.Text,{id:W,fontSize:"11px",lineHeight:"16px",marginTop:0,fontWeight:g?"500":"400",color:g?"color-red-500":"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...a.helperText,children:i})]})},Ug=e=>{const o={...e,options:e.options||[]},t=ol(o);return r.jsx(rl,{...t,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},tl=({label:e,placeholder:o,value:t})=>{const[n,a]=h.useState(e??o),[l,i]=h.useState(!1),[g,s]=h.useState(t||""),[d,f]=h.useState(!1);return h.useMemo(()=>{a(d&&!g?o??"":e??o)},[g,d,e,o]),{hint:n,setHint:a,isHovered:l,setIsHovered:i,value:g,setValue:s,isFocused:d,setIsFocused:f}},Gg=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},Yg=(e,o)=>{if(o!=="pill")return e;if(typeof e=="number")return Math.min(e,28);if(typeof e=="string"){const t=Number.parseFloat(e);if(Number.isFinite(t)&&e.trim().endsWith("px"))return`${Math.min(t,28)}px`}return"28px"},nl=({id:e,name:o,hint:t,error:n,value:a,label:l,shadow:i,helperText:g,placeholder:s,size:d="sm",shape:f="default",variant:u="default",isHovered:m=!1,isFocused:p=!1,isEditable:y=!0,isReadOnly:x=!1,isDisabled:b=!1,isAutoFocus:C=!1,isRequired:k,required:S,labelProps:T,maxRows:w=3,maxCols:F=30,onBlur:v=()=>{},onChange:z,onFocus:j,setHint:H=()=>{},setValue:E=()=>{},setIsFocused:M=()=>{},setIsHovered:I=()=>{},onChangeText:W,inputRef:D,views:V={label:{},helperText:{}},...P})=>{const _=h.useId(),q=e??_,N=!!l,G={xs:{minHeight:"72px",shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:"88px",shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:"104px",shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:"120px",shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:"136px",shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},X=(V==null?void 0:V.field)||{},$=(V==null?void 0:V.container)||{},O=Yg($.borderRadius,f),B={...V,container:{...$,...O!==void 0?{borderRadius:O}:{},overflow:"hidden"}},L=Gg(V),U={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:G[d].minHeight,maxHeight:"calc(100vh - 100px)",border:"none",on:{focus:{outline:"none"}},fontSize:G[d].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:b?"color-gray-400":"color-gray-900",cursor:b?"not-allowed":"text",opacity:b?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",...X,style:{backgroundColor:"transparent",...X.style}},K=()=>{M(!0),j&&j()},J=re=>{v(re),M(!1)},ne=re=>{const ce=typeof re=="string"?re:re.target.value;E(ce),W&&W(ce),z&&z(ce)};return r.jsx(Ze,{helperText:g,error:n,views:L,children:r.jsx(co,{label:l,size:d,error:n,shape:f,views:B,shadow:i,variant:u,value:a,color:"theme-primary",isHovered:m,isDisabled:b,isReadOnly:x,isFocused:p,showLabel:N,alignItems:"flex-start",minHeight:G[d].minHeight,paddingTop:G[d].shellPaddingY,paddingBottom:G[d].shellPaddingY,paddingLeft:G[d].shellPaddingX,paddingRight:G[d].shellPaddingX,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),...B==null?void 0:B.content,children:r.jsxs(Bo,{...V==null?void 0:V.warper,children:[N&&r.jsx(yo,{htmlFor:q,color:"theme-primary",error:n,...T,...V==null?void 0:V.label,children:l}),r.jsx(c.Element,{ref:D,as:"textarea",id:q,name:o,rows:w,cols:F,value:a,readOnly:x||!y,disabled:b,autoFocus:C,...k??S?{required:!0,"aria-required":!0}:{},placeholder:s||t,onBlur:J,onFocus:K,onChange:re=>ne(re),...U,...P,style:{resize:b||x||!y?"none":"vertical",...U.style,...P.style||{}},...V==null?void 0:V.textarea})]})})})},hr=e=>{const o=Te("textarea",e),t=tl(o);return r.jsx(nl,{...t,...o})},en=({label:e,placeholder:o,value:t})=>{const[n,a]=h.useState(e??o),[l,i]=h.useState(!1),[g,s]=h.useState(!1),[d,f]=h.useState(t);return h.useMemo(()=>{a(l&&!d?o??"":e??o)},[d,l,e,o]),{hint:n,setHint:a,isFocused:l,setIsFocused:i,isHovered:g,setIsHovered:s,setValue:f,value:d}},fr=({id:e,name:o,label:t,hint:n,value:a,onChange:l,left:i,right:g,helperText:s,placeholder:d,onChangeText:f,shadow:u={},views:m={container:{},field:{},label:{},helperText:{},text:{}},size:p="md",shape:y="default",variant:x="default",error:b=!1,isFocused:C=!1,isHovered:k=!1,isDisabled:S=!1,isReadOnly:T=!1,isClearable:w=!0,isAutoFocus:F=!1,isRequired:v,required:z,labelProps:j,leftIcon:H,rightIcon:E,setHint:M=()=>{},setIsFocused:I=()=>{},setIsHovered:W=()=>{},setValue:D=()=>{},onClick:V=()=>{},onFocus:P,onBlur:_=()=>{},themeMode:q,inputRef:N,...G})=>{const X=h.useId(),$=e??X,{getColor:O,themeMode:B}=c.useTheme(),L=O(S?"color-gray-400":"color-gray-500",{themeMode:q||B}),U=!!t,K={xs:{minHeight:24,shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:32,shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:40,shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:48,shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:56,shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},J=(m==null?void 0:m.field)||{},ne="0 0 0 1000px var(--theme-canvas) inset",re={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:"auto",border:"none",backgroundColor:"transparent",fontSize:K[p].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:S?"color-gray-400":"color-gray-900",cursor:S?"not-allowed":"text",opacity:S?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",_focus:{outline:"none",_placeholder:{opacity:.7}},_placeholder:{color:"color-gray-400",opacity:1,transition:"opacity 0.2s ease-out"},_selection:{backgroundColor:"color-mix(in srgb, var(--theme-primary) 20%, transparent)"},_webkitAutofill:{boxShadow:ne,WebkitBoxShadow:ne,WebkitTextFillColor:"var(--theme-text)",transition:"background-color 5000s ease-in-out 0s"},_webkitContactsAutoFillButton:{visibility:"hidden",pointerEvents:"none",position:"absolute",right:0},...J},ce=()=>{I(!0),P&&P()},Q=()=>W(!0),le=()=>W(!1),he=oe=>{_&&_(oe),I(!1)},ue=oe=>{typeof oe=="string"?(D(oe),f&&f(oe),l&&l(oe)):(D(oe.target.value),f&&f(oe.target.value),l&&l(oe.target.value))},Ce=()=>{D(""),f&&f(""),l&&l(""),_({target:{name:o}})},{container:de,content:ie,...ge}=m||{};return r.jsx(Ze,{helperText:s,error:b,views:ge,children:r.jsxs(co,{label:t,size:p,error:b,shape:y,views:m,shadow:u,variant:x,value:a,color:"theme-primary",isHovered:k,isDisabled:S,isReadOnly:T,isFocused:C,showLabel:U,onMouseEnter:Q,onMouseLeave:le,children:[i,H&&r.jsx(dr,{children:H}),r.jsxs(Bo,{children:[U&&r.jsx(yo,{htmlFor:$,color:"theme-primary",error:b,...j,...m==null?void 0:m.label,children:t}),r.jsx(c.Input,{ref:N,type:"text",id:$,name:o,readOnly:T,disabled:S,autoFocus:F,...v??z?{required:!0,"aria-required":!0}:{},placeholder:d||n,onFocus:ce,onBlur:he,autoComplete:"off",...re,...G,onChange:ue,value:a})]}),w&&a&&!T&&!S&&r.jsx(dr,{children:r.jsx(Le,{size:20,color:L,onClick:Ce,cursor:"pointer",borderRadius:"50%",transition:"background-color 0.2s ease, transform 0.2s ease",_hover:{backgroundColor:"color-gray-100",transform:"scale(1.05)"},_active:{transform:"scale(0.95)"}})}),E&&r.jsx(dr,{children:E}),g]})})},$e=e=>{const o=Te("input",e),t=en(o);return r.jsx(fr,{...t,...o})},al=({defaultIsSelected:e=!1})=>{const[o,t]=h.useState(!1),[n,a]=h.useState(e);return{isHovered:o,setIsHovered:t,isSelected:n,setIsSelected:a}},Kg={xs:{height:"12px",width:"12px"},sm:{height:"16px",width:"16px"},md:{height:"20px",width:"20px"},lg:{height:"24px",width:"24px"},xl:{height:"28px",width:"28px"}},ll={xs:10,sm:14,md:16,lg:20,xl:24},Xg={selected:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},unselected:{backgroundColor:"transparent",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",color:"inherit",transition:"all 0.2s ease-in-out"},indeterminate:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},Qr={hover:{selected:{opacity:.9},unselected:{borderColor:"color-gray-400",backgroundColor:"color-gray-50"},indeterminate:{opacity:.9}},focus:{selected:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},unselected:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},indeterminate:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}},disabled:{selected:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},unselected:{borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},indeterminate:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"}},error:{selected:{backgroundColor:"color-red-500",borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"},indeterminate:{backgroundColor:"color-red-500",borderColor:"color-red-500"}}},il=({id:e,icon:o,name:t,label:n,isChecked:a,onChange:l,onValueChange:i,shadow:g={},labelPosition:s="right",size:d="md",error:f=!1,isSelected:u=!1,isHovered:m=!1,isDisabled:p=!1,isReadOnly:y=!1,isIndeterminate:x=!1,defaultIsSelected:b=!1,setIsSelected:C=()=>{},setIsHovered:k=()=>{},views:S={checkbox:{},label:{}},infoText:T,helperText:w,...F})=>{const v=h.useId(),z=e??v,j=h.useRef(null),[H,E]=h.useState(!1),M=!!(a||u);h.useEffect(()=>{j.current&&(j.current.indeterminate=x)},[x]);const I=()=>k(!m),W=()=>{!y&&!p&&(C&&C(!u),l&&l(!a),i&&i(!a))},D=x?"indeterminate":a||u?"selected":"unselected",V=f?Qr.error[D]:p?Qr.disabled[D]:m?Qr.hover[D]:{},P={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",color:f?"color-red-600":p?"color-gray-400":"inherit",cursor:p?"not-allowed":y?"default":"pointer",opacity:p?.6:1,transition:"all 0.2s ease-in-out",...S.label},checkbox:{...Xg[D],...V,borderRadius:6,...Kg[d],transition:"all 0.2s ease-in-out",...g,...S.checkbox}},_=`${z}-info`,q=`${z}-error`,N=[T?_:"",f?q:""].filter(Boolean).join(" ")||void 0;return r.jsxs(c.Vertical,{...P.container,children:[r.jsx(gr,{htmlFor:z,onMouseEnter:I,onMouseLeave:I,size:c.Typography.fontSizes[d],cursor:"inherit",children:r.jsxs(c.Horizontal,{gap:12,alignItems:"center",children:[" ",s==="left"&&n&&r.jsx(c.Text,{size:d,fontWeight:"500",...S==null?void 0:S.label,children:n}),r.jsxs(c.Center,{position:"relative",...P.checkbox,...H?Qr.focus[D]:{},children:[r.jsx(c.Input,{ref:j,type:"checkbox",id:z,name:t,checked:M,"aria-checked":x?"mixed":void 0,onChange:W,onFocus:()=>E(!0),onBlur:()=>E(!1),disabled:p,readOnly:y,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:p?"not-allowed":y?"default":"pointer","aria-describedby":N,...F}),x?r.jsx(sa,{widthHeight:ll[d],color:"color-white",transition:"opacity 0.2s ease"}):(a||u)&&(o??r.jsx(ir,{widthHeight:ll[d],color:"color-white",transition:"opacity 0.2s ease"}))]}),s==="right"&&n&&r.jsx(c.Text,{size:d,fontWeight:"500",...S==null?void 0:S.label,children:n})]})}),T&&r.jsx(c.Text,{id:_,marginLeft:s==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...S==null?void 0:S.infoText,children:T}),f&&r.jsx(c.Text,{id:q,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"all 0.2s ease-in-out",children:f})]})},on=e=>{const o=Te("checkbox",e),t=al(o);return r.jsx(il,{...t,...o})},cl=({defaultIsSelected:e=!1,isChecked:o})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(o!==void 0?o:e);return h.useEffect(()=>{o!==void 0&&l(o)},[o]),{isHovered:t,setIsHovered:n,isSelected:a,setIsSelected:l}},Jg={xs:{height:"16px",width:"16px"},sm:{height:"20px",width:"20px"},md:{height:"24px",width:"24px"},lg:{height:"28px",width:"28px"},xl:{height:"32px",width:"32px"}},Qg={xs:{height:"8px",width:"8px"},sm:{height:"10px",width:"10px"},md:{height:"12px",width:"12px"},lg:{height:"14px",width:"14px"},xl:{height:"16px",width:"16px"}},Zg={selected:{borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid"},unselected:{borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"}}},Rg={selected:{backgroundColor:"theme-primary"},unselected:{style:{backgroundColor:"transparent"}}},rn={hover:{selected:{borderColor:"color-blue-600"},unselected:{borderColor:"color-gray-400"}},disabled:{selected:{borderColor:"color-gray-300",opacity:.6},unselected:{borderColor:"color-gray-300",opacity:.6}},error:{selected:{borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"}}},tn={hover:{selected:{backgroundColor:"color-blue-600"},unselected:{style:{backgroundColor:"transparent"}}},disabled:{selected:{backgroundColor:"color-gray-300",opacity:.6},unselected:{opacity:.6,style:{backgroundColor:"transparent"}}},error:{selected:{backgroundColor:"color-red-500"},unselected:{style:{backgroundColor:"transparent"}}}},sl=({id:e,icon:o,name:t,label:n,value:a,isChecked:l,onChange:i,onValueChange:g,shadow:s={},labelPosition:d="right",size:f="md",error:u=!1,isSelected:m=!1,isHovered:p=!1,isDisabled:y=!1,isReadOnly:x=!1,defaultIsSelected:b=!1,setIsSelected:C=()=>{},setIsHovered:k=()=>{},views:S={radio:{},label:{}},infoText:T,helperText:w,...F})=>{const v=h.useId(),z=e??v,[j,H]=h.useState(!1),E=()=>k(!p),M=()=>{!x&&!y&&(C&&C(!0),i&&i(a??""),g&&g(a??""))},I=l||m?"selected":"unselected",W=u?rn.error[I]:y?rn.disabled[I]:p?rn.hover[I]:{},D=u?tn.error[I]:y?tn.disabled[I]:p?tn.hover[I]:{},V={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",selected:{borderColor:"theme-primary"},color:u?"color-red-600":y?"color-gray-400":"inherit",cursor:y?"not-allowed":x?"default":"pointer",opacity:y?.6:1,transition:"all 0.2s ease-in-out",...S.label},radio:{...Zg[I],...W,borderRadius:"50%",selected:{backgroundColor:"theme-primary"},backgroundColor:"color-white",...Jg[f],transition:"all 0.2s ease-in-out",...s,...S.radio},dot:{...Rg[I],...D,borderRadius:"50%",...Qg[f],transition:"all 0.2s ease-in-out"}},P=`${z}-info`,_=`${z}-error`,q=[T?P:"",u?_:""].filter(Boolean).join(" ")||void 0;return r.jsxs(c.Vertical,{...V.container,children:[r.jsx(gr,{htmlFor:z,onMouseEnter:E,onMouseLeave:E,size:c.Typography.fontSizes[f],cursor:"inherit",children:r.jsxs(c.Horizontal,{gap:12,alignItems:"center",children:[" ",d==="left"&&n&&r.jsx(c.Text,{size:f,fontWeight:"500",...S==null?void 0:S.label,children:n}),r.jsxs(c.Center,{position:"relative",...V.radio,...j?{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}:{},children:[r.jsx(c.Input,{type:"radio",id:z,name:t,value:a??"",checked:!!(l||m),onChange:M,onFocus:()=>H(!0),onBlur:()=>H(!1),disabled:y,readOnly:x,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:y?"not-allowed":x?"default":"pointer","aria-describedby":q,...F}),(l||m)&&r.jsx(c.View,{...V.dot})]}),d==="right"&&n&&r.jsx(c.Text,{size:f,fontWeight:"500",...S==null?void 0:S.label,children:n})]})}),T&&r.jsx(c.Text,{id:P,marginLeft:d==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...S==null?void 0:S.infoText,children:T}),u&&r.jsx(c.Text,{id:_,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"color 0.2s ease, opacity 0.2s ease",children:u})]})},nn=e=>{const o=Te("radio",e),t=cl(o);return r.jsx(sl,{...t,...o})},eu=({value:e,defaultValue:o="",onChange:t})=>{const[n,a]=h.useState(e!==void 0?e:o);return h.useEffect(()=>{e!==void 0&&a(e)},[e]),{selectedValue:n,setSelectedValue:i=>{e===void 0&&a(i),t&&t(i)}}},ou=({children:e,name:o,label:t,helperText:n,error:a,selectedValue:l,setSelectedValue:i,direction:g="vertical",spacing:s=8,isDisabled:d=!1,isReadOnly:f=!1,views:u={container:{},label:{},helperText:{}},onChange:m,value:p,defaultValue:y,...x})=>{const b=g==="vertical"?c.Vertical:c.Horizontal,C=h.Children.map(e,F=>{if(h.isValidElement(F)){const v={name:o,isChecked:F.props.value===l,isDisabled:d||F.props.isDisabled,isReadOnly:f||F.props.isReadOnly,onChange:z=>{i(z),F.props.onChange&&F.props.onChange(z)}};return h.cloneElement(F,v)}return F}),k=h.useId(),S=`${k}-label`,T=`${k}-helper`,w=!!(n||a);return r.jsxs(c.Vertical,{gap:s,width:"100%",role:"radiogroup","aria-labelledby":t?S:void 0,"aria-describedby":w?T:void 0,"aria-invalid":a?!0:void 0,...u.container,...x,children:[t&&r.jsx(c.Text,{id:S,fontWeight:"600",fontSize:"14px",color:a?"color-red-600":"inherit",marginBottom:4,...u.label,children:t}),r.jsx(b,{gap:s,children:C}),w&&r.jsx(c.Text,{id:T,fontWeight:a?"500":"400",fontSize:"14px",lineHeight:"20px",color:a?"color-red-500":"color-gray-500",marginTop:4,transition:"color 0.2s ease, opacity 0.2s ease",...u.helperText,children:a||n})]})},ru=e=>{const o=eu(e);return r.jsx(ou,{...o,...e})},bo=e=>Math.min(255,Math.max(0,Math.round(e))),tu=e=>{const o=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!o)return null;let t=o[1];return t.length===3&&(t=t.split("").map(n=>n+n).join("")),{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}},nu=e=>{const o=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?{r:bo(Number(o[1])),g:bo(Number(o[2])),b:bo(Number(o[3]))}:null},au=(e,o,t)=>{const n=(e%360+360)%360,a=Math.min(100,Math.max(0,o))/100,l=Math.min(100,Math.max(0,t))/100,i=(1-Math.abs(2*l-1))*a,g=i*(1-Math.abs(n/60%2-1)),s=l-i/2;let d;return n<60?d=[i,g,0]:n<120?d=[g,i,0]:n<180?d=[0,i,g]:n<240?d=[0,g,i]:n<300?d=[g,0,i]:d=[i,0,g],{r:bo((d[0]+s)*255),g:bo((d[1]+s)*255),b:bo((d[2]+s)*255)}},lu=e=>{const o=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?au(Number(o[1]),Number(o[2]),Number(o[3])):null},iu=e=>tu(e)??nu(e)??lu(e),cu=({r:e,g:o,b:t})=>{const n=e/255,a=o/255,l=t/255,i=Math.max(n,a,l),g=Math.min(n,a,l),s=i-g,d=(i+g)/2;if(s===0)return{h:0,s:0,l:Math.round(d*100)};const f=s/(1-Math.abs(2*d-1));let u;return i===n?u=(a-l)/s%6:i===a?u=(l-n)/s+2:u=(n-a)/s+4,u=Math.round(u*60),u<0&&(u+=360),{h:u,s:Math.round(f*100),l:Math.round(d*100)}},an=e=>bo(e).toString(16).padStart(2,"0"),Zr=(e,o)=>{if(!o||!e)return e;const t=iu(e);if(!t)return e;switch(o){case"hex":return`#${an(t.r)}${an(t.g)}${an(t.b)}`;case"rgb":return`rgb(${t.r}, ${t.g}, ${t.b})`;case"hsl":{const{h:n,s:a,l}=cu(t);return`hsl(${n}, ${a}%, ${l}%)`}}},dl=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,onOpen:l,onClose:i,closeOnSelect:g=!0,maxRecentColors:s=8,showRecentColors:d=!0,isAutoFocus:f=!1,colorFormat:u}=e,[m,p]=h.useState(!1),[y,x]=h.useState(o??t),[b,C]=h.useState(""),[k,S]=h.useState([]),[T,w]=h.useState(!1),[F,v]=h.useState(!1),z=h.useRef(null),j=h.useRef(null);h.useEffect(()=>{o!==void 0&&x(o)},[o]),h.useEffect(()=>{if(d&&typeof localStorage<"u")try{const P=localStorage.getItem("colorInput-recentColors");P&&S(JSON.parse(P))}catch(P){console.warn("Failed to load recent colors from localStorage:",P)}},[d]),h.useEffect(()=>{const P=z.current;f&&P&&typeof P.focus=="function"&&P.focus()},[f]),h.useEffect(()=>{if(typeof document>"u")return;const P=_=>{m&&z.current&&j.current&&!z.current.contains(_.target)&&!j.current.contains(_.target)&&D()};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[m]);const H=h.useCallback(P=>{d&&S(_=>{const q=_.filter(G=>G!==P),N=[P,...q].slice(0,s);try{typeof localStorage<"u"&&localStorage.setItem("colorInput-recentColors",JSON.stringify(N))}catch(G){console.warn("Failed to save recent colors to localStorage:",G)}return N})},[d,s]),E=h.useCallback(()=>{const P=!m;p(P),P?l==null||l():i==null||i()},[m,l,i]),M=h.useCallback(P=>{x(P),H(P);const _=Zr(P,u);n==null||n(_),a==null||a(_),g&&(p(!1),i==null||i())},[n,a,g,i,H,u]),I=h.useCallback(P=>{C(P)},[]),W=h.useCallback(()=>{b&&(M(b),C(""))},[b,M]),D=h.useCallback(()=>{p(!1),i==null||i()},[i]),V=h.useCallback(P=>{x(P),n==null||n(Zr(P,u))},[n,u]);return{isOpen:m,selectedColor:y,recentColors:k,customColor:b,isFocused:T,isHovered:F,handleToggle:E,handleColorSelect:M,handleCustomColorChange:I,handleCustomColorSubmit:W,handleClose:D,setIsFocused:w,setIsHovered:v,setValue:V,triggerRef:z,dropdownRef:j}},mr={container:{position:"relative",display:"inline-block",width:"fit-content"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300",padding:"8px 12px",borderRadius:8},dropdown:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",gap:"8px"},recentColors:{display:"flex",gap:"4px",flexWrap:"wrap"}},su={xs:{height:"28px",fontSize:"10px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 16px"},xl:{height:"56px",fontSize:"20px",padding:"16px 20px"}},du={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},gu={default:{backgroundColor:"color-white",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},outline:{backgroundColor:"transparent",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},none:{backgroundColor:"transparent",borderColor:"transparent",borderWidth:"0px"}},uu=[{name:"Red 500",value:"color-red-500"},{name:"Orange 500",value:"color-orange-500"},{name:"Yellow 500",value:"color-yellow-500"},{name:"Green 500",value:"color-green-500"},{name:"Blue 500",value:"color-blue-500"},{name:"Indigo 500",value:"color-indigo-500"},{name:"Purple 500",value:"color-purple-500"},{name:"Pink 500",value:"color-pink-500"},{name:"Red 300",value:"color-red-300"},{name:"Orange 300",value:"color-orange-300"},{name:"Yellow 300",value:"color-yellow-300"},{name:"Green 300",value:"color-green-300"},{name:"Blue 300",value:"color-blue-300"},{name:"Indigo 300",value:"color-indigo-300"},{name:"Purple 300",value:"color-purple-300"},{name:"Pink 300",value:"color-pink-300"},{name:"Red 700",value:"color-red-700"},{name:"Orange 700",value:"color-orange-700"},{name:"Yellow 700",value:"color-yellow-700"},{name:"Green 700",value:"color-green-700"},{name:"Blue 700",value:"color-blue-700"},{name:"Indigo 700",value:"color-indigo-700"},{name:"Purple 700",value:"color-purple-700"},{name:"Pink 700",value:"color-pink-700"},{name:"Gray 100",value:"color-gray-100"},{name:"Gray 300",value:"color-gray-300"},{name:"Gray 500",value:"color-gray-500"},{name:"Gray 700",value:"color-gray-700"},{name:"Gray 900",value:"color-gray-900"},{name:"White",value:"color-white"},{name:"Black",value:"color-black"},{name:"Transparent",value:"transparent"}],gl=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:l={},size:i="md",shape:g="default",variant:s="default",shadow:d,error:f=!1,isDisabled:u=!1,isReadOnly:m=!1,isFocused:p=!1,isHovered:y=!1,predefinedColors:x=uu,showCustomInput:b=!0,showRecentColors:C=!0,isOpen:k=!1,selectedColor:S="",recentColors:T=[],customColor:w="",handleToggle:F=()=>{},handleColorSelect:v=()=>{},handleCustomColorChange:z=()=>{},handleCustomColorSubmit:j=()=>{},handleClose:H,setIsFocused:E=()=>{},setIsHovered:M=()=>{},setValue:I,triggerRef:W,dropdownRef:D,onChange:V,onChangeComplete:P,onBlur:_,onFocus:q,onOpen:N,onClose:G,colorFormat:X,maxRecentColors:$,closeOnSelect:O,value:B,defaultValue:L,"aria-label":U,...K})=>{const{getColor:J}=c.useTheme(),ne=h.useId(),re=e??ne,ce=`${re}-label`,Q=`${re}-listbox`,le=`${re}-helper-text`,he=`${re}-error-text`,ue=!!f&&typeof f=="string",Ce=[a?le:null,ue?he:null].filter(Boolean).join(" ")||void 0,de={...mr.container,...l==null?void 0:l.container},ie={...mr.trigger,...su[i],...du[g],...gu[s],...f&&{borderColor:"color-red-500"},...u&&{opacity:.6,cursor:"not-allowed"},...p&&{borderColor:"theme-primary",boxShadow:"0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px rgba(29, 78, 216, 0.16)"},...y&&!u&&{borderColor:"color-gray-400"},...l==null?void 0:l.trigger,...d&&d},ge={...mr.dropdown,...l==null?void 0:l.dropdown},oe={...mr.colorGrid,...l==null?void 0:l.colorGrid},fe={...mr.recentColors,...l==null?void 0:l.recentColors},Z=S||"color-gray-200";return r.jsxs(c.View,{...de,...K,children:[t&&r.jsx(gr,{id:ce,htmlFor:re,size:i,isDisabled:u,error:f,views:l==null?void 0:l.label,children:t}),o&&r.jsx("input",{type:"hidden",name:o,value:Zr(S,X)}),r.jsxs(c.View,{ref:W,id:re,onClick:u||m?void 0:F,onKeyDown:te=>{u||m||(te.key==="Enter"||te.key===" ")&&(te.preventDefault(),F())},onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),onFocus:()=>{E(!0),q&&q()},onBlur:te=>{E(!1),_&&_(te)},tabIndex:u?-1:0,role:"button","aria-expanded":k,"aria-haspopup":"listbox","aria-controls":k?Q:void 0,"aria-labelledby":!U&&t?ce:void 0,"aria-label":U??(t?void 0:n),"aria-describedby":Ce,"aria-invalid":f?!0:void 0,width:"fit-content",gap:8,...ie,children:[r.jsx(c.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:Z,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"}),!m&&!u&&r.jsx(we,{widthHeight:16,color:"color-gray-500",orientation:k?"up":"down"})]}),k&&r.jsxs(c.View,{ref:D,...ge,children:[r.jsx(c.View,{id:Q,role:"listbox","aria-labelledby":t?ce:void 0,"aria-label":t?void 0:"Color options",...oe,children:x.map((te,Y)=>r.jsx(c.View,{role:"option","aria-selected":S===te.value,"aria-label":te.name,tabIndex:0,width:"24px",height:"24px",borderRadius:"8px",backgroundColor:te.value,borderWidth:"2px",borderStyle:"solid",borderColor:S===te.value?"theme-primary":"transparent",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>v(te.value),onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),v(te.value))},title:te.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"},...l==null?void 0:l.colorSwatch},Y))}),C&&T.length>0&&r.jsxs(c.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(c.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Recent Colors"}),r.jsx(c.Horizontal,{gap:4,flexWrap:"wrap",...fe,children:T.map((te,Y)=>r.jsx(c.View,{width:"20px",height:"20px",borderRadius:"8px",backgroundColor:te,borderWidth:"1px",borderStyle:"solid",borderColor:S===te?"theme-primary":"color-gray-300",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>v(te),title:te,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"}},Y))})]}),b&&r.jsxs(c.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(c.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Custom Color"}),r.jsxs(c.Horizontal,{gap:8,children:[r.jsx($e,{value:w,onChange:z,placeholder:"#000000 or rgb(0,0,0)","aria-label":"Custom color",size:"sm",style:{flex:1},views:l==null?void 0:l.customInput}),r.jsx(c.Element,{as:"button",type:"button",padding:"8px 12px",backgroundColor:"theme-primary",border:"none",borderRadius:"8px",cursor:"pointer",onClick:j,transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"color-blue-700"},children:r.jsx(c.Text,{color:"color-white",fontSize:"12px",fontWeight:"500",children:"Add"})})]})]})]}),a&&r.jsx(c.Text,{id:le,fontSize:"12px",color:f?"color-red-500":"color-gray-600",marginTop:"4px",...l==null?void 0:l.helperText,children:a}),ue&&r.jsx(c.Text,{id:he,fontSize:"12px",color:"color-red-500",marginTop:"4px",...l==null?void 0:l.error,children:f})]})},hu=e=>{const o=dl(e);return r.jsx(gl,{...o,...e})},ln=[{name:"Afghanistan",dial_code:"+93",emoji:"🇦🇫",code:"AF"},{name:"Aland Islands",dial_code:"+358",emoji:"🇦🇽",code:"AX"},{name:"Albania",dial_code:"+355",emoji:"🇦🇱",code:"AL"},{name:"Algeria",dial_code:"+213",emoji:"🇩🇿",code:"DZ"},{name:"AmericanSamoa",dial_code:"+1684",emoji:"🇦🇸",code:"AS"},{name:"Andorra",dial_code:"+376",emoji:"🇦🇩",code:"AD"},{name:"Angola",dial_code:"+244",emoji:"🇦🇴",code:"AO"},{name:"Anguilla",dial_code:"+1264",emoji:"🇦🇮",code:"AI"},{name:"Antarctica",dial_code:"+672",emoji:"🇦🇶",code:"AQ"},{name:"Antigua and Barbuda",dial_code:"+1268",emoji:"🇦🇬",code:"AG"},{name:"Argentina",dial_code:"+54",emoji:"🇦🇷",code:"AR"},{name:"Armenia",dial_code:"+374",emoji:"🇦🇲",code:"AM"},{name:"Aruba",dial_code:"+297",emoji:"🇦🇼",code:"AW"},{name:"Australia",dial_code:"+61",emoji:"🇦🇺",code:"AU"},{name:"Austria",dial_code:"+43",emoji:"🇦🇹",code:"AT"},{name:"Azerbaijan",dial_code:"+994",emoji:"🇦🇿",code:"AZ"},{name:"Bahamas",dial_code:"+1242",emoji:"🇧🇸",code:"BS"},{name:"Bahrain",dial_code:"+973",emoji:"🇧🇭",code:"BH"},{name:"Bangladesh",dial_code:"+880",emoji:"🇧🇩",code:"BD"},{name:"Barbados",dial_code:"+1246",emoji:"🇧🇧",code:"BB"},{name:"Belarus",dial_code:"+375",emoji:"🇧🇾",code:"BY"},{name:"Belgium",dial_code:"+32",emoji:"🇧🇪",code:"BE"},{name:"Belize",dial_code:"+501",emoji:"🇧🇿",code:"BZ"},{name:"Benin",dial_code:"+229",emoji:"🇧🇯",code:"BJ"},{name:"Bermuda",dial_code:"+1441",emoji:"🇧🇲",code:"BM"},{name:"Bhutan",dial_code:"+975",emoji:"🇧🇹",code:"BT"},{name:"Bolivia, Plurinational State of",dial_code:"+591",emoji:"🇧🇴",code:"BO"},{name:"Bosnia and Herzegovina",dial_code:"+387",emoji:"🇧🇦",code:"BA"},{name:"Botswana",dial_code:"+267",emoji:"🇧🇼",code:"BW"},{name:"Brazil",dial_code:"+55",emoji:"🇧🇷",code:"BR"},{name:"British Indian Ocean Territory",dial_code:"+246",emoji:"🇮🇴",code:"IO"},{name:"Brunei Darussalam",dial_code:"+673",emoji:"🇧🇳",code:"BN"},{name:"Bulgaria",dial_code:"+359",emoji:"🇧🇬",code:"BG"},{name:"Burkina Faso",dial_code:"+226",emoji:"🇧🇫",code:"BF"},{name:"Burundi",dial_code:"+257",emoji:"🇧🇮",code:"BI"},{name:"Cambodia",dial_code:"+855",emoji:"🇰🇭",code:"KH"},{name:"Cameroon",dial_code:"+237",emoji:"🇨🇲",code:"CM"},{name:"Canada",dial_code:"+1",emoji:"🇨🇦",code:"CA"},{name:"Cape Verde",dial_code:"+238",emoji:"🇨🇻",code:"CV"},{name:"Cayman Islands",dial_code:"+345",emoji:"🇰🇾",code:"KY"},{name:"Central African Republic",dial_code:"+236",emoji:"🇨🇫",code:"CF"},{name:"Chad",dial_code:"+235",emoji:"🇹🇩",code:"TD"},{name:"Chile",dial_code:"+56",emoji:"🇨🇱",code:"CL"},{name:"China",dial_code:"+86",emoji:"🇨🇳",code:"CN"},{name:"Christmas Island",dial_code:"+61",emoji:"🇨🇽",code:"CX"},{name:"Cocos (Keeling) Islands",dial_code:"+61",emoji:"🇨🇨",code:"CC"},{name:"Colombia",dial_code:"+57",emoji:"🇨🇴",code:"CO"},{name:"Comoros",dial_code:"+269",emoji:"🇰🇲",code:"KM"},{name:"Congo",dial_code:"+242",emoji:"🇨🇬",code:"CG"},{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243",emoji:"🇨🇩",code:"CD"},{name:"Cook Islands",dial_code:"+682",emoji:"🇨🇰",code:"CK"},{name:"Costa Rica",dial_code:"+506",emoji:"🇨🇷",code:"CR"},{name:"Cote d'Ivoire",dial_code:"+225",emoji:"🇨🇮",code:"CI"},{name:"Croatia",dial_code:"+385",emoji:"🇭🇷",code:"HR"},{name:"Cuba",dial_code:"+53",emoji:"🇨🇺",code:"CU"},{name:"Cyprus",dial_code:"+357",emoji:"🇨🇾",code:"CY"},{name:"Czech Republic",dial_code:"+420",emoji:"🇨🇿",code:"CZ"},{name:"Denmark",dial_code:"+45",emoji:"🇩🇰",code:"DK"},{name:"Djibouti",dial_code:"+253",emoji:"🇩🇯",code:"DJ"},{name:"Dominica",dial_code:"+1767",emoji:"🇩🇲",code:"DM"},{name:"Dominican Republic",dial_code:"+1849",emoji:"🇩🇴",code:"DO"},{name:"Ecuador",dial_code:"+593",emoji:"🇪🇨",code:"EC"},{name:"Egypt",dial_code:"+20",emoji:"🇪🇬",code:"EG"},{name:"El Salvador",dial_code:"+503",emoji:"🇸🇻",code:"SV"},{name:"Equatorial Guinea",dial_code:"+240",emoji:"🇬🇶",code:"GQ"},{name:"Eritrea",dial_code:"+291",emoji:"🇪🇷",code:"ER"},{name:"Estonia",dial_code:"+372",emoji:"🇪🇪",code:"EE"},{name:"Ethiopia",dial_code:"+251",emoji:"🇪🇹",code:"ET"},{name:"Falkland Islands (Malvinas)",dial_code:"+500",emoji:"🇫🇰",code:"FK"},{name:"Faroe Islands",dial_code:"+298",emoji:"🇫🇴",code:"FO"},{name:"Fiji",dial_code:"+679",emoji:"🇫🇯",code:"FJ"},{name:"Finland",dial_code:"+358",emoji:"🇫🇮",code:"FI"},{name:"France",dial_code:"+33",emoji:"🇫🇷",code:"FR"},{name:"French Guiana",dial_code:"+594",emoji:"🇬🇫",code:"GF"},{name:"French Polynesia",dial_code:"+689",emoji:"🇵🇫",code:"PF"},{name:"Gabon",dial_code:"+241",emoji:"🇬🇦",code:"GA"},{name:"Gambia",dial_code:"+220",emoji:"🇬🇲",code:"GM"},{name:"Georgia",dial_code:"+995",emoji:"🇬🇪",code:"GE"},{name:"Germany",dial_code:"+49",emoji:"🇩🇪",code:"DE"},{name:"Ghana",dial_code:"+233",emoji:"🇬🇭",code:"GH"},{name:"Gibraltar",dial_code:"+350",emoji:"🇬🇮",code:"GI"},{name:"Greece",dial_code:"+30",emoji:"🇬🇷",code:"GR"},{name:"Greenland",dial_code:"+299",emoji:"🇬🇱",code:"GL"},{name:"Grenada",dial_code:"+1473",emoji:"🇬🇩",code:"GD"},{name:"Guadeloupe",dial_code:"+590",emoji:"🇬🇵",code:"GP"},{name:"Guam",dial_code:"+1671",emoji:"🇬🇺",code:"GU"},{name:"Guatemala",dial_code:"+502",emoji:"🇬🇹",code:"GT"},{name:"Guernsey",dial_code:"+44",emoji:"🇬🇬",code:"GG"},{name:"Guinea",dial_code:"+224",emoji:"🇬🇳",code:"GN"},{name:"Guinea-Bissau",dial_code:"+245",emoji:"🇬🇼",code:"GW"},{name:"Guyana",dial_code:"+595",emoji:"🇬🇾",code:"GY"},{name:"Haiti",dial_code:"+509",emoji:"🇭🇹",code:"HT"},{name:"Holy See (Vatican City State)",dial_code:"+379",emoji:"🇻🇦",code:"VA"},{name:"Honduras",dial_code:"+504",emoji:"🇭🇳",code:"HN"},{name:"Hong Kong",dial_code:"+852",emoji:"🇭🇰",code:"HK"},{name:"Hungary",dial_code:"+36",emoji:"🇭🇺",code:"HU"},{name:"Iceland",dial_code:"+354",emoji:"🇮🇸",code:"IS"},{name:"India",dial_code:"+91",emoji:"🇮🇳",code:"IN"},{name:"Indonesia",dial_code:"+62",emoji:"🇮🇩",code:"ID"},{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98",emoji:"🇮🇷",code:"IR"},{name:"Iraq",dial_code:"+964",emoji:"🇮🇷",code:"IQ"},{name:"Ireland",dial_code:"+353",emoji:"🇮🇪",code:"IE"},{name:"Isle of Man",dial_code:"+44",emoji:"🇮🇲",code:"IM"},{name:"Israel",dial_code:"+972",emoji:"🇮🇱",code:"IL"},{name:"Italy",dial_code:"+39",emoji:"🇮🇹",code:"IT"},{name:"Jamaica",dial_code:"+1876",emoji:"🇯🇲",code:"JM"},{name:"Japan",dial_code:"+81",emoji:"🇯🇵",code:"JP"},{name:"Jersey",dial_code:"+44",emoji:"🇯🇪",code:"JE"},{name:"Jordan",dial_code:"+962",emoji:"🇯🇴",code:"JO"},{name:"Kazakhstan",dial_code:"+77",emoji:"🇰🇿",code:"KZ"},{name:"Kenya",dial_code:"+254",emoji:"🇰🇪",code:"KE"},{name:"Kiribati",dial_code:"+686",emoji:"🇰🇮",code:"KI"},{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850",emoji:"🇰🇵",code:"KP"},{name:"Korea, Republic of South Korea",dial_code:"+82",emoji:"🇰🇷",code:"KR"},{name:"Kuwait",dial_code:"+965",emoji:"🇰🇼",code:"KW"},{name:"Kyrgyzstan",dial_code:"+996",emoji:"🇰🇬",code:"KG"},{name:"Laos",dial_code:"+856",emoji:"🇱🇦",code:"LA"},{name:"Latvia",dial_code:"+371",emoji:"🇱🇻",code:"LV"},{name:"Lebanon",dial_code:"+961",emoji:"🇱🇧",code:"LB"},{name:"Lesotho",dial_code:"+266",emoji:"🇱🇸",code:"LS"},{name:"Liberia",dial_code:"+231",emoji:"🇱🇷",code:"LR"},{name:"Libyan Arab Jamahiriya",dial_code:"+218",emoji:"🇱🇾",code:"LY"},{name:"Liechtenstein",dial_code:"+423",emoji:"🇱🇮",code:"LI"},{name:"Lithuania",dial_code:"+370",emoji:"🇱🇹",code:"LT"},{name:"Luxembourg",dial_code:"+352",emoji:"🇱🇺",code:"LU"},{name:"Macao",dial_code:"+853",emoji:"🇲🇴",code:"MO"},{name:"Macedonia",dial_code:"+389",emoji:"🇲🇰",code:"MK"},{name:"Madagascar",dial_code:"+261",emoji:"🇲🇬",code:"MG"},{name:"Malawi",dial_code:"+265",emoji:"🇲🇼",code:"MW"},{name:"Malaysia",dial_code:"+60",emoji:"🇲🇾",code:"MY"},{name:"Maldives",dial_code:"+960",emoji:"🇲🇻",code:"MV"},{name:"Mali",dial_code:"+223",emoji:"🇲🇱",code:"ML"},{name:"Malta",dial_code:"+356",emoji:"🇲🇹",code:"MT"},{name:"Marshall Islands",dial_code:"+692",emoji:"🇲🇭",code:"MH"},{name:"Martinique",dial_code:"+596",emoji:"🇲🇶",code:"MQ"},{name:"Mauritania",dial_code:"+222",emoji:"🇲🇷",code:"MR"},{name:"Mauritius",dial_code:"+230",emoji:"🇲🇺",code:"MU"},{name:"Mayotte",dial_code:"+262",emoji:"🇾🇹",code:"YT"},{name:"Mexico",dial_code:"+52",emoji:"🇲🇽",code:"MX"},{name:"Micronesia, Federated States of Micronesia",dial_code:"+691",emoji:"🇫🇲",code:"FM"},{name:"Moldova",dial_code:"+373",emoji:"🇲🇩",code:"MD"},{name:"Monaco",dial_code:"+377",emoji:"🇲🇨",code:"MC"},{name:"Mongolia",dial_code:"+976",emoji:"🇲🇳",code:"MN"},{name:"Montenegro",dial_code:"+382",emoji:"🇲🇪",code:"ME"},{name:"Montserrat",dial_code:"+1664",emoji:"🇲🇸",code:"MS"},{name:"Morocco",dial_code:"+212",emoji:"🇲🇦",code:"MA"},{name:"Mozambique",dial_code:"+258",emoji:"🇲🇿",code:"MZ"},{name:"Myanmar",dial_code:"+95",emoji:"🇲🇲",code:"MM"},{name:"Namibia",emoji:"🇳🇦",dial_code:"+264",code:"NA"},{name:"Nauru",dial_code:"+674",emoji:"🇳🇷",code:"NR"},{name:"Nepal",dial_code:"+977",emoji:"🇳🇵",code:"NP"},{name:"Netherlands",dial_code:"+31",emoji:"🇳🇱",code:"NL"},{name:"Netherlands Antilles",dial_code:"+599",emoji:"🇧🇶",code:"AN"},{name:"New Caledonia",dial_code:"+687",emoji:"🇳🇨",code:"NC"},{name:"New Zealand",dial_code:"+64",emoji:"🇳🇿",code:"NZ"},{name:"Nicaragua",dial_code:"+505",emoji:"🇳🇮",code:"NI"},{name:"Niger",dial_code:"+227",emoji:"🇳🇪",code:"NE"},{name:"Nigeria",dial_code:"+234",emoji:"🇳🇬",code:"NG"},{name:"Niue",dial_code:"+683",emoji:"🇳🇺",code:"NU"},{name:"Norfolk Island",dial_code:"+672",emoji:"🇳🇫",code:"NF"},{name:"Northern Mariana Islands",dial_code:"+1670",emoji:"🇲🇵",code:"MP"},{name:"Norway",dial_code:"+47",emoji:"🇳🇴",code:"NO"},{name:"Oman",dial_code:"+968",emoji:"🇴🇲",code:"OM"},{name:"Pakistan",dial_code:"+92",emoji:"🇵🇰",code:"PK"},{name:"Palau",dial_code:"+680",emoji:"🇵🇼",code:"PW"},{name:"Palestinian Territory, Occupied",dial_code:"+970",emoji:"🇵🇸",code:"PS"},{name:"Panama",dial_code:"+507",emoji:"🇵🇦",code:"PA"},{name:"Papua New Guinea",dial_code:"+675",emoji:"🇵🇬",code:"PG"},{name:"Paraguay",dial_code:"+595",emoji:"🇵🇾",code:"PY"},{name:"Peru",dial_code:"+51",emoji:"🇵🇪",code:"PE"},{name:"Philippines",dial_code:"+63",emoji:"🇵🇭",code:"PH"},{name:"Pitcairn",dial_code:"+872",emoji:"🇵🇳",code:"PN"},{name:"Poland",dial_code:"+48",emoji:"🇵🇱",code:"PL"},{name:"Portugal",dial_code:"+351",emoji:"🇵🇹",code:"PT"},{name:"Puerto Rico",dial_code:"+1939",emoji:"🇵🇷",code:"PR"},{name:"Qatar",dial_code:"+974",emoji:"🇶🇦",code:"QA"},{name:"Romania",dial_code:"+40",emoji:"🇷🇴",code:"RO"},{name:"Russia",dial_code:"+7",emoji:"🇷🇺",code:"RU"},{name:"Rwanda",dial_code:"+250",emoji:"🇷🇼",code:"RW"},{name:"Reunion",dial_code:"+262",emoji:"🇷🇪",code:"RE"},{name:"Saint Barthelemy",dial_code:"+590",emoji:"🇧🇱",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",emoji:"🇸🇭",code:"SH"},{name:"Saint Kitts and Nevis",dial_code:"+1869",emoji:"🇰🇳",code:"KN"},{name:"Saint Lucia",dial_code:"+1758",emoji:"🇱🇨",code:"LC"},{name:"Saint Martin",dial_code:"+590",emoji:"🇲🇫",code:"MF"},{name:"Saint Pierre and Miquelon",dial_code:"+508",emoji:"🇵🇲",code:"PM"},{name:"Saint Vincent and the Grenadines",dial_code:"+1784",emoji:"🇻🇨",code:"VC"},{name:"Samoa",dial_code:"+685",emoji:"🇼🇸",code:"WS"},{name:"San Marino",dial_code:"+378",emoji:"🇸🇲",code:"SM"},{name:"Sao Tome and Principe",dial_code:"+239",emoji:"🇸🇹",code:"ST"},{name:"Saudi Arabia",dial_code:"+966",emoji:"🇸🇦",code:"SA"},{name:"Senegal",dial_code:"+221",emoji:"🇸🇳",code:"SN"},{name:"Serbia",dial_code:"+381",emoji:"🇷🇸",code:"RS"},{name:"Seychelles",dial_code:"+248",emoji:"🇸🇨",code:"SC"},{name:"Sierra Leone",dial_code:"+232",emoji:"🇸🇱",code:"SL"},{name:"Singapore",dial_code:"+65",emoji:"🇸🇬",code:"SG"},{name:"Slovakia",dial_code:"+421",emoji:"🇸🇰",code:"SK"},{name:"Slovenia",dial_code:"+386",emoji:"🇸🇮",code:"SI"},{name:"Solomon Islands",dial_code:"+677",emoji:"🇸🇧",code:"SB"},{name:"Somalia",dial_code:"+252",emoji:"🇸🇴",code:"SO"},{name:"South Africa",dial_code:"+27",emoji:"🇿🇦",code:"ZA"},{name:"South Sudan",dial_code:"+211",emoji:"🇸🇸",code:"SS"},{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",emoji:"🇬🇸",code:"GS"},{name:"Spain",dial_code:"+34",emoji:"🇪🇸",code:"ES"},{name:"Sri Lanka",dial_code:"+94",emoji:"🇱🇰",code:"LK"},{name:"Sudan",dial_code:"+249",emoji:"🇸🇩",code:"SD"},{name:"Suriname",dial_code:"+597",emoji:"🇸🇷",code:"SR"},{name:"Svalbard and Jan Mayen",dial_code:"+47",emoji:"🇸🇯",code:"SJ"},{name:"Swaziland",dial_code:"+268",emoji:"🇸🇿",code:"SZ"},{name:"Sweden",dial_code:"+46",emoji:"🇸🇪",code:"SE"},{name:"Switzerland",dial_code:"+41",emoji:"🇨🇭",code:"CH"},{name:"Syrian Arab Republic",dial_code:"+963",emoji:"🇸🇾",code:"SY"},{name:"Taiwan",dial_code:"+886",emoji:"🇹🇼",code:"TW"},{name:"Tajikistan",dial_code:"+992",emoji:"🇹🇯",code:"TJ"},{name:"Tanzania, United Republic of Tanzania",dial_code:"+255",emoji:"🇹🇿",code:"TZ"},{name:"Thailand",dial_code:"+66",emoji:"🇹🇭",code:"TH"},{name:"Timor-Leste",dial_code:"+670",emoji:"🇹🇱",code:"TL"},{name:"Togo",dial_code:"+228",emoji:"🇹🇬",code:"TG"},{name:"Tokelau",dial_code:"+690",emoji:"🇹🇰",code:"TK"},{name:"Tonga",dial_code:"+676",emoji:"🇹🇴",code:"TO"},{name:"Trinidad and Tobago",dial_code:"+1868",emoji:"🇹🇹",code:"TT"},{name:"Tunisia",dial_code:"+216",emoji:"🇹🇳",code:"TN"},{name:"Turkey",dial_code:"+90",emoji:"🇹🇷",code:"TR"},{name:"Turkmenistan",dial_code:"+993",emoji:"🇹🇲",code:"TM"},{name:"Turks and Caicos Islands",dial_code:"+1649",emoji:"🇹🇨",code:"TC"},{name:"Tuvalu",dial_code:"+688",emoji:"🇹🇻",code:"TV"},{name:"Uganda",dial_code:"+256",emoji:"🇺🇬",code:"UG"},{name:"Ukraine",dial_code:"+380",emoji:"🇺🇦",code:"UA"},{name:"United Arab Emirates",dial_code:"+971",emoji:"🇦🇪",code:"AE"},{name:"United Kingdom",dial_code:"+44",emoji:"🇬🇧",code:"GB"},{name:"United States",dial_code:"+1",emoji:"🇺🇸",code:"US"},{name:"Uruguay",dial_code:"+598",emoji:"🇺🇾",code:"UY"},{name:"Uzbekistan",dial_code:"+998",emoji:"🇺🇿",code:"UZ"},{name:"Vanuatu",dial_code:"+678",emoji:"🇻🇺",code:"VU"},{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58",emoji:"🇻🇪",code:"VE"},{name:"Vietnam",dial_code:"+84",emoji:"🇻🇳",code:"VN"},{name:"Virgin Islands, British",dial_code:"+1284",emoji:"🇻🇬",code:"VG"},{name:"Virgin Islands, U.S.",dial_code:"+1340",emoji:"🇻🇮",code:"VI"},{name:"Wallis and Futuna",dial_code:"+681",emoji:"🇼🇫",code:"WF"},{name:"Yemen",dial_code:"+967",emoji:"🇾🇪",code:"YE"},{name:"Zambia",dial_code:"+260",emoji:"🇿🇲",code:"ZM"},{name:"Zimbabwe",dial_code:"+263",emoji:"🇿🇼",code:"ZW"}],ul=({placeholder:e})=>{const[o,t]=h.useState(ln),[n,a]=h.useState(e??ln[0].name),[l,i]=h.useState(!0),[g,s]=h.useState(!1),[d,f]=h.useState(!1);return{hide:l,setHide:i,newOptions:o,setNewOptions:t,isHovered:d,setIsHovered:f,isFocused:g,setIsFocused:s,value:n,setValue:a}},hl={xs:8,sm:10,md:12,lg:14,xl:16},fu=({size:e,...o})=>r.jsx(c.Element,{as:"ul",...o}),mu=e=>r.jsx(c.Input,{type:"text",...e}),pu=({size:e,...o})=>r.jsx(c.Element,{as:"li",...o}),yu=({id:e,option:o,size:t="md",isSelected:n=!1,isHighlighted:a=!1,callback:l=()=>{},views:i={text:{}}})=>{const g=s=>{s&&s.stopPropagation&&s.stopPropagation(),l(o??"")};return r.jsx(pu,{id:e,margin:0,role:"option","aria-selected":n,listStyleType:"none",fontWeight:"normal",paddingVertical:6,paddingHorizontal:12,onClick:g,fontSize:c.Typography.fontSizes[t],backgroundColor:a?"color-gray-100":void 0,_hover:{backgroundColor:"color-gray-100",transition:"all 0.15s ease-in-out"},...i.text,children:o})},bu=({id:e,size:o,views:t={dropDown:{}},options:n=[],selectedOption:a,highlightedIndex:l=-1,callback:i=()=>{}})=>{const g=s=>i(s);return r.jsx(fu,{id:e,role:"listbox",margin:0,padding:0,top:"100%",width:"100%",display:"flex",zIndex:1e3,overflow:"auto",maxHeight:"300px",borderRadius:12,position:"absolute",flexDirection:"column",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",...t.dropDown,children:n.map((s,d)=>r.jsx(yu,{id:e?`${e}-option-${d}`:void 0,size:o,option:s.name,isSelected:s.name===a,isHighlighted:d===l,callback:g,...t.text},s.code))})},fl=({id:e,name:o,label:t,value:n,placeholder:a,helperText:l,hide:i=!1,error:g=!1,isHovered:s=!1,isFocused:d=!1,isAutoFocus:f=!1,isDisabled:u=!1,isReadOnly:m=!1,shadow:p={},newOptions:y=[],size:x="md",variant:b="default",shape:C="default",onChange:k,onBlur:S=()=>{},setHide:T=()=>{},setNewOptions:w=()=>{},setIsHovered:F=()=>{},setIsFocused:v=()=>{},setValue:z=()=>{},selected:j,views:H={text:{},icon:{},label:{},dropDown:{},helperText:{}},themeMode:E,...M})=>{const{getColor:I,themeMode:W}=c.useTheme(),D=h.useId(),V=e??D,P=`${V}-listbox`,[_,q]=h.useState(-1),N=I("color-gray-500",{themeMode:E||W}),G=()=>v(!0),X=J=>{T(!i),q(-1),z(J),k&&k(J)},$=()=>{!u&&!m&&T(!i)},O=J=>{const ne=J.target.value,re=ln.filter(ce=>ce.name.toLowerCase().startsWith(ne.toLowerCase()));i&&T(!1),w(re),q(re.length>0?0:-1),k&&k(ne)},B=J=>{u||m||(J.key==="ArrowDown"?(J.preventDefault(),i?(T(!1),q(y.length>0?0:-1)):q(Math.min(_+1,y.length-1))):J.key==="ArrowUp"?i||(J.preventDefault(),q(Math.max(_-1,0))):J.key==="Enter"?!i&&_>=0&&y[_]&&(J.preventDefault(),X(y[_].name)):J.key==="Escape"&&(i||(T(!0),q(-1))))},L=J=>{S(J),v(!1)},U=!!t,K={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none"}},transition:"all 0.2s ease-in-out",fontSize:c.Typography.fontSizes[x],backgroundColor:"transparent",color:u?"color-gray-400":"color-gray-900",cursor:u?"not-allowed":m?"auto":"pointer",...H.field};return r.jsxs(Ze,{helperText:l,error:g,views:H,onClick:$,children:[r.jsxs(co,{label:t,size:x,error:g,shape:C,views:H,shadow:p,variant:b,value:n,color:"theme-primary",isDisabled:u,isReadOnly:m,isFocused:d,showLabel:U,_hover:!u&&!g?{borderColor:"theme-primary"}:void 0,children:[r.jsxs(Bo,{children:[U&&r.jsx(yo,{htmlFor:V,color:"theme-primary",error:g,views:H,children:t}),r.jsx(mu,{id:V,name:o,placeholder:a,readOnly:m,disabled:u,autoFocus:f,role:"combobox","aria-expanded":!i,"aria-controls":i?void 0:P,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":!i&&_>=0?`${P}-option-${_}`:void 0,onBlur:L,onFocus:G,onKeyDown:B,...K,...M,value:n,onChange:O})]}),r.jsx(dr,{children:i?r.jsx(we,{orientation:"down",widthHeight:hl[x],color:N,style:H.icon}):r.jsx(we,{orientation:"up",widthHeight:hl[x],color:N,style:H.icon})})]}),!i&&r.jsx(bu,{id:P,size:x,views:H,options:y,selectedOption:n,highlightedIndex:_,callback:X})]})},xu=e=>{const o=ul(e);return r.jsx(fl,{...o,...e})};function Rr(e){"@babel/helpers - typeof";return Rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Rr(e)}function Pe(e,o){if(o.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+o.length+" present")}function ku(e){return Pe(1,arguments),e instanceof Date||Rr(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Je(e){Pe(1,arguments);var o=Object.prototype.toString.call(e);return e instanceof Date||Rr(e)==="object"&&o==="[object Date]"?new Date(e.getTime()):typeof e=="number"||o==="[object Number]"?new Date(e):((typeof e=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Cu(e){if(Pe(1,arguments),!ku(e)&&typeof e!="number")return!1;var o=Je(e);return!isNaN(Number(o))}function xo(e){if(e===null||e===!0||e===!1)return NaN;var o=Number(e);return isNaN(o)?o:o<0?Math.ceil(o):Math.floor(o)}function wu(e,o){Pe(2,arguments);var t=Je(e).getTime(),n=xo(o);return new Date(t+n)}function Su(e,o){Pe(2,arguments);var t=xo(o);return wu(e,-t)}var vu=864e5;function Tu(e){Pe(1,arguments);var o=Je(e),t=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var n=o.getTime(),a=t-n;return Math.floor(a/vu)+1}function et(e){Pe(1,arguments);var o=1,t=Je(e),n=t.getUTCDay(),a=(n<o?7:0)+n-o;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}function ml(e){Pe(1,arguments);var o=Je(e),t=o.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(t+1,0,4),n.setUTCHours(0,0,0,0);var a=et(n),l=new Date(0);l.setUTCFullYear(t,0,4),l.setUTCHours(0,0,0,0);var i=et(l);return o.getTime()>=a.getTime()?t+1:o.getTime()>=i.getTime()?t:t-1}function Iu(e){Pe(1,arguments);var o=ml(e),t=new Date(0);t.setUTCFullYear(o,0,4),t.setUTCHours(0,0,0,0);var n=et(t);return n}var Fu=6048e5;function zu(e){Pe(1,arguments);var o=Je(e),t=et(o).getTime()-Iu(o).getTime();return Math.round(t/Fu)+1}var Mu={};function ot(){return Mu}function rt(e,o){var t,n,a,l,i,g,s,d;Pe(1,arguments);var f=ot(),u=xo((t=(n=(a=(l=o==null?void 0:o.weekStartsOn)!==null&&l!==void 0?l:o==null||(i=o.locale)===null||i===void 0||(g=i.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&a!==void 0?a:f.weekStartsOn)!==null&&n!==void 0?n:(s=f.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Je(e),p=m.getUTCDay(),y=(p<u?7:0)+p-u;return m.setUTCDate(m.getUTCDate()-y),m.setUTCHours(0,0,0,0),m}function pl(e,o){var t,n,a,l,i,g,s,d;Pe(1,arguments);var f=Je(e),u=f.getUTCFullYear(),m=ot(),p=xo((t=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(i=o.locale)===null||i===void 0||(g=i.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&a!==void 0?a:m.firstWeekContainsDate)!==null&&n!==void 0?n:(s=m.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(u+1,0,p),y.setUTCHours(0,0,0,0);var x=rt(y,o),b=new Date(0);b.setUTCFullYear(u,0,p),b.setUTCHours(0,0,0,0);var C=rt(b,o);return f.getTime()>=x.getTime()?u+1:f.getTime()>=C.getTime()?u:u-1}function ju(e,o){var t,n,a,l,i,g,s,d;Pe(1,arguments);var f=ot(),u=xo((t=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(i=o.locale)===null||i===void 0||(g=i.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&a!==void 0?a:f.firstWeekContainsDate)!==null&&n!==void 0?n:(s=f.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1),m=pl(e,o),p=new Date(0);p.setUTCFullYear(m,0,u),p.setUTCHours(0,0,0,0);var y=rt(p,o);return y}var Wu=6048e5;function Eu(e,o){Pe(1,arguments);var t=Je(e),n=rt(t,o).getTime()-ju(t,o).getTime();return Math.round(n/Wu)+1}function be(e,o){for(var t=e<0?"-":"",n=Math.abs(e).toString();n.length<o;)n="0"+n;return t+n}var so={y:function(o,t){var n=o.getUTCFullYear(),a=n>0?n:1-n;return be(t==="yy"?a%100:a,t.length)},M:function(o,t){var n=o.getUTCMonth();return t==="M"?String(n+1):be(n+1,2)},d:function(o,t){return be(o.getUTCDate(),t.length)},a:function(o,t){var n=o.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(o,t){return be(o.getUTCHours()%12||12,t.length)},H:function(o,t){return be(o.getUTCHours(),t.length)},m:function(o,t){return be(o.getUTCMinutes(),t.length)},s:function(o,t){return be(o.getUTCSeconds(),t.length)},S:function(o,t){var n=t.length,a=o.getUTCMilliseconds(),l=Math.floor(a*Math.pow(10,n-3));return be(l,t.length)}},_o={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Au={G:function(o,t,n){var a=o.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(o,t,n){if(t==="yo"){var a=o.getUTCFullYear(),l=a>0?a:1-a;return n.ordinalNumber(l,{unit:"year"})}return so.y(o,t)},Y:function(o,t,n,a){var l=pl(o,a),i=l>0?l:1-l;if(t==="YY"){var g=i%100;return be(g,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):be(i,t.length)},R:function(o,t){var n=ml(o);return be(n,t.length)},u:function(o,t){var n=o.getUTCFullYear();return be(n,t.length)},Q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return be(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return be(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(o,t,n){var a=o.getUTCMonth();switch(t){case"M":case"MM":return so.M(o,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(o,t,n){var a=o.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return be(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(o,t,n,a){var l=Eu(o,a);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):be(l,t.length)},I:function(o,t,n){var a=zu(o);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):be(a,t.length)},d:function(o,t,n){return t==="do"?n.ordinalNumber(o.getUTCDate(),{unit:"date"}):so.d(o,t)},D:function(o,t,n){var a=Tu(o);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):be(a,t.length)},E:function(o,t,n){var a=o.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(o,t,n,a){var l=o.getUTCDay(),i=(l-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return be(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(l,{width:"short",context:"formatting"});case"eeee":default:return n.day(l,{width:"wide",context:"formatting"})}},c:function(o,t,n,a){var l=o.getUTCDay(),i=(l-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return be(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(l,{width:"narrow",context:"standalone"});case"cccccc":return n.day(l,{width:"short",context:"standalone"});case"cccc":default:return n.day(l,{width:"wide",context:"standalone"})}},i:function(o,t,n){var a=o.getUTCDay(),l=a===0?7:a;switch(t){case"i":return String(l);case"ii":return be(l,t.length);case"io":return n.ordinalNumber(l,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(o,t,n){var a=o.getUTCHours(),l=a/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(o,t,n){var a=o.getUTCHours(),l;switch(a===12?l=_o.noon:a===0?l=_o.midnight:l=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(o,t,n){var a=o.getUTCHours(),l;switch(a>=17?l=_o.evening:a>=12?l=_o.afternoon:a>=4?l=_o.morning:l=_o.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(o,t,n){if(t==="ho"){var a=o.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return so.h(o,t)},H:function(o,t,n){return t==="Ho"?n.ordinalNumber(o.getUTCHours(),{unit:"hour"}):so.H(o,t)},K:function(o,t,n){var a=o.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):be(a,t.length)},k:function(o,t,n){var a=o.getUTCHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):be(a,t.length)},m:function(o,t,n){return t==="mo"?n.ordinalNumber(o.getUTCMinutes(),{unit:"minute"}):so.m(o,t)},s:function(o,t,n){return t==="so"?n.ordinalNumber(o.getUTCSeconds(),{unit:"second"}):so.s(o,t)},S:function(o,t){return so.S(o,t)},X:function(o,t,n,a){var l=a._originalDate||o,i=l.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return bl(i);case"XXXX":case"XX":return ko(i);case"XXXXX":case"XXX":default:return ko(i,":")}},x:function(o,t,n,a){var l=a._originalDate||o,i=l.getTimezoneOffset();switch(t){case"x":return bl(i);case"xxxx":case"xx":return ko(i);case"xxxxx":case"xxx":default:return ko(i,":")}},O:function(o,t,n,a){var l=a._originalDate||o,i=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+yl(i,":");case"OOOO":default:return"GMT"+ko(i,":")}},z:function(o,t,n,a){var l=a._originalDate||o,i=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+yl(i,":");case"zzzz":default:return"GMT"+ko(i,":")}},t:function(o,t,n,a){var l=a._originalDate||o,i=Math.floor(l.getTime()/1e3);return be(i,t.length)},T:function(o,t,n,a){var l=a._originalDate||o,i=l.getTime();return be(i,t.length)}};function yl(e,o){var t=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),l=n%60;if(l===0)return t+String(a);var i=o;return t+String(a)+i+be(l,2)}function bl(e,o){if(e%60===0){var t=e>0?"-":"+";return t+be(Math.abs(e)/60,2)}return ko(e,o)}function ko(e,o){var t=o||"",n=e>0?"-":"+",a=Math.abs(e),l=be(Math.floor(a/60),2),i=be(a%60,2);return n+l+t+i}var xl=function(o,t){switch(o){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},kl=function(o,t){switch(o){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Hu=function(o,t){var n=o.match(/(P+)(p+)?/)||[],a=n[1],l=n[2];if(!l)return xl(o,t);var i;switch(a){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",xl(a,t)).replace("{{time}}",kl(l,t))},Vu={p:kl,P:Hu};function Pu(e){var o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return o.setUTCFullYear(e.getFullYear()),e.getTime()-o.getTime()}var Du=["D","DD"],$u=["YY","YYYY"];function Lu(e){return Du.indexOf(e)!==-1}function Bu(e){return $u.indexOf(e)!==-1}function Cl(e,o,t){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var _u={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ou=function(o,t,n){var a,l=_u[o];return typeof l=="string"?a=l:t===1?a=l.one:a=l.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function cn(e){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=o.width?String(o.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var Nu={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},qu={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Uu={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Gu={date:cn({formats:Nu,defaultWidth:"full"}),time:cn({formats:qu,defaultWidth:"full"}),dateTime:cn({formats:Uu,defaultWidth:"full"})},Yu={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ku=function(o,t,n,a){return Yu[o]};function pr(e){return function(o,t){var n=t!=null&&t.context?String(t.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var l=e.defaultFormattingWidth||e.defaultWidth,i=t!=null&&t.width?String(t.width):l;a=e.formattingValues[i]||e.formattingValues[l]}else{var g=e.defaultWidth,s=t!=null&&t.width?String(t.width):e.defaultWidth;a=e.values[s]||e.values[g]}var d=e.argumentCallback?e.argumentCallback(o):o;return a[d]}}var Xu={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ju={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Qu={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Zu={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ru={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},eh={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},oh=function(o,t){var n=Number(o),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},rh={ordinalNumber:oh,era:pr({values:Xu,defaultWidth:"wide"}),quarter:pr({values:Ju,defaultWidth:"wide",argumentCallback:function(o){return o-1}}),month:pr({values:Qu,defaultWidth:"wide"}),day:pr({values:Zu,defaultWidth:"wide"}),dayPeriod:pr({values:Ru,defaultWidth:"wide",formattingValues:eh,defaultFormattingWidth:"wide"})};function yr(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],l=o.match(a);if(!l)return null;var i=l[0],g=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(g)?nh(g,function(u){return u.test(i)}):th(g,function(u){return u.test(i)}),d;d=e.valueCallback?e.valueCallback(s):s,d=t.valueCallback?t.valueCallback(d):d;var f=o.slice(i.length);return{value:d,rest:f}}}function th(e,o){for(var t in e)if(e.hasOwnProperty(t)&&o(e[t]))return t}function nh(e,o){for(var t=0;t<e.length;t++)if(o(e[t]))return t}function ah(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=o.match(e.matchPattern);if(!n)return null;var a=n[0],l=o.match(e.parsePattern);if(!l)return null;var i=e.valueCallback?e.valueCallback(l[0]):l[0];i=t.valueCallback?t.valueCallback(i):i;var g=o.slice(a.length);return{value:i,rest:g}}}var lh=/^(\d+)(th|st|nd|rd)?/i,ih=/\d+/i,ch={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},sh={any:[/^b/i,/^(a|c)/i]},dh={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},gh={any:[/1/i,/2/i,/3/i,/4/i]},uh={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},hh={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},fh={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},mh={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ph={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},yh={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},bh={ordinalNumber:ah({matchPattern:lh,parsePattern:ih,valueCallback:function(o){return parseInt(o,10)}}),era:yr({matchPatterns:ch,defaultMatchWidth:"wide",parsePatterns:sh,defaultParseWidth:"any"}),quarter:yr({matchPatterns:dh,defaultMatchWidth:"wide",parsePatterns:gh,defaultParseWidth:"any",valueCallback:function(o){return o+1}}),month:yr({matchPatterns:uh,defaultMatchWidth:"wide",parsePatterns:hh,defaultParseWidth:"any"}),day:yr({matchPatterns:fh,defaultMatchWidth:"wide",parsePatterns:mh,defaultParseWidth:"any"}),dayPeriod:yr({matchPatterns:ph,defaultMatchWidth:"any",parsePatterns:yh,defaultParseWidth:"any"})},xh={code:"en-US",formatDistance:Ou,formatLong:Gu,formatRelative:Ku,localize:rh,match:bh,options:{weekStartsOn:0,firstWeekContainsDate:1}},kh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ch=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wh=/^'([^]*?)'?$/,Sh=/''/g,vh=/[a-zA-Z]/;function Th(e,o,t){var n,a,l,i,g,s,d,f,u,m,p,y,x,b;Pe(2,arguments);var C=String(o),k=ot(),S=(n=(a=void 0)!==null&&a!==void 0?a:k.locale)!==null&&n!==void 0?n:xh,T=xo((l=(i=(g=(s=void 0)!==null&&s!==void 0?s:void 0)!==null&&g!==void 0?g:k.firstWeekContainsDate)!==null&&i!==void 0?i:(d=k.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&l!==void 0?l:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=xo((u=(m=(p=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&p!==void 0?p:k.weekStartsOn)!==null&&m!==void 0?m:(x=k.locale)===null||x===void 0||(b=x.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&u!==void 0?u:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw new RangeError("locale must contain localize property");if(!S.formatLong)throw new RangeError("locale must contain formatLong property");var F=Je(e);if(!Cu(F))throw new RangeError("Invalid time value");var v=Pu(F),z=Su(F,v),j={firstWeekContainsDate:T,weekStartsOn:w,locale:S,_originalDate:F},H=C.match(Ch).map(function(E){var M=E[0];if(M==="p"||M==="P"){var I=Vu[M];return I(E,S.formatLong)}return E}).join("").match(kh).map(function(E){if(E==="''")return"'";var M=E[0];if(M==="'")return Ih(E);var I=Au[M];if(I)return Bu(E)&&Cl(E,o,String(e)),Lu(E)&&Cl(E,o,String(e)),I(z,E,S.localize,j);if(M.match(vh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");return E}).join("");return H}function Ih(e){var o=e.match(wh);return o?o[1].replace(Sh,"'"):e}const sn=e=>typeof e=="string"?e:void 0,wl=({value:e,defaultValue:o}={})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(!1),[i,g]=h.useState(()=>sn(e)??sn(o)??Th(new Date,"yyyy-MM-dd")),s=sn(e);return h.useEffect(()=>{s!==void 0&&g(s)},[s]),{date:i,setDate:g,isHovered:t,setIsHovered:n,isFocused:a,setIsFocused:l}},Fh=e=>r.jsx(c.Input,{type:"date",...e}),Sl=({id:e,name:o,label:t,date:n,children:a,helperText:l,shadow:i={},size:g="md",variant:s="default",shape:d="default",views:f={container:{},label:{},helperText:{},text:{},field:{}},error:u=!1,isHovered:m=!1,isFocused:p=!1,isDisabled:y=!1,isReadOnly:x=!1,setDate:b=()=>{},setIsFocused:C=()=>{},setIsHovered:k=()=>{},onChange:S,onChangeText:T,value:w,defaultValue:F,...v})=>{const{themeMode:z}=c.useTheme(),j=h.useId(),H=e??j,E=!!t,M=()=>k(!m),I=()=>C(!0),W=V=>{typeof V=="string"?(b(V),T&&T(V)):(b(V.target.value),S&&S(V.target.value))},D={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none",backgroundColor:"transparent"}},transition:"all 0.2s ease-in-out",fontSize:c.Typography.fontSizes[g],backgroundColor:"transparent",color:y?"color-gray-400":"color-gray-900",cursor:y?"not-allowed":x?"auto":"pointer",...f.field};return r.jsx(Ze,{helperText:l,error:u,views:f,children:r.jsx(co,{label:t,size:g,error:u,shape:d,views:f,shadow:i,color:"theme-primary",variant:s,value:n,isHovered:m,isDisabled:y,isReadOnly:x,isFocused:p,showLabel:E,onMouseEnter:M,onMouseLeave:M,children:r.jsxs(Bo,{children:[E&&r.jsx(yo,{htmlFor:H,color:"theme-primary",error:u,views:f,children:t}),r.jsx(Fh,{id:H,name:o,role:"textbox","aria-label":!E&&typeof t=="string"?t:void 0,onFocus:I,disabled:y,readOnly:x,...D,...v,...T&&{onChangeText:W},onChange:W,value:n})]})})})},zh=e=>{const o=wl(e);return r.jsx(Sl,{...o,...e})},vl=e=>{const o=en(e),[t,n]=h.useState(!1);return{isVisible:t,setIsVisible:n,...e,...o}},Tl={xs:14,sm:16,md:16,lg:18,xl:20},Mh=({visibleIcon:e,hiddenIcon:o,...t})=>{const{isVisible:n,setIsVisible:a,...l}=vl(t),i=Tl[t.size??"md"]??Tl.md,g=i-2;return r.jsx(fr,{...l,type:n?"text":"password",isClearable:!1,right:r.jsx(c.View,{display:"flex",alignItems:"center",justifyContent:"center",width:`${i}px`,height:`${i}px`,minWidth:`${i}px`,color:"color-gray-500",cursor:t.isDisabled?"not-allowed":"pointer",transition:"color 0.2s ease",onClick:()=>{t.isDisabled||a(!n)},children:n?e??r.jsx(Dt,{widthHeight:g}):o??r.jsx(Pt,{widthHeight:g})})})},Il=(e,o,t)=>{const[n,a]=h.useState(e),[l,i]=h.useState(o?{value:o,label:o}:e[0]),[g,s]=h.useState([]),[d,f]=h.useState(0),[u,m]=h.useState(t??""),[p,y]=h.useState(!1);return{filteredItems:n,setFilteredItems:a,selectedItem:l,setSelectedItem:i,selectedItems:g,setSelectedItems:s,highlightedIndex:d,setHighlightedIndex:f,searchQuery:u,setSearchQuery:m,isDropdownVisible:p,setIsDropdownVisible:y}},jh={xs:12,sm:14,md:16,lg:20,xl:24},Wh={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},Fl={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"},initial:{opacity:0,transform:"translateY(-8px) scale(0.96)"}},Eh={padding:"8px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-100",backgroundColor:"color-gray-50",borderTopLeftRadius:10,borderTopRightRadius:10},Ah={padding:"8px 10px",cursor:"pointer",borderRadius:8,margin:"1px 4px",transition:"all 0.15s ease-in-out"},Hh={padding:"24px 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},zl={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},Vh={display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",backgroundColor:"color-gray-100",borderRadius:8,fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},Ml=({placeholder:e,items:o,showTick:t=!0,onSelect:n,searchEnabled:a=!0,left:l,right:i,label:g,filteredItems:s,setSelectedItem:d,selectedItem:f,selectedItems:u,setSelectedItems:m,highlightedIndex:p,setHighlightedIndex:y,searchQuery:x,setSearchQuery:b,setFilteredItems:C,views:k,isDropdownVisible:S,setIsDropdownVisible:T,isMulti:w=!1,searchPlaceholder:F,size:v="md",...z})=>{const j=h.useId(),H=z.id??j,E=`${H}-dropdown`,M=`${H}-label`,{ref:I,relation:W}=c.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),D=h.useRef(null),[V,P]=h.useState(!1),[_,q]=h.useState(!1),N=()=>{var J;const B=_?Fl.enter:Fl.initial;if(!I.current)return{};const L=I.current.getBoundingClientRect(),U={position:"fixed",left:L.left,width:L.width,zIndex:1e4,...B};return((J=W==null?void 0:W.space)==null?void 0:J.vertical)==="top"?{...U,bottom:window.innerHeight-L.top+6}:{...U,top:L.bottom+6}};h.useEffect(()=>{if(S){const B=setTimeout(()=>q(!0),10);return()=>clearTimeout(B)}q(!1)},[S]),h.useEffect(()=>{const B=L=>{!L.composedPath().some(J=>(J==null?void 0:J.id)===E)&&I.current&&!I.current.contains(L.target)&&T(!1)};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]);const G=B=>{if(b(B),B==="")C(o);else{const L=o.filter(U=>U.label.toLowerCase().includes(B.toLowerCase()));C(L)}y(0)},X=B=>{if(w){const L=u.some(K=>K.value===B.value);let U;L?U=u.filter(K=>K.value!==B.value):U=[...u,B],m(U),n==null||n(U)}else d(B),n==null||n(B),T(!1)},$=(B,L)=>{B.stopPropagation();const U=u.filter(K=>K.value!==L.value);m(U),n==null||n(U)},O=B=>w?u.some(L=>L.value===B.value):B.value===f.value;return r.jsxs(c.Horizontal,{flexWrap:"nowrap",gap:15,alignItems:"center",width:"100%",...z,children:[g&&r.jsx(c.Text,{id:M,views:k==null?void 0:k.label,children:g}),r.jsxs(c.View,{position:"relative",width:"100%",children:[r.jsx("div",{ref:I,role:"combobox",tabIndex:0,"aria-expanded":S,"aria-haspopup":"listbox","aria-controls":S?E:void 0,"aria-labelledby":g?M:void 0,onClick:()=>T(!S),onKeyDown:B=>{B.key==="Enter"||B.key===" "||B.key==="ArrowDown"?(B.preventDefault(),T(!0)):B.key==="Escape"&&T(!1)},style:{width:"100%"},children:r.jsxs(co,{size:v,isHovered:V,isFocused:S,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),cursor:"pointer",views:{container:k==null?void 0:k.container},children:[r.jsxs(c.Horizontal,{gap:10,alignItems:"center",flex:1,minWidth:0,flexWrap:w?"wrap":"nowrap",...k==null?void 0:k.labelContainer,children:[l,w?u.length>0?r.jsx(c.Horizontal,{gap:6,flexWrap:"wrap",alignItems:"center",children:u.map(B=>r.jsxs(c.Horizontal,{...Vh,_hover:{backgroundColor:"color-gray-200"},children:[B.icon&&r.jsx(c.View,{flexShrink:0,children:B.icon}),r.jsx(c.Text,{size:"sm",color:"color-gray-700",weight:"medium",children:B.label}),r.jsx(Le,{widthHeight:12,color:"color-gray-500",cursor:"pointer",onClick:L=>$(L,B)})]},B.value))}):r.jsx(c.Text,{weight:"medium",flexGrow:1,color:"color-gray-500",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...k==null?void 0:k.label,children:e}):r.jsxs(r.Fragment,{children:[f.icon&&f.label!==e&&r.jsx(c.View,{children:f.icon}),r.jsx(c.Text,{weight:"medium",flexGrow:1,color:f.label===e?"color-gray-500":"color-gray-800",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...k==null?void 0:k.label,children:f.label})]})]}),r.jsxs(c.Horizontal,{gap:8,alignItems:"center",flexShrink:0,children:[i,r.jsx(c.View,{style:S?zl.open:zl.closed,children:r.jsx(we,{widthHeight:jh[v],orientation:"down",color:S?"color-gray-700":"color-gray-400"})})]})]})}),S&&r.jsx(nr,{children:r.jsxs(c.View,{ref:D,id:E,role:"listbox","aria-labelledby":g?M:void 0,...Wh,style:N(),...k==null?void 0:k.dropdown,children:[a&&r.jsx(c.View,{...Eh,children:r.jsx(fr,{id:`${H}-search`,name:`${z.name??H}-search`,width:"100%",type:"search",autoFocus:!0,value:x,onChange:B=>G(B),hint:F||e||"Search...","aria-label":F||"Search",isClearable:!1,left:r.jsx(Pr,{widthHeight:14,color:"color-gray-400"}),views:{container:{width:"100%",padding:"0",backgroundColor:"transparent",borderColor:"color-gray-200",...k==null?void 0:k.text},field:{fontSize:"13px"}}})}),s.length>0&&r.jsx(c.View,{margin:0,padding:"4px",children:s.map((B,L)=>{const U=O(B),K=L===p;return r.jsxs(c.Horizontal,{role:"option","aria-selected":U,justifyContent:"space-between",alignItems:"center",...Ah,backgroundColor:U&&K?"color-blue-100":U?"color-blue-50":K?"color-gray-100":"transparent",onMouseEnter:()=>y(L),onClick:()=>X(B),...k==null?void 0:k.item,children:[r.jsxs(c.Horizontal,{gap:8,alignItems:"center",children:[B.icon&&r.jsx(c.View,{flexShrink:0,children:B.icon}),r.jsx(c.Text,{size:"sm",color:U?"theme-primary":"color-gray-800",weight:U?"medium":"normal",children:B.label})]}),U&&t&&r.jsx(ir,{widthHeight:16,color:"theme-primary"})]},B.value)})}),s.length===0&&r.jsxs(c.Vertical,{...Hh,children:[r.jsx(Pr,{widthHeight:24,color:"color-gray-300"}),r.jsx(c.Text,{color:"color-gray-500",size:"sm",align:"center",children:"No results found"}),r.jsx(c.Text,{color:"color-gray-400",size:"xs",align:"center",children:"Try a different search term"})]})]})})]})]})},Ph=({id:e,name:o,items:t,placeholder:n,searchPlaceholder:a,...l})=>{const i=Il(t,n,a);return r.jsx(Ml,{id:e,name:o,items:t,searchPlaceholder:a,...i,...l})},jl=e=>{const{tags:o,defaultTags:t=[],onTagsChange:n,onTagAdd:a,onTagRemove:l,maxTags:i,minTagLength:g=1,maxTagLength:s=50,allowDuplicates:d=!1,separators:f=["enter","comma"],isDisabled:u=!1,isReadOnly:m=!1}=e,[p,y]=h.useState(""),[x,b]=h.useState(()=>(o||t||[]).map((W,D)=>({id:`tag-${D}-${Date.now()}`,value:W}))),[C,k]=h.useState(!1),[S,T]=h.useState(!1),w=o&&Array.isArray(o)?o.map((I,W)=>({id:`tag-${W}-${Date.now()}`,value:I})):x;h.useEffect(()=>{o&&Array.isArray(o)&&b(o.map((I,W)=>({id:`tag-${W}-${Date.now()}`,value:I})))},[o]);const F=h.useCallback(I=>{const W=I.trim();return!(W.length<g||W.length>s||!d&&w.map(V=>V.value.toLowerCase()).includes(W.toLowerCase())||i&&w.length>=i)},[w,g,s,d,i]),v=h.useCallback(I=>{if(u||m)return;const W=I.trim();if(!W||!F(W))return;const D={id:`tag-${Date.now()}-${Math.random()}`,value:W},V=[...w,D],P=V.map(_=>_.value);o||b(V),n==null||n(P),a==null||a(W),y("")},[w,F,n,a,u,m,o]),z=h.useCallback(I=>{if(u||m)return;const W=w[I];if(!W)return;const D=w.filter((P,_)=>_!==I),V=D.map(P=>P.value);o||b(D),n==null||n(V),l==null||l(W.value,I)},[w,n,l,u,m,o]),j=h.useCallback(I=>{if(u||m)return;const W=I.target.value;if(f.includes("comma")&&W.includes(",")){const D=W.split(","),V=D[0],P=D.slice(1).join(",");V.trim()&&v(V),y(P);return}y(W)},[v,f,u,m]),H=h.useCallback(I=>{if(u||m)return;const{key:W}=I;if(f.includes("enter")&&W==="Enter"){I.preventDefault(),p.trim()&&v(p);return}if(f.includes("tab")&&W==="Tab"&&p.trim()){I.preventDefault(),v(p);return}if(f.includes("space")&&W===" "&&p.trim()){I.preventDefault(),v(p);return}if(W==="Backspace"&&!p&&w.length>0){I.preventDefault(),z(w.length-1);return}},[v,z,p,w,f,u,m]),E=h.useCallback(()=>{var I;k(!0),(I=e.onFocus)==null||I.call(e)},[e.onFocus]),M=h.useCallback(()=>{var I;k(!1),p.trim()&&v(p),(I=e.onBlur)==null||I.call(e)},[v,p,e.onBlur]);return{inputValue:p,setInputValue:y,tags:w,setTags:b,isFocused:C,setIsFocused:k,isHovered:S,setIsHovered:T,addTag:v,removeTag:z,handleInputChange:j,handleKeyDown:H,handleFocus:E,handleBlur:M,validateTag:F}},Dh=({tag:e,onRemove:o,isRemovable:t,size:n,views:a,isDisabled:l,isReadOnly:i})=>{const[g,s]=h.useState(!1),d={xs:{padding:"2px 8px",fontSize:"10px",iconSize:10},sm:{padding:"4px 10px",fontSize:"12px",iconSize:12},md:{padding:"6px 14px",fontSize:"14px",iconSize:14},lg:{padding:"8px 16px",fontSize:"16px",iconSize:16},xl:{padding:"10px 18px",fontSize:"18px",iconSize:18}}[n]||{padding:"6px 14px",fontSize:"14px",iconSize:14};return r.jsxs(c.Horizontal,{alignItems:"center",gap:6,padding:d.padding,backgroundColor:"theme-primary-100",borderRadius:"9999px",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary-250",transition:"all 0.15s ease-in-out",opacity:l?.6:1,maxWidth:"100%",minWidth:0,_hover:!l&&!i?{backgroundColor:"theme-primary-180",borderColor:"theme-primary-400"}:{},...a==null?void 0:a.tag,children:[r.jsx(c.Text,{fontSize:d.fontSize,color:l?"color-gray-400":"theme-primary",maxLines:1,minWidth:0,...a==null?void 0:a.tagText,children:e}),t&&!l&&!i&&r.jsx(c.View,{cursor:"pointer",padding:"2px",borderRadius:"50%",transition:"all 0.15s ease-in-out",backgroundColor:g?"color-red-100":"transparent",opacity:g?1:.7,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onClick:f=>{f.stopPropagation(),o()},_hover:{backgroundColor:"color-red-100"},...a==null?void 0:a.tagRemove,children:r.jsx(Le,{widthHeight:d.iconSize,color:g?"color-red-500":"color-gray-400"})})]})},Wl=({id:e,name:o,label:t,placeholder:n="Type and press Enter to add tags...",helperText:a,error:l=!1,inputValue:i="",tags:g=[],left:s,right:d,shadow:f={},views:u={},size:m="md",shape:p="default",variant:y="default",isDisabled:x=!1,isReadOnly:b=!1,isAutoFocus:C=!1,isRemovable:k=!0,isFocused:S=!1,isHovered:T=!1,maxTags:w,handleInputChange:F,handleKeyDown:v,handleFocus:z,handleBlur:j,removeTag:H,setIsHovered:E,onClick:M,setInputValue:I,setIsFocused:W,addTag:D,defaultTags:V,onTagsChange:P,onTagAdd:_,onTagRemove:q,minTagLength:N,maxTagLength:G,allowDuplicates:X,separators:$,menuItems:O,onMenuItemSelect:B,onFocus:L,onBlur:U,validateTag:K,...J})=>{const{getColor:ne,themeMode:re}=c.useTheme(),ce=!!(t&&(S||g.length>0||i)),Q=w&&g.length>=w,le={border:"none",outline:"none",backgroundColor:"transparent",fontSize:c.Typography.fontSizes[m],color:x?"color-gray-400":"color-gray-800",flex:1,minWidth:"120px",transition:"all 0.2s ease-in-out",...u==null?void 0:u.input};return r.jsx(Ze,{error:!!l,helperText:typeof l=="string"?l:a,views:u,...J,children:r.jsxs(co,{label:t,shadow:f,value:g.length>0||i?"has-content":"",size:m,shape:p,variant:y,error:!!l,showLabel:ce,isFocused:S,isHovered:T,isDisabled:x,isReadOnly:b,views:{...u,container:{...u==null?void 0:u.container,...u==null?void 0:u.inputContainer}},onClick:M,onMouseEnter:()=>E==null?void 0:E(!0),onMouseLeave:()=>E==null?void 0:E(!1),children:[s,r.jsxs(Bo,{children:[t&&r.jsx(yo,{size:m,error:!!l,views:u,children:t}),r.jsxs(c.Horizontal,{alignItems:"center",gap:8,flexWrap:"wrap",width:"100%",minHeight:c.Typography.fontSizes[m],padding:"0",...u==null?void 0:u.tagsContainer,children:[g.map((he,ue)=>r.jsx(Dh,{tag:he.value,onRemove:()=>H==null?void 0:H(ue),isRemovable:k,size:m,views:u,isDisabled:x,isReadOnly:b},he.id)),!Q&&r.jsx(c.Input,{id:e,name:o,type:"text",value:i,placeholder:g.length===0?n:"",disabled:x,readOnly:b,autoFocus:C,onChange:F,onKeyDown:v,onFocus:z,onBlur:j,autoComplete:"off",...le}),Q&&r.jsxs(c.Text,{fontSize:c.Typography.fontSizes[m],color:"color-gray-500",fontStyle:"italic",...u==null?void 0:u.placeholder,children:["Maximum ",w," tags reached"]})]})]}),d]})})},$h=e=>{const o=jl(e),{tags:t,...n}=e,{setTags:a,...l}=o;return r.jsx(Wl,{...l,...n})};function Lh(e){const o=setTimeout(e,0),t=setTimeout(e,10),n=setTimeout(e,50);return[o,t,n]}const El=({value:e,defaultValue:o="",length:t=6,onChange:n,onChangeText:a,onComplete:l,onKeyDown:i,onKeyPress:g,onBlur:s,onFocus:d,isReadOnly:f,isDisabled:u,pattern:m,stepValues:p,pasteTransformer:y})=>{var O,B;const x=e!==void 0,b=x?e:o,[C,k]=h.useState(String(b??"").slice(0,t)||""),[S,T]=h.useState(!1),[w,F]=h.useState(!1),[v,z]=h.useState(null),[j,H]=h.useState(null),E=h.useRef(null),M=h.useRef(null),I=h.useRef({value:C,onChange:n||(()=>{}),isIOS:typeof window<"u"&&((B=(O=window==null?void 0:window.CSS)==null?void 0:O.supports)==null?void 0:B.call(O,"-webkit-touch-callout","none"))}),W=h.useRef({prev:[null,null,"none"]}),D=m?typeof m=="string"?new RegExp(m):m:null;h.useEffect(()=>{if(x&&e!==C){const L=String(e??"").slice(0,t)||"";k(L)}},[x,e,t,C]);const V=h.useCallback(L=>{let U=L;if(p&&p.length>0&&L){const K=parseInt(L,10);if(!isNaN(K)){let J=p[0],ne=Math.abs(K-J);for(let re=1;re<p.length;re++){const ce=Math.abs(K-p[re]);ce<ne&&(ne=ce,J=p[re])}U=J.toString()}}k(U),n&&n(U),a&&a(U),l&&U.length===t&&l(U)},[n,a,l,t,p,x]),P=h.useCallback(L=>{L&&E.current!==L&&Object.defineProperty(E,"current",{value:L,writable:!0})},[]),_=h.useCallback(L=>{var J,ne,re,ce;const U=typeof L=="string"?L:((J=L==null?void 0:L.currentTarget)==null?void 0:J.value)??((ne=L==null?void 0:L.target)==null?void 0:ne.value)??((re=L==null?void 0:L.nativeEvent)==null?void 0:re.text)??"",K=String(U).slice(0,t);if(K.length>0&&D&&!D.test(K)){(ce=L==null?void 0:L.preventDefault)==null||ce.call(L);return}V(K),E.current&&(E.current.value=K)},[t,D,V,E]),q=h.useCallback(()=>{const L=E.current;if(L&&typeof L.setSelectionRange=="function"){const U=typeof L.value=="string"?L.value.length:0,K=Math.min(U,t-1),J=U;L.setSelectionRange(K,J),z(K),H(J)}T(!0),d&&d()},[t,d]),N=h.useCallback(L=>{T(!1),s&&s(L)},[s]),G=h.useCallback(L=>{i&&i(L)},[]),X=h.useCallback(L=>{g&&g(L)},[]),$=h.useCallback(L=>{const U=E.current;if(!L.clipboardData||!U)return;const K=L.clipboardData.getData("text/plain"),J=y?y(K):K;L.preventDefault();const ne=U.selectionStart||0,re=U.selectionEnd||0,le=(ne!==re?C.slice(0,ne)+J+C.slice(re):C.slice(0,ne)+J+C.slice(ne)).slice(0,t);if(le.length>0&&D&&!D.test(le))return;U.value=le,V(le),k(le);const he=Math.min(le.length,t-1),ue=le.length;U.setSelectionRange(he,ue),z(he),H(ue)},[t,y,D,V,C,k]);return h.useEffect(()=>{const L=E.current,U=M.current;if(!L||!U||typeof document>"u")return;I.current.value!==L.value&&I.current.onChange&&I.current.onChange(L.value),W.current.prev=[L.selectionStart,L.selectionEnd,L.selectionDirection];function K(){if(document.activeElement!==L){z(null),H(null);return}const Q=(L==null?void 0:L.selectionStart)??null,le=(L==null?void 0:L.selectionEnd)??null,he=(L==null?void 0:L.selectionDirection)??null,ue=(L==null?void 0:L.maxLength)??0,Ce=(L==null?void 0:L.value)??"",de=W.current.prev;let ie=-1,ge=-1,oe="none";if(Ce.length!==0&&Q!==null&&le!==null){const Y=Q===le,R=Q===Ce.length&&Ce.length<ue;if(Y&&!R){const ae=Q;if(ae===0)ie=0,ge=1,oe="forward";else if(ae===ue)ie=ae-1,ge=ae,oe="backward";else if(ue>1&&Ce.length>1){let se=0;if(de[0]!==null&&de[1]!==null){oe=ae<de[1]?"backward":"forward";const me=de[0]===de[1]&&de[0]<ue;oe==="backward"&&!me&&(se=-1)}ie=se+ae,ge=se+ae+1}}ie!==-1&&ge!==-1&&ie!==ge&&E.current&&E.current.setSelectionRange(ie,ge,oe)}const fe=ie!==-1?ie:Q,Z=ge!==-1?ge:le,te=oe!=="none"?oe:he;z(fe),H(Z),W.current.prev=[fe,Z,te]}document.addEventListener("selectionchange",K,{capture:!0}),K(),document.activeElement===L&&T(!0);const J=U,ne=()=>{var Q;J&&typeof((Q=J.style)==null?void 0:Q.setProperty)=="function"&&J.style.setProperty("--root-height",`${L.clientHeight}px`)};ne();const re=typeof window<"u"?window.ResizeObserver:void 0,ce=typeof re=="function"?new re(ne):null;return ce==null||ce.observe(L),()=>{document.removeEventListener("selectionchange",K,{capture:!0}),ce==null||ce.disconnect()}},[]),h.useEffect(()=>{if(typeof Event>"u")return;const L=Lh(()=>{var re,ce,Q;const U=E.current;U&&typeof U.dispatchEvent=="function"&&U.dispatchEvent(new Event("input"));const K=(re=E.current)==null?void 0:re.selectionStart,J=(ce=E.current)==null?void 0:ce.selectionEnd,ne=(Q=E.current)==null?void 0:Q.selectionDirection;K!==null&&J!==null&&K!==void 0&&J!==void 0&&(z(K),H(J),W.current.prev=[K,J,ne||"none"])});return()=>L.forEach(clearTimeout)},[C,S]),{value:C,setValue:V,isFocused:S,setIsFocused:T,isHovered:w,setIsHovered:F,inputRef:E,containerRef:M,mirrorSelectionStart:v,mirrorSelectionEnd:j,setMirrorSelectionStart:z,setMirrorSelectionEnd:H,setInputRef:P,handleChange:_,handleFocus:q,handleBlur:N,handleKeyDown:G,handleKeyPress:X,handlePaste:$}},Bh=h.createContext({slots:[],isFocused:!1,isHovering:!1}),_h=`
7
7
  @keyframes blink {
8
8
  0%, 100% { opacity: 1; }
9
9
  50% { opacity: 0; }
@@ -20,17 +20,61 @@
20
20
  border-radius: 4px !important;
21
21
  width: 100% !important;
22
22
  }
23
- `;function Vo(e,o){try{e.insertRule(o)}catch{console.error("input-otp could not insert CSS rule:",o)}}const fl=({id:e,name:o,label:t,value:n="",length:a=6,onChange:l,onChangeText:c,onComplete:s,helperText:d,placeholder:g="",shadow:m,views:f={},size:p="md",shape:u="rounded",variant:y="outline",gap:k=8,type:x="text",error:C=!1,isFocused:S=!1,isHovered:w=!1,isDisabled:v=!1,isReadOnly:b=!1,isAutoFocus:I=!1,setValue:T,setIsFocused:j,setIsHovered:E,inputRef:D,containerRef:W,mirrorSelectionStart:A,mirrorSelectionEnd:H,setMirrorSelectionStart:z,setMirrorSelectionEnd:P,handlePaste:V,handleChange:M,handleFocus:L,handleBlur:_,handleKeyDown:O,handleKeyPress:N,secureTextEntry:U,stepValues:X,setInputRef:oe,onBlur:B=()=>{},onClick:$=()=>{},onFocus:q=()=>{},onKeyPress:J,pattern:Y,pasteTransformer:Z,...ee})=>{i.useTheme();const ne=h.useId(),K=e??o??ne,re=!!t,ie=h.useMemo(()=>({slots:Array.from({length:a}).map((le,te)=>{const ae=S&&A!==null&&H!==null&&(A===H&&te===A||te>=A&&te<H),ce=n[te]!==void 0?n[te]:null,ye=n[0]!==void 0?null:(g==null?void 0:g[te])??null;return{char:ce,placeholderChar:ye,isActive:ae,hasFakeCaret:ae&&ce===null}}),isFocused:S,isHovering:!v&&w}),[S,w,v,a,H,A,g,n]);h.useEffect(()=>{I&&D.current&&D.current.focus()},[I,D]),h.useEffect(()=>{if(!document.getElementById("input-otp-style")){const le=document.createElement("style");if(le.id="input-otp-style",document.head.appendChild(le),le.sheet){const te="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Vo(le.sheet,"@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }"),Vo(le.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Vo(le.sheet,`[data-input-otp]:autofill { ${te} }`),Vo(le.sheet,`[data-input-otp]:-webkit-autofill { ${te} }`),Vo(le.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Vo(le.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}},[]);const ge=()=>r.jsx(i.Horizontal,{gap:k,width:"100%",justifyContent:"center",minHeight:p==="xs"?"32px":p==="sm"?"36px":p==="md"?"40px":p==="lg"?"48px":"56px",...f.container,children:ie.slots.map((le,te)=>r.jsxs(oo,{size:p,error:C,shape:u,views:f,variant:y,value:le.char||"",color:"theme-primary",isHovered:w,isDisabled:v,isReadOnly:b,isFocused:le.isActive,showLabel:!1,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),justifyContent:"center",alignItems:"center",width:"100%",position:"relative",height:p==="xs"?"32px":p==="sm"?"36px":p==="md"?"40px":p==="lg"?"48px":"56px",...f.container,children:[le.char?r.jsx(i.View,{textAlign:"center",fontSize:p==="xs"?"14px":p==="sm"?"16px":p==="md"?"18px":p==="lg"?"20px":"24px",fontWeight:"medium",...f.text,children:x==="password"?"•":le.char}):le.placeholderChar?r.jsx(i.View,{textAlign:"center",fontSize:p==="xs"?"14px":p==="sm"?"16px":p==="md"?"18px":p==="lg"?"20px":"24px",color:"color-gray-400",opacity:.5,...f.text,children:le.placeholderChar}):null,le.hasFakeCaret&&r.jsx(i.View,{position:"absolute",width:"2px",height:"60%",backgroundColor:"theme-primary",animation:"blink 1s step-start infinite",style:{animationName:"blink",animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"step-start"}})]},`${e||o}-${te}`))}),We={position:"absolute",inset:0,width:"100%",height:"100%",display:"flex",textAlign:"center",opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"};return r.jsxs(r.Fragment,{children:[r.jsx("noscript",{children:r.jsx("style",{children:cf})}),r.jsxs(Ue,{helperText:d,error:C,views:f,children:[re&&r.jsx(ho,{htmlFor:K,color:"theme-primary",error:C,...f.label,children:t}),r.jsxs(i.View,{ref:W,"data-input-otp-container":!0,position:"relative",cursor:v?"default":"text",userSelect:"none",pointerEvents:"none",children:[r.jsx(lf.Provider,{value:ie,children:ge()}),r.jsx(i.View,{position:"absolute",inset:0,pointerEvents:"none",children:r.jsx(i.Input,{ref:le=>oe(le),"data-input-otp":!0,"data-input-otp-placeholder-shown":n.length===0||void 0,"data-input-otp-mss":A,"data-input-otp-mse":H,id:K,name:o,type:x==="password"?"password":"text",inputMode:x!=="password"?"numeric":void 0,pattern:"[0-9]*",maxLength:a,readOnly:b,disabled:v,placeholder:g,value:n,onChange:M,onKeyDown:O,onPaste:V,onFocus:L,onBlur:_,onClick:$,onMouseOver:()=>E(!0),onMouseLeave:()=>E(!1),autoComplete:"one-time-code","aria-label":re?void 0:`OTP input with ${a} digits`,style:We,...ee,...f.input})})]})]})]})},sf=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},ml=e=>{const{value:o}=e,{value:t,setValue:n,isFocused:a,setIsFocused:l,isHovered:c,setIsHovered:s,inputRef:d,containerRef:g,mirrorSelectionStart:m,mirrorSelectionEnd:f,setMirrorSelectionStart:p,setMirrorSelectionEnd:u,setInputRef:y,handleChange:k,handleFocus:x,handleBlur:C,handleKeyDown:S,handlePaste:w,handleKeyPress:v}=hl(e),I=sf(o!==void 0?o:t);return r.jsx(fl,{...e,value:I,setValue:n,isFocused:a,setIsFocused:l,isHovered:c,setIsHovered:s,inputRef:d,containerRef:g,mirrorSelectionStart:m,mirrorSelectionEnd:f,setMirrorSelectionStart:p,setMirrorSelectionEnd:u,setInputRef:y,handleChange:k,handleFocus:x,handleBlur:C,handleKeyDown:S,handleKeyPress:v,handlePaste:w,stepValues:e.stepValues})},pl=h.createContext({active:!1,focusNextInput:()=>{},setInputRef:()=>{},handleSubmitEditing:()=>{},getReturnKeyType:()=>"next"}),df=()=>h.useContext(pl),gf=({children:e,autoFocus:o=!1,initFocus:t,onChange:n=()=>{},...a})=>{const l=Ee.useFormikContext();h.useEffect(()=>{n(l.values)},[l.values]);const c=h.useRef({}),s=h.useRef([]),d=(u,y)=>{c.current[u]=y,y&&!s.current.includes(u)&&s.current.push(u)},g=u=>{var y,k;if(o){const C=s.current.indexOf(u)+1;C<s.current.length?(y=c.current[s.current[C]])==null||y.focus():(k=l.submitForm)==null||k.call(l)}},m={active:o,focusNextInput:g,setInputRef:d,handleSubmitEditing:g,getReturnKeyType:u=>s.current.indexOf(u)===s.current.length-1?"done":"next"};h.useEffect(()=>{var u,y;o&&(t&&c.current[t]?(u=c.current[t])==null||u.focus():s.current[0]&&((y=c.current[s.current[0]])==null||y.focus()))},[o,t]);const p=typeof document<"u"&&typeof document.createElement=="function"?{onSubmit:l.handleSubmit,onReset:l.handleReset}:{};return r.jsx(pl.Provider,{value:m,children:r.jsx(i.Form,{...a,...p,children:e})})},hf=e=>{switch(e){case"email":return{autoCorrect:"off",inputMode:"email",autoCapitalize:"none"};case"password":return{autoCorrect:"off",secureTextEntry:!0,autoCapitalize:"none"};case"digits":return{inputMode:"tel"};case"numeric":return{inputMode:"numeric"};case"name":return{autoCorrect:"off"};default:return{}}},xe=({name:e,type:o,...t},n={})=>{const a=df(),{touched:l,errors:c,submitCount:s,values:d,setFieldTouched:g,setFieldValue:m}=Ee.useFormikContext(),f=b=>{var I;m(e,b),(I=t.onChangeText)==null||I.call(t,b)},p=b=>{var I;m(e,b),(I=t.onChange)==null||I.call(t,b)},u=()=>{g(e,!0)},y=b=>{b.key==="Enter"&&(b.preventDefault(),a.focusNextInput(e))},k=["text","password","email","digits"].includes(o),x=Ee.getIn(l,e)||s>0?Ee.getIn(c,e):void 0,C=Ee.getIn(d,e),S=typeof document<"u"&&typeof document.createElement=="function",w=!!n.focusable&&a.active,v=w?S?{onKeyPress:y}:{returnKeyType:a.getReturnKeyType(e),onSubmitEditing:()=>a.handleSubmitEditing(e),blurOnSubmit:!1}:{};return{...hf(o),...t,value:C,error:x,onBlur:u,...k?{onChangeText:f}:{onChange:p},...v,...w?{inputRef:b=>a.setInputRef(e,b)}:{}}},ff=e=>{let{value:o,...t}=xe(e);t.isChecked=o;const n=La(e);return r.jsx(Ba,{...n,...t})},mf=e=>{let{value:o,...t}=xe(e);t.isChecked=o===e.value;const n=Oa(e);return r.jsx(Na,{...n,...t})},ul=e=>{const{value:o,onChange:t,onSubmit:n,autoFocus:a=!0,loading:l=!1,disabled:c=!1,isAgentRunning:s=!1,onStopAgent:d,sandboxId:g,onUploadProgress:m,onUploadSuccess:f,onUploadError:p,onFileUpload:u}=e,y=o!==void 0&&t!==void 0,[k,x]=h.useState(""),C=y?o:k,[S,w]=h.useState([]),[v,b]=h.useState([]),[I,T]=h.useState(!1),[j,E]=h.useState(0),[D,W]=h.useState([]),[A,H]=h.useState(!1),z=h.useRef(null),[P,V]=h.useState(!1),[M,L]=h.useState("gpt-4"),[_]=h.useState([{id:"gpt-3.5-turbo",name:"GPT-3.5"},{id:"gpt-4",name:"GPT-4"},{id:"gpt-4-thinking",name:"GPT-4 (Thinking)",isThinking:!0},{id:"claude-3-5-sonnet",name:"Claude 3.5 Sonnet"}]),O=h.useRef(null),N=h.useRef(null),U=h.useRef(null),[X,oe]=h.useState(e.showGuideTip||!1);h.useEffect(()=>{a&&O.current&&O.current.focus()},[a]),h.useEffect(()=>()=>{S.forEach(te=>{})},[S]);const B=te=>{y&&t?t(te):x(te)},$=te=>{const ae=U.current;if(ae&&typeof Event<"u"){ae.value=te,ae.dispatchEvent(new Event("input",{bubbles:!0}));return}B(te)},q=te=>{if(te.preventDefault(),!C.trim()&&S.length===0||l||c&&!s)return;if(s&&d){d();return}let ae=C;if(S.length>0){const Q=S.map(R=>`[Uploaded File: ${URL.createObjectURL(R)}}]`).join(`
24
- `);ae=ae?`${ae}
23
+ `;function Oo(e,o){try{e.insertRule(o)}catch{console.error("input-otp could not insert CSS rule:",o)}}const Al=({id:e,name:o,label:t,value:n="",length:a=6,onChange:l,onChangeText:i,onComplete:g,helperText:s,placeholder:d="",shadow:f,views:u={},size:m="md",shape:p="rounded",variant:y="outline",gap:x=8,type:b="text",error:C=!1,isFocused:k=!1,isHovered:S=!1,isDisabled:T=!1,isReadOnly:w=!1,isAutoFocus:F=!1,setValue:v,setIsFocused:z,setIsHovered:j,inputRef:H,containerRef:E,mirrorSelectionStart:M,mirrorSelectionEnd:I,setMirrorSelectionStart:W,setMirrorSelectionEnd:D,handlePaste:V,handleChange:P,handleFocus:_,handleBlur:q,handleKeyDown:N,handleKeyPress:G,secureTextEntry:X,stepValues:$,setInputRef:O,onBlur:B=()=>{},onClick:L=()=>{},onFocus:U=()=>{},onKeyPress:K,pattern:J,pasteTransformer:ne,...re})=>{c.useTheme();const ce=h.useId(),Q=e??o??ce,le=!!t,he=h.useMemo(()=>({slots:Array.from({length:a}).map((de,ie)=>{const ge=k&&M!==null&&I!==null&&(M===I&&ie===M||ie>=M&&ie<I),oe=n[ie]!==void 0?n[ie]:null,fe=n[0]!==void 0?null:(d==null?void 0:d[ie])??null;return{char:oe,placeholderChar:fe,isActive:ge,hasFakeCaret:ge&&oe===null}}),isFocused:k,isHovering:!T&&S}),[k,S,T,a,I,M,d,n]);h.useEffect(()=>{F&&H.current&&H.current.focus()},[F,H]),h.useEffect(()=>{if(!document.getElementById("input-otp-style")){const de=document.createElement("style");if(de.id="input-otp-style",document.head.appendChild(de),de.sheet){const ie="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Oo(de.sheet,"@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }"),Oo(de.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Oo(de.sheet,`[data-input-otp]:autofill { ${ie} }`),Oo(de.sheet,`[data-input-otp]:-webkit-autofill { ${ie} }`),Oo(de.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Oo(de.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}},[]);const ue=()=>r.jsx(c.Horizontal,{gap:x,width:"100%",justifyContent:"center",minHeight:m==="xs"?"32px":m==="sm"?"36px":m==="md"?"40px":m==="lg"?"48px":"56px",...u.container,children:he.slots.map((de,ie)=>r.jsxs(co,{size:m,error:C,shape:p,views:u,variant:y,value:de.char||"",color:"theme-primary",isHovered:S,isDisabled:T,isReadOnly:w,isFocused:de.isActive,showLabel:!1,onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),justifyContent:"center",alignItems:"center",width:"100%",position:"relative",height:m==="xs"?"32px":m==="sm"?"36px":m==="md"?"40px":m==="lg"?"48px":"56px",...u.container,children:[de.char?r.jsx(c.View,{textAlign:"center",fontSize:m==="xs"?"14px":m==="sm"?"16px":m==="md"?"18px":m==="lg"?"20px":"24px",fontWeight:"medium",...u.text,children:b==="password"?"•":de.char}):de.placeholderChar?r.jsx(c.View,{textAlign:"center",fontSize:m==="xs"?"14px":m==="sm"?"16px":m==="md"?"18px":m==="lg"?"20px":"24px",color:"color-gray-400",opacity:.5,...u.text,children:de.placeholderChar}):null,de.hasFakeCaret&&r.jsx(c.View,{position:"absolute",width:"2px",height:"60%",backgroundColor:"theme-primary",animation:"blink 1s step-start infinite",style:{animationName:"blink",animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"step-start"}})]},`${e||o}-${ie}`))}),Ce={position:"absolute",inset:0,width:"100%",height:"100%",display:"flex",textAlign:"center",opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"};return r.jsxs(r.Fragment,{children:[r.jsx("noscript",{children:r.jsx("style",{children:_h})}),r.jsxs(Ze,{helperText:s,error:C,views:u,children:[le&&r.jsx(yo,{htmlFor:Q,color:"theme-primary",error:C,...u.label,children:t}),r.jsxs(c.View,{ref:E,"data-input-otp-container":!0,position:"relative",cursor:T?"default":"text",userSelect:"none",pointerEvents:"none",children:[r.jsx(Bh.Provider,{value:he,children:ue()}),r.jsx(c.View,{position:"absolute",inset:0,pointerEvents:"none",children:r.jsx(c.Input,{ref:de=>O(de),"data-input-otp":!0,"data-input-otp-placeholder-shown":n.length===0||void 0,"data-input-otp-mss":M,"data-input-otp-mse":I,id:Q,name:o,type:b==="password"?"password":"text",inputMode:b!=="password"?"numeric":void 0,pattern:"[0-9]*",maxLength:a,readOnly:w,disabled:T,placeholder:d,value:n,onChange:P,onKeyDown:N,onPaste:V,onFocus:_,onBlur:q,onClick:L,onMouseOver:()=>j(!0),onMouseLeave:()=>j(!1),autoComplete:"one-time-code","aria-label":le?void 0:`OTP input with ${a} digits`,style:Ce,...re,...u.input})})]})]})]})},Oh=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},Hl=e=>{const{value:o}=e,{value:t,setValue:n,isFocused:a,setIsFocused:l,isHovered:i,setIsHovered:g,inputRef:s,containerRef:d,mirrorSelectionStart:f,mirrorSelectionEnd:u,setMirrorSelectionStart:m,setMirrorSelectionEnd:p,setInputRef:y,handleChange:x,handleFocus:b,handleBlur:C,handleKeyDown:k,handlePaste:S,handleKeyPress:T}=El(e),F=Oh(o!==void 0?o:t);return r.jsx(Al,{...e,value:F,setValue:n,isFocused:a,setIsFocused:l,isHovered:i,setIsHovered:g,inputRef:s,containerRef:d,mirrorSelectionStart:f,mirrorSelectionEnd:u,setMirrorSelectionStart:m,setMirrorSelectionEnd:p,setInputRef:y,handleChange:x,handleFocus:b,handleBlur:C,handleKeyDown:k,handleKeyPress:T,handlePaste:S,stepValues:e.stepValues})},Vl=h.createContext({active:!1,focusNextInput:()=>{},setInputRef:()=>{},handleSubmitEditing:()=>{},getReturnKeyType:()=>"next"}),Nh=()=>h.useContext(Vl),qh=({children:e,autoFocus:o=!1,initFocus:t,onChange:n=()=>{},...a})=>{const l=Oe.useFormikContext();h.useEffect(()=>{n(l.values)},[l.values]);const i=h.useRef({}),g=h.useRef([]),s=(p,y)=>{i.current[p]=y,y&&!g.current.includes(p)&&g.current.push(p)},d=p=>{var y,x;if(o){const C=g.current.indexOf(p)+1;C<g.current.length?(y=i.current[g.current[C]])==null||y.focus():(x=l.submitForm)==null||x.call(l)}},f={active:o,focusNextInput:d,setInputRef:s,handleSubmitEditing:d,getReturnKeyType:p=>g.current.indexOf(p)===g.current.length-1?"done":"next"};h.useEffect(()=>{var p,y;o&&(t&&i.current[t]?(p=i.current[t])==null||p.focus():g.current[0]&&((y=i.current[g.current[0]])==null||y.focus()))},[o,t]);const m=typeof document<"u"&&typeof document.createElement=="function"?{onSubmit:l.handleSubmit,onReset:l.handleReset}:{};return r.jsx(Vl.Provider,{value:f,children:r.jsx(c.Form,{...a,...m,children:e})})},Uh=e=>{switch(e){case"email":return{autoCorrect:"off",inputMode:"email",autoCapitalize:"none"};case"password":return{autoCorrect:"off",secureTextEntry:!0,autoCapitalize:"none"};case"digits":return{inputMode:"tel"};case"numeric":return{inputMode:"numeric"};case"name":return{autoCorrect:"off"};default:return{}}},ze=({name:e,type:o,...t},n={})=>{const a=Nh(),{touched:l,errors:i,submitCount:g,values:s,setFieldTouched:d,setFieldValue:f}=Oe.useFormikContext(),u=w=>{var F;f(e,w),(F=t.onChangeText)==null||F.call(t,w)},m=w=>{var F;f(e,w),(F=t.onChange)==null||F.call(t,w)},p=()=>{d(e,!0)},y=w=>{w.key==="Enter"&&(w.preventDefault(),a.focusNextInput(e))},x=["text","password","email","digits"].includes(o),b=Oe.getIn(l,e)||g>0?Oe.getIn(i,e):void 0,C=Oe.getIn(s,e),k=typeof document<"u"&&typeof document.createElement=="function",S=!!n.focusable&&a.active,T=S?k?{onKeyPress:y}:{returnKeyType:a.getReturnKeyType(e),onSubmitEditing:()=>a.handleSubmitEditing(e),blurOnSubmit:!1}:{};return{...Uh(o),...t,value:C,error:b,onBlur:p,...x?{onChangeText:u}:{onChange:m},...T,...S?{inputRef:w=>a.setInputRef(e,w)}:{}}},Gh=e=>{let{value:o,...t}=ze(e);t.isChecked=o;const n=al(e);return r.jsx(il,{...n,...t})},Yh=e=>{let{value:o,...t}=ze(e);t.isChecked=o===e.value;const n=cl(e);return r.jsx(sl,{...n,...t})},Pl=e=>{const{value:o,onChange:t,onSubmit:n,autoFocus:a=!0,loading:l=!1,disabled:i=!1,isAgentRunning:g=!1,onStopAgent:s,sandboxId:d,onUploadProgress:f,onUploadSuccess:u,onUploadError:m,onFileUpload:p}=e,y=o!==void 0&&t!==void 0,[x,b]=h.useState(""),C=y?o:x,[k,S]=h.useState([]),[T,w]=h.useState([]),[F,v]=h.useState(!1),[z,j]=h.useState(0),[H,E]=h.useState([]),[M,I]=h.useState(!1),W=h.useRef(null),[D,V]=h.useState(!1),[P,_]=h.useState("gpt-4"),[q]=h.useState([{id:"gpt-3.5-turbo",name:"GPT-3.5"},{id:"gpt-4",name:"GPT-4"},{id:"gpt-4-thinking",name:"GPT-4 (Thinking)",isThinking:!0},{id:"claude-3-5-sonnet",name:"Claude 3.5 Sonnet"}]),N=h.useRef(null),G=h.useRef(null),X=h.useRef(null),[$,O]=h.useState(e.showGuideTip||!1);h.useEffect(()=>{a&&N.current&&N.current.focus()},[a]),h.useEffect(()=>()=>{k.forEach(ie=>{})},[k]);const B=ie=>{y&&t?t(ie):b(ie)},L=ie=>{const ge=X.current;if(ge&&typeof Event<"u"){ge.value=ie,ge.dispatchEvent(new Event("input",{bubbles:!0}));return}B(ie)},U=ie=>{if(ie.preventDefault(),!C.trim()&&k.length===0||l||i&&!g)return;if(g&&s){s();return}let ge=C;if(k.length>0){const Z=k.map(te=>`[Uploaded File: ${URL.createObjectURL(te)}}]`).join(`
24
+ `);ge=ge?`${ge}
25
25
 
26
- ${Q}`:Q}let ce=M,ye=!1;M.endsWith("-thinking")&&(ce=M.replace(/-thinking$/,""),ye=!0),n==null||n(ae,{model_name:ce,enable_thinking:ye}),y||x(""),w([]),b([])},J=te=>{w(ae=>ae.filter((ce,ye)=>ye!==te)),!g&&v.length>te&&b(ae=>ae.filter((ce,ye)=>ye!==te))},Y=te=>{te.preventDefault(),te.stopPropagation(),V(!0)},Z=te=>{te.preventDefault(),te.stopPropagation(),V(!1)},ee=h.useCallback(te=>{!te||te.length===0||(b(ae=>[...ae,...te]),w(ae=>[...ae,...te]),W(ae=>[...ae,...te]),T(!0))},[b,w]),ne=h.useCallback(()=>{if(D.length>0&&!A&&u){H(!0);const te=D[0];z.current=te,E(0),m==null||m(0);try{u(te),W(ae=>ae.slice(1)),H(!1),z.current=null,E(100),m==null||m(100),f==null||f({file:te})}catch(ae){W(ce=>ce.slice(1)),H(!1),z.current=null,E(0),T(ce=>D.length-1>0||!1),p==null||p(ae)}}else D.length===0&&I&&(T(!1),E(0))},[D,A,u,I,p,m,f]);h.useEffect(()=>{ne()},[D,A,ne]);const K="active",re=te=>!0,ie=()=>{oe(!1),e.onGuideClose&&e.onGuideClose()},ge=te=>{y&&t?t(te.text):x(te.text),e.onPromptExampleSelect&&e.onPromptExampleSelect(te),O.current&&O.current.focus()},We=h.useCallback(()=>v,[v]),le=h.useCallback(()=>b([]),[]);return{onSubmit:n,getPendingFiles:We,clearPendingFiles:le,value:C,handleChange:B,setValue:$,handleSubmit:q,editableRef:O,fileInputRef:N,hiddenInputRef:U,isUploading:I,uploadProgress:j,isDraggingOver:P,uploadedFiles:S,pendingFiles:v,removeUploadedFile:J,setPendingFiles:b,setUploadedFiles:w,setIsUploading:T,startUpload:ee,selectedModel:M,handleModelChange:L,modelOptions:_,subscriptionStatus:K,canAccessModel:re,handleDragOver:Y,handleDragLeave:Z,isGuideTipShown:X,hideGuideTip:ie,handlePromptExampleSelect:ge}},pf={attachmentRemove:{position:"absolute",top:"2px",right:"2px",width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"color-black-900",color:"white",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",zIndex:1}},yl={container:{width:"100%",maxWidth:"100%",borderRadius:"12px",backgroundColor:"color-white",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},content:{width:"100%",padding:"12px",borderRadius:"12px",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},uf={default:{borderRadius:"8px"},square:{borderRadius:"0px"},rounded:{borderRadius:"8px"}},yf={xs:{fontSize:"10px",padding:"4px 8px"},sm:{fontSize:"12px",padding:"6px 10px"},md:{fontSize:"14px",padding:"8px 12px"},lg:{fontSize:"16px",padding:"10px 14px"},xl:{fontSize:"20px",padding:"12px 16px"}},bf={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"},none:{backgroundColor:"transparent",border:"none"}},bl=e=>`${e}-${Math.random().toString(36).substring(2,9)}`,xf=({openDelay:e=200,closeDelay:o=300}={})=>{const[t,n]=h.useState(!1),a=h.useRef(null),l=h.useRef(null),c=h.useRef(null),s=h.useRef(null),d=h.useMemo(()=>bl("hovercard-content"),[]),g=h.useMemo(()=>bl("hovercard-trigger"),[]),m=h.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null),l.current&&(clearTimeout(l.current),l.current=null)},[]),f=h.useCallback(()=>{m(),t||(a.current=setTimeout(()=>{n(!0)},e))},[t,e,m]),p=h.useCallback(()=>{m(),t&&(l.current=setTimeout(()=>{n(!1)},o))},[t,o,m]),u=h.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null)},[]);return h.useEffect(()=>()=>m(),[m]),{isOpen:t,openCard:f,closeCard:p,cancelCloseTimer:u,triggerRef:c,contentRef:s,contentId:d,triggerId:g}},xl=h.createContext({isOpen:!1,openCard:()=>{},closeCard:()=>{},cancelCloseTimer:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),kf=({children:e,value:o})=>r.jsx(xl.Provider,{value:o,children:e}),kl=()=>{const e=h.useContext(xl);if(!e)throw new Error("useHoverCardContext must be used within a HoverCardProvider");return e},Cf=({children:e,views:o,asChild:t=!1,...n})=>{const{openCard:a,closeCard:l,triggerRef:c,contentId:s,triggerId:d}=kl(),u={ref:c,onMouseEnter:()=>a(),onMouseLeave:()=>l(),onFocus:()=>a(),onBlur:()=>l(),id:d,"aria-describedby":s,...o==null?void 0:o.container,...n};if(t&&h.isValidElement(e)){const y=h.Children.only(e);return h.cloneElement(y,{...u,...y.props})}return r.jsx(i.View,{position:"relative",display:"inline-block",...u,children:e})},wf=({children:e,views:o,side:t="bottom",align:n="center",sideOffset:a=8,style:l,backgroundColor:c="color-white",borderRadius:s="4px",boxShadow:d="0px 2px 8px rgba(0, 0, 0, 0.15)",padding:g="12px",minWidth:m="50px",maxWidth:f="300px",...p})=>{const{isOpen:u,cancelCloseTimer:y,closeCard:k,contentRef:x,triggerRef:C,contentId:S,triggerId:w}=kl(),{ref:v,relation:b}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0});h.useEffect(()=>{C!=null&&C.current&&(v==null?void 0:v.current)!==C.current&&v&&(v.current=C.current)},[C,v,u]);const I=()=>y(),T=()=>k();if(!u)return null;const j=()=>{if(!b||!(C!=null&&C.current))return{position:"absolute",top:0,left:0,zIndex:1e3};const W=C.current.getBoundingClientRect();let A=t;t==="bottom"&&b.space.vertical==="top"?A="top":t==="top"&&b.space.vertical==="bottom"?A="bottom":t==="right"&&b.space.horizontal==="left"?A="left":t==="left"&&b.space.horizontal==="right"&&(A="right");let H=0,z=0;switch(A){case"bottom":H=W.left+W.width/2,z=W.bottom+a;break;case"top":H=W.left+W.width/2,z=W.top-a;break;case"right":H=W.right+a,z=W.top+W.height/2;break;case"left":H=W.left-a,z=W.top+W.height/2;break}return{position:"fixed",left:H,top:z,zIndex:1e3,transform:E(A)}},E=W=>{switch(W){case"bottom":return"translate(-50%, 0)";case"top":return"translate(-50%, -100%)";case"right":return"translate(0, -50%)";case"left":return"translate(-100%, -50%)";default:return"translate(-50%, 0)"}},D=j();return r.jsx(i.View,{ref:x,id:S,role:"tooltip","aria-labelledby":w,onMouseEnter:I,onMouseLeave:T,backgroundColor:c,borderRadius:s,boxShadow:d,padding:g,minWidth:m,maxWidth:f,style:{...D,...l},...o==null?void 0:o.container,...p,children:e})},Me=({children:e,views:o,openDelay:t,closeDelay:n,...a})=>{const l=xf({openDelay:t,closeDelay:n});return r.jsx(kf,{value:l,children:r.jsx(i.View,{position:"relative",display:"inline-block",...o==null?void 0:o.container,...a,children:e})})};Me.Trigger=Cf,Me.Content=wf;const Sf=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:c={}})=>{if(e.length===0)return null;const s=h.useCallback(g=>g<1024?`${g} B`:g<1024*1024?`${(g/1024).toFixed(1)} KB`:`${(g/(1024*1024)).toFixed(1)} MB`,[]),d=h.useCallback(g=>g.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:g.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:g.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...c==null?void 0:c.container,children:e.map((g,m)=>{const f=(g==null?void 0:g.path)||(g==null?void 0:g.url)||(l?URL.createObjectURL(g):""),p=g.type.startsWith("image/"),u=g.type.startsWith("video/"),y=g.type.startsWith("audio/"),k=d(g);return l?r.jsx(i.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...c==null?void 0:c.item,children:l&&r.jsxs(Me,{children:[r.jsxs(Me.Trigger,{children:[p&&r.jsx(i.Image,{src:f,alt:g.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),u&&r.jsx(i.View,{as:"video",src:f,alt:g.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Fo,{widthHeight:24,color:"color-black"})}),!p&&!u&&!y&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(go,{widthHeight:24,color:"color-black"})}),t&&r.jsx(i.Button,{...pf.attachmentRemove,onClick:x=>{x.stopPropagation(),t(m)},"aria-label":`Remove ${g.name}`,children:"×"})]}),r.jsxs(Me.Content,{children:[p&&r.jsx(i.Image,{src:f,alt:g.name,maxWidth:"100%"}),u&&r.jsx(i.View,{as:"video",src:f,controls:!0,maxWidth:"100%"}),y&&r.jsx(i.View,{as:"audio",src:f,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",...c==null?void 0:c.name,children:[g.name," (",s(g.size),")"]})]})]})},m):r.jsxs(i.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...c==null?void 0:c.item,children:[r.jsx(i.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:k.backgroundColor,color:k.color,children:y?r.jsx(Fo,{widthHeight:12,color:"currentColor"}):r.jsx(go,{widthHeight:12,color:"currentColor"})}),r.jsxs(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...c==null?void 0:c.name,children:[g.name," · ",s(g.size)]}),t&&r.jsx(i.View,{as:"button",type:"button",onClick:()=>t(m),"aria-label":`Remove ${g.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},m)})})},Cl=typeof window<"u"?h.useLayoutEffect:h.useEffect,wl=h.forwardRef(({value:e,onChange:o,placeholder:t="Type your message...",disabled:n=!1,autoFocus:a=!0,suggestions:l=[],onSuggestionSelect:c,showSuggestions:s=!1,mentionData:d=[],mentionTrigger:g="@",onMentionSelect:m,onKeyDown:f,maxHeight:p="200px",minHeight:u="40px",name:y,id:k,hiddenInput:x=!0,hiddenInputRef:C,views:S={}},w)=>{var ce,ye;const v=h.useRef(e),[b,I]=h.useState(-1),[T,j]=h.useState(!e),E=h.useRef(null),[D,W]=h.useState(!1),[A,H]=h.useState(!1),[z,P]=h.useState(""),[V,M]=h.useState(-1),[L,_]=h.useState(-1),[O,N]=h.useState([]),{ref:U,relation:X}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[oe,B]=h.useState({x:0,y:0}),[$,q]=h.useState({x:0,y:0}),J=h.useRef(null),Y=h.useCallback(Q=>{J.current=Q,typeof C=="function"?C(Q):C&&(C.current=Q)},[C]),Z=h.useCallback(Q=>{J.current&&J.current.value!==Q&&(J.current.value=Q)},[]);Cl(()=>{const Q=w;Q!=null&&Q.current&&e!==v.current&&(Q.current.textContent=e,v.current=e,j(!e)),Z(e)},[e,w,Z]);const ee=h.useCallback(Q=>{if(Q===v.current)return;const R=w;R!=null&&R.current&&R.current.textContent!==Q&&(R.current.textContent=Q),v.current=Q,j(!Q),Z(Q),o(Q)},[o,w,Z]);Cl(()=>{const Q=J.current;if(!Q)return;const R=()=>ee(Q.value);return Q.addEventListener("input",R),Q.addEventListener("change",R),()=>{Q.removeEventListener("input",R),Q.removeEventListener("change",R)}},[ee,x]),h.useEffect(()=>{a&&w&&typeof w=="object"&&w.current&&w.current.focus()},[a,w]);const ne=()=>{const Q=window.getSelection();if(!Q||Q.rangeCount===0)return-1;const R=Q.getRangeAt(0),be=R.cloneRange();return be.selectNodeContents(w&&typeof w=="object"&&w.current?w.current:document.body),be.setEnd(R.endContainer,R.endOffset),be.toString().length},K=h.useCallback((Q,R)=>{const be=Q.substring(0,R),Ie=be.lastIndexOf(g);if(Ie!==-1){const ve=be.substring(Ie+1);if(!ve.includes(" ")){const co=ve.toLowerCase(),so=d.filter(Qe=>Qe.name.toLowerCase().includes(co));P(co),M(Ie),N(so),H(so.length>0),_(0);const So=re();B(So);return}}H(!1),P(""),M(-1),_(-1)},[d,g]);h.useEffect(()=>{E.current&&U&&(U.current=E.current)},[E,U]);const re=h.useCallback((Q=200)=>{if(!E.current)return{x:0,y:0};const R=E.current.getBoundingClientRect();if(X){const Je=X.space.vertical==="top";return{x:R.left,y:Je?R.top-Q-8:R.bottom+8}}const be=window.innerHeight,Ie={top:R.top,bottom:be-R.bottom},ve=Ie.bottom<Q+8&&Ie.top>Ie.bottom;return{x:R.left,y:ve?R.top-Q-8:R.bottom+8}},[X]),ie=h.useCallback(()=>{W(!0);const Q=re();q(Q)},[re]),ge=h.useCallback(()=>{setTimeout(()=>{W(!1),I(-1)},150)},[]),We=Q=>{const R=Q.currentTarget.textContent||"";if(R!==v.current){o(R),v.current=R,Z(R),j(!R);const be=ne();K(R,be)}},le=h.useCallback(Q=>{if(w&&typeof w=="object"&&w.current){const R=w.current.textContent||"",be=R.substring(0,V),Ie=R.substring(V+g.length+z.length),ve=be+g+Q.name+" "+Ie;o(ve),v.current=ve,Z(ve),w.current.textContent=ve;const Je=be.length+g.length+Q.name.length+1;setTimeout(()=>{var co;if(w.current){const so=document.createRange(),So=window.getSelection(),Qe=w.current.firstChild;Qe&&So&&(so.setStart(Qe,Math.min(Je,((co=Qe.textContent)==null?void 0:co.length)||0)),so.collapse(!0),So.removeAllRanges(),So.addRange(so))}},0)}H(!1),P(""),M(-1),_(-1),m&&m(Q)},[V,g,z,o,m,w,Z]),te=h.useCallback(Q=>{c&&c(Q),I(-1)},[c]),ae=Q=>{if(!(f&&(f(Q),Q.defaultPrevented))){if(A&&O.length>0){if(Q.key==="ArrowDown"){Q.preventDefault(),_(R=>R<O.length-1?R+1:0);return}if(Q.key==="ArrowUp"){Q.preventDefault(),_(R=>R>0?R-1:O.length-1);return}if((Q.key==="Tab"||Q.key==="Enter")&&L>=0){Q.preventDefault(),le(O[L]);return}if(Q.key==="Escape"){H(!1),_(-1);return}}if(s&&l.length>0){if(Q.key==="ArrowDown"){Q.preventDefault(),I(R=>R<l.length-1?R+1:0);return}if(Q.key==="ArrowUp"){Q.preventDefault(),I(R=>R>0?R-1:l.length-1);return}if(Q.key==="Tab"&&b>=0){Q.preventDefault(),te(l[b]);return}if(Q.key==="Escape"){I(-1);return}}}};return r.jsxs(i.View,{ref:E,width:"100%",position:"relative",...S==null?void 0:S.container,children:[r.jsxs(i.View,{width:"100%",minHeight:u,maxHeight:p,overflowY:"auto",position:"relative",children:[T&&r.jsx(i.Text,{position:"absolute",top:"8px",left:"8px",color:"color-gray-400",pointerEvents:"none",fontSize:"14px",zIndex:1,...S==null?void 0:S.placeholder,children:t}),r.jsx(i.View,{as:"div",ref:w,contentEditable:!n,suppressContentEditableWarning:!0,onInput:We,onKeyDown:ae,onFocus:ie,onBlur:ge,role:"textbox","aria-multiline":"true","aria-placeholder":t,width:"100%",minHeight:"24px",padding:"8px",outline:"none",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"14px",color:"color-gray-900",backgroundColor:"transparent",...S==null?void 0:S.input})]}),x&&r.jsx(i.View,{as:"textarea",ref:Y,id:k,name:y,defaultValue:e,disabled:n,tabIndex:-1,"aria-hidden":"true","data-editable-input-mirror":"true",opacity:0,width:1,height:1,padding:0,border:"none",resize:"none",overflow:"hidden",position:"absolute",bottom:0,left:0,pointerEvents:"none",...S==null?void 0:S.hiddenInput}),A&&O.length>0&&r.jsx(i.View,{position:"fixed",left:oe.x,top:oe.y,width:((ce=E.current)==null?void 0:ce.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-blue-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9999,maxHeight:"200px",overflowY:"auto",...S==null?void 0:S.mentionContainer,children:r.jsxs(i.Vertical,{gap:0,children:[O.map((Q,R)=>r.jsx(i.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:R===L?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>le(Q),onMouseEnter:()=>_(R),_hover:{backgroundColor:"color-blue-50"},...S==null?void 0:S.mentionItem,children:r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:[g,Q.name]}),Q.description&&r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",children:Q.description})]})},Q.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Mentions (Trigger: ",g,")",X&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",X.space.vertical,"-",X.space.horizontal]})]})]})}),s&&l.length>0&&!A&&D&&!e&&r.jsx(i.View,{position:"fixed",left:$.x,top:$.y,width:((ye=E.current)==null?void 0:ye.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-green-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9998,maxHeight:"200px",overflowY:"auto",...S==null?void 0:S.suggestionsContainer,children:r.jsxs(i.Vertical,{gap:0,children:[l.map((Q,R)=>r.jsx(i.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:R===b?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>te(Q),onMouseEnter:()=>I(R),_hover:{backgroundColor:"color-blue-50"},...S==null?void 0:S.suggestionItem,children:r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:Q.text}),Q.description&&r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",children:Q.description})]})},Q.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Suggestions (Focus-triggered)",X&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",X.space.vertical,"-",X.space.horizontal]})]})]})})]})});wl.displayName="EditableInput";const vf=({examples:e,onSelect:o,views:t={}})=>{const{getColor:n}=i.useTheme();return!e||e.length===0?null:r.jsx(i.Horizontal,{gap:8,overflowX:"auto",padding:"8px 0",width:"100%",...t==null?void 0:t.container,children:e.map(a=>r.jsx(i.View,{as:"button",type:"button",padding:"8px 12px",borderRadius:"9999px",backgroundColor:"color-white",border:"1px solid #E2E8F0",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",onClick:()=>o(a),_hover:{backgroundColor:"#F8FAFC",borderColor:"#CBD5E1"},...t==null?void 0:t.item,children:r.jsx(i.Text,{fontSize:"14px",color:"color-gray-700",...t==null?void 0:t.text,children:a.text})},a.id))})},Tf=({onRecordingComplete:e,onRecordingStart:o,views:t={}})=>{const{recording:n,paused:a,audioBlob:l,analyserNode:c,startRecording:s,stopRecording:d}=ta();h.useEffect(()=>{if(l){const m=new File([l],`recording-${Date.now()}.webm`,{type:l.type||"audio/webm;codecs=opus"});e(m)}},[l]);const g=h.useCallback(()=>{s(),o==null||o()},[]);return r.jsxs(i.Horizontal,{alignItems:"center",gap:4,children:[r.jsx(i.View,{minWidth:90,children:n&&c&&r.jsx(vt,{analyserNode:c,isPaused:a})}),r.jsx(i.View,{as:"button",type:"button",onClick:n?d:g,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n?"theme-error":"color-gray-100",color:n?"color-white":"color-gray-600",borderRadius:"50%",border:"none",cursor:"pointer",_hover:{backgroundColor:n?"color-red-600":"color-gray-200"},...t.button,children:n?r.jsx(wr,{widthHeight:16,color:"currentColor",filled:!1}):r.jsx(ut,{widthHeight:16,color:"currentColor",filled:!1})})]})},Sl=h.memo(({onSubmit:e,placeholder:o="Type your message… use @ to mention",loading:t=!1,disabled:n=!1,isDisabled:a,rightElement:l,onKeyDown:c,isAgentRunning:s=!1,enableAudioRecording:d=!1,leftButtons:g,rightButtons:m,onStopAgent:f,loadingText:p="Agent is working...",autoFocus:u=!0,sandboxId:y,hideAttachments:k=!1,attachmentText:x="",promptExamples:C=[],suggestions:S=[],errorMessage:w,size:v="md",shape:b="rounded",variant:I="default",views:T={},mentionData:j=[],mentionTrigger:E="@",onMentionSelect:D,onAudioRecordingStart:W,onAudioRecordingStop:A,showGuideTip:H,guideVideoUrl:z,onGuideClose:P,onFileBrowse:V,onUploadProgress:M,onUploadSuccess:L,onUploadError:_,onFileUpload:O,onPromptExampleSelect:N,name:U,hiddenInput:X=!0,value:oe,handleChange:B,setValue:$,handleSubmit:q,editableRef:J,fileInputRef:Y,hiddenInputRef:Z,isUploading:ee,uploadProgress:ne,isDraggingOver:K,uploadedFiles:re,pendingFiles:ie,getPendingFiles:ge,clearPendingFiles:We,removeUploadedFile:le,setPendingFiles:te,setUploadedFiles:ae,setIsUploading:ce,startUpload:ye,selectedModel:Q,handleModelChange:R,modelOptions:be,subscriptionStatus:Ie,canAccessModel:ve,isGuideTipShown:Je,hideGuideTip:co,handlePromptExampleSelect:so,handleDragOver:So,handleDragLeave:Qe,onChange:Lk,...Sb})=>{i.useTheme();const Hc=h.useMemo(()=>({...yl.container,...uf[b],...T==null?void 0:T.container}),[b,T==null?void 0:T.container]),vb=h.useMemo(()=>({...yl.content,...yf[v],...bf[I],...T==null?void 0:T.content}),[v,I,T==null?void 0:T.content]),br=((oe==null?void 0:oe.trim().length)??0)>0||re.length>0,Tb=h.useCallback(Ce=>{ye([Ce]),A==null||A(Ce)},[ye,A]),Vn=h.useCallback(Ce=>{const Ko=Ce.filter(jc=>jc.size>52428800?(console.error(`File size exceeds 50MB limit: ${jc.name}`),!1):!0);Ko.length>0&&ye(Ko)},[ye]),Ib=h.useCallback(Ce=>{if(Ce.preventDefault(),Ce.stopPropagation(),Qe(Ce),Ce.dataTransfer.files.length>0){const Ko=Array.from(Ce.dataTransfer.files);Vn(Ko)}},[Qe,Vn]),Fb=h.useMemo(()=>[...j||[],...re.map((Ce,Ko)=>({id:`file-${Ko}`,name:Ce.name}))],[j,re]);return r.jsxs(i.View,{display:"flex",flexDirection:"column",boxSizing:"border-box",...Hc,...Sb,onDragOver:So,onDragLeave:Qe,onDrop:Ib,children:[C.length>0&&r.jsx(vf,{examples:C,onSelect:so,views:{container:T==null?void 0:T.promptExamples,item:T==null?void 0:T.promptExampleItem}}),s&&r.jsxs(i.Horizontal,{justifyContent:"center",alignItems:"center",gap:8,padding:"8px 0",animate:{from:{opacity:0,y:-10},to:{opacity:1,y:0},duration:"0.3s"},...T==null?void 0:T.loadingIndicator,children:[r.jsx(bt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(i.Text,{color:"color-gray-500",children:p})]}),r.jsx(i.View,{position:"relative",width:"100%",overflow:"visible",children:r.jsxs(i.View,{as:"form",onSubmit:q,overflow:"visible",display:"flex",flexDirection:"column",position:"relative",...vb,...Hc,paddingHorizontal:16,paddingVertical:10,backgroundColor:K?"color-blue-50":void 0,children:[r.jsx(Sf,{files:re,sandboxId:y,onRemove:le,showPreviews:!0,views:{container:T==null?void 0:T.attachments,item:T==null?void 0:T.attachmentItem,name:T==null?void 0:T.attachmentName,size:T==null?void 0:T.attachmentSize,removeButton:T==null?void 0:T.attachmentRemove}}),r.jsx(wl,{ref:J,value:oe||"",onChange:B,placeholder:o,disabled:n&&!s,autoFocus:u,onKeyDown:c,suggestions:S||[],showSuggestions:S&&S.length>0&&!oe,onSuggestionSelect:Ce=>{B(Ce.text)},mentionData:Fb,mentionTrigger:E,onMentionSelect:D,name:U,hiddenInput:X,hiddenInputRef:Z,views:{container:{},input:T==null?void 0:T.editableInput,hiddenInput:T==null?void 0:T.hiddenInput}}),r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",marginTop:"8px",children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[!k&&r.jsx(i.View,{display:"contents",onClickCapture:V?Ce=>{Ce.target.tagName==="INPUT"&&V()}:void 0,children:r.jsx(Ir,{accept:"*/*",icon:r.jsx(Xo,{widthHeight:16}),maxSize:50*1024*1024,multiple:!0,onMultipleFileSelect:Vn,isLoading:ee,progress:ne||0,text:x,fileType:"file",renderError:({errorMessage:Ce})=>null,views:{container:{height:"36px",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},...T==null?void 0:T.fileButton}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,borderRadius:b==="rounded"?"50%":4,padding:10},textProps:{fontSize:"14px",color:"color-gray-600"},validateFile:Ce=>Ce.size>50*1024*1024?"File size exceeds 50MB limit":null})}),g]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[l,d&&r.jsx(Tf,{onRecordingStart:W,onRecordingComplete:Tb,views:{button:T==null?void 0:T.recordButton}}),r.jsx(i.View,{as:"button",type:"button",onClick:q,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:s?"theme-error":br?"theme-primary":"color-gray-300",color:"color-white",borderRadius:b==="rounded"?"50%":4,border:"none",cursor:br?"pointer":"not-allowed",disabled:!br||t||n&&!s,transition:"background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease",_hover:{opacity:br||s?.9:1},_active:{opacity:br||s?.95:1},_focusVisible:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},...T==null?void 0:T.submitButton,children:s?r.jsx(wr,{widthHeight:16,color:"currentColor",filled:!1}):t?r.jsx(eo,{type:"quarter",size:16,color:"color-white"}):r.jsx(yt,{widthHeight:16,color:"currentColor",filled:!1})}),m]})]})]})}),w&&r.jsx(i.Text,{color:"theme-error",marginTop:"4px",...T==null?void 0:T.bottomTip,children:w})]})}),If=e=>{const{name:o,onSubmit:t,...n}=e,[a,l]=h.useState([]),c=xe({name:o,type:"text"}),s=p=>{c.onChangeText&&c.onChangeText(p)},d=(p,u)=>{t?t(p,u):s(p)},g=()=>a,m=()=>l([]),f=ul({...n,value:c.value||"",onChange:s,onSubmit:d});return r.jsx(Sl,{...n,...f,name:o,value:c.value||"",onChange:s,onSubmit:d,error:c.error,getPendingFiles:g,clearPendingFiles:m})},Ff=e=>{const o=xe(e),t=qa(o);return r.jsx(Ua,{...t,...o})},zf=e=>{const o=xe(e),t=rl();return r.jsx(tl,{...t,...o})},Mf=e=>{const o=xe(e),t=Ga(e);return r.jsx(Ka,{...t,...o})},Wf=e=>{let o=xe(e);o.selected=o.value;const t=Fa({...e,value:o.value});return r.jsx(Wa,{...o,...t})},Hf=e=>{const o=xe(e),t=Ha(e);return r.jsx(Va,{...t,...o})},jf=e=>{const{name:o,...t}=e,{values:n,errors:a,touched:l,submitCount:c,setFieldValue:s,setFieldTouched:d}=Ee.useFormikContext(),g=Ee.getIn(n,o)||[],m=Ee.getIn(l,o)||c>0?Ee.getIn(a,o):void 0,f=h.useCallback(x=>{var S;const C=Array.isArray(x)?x.filter(w=>typeof w=="string"):[];s(o,C),(S=e.onTagsChange)==null||S.call(e,C)},[o,s,e.onTagsChange]),p=h.useCallback(()=>{var x;d(o,!0),(x=e.onBlur)==null||x.call(e)},[o,d,e.onBlur]),u=dl({...t,tags:g,onTagsChange:f,onBlur:p}),{tags:y,...k}=u;return r.jsx(gl,{...k,...t,tags:y,error:m})},Pf=e=>{const o=xe(e),t=Da(e);return r.jsx($a,{...t,...o})},Vf=e=>{const o=xe(e,{focusable:!0}),{value:t,...n}=Lt(e);return r.jsx(rr,{...n,...o})},Af=({visibleIcon:e=r.jsx(kt,{widthHeight:14}),hiddenIcon:o=r.jsx(xt,{widthHeight:14}),...t})=>{const n=xe(t,{focusable:!0}),{isVisible:a,setIsVisible:l,...c}=nl(n);return r.jsx(rr,{...c,type:a?"text":"password",isClearable:!1,right:r.jsx(i.View,{onClick:()=>{t.isDisabled||l(!a)},children:a?e:o})})},Ef=({items:e,placeholder:o,searchPlaceholder:t,isMulti:n=!1,...a})=>{const l=xe(a),c=ll(e,o,t);h.useEffect(()=>{if(n&&Array.isArray(l.value))c.setSelectedItems(l.value);else if(!n&&l.value){const d=typeof l.value=="object"?l.value:e.find(g=>g.value===l.value);d&&c.setSelectedItem(d)}},[l.value,n,e]);const s=d=>{l.onChange(d)};return r.jsx(sl,{...c,...l,items:e,placeholder:o,isMulti:n,onSelect:s})},Ao=(e,o,t)=>Math.min(Math.max(e,o),t),Df=(e,o,t,n,a,l,c)=>{const s=n-t;let d;if(l==="horizontal"){const g=o.width,m=e-o.left;d=Ao(m/g,0,1)}else{const g=o.height,m=o.bottom-e;d=Ao(m/g,0,1)}if(c&&c.length>0){const g=t+d*s;let m=c[0],f=Math.abs(g-m);for(let p=1;p<c.length;p++){const u=Math.abs(g-c[p]);u<f&&(f=u,m=c[p])}return m}else{const g=t+d*s,m=Math.round(g/a)*a;return Ao(m,t,n)}},vl=({min:e=0,max:o=100,step:t=1,value:n,defaultValue:a,onChange:l,onDrag:c,orientation:s="horizontal",isDisabled:d=!1,stepValues:g})=>{const m=Ao(n??a??e,e,o),[f,p]=h.useState(m),[u,y]=h.useState(!1),[k,x]=h.useState(!1),C=h.useRef(null),S=h.useRef(null),w=n!==void 0,v=n!==void 0?n:f;h.useEffect(()=>{n!==void 0&&p(Ao(n,e,o))},[n,e,o]);const b=h.useCallback(A=>{const H=Ao(A,e,o);w||p(H),l&&H!==v&&l(H),u&&c&&c(H)},[w,e,o,l,v,u,c]),I=h.useCallback(A=>{if(d||!C.current)return;const H=C.current;if(typeof H.getBoundingClientRect!="function")return;const z=H.getBoundingClientRect();let P;"touches"in A?P=s==="horizontal"?A.touches[0].clientX:A.touches[0].clientY:P=s==="horizontal"?A.clientX:A.clientY;const V=Df(P,z,e,o,t,s,g);b(V)},[e,o,t,s,b,d,g]),T=h.useCallback(A=>{if(d)return;A.preventDefault(),y(!0),I(A);const H=P=>{I(P)},z=()=>{y(!1),document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",z),document.removeEventListener("touchmove",H),document.removeEventListener("touchend",z)};typeof document>"u"||(document.addEventListener("mousemove",H),document.addEventListener("mouseup",z),document.addEventListener("touchmove",H),document.addEventListener("touchend",z))},[I,d]),j=h.useCallback(A=>{const H=S.current;H&&typeof H.contains=="function"&&H.contains(A.target)||T(A)},[T]),E=h.useCallback(A=>{if(d)return;let H=v;switch(A.key){case"ArrowLeft":case"ArrowDown":H=v-t;break;case"ArrowRight":case"ArrowUp":H=v+t;break;case"Home":H=e;break;case"End":H=o;break;default:return}A.preventDefault(),b(H)},[v,e,o,t,b,d]),D=o-e,W=D===0?0:(v-e)/D*100;return{currentValue:v,isDragging:u,isHovered:k,setIsHovered:x,trackRef:C,thumbRef:S,handleThumbMouseDown:T,handleTrackMouseDown:j,handleKeyDown:E,thumbPositionPercent:W}},Tl={xs:{height:4,width:"100%"},sm:{height:6,width:"100%"},md:{height:8,width:"100%"},lg:{height:10,width:"100%"},xl:{height:12,width:"100%"}},Il={xs:{width:12,height:12},sm:{width:16,height:16},md:{width:20,height:20},lg:{width:24,height:24},xl:{width:28,height:28}},Fl={square:0,rounded:4,pill:24},zl=(e=>({default:{backgroundColor:"color-gray-200",transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"},transition:"border-color 0.15s ease"}}))(),$f={xs:{trackCrossAxisSize:4,thumbSize:12},sm:{trackCrossAxisSize:6,thumbSize:16},md:{trackCrossAxisSize:8,thumbSize:20},lg:{trackCrossAxisSize:10,thumbSize:24},xl:{trackCrossAxisSize:12,thumbSize:28}},Lf={horizontal:{width:"100%",minWidth:"120px",height:"auto",flexDirection:"row",paddingVertical:8},vertical:{height:"100%",minHeight:"120px",width:"auto",flexDirection:"column-reverse",paddingHorizontal:8}},_f=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),lr=(e,o)=>_f(o)?{style:{[e]:o}}:{[e]:o},Ml=h.memo(({min:e=0,max:o=100,step:t=1,currentValue:n,stepValues:a,shape:l="rounded",size:c="md",variant:s="default",orientation:d="horizontal",isDisabled:g=!1,showValue:m=!1,showTooltip:f=!1,backgroundColor:p="theme-primary",label:u,helperText:y,themeMode:k,shadow:x={},isDragging:C,isHovered:S,setIsHovered:w,trackRef:v,thumbRef:b,handleThumbMouseDown:I,handleTrackMouseDown:T,handleKeyDown:j,thumbPositionPercent:E,ariaLabel:D="Slider",views:W={container:{},track:{},progress:{},filledTrack:{},thumb:{},label:{},valueLabel:{},stepMarks:{},tooltip:{}},onChange:A,onDrag:H,value:z,defaultValue:P,...V})=>{var $,q;const M=p,L="theme-disabled",_=zl[s].backgroundColor,O=g?L:M,N=d==="vertical",{trackCrossAxisSize:U,thumbSize:X}=$f[c]||{trackCrossAxisSize:Tl[c].height,thumbSize:Il[c].width||16},oe=r.jsxs(i.Vertical,{width:"100%",gap:8,...W.container,...V,children:[u&&r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontSize:14,fontWeight:500,...W.label,children:u}),m&&r.jsx(i.Text,{fontSize:14,color:"color-gray-500",...W.valueLabel,children:n})]}),r.jsxs(i.View,{ref:v,position:"relative",cursor:g?"not-allowed":"pointer",opacity:g?.6:1,onMouseDown:T,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),...Tl[c],borderRadius:Fl[l],backgroundColor:_,...zl[s],...x,...W.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(J=>{const Y=(J-e)/(o-e)*100;return r.jsx(i.View,{position:"absolute",top:"50%",left:`${Y}%`,transform:"translate(-50%, -50%)",width:4,height:4,borderRadius:"50%",zIndex:1,...lr("backgroundColor",O),...W.stepMarks},J)})}),r.jsx(i.View,{position:"absolute",top:0,left:0,height:"100%",width:`${E}%`,borderRadius:Fl[l],transition:"width 0.1s ease-in-out",...lr("backgroundColor",O),...W.progress,...W.filledTrack}),r.jsx(i.View,{ref:b,role:"slider",tabIndex:g?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":g,"aria-label":D,position:"absolute",top:"50%",left:`${E}%`,borderRadius:"50%",backgroundColor:"color-white",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",borderWidth:2,borderStyle:"solid",transition:C?"none":"transform 0.1s ease-in-out",...lr("borderColor",O),transform:S?"translate(-50%, -50%) scale(1.1)":"translate(-50%, -50%)",zIndex:2,onMouseDown:I,onTouchStart:I,onKeyDown:j,...Il[c],...W.thumb,children:f&&(S||C)&&r.jsx(i.View,{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:8,padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:4,fontSize:12,whiteSpace:"nowrap",zIndex:3,...W.tooltip,children:r.jsx(i.Text,{...($=W.tooltip)==null?void 0:$.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(Et,{children:y})]}),B=r.jsxs(i.Center,{...Lf[d],position:"relative",onMouseEnter:()=>!g&&w(!0),onMouseLeave:()=>!g&&w(!1),...V,...W==null?void 0:W.container,children:[u&&r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",marginBottom:8,width:"100%",children:[r.jsx(i.Text,{fontSize:14,fontWeight:500,...W.label,children:u}),m&&r.jsx(i.Text,{fontSize:14,color:"color-gray-500",...W.valueLabel,children:n})]}),r.jsxs(i.View,{ref:v,position:"relative",borderRadius:U/2,backgroundColor:g?L:_,cursor:g?"not-allowed":"pointer",width:N?`${U}px`:"100%",height:N?"100%":`${U}px`,onMouseDown:T,onTouchStart:T,...W==null?void 0:W.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(J=>{const Y=(J-e)/(o-e)*100;return r.jsx(i.View,{position:"absolute",width:4,height:4,borderRadius:"50%",backgroundColor:O,zIndex:1,...N?{bottom:`${Y}%`,left:"50%",transform:"translate(-50%, 50%)"}:{left:`${Y}%`,top:"50%",transform:"translate(-50%, -50%)"},...W.stepMarks},J)})}),r.jsx(i.View,{position:"absolute",borderRadius:U/2,...N?{bottom:0,left:0,width:"100%",height:`${E}%`}:{top:0,left:0,height:"100%",width:`${E}%`},...lr("backgroundColor",O),...W==null?void 0:W.filledTrack,...W==null?void 0:W.progress}),r.jsx(i.View,{ref:b,role:"slider",tabIndex:g?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":g,"aria-label":D,position:"absolute",width:`${X}px`,height:`${X}px`,borderRadius:"50%",borderWidth:2,borderStyle:"solid",borderColor:"color-white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.2)",cursor:g?"not-allowed":"grab",transform:N?"translateX(-50%)":"translateY(-50%)",zIndex:2,transition:C?"none":"left 0.1s, bottom 0.1s",...lr("backgroundColor",O),...N?{left:"50%",bottom:`${E}%`}:{top:"50%",left:`${E}%`},onMouseDown:I,onTouchStart:I,onKeyDown:j,...W==null?void 0:W.thumb,children:f&&(S||C)&&r.jsx(i.View,{position:"absolute",padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:"4px",whiteSpace:"nowrap",zIndex:3,...N?{left:"100%",marginLeft:"8px",bottom:"0",transform:"translateY(50%)"}:{bottom:"100%",left:"50%",marginBottom:"8px",transform:"translateX(-50%)"},...W==null?void 0:W.tooltip,children:r.jsx(i.Text,{...(q=W==null?void 0:W.tooltip)==null?void 0:q.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(Et,{marginTop:8,children:y})]});return N||f?B:oe}),Bf=e=>{const o=xe(e),t=vl({...e,value:o.value!==void 0?Number(o.value):void 0,onChange:n=>{var a;o.onChange(n),(a=e.onChange)==null||a.call(e,n)}});return r.jsx(Ml,{...e,...t,...o})},Wl=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},Kt=(e,o)=>{console.log(`[FormikOTPInput] ${e}`,o)},Of=e=>e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Object.prototype.toString.call(e),Nf=e=>{const o=xe(e),t=Wl(o.value).slice(0,e.length||6);Kt("render",{name:e.name,type:e.type,formValue:Of(o.value),displayValue:t,length:e.length||6,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText});const{isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:c,inputRef:s,containerRef:d,mirrorSelectionStart:g,mirrorSelectionEnd:m,setMirrorSelectionStart:f,setMirrorSelectionEnd:p,setInputRef:u,handleFocus:y,handleBlur:k,handleKeyDown:x,handlePaste:C}=hl(e),S=h.useCallback(v=>{const b=Wl(v).slice(0,e.length||6);Kt("setValue",{name:e.name,incomingValue:v,nextValue:b,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText}),o.onChange&&o.onChange(b),o.onChangeText&&o.onChangeText(b),e.onComplete&&b.length===(e.length||6)&&e.onComplete(b),s.current&&(s.current.value=b)},[o,e,s]),w=h.useCallback(v=>{var T,j,E;const b=typeof v=="string"?v:((T=v==null?void 0:v.currentTarget)==null?void 0:T.value)??((j=v==null?void 0:v.target)==null?void 0:j.value)??((E=v==null?void 0:v.nativeEvent)==null?void 0:E.text)??"",I=String(b).slice(0,e.length||6);Kt("handleChange normalized",{name:e.name,raw:b,newValue:I}),S(I),s.current&&(s.current.value=I)},[e.length,S,s]);return r.jsx(fl,{...e,...o,value:t,setValue:S,isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:c,inputRef:s,containerRef:d,mirrorSelectionStart:g,mirrorSelectionEnd:m,setMirrorSelectionStart:f,setMirrorSelectionEnd:p,setInputRef:u,handleChange:w,handleFocus:y,handleBlur:k,handleKeyDown:x,handlePaste:C,stepValues:e.stepValues})},qf=e=>Array.isArray(e)?e:e==null?[]:[e],Hl=({name:e,uploadFile:o,onUploadSuccess:t,onUploadError:n,transformResponse:a,onMultipleFileSelect:l,onFileSelect:c,multiple:s=!0,...d})=>{const{setFieldValue:g,setFieldTouched:m,values:f}=Ee.useFormikContext(),[p,u]=h.useState(!1),[y,k]=h.useState(0),x=h.useCallback(async w=>{if(!w||w.length===0)return;m(e,!0,!0),u(!0);const v=[];for(const b of w){k(0);try{const I=await o(b,j=>{k(j??0)}),T=a?a(I,b):I;v.push(T),t==null||t(b,T)}catch(I){n==null||n(b,I)}}if(v.length>0){const b=qf(Ee.getIn(f,e));g(e,[...b,...v],!0),k(100)}else k(0);u(!1)},[e,n,t,m,g,a,o,f]),C=h.useCallback(async w=>{l==null||l(w),await x(w)},[x,l]),S=h.useCallback(async w=>{c==null||c(w),await x([w])},[x,c]);return r.jsx(Ir,{...d,multiple:s,onMultipleFileSelect:s?C:void 0,onFileSelect:s?void 0:S,isLoading:p,progress:y})};Hl.displayName="FormikUploader";const Uf=e=>{let o=xe(e);o.selected=o.value;const t=Aa(e);return r.jsx(Ea,{...t,...o})},jl=e=>{const[o,t]=h.useState(!1),[n,a]=h.useState(e);return{isHovered:o,setIsHovered:t,isToggle:n,setIsToggled:a}},Gf={square:0,rounded:8,pill:999},Yf=(e,o)=>({outline:{backgroundColor:"color-white",color:e,borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{backgroundColor:"transparent",color:e,borderWidth:0,borderStyle:"none",borderColor:"transparent",_hover:{backgroundColor:"color-gray-50"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease"},link:{backgroundColor:"transparent",color:e,borderWidth:1,borderStyle:"solid",borderColor:"transparent",textDecoration:"underline",textUnderlineOffset:"1px",textDecorationThickness:"1px",_hover:{opacity:.8},_active:{opacity:.9},transition:"opacity 0.2s ease"}}),Pl=h.memo(({children:e,shape:o="rounded",variant:t="ghost",isHovered:n,setIsHovered:a,isDisabled:l,isToggle:c,setIsToggled:s,onToggle:d,views:g,backgroundColor:m,color:f,themeMode:p,...u})=>{const{getColor:y,themeMode:k}=i.useTheme(),x=p??k,S=y(l?"theme-disabled":m??f??"theme-primary",{themeMode:x}),v=h.useMemo(()=>Yf(S),[S,x])[t],b=!!c,I=h.useCallback(()=>a(!0),[a]),T=h.useCallback(()=>{l||s(j=>{const E=!j;return d&&d(E),E})},[l,s,d]);return r.jsx(i.Center,{role:"Toggle",padding:o==="pill"?"8px 12px":"8px",width:"fit-content",cursor:l?"not-allowed":"pointer",borderRadius:Gf[o],onClick:T,onMouseEnter:I,onMouseLeave:()=>a(!1),...v,...b&&{...t==="link"?{backgroundColor:"transparent"}:{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200"},color:S},...u,...g==null?void 0:g.container,children:e})}),Kf=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:l,...c})=>{const s=xe(c),{isHovered:d,setIsHovered:g,isToggle:m,setIsToggled:f}=jl(s.value??a);h.useEffect(()=>{f(s.value??a)},[s.value,a]);const p=u=>{f(u),s.onChange(u),l==null||l(u)};return r.jsx(Pl,{shape:o,variant:t,isDisabled:n,isHovered:d,setIsHovered:g,isToggle:m,setIsToggled:f,onToggle:p,...c,children:e})},Vl=()=>{const[e,o]=h.useState([]);return{activeToggles:e,setActiveToggles:o}},Xt=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:l,...c})=>{const{isHovered:s,setIsHovered:d,isToggle:g,setIsToggled:m}=jl(a);return h.useEffect(()=>{m(a)},[a]),r.jsx(Pl,{shape:o,variant:t,isDisabled:n,isHovered:s,setIsHovered:d,isToggle:g,setIsToggled:m,onToggle:l,...c,children:e})},Al=({items:e,onToggleChange:o,activeToggles:t,setActiveToggles:n,shape:a="rounded",variant:l="ghost",views:c})=>{const s=h.useCallback((d,g)=>{n(m=>{let f;return g?f=m.includes(d)?m:[...m,d]:f=m.filter(p=>p!==d),o==null||o(f),f})},[o,n]);return r.jsx(i.Horizontal,{role:"ToggleGroup",display:"flex",gap:8,flexWrap:"wrap",...c==null?void 0:c.container,children:e.map(d=>r.jsx(Xt,{role:`toggle-${d.id}`,shape:a,variant:l,isToggled:t.includes(d.id)||d.isActive,onToggle:g=>s(d.id,g),isDisabled:d.isDisabled,views:c==null?void 0:c.toggle,children:d.value},d.id))})},Xf=({items:e,shape:o,variant:t,onToggleChange:n,...a})=>{const l=xe(a),{activeToggles:c,setActiveToggles:s}=Vl();h.useEffect(()=>{Array.isArray(l.value)&&s(l.value)},[l.value]);const d=g=>{s(g),l.onChange(g),n==null||n(g)};return r.jsx(Al,{items:e,shape:o,variant:t,activeToggles:c,setActiveToggles:s,onToggleChange:d,...a})},El=["zoom-out","zoom-in","zap","zap-off","youtube","x","wrench","worm","workflow","wine","wine-off","wind","wind-arrow-down","wifi","wifi-zero","wifi-sync","wifi-pen","wifi-off","wifi-low","wifi-high","wifi-cog","whole-word","wheat","wheat-off","weight","weight-tilde","webhook","webhook-off","webcam","waypoints","waves","waves-ladder","waves-arrow-up","waves-arrow-down","watch","washing-machine","warehouse","wand","wand-sparkles","wallpaper","wallet","wallet-minimal","wallet-cards","vote","volume","volume-x","volume-off","volume-2","volume-1","volleyball","voicemail","view","videotape","video","video-off","vibrate","vibrate-off","venus","venus-and-mars","venetian-mask","vegan","vector-square","vault","variable","van","utility-pole","utensils","utensils-crossed","users","users-round","user","user-x","user-star","user-search","user-round","user-round-x","user-round-search","user-round-plus","user-round-pen","user-round-minus","user-round-cog","user-round-check","user-plus","user-pen","user-minus","user-lock","user-cog","user-check","usb","upload","unplug","unlink","unlink-2","university","ungroup","unfold-vertical","unfold-horizontal","undo","undo-dot","undo-2","underline","umbrella","umbrella-off","type","type-outline","twitter","twitch","tv","tv-minimal","tv-minimal-play","turtle","turntable","turkish-lira","truck","truck-electric","trophy","triangle","triangle-right","triangle-dashed","triangle-alert","trending-up","trending-up-down","trending-down","trello","trees","tree-pine","tree-palm","tree-deciduous","trash","trash-2","transgender","tram-front","train-track","train-front","train-front-tunnel","traffic-cone","tractor","toy-brick","tower-control","touchpad","touchpad-off","torus","tornado","toolbox","tool-case","toilet","toggle-right","toggle-left","timer","timer-reset","timer-off","tickets","tickets-plane","ticket","ticket-x","ticket-slash","ticket-plus","ticket-percent","ticket-minus","ticket-check","thumbs-up","thumbs-down","thermometer","thermometer-sun","thermometer-snowflake","theater","text-wrap","text-select","text-search","text-quote","text-initial","text-cursor","text-cursor-input","text-align-start","text-align-justify","text-align-end","text-align-center","test-tubes","test-tube","test-tube-diagonal","terminal","tent","tent-tree","telescope","target","tangent","tally-5","tally-4","tally-3","tally-2","tally-1","tags","tag","tablets","tablet","tablet-smartphone","table","table-rows-split","table-properties","table-of-contents","table-columns-split","table-cells-split","table-cells-merge","table-2","syringe","swords","sword","switch-camera","swiss-franc","swatch-book","superscript","sunset","sunrise","sun","sun-snow","sun-moon","sun-medium","sun-dim","subscript","strikethrough","stretch-vertical","stretch-horizontal","store","stone","sticky-note","sticker","stethoscope","step-forward","step-back","star","star-off","star-half","stamp","squirrel","squircle","squircle-dashed","squares-unite","squares-subtract","squares-intersect","squares-exclude","square","square-x","square-user","square-user-round","square-terminal","square-stop","square-star","square-stack","square-square","square-split-vertical","square-split-horizontal","square-slash","square-sigma","square-scissors","square-round-corner","square-radical","square-power","square-plus","square-play","square-pilcrow","square-pi","square-percent","square-pen","square-pause","square-parking","square-parking-off","square-mouse-pointer","square-minus","square-menu","square-m","square-library","square-kanban","square-function","square-equal","square-dot","square-divide","square-dashed","square-dashed-top-solid","square-dashed-mouse-pointer","square-dashed-kanban","square-dashed-bottom","square-dashed-bottom-code","square-code","square-chevron-up","square-chevron-right","square-chevron-left","square-chevron-down","square-check","square-check-big","square-chart-gantt","square-bottom-dashed-scissors","square-asterisk","square-arrow-up","square-arrow-up-right","square-arrow-up-left","square-arrow-right","square-arrow-out-up-right","square-arrow-out-up-left","square-arrow-out-down-right","square-arrow-out-down-left","square-arrow-left","square-arrow-down","square-arrow-down-right","square-arrow-down-left","square-activity","sprout","spray-can","spotlight","spool","split","spline","spline-pointer","spell-check","spell-check-2","speech","speaker","sparkles","sparkle","spade","space","soup","solar-panel","sofa","soap-dispenser-droplet","snowflake","snail","smile","smile-plus","smartphone","smartphone-nfc","smartphone-charging","sliders-vertical","sliders-horizontal","slice","slash","slack","skull","skip-forward","skip-back","siren","signpost","signpost-big","signature","signal","signal-zero","signal-medium","signal-low","signal-high","sigma","shuffle","shrub","shrink","shrimp","shredder","shower-head","shovel","shopping-cart","shopping-basket","shopping-bag","shirt","ship","ship-wheel","shield","shield-x","shield-user","shield-question-mark","shield-plus","shield-off","shield-minus","shield-half","shield-ellipsis","shield-check","shield-ban","shield-alert","shell","sheet","share","share-2","shapes","settings","settings-2","server","server-off","server-crash","server-cog","separator-vertical","separator-horizontal","send","send-to-back","send-horizontal","section","search","search-x","search-slash","search-code","search-check","search-alert","scroll","scroll-text","screen-share","screen-share-off","scooter","scissors","scissors-line-dashed","school","scan","scan-text","scan-search","scan-qr-code","scan-line","scan-heart","scan-face","scan-eye","scan-barcode","scaling","scale","scale-3d","save","save-off","save-all","saudi-riyal","satellite","satellite-dish","sandwich","salad","sailboat","russian-ruble","ruler","ruler-dimension-line","rss","rows-4","rows-3","rows-2","router","route","route-off","rotate-cw","rotate-cw-square","rotate-ccw","rotate-ccw-square","rotate-ccw-key","rotate-3d","rose","roller-coaster","rocking-chair","rocket","ribbon","rewind","reply","reply-all","replace","replace-all","repeat","repeat-2","repeat-1","remove-formatting","regex","refrigerator","refresh-cw","refresh-cw-off","refresh-ccw","refresh-ccw-dot","redo","redo-dot","redo-2","recycle","rectangle-vertical","rectangle-horizontal","rectangle-goggles","rectangle-ellipsis","rectangle-circle","receipt","receipt-turkish-lira","receipt-text","receipt-swiss-franc","receipt-russian-ruble","receipt-pound-sterling","receipt-japanese-yen","receipt-indian-rupee","receipt-euro","receipt-cent","ratio","rat","rainbow","rail-symbol","radius","radio","radio-tower","radio-receiver","radical","radiation","radar","rabbit","quote","qr-code","pyramid","puzzle","proportions","projector","printer","printer-check","presentation","power","power-off","pound-sterling","popsicle","popcorn","pointer","pointer-off","podcast","pocket","pocket-knife","plus","plug","plug-zap","plug-2","play","plane","plane-takeoff","plane-landing","pizza","pipette","pin","pin-off","pill","pill-bottle","pilcrow","pilcrow-right","pilcrow-left","piggy-bank","picture-in-picture","picture-in-picture-2","pickaxe","piano","pi","phone","phone-outgoing","phone-off","phone-missed","phone-incoming","phone-forwarded","phone-call","philippine-peso","person-standing","percent","pentagon","pencil","pencil-ruler","pencil-off","pencil-line","pen","pen-tool","pen-off","pen-line","pc-case","paw-print","pause","party-popper","parking-meter","parentheses","paperclip","panels-top-left","panels-right-bottom","panels-left-bottom","panel-top","panel-top-open","panel-top-dashed","panel-top-close","panel-top-bottom-dashed","panel-right","panel-right-open","panel-right-dashed","panel-right-close","panel-left","panel-left-right-dashed","panel-left-open","panel-left-dashed","panel-left-close","panel-bottom","panel-bottom-open","panel-bottom-dashed","panel-bottom-close","panda","palette","paintbrush","paintbrush-vertical","paint-roller","paint-bucket","package","package-x","package-search","package-plus","package-open","package-minus","package-check","package-2","origami","orbit","option","omega","octagon","octagon-x","octagon-pause","octagon-minus","octagon-alert","nut","nut-off","notepad-text","notepad-text-dashed","notebook","notebook-text","notebook-tabs","notebook-pen","non-binary","nfc","newspaper","network","navigation","navigation-off","navigation-2","navigation-2-off","music","music-4","music-3","music-2","move","move-vertical","move-up","move-up-right","move-up-left","move-right","move-left","move-horizontal","move-down","move-down-right","move-down-left","move-diagonal","move-diagonal-2","move-3d","mouse","mouse-pointer","mouse-pointer-click","mouse-pointer-ban","mouse-pointer-2","mouse-pointer-2-off","mouse-off","mountain","mountain-snow","motorbike","moon","moon-star","monitor","monitor-x","monitor-up","monitor-stop","monitor-speaker","monitor-smartphone","monitor-play","monitor-pause","monitor-off","monitor-down","monitor-dot","monitor-cog","monitor-cloud","monitor-check","minus","minimize","minimize-2","milk","milk-off","milestone","microwave","microscope","microchip","mic","mic-vocal","mic-off","messages-square","message-square","message-square-x","message-square-warning","message-square-text","message-square-share","message-square-reply","message-square-quote","message-square-plus","message-square-off","message-square-more","message-square-lock","message-square-heart","message-square-dot","message-square-diff","message-square-dashed","message-square-code","message-circle","message-circle-x","message-circle-warning","message-circle-reply","message-circle-question-mark","message-circle-plus","message-circle-off","message-circle-more","message-circle-heart","message-circle-dashed","message-circle-code","merge","menu","memory-stick","meh","megaphone","megaphone-off","medal","maximize","maximize-2","martini","mars","mars-stroke","map","map-plus","map-pinned","map-pin","map-pin-x","map-pin-x-inside","map-pin-plus","map-pin-plus-inside","map-pin-pen","map-pin-off","map-pin-minus","map-pin-minus-inside","map-pin-house","map-pin-check","map-pin-check-inside","map-minus","mails","mailbox","mail","mail-x","mail-warning","mail-search","mail-question-mark","mail-plus","mail-open","mail-minus","mail-check","magnet","luggage","lollipop","logs","log-out","log-in","lock","lock-open","lock-keyhole","lock-keyhole-open","locate","locate-off","locate-fixed","loader","loader-pinwheel","loader-circle","list","list-x","list-video","list-tree","list-todo","list-start","list-restart","list-plus","list-ordered","list-music","list-minus","list-indent-increase","list-indent-decrease","list-filter","list-filter-plus","list-end","list-collapse","list-chevrons-up-down","list-chevrons-down-up","list-checks","list-check","linkedin","link","link-2","link-2-off","line-squiggle","lightbulb","lightbulb-off","ligature","life-buoy","library","library-big","lectern","leafy-green","leaf","layout-template","layout-panel-top","layout-panel-left","layout-list","layout-grid","layout-dashboard","layers","layers-plus","layers-2","laugh","lasso","lasso-select","laptop","laptop-minimal","laptop-minimal-check","languages","landmark","land-plot","lamp","lamp-wall-up","lamp-wall-down","lamp-floor","lamp-desk","lamp-ceiling","keyboard","keyboard-off","keyboard-music","key","key-square","key-round","kayak","kanban","joystick","japanese-yen","iteration-cw","iteration-ccw","italic","instagram","inspection-panel","info","infinity","indian-rupee","inbox","import","images","image","image-upscale","image-up","image-plus","image-play","image-off","image-minus","image-down","id-card","id-card-lanyard","ice-cream-cone","ice-cream-bowl","house","house-wifi","house-plus","house-plug","house-heart","hourglass","hotel","hospital","hop","hop-off","history","highlighter","hexagon","helicopter","heater","heart","heart-pulse","heart-plus","heart-off","heart-minus","heart-handshake","heart-crack","headset","headphones","headphone-off","heading","heading-6","heading-5","heading-4","heading-3","heading-2","heading-1","hdmi-port","hd","haze","hat-glasses","hash","hard-hat","hard-drive","hard-drive-upload","hard-drive-download","handshake","handbag","hand","hand-platter","hand-metal","hand-helping","hand-heart","hand-grab","hand-fist","hand-coins","hammer","hamburger","ham","guitar","group","grip","grip-vertical","grip-horizontal","grid-3x3","grid-3x2","grid-2x2","grid-2x2-x","grid-2x2-plus","grid-2x2-check","grape","graduation-cap","gpu","goal","globe","globe-lock","glasses","glass-water","gitlab","github","git-pull-request","git-pull-request-draft","git-pull-request-create","git-pull-request-create-arrow","git-pull-request-closed","git-pull-request-arrow","git-merge","git-graph","git-fork","git-compare","git-compare-arrows","git-commit-vertical","git-commit-horizontal","git-branch","git-branch-plus","git-branch-minus","gift","ghost","georgian-lari","gem","gavel","gauge","gamepad","gamepad-directional","gamepad-2","gallery-vertical","gallery-vertical-end","gallery-thumbnails","gallery-horizontal","gallery-horizontal-end","funnel","funnel-x","funnel-plus","fullscreen","fuel","frown","framer","frame","forward","form","forklift","footprints","folders","folder","folder-x","folder-up","folder-tree","folder-sync","folder-symlink","folder-search","folder-search-2","folder-root","folder-plus","folder-pen","folder-output","folder-open","folder-open-dot","folder-minus","folder-lock","folder-key","folder-kanban","folder-input","folder-heart","folder-git","folder-git-2","folder-down","folder-dot","folder-cog","folder-code","folder-closed","folder-clock","folder-check","folder-archive","fold-vertical","fold-horizontal","focus","flower","flower-2","flip-vertical","flip-vertical-2","flip-horizontal","flip-horizontal-2","flask-round","flask-conical","flask-conical-off","flashlight","flashlight-off","flame","flame-kindling","flag","flag-triangle-right","flag-triangle-left","flag-off","fishing-hook","fish","fish-symbol","fish-off","fire-extinguisher","fingerprint-pattern","film","files","file","file-x","file-x-corner","file-volume","file-video-camera","file-user","file-up","file-type","file-type-corner","file-text","file-terminal","file-symlink","file-stack","file-spreadsheet","file-sliders","file-signal","file-search","file-search-corner","file-scan","file-question-mark","file-plus","file-plus-corner","file-play","file-pen","file-pen-line","file-output","file-music","file-minus","file-minus-corner","file-lock","file-key","file-input","file-image","file-heart","file-headphone","file-exclamation-point","file-down","file-digit","file-diff","file-cog","file-code","file-code-corner","file-clock","file-check","file-check-corner","file-chart-pie","file-chart-line","file-chart-column","file-chart-column-increasing","file-braces","file-braces-corner","file-box","file-badge","file-axis-3d","file-archive","figma","ferris-wheel","fence","feather","fast-forward","fan","factory","facebook","eye","eye-off","eye-closed","external-link","expand","ev-charger","euro","ethernet-port","eraser","equal","equal-not","equal-approximately","ellipsis","ellipsis-vertical","egg","egg-off","egg-fried","eclipse","earth","earth-lock","ear","ear-off","dumbbell","drumstick","drum","droplets","droplet","droplet-off","drone","drill","dribbble","drama","drafting-compass","download","dot","door-open","door-closed","door-closed-locked","donut","dollar-sign","dog","dock","dna","dna-off","divide","disc","disc-album","disc-3","disc-2","diff","dices","dice-6","dice-5","dice-4","dice-3","dice-2","dice-1","diamond","diamond-plus","diamond-percent","diamond-minus","diameter","dessert","delete","decimals-arrow-right","decimals-arrow-left","database","database-zap","database-backup","dam","cylinder","currency","cup-soda","cuboid","crown","crosshair","cross","crop","croissant","credit-card","creative-commons","cpu","corner-up-right","corner-up-left","corner-right-up","corner-right-down","corner-left-up","corner-left-down","corner-down-right","corner-down-left","copyright","copyleft","copy","copy-x","copy-slash","copy-plus","copy-minus","copy-check","cooking-pot","cookie","contrast","container","contact","contact-round","construction","cone","concierge-bell","computer","component","compass","command","combine","columns-4","columns-3","columns-3-cog","columns-2","coins","cog","coffee","codesandbox","codepen","code","code-xml","club","clover","cloudy","cloud","cloud-upload","cloud-sync","cloud-sun","cloud-sun-rain","cloud-snow","cloud-rain","cloud-rain-wind","cloud-off","cloud-moon","cloud-moon-rain","cloud-lightning","cloud-hail","cloud-fog","cloud-drizzle","cloud-download","cloud-cog","cloud-check","cloud-backup","cloud-alert","closed-caption","clock","clock-plus","clock-fading","clock-check","clock-arrow-up","clock-arrow-down","clock-alert","clock-9","clock-8","clock-7","clock-6","clock-5","clock-4","clock-3","clock-2","clock-12","clock-11","clock-10","clock-1","clipboard","clipboard-x","clipboard-type","clipboard-plus","clipboard-pen","clipboard-pen-line","clipboard-paste","clipboard-minus","clipboard-list","clipboard-copy","clipboard-clock","clipboard-check","clapperboard","citrus","circuit-board","circle","circle-x","circle-user","circle-user-round","circle-stop","circle-star","circle-small","circle-slash","circle-slash-2","circle-question-mark","circle-power","circle-pound-sterling","circle-plus","circle-play","circle-pile","circle-percent","circle-pause","circle-parking","circle-parking-off","circle-off","circle-minus","circle-gauge","circle-fading-plus","circle-fading-arrow-up","circle-equal","circle-ellipsis","circle-dot","circle-dot-dashed","circle-dollar-sign","circle-divide","circle-dashed","circle-chevron-up","circle-chevron-right","circle-chevron-left","circle-chevron-down","circle-check","circle-check-big","circle-arrow-up","circle-arrow-right","circle-arrow-out-up-right","circle-arrow-out-up-left","circle-arrow-out-down-right","circle-arrow-out-down-left","circle-arrow-left","circle-arrow-down","circle-alert","cigarette","cigarette-off","church","chromium","chevrons-up","chevrons-up-down","chevrons-right","chevrons-right-left","chevrons-left","chevrons-left-right","chevrons-left-right-ellipsis","chevrons-down","chevrons-down-up","chevron-up","chevron-right","chevron-left","chevron-last","chevron-first","chevron-down","chess-rook","chess-queen","chess-pawn","chess-knight","chess-king","chess-bishop","cherry","chef-hat","check","check-line","check-check","chart-spline","chart-scatter","chart-pie","chart-no-axes-gantt","chart-no-axes-combined","chart-no-axes-column","chart-no-axes-column-increasing","chart-no-axes-column-decreasing","chart-network","chart-line","chart-gantt","chart-column","chart-column-stacked","chart-column-increasing","chart-column-decreasing","chart-column-big","chart-candlestick","chart-bar","chart-bar-stacked","chart-bar-increasing","chart-bar-decreasing","chart-bar-big","chart-area","cctv","cat","castle","cast","cassette-tape","case-upper","case-sensitive","case-lower","carrot","card-sim","caravan","car","car-taxi-front","car-front","captions","captions-off","cannabis","cannabis-off","candy","candy-off","candy-cane","camera","camera-off","calendars","calendar","calendar-x","calendar-x-2","calendar-sync","calendar-search","calendar-range","calendar-plus","calendar-plus-2","calendar-off","calendar-minus","calendar-minus-2","calendar-heart","calendar-fold","calendar-days","calendar-cog","calendar-clock","calendar-check","calendar-check-2","calendar-arrow-up","calendar-arrow-down","calendar-1","calculator","cake","cake-slice","cable","cable-car","bus","bus-front","building","building-2","bug","bug-play","bug-off","bubbles","brush","brush-cleaning","bring-to-front","briefcase","briefcase-medical","briefcase-conveyor-belt","briefcase-business","brick-wall","brick-wall-shield","brick-wall-fire","brain","brain-cog","brain-circuit","brackets","braces","boxes","box","bow-arrow","bottle-wine","bot","bot-off","bot-message-square","boom-box","bookmark","bookmark-x","bookmark-plus","bookmark-minus","bookmark-check","book","book-x","book-user","book-up","book-up-2","book-type","book-text","book-search","book-plus","book-open","book-open-text","book-open-check","book-minus","book-marked","book-lock","book-key","book-image","book-heart","book-headphones","book-down","book-dashed","book-copy","book-check","book-audio","book-alert","book-a","bone","bomb","bolt","bold","bluetooth","bluetooth-searching","bluetooth-off","bluetooth-connected","blocks","blinds","blend","bitcoin","birdhouse","bird","biohazard","binoculars","binary","bike","biceps-flexed","between-vertical-start","between-vertical-end","between-horizontal-start","between-horizontal-end","bell","bell-ring","bell-plus","bell-off","bell-minus","bell-electric","bell-dot","beer","beer-off","beef","bed","bed-single","bed-double","bean","bean-off","beaker","battery","battery-warning","battery-plus","battery-medium","battery-low","battery-full","battery-charging","bath","baseline","barrel","barcode","banknote","banknote-x","banknote-arrow-up","banknote-arrow-down","bandage","banana","ban","balloon","baggage-claim","badge","badge-x","badge-turkish-lira","badge-swiss-franc","badge-russian-ruble","badge-question-mark","badge-pound-sterling","badge-plus","badge-percent","badge-minus","badge-japanese-yen","badge-info","badge-indian-rupee","badge-euro","badge-dollar-sign","badge-check","badge-cent","badge-alert","backpack","baby","axis-3d","axe","award","audio-waveform","audio-lines","atom","at-sign","asterisk","arrows-up-from-line","arrow-up","arrow-up-z-a","arrow-up-wide-narrow","arrow-up-to-line","arrow-up-right","arrow-up-narrow-wide","arrow-up-left","arrow-up-from-line","arrow-up-from-dot","arrow-up-down","arrow-up-a-z","arrow-up-1-0","arrow-up-0-1","arrow-right","arrow-right-to-line","arrow-right-left","arrow-right-from-line","arrow-left","arrow-left-to-line","arrow-left-right","arrow-left-from-line","arrow-down","arrow-down-z-a","arrow-down-wide-narrow","arrow-down-up","arrow-down-to-line","arrow-down-to-dot","arrow-down-right","arrow-down-narrow-wide","arrow-down-left","arrow-down-from-line","arrow-down-a-z","arrow-down-1-0","arrow-down-0-1","arrow-big-up","arrow-big-up-dash","arrow-big-right","arrow-big-right-dash","arrow-big-left","arrow-big-left-dash","arrow-big-down","arrow-big-down-dash","armchair","archive","archive-x","archive-restore","apple","app-window","app-window-mac","aperture","anvil","antenna","annoyed","angry","anchor","amphora","ampersands","ampersand","ambulance","align-vertical-space-between","align-vertical-space-around","align-vertical-justify-start","align-vertical-justify-end","align-vertical-justify-center","align-vertical-distribute-start","align-vertical-distribute-end","align-vertical-distribute-center","align-start-vertical","align-start-horizontal","align-horizontal-space-between","align-horizontal-space-around","align-horizontal-justify-start","align-horizontal-justify-end","align-horizontal-justify-center","align-horizontal-distribute-start","align-horizontal-distribute-end","align-horizontal-distribute-center","align-end-vertical","align-end-horizontal","align-center-vertical","align-center-horizontal","album","alarm-smoke","alarm-clock","alarm-clock-plus","alarm-clock-off","alarm-clock-minus","alarm-clock-check","airplay","air-vent","activity","accessibility","a-large-small","a-arrow-up","a-arrow-down"],Dl=e=>{const{value:o,defaultValue:t,onChange:n,isOpen:a,onOpen:l,onClose:c,closeOnSelect:s=!0}=e,[d,g]=h.useState(a??!1),[m,f]=h.useState(o??t),[p,u]=h.useState(""),y=h.useRef(null),k=h.useRef(null);h.useEffect(()=>{o!==void 0&&f(o)},[o]),h.useEffect(()=>{a!==void 0&&g(a)},[a]);const x=h.useMemo(()=>p?El.filter(b=>b.toLowerCase().includes(p.toLowerCase())).slice(0,100):El.slice(0,100),[p]);h.useEffect(()=>{const b=I=>{d&&y.current&&k.current&&!y.current.contains(I.target)&&!k.current.contains(I.target)&&C()};if(!(typeof document>"u"))return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[d]);const C=h.useCallback(()=>{a===void 0&&g(!1),c&&c()},[c,a]),S=h.useCallback(()=>{const b=!d;a===void 0&&g(b),b?(l&&l(),u("")):c&&c()},[d,l,c,a]),w=h.useCallback(b=>{o===void 0&&f(b),n&&n(b),s&&C()},[n,s,C,o]),v=h.useCallback(b=>{u(b)},[]);return{isOpen:d,selectedIcon:m,searchQuery:p,filteredIcons:x,handleToggle:S,handleIconSelect:w,handleSearchChange:v,handleClose:C,triggerRef:y,dropdownRef:k}},Eo={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px",maxHeight:"320px",overflow:"hidden",display:"flex",flexDirection:"column"},searchInput:{marginBottom:"12px",flexShrink:0},iconGrid:{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"8px",overflowY:"auto",padding:"4px",color:"color-black",flexGrow:1},iconItem:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:8,transition:"all 0.2s ease-in-out"}},Jf={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},Qf={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Zf={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},$l=({label:e,placeholder:o="Select an icon",helperText:t,views:n={},size:a="md",shape:l="default",variant:c="default",error:s=!1,isDisabled:d=!1,isReadOnly:g=!1,showSearch:m=!0,isOpen:f,selectedIcon:p,searchQuery:u,filteredIcons:y,handleToggle:k,handleIconSelect:x,handleSearchChange:C,triggerRef:S,dropdownRef:w,handleClose:v,onChange:b,value:I,defaultValue:T,onOpen:j,onClose:E,closeOnSelect:D,...W})=>{const{getColor:A}=i.useTheme(),H={...Eo.container,...n==null?void 0:n.container},z={...Eo.trigger,...Jf[a],...Qf[l],...Zf[c],...s&&{borderColor:"color-red-500"},...d&&{opacity:.6,cursor:"not-allowed"},...!d&&!g&&{_hover:{borderColor:"color-gray-300"}},...n==null?void 0:n.trigger},P={...Eo.dropdown,...n==null?void 0:n.dropdown},V={...Eo.iconGrid,...n==null?void 0:n.iconGrid};return r.jsxs(i.View,{...H,...W,children:[e&&r.jsx(i.Text,{fontSize:a==="xs"?"12px":a==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...n==null?void 0:n.label,children:e}),r.jsxs(i.View,{ref:S,onClick:d||g?void 0:k,...z,children:[r.jsx(i.Horizontal,{alignItems:"center",gap:8,width:"100%",children:p?r.jsxs(i.Horizontal,{alignItems:"center",gap:8,width:"100%",children:[r.jsx(kr,{name:p,widthHeight:16}),r.jsx(i.Text,{color:"color-gray-800",fontSize:"inherit",style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p})]}):r.jsx(i.Text,{color:"color-gray-500",fontSize:"inherit",children:o})}),!g&&!d&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:f?"up":"down"})]}),f&&r.jsxs(i.View,{ref:w,...P,children:[m&&r.jsx(i.View,{...Eo.searchInput,...n==null?void 0:n.searchInput,children:r.jsx(je,{placeholder:"Search icons...",value:u,onChange:M=>C(M),size:"sm",autoFocus:!0})}),r.jsx(i.View,{...V,children:y.length>0?y.map(M=>r.jsx(i.View,{...Eo.iconItem,onClick:()=>x(M),title:M,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},backgroundColor:p===M?"#EFF6FF":"transparent",borderWidth:p===M?"1px":"0px",borderStyle:"solid",borderColor:p===M?"#BFDBFE":"transparent",...n==null?void 0:n.iconItem,children:r.jsx(kr,{name:M,widthHeight:20})},M)):r.jsx(i.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:"No icons found"})})})]}),t&&r.jsx(i.Text,{color:s?"color-red-500":"color-gray-600",marginTop:"4px",...n==null?void 0:n.helperText,children:t})]})},Rf=e=>{const o=xe(e),t={...e,value:o.value??e.value??e.defaultValue},n=Dl(t),a=l=>{n.handleIconSelect(l),o.onChange(l)};return r.jsx($l,{...n,...t,handleIconSelect:a})},to={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"320px",maxHeight:"400px",overflow:"hidden"},searchInput:{marginBottom:"12px"},categoryTabs:{display:"flex",flexDirection:"row",flexWrap:"wrap",borderBottom:"1px solid color-gray-100",marginBottom:"12px",overflowX:"auto"},categoryTab:{padding:"8px 12px",cursor:"pointer",borderBottom:"2px solid transparent",transition:"all 0.2s ease-in-out",fontSize:"14px",fontWeight:"500",color:"color-gray-600",whiteSpace:"nowrap",borderRadius:"8px 8px 0 0"},emojiGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"4px",maxHeight:"240px",overflowY:"auto",padding:"4px",color:"color-black"},emoji:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:6,fontSize:"20px",transition:"all 0.2s ease-in-out"}},em={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},om={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},rm={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},tm={recent:"🕒",smileys:"😀",people:"👤",animals:"🐶",food:"🍎",activities:"⚽",travel:"🚗",objects:"💡",symbols:"❤️",flags:"🏁"},nm=[{emoji:"😀",name:"grinning face",category:"smileys",keywords:["happy","smile","grin"]},{emoji:"😃",name:"grinning face with big eyes",category:"smileys",keywords:["happy","smile","joy"]},{emoji:"😄",name:"grinning face with smiling eyes",category:"smileys",keywords:["happy","smile","joy"]},{emoji:"😁",name:"beaming face with smiling eyes",category:"smileys",keywords:["happy","smile","grin"]},{emoji:"😆",name:"grinning squinting face",category:"smileys",keywords:["happy","laugh","smile"]},{emoji:"😅",name:"grinning face with sweat",category:"smileys",keywords:["happy","sweat","relief"]},{emoji:"🤣",name:"rolling on the floor laughing",category:"smileys",keywords:["laugh","funny","rofl"]},{emoji:"😂",name:"face with tears of joy",category:"smileys",keywords:["laugh","cry","joy"]},{emoji:"🙂",name:"slightly smiling face",category:"smileys",keywords:["smile","happy"]},{emoji:"🙃",name:"upside-down face",category:"smileys",keywords:["silly","upside down"]},{emoji:"😉",name:"winking face",category:"smileys",keywords:["wink","flirt"]},{emoji:"😊",name:"smiling face with smiling eyes",category:"smileys",keywords:["happy","smile","blush"]},{emoji:"😇",name:"smiling face with halo",category:"smileys",keywords:["angel","innocent"]},{emoji:"🥰",name:"smiling face with hearts",category:"smileys",keywords:["love","hearts","adore"]},{emoji:"😍",name:"smiling face with heart-eyes",category:"smileys",keywords:["love","heart","eyes"]},{emoji:"🤩",name:"star-struck",category:"smileys",keywords:["star","struck","amazed"]},{emoji:"😘",name:"face blowing a kiss",category:"smileys",keywords:["kiss","love","flirt"]},{emoji:"😗",name:"kissing face",category:"smileys",keywords:["kiss","love"]},{emoji:"☺️",name:"smiling face",category:"smileys",keywords:["smile","happy","content"]},{emoji:"😚",name:"kissing face with closed eyes",category:"smileys",keywords:["kiss","love","closed eyes"]},{emoji:"😙",name:"kissing face with smiling eyes",category:"smileys",keywords:["kiss","love","smile"]},{emoji:"🥲",name:"smiling face with tear",category:"smileys",keywords:["happy","cry","tear","bittersweet"]},{emoji:"😋",name:"face savoring food",category:"smileys",keywords:["yum","delicious","food"]},{emoji:"😛",name:"face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"😜",name:"winking face with tongue",category:"smileys",keywords:["wink","tongue","silly"]},{emoji:"🤪",name:"zany face",category:"smileys",keywords:["crazy","silly","wild"]},{emoji:"😝",name:"squinting face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"🤑",name:"money-mouth face",category:"smileys",keywords:["money","rich","greedy"]},{emoji:"🤗",name:"hugging face",category:"smileys",keywords:["hug","love","care"]},{emoji:"🤭",name:"face with hand over mouth",category:"smileys",keywords:["oops","secret","quiet"]},{emoji:"🫢",name:"face with open eyes and hand over mouth",category:"smileys",keywords:["surprise","shock","oops"]},{emoji:"🫣",name:"face with peeking eye",category:"smileys",keywords:["peek","shy","embarrassed"]},{emoji:"🤫",name:"shushing face",category:"smileys",keywords:["quiet","secret","shh"]},{emoji:"🤔",name:"thinking face",category:"smileys",keywords:["think","consider","hmm"]},{emoji:"🫡",name:"saluting face",category:"smileys",keywords:["salute","respect","military"]},{emoji:"🤐",name:"zipper-mouth face",category:"smileys",keywords:["quiet","secret","zip"]},{emoji:"🤨",name:"face with raised eyebrow",category:"smileys",keywords:["suspicious","doubt","skeptical"]},{emoji:"😐",name:"neutral face",category:"smileys",keywords:["neutral","meh","blank"]},{emoji:"😑",name:"expressionless face",category:"smileys",keywords:["blank","deadpan","meh"]},{emoji:"😶",name:"face without mouth",category:"smileys",keywords:["quiet","speechless","silent"]},{emoji:"🫥",name:"dotted line face",category:"smileys",keywords:["invisible","depressed","disappear"]},{emoji:"😏",name:"smirking face",category:"smileys",keywords:["smirk","smug","confident"]},{emoji:"😒",name:"unamused face",category:"smileys",keywords:["unamused","bored","annoyed"]},{emoji:"🙄",name:"face with rolling eyes",category:"smileys",keywords:["eye roll","annoyed","whatever"]},{emoji:"😬",name:"grimacing face",category:"smileys",keywords:["grimace","awkward","oops"]},{emoji:"😮‍💨",name:"face exhaling",category:"smileys",keywords:["sigh","relief","tired"]},{emoji:"🤥",name:"lying face",category:"smileys",keywords:["lie","pinocchio","dishonest"]},{emoji:"😌",name:"relieved face",category:"smileys",keywords:["relief","calm","peaceful"]},{emoji:"😔",name:"pensive face",category:"smileys",keywords:["sad","thoughtful","pensive"]},{emoji:"😪",name:"sleepy face",category:"smileys",keywords:["sleepy","tired","drowsy"]},{emoji:"🤤",name:"drooling face",category:"smileys",keywords:["drool","desire","sleep"]},{emoji:"😴",name:"sleeping face",category:"smileys",keywords:["sleep","tired","zzz"]},{emoji:"😷",name:"face with medical mask",category:"smileys",keywords:["mask","sick","doctor"]},{emoji:"🤒",name:"face with thermometer",category:"smileys",keywords:["sick","fever","ill"]},{emoji:"🤕",name:"face with head-bandage",category:"smileys",keywords:["hurt","injured","bandage"]},{emoji:"🤢",name:"nauseated face",category:"smileys",keywords:["sick","nausea","disgusted"]},{emoji:"🤮",name:"face vomiting",category:"smileys",keywords:["vomit","sick","disgusted"]},{emoji:"🤧",name:"sneezing face",category:"smileys",keywords:["sneeze","sick","gesundheit"]},{emoji:"🥵",name:"hot face",category:"smileys",keywords:["hot","heat","sweat"]},{emoji:"🥶",name:"cold face",category:"smileys",keywords:["cold","freeze","blue"]},{emoji:"🥴",name:"woozy face",category:"smileys",keywords:["dizzy","drunk","confused"]},{emoji:"😵",name:"dizzy face",category:"smileys",keywords:["dizzy","confused","knocked out"]},{emoji:"😵‍💫",name:"face with spiral eyes",category:"smileys",keywords:["dizzy","hypnotized","confused"]},{emoji:"🤯",name:"exploding head",category:"smileys",keywords:["mind blown","shocked","amazed"]},{emoji:"🤠",name:"cowboy hat face",category:"smileys",keywords:["cowboy","hat","western"]},{emoji:"🥳",name:"partying face",category:"smileys",keywords:["party","celebration","birthday"]},{emoji:"🥸",name:"disguised face",category:"smileys",keywords:["disguise","glasses","incognito"]},{emoji:"😎",name:"smiling face with sunglasses",category:"smileys",keywords:["cool","sunglasses","awesome"]},{emoji:"🤓",name:"nerd face",category:"smileys",keywords:["nerd","geek","smart"]},{emoji:"🧐",name:"face with monocle",category:"smileys",keywords:["monocle","fancy","inspection"]},{emoji:"👋",name:"waving hand",category:"people",keywords:["wave","hello","goodbye"]},{emoji:"🤚",name:"raised back of hand",category:"people",keywords:["hand","stop"]},{emoji:"🖐️",name:"hand with fingers splayed",category:"people",keywords:["hand","five"]},{emoji:"✋",name:"raised hand",category:"people",keywords:["hand","stop","high five"]},{emoji:"🖖",name:"vulcan salute",category:"people",keywords:["spock","vulcan"]},{emoji:"👌",name:"OK hand",category:"people",keywords:["ok","perfect"]},{emoji:"🤌",name:"pinched fingers",category:"people",keywords:["italian","chef kiss"]},{emoji:"🤏",name:"pinching hand",category:"people",keywords:["small","tiny"]},{emoji:"✌️",name:"victory hand",category:"people",keywords:["peace","victory"]},{emoji:"🤞",name:"crossed fingers",category:"people",keywords:["luck","hope"]},{emoji:"🤟",name:"love-you gesture",category:"people",keywords:["love","you"]},{emoji:"🤘",name:"sign of the horns",category:"people",keywords:["rock","metal"]},{emoji:"🤙",name:"call me hand",category:"people",keywords:["call","phone"]},{emoji:"👈",name:"backhand index pointing left",category:"people",keywords:["point","left"]},{emoji:"👉",name:"backhand index pointing right",category:"people",keywords:["point","right"]},{emoji:"👆",name:"backhand index pointing up",category:"people",keywords:["point","up"]},{emoji:"🖕",name:"middle finger",category:"people",keywords:["middle finger","rude"]},{emoji:"👇",name:"backhand index pointing down",category:"people",keywords:["point","down"]},{emoji:"☝️",name:"index pointing up",category:"people",keywords:["point","up","one"]},{emoji:"👍",name:"thumbs up",category:"people",keywords:["thumbs up","good","yes"]},{emoji:"👎",name:"thumbs down",category:"people",keywords:["thumbs down","bad","no"]},{emoji:"✊",name:"raised fist",category:"people",keywords:["fist","power","solidarity"]},{emoji:"👊",name:"oncoming fist",category:"people",keywords:["fist","punch","bump"]},{emoji:"🤛",name:"left-facing fist",category:"people",keywords:["fist","bump","left"]},{emoji:"🤜",name:"right-facing fist",category:"people",keywords:["fist","bump","right"]},{emoji:"👏",name:"clapping hands",category:"people",keywords:["clap","applause","bravo"]},{emoji:"🙌",name:"raising hands",category:"people",keywords:["celebration","hooray","praise"]},{emoji:"👐",name:"open hands",category:"people",keywords:["open","hug","jazz hands"]},{emoji:"🤲",name:"palms up together",category:"people",keywords:["prayer","please","hope"]},{emoji:"🤝",name:"handshake",category:"people",keywords:["handshake","deal","agreement"]},{emoji:"🙏",name:"folded hands",category:"people",keywords:["prayer","thanks","please"]},{emoji:"✍️",name:"writing hand",category:"people",keywords:["write","author","signature"]},{emoji:"💅",name:"nail polish",category:"people",keywords:["nails","beauty","manicure"]},{emoji:"🤳",name:"selfie",category:"people",keywords:["selfie","camera","phone"]},{emoji:"💪",name:"flexed biceps",category:"people",keywords:["muscle","strong","flex"]},{emoji:"🦾",name:"mechanical arm",category:"people",keywords:["robot","prosthetic","cyborg"]},{emoji:"🦿",name:"mechanical leg",category:"people",keywords:["robot","prosthetic","cyborg"]},{emoji:"🦵",name:"leg",category:"people",keywords:["leg","limb","kick"]},{emoji:"🦶",name:"foot",category:"people",keywords:["foot","kick","stomp"]},{emoji:"👂",name:"ear",category:"people",keywords:["ear","hear","listen"]},{emoji:"🦻",name:"ear with hearing aid",category:"people",keywords:["hearing aid","deaf","accessibility"]},{emoji:"👃",name:"nose",category:"people",keywords:["nose","smell","sniff"]},{emoji:"🧠",name:"brain",category:"people",keywords:["brain","smart","think"]},{emoji:"🫀",name:"anatomical heart",category:"people",keywords:["heart","organ","love"]},{emoji:"🫁",name:"lungs",category:"people",keywords:["lungs","breathe","organ"]},{emoji:"🦷",name:"tooth",category:"people",keywords:["tooth","dental","smile"]},{emoji:"🦴",name:"bone",category:"people",keywords:["bone","skeleton","dog"]},{emoji:"👀",name:"eyes",category:"people",keywords:["eyes","look","see"]},{emoji:"👁️",name:"eye",category:"people",keywords:["eye","see","watch"]},{emoji:"👅",name:"tongue",category:"people",keywords:["tongue","taste","lick"]},{emoji:"👄",name:"mouth",category:"people",keywords:["mouth","lips","kiss"]},{emoji:"🫦",name:"biting lip",category:"people",keywords:["lip","bite","nervous"]},{emoji:"👶",name:"baby",category:"people",keywords:["baby","infant","child"]},{emoji:"🧒",name:"child",category:"people",keywords:["child","kid","young"]},{emoji:"👦",name:"boy",category:"people",keywords:["boy","child","male"]},{emoji:"👧",name:"girl",category:"people",keywords:["girl","child","female"]},{emoji:"🧑",name:"person",category:"people",keywords:["person","adult","human"]},{emoji:"👱",name:"person: blond hair",category:"people",keywords:["blond","hair","person"]},{emoji:"👨",name:"man",category:"people",keywords:["man","male","adult"]},{emoji:"🧔",name:"person: beard",category:"people",keywords:["beard","man","facial hair"]},{emoji:"👩",name:"woman",category:"people",keywords:["woman","female","adult"]},{emoji:"🧓",name:"older person",category:"people",keywords:["old","elderly","senior"]},{emoji:"👴",name:"old man",category:"people",keywords:["old","man","elderly"]},{emoji:"👵",name:"old woman",category:"people",keywords:["old","woman","elderly"]},{emoji:"🐶",name:"dog face",category:"animals",keywords:["dog","pet","animal"]},{emoji:"🐱",name:"cat face",category:"animals",keywords:["cat","pet","animal"]},{emoji:"🐭",name:"mouse face",category:"animals",keywords:["mouse","animal"]},{emoji:"🐹",name:"hamster",category:"animals",keywords:["hamster","pet"]},{emoji:"🐰",name:"rabbit face",category:"animals",keywords:["rabbit","bunny"]},{emoji:"🦊",name:"fox",category:"animals",keywords:["fox","animal"]},{emoji:"🐻",name:"bear",category:"animals",keywords:["bear","animal"]},{emoji:"🐼",name:"panda",category:"animals",keywords:["panda","bear"]},{emoji:"🐨",name:"koala",category:"animals",keywords:["koala","australia","marsupial"]},{emoji:"🐯",name:"tiger face",category:"animals",keywords:["tiger","cat","wild"]},{emoji:"🦁",name:"lion",category:"animals",keywords:["lion","king","cat"]},{emoji:"🐮",name:"cow face",category:"animals",keywords:["cow","moo","farm"]},{emoji:"🐷",name:"pig face",category:"animals",keywords:["pig","oink","farm"]},{emoji:"🐽",name:"pig nose",category:"animals",keywords:["pig","nose","snout"]},{emoji:"🐸",name:"frog",category:"animals",keywords:["frog","amphibian","green"]},{emoji:"🐵",name:"monkey face",category:"animals",keywords:["monkey","primate","banana"]},{emoji:"🙈",name:"see-no-evil monkey",category:"animals",keywords:["monkey","see no evil","eyes"]},{emoji:"🙉",name:"hear-no-evil monkey",category:"animals",keywords:["monkey","hear no evil","ears"]},{emoji:"🙊",name:"speak-no-evil monkey",category:"animals",keywords:["monkey","speak no evil","mouth"]},{emoji:"🐒",name:"monkey",category:"animals",keywords:["monkey","primate","zoo"]},{emoji:"🦍",name:"gorilla",category:"animals",keywords:["gorilla","ape","strong"]},{emoji:"🦧",name:"orangutan",category:"animals",keywords:["orangutan","ape","orange"]},{emoji:"🐺",name:"wolf",category:"animals",keywords:["wolf","howl","wild"]},{emoji:"🐗",name:"boar",category:"animals",keywords:["boar","pig","wild"]},{emoji:"🐴",name:"horse face",category:"animals",keywords:["horse","neigh","ride"]},{emoji:"🐎",name:"horse",category:"animals",keywords:["horse","racing","gallop"]},{emoji:"🦄",name:"unicorn",category:"animals",keywords:["unicorn","magical","horn"]},{emoji:"🦓",name:"zebra",category:"animals",keywords:["zebra","stripes","africa"]},{emoji:"🦌",name:"deer",category:"animals",keywords:["deer","antlers","forest"]},{emoji:"🦏",name:"rhinoceros",category:"animals",keywords:["rhino","horn","africa"]},{emoji:"🦛",name:"hippopotamus",category:"animals",keywords:["hippo","water","africa"]},{emoji:"🐘",name:"elephant",category:"animals",keywords:["elephant","trunk","memory"]},{emoji:"🦒",name:"giraffe",category:"animals",keywords:["giraffe","tall","neck"]},{emoji:"🦘",name:"kangaroo",category:"animals",keywords:["kangaroo","hop","australia"]},{emoji:"🦥",name:"sloth",category:"animals",keywords:["sloth","slow","lazy"]},{emoji:"🦦",name:"otter",category:"animals",keywords:["otter","water","cute"]},{emoji:"🦨",name:"skunk",category:"animals",keywords:["skunk","smell","stripe"]},{emoji:"🦡",name:"badger",category:"animals",keywords:["badger","honey","dig"]},{emoji:"🐾",name:"paw prints",category:"animals",keywords:["paw","prints","tracks"]},{emoji:"🐔",name:"chicken",category:"animals",keywords:["chicken","rooster","farm"]},{emoji:"🐓",name:"rooster",category:"animals",keywords:["rooster","cock","morning"]},{emoji:"🐣",name:"hatching chick",category:"animals",keywords:["chick","hatching","egg"]},{emoji:"🐤",name:"baby chick",category:"animals",keywords:["chick","baby","yellow"]},{emoji:"🐥",name:"front-facing baby chick",category:"animals",keywords:["chick","baby","cute"]},{emoji:"🦆",name:"duck",category:"animals",keywords:["duck","quack","water"]},{emoji:"🦅",name:"eagle",category:"animals",keywords:["eagle","bird","freedom"]},{emoji:"🦉",name:"owl",category:"animals",keywords:["owl","wise","night"]},{emoji:"🦇",name:"bat",category:"animals",keywords:["bat","vampire","night"]},{emoji:"",name:"bug",category:"animals",keywords:["bug","insect","crawl"]},{emoji:"🦋",name:"butterfly",category:"animals",keywords:["butterfly","beautiful","fly"]},{emoji:"🐌",name:"snail",category:"animals",keywords:["snail","slow","shell"]},{emoji:"🐞",name:"lady beetle",category:"animals",keywords:["ladybug","beetle","red"]},{emoji:"🐜",name:"ant",category:"animals",keywords:["ant","work","colony"]},{emoji:"🦟",name:"mosquito",category:"animals",keywords:["mosquito","bite","buzz"]},{emoji:"🕷️",name:"spider",category:"animals",keywords:["spider","web","eight legs"]},{emoji:"🦂",name:"scorpion",category:"animals",keywords:["scorpion","sting","desert"]},{emoji:"🐢",name:"turtle",category:"animals",keywords:["turtle","slow","shell"]},{emoji:"🐍",name:"snake",category:"animals",keywords:["snake","slither","reptile"]},{emoji:"🦎",name:"lizard",category:"animals",keywords:["lizard","gecko","reptile"]},{emoji:"🐙",name:"octopus",category:"animals",keywords:["octopus","tentacles","sea"]},{emoji:"🦑",name:"squid",category:"animals",keywords:["squid","tentacles","ocean"]},{emoji:"🦐",name:"shrimp",category:"animals",keywords:["shrimp","seafood","small"]},{emoji:"🦞",name:"lobster",category:"animals",keywords:["lobster","claws","red"]},{emoji:"🦀",name:"crab",category:"animals",keywords:["crab","claws","beach"]},{emoji:"🐡",name:"blowfish",category:"animals",keywords:["blowfish","puffer","spiky"]},{emoji:"🐠",name:"tropical fish",category:"animals",keywords:["fish","tropical","colorful"]},{emoji:"🐟",name:"fish",category:"animals",keywords:["fish","swim","water"]},{emoji:"🐬",name:"dolphin",category:"animals",keywords:["dolphin","smart","ocean"]},{emoji:"🐳",name:"spouting whale",category:"animals",keywords:["whale","spout","big"]},{emoji:"🐋",name:"whale",category:"animals",keywords:["whale","ocean","huge"]},{emoji:"🦈",name:"shark",category:"animals",keywords:["shark","teeth","dangerous"]},{emoji:"🐊",name:"crocodile",category:"animals",keywords:["crocodile","teeth","swamp"]},{emoji:"🌸",name:"cherry blossom",category:"animals",keywords:["flower","spring","pink"]},{emoji:"💐",name:"bouquet",category:"animals",keywords:["flowers","bouquet","gift"]},{emoji:"🌺",name:"hibiscus",category:"animals",keywords:["flower","tropical","red"]},{emoji:"🌻",name:"sunflower",category:"animals",keywords:["sunflower","yellow","big"]},{emoji:"🌹",name:"rose",category:"animals",keywords:["rose","love","red"]},{emoji:"🥀",name:"wilted flower",category:"animals",keywords:["flower","wilted","sad"]},{emoji:"🌷",name:"tulip",category:"animals",keywords:["tulip","spring","netherlands"]},{emoji:"🌼",name:"daisy",category:"animals",keywords:["daisy","white","simple"]},{emoji:"🌱",name:"seedling",category:"animals",keywords:["plant","grow","green"]},{emoji:"🌿",name:"herb",category:"animals",keywords:["herb","green","leaf"]},{emoji:"🍀",name:"four leaf clover",category:"animals",keywords:["clover","luck","green"]},{emoji:"🌳",name:"deciduous tree",category:"animals",keywords:["tree","nature","green"]},{emoji:"🌲",name:"evergreen tree",category:"animals",keywords:["tree","pine","christmas"]},{emoji:"🌴",name:"palm tree",category:"animals",keywords:["palm","tropical","beach"]},{emoji:"🌵",name:"cactus",category:"animals",keywords:["cactus","desert","spiky"]},{emoji:"🍎",name:"red apple",category:"food",keywords:["apple","fruit"]},{emoji:"🍊",name:"tangerine",category:"food",keywords:["orange","fruit"]},{emoji:"🍋",name:"lemon",category:"food",keywords:["lemon","fruit"]},{emoji:"🍌",name:"banana",category:"food",keywords:["banana","fruit"]},{emoji:"🍉",name:"watermelon",category:"food",keywords:["watermelon","fruit"]},{emoji:"🍇",name:"grapes",category:"food",keywords:["grapes","fruit"]},{emoji:"🍓",name:"strawberry",category:"food",keywords:["strawberry","fruit"]},{emoji:"🫐",name:"blueberries",category:"food",keywords:["blueberry","fruit"]},{emoji:"🥝",name:"kiwi fruit",category:"food",keywords:["kiwi","fruit","green"]},{emoji:"🍅",name:"tomato",category:"food",keywords:["tomato","red","vegetable"]},{emoji:"🫒",name:"olive",category:"food",keywords:["olive","green","oil"]},{emoji:"🥥",name:"coconut",category:"food",keywords:["coconut","tropical","milk"]},{emoji:"🥑",name:"avocado",category:"food",keywords:["avocado","green","healthy"]},{emoji:"🍆",name:"eggplant",category:"food",keywords:["eggplant","purple","vegetable"]},{emoji:"🥔",name:"potato",category:"food",keywords:["potato","vegetable","starch"]},{emoji:"🥕",name:"carrot",category:"food",keywords:["carrot","orange","vegetable"]},{emoji:"🌽",name:"ear of corn",category:"food",keywords:["corn","yellow","vegetable"]},{emoji:"🌶️",name:"hot pepper",category:"food",keywords:["pepper","hot","spicy"]},{emoji:"🫑",name:"bell pepper",category:"food",keywords:["pepper","bell","vegetable"]},{emoji:"🥒",name:"cucumber",category:"food",keywords:["cucumber","green","vegetable"]},{emoji:"🥬",name:"leafy greens",category:"food",keywords:["lettuce","greens","salad"]},{emoji:"🥦",name:"broccoli",category:"food",keywords:["broccoli","green","vegetable"]},{emoji:"🧄",name:"garlic",category:"food",keywords:["garlic","flavor","cooking"]},{emoji:"🧅",name:"onion",category:"food",keywords:["onion","cry","cooking"]},{emoji:"🍄",name:"mushroom",category:"food",keywords:["mushroom","fungi","cooking"]},{emoji:"🥜",name:"peanuts",category:"food",keywords:["peanuts","nuts","snack"]},{emoji:"🌰",name:"chestnut",category:"food",keywords:["chestnut","nut","autumn"]},{emoji:"🍞",name:"bread",category:"food",keywords:["bread","loaf","carbs"]},{emoji:"🥐",name:"croissant",category:"food",keywords:["croissant","french","pastry"]},{emoji:"🥖",name:"baguette bread",category:"food",keywords:["baguette","french","bread"]},{emoji:"🫓",name:"flatbread",category:"food",keywords:["flatbread","bread","thin"]},{emoji:"🥨",name:"pretzel",category:"food",keywords:["pretzel","twisted","snack"]},{emoji:"🥯",name:"bagel",category:"food",keywords:["bagel","round","breakfast"]},{emoji:"🥞",name:"pancakes",category:"food",keywords:["pancakes","breakfast","syrup"]},{emoji:"🧇",name:"waffle",category:"food",keywords:["waffle","breakfast","squares"]},{emoji:"🧀",name:"cheese wedge",category:"food",keywords:["cheese","dairy","yellow"]},{emoji:"🍖",name:"meat on bone",category:"food",keywords:["meat","bone","protein"]},{emoji:"🍗",name:"poultry leg",category:"food",keywords:["chicken","leg","meat"]},{emoji:"🥩",name:"cut of meat",category:"food",keywords:["steak","meat","red"]},{emoji:"🥓",name:"bacon",category:"food",keywords:["bacon","pork","breakfast"]},{emoji:"🍔",name:"hamburger",category:"food",keywords:["burger","hamburger","fast food"]},{emoji:"🍟",name:"french fries",category:"food",keywords:["fries","potato","fast food"]},{emoji:"🍕",name:"pizza",category:"food",keywords:["pizza","slice","italian"]},{emoji:"🌭",name:"hot dog",category:"food",keywords:["hot dog","sausage","fast food"]},{emoji:"🥪",name:"sandwich",category:"food",keywords:["sandwich","bread","lunch"]},{emoji:"🌮",name:"taco",category:"food",keywords:["taco","mexican","shell"]},{emoji:"🌯",name:"burrito",category:"food",keywords:["burrito","wrap","mexican"]},{emoji:"🫔",name:"tamale",category:"food",keywords:["tamale","mexican","corn"]},{emoji:"🥙",name:"stuffed flatbread",category:"food",keywords:["pita","flatbread","stuffed"]},{emoji:"🧆",name:"falafel",category:"food",keywords:["falafel","middle eastern","chickpea"]},{emoji:"🥚",name:"egg",category:"food",keywords:["egg","protein","breakfast"]},{emoji:"🍳",name:"cooking",category:"food",keywords:["cooking","frying pan","egg"]},{emoji:"🥘",name:"shallow pan of food",category:"food",keywords:["paella","pan","cooking"]},{emoji:"🍲",name:"pot of food",category:"food",keywords:["stew","pot","cooking"]},{emoji:"🫕",name:"fondue",category:"food",keywords:["fondue","cheese","pot"]},{emoji:"🥣",name:"bowl with spoon",category:"food",keywords:["bowl","cereal","soup"]},{emoji:"🥗",name:"green salad",category:"food",keywords:["salad","healthy","greens"]},{emoji:"🍿",name:"popcorn",category:"food",keywords:["popcorn","movie","snack"]},{emoji:"🧈",name:"butter",category:"food",keywords:["butter","dairy","spread"]},{emoji:"🧂",name:"salt",category:"food",keywords:["salt","seasoning","white"]},{emoji:"🥫",name:"canned food",category:"food",keywords:["can","canned","preserved"]},{emoji:"🍱",name:"bento box",category:"food",keywords:["bento","japanese","lunch box"]},{emoji:"🍘",name:"rice cracker",category:"food",keywords:["rice","cracker","japanese"]},{emoji:"🍙",name:"rice ball",category:"food",keywords:["rice ball","onigiri","japanese"]},{emoji:"🍚",name:"cooked rice",category:"food",keywords:["rice","cooked","bowl"]},{emoji:"🍛",name:"curry rice",category:"food",keywords:["curry","rice","spicy"]},{emoji:"🍜",name:"steaming bowl",category:"food",keywords:["ramen","noodles","soup"]},{emoji:"🍝",name:"spaghetti",category:"food",keywords:["spaghetti","pasta","italian"]},{emoji:"🍠",name:"roasted sweet potato",category:"food",keywords:["sweet potato","roasted","orange"]},{emoji:"🍢",name:"oden",category:"food",keywords:["oden","japanese","skewer"]},{emoji:"🍣",name:"sushi",category:"food",keywords:["sushi","japanese","fish"]},{emoji:"🍤",name:"fried shrimp",category:"food",keywords:["shrimp","fried","tempura"]},{emoji:"🍥",name:"fish cake with swirl",category:"food",keywords:["fish cake","japanese","swirl"]},{emoji:"🥮",name:"moon cake",category:"food",keywords:["moon cake","chinese","festival"]},{emoji:"🍡",name:"dango",category:"food",keywords:["dango","japanese","sweet"]},{emoji:"🥟",name:"dumpling",category:"food",keywords:["dumpling","chinese","steamed"]},{emoji:"🥠",name:"fortune cookie",category:"food",keywords:["fortune cookie","chinese","luck"]},{emoji:"🥡",name:"takeout box",category:"food",keywords:["takeout","chinese","box"]},{emoji:"🦀",name:"crab",category:"food",keywords:["crab","seafood","claws"]},{emoji:"🦞",name:"lobster",category:"food",keywords:["lobster","seafood","red"]},{emoji:"🦐",name:"shrimp",category:"food",keywords:["shrimp","seafood","small"]},{emoji:"🦑",name:"squid",category:"food",keywords:["squid","seafood","tentacles"]},{emoji:"🦪",name:"oyster",category:"food",keywords:["oyster","seafood","shell"]},{emoji:"🍦",name:"soft ice cream",category:"food",keywords:["ice cream","soft serve","cone"]},{emoji:"🍧",name:"shaved ice",category:"food",keywords:["shaved ice","snow cone","cold"]},{emoji:"🍨",name:"ice cream",category:"food",keywords:["ice cream","dessert","cold"]},{emoji:"🍩",name:"doughnut",category:"food",keywords:["donut","doughnut","sweet"]},{emoji:"🍪",name:"cookie",category:"food",keywords:["cookie","sweet","baked"]},{emoji:"🎂",name:"birthday cake",category:"food",keywords:["cake","birthday","celebration"]},{emoji:"🍰",name:"shortcake",category:"food",keywords:["cake","slice","dessert"]},{emoji:"🧁",name:"cupcake",category:"food",keywords:["cupcake","muffin","sweet"]},{emoji:"🥧",name:"pie",category:"food",keywords:["pie","dessert","slice"]},{emoji:"🍫",name:"chocolate bar",category:"food",keywords:["chocolate","bar","sweet"]},{emoji:"🍬",name:"candy",category:"food",keywords:["candy","sweet","wrapper"]},{emoji:"🍭",name:"lollipop",category:"food",keywords:["lollipop","candy","stick"]},{emoji:"🍮",name:"custard",category:"food",keywords:["custard","pudding","dessert"]},{emoji:"🍯",name:"honey pot",category:"food",keywords:["honey","sweet","bee"]},{emoji:"🍼",name:"baby bottle",category:"food",keywords:["bottle","baby","milk"]},{emoji:"🥛",name:"glass of milk",category:"food",keywords:["milk","glass","dairy"]},{emoji:"☕",name:"hot beverage",category:"food",keywords:["coffee","tea","hot"]},{emoji:"🫖",name:"teapot",category:"food",keywords:["teapot","tea","hot"]},{emoji:"🍵",name:"teacup without handle",category:"food",keywords:["tea","green tea","cup"]},{emoji:"🍶",name:"sake",category:"food",keywords:["sake","japanese","alcohol"]},{emoji:"🍾",name:"bottle with popping cork",category:"food",keywords:["champagne","celebration","cork"]},{emoji:"🍷",name:"wine glass",category:"food",keywords:["wine","glass","alcohol"]},{emoji:"🍸",name:"cocktail glass",category:"food",keywords:["cocktail","martini","alcohol"]},{emoji:"🍹",name:"tropical drink",category:"food",keywords:["tropical","cocktail","umbrella"]},{emoji:"🍺",name:"beer mug",category:"food",keywords:["beer","mug","alcohol"]},{emoji:"🍻",name:"clinking beer mugs",category:"food",keywords:["beer","cheers","celebration"]},{emoji:"🥂",name:"clinking glasses",category:"food",keywords:["champagne","cheers","celebration"]},{emoji:"🥃",name:"tumbler glass",category:"food",keywords:["whiskey","tumbler","alcohol"]},{emoji:"🫗",name:"pouring liquid",category:"food",keywords:["pour","liquid","drink"]},{emoji:"🥤",name:"cup with straw",category:"food",keywords:["soda","straw","drink"]},{emoji:"🧋",name:"bubble tea",category:"food",keywords:["bubble tea","boba","drink"]},{emoji:"🧃",name:"beverage box",category:"food",keywords:["juice box","drink","straw"]},{emoji:"🧉",name:"mate",category:"food",keywords:["mate","tea","south american"]},{emoji:"🧊",name:"ice",category:"food",keywords:["ice","cold","cube"]},{emoji:"⚽",name:"soccer ball",category:"activities",keywords:["soccer","football","sport"]},{emoji:"🏀",name:"basketball",category:"activities",keywords:["basketball","sport"]},{emoji:"🏈",name:"american football",category:"activities",keywords:["football","sport"]},{emoji:"⚾",name:"baseball",category:"activities",keywords:["baseball","sport"]},{emoji:"🥎",name:"softball",category:"activities",keywords:["softball","sport"]},{emoji:"🎾",name:"tennis",category:"activities",keywords:["tennis","sport"]},{emoji:"🚗",name:"automobile",category:"travel",keywords:["car","vehicle"]},{emoji:"🚕",name:"taxi",category:"travel",keywords:["taxi","car"]},{emoji:"🚙",name:"sport utility vehicle",category:"travel",keywords:["suv","car"]},{emoji:"🚌",name:"bus",category:"travel",keywords:["bus","vehicle"]},{emoji:"🚎",name:"trolleybus",category:"travel",keywords:["trolley","bus"]},{emoji:"🏎️",name:"racing car",category:"travel",keywords:["race","car","fast"]},{emoji:"💡",name:"light bulb",category:"objects",keywords:["idea","light","bulb"]},{emoji:"🔋",name:"battery",category:"objects",keywords:["battery","power"]},{emoji:"🖥️",name:"desktop computer",category:"objects",keywords:["computer","desktop"]},{emoji:"💻",name:"laptop",category:"objects",keywords:["laptop","computer"]},{emoji:"📱",name:"mobile phone",category:"objects",keywords:["phone","mobile"]},{emoji:"☎️",name:"telephone",category:"objects",keywords:["phone","telephone"]},{emoji:"❤️",name:"red heart",category:"symbols",keywords:["love","heart"]},{emoji:"🧡",name:"orange heart",category:"symbols",keywords:["love","heart"]},{emoji:"💛",name:"yellow heart",category:"symbols",keywords:["love","heart"]},{emoji:"💚",name:"green heart",category:"symbols",keywords:["love","heart"]},{emoji:"💙",name:"blue heart",category:"symbols",keywords:["love","heart"]},{emoji:"💜",name:"purple heart",category:"symbols",keywords:["love","heart"]},{emoji:"🖤",name:"black heart",category:"symbols",keywords:["love","heart"]},{emoji:"🤍",name:"white heart",category:"symbols",keywords:["love","heart"]},{emoji:"🏁",name:"chequered flag",category:"flags",keywords:["flag","race","finish"]},{emoji:"🚩",name:"triangular flag",category:"flags",keywords:["flag","warning"]},{emoji:"🏳️",name:"white flag",category:"flags",keywords:["flag","surrender"]},{emoji:"🏴",name:"black flag",category:"flags",keywords:["flag","pirate"]},{emoji:"🏳️‍🌈",name:"rainbow flag",category:"flags",keywords:["flag","rainbow","pride"]}],Ll=e=>{const{value:o,defaultValue:t="",onChange:n,onEmojiSelect:a,isOpen:l,onOpen:c,onClose:s,closeOnSelect:d=!0,maxRecentEmojis:g=16,showRecentEmojis:m=!0,enabledCategories:f=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],customEmojis:p=[]}=e,[u,y]=h.useState(l??!1),[k,x]=h.useState(o??t),[C,S]=h.useState(""),[w,v]=h.useState("smileys"),[b,I]=h.useState([]),T=h.useRef(null),j=h.useRef(null),E=h.useMemo(()=>[...nm,...p],[p]),D=h.useMemo(()=>{let M=E;if(w!=="recent"?M=M.filter(L=>L.category===w):M=b,C){const L=C.toLowerCase();M=M.filter(_=>_.name.toLowerCase().includes(L)||_.keywords.some(O=>O.toLowerCase().includes(L)))}return M},[E,w,b,C]);h.useEffect(()=>{o!==void 0&&x(o)},[o]),h.useEffect(()=>{l!==void 0&&y(l)},[l]),h.useEffect(()=>{if(m&&typeof localStorage<"u"){const M=localStorage.getItem("emojiPicker-recentEmojis");if(M)try{I(JSON.parse(M))}catch{}}},[m]),h.useEffect(()=>{if(typeof document>"u")return;const M=L=>{u&&T.current&&j.current&&!T.current.contains(L.target)&&!j.current.contains(L.target)&&V()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[u]);const W=h.useCallback(M=>{m&&I(L=>{const _=L.filter(N=>N.emoji!==M.emoji),O=[M,..._].slice(0,g);return typeof localStorage<"u"&&localStorage.setItem("emojiPicker-recentEmojis",JSON.stringify(O)),O})},[m,g]),A=h.useCallback(()=>{const M=!u;y(M),M?(c==null||c(),S(""),m&&b.length>0?v("recent"):v("smileys")):s==null||s()},[u,c,s,m,b.length]),H=h.useCallback(M=>{x(M.emoji),W(M),n==null||n(M.emoji),a==null||a(M),d&&(y(!1),s==null||s())},[n,a,d,s,W]),z=h.useCallback(M=>{S(M),M&&w==="recent"&&v("smileys")},[w]),P=h.useCallback(M=>{v(M),S("")},[]),V=h.useCallback(()=>{y(!1),s==null||s()},[s]);return{isOpen:u,selectedEmoji:k,recentEmojis:b,searchQuery:C,activeCategory:w,filteredEmojis:D,handleToggle:A,handleEmojiSelect:H,handleSearchChange:z,handleCategoryChange:P,handleClose:V,triggerRef:T,dropdownRef:j}},_l=({id:e,name:o,label:t,placeholder:n="Select an emoji",helperText:a,views:l={},size:c="md",shape:s="default",variant:d="default",error:g=!1,isDisabled:m=!1,isReadOnly:f=!1,showSearch:p=!0,showCategories:u=!0,showRecentEmojis:y=!0,enabledCategories:k=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],isOpen:x,selectedEmoji:C,recentEmojis:S,searchQuery:w,activeCategory:v,filteredEmojis:b,handleToggle:I,handleEmojiSelect:T,handleSearchChange:j,handleCategoryChange:E,handleClose:D,triggerRef:W,dropdownRef:A,onChange:H,onOpen:z,onClose:P,onEmojiSelect:V,customEmojis:M,closeOnSelect:L,maxRecentEmojis:_,value:O,defaultValue:N,...U})=>{const{getColor:X}=i.useTheme(),oe={...to.container,...l==null?void 0:l.container},B={...to.trigger,...em[c],...om[s],...rm[d],...g&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...!m&&!f&&{_hover:{borderColor:"color-gray-300"}},...l==null?void 0:l.trigger},$={...to.dropdown,...l==null?void 0:l.dropdown},q={...to.categoryTabs,...l==null?void 0:l.categoryTabs},J={...to.emojiGrid,...l==null?void 0:l.emojiGrid},Y=k.filter(Z=>Z==="recent"?y&&S.length>0:!0);return r.jsxs(i.View,{id:e,...oe,...U,children:[t&&r.jsx(i.Text,{fontSize:c==="xs"?"12px":c==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...l==null?void 0:l.label,children:t}),r.jsxs(i.View,{ref:W,onClick:m||f?void 0:I,...B,children:[r.jsx(i.Horizontal,{alignItems:"center",gap:8,children:r.jsx(i.Text,{color:C?"color-gray-800":"color-gray-500",fontSize:"inherit",children:C||n})}),!f&&!m&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:x?"up":"down"})]}),x&&r.jsxs(i.View,{ref:A,...$,children:[p&&r.jsx(i.View,{...to.searchInput,...l==null?void 0:l.searchInput,children:r.jsx(je,{placeholder:"Search emojis...",value:w,onChange:j,size:"sm"})}),u&&r.jsx(i.View,{...q,children:Y.map(Z=>r.jsx(i.View,{...to.categoryTab,...v===Z&&{borderBottomColor:"theme-primary",color:"theme-primary",backgroundColor:"color-blue-50"},onClick:()=>E(Z),title:Z.charAt(0).toUpperCase()+Z.slice(1),...l==null?void 0:l.categoryTab,children:tm[Z]},Z))}),r.jsx(i.View,{...J,children:b.length>0?b.map((Z,ee)=>r.jsx(i.View,{...to.emoji,onClick:()=>T(Z),title:Z.name,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},color:"color-gray-800",...l==null?void 0:l.emoji,children:Z.emoji},`${Z.emoji}-${ee}`)):r.jsx(i.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:w?"No emojis found":"No emojis in this category"})})})]}),a&&r.jsx(i.Text,{color:g?"color-red-500":"color-gray-600",marginTop:"4px",...l==null?void 0:l.helperText,children:a})]})},am=e=>{const o=xe(e),t={...e,value:o.value??e.value??e.defaultValue},n=Ll(t),a=l=>{var c;n.handleEmojiSelect(l),o.onChange(l.emoji),(c=e.onEmojiSelect)==null||c.call(e,l)};return r.jsx(_l,{...n,...t,handleEmojiSelect:a})},lm=({files:e,onRemove:o,maxHeight:t="120px",views:n={}})=>{if(e.length===0)return null;const a=h.useCallback(l=>l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(1)} KB`:`${(l/(1024*1024)).toFixed(1)} MB`,[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:t,overflowY:"auto",...n==null?void 0:n.container,children:e.map((l,c)=>{const s=l.url||"",d=l.type.startsWith("image/"),g=l.type.startsWith("video/"),m=l.type.startsWith("audio/");return r.jsx(i.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",position:"relative",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...n==null?void 0:n.item,children:r.jsxs(Me,{children:[r.jsx(Me.Trigger,{children:r.jsxs(i.View,{position:"relative",children:[d&&s&&r.jsx(i.Image,{src:s,alt:l.name,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),g&&s&&r.jsx(i.View,{as:"video",src:s,alt:l.name,controls:!1,muted:!0,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),m&&r.jsx(i.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(Fo,{widthHeight:24,color:"color-black"})}),!d&&!g&&!m&&r.jsx(i.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(go,{widthHeight:24,color:"color-black"})}),o&&r.jsx(i.Button,{position:"absolute",top:"-4px",right:"-4px",width:"20px",height:"20px",minWidth:"20px",minHeight:"20px",borderRadius:"50%",backgroundColor:"color-red-500",color:"white",fontSize:14,fontWeight:"bold",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"2px solid white",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"#DC2626"},onClick:f=>{f.stopPropagation(),o(c)},"aria-label":`Remove ${l.name}`,children:"×"})]})}),r.jsxs(Me.Content,{children:[d&&s&&r.jsx(i.Image,{src:s,alt:l.name,maxWidth:"300px"}),g&&s&&r.jsx(i.View,{as:"video",src:s,controls:!0,maxWidth:"300px"}),m&&s&&r.jsx(i.View,{as:"audio",src:s,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",fontSize:12,...n==null?void 0:n.name,children:[l.name," (",a(l.size),")"]})]})]})},c)})})},Bl=e=>{const o=pe("slider",e),t=vl(o);return r.jsx(Ml,{...o,...t})},im=({url:e,type:o,name:t,onOpen:n})=>{const a=o.toLowerCase(),l=a.startsWith("image"),c=a.startsWith("video"),s=a.startsWith("audio"),d=()=>{n&&n()};return r.jsxs(i.View,{width:"60px",height:"60px",flexShrink:0,borderRadius:"4px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-gray-200",cursor:"pointer",onClick:d,children:[l&&r.jsx(i.Image,{src:e,alt:t,width:"100%",height:"100%",objectFit:"cover"}),c&&r.jsx(i.View,{as:"video",src:e,controls:!0,width:"100%",height:"100%",style:{objectFit:"cover"},onClick:g=>g.stopPropagation()}),s&&r.jsx(i.View,{as:"audio",controls:!0,src:e,width:"100%",onClick:g=>g.stopPropagation()}),!l&&!c&&!s&&r.jsx(go,{widthHeight:24,color:"color-gray-600"})]})},no=vo.create(e=>({modals:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,modals:[...a.modals,{name:o,props:{...t,isVisible:!0},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,modals:t.modals.filter(n=>n.name!==o)}:{modals:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),cm=(e,o={},t={})=>{no.getState().show(e,o,t),no.getState().onShow(e,o)},Jt=e=>{no.getState().onHide(e),no.getState().hide(typeof e=="string"?e:void 0)},sm={square:{borderRadius:0},rounded:{borderRadius:8}},dm={center:{justifyContent:"center",alignItems:"center"},top:{justifyContent:"center",alignItems:"flex-start"},right:{justifyContent:"flex-end",alignItems:"center"},bottom:{justifyContent:"center",alignItems:"flex-end"},left:{justifyContent:"flex-start",alignItems:"center"}},gm={xs:12,sm:16,md:20,lg:24,xl:28},Qt={body:{fontSize:"16px",fontWeight:"400",color:"color-gray-700"}},Ol=h.memo(({children:e,blur:o,isOpen:t=!1,isClosePrevented:n=!1,onClose:a=()=>{},position:l="center",views:c,...s})=>{const d=h.useCallback(()=>{n||a()},[n,a]);return r.jsx(i.Center,{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1e3,onClick:d,visibility:t?"visible":"hidden",opacity:t?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease",...c==null?void 0:c.container,children:r.jsx(i.View,{position:"absolute",top:0,left:0,zIndex:1e3,width:"100vw",height:"100vh",display:"flex",backgroundColor:"color-dark-50-360",backdropFilter:o?`blur(${o}px)`:void 0,transition:"background-color 0.2s ease, backdrop-filter 0.2s ease",onClick:d,...dm[l],...s,...c==null?void 0:c.view,children:e})})}),hm={boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.15)"},fm={elevation:5,shadowColor:"rgba(0, 0, 0, 0.15)",shadowOffset:{width:0,height:4},shadowOpacity:1,shadowRadius:16},mm=h.memo(({children:e,shadow:o,isFullScreen:t=!1,shape:n="rounded",views:a,isOpen:l=!0,position:c,...s})=>{const d=typeof document!==void 0?hm:fm,g=h.useCallback(m=>{m&&m.stopPropagation&&m.stopPropagation()},[]);return r.jsx(i.Vertical,{cursor:"default",backgroundColor:"color-white",width:t?"100%":600,height:t?"100%":"fit-content",onClick:g,transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",opacity:l?1:0,transform:l?"translateY(0)":"translateY(8px)",...o||d,...sm[n],media:{mobile:{width:"90%",maxWidth:"100%",margin:"16px"}},...s,...a==null?void 0:a.container,children:e})}),pm=h.memo(({children:e,buttonColor:o="theme-primary",iconSize:t="md",buttonSize:n,buttonPosition:a="right",views:l,onClose:c,...s})=>{const d=c||Jt,g=r.jsx(i.View,{onClick:()=>d(),children:r.jsx(He,{widthHeight:gm[n??t],color:o})});return r.jsxs(i.Horizontal,{justifyContent:a==="none"?"center":"space-between",alignItems:"center",paddingVertical:16,paddingHorizontal:24,borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",media:{mobile:{paddingVertical:12,paddingHorizontal:16}},...s,...l==null?void 0:l.header,children:[a==="left"&&g,e,a==="right"&&g]})}),um=h.memo(({children:e,views:o,...t})=>r.jsx(i.View,{paddingVertical:16,paddingHorizontal:24,fontSize:Qt.body.fontSize,fontWeight:Qt.body.fontWeight,color:Qt.body.color,media:{mobile:{paddingVertical:12,paddingHorizontal:16,fontSize:"14px"}},...t,...o==null?void 0:o.view,children:e})),ym=h.memo(({children:e,views:o,...t})=>r.jsx(i.Horizontal,{marginTop:"auto",alignItems:"center",justifyContent:"flex-end",paddingVertical:16,paddingHorizontal:24,borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",gap:12,media:{mobile:{paddingVertical:12,paddingHorizontal:16,gap:8}},...t,...o==null?void 0:o.container,children:e})),Zt=({modals:e,onShow:o,onHide:t})=>{const n=no(a=>a.modals);return h.useEffect(()=>{o&&no.getState().setOnShow(o)},[o]),h.useEffect(()=>{t&&no.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(h.Fragment,{children:n.map((a,l)=>{const c=e[a.name];return c?r.jsx(Ol,{isOpen:a.props.isVisible,onClose:()=>Jt(a.name),blur:5,...a.overlayProps,style:{zIndex:1e3+l},children:r.jsx(c,{...a.props})},l):(console.error(`${a.name} modal doesn't exist`),null)})})},uo=({children:e})=>r.jsx(r.Fragment,{children:e});uo.Overlay=Ol,uo.Container=mm,uo.Header=pm,uo.Body=um,uo.Footer=ym,uo.Layout=Zt;const Nl={xs:"320px",sm:"380px",md:"480px",lg:"640px",xl:"768px",full:"100%"},bm={left:{top:0,left:0,bottom:0,height:"100vh",borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{top:0,right:0,bottom:0,height:"100vh",borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"},top:{top:0,left:0,right:0,width:"100vw",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},bottom:{bottom:0,left:0,right:0,width:"100vw",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200"}},Rt=({isOpen:e,onClose:o,isClosePrevented:t,blur:n,children:a,...l})=>{const c=()=>{t||o()};return h.useEffect(()=>{const s=d=>{d.key==="Escape"&&e&&!t&&o()};return e&&document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}},[e,t,o]),r.jsx(i.View,{"data-testid":"drawer-overlay",role:"dialog","aria-modal":"true",position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,visibility:e?"visible":"hidden",onClick:c,opacity:e?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease",backgroundColor:e?"color-dark-50-360":"transparent",backdropFilter:n?`blur(${n}px)`:void 0,pointerEvents:e?"auto":"none",...l,children:a})},en=({placement:e="right",size:o="md",isOpen:t=!1,children:n,...a})=>{const l=m=>{m.stopPropagation()},s=e==="top"||e==="bottom"?{height:o==="full"?"100vh":Nl[o]||o,maxHeight:"100vh"}:{width:o==="full"?"100vw":Nl[o]||o,maxWidth:"100vw"},d=e==="left"?"0 12px 12px 0":e==="right"?"12px 0 0 12px":e==="top"?"0 0 12px 12px":"12px 12px 0 0",g=t?"translate3d(0, 0, 0)":e==="left"?"translate3d(-100%, 0, 0)":e==="right"?"translate3d(100%, 0, 0)":e==="top"?"translate3d(0, -100%, 0)":"translate3d(0, 100%, 0)";return r.jsx(i.Vertical,{position:"absolute",backgroundColor:"color-white",borderRadius:d,...bm[e],...s,onClick:l,transform:g,willChange:"transform",transition:"transform 0.24s ease, box-shadow 0.2s ease",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",...a,children:n})},xm=({children:e,onClose:o,buttonPosition:t="right",...n})=>{const a=o&&r.jsx(i.View,{onClick:o,cursor:"pointer",padding:8,children:r.jsx(He,{widthHeight:20,color:"color-gray-500"})});return r.jsxs(i.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderBottomWidth:"1px",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:t==="none"?"center":"space-between",...n,children:[t==="left"&&a,e,t==="right"&&a]})},km=({children:e,...o})=>r.jsx(i.Vertical,{padding:24,flex:1,overflowY:"auto",...o,children:e}),Cm=({children:e,...o})=>r.jsx(i.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderTopWidth:"1px",borderTopColor:"color-gray-200",alignItems:"center",justifyContent:"flex-end",gap:12,...o,children:e}),ao=vo.create(e=>({drawers:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,drawers:[...a.drawers,{name:o,props:{...t,isOpen:!1},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,drawers:t.drawers.filter(n=>n.name!==o)}:{drawers:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),wm=(e,o={},t={})=>{const n=ao.getState();n.hide(e),n.show(e,o,t),n.onShow(e,o),queueMicrotask(()=>{ao.setState(a=>({drawers:a.drawers.map(l=>l.name===e?{...l,props:{...l.props,isOpen:!0}}:l)}))})},ql=e=>{ao.getState().onHide(e),ao.getState().hide(typeof e=="string"?e:void 0)},Sm=({drawers:e,onShow:o,onHide:t})=>{const n=ao(a=>a.drawers);return h.useEffect(()=>{o&&ao.getState().setOnShow(o)},[o]),h.useEffect(()=>{t&&ao.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(h.Fragment,{children:n.map((a,l)=>{var u;const c=e[a.name];if(!c)return console.error(`${a.name} drawer doesn't exist`),null;const{placement:s,size:d,isClosePrevented:g,blur:m,containerProps:f,...p}=a.props||{};return r.jsx(Rt,{isOpen:a.props.isOpen,onClose:()=>ql(a.name),isClosePrevented:g,blur:m,...a.overlayProps,style:{zIndex:1e3+l,...((u=a.overlayProps)==null?void 0:u.style)||{}},children:r.jsx(en,{placement:s,size:d,isOpen:a.props.isOpen,...f||{},children:r.jsx(h.Suspense,{fallback:null,children:r.jsx(c,{...p})})})},l)})})},yo=({isOpen:e,onClose:o,placement:t="right",size:n="md",isClosePrevented:a,children:l,...c})=>r.jsx(Rt,{isOpen:e,onClose:o,isClosePrevented:a,...c,children:r.jsx(en,{placement:t,size:n,isOpen:e,children:l})});yo.Overlay=Rt,yo.Container=en,yo.Header=xm,yo.Body=km,yo.Footer=Cm,yo.Layout=Sm;const Ul=({behavior:e,keyboardVerticalOffset:o,dismissOnTap:t,enabled:n,children:a,...l})=>r.jsx(i.View,{flex:1,width:"100%",...l,children:a}),vm=({header:e,footer:o,children:t,isLoading:n=!1,safe:a=!0,scrollable:l=!0,dismissKeyboardOnTap:c=!0,keyboardVerticalOffset:s=0,views:d={},backgroundColor:g="color-white",...m})=>{const f=a?i.SafeArea:i.View,p=i.isBrowser()?{}:{keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:!1,contentContainerStyle:{flexGrow:1}},u=n?r.jsx(i.Center,{flex:1,width:"100%",...d.content,children:r.jsx(eo,{})}):l?r.jsx(i.Scroll,{flex:1,width:"100%",...p,...d.content,children:t}):r.jsx(i.View,{flex:1,width:"100%",...d.content,children:t});return r.jsxs(f,{flex:1,height:"100%",width:"100%",flexDirection:"column",backgroundColor:g,...m,...d.container,children:[e!=null&&r.jsx(i.View,{width:"100%",flexShrink:0,...d.header,children:e}),r.jsxs(Ul,{flexDirection:"column",dismissOnTap:c,keyboardVerticalOffset:s,children:[u,o!=null&&r.jsx(i.View,{width:"100%",flexShrink:0,...d.footer,children:o})]})]})},Nr=vo.create(e=>({started:!1,loaded:!1,setStarted:(o=!0)=>e({started:o}),setLoaded:(o=!0)=>e({loaded:o}),reset:()=>e({started:!1,loaded:!1})})),Tm=(e=!0)=>Nr.getState().setLoaded(e),Im=(e=!0)=>Nr.getState().setStarted(e),Fm=({logo:e,logoSrc:o,loader:t,showLoader:n=!0,duration:a=600,isLoaded:l,onHidden:c,backgroundColor:s="color-white",children:d,...g})=>{const m=Nr(w=>w.loaded),f=l!==void 0?l:m,[p,u]=h.useState(!0),[y,k]=h.useState(!1);if(h.useEffect(()=>{if(!f||y)return;k(!0);const w=setTimeout(()=>{u(!1),c==null||c()},a);return()=>clearTimeout(w)},[f,y,a,c]),!p)return null;const x=i.isBrowser()?"fixed":"absolute",C=y?i.Animation.fadeOut({duration:`${a}ms`}):void 0,S=e??(o?r.jsx(i.Image,{src:o,width:120,height:120,alt:"logo"}):null);return r.jsxs(i.Center,{position:x,top:0,left:0,right:0,bottom:0,zIndex:9999,backgroundColor:s,animate:C,...g,children:[r.jsxs(i.Vertical,{alignItems:"center",gap:24,children:[S,n&&(t??r.jsx(eo,{}))]}),d]})},qe=vo.create((e,o)=>({stack:[{path:"/",params:{}}],index:0,push:(t,n={})=>e(a=>{const l=a.stack.slice(0,a.index+1);return l.push({path:t,params:n}),{stack:l,index:l.length-1}}),replace:(t,n={})=>e(a=>{const l=a.stack.slice();return l[a.index]={path:t,params:n},{stack:l}}),back:()=>{const{index:t}=o();return t<=0?!1:(e({index:t-1}),!0)},go:t=>e(n=>({index:Math.min(Math.max(n.index+t,0),n.stack.length-1)})),reset:(t,n={})=>e({stack:[{path:t,params:n}],index:0})})),zm=(e,o)=>qe.getState().push(e,o),Mm=()=>qe.getState().back(),on=()=>{const e=qe(d=>d.stack),o=qe(d=>d.index),t=qe(d=>d.push),n=qe(d=>d.replace),a=qe(d=>d.back),l=qe(d=>d.go),c=qe(d=>d.reset),s=e[o]||{path:"/",params:{}};return{path:s.path,params:s.params,stack:e,index:o,canGoBack:o>0,push:t,replace:n,back:a,go:l,reset:c,navigate:t}},Gl=(e,o)=>{const t=e.split("/").filter(Boolean),n=o.split("/").filter(Boolean);if(t.length!==n.length)return null;const a={};for(let l=0;l<t.length;l+=1){const c=t[l];if(c.startsWith(":"))a[c.slice(1)]=decodeURIComponent(n[l]);else if(c!==n[l])return null}return a},Wm=e=>Array.isArray(e)?e:Object.entries(e).map(([o,t])=>({path:o,component:t})),Hm=({routes:e,notFound:o})=>{const{path:t,params:n}=on();for(const a of Wm(e)){const l=Gl(a.path,t);if(l){const c=a.component;return r.jsx(c,{...n,...l})}}return o?r.jsx(o,{}):null},jm=({routes:e,notFound:o,initialPath:t,syncBrowserHistory:n=!1})=>{const{path:a,push:l,back:c,reset:s}=on(),d=h.useRef(!1);return i.useMount(()=>{t&&s(t)}),h.useEffect(()=>{if(!(!n||typeof window>"u")){if(d.current){d.current=!1;return}try{window.history.pushState({path:a},"",a)}catch{}}},[a,n]),h.useEffect(()=>{if(!n||typeof window>"u")return;const g=()=>{d.current=!0,c()||(d.current=!1)};return window.addEventListener("popstate",g),()=>window.removeEventListener("popstate",g)},[n,c,l]),r.jsx(Hm,{routes:e,notFound:o})},Pm=(e=null,o=[])=>{const[t,n]=h.useState(e),[a,l]=h.useState(o),c=h.useRef({});return{activeItemId:t,setActiveItemId:n,expandedItemIds:a,toggleExpandedItem:g=>{l(m=>m.includes(g)?m.filter(p=>p!==g):[...m,g])},isItemExpanded:g=>a.includes(g),triggerRefs:c}},rn={sm:{padding:"8px 12px",fontSize:"12px",fontWeight:"500",media:{mobile:{padding:"6px 10px",fontSize:"11px"}}},md:{padding:"10px 14px",fontSize:"14px",fontWeight:"500",media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},lg:{padding:"12px 16px",fontSize:"14px",fontWeight:"600",media:{mobile:{padding:"10px 14px",fontSize:"12px"}}}},tn={default:{color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"}},Yl={horizontal:{flexDirection:"row",gap:"8px",media:{mobile:{flexDirection:"column",gap:"4px"}}},vertical:{flexDirection:"column",gap:"4px"}},Do={active:{backgroundColor:"color-blue-50",color:"color-blue-700",fontWeight:"600",borderLeft:"3px solid",borderColor:"color-blue-600"},hover:{backgroundColor:"color-gray-100",transition:"background-color 0.2s ease"}},Kl=h.createContext({activeItemId:null,setActiveItemId:()=>{},expandedItemIds:[],toggleExpandedItem:()=>{},isItemExpanded:()=>!1,orientation:"vertical",size:"md",variant:"default",triggerRefs:{current:{}}}),Vm=({children:e,value:o})=>r.jsx(Kl.Provider,{value:o,children:e}),ir=()=>{const e=h.useContext(Kl);if(!e)throw new Error("useNavigationMenuContext must be used within a NavigationMenuProvider");return e},nn=({children:e,views:o})=>{const{orientation:t}=ir(),n=t==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(n,{width:"100%",...Yl[t],transition:"background-color 0.2s ease, border-color 0.2s ease",borderRadius:"8px",...o==null?void 0:o.container,children:e})},Xl=h.createContext({itemValue:null,isDisabled:!1}),Am=()=>{const e=h.useContext(Xl);if(!e)throw new Error("useNavigationMenuItemContext must be used within a NavigationMenuItem");return e},an=({item:e,value:o,isDisabled:t=!1,children:n,views:a})=>{var C;const{activeItemId:l,setActiveItemId:c,orientation:s,size:d,variant:g,onItemActivate:m}=ir(),f=(e==null?void 0:e.id)||o,p=l===f,u=(e==null?void 0:e.items)&&e.items.length>0,y=(e==null?void 0:e.disabled)||t,k=()=>{y||f&&(c(f),m&&m(f))},x=s==="horizontal"?i.Horizontal:i.Vertical;return n?r.jsx(Xl.Provider,{value:{itemValue:f||null,isDisabled:y},children:r.jsx(i.View,{width:"100%",cursor:y?"not-allowed":"pointer",opacity:y?.6:1,borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",...rn[d],...tn[g],...p?Do.active:{},_hover:y?{}:Do.hover,...a==null?void 0:a.item,children:n})}):u&&e?r.jsxs(x,{width:"100%",flexDirection:"column",position:"relative",...a==null?void 0:a.item,children:[r.jsxs(Jl,{itemId:e.id,disabled:e.disabled,views:a,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}),r.jsx(Ql,{itemId:e.id,children:r.jsx(nn,{children:(C=e.items)==null?void 0:C.map(S=>r.jsx(an,{item:S},S.id))})})]}):e?r.jsxs(i.View,{as:e.href?"a":"div",href:e.href,onClick:k,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.6:1,width:"100%",display:"flex",alignItems:"center",borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",gap:"8px",...rn[d],...tn[g],...p?Do.active:{},_hover:e.disabled?{}:Do.hover,...a==null?void 0:a.item,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}):null},Jl=({children:e,itemId:o,disabled:t,views:n})=>{const{activeItemId:a,toggleExpandedItem:l,isItemExpanded:c,size:s,variant:d,triggerRefs:g}=ir(),m=h.useRef(null),f=a===o,p=c(o);h.useEffect(()=>(m.current&&o&&(g.current[o]=m.current),()=>{o&&delete g.current[o]}),[o,g]);const u=y=>{y.preventDefault(),!t&&l(o)};return r.jsxs(i.View,{ref:m,onClick:u,cursor:t?"not-allowed":"pointer",opacity:t?.5:1,width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:8,transition:"background-color 0.2s ease",...rn[s],...tn[d],...f?Do.active:{},_hover:t?{}:Do.hover,...n==null?void 0:n.trigger,children:[r.jsx(i.View,{display:"flex",alignItems:"center",children:e}),r.jsx(i.View,{transition:"transform 0.2s ease",transform:p?"rotate(180deg)":"rotate(0deg)",...n==null?void 0:n.indicator,children:r.jsx(he,{orientation:"down",widthHeight:16,color:"currentColor",filled:!0})})]})},Ql=({children:e,itemId:o,views:t})=>{const{isItemExpanded:n,orientation:a,triggerRefs:l}=ir(),c=h.useRef(null),[s,d]=h.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),g=n(o);if(h.useEffect(()=>{if(g&&c.current&&o&&l.current[o]&&a==="horizontal"){const f=c.current.getBoundingClientRect(),p=l.current[o].getBoundingClientRect(),u=Math.max(f.width||200,200),y=Math.max(f.height||150,150),k=window.innerWidth,x=window.innerHeight,C={top:p.top,right:k-p.right,bottom:x-p.bottom,left:p.left},S=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8},{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top}]:[{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8}],w=S.find(T=>T.fits);if(w){d({x:w.x,y:w.y,placement:w.placement});return}const v=S.reduce((T,j)=>j.space>T.space?j:T);let b=v.x,I=v.y;b+u>k&&(b=k-u-8),b<8&&(b=8),I+y>x&&(I=x-y-8),I<8&&(I=8),d({x:b,y:I,placement:v.placement})}},[g,a,o,l]),!g)return null;if(a==="vertical")return r.jsx(i.View,{paddingLeft:16,width:"100%",position:"relative",backgroundColor:"transparent",...t==null?void 0:t.container,children:e});const m={position:"fixed",left:s.x,top:s.y,zIndex:1e3};return r.jsx(i.View,{ref:c,role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:m,...t==null?void 0:t.container,children:e})},Em=({href:e,children:o,views:t,underline:n,isExternal:a,iconSize:l,...c})=>{const{itemValue:s,isDisabled:d}=Am(),{activeItemId:g,setActiveItemId:m,onItemActivate:f}=ir(),p=g===s,u=y=>{if(d){y.preventDefault();return}s&&(m(s),f&&f(s)),c.onClick&&c.onClick(y)};return r.jsx(i.View,{as:"a",href:d?void 0:e,onClick:u,cursor:d?"not-allowed":"pointer",opacity:d?.5:1,width:"100%",display:"flex",alignItems:"center","aria-current":p?"page":void 0,"aria-disabled":d,"data-active":p?"":void 0,"data-disabled":d?"":void 0,...p?{fontWeight:"bold"}:{},...t==null?void 0:t.container,...c,children:o})},Dm=({items:e,orientation:o,views:t,themeMode:n})=>{const a=o==="horizontal"?i.Horizontal:i.Vertical;return!e||e.length===0?null:r.jsx(a,{width:"100%",...Yl[o],...t==null?void 0:t.container,children:r.jsx(nn,{views:t,children:e.map(l=>r.jsx(an,{item:l,views:t},l.id))})})},bo=e=>{const o=pe("navigation",e),{items:t,children:n,orientation:a="vertical",size:l="md",variant:c="default",defaultActiveItemId:s=null,defaultExpandedItemIds:d=[],onItemActivate:g,views:m,...f}=o,{activeItemId:p,setActiveItemId:u,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:x,triggerRefs:C}=Pm(s,d);return r.jsx(Vm,{value:{activeItemId:p,setActiveItemId:u,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:x,orientation:a,size:l,variant:c,onItemActivate:g,triggerRefs:C},children:t?r.jsx(Dm,{items:t,orientation:a,size:l,variant:c,views:m,...f}):n})};bo.List=nn,bo.Item=an,bo.Trigger=Jl,bo.Content=Ql,bo.Link=Em;const Zl={},Rl=h.createContext({views:Zl,onRowClick:()=>{}}),$m=({children:e,views:o=Zl,onRowClick:t})=>r.jsx(Rl.Provider,{value:{views:o,onRowClick:t},children:e}),lo=()=>h.useContext(Rl),ke={table:{width:"100%",color:"inherit",borderRadius:"8px",overflow:"hidden",boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.06), 0px 1px 2px rgba(0, 0, 0, 0.04)",border:"1px solid",borderColor:"color-gray-200",transition:"box-shadow 0.2s ease",media:{mobile:{overflowX:"auto",display:"block",borderRadius:"4px"}}},thead:{backgroundColor:"color-gray-50",borderBottom:"1px solid",borderColor:"color-gray-200"},th:{padding:"12px 16px",fontWeight:"600",fontSize:"14px",color:"inherit",opacity:.72,textAlign:"left",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},td:{padding:"12px 16px",fontSize:"14px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"inherit",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},tr:{flexDirection:"row",alignItems:"stretch",width:"100%",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-50"},_focus:{outline:"none",backgroundColor:"color-gray-100"}},tfoot:{backgroundColor:"color-gray-50",fontWeight:"600",borderTop:"2px solid",borderColor:"color-gray-200"},caption:{margin:"8px 0",color:"inherit",opacity:.62,fontSize:"14px",fontStyle:"italic",media:{mobile:{fontSize:"12px"}}}};({...ke.th},{...ke.td}),{...ke.tr},{...ke.td},{...ke.th},{...ke.table},{...ke.th},{...ke.td},{...ke.tr},{...ke.tfoot},{...ke.caption};const Lm=({children:e})=>r.jsx(i.View,{width:"100%",style:{overflowX:"auto"},children:e}),ei=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"table",...ke.table,...o==null?void 0:o.table,...e,style:{borderCollapse:"collapse",...e.style||{}}})},oi=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"thead",textAlign:"left",...ke.thead,...o==null?void 0:o.thead,...e})},ri=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"th",whiteSpace:"nowrap",...ke.th,...o==null?void 0:o.th,...e})},qr=e=>{const{views:o,onRowClick:t}=lo();return r.jsx(i.Element,{as:"tr",...ke.tr,...o==null?void 0:o.tr,onClick:t,...e})},ln=({isFirstColumn:e,...o})=>{const{views:t}=lo();return r.jsx(i.Element,{as:"td",whiteSpace:"nowrap",fontWeight:e?"500":"400",...ke.td,...t==null?void 0:t.td,...o})},ti=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"tbody",...ke.tbody,...o==null?void 0:o.tbody,...e})},ni=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"tfoot",...ke.tfoot,...o==null?void 0:o.tfoot,...e})},ai=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"caption",...ke.caption,...o==null?void 0:o.caption,...e})},_m=({data:e,columns:o,footer:t,caption:n,themeMode:a})=>{const l=Math.max(o.length*140,320);return r.jsx(Lm,{children:r.jsxs(ei,{role:"Table",minWidth:l,children:[n&&r.jsx(ai,{children:n}),r.jsx(oi,{children:r.jsx(qr,{children:o.map(c=>r.jsx(ri,{children:c.title},c.field))})}),r.jsx(ti,{children:e.map((c,s)=>r.jsx(qr,{children:o.map((d,g)=>r.jsx(ln,{isFirstColumn:g===0,children:c[d.field]},d.field))},s))}),t&&r.jsx(ni,{children:r.jsx(qr,{children:t.map((c,s)=>r.jsx(ln,{...c.props,children:c.value},s))})})]})})},Ve=({children:e,views:o,onClick:t})=>{const n=pe("table",{views:o,onClick:t});return r.jsx($m,{views:n.views,onRowClick:n.onClick,children:e})};Ve.Head=oi,Ve.HeadCell=ri,Ve.Body=ti,Ve.Row=qr,Ve.Cell=ln,Ve.Footer=ni,Ve.Caption=ai,Ve.Container=ei,Ve.Template=_m;const Bm=(e,o,t)=>{const n=g=>g.value!==void 0?g.value:g.title,a=()=>{if(!(!e||e.length===0)){if(o!==void 0){const g=e.find(m=>n(m)===o);if(g)return g}return e[0]}},[l,c]=h.useState(a()),s=t!==void 0?e.find(g=>n(g)===t):l,d=g=>{t===void 0&&c(g)};return h.useEffect(()=>{if(t!==void 0)return;const g=a(),m=l&&e.some(f=>n(f)===n(l));g&&(!m||o!==void 0&&l&&n(l)!==o)?c(g):!g&&l&&c(void 0)},[e,o]),{activeTab:s,setActiveTab:d}},Om=(e,o,t)=>{const[n,a]=h.useState(e||null);return{activeValue:o!==void 0?o:n,setActiveValue:s=>{o===void 0&&a(s),t&&t(s)}}},Nm=h.memo(({tab:e,isActive:o,onClick:t,iconPosition:n="left",tabStyles:a,textStyles:l})=>{const c=()=>{switch(n){case"top":return"column";case"bottom":return"column-reverse";case"right":return"row-reverse";case"left":default:return"row"}},s=()=>["top","bottom"].includes(n)?"4px":"8px",d=e.icon&&h.isValidElement(e.icon)?h.cloneElement(e.icon,{strokeWidth:o?2.5:2}):e.icon;return r.jsxs(i.Element,{as:"div",role:"tab","aria-selected":o,tabIndex:o?0:-1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...a,flexDirection:c(),gap:s(),onClick:t,"data-state":o?"active":"inactive",children:[d&&r.jsx(i.Element,{children:d},o?"active-icon":"inactive-icon"),r.jsxs(i.Element,{display:"grid",alignItems:"center",justifyContent:"center",children:[r.jsx(i.Text,{...l,fontWeight:"600",visibility:"hidden",gridColumn:"1",gridRow:"1","aria-hidden":"true",children:e.title}),r.jsx(i.Text,{...l,fontWeight:o?"600":"500",gridColumn:"1",gridRow:"1",children:e.title})]})]})}),cn=(e,o)=>{const t=o==="dark";return e==="segmented"?{header:{width:"fit-content",alignSelf:"flex-start",gap:6,padding:6,borderRadius:16,backgroundColor:"color-gray-100"},tab:{minHeight:44,padding:"0 22px",borderRadius:12,color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-100",style:{backgroundColor:"transparent"}},activeTab:{backgroundColor:"color-white",color:"color-gray-900",boxShadow:t?"0 1px 3px rgba(0, 0, 0, 0.35)":"0 1px 2px rgba(0, 0, 0, 0.06)"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em"},activeText:{},content:{width:"100%"}}:e==="pill"?{header:{width:"100%",flexWrap:"wrap",gap:12},tab:{minHeight:44,padding:"0 22px",borderRadius:"999px",backgroundColor:"color-white",color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200"},activeTab:{backgroundColor:"theme-primary",color:"color-white",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%"}}:{header:{width:"100%",gap:20,borderBottom:"none"},tab:{minHeight:44,padding:"0 4px",borderRadius:0,color:"color-gray-500",borderBottom:"3px solid",borderColor:"color-white",style:{backgroundColor:"transparent"}},activeTab:{color:"theme-primary",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%",paddingTop:12}}},qm=({tabs:e=[],activeTab:o,handleTabClick:t,views:n={},renderTab:a,renderContent:l,variant:c="underline",iconPosition:s="left",keepMounted:d=!1})=>{const{themeMode:g}=i.useTheme(),m=cn(c,g);return o?r.jsxs(i.Vertical,{width:"100%",height:"100%",...n.container,children:[r.jsx(i.Horizontal,{alignItems:"center",...m.header,...n.headerTabs,children:e.map(f=>{const p=(f.value!==void 0?f.value:f.title)===(o.value!==void 0?o.value:o.title),u=()=>t(f);return a?a(f,p,u):r.jsx(Nm,{tab:f,isActive:p,onClick:u,iconPosition:s,tabStyles:{...m.tab,...n.tab,...p?m.activeTab:{},...p?n.activeTab:{}},textStyles:{...m.text,...n.title,...p?m.activeText:{},...p?n.activeText:{}}},f.title)})}),r.jsx(i.View,{height:"100%",...m.content,...n.content,children:l?l(o):d?e.map(f=>{const p=f.value!==void 0?f.value:f.title,u=o.value!==void 0?o.value:o.title;return r.jsx(i.View,{display:p===u?"contents":"none",children:f.content},f.title)}):o.content})]}):null},li=h.createContext(null),sn=()=>{const e=h.useContext(li);if(!e)throw new Error("useTabsContext must be used within a Tabs component");return e},Um=h.memo(({children:e,views:o})=>{var s;const{themeMode:t}=i.useTheme(),{variant:n="underline"}=sn(),a=cn(n,t),l=Io("tabs"),c=Be({container:(s=l.views)==null?void 0:s.headerTabs},o);return r.jsx(i.Horizontal,{alignItems:"center",...a.header,...c==null?void 0:c.container,children:e})}),Gm=h.memo(({value:e,children:o,disabled:t=!1,views:n})=>{var u,y;const{themeMode:a}=i.useTheme(),{activeValue:l,setActiveValue:c,variant:s="underline"}=sn(),d=l===e,g=cn(s,a),m=Io("tabs"),f=Be({trigger:(u=m.views)==null?void 0:u.tab,activeState:(y=m.views)==null?void 0:y.activeTab},n),p=h.useCallback(()=>{t||c(e)},[t,e,c]);return r.jsx(i.View,{cursor:t?"not-allowed":"pointer",opacity:t?.6:1,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",...g.tab,...d?g.activeTab:{},_hover:t?{}:s==="underline"?{color:"theme-primary"}:{opacity:.9},onClick:p,...f==null?void 0:f.trigger,...d?f==null?void 0:f.activeState:{},children:r.jsx(i.View,{...g.text,...d?g.activeText:{},children:o})})}),Ym=h.memo(({value:e,children:o,views:t})=>{const{activeValue:n}=sn();return n!==e?null:r.jsx(i.View,{width:"100%",padding:"24px",...t==null?void 0:t.content,children:o})}),Km=e=>{const o=pe("tabs",e),{tabs:t,views:n,defaultValue:a,onTabChange:l,renderTab:c,renderContent:s,variant:d="underline",iconPosition:g="left",keepMounted:m=!1,value:f,onValueChange:p,children:u}=o,y=Om(a,f,p),k=Bm(t||[],a,f);if(u)return r.jsx(li.Provider,{value:{...y,variant:d},children:u});if(t){const x=C=>{const S=w=>w.value!==void 0?w.value:w.title;(!k.activeTab||S(k.activeTab)!==S(C))&&(k.setActiveTab(C),l&&l(C))};return r.jsx(qm,{tabs:t,views:n,activeTab:k.activeTab,handleTabClick:x,renderTab:c,renderContent:s,variant:d,iconPosition:g,keepMounted:m})}return null},$o=h.memo(Km);$o.List=Um,$o.Trigger=Gm,$o.Content=Ym;const Xm=e=>{const{children:o,_isInView:t=!1,alternateHighlightText:n=[],alternateAnimation:a=!1,alternateDuration:l=3e3,highlightText:c,highlightTypewriter:s=!1,highlightSlide:d=!1,highlightSlideDuration:g=500,highlightSlideStagger:m=50,highlightSlideSequential:f=!0}=e,[p,u]=h.useState(o),[y,k]=h.useState(c);return h.useEffect(()=>{if(process.env.NODE_ENV==="production"||typeof o!="string"||!c)return;const x=Array.isArray(c)?c:[c];for(const C of x)typeof C=="string"&&C.length>0&&!o.toLowerCase().includes(C.toLowerCase())&&console.warn(`[Title] highlightText "${C}" is not a substring of \`children\`, so nothing will be highlighted. \`children\` must be the complete sentence including the highlight, e.g. \`<Title highlightText="apps">Build apps fast</Title>\`.`)},[o,c]),h.useEffect(()=>{if(!a||n.length===0||!t||typeof o!="string"||typeof c!="string")return process.env.NODE_ENV!=="production"&&a&&n.length>0&&(typeof o!="string"||typeof c!="string")&&console.warn("[Title] alternateHighlightText requires `children` to be the full sentence as a string and `highlightText` to be the placeholder word inside it. Rotation is disabled."),u(o),k(c),()=>{};const x=o,C=c;if(!x.toLowerCase().includes(C.toLowerCase()))return process.env.NODE_ENV!=="production"&&console.warn(`[Title] \`children\` must contain \`highlightText\` ("${C}") — it is the placeholder the rotating words replace, e.g. \`<Title highlightText="apps" alternateHighlightText={["apps", "sites"]}>Build apps fast</Title>\`. Rotation is disabled.`),u(o),k(c),()=>{};let S=0;const w=b=>{const I=n[b],T=C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),j=new RegExp(T,"gi"),E=x.replace(j,I);u(E),k(I)};w(S);const v=setInterval(()=>{S=(S+1)%n.length,w(S)},l);return()=>clearInterval(v)},[a,n,l,c,o,t]),{finalDisplayedText:p,activeHighlightTarget:y,highlightTypewriter:s,highlightSlide:d,highlightSlideDuration:g,highlightSlideStagger:m,highlightSlideSequential:f}},Jm={xs:24,sm:32,md:48,lg:96,xl:110},Qm={xl:{media:{mobile:{fontSize:48},tablet:{fontSize:96},desktop:{fontSize:110}}},lg:{media:{mobile:{fontSize:48},tablet:{fontSize:48},desktop:{fontSize:70}}},md:{media:{mobile:{fontSize:32},tablet:{fontSize:40},desktop:{fontSize:56}}},sm:{media:{mobile:{fontSize:20},tablet:{fontSize:24},desktop:{fontSize:32}}},xs:{media:{mobile:{fontSize:14},tablet:{fontSize:18},desktop:{fontSize:20}}}},Zm={underline:e=>({textDecoration:"underline",textDecorationColor:e,textDecorationThickness:"4px",textUnderlineOffset:"4px"}),background:e=>({backgroundColor:e,color:"color-white",padding:"0 8px",borderRadius:"4px"}),gradient:(e,o)=>({background:`linear-gradient(135deg, ${e}, ${o||e})`,backgroundClip:"text",WebkitBackgroundClip:"text !important",WebkitTextFillColor:"transparent",color:"transparent",display:"inline-block",textShadow:"none"}),outline:e=>({WebkitTextStroke:`1px ${e}`,WebkitTextFillColor:"transparent !important",color:"transparent",textShadow:"none"}),glow:e=>({color:e,textShadow:`0 0 10px ${e}80, 0 0 20px ${e}40, 0 0 30px ${e}20`}),solid:e=>({color:e}),default:()=>({})},Rm=({text:e,typingSpeed:o=50,pauseTime:t=500,onComplete:n,showCursor:a=!0,cursorColor:l="currentColor",textStyle:c,textComponent:s,as:d,...g})=>{const m=s||i.Text,f=Array.isArray(e)?e:[e],[p,u]=h.useState(f.map(()=>"")),[y,k]=h.useState(!1),[x,C]=h.useState(0),[S,w]=h.useState(0);h.useEffect(()=>{u(f.map(()=>"")),k(!1),C(0),w(0)},[e]),h.useEffect(()=>{if(y){n&&n();return}const b=f[x];if(S>=b.length){if(x>=f.length-1){k(!0);return}const T=setTimeout(()=>{C(j=>j+1),w(0)},t);return()=>clearTimeout(T)}const I=setTimeout(()=>{u(T=>{const j=[...T];return j[x]=b.substring(0,S+1),j}),w(T=>T+1)},o);return()=>clearTimeout(I)},[f,x,S,y,n,t,o]);const v=b=>{if(!b||typeof b!="string")return b;const I=b.split("|");return I.length===1?b:I.map((T,j)=>r.jsxs(h.Fragment,{children:[T,j<I.length-1&&r.jsx("br",{})]},j))};return r.jsx(r.Fragment,{children:p.map((b,I)=>r.jsxs(h.Fragment,{children:[v(b),a&&I===x&&!y&&r.jsx(m,{as:"span",display:"inline-block",width:"0.1em",height:"1em",backgroundColor:l,animation:"blink 1s step-end infinite",verticalAlign:"text-bottom",marginLeft:"1px",...c})]},I))})},ep=({text:e,duration:o=500,direction:t="up",stagger:n=50,sequential:a=!1,textStyle:l,as:c,wordProps:s,textComponent:d,...g})=>{const[m,f]=h.useState(e),[p,u]=h.useState("entering"),[y,k]=h.useState(0),x=d||i.Text,C=h.useRef(null),S=h.useRef(null);h.useEffect(()=>{e===m&&p==="visible"||e!==m&&(p==="entering"||p==="visible"?(C.current=e,u("exiting")):p==="exiting"&&(C.current=e))},[e,m,p]);const{lines:w,totalWordCount:v}=h.useMemo(()=>{const V=m.split("|").map(L=>L.trim().split(/\s+/).filter(_=>_.length>0)),M=V.reduce((L,_)=>L+_.length,0);return{lines:V,totalWordCount:M}},[m]),b=h.useMemo(()=>a?v*(o+n):(v-1)*n+o,[v,o,n,a]),I=h.useMemo(()=>a?v*(o+n):(v-1)*n+o,[v,o,n,a]);h.useEffect(()=>(S.current&&clearTimeout(S.current),p==="entering"?S.current=setTimeout(()=>{u("visible")},b+50):p==="exiting"&&(S.current=setTimeout(()=>{C.current!==null&&(f(C.current),C.current=null),k(P=>P+1),u("entering")},I+50)),()=>{S.current&&clearTimeout(S.current)}),[p,b,I]);const{style:T,...j}=s||{},E=t==="up",D=P=>a?P*(o+n):P*n,W=h.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"bottom",whiteSpace:"nowrap",...l}),[l]),A=h.useMemo(()=>({display:"inline-flex",flexDirection:"column",alignItems:"center"}),[]),H=h.useMemo(()=>({display:"block",whiteSpace:"nowrap"}),[]);let z=0;return r.jsx(i.Element,{as:"span",style:W,...g,children:r.jsx("span",{style:A,children:w.map((P,V)=>r.jsx("span",{style:H,children:P.map((M,L)=>{const _=z++,O=D(_),N=L===P.length-1;let U;const X=`${o}ms`,oe=`${O}ms`;p==="entering"?U=E?i.Animation.slideInUp({duration:X,delay:oe,timingFunction:"ease-out",fillMode:"both"}):i.Animation.slideInDown({duration:X,delay:oe,timingFunction:"ease-out",fillMode:"both"}):p==="exiting"&&(U=E?{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-100%)",opacity:0},duration:X,delay:oe,timingFunction:"ease-in",fillMode:"both"}:{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(100%)",opacity:0},duration:X,delay:oe,timingFunction:"ease-in",fillMode:"both"});const B={...T,display:"inline-block",marginRight:N?0:"0.25em",transform:p==="visible"?"translateY(0)":void 0,opacity:p==="visible"?1:void 0};return r.jsx(x,{as:"span",animate:U,...j,...B,children:M},`${y}-${V}-${L}`)})},`line-${V}`))})})};function ii(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const dn=e=>{if(!e||typeof e!="string")return e;const o=e.split("|");return o.length===1?e:o.map((t,n)=>r.jsxs(h.Fragment,{children:[t,n<o.length-1&&r.jsx("br",{})]},n))},op=({children:e,highlightText:o,highlightStyle:t="solid",highlightColor:n="theme-primary",highlightSecondaryColor:a,size:l="lg",views:c,highlightAnimate:s,animate:d,animationLoop:g=1,highlightAnimationLoop:m=1,highlightTypewriter:f=!1,highlightTypewriterDuration:p=3e3,highlightSlide:u=!1,highlightSlideDuration:y=500,highlightSlideStagger:k=50,highlightSlideSequential:x=!0,centered:C=!1,level:S=1,themeMode:w,responsive:v,alternateHighlightText:b,alternateAnimation:I,alternateDuration:T,_isInView:j,...E})=>{const{ref:D,inView:W}=i.useInView(),{finalDisplayedText:A,activeHighlightTarget:H,highlightTypewriter:z,highlightSlide:P,highlightSlideDuration:V,highlightSlideStagger:M,highlightSlideSequential:L}=Xm({children:e,highlightText:o,_isInView:W,highlightTypewriter:f,highlightSlide:u,highlightSlideDuration:y,highlightSlideStagger:k,highlightSlideSequential:x,alternateHighlightText:b,alternateAnimation:I,alternateDuration:T,...E}),_=Jm[l],O={fontFamily:"Mulish, Inter, Geist, system-ui, sans-serif",fontWeight:l==="xl"?700:600,letterSpacing:l==="xl"?"-1.5px":"-0.01em"},N=Zm[t](n,a),U=(J,Y)=>J&&(Array.isArray(J)?J.map(Z=>({...Z,iterationCount:Y.toString()})):{...J,iterationCount:Y.toString()}),X=U(d,g),oe=U(s,m),B=typeof A=="string"?A:typeof e=="string"?e:"",$={ref:D,animate:W?X:void 0,as:`h${S}`,fontSize:_,...C?{textAlign:"center"}:{},...v?Qm[l]:{},...O},q=J=>!W&&(z||P)?r.jsx("span",{style:{opacity:0},children:J}):z?r.jsx(Rm,{text:J,typingSpeed:Math.max(30,p/(J.length*10)),cursorColor:"currentColor",...N}):P?r.jsx(ep,{text:J,duration:V,stagger:M,sequential:L,direction:"up",wordProps:N}):dn(J);if(typeof B=="string"&&H){const J=Array.isArray(H)?new RegExp(`(${H.map(ne=>ii(String(ne))).join("|")})`,"gi"):new RegExp(`(${ii(String(H))})`,"gi"),Y=[];let Z=0,ee;for(;ee=J.exec(B);)ee.index>Z&&Y.push(B.substring(Z,ee.index)),Y.push({highlight:!0,text:ee[0]}),Z=ee.index+ee[0].length;return Z<B.length&&Y.push(B.substring(Z)),r.jsx(i.Element,{...$,...c==null?void 0:c.container,...E,children:Y.map((ne,K)=>typeof ne=="string"?r.jsx(i.Text,{as:"span",display:"inline",...c==null?void 0:c.text,children:dn(ne)},`text-${K}`):r.jsx(i.Text,{as:"span",display:"inline",animate:W?oe:void 0,...P?{}:N,...c==null?void 0:c.highlight,children:q(ne.text)},`highlight-${K}`))})}return t&&!H?r.jsx(i.Element,{...$,...E,...c==null?void 0:c.container,children:r.jsx(i.Text,{as:"span",display:"inline",animate:W?oe:void 0,...P?{}:N,...c==null?void 0:c.highlight,children:q(B)})}):r.jsx(i.Text,{...$,...E,...c==null?void 0:c.container,...c==null?void 0:c.text,children:dn(B)})},ci=e=>r.jsx(op,{...e}),si=({items:e,shape:o,variant:t,onToggleChange:n})=>{const{activeToggles:a,setActiveToggles:l}=Vl();return r.jsx(Al,{items:e,shape:o,variant:t,activeToggles:a,setActiveToggles:l,onToggleChange:n})},rp=({items:e,onChange:o})=>{const[t,n]=h.useState(e),[a,l]=h.useState(null),[c,s]=h.useState(null),d=h.useRef({x:0,y:0}),g=h.useRef([]),m=h.useCallback((u,y)=>{u.preventDefault(),document.body.style.cursor="grabbing";const k="touches"in u?u.touches[0].clientX:u.clientX,x="touches"in u?u.touches[0].clientY:u.clientY;d.current={x:k,y:x},s(y),l(t[y])},[t]),f=h.useCallback(u=>{if(c===null)return;const y="touches"in u?u.touches[0].clientX:u.clientX,k="touches"in u?u.touches[0].clientY:u.clientY,x=g.current[c];if(!x)return;const C=y-d.current.x,S=k-d.current.y;x.style.transform=`translate(${C}px, ${S}px)`,x.style.zIndex="1000";const w=g.current.findIndex((v,b)=>{if(!v||b===c)return!1;const I=v.getBoundingClientRect();return k>=I.top&&k<=I.bottom});if(w!==-1&&w!==c){const v=[...t],[b]=v.splice(c,1);v.splice(w,0,b),n(v),s(w),o==null||o(v),d.current={x:y,y:k}}},[c,t,o]),p=h.useCallback(()=>{document.body.style.cursor="",g.current.forEach(u=>{u&&(u.style.transform="",u.style.zIndex="")}),s(null),l(null)},[c]);return h.useEffect(()=>{if(!(typeof window>"u"))return c!==null&&(window.addEventListener("mousemove",f),window.addEventListener("touchmove",f),window.addEventListener("mouseup",p),window.addEventListener("touchend",p)),()=>{window.removeEventListener("mousemove",f),window.removeEventListener("touchmove",f),window.removeEventListener("mouseup",p),window.removeEventListener("touchend",p)}},[c,f,p]),{items:t,draggedItem:a,draggedIndex:c,itemRefs:g,handleDragStart:m}},tp=({items:e,renderItem:o,containerProps:t,itemProps:n,draggedIndex:a,itemRefs:l,handleDragStart:c,views:s,themeMode:d})=>r.jsx(i.View,{overflow:"hidden",position:"relative",...t,...s==null?void 0:s.container,children:e.map((g,m)=>r.jsx(i.View,{ref:f=>{l.current[m]=f},onMouseDown:f=>c(f,m),onTouchStart:f=>c(f,m),position:"relative",cursor:"grab",transition:"transform 0.2s",...n,...s==null?void 0:s.item,children:o?o(g,m):g},m))}),di=e=>{const{items:o,draggedIndex:t,itemRefs:n,handleDragStart:a}=rp(e);return r.jsx(tp,{...e,items:o,draggedIndex:t,itemRefs:n,handleDragStart:a})},np=di,ap=({onFileSelect:e,onMultipleFileSelect:o,validateFile:t,accept:n,multiple:a,disabled:l,previewUrl:c})=>{const[s,d]=h.useState(!1),[g,m]=h.useState(null),f=h.useRef(null),p=c!==void 0?c:g;h.useEffect(()=>()=>{g&&URL.revokeObjectURL(g)},[g]);const u=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!l&&d(!0)},[l]),y=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!l&&d(!1)},[l]),k=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!l&&d(!0)},[l]),x=h.useCallback(v=>{if(!v||v.length===0)return;const b=Array.from(v);if(!a&&b.length>0){const I=b[0];if(I.type.startsWith("image/")){const T=URL.createObjectURL(I);m(j=>(j&&URL.revokeObjectURL(j),T))}else m(null)}a?o&&o(b):b.length>0&&e&&e(b[0])},[a,o,e]),C=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),d(!1),!l&&v.dataTransfer.files&&v.dataTransfer.files.length>0&&(x(v.dataTransfer.files),v.dataTransfer.clearData())},[l,x]),S=h.useCallback(()=>{var v;l||(v=f.current)==null||v.click()},[l]),w=h.useCallback(v=>{x(v.target.files),v.target.value&&(v.target.value="")},[x]);return{isDragActive:s,handleDragEnter:u,handleDragLeave:y,handleDragOver:k,handleDrop:C,handleClick:S,handleFileChange:w,inputRef:f,preview:p}},lp={position:"absolute",top:"-4px",right:"-4px",width:"16px",height:"16px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.5)",color:"white",border:"none",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",fontSize:"12px",zIndex:10,_hover:{backgroundColor:"rgba(0, 0, 0, 0.7)"}},gi=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:c={}})=>{if(e.length===0)return null;const s=h.useCallback(g=>g<1024?`${g} B`:g<1024*1024?`${(g/1024).toFixed(1)} KB`:`${(g/(1024*1024)).toFixed(1)} MB`,[]),d=h.useCallback(g=>g.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:g.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:g.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...c==null?void 0:c.container,children:e.map((g,m)=>{const f=typeof URL<"u"&&typeof URL.createObjectURL=="function"&&typeof Blob<"u"&&g instanceof Blob,p=(g==null?void 0:g.path)||(g==null?void 0:g.url)||(l&&f?URL.createObjectURL(g):""),u=g.type.startsWith("image/"),y=g.type.startsWith("video/"),k=g.type.startsWith("audio/"),x=d(g);return l?r.jsx(i.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...c==null?void 0:c.item,children:l&&r.jsxs(Me,{children:[r.jsxs(Me.Trigger,{children:[u&&r.jsx(i.Image,{src:p,alt:g.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(i.View,{as:"video",src:p,alt:g.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),k&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Fo,{widthHeight:24,color:"color-black"})}),!u&&!y&&!k&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(go,{widthHeight:24,color:"color-black"})}),t&&r.jsx(i.Button,{...lp,onClick:C=>{C.stopPropagation(),t(m)},"aria-label":`Remove ${g.name}`,children:"×"})]}),r.jsxs(Me.Content,{children:[u&&r.jsx(i.Image,{src:p,alt:g.name,maxWidth:"100%"}),y&&r.jsx(i.View,{as:"video",src:p,controls:!0,maxWidth:"100%"}),k&&r.jsx(i.View,{as:"audio",src:p,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",...c==null?void 0:c.name,children:[g.name," (",s(g.size),")"]})]})]})},m):r.jsxs(i.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...c==null?void 0:c.item,children:[r.jsx(i.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:x.backgroundColor,color:x.color,children:k?r.jsx(Fo,{widthHeight:12,color:"currentColor"}):r.jsx(go,{widthHeight:12,color:"currentColor"})}),r.jsxs(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...c==null?void 0:c.name,children:[g.name," · ",s(g.size)]}),t&&r.jsx(i.View,{as:"button",type:"button",onClick:()=>t(m),"aria-label":`Remove ${g.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},m)})})},ip=({children:e,text:o="Drop files here or click to upload",textProps:t,containerProps:n,disabled:a,accept:l,multiple:c,isDragActive:s,handleDragEnter:d,handleDragLeave:g,handleDragOver:m,handleDrop:f,handleClick:p,handleFileChange:u,inputRef:y,preview:k,imageProps:x,selectedFiles:C,onRemove:S})=>r.jsxs(i.Center,{width:"100%",minHeight:"200px",height:C&&C.length>0?"auto":"200px",borderWidth:2,borderStyle:"dashed",borderColor:s?"theme-primary":"color-gray-300",borderRadius:12,backgroundColor:s?"#EFF6FF":"color-gray-50",flexDirection:"column",cursor:a?"not-allowed":"pointer",opacity:a?.6:1,onClick:p,onDragEnter:d,onDragLeave:g,onDragOver:m,onDrop:f,transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease",overflow:"hidden",position:"relative",padding:16,...n,children:[r.jsx("input",{type:"file",ref:y,onChange:u,accept:l,multiple:c,style:{display:"none"},disabled:a}),k&&!c?r.jsxs(i.View,{width:"100%",height:"200px",position:"relative",children:[r.jsx(i.Image,{src:k,alt:"Preview",width:"100%",height:"100%",objectFit:"contain",...x}),r.jsx(i.Center,{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.3)",opacity:0,_hover:{opacity:1},transition:"opacity 0.2s",children:r.jsx(i.Text,{color:"white",fontWeight:600,children:"Click to replace"})})]}):r.jsxs(i.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[e||r.jsxs(i.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[r.jsx(wt,{widthHeight:40,color:s?"theme-primary":"color-gray-500"}),r.jsx(i.Text,{marginTop:16,color:s?"theme-primary":"color-gray-600",fontWeight:500,textAlign:"center",...t,children:o})]}),c&&C&&C.length>0&&r.jsx(i.View,{marginTop:16,width:"100%",children:r.jsx(gi,{files:C,onRemove:S||(()=>{}),showPreviews:!0,layout:"inline",maxHeight:"160px"})})]})]}),cp=e=>{const o=ap(e);return r.jsx(ip,{...e,...o})},sp=(e=!1)=>{const[o,t]=h.useState(e),[n,a]=h.useState(null);return h.useEffect(()=>{const l=d=>{!d.composedPath().some(f=>(f==null?void 0:f.id)==="dropdown-menu"||(f==null?void 0:f.id)==="dropdown-trigger")&&o&&(t(!1),a(null))},c=()=>{o&&(t(!1),a(null))},s=d=>{d.key==="Escape"&&o&&(t(!1),a(null))};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",l),window.addEventListener("resize",c),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",l),window.removeEventListener("resize",c),document.removeEventListener("keydown",s)}},[o]),{isOpen:o,setIsOpen:t,activeSubmenuId:n,setActiveSubmenuId:a}},dp={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},gp={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},hp={hover:{backgroundColor:"color-gray-100"}},hi=h.createContext({isOpen:!1,setIsOpen:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null}}),fp=({children:e,value:o})=>r.jsx(hi.Provider,{value:o,children:e}),gn=()=>{const e=h.useContext(hi);if(!e)throw new Error("useDropdownMenuContext must be used within a DropdownMenuProvider");return e},fi=({children:e,views:o,...t})=>{const{isOpen:n,setIsOpen:a,triggerRef:l}=gn(),c=s=>{s.stopPropagation(),a(!n)};return r.jsx(i.View,{ref:l,id:"dropdown-trigger",onClick:c,cursor:"pointer",position:"relative",display:"inline-block",...o==null?void 0:o.container,...t,children:e})},hn=({items:e,side:o="bottom",align:t="start",views:n,...a})=>{const{isOpen:l,variant:c,triggerRef:s}=gn(),d=h.useRef(null),{ref:g,relation:m}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[f,p]=h.useState({x:0,y:0,placement:o});if(h.useEffect(()=>{s.current&&g&&(g.current=s.current)},[s,g,l]),h.useEffect(()=>{if(l&&d.current&&s.current){const k=s.current.getBoundingClientRect();let x=o;m&&(o==="bottom"&&m.space.vertical==="top"?x="top":o==="top"&&m.space.vertical==="bottom"?x="bottom":o==="right"&&m.space.horizontal==="left"?x="left":o==="left"&&m.space.horizontal==="right"&&(x="right"));let C=0,S=0;switch(x){case"bottom":C=t==="start"?k.left:t==="end"?k.right-180:k.left+k.width/2-90,S=k.bottom+8;break;case"top":C=t==="start"?k.left:t==="end"?k.right-180:k.left+k.width/2-90,S=k.top-8;break;case"right":C=k.right+8,S=t==="start"?k.top:t==="end"?k.bottom-100:k.top+k.height/2-50;break;case"left":C=k.left-8,S=t==="start"?k.top:t==="end"?k.bottom-100:k.top+k.height/2-50;break}p({x:C,y:S,placement:x})}},[l,o,t,s,m]),!l)return null;const y=(()=>{const k={position:"fixed",left:f.x,top:f.y,zIndex:1e3};switch(f.placement){case"top":return{...k,transform:"translateY(-100%)"};case"left":return{...k,transform:"translateX(-100%)"};case"bottom":case"right":default:return k}})();return r.jsx(i.View,{ref:d,id:"dropdown-menu",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:y,...gp[c],...n==null?void 0:n.menu,...a,children:e.map((k,x)=>k.divider?r.jsx(pi,{views:n},`divider-${x}`):r.jsx(mi,{item:k,views:n},k.id))})},mi=({item:e,views:o,...t})=>{const{activeSubmenuId:n,setActiveSubmenuId:a,size:l}=gn(),[c,s]=h.useState(!1),d=e.items&&e.items.length>0,g=n===e.id,m=h.useRef(null),f=()=>{s(!0),d&&a(e.id)},p=()=>{s(!1)},u=y=>{y.stopPropagation(),!e.disabled&&!d&&e.onClick&&e.onClick()};return r.jsxs(i.View,{ref:m,display:"flex",alignItems:"center",cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.5:1,position:"relative",...dp[l],_hover:e.disabled?{}:hp.hover,backgroundColor:c&&!e.disabled?"color-gray-100":"transparent",onMouseEnter:f,onMouseLeave:p,onClick:u,...o==null?void 0:o.item,...t,children:[e.icon&&r.jsx(i.View,{marginRight:8,...o==null?void 0:o.icon,children:e.icon}),r.jsx(i.View,{flexGrow:1,children:e.label}),d&&r.jsx(i.View,{marginLeft:8,...o==null?void 0:o.submenuIndicator,children:r.jsx(he,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),g&&d&&r.jsx(hn,{items:e.items||[],side:"right",align:"start",views:o})]})},pi=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.divider,...o}),mp=({trigger:e,items:o,side:t="bottom",align:n="start",views:a,themeMode:l,...c})=>r.jsxs(i.View,{position:"relative",display:"inline-block",...a==null?void 0:a.container,...c,children:[r.jsx(fi,{views:a,children:e}),r.jsx(hn,{items:o,side:t,align:n,views:a})]}),cr=({trigger:e,items:o,size:t="md",variant:n="default",side:a="bottom",align:l="start",defaultOpen:c=!1,views:s,...d})=>{const{isOpen:g,setIsOpen:m,activeSubmenuId:f,setActiveSubmenuId:p}=sp(c),u=h.useRef(null);return r.jsx(fp,{value:{isOpen:g,setIsOpen:m,activeSubmenuId:f,setActiveSubmenuId:p,size:t,variant:n,triggerRef:u},children:r.jsx(mp,{trigger:e,items:o,side:a,align:l,views:s,...d})})};cr.Trigger=fi,cr.Content=hn,cr.Item=mi,cr.Divider=pi;const pp=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,isOpen:l,onOpen:c,onClose:s,closeOnSelect:d=!0,maxRecentColors:g=8,showRecentColors:m=!0,colorFormat:f}=e,[p,u]=h.useState(l??!1),[y,k]=h.useState(o??t),[x,C]=h.useState(""),[S,w]=h.useState([]),v=h.useRef(null),b=h.useRef(null);h.useEffect(()=>{o!==void 0&&k(o)},[o]),h.useEffect(()=>{l!==void 0&&u(l)},[l]),h.useEffect(()=>{if(m&&typeof localStorage<"u"){const A=localStorage.getItem("colorPicker-recentColors");if(A)try{w(JSON.parse(A))}catch{}}},[m]),h.useEffect(()=>{if(typeof document>"u"||typeof document.addEventListener!="function")return;const A=H=>{p&&v.current&&b.current&&!v.current.contains(H.target)&&!b.current.contains(H.target)&&W()};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[p]);const I=h.useCallback(A=>{m&&w(H=>{const z=H.filter(V=>V!==A),P=[A,...z].slice(0,g);return typeof localStorage<"u"&&localStorage.setItem("colorPicker-recentColors",JSON.stringify(P)),P})},[m,g]),T=h.useCallback(()=>{const A=!p;u(A),A?c==null||c():s==null||s()},[p,c,s]),j=h.useCallback(A=>{k(A),I(A);const H=$r(A,f);n==null||n(H),a==null||a(H),d&&(u(!1),s==null||s())},[n,a,d,s,I,f]),E=h.useCallback(A=>{C(A)},[]),D=h.useCallback(()=>{x&&(j(x),C(""))},[x,j]),W=h.useCallback(()=>{u(!1),s==null||s()},[s]);return{isOpen:p,selectedColor:y,recentColors:S,customColor:x,handleToggle:T,handleColorSelect:j,handleCustomColorChange:E,handleCustomColorSubmit:D,handleClose:W,triggerRef:v,dropdownRef:b}},Lo={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},dropdown:{position:"absolute",top:"calc(100% + 8px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.14)",padding:"16px",minWidth:"320px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(6, 36px)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"12px",marginBottom:"16px"},customInput:{marginBottom:"12px"},recentColors:{borderTop:"1px solid color-gray-100",paddingTop:"12px"}},up={xs:{height:"32px",fontSize:"12px",padding:"4px 8px"},sm:{height:"40px",fontSize:"12px",padding:"8px 10px"},md:{height:"44px",fontSize:"14px",padding:"10px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 14px"},xl:{height:"56px",fontSize:"18px",padding:"14px 16px"}},yp={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},bp={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"}},xp=[{name:"Blue",value:"#1D4ED8",category:"primary"},{name:"Purple",value:"#A855F7",category:"primary"},{name:"Green",value:"#22C55E",category:"primary"},{name:"Orange",value:"#F97316",category:"primary"},{name:"Red",value:"#EF4444",category:"primary"},{name:"Ink",value:"#111827",category:"neutral"}],kp=typeof navigator<"u"&&navigator.product!=="ReactNative"&&typeof document<"u"&&typeof document.createElement=="function",Cp=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:l={},size:c="md",shape:s="default",variant:d="default",error:g=!1,isDisabled:m=!1,isReadOnly:f=!1,predefinedColors:p=xp,showCustomInput:u=!0,showRecentColors:y=!0,isOpen:k,selectedColor:x,recentColors:C,customColor:S,handleToggle:w,handleColorSelect:v,handleCustomColorChange:b,handleCustomColorSubmit:I,handleClose:T,triggerRef:j,dropdownRef:E,onChange:D,onChangeComplete:W,onOpen:A,onClose:H,colorFormat:z,maxRecentColors:P,closeOnSelect:V,defaultValue:M,value:L,..._})=>{const O={...Lo.container,...l==null?void 0:l.container},N={...Lo.trigger,...up[c],...yp[s],...bp[d],...g&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...!m&&!f&&{_hover:{borderColor:"color-gray-400"}},...l==null?void 0:l.trigger},U={...Lo.dropdown,...l==null?void 0:l.dropdown},X={...Lo.colorGrid,...l==null?void 0:l.colorGrid},oe={...Lo.recentColors,...l==null?void 0:l.recentColors},B=x||"color-gray-200";return r.jsxs(i.View,{id:e,...O,..._,children:[t&&r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",fontWeight:"500",color:"color-gray-600",marginBottom:"6px",...l==null?void 0:l.label,children:t}),r.jsxs(i.View,{ref:j,onClick:m||f?void 0:w,...N,children:[r.jsxs(i.Horizontal,{alignItems:"center",gap:8,children:[r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:B,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"}),r.jsx(i.Text,{color:x?"color-gray-900":"color-gray-500",fontSize:"inherit",children:x||n})]}),!f&&!m&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:k?"up":"down"})]}),k&&r.jsxs(i.View,{ref:E,...U,children:[r.jsx(i.View,{...X,children:p.map(($,q)=>r.jsx(i.View,{width:"36px",height:"36px",borderRadius:"8px",backgroundColor:$.value,borderWidth:"1px",borderStyle:"solid",borderColor:x===$.value?"theme-primary":"transparent",cursor:"pointer",onClick:()=>v($.value),title:$.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"},...l==null?void 0:l.colorSwatch},q))}),u&&r.jsxs(i.View,{...Lo.customInput,...l==null?void 0:l.customInput,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",marginBottom:"10px",children:[kp&&r.jsx("input",{type:"color",value:S||"#1D4ED8",onChange:$=>{const q=$.target.value;b(q),v(q)},style:{width:"36px",height:"36px",border:"1px solid #E5E7EB",borderRadius:"8px",cursor:"pointer",backgroundColor:"transparent"},title:"Pick a color"}),r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:"HEX"})]}),r.jsx(je,{placeholder:"#1D4ED8",value:S,onChange:$=>{var q;return b(typeof $=="string"?$:((q=$==null?void 0:$.target)==null?void 0:q.value)??"")},onKeyPress:$=>{$.key==="Enter"&&I()},size:"sm",right:S&&r.jsx(i.View,{width:"18px",height:"18px",borderRadius:"6px",backgroundColor:S,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",onClick:I})})]}),y&&C.length>0&&r.jsxs(i.View,{...oe,children:[r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",fontWeight:"500",color:"color-gray-500",marginBottom:"8px",children:"Recent Colors"}),r.jsx(i.Horizontal,{gap:8,flexWrap:"wrap",children:C.map(($,q)=>r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:$,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>v($),title:$,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"}},q))})]})]}),a&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",color:g?"color-red-500":"color-gray-500",marginTop:"4px",...l==null?void 0:l.helperText,children:a})]})},ui=e=>{const o=pp(e);return r.jsx(Cp,{...o,...e})},wp=e=>{const o=Ll(e);return r.jsx(_l,{...o,...e})},Sp=e=>{const o=Dl(e);return r.jsx($l,{...o,...e})},yi={"to-right":"to right","to-left":"to left","to-bottom":"to bottom","to-top":"to top","to-top-right":"to top right","to-top-left":"to top left","to-bottom-right":"to bottom right","to-bottom-left":"to bottom left"},Ur={center:"center",top:"top",right:"right",bottom:"bottom",left:"left","top-right":"top right","top-left":"top left","bottom-right":"bottom right","bottom-left":"bottom left"},vp={linear:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],radial:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],conic:[{color:"color-red-500",position:"0deg"},{color:"color-yellow-500",position:"90deg"},{color:"color-green-500",position:"180deg"},{color:"color-blue-500",position:"270deg"},{color:"color-red-500",position:"360deg"}]},Tp=(e,o,t,n,a)=>{const l=o.map(c=>`${c.color} ${c.position||""}`).join(", ");switch(e){case"linear":return`linear-gradient(${t&&yi[t]?yi[t]:t||"to right"}, ${l})`;case"radial":const s=a&&Ur[a]?Ur[a]:a||"center";return`radial-gradient(${n||"circle"} at ${s}, ${l})`;case"conic":return`conic-gradient(from 0deg at ${a&&Ur[a]?Ur[a]:a||"center"}, ${l})`;default:return`linear-gradient(to right, ${l})`}},Ip={linear:{backgroundSize:"200% 200%",transition:"background-position 3s ease-in-out",animate:{from:{backgroundPosition:"0% 50%"},"50%":{backgroundPosition:"100% 50%"},to:{backgroundPosition:"0% 50%"}}},radial:{backgroundSize:"100% 100%",transition:"background-position 3s ease-in-out, background-size 3s ease-in-out",animate:{from:{backgroundPosition:"center",backgroundSize:"100% 100%"},"50%":{backgroundSize:"120% 120%"},to:{backgroundPosition:"center",backgroundSize:"100% 100%"}}},conic:{transition:"transform 3s linear",animate:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}}},bi={container:{position:"relative",overflow:"hidden",borderRadius:"8px",transition:"border-radius 0.2s ease, opacity 0.2s ease"},content:{position:"relative",zIndex:1,width:"100%",height:"100%",padding:"16px"}},Fp=({type:e="linear",direction:o="to-right",shape:t="circle",position:n="center",from:a,to:l,colors:c,animate:s=!1,animationDuration:d=3,children:g,views:m,themeMode:f,...p})=>{const u=h.useMemo(()=>c&&c.length>0?c:a&&l?[{color:a,position:"0%"},{color:l,position:"100%"}]:vp[e],[c,a,l,e]),y=h.useMemo(()=>{const x=u.map(C=>({...C,color:C.color}));return Tp(e,x,o,t,n)},[e,u,o,t,n]),k=h.useMemo(()=>{if(!s)return{};const x=Ip[e];return{...x,transition:x.transition.replace("3s",`${d}s`),animationDuration:`${d}s`,animationIterationCount:"infinite",animationTimingFunction:e==="conic"?"linear":"ease-in-out"}},[s,d,e]);return r.jsx(i.View,{background:y,...bi.container,...k,...m==null?void 0:m.container,...p,children:g&&r.jsx(i.View,{...bi.content,...m==null?void 0:m.content,children:g})})},xi=e=>r.jsx(Fp,{...e}),zp=(e=null,o=null)=>{const[t,n]=h.useState(e),[a,l]=h.useState(o),c=d=>a===d,s=d=>{l(g=>g===d?null:d)};return h.useEffect(()=>{const d=m=>{!m.composedPath().some(u=>(u==null?void 0:u.id)==="menubar-content"||(u==null?void 0:u.id)==="menubar-trigger")&&a!==null&&l(null)},g=m=>{m.key==="Escape"&&a!==null&&l(null)};if(!(typeof document>"u"))return document.addEventListener("mousedown",d),document.addEventListener("keydown",g),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",g)}},[a]),{activeMenuId:t,setActiveMenuId:n,openMenuId:a,setOpenMenuId:l,isMenuOpen:c,toggleMenu:s}},ki={sm:{padding:"6px 10px",fontSize:"14px"},md:{padding:"8px 12px",fontSize:"16px"},lg:{padding:"10px 16px",fontSize:"18px"}},Mp={default:{backgroundColor:"transparent",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Wp={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},Gr={active:{backgroundColor:"color-gray-200",fontWeight:"bold"},hover:{backgroundColor:"color-gray-100"},disabled:{opacity:.5,cursor:"not-allowed"}},Ci=h.createContext({activeMenuId:null,setActiveMenuId:()=>{},openMenuId:null,setOpenMenuId:()=>{},isMenuOpen:()=>!1,toggleMenu:()=>{},orientation:"horizontal",size:"md",variant:"default",triggerRefs:{current:{}}}),Yr=()=>h.useContext(Ci),Hp=({value:e,children:o})=>r.jsx(Ci.Provider,{value:e,children:o}),wi=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",views:a,...l})=>{const c=o==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(c,{role:"menubar","aria-orientation":o,...Wp[o],...Mp[n],...a==null?void 0:a.container,...l,children:e})},Si=({children:e,id:o,disabled:t=!1,views:n})=>{const{orientation:a}=Yr(),l=a==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(l,{role:"none",position:"relative",opacity:t?.5:1,pointerEvents:t?"none":"auto",...n==null?void 0:n.menu,children:h.Children.map(e,c=>h.isValidElement(c)?h.cloneElement(c,{...c.props,menuId:o}):c)})},vi=({children:e,menuId:o,disabled:t=!1,views:n})=>{const{activeMenuId:a,setActiveMenuId:l,toggleMenu:c,isMenuOpen:s,size:d,triggerRefs:g}=Yr(),m=h.useRef(null),f=a===o,p=s(o);h.useEffect(()=>(m.current&&o&&(g.current[o]=m.current),()=>{o&&delete g.current[o]}),[o,g]);const u=()=>{t||(l(o),c(o))};return r.jsx(i.View,{ref:m,id:"menubar-trigger",role:"menuitem","aria-haspopup":"true","aria-expanded":p,userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",...ki[d],...f?Gr.active:{},...t?Gr.disabled:{},_hover:t?{}:Gr.hover,onClick:u,...n==null?void 0:n.trigger,children:e})},Ti=({children:e,menuId:o,views:t})=>{const{isMenuOpen:n,orientation:a,triggerRefs:l}=Yr(),c=h.useRef(null),[s,d]=h.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),g=n(o);if(h.useEffect(()=>{if(g&&c.current&&o&&l.current[o]){const f=c.current.getBoundingClientRect(),p=l.current[o].getBoundingClientRect(),u=Math.max(f.width||200,200),y=Math.max(f.height||150,150),k=window.innerWidth,x=window.innerHeight,C={top:p.top,right:k-p.right,bottom:x-p.bottom,left:p.left},S=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8},{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top}]:[{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8}],w=S.find(T=>T.fits);if(w){d({x:w.x,y:w.y,placement:w.placement});return}const v=S.reduce((T,j)=>j.space>T.space?j:T);let b=v.x,I=v.y;b+u>k&&(b=k-u-8),b<8&&(b=8),I+y>x&&(I=x-y-8),I<8&&(I=8),d({x:b,y:I,placement:v.placement})}},[g,a,o,l]),!g)return null;const m={position:"fixed",left:s.x,top:s.y,zIndex:1e3};return r.jsx(i.View,{ref:c,id:"menubar-content",role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:m,...t==null?void 0:t.content,children:e})},Ii=({children:e,icon:o,disabled:t=!1,onClick:n,views:a})=>{const{size:l}=Yr(),c=()=>{t||!n||n()};return r.jsxs(i.View,{role:"menuitem",cursor:t?"not-allowed":"pointer",userSelect:"none",display:"flex",alignItems:"center",opacity:t?.5:1,...ki[l],_hover:t?{}:Gr.hover,onClick:c,...a==null?void 0:a.item,children:[o&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:o}),e]})},Fi=({views:e})=>r.jsx(i.View,{role:"separator",height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.separator}),jp=({items:e,orientation:o,size:t,variant:n,views:a,themeMode:l})=>r.jsx(wi,{orientation:o,size:t,variant:n,views:a,children:e.map(c=>r.jsxs(Si,{id:c.id,disabled:c.disabled,views:a,children:[r.jsxs(vi,{menuId:c.id,views:a,children:[c.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:c.icon}),c.label]}),c.items&&c.items.length>0&&r.jsx(Ti,{menuId:c.id,views:a,children:c.items.map((s,d)=>s.separator?r.jsx(Fi,{views:a},`separator-${d}`):r.jsx(Ii,{id:s.id,icon:s.icon,disabled:s.disabled,onClick:s.onClick,views:a,children:s.label},s.id))})]},c.id))}),xo=({items:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultActiveMenuId:a=null,defaultOpenMenuId:l=null,views:c,...s})=>{const{activeMenuId:d,setActiveMenuId:g,openMenuId:m,setOpenMenuId:f,isMenuOpen:p,toggleMenu:u}=zp(a,l),y=h.useRef({});return r.jsx(Hp,{value:{activeMenuId:d,setActiveMenuId:g,openMenuId:m,setOpenMenuId:f,isMenuOpen:p,toggleMenu:u,orientation:o,size:t,variant:n,triggerRefs:y},children:r.jsx(jp,{items:e,orientation:o,size:t,variant:n,views:c,...s})})};xo.Root=wi,xo.Menu=Si,xo.Trigger=vi,xo.Content=Ti,xo.Item=Ii,xo.Separator=Fi;const Pp=(e,o,t)=>{const[n,a]=h.useState([]);return h.useEffect(()=>{a((()=>{const c=[];if(o<=t)for(let s=1;s<=o;s++)c.push(s);else{c.push(1);let s=Math.max(2,e-Math.floor((t-2)/2)),d=Math.min(o-1,s+t-3);d>=o-1&&(d=o-1,s=Math.max(2,d-(t-3))),s>2&&c.push("...");for(let g=s;g<=d;g++)c.push(g);d<o-1&&c.push("..."),c.push(o)}return c})())},[e,o,t]),{visiblePageNumbers:n}},_o={sm:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px",media:{mobile:{fontSize:"11px",padding:"3px 6px",minWidth:"24px",height:"24px"}}},md:{fontSize:"14px",padding:"6px 10px",minWidth:"32px",height:"32px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}},lg:{fontSize:"14px",padding:"8px 12px",minWidth:"36px",height:"36px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}}},sr={default:{backgroundColor:"transparent",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-200"}},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}}},dr={rounded:{borderRadius:8},square:{borderRadius:"0px"},circular:{borderRadius:"50%"}},Vp={backgroundColor:"theme-primary",color:"color-white",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"theme-primary",opacity:.9}},Kr={opacity:.5,cursor:"not-allowed",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"transparent"}},Ap=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a=[{label:"10 / page",value:10},{label:"20 / page",value:20},{label:"50 / page",value:50},{label:"100 / page",value:100}],onPageSizeChange:l,showPageSizeSelector:c=!1,showPageInfo:s=!0,maxPageButtons:d=5,showFirstLastButtons:g=!1,size:m="md",variant:f="default",shape:p="rounded",visiblePageNumbers:u=[],views:y,...k})=>{const x=w=>{w<1||w>o||w===e||t(w)},C=w=>{l&&l(Number(w.target.value))},S=(w,v)=>{if(w==="...")return r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",..._o[m],...y==null?void 0:y.ellipsis,children:"..."},`ellipsis-${v}`);const b=w===e;return r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:b?"default":"pointer",..._o[m],...sr[f],...dr[p],...b?Vp:{},onClick:()=>x(w),"aria-label":`Page ${w}`,"aria-current":b?"page":void 0,...b?y==null?void 0:y.activePageButton:y==null?void 0:y.pageButton,children:w},`page-${w}`)};return r.jsxs(i.Horizontal,{alignItems:"center",gap:8,...y==null?void 0:y.container,...k,children:[g&&r.jsxs(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",..._o[m],...sr[f],...dr[p],...e===1?Kr:{},onClick:()=>x(1),"aria-label":"First page",disabled:e===1,...y==null?void 0:y.navigationButton,children:[r.jsx(he,{orientation:"left",widthHeight:16}),r.jsx(he,{orientation:"left",widthHeight:16,marginLeft:"-8px"})]}),r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",..._o[m],...sr[f],...dr[p],...e===1?Kr:{},onClick:()=>x(e-1),"aria-label":"Previous page",disabled:e===1,...y==null?void 0:y.navigationButton,children:r.jsx(he,{orientation:"left",widthHeight:16})}),u.map((w,v)=>S(w,v)),r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",..._o[m],...sr[f],...dr[p],...e===o?Kr:{},onClick:()=>x(e+1),"aria-label":"Next page",disabled:e===o,...y==null?void 0:y.navigationButton,children:r.jsx(he,{orientation:"right",widthHeight:16})}),g&&r.jsxs(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",..._o[m],...sr[f],...dr[p],...e===o?Kr:{},onClick:()=>x(o),"aria-label":"Last page",disabled:e===o,...y==null?void 0:y.navigationButton,children:[r.jsx(he,{orientation:"right",widthHeight:16}),r.jsx(he,{orientation:"right",widthHeight:16,marginLeft:"-8px"})]}),s&&r.jsxs(i.Text,{marginLeft:16,color:"color-gray-600",...y==null?void 0:y.pageInfo,children:["Page ",e," of ",o]}),c&&l&&r.jsx(i.View,{as:"select",marginLeft:16,padding:"4px 8px",borderRadius:"4px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"color-white",cursor:"pointer",value:n,onChange:C,...y==null?void 0:y.pageSizeSelector,children:a.map(w=>r.jsx("option",{value:w.value,children:w.label},w.value))})]})},zi=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:c=!1,showPageInfo:s=!0,maxPageButtons:d=5,showFirstLastButtons:g=!1,size:m="md",variant:f="default",shape:p="rounded",views:u,...y})=>{const{visiblePageNumbers:k}=Pp(e,o,d);return r.jsx(Ap,{currentPage:e,totalPages:o,onPageChange:t,pageSize:n,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:c,showPageInfo:s,maxPageButtons:d,showFirstLastButtons:g,size:m,variant:f,shape:p,visiblePageNumbers:k,views:u,...y})},Ep=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Dp=h.memo(({shape:e="linear",value:o=0,max:t=100,color:n="theme-primary",backgroundColor:a="color-gray-200",height:l,size:c,radius:s=4,strokeWidth:d=10,showLabel:g=!1,labelColor:m="color-black-primary",animated:f=!0,animationDuration:p="0.5s",views:u,themeMode:y,...k})=>{var D;const{getColor:x,themeMode:C}=i.useTheme(),S=y||C,v=Math.min(t,Math.max(0,o))/t*100,b=W=>Ep(W)?W:x(W,{themeMode:S}),I=h.useMemo(()=>b(a),[x,a,S]),T=h.useMemo(()=>b(n),[x,n,S]);if(e==="circle"){const W=c||(typeof l=="number"?l:100),A=(W-d)/2,H=2*Math.PI*A,z=H-v/100*H;return r.jsxs(i.View,{width:W,height:W,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...u==null?void 0:u.container,...k,children:[r.jsxs("svg",{width:W,height:W,viewBox:`0 0 ${W} ${W}`,style:{transform:"rotate(-90deg)"},children:[r.jsx("circle",{cx:W/2,cy:W/2,r:A,stroke:I,strokeWidth:d,fill:"transparent",...u==null?void 0:u.track}),r.jsx("circle",{cx:W/2,cy:W/2,r:A,stroke:T,strokeWidth:d,strokeDasharray:H,strokeDashoffset:z,strokeLinecap:"round",fill:"transparent",style:{transition:f?`stroke-dashoffset ${p} ease-in-out`:"none"},...u==null?void 0:u.indicator})]}),g&&r.jsx(i.View,{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",children:r.jsxs(i.Text,{color:m,fontSize:`${W*.2}px`,fontWeight:"bold",...u==null?void 0:u.text,children:[Math.round(v),"%"]})})]})}const j=l||8,E={backgroundColor:I,...((D=u==null?void 0:u.container)==null?void 0:D.style)||{},...k.style||{}};return r.jsxs(i.View,{role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":t,width:"100%",height:j,borderRadius:s,overflow:"hidden",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...u==null?void 0:u.container,...k,style:E,children:[r.jsx("div",{style:{height:"100%",backgroundColor:T,borderRadius:typeof s=="number"?`${s}px`:s,position:"absolute",left:0,top:0,bottom:0,width:`${v}%`,transition:f?`width ${p} ease-in-out`:"none",...u==null?void 0:u.bar}}),g&&r.jsxs(i.Text,{color:m,fontSize:typeof j=="number"&&j>16?`${j*.6}px`:"10px",fontWeight:"bold",position:"relative",zIndex:1,...u==null?void 0:u.text,children:[Math.round(v),"%"]})]})}),Mi=e=>{const o=pe("progress",e);return r.jsx(Dp,{...o})},$p=(e=>({solid:"solid",dashed:"dashed",dotted:"dotted"}))(),Lp={thin:"1px",medium:"2px",thick:"4px"},gr={container:{transition:"opacity 0.15s ease"},label:{fontSize:"14px",fontWeight:"500",color:"color-gray-600",paddingHorizontal:"8px",backgroundColor:"color-white",transition:"color 0.15s ease"}},_p=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Bp=({orientation:e="horizontal",variant:o="solid",thickness:t="thin",color:n,spacing:a="0px",label:l,decorative:c=!1,views:s,themeMode:d,...g})=>{const{themeMode:m}=i.useTheme(),f=n||"color-gray-200",p=$p[o],u=Lp[t],y=c?{"aria-hidden":!0}:{role:"separator","aria-orientation":e},k=_p(f)?{style:{borderColor:f}}:{borderColor:f};return l&&e==="horizontal"?r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"center",width:"100%",padding:a,...y,...g,children:[r.jsx(i.View,{height:"0px",flexGrow:1,borderTop:`${u} ${p}`,...k,...gr.container,...s==null?void 0:s.container}),r.jsx(i.Text,{...gr.label,...s==null?void 0:s.label,children:l}),r.jsx(i.View,{height:"0px",flexGrow:1,borderTop:`${u} ${p}`,...k,...gr.container,...s==null?void 0:s.container})]}):e==="horizontal"?r.jsx(i.View,{height:"0px",width:"100%",borderTop:`${u} ${p}`,padding:a,...k,...gr.container,...y,...s==null?void 0:s.container,...g}):r.jsx(i.View,{width:"0px",height:"100%",borderLeft:`${u} ${p}`,padding:a,...k,...gr.container,...y,...s==null?void 0:s.container,...g})},Wi=e=>{const o=pe("separator",e);return r.jsx(Bp,{...o})},Xr=Wi,Op=Wi,Np={xs:12,sm:14,md:16,lg:18,xl:20},qp=({isSupported:e,isSharing:o,onShare:t,label:n,children:a,icon:l,size:c,isDisabled:s,isLoading:d,iconPosition:g,disableWhenUnsupported:m=!0,...f})=>{const p=c??"md",u=l??r.jsx(Gn,{widthHeight:Np[p],strokeWidth:1.5,filled:!1}),y=!!s||!e&&m,k=!!d||o;return r.jsx(de,{...f,size:p,icon:u,iconPosition:g??"left",isDisabled:y,isLoading:k,onClick:t,children:a??n??"Share"})},Hi=()=>typeof navigator>"u"?void 0:navigator,Up=(e,o)=>{if(!e||typeof e.share!="function")return!1;if(typeof e.canShare=="function")try{return e.canShare(o)}catch{return!1}return!0},Gp=e=>{if(typeof e=="object"&&e!==null&&"name"in e)return String(e.name)},Yp=e=>{const{shareData:o,onClick:t,onUnsupported:n,onShareStart:a,onShareSuccess:l,onShareCancel:c,onShareError:s}=e,[d,g]=h.useState(!1),m=h.useMemo(()=>Up(Hi(),o),[o]),f=h.useCallback((...p)=>{t==null||t(...p);const u=Hi();if(!u||typeof u.share!="function"){n==null||n();return}if(!d){if(typeof u.canShare=="function")try{if(!u.canShare(o)){n==null||n();return}}catch(y){s==null||s(y);return}g(!0),a==null||a();try{u.share(o).then(()=>{l==null||l()}).catch(y=>{if(Gp(y)==="AbortError"){c==null||c();return}s==null||s(y)}).finally(()=>{g(!1)})}catch(y){g(!1),s==null||s(y)}}},[d,t,c,s,a,l,n,o]);return{isSupported:m,isSharing:d,handleShare:f}},ji=e=>{const{isSupported:o,isSharing:t,handleShare:n}=Yp(e),{shareData:a,onShareStart:l,onShareSuccess:c,onShareCancel:s,onShareError:d,onUnsupported:g,onClick:m,...f}=e;return r.jsx(qp,{...f,isSupported:o,isSharing:t,onShare:n})},Kp=({label:e,status:o="default",views:t,themeMode:n,...a})=>{const{themeMode:l}=i.useTheme(),c=la();return r.jsxs(i.Horizontal,{alignItems:"center",gap:8,role:"status",...t==null?void 0:t.container,...a,children:[r.jsx(i.View,{"data-role":"status-dot","aria-hidden":"true",width:"8px",height:"8px",borderRadius:"50%",...c[o].indicator,...t==null?void 0:t.indicator}),e&&r.jsx(i.Text,{"data-role":"status-label",fontSize:"14px",lineHeight:"20px",...c[o].label,...t==null?void 0:t.label,children:e})]})},Jr=e=>{const o=pe("status",e);return r.jsx(Kp,{...o})},Xp=(e=!0,o,t,n)=>{const{on:a}=i.useResponsive(),l=a("mobile"),[c,s]=h.useState(o!==void 0?o:e);return h.useEffect(()=>{o!==void 0&&s(o)},[o]),{isExpanded:c,toggleExpanded:()=>{const f=!c;s(f),t&&t(f)},expand:()=>{c||(s(!0),t&&t(!0))},collapse:()=>{c&&(s(!1),t&&t(!1))},isMobile:l}},Jp={sm:{expandedWidth:"240px",collapsedWidth:"64px"},md:{expandedWidth:"280px",collapsedWidth:"72px"},lg:{expandedWidth:"320px",collapsedWidth:"80px"},xl:{expandedWidth:"360px",collapsedWidth:"88px"}},Qp=(e=>({default:{backgroundColor:"color-white",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},subtle:{backgroundColor:"color-gray-50",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease"},elevated:{backgroundColor:"color-white",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",color:"color-gray-800",transition:"all 0.2s ease-in-out"}}))(),Zp={left:{left:0,borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{right:0,borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"}},Rp={none:{},low:{boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},medium:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)"},high:{boxShadow:"0 10px 30px rgba(0, 0, 0, 0.15)"}},eu={fast:"all 0.2s ease-in-out",normal:"all 0.3s ease-in-out",slow:"all 0.5s ease-in-out",bounce:"all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55)"},Pi=h.createContext({isExpanded:!0,toggleExpanded:()=>{},expand:()=>{},collapse:()=>{},position:"left",size:"md",variant:"default"}),Qr=()=>h.useContext(Pi),ou=({value:e,children:o})=>r.jsx(Pi.Provider,{value:e,children:o}),ru=({children:e,showToggleButton:o=!0,views:t,...n})=>{const{isExpanded:a,toggleExpanded:l,position:c}=Qr();return r.jsx(i.Horizontal,{width:"100%",padding:"16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:"space-between",...t==null?void 0:t.header,...n,children:a?r.jsxs(i.Horizontal,{width:"100%",alignItems:"center",justifyContent:"space-between",children:[e,o&&r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(he,{orientation:c==="left"?"left":"right",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})]}):r.jsx(i.View,{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",children:o&&r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(he,{orientation:c==="left"?"right":"left",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})})})},tu=({children:e,views:o,...t})=>{const{isExpanded:n}=Qr();return r.jsx(i.View,{flex:"1",width:"100%",overflowY:"auto",overflowX:"hidden",padding:n?"16px":"8px",...o==null?void 0:o.content,...t,children:e})},nu=({children:e,views:o,...t})=>{const{isExpanded:n}=Qr();return r.jsx(i.View,{width:"100%",padding:n?"16px":"8px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",...o==null?void 0:o.footer,...t,children:e})},au=({children:e,position:o="left",size:t="md",variant:n="default",fixed:a=!1,hasBackdrop:l=!0,expandedWidth:c,collapsedWidth:s,breakpoint:d,breakpointBehavior:g="overlay",elevation:m="none",transitionPreset:f="normal",ariaLabel:p="Sidebar navigation",showToggleButton:u,toggleExpanded:y,expand:k,isExpanded:x,isMobile:C,collapse:S,views:w,themeMode:v,...b})=>{const I=Jp[t],T=x?c||I.expandedWidth:s||I.collapsedWidth,j=!C||C&&g!=="hide",E=a||C&&g==="overlay"?"fixed":"relative",D=l&&C&&x&&g==="overlay";return r.jsxs(r.Fragment,{children:[D&&r.jsx(i.View,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"color-dark-50-360",zIndex:998,onClick:S,...w==null?void 0:w.backdrop}),j&&r.jsx(i.Vertical,{position:E,top:0,height:"100vh",width:T,zIndex:999,transition:eu[f],transform:C&&g==="overlay"&&!x?`translateX(${o==="left"?"-100%":"100%"})`:"translateX(0)",role:"navigation","aria-label":p,...Qp[n],...Zp[o],...Rp[m],...w==null?void 0:w.container,...b,children:h.Children.map(e,W=>W)})]})},hr=({children:e,position:o="left",size:t="md",variant:n="default",defaultExpanded:a=!0,expanded:l,onExpandedChange:c,fixed:s=!1,hasBackdrop:d=!0,showToggleButton:g=!0,expandedWidth:m,collapsedWidth:f,breakpoint:p=768,breakpointBehavior:u="overlay",views:y,...k})=>{const{isExpanded:x,toggleExpanded:C,expand:S,collapse:w,isMobile:v}=Xp(a,l,c);return r.jsx(ou,{value:{isExpanded:x,toggleExpanded:C,expand:S,collapse:w,position:o,size:t,variant:n,views:y},children:r.jsx(au,{position:o,size:t,variant:n,fixed:s,hasBackdrop:d,showToggleButton:g,expandedWidth:m,collapsedWidth:f,breakpoint:p,breakpointBehavior:u,isExpanded:x,isMobile:v,toggleExpanded:C,expand:S,collapse:w,views:y,...k,children:e})})};hr.Header=ru,hr.Content=tu,hr.Footer=nu,hr.useContext=Qr;const lu=()=>({getItem:e=>{try{return typeof localStorage>"u"?null:localStorage.getItem(`resizable-${e}`)}catch(o){return console.warn("Failed to access localStorage:",o),null}},setItem:(e,o)=>{try{if(typeof localStorage>"u")return;localStorage.setItem(`resizable-${e}`,o)}catch(t){console.warn("Failed to write to localStorage:",t)}}}),iu=(e,o,t,n=50,a=1/0,l=!1,c,s,d=10)=>{const[g,m]=h.useState(!1),[f,p]=h.useState([]),u=h.useRef(null),y=h.useRef(null),k=h.useRef(0),x=h.useRef([]),C=h.useRef(s||(typeof window<"u"?lu():null)),S=h.useCallback(()=>u.current?e==="horizontal"?u.current.offsetWidth:u.current.offsetHeight:0,[e]),w=h.useCallback(()=>{if(!c||!C.current)return null;const P=C.current.getItem(c);if(!P)return null;try{const V=JSON.parse(P);return Array.isArray(V.sizes)?V.sizes:null}catch(V){return console.warn("Failed to parse saved panel sizes:",V),null}},[c]),v=h.useCallback(()=>{if(!c||!C.current||f.length===0)return;const P=f.map(V=>({id:V.id,size:V.size,collapsed:V.collapsed||!1}));C.current.setItem(c,JSON.stringify({sizes:P}))},[c,f]),b=h.useCallback((P,V,M,L,_)=>{p(O=>O.some(N=>N.id===P)?O:[...O,{id:P,size:V,minSize:M??n,maxSize:L??a,collapsible:_??l,collapsed:!1}])},[n,a,l]),I=h.useCallback(P=>{p(V=>V.filter(M=>M.id!==P))},[]),T=h.useCallback(P=>{const V=f.find(M=>M.id===P);return V?V.size:0},[f]),j=h.useCallback((P,V)=>{p(M=>M.map(L=>L.id===P?{...L,size:V}:L))},[]),E=h.useCallback(P=>{const V=f.find(M=>M.id===P);return V?!!V.collapsed:!1},[f]),D=h.useCallback(P=>{p(V=>{const M=V.findIndex(N=>N.id===P);if(M===-1)return V;const L=V[M];if(!L.collapsible)return V;const _={...L,collapsed:!L.collapsed},O=[...V];return O[M]=_,O})},[]),W=h.useCallback((P,V)=>{y.current=P,k.current=V,x.current=f.map(M=>M.size),m(!0)},[f]),A=h.useCallback(P=>{if(!g||!y.current)return;const V=y.current,M=P-k.current;let L=-1;const _=V.match(/\d+$/);if(_&&(L=parseInt(_[0],10)-1),L===-1&&f.length>=2&&(L=0),L<0||L>=f.length-1)return;const O=f[L],N=f[L+1];if(O.collapsed||N.collapsed)return;let U=x.current[L]+M,X=x.current[L+1]-M;U=Math.max(O.minSize??n,Math.min(O.maxSize??a,U)),X=Math.max(N.minSize??n,Math.min(N.maxSize??a,X)),p(oe=>oe.map((B,$)=>$===L?{...B,size:U}:$===L+1?{...B,size:X}:B))},[g,f,e,n,a]),H=h.useCallback(()=>{g&&t&&t(f.map(P=>P.size)),y.current=null,m(!1),c&&v()},[g,f,t,c,v]),z=h.useCallback(P=>{if(!g||!y.current)return;const V=y.current;let M=-1;const L=V.match(/\d+$/);if(L&&(M=parseInt(L[0],10)-1),M===-1&&f.length>=2&&(M=0),M<0||M>=f.length-1)return;let _=0;e==="horizontal"?(P.key==="ArrowLeft"&&(_=-d),P.key==="ArrowRight"&&(_=d),P.key==="Home"&&(_=-100),P.key==="End"&&(_=100)):(P.key==="ArrowUp"&&(_=-d),P.key==="ArrowDown"&&(_=d),P.key==="Home"&&(_=-100),P.key==="End"&&(_=100)),_!==0&&(P.preventDefault(),A(k.current+_)),P.key==="Escape"&&(p(O=>O.map((N,U)=>({...N,size:x.current[U]}))),H())},[g,f,e,A,H,d]);return h.useEffect(()=>{if(typeof document>"u")return;const P=L=>{if(!g)return;const _=e==="horizontal"?L.clientX:L.clientY;A(_)},V=L=>{if(!g||L.touches.length===0)return;const _=L.touches[0],O=e==="horizontal"?_.clientX:_.clientY;A(O)},M=()=>{g&&H()};return g&&(document.addEventListener("mousemove",P),document.addEventListener("touchmove",V),document.addEventListener("mouseup",M),document.addEventListener("touchend",M),document.addEventListener("keydown",z),document.body.style.cursor=e==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",P),document.removeEventListener("touchmove",V),document.removeEventListener("mouseup",M),document.removeEventListener("touchend",M),document.removeEventListener("keydown",z),document.body.style.cursor="",document.body.style.userSelect=""}},[g,e,A,H,z]),h.useEffect(()=>{if(f.length!==0){if(c){const P=w();if(P){p(V=>V.map(M=>{const L=P.find(_=>_.id===M.id);return L?{...M,size:L.size,collapsed:L.collapsed||!1}:M}));return}}if(!o){const V=S()/f.length;p(M=>M.map(L=>({...L,size:V})))}}},[f.length,o,S,c,w]),h.useEffect(()=>{if(!o||o.length===0||f.length===0)return;const P=S(),V=o.map(M=>typeof M=="string"&&M.endsWith("%")?parseFloat(M)/100*P:typeof M=="number"?M:parseFloat(M));p(M=>M.map((L,_)=>({...L,size:_<V.length?V[_]:L.size})))},[o,f.length,S]),h.useEffect(()=>{f.length>0&&c&&!g&&v()},[f,c,g,v]),{isResizing:g,setIsResizing:m,containerRef:u,panels:f,registerPanel:b,unregisterPanel:I,getPanelSize:T,setPanelSize:j,isPanelCollapsed:E,togglePanelCollapse:D,startResize:W,onResize:A,endResize:H}},cu={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},su=(e,o)=>({sm:{width:o==="horizontal"?"4px":"100%",height:o==="vertical"?"4px":"100%"},md:{width:o==="horizontal"?"6px":"100%",height:o==="vertical"?"6px":"100%"},lg:{width:o==="horizontal"?"8px":"100%",height:o==="vertical"?"8px":"100%"}})[e],du=(e=>({default:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}},subtle:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-100"},_active:{backgroundColor:"color-gray-200"}},prominent:{backgroundColor:"color-gray-100",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}}}))(),Zr={horizontal:{width:"2px",height:"20px",backgroundColor:"color-gray-400",margin:"0 1px"},vertical:{width:"20px",height:"2px",backgroundColor:"color-gray-400",margin:"1px 0"}},Vi=h.createContext({orientation:"horizontal",size:"md",variant:"default",isResizing:!1,setIsResizing:()=>{},registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>0,setPanelSize:()=>{},isPanelCollapsed:()=>!1,togglePanelCollapse:()=>{},startResize:()=>{},onResize:()=>{},endResize:()=>{}}),Ai=()=>h.useContext(Vi),gu=({value:e,children:o})=>r.jsx(Vi.Provider,{value:e,children:o}),hu=({children:e,id:o,defaultSize:t,minSize:n,maxSize:a,collapsible:l,defaultCollapsed:c,onCollapseChange:s,views:d,...g})=>{const{orientation:m,registerPanel:f,unregisterPanel:p,getPanelSize:u,isPanelCollapsed:y,togglePanelCollapse:k}=Ai(),x=typeof t=="string"&&t.endsWith("%")?0:typeof t=="number"?t:0;h.useEffect(()=>(f(o,x,n,a,l),()=>p(o)),[o,x,n,a,l,f,p]);const C=u(o),S=y(o);return h.useEffect(()=>{s&&S!==void 0&&s(S)},[S,s]),h.useEffect(()=>{l&&c&&!S&&k(o)},[o,l,c,S,k]),S?r.jsx(i.View,{flex:"0 0 auto",width:m==="horizontal"?"10px":"100%",height:m==="vertical"?"10px":"100%",backgroundColor:"color-gray-200",cursor:"pointer",onClick:()=>k(o),"aria-label":`Expand panel ${o}`,role:"button",tabIndex:0,...d==null?void 0:d.collapsedPanel,...g}):r.jsx(i.View,{flex:C>0?"0 0 auto":"1",width:m==="horizontal"?`${C}px`:"100%",height:m==="vertical"?`${C}px`:"100%",overflow:"auto",...d==null?void 0:d.panel,...g,children:e})},fu=({id:e,position:o="both",disabled:t=!1,withVisualIndicator:n=!0,withCollapseButton:a=!1,collapseTarget:l,views:c,...s})=>{const{orientation:d,size:g,variant:m,startResize:f,isPanelCollapsed:p,togglePanelCollapse:u}=Ai(),k=(()=>{if(l)return l;const b=e.match(/\d+$/);if(!b)return"";const I=parseInt(b[0],10);return isNaN(I)?"":`panel${I}`})(),x=p(k),C=b=>{if(t)return;b.preventDefault();const I=d==="horizontal"?b.clientX:b.clientY;f(e,I)},S=b=>{if(t||b.touches.length===0)return;b.preventDefault();const I=b.touches[0],T=d==="horizontal"?I.clientX:I.clientY;f(e,T)},w=b=>{t||(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),f(e,0))},v=b=>{b.stopPropagation(),k&&u(k)};return r.jsxs(i.View,{role:"separator","aria-orientation":d,"aria-valuemin":0,"aria-valuemax":100,tabIndex:t?-1:0,cursor:d==="horizontal"?"col-resize":"row-resize",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...su(g,d),...du[m],onMouseDown:C,onTouchStart:S,onKeyDown:w,opacity:t?.5:1,pointerEvents:t?"none":"auto",...c==null?void 0:c.handle,...s,children:[n&&r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",width:d==="horizontal"?"100%":"auto",height:d==="vertical"?"100%":"auto",pointerEvents:"none",...c==null?void 0:c.handleIcon,children:d==="horizontal"?r.jsxs(i.Horizontal,{gap:1,children:[r.jsx(i.View,{...Zr.horizontal}),r.jsx(i.View,{...Zr.horizontal})]}):r.jsxs(i.Vertical,{gap:1,children:[r.jsx(i.View,{...Zr.vertical}),r.jsx(i.View,{...Zr.vertical})]})}),a&&k&&r.jsx(i.View,{position:"absolute",top:d==="horizontal"?"-20px":"50%",left:d==="horizontal"?"50%":"-20px",transform:d==="horizontal"?"translateX(-50%)":"translateY(-50%)",width:"16px",height:"16px",borderRadius:"full",backgroundColor:"color-gray-100",border:"1px solid",borderColor:"color-gray-300",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:1,onClick:v,"aria-label":x?`Expand panel ${k}`:`Collapse panel ${k}`,role:"button",tabIndex:0,pointerEvents:"auto",_hover:{backgroundColor:"color-gray-200"},...c==null?void 0:c.collapseIcon,children:r.jsx(i.View,{width:"8px",height:"8px",display:"flex",alignItems:"center",justifyContent:"center",children:x?r.jsxs(i.Horizontal,{children:[r.jsx(i.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"}),r.jsx(i.View,{width:"2px",height:"6px",backgroundColor:"color-gray-600",position:"absolute"})]}):r.jsx(i.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"})})})]})},mu=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,minSize:l,maxSize:c,collapsible:s=!1,containerRef:d,autoSaveId:g,keyboardResizeBy:m,onLayout:f,views:p,...u})=>{const y=o==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(y,{ref:d,width:"100%",height:"100%",position:"relative",overflow:"hidden",...cu[o],...p==null?void 0:p.container,...u,children:e})},fn=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,onSizesChange:l,minSize:c=50,maxSize:s,collapsible:d=!1,autoSaveId:g,storage:m,keyboardResizeBy:f=10,views:p,...u})=>{const{isResizing:y,setIsResizing:k,containerRef:x,registerPanel:C,unregisterPanel:S,getPanelSize:w,setPanelSize:v,isPanelCollapsed:b,togglePanelCollapse:I,startResize:T,onResize:j,endResize:E}=iu(o,a,l,c,s,d,g,m,f);return r.jsx(gu,{value:{orientation:o,size:t,variant:n,isResizing:y,setIsResizing:k,registerPanel:C,unregisterPanel:S,getPanelSize:w,setPanelSize:v,isPanelCollapsed:b,togglePanelCollapse:I,startResize:T,onResize:j,endResize:E},children:r.jsx(mu,{orientation:o,size:t,variant:n,defaultSizes:a,minSize:c,maxSize:s,collapsible:d,autoSaveId:g,keyboardResizeBy:f,containerRef:x,views:p,...u,children:e})})};fn.Panel=hu,fn.Handle=fu;const Rr={info:{container:{backgroundColor:"color-blue-50",border:"color-blue-300"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",border:"color-green-300"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},warning:{container:{backgroundColor:"color-orange-50",border:"color-orange-300"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}},error:{container:{backgroundColor:"color-red-50",border:"color-red-300"},content:{color:"color-red-700"},icon:{color:"color-red-500"}}},pu={top:{top:"16px",left:"50%",transform:"translateX(-50%)"},"top-right":{top:"16px",right:"16px"},"top-left":{top:"16px",left:"16px"},bottom:{bottom:"16px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"16px",right:"16px"},"bottom-left":{bottom:"16px",left:"16px"}},uu=()=>Math.random().toString(36).substring(2,9);let Bo=new Map;const fr=vo.create(e=>({toasts:[],add:(o,t,n,a={})=>{const l=a.id||uu(),c={id:l,variant:o,title:t,description:n,createdAt:Date.now(),isVisible:!0,...a};if(e(s=>({toasts:[...s.toasts,c]})),a.duration!==0){const s=a.duration||5e3,d=setTimeout(()=>{fr.getState().remove(l)},s);Bo.set(l,d)}return l},remove:o=>{e(t=>({toasts:t.toasts.map(n=>n.id===o?{...n,isVisible:!1}:n)})),Bo.has(o)&&(clearTimeout(Bo.get(o)),Bo.delete(o)),setTimeout(()=>{e(t=>({toasts:t.toasts.filter(n=>n.id!==o)}))},300)},removeAll:()=>{Bo.forEach(clearTimeout),Bo.clear(),e(o=>({toasts:o.toasts.map(t=>({...t,isVisible:!1}))})),setTimeout(()=>{e({toasts:[]})},300)}})),ko=(e,o,t,n)=>fr.getState().add(e,o,t,n),Ei=(e,o,t)=>ko("info",e,o,t),Di=(e,o,t)=>ko("success",e,o,t),$i=(e,o,t)=>ko("warning",e,o,t),Li=(e,o,t)=>ko("error",e,o,t),_i=e=>{fr.getState().remove(e)},Bi=()=>{fr.getState().removeAll()},Oi=({variant:e,title:o,description:t,onClose:n,isClosable:a=!0,action:l,actionText:c,showIcon:s=!0,theme:d,views:g,render:m,icon:f,id:p,isVisible:u=!0,themeMode:y})=>{const k=d??Rr,x=()=>{var v,b;if(f!==void 0)return f;const w=e?(b=(v=Rr[e])==null?void 0:v.icon)==null?void 0:b.color:Rr.info.icon.color;switch(e){case"info":return r.jsx(Re,{widthHeight:20,color:w});case"success":return r.jsx(qn,{widthHeight:20,color:w});case"warning":return r.jsx(Re,{widthHeight:20,color:w,orientation:"down"});case"error":return r.jsx(Cr,{widthHeight:20,color:w});default:return r.jsx(Re,{widthHeight:20,color:Rr.info.icon.color})}};if(m)return r.jsx(r.Fragment,{children:m({id:p||"",onClose:n})});const C=e==="error"?"alert":"status",S=e==="error"||e==="warning"?"assertive":"polite";return r.jsxs(i.Horizontal,{role:C,"aria-live":S,"aria-atomic":"true","data-state":u?"open":"closed",gap:12,width:"100%",maxWidth:"380px",borderWidth:"1px",borderStyle:"solid",borderRadius:"12px",padding:"12px 14px",alignItems:"flex-start",position:"relative",backgroundColor:k[e].container.backgroundColor,borderColor:k[e].container.border,boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",opacity:u?1:0,transform:u?"translateY(0)":"translateY(4px)",transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",...g==null?void 0:g.container,children:[s&&r.jsx(i.View,{marginTop:"2px",...g==null?void 0:g.icon,children:x()}),r.jsxs(i.Vertical,{gap:4,flex:"1",children:[r.jsx(i.Text,{fontSize:"14px",lineHeight:"20px",fontWeight:"600",color:k[e].content.color,backgroundColor:k[e].container.backgroundColor,...g==null?void 0:g.title,children:o}),t&&r.jsx(i.Text,{fontSize:"12px",lineHeight:"18px",color:k[e].content.color,fontWeight:"400",backgroundColor:k[e].container.backgroundColor,...g==null?void 0:g.description,children:t}),l&&c&&r.jsx(i.Text,{fontSize:"14px",fontWeight:"600",marginTop:"6px",cursor:"pointer",color:k[e].content.color,backgroundColor:k[e].container.backgroundColor,onClick:w=>{w.stopPropagation(),l()},_hover:{textDecoration:"underline"},transition:"opacity 0.2s ease, color 0.2s ease",...g==null?void 0:g.actionButton,children:c})]}),a&&r.jsx(i.View,{as:"button","aria-label":"Close toast",backgroundColor:"transparent",border:"none",cursor:"pointer",padding:"4px",marginLeft:"8px",marginTop:"-2px",marginRight:"-4px",borderRadius:"9999px",onClick:w=>{w.stopPropagation(),n()},_hover:{backgroundColor:"color-black-900-60"},transition:"background-color 0.2s ease, opacity 0.2s ease",...g==null?void 0:g.closeButton,children:r.jsx(He,{widthHeight:16,color:k[e].content.color})})]})},yu=({position:e="top-right",gap:o=8,limit:t=5,containerStyle:n})=>{const{toasts:a,remove:l}=fr(),s=h.useMemo(()=>{const d={top:[],"top-right":[],"top-left":[],bottom:[],"bottom-right":[],"bottom-left":[]};return a.forEach(g=>{const m=g.position||e;d[m].push(g)}),Object.keys(d).forEach(g=>{d[g]=d[g].slice(-t)}),d},[a,e,t])[e];return r.jsx(i.View,{position:"fixed",zIndex:9999,display:"flex",flexDirection:e.includes("bottom")?"column-reverse":"column",gap:`${o}px`,width:"fit-content",maxWidth:"100%",pointerEvents:"none",...pu[e],style:n,children:s.map(d=>r.jsx(i.View,{pointerEvents:"auto",animation:e.includes("right")?"slideInRight 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("left")?"slideInLeft 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("top")?"slideInDown 0.3s ease-out, fadeIn 0.3s ease-out":"slideInUp 0.3s ease-out, fadeIn 0.3s ease-out",children:r.jsx(Oi,{id:d.id,variant:d.variant,title:d.title,description:d.description,onClose:()=>l(d.id),isClosable:d.isClosable,action:d.action,actionText:d.actionText,showIcon:d.showIcon,views:d.views,render:d.render,icon:d.icon,isVisible:d.isVisible})},d.id))})},bu=()=>({toast:(e,o,t,n)=>ko(e,o,t,n),info:(e,o,t)=>Ei(e,o,t),success:(e,o,t)=>Di(e,o,t),warning:(e,o,t)=>$i(e,o,t),error:(e,o,t)=>Li(e,o,t),remove:e=>_i(e),removeAll:()=>Bi()}),xu=Object.assign(e=>r.jsx(Oi,{...e}),{Container:e=>r.jsx(yu,{...e}),show:ko,info:Ei,success:Di,warning:$i,error:Li,remove:_i,removeAll:Bi}),ku=bu,Ni=(e,o)=>{var c,s;if(!e)return!0;const t=e.toLowerCase(),n=o.name.toLowerCase().includes(t),a=((c=o.description)==null?void 0:c.toLowerCase().includes(t))||!1,l=((s=o.keywords)==null?void 0:s.some(d=>d.toLowerCase().includes(t)))||!1;return n||a||l},Cu=({open:e,onOpenChange:o,groups:t=[],commands:n=[],filter:a})=>{const[l,c]=h.useState(""),[s,d]=h.useState(0),g=h.useRef(null),m=h.useMemo(()=>a||Ni,[a]),f=h.useMemo(()=>[...t.flatMap(x=>x.commands),...n],[t,n]),p=h.useMemo(()=>l.trim()?f.filter(k=>m(l,k)):f,[f,l,m]),u=h.useMemo(()=>{if(!l)return t;const k=a||Ni;return t.map(x=>({...x,commands:x.commands.filter(C=>k(l,C))})).filter(x=>x.commands.length)},[t,l,a]);h.useEffect(()=>{d(0)},[p.length]);const y=h.useCallback(k=>{if(e)switch(k.key){case"ArrowDown":k.preventDefault(),d(x=>x<p.length-1?x+1:x);break;case"ArrowUp":k.preventDefault(),d(x=>x>0?x-1:x);break;case"Enter":k.preventDefault(),p[s]&&(p[s].onSelect(),o(!1),c(""));break;case"Escape":k.preventDefault(),o(!1),c("");break}},[e,p,s,o]);return h.useEffect(()=>{if(!(typeof document>"u"))return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[y]),h.useEffect(()=>{const k=g.current;if(k&&typeof k.querySelector=="function"&&e){const x=k.querySelector(`[data-index="${s}"]`);x&&typeof x.scrollIntoView=="function"&&x.scrollIntoView({block:"nearest"})}},[s,e]),h.useEffect(()=>{e?d(0):c("")},[e]),{search:l,setSearch:c,selectedIndex:s,setSelectedIndex:d,filteredCommands:p,filteredGroups:u,listRef:g}},wu=({onClose:e,children:o,...t})=>r.jsx(i.View,{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-dark-50-240",zIndex:9999,onClick:n=>{n.target===n.currentTarget&&(e==null||e())},...t,children:o}),qi=h.forwardRef(({value:e,onValueChange:o,...t},n)=>r.jsx(i.Input,{value:e,onChange:a=>{var l,c;return o(typeof a=="string"?a:((l=a==null?void 0:a.target)==null?void 0:l.value)??((c=a==null?void 0:a.nativeEvent)==null?void 0:c.text)??"")},ref:n,...t}));qi.displayName="CommandTextInput";const Su={sm:{width:"400px",maxHeight:"300px"},md:{width:"500px",maxHeight:"400px"},lg:{width:"600px",maxHeight:"500px"}},vu=(e=>({default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},outline:{backgroundColor:"color-white",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"}}))(),Tu={display:"flex",alignItems:"center",padding:"12px 16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},Iu={overflow:"auto",padding:"8px 0"},Fu={marginBottom:"8px"},zu={padding:"8px 16px",fontSize:"12px",fontWeight:"bold",color:"color-gray-500",textTransform:"uppercase"},Mu={display:"flex",alignItems:"center",padding:"8px 16px",cursor:"pointer",userSelect:"none",borderRadius:"4px",margin:"0 8px",_hover:{backgroundColor:"color-gray-100"}},Wu={backgroundColor:"color-blue-50",_hover:{backgroundColor:"color-blue-100"}},Hu={opacity:.5,cursor:"not-allowed",_hover:{backgroundColor:"transparent"}},ju={display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",color:"color-gray-500"},Pu={display:"flex",flexDirection:"column",flex:1},Vu={fontSize:"14px",fontWeight:"medium"},Au={fontSize:"12px",color:"color-gray-500",marginTop:"2px"},Eu={display:"flex",alignItems:"center",marginLeft:"12px",fontSize:"12px",color:"color-gray-500"},Du={display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",color:"color-gray-500",textAlign:"center"},$u={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",fontSize:"12px",color:"color-gray-500"},Lu=h.createContext({search:"",setSearch:()=>{},selectedIndex:0,setSelectedIndex:()=>{},filteredCommands:[],onSelect:()=>{}}),_u=({value:e,children:o})=>r.jsx(Lu.Provider,{value:e,children:o}),Ui=({value:e,onValueChange:o,placeholder:t="Type a command or search...",views:n,...a})=>{const l=h.useRef(null);return h.useEffect(()=>{l.current&&l.current.focus()},[]),r.jsxs(i.View,{...Tu,...n==null?void 0:n.container,...a,children:[r.jsx(Sr,{widthHeight:16,color:"color-gray-400",marginRight:"8px"}),r.jsx(qi,{width:"100%",border:"none",outline:"none",backgroundColor:"transparent",fontSize:"14px",...n==null?void 0:n.input,value:e,onValueChange:o,placeholder:t,ref:l})]})},Bu=({children:e,views:o,...t})=>r.jsx(i.View,{...Iu,...o==null?void 0:o.container,...t,children:e}),Gi=({heading:e,children:o,views:t,...n})=>r.jsxs(i.View,{...Fu,...t==null?void 0:t.container,...n,children:[r.jsx(i.Text,{...zu,...t==null?void 0:t.heading,children:e}),o]}),mn=({item:e,selected:o=!1,onSelect:t,views:n,...a})=>{const l=()=>{!e.disabled&&t&&t()};return r.jsxs(i.Horizontal,{...Mu,...o?Wu:{},...e.disabled?Hu:{},onPress:l,onClick:l,...n==null?void 0:n.container,...a,children:[e.icon&&r.jsx(i.View,{...ju,...n==null?void 0:n.icon,children:e.icon}),r.jsxs(i.Vertical,{...Pu,...n==null?void 0:n.content,children:[r.jsx(i.Text,{...Vu,...n==null?void 0:n.name,children:e.name}),e.description&&r.jsx(i.Text,{...Au,...n==null?void 0:n.description,children:e.description})]}),e.shortcut&&r.jsx(i.Text,{...Eu,...n==null?void 0:n.shortcut,children:e.shortcut})]})},Yi=({children:e="No results found.",views:o,...t})=>r.jsx(i.View,{...Du,...o==null?void 0:o.container,...t,children:e}),Ou=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:l="md",variant:c="default",emptyState:s,footer:d,search:g,setSearch:m,selectedIndex:f,setSelectedIndex:p,filteredCommands:u,filteredGroups:y,listRef:k,views:x,filter:C,...S})=>{if(!e)return null;const w=h.useCallback(T=>{T.disabled||(T.onSelect(),o(!1),m(""))},[o,m]);h.useCallback(T=>T.target===T.currentTarget&&o(!1),[o]);const v=h.useMemo(()=>({search:g,setSearch:m,selectedIndex:f,setSelectedIndex:p,filteredCommands:u,onSelect:w}),[g,f,u,w,m,p]),b=t.length>0,I=u.length===0;return r.jsx(wu,{onClose:()=>o(!1),...S,children:r.jsx(_u,{value:v,children:r.jsxs(i.View,{borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",...Su[l],...vu[c],...x==null?void 0:x.container,onClick:T=>T.stopPropagation(),children:[r.jsx(Ui,{value:g,onValueChange:m,placeholder:a,views:x==null?void 0:x.searchInput}),r.jsx(i.View,{ref:k,flex:1,overflow:"auto",...x==null?void 0:x.list,children:I?s||r.jsx(Yi,{views:x==null?void 0:x.empty}):b?y.map(T=>r.jsx(Gi,{heading:T.name,views:x==null?void 0:x.groupHeading,children:T.commands.map(j=>{const E=u.findIndex(D=>D.id===j.id);return r.jsx(mn,{item:j,selected:E===f,onSelect:()=>w(j),"data-index":E,views:{container:x==null?void 0:x.item,icon:x==null?void 0:x.icon,content:x==null?void 0:x.content,name:x==null?void 0:x.name,description:x==null?void 0:x.description,shortcut:x==null?void 0:x.shortcut}},j.id)})},T.id)):u.map((T,j)=>r.jsx(mn,{item:T,selected:j===f,onSelect:()=>w(T),"data-index":j,views:{container:x==null?void 0:x.item,icon:x==null?void 0:x.icon,content:x==null?void 0:x.content,name:x==null?void 0:x.name,description:x==null?void 0:x.description,shortcut:x==null?void 0:x.shortcut}},T.id))}),d&&r.jsx(i.View,{...$u,...x==null?void 0:x.footer,children:d})]})})})},Oo=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:l="md",variant:c="default",filter:s,emptyState:d,footer:g,views:m,...f})=>{const{search:p,setSearch:u,selectedIndex:y,setSelectedIndex:k,filteredCommands:x,filteredGroups:C,listRef:S}=Cu({open:e,onOpenChange:o,groups:t,commands:n,filter:s});return r.jsx(Ou,{open:e,onOpenChange:o,groups:t,commands:n,placeholder:a,size:l,variant:c,emptyState:d,footer:g,search:p,setSearch:u,selectedIndex:y,setSelectedIndex:k,filteredCommands:x,filteredGroups:C,listRef:S,views:m,...f})};Oo.Input=Ui,Oo.List=Bu,Oo.Group=Gi,Oo.Item=mn,Oo.Empty=Yi;const Ki=()=>Math.random().toString(36).substring(2,11),Nu=({defaultOpen:e=!1,openDelay:o=200,closeDelay:t=200,isDisabled:n=!1}={})=>{const[a,l]=h.useState(e),c=h.useRef(null),s=h.useRef(null),d=h.useRef(null),g=h.useRef(null),m=h.useRef(`tooltip-trigger-${Ki()}`).current,f=h.useRef(`tooltip-content-${Ki()}`).current,p=h.useCallback(()=>{n||(g.current&&(clearTimeout(g.current),g.current=null),!a&&!d.current&&(d.current=setTimeout(()=>{l(!0),d.current=null},o)))},[a,o,n]),u=h.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null),a&&!g.current&&(g.current=setTimeout(()=>{l(!1),g.current=null},t))},[a,t]),y=h.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null)},[]);return h.useEffect(()=>()=>{d.current&&clearTimeout(d.current),g.current&&clearTimeout(g.current)},[]),h.useEffect(()=>{if(typeof document>"u")return;const k=x=>{x.key==="Escape"&&a&&l(!1)};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[a]),{isOpen:a,openTooltip:p,closeTooltip:u,cancelCloseTimer:y,triggerRef:c,contentRef:s,triggerId:m,contentId:f}},qu={sm:{padding:"4px 8px",fontSize:"12px",maxWidth:"200px"},md:{padding:"6px 10px",fontSize:"14px",maxWidth:"250px"},lg:{padding:"8px 12px",fontSize:"16px",maxWidth:"300px"}},Uu=(e=>({default:{backgroundColor:"color-gray-900",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.06)",transition:"opacity 0.15s ease"},light:{backgroundColor:"color-white",color:"color-gray-800",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.04)",transition:"opacity 0.15s ease"},dark:{backgroundColor:"color-gray-950",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.2), 0px 2px 4px rgba(0, 0, 0, 0.12)",transition:"opacity 0.15s ease"}}))(),Gu=e=>{const o={position:"absolute",width:"8px",height:"8px",backgroundColor:"inherit",borderStyle:"inherit",borderWidth:"inherit",borderColor:"inherit",transform:"rotate(45deg)"};switch(e){case"top":return{...o,bottom:"-4px",left:"50%",marginLeft:"-4px",borderTop:"none",borderLeft:"none"};case"right":return{...o,left:"-4px",top:"50%",marginTop:"-4px",borderRight:"none",borderTop:"none"};case"bottom":return{...o,top:"-4px",left:"50%",marginLeft:"-4px",borderBottom:"none",borderRight:"none"};case"left":return{...o,right:"-4px",top:"50%",marginTop:"-4px",borderLeft:"none",borderBottom:"none"};default:return o}},Xi=h.createContext({isOpen:!1,openTooltip:()=>{},closeTooltip:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),pn=()=>h.useContext(Xi),Yu=({value:e,children:o})=>r.jsx(Xi.Provider,{value:e,children:o}),Ji=h.memo(({children:e,views:o,asChild:t=!1,...n})=>{const{openTooltip:a,closeTooltip:l,triggerRef:c,contentId:s,triggerId:d}=pn(),g=h.useCallback(()=>a(),[a]),m=h.useCallback(()=>l(),[l]),f=h.useCallback(()=>a(),[a]),p=h.useCallback(()=>l(),[l]),u={ref:c,onMouseEnter:g,onMouseLeave:m,onFocus:f,onBlur:p,id:d,"aria-describedby":s,...o==null?void 0:o.container,...n};return t&&h.isValidElement(e)?h.cloneElement(e,u):r.jsx(i.View,{display:"inline-block",...u,children:e})}),Ku=h.memo(({children:e,views:o,...t})=>{const{isOpen:n,contentRef:a,contentId:l,triggerId:c}=pn();return n?r.jsx(i.View,{ref:a,id:l,role:"tooltip","aria-labelledby":c,...o==null?void 0:o.container,...t,children:e}):null}),Xu=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:l="default",showArrow:c=!0,views:s,themeMode:d,...g})=>{const{isOpen:m,triggerRef:f,contentRef:p,contentId:u,triggerId:y}=pn(),{ref:k,relation:x}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[C,S]=h.useState({x:0,y:0,placement:t});h.useEffect(()=>{f!=null&&f.current&&k&&(k.current=f.current)},[f,k,m]),h.useEffect(()=>{if(m&&(p!=null&&p.current)&&(f!=null&&f.current)){const b=f.current.getBoundingClientRect();let I=t;x&&(t==="top"&&x.space.vertical==="bottom"?I="bottom":t==="bottom"&&x.space.vertical==="top"?I="top":t==="right"&&x.space.horizontal==="left"?I="left":t==="left"&&x.space.horizontal==="right"&&(I="right"));let T=0,j=0;switch(I){case"top":T=n==="start"?b.left:n==="end"?b.right-120:b.left+b.width/2-60,j=b.top-8;break;case"bottom":T=n==="start"?b.left:n==="end"?b.right-120:b.left+b.width/2-60,j=b.bottom+8;break;case"right":T=b.right+8,j=n==="start"?b.top:n==="end"?b.bottom-32:b.top+b.height/2-16;break;case"left":T=b.left-8,j=n==="start"?b.top:n==="end"?b.bottom-32:b.top+b.height/2-16;break}S({x:T,y:j,placement:I})}},[m,t,n,f,p,x]);const w=h.useMemo(()=>c?Gu(C.placement):{},[c,C.placement]),v=h.useMemo(()=>{const b={position:"fixed",left:C.x,top:C.y,zIndex:1e3};switch(C.placement){case"top":return{...b,transform:"translateY(-100%)"};case"left":return{...b,transform:"translateX(-100%)"};case"bottom":case"right":default:return b}},[C.x,C.y,C.placement]);return r.jsxs(i.View,{position:"relative",display:"inline-block",...s==null?void 0:s.container,...g,children:[r.jsx(Ji,{children:o}),m&&r.jsxs(i.View,{ref:p,id:u,role:"tooltip","aria-labelledby":y,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",style:v,...qu[a],...Uu[l],...s==null?void 0:s.content,children:[typeof e=="string"?r.jsx(i.Text,{...s==null?void 0:s.text,children:e}):e,c&&r.jsx(i.View,{...w,...s==null?void 0:s.arrow})]})]})},et=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:l="default",openDelay:c=200,closeDelay:s=200,showArrow:d=!0,defaultOpen:g=!1,isDisabled:m=!1,views:f,...p})=>{const u=Nu({defaultOpen:g,openDelay:c,closeDelay:s,isDisabled:m});return r.jsx(Yu,{value:u,children:r.jsx(Xu,{content:e,position:t,align:n,size:a,variant:l,showArrow:d,views:f,...p,children:o})})};et.Trigger=Ji,et.Content=Ku;const Qi=h.forwardRef((e,o)=>{const t={...e,isAgentRunning:e.isAgentRunning??e.isWorkerRunning,onStopAgent:e.onStopAgent??e.onStopWorker,disabled:e.disabled??e.isDisabled},n=ul(t);return h.useImperativeHandle(o,()=>({getValue:()=>{var a,l;return((a=n.hiddenInputRef.current)==null?void 0:a.value)??((l=n.editableRef.current)==null?void 0:l.textContent)??n.value??""},setValue:n.setValue,clear:()=>n.setValue(""),focus:()=>{var a;return(a=n.editableRef.current)==null?void 0:a.focus()},blur:()=>{var a;return(a=n.editableRef.current)==null?void 0:a.blur()},getElement:()=>n.editableRef.current,getInputElement:()=>n.hiddenInputRef.current})),r.jsx(Sl,{...t,...n})});Qi.displayName="ChatInput";const Ju={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}},Zi={container:{position:"relative",display:"flex",flexDirection:"column",height:"100vh",alignItems:"center",justifyContent:"center"},gradient:{position:"absolute",inset:"-10px",opacity:.5,pointerEvents:"none",filter:"blur(10px)",backgroundSize:"300% 200%",backgroundPosition:"50% 50%, 50% 50%"}},un={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},image:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundAttachment:"scroll"},content:{position:"relative",width:"100%",height:"100%",zIndex:2}},yn={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},video:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover"},content:{position:"relative",zIndex:2}},Qu=h.createContext({}),Zu=({children:e,showRadialGradient:o=!0,views:t,themeMode:n,...a})=>{const l={white:"rgba(255,255,255,1)",transparent:"rgba(255,255,255,0)"},c=["rgb(59, 130, 246)","rgb(196, 181, 253)","rgb(147, 197, 253)","rgb(221, 214, 254)","rgb(96, 165, 250)"],s={...Zi.gradient,backgroundImage:`
27
- repeating-linear-gradient(100deg, ${c.join(", ")}),
26
+ ${Z}`:Z}let oe=P,fe=!1;P.endsWith("-thinking")&&(oe=P.replace(/-thinking$/,""),fe=!0),n==null||n(ge,{model_name:oe,enable_thinking:fe}),y||b(""),S([]),w([])},K=ie=>{S(ge=>ge.filter((oe,fe)=>fe!==ie)),!d&&T.length>ie&&w(ge=>ge.filter((oe,fe)=>fe!==ie))},J=ie=>{ie.preventDefault(),ie.stopPropagation(),V(!0)},ne=ie=>{ie.preventDefault(),ie.stopPropagation(),V(!1)},re=h.useCallback(ie=>{!ie||ie.length===0||(w(ge=>[...ge,...ie]),S(ge=>[...ge,...ie]),E(ge=>[...ge,...ie]),v(!0))},[w,S]),ce=h.useCallback(()=>{if(H.length>0&&!M&&p){I(!0);const ie=H[0];W.current=ie,j(0),f==null||f(0);try{p(ie),E(ge=>ge.slice(1)),I(!1),W.current=null,j(100),f==null||f(100),u==null||u({file:ie})}catch(ge){E(oe=>oe.slice(1)),I(!1),W.current=null,j(0),v(oe=>H.length-1>0||!1),m==null||m(ge)}}else H.length===0&&F&&(v(!1),j(0))},[H,M,p,F,m,f,u]);h.useEffect(()=>{ce()},[H,M,ce]);const Q="active",le=ie=>!0,he=()=>{O(!1),e.onGuideClose&&e.onGuideClose()},ue=ie=>{y&&t?t(ie.text):b(ie.text),e.onPromptExampleSelect&&e.onPromptExampleSelect(ie),N.current&&N.current.focus()},Ce=h.useCallback(()=>T,[T]),de=h.useCallback(()=>w([]),[]);return{onSubmit:n,getPendingFiles:Ce,clearPendingFiles:de,value:C,handleChange:B,setValue:L,handleSubmit:U,editableRef:N,fileInputRef:G,hiddenInputRef:X,isUploading:F,uploadProgress:z,isDraggingOver:D,uploadedFiles:k,pendingFiles:T,removeUploadedFile:K,setPendingFiles:w,setUploadedFiles:S,setIsUploading:v,startUpload:re,selectedModel:P,handleModelChange:_,modelOptions:q,subscriptionStatus:Q,canAccessModel:le,handleDragOver:J,handleDragLeave:ne,isGuideTipShown:$,hideGuideTip:he,handlePromptExampleSelect:ue}},Kh={attachmentRemove:{position:"absolute",top:"2px",right:"2px",width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"color-black-900",color:"white",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",zIndex:1}},Dl={container:{width:"100%",maxWidth:"100%",borderRadius:"12px",backgroundColor:"color-white",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},content:{width:"100%",padding:"12px",borderRadius:"12px",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},Xh={default:{borderRadius:"8px"},square:{borderRadius:"0px"},rounded:{borderRadius:"8px"}},Jh={xs:{fontSize:"10px",padding:"4px 8px"},sm:{fontSize:"12px",padding:"6px 10px"},md:{fontSize:"14px",padding:"8px 12px"},lg:{fontSize:"16px",padding:"10px 14px"},xl:{fontSize:"20px",padding:"12px 16px"}},Qh={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"},none:{backgroundColor:"transparent",border:"none"}},$l=e=>`${e}-${Math.random().toString(36).substring(2,9)}`,Zh=({openDelay:e=200,closeDelay:o=300}={})=>{const[t,n]=h.useState(!1),a=h.useRef(null),l=h.useRef(null),i=h.useRef(null),g=h.useRef(null),s=h.useMemo(()=>$l("hovercard-content"),[]),d=h.useMemo(()=>$l("hovercard-trigger"),[]),f=h.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null),l.current&&(clearTimeout(l.current),l.current=null)},[]),u=h.useCallback(()=>{f(),t||(a.current=setTimeout(()=>{n(!0)},e))},[t,e,f]),m=h.useCallback(()=>{f(),t&&(l.current=setTimeout(()=>{n(!1)},o))},[t,o,f]),p=h.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null)},[]);return h.useEffect(()=>()=>f(),[f]),{isOpen:t,openCard:u,closeCard:m,cancelCloseTimer:p,triggerRef:i,contentRef:g,contentId:s,triggerId:d}},Ll=h.createContext({isOpen:!1,openCard:()=>{},closeCard:()=>{},cancelCloseTimer:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),Rh=({children:e,value:o})=>r.jsx(Ll.Provider,{value:o,children:e}),Bl=()=>{const e=h.useContext(Ll);if(!e)throw new Error("useHoverCardContext must be used within a HoverCardProvider");return e},ef=({children:e,views:o,asChild:t=!1,...n})=>{const{openCard:a,closeCard:l,triggerRef:i,contentId:g,triggerId:s}=Bl(),p={ref:i,onMouseEnter:()=>a(),onMouseLeave:()=>l(),onFocus:()=>a(),onBlur:()=>l(),id:s,"aria-describedby":g,...o==null?void 0:o.container,...n};if(t&&h.isValidElement(e)){const y=h.Children.only(e);return h.cloneElement(y,{...p,...y.props})}return r.jsx(c.View,{position:"relative",display:"inline-block",...p,children:e})},of=({children:e,views:o,side:t="bottom",align:n="center",sideOffset:a=8,style:l,backgroundColor:i="color-white",borderRadius:g="4px",boxShadow:s="0px 2px 8px rgba(0, 0, 0, 0.15)",padding:d="12px",minWidth:f="50px",maxWidth:u="300px",...m})=>{const{isOpen:p,cancelCloseTimer:y,closeCard:x,contentRef:b,triggerRef:C,contentId:k,triggerId:S}=Bl(),{ref:T,relation:w}=c.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0});h.useEffect(()=>{C!=null&&C.current&&(T==null?void 0:T.current)!==C.current&&T&&(T.current=C.current)},[C,T,p]);const F=()=>y(),v=()=>x();if(!p)return null;const z=()=>{if(!w||!(C!=null&&C.current))return{position:"absolute",top:0,left:0,zIndex:1e3};const E=C.current.getBoundingClientRect();let M=t;t==="bottom"&&w.space.vertical==="top"?M="top":t==="top"&&w.space.vertical==="bottom"?M="bottom":t==="right"&&w.space.horizontal==="left"?M="left":t==="left"&&w.space.horizontal==="right"&&(M="right");let I=0,W=0;switch(M){case"bottom":I=E.left+E.width/2,W=E.bottom+a;break;case"top":I=E.left+E.width/2,W=E.top-a;break;case"right":I=E.right+a,W=E.top+E.height/2;break;case"left":I=E.left-a,W=E.top+E.height/2;break}return{position:"fixed",left:I,top:W,zIndex:1e3,transform:j(M)}},j=E=>{switch(E){case"bottom":return"translate(-50%, 0)";case"top":return"translate(-50%, -100%)";case"right":return"translate(0, -50%)";case"left":return"translate(-100%, -50%)";default:return"translate(-50%, 0)"}},H=z();return r.jsx(c.View,{ref:b,id:k,role:"tooltip","aria-labelledby":S,onMouseEnter:F,onMouseLeave:v,backgroundColor:i,borderRadius:g,boxShadow:s,padding:d,minWidth:f,maxWidth:u,style:{...H,...l},...o==null?void 0:o.container,...m,children:e})},De=({children:e,views:o,openDelay:t,closeDelay:n,...a})=>{const l=Zh({openDelay:t,closeDelay:n});return r.jsx(Rh,{value:l,children:r.jsx(c.View,{position:"relative",display:"inline-block",...o==null?void 0:o.container,...a,children:e})})};De.Trigger=ef,De.Content=of;const rf=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:i={}})=>{if(e.length===0)return null;const g=h.useCallback(d=>d<1024?`${d} B`:d<1024*1024?`${(d/1024).toFixed(1)} KB`:`${(d/(1024*1024)).toFixed(1)} MB`,[]),s=h.useCallback(d=>d.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:d.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:d.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(c.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...i==null?void 0:i.container,children:e.map((d,f)=>{const u=(d==null?void 0:d.path)||(d==null?void 0:d.url)||(l?URL.createObjectURL(d):""),m=d.type.startsWith("image/"),p=d.type.startsWith("video/"),y=d.type.startsWith("audio/"),x=s(d);return l?r.jsx(c.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...i==null?void 0:i.item,children:l&&r.jsxs(De,{children:[r.jsxs(De.Trigger,{children:[m&&r.jsx(c.Image,{src:u,alt:d.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),p&&r.jsx(c.View,{as:"video",src:u,alt:d.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(c.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Vo,{widthHeight:24,color:"color-black"})}),!m&&!p&&!y&&r.jsx(c.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(po,{widthHeight:24,color:"color-black"})}),t&&r.jsx(c.Button,{...Kh.attachmentRemove,onClick:b=>{b.stopPropagation(),t(f)},"aria-label":`Remove ${d.name}`,children:"×"})]}),r.jsxs(De.Content,{children:[m&&r.jsx(c.Image,{src:u,alt:d.name,maxWidth:"100%"}),p&&r.jsx(c.View,{as:"video",src:u,controls:!0,maxWidth:"100%"}),y&&r.jsx(c.View,{as:"audio",src:u,controls:!0,width:"100%"}),r.jsxs(c.Text,{marginTop:"4px",maxLines:1,width:"100%",...i==null?void 0:i.name,children:[d.name," (",g(d.size),")"]})]})]})},f):r.jsxs(c.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...i==null?void 0:i.item,children:[r.jsx(c.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:x.backgroundColor,color:x.color,children:y?r.jsx(Vo,{widthHeight:12,color:"currentColor"}):r.jsx(po,{widthHeight:12,color:"currentColor"})}),r.jsxs(c.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...i==null?void 0:i.name,children:[d.name," · ",g(d.size)]}),t&&r.jsx(c.View,{as:"button",type:"button",onClick:()=>t(f),"aria-label":`Remove ${d.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},f)})})},_l=typeof window<"u"?h.useLayoutEffect:h.useEffect,Ol=h.forwardRef(({value:e,onChange:o,placeholder:t="Type your message...",disabled:n=!1,autoFocus:a=!0,suggestions:l=[],onSuggestionSelect:i,showSuggestions:g=!1,mentionData:s=[],mentionTrigger:d="@",onMentionSelect:f,onKeyDown:u,maxHeight:m="200px",minHeight:p="40px",name:y,id:x,hiddenInput:b=!0,hiddenInputRef:C,views:k={}},S)=>{var oe,fe;const T=h.useRef(e),[w,F]=h.useState(-1),[v,z]=h.useState(!e),j=h.useRef(null),[H,E]=h.useState(!1),[M,I]=h.useState(!1),[W,D]=h.useState(""),[V,P]=h.useState(-1),[_,q]=h.useState(-1),[N,G]=h.useState([]),{ref:X,relation:$}=c.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[O,B]=h.useState({x:0,y:0}),[L,U]=h.useState({x:0,y:0}),K=h.useRef(null),J=h.useCallback(Z=>{K.current=Z,typeof C=="function"?C(Z):C&&(C.current=Z)},[C]),ne=h.useCallback(Z=>{K.current&&K.current.value!==Z&&(K.current.value=Z)},[]);_l(()=>{const Z=S;Z!=null&&Z.current&&e!==T.current&&(Z.current.textContent=e,T.current=e,z(!e)),ne(e)},[e,S,ne]);const re=h.useCallback(Z=>{if(Z===T.current)return;const te=S;te!=null&&te.current&&te.current.textContent!==Z&&(te.current.textContent=Z),T.current=Z,z(!Z),ne(Z),o(Z)},[o,S,ne]);_l(()=>{const Z=K.current;if(!Z)return;const te=()=>re(Z.value);return Z.addEventListener("input",te),Z.addEventListener("change",te),()=>{Z.removeEventListener("input",te),Z.removeEventListener("change",te)}},[re,b]),h.useEffect(()=>{a&&S&&typeof S=="object"&&S.current&&S.current.focus()},[a,S]);const ce=()=>{const Z=window.getSelection();if(!Z||Z.rangeCount===0)return-1;const te=Z.getRangeAt(0),Y=te.cloneRange();return Y.selectNodeContents(S&&typeof S=="object"&&S.current?S.current:document.body),Y.setEnd(te.endContainer,te.endOffset),Y.toString().length},Q=h.useCallback((Z,te)=>{const Y=Z.substring(0,te),R=Y.lastIndexOf(d);if(R!==-1){const ae=Y.substring(R+1);if(!ae.includes(" ")){const me=ae.toLowerCase(),ke=s.filter(xe=>xe.name.toLowerCase().includes(me));D(me),P(R),G(ke),I(ke.length>0),q(0);const pe=le();B(pe);return}}I(!1),D(""),P(-1),q(-1)},[s,d]);h.useEffect(()=>{j.current&&X&&(X.current=j.current)},[j,X]);const le=h.useCallback((Z=200)=>{if(!j.current)return{x:0,y:0};const te=j.current.getBoundingClientRect();if($){const se=$.space.vertical==="top";return{x:te.left,y:se?te.top-Z-8:te.bottom+8}}const Y=window.innerHeight,R={top:te.top,bottom:Y-te.bottom},ae=R.bottom<Z+8&&R.top>R.bottom;return{x:te.left,y:ae?te.top-Z-8:te.bottom+8}},[$]),he=h.useCallback(()=>{E(!0);const Z=le();U(Z)},[le]),ue=h.useCallback(()=>{setTimeout(()=>{E(!1),F(-1)},150)},[]),Ce=Z=>{const te=Z.currentTarget.textContent||"";if(te!==T.current){o(te),T.current=te,ne(te),z(!te);const Y=ce();Q(te,Y)}},de=h.useCallback(Z=>{if(S&&typeof S=="object"&&S.current){const te=S.current.textContent||"",Y=te.substring(0,V),R=te.substring(V+d.length+W.length),ae=Y+d+Z.name+" "+R;o(ae),T.current=ae,ne(ae),S.current.textContent=ae;const se=Y.length+d.length+Z.name.length+1;setTimeout(()=>{var me;if(S.current){const ke=document.createRange(),pe=window.getSelection(),xe=S.current.firstChild;xe&&pe&&(ke.setStart(xe,Math.min(se,((me=xe.textContent)==null?void 0:me.length)||0)),ke.collapse(!0),pe.removeAllRanges(),pe.addRange(ke))}},0)}I(!1),D(""),P(-1),q(-1),f&&f(Z)},[V,d,W,o,f,S,ne]),ie=h.useCallback(Z=>{i&&i(Z),F(-1)},[i]),ge=Z=>{if(!(u&&(u(Z),Z.defaultPrevented))){if(M&&N.length>0){if(Z.key==="ArrowDown"){Z.preventDefault(),q(te=>te<N.length-1?te+1:0);return}if(Z.key==="ArrowUp"){Z.preventDefault(),q(te=>te>0?te-1:N.length-1);return}if((Z.key==="Tab"||Z.key==="Enter")&&_>=0){Z.preventDefault(),de(N[_]);return}if(Z.key==="Escape"){I(!1),q(-1);return}}if(g&&l.length>0){if(Z.key==="ArrowDown"){Z.preventDefault(),F(te=>te<l.length-1?te+1:0);return}if(Z.key==="ArrowUp"){Z.preventDefault(),F(te=>te>0?te-1:l.length-1);return}if(Z.key==="Tab"&&w>=0){Z.preventDefault(),ie(l[w]);return}if(Z.key==="Escape"){F(-1);return}}}};return r.jsxs(c.View,{ref:j,width:"100%",position:"relative",...k==null?void 0:k.container,children:[r.jsxs(c.View,{width:"100%",minHeight:p,maxHeight:m,overflowY:"auto",position:"relative",children:[v&&r.jsx(c.Text,{position:"absolute",top:"8px",left:"8px",color:"color-gray-400",pointerEvents:"none",fontSize:"14px",zIndex:1,...k==null?void 0:k.placeholder,children:t}),r.jsx(c.View,{as:"div",ref:S,contentEditable:!n,suppressContentEditableWarning:!0,onInput:Ce,onKeyDown:ge,onFocus:he,onBlur:ue,role:"textbox","aria-multiline":"true","aria-placeholder":t,width:"100%",minHeight:"24px",padding:"8px",outline:"none",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"14px",color:"color-gray-900",backgroundColor:"transparent",...k==null?void 0:k.input})]}),b&&r.jsx(c.View,{as:"textarea",ref:J,id:x,name:y,defaultValue:e,disabled:n,tabIndex:-1,"aria-hidden":"true","data-editable-input-mirror":"true",opacity:0,width:1,height:1,padding:0,border:"none",resize:"none",overflow:"hidden",position:"absolute",bottom:0,left:0,pointerEvents:"none",...k==null?void 0:k.hiddenInput}),M&&N.length>0&&r.jsx(c.View,{position:"fixed",left:O.x,top:O.y,width:((oe=j.current)==null?void 0:oe.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-blue-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9999,maxHeight:"200px",overflowY:"auto",...k==null?void 0:k.mentionContainer,children:r.jsxs(c.Vertical,{gap:0,children:[N.map((Z,te)=>r.jsx(c.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:te===_?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>de(Z),onMouseEnter:()=>q(te),_hover:{backgroundColor:"color-blue-50"},...k==null?void 0:k.mentionItem,children:r.jsxs(c.Vertical,{gap:4,children:[r.jsxs(c.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:[d,Z.name]}),Z.description&&r.jsx(c.Text,{fontSize:"12px",color:"color-gray-600",children:Z.description})]})},Z.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Mentions (Trigger: ",d,")",$&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",$.space.vertical,"-",$.space.horizontal]})]})]})}),g&&l.length>0&&!M&&H&&!e&&r.jsx(c.View,{position:"fixed",left:L.x,top:L.y,width:((fe=j.current)==null?void 0:fe.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-green-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9998,maxHeight:"200px",overflowY:"auto",...k==null?void 0:k.suggestionsContainer,children:r.jsxs(c.Vertical,{gap:0,children:[l.map((Z,te)=>r.jsx(c.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:te===w?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>ie(Z),onMouseEnter:()=>F(te),_hover:{backgroundColor:"color-blue-50"},...k==null?void 0:k.suggestionItem,children:r.jsxs(c.Vertical,{gap:4,children:[r.jsx(c.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:Z.text}),Z.description&&r.jsx(c.Text,{fontSize:"12px",color:"color-gray-600",children:Z.description})]})},Z.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Suggestions (Focus-triggered)",$&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",$.space.vertical,"-",$.space.horizontal]})]})]})})]})});Ol.displayName="EditableInput";const tf=({examples:e,onSelect:o,views:t={}})=>{const{getColor:n}=c.useTheme();return!e||e.length===0?null:r.jsx(c.Horizontal,{gap:8,overflowX:"auto",padding:"8px 0",width:"100%",...t==null?void 0:t.container,children:e.map(a=>r.jsx(c.View,{as:"button",type:"button",padding:"8px 12px",borderRadius:"9999px",backgroundColor:"color-white",border:"1px solid #E2E8F0",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",onClick:()=>o(a),_hover:{backgroundColor:"#F8FAFC",borderColor:"#CBD5E1"},...t==null?void 0:t.item,children:r.jsx(c.Text,{fontSize:"14px",color:"color-gray-700",...t==null?void 0:t.text,children:a.text})},a.id))})},nf=({onRecordingComplete:e,onRecordingStart:o,views:t={}})=>{const{recording:n,paused:a,audioBlob:l,analyserNode:i,startRecording:g,stopRecording:s}=Sa();h.useEffect(()=>{if(l){const f=new File([l],`recording-${Date.now()}.webm`,{type:l.type||"audio/webm;codecs=opus"});e(f)}},[l]);const d=h.useCallback(()=>{g(),o==null||o()},[]);return r.jsxs(c.Horizontal,{alignItems:"center",gap:4,children:[r.jsx(c.View,{minWidth:90,children:n&&i&&r.jsx(_t,{analyserNode:i,isPaused:a})}),r.jsx(c.View,{as:"button",type:"button",onClick:n?s:d,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n?"theme-error":"color-gray-100",color:n?"color-white":"color-gray-600",borderRadius:"50%",border:"none",cursor:"pointer",_hover:{backgroundColor:n?"color-red-600":"color-gray-200"},...t.button,children:n?r.jsx(Vr,{widthHeight:16,color:"currentColor",filled:!1}):r.jsx(At,{widthHeight:16,color:"currentColor",filled:!1})})]})},Nl=h.memo(({onSubmit:e,placeholder:o="Type your message… use @ to mention",loading:t=!1,disabled:n=!1,isDisabled:a,rightElement:l,onKeyDown:i,isAgentRunning:g=!1,enableAudioRecording:s=!1,leftButtons:d,rightButtons:f,onStopAgent:u,loadingText:m="Agent is working...",autoFocus:p=!0,sandboxId:y,hideAttachments:x=!1,attachmentText:b="",promptExamples:C=[],suggestions:k=[],errorMessage:S,size:T="md",shape:w="rounded",variant:F="default",views:v={},mentionData:z=[],mentionTrigger:j="@",onMentionSelect:H,onAudioRecordingStart:E,onAudioRecordingStop:M,showGuideTip:I,guideVideoUrl:W,onGuideClose:D,onFileBrowse:V,onUploadProgress:P,onUploadSuccess:_,onUploadError:q,onFileUpload:N,onPromptExampleSelect:G,name:X,hiddenInput:$=!0,value:O,handleChange:B,setValue:L,handleSubmit:U,editableRef:K,fileInputRef:J,hiddenInputRef:ne,isUploading:re,uploadProgress:ce,isDraggingOver:Q,uploadedFiles:le,pendingFiles:he,getPendingFiles:ue,clearPendingFiles:Ce,removeUploadedFile:de,setPendingFiles:ie,setUploadedFiles:ge,setIsUploading:oe,startUpload:fe,selectedModel:Z,handleModelChange:te,modelOptions:Y,subscriptionStatus:R,canAccessModel:ae,isGuideTipShown:se,hideGuideTip:me,handlePromptExampleSelect:ke,handleDragOver:pe,handleDragLeave:xe,onChange:Ae,...Ye})=>{c.useTheme();const rr=h.useMemo(()=>({...Dl.container,...Xh[w],...v==null?void 0:v.container}),[w,v==null?void 0:v.container]),vt=h.useMemo(()=>({...Dl.content,...Jh[T],...Qh[F],...v==null?void 0:v.content}),[T,F,v==null?void 0:v.content]),mo=((O==null?void 0:O.trim().length)??0)>0||le.length>0,Tt=h.useCallback(je=>{fe([je]),M==null||M(je)},[fe,M]),Rn=h.useCallback(je=>{const tr=je.filter(hs=>hs.size>52428800?(console.error(`File size exceeds 50MB limit: ${hs.name}`),!1):!0);tr.length>0&&fe(tr)},[fe]),yx=h.useCallback(je=>{if(je.preventDefault(),je.stopPropagation(),xe(je),je.dataTransfer.files.length>0){const tr=Array.from(je.dataTransfer.files);Rn(tr)}},[xe,Rn]),bx=h.useMemo(()=>[...z||[],...le.map((je,tr)=>({id:`file-${tr}`,name:je.name}))],[z,le]);return r.jsxs(c.View,{display:"flex",flexDirection:"column",boxSizing:"border-box",...rr,...Ye,onDragOver:pe,onDragLeave:xe,onDrop:yx,children:[C.length>0&&r.jsx(tf,{examples:C,onSelect:ke,views:{container:v==null?void 0:v.promptExamples,item:v==null?void 0:v.promptExampleItem}}),g&&r.jsxs(c.Horizontal,{justifyContent:"center",alignItems:"center",gap:8,padding:"8px 0",animate:{from:{opacity:0,y:-10},to:{opacity:1,y:0},duration:"0.3s"},...v==null?void 0:v.loadingIndicator,children:[r.jsx(Vt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(c.Text,{color:"color-gray-500",children:m})]}),r.jsx(c.View,{position:"relative",width:"100%",overflow:"visible",children:r.jsxs(c.View,{as:"form",onSubmit:U,overflow:"visible",display:"flex",flexDirection:"column",position:"relative",...vt,...rr,paddingHorizontal:16,paddingVertical:10,backgroundColor:Q?"color-blue-50":void 0,children:[r.jsx(rf,{files:le,sandboxId:y,onRemove:de,showPreviews:!0,views:{container:v==null?void 0:v.attachments,item:v==null?void 0:v.attachmentItem,name:v==null?void 0:v.attachmentName,size:v==null?void 0:v.attachmentSize,removeButton:v==null?void 0:v.attachmentRemove}}),r.jsx(Ol,{ref:K,value:O||"",onChange:B,placeholder:o,disabled:n&&!g,autoFocus:p,onKeyDown:i,suggestions:k||[],showSuggestions:k&&k.length>0&&!O,onSuggestionSelect:je=>{B(je.text)},mentionData:bx,mentionTrigger:j,onMentionSelect:H,name:X,hiddenInput:$,hiddenInputRef:ne,views:{container:{},input:v==null?void 0:v.editableInput,hiddenInput:v==null?void 0:v.hiddenInput}}),r.jsxs(c.Horizontal,{justifyContent:"space-between",alignItems:"center",marginTop:"8px",children:[r.jsxs(c.Horizontal,{gap:8,alignItems:"center",children:[!x&&r.jsx(c.View,{display:"contents",onClickCapture:V?je=>{je.target.tagName==="INPUT"&&V()}:void 0,children:r.jsx(Lr,{accept:"*/*",icon:r.jsx(lr,{widthHeight:16}),maxSize:50*1024*1024,multiple:!0,onMultipleFileSelect:Rn,isLoading:re,progress:ce||0,text:b,fileType:"file",renderError:({errorMessage:je})=>null,views:{container:{height:"36px",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},...v==null?void 0:v.fileButton}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,borderRadius:w==="rounded"?"50%":4,padding:10},textProps:{fontSize:"14px",color:"color-gray-600"},validateFile:je=>je.size>50*1024*1024?"File size exceeds 50MB limit":null})}),d]}),r.jsxs(c.Horizontal,{gap:8,alignItems:"center",children:[l,s&&r.jsx(nf,{onRecordingStart:E,onRecordingComplete:Tt,views:{button:v==null?void 0:v.recordButton}}),r.jsx(c.View,{as:"button",type:"button",onClick:U,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:g?"theme-error":mo?"theme-primary":"color-gray-300",color:"color-white",borderRadius:w==="rounded"?"50%":4,border:"none",cursor:mo?"pointer":"not-allowed",disabled:!mo||t||n&&!g,transition:"background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease",_hover:{opacity:mo||g?.9:1},_active:{opacity:mo||g?.95:1},_focusVisible:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},...v==null?void 0:v.submitButton,children:g?r.jsx(Vr,{widthHeight:16,color:"currentColor",filled:!1}):t?r.jsx(io,{type:"quarter",size:16,color:"color-white"}):r.jsx(Ht,{widthHeight:16,color:"currentColor",filled:!1})}),f]})]})]})}),S&&r.jsx(c.Text,{color:"theme-error",marginTop:"4px",...v==null?void 0:v.bottomTip,children:S})]})}),af=e=>{const{name:o,onSubmit:t,...n}=e,[a,l]=h.useState([]),i=ze({name:o,type:"text"}),g=m=>{i.onChangeText&&i.onChangeText(m)},s=(m,p)=>{t?t(m,p):g(m)},d=()=>a,f=()=>l([]),u=Pl({...n,value:i.value||"",onChange:g,onSubmit:s});return r.jsx(Nl,{...n,...u,name:o,value:i.value||"",onChange:g,onSubmit:s,error:i.error,getPendingFiles:d,clearPendingFiles:f})},lf=e=>{const o=ze(e),t=dl(o);return r.jsx(gl,{...t,...o})},cf=e=>{const o=ze(e),t=wl();return r.jsx(Sl,{...t,...o})},sf=e=>{const o=ze(e),t=ul(e);return r.jsx(fl,{...t,...o})},df=e=>{let o=ze(e);o.selected=o.value;const t=Ya({...e,value:o.value});return r.jsx(Ja,{...o,...t})},gf=e=>{const o=ze(e),t=Qa(e);return r.jsx(el,{...t,...o})},uf=e=>{const{name:o,...t}=e,{values:n,errors:a,touched:l,submitCount:i,setFieldValue:g,setFieldTouched:s}=Oe.useFormikContext(),d=Oe.getIn(n,o)||[],f=Oe.getIn(l,o)||i>0?Oe.getIn(a,o):void 0,u=h.useCallback(b=>{var k;const C=Array.isArray(b)?b.filter(S=>typeof S=="string"):[];g(o,C),(k=e.onTagsChange)==null||k.call(e,C)},[o,g,e.onTagsChange]),m=h.useCallback(()=>{var b;s(o,!0),(b=e.onBlur)==null||b.call(e)},[o,s,e.onBlur]),p=jl({...t,tags:d,onTagsChange:u,onBlur:m}),{tags:y,...x}=p;return r.jsx(Wl,{...x,...t,tags:y,error:f})},hf=e=>{const o=ze(e),t=tl(e);return r.jsx(nl,{...t,...o})},ff=e=>{const o=ze(e,{focusable:!0}),{value:t,...n}=en(e);return r.jsx(fr,{...n,...o})},mf=({visibleIcon:e=r.jsx(Dt,{widthHeight:14}),hiddenIcon:o=r.jsx(Pt,{widthHeight:14}),...t})=>{const n=ze(t,{focusable:!0}),{isVisible:a,setIsVisible:l,...i}=vl(n);return r.jsx(fr,{...i,type:a?"text":"password",isClearable:!1,right:r.jsx(c.View,{onClick:()=>{t.isDisabled||l(!a)},children:a?e:o})})},pf=({items:e,placeholder:o,searchPlaceholder:t,isMulti:n=!1,...a})=>{const l=ze(a),i=Il(e,o,t);h.useEffect(()=>{if(n&&Array.isArray(l.value))i.setSelectedItems(l.value);else if(!n&&l.value){const s=typeof l.value=="object"?l.value:e.find(d=>d.value===l.value);s&&i.setSelectedItem(s)}},[l.value,n,e]);const g=s=>{l.onChange(s)};return r.jsx(Ml,{...i,...l,items:e,placeholder:o,isMulti:n,onSelect:g})},No=(e,o,t)=>Math.min(Math.max(e,o),t),yf=(e,o,t,n,a,l,i)=>{const g=n-t;let s;if(l==="horizontal"){const d=o.width,f=e-o.left;s=No(f/d,0,1)}else{const d=o.height,f=o.bottom-e;s=No(f/d,0,1)}if(i&&i.length>0){const d=t+s*g;let f=i[0],u=Math.abs(d-f);for(let m=1;m<i.length;m++){const p=Math.abs(d-i[m]);p<u&&(u=p,f=i[m])}return f}else{const d=t+s*g,f=Math.round(d/a)*a;return No(f,t,n)}},ql=({min:e=0,max:o=100,step:t=1,value:n,defaultValue:a,onChange:l,onDrag:i,orientation:g="horizontal",isDisabled:s=!1,stepValues:d})=>{const f=No(n??a??e,e,o),[u,m]=h.useState(f),[p,y]=h.useState(!1),[x,b]=h.useState(!1),C=h.useRef(null),k=h.useRef(null),S=n!==void 0,T=n!==void 0?n:u;h.useEffect(()=>{n!==void 0&&m(No(n,e,o))},[n,e,o]);const w=h.useCallback(M=>{const I=No(M,e,o);S||m(I),l&&I!==T&&l(I),p&&i&&i(I)},[S,e,o,l,T,p,i]),F=h.useCallback(M=>{if(s||!C.current)return;const I=C.current;if(typeof I.getBoundingClientRect!="function")return;const W=I.getBoundingClientRect();let D;"touches"in M?D=g==="horizontal"?M.touches[0].clientX:M.touches[0].clientY:D=g==="horizontal"?M.clientX:M.clientY;const V=yf(D,W,e,o,t,g,d);w(V)},[e,o,t,g,w,s,d]),v=h.useCallback(M=>{if(s)return;M.preventDefault(),y(!0),F(M);const I=D=>{F(D)},W=()=>{y(!1),document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",W),document.removeEventListener("touchmove",I),document.removeEventListener("touchend",W)};typeof document>"u"||(document.addEventListener("mousemove",I),document.addEventListener("mouseup",W),document.addEventListener("touchmove",I),document.addEventListener("touchend",W))},[F,s]),z=h.useCallback(M=>{const I=k.current;I&&typeof I.contains=="function"&&I.contains(M.target)||v(M)},[v]),j=h.useCallback(M=>{if(s)return;let I=T;switch(M.key){case"ArrowLeft":case"ArrowDown":I=T-t;break;case"ArrowRight":case"ArrowUp":I=T+t;break;case"Home":I=e;break;case"End":I=o;break;default:return}M.preventDefault(),w(I)},[T,e,o,t,w,s]),H=o-e,E=H===0?0:(T-e)/H*100;return{currentValue:T,isDragging:p,isHovered:x,setIsHovered:b,trackRef:C,thumbRef:k,handleThumbMouseDown:v,handleTrackMouseDown:z,handleKeyDown:j,thumbPositionPercent:E}},Ul={xs:{height:4,width:"100%"},sm:{height:6,width:"100%"},md:{height:8,width:"100%"},lg:{height:10,width:"100%"},xl:{height:12,width:"100%"}},Gl={xs:{width:12,height:12},sm:{width:16,height:16},md:{width:20,height:20},lg:{width:24,height:24},xl:{width:28,height:28}},Yl={square:0,rounded:4,pill:24},Kl=(e=>({default:{backgroundColor:"color-gray-200",transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"},transition:"border-color 0.15s ease"}}))(),bf={xs:{trackCrossAxisSize:4,thumbSize:12},sm:{trackCrossAxisSize:6,thumbSize:16},md:{trackCrossAxisSize:8,thumbSize:20},lg:{trackCrossAxisSize:10,thumbSize:24},xl:{trackCrossAxisSize:12,thumbSize:28}},xf={horizontal:{width:"100%",minWidth:"120px",height:"auto",flexDirection:"row",paddingVertical:8},vertical:{height:"100%",minHeight:"120px",width:"auto",flexDirection:"column-reverse",paddingHorizontal:8}},kf=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),br=(e,o)=>kf(o)?{style:{[e]:o}}:{[e]:o},Xl=h.memo(({min:e=0,max:o=100,step:t=1,currentValue:n,stepValues:a,shape:l="rounded",size:i="md",variant:g="default",orientation:s="horizontal",isDisabled:d=!1,showValue:f=!1,showTooltip:u=!1,backgroundColor:m="theme-primary",label:p,helperText:y,themeMode:x,shadow:b={},isDragging:C,isHovered:k,setIsHovered:S,trackRef:T,thumbRef:w,handleThumbMouseDown:F,handleTrackMouseDown:v,handleKeyDown:z,thumbPositionPercent:j,ariaLabel:H="Slider",views:E={container:{},track:{},progress:{},filledTrack:{},thumb:{},label:{},valueLabel:{},stepMarks:{},tooltip:{}},onChange:M,onDrag:I,value:W,defaultValue:D,...V})=>{var L,U;const P=m,_="theme-disabled",q=Kl[g].backgroundColor,N=d?_:P,G=s==="vertical",{trackCrossAxisSize:X,thumbSize:$}=bf[i]||{trackCrossAxisSize:Ul[i].height,thumbSize:Gl[i].width||16},O=r.jsxs(c.Vertical,{width:"100%",gap:8,...E.container,...V,children:[p&&r.jsxs(c.Horizontal,{justifyContent:"space-between",alignItems:"center",children:[r.jsx(c.Text,{fontSize:14,fontWeight:500,...E.label,children:p}),f&&r.jsx(c.Text,{fontSize:14,color:"color-gray-500",...E.valueLabel,children:n})]}),r.jsxs(c.View,{ref:T,position:"relative",cursor:d?"not-allowed":"pointer",opacity:d?.6:1,onMouseDown:v,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),...Ul[i],borderRadius:Yl[l],backgroundColor:q,...Kl[g],...b,...E.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(K=>{const J=(K-e)/(o-e)*100;return r.jsx(c.View,{position:"absolute",top:"50%",left:`${J}%`,transform:"translate(-50%, -50%)",width:4,height:4,borderRadius:"50%",zIndex:1,...br("backgroundColor",N),...E.stepMarks},K)})}),r.jsx(c.View,{position:"absolute",top:0,left:0,height:"100%",width:`${j}%`,borderRadius:Yl[l],transition:"width 0.1s ease-in-out",...br("backgroundColor",N),...E.progress,...E.filledTrack}),r.jsx(c.View,{ref:w,role:"slider",tabIndex:d?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":s,"aria-disabled":d,"aria-label":H,position:"absolute",top:"50%",left:`${j}%`,borderRadius:"50%",backgroundColor:"color-white",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",borderWidth:2,borderStyle:"solid",transition:C?"none":"transform 0.1s ease-in-out",...br("borderColor",N),transform:k?"translate(-50%, -50%) scale(1.1)":"translate(-50%, -50%)",zIndex:2,onMouseDown:F,onTouchStart:F,onKeyDown:z,...Gl[i],...E.thumb,children:u&&(k||C)&&r.jsx(c.View,{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:8,padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:4,fontSize:12,whiteSpace:"nowrap",zIndex:3,...E.tooltip,children:r.jsx(c.Text,{...(L=E.tooltip)==null?void 0:L.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(Zt,{children:y})]}),B=r.jsxs(c.Center,{...xf[s],position:"relative",onMouseEnter:()=>!d&&S(!0),onMouseLeave:()=>!d&&S(!1),...V,...E==null?void 0:E.container,children:[p&&r.jsxs(c.Horizontal,{justifyContent:"space-between",alignItems:"center",marginBottom:8,width:"100%",children:[r.jsx(c.Text,{fontSize:14,fontWeight:500,...E.label,children:p}),f&&r.jsx(c.Text,{fontSize:14,color:"color-gray-500",...E.valueLabel,children:n})]}),r.jsxs(c.View,{ref:T,position:"relative",borderRadius:X/2,backgroundColor:d?_:q,cursor:d?"not-allowed":"pointer",width:G?`${X}px`:"100%",height:G?"100%":`${X}px`,onMouseDown:v,onTouchStart:v,...E==null?void 0:E.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(K=>{const J=(K-e)/(o-e)*100;return r.jsx(c.View,{position:"absolute",width:4,height:4,borderRadius:"50%",backgroundColor:N,zIndex:1,...G?{bottom:`${J}%`,left:"50%",transform:"translate(-50%, 50%)"}:{left:`${J}%`,top:"50%",transform:"translate(-50%, -50%)"},...E.stepMarks},K)})}),r.jsx(c.View,{position:"absolute",borderRadius:X/2,...G?{bottom:0,left:0,width:"100%",height:`${j}%`}:{top:0,left:0,height:"100%",width:`${j}%`},...br("backgroundColor",N),...E==null?void 0:E.filledTrack,...E==null?void 0:E.progress}),r.jsx(c.View,{ref:w,role:"slider",tabIndex:d?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":s,"aria-disabled":d,"aria-label":H,position:"absolute",width:`${$}px`,height:`${$}px`,borderRadius:"50%",borderWidth:2,borderStyle:"solid",borderColor:"color-white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.2)",cursor:d?"not-allowed":"grab",transform:G?"translateX(-50%)":"translateY(-50%)",zIndex:2,transition:C?"none":"left 0.1s, bottom 0.1s",...br("backgroundColor",N),...G?{left:"50%",bottom:`${j}%`}:{top:"50%",left:`${j}%`},onMouseDown:F,onTouchStart:F,onKeyDown:z,...E==null?void 0:E.thumb,children:u&&(k||C)&&r.jsx(c.View,{position:"absolute",padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:"4px",whiteSpace:"nowrap",zIndex:3,...G?{left:"100%",marginLeft:"8px",bottom:"0",transform:"translateY(50%)"}:{bottom:"100%",left:"50%",marginBottom:"8px",transform:"translateX(-50%)"},...E==null?void 0:E.tooltip,children:r.jsx(c.Text,{...(U=E==null?void 0:E.tooltip)==null?void 0:U.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(Zt,{marginTop:8,children:y})]});return G||u?B:O}),Cf=e=>{const o=ze(e),t=ql({...e,value:o.value!==void 0?Number(o.value):void 0,onChange:n=>{var a;o.onChange(n),(a=e.onChange)==null||a.call(e,n)}});return r.jsx(Xl,{...e,...t,...o})},Jl=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},dn=(e,o)=>{console.log(`[FormikOTPInput] ${e}`,o)},wf=e=>e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Object.prototype.toString.call(e),Sf=e=>{const o=ze(e),t=Jl(o.value).slice(0,e.length||6);dn("render",{name:e.name,type:e.type,formValue:wf(o.value),displayValue:t,length:e.length||6,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText});const{isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:i,inputRef:g,containerRef:s,mirrorSelectionStart:d,mirrorSelectionEnd:f,setMirrorSelectionStart:u,setMirrorSelectionEnd:m,setInputRef:p,handleFocus:y,handleBlur:x,handleKeyDown:b,handlePaste:C}=El(e),k=h.useCallback(T=>{const w=Jl(T).slice(0,e.length||6);dn("setValue",{name:e.name,incomingValue:T,nextValue:w,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText}),o.onChange&&o.onChange(w),o.onChangeText&&o.onChangeText(w),e.onComplete&&w.length===(e.length||6)&&e.onComplete(w),g.current&&(g.current.value=w)},[o,e,g]),S=h.useCallback(T=>{var v,z,j;const w=typeof T=="string"?T:((v=T==null?void 0:T.currentTarget)==null?void 0:v.value)??((z=T==null?void 0:T.target)==null?void 0:z.value)??((j=T==null?void 0:T.nativeEvent)==null?void 0:j.text)??"",F=String(w).slice(0,e.length||6);dn("handleChange normalized",{name:e.name,raw:w,newValue:F}),k(F),g.current&&(g.current.value=F)},[e.length,k,g]);return r.jsx(Al,{...e,...o,value:t,setValue:k,isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:i,inputRef:g,containerRef:s,mirrorSelectionStart:d,mirrorSelectionEnd:f,setMirrorSelectionStart:u,setMirrorSelectionEnd:m,setInputRef:p,handleChange:S,handleFocus:y,handleBlur:x,handleKeyDown:b,handlePaste:C,stepValues:e.stepValues})},vf=e=>Array.isArray(e)?e:e==null?[]:[e],Ql=({name:e,uploadFile:o,onUploadSuccess:t,onUploadError:n,transformResponse:a,onMultipleFileSelect:l,onFileSelect:i,multiple:g=!0,...s})=>{const{setFieldValue:d,setFieldTouched:f,values:u}=Oe.useFormikContext(),[m,p]=h.useState(!1),[y,x]=h.useState(0),b=h.useCallback(async S=>{if(!S||S.length===0)return;f(e,!0,!0),p(!0);const T=[];for(const w of S){x(0);try{const F=await o(w,z=>{x(z??0)}),v=a?a(F,w):F;T.push(v),t==null||t(w,v)}catch(F){n==null||n(w,F)}}if(T.length>0){const w=vf(Oe.getIn(u,e));d(e,[...w,...T],!0),x(100)}else x(0);p(!1)},[e,n,t,f,d,a,o,u]),C=h.useCallback(async S=>{l==null||l(S),await b(S)},[b,l]),k=h.useCallback(async S=>{i==null||i(S),await b([S])},[b,i]);return r.jsx(Lr,{...s,multiple:g,onMultipleFileSelect:g?C:void 0,onFileSelect:g?void 0:k,isLoading:m,progress:y})};Ql.displayName="FormikUploader";const Tf=e=>{let o=ze(e);o.selected=o.value;const t=ol(e);return r.jsx(rl,{...t,...o})},Zl=e=>{const[o,t]=h.useState(!1),[n,a]=h.useState(e);return{isHovered:o,setIsHovered:t,isToggle:n,setIsToggled:a}},If={square:0,rounded:8,pill:999},Ff=(e,o)=>({outline:{backgroundColor:"color-white",color:e,borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{backgroundColor:"transparent",color:e,borderWidth:0,borderStyle:"none",borderColor:"transparent",_hover:{backgroundColor:"color-gray-50"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease"},link:{backgroundColor:"transparent",color:e,borderWidth:1,borderStyle:"solid",borderColor:"transparent",textDecoration:"underline",textUnderlineOffset:"1px",textDecorationThickness:"1px",_hover:{opacity:.8},_active:{opacity:.9},transition:"opacity 0.2s ease"}}),Rl=h.memo(({children:e,shape:o="rounded",variant:t="ghost",isHovered:n,setIsHovered:a,isDisabled:l,isToggle:i,setIsToggled:g,onToggle:s,views:d,backgroundColor:f,color:u,themeMode:m,...p})=>{const{getColor:y,themeMode:x}=c.useTheme(),b=m??x,k=y(l?"theme-disabled":f??u??"theme-primary",{themeMode:b}),T=h.useMemo(()=>Ff(k),[k,b])[t],w=!!i,F=h.useCallback(()=>a(!0),[a]),v=h.useCallback(()=>{l||g(z=>{const j=!z;return s&&s(j),j})},[l,g,s]);return r.jsx(c.Center,{role:"Toggle",padding:o==="pill"?"8px 12px":"8px",width:"fit-content",cursor:l?"not-allowed":"pointer",borderRadius:If[o],onClick:v,onMouseEnter:F,onMouseLeave:()=>a(!1),...T,...w&&{...t==="link"?{backgroundColor:"transparent"}:{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200"},color:k},...p,...d==null?void 0:d.container,children:e})}),zf=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:l,...i})=>{const g=ze(i),{isHovered:s,setIsHovered:d,isToggle:f,setIsToggled:u}=Zl(g.value??a);h.useEffect(()=>{u(g.value??a)},[g.value,a]);const m=p=>{u(p),g.onChange(p),l==null||l(p)};return r.jsx(Rl,{shape:o,variant:t,isDisabled:n,isHovered:s,setIsHovered:d,isToggle:f,setIsToggled:u,onToggle:m,...i,children:e})},ei=()=>{const[e,o]=h.useState([]);return{activeToggles:e,setActiveToggles:o}},gn=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:l,...i})=>{const{isHovered:g,setIsHovered:s,isToggle:d,setIsToggled:f}=Zl(a);return h.useEffect(()=>{f(a)},[a]),r.jsx(Rl,{shape:o,variant:t,isDisabled:n,isHovered:g,setIsHovered:s,isToggle:d,setIsToggled:f,onToggle:l,...i,children:e})},oi=({items:e,onToggleChange:o,activeToggles:t,setActiveToggles:n,shape:a="rounded",variant:l="ghost",views:i})=>{const g=h.useCallback((s,d)=>{n(f=>{let u;return d?u=f.includes(s)?f:[...f,s]:u=f.filter(m=>m!==s),o==null||o(u),u})},[o,n]);return r.jsx(c.Horizontal,{role:"ToggleGroup",display:"flex",gap:8,flexWrap:"wrap",...i==null?void 0:i.container,children:e.map(s=>r.jsx(gn,{role:`toggle-${s.id}`,shape:a,variant:l,isToggled:t.includes(s.id)||s.isActive,onToggle:d=>g(s.id,d),isDisabled:s.isDisabled,views:i==null?void 0:i.toggle,children:s.value},s.id))})},Mf=({items:e,shape:o,variant:t,onToggleChange:n,...a})=>{const l=ze(a),{activeToggles:i,setActiveToggles:g}=ei();h.useEffect(()=>{Array.isArray(l.value)&&g(l.value)},[l.value]);const s=d=>{g(d),l.onChange(d),n==null||n(d)};return r.jsx(oi,{items:e,shape:o,variant:t,activeToggles:i,setActiveToggles:g,onToggleChange:s,...a})},ri=["zoom-out","zoom-in","zap","zap-off","youtube","x","wrench","worm","workflow","wine","wine-off","wind","wind-arrow-down","wifi","wifi-zero","wifi-sync","wifi-pen","wifi-off","wifi-low","wifi-high","wifi-cog","whole-word","wheat","wheat-off","weight","weight-tilde","webhook","webhook-off","webcam","waypoints","waves","waves-ladder","waves-arrow-up","waves-arrow-down","watch","washing-machine","warehouse","wand","wand-sparkles","wallpaper","wallet","wallet-minimal","wallet-cards","vote","volume","volume-x","volume-off","volume-2","volume-1","volleyball","voicemail","view","videotape","video","video-off","vibrate","vibrate-off","venus","venus-and-mars","venetian-mask","vegan","vector-square","vault","variable","van","utility-pole","utensils","utensils-crossed","users","users-round","user","user-x","user-star","user-search","user-round","user-round-x","user-round-search","user-round-plus","user-round-pen","user-round-minus","user-round-cog","user-round-check","user-plus","user-pen","user-minus","user-lock","user-cog","user-check","usb","upload","unplug","unlink","unlink-2","university","ungroup","unfold-vertical","unfold-horizontal","undo","undo-dot","undo-2","underline","umbrella","umbrella-off","type","type-outline","twitter","twitch","tv","tv-minimal","tv-minimal-play","turtle","turntable","turkish-lira","truck","truck-electric","trophy","triangle","triangle-right","triangle-dashed","triangle-alert","trending-up","trending-up-down","trending-down","trello","trees","tree-pine","tree-palm","tree-deciduous","trash","trash-2","transgender","tram-front","train-track","train-front","train-front-tunnel","traffic-cone","tractor","toy-brick","tower-control","touchpad","touchpad-off","torus","tornado","toolbox","tool-case","toilet","toggle-right","toggle-left","timer","timer-reset","timer-off","tickets","tickets-plane","ticket","ticket-x","ticket-slash","ticket-plus","ticket-percent","ticket-minus","ticket-check","thumbs-up","thumbs-down","thermometer","thermometer-sun","thermometer-snowflake","theater","text-wrap","text-select","text-search","text-quote","text-initial","text-cursor","text-cursor-input","text-align-start","text-align-justify","text-align-end","text-align-center","test-tubes","test-tube","test-tube-diagonal","terminal","tent","tent-tree","telescope","target","tangent","tally-5","tally-4","tally-3","tally-2","tally-1","tags","tag","tablets","tablet","tablet-smartphone","table","table-rows-split","table-properties","table-of-contents","table-columns-split","table-cells-split","table-cells-merge","table-2","syringe","swords","sword","switch-camera","swiss-franc","swatch-book","superscript","sunset","sunrise","sun","sun-snow","sun-moon","sun-medium","sun-dim","subscript","strikethrough","stretch-vertical","stretch-horizontal","store","stone","sticky-note","sticker","stethoscope","step-forward","step-back","star","star-off","star-half","stamp","squirrel","squircle","squircle-dashed","squares-unite","squares-subtract","squares-intersect","squares-exclude","square","square-x","square-user","square-user-round","square-terminal","square-stop","square-star","square-stack","square-square","square-split-vertical","square-split-horizontal","square-slash","square-sigma","square-scissors","square-round-corner","square-radical","square-power","square-plus","square-play","square-pilcrow","square-pi","square-percent","square-pen","square-pause","square-parking","square-parking-off","square-mouse-pointer","square-minus","square-menu","square-m","square-library","square-kanban","square-function","square-equal","square-dot","square-divide","square-dashed","square-dashed-top-solid","square-dashed-mouse-pointer","square-dashed-kanban","square-dashed-bottom","square-dashed-bottom-code","square-code","square-chevron-up","square-chevron-right","square-chevron-left","square-chevron-down","square-check","square-check-big","square-chart-gantt","square-bottom-dashed-scissors","square-asterisk","square-arrow-up","square-arrow-up-right","square-arrow-up-left","square-arrow-right","square-arrow-out-up-right","square-arrow-out-up-left","square-arrow-out-down-right","square-arrow-out-down-left","square-arrow-left","square-arrow-down","square-arrow-down-right","square-arrow-down-left","square-activity","sprout","spray-can","spotlight","spool","split","spline","spline-pointer","spell-check","spell-check-2","speech","speaker","sparkles","sparkle","spade","space","soup","solar-panel","sofa","soap-dispenser-droplet","snowflake","snail","smile","smile-plus","smartphone","smartphone-nfc","smartphone-charging","sliders-vertical","sliders-horizontal","slice","slash","slack","skull","skip-forward","skip-back","siren","signpost","signpost-big","signature","signal","signal-zero","signal-medium","signal-low","signal-high","sigma","shuffle","shrub","shrink","shrimp","shredder","shower-head","shovel","shopping-cart","shopping-basket","shopping-bag","shirt","ship","ship-wheel","shield","shield-x","shield-user","shield-question-mark","shield-plus","shield-off","shield-minus","shield-half","shield-ellipsis","shield-check","shield-ban","shield-alert","shell","sheet","share","share-2","shapes","settings","settings-2","server","server-off","server-crash","server-cog","separator-vertical","separator-horizontal","send","send-to-back","send-horizontal","section","search","search-x","search-slash","search-code","search-check","search-alert","scroll","scroll-text","screen-share","screen-share-off","scooter","scissors","scissors-line-dashed","school","scan","scan-text","scan-search","scan-qr-code","scan-line","scan-heart","scan-face","scan-eye","scan-barcode","scaling","scale","scale-3d","save","save-off","save-all","saudi-riyal","satellite","satellite-dish","sandwich","salad","sailboat","russian-ruble","ruler","ruler-dimension-line","rss","rows-4","rows-3","rows-2","router","route","route-off","rotate-cw","rotate-cw-square","rotate-ccw","rotate-ccw-square","rotate-ccw-key","rotate-3d","rose","roller-coaster","rocking-chair","rocket","ribbon","rewind","reply","reply-all","replace","replace-all","repeat","repeat-2","repeat-1","remove-formatting","regex","refrigerator","refresh-cw","refresh-cw-off","refresh-ccw","refresh-ccw-dot","redo","redo-dot","redo-2","recycle","rectangle-vertical","rectangle-horizontal","rectangle-goggles","rectangle-ellipsis","rectangle-circle","receipt","receipt-turkish-lira","receipt-text","receipt-swiss-franc","receipt-russian-ruble","receipt-pound-sterling","receipt-japanese-yen","receipt-indian-rupee","receipt-euro","receipt-cent","ratio","rat","rainbow","rail-symbol","radius","radio","radio-tower","radio-receiver","radical","radiation","radar","rabbit","quote","qr-code","pyramid","puzzle","proportions","projector","printer","printer-check","presentation","power","power-off","pound-sterling","popsicle","popcorn","pointer","pointer-off","podcast","pocket","pocket-knife","plus","plug","plug-zap","plug-2","play","plane","plane-takeoff","plane-landing","pizza","pipette","pin","pin-off","pill","pill-bottle","pilcrow","pilcrow-right","pilcrow-left","piggy-bank","picture-in-picture","picture-in-picture-2","pickaxe","piano","pi","phone","phone-outgoing","phone-off","phone-missed","phone-incoming","phone-forwarded","phone-call","philippine-peso","person-standing","percent","pentagon","pencil","pencil-ruler","pencil-off","pencil-line","pen","pen-tool","pen-off","pen-line","pc-case","paw-print","pause","party-popper","parking-meter","parentheses","paperclip","panels-top-left","panels-right-bottom","panels-left-bottom","panel-top","panel-top-open","panel-top-dashed","panel-top-close","panel-top-bottom-dashed","panel-right","panel-right-open","panel-right-dashed","panel-right-close","panel-left","panel-left-right-dashed","panel-left-open","panel-left-dashed","panel-left-close","panel-bottom","panel-bottom-open","panel-bottom-dashed","panel-bottom-close","panda","palette","paintbrush","paintbrush-vertical","paint-roller","paint-bucket","package","package-x","package-search","package-plus","package-open","package-minus","package-check","package-2","origami","orbit","option","omega","octagon","octagon-x","octagon-pause","octagon-minus","octagon-alert","nut","nut-off","notepad-text","notepad-text-dashed","notebook","notebook-text","notebook-tabs","notebook-pen","non-binary","nfc","newspaper","network","navigation","navigation-off","navigation-2","navigation-2-off","music","music-4","music-3","music-2","move","move-vertical","move-up","move-up-right","move-up-left","move-right","move-left","move-horizontal","move-down","move-down-right","move-down-left","move-diagonal","move-diagonal-2","move-3d","mouse","mouse-pointer","mouse-pointer-click","mouse-pointer-ban","mouse-pointer-2","mouse-pointer-2-off","mouse-off","mountain","mountain-snow","motorbike","moon","moon-star","monitor","monitor-x","monitor-up","monitor-stop","monitor-speaker","monitor-smartphone","monitor-play","monitor-pause","monitor-off","monitor-down","monitor-dot","monitor-cog","monitor-cloud","monitor-check","minus","minimize","minimize-2","milk","milk-off","milestone","microwave","microscope","microchip","mic","mic-vocal","mic-off","messages-square","message-square","message-square-x","message-square-warning","message-square-text","message-square-share","message-square-reply","message-square-quote","message-square-plus","message-square-off","message-square-more","message-square-lock","message-square-heart","message-square-dot","message-square-diff","message-square-dashed","message-square-code","message-circle","message-circle-x","message-circle-warning","message-circle-reply","message-circle-question-mark","message-circle-plus","message-circle-off","message-circle-more","message-circle-heart","message-circle-dashed","message-circle-code","merge","menu","memory-stick","meh","megaphone","megaphone-off","medal","maximize","maximize-2","martini","mars","mars-stroke","map","map-plus","map-pinned","map-pin","map-pin-x","map-pin-x-inside","map-pin-plus","map-pin-plus-inside","map-pin-pen","map-pin-off","map-pin-minus","map-pin-minus-inside","map-pin-house","map-pin-check","map-pin-check-inside","map-minus","mails","mailbox","mail","mail-x","mail-warning","mail-search","mail-question-mark","mail-plus","mail-open","mail-minus","mail-check","magnet","luggage","lollipop","logs","log-out","log-in","lock","lock-open","lock-keyhole","lock-keyhole-open","locate","locate-off","locate-fixed","loader","loader-pinwheel","loader-circle","list","list-x","list-video","list-tree","list-todo","list-start","list-restart","list-plus","list-ordered","list-music","list-minus","list-indent-increase","list-indent-decrease","list-filter","list-filter-plus","list-end","list-collapse","list-chevrons-up-down","list-chevrons-down-up","list-checks","list-check","linkedin","link","link-2","link-2-off","line-squiggle","lightbulb","lightbulb-off","ligature","life-buoy","library","library-big","lectern","leafy-green","leaf","layout-template","layout-panel-top","layout-panel-left","layout-list","layout-grid","layout-dashboard","layers","layers-plus","layers-2","laugh","lasso","lasso-select","laptop","laptop-minimal","laptop-minimal-check","languages","landmark","land-plot","lamp","lamp-wall-up","lamp-wall-down","lamp-floor","lamp-desk","lamp-ceiling","keyboard","keyboard-off","keyboard-music","key","key-square","key-round","kayak","kanban","joystick","japanese-yen","iteration-cw","iteration-ccw","italic","instagram","inspection-panel","info","infinity","indian-rupee","inbox","import","images","image","image-upscale","image-up","image-plus","image-play","image-off","image-minus","image-down","id-card","id-card-lanyard","ice-cream-cone","ice-cream-bowl","house","house-wifi","house-plus","house-plug","house-heart","hourglass","hotel","hospital","hop","hop-off","history","highlighter","hexagon","helicopter","heater","heart","heart-pulse","heart-plus","heart-off","heart-minus","heart-handshake","heart-crack","headset","headphones","headphone-off","heading","heading-6","heading-5","heading-4","heading-3","heading-2","heading-1","hdmi-port","hd","haze","hat-glasses","hash","hard-hat","hard-drive","hard-drive-upload","hard-drive-download","handshake","handbag","hand","hand-platter","hand-metal","hand-helping","hand-heart","hand-grab","hand-fist","hand-coins","hammer","hamburger","ham","guitar","group","grip","grip-vertical","grip-horizontal","grid-3x3","grid-3x2","grid-2x2","grid-2x2-x","grid-2x2-plus","grid-2x2-check","grape","graduation-cap","gpu","goal","globe","globe-lock","glasses","glass-water","gitlab","github","git-pull-request","git-pull-request-draft","git-pull-request-create","git-pull-request-create-arrow","git-pull-request-closed","git-pull-request-arrow","git-merge","git-graph","git-fork","git-compare","git-compare-arrows","git-commit-vertical","git-commit-horizontal","git-branch","git-branch-plus","git-branch-minus","gift","ghost","georgian-lari","gem","gavel","gauge","gamepad","gamepad-directional","gamepad-2","gallery-vertical","gallery-vertical-end","gallery-thumbnails","gallery-horizontal","gallery-horizontal-end","funnel","funnel-x","funnel-plus","fullscreen","fuel","frown","framer","frame","forward","form","forklift","footprints","folders","folder","folder-x","folder-up","folder-tree","folder-sync","folder-symlink","folder-search","folder-search-2","folder-root","folder-plus","folder-pen","folder-output","folder-open","folder-open-dot","folder-minus","folder-lock","folder-key","folder-kanban","folder-input","folder-heart","folder-git","folder-git-2","folder-down","folder-dot","folder-cog","folder-code","folder-closed","folder-clock","folder-check","folder-archive","fold-vertical","fold-horizontal","focus","flower","flower-2","flip-vertical","flip-vertical-2","flip-horizontal","flip-horizontal-2","flask-round","flask-conical","flask-conical-off","flashlight","flashlight-off","flame","flame-kindling","flag","flag-triangle-right","flag-triangle-left","flag-off","fishing-hook","fish","fish-symbol","fish-off","fire-extinguisher","fingerprint-pattern","film","files","file","file-x","file-x-corner","file-volume","file-video-camera","file-user","file-up","file-type","file-type-corner","file-text","file-terminal","file-symlink","file-stack","file-spreadsheet","file-sliders","file-signal","file-search","file-search-corner","file-scan","file-question-mark","file-plus","file-plus-corner","file-play","file-pen","file-pen-line","file-output","file-music","file-minus","file-minus-corner","file-lock","file-key","file-input","file-image","file-heart","file-headphone","file-exclamation-point","file-down","file-digit","file-diff","file-cog","file-code","file-code-corner","file-clock","file-check","file-check-corner","file-chart-pie","file-chart-line","file-chart-column","file-chart-column-increasing","file-braces","file-braces-corner","file-box","file-badge","file-axis-3d","file-archive","figma","ferris-wheel","fence","feather","fast-forward","fan","factory","facebook","eye","eye-off","eye-closed","external-link","expand","ev-charger","euro","ethernet-port","eraser","equal","equal-not","equal-approximately","ellipsis","ellipsis-vertical","egg","egg-off","egg-fried","eclipse","earth","earth-lock","ear","ear-off","dumbbell","drumstick","drum","droplets","droplet","droplet-off","drone","drill","dribbble","drama","drafting-compass","download","dot","door-open","door-closed","door-closed-locked","donut","dollar-sign","dog","dock","dna","dna-off","divide","disc","disc-album","disc-3","disc-2","diff","dices","dice-6","dice-5","dice-4","dice-3","dice-2","dice-1","diamond","diamond-plus","diamond-percent","diamond-minus","diameter","dessert","delete","decimals-arrow-right","decimals-arrow-left","database","database-zap","database-backup","dam","cylinder","currency","cup-soda","cuboid","crown","crosshair","cross","crop","croissant","credit-card","creative-commons","cpu","corner-up-right","corner-up-left","corner-right-up","corner-right-down","corner-left-up","corner-left-down","corner-down-right","corner-down-left","copyright","copyleft","copy","copy-x","copy-slash","copy-plus","copy-minus","copy-check","cooking-pot","cookie","contrast","container","contact","contact-round","construction","cone","concierge-bell","computer","component","compass","command","combine","columns-4","columns-3","columns-3-cog","columns-2","coins","cog","coffee","codesandbox","codepen","code","code-xml","club","clover","cloudy","cloud","cloud-upload","cloud-sync","cloud-sun","cloud-sun-rain","cloud-snow","cloud-rain","cloud-rain-wind","cloud-off","cloud-moon","cloud-moon-rain","cloud-lightning","cloud-hail","cloud-fog","cloud-drizzle","cloud-download","cloud-cog","cloud-check","cloud-backup","cloud-alert","closed-caption","clock","clock-plus","clock-fading","clock-check","clock-arrow-up","clock-arrow-down","clock-alert","clock-9","clock-8","clock-7","clock-6","clock-5","clock-4","clock-3","clock-2","clock-12","clock-11","clock-10","clock-1","clipboard","clipboard-x","clipboard-type","clipboard-plus","clipboard-pen","clipboard-pen-line","clipboard-paste","clipboard-minus","clipboard-list","clipboard-copy","clipboard-clock","clipboard-check","clapperboard","citrus","circuit-board","circle","circle-x","circle-user","circle-user-round","circle-stop","circle-star","circle-small","circle-slash","circle-slash-2","circle-question-mark","circle-power","circle-pound-sterling","circle-plus","circle-play","circle-pile","circle-percent","circle-pause","circle-parking","circle-parking-off","circle-off","circle-minus","circle-gauge","circle-fading-plus","circle-fading-arrow-up","circle-equal","circle-ellipsis","circle-dot","circle-dot-dashed","circle-dollar-sign","circle-divide","circle-dashed","circle-chevron-up","circle-chevron-right","circle-chevron-left","circle-chevron-down","circle-check","circle-check-big","circle-arrow-up","circle-arrow-right","circle-arrow-out-up-right","circle-arrow-out-up-left","circle-arrow-out-down-right","circle-arrow-out-down-left","circle-arrow-left","circle-arrow-down","circle-alert","cigarette","cigarette-off","church","chromium","chevrons-up","chevrons-up-down","chevrons-right","chevrons-right-left","chevrons-left","chevrons-left-right","chevrons-left-right-ellipsis","chevrons-down","chevrons-down-up","chevron-up","chevron-right","chevron-left","chevron-last","chevron-first","chevron-down","chess-rook","chess-queen","chess-pawn","chess-knight","chess-king","chess-bishop","cherry","chef-hat","check","check-line","check-check","chart-spline","chart-scatter","chart-pie","chart-no-axes-gantt","chart-no-axes-combined","chart-no-axes-column","chart-no-axes-column-increasing","chart-no-axes-column-decreasing","chart-network","chart-line","chart-gantt","chart-column","chart-column-stacked","chart-column-increasing","chart-column-decreasing","chart-column-big","chart-candlestick","chart-bar","chart-bar-stacked","chart-bar-increasing","chart-bar-decreasing","chart-bar-big","chart-area","cctv","cat","castle","cast","cassette-tape","case-upper","case-sensitive","case-lower","carrot","card-sim","caravan","car","car-taxi-front","car-front","captions","captions-off","cannabis","cannabis-off","candy","candy-off","candy-cane","camera","camera-off","calendars","calendar","calendar-x","calendar-x-2","calendar-sync","calendar-search","calendar-range","calendar-plus","calendar-plus-2","calendar-off","calendar-minus","calendar-minus-2","calendar-heart","calendar-fold","calendar-days","calendar-cog","calendar-clock","calendar-check","calendar-check-2","calendar-arrow-up","calendar-arrow-down","calendar-1","calculator","cake","cake-slice","cable","cable-car","bus","bus-front","building","building-2","bug","bug-play","bug-off","bubbles","brush","brush-cleaning","bring-to-front","briefcase","briefcase-medical","briefcase-conveyor-belt","briefcase-business","brick-wall","brick-wall-shield","brick-wall-fire","brain","brain-cog","brain-circuit","brackets","braces","boxes","box","bow-arrow","bottle-wine","bot","bot-off","bot-message-square","boom-box","bookmark","bookmark-x","bookmark-plus","bookmark-minus","bookmark-check","book","book-x","book-user","book-up","book-up-2","book-type","book-text","book-search","book-plus","book-open","book-open-text","book-open-check","book-minus","book-marked","book-lock","book-key","book-image","book-heart","book-headphones","book-down","book-dashed","book-copy","book-check","book-audio","book-alert","book-a","bone","bomb","bolt","bold","bluetooth","bluetooth-searching","bluetooth-off","bluetooth-connected","blocks","blinds","blend","bitcoin","birdhouse","bird","biohazard","binoculars","binary","bike","biceps-flexed","between-vertical-start","between-vertical-end","between-horizontal-start","between-horizontal-end","bell","bell-ring","bell-plus","bell-off","bell-minus","bell-electric","bell-dot","beer","beer-off","beef","bed","bed-single","bed-double","bean","bean-off","beaker","battery","battery-warning","battery-plus","battery-medium","battery-low","battery-full","battery-charging","bath","baseline","barrel","barcode","banknote","banknote-x","banknote-arrow-up","banknote-arrow-down","bandage","banana","ban","balloon","baggage-claim","badge","badge-x","badge-turkish-lira","badge-swiss-franc","badge-russian-ruble","badge-question-mark","badge-pound-sterling","badge-plus","badge-percent","badge-minus","badge-japanese-yen","badge-info","badge-indian-rupee","badge-euro","badge-dollar-sign","badge-check","badge-cent","badge-alert","backpack","baby","axis-3d","axe","award","audio-waveform","audio-lines","atom","at-sign","asterisk","arrows-up-from-line","arrow-up","arrow-up-z-a","arrow-up-wide-narrow","arrow-up-to-line","arrow-up-right","arrow-up-narrow-wide","arrow-up-left","arrow-up-from-line","arrow-up-from-dot","arrow-up-down","arrow-up-a-z","arrow-up-1-0","arrow-up-0-1","arrow-right","arrow-right-to-line","arrow-right-left","arrow-right-from-line","arrow-left","arrow-left-to-line","arrow-left-right","arrow-left-from-line","arrow-down","arrow-down-z-a","arrow-down-wide-narrow","arrow-down-up","arrow-down-to-line","arrow-down-to-dot","arrow-down-right","arrow-down-narrow-wide","arrow-down-left","arrow-down-from-line","arrow-down-a-z","arrow-down-1-0","arrow-down-0-1","arrow-big-up","arrow-big-up-dash","arrow-big-right","arrow-big-right-dash","arrow-big-left","arrow-big-left-dash","arrow-big-down","arrow-big-down-dash","armchair","archive","archive-x","archive-restore","apple","app-window","app-window-mac","aperture","anvil","antenna","annoyed","angry","anchor","amphora","ampersands","ampersand","ambulance","align-vertical-space-between","align-vertical-space-around","align-vertical-justify-start","align-vertical-justify-end","align-vertical-justify-center","align-vertical-distribute-start","align-vertical-distribute-end","align-vertical-distribute-center","align-start-vertical","align-start-horizontal","align-horizontal-space-between","align-horizontal-space-around","align-horizontal-justify-start","align-horizontal-justify-end","align-horizontal-justify-center","align-horizontal-distribute-start","align-horizontal-distribute-end","align-horizontal-distribute-center","align-end-vertical","align-end-horizontal","align-center-vertical","align-center-horizontal","album","alarm-smoke","alarm-clock","alarm-clock-plus","alarm-clock-off","alarm-clock-minus","alarm-clock-check","airplay","air-vent","activity","accessibility","a-large-small","a-arrow-up","a-arrow-down"],ti=e=>{const{value:o,defaultValue:t,onChange:n,isOpen:a,onOpen:l,onClose:i,closeOnSelect:g=!0}=e,[s,d]=h.useState(a??!1),[f,u]=h.useState(o??t),[m,p]=h.useState(""),y=h.useRef(null),x=h.useRef(null);h.useEffect(()=>{o!==void 0&&u(o)},[o]),h.useEffect(()=>{a!==void 0&&d(a)},[a]);const b=h.useMemo(()=>m?ri.filter(w=>w.toLowerCase().includes(m.toLowerCase())).slice(0,100):ri.slice(0,100),[m]);h.useEffect(()=>{const w=F=>{s&&y.current&&x.current&&!y.current.contains(F.target)&&!x.current.contains(F.target)&&C()};if(!(typeof document>"u"))return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[s]);const C=h.useCallback(()=>{a===void 0&&d(!1),i&&i()},[i,a]),k=h.useCallback(()=>{const w=!s;a===void 0&&d(w),w?(l&&l(),p("")):i&&i()},[s,l,i,a]),S=h.useCallback(w=>{o===void 0&&u(w),n&&n(w),g&&C()},[n,g,C,o]),T=h.useCallback(w=>{p(w)},[]);return{isOpen:s,selectedIcon:f,searchQuery:m,filteredIcons:b,handleToggle:k,handleIconSelect:S,handleSearchChange:T,handleClose:C,triggerRef:y,dropdownRef:x}},qo={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px",maxHeight:"320px",overflow:"hidden",display:"flex",flexDirection:"column"},searchInput:{marginBottom:"12px",flexShrink:0},iconGrid:{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"8px",overflowY:"auto",padding:"4px",color:"color-black",flexGrow:1},iconItem:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:8,transition:"all 0.2s ease-in-out"}},jf={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},Wf={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Ef={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},ni=({label:e,placeholder:o="Select an icon",helperText:t,views:n={},size:a="md",shape:l="default",variant:i="default",error:g=!1,isDisabled:s=!1,isReadOnly:d=!1,showSearch:f=!0,isOpen:u,selectedIcon:m,searchQuery:p,filteredIcons:y,handleToggle:x,handleIconSelect:b,handleSearchChange:C,triggerRef:k,dropdownRef:S,handleClose:T,onChange:w,value:F,defaultValue:v,onOpen:z,onClose:j,closeOnSelect:H,...E})=>{const{getColor:M}=c.useTheme(),I={...qo.container,...n==null?void 0:n.container},W={...qo.trigger,...jf[a],...Wf[l],...Ef[i],...g&&{borderColor:"color-red-500"},...s&&{opacity:.6,cursor:"not-allowed"},...!s&&!d&&{_hover:{borderColor:"color-gray-300"}},...n==null?void 0:n.trigger},D={...qo.dropdown,...n==null?void 0:n.dropdown},V={...qo.iconGrid,...n==null?void 0:n.iconGrid};return r.jsxs(c.View,{...I,...E,children:[e&&r.jsx(c.Text,{fontSize:a==="xs"?"12px":a==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...n==null?void 0:n.label,children:e}),r.jsxs(c.View,{ref:k,onClick:s||d?void 0:x,...W,children:[r.jsx(c.Horizontal,{alignItems:"center",gap:8,width:"100%",children:m?r.jsxs(c.Horizontal,{alignItems:"center",gap:8,width:"100%",children:[r.jsx(ar,{name:m,widthHeight:16}),r.jsx(c.Text,{color:"color-gray-800",fontSize:"inherit",style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:m})]}):r.jsx(c.Text,{color:"color-gray-500",fontSize:"inherit",children:o})}),!d&&!s&&r.jsx(we,{widthHeight:16,color:"color-gray-500",orientation:u?"up":"down"})]}),u&&r.jsxs(c.View,{ref:S,...D,children:[f&&r.jsx(c.View,{...qo.searchInput,...n==null?void 0:n.searchInput,children:r.jsx($e,{placeholder:"Search icons...",value:p,onChange:P=>C(P),size:"sm",autoFocus:!0})}),r.jsx(c.View,{...V,children:y.length>0?y.map(P=>r.jsx(c.View,{...qo.iconItem,onClick:()=>b(P),title:P,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},backgroundColor:m===P?"#EFF6FF":"transparent",borderWidth:m===P?"1px":"0px",borderStyle:"solid",borderColor:m===P?"#BFDBFE":"transparent",...n==null?void 0:n.iconItem,children:r.jsx(ar,{name:P,widthHeight:20})},P)):r.jsx(c.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(c.Text,{fontSize:"14px",children:"No icons found"})})})]}),t&&r.jsx(c.Text,{color:g?"color-red-500":"color-gray-600",marginTop:"4px",...n==null?void 0:n.helperText,children:t})]})},Af=e=>{const o=ze(e),t={...e,value:o.value??e.value??e.defaultValue},n=ti(t),a=l=>{n.handleIconSelect(l),o.onChange(l)};return r.jsx(ni,{...n,...t,handleIconSelect:a})},ai={select:"Select an emoji",reaction:"Add reaction",search:"Search emojis…",more:"More emojis",empty:"No emojis found",categoryEmpty:"No emojis in this category",recent:"Recent",smileys:"Smileys",people:"People",animals:"Animals",food:"Food",activities:"Activities",travel:"Travel",objects:"Objects",symbols:"Symbols",flags:"Flags"},li=["👍","❤️","🙌","😂","😢","😮"],Hf=[{emoji:"😀",name:"grinning face",category:"smileys",keywords:["happy","smile","grin","heureux","sourire"]},{emoji:"😃",name:"grinning face with big eyes",category:"smileys",keywords:["happy","smile","joy","heureux","sourire","joie"]},{emoji:"😄",name:"grinning face with smiling eyes",category:"smileys",keywords:["happy","smile","joy","heureux","sourire","joie"]},{emoji:"😁",name:"beaming face with smiling eyes",category:"smileys",keywords:["happy","smile","grin","heureux","sourire"]},{emoji:"😆",name:"grinning squinting face",category:"smileys",keywords:["happy","laugh","smile","heureux","rire","sourire"]},{emoji:"😅",name:"grinning face with sweat",category:"smileys",keywords:["happy","sweat","relief","heureux"]},{emoji:"🤣",name:"rolling on the floor laughing",category:"smileys",keywords:["laugh","funny","rofl","rire"]},{emoji:"😂",name:"face with tears of joy",category:"smileys",keywords:["laugh","cry","joy","rire","pleurer","joie"]},{emoji:"🙂",name:"slightly smiling face",category:"smileys",keywords:["smile","happy","sourire","heureux"]},{emoji:"🙃",name:"upside-down face",category:"smileys",keywords:["silly","upside down"]},{emoji:"😉",name:"winking face",category:"smileys",keywords:["wink","flirt"]},{emoji:"😊",name:"smiling face with smiling eyes",category:"smileys",keywords:["happy","smile","blush","heureux","sourire"]},{emoji:"😇",name:"smiling face with halo",category:"smileys",keywords:["angel","innocent"]},{emoji:"🥰",name:"smiling face with hearts",category:"smileys",keywords:["love","hearts","adore","amour"]},{emoji:"😍",name:"smiling face with heart-eyes",category:"smileys",keywords:["love","heart","eyes","amour","cœur","yeux"]},{emoji:"🤩",name:"star-struck",category:"smileys",keywords:["star","struck","amazed","étoile"]},{emoji:"😘",name:"face blowing a kiss",category:"smileys",keywords:["kiss","love","flirt","bisou","amour"]},{emoji:"😗",name:"kissing face",category:"smileys",keywords:["kiss","love","bisou","amour"]},{emoji:"☺️",name:"smiling face",category:"smileys",keywords:["smile","happy","content","sourire","heureux"]},{emoji:"😚",name:"kissing face with closed eyes",category:"smileys",keywords:["kiss","love","closed eyes","bisou","amour","yeux"]},{emoji:"😙",name:"kissing face with smiling eyes",category:"smileys",keywords:["kiss","love","smile","bisou","amour","sourire"]},{emoji:"🥲",name:"smiling face with tear",category:"smileys",keywords:["happy","cry","tear","bittersweet","heureux","pleurer"]},{emoji:"😋",name:"face savoring food",category:"smileys",keywords:["yum","delicious","food","nourriture"]},{emoji:"😛",name:"face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"😜",name:"winking face with tongue",category:"smileys",keywords:["wink","tongue","silly"]},{emoji:"🤪",name:"zany face",category:"smileys",keywords:["crazy","silly","wild"]},{emoji:"😝",name:"squinting face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"🤑",name:"money-mouth face",category:"smileys",keywords:["money","rich","greedy"]},{emoji:"🤗",name:"hugging face",category:"smileys",keywords:["hug","love","care","amour"]},{emoji:"🤭",name:"face with hand over mouth",category:"smileys",keywords:["oops","secret","quiet"]},{emoji:"🫢",name:"face with open eyes and hand over mouth",category:"smileys",keywords:["surprise","shock","oops"]},{emoji:"🫣",name:"face with peeking eye",category:"smileys",keywords:["peek","shy","embarrassed"]},{emoji:"🤫",name:"shushing face",category:"smileys",keywords:["quiet","secret","shh"]},{emoji:"🤔",name:"thinking face",category:"smileys",keywords:["think","consider","hmm","réfléchir"]},{emoji:"🫡",name:"saluting face",category:"smileys",keywords:["salute","respect","military"]},{emoji:"🤐",name:"zipper-mouth face",category:"smileys",keywords:["quiet","secret","zip"]},{emoji:"🤨",name:"face with raised eyebrow",category:"smileys",keywords:["suspicious","doubt","skeptical"]},{emoji:"😐",name:"neutral face",category:"smileys",keywords:["neutral","meh","blank","neutre"]},{emoji:"😑",name:"expressionless face",category:"smileys",keywords:["blank","deadpan","meh"]},{emoji:"😶",name:"face without mouth",category:"smileys",keywords:["quiet","speechless","silent"]},{emoji:"🫥",name:"dotted line face",category:"smileys",keywords:["invisible","depressed","disappear"]},{emoji:"😏",name:"smirking face",category:"smileys",keywords:["smirk","smug","confident"]},{emoji:"😒",name:"unamused face",category:"smileys",keywords:["unamused","bored","annoyed"]},{emoji:"🙄",name:"face with rolling eyes",category:"smileys",keywords:["eye roll","annoyed","whatever"]},{emoji:"😬",name:"grimacing face",category:"smileys",keywords:["grimace","awkward","oops"]},{emoji:"😮‍💨",name:"face exhaling",category:"smileys",keywords:["sigh","relief","tired","fatigué"]},{emoji:"🤥",name:"lying face",category:"smileys",keywords:["lie","pinocchio","dishonest"]},{emoji:"😌",name:"relieved face",category:"smileys",keywords:["relief","calm","peaceful"]},{emoji:"😔",name:"pensive face",category:"smileys",keywords:["sad","thoughtful","pensive","triste"]},{emoji:"😪",name:"sleepy face",category:"smileys",keywords:["sleepy","tired","drowsy","fatigué"]},{emoji:"🤤",name:"drooling face",category:"smileys",keywords:["drool","desire","sleep","dormir"]},{emoji:"😴",name:"sleeping face",category:"smileys",keywords:["sleep","tired","zzz","dormir","fatigué"]},{emoji:"😷",name:"face with medical mask",category:"smileys",keywords:["mask","sick","doctor"]},{emoji:"🤒",name:"face with thermometer",category:"smileys",keywords:["sick","fever","ill"]},{emoji:"🤕",name:"face with head-bandage",category:"smileys",keywords:["hurt","injured","bandage"]},{emoji:"🤢",name:"nauseated face",category:"smileys",keywords:["sick","nausea","disgusted"]},{emoji:"🤮",name:"face vomiting",category:"smileys",keywords:["vomit","sick","disgusted"]},{emoji:"🤧",name:"sneezing face",category:"smileys",keywords:["sneeze","sick","gesundheit"]},{emoji:"🥵",name:"hot face",category:"smileys",keywords:["hot","heat","sweat"]},{emoji:"🥶",name:"cold face",category:"smileys",keywords:["cold","freeze","blue","bleu"]},{emoji:"🥴",name:"woozy face",category:"smileys",keywords:["dizzy","drunk","confused","confus"]},{emoji:"😵",name:"dizzy face",category:"smileys",keywords:["dizzy","confused","knocked out","confus"]},{emoji:"😵‍💫",name:"face with spiral eyes",category:"smileys",keywords:["dizzy","hypnotized","confused","confus"]},{emoji:"🤯",name:"exploding head",category:"smileys",keywords:["mind blown","shocked","amazed"]},{emoji:"🤠",name:"cowboy hat face",category:"smileys",keywords:["cowboy","hat","western"]},{emoji:"🥳",name:"partying face",category:"smileys",keywords:["party","celebration","birthday","fête"]},{emoji:"🥸",name:"disguised face",category:"smileys",keywords:["disguise","glasses","incognito"]},{emoji:"😎",name:"smiling face with sunglasses",category:"smileys",keywords:["cool","sunglasses","awesome"]},{emoji:"🤓",name:"nerd face",category:"smileys",keywords:["nerd","geek","smart"]},{emoji:"🧐",name:"face with monocle",category:"smileys",keywords:["monocle","fancy","inspection"]},{emoji:"👋",name:"waving hand",category:"people",keywords:["wave","hello","goodbye"]},{emoji:"🤚",name:"raised back of hand",category:"people",keywords:["hand","stop","main"]},{emoji:"🖐️",name:"hand with fingers splayed",category:"people",keywords:["hand","five","main"]},{emoji:"✋",name:"raised hand",category:"people",keywords:["hand","stop","high five","main"]},{emoji:"🖖",name:"vulcan salute",category:"people",keywords:["spock","vulcan"]},{emoji:"👌",name:"OK hand",category:"people",keywords:["ok","perfect"]},{emoji:"🤌",name:"pinched fingers",category:"people",keywords:["italian","chef kiss","bisou"]},{emoji:"🤏",name:"pinching hand",category:"people",keywords:["small","tiny"]},{emoji:"✌️",name:"victory hand",category:"people",keywords:["peace","victory","victoire"]},{emoji:"🤞",name:"crossed fingers",category:"people",keywords:["luck","hope"]},{emoji:"🤟",name:"love-you gesture",category:"people",keywords:["love","you","amour"]},{emoji:"🤘",name:"sign of the horns",category:"people",keywords:["rock","metal"]},{emoji:"🤙",name:"call me hand",category:"people",keywords:["call","phone"]},{emoji:"👈",name:"backhand index pointing left",category:"people",keywords:["point","left"]},{emoji:"👉",name:"backhand index pointing right",category:"people",keywords:["point","right"]},{emoji:"👆",name:"backhand index pointing up",category:"people",keywords:["point","up"]},{emoji:"🖕",name:"middle finger",category:"people",keywords:["middle finger","rude"]},{emoji:"👇",name:"backhand index pointing down",category:"people",keywords:["point","down"]},{emoji:"☝️",name:"index pointing up",category:"people",keywords:["point","up","one"]},{emoji:"👍",name:"thumbs up",category:"people",keywords:["thumbs up","good","yes","pouce"]},{emoji:"👎",name:"thumbs down",category:"people",keywords:["thumbs down","bad","no","pouce"]},{emoji:"✊",name:"raised fist",category:"people",keywords:["fist","power","solidarity"]},{emoji:"👊",name:"oncoming fist",category:"people",keywords:["fist","punch","bump"]},{emoji:"🤛",name:"left-facing fist",category:"people",keywords:["fist","bump","left"]},{emoji:"🤜",name:"right-facing fist",category:"people",keywords:["fist","bump","right"]},{emoji:"👏",name:"clapping hands",category:"people",keywords:["clap","applause","bravo"]},{emoji:"🙌",name:"raising hands",category:"people",keywords:["celebration","hooray","praise","fête"]},{emoji:"👐",name:"open hands",category:"people",keywords:["open","hug","jazz hands"]},{emoji:"🤲",name:"palms up together",category:"people",keywords:["prayer","please","hope"]},{emoji:"🤝",name:"handshake",category:"people",keywords:["handshake","deal","agreement"]},{emoji:"🙏",name:"folded hands",category:"people",keywords:["prayer","thanks","please","merci"]},{emoji:"✍️",name:"writing hand",category:"people",keywords:["write","author","signature"]},{emoji:"💅",name:"nail polish",category:"people",keywords:["nails","beauty","manicure"]},{emoji:"🤳",name:"selfie",category:"people",keywords:["selfie","camera","phone"]},{emoji:"💪",name:"flexed biceps",category:"people",keywords:["muscle","strong","flex","force"]},{emoji:"🦾",name:"mechanical arm",category:"people",keywords:["robot","prosthetic","cyborg","ia"]},{emoji:"🦿",name:"mechanical leg",category:"people",keywords:["robot","prosthetic","cyborg","ia"]},{emoji:"🦵",name:"leg",category:"people",keywords:["leg","limb","kick"]},{emoji:"🦶",name:"foot",category:"people",keywords:["foot","kick","stomp"]},{emoji:"👂",name:"ear",category:"people",keywords:["ear","hear","listen"]},{emoji:"🦻",name:"ear with hearing aid",category:"people",keywords:["hearing aid","deaf","accessibility"]},{emoji:"👃",name:"nose",category:"people",keywords:["nose","smell","sniff"]},{emoji:"🧠",name:"brain",category:"people",keywords:["brain","smart","think","cerveau","réfléchir"]},{emoji:"🫀",name:"anatomical heart",category:"people",keywords:["heart","organ","love","cœur","amour"]},{emoji:"🫁",name:"lungs",category:"people",keywords:["lungs","breathe","organ"]},{emoji:"🦷",name:"tooth",category:"people",keywords:["tooth","dental","smile","sourire"]},{emoji:"🦴",name:"bone",category:"people",keywords:["bone","skeleton","dog","chien"]},{emoji:"👀",name:"eyes",category:"people",keywords:["eyes","look","see","yeux"]},{emoji:"👁️",name:"eye",category:"people",keywords:["eye","see","watch"]},{emoji:"👅",name:"tongue",category:"people",keywords:["tongue","taste","lick"]},{emoji:"👄",name:"mouth",category:"people",keywords:["mouth","lips","kiss","bisou"]},{emoji:"🫦",name:"biting lip",category:"people",keywords:["lip","bite","nervous"]},{emoji:"👶",name:"baby",category:"people",keywords:["baby","infant","child"]},{emoji:"🧒",name:"child",category:"people",keywords:["child","kid","young"]},{emoji:"👦",name:"boy",category:"people",keywords:["boy","child","male"]},{emoji:"👧",name:"girl",category:"people",keywords:["girl","child","female"]},{emoji:"🧑",name:"person",category:"people",keywords:["person","adult","human"]},{emoji:"👱",name:"person: blond hair",category:"people",keywords:["blond","hair","person"]},{emoji:"👨",name:"man",category:"people",keywords:["man","male","adult"]},{emoji:"🧔",name:"person: beard",category:"people",keywords:["beard","man","facial hair"]},{emoji:"👩",name:"woman",category:"people",keywords:["woman","female","adult"]},{emoji:"🧓",name:"older person",category:"people",keywords:["old","elderly","senior"]},{emoji:"👴",name:"old man",category:"people",keywords:["old","man","elderly"]},{emoji:"👵",name:"old woman",category:"people",keywords:["old","woman","elderly"]},{emoji:"🐶",name:"dog face",category:"animals",keywords:["dog","pet","animal","chien"]},{emoji:"🐱",name:"cat face",category:"animals",keywords:["cat","pet","animal","chat"]},{emoji:"🐭",name:"mouse face",category:"animals",keywords:["mouse","animal"]},{emoji:"🐹",name:"hamster",category:"animals",keywords:["hamster","pet"]},{emoji:"🐰",name:"rabbit face",category:"animals",keywords:["rabbit","bunny"]},{emoji:"🦊",name:"fox",category:"animals",keywords:["fox","animal"]},{emoji:"🐻",name:"bear",category:"animals",keywords:["bear","animal"]},{emoji:"🐼",name:"panda",category:"animals",keywords:["panda","bear"]},{emoji:"🐨",name:"koala",category:"animals",keywords:["koala","australia","marsupial"]},{emoji:"🐯",name:"tiger face",category:"animals",keywords:["tiger","cat","wild","chat"]},{emoji:"🦁",name:"lion",category:"animals",keywords:["lion","king","cat","chat"]},{emoji:"🐮",name:"cow face",category:"animals",keywords:["cow","moo","farm"]},{emoji:"🐷",name:"pig face",category:"animals",keywords:["pig","oink","farm"]},{emoji:"🐽",name:"pig nose",category:"animals",keywords:["pig","nose","snout"]},{emoji:"🐸",name:"frog",category:"animals",keywords:["frog","amphibian","green","vert"]},{emoji:"🐵",name:"monkey face",category:"animals",keywords:["monkey","primate","banana"]},{emoji:"🙈",name:"see-no-evil monkey",category:"animals",keywords:["monkey","see no evil","eyes","yeux"]},{emoji:"🙉",name:"hear-no-evil monkey",category:"animals",keywords:["monkey","hear no evil","ears"]},{emoji:"🙊",name:"speak-no-evil monkey",category:"animals",keywords:["monkey","speak no evil","mouth"]},{emoji:"🐒",name:"monkey",category:"animals",keywords:["monkey","primate","zoo"]},{emoji:"🦍",name:"gorilla",category:"animals",keywords:["gorilla","ape","strong","force"]},{emoji:"🦧",name:"orangutan",category:"animals",keywords:["orangutan","ape","orange"]},{emoji:"🐺",name:"wolf",category:"animals",keywords:["wolf","howl","wild"]},{emoji:"🐗",name:"boar",category:"animals",keywords:["boar","pig","wild"]},{emoji:"🐴",name:"horse face",category:"animals",keywords:["horse","neigh","ride"]},{emoji:"🐎",name:"horse",category:"animals",keywords:["horse","racing","gallop"]},{emoji:"🦄",name:"unicorn",category:"animals",keywords:["unicorn","magical","horn"]},{emoji:"🦓",name:"zebra",category:"animals",keywords:["zebra","stripes","africa"]},{emoji:"🦌",name:"deer",category:"animals",keywords:["deer","antlers","forest"]},{emoji:"🦏",name:"rhinoceros",category:"animals",keywords:["rhino","horn","africa"]},{emoji:"🦛",name:"hippopotamus",category:"animals",keywords:["hippo","water","africa"]},{emoji:"🐘",name:"elephant",category:"animals",keywords:["elephant","trunk","memory"]},{emoji:"🦒",name:"giraffe",category:"animals",keywords:["giraffe","tall","neck"]},{emoji:"🦘",name:"kangaroo",category:"animals",keywords:["kangaroo","hop","australia"]},{emoji:"🦥",name:"sloth",category:"animals",keywords:["sloth","slow","lazy"]},{emoji:"🦦",name:"otter",category:"animals",keywords:["otter","water","cute"]},{emoji:"🦨",name:"skunk",category:"animals",keywords:["skunk","smell","stripe"]},{emoji:"🦡",name:"badger",category:"animals",keywords:["badger","honey","dig"]},{emoji:"🐾",name:"paw prints",category:"animals",keywords:["paw","prints","tracks"]},{emoji:"🐔",name:"chicken",category:"animals",keywords:["chicken","rooster","farm"]},{emoji:"🐓",name:"rooster",category:"animals",keywords:["rooster","cock","morning"]},{emoji:"🐣",name:"hatching chick",category:"animals",keywords:["chick","hatching","egg"]},{emoji:"🐤",name:"baby chick",category:"animals",keywords:["chick","baby","yellow","jaune"]},{emoji:"🐥",name:"front-facing baby chick",category:"animals",keywords:["chick","baby","cute"]},{emoji:"🦆",name:"duck",category:"animals",keywords:["duck","quack","water"]},{emoji:"🦅",name:"eagle",category:"animals",keywords:["eagle","bird","freedom"]},{emoji:"🦉",name:"owl",category:"animals",keywords:["owl","wise","night"]},{emoji:"🦇",name:"bat",category:"animals",keywords:["bat","vampire","night"]},{emoji:"",name:"bug",category:"animals",keywords:["bug","insect","crawl"]},{emoji:"🦋",name:"butterfly",category:"animals",keywords:["butterfly","beautiful","fly"]},{emoji:"🐌",name:"snail",category:"animals",keywords:["snail","slow","shell"]},{emoji:"🐞",name:"lady beetle",category:"animals",keywords:["ladybug","beetle","red","rouge"]},{emoji:"🐜",name:"ant",category:"animals",keywords:["ant","work","colony"]},{emoji:"🦟",name:"mosquito",category:"animals",keywords:["mosquito","bite","buzz"]},{emoji:"🕷️",name:"spider",category:"animals",keywords:["spider","web","eight legs"]},{emoji:"🦂",name:"scorpion",category:"animals",keywords:["scorpion","sting","desert"]},{emoji:"🐢",name:"turtle",category:"animals",keywords:["turtle","slow","shell"]},{emoji:"🐍",name:"snake",category:"animals",keywords:["snake","slither","reptile"]},{emoji:"🦎",name:"lizard",category:"animals",keywords:["lizard","gecko","reptile"]},{emoji:"🐙",name:"octopus",category:"animals",keywords:["octopus","tentacles","sea"]},{emoji:"🦑",name:"squid",category:"animals",keywords:["squid","tentacles","ocean"]},{emoji:"🦐",name:"shrimp",category:"animals",keywords:["shrimp","seafood","small"]},{emoji:"🦞",name:"lobster",category:"animals",keywords:["lobster","claws","red","rouge"]},{emoji:"🦀",name:"crab",category:"animals",keywords:["crab","claws","beach"]},{emoji:"🐡",name:"blowfish",category:"animals",keywords:["blowfish","puffer","spiky"]},{emoji:"🐠",name:"tropical fish",category:"animals",keywords:["fish","tropical","colorful"]},{emoji:"🐟",name:"fish",category:"animals",keywords:["fish","swim","water"]},{emoji:"🐬",name:"dolphin",category:"animals",keywords:["dolphin","smart","ocean"]},{emoji:"🐳",name:"spouting whale",category:"animals",keywords:["whale","spout","big"]},{emoji:"🐋",name:"whale",category:"animals",keywords:["whale","ocean","huge"]},{emoji:"🦈",name:"shark",category:"animals",keywords:["shark","teeth","dangerous"]},{emoji:"🐊",name:"crocodile",category:"animals",keywords:["crocodile","teeth","swamp"]},{emoji:"🌸",name:"cherry blossom",category:"animals",keywords:["flower","spring","pink","rose"]},{emoji:"💐",name:"bouquet",category:"animals",keywords:["flowers","bouquet","gift","cadeau"]},{emoji:"🌺",name:"hibiscus",category:"animals",keywords:["flower","tropical","red","rouge"]},{emoji:"🌻",name:"sunflower",category:"animals",keywords:["sunflower","yellow","big","jaune"]},{emoji:"🌹",name:"rose",category:"animals",keywords:["rose","love","red","amour","rouge"]},{emoji:"🥀",name:"wilted flower",category:"animals",keywords:["flower","wilted","sad","triste"]},{emoji:"🌷",name:"tulip",category:"animals",keywords:["tulip","spring","netherlands"]},{emoji:"🌼",name:"daisy",category:"animals",keywords:["daisy","white","simple","blanc"]},{emoji:"🌱",name:"seedling",category:"animals",keywords:["plant","grow","green","plante","vert"]},{emoji:"🌿",name:"herb",category:"animals",keywords:["herb","green","leaf","vert"]},{emoji:"🍀",name:"four leaf clover",category:"animals",keywords:["clover","luck","green","vert"]},{emoji:"🌳",name:"deciduous tree",category:"animals",keywords:["tree","nature","green","vert"]},{emoji:"🌲",name:"evergreen tree",category:"animals",keywords:["tree","pine","christmas"]},{emoji:"🌴",name:"palm tree",category:"animals",keywords:["palm","tropical","beach"]},{emoji:"🌵",name:"cactus",category:"animals",keywords:["cactus","desert","spiky"]},{emoji:"🍎",name:"red apple",category:"food",keywords:["apple","fruit"]},{emoji:"🍊",name:"tangerine",category:"food",keywords:["orange","fruit"]},{emoji:"🍋",name:"lemon",category:"food",keywords:["lemon","fruit"]},{emoji:"🍌",name:"banana",category:"food",keywords:["banana","fruit"]},{emoji:"🍉",name:"watermelon",category:"food",keywords:["watermelon","fruit"]},{emoji:"🍇",name:"grapes",category:"food",keywords:["grapes","fruit"]},{emoji:"🍓",name:"strawberry",category:"food",keywords:["strawberry","fruit"]},{emoji:"🫐",name:"blueberries",category:"food",keywords:["blueberry","fruit"]},{emoji:"🥝",name:"kiwi fruit",category:"food",keywords:["kiwi","fruit","green","vert"]},{emoji:"🍅",name:"tomato",category:"food",keywords:["tomato","red","vegetable","rouge"]},{emoji:"🫒",name:"olive",category:"food",keywords:["olive","green","oil","vert"]},{emoji:"🥥",name:"coconut",category:"food",keywords:["coconut","tropical","milk"]},{emoji:"🥑",name:"avocado",category:"food",keywords:["avocado","green","healthy","vert"]},{emoji:"🍆",name:"eggplant",category:"food",keywords:["eggplant","purple","vegetable","violet"]},{emoji:"🥔",name:"potato",category:"food",keywords:["potato","vegetable","starch"]},{emoji:"🥕",name:"carrot",category:"food",keywords:["carrot","orange","vegetable"]},{emoji:"🌽",name:"ear of corn",category:"food",keywords:["corn","yellow","vegetable","jaune"]},{emoji:"🌶️",name:"hot pepper",category:"food",keywords:["pepper","hot","spicy"]},{emoji:"🫑",name:"bell pepper",category:"food",keywords:["pepper","bell","vegetable","cloche"]},{emoji:"🥒",name:"cucumber",category:"food",keywords:["cucumber","green","vegetable","vert"]},{emoji:"🥬",name:"leafy greens",category:"food",keywords:["lettuce","greens","salad"]},{emoji:"🥦",name:"broccoli",category:"food",keywords:["broccoli","green","vegetable","vert"]},{emoji:"🧄",name:"garlic",category:"food",keywords:["garlic","flavor","cooking"]},{emoji:"🧅",name:"onion",category:"food",keywords:["onion","cry","cooking","pleurer"]},{emoji:"🍄",name:"mushroom",category:"food",keywords:["mushroom","fungi","cooking"]},{emoji:"🥜",name:"peanuts",category:"food",keywords:["peanuts","nuts","snack"]},{emoji:"🌰",name:"chestnut",category:"food",keywords:["chestnut","nut","autumn"]},{emoji:"🍞",name:"bread",category:"food",keywords:["bread","loaf","carbs"]},{emoji:"🥐",name:"croissant",category:"food",keywords:["croissant","french","pastry"]},{emoji:"🥖",name:"baguette bread",category:"food",keywords:["baguette","french","bread"]},{emoji:"🫓",name:"flatbread",category:"food",keywords:["flatbread","bread","thin"]},{emoji:"🥨",name:"pretzel",category:"food",keywords:["pretzel","twisted","snack"]},{emoji:"🥯",name:"bagel",category:"food",keywords:["bagel","round","breakfast"]},{emoji:"🥞",name:"pancakes",category:"food",keywords:["pancakes","breakfast","syrup"]},{emoji:"🧇",name:"waffle",category:"food",keywords:["waffle","breakfast","squares"]},{emoji:"🧀",name:"cheese wedge",category:"food",keywords:["cheese","dairy","yellow","jaune"]},{emoji:"🍖",name:"meat on bone",category:"food",keywords:["meat","bone","protein"]},{emoji:"🍗",name:"poultry leg",category:"food",keywords:["chicken","leg","meat"]},{emoji:"🥩",name:"cut of meat",category:"food",keywords:["steak","meat","red","rouge"]},{emoji:"🥓",name:"bacon",category:"food",keywords:["bacon","pork","breakfast"]},{emoji:"🍔",name:"hamburger",category:"food",keywords:["burger","hamburger","fast food","nourriture"]},{emoji:"🍟",name:"french fries",category:"food",keywords:["fries","potato","fast food","nourriture"]},{emoji:"🍕",name:"pizza",category:"food",keywords:["pizza","slice","italian"]},{emoji:"🌭",name:"hot dog",category:"food",keywords:["hot dog","sausage","fast food","chien","nourriture"]},{emoji:"🥪",name:"sandwich",category:"food",keywords:["sandwich","bread","lunch"]},{emoji:"🌮",name:"taco",category:"food",keywords:["taco","mexican","shell"]},{emoji:"🌯",name:"burrito",category:"food",keywords:["burrito","wrap","mexican"]},{emoji:"🫔",name:"tamale",category:"food",keywords:["tamale","mexican","corn"]},{emoji:"🥙",name:"stuffed flatbread",category:"food",keywords:["pita","flatbread","stuffed"]},{emoji:"🧆",name:"falafel",category:"food",keywords:["falafel","middle eastern","chickpea"]},{emoji:"🥚",name:"egg",category:"food",keywords:["egg","protein","breakfast"]},{emoji:"🍳",name:"cooking",category:"food",keywords:["cooking","frying pan","egg"]},{emoji:"🥘",name:"shallow pan of food",category:"food",keywords:["paella","pan","cooking"]},{emoji:"🍲",name:"pot of food",category:"food",keywords:["stew","pot","cooking"]},{emoji:"🫕",name:"fondue",category:"food",keywords:["fondue","cheese","pot"]},{emoji:"🥣",name:"bowl with spoon",category:"food",keywords:["bowl","cereal","soup"]},{emoji:"🥗",name:"green salad",category:"food",keywords:["salad","healthy","greens"]},{emoji:"🍿",name:"popcorn",category:"food",keywords:["popcorn","movie","snack"]},{emoji:"🧈",name:"butter",category:"food",keywords:["butter","dairy","spread"]},{emoji:"🧂",name:"salt",category:"food",keywords:["salt","seasoning","white","blanc"]},{emoji:"🥫",name:"canned food",category:"food",keywords:["can","canned","preserved"]},{emoji:"🍱",name:"bento box",category:"food",keywords:["bento","japanese","lunch box"]},{emoji:"🍘",name:"rice cracker",category:"food",keywords:["rice","cracker","japanese"]},{emoji:"🍙",name:"rice ball",category:"food",keywords:["rice ball","onigiri","japanese"]},{emoji:"🍚",name:"cooked rice",category:"food",keywords:["rice","cooked","bowl"]},{emoji:"🍛",name:"curry rice",category:"food",keywords:["curry","rice","spicy"]},{emoji:"🍜",name:"steaming bowl",category:"food",keywords:["ramen","noodles","soup"]},{emoji:"🍝",name:"spaghetti",category:"food",keywords:["spaghetti","pasta","italian"]},{emoji:"🍠",name:"roasted sweet potato",category:"food",keywords:["sweet potato","roasted","orange"]},{emoji:"🍢",name:"oden",category:"food",keywords:["oden","japanese","skewer"]},{emoji:"🍣",name:"sushi",category:"food",keywords:["sushi","japanese","fish"]},{emoji:"🍤",name:"fried shrimp",category:"food",keywords:["shrimp","fried","tempura"]},{emoji:"🍥",name:"fish cake with swirl",category:"food",keywords:["fish cake","japanese","swirl"]},{emoji:"🥮",name:"moon cake",category:"food",keywords:["moon cake","chinese","festival","lune"]},{emoji:"🍡",name:"dango",category:"food",keywords:["dango","japanese","sweet"]},{emoji:"🥟",name:"dumpling",category:"food",keywords:["dumpling","chinese","steamed"]},{emoji:"🥠",name:"fortune cookie",category:"food",keywords:["fortune cookie","chinese","luck"]},{emoji:"🥡",name:"takeout box",category:"food",keywords:["takeout","chinese","box"]},{emoji:"🦀",name:"crab",category:"food",keywords:["crab","seafood","claws"]},{emoji:"🦞",name:"lobster",category:"food",keywords:["lobster","seafood","red","rouge"]},{emoji:"🦐",name:"shrimp",category:"food",keywords:["shrimp","seafood","small"]},{emoji:"🦑",name:"squid",category:"food",keywords:["squid","seafood","tentacles"]},{emoji:"🦪",name:"oyster",category:"food",keywords:["oyster","seafood","shell"]},{emoji:"🍦",name:"soft ice cream",category:"food",keywords:["ice cream","soft serve","cone"]},{emoji:"🍧",name:"shaved ice",category:"food",keywords:["shaved ice","snow cone","cold"]},{emoji:"🍨",name:"ice cream",category:"food",keywords:["ice cream","dessert","cold"]},{emoji:"🍩",name:"doughnut",category:"food",keywords:["donut","doughnut","sweet"]},{emoji:"🍪",name:"cookie",category:"food",keywords:["cookie","sweet","baked"]},{emoji:"🎂",name:"birthday cake",category:"food",keywords:["cake","birthday","celebration","fête"]},{emoji:"🍰",name:"shortcake",category:"food",keywords:["cake","slice","dessert"]},{emoji:"🧁",name:"cupcake",category:"food",keywords:["cupcake","muffin","sweet"]},{emoji:"🥧",name:"pie",category:"food",keywords:["pie","dessert","slice"]},{emoji:"🍫",name:"chocolate bar",category:"food",keywords:["chocolate","bar","sweet"]},{emoji:"🍬",name:"candy",category:"food",keywords:["candy","sweet","wrapper"]},{emoji:"🍭",name:"lollipop",category:"food",keywords:["lollipop","candy","stick"]},{emoji:"🍮",name:"custard",category:"food",keywords:["custard","pudding","dessert"]},{emoji:"🍯",name:"honey pot",category:"food",keywords:["honey","sweet","bee"]},{emoji:"🍼",name:"baby bottle",category:"food",keywords:["bottle","baby","milk"]},{emoji:"🥛",name:"glass of milk",category:"food",keywords:["milk","glass","dairy"]},{emoji:"☕",name:"hot beverage",category:"food",keywords:["coffee","tea","hot","café"]},{emoji:"🫖",name:"teapot",category:"food",keywords:["teapot","tea","hot"]},{emoji:"🍵",name:"teacup without handle",category:"food",keywords:["tea","green tea","cup","vert"]},{emoji:"🍶",name:"sake",category:"food",keywords:["sake","japanese","alcohol"]},{emoji:"🍾",name:"bottle with popping cork",category:"food",keywords:["champagne","celebration","cork","fête"]},{emoji:"🍷",name:"wine glass",category:"food",keywords:["wine","glass","alcohol"]},{emoji:"🍸",name:"cocktail glass",category:"food",keywords:["cocktail","martini","alcohol"]},{emoji:"🍹",name:"tropical drink",category:"food",keywords:["tropical","cocktail","umbrella"]},{emoji:"🍺",name:"beer mug",category:"food",keywords:["beer","mug","alcohol"]},{emoji:"🍻",name:"clinking beer mugs",category:"food",keywords:["beer","cheers","celebration","fête"]},{emoji:"🥂",name:"clinking glasses",category:"food",keywords:["champagne","cheers","celebration","fête"]},{emoji:"🥃",name:"tumbler glass",category:"food",keywords:["whiskey","tumbler","alcohol"]},{emoji:"🫗",name:"pouring liquid",category:"food",keywords:["pour","liquid","drink","boisson"]},{emoji:"🥤",name:"cup with straw",category:"food",keywords:["soda","straw","drink","boisson"]},{emoji:"🧋",name:"bubble tea",category:"food",keywords:["bubble tea","boba","drink","boisson"]},{emoji:"🧃",name:"beverage box",category:"food",keywords:["juice box","drink","straw","boisson"]},{emoji:"🧉",name:"mate",category:"food",keywords:["mate","tea","south american"]},{emoji:"🧊",name:"ice",category:"food",keywords:["ice","cold","cube"]},{emoji:"⚽",name:"soccer ball",category:"activities",keywords:["soccer","football","sport"]},{emoji:"🏀",name:"basketball",category:"activities",keywords:["basketball","sport"]},{emoji:"🏈",name:"american football",category:"activities",keywords:["football","sport"]},{emoji:"⚾",name:"baseball",category:"activities",keywords:["baseball","sport"]},{emoji:"🥎",name:"softball",category:"activities",keywords:["softball","sport"]},{emoji:"🎾",name:"tennis",category:"activities",keywords:["tennis","sport"]},{emoji:"🚗",name:"automobile",category:"travel",keywords:["car","vehicle"]},{emoji:"🚕",name:"taxi",category:"travel",keywords:["taxi","car"]},{emoji:"🚙",name:"sport utility vehicle",category:"travel",keywords:["suv","car"]},{emoji:"🚌",name:"bus",category:"travel",keywords:["bus","vehicle"]},{emoji:"🚎",name:"trolleybus",category:"travel",keywords:["trolley","bus"]},{emoji:"🏎️",name:"racing car",category:"travel",keywords:["race","car","fast"]},{emoji:"💡",name:"light bulb",category:"objects",keywords:["idea","light","bulb","lumière"]},{emoji:"🔋",name:"battery",category:"objects",keywords:["battery","power"]},{emoji:"🖥️",name:"desktop computer",category:"objects",keywords:["computer","desktop","ordinateur"]},{emoji:"💻",name:"laptop",category:"objects",keywords:["laptop","computer","ordinateur"]},{emoji:"📱",name:"mobile phone",category:"objects",keywords:["phone","mobile"]},{emoji:"☎️",name:"telephone",category:"objects",keywords:["phone","telephone"]},{emoji:"❤️",name:"red heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"🧡",name:"orange heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"💛",name:"yellow heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"💚",name:"green heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"💙",name:"blue heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"💜",name:"purple heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"🖤",name:"black heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"🤍",name:"white heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"🏁",name:"chequered flag",category:"flags",keywords:["flag","race","finish","drapeau"]},{emoji:"🚩",name:"triangular flag",category:"flags",keywords:["flag","warning","drapeau","attention"]},{emoji:"🏳️",name:"white flag",category:"flags",keywords:["flag","surrender","drapeau"]},{emoji:"🏴",name:"black flag",category:"flags",keywords:["flag","pirate","drapeau"]},{emoji:"🏳️‍🌈",name:"rainbow flag",category:"flags",keywords:["flag","rainbow","pride","drapeau","arc-en-ciel"]},{emoji:"🔥",name:"fire",category:"symbols",keywords:["fire","feu"]},{emoji:"✨",name:"sparkles",category:"symbols",keywords:["sparkle","étoile"]},{emoji:"⭐",name:"white medium star",category:"travel",keywords:["star","étoile"]},{emoji:"🎯",name:"direct hit",category:"symbols",keywords:["target","cible","objectif"]},{emoji:"🚀",name:"rocket",category:"symbols",keywords:["rocket","fusée","lancement"]},{emoji:"✅",name:"white heavy check mark",category:"symbols",keywords:["check","done","terminé"]},{emoji:"❌",name:"cross mark",category:"symbols",keywords:["cross","erreur"]},{emoji:"⚠️",name:"warning sign",category:"symbols",keywords:["warning","attention"]},{emoji:"📌",name:"pushpin",category:"objects",keywords:["pin","épingle"]},{emoji:"📝",name:"memo",category:"objects",keywords:["note","texte","écrire"]},{emoji:"📁",name:"file folder",category:"objects",keywords:["folder","dossier"]},{emoji:"📅",name:"calendar",category:"objects",keywords:["calendar","calendrier"]},{emoji:"📊",name:"bar chart",category:"objects",keywords:["chart","graphique"]},{emoji:"🔗",name:"link symbol",category:"objects",keywords:["link","lien"]},{emoji:"🔒",name:"lock",category:"objects",keywords:["lock","verrou"]},{emoji:"💬",name:"speech balloon",category:"activities",keywords:["chat","discussion"]},{emoji:"🤖",name:"robot face",category:"smileys",keywords:["robot","ai","ia"]},{emoji:"🌍",name:"earth globe europe-africa",category:"travel",keywords:["world","monde"]},{emoji:"🎉",name:"party popper",category:"activities",keywords:["party","fête"]},{emoji:"🏆",name:"trophy",category:"activities",keywords:["trophy","trophée","victoire"]},{emoji:"🫠",name:"melting face",category:"smileys",keywords:["melting","face","visage"]},{emoji:"😕",name:"confused face",category:"smileys",keywords:["confused","face","confus","visage"]},{emoji:"🫤",name:"face with diagonal mouth",category:"smileys",keywords:["face","with","diagonal","mouth","visage"]},{emoji:"😟",name:"worried face",category:"smileys",keywords:["worried","face","inquiet","visage"]},{emoji:"🙁",name:"slightly frowning face",category:"smileys",keywords:["slightly","frowning","face","visage"]},{emoji:"☹️",name:"white frowning face",category:"smileys",keywords:["white","frowning","face","blanc","visage"]},{emoji:"😮",name:"face with open mouth",category:"smileys",keywords:["face","with","open","mouth","visage"]},{emoji:"😯",name:"hushed face",category:"smileys",keywords:["hushed","face","visage"]},{emoji:"😲",name:"astonished face",category:"smileys",keywords:["astonished","face","visage"]},{emoji:"😳",name:"flushed face",category:"smileys",keywords:["flushed","face","visage"]},{emoji:"🥺",name:"face with pleading eyes",category:"smileys",keywords:["face","with","pleading","eyes","visage","supplier","yeux"]},{emoji:"🥹",name:"face holding back tears",category:"smileys",keywords:["face","holding","back","tears","visage"]},{emoji:"😦",name:"frowning face with open mouth",category:"smileys",keywords:["frowning","face","with","open","mouth","visage"]},{emoji:"😧",name:"anguished face",category:"smileys",keywords:["anguished","face","visage"]},{emoji:"😨",name:"fearful face",category:"smileys",keywords:["fearful","face","effrayé","visage"]},{emoji:"😰",name:"face with open mouth and cold sweat",category:"smileys",keywords:["face","with","open","mouth","and","cold","sweat","visage"]},{emoji:"😥",name:"disappointed but relieved face",category:"smileys",keywords:["disappointed","but","relieved","face","visage"]},{emoji:"😢",name:"crying face",category:"smileys",keywords:["crying","face","visage"]},{emoji:"😭",name:"loudly crying face",category:"smileys",keywords:["loudly","crying","face","visage"]},{emoji:"😱",name:"face screaming in fear",category:"smileys",keywords:["face","screaming","in","fear","visage"]},{emoji:"😖",name:"confounded face",category:"smileys",keywords:["confounded","face","visage"]},{emoji:"😣",name:"persevering face",category:"smileys",keywords:["persevering","face","visage"]},{emoji:"😞",name:"disappointed face",category:"smileys",keywords:["disappointed","face","visage"]},{emoji:"😓",name:"face with cold sweat",category:"smileys",keywords:["face","with","cold","sweat","visage"]},{emoji:"😩",name:"weary face",category:"smileys",keywords:["weary","face","fatigué","visage"]},{emoji:"😫",name:"tired face",category:"smileys",keywords:["tired","face","fatigué","visage"]},{emoji:"🥱",name:"yawning face",category:"smileys",keywords:["yawning","face","visage"]},{emoji:"😤",name:"face with look of triumph",category:"smileys",keywords:["face","with","look","of","triumph","visage"]},{emoji:"😡",name:"pouting face",category:"smileys",keywords:["pouting","face","visage"]},{emoji:"😠",name:"angry face",category:"smileys",keywords:["angry","face","colère","visage"]},{emoji:"🤬",name:"serious face with symbols covering mouth",category:"smileys",keywords:["serious","face","with","symbols","covering","mouth","visage"]},{emoji:"😈",name:"smiling face with horns",category:"smileys",keywords:["smiling","face","with","horns","visage"]},{emoji:"👿",name:"imp",category:"smileys",keywords:["imp"]},{emoji:"💀",name:"skull",category:"smileys",keywords:["skull","crâne"]},{emoji:"☠️",name:"skull and crossbones",category:"smileys",keywords:["skull","and","crossbones","crâne"]},{emoji:"💩",name:"pile of poo",category:"smileys",keywords:["pile","of","poo"]},{emoji:"🤡",name:"clown face",category:"smileys",keywords:["clown","face","visage"]},{emoji:"👻",name:"ghost",category:"smileys",keywords:["ghost","fantôme"]},{emoji:"👽",name:"extraterrestrial alien",category:"symbols",keywords:["extraterrestrial","alien"]},{emoji:"👾",name:"alien monster",category:"symbols",keywords:["alien","monster"]},{emoji:"😺",name:"smiling cat face with open mouth",category:"smileys",keywords:["smiling","cat","face","with","open","mouth","chat","visage"]},{emoji:"😸",name:"grinning cat face with smiling eyes",category:"smileys",keywords:["grinning","cat","face","with","smiling","eyes","chat","visage","yeux"]},{emoji:"😹",name:"cat face with tears of joy",category:"smileys",keywords:["cat","face","with","tears","of","joy","chat","visage","joie"]},{emoji:"😻",name:"smiling cat face with heart-shaped eyes",category:"smileys",keywords:["smiling","cat","face","with","heart-shaped","eyes","chat","visage","yeux"]},{emoji:"😼",name:"cat face with wry smile",category:"smileys",keywords:["cat","face","with","wry","smile","chat","visage","sourire"]},{emoji:"😽",name:"kissing cat face with closed eyes",category:"smileys",keywords:["kissing","cat","face","with","closed","eyes","chat","visage","yeux"]},{emoji:"🙀",name:"weary cat face",category:"smileys",keywords:["weary","cat","face","fatigué","chat","visage"]},{emoji:"😿",name:"crying cat face",category:"smileys",keywords:["crying","cat","face","chat","visage"]},{emoji:"😾",name:"pouting cat face",category:"smileys",keywords:["pouting","cat","face","chat","visage"]},{emoji:"💋",name:"kiss mark",category:"symbols",keywords:["kiss","mark","bisou"]},{emoji:"💌",name:"love letter",category:"symbols",keywords:["love","letter","amour"]},{emoji:"💘",name:"heart with arrow",category:"smileys",keywords:["heart","with","arrow","cœur"]},{emoji:"💝",name:"heart with ribbon",category:"smileys",keywords:["heart","with","ribbon","cœur"]},{emoji:"💖",name:"sparkling heart",category:"smileys",keywords:["sparkling","heart","cœur"]},{emoji:"💗",name:"growing heart",category:"smileys",keywords:["growing","heart","cœur"]},{emoji:"💓",name:"beating heart",category:"smileys",keywords:["beating","heart","cœur"]},{emoji:"💞",name:"revolving hearts",category:"smileys",keywords:["revolving","hearts"]},{emoji:"💕",name:"two hearts",category:"smileys",keywords:["two","hearts"]},{emoji:"💟",name:"heart decoration",category:"smileys",keywords:["heart","decoration","cœur"]},{emoji:"❣️",name:"heavy heart exclamation mark ornament",category:"smileys",keywords:["heavy","heart","exclamation","mark","ornament","cœur"]},{emoji:"💔",name:"broken heart",category:"smileys",keywords:["broken","heart","cœur"]},{emoji:"❤️‍🔥",name:"heavy black heart fire",category:"smileys",keywords:["heavy","black","heart","fire","noir","cœur","feu"]},{emoji:"❤️‍🩹",name:"heavy black heart adhesive bandage",category:"smileys",keywords:["heavy","black","heart","adhesive","bandage","noir","cœur"]},{emoji:"🩷",name:"pink heart",category:"smileys",keywords:["pink","heart","rose","cœur"]},{emoji:"🩵",name:"light blue heart",category:"smileys",keywords:["light","blue","heart","lumière","bleu","cœur"]},{emoji:"🤎",name:"brown heart",category:"smileys",keywords:["brown","heart","marron","cœur"]},{emoji:"🩶",name:"grey heart",category:"smileys",keywords:["grey","heart","gris","cœur"]},{emoji:"💯",name:"hundred points symbol",category:"symbols",keywords:["hundred","points","symbol"]},{emoji:"💢",name:"anger symbol",category:"symbols",keywords:["anger","symbol"]},{emoji:"💥",name:"collision symbol",category:"symbols",keywords:["collision","symbol"]},{emoji:"💫",name:"dizzy symbol",category:"symbols",keywords:["dizzy","symbol"]},{emoji:"💦",name:"splashing sweat symbol",category:"symbols",keywords:["splashing","sweat","symbol"]},{emoji:"💨",name:"dash symbol",category:"symbols",keywords:["dash","symbol"]},{emoji:"💭",name:"thought balloon",category:"activities",keywords:["thought","balloon","ballon"]},{emoji:"💤",name:"sleeping symbol",category:"symbols",keywords:["sleeping","symbol","dormir"]},{emoji:"🫶",name:"heart hands",category:"smileys",keywords:["heart","hands","cœur"]},{emoji:"🫰",name:"hand with index finger and thumb crossed",category:"people",keywords:["hand","with","index","finger","and","thumb","crossed","main","pouce"]},{emoji:"🎊",name:"confetti ball",category:"activities",keywords:["confetti","ball"]},{emoji:"🎈",name:"balloon",category:"activities",keywords:["balloon","ballon"]},{emoji:"🎁",name:"wrapped present",category:"symbols",keywords:["wrapped","present"]},{emoji:"🥇",name:"first place medal",category:"activities",keywords:["first","place","medal"]},{emoji:"🌟",name:"glowing star",category:"travel",keywords:["glowing","star","étoile"]},{emoji:"⚡",name:"high voltage sign",category:"symbols",keywords:["high","voltage","sign"]},{emoji:"🌈",name:"rainbow",category:"travel",keywords:["rainbow","arc-en-ciel"]},{emoji:"☀️",name:"black sun with rays",category:"travel",keywords:["black","sun","with","rays","noir","soleil"]},{emoji:"🌙",name:"crescent moon",category:"travel",keywords:["crescent","moon","lune"]},{emoji:"🎵",name:"musical note",category:"symbols",keywords:["musical","note","musique"]},{emoji:"🎶",name:"multiple musical notes",category:"symbols",keywords:["multiple","musical","notes","musique"]},{emoji:"🎨",name:"artist palette",category:"activities",keywords:["artist","palette"]},{emoji:"🎮",name:"video game",category:"activities",keywords:["video","game"]},{emoji:"📚",name:"books",category:"objects",keywords:["books","livres"]},{emoji:"🔑",name:"key",category:"objects",keywords:["key","clé"]},{emoji:"❓",name:"black question mark ornament",category:"symbols",keywords:["black","question","mark","ornament","noir"]},{emoji:"❗",name:"heavy exclamation mark symbol",category:"symbols",keywords:["heavy","exclamation","mark","symbol"]},{emoji:"🔔",name:"bell",category:"objects",keywords:["bell","cloche"]},{emoji:"♻️",name:"black universal recycling symbol",category:"symbols",keywords:["black","universal","recycling","symbol","noir"]},{emoji:"💎",name:"gem stone",category:"symbols",keywords:["gem","stone"]}],ii=Array.from(Hf.reduce((e,o)=>{const t=e.get(o.emoji);return e.set(o.emoji,{...o,keywords:Array.from(new Set([...(t==null?void 0:t.keywords)||[],...o.keywords]))}),e},new Map).values()),ci=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],si=e=>e.toLowerCase().replace(/œ/g,"oe").replace(/æ/g,"ae").normalize("NFD").replace(/[\u0300-\u036f]/g,""),Vf=e=>e&&typeof e.emoji=="string"&&typeof e.name=="string"&&ci.includes(e.category)&&Array.isArray(e.keywords)&&e.keywords.every(o=>typeof o=="string"),di=e=>{const{value:o,defaultValue:t="",onChange:n,onEmojiSelect:a,isOpen:l,onOpen:i,onClose:g,closeOnSelect:s=!0,maxRecentEmojis:d=16,mode:f="picker",showRecentEmojis:u=f!=="reaction",enabledCategories:m=ci,customEmojis:p=[],isDisabled:y,isReadOnly:x}=e,[b,C]=h.useState(!1),k=l??b,[S,T]=h.useState(t),w=o??S,[F,v]=h.useState(""),[z,j]=h.useState(m.find($=>$!=="recent")||"recent"),[H,E]=h.useState([]),[M,I]=h.useState(f!=="reaction"),W=h.useRef(null),D=h.useRef(null),V={...ai,...e.labels},P=h.useMemo(()=>Array.from(new Map([...ii,...p].map($=>[$.emoji,$])).values()),[p]),_=h.useMemo(()=>(e.quickEmojis??li).map($=>P.find(O=>O.emoji===$)??{emoji:$,name:$,category:"symbols",keywords:[]}),[P,e.quickEmojis]),q=h.useMemo(()=>{const $=P.filter(O=>m.includes(O.category));if(F.trim()){const O=si(F.trim());return $.filter(B=>si(`${B.emoji} ${B.name} ${B.keywords.join(" ")}`).includes(O))}return z==="recent"?H.filter(O=>m.includes(O.category)):$.filter(O=>O.category===z)},[P,z,H,F,m]);h.useEffect(()=>{if(!(!u||typeof localStorage>"u"))try{const $=JSON.parse(localStorage.getItem("emojiPicker-recentEmojis")||"[]");Array.isArray($)&&E($.filter(Vf).slice(0,d))}catch{}},[u,d]),h.useEffect(()=>{m.includes(z)||j(m.find($=>$!=="recent")||"recent")},[m,z]);const N=h.useCallback(()=>{C(!1),g==null||g()},[g]),G=h.useCallback(()=>{if(!(y||x)){if(k){N();return}C(!0),v(""),I(f!=="reaction"),j(u&&H.length&&m.includes("recent")?"recent":m.find($=>$!=="recent")||"recent"),i==null||i()}},[k,y,x,N,f,u,H.length,m,i]),X=h.useCallback($=>{if(!(y||x)){if(T($.emoji),u){const O=[$,...H.filter(B=>B.emoji!==$.emoji)].slice(0,Math.max(0,d));if(E(O),typeof localStorage<"u")try{localStorage.setItem("emojiPicker-recentEmojis",JSON.stringify(O))}catch{}}n==null||n($.emoji),a==null||a($),s&&N()}},[y,x,u,H,d,n,a,s,N]);return h.useEffect(()=>{if(!k||typeof document>"u"||typeof document.addEventListener!="function")return;const $=O=>{var B,L;(B=D.current)!=null&&B.contains&&((L=W.current)!=null&&L.contains)&&!D.current.contains(O.target)&&!W.current.contains(O.target)&&N()};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[k,N]),{isOpen:k,selectedEmoji:w,recentEmojis:H,searchQuery:F,activeCategory:z,filteredEmojis:q,handleToggle:G,handleEmojiSelect:X,handleSearchChange:v,handleCategoryChange:$=>{j($),v("")},handleClose:N,triggerRef:W,dropdownRef:D,expanded:M,setExpanded:I,quickEmojiData:_,text:V}},Co={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"320px",maxHeight:"400px",overflow:"hidden"},categoryTabs:{display:"flex",flexDirection:"row",flexWrap:"wrap",borderBottom:"1px solid color-gray-100",marginBottom:"12px",overflowX:"auto"},categoryTab:{padding:"8px 12px",cursor:"pointer",borderBottom:"2px solid transparent",transition:"all 0.2s ease-in-out",fontSize:"14px",fontWeight:"500",color:"color-gray-600",whiteSpace:"nowrap",borderRadius:"8px 8px 0 0"},emojiGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"4px",maxHeight:"240px",overflowY:"auto",padding:"4px",color:"color-black"},emoji:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:6,fontSize:"20px",transition:"all 0.2s ease-in-out"}},Pf={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},Df={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},$f={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Lf={recent:"🕒",smileys:"😀",people:"👤",animals:"🐶",food:"🍎",activities:"⚽",travel:"🚗",objects:"💡",symbols:"❤️",flags:"🏁"},gi=({id:e,name:o,label:t,placeholder:n,helperText:a,views:l={},size:i="md",shape:g="default",variant:s="default",error:d=!1,isDisabled:f=!1,isReadOnly:u=!1,showSearch:m=!0,showCategories:p=!0,showRecentEmojis:y=!0,enabledCategories:x=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],isOpen:b,selectedEmoji:C,recentEmojis:k,searchQuery:S,activeCategory:T,filteredEmojis:w,handleToggle:F,handleEmojiSelect:v,handleSearchChange:z,handleCategoryChange:j,handleClose:H,triggerRef:E,dropdownRef:M,mode:I="picker",trigger:W,quickEmojis:D,selectedEmojis:V=[],expanded:P,setExpanded:_,quickEmojiData:q,text:N,labels:G,onChange:X,onOpen:$,onClose:O,onEmojiSelect:B,customEmojis:L,closeOnSelect:U,maxRecentEmojis:K,value:J,defaultValue:ne,...re})=>{const ce=h.useId(),Q=`${e||ce}-panel`,le=h.useRef(!1),he=h.useCallback(oe=>{var fe;M.current=oe,(fe=oe==null?void 0:oe.querySelector("input,button"))==null||fe.focus({preventScroll:!0})},[M]),[ue,Ce]=h.useState({top:0,left:0,width:320,maxHeight:400}),de=x.filter(oe=>oe!=="recent"||y&&k.length>0);h.useLayoutEffect(()=>{var fe,Z,te,Y,R;if(!b){le.current&&(document.activeElement===document.body||(fe=M.current)!=null&&fe.contains(document.activeElement))&&((Z=E.current)==null||Z.focus({preventScroll:!0})),le.current=!1;return}const oe=()=>{var Tt;const ae=(Tt=E.current)==null?void 0:Tt.getBoundingClientRect();if(!ae)return;const se=window.visualViewport,me=Math.min(320,((se==null?void 0:se.width)??window.innerWidth)-16),ke=(se==null?void 0:se.offsetLeft)??0,pe=(se==null?void 0:se.offsetTop)??0,xe=pe+((se==null?void 0:se.height)??window.innerHeight)-8;if(ae.bottom<pe||ae.top>xe){H();return}const Ae=P?400:64,Ye=ae.top-pe-16,rr=xe-ae.bottom-8,vt=rr<Ae&&Ye>rr,mo=Math.min(Ae,Math.max(64,vt?Ye:rr));Ce({width:me,maxHeight:mo,left:Math.max(ke+8,Math.min(ae.left,ke+((se==null?void 0:se.width)??window.innerWidth)-me-8)),top:vt?Math.max(pe+8,ae.top-mo-8):ae.bottom+8})};return oe(),le.current||(Y=(te=M.current)==null?void 0:te.querySelector("input,button"))==null||Y.focus({preventScroll:!0}),le.current=!0,window.addEventListener("scroll",oe,!0),window.addEventListener("resize",oe),(R=window.visualViewport)==null||R.addEventListener("resize",oe),()=>{var ae;window.removeEventListener("scroll",oe,!0),window.removeEventListener("resize",oe),(ae=window.visualViewport)==null||ae.removeEventListener("resize",oe)}},[b,P]);const ie=oe=>v(oe),ge=(oe,fe=!1)=>r.jsx(c.View,{as:"button",type:"button","data-emoji-choice":oe.emoji,"aria-label":oe.name,"aria-pressed":I==="reaction"?V.includes(oe.emoji):C===oe.emoji,disabled:f||u,...Co.emoji,width:40,height:44,flex:fe?1:void 0,borderWidth:0,backgroundColor:V.includes(oe.emoji)?"color-blue-50":"transparent",_hover:{backgroundColor:"color-gray-100"},_focusVisible:{outline:"2px solid",outlineColor:"theme-primary"},...l.emoji,onClick:()=>ie(oe),title:oe.name,children:oe.emoji},oe.emoji);return r.jsxs(c.View,{id:e,...Co.container,...l.container,...re,children:[t&&r.jsx(c.Text,{marginBottom:4,...l.label,children:t}),r.jsx(c.View,{ref:E,as:"button",type:"button",name:o,disabled:f||u,"aria-label":re["aria-label"]||t||(I==="reaction"?N.reaction:N.select),"aria-haspopup":"dialog","aria-expanded":b,"aria-controls":b?Q:void 0,...Co.trigger,...Pf[i],...Df[g],...$f[s],borderColor:d?"theme-error":"color-gray-200",opacity:f?.6:1,_focusVisible:{outline:"2px solid",outlineColor:"theme-primary"},...l.trigger,onClick:F,children:W??r.jsxs(c.Horizontal,{gap:8,children:[r.jsx(c.Text,{children:I==="reaction"?"☺ +":C||n||N.select}),I!=="reaction"&&r.jsx(c.Text,{"aria-hidden":"true",children:b?"▴":"▾"})]})}),b&&r.jsx(nr,{children:r.jsxs(c.View,{ref:he,id:Q,role:"dialog","aria-label":I==="reaction"?N.reaction:N.select,...Co.dropdown,...l.dropdown,position:"fixed",top:ue.top,left:ue.left,right:"auto",width:ue.width,minWidth:0,maxHeight:ue.maxHeight,overflowY:"auto",padding:I==="reaction"&&!P?8:12,zIndex:1100,onKeyDown:oe=>{var ae,se,me,ke,pe,xe;if(oe.key==="Escape"){oe.preventDefault(),oe.stopPropagation(),H(),(ae=E.current)==null||ae.focus();return}const fe=Array.from(((se=M.current)==null?void 0:se.querySelectorAll("button:not(:disabled)"))||[]),Z=fe.indexOf(document.activeElement);if(oe.key==="Tab"){(oe.shiftKey&&Z<=0||!oe.shiftKey&&Z===fe.length-1)&&H();return}if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(oe.key)||!fe.length||oe.target.tagName==="INPUT"&&oe.key!=="ArrowDown")return;oe.preventDefault();const te=(me=document.activeElement)==null?void 0:me.closest("[data-emoji-grid]"),Y=["ArrowUp","ArrowDown"].includes(oe.key)&&te?8:1,R=oe.key==="Home"?0:oe.key==="End"?fe.length-1:(Z+(["ArrowLeft","ArrowUp"].includes(oe.key)?-Y:Y)+fe.length)%fe.length;(ke=fe[R])==null||ke.focus(),(xe=(pe=fe[R])==null?void 0:pe.scrollIntoView)==null||xe.call(pe,{block:"nearest"})},children:[I==="reaction"&&r.jsxs(c.Horizontal,{gap:2,children:[q.map(oe=>ge(oe,!0)),r.jsx(c.View,{as:"button",type:"button",disabled:f||u,"aria-label":N.more,"aria-expanded":P,minWidth:40,minHeight:44,borderWidth:0,borderRadius:8,onClick:()=>_(!P),children:"+"})]}),P&&r.jsxs(r.Fragment,{children:[m&&r.jsx(c.View,{marginBottom:8,...l.searchInput,children:r.jsx($e,{value:S,onChange:z,placeholder:N.search,"aria-label":N.search,isDisabled:f||u,size:"sm"})}),p&&r.jsx(c.View,{role:"tablist","aria-label":N.select,...Co.categoryTabs,...l.categoryTabs,children:de.map(oe=>r.jsx(c.View,{as:"button",type:"button",role:"tab","aria-label":N[oe],"aria-selected":oe===T,disabled:f||u,title:N[oe],...Co.categoryTab,borderWidth:0,minHeight:44,padding:8,backgroundColor:oe===T?"color-blue-50":"transparent",...l.categoryTab,onClick:()=>j(oe),children:Lf[oe]},oe))}),r.jsxs(c.View,{"data-emoji-grid":"true",role:"group","aria-label":N.select,...Co.emojiGrid,gridTemplateColumns:"repeat(8, minmax(0, 1fr))",...l.emojiGrid,children:[w.map(oe=>ge(oe)),!w.length&&r.jsx(c.Text,{gridColumn:"1 / -1",children:S?N.empty:N.categoryEmpty})]})]})]})}),a&&r.jsx(c.Text,{color:d?"theme-error":"theme-muted",...l.helperText,children:a})]})},Bf=e=>{const o=ze(e),t={...e,value:o.value??e.value??e.defaultValue,onChange:o.onChange},n=di(t),a=l=>{n.handleEmojiSelect(l)};return r.jsx(gi,{...n,...t,handleEmojiSelect:a})},_f=({files:e,onRemove:o,maxHeight:t="120px",views:n={}})=>{if(e.length===0)return null;const a=h.useCallback(l=>l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(1)} KB`:`${(l/(1024*1024)).toFixed(1)} MB`,[]);return r.jsx(c.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:t,overflowY:"auto",...n==null?void 0:n.container,children:e.map((l,i)=>{const g=l.url||"",s=l.type.startsWith("image/"),d=l.type.startsWith("video/"),f=l.type.startsWith("audio/");return r.jsx(c.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",position:"relative",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...n==null?void 0:n.item,children:r.jsxs(De,{children:[r.jsx(De.Trigger,{children:r.jsxs(c.View,{position:"relative",children:[s&&g&&r.jsx(c.Image,{src:g,alt:l.name,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),d&&g&&r.jsx(c.View,{as:"video",src:g,alt:l.name,controls:!1,muted:!0,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),f&&r.jsx(c.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(Vo,{widthHeight:24,color:"color-black"})}),!s&&!d&&!f&&r.jsx(c.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(po,{widthHeight:24,color:"color-black"})}),o&&r.jsx(c.Button,{position:"absolute",top:"-4px",right:"-4px",width:"20px",height:"20px",minWidth:"20px",minHeight:"20px",borderRadius:"50%",backgroundColor:"color-red-500",color:"white",fontSize:14,fontWeight:"bold",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"2px solid white",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"#DC2626"},onClick:u=>{u.stopPropagation(),o(i)},"aria-label":`Remove ${l.name}`,children:"×"})]})}),r.jsxs(De.Content,{children:[s&&g&&r.jsx(c.Image,{src:g,alt:l.name,maxWidth:"300px"}),d&&g&&r.jsx(c.View,{as:"video",src:g,controls:!0,maxWidth:"300px"}),f&&g&&r.jsx(c.View,{as:"audio",src:g,controls:!0,width:"100%"}),r.jsxs(c.Text,{marginTop:"4px",maxLines:1,width:"100%",fontSize:12,...n==null?void 0:n.name,children:[l.name," (",a(l.size),")"]})]})]})},i)})})},ui=e=>{const o=Te("slider",e),t=ql(o);return r.jsx(Xl,{...o,...t})},Of=({url:e,type:o,name:t,onOpen:n})=>{const a=o.toLowerCase(),l=a.startsWith("image"),i=a.startsWith("video"),g=a.startsWith("audio"),s=()=>{n&&n()};return r.jsxs(c.View,{width:"60px",height:"60px",flexShrink:0,borderRadius:"4px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-gray-200",cursor:"pointer",onClick:s,children:[l&&r.jsx(c.Image,{src:e,alt:t,width:"100%",height:"100%",objectFit:"cover"}),i&&r.jsx(c.View,{as:"video",src:e,controls:!0,width:"100%",height:"100%",style:{objectFit:"cover"},onClick:d=>d.stopPropagation()}),g&&r.jsx(c.View,{as:"audio",controls:!0,src:e,width:"100%",onClick:d=>d.stopPropagation()}),!l&&!i&&!g&&r.jsx(po,{widthHeight:24,color:"color-gray-600"})]})},go=Wo.create(e=>({modals:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,modals:[...a.modals,{name:o,props:{...t,isVisible:!0},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,modals:t.modals.filter(n=>n.name!==o)}:{modals:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),Nf=(e,o={},t={})=>{go.getState().show(e,o,t),go.getState().onShow(e,o)},un=e=>{go.getState().onHide(e),go.getState().hide(typeof e=="string"?e:void 0)},qf={square:{borderRadius:0},rounded:{borderRadius:8}},Uf={center:{justifyContent:"center",alignItems:"center"},top:{justifyContent:"center",alignItems:"flex-start"},right:{justifyContent:"flex-end",alignItems:"center"},bottom:{justifyContent:"center",alignItems:"flex-end"},left:{justifyContent:"flex-start",alignItems:"center"}},Gf={xs:12,sm:16,md:20,lg:24,xl:28},hn={body:{fontSize:"16px",fontWeight:"400",color:"color-gray-700"}},hi=h.memo(({children:e,blur:o,isOpen:t=!1,isClosePrevented:n=!1,onClose:a=()=>{},position:l="center",views:i,...g})=>{const s=h.useCallback(()=>{n||a()},[n,a]);return r.jsx(c.Center,{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1e3,onClick:s,visibility:t?"visible":"hidden",opacity:t?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease",...i==null?void 0:i.container,children:r.jsx(c.View,{position:"absolute",top:0,left:0,zIndex:1e3,width:"100vw",height:"100vh",display:"flex",backgroundColor:"color-dark-50-360",backdropFilter:o?`blur(${o}px)`:void 0,transition:"background-color 0.2s ease, backdrop-filter 0.2s ease",onClick:s,...Uf[l],...g,...i==null?void 0:i.view,children:e})})}),Yf={boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.15)"},Kf={elevation:5,shadowColor:"rgba(0, 0, 0, 0.15)",shadowOffset:{width:0,height:4},shadowOpacity:1,shadowRadius:16},Xf=h.memo(({children:e,shadow:o,isFullScreen:t=!1,shape:n="rounded",views:a,isOpen:l=!0,position:i,...g})=>{const s=typeof document!==void 0?Yf:Kf,d=h.useCallback(f=>{f&&f.stopPropagation&&f.stopPropagation()},[]);return r.jsx(c.Vertical,{cursor:"default",backgroundColor:"color-white",width:t?"100%":600,height:t?"100%":"fit-content",onClick:d,transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",opacity:l?1:0,transform:l?"translateY(0)":"translateY(8px)",...o||s,...qf[n],media:{mobile:{width:"90%",maxWidth:"100%",margin:"16px"}},...g,...a==null?void 0:a.container,children:e})}),Jf=h.memo(({children:e,buttonColor:o="theme-primary",iconSize:t="md",buttonSize:n,buttonPosition:a="right",views:l,onClose:i,...g})=>{const s=i||un,d=r.jsx(c.View,{onClick:()=>s(),children:r.jsx(Le,{widthHeight:Gf[n??t],color:o})});return r.jsxs(c.Horizontal,{justifyContent:a==="none"?"center":"space-between",alignItems:"center",paddingVertical:16,paddingHorizontal:24,borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",media:{mobile:{paddingVertical:12,paddingHorizontal:16}},...g,...l==null?void 0:l.header,children:[a==="left"&&d,e,a==="right"&&d]})}),Qf=h.memo(({children:e,views:o,...t})=>r.jsx(c.View,{paddingVertical:16,paddingHorizontal:24,fontSize:hn.body.fontSize,fontWeight:hn.body.fontWeight,color:hn.body.color,media:{mobile:{paddingVertical:12,paddingHorizontal:16,fontSize:"14px"}},...t,...o==null?void 0:o.view,children:e})),Zf=h.memo(({children:e,views:o,...t})=>r.jsx(c.Horizontal,{marginTop:"auto",alignItems:"center",justifyContent:"flex-end",paddingVertical:16,paddingHorizontal:24,borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",gap:12,media:{mobile:{paddingVertical:12,paddingHorizontal:16,gap:8}},...t,...o==null?void 0:o.container,children:e})),fn=({modals:e,onShow:o,onHide:t})=>{const n=go(a=>a.modals);return h.useEffect(()=>{o&&go.getState().setOnShow(o)},[o]),h.useEffect(()=>{t&&go.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(h.Fragment,{children:n.map((a,l)=>{const i=e[a.name];return i?r.jsx(hi,{isOpen:a.props.isVisible,onClose:()=>un(a.name),blur:5,...a.overlayProps,style:{zIndex:1e3+l},children:r.jsx(i,{...a.props})},l):(console.error(`${a.name} modal doesn't exist`),null)})})},wo=({children:e})=>r.jsx(r.Fragment,{children:e});wo.Overlay=hi,wo.Container=Xf,wo.Header=Jf,wo.Body=Qf,wo.Footer=Zf,wo.Layout=fn;const fi={xs:"320px",sm:"380px",md:"480px",lg:"640px",xl:"768px",full:"100%"},Rf={left:{top:0,left:0,bottom:0,height:"100vh",borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{top:0,right:0,bottom:0,height:"100vh",borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"},top:{top:0,left:0,right:0,width:"100vw",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},bottom:{bottom:0,left:0,right:0,width:"100vw",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200"}},mn=({isOpen:e,onClose:o,isClosePrevented:t,blur:n,children:a,...l})=>{const i=()=>{t||o()};return h.useEffect(()=>{const g=s=>{s.key==="Escape"&&e&&!t&&o()};return e&&document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[e,t,o]),r.jsx(c.View,{"data-testid":"drawer-overlay",role:"dialog","aria-modal":"true",position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,visibility:e?"visible":"hidden",onClick:i,opacity:e?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease",backgroundColor:e?"color-dark-50-360":"transparent",backdropFilter:n?`blur(${n}px)`:void 0,pointerEvents:e?"auto":"none",...l,children:a})},pn=({placement:e="right",size:o="md",isOpen:t=!1,children:n,...a})=>{const l=f=>{f.stopPropagation()},g=e==="top"||e==="bottom"?{height:o==="full"?"100vh":fi[o]||o,maxHeight:"100vh"}:{width:o==="full"?"100vw":fi[o]||o,maxWidth:"100vw"},s=e==="left"?"0 12px 12px 0":e==="right"?"12px 0 0 12px":e==="top"?"0 0 12px 12px":"12px 12px 0 0",d=t?"translate3d(0, 0, 0)":e==="left"?"translate3d(-100%, 0, 0)":e==="right"?"translate3d(100%, 0, 0)":e==="top"?"translate3d(0, -100%, 0)":"translate3d(0, 100%, 0)";return r.jsx(c.Vertical,{position:"absolute",backgroundColor:"color-white",borderRadius:s,...Rf[e],...g,onClick:l,transform:d,willChange:"transform",transition:"transform 0.24s ease, box-shadow 0.2s ease",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",...a,children:n})},em=({children:e,onClose:o,buttonPosition:t="right",...n})=>{const a=o&&r.jsx(c.View,{onClick:o,cursor:"pointer",padding:8,children:r.jsx(Le,{widthHeight:20,color:"color-gray-500"})});return r.jsxs(c.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderBottomWidth:"1px",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:t==="none"?"center":"space-between",...n,children:[t==="left"&&a,e,t==="right"&&a]})},om=({children:e,...o})=>r.jsx(c.Vertical,{padding:24,flex:1,overflowY:"auto",...o,children:e}),rm=({children:e,...o})=>r.jsx(c.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderTopWidth:"1px",borderTopColor:"color-gray-200",alignItems:"center",justifyContent:"flex-end",gap:12,...o,children:e}),uo=Wo.create(e=>({drawers:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,drawers:[...a.drawers,{name:o,props:{...t,isOpen:!1},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,drawers:t.drawers.filter(n=>n.name!==o)}:{drawers:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),tm=(e,o={},t={})=>{const n=uo.getState();n.hide(e),n.show(e,o,t),n.onShow(e,o),queueMicrotask(()=>{uo.setState(a=>({drawers:a.drawers.map(l=>l.name===e?{...l,props:{...l.props,isOpen:!0}}:l)}))})},mi=e=>{uo.getState().onHide(e),uo.getState().hide(typeof e=="string"?e:void 0)},nm=({drawers:e,onShow:o,onHide:t})=>{const n=uo(a=>a.drawers);return h.useEffect(()=>{o&&uo.getState().setOnShow(o)},[o]),h.useEffect(()=>{t&&uo.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(h.Fragment,{children:n.map((a,l)=>{var p;const i=e[a.name];if(!i)return console.error(`${a.name} drawer doesn't exist`),null;const{placement:g,size:s,isClosePrevented:d,blur:f,containerProps:u,...m}=a.props||{};return r.jsx(mn,{isOpen:a.props.isOpen,onClose:()=>mi(a.name),isClosePrevented:d,blur:f,...a.overlayProps,style:{zIndex:1e3+l,...((p=a.overlayProps)==null?void 0:p.style)||{}},children:r.jsx(pn,{placement:g,size:s,isOpen:a.props.isOpen,...u||{},children:r.jsx(h.Suspense,{fallback:null,children:r.jsx(i,{...m})})})},l)})})},So=({isOpen:e,onClose:o,placement:t="right",size:n="md",isClosePrevented:a,children:l,...i})=>r.jsx(mn,{isOpen:e,onClose:o,isClosePrevented:a,...i,children:r.jsx(pn,{placement:t,size:n,isOpen:e,children:l})});So.Overlay=mn,So.Container=pn,So.Header=em,So.Body=om,So.Footer=rm,So.Layout=nm;const pi=({behavior:e,keyboardVerticalOffset:o,dismissOnTap:t,enabled:n,children:a,...l})=>r.jsx(c.View,{flex:1,width:"100%",...l,children:a}),am=({header:e,footer:o,children:t,isLoading:n=!1,safe:a=!0,scrollable:l=!0,dismissKeyboardOnTap:i=!0,keyboardVerticalOffset:g=0,views:s={},backgroundColor:d="color-white",...f})=>{const u=a?c.SafeArea:c.View,m=c.isBrowser()?{}:{keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:!1,contentContainerStyle:{flexGrow:1}},p=n?r.jsx(c.Center,{flex:1,width:"100%",...s.content,children:r.jsx(io,{})}):l?r.jsx(c.Scroll,{flex:1,width:"100%",...m,...s.content,children:t}):r.jsx(c.View,{flex:1,width:"100%",...s.content,children:t});return r.jsxs(u,{flex:1,height:"100%",width:"100%",flexDirection:"column",backgroundColor:d,...f,...s.container,children:[e!=null&&r.jsx(c.View,{width:"100%",flexShrink:0,...s.header,children:e}),r.jsxs(pi,{flexDirection:"column",dismissOnTap:i,keyboardVerticalOffset:g,children:[p,o!=null&&r.jsx(c.View,{width:"100%",flexShrink:0,...s.footer,children:o})]})]})},tt=Wo.create(e=>({started:!1,loaded:!1,setStarted:(o=!0)=>e({started:o}),setLoaded:(o=!0)=>e({loaded:o}),reset:()=>e({started:!1,loaded:!1})})),lm=(e=!0)=>tt.getState().setLoaded(e),im=(e=!0)=>tt.getState().setStarted(e),cm=({logo:e,logoSrc:o,loader:t,showLoader:n=!0,duration:a=600,isLoaded:l,onHidden:i,backgroundColor:g="color-white",children:s,...d})=>{const f=tt(S=>S.loaded),u=l!==void 0?l:f,[m,p]=h.useState(!0),[y,x]=h.useState(!1);if(h.useEffect(()=>{if(!u||y)return;x(!0);const S=setTimeout(()=>{p(!1),i==null||i()},a);return()=>clearTimeout(S)},[u,y,a,i]),!m)return null;const b=c.isBrowser()?"fixed":"absolute",C=y?c.Animation.fadeOut({duration:`${a}ms`}):void 0,k=e??(o?r.jsx(c.Image,{src:o,width:120,height:120,alt:"logo"}):null);return r.jsxs(c.Center,{position:b,top:0,left:0,right:0,bottom:0,zIndex:9999,backgroundColor:g,animate:C,...d,children:[r.jsxs(c.Vertical,{alignItems:"center",gap:24,children:[k,n&&(t??r.jsx(io,{}))]}),s]})},Qe=Wo.create((e,o)=>({stack:[{path:"/",params:{}}],index:0,push:(t,n={})=>e(a=>{const l=a.stack.slice(0,a.index+1);return l.push({path:t,params:n}),{stack:l,index:l.length-1}}),replace:(t,n={})=>e(a=>{const l=a.stack.slice();return l[a.index]={path:t,params:n},{stack:l}}),back:()=>{const{index:t}=o();return t<=0?!1:(e({index:t-1}),!0)},go:t=>e(n=>({index:Math.min(Math.max(n.index+t,0),n.stack.length-1)})),reset:(t,n={})=>e({stack:[{path:t,params:n}],index:0})})),sm=(e,o)=>Qe.getState().push(e,o),dm=()=>Qe.getState().back(),yn=()=>{const e=Qe(s=>s.stack),o=Qe(s=>s.index),t=Qe(s=>s.push),n=Qe(s=>s.replace),a=Qe(s=>s.back),l=Qe(s=>s.go),i=Qe(s=>s.reset),g=e[o]||{path:"/",params:{}};return{path:g.path,params:g.params,stack:e,index:o,canGoBack:o>0,push:t,replace:n,back:a,go:l,reset:i,navigate:t}},yi=(e,o)=>{const t=e.split("/").filter(Boolean),n=o.split("/").filter(Boolean);if(t.length!==n.length)return null;const a={};for(let l=0;l<t.length;l+=1){const i=t[l];if(i.startsWith(":"))a[i.slice(1)]=decodeURIComponent(n[l]);else if(i!==n[l])return null}return a},gm=e=>Array.isArray(e)?e:Object.entries(e).map(([o,t])=>({path:o,component:t})),um=({routes:e,notFound:o})=>{const{path:t,params:n}=yn();for(const a of gm(e)){const l=yi(a.path,t);if(l){const i=a.component;return r.jsx(i,{...n,...l})}}return o?r.jsx(o,{}):null},hm=({routes:e,notFound:o,initialPath:t,syncBrowserHistory:n=!1})=>{const{path:a,push:l,back:i,reset:g}=yn(),s=h.useRef(!1);return c.useMount(()=>{t&&g(t)}),h.useEffect(()=>{if(!(!n||typeof window>"u")){if(s.current){s.current=!1;return}try{window.history.pushState({path:a},"",a)}catch{}}},[a,n]),h.useEffect(()=>{if(!n||typeof window>"u")return;const d=()=>{s.current=!0,i()||(s.current=!1)};return window.addEventListener("popstate",d),()=>window.removeEventListener("popstate",d)},[n,i,l]),r.jsx(um,{routes:e,notFound:o})},fm=(e=null,o=[])=>{const[t,n]=h.useState(e),[a,l]=h.useState(o),i=h.useRef({});return{activeItemId:t,setActiveItemId:n,expandedItemIds:a,toggleExpandedItem:d=>{l(f=>f.includes(d)?f.filter(m=>m!==d):[...f,d])},isItemExpanded:d=>a.includes(d),triggerRefs:i}},bn={sm:{padding:"8px 12px",fontSize:"12px",fontWeight:"500",media:{mobile:{padding:"6px 10px",fontSize:"11px"}}},md:{padding:"10px 14px",fontSize:"14px",fontWeight:"500",media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},lg:{padding:"12px 16px",fontSize:"14px",fontWeight:"600",media:{mobile:{padding:"10px 14px",fontSize:"12px"}}}},xn={default:{color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"}},bi={horizontal:{flexDirection:"row",gap:"8px",media:{mobile:{flexDirection:"column",gap:"4px"}}},vertical:{flexDirection:"column",gap:"4px"}},Uo={active:{backgroundColor:"color-blue-50",color:"color-blue-700",fontWeight:"600",borderLeft:"3px solid",borderColor:"color-blue-600"},hover:{backgroundColor:"color-gray-100",transition:"background-color 0.2s ease"}},xi=h.createContext({activeItemId:null,setActiveItemId:()=>{},expandedItemIds:[],toggleExpandedItem:()=>{},isItemExpanded:()=>!1,orientation:"vertical",size:"md",variant:"default",triggerRefs:{current:{}}}),mm=({children:e,value:o})=>r.jsx(xi.Provider,{value:o,children:e}),xr=()=>{const e=h.useContext(xi);if(!e)throw new Error("useNavigationMenuContext must be used within a NavigationMenuProvider");return e},kn=({children:e,views:o})=>{const{orientation:t}=xr(),n=t==="horizontal"?c.Horizontal:c.Vertical;return r.jsx(n,{width:"100%",...bi[t],transition:"background-color 0.2s ease, border-color 0.2s ease",borderRadius:"8px",...o==null?void 0:o.container,children:e})},ki=h.createContext({itemValue:null,isDisabled:!1}),pm=()=>{const e=h.useContext(ki);if(!e)throw new Error("useNavigationMenuItemContext must be used within a NavigationMenuItem");return e},Cn=({item:e,value:o,isDisabled:t=!1,children:n,views:a})=>{var C;const{activeItemId:l,setActiveItemId:i,orientation:g,size:s,variant:d,onItemActivate:f}=xr(),u=(e==null?void 0:e.id)||o,m=l===u,p=(e==null?void 0:e.items)&&e.items.length>0,y=(e==null?void 0:e.disabled)||t,x=()=>{y||u&&(i(u),f&&f(u))},b=g==="horizontal"?c.Horizontal:c.Vertical;return n?r.jsx(ki.Provider,{value:{itemValue:u||null,isDisabled:y},children:r.jsx(c.View,{width:"100%",cursor:y?"not-allowed":"pointer",opacity:y?.6:1,borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",...bn[s],...xn[d],...m?Uo.active:{},_hover:y?{}:Uo.hover,...a==null?void 0:a.item,children:n})}):p&&e?r.jsxs(b,{width:"100%",flexDirection:"column",position:"relative",...a==null?void 0:a.item,children:[r.jsxs(Ci,{itemId:e.id,disabled:e.disabled,views:a,children:[e.icon&&r.jsx(c.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}),r.jsx(wi,{itemId:e.id,children:r.jsx(kn,{children:(C=e.items)==null?void 0:C.map(k=>r.jsx(Cn,{item:k},k.id))})})]}):e?r.jsxs(c.View,{as:e.href?"a":"div",href:e.href,onClick:x,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.6:1,width:"100%",display:"flex",alignItems:"center",borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",gap:"8px",...bn[s],...xn[d],...m?Uo.active:{},_hover:e.disabled?{}:Uo.hover,...a==null?void 0:a.item,children:[e.icon&&r.jsx(c.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}):null},Ci=({children:e,itemId:o,disabled:t,views:n})=>{const{activeItemId:a,toggleExpandedItem:l,isItemExpanded:i,size:g,variant:s,triggerRefs:d}=xr(),f=h.useRef(null),u=a===o,m=i(o);h.useEffect(()=>(f.current&&o&&(d.current[o]=f.current),()=>{o&&delete d.current[o]}),[o,d]);const p=y=>{y.preventDefault(),!t&&l(o)};return r.jsxs(c.View,{ref:f,onClick:p,cursor:t?"not-allowed":"pointer",opacity:t?.5:1,width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:8,transition:"background-color 0.2s ease",...bn[g],...xn[s],...u?Uo.active:{},_hover:t?{}:Uo.hover,...n==null?void 0:n.trigger,children:[r.jsx(c.View,{display:"flex",alignItems:"center",children:e}),r.jsx(c.View,{transition:"transform 0.2s ease",transform:m?"rotate(180deg)":"rotate(0deg)",...n==null?void 0:n.indicator,children:r.jsx(we,{orientation:"down",widthHeight:16,color:"currentColor",filled:!0})})]})},wi=({children:e,itemId:o,views:t})=>{const{isItemExpanded:n,orientation:a,triggerRefs:l}=xr(),i=h.useRef(null),[g,s]=h.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),d=n(o);if(h.useEffect(()=>{if(d&&i.current&&o&&l.current[o]&&a==="horizontal"){const u=i.current.getBoundingClientRect(),m=l.current[o].getBoundingClientRect(),p=Math.max(u.width||200,200),y=Math.max(u.height||150,150),x=window.innerWidth,b=window.innerHeight,C={top:m.top,right:x-m.right,bottom:b-m.bottom,left:m.left},k=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:m.left,y:m.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:m.left,y:m.top-y-8},{placement:"right",space:C.right,fits:C.right>=p+8,x:m.right+8,y:m.top},{placement:"left",space:C.left,fits:C.left>=p+8,x:m.left-p-8,y:m.top}]:[{placement:"right",space:C.right,fits:C.right>=p+8,x:m.right+8,y:m.top},{placement:"left",space:C.left,fits:C.left>=p+8,x:m.left-p-8,y:m.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:m.left,y:m.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:m.left,y:m.top-y-8}],S=k.find(v=>v.fits);if(S){s({x:S.x,y:S.y,placement:S.placement});return}const T=k.reduce((v,z)=>z.space>v.space?z:v);let w=T.x,F=T.y;w+p>x&&(w=x-p-8),w<8&&(w=8),F+y>b&&(F=b-y-8),F<8&&(F=8),s({x:w,y:F,placement:T.placement})}},[d,a,o,l]),!d)return null;if(a==="vertical")return r.jsx(c.View,{paddingLeft:16,width:"100%",position:"relative",backgroundColor:"transparent",...t==null?void 0:t.container,children:e});const f={position:"fixed",left:g.x,top:g.y,zIndex:1e3};return r.jsx(c.View,{ref:i,role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:f,...t==null?void 0:t.container,children:e})},ym=({href:e,children:o,views:t,underline:n,isExternal:a,iconSize:l,...i})=>{const{itemValue:g,isDisabled:s}=pm(),{activeItemId:d,setActiveItemId:f,onItemActivate:u}=xr(),m=d===g,p=y=>{if(s){y.preventDefault();return}g&&(f(g),u&&u(g)),i.onClick&&i.onClick(y)};return r.jsx(c.View,{as:"a",href:s?void 0:e,onClick:p,cursor:s?"not-allowed":"pointer",opacity:s?.5:1,width:"100%",display:"flex",alignItems:"center","aria-current":m?"page":void 0,"aria-disabled":s,"data-active":m?"":void 0,"data-disabled":s?"":void 0,...m?{fontWeight:"bold"}:{},...t==null?void 0:t.container,...i,children:o})},bm=({items:e,orientation:o,views:t,themeMode:n})=>{const a=o==="horizontal"?c.Horizontal:c.Vertical;return!e||e.length===0?null:r.jsx(a,{width:"100%",...bi[o],...t==null?void 0:t.container,children:r.jsx(kn,{views:t,children:e.map(l=>r.jsx(Cn,{item:l,views:t},l.id))})})},vo=e=>{const o=Te("navigation",e),{items:t,children:n,orientation:a="vertical",size:l="md",variant:i="default",defaultActiveItemId:g=null,defaultExpandedItemIds:s=[],onItemActivate:d,views:f,...u}=o,{activeItemId:m,setActiveItemId:p,expandedItemIds:y,toggleExpandedItem:x,isItemExpanded:b,triggerRefs:C}=fm(g,s);return r.jsx(mm,{value:{activeItemId:m,setActiveItemId:p,expandedItemIds:y,toggleExpandedItem:x,isItemExpanded:b,orientation:a,size:l,variant:i,onItemActivate:d,triggerRefs:C},children:t?r.jsx(bm,{items:t,orientation:a,size:l,variant:i,views:f,...u}):n})};vo.List=kn,vo.Item=Cn,vo.Trigger=Ci,vo.Content=wi,vo.Link=ym;const Si={},vi=h.createContext({views:Si,onRowClick:()=>{}}),xm=({children:e,views:o=Si,onRowClick:t})=>r.jsx(vi.Provider,{value:{views:o,onRowClick:t},children:e}),ho=()=>h.useContext(vi),Me={table:{width:"100%",color:"inherit",borderRadius:"8px",overflow:"hidden",boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.06), 0px 1px 2px rgba(0, 0, 0, 0.04)",border:"1px solid",borderColor:"color-gray-200",transition:"box-shadow 0.2s ease",media:{mobile:{overflowX:"auto",display:"block",borderRadius:"4px"}}},thead:{backgroundColor:"color-gray-50",borderBottom:"1px solid",borderColor:"color-gray-200"},th:{padding:"12px 16px",fontWeight:"600",fontSize:"14px",color:"inherit",opacity:.72,textAlign:"left",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},td:{padding:"12px 16px",fontSize:"14px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"inherit",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},tr:{flexDirection:"row",alignItems:"stretch",width:"100%",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-50"},_focus:{outline:"none",backgroundColor:"color-gray-100"}},tfoot:{backgroundColor:"color-gray-50",fontWeight:"600",borderTop:"2px solid",borderColor:"color-gray-200"},caption:{margin:"8px 0",color:"inherit",opacity:.62,fontSize:"14px",fontStyle:"italic",media:{mobile:{fontSize:"12px"}}}};({...Me.th},{...Me.td}),{...Me.tr},{...Me.td},{...Me.th},{...Me.table},{...Me.th},{...Me.td},{...Me.tr},{...Me.tfoot},{...Me.caption};const Ti=({children:e})=>r.jsx(c.View,{width:"100%",style:{overflowX:"auto"},children:e}),Ii=e=>{const{views:o}=ho();return r.jsx(c.Element,{as:"table",...Me.table,...o==null?void 0:o.table,...e,style:{borderCollapse:"collapse",...e.style||{}}})},Fi=e=>{const{views:o}=ho();return r.jsx(c.Element,{as:"thead",textAlign:"left",...Me.thead,...o==null?void 0:o.thead,...e})},zi=e=>{const{views:o}=ho();return r.jsx(c.Element,{as:"th",whiteSpace:"nowrap",...Me.th,...o==null?void 0:o.th,...e})},nt=e=>{const{views:o,onRowClick:t}=ho();return r.jsx(c.Element,{as:"tr",...Me.tr,...o==null?void 0:o.tr,onClick:t,...e})},wn=({isFirstColumn:e,...o})=>{const{views:t}=ho();return r.jsx(c.Element,{as:"td",whiteSpace:"nowrap",fontWeight:e?"500":"400",...Me.td,...t==null?void 0:t.td,...o})},Mi=e=>{const{views:o}=ho();return r.jsx(c.Element,{as:"tbody",...Me.tbody,...o==null?void 0:o.tbody,...e})},ji=e=>{const{views:o}=ho();return r.jsx(c.Element,{as:"tfoot",...Me.tfoot,...o==null?void 0:o.tfoot,...e})},Wi=e=>{const{views:o}=ho();return r.jsx(c.Element,{as:"caption",...Me.caption,...o==null?void 0:o.caption,...e})},km=({data:e,columns:o,footer:t,caption:n,themeMode:a})=>{const l=Math.max(o.length*140,320);return r.jsx(Ti,{children:r.jsxs(Ii,{role:"Table",minWidth:l,children:[n&&r.jsx(Wi,{children:n}),r.jsx(Fi,{children:r.jsx(nt,{children:o.map(i=>r.jsx(zi,{children:i.title},i.field))})}),r.jsx(Mi,{children:e.map((i,g)=>r.jsx(nt,{children:o.map((s,d)=>r.jsx(wn,{isFirstColumn:d===0,children:i[s.field]},s.field))},g))}),t&&r.jsx(ji,{children:r.jsx(nt,{children:t.map((i,g)=>r.jsx(wn,{...i.props,children:i.value},g))})})]})})},Fe=({children:e,views:o,onClick:t})=>{const n=Te("table",{views:o,onClick:t});return r.jsx(xm,{views:n.views,onRowClick:n.onClick,children:e})};Fe.Head=Fi,Fe.HeadCell=zi,Fe.Body=Mi,Fe.Row=nt,Fe.Cell=wn,Fe.Footer=ji,Fe.Caption=Wi,Fe.Container=Ii,Fe.Template=km;const Cm=(e,o,t)=>{const n=d=>d.value!==void 0?d.value:d.title,a=()=>{if(!(!e||e.length===0)){if(o!==void 0){const d=e.find(f=>n(f)===o);if(d)return d}return e[0]}},[l,i]=h.useState(a()),g=t!==void 0?e.find(d=>n(d)===t):l,s=d=>{t===void 0&&i(d)};return h.useEffect(()=>{if(t!==void 0)return;const d=a(),f=l&&e.some(u=>n(u)===n(l));d&&(!f||o!==void 0&&l&&n(l)!==o)?i(d):!d&&l&&i(void 0)},[e,o]),{activeTab:g,setActiveTab:s}},wm=(e,o,t)=>{const[n,a]=h.useState(e||null);return{activeValue:o!==void 0?o:n,setActiveValue:g=>{o===void 0&&a(g),t&&t(g)}}},Sm=h.memo(({tab:e,isActive:o,onClick:t,iconPosition:n="left",tabStyles:a,textStyles:l})=>{const i=()=>{switch(n){case"top":return"column";case"bottom":return"column-reverse";case"right":return"row-reverse";case"left":default:return"row"}},g=()=>["top","bottom"].includes(n)?"4px":"8px",s=e.icon&&h.isValidElement(e.icon)?h.cloneElement(e.icon,{strokeWidth:o?2.5:2}):e.icon;return r.jsxs(c.Element,{as:"div",role:"tab","aria-selected":o,tabIndex:o?0:-1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...a,flexDirection:i(),gap:g(),onClick:t,"data-state":o?"active":"inactive",children:[s&&r.jsx(c.Element,{children:s},o?"active-icon":"inactive-icon"),r.jsxs(c.Element,{display:"grid",alignItems:"center",justifyContent:"center",children:[r.jsx(c.Text,{...l,fontWeight:"600",visibility:"hidden",gridColumn:"1",gridRow:"1","aria-hidden":"true",children:e.title}),r.jsx(c.Text,{...l,fontWeight:o?"600":"500",gridColumn:"1",gridRow:"1",children:e.title})]})]})}),Sn=(e,o)=>{const t=o==="dark";return e==="segmented"?{header:{width:"fit-content",alignSelf:"flex-start",gap:6,padding:6,borderRadius:16,backgroundColor:"color-gray-100"},tab:{minHeight:44,padding:"0 22px",borderRadius:12,color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-100",style:{backgroundColor:"transparent"}},activeTab:{backgroundColor:"color-white",color:"color-gray-900",boxShadow:t?"0 1px 3px rgba(0, 0, 0, 0.35)":"0 1px 2px rgba(0, 0, 0, 0.06)"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em"},activeText:{},content:{width:"100%"}}:e==="pill"?{header:{width:"100%",flexWrap:"wrap",gap:12},tab:{minHeight:44,padding:"0 22px",borderRadius:"999px",backgroundColor:"color-white",color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200"},activeTab:{backgroundColor:"theme-primary",color:"color-white",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%"}}:{header:{width:"100%",gap:20,borderBottom:"none"},tab:{minHeight:44,padding:"0 4px",borderRadius:0,color:"color-gray-500",borderBottom:"3px solid",borderColor:"color-white",style:{backgroundColor:"transparent"}},activeTab:{color:"theme-primary",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%",paddingTop:12}}},vm=({tabs:e=[],activeTab:o,handleTabClick:t,views:n={},renderTab:a,renderContent:l,variant:i="underline",iconPosition:g="left",keepMounted:s=!1})=>{const{themeMode:d}=c.useTheme(),f=Sn(i,d);return o?r.jsxs(c.Vertical,{width:"100%",height:"100%",...n.container,children:[r.jsx(c.Horizontal,{alignItems:"center",...f.header,...n.headerTabs,children:e.map(u=>{const m=(u.value!==void 0?u.value:u.title)===(o.value!==void 0?o.value:o.title),p=()=>t(u);return a?a(u,m,p):r.jsx(Sm,{tab:u,isActive:m,onClick:p,iconPosition:g,tabStyles:{...f.tab,...n.tab,...m?f.activeTab:{},...m?n.activeTab:{}},textStyles:{...f.text,...n.title,...m?f.activeText:{},...m?n.activeText:{}}},u.title)})}),r.jsx(c.View,{height:"100%",...f.content,...n.content,children:l?l(o):s?e.map(u=>{const m=u.value!==void 0?u.value:u.title,p=o.value!==void 0?o.value:o.title;return r.jsx(c.View,{display:m===p?"contents":"none",children:u.content},u.title)}):o.content})]}):null},Ei=h.createContext(null),vn=()=>{const e=h.useContext(Ei);if(!e)throw new Error("useTabsContext must be used within a Tabs component");return e},Tm=h.memo(({children:e,views:o})=>{var g;const{themeMode:t}=c.useTheme(),{variant:n="underline"}=vn(),a=Sn(n,t),l=Ho("tabs"),i=Ke({container:(g=l.views)==null?void 0:g.headerTabs},o);return r.jsx(c.Horizontal,{alignItems:"center",...a.header,...i==null?void 0:i.container,children:e})}),Im=h.memo(({value:e,children:o,disabled:t=!1,views:n})=>{var p,y;const{themeMode:a}=c.useTheme(),{activeValue:l,setActiveValue:i,variant:g="underline"}=vn(),s=l===e,d=Sn(g,a),f=Ho("tabs"),u=Ke({trigger:(p=f.views)==null?void 0:p.tab,activeState:(y=f.views)==null?void 0:y.activeTab},n),m=h.useCallback(()=>{t||i(e)},[t,e,i]);return r.jsx(c.View,{cursor:t?"not-allowed":"pointer",opacity:t?.6:1,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",...d.tab,...s?d.activeTab:{},_hover:t?{}:g==="underline"?{color:"theme-primary"}:{opacity:.9},onClick:m,...u==null?void 0:u.trigger,...s?u==null?void 0:u.activeState:{},children:r.jsx(c.View,{...d.text,...s?d.activeText:{},children:o})})}),Fm=h.memo(({value:e,children:o,views:t})=>{const{activeValue:n}=vn();return n!==e?null:r.jsx(c.View,{width:"100%",padding:"24px",...t==null?void 0:t.content,children:o})}),zm=e=>{const o=Te("tabs",e),{tabs:t,views:n,defaultValue:a,onTabChange:l,renderTab:i,renderContent:g,variant:s="underline",iconPosition:d="left",keepMounted:f=!1,value:u,onValueChange:m,children:p}=o,y=wm(a,u,m),x=Cm(t||[],a,u);if(p)return r.jsx(Ei.Provider,{value:{...y,variant:s},children:p});if(t){const b=C=>{const k=S=>S.value!==void 0?S.value:S.title;(!x.activeTab||k(x.activeTab)!==k(C))&&(x.setActiveTab(C),l&&l(C))};return r.jsx(vm,{tabs:t,views:n,activeTab:x.activeTab,handleTabClick:b,renderTab:i,renderContent:g,variant:s,iconPosition:d,keepMounted:f})}return null},Go=h.memo(zm);Go.List=Tm,Go.Trigger=Im,Go.Content=Fm;const Mm=e=>{const{children:o,_isInView:t=!1,alternateHighlightText:n=[],alternateAnimation:a=!1,alternateDuration:l=3e3,highlightText:i,highlightTypewriter:g=!1,highlightSlide:s=!1,highlightSlideDuration:d=500,highlightSlideStagger:f=50,highlightSlideSequential:u=!0}=e,[m,p]=h.useState(o),[y,x]=h.useState(i);return h.useEffect(()=>{if(process.env.NODE_ENV==="production"||typeof o!="string"||!i)return;const b=Array.isArray(i)?i:[i];for(const C of b)typeof C=="string"&&C.length>0&&!o.toLowerCase().includes(C.toLowerCase())&&console.warn(`[Title] highlightText "${C}" is not a substring of \`children\`, so nothing will be highlighted. \`children\` must be the complete sentence including the highlight, e.g. \`<Title highlightText="apps">Build apps fast</Title>\`.`)},[o,i]),h.useEffect(()=>{if(!a||n.length===0||!t||typeof o!="string"||typeof i!="string")return process.env.NODE_ENV!=="production"&&a&&n.length>0&&(typeof o!="string"||typeof i!="string")&&console.warn("[Title] alternateHighlightText requires `children` to be the full sentence as a string and `highlightText` to be the placeholder word inside it. Rotation is disabled."),p(o),x(i),()=>{};const b=o,C=i;if(!b.toLowerCase().includes(C.toLowerCase()))return process.env.NODE_ENV!=="production"&&console.warn(`[Title] \`children\` must contain \`highlightText\` ("${C}") — it is the placeholder the rotating words replace, e.g. \`<Title highlightText="apps" alternateHighlightText={["apps", "sites"]}>Build apps fast</Title>\`. Rotation is disabled.`),p(o),x(i),()=>{};let k=0;const S=w=>{const F=n[w],v=C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),z=new RegExp(v,"gi"),j=b.replace(z,F);p(j),x(F)};S(k);const T=setInterval(()=>{k=(k+1)%n.length,S(k)},l);return()=>clearInterval(T)},[a,n,l,i,o,t]),{finalDisplayedText:m,activeHighlightTarget:y,highlightTypewriter:g,highlightSlide:s,highlightSlideDuration:d,highlightSlideStagger:f,highlightSlideSequential:u}},jm={xs:24,sm:32,md:48,lg:96,xl:110},Wm={xl:{media:{mobile:{fontSize:48},tablet:{fontSize:96},desktop:{fontSize:110}}},lg:{media:{mobile:{fontSize:48},tablet:{fontSize:48},desktop:{fontSize:70}}},md:{media:{mobile:{fontSize:32},tablet:{fontSize:40},desktop:{fontSize:56}}},sm:{media:{mobile:{fontSize:20},tablet:{fontSize:24},desktop:{fontSize:32}}},xs:{media:{mobile:{fontSize:14},tablet:{fontSize:18},desktop:{fontSize:20}}}},Em={underline:e=>({textDecoration:"underline",textDecorationColor:e,textDecorationThickness:"4px",textUnderlineOffset:"4px"}),background:e=>({backgroundColor:e,color:"color-white",padding:"0 8px",borderRadius:"4px"}),gradient:(e,o)=>({background:`linear-gradient(135deg, ${e}, ${o||e})`,backgroundClip:"text",WebkitBackgroundClip:"text !important",WebkitTextFillColor:"transparent",color:"transparent",display:"inline-block",textShadow:"none"}),outline:e=>({WebkitTextStroke:`1px ${e}`,WebkitTextFillColor:"transparent !important",color:"transparent",textShadow:"none"}),glow:e=>({color:e,textShadow:`0 0 10px ${e}80, 0 0 20px ${e}40, 0 0 30px ${e}20`}),solid:e=>({color:e}),default:()=>({})},Am=({text:e,typingSpeed:o=50,pauseTime:t=500,onComplete:n,showCursor:a=!0,cursorColor:l="currentColor",textStyle:i,textComponent:g,as:s,...d})=>{const f=g||c.Text,u=Array.isArray(e)?e:[e],[m,p]=h.useState(u.map(()=>"")),[y,x]=h.useState(!1),[b,C]=h.useState(0),[k,S]=h.useState(0);h.useEffect(()=>{p(u.map(()=>"")),x(!1),C(0),S(0)},[e]),h.useEffect(()=>{if(y){n&&n();return}const w=u[b];if(k>=w.length){if(b>=u.length-1){x(!0);return}const v=setTimeout(()=>{C(z=>z+1),S(0)},t);return()=>clearTimeout(v)}const F=setTimeout(()=>{p(v=>{const z=[...v];return z[b]=w.substring(0,k+1),z}),S(v=>v+1)},o);return()=>clearTimeout(F)},[u,b,k,y,n,t,o]);const T=w=>{if(!w||typeof w!="string")return w;const F=w.split("|");return F.length===1?w:F.map((v,z)=>r.jsxs(h.Fragment,{children:[v,z<F.length-1&&r.jsx("br",{})]},z))};return r.jsx(r.Fragment,{children:m.map((w,F)=>r.jsxs(h.Fragment,{children:[T(w),a&&F===b&&!y&&r.jsx(f,{as:"span",display:"inline-block",width:"0.1em",height:"1em",backgroundColor:l,animation:"blink 1s step-end infinite",verticalAlign:"text-bottom",marginLeft:"1px",...i})]},F))})},Hm=({text:e,duration:o=500,direction:t="up",stagger:n=50,sequential:a=!1,textStyle:l,as:i,wordProps:g,textComponent:s,...d})=>{const[f,u]=h.useState(e),[m,p]=h.useState("entering"),[y,x]=h.useState(0),b=s||c.Text,C=h.useRef(null),k=h.useRef(null);h.useEffect(()=>{e===f&&m==="visible"||e!==f&&(m==="entering"||m==="visible"?(C.current=e,p("exiting")):m==="exiting"&&(C.current=e))},[e,f,m]);const{lines:S,totalWordCount:T}=h.useMemo(()=>{const V=f.split("|").map(_=>_.trim().split(/\s+/).filter(q=>q.length>0)),P=V.reduce((_,q)=>_+q.length,0);return{lines:V,totalWordCount:P}},[f]),w=h.useMemo(()=>a?T*(o+n):(T-1)*n+o,[T,o,n,a]),F=h.useMemo(()=>a?T*(o+n):(T-1)*n+o,[T,o,n,a]);h.useEffect(()=>(k.current&&clearTimeout(k.current),m==="entering"?k.current=setTimeout(()=>{p("visible")},w+50):m==="exiting"&&(k.current=setTimeout(()=>{C.current!==null&&(u(C.current),C.current=null),x(D=>D+1),p("entering")},F+50)),()=>{k.current&&clearTimeout(k.current)}),[m,w,F]);const{style:v,...z}=g||{},j=t==="up",H=D=>a?D*(o+n):D*n,E=h.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"bottom",whiteSpace:"nowrap",...l}),[l]),M=h.useMemo(()=>({display:"inline-flex",flexDirection:"column",alignItems:"center"}),[]),I=h.useMemo(()=>({display:"block",whiteSpace:"nowrap"}),[]);let W=0;return r.jsx(c.Element,{as:"span",style:E,...d,children:r.jsx("span",{style:M,children:S.map((D,V)=>r.jsx("span",{style:I,children:D.map((P,_)=>{const q=W++,N=H(q),G=_===D.length-1;let X;const $=`${o}ms`,O=`${N}ms`;m==="entering"?X=j?c.Animation.slideInUp({duration:$,delay:O,timingFunction:"ease-out",fillMode:"both"}):c.Animation.slideInDown({duration:$,delay:O,timingFunction:"ease-out",fillMode:"both"}):m==="exiting"&&(X=j?{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-100%)",opacity:0},duration:$,delay:O,timingFunction:"ease-in",fillMode:"both"}:{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(100%)",opacity:0},duration:$,delay:O,timingFunction:"ease-in",fillMode:"both"});const B={...v,display:"inline-block",marginRight:G?0:"0.25em",transform:m==="visible"?"translateY(0)":void 0,opacity:m==="visible"?1:void 0};return r.jsx(b,{as:"span",animate:X,...z,...B,children:P},`${y}-${V}-${_}`)})},`line-${V}`))})})};function Ai(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const Tn=e=>{if(!e||typeof e!="string")return e;const o=e.split("|");return o.length===1?e:o.map((t,n)=>r.jsxs(h.Fragment,{children:[t,n<o.length-1&&r.jsx("br",{})]},n))},Vm=({children:e,highlightText:o,highlightStyle:t="solid",highlightColor:n="theme-primary",highlightSecondaryColor:a,size:l="lg",views:i,highlightAnimate:g,animate:s,animationLoop:d=1,highlightAnimationLoop:f=1,highlightTypewriter:u=!1,highlightTypewriterDuration:m=3e3,highlightSlide:p=!1,highlightSlideDuration:y=500,highlightSlideStagger:x=50,highlightSlideSequential:b=!0,centered:C=!1,level:k=1,themeMode:S,responsive:T,alternateHighlightText:w,alternateAnimation:F,alternateDuration:v,_isInView:z,...j})=>{const{ref:H,inView:E}=c.useInView(),{finalDisplayedText:M,activeHighlightTarget:I,highlightTypewriter:W,highlightSlide:D,highlightSlideDuration:V,highlightSlideStagger:P,highlightSlideSequential:_}=Mm({children:e,highlightText:o,_isInView:E,highlightTypewriter:u,highlightSlide:p,highlightSlideDuration:y,highlightSlideStagger:x,highlightSlideSequential:b,alternateHighlightText:w,alternateAnimation:F,alternateDuration:v,...j}),q=jm[l],N={fontFamily:"Mulish, Inter, Geist, system-ui, sans-serif",fontWeight:l==="xl"?700:600,letterSpacing:l==="xl"?"-1.5px":"-0.01em"},G=Em[t](n,a),X=(K,J)=>K&&(Array.isArray(K)?K.map(ne=>({...ne,iterationCount:J.toString()})):{...K,iterationCount:J.toString()}),$=X(s,d),O=X(g,f),B=typeof M=="string"?M:typeof e=="string"?e:"",L={ref:H,animate:E?$:void 0,as:`h${k}`,fontSize:q,...C?{textAlign:"center"}:{},...T?Wm[l]:{},...N},U=K=>!E&&(W||D)?r.jsx("span",{style:{opacity:0},children:K}):W?r.jsx(Am,{text:K,typingSpeed:Math.max(30,m/(K.length*10)),cursorColor:"currentColor",...G}):D?r.jsx(Hm,{text:K,duration:V,stagger:P,sequential:_,direction:"up",wordProps:G}):Tn(K);if(typeof B=="string"&&I){const K=Array.isArray(I)?new RegExp(`(${I.map(ce=>Ai(String(ce))).join("|")})`,"gi"):new RegExp(`(${Ai(String(I))})`,"gi"),J=[];let ne=0,re;for(;re=K.exec(B);)re.index>ne&&J.push(B.substring(ne,re.index)),J.push({highlight:!0,text:re[0]}),ne=re.index+re[0].length;return ne<B.length&&J.push(B.substring(ne)),r.jsx(c.Element,{...L,...i==null?void 0:i.container,...j,children:J.map((ce,Q)=>typeof ce=="string"?r.jsx(c.Text,{as:"span",display:"inline",...i==null?void 0:i.text,children:Tn(ce)},`text-${Q}`):r.jsx(c.Text,{as:"span",display:"inline",animate:E?O:void 0,...D?{}:G,...i==null?void 0:i.highlight,children:U(ce.text)},`highlight-${Q}`))})}return t&&!I?r.jsx(c.Element,{...L,...j,...i==null?void 0:i.container,children:r.jsx(c.Text,{as:"span",display:"inline",animate:E?O:void 0,...D?{}:G,...i==null?void 0:i.highlight,children:U(B)})}):r.jsx(c.Text,{...L,...j,...i==null?void 0:i.container,...i==null?void 0:i.text,children:Tn(B)})},Hi=e=>r.jsx(Vm,{...e}),Vi=({items:e,shape:o,variant:t,onToggleChange:n})=>{const{activeToggles:a,setActiveToggles:l}=ei();return r.jsx(oi,{items:e,shape:o,variant:t,activeToggles:a,setActiveToggles:l,onToggleChange:n})},Pm=({items:e,onChange:o})=>{const[t,n]=h.useState(e),[a,l]=h.useState(null),[i,g]=h.useState(null),s=h.useRef({x:0,y:0}),d=h.useRef([]),f=h.useCallback((p,y)=>{p.preventDefault(),document.body.style.cursor="grabbing";const x="touches"in p?p.touches[0].clientX:p.clientX,b="touches"in p?p.touches[0].clientY:p.clientY;s.current={x,y:b},g(y),l(t[y])},[t]),u=h.useCallback(p=>{if(i===null)return;const y="touches"in p?p.touches[0].clientX:p.clientX,x="touches"in p?p.touches[0].clientY:p.clientY,b=d.current[i];if(!b)return;const C=y-s.current.x,k=x-s.current.y;b.style.transform=`translate(${C}px, ${k}px)`,b.style.zIndex="1000";const S=d.current.findIndex((T,w)=>{if(!T||w===i)return!1;const F=T.getBoundingClientRect();return x>=F.top&&x<=F.bottom});if(S!==-1&&S!==i){const T=[...t],[w]=T.splice(i,1);T.splice(S,0,w),n(T),g(S),o==null||o(T),s.current={x:y,y:x}}},[i,t,o]),m=h.useCallback(()=>{document.body.style.cursor="",d.current.forEach(p=>{p&&(p.style.transform="",p.style.zIndex="")}),g(null),l(null)},[i]);return h.useEffect(()=>{if(!(typeof window>"u"))return i!==null&&(window.addEventListener("mousemove",u),window.addEventListener("touchmove",u),window.addEventListener("mouseup",m),window.addEventListener("touchend",m)),()=>{window.removeEventListener("mousemove",u),window.removeEventListener("touchmove",u),window.removeEventListener("mouseup",m),window.removeEventListener("touchend",m)}},[i,u,m]),{items:t,draggedItem:a,draggedIndex:i,itemRefs:d,handleDragStart:f}},Dm=({items:e,renderItem:o,containerProps:t,itemProps:n,draggedIndex:a,itemRefs:l,handleDragStart:i,views:g,themeMode:s})=>r.jsx(c.View,{overflow:"hidden",position:"relative",...t,...g==null?void 0:g.container,children:e.map((d,f)=>r.jsx(c.View,{ref:u=>{l.current[f]=u},onMouseDown:u=>i(u,f),onTouchStart:u=>i(u,f),position:"relative",cursor:"grab",transition:"transform 0.2s",...n,...g==null?void 0:g.item,children:o?o(d,f):d},f))}),Pi=e=>{const{items:o,draggedIndex:t,itemRefs:n,handleDragStart:a}=Pm(e);return r.jsx(Dm,{...e,items:o,draggedIndex:t,itemRefs:n,handleDragStart:a})},$m=Pi,Lm=({onFileSelect:e,onMultipleFileSelect:o,validateFile:t,accept:n,multiple:a,disabled:l,previewUrl:i})=>{const[g,s]=h.useState(!1),[d,f]=h.useState(null),u=h.useRef(null),m=i!==void 0?i:d;h.useEffect(()=>()=>{d&&URL.revokeObjectURL(d)},[d]);const p=h.useCallback(T=>{T.preventDefault(),T.stopPropagation(),!l&&s(!0)},[l]),y=h.useCallback(T=>{T.preventDefault(),T.stopPropagation(),!l&&s(!1)},[l]),x=h.useCallback(T=>{T.preventDefault(),T.stopPropagation(),!l&&s(!0)},[l]),b=h.useCallback(T=>{if(!T||T.length===0)return;const w=Array.from(T);if(!a&&w.length>0){const F=w[0];if(F.type.startsWith("image/")){const v=URL.createObjectURL(F);f(z=>(z&&URL.revokeObjectURL(z),v))}else f(null)}a?o&&o(w):w.length>0&&e&&e(w[0])},[a,o,e]),C=h.useCallback(T=>{T.preventDefault(),T.stopPropagation(),s(!1),!l&&T.dataTransfer.files&&T.dataTransfer.files.length>0&&(b(T.dataTransfer.files),T.dataTransfer.clearData())},[l,b]),k=h.useCallback(()=>{var T;l||(T=u.current)==null||T.click()},[l]),S=h.useCallback(T=>{b(T.target.files),T.target.value&&(T.target.value="")},[b]);return{isDragActive:g,handleDragEnter:p,handleDragLeave:y,handleDragOver:x,handleDrop:C,handleClick:k,handleFileChange:S,inputRef:u,preview:m}},Bm={position:"absolute",top:"-4px",right:"-4px",width:"16px",height:"16px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.5)",color:"white",border:"none",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",fontSize:"12px",zIndex:10,_hover:{backgroundColor:"rgba(0, 0, 0, 0.7)"}},Di=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:i={}})=>{if(e.length===0)return null;const g=h.useCallback(d=>d<1024?`${d} B`:d<1024*1024?`${(d/1024).toFixed(1)} KB`:`${(d/(1024*1024)).toFixed(1)} MB`,[]),s=h.useCallback(d=>d.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:d.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:d.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(c.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...i==null?void 0:i.container,children:e.map((d,f)=>{const u=typeof URL<"u"&&typeof URL.createObjectURL=="function"&&typeof Blob<"u"&&d instanceof Blob,m=(d==null?void 0:d.path)||(d==null?void 0:d.url)||(l&&u?URL.createObjectURL(d):""),p=d.type.startsWith("image/"),y=d.type.startsWith("video/"),x=d.type.startsWith("audio/"),b=s(d);return l?r.jsx(c.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...i==null?void 0:i.item,children:l&&r.jsxs(De,{children:[r.jsxs(De.Trigger,{children:[p&&r.jsx(c.Image,{src:m,alt:d.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(c.View,{as:"video",src:m,alt:d.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),x&&r.jsx(c.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Vo,{widthHeight:24,color:"color-black"})}),!p&&!y&&!x&&r.jsx(c.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(po,{widthHeight:24,color:"color-black"})}),t&&r.jsx(c.Button,{...Bm,onClick:C=>{C.stopPropagation(),t(f)},"aria-label":`Remove ${d.name}`,children:"×"})]}),r.jsxs(De.Content,{children:[p&&r.jsx(c.Image,{src:m,alt:d.name,maxWidth:"100%"}),y&&r.jsx(c.View,{as:"video",src:m,controls:!0,maxWidth:"100%"}),x&&r.jsx(c.View,{as:"audio",src:m,controls:!0,width:"100%"}),r.jsxs(c.Text,{marginTop:"4px",maxLines:1,width:"100%",...i==null?void 0:i.name,children:[d.name," (",g(d.size),")"]})]})]})},f):r.jsxs(c.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...i==null?void 0:i.item,children:[r.jsx(c.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:b.backgroundColor,color:b.color,children:x?r.jsx(Vo,{widthHeight:12,color:"currentColor"}):r.jsx(po,{widthHeight:12,color:"currentColor"})}),r.jsxs(c.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...i==null?void 0:i.name,children:[d.name," · ",g(d.size)]}),t&&r.jsx(c.View,{as:"button",type:"button",onClick:()=>t(f),"aria-label":`Remove ${d.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},f)})})},_m=({children:e,text:o="Drop files here or click to upload",textProps:t,containerProps:n,disabled:a,accept:l,multiple:i,isDragActive:g,handleDragEnter:s,handleDragLeave:d,handleDragOver:f,handleDrop:u,handleClick:m,handleFileChange:p,inputRef:y,preview:x,imageProps:b,selectedFiles:C,onRemove:k})=>r.jsxs(c.Center,{width:"100%",minHeight:"200px",height:C&&C.length>0?"auto":"200px",borderWidth:2,borderStyle:"dashed",borderColor:g?"theme-primary":"color-gray-300",borderRadius:12,backgroundColor:g?"#EFF6FF":"color-gray-50",flexDirection:"column",cursor:a?"not-allowed":"pointer",opacity:a?.6:1,onClick:m,onDragEnter:s,onDragLeave:d,onDragOver:f,onDrop:u,transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease",overflow:"hidden",position:"relative",padding:16,...n,children:[r.jsx("input",{type:"file",ref:y,onChange:p,accept:l,multiple:i,style:{display:"none"},disabled:a}),x&&!i?r.jsxs(c.View,{width:"100%",height:"200px",position:"relative",children:[r.jsx(c.Image,{src:x,alt:"Preview",width:"100%",height:"100%",objectFit:"contain",...b}),r.jsx(c.Center,{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.3)",opacity:0,_hover:{opacity:1},transition:"opacity 0.2s",children:r.jsx(c.Text,{color:"white",fontWeight:600,children:"Click to replace"})})]}):r.jsxs(c.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[e||r.jsxs(c.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[r.jsx(Lt,{widthHeight:40,color:g?"theme-primary":"color-gray-500"}),r.jsx(c.Text,{marginTop:16,color:g?"theme-primary":"color-gray-600",fontWeight:500,textAlign:"center",...t,children:o})]}),i&&C&&C.length>0&&r.jsx(c.View,{marginTop:16,width:"100%",children:r.jsx(Di,{files:C,onRemove:k||(()=>{}),showPreviews:!0,layout:"inline",maxHeight:"160px"})})]})]}),Om=e=>{const o=Lm(e);return r.jsx(_m,{...e,...o})},Nm=(e=!1)=>{const[o,t]=h.useState(e),[n,a]=h.useState(null);return h.useEffect(()=>{const l=s=>{!s.composedPath().some(u=>(u==null?void 0:u.id)==="dropdown-menu"||(u==null?void 0:u.id)==="dropdown-trigger")&&o&&(t(!1),a(null))},i=()=>{o&&(t(!1),a(null))},g=s=>{s.key==="Escape"&&o&&(t(!1),a(null))};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",l),window.addEventListener("resize",i),document.addEventListener("keydown",g),()=>{document.removeEventListener("mousedown",l),window.removeEventListener("resize",i),document.removeEventListener("keydown",g)}},[o]),{isOpen:o,setIsOpen:t,activeSubmenuId:n,setActiveSubmenuId:a}},qm={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},Um={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Gm={hover:{backgroundColor:"color-gray-100"}},$i=h.createContext({isOpen:!1,setIsOpen:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null}}),Ym=({children:e,value:o})=>r.jsx($i.Provider,{value:o,children:e}),In=()=>{const e=h.useContext($i);if(!e)throw new Error("useDropdownMenuContext must be used within a DropdownMenuProvider");return e},Li=({children:e,views:o,...t})=>{const{isOpen:n,setIsOpen:a,triggerRef:l}=In(),i=g=>{g.stopPropagation(),a(!n)};return r.jsx(c.View,{ref:l,id:"dropdown-trigger",onClick:i,cursor:"pointer",position:"relative",display:"inline-block",...o==null?void 0:o.container,...t,children:e})},Fn=({items:e,side:o="bottom",align:t="start",views:n,...a})=>{const{isOpen:l,variant:i,triggerRef:g}=In(),s=h.useRef(null),{ref:d,relation:f}=c.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[u,m]=h.useState({x:0,y:0,placement:o});if(h.useEffect(()=>{g.current&&d&&(d.current=g.current)},[g,d,l]),h.useEffect(()=>{if(l&&s.current&&g.current){const x=g.current.getBoundingClientRect();let b=o;f&&(o==="bottom"&&f.space.vertical==="top"?b="top":o==="top"&&f.space.vertical==="bottom"?b="bottom":o==="right"&&f.space.horizontal==="left"?b="left":o==="left"&&f.space.horizontal==="right"&&(b="right"));let C=0,k=0;switch(b){case"bottom":C=t==="start"?x.left:t==="end"?x.right-180:x.left+x.width/2-90,k=x.bottom+8;break;case"top":C=t==="start"?x.left:t==="end"?x.right-180:x.left+x.width/2-90,k=x.top-8;break;case"right":C=x.right+8,k=t==="start"?x.top:t==="end"?x.bottom-100:x.top+x.height/2-50;break;case"left":C=x.left-8,k=t==="start"?x.top:t==="end"?x.bottom-100:x.top+x.height/2-50;break}m({x:C,y:k,placement:b})}},[l,o,t,g,f]),!l)return null;const y=(()=>{const x={position:"fixed",left:u.x,top:u.y,zIndex:1e3};switch(u.placement){case"top":return{...x,transform:"translateY(-100%)"};case"left":return{...x,transform:"translateX(-100%)"};case"bottom":case"right":default:return x}})();return r.jsx(c.View,{ref:s,id:"dropdown-menu",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:y,...Um[i],...n==null?void 0:n.menu,...a,children:e.map((x,b)=>x.divider?r.jsx(_i,{views:n},`divider-${b}`):r.jsx(Bi,{item:x,views:n},x.id))})},Bi=({item:e,views:o,...t})=>{const{activeSubmenuId:n,setActiveSubmenuId:a,size:l}=In(),[i,g]=h.useState(!1),s=e.items&&e.items.length>0,d=n===e.id,f=h.useRef(null),u=()=>{g(!0),s&&a(e.id)},m=()=>{g(!1)},p=y=>{y.stopPropagation(),!e.disabled&&!s&&e.onClick&&e.onClick()};return r.jsxs(c.View,{ref:f,display:"flex",alignItems:"center",cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.5:1,position:"relative",...qm[l],_hover:e.disabled?{}:Gm.hover,backgroundColor:i&&!e.disabled?"color-gray-100":"transparent",onMouseEnter:u,onMouseLeave:m,onClick:p,...o==null?void 0:o.item,...t,children:[e.icon&&r.jsx(c.View,{marginRight:8,...o==null?void 0:o.icon,children:e.icon}),r.jsx(c.View,{flexGrow:1,children:e.label}),s&&r.jsx(c.View,{marginLeft:8,...o==null?void 0:o.submenuIndicator,children:r.jsx(we,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),d&&s&&r.jsx(Fn,{items:e.items||[],side:"right",align:"start",views:o})]})},_i=({views:e,...o})=>r.jsx(c.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.divider,...o}),Km=({trigger:e,items:o,side:t="bottom",align:n="start",views:a,themeMode:l,...i})=>r.jsxs(c.View,{position:"relative",display:"inline-block",...a==null?void 0:a.container,...i,children:[r.jsx(Li,{views:a,children:e}),r.jsx(Fn,{items:o,side:t,align:n,views:a})]}),Yo=({trigger:e,items:o,size:t="md",variant:n="default",side:a="bottom",align:l="start",defaultOpen:i=!1,views:g,...s})=>{const{isOpen:d,setIsOpen:f,activeSubmenuId:u,setActiveSubmenuId:m}=Nm(i),p=h.useRef(null);return r.jsx(Ym,{value:{isOpen:d,setIsOpen:f,activeSubmenuId:u,setActiveSubmenuId:m,size:t,variant:n,triggerRef:p},children:r.jsx(Km,{trigger:e,items:o,side:a,align:l,views:g,...s})})};Yo.Trigger=Li,Yo.Content=Fn,Yo.Item=Bi,Yo.Divider=_i;const Xm=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,isOpen:l,onOpen:i,onClose:g,closeOnSelect:s=!0,maxRecentColors:d=8,showRecentColors:f=!0,colorFormat:u}=e,[m,p]=h.useState(l??!1),[y,x]=h.useState(o??t),[b,C]=h.useState(""),[k,S]=h.useState([]),T=h.useRef(null),w=h.useRef(null);h.useEffect(()=>{o!==void 0&&x(o)},[o]),h.useEffect(()=>{l!==void 0&&p(l)},[l]),h.useEffect(()=>{if(f&&typeof localStorage<"u"){const M=localStorage.getItem("colorPicker-recentColors");if(M)try{S(JSON.parse(M))}catch{}}},[f]),h.useEffect(()=>{if(typeof document>"u"||typeof document.addEventListener!="function")return;const M=I=>{m&&T.current&&w.current&&!T.current.contains(I.target)&&!w.current.contains(I.target)&&E()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[m]);const F=h.useCallback(M=>{f&&S(I=>{const W=I.filter(V=>V!==M),D=[M,...W].slice(0,d);return typeof localStorage<"u"&&localStorage.setItem("colorPicker-recentColors",JSON.stringify(D)),D})},[f,d]),v=h.useCallback(()=>{const M=!m;p(M),M?i==null||i():g==null||g()},[m,i,g]),z=h.useCallback(M=>{x(M),F(M);const I=Zr(M,u);n==null||n(I),a==null||a(I),s&&(p(!1),g==null||g())},[n,a,s,g,F,u]),j=h.useCallback(M=>{C(M)},[]),H=h.useCallback(()=>{b&&(z(b),C(""))},[b,z]),E=h.useCallback(()=>{p(!1),g==null||g()},[g]);return{isOpen:m,selectedColor:y,recentColors:k,customColor:b,handleToggle:v,handleColorSelect:z,handleCustomColorChange:j,handleCustomColorSubmit:H,handleClose:E,triggerRef:T,dropdownRef:w}},Ko={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},dropdown:{position:"absolute",top:"calc(100% + 8px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.14)",padding:"16px",minWidth:"320px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(6, 36px)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"12px",marginBottom:"16px"},customInput:{marginBottom:"12px"},recentColors:{borderTop:"1px solid color-gray-100",paddingTop:"12px"}},Jm={xs:{height:"32px",fontSize:"12px",padding:"4px 8px"},sm:{height:"40px",fontSize:"12px",padding:"8px 10px"},md:{height:"44px",fontSize:"14px",padding:"10px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 14px"},xl:{height:"56px",fontSize:"18px",padding:"14px 16px"}},Qm={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Zm={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"}},Rm=[{name:"Blue",value:"#1D4ED8",category:"primary"},{name:"Purple",value:"#A855F7",category:"primary"},{name:"Green",value:"#22C55E",category:"primary"},{name:"Orange",value:"#F97316",category:"primary"},{name:"Red",value:"#EF4444",category:"primary"},{name:"Ink",value:"#111827",category:"neutral"}],ep=typeof navigator<"u"&&navigator.product!=="ReactNative"&&typeof document<"u"&&typeof document.createElement=="function",op=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:l={},size:i="md",shape:g="default",variant:s="default",error:d=!1,isDisabled:f=!1,isReadOnly:u=!1,predefinedColors:m=Rm,showCustomInput:p=!0,showRecentColors:y=!0,isOpen:x,selectedColor:b,recentColors:C,customColor:k,handleToggle:S,handleColorSelect:T,handleCustomColorChange:w,handleCustomColorSubmit:F,handleClose:v,triggerRef:z,dropdownRef:j,onChange:H,onChangeComplete:E,onOpen:M,onClose:I,colorFormat:W,maxRecentColors:D,closeOnSelect:V,defaultValue:P,value:_,...q})=>{const N={...Ko.container,...l==null?void 0:l.container},G={...Ko.trigger,...Jm[i],...Qm[g],...Zm[s],...d&&{borderColor:"color-red-500"},...f&&{opacity:.6,cursor:"not-allowed"},...!f&&!u&&{_hover:{borderColor:"color-gray-400"}},...l==null?void 0:l.trigger},X={...Ko.dropdown,...l==null?void 0:l.dropdown},$={...Ko.colorGrid,...l==null?void 0:l.colorGrid},O={...Ko.recentColors,...l==null?void 0:l.recentColors},B=b||"color-gray-200";return r.jsxs(c.View,{id:e,...N,...q,children:[t&&r.jsx(c.Text,{fontSize:"12px",lineHeight:"16px",fontWeight:"500",color:"color-gray-600",marginBottom:"6px",...l==null?void 0:l.label,children:t}),r.jsxs(c.View,{ref:z,onClick:f||u?void 0:S,...G,children:[r.jsxs(c.Horizontal,{alignItems:"center",gap:8,children:[r.jsx(c.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:B,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"}),r.jsx(c.Text,{color:b?"color-gray-900":"color-gray-500",fontSize:"inherit",children:b||n})]}),!u&&!f&&r.jsx(we,{widthHeight:16,color:"color-gray-500",orientation:x?"up":"down"})]}),x&&r.jsxs(c.View,{ref:j,...X,children:[r.jsx(c.View,{...$,children:m.map((L,U)=>r.jsx(c.View,{width:"36px",height:"36px",borderRadius:"8px",backgroundColor:L.value,borderWidth:"1px",borderStyle:"solid",borderColor:b===L.value?"theme-primary":"transparent",cursor:"pointer",onClick:()=>T(L.value),title:L.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"},...l==null?void 0:l.colorSwatch},U))}),p&&r.jsxs(c.View,{...Ko.customInput,...l==null?void 0:l.customInput,children:[r.jsxs(c.Horizontal,{gap:8,alignItems:"center",marginBottom:"10px",children:[ep&&r.jsx("input",{type:"color",value:k||"#1D4ED8",onChange:L=>{const U=L.target.value;w(U),T(U)},style:{width:"36px",height:"36px",border:"1px solid #E5E7EB",borderRadius:"8px",cursor:"pointer",backgroundColor:"transparent"},title:"Pick a color"}),r.jsx(c.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:"HEX"})]}),r.jsx($e,{placeholder:"#1D4ED8",value:k,onChange:L=>{var U;return w(typeof L=="string"?L:((U=L==null?void 0:L.target)==null?void 0:U.value)??"")},onKeyPress:L=>{L.key==="Enter"&&F()},size:"sm",right:k&&r.jsx(c.View,{width:"18px",height:"18px",borderRadius:"6px",backgroundColor:k,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",onClick:F})})]}),y&&C.length>0&&r.jsxs(c.View,{...O,children:[r.jsx(c.Text,{fontSize:"11px",lineHeight:"16px",fontWeight:"500",color:"color-gray-500",marginBottom:"8px",children:"Recent Colors"}),r.jsx(c.Horizontal,{gap:8,flexWrap:"wrap",children:C.map((L,U)=>r.jsx(c.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:L,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>T(L),title:L,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"}},U))})]})]}),a&&r.jsx(c.Text,{fontSize:"11px",lineHeight:"16px",color:d?"color-red-500":"color-gray-500",marginTop:"4px",...l==null?void 0:l.helperText,children:a})]})},Oi=e=>{const o=Xm(e);return r.jsx(op,{...o,...e})},Ni=e=>{const o=di(e);return r.jsx(gi,{...o,...e})},rp=["paragraph","h1","h2","h3","bullet","number","quote","codeBlock","table"];function kr(e){const o=e.trim();return!!o&&!/[\u0000-\u0020\u007f\\]/.test(o)&&(!/^[a-z][a-z\d+.-]*:/i.test(o)||/^(https?:|mailto:|tel:)/i.test(o))}function To(e,o=0,t=0){var i;if(t>20)return[{kind:"text",text:e,start:o,end:o+e.length}];const n=[];let a=0;const l=(g,s,d)=>n.push({kind:"text",text:g,start:o+s,end:o+d});for(;a<e.length;){if(e[a]==="\\"&&/[\\`*{}\[\]()#+.!_>~|]/.test(e[a+1]||"")){l(e[a+1],a+1,a+2),a+=2;continue}const g=/^<br\s*\/?\s*>/i.exec(e.slice(a));if(g){n.push({kind:"break",start:o+a,end:o+a+g[0].length}),a+=g[0].length;continue}const s=/^`+/.exec(e.slice(a));if(s){const m=e.indexOf(s[0],a+s[0].length);if(m>=0){n.push({kind:"code",text:e.slice(a+s[0].length,m),start:o+a,end:o+m+s[0].length,contentStart:o+a+s[0].length}),a=m+s[0].length;continue}}const d=/^\[([^\]\n]+)\]\(([^\s()]*)\)/.exec(e.slice(a));if(d){n.push({kind:"link",start:o+a,end:o+a+d[0].length,url:d[2],children:To(d[1],o+a+1,t+1)}),a+=d[0].length;continue}const f=[["***","***","bold"],["**","**","bold"],["__","__","bold"],["~~","~~","strikethrough"],["<u>","</u>","underline"],["`","`","code"],["*","*","italic"],["_","_","italic"]];let u=!1;for(const[m,p,y]of f){if(!e.startsWith(m,a))continue;let x=e.indexOf(p,a+m.length);for(;x>=0&&e[x-1]==="\\";)x=e.indexOf(p,x+p.length);if((m==="*"||m==="_")&&e.startsWith(m+m,x)){const k=e.indexOf(m+m,x+2);k>=0&&(x=e.indexOf(m,k+2))}if((m==="**"||m==="__")&&e[x+2]===m[0]&&(((i=e.slice(a+2,x).match(new RegExp(`\\${m[0]}(?!\\${m[0]})`,"g")))==null?void 0:i.length)||0)%2===1&&x++,x<=a+m.length||m==="_"&&/\w/.test(e[a-1]||"")&&/\w/.test(e[x+1]||""))continue;const b=e.slice(a+m.length,x);let C=y==="code"?void 0:To(b,o+a+m.length,t+1);m==="***"&&(C=[{kind:"italic",start:o+a+2,end:o+x+1,children:C}]),n.push({kind:y,start:o+a,end:o+x+p.length,text:y==="code"?b:void 0,children:C}),u=!0,a=x+p.length;break}u||(l(e[a],a,a+1),a++)}return n.reduce((g,s)=>{const d=g[g.length-1];return(d==null?void 0:d.kind)==="text"&&s.kind==="text"&&d.end===s.start?(d.text+=s.text,d.end=s.end):g.push(s),g},[])}function at(e,o=[],t){var p,y,x;const n=e.replace(/^ {0,3}(`{3,}|~{3,})[^\n]*\n[\s\S]*?^ {0,3}\1\s*$/gm,"").replace(/`[^`\n]*`/g,""),a=/^(?:import |export |-{3,}\s*$|\+\+\+\s*$|\s*:::|\s*\[.+\]:|\s*#{4,}\s|\s*(?:\*\s*){3,}$|\s*(?:-\s*){3,}$|\s*(?:_\s*){3,}$|\s*={3,}\s*$)|!\[|\[\^[^\]]+\]|\$\$|\{[^}\n]*\}|<(?!(?:\/?u>|br\s*\/?>))\/?[A-Za-z!]|&(?:#\w+|\w+);/m.test(n)||/^[ \t]{2,}(?:`{3,}|~{3,})/m.test(e)||/^(?:>[ \t]*>| {1,3}#{1,6}\s|#{1,6}\t|[ \t]{2,}(?:>|#{1,6}\s|\|)|[ \t]*(?:[-*+] |\d+[.)] )\[[ xX]\])|(?: {2,}|\\)\r?$/m.test(n)||Array.from(n.matchAll(/\[[^\]\n]+\]\(([^)\n]*)\)/g)).some(b=>/[\s(]/.test(b[1])||!kr(b[1])),l=[],i=/[^\r\n]+|\r\n|\n|\r/g;let g=0;for(const b of e.matchAll(i))/^[\r\n]/.test(b[0])&&(l.push({text:e.slice(g,b.index),start:g,end:b.index}),g=b.index+b[0].length);(g<e.length||!l.length)&&l.push({text:e.slice(g),start:g,end:e.length});const s=[],d=new Set;let f=a;const u=/^\s*(?:[-*+] |\d+[.)] )/,m=/^\s*\|?\s*:?-{3,}:?\s*(?:\|\s*:?-{3,}:?\s*)+\|?\s*$/;for(let b=0;b<l.length;){if(!l[b].text.trim()){const W=b;for(;b<l.length&&!l[b].text.trim();)b++;const D=b-W,V=!s.length,P=V?Math.floor(D/2)+(b===l.length?1:0):b===l.length?Math.ceil(D/2):Math.floor(D/2);for(let _=0;_<P;_++){const q=((p=l[W+_*2+(V?0:1)])==null?void 0:p.start)??e.length,N=((y=o.find(G=>!G.raw&&!d.has(G.id)))==null?void 0:y.id)||Eo("block");d.add(N),s.push({id:N,kind:"paragraph",raw:"",body:"",start:q,end:q,bodyStart:q})}continue}const C=l[b];let k=b,S="paragraph",T=0,w;const F=/^(#{1,3}) (.*)$/.exec(C.text),v=/^ {0,3}(`{3,}|~{3,})([\w+-]*)\s*$/.exec(C.text);if(F)S=`h${F[1].length}`,T=F[1].length+1;else if(v){for(S="codeBlock",w=v[2],k++;k<l.length&&!new RegExp(`^ {0,3}${v[1][0]}{${v[1].length},}\\s*$`).test(l[k].text);)k++;k>=l.length&&(f=!0,k=l.length-1),T=C.end-C.start+(e.slice(C.end,C.end+2)===`\r
27
+ `?2:1)}else if(b+1<l.length&&C.text.includes("|")&&m.test(l[b+1].text))for(S="table",k=b+1;k+1<l.length&&l[k+1].text.trim()&&l[k+1].text.includes("|");)k++;else if(u.test(C.text)){for(S=/^\s*\d/.test(C.text)?"number":"bullet";k+1<l.length&&l[k+1].text.trim()&&(u.test(l[k+1].text)||/^\s{2,}\S/.test(l[k+1].text));)k++;T=C.text.match(u)[0].length}else if(/^> ?/.test(C.text))for(S="quote",T=C.text.match(/^> ?/)[0].length;k+1<l.length&&/^> ?/.test(l[k+1].text);)k++;else{for(;k+1<l.length&&l[k+1].text.trim()&&!/^(?:#{1,6} |>|`{3}|~{3})/.test(l[k+1].text)&&!u.test(l[k+1].text);)k++;/^ {4}\S/.test(C.text)&&(f=!0)}const z=e.slice(C.start,l[k].end),j=o.find(W=>W.id===t&&W.start===C.start&&!d.has(W.id)),H=o[s.length],E=j||o.find(W=>W.raw===z&&!d.has(W.id))||(H&&!d.has(H.id)&&e.indexOf(H.raw,l[k].end)<0?H:void 0),M=(E==null?void 0:E.id)||Eo("block");d.add(M);let I=z.slice(T);S==="codeBlock"&&(I=e.slice(C.start+T,l[k].start).replace(/\r?\n$/,"")),s.push({id:M,kind:S,raw:z,start:C.start,end:l[k].end,body:I,bodyStart:C.start+T,language:w}),b=k+1}return s.length||s.push({id:((x=o[0])==null?void 0:x.id)||Eo("block"),kind:"paragraph",raw:"",body:"",start:e.length,end:e.length,bodyStart:e.length}),{blocks:s,sourceMode:f}}function eo(e,o,t){const n=Math.max(0,Math.min(o.start,e.length)),a=Math.max(n,Math.min(o.end,e.length));return e.slice(0,n)+t+e.slice(a)}function tp(e,o){const t=e.kind==="codeBlock"?e.body:e.raw.replace(/^(?:#{1,3} |\s*[-*+] |\s*\d+[.)] |> ?)/gm,"");if(o==="codeBlock"){const a="`".repeat(Math.max(3,...Array.from(t.matchAll(/`+/g),l=>l[0].length+1)));return`${a}
28
+ ${t}
29
+ ${a}`}if(o==="table")return`| Column 1 | Column 2 | Column 3 |
30
+ | --- | --- | --- |
31
+ | `+t.replace(/\|/g,"\\|").replace(/\r?\n/g," ")+" | | |";const n={paragraph:"",h1:"# ",h2:"## ",h3:"### ",bullet:"- ",number:"1. ",quote:"> "}[o];return t.split(/\r?\n/).map((a,l)=>o==="number"?`${l+1}. ${a}`:n+a).join(`
32
+ `)}function qi(e,o){const t={...o},n=a=>{var d,f,u,m;(d=a.children)==null||d.forEach(n);const l=(f=a.children)==null?void 0:f[0],i=(u=a.children)==null?void 0:u[a.children.length-1],g=a.kind==="code"?a.contentStart:l==null?void 0:l.start,s=a.kind==="code"?a.contentStart+(((m=a.text)==null?void 0:m.length)||0):i==null?void 0:i.end;g!==void 0&&s!==void 0&&t.start<=g&&t.end>=s&&(t.start=Math.min(t.start,a.start),t.end=Math.max(t.end,a.end))};return e.filter(a=>a.kind!=="codeBlock"&&o.start<a.end&&o.end>a.start).forEach(a=>To(a.raw,a.start).forEach(n)),t}function np(e,o,t,n,a){const l=[];for(const d of o){if(d.kind==="codeBlock"||d.end<=t.start||d.start>=t.end)continue;let f=d.start;d.raw.split(/\r?\n/).forEach((u,m)=>{var x;const p=f;f+=u.length+(d.raw.includes(`\r
33
+ `)?2:1);const y=(b,C)=>{const k={start:Math.max(t.start,b),end:Math.min(t.end,C)};k.end>k.start&&l.push(k)};if(d.kind==="table"){if(m===1)return;let b=u.startsWith("|")?1:0;for(let C=b;C<=u.length;C++)if(C===u.length||u[C]==="|"&&u[C-1]!=="\\"){const k=u.slice(b,C),S=k.trim(),T=p+b+k.indexOf(S);y(T,T+S.length),b=C+1}}else{const b=((x=u.match(/^(?:#{1,3} |\s*(?:[-*+] |\d+[.)] )|> ?)/))==null?void 0:x[0].length)||0;y(p+b,p+u.length)}})}let i=e;const g={...t},s=l.length>0&&l.every(d=>zn(e,d,n,a).removed);for(const d of l.reverse()){const f=zn(i,d,n,a);!s&&f.removed||(g.end=d.end===t.end?f.selection.end:g.end+f.value.length-i.length,d.start===t.start&&(g.start=f.selection.start),i=f.value)}return{value:i,selection:g}}function zn(e,o,t,n){const a={bold:["**","**"],italic:["*","*"],underline:["<u>","</u>"],strikethrough:["~~","~~"],code:["`","`"]};let[l,i]=t==="link"?["[",`](${n})`]:a[t]||["",""];const g=e.slice(o.start,o.end)||t==="link"&&n||"",s=To(g);if(t!=="link"&&s.length===1&&s[0].kind===t&&s[0].end===g.length){const m=t==="code"?s[0].contentStart:l.length,p=t==="code"?m:i.length,y=g.slice(m,g.length-p);return{removed:!0,value:eo(e,o,y),selection:{start:o.start,end:o.start+y.length}}}if(t==="code"&&(l=i="`".repeat(Math.max(1,...Array.from(g.matchAll(/`+/g),m=>m[0].length+1)))),e.slice(o.start-l.length,o.start)===l&&e.slice(o.end,o.end+i.length)===i)return{removed:!0,value:eo(e,{start:o.start-l.length,end:o.end+i.length},g),selection:{start:o.start-l.length,end:o.end-l.length}};const d=[],f=m=>{var y;if((y=m.children)==null||y.forEach(f),m.kind!==t)return;const p=t==="code"?m.contentStart-m.start:l.length;d.push({start:m.start,end:m.start+p},{start:t==="link"?m.children[m.children.length-1].end:m.end-(t==="code"?p:i.length),end:m.end})};s.forEach(f);let u=g;return d.sort((m,p)=>p.start-m.start).forEach(m=>{u=u.slice(0,m.start)+u.slice(m.end)}),{value:eo(e,o,l+u+i),selection:{start:o.start+l.length,end:o.start+l.length+u.length}}}const Mn=/^(\s*)([-*+] |\d+[.)] )/;function Cr(e,o){var t,n,a,l;for(const i of To(e)){const g=((n=(t=i.children)==null?void 0:t[0])==null?void 0:n.start)??i.contentStart,s=((l=(a=i.children)==null?void 0:a[i.children.length-1])==null?void 0:l.end)??(g===void 0?void 0:i.end-(g-i.start));if(g!==void 0&&s!==void 0&&o>=g&&o<=s){const[d,f]=Cr(e.slice(g,s),o-g),u=m=>m?e.slice(i.start,g)+m+e.slice(s,i.end):"";return[e.slice(0,i.start)+u(d),u(f)+e.slice(i.end)]}i.kind==="text"&&o===i.start&&e[o-1]==="\\"&&o--}return[e.slice(0,o),e.slice(o)]}function oo(e,o,t,n){return{value:eo(e,o,t),selection:{start:n,end:n}}}function Ui(e,o,t,n=!1){var m,p,y;const a=o.find(x=>t.start>=x.start&&t.end<=x.end);if(!a)return null;const l=a.raw.includes(`\r
34
+ `)||e.includes(`\r
35
+ `)?`\r
36
+ `:`
37
+ `;if(a.kind==="codeBlock"||a.kind==="table"||n){if(a.kind==="table"&&/[|\r\n]/.test(e.slice(t.start,t.end)))return null;const x=a.kind==="codeBlock"?l:"<br>";return oo(e,t,x,t.start+x.length)}const i=t.start-a.start,g=t.end-a.start;let s,d;if(a.kind==="bullet"||a.kind==="number"){const x=a.raw.lastIndexOf(`
38
+ `,Math.max(0,i-1))+1,b=a.raw.indexOf(`
39
+ `,g),C=b<0?a.raw.length:b,k=a.raw.slice(x,a.raw.indexOf(`
40
+ `,i)<0?a.raw.length:a.raw.indexOf(`
41
+ `,i)).replace(/\r$/,""),S=((m=k.match(Mn))==null?void 0:m[0])||"",T=a.raw.lastIndexOf(`
42
+ `,Math.max(0,g-1))+1,w=a.raw.slice(T,C).replace(/\r$/,""),F=((p=w.match(Mn))==null?void 0:p[0])||"";s=Cr(k.slice(S.length),Math.max(0,i-x-S.length))[0],d=Cr(w.slice(F.length),Math.max(0,g-T-F.length))[1];const v=a.raw.slice(0,x).replace(/\r?\n$/,"");let z=a.raw.slice(C).replace(/^\r?\n/,"");if(!s&&!d){if(/^\s/.test(S)){const M=S.replace(/^(?: {1,2}|\t)/,""),I=[v,M,z].filter((W,D)=>W||D===1).join(l);return oo(e,a,I,a.start+(v?v.length+l.length:0)+M.length)}const E=[v,"",z].filter((M,I)=>M||I===1).join(l+l);return oo(e,a,E,a.start+(v?v.length+l.length*2:0))}const j=S.replace(/(\d+)([.)] )$/,(E,M,I)=>`${Number(M)+1}${I}`);if(/\d+[.)] $/.test(S)){const E=((y=S.match(/^\s*/))==null?void 0:y[0])||"";z=z.split(l).map(M=>M.replace(/^(\s*)(\d+)([.)] )/,(I,W,D,V)=>W===E?W+(Number(D)+1)+V:I)).join(l)}const H=[v,S+s,j+d,z].filter((E,M)=>E||M===1||M===2).join(l);return oo(e,a,H,a.start+(v?v.length+l.length:0)+S.length+s.length+l.length+j.length)}const f=a.raw.slice(0,a.bodyStart-a.start);s=Cr(a.body,Math.max(0,i-f.length))[0],d=Cr(a.body,Math.max(0,g-f.length))[1],!s&&d?d=f+d:(s=f+s,a.kind==="quote"&&d&&(d="> "+d));const u=s+l+l+d;return oo(e,a,u,a.start+s.length+l.length*2+(!s&&d?f.length:a.kind==="quote"&&d?2:0))}function ap(e){return e.kind==="codeBlock"?e.body.split(/\r?\n/).map(o=>{if(!o)return"";const t="`".repeat(Math.max(1,...Array.from(o.matchAll(/`+/g),n=>n[0].length+1)));return t+o+t}).join("<br>"):(e.kind==="quote"?e.raw.replace(/^> ?/gm,""):e.kind==="bullet"||e.kind==="number"?e.raw.replace(/^(\s*)([-*+] |\d+[.)] )/gm,""):e.body).replace(/\r?\n/g,"<br>")}function Gi(e,o,t,n){var d,f;const a=o.findIndex(u=>u.id===t),l=o[a],i=o[a-1];if(l&&n!==void 0&&(l.kind==="bullet"||l.kind==="number")){const u=l.raw.lastIndexOf(`
43
+ `,n-l.start-1)+1,m=(d=l.raw.slice(u).match(Mn))==null?void 0:d[0];if(!u||!m)return null;const p=u-(l.raw[u-2]==="\r"?2:1);let y=l.raw.slice(u+m.length);if(/\d+[.)] $/.test(m)){const x=((f=m.match(/^\s*/))==null?void 0:f[0])||"";y=y.replace(/(\r?\n)([ \t]*)(\d+)([.)] )/g,(b,C,k,S,T)=>k===x?C+k+Math.max(1,Number(S)-1)+T:b)}return oo(e,l,l.raw.slice(0,p)+y,l.start+p)}if(!l||!i||l.kind==="table"||i.kind==="table")return null;if(!i.raw)return oo(e,{start:i.start,end:l.end},l.raw,i.start+l.bodyStart-l.start);let g=ap(l);const s=i.kind==="codeBlock"?i.bodyStart+i.body.length:i.end;if(i.kind==="codeBlock"){const u=p=>p.map(y=>y.children?u(y.children):y.kind==="break"?`
44
+ `:y.text||"").join("");g=l.kind==="codeBlock"?l.body:u(To(g));const m=eo(i.raw,{start:s-i.start,end:s-i.start},g);return oo(e,{start:i.start,end:l.end},m,s)}return oo(e,{start:i.end,end:l.end},g,s)}const Yi={document:"Document",paragraph:"Paragraph",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",bullet:"Bulleted list",number:"Numbered list",quote:"Quote",codeBlock:"Code block",table:"Table",blocks:"Blocks /",below:"Insert below",duplicate:"Duplicate",delete:"Delete",up:"Move up",down:"Move down",drag:"Drag block",bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",code:"Inline code",link:"Link",linkUrl:"Link address",invalidLink:"Enter an http, https, mailto, tel or relative link.",undo:"Undo",redo:"Redo",source:"Markdown source",visual:"Visual editor",emoji:"Insert emoji",sourceFallback:"This Markdown contains syntax that visual editing cannot preserve. Edit its source instead.",selectionToolbar:"Selection actions",askSelection:"Edit selection with AI",askSection:"Edit document with AI",aiPanel:"AI proposal",instruction:"Describe the change",generating:"Preparing proposal…",aiError:"Generation failed. Your text is unchanged.",proposal:"Proposal",apply:"Apply",discard:"Discard",cancel:"Close",retry:"Retry",generate:"Generate",stale:"The document has changed. Select the text again before generating a proposal.",selectionRequired:"Select text inside this editor first.",save:"Save",empty:"Write something…"};function lp(e){const o=e.value??e.defaultValue??"",t=h.useId(),[n,a]=h.useState(o),[l,i]=h.useState(()=>{const Y=at(o);return Y.blocks.forEach((R,ae)=>{R.id=`${t}-block-${ae}`}),Y}),[g,s]=h.useState({start:0,end:0}),[d,f]=h.useState(0),[u,m]=h.useState(!1),[p,y]=h.useState(null),[x,b]=h.useState(null),[C,k]=h.useState(!1),[S,T]=h.useState(""),[w,F]=h.useState(""),[v,z]=h.useState(null),[j,H]=h.useState(0),E={...Yi,...e.labels},M=!!(e.isDisabled||e.isReadOnly),I=h.useRef({value:o,selection:g}),W=h.useRef(l),D=h.useRef({undo:[],redo:[],lastInput:0}),V=h.useRef(0),P=h.useRef(!1),_=h.useRef(!1),q=h.useRef(null),N=h.useRef(0),G=h.useRef(e);G.current=e;const X=h.useRef(v);X.current=v;const $=h.useRef(!0);h.useEffect(()=>($.current=!0,()=>{$.current=!1,N.current++}),[]);const O=Y=>{const R={start:Math.max(0,Math.min(Y.start,I.current.value.length)),end:Math.max(0,Math.min(Y.end,I.current.value.length)),...Y.backward?{backward:!0}:{}};R.end<R.start&&([R.start,R.end]=[R.end,R.start]),!(R.start===I.current.selection.start&&R.end===I.current.selection.end&&!!R.backward==!!I.current.selection.backward)&&(D.current.lastInput=0,I.current.selection=R,s(R))},B=(Y=I.current.selection)=>{O(Y),P.current=!0,f(R=>R+1)},L=(Y,R=!0,ae)=>{const se=at(Y.value,W.current.blocks,ae);W.current=se,I.current=Y,V.current++,i(se),a(Y.value),s(Y.selection),R&&(P.current=!0,f(me=>me+1))};h.useEffect(()=>{e.value===void 0||e.value===I.current.value||(L({value:e.value,selection:{start:0,end:0}},!1),_.current=!1,P.current=!1,f(Y=>Y+1),D.current={undo:[],redo:[],lastInput:0},N.current++,z(null),b(null),k(!1),q.current=null,y(null),H(Y=>Y+1))},[e.value]),h.useEffect(()=>{M&&(_.current=!1,q.current=null,N.current++,z(null),b(null),k(!1))},[M]);const U=(Y,R=I.current.selection,ae=!1,se=!0,me)=>{var xe,Ae;if(M||Y===I.current.value)return;const ke=Date.now(),pe=D.current;(!ae||ke-pe.lastInput>750||!pe.undo.length)&&(pe.undo.push({value:I.current.value,selection:{...I.current.selection}}),pe.undo.length>100&&pe.undo.shift()),pe.lastInput=ae?ke:0,pe.redo=[],L({value:Y,selection:R},se,me),H(Ye=>Ye+1),(Ae=(xe=G.current).onChange)==null||Ae.call(xe,Y)},K=(Y,R=I.current.selection,ae=!1)=>{const se=eo(I.current.value,R,Y);U(se,{start:R.start+Y.length,end:R.start+Y.length},ae)},J=(Y,R,ae,se=!0,me=!1)=>{U(eo(I.current.value,{start:Y.start,end:Y.end},R),{start:Y.start+ae.start,end:Y.start+ae.end},se,me,Y.id)},ne=(Y=!1)=>{if(M||u||W.current.sourceMode)return!1;const R=Ui(I.current.value,W.current.blocks,I.current.selection,Y);return R?(U(R.value,R.selection),!0):!1},re=Y=>{if(M||u||W.current.sourceMode)return!1;const R=Gi(I.current.value,W.current.blocks,Y);return R?(U(R.value,R.selection),!0):!1},ce=(Y=!1)=>{var ke,pe;if(M)return;const R=D.current,ae=Y?R.redo:R.undo,se=Y?R.undo:R.redo,me=ae.pop();if(!me){B();return}se.push({value:I.current.value,selection:{...I.current.selection}}),R.lastInput=0,L(me),H(xe=>xe+1),(pe=(ke=G.current).onChange)==null||pe.call(ke,me.value)},Q=(Y,R)=>{if(M)return;const ae=W.current.blocks,se=ae.findIndex(Ae=>Ae.id===Y);if(se<0||R<0||R>=ae.length||se===R)return;const me=[...ae],[ke]=me.splice(se,1);me.splice(R,0,ke);let pe=I.current.value.slice(0,ae[0].start),xe=0;me.forEach((Ae,Ye)=>{Ae.id===Y&&(xe=pe.length+ke.bodyStart-ke.start),pe+=Ae.raw+(Ye+1<ae.length?I.current.value.slice(ae[Ye].end,ae[Ye+1].start):I.current.value.slice(ae[Ye].end))}),W.current={...W.current,blocks:me},U(pe,{start:xe,end:xe})},le=(Y,R)=>{var pe,xe;if(M)return;const ae=W.current.blocks,se=ae.findIndex(Ae=>Ae.id===Y),me=ae[se];if(!me)return;if(R==="up"||R==="down"){Q(Y,se+(R==="up"?-1:1));return}if(R==="delete"){const Ae={start:se===ae.length-1&&se>0?ae[se-1].end:me.start,end:((pe=ae[se+1])==null?void 0:pe.start)??me.end};K("",Ae);return}const ke=`
45
+
46
+ `+(R==="duplicate"?me.raw:"");K(ke,{start:me.end,end:me.end}),R==="below"&&b(((xe=W.current.blocks.find(Ae=>!Ae.raw&&Ae.start>=me.end))==null?void 0:xe.id)||null)},he=(Y,R)=>{const ae=W.current.blocks.find(me=>me.id===Y);if(!ae)return;const se=tp(ae,R);U(eo(I.current.value,{start:ae.start,end:ae.end},se),{start:ae.start+se.length,end:ae.start+se.length}),b(null)},ue=()=>{M||(q.current={value:I.current.value,selection:{...I.current.selection}},_.current=!0,T(""),F(""),k(!0))},Ce=(Y=!0)=>{const R=q.current;q.current=null,_.current=!1,k(!1),F(""),Y&&(R==null?void 0:R.value)===I.current.value&&B(R.selection)},de=(Y,R)=>{if(M||Y!=="link"&&I.current.selection.start===I.current.selection.end)return;if(Y==="link"&&q.current){if(q.current.value!==I.current.value){Ce(!1);return}O(q.current.selection)}if(Y==="link"&&!kr(R||"")){F(E.invalidLink);return}const ae=u||W.current.sourceMode||I.current.selection.start===I.current.selection.end?zn(I.current.value,I.current.selection,Y,R):np(I.current.value,W.current.blocks,I.current.selection,Y,R);U(ae.value,ae.selection),Y==="link"&&Ce(!1),F("")},ie=Y=>{if(M||!G.current.generate)return;const R=Y==="section"?{start:0,end:I.current.value.length}:I.current.selection;if(Y==="selection"&&R.start===R.end){F(E.selectionRequired);return}N.current++,z({scope:Y,target:{value:I.current.value,selection:{...R}},revision:V.current,fragment:I.current.value.slice(R.start,R.end),prompt:"",state:"prompt"})},ge=()=>{N.current++,z(null),P.current=!0,f(Y=>Y+1)},oe=async()=>{const Y=X.current;if(M||!(Y!=null&&Y.prompt.trim())||Y.state==="loading"||Y.revision!==V.current||!G.current.generate)return;const R=++N.current;X.current={...Y,state:"loading"},z(X.current);try{const ae=await G.current.generate(Y.prompt.trim(),Y.fragment,Y.scope);if(!$.current||R!==N.current)return;if(!ae.trim())throw new Error("empty-proposal");z({...Y,result:ae,state:"proposal"})}catch{$.current&&R===N.current&&z({...Y,state:"error"})}},fe=()=>{const Y=X.current;M||!(Y!=null&&Y.result)||Y.revision!==V.current||Y.target.value!==I.current.value||(K(Y.result,Y.target.selection),ge())},Z=()=>{m(Y=>!Y),P.current=!0,f(Y=>Y+1)},te=()=>{b(null),P.current=!0,f(Y=>Y+1)};return{value:n,document:l,selection:g,restoreVersion:d,restoreRequested:P,manualSource:u,toggleSource:Z,source:u||l.sourceMode,activeId:p,setActiveId:y,commandId:x,setCommandId:b,closeCommand:te,linkOpen:C,openLink:ue,closeLink:Ce,link:S,setLink:T,message:w,setMessage:F,labels:E,locked:M,capture:O,restoreSelection:B,holdSelection:_,current:I,commit:U,replace:K,editBlock:J,breakBlock:ne,mergeBackward:re,undo:ce,move:Q,action:le,transform:he,format:de,ai:v,setAi:z,openAi:ie,closeAi:ge,runAi:oe,applyAi:fe,stale:!!v&&v.revision!==V.current,canUndo:!!D.current.undo.length,canRedo:!!D.current.redo.length,historyVersion:j}}const Ki=(e,o)=>{var i,g;if(!e)return!0;const t=e.toLowerCase(),n=o.name.toLowerCase().includes(t),a=((i=o.description)==null?void 0:i.toLowerCase().includes(t))||!1,l=((g=o.keywords)==null?void 0:g.some(s=>s.toLowerCase().includes(t)))||!1;return n||a||l},ip=({open:e,onOpenChange:o,groups:t=[],commands:n=[],filter:a})=>{const[l,i]=h.useState(""),[g,s]=h.useState(0),d=h.useRef(null),f=h.useMemo(()=>a||Ki,[a]),u=h.useMemo(()=>[...t.flatMap(b=>b.commands),...n],[t,n]),m=h.useMemo(()=>l.trim()?u.filter(x=>f(l,x)):u,[u,l,f]),p=h.useMemo(()=>{if(!l)return t;const x=a||Ki;return t.map(b=>({...b,commands:b.commands.filter(C=>x(l,C))})).filter(b=>b.commands.length)},[t,l,a]);h.useEffect(()=>{s(0)},[m.length]);const y=h.useCallback(x=>{if(e)switch(x.key){case"ArrowDown":x.preventDefault(),s(b=>b<m.length-1?b+1:b);break;case"ArrowUp":x.preventDefault(),s(b=>b>0?b-1:b);break;case"Enter":x.preventDefault(),m[g]&&(m[g].onSelect(),o(!1),i(""));break;case"Escape":x.preventDefault(),o(!1),i("");break}},[e,m,g,o]);return h.useEffect(()=>{if(!(typeof document>"u"))return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[y]),h.useEffect(()=>{const x=d.current;if(x&&typeof x.querySelector=="function"&&e){const b=x.querySelector(`[data-index="${g}"]`);b&&typeof b.scrollIntoView=="function"&&b.scrollIntoView({block:"nearest"})}},[g,e]),h.useEffect(()=>{e?s(0):i("")},[e]),{search:l,setSearch:i,selectedIndex:g,setSelectedIndex:s,filteredCommands:m,filteredGroups:p,listRef:d}},cp=({onClose:e,children:o,...t})=>r.jsx(c.View,{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-dark-50-240",zIndex:9999,onClick:n=>{n.target===n.currentTarget&&(e==null||e())},...t,children:o}),Xi=h.forwardRef(({value:e,onValueChange:o,...t},n)=>r.jsx(c.Input,{value:e,onChange:a=>{var l,i;return o(typeof a=="string"?a:((l=a==null?void 0:a.target)==null?void 0:l.value)??((i=a==null?void 0:a.nativeEvent)==null?void 0:i.text)??"")},ref:n,...t}));Xi.displayName="CommandTextInput";const sp={sm:{width:"400px",maxHeight:"300px"},md:{width:"500px",maxHeight:"400px"},lg:{width:"600px",maxHeight:"500px"}},dp=(e=>({default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},outline:{backgroundColor:"color-white",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"}}))(),gp={display:"flex",alignItems:"center",padding:"12px 16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},up={overflow:"auto",padding:"8px 0"},hp={marginBottom:"8px"},fp={padding:"8px 16px",fontSize:"12px",fontWeight:"bold",color:"color-gray-500",textTransform:"uppercase"},mp={display:"flex",alignItems:"center",padding:"8px 16px",cursor:"pointer",userSelect:"none",borderRadius:"4px",margin:"0 8px",_hover:{backgroundColor:"color-gray-100"}},pp={backgroundColor:"color-blue-50",_hover:{backgroundColor:"color-blue-100"}},yp={opacity:.5,cursor:"not-allowed",_hover:{backgroundColor:"transparent"}},bp={display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",color:"color-gray-500"},xp={display:"flex",flexDirection:"column",flex:1},kp={fontSize:"14px",fontWeight:"medium"},Cp={fontSize:"12px",color:"color-gray-500",marginTop:"2px"},wp={display:"flex",alignItems:"center",marginLeft:"12px",fontSize:"12px",color:"color-gray-500"},Sp={display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",color:"color-gray-500",textAlign:"center"},vp={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",fontSize:"12px",color:"color-gray-500"},Tp=h.createContext({search:"",setSearch:()=>{},selectedIndex:0,setSelectedIndex:()=>{},filteredCommands:[],onSelect:()=>{}}),Ip=({value:e,children:o})=>r.jsx(Tp.Provider,{value:e,children:o}),Ji=({value:e,onValueChange:o,placeholder:t="Type a command or search...",views:n,...a})=>{const l=h.useRef(null);return h.useEffect(()=>{l.current&&l.current.focus()},[]),r.jsxs(c.View,{...gp,...n==null?void 0:n.container,...a,children:[r.jsx(Pr,{widthHeight:16,color:"color-gray-400",marginRight:"8px"}),r.jsx(Xi,{width:"100%",border:"none",outline:"none",backgroundColor:"transparent",fontSize:"14px",...n==null?void 0:n.input,value:e,onValueChange:o,placeholder:t,ref:l})]})},Fp=({children:e,views:o,...t})=>r.jsx(c.View,{...up,...o==null?void 0:o.container,...t,children:e}),Qi=({heading:e,children:o,views:t,...n})=>r.jsxs(c.View,{...hp,...t==null?void 0:t.container,...n,children:[r.jsx(c.Text,{...fp,...t==null?void 0:t.heading,children:e}),o]}),jn=({item:e,selected:o=!1,onSelect:t,views:n,...a})=>{const l=()=>{!e.disabled&&t&&t()};return r.jsxs(c.Horizontal,{...mp,...o?pp:{},...e.disabled?yp:{},onPress:l,onClick:l,...n==null?void 0:n.container,...a,children:[e.icon&&r.jsx(c.View,{...bp,...n==null?void 0:n.icon,children:e.icon}),r.jsxs(c.Vertical,{...xp,...n==null?void 0:n.content,children:[r.jsx(c.Text,{...kp,...n==null?void 0:n.name,children:e.name}),e.description&&r.jsx(c.Text,{...Cp,...n==null?void 0:n.description,children:e.description})]}),e.shortcut&&r.jsx(c.Text,{...wp,...n==null?void 0:n.shortcut,children:e.shortcut})]})},Zi=({children:e="No results found.",views:o,...t})=>r.jsx(c.View,{...Sp,...o==null?void 0:o.container,...t,children:e}),zp=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:l="md",variant:i="default",emptyState:g,footer:s,search:d,setSearch:f,selectedIndex:u,setSelectedIndex:m,filteredCommands:p,filteredGroups:y,listRef:x,views:b,filter:C,...k})=>{if(!e)return null;const S=h.useCallback(v=>{v.disabled||(v.onSelect(),o(!1),f(""))},[o,f]);h.useCallback(v=>v.target===v.currentTarget&&o(!1),[o]);const T=h.useMemo(()=>({search:d,setSearch:f,selectedIndex:u,setSelectedIndex:m,filteredCommands:p,onSelect:S}),[d,u,p,S,f,m]),w=t.length>0,F=p.length===0;return r.jsx(cp,{onClose:()=>o(!1),...k,children:r.jsx(Ip,{value:T,children:r.jsxs(c.View,{borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",...sp[l],...dp[i],...b==null?void 0:b.container,onClick:v=>v.stopPropagation(),children:[r.jsx(Ji,{value:d,onValueChange:f,placeholder:a,views:b==null?void 0:b.searchInput}),r.jsx(c.View,{ref:x,flex:1,overflow:"auto",...b==null?void 0:b.list,children:F?g||r.jsx(Zi,{views:b==null?void 0:b.empty}):w?y.map(v=>r.jsx(Qi,{heading:v.name,views:b==null?void 0:b.groupHeading,children:v.commands.map(z=>{const j=p.findIndex(H=>H.id===z.id);return r.jsx(jn,{item:z,selected:j===u,onSelect:()=>S(z),"data-index":j,views:{container:b==null?void 0:b.item,icon:b==null?void 0:b.icon,content:b==null?void 0:b.content,name:b==null?void 0:b.name,description:b==null?void 0:b.description,shortcut:b==null?void 0:b.shortcut}},z.id)})},v.id)):p.map((v,z)=>r.jsx(jn,{item:v,selected:z===u,onSelect:()=>S(v),"data-index":z,views:{container:b==null?void 0:b.item,icon:b==null?void 0:b.icon,content:b==null?void 0:b.content,name:b==null?void 0:b.name,description:b==null?void 0:b.description,shortcut:b==null?void 0:b.shortcut}},v.id))}),s&&r.jsx(c.View,{...vp,...b==null?void 0:b.footer,children:s})]})})})},Io=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:l="md",variant:i="default",filter:g,emptyState:s,footer:d,views:f,...u})=>{const{search:m,setSearch:p,selectedIndex:y,setSelectedIndex:x,filteredCommands:b,filteredGroups:C,listRef:k}=ip({open:e,onOpenChange:o,groups:t,commands:n,filter:g});return r.jsx(zp,{open:e,onOpenChange:o,groups:t,commands:n,placeholder:a,size:l,variant:i,emptyState:s,footer:d,search:m,setSearch:p,selectedIndex:y,setSelectedIndex:x,filteredCommands:b,filteredGroups:C,listRef:k,views:f,...u})};Io.Input=Ji,Io.List=Fp,Io.Group=Qi,Io.Item=jn,Io.Empty=Zi;function Mp({nodes:e,native:o=!1,codeFontFamily:t="monospace",isDisplay:n=!1,onLinkPress:a}){const l=(i,g)=>{var d,f,u,m;if(o){const p={bold:{fontWeight:"700"},italic:{fontStyle:"italic"},underline:{textDecorationLine:"underline"},strikethrough:{textDecorationLine:"line-through"},code:{fontFamily:t,backgroundColor:"color-gray-100"},link:{color:"theme-primary",textDecorationLine:"underline"},text:{},break:{}};return r.jsx(c.Text,{...p[i.kind],...n&&i.kind==="link"&&kr(i.url||"")?{accessibilityRole:"link",onPress:()=>a==null?void 0:a(i.url)}:{},children:i.kind==="break"?`
47
+ `:i.children?i.children.map(l):i.text},g)}if(i.kind==="text")return r.jsx("span",{"data-source-start":i.start,"data-source-end":i.end,children:i.text},g);if(i.kind==="break")return r.jsx("br",{"data-source-start":i.start,"data-source-end":i.end},g);if(i.kind==="code")return r.jsx("code",{children:r.jsx("span",{"data-source-start":i.contentStart??i.start+1,"data-source-end":(i.contentStart??i.start+1)+(((d=i.text)==null?void 0:d.length)||0),children:i.text})},g);if(i.kind==="link")return n&&kr(i.url||"")?r.jsx(Br,{href:i.url,display:"inline",color:"theme-primary",underline:"underline",_focusVisible:{outline:"2px solid currentColor",outlineOffset:2},onClick:a?p=>{p.preventDefault(),a(i.url)}:void 0,children:(f=i.children)==null?void 0:f.map(l)},g):r.jsx("a",{href:kr(i.url||"")?i.url:void 0,onClick:p=>p.preventDefault(),children:(u=i.children)==null?void 0:u.map(l)},g);const s={bold:"strong",italic:"em",underline:"u",strikethrough:"s"}[i.kind];return h.createElement(s,{key:g},(m=i.children)==null?void 0:m.map(l))};return r.jsx(r.Fragment,{children:e.map(l)})}function Ri({block:e,native:o=!1,codeFontFamily:t="monospace",isDisplay:n=!1,onLinkPress:a}){var g,s;const l=(d,f)=>!d&&!o&&!n?r.jsx("span",{"data-source-start":f,"data-source-end":f,children:r.jsx("br",{})}):r.jsx(Mp,{nodes:To(d,f),native:o,codeFontFamily:t,isDisplay:n,onLinkPress:a});if(e.kind==="codeBlock")return o?r.jsx(c.Text,{fontFamily:t,style:o?void 0:{whiteSpace:"pre-wrap"},children:e.body}):r.jsx(c.Element,{as:"pre",margin:0,padding:12,borderRadius:8,backgroundColor:"color-gray-100",fontFamily:t,style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:n?r.jsx("code",{children:e.body}):r.jsx("span",{"data-source-start":e.bodyStart,"data-source-end":e.bodyStart+e.body.length,children:e.body||r.jsx("br",{})})});if(e.kind==="table"){const d=e.raw.split(/\r?\n/)[1],f=d.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(y=>/:\s*$/.test(y)?/^\s*:/.test(y)?"center":"right":"left");let u=e.start;const m=e.raw.split(/\r?\n/).map(y=>{const x=u;u+=y.length+(e.raw.includes(`\r
48
+ `)?2:1);const b=[];let C=y.startsWith("|")?1:0;for(let k=C;k<=y.length;k++)if(k===y.length||y[k]==="|"&&y[k-1]!=="\\"){const S=y.slice(C,k),T=S.trim();(k!==y.length||T||y[y.length-1]!=="|")&&b.push({text:T,start:x+C+S.indexOf(T)}),C=k+1}return b}).filter((y,x)=>x!==1),p=r.jsx(Fe,{children:r.jsxs(Fe.Container,{"data-table-separator":o?void 0:d,minWidth:n?Math.max((((g=m[0])==null?void 0:g.length)||0)*140,320):void 0,children:[r.jsx(Fe.Head,{children:r.jsx(Fe.Row,{children:(s=m[0])==null?void 0:s.map((y,x)=>r.jsx(Fe.HeadCell,{textAlign:f[x],children:l(y.text,y.start)},x))})}),r.jsx(Fe.Body,{children:m.slice(1).map((y,x)=>r.jsx(Fe.Row,{children:y.map((b,C)=>r.jsx(Fe.Cell,{textAlign:f[C],children:l(b.text,b.start)},C))},x))})]})});return n?r.jsx(Ti,{children:p}):p}if(e.kind==="bullet"||e.kind==="number"){let d=e.start;const f=e.raw.split(/\r?\n/).map((u,m)=>{var b;const p=d;d+=u.length+(e.raw.includes(`\r
49
+ `)?2:1);const y=/^(\s*)([-*+] |\d+[.)] )?(.*)$/.exec(u),x=l(y[3],p+y[1].length+(((b=y[2])==null?void 0:b.length)||0));return o?r.jsx(c.View,{paddingLeft:y[1].length*8,children:r.jsxs(c.Text,{children:[y[2]?/\d/.test(y[2])?y[2]:"• ":"",x]})},m):r.jsxs("li",{"data-list-indent":y[1],"data-list-marker":y[2]||"",style:{marginLeft:y[1].length*8,listStyleType:"none"},children:[y[2]&&r.jsx("span",{contentEditable:!1,"aria-hidden":"true",style:{display:"inline-block",marginLeft:-20,width:20},children:/\d/.test(y[2])?y[2]:"• "}),x]},m)});return o?r.jsx(c.View,{children:f}):e.kind==="number"?r.jsx("ol",{style:{margin:0,paddingLeft:24},children:f}):r.jsx("ul",{style:{margin:0,paddingLeft:24},children:f})}if(e.kind==="quote"){let d=e.start;const f=e.raw.split(/\r?\n/).map((u,m)=>{var x;const p=d;d+=u.length+(e.raw.includes(`\r
50
+ `)?2:1);const y=((x=u.match(/^> ?/))==null?void 0:x[0].length)||0;return r.jsxs(h.Fragment,{children:[m>0&&(o?`
51
+ `:r.jsx("br",{})),l(u.slice(y),p+y)]},m)});return o?r.jsx(c.View,{borderLeftWidth:3,borderColor:"color-gray-300",paddingLeft:12,children:r.jsx(c.Text,{children:f})}):r.jsx("blockquote",{style:{margin:0,borderLeft:"3px solid #d1d5db",paddingLeft:12},children:f})}if(o)return r.jsx(c.Text,{fontSize:e.kind==="h1"?28:e.kind==="h2"?24:e.kind==="h3"?20:16,fontWeight:e.kind==="paragraph"?"400":"700",children:l(e.body,e.bodyStart)});const i=e.kind==="paragraph"?"p":e.kind;return h.createElement(i,{style:{margin:0,minHeight:24}},e.body?l(e.body,e.bodyStart):r.jsx("span",{"data-source-start":e.bodyStart,"data-source-end":e.bodyStart,children:r.jsx("br",{})}))}function Wn({state:e,props:o,preserve:t,formatting:n=!1}){var g;const a=e.selection.start!==e.selection.end,l=t?36:44,i=(s,d,f=!1,u)=>r.jsx(ye,{type:"button",size:"sm",variant:"outline",minWidth:l,minHeight:l,paddingHorizontal:10,views:{content:{fontSize:14,fontWeight:s==="bold"?"700":"600",fontStyle:s==="italic"?"italic":"normal",textDecoration:s==="underline"?"underline":s==="strikethrough"?"line-through":void 0}},"aria-label":s==="source"&&e.source?e.labels.visual:e.labels[s],title:e.labels[s],isDisabled:e.locked||f,onPointerDown:t,onMouseDown:t?m=>m.preventDefault():void 0,onClick:d,children:u||e.labels[s]},s);return r.jsxs(c.Horizontal,{role:"toolbar","aria-label":e.labels.selectionToolbar,gap:4,flexWrap:"wrap",alignItems:"center",...(g=o.views)==null?void 0:g.toolbar,children:[n?r.jsxs(r.Fragment,{children:[[["bold","B"],["italic","I"],["underline","U"],["strikethrough","S"],["code","</>"]].map(([s,d])=>i(s,()=>e.format(s),!a,d)),i("link",e.openLink),o.generate&&i("askSelection",()=>e.openAi("selection"),!a)]}):r.jsxs(r.Fragment,{children:[i("undo",()=>e.undo(),!e.canUndo),i("redo",()=>e.undo(!0),!e.canRedo),i("source",e.toggleSource,e.document.sourceMode,e.source?e.labels.visual:e.labels.source),o.generate&&i("askSection",()=>e.openAi("section")),o.onSave&&i("save",()=>{var s;return(s=o.onSave)==null?void 0:s.call(o)})]}),r.jsx(Ni,{trigger:r.jsx(ar,{name:"smile",widthHeight:18,strokeWidth:2}),"aria-label":e.labels.emoji,isDisabled:e.locked,onPointerDown:t,onMouseDown:t?s=>s.preventDefault():void 0,onOpen:()=>{e.holdSelection.current=!0},onClose:()=>{e.holdSelection.current=!1},showRecentEmojis:!1,onChange:s=>e.replace(s),views:{container:{width:"auto"},trigger:{width:l,height:l,minHeight:l,boxSizing:"border-box",padding:0,justifyContent:"center",alignItems:"center"}}})]})}function ec({state:e,views:o,floating:t=!1}){return!e.ai&&!e.linkOpen?null:r.jsxs(c.Vertical,{padding:16,gap:12,borderWidth:t?0:1,borderColor:"color-gray-200",borderRadius:12,...o==null?void 0:o.panel,children:[e.linkOpen&&r.jsxs(c.Vertical,{as:t?"form":void 0,role:"group","aria-label":e.labels.link,gap:8,minWidth:t?260:void 0,onSubmit:t?n=>{n.preventDefault(),e.format("link",e.link.trim())}:void 0,children:[r.jsx($e,{label:e.labels.linkUrl,value:e.link,isAutoFocus:!0,onChange:e.setLink}),e.message&&r.jsx(c.Text,{role:"alert",children:e.message}),r.jsxs(c.Horizontal,{gap:8,children:[r.jsx(ye,{type:t?"submit":"button",isDisabled:e.locked,onClick:t?void 0:()=>e.format("link",e.link.trim()),children:e.labels.apply}),r.jsx(ye,{type:"button",variant:"ghost",onClick:()=>{e.closeLink()},children:e.labels.cancel})]})]}),e.ai&&r.jsxs(c.Vertical,{role:"region","aria-label":e.labels.aiPanel,gap:8,children:[r.jsx(c.Text,{children:e.ai.scope==="section"?e.labels.askSection:e.labels.askSelection}),r.jsx(c.Text,{children:e.ai.fragment}),r.jsx(hr,{label:e.labels.instruction,value:e.ai.prompt,isAutoFocus:!0,isDisabled:e.locked||e.ai.state==="loading",onChange:n=>e.setAi(a=>a&&{...a,prompt:n})}),e.ai.state==="loading"&&r.jsx(c.Text,{role:"status",children:e.labels.generating}),e.ai.state==="error"&&r.jsx(c.Text,{role:"alert",children:e.labels.aiError}),e.ai.state==="proposal"&&r.jsxs(c.Vertical,{gap:8,children:[r.jsx(c.Text,{fontWeight:"700",children:e.labels.proposal}),r.jsx(c.Text,{children:e.ai.result})]}),e.stale&&r.jsx(c.Text,{role:"status",children:e.labels.stale}),r.jsxs(c.Horizontal,{gap:8,flexWrap:"wrap",children:[e.ai.state==="proposal"&&r.jsx(ye,{type:"button",isDisabled:e.locked||e.stale,onClick:e.applyAi,children:e.labels.apply}),r.jsx(ye,{type:"button",isDisabled:e.locked||e.stale||e.ai.state==="loading"||!e.ai.prompt.trim(),onClick:()=>void e.runAi(),children:e.ai.state==="proposal"||e.ai.state==="error"?e.labels.retry:e.labels.generate}),r.jsx(ye,{type:"button",variant:"ghost",onClick:e.closeAi,children:e.labels.discard})]})]})]})}const En=new WeakMap;function wr(e,o=!1){const t=e.ownerDocument.getSelection();if(!(t!=null&&t.anchorNode)||!t.focusNode||!e.contains(t.anchorNode)||!e.contains(t.focusNode))return null;const n=Sr(e,t.anchorNode,t.anchorOffset),a=Sr(e,t.focusNode,t.focusOffset);return n===null||a===null?null:{start:Math.min(n,a),end:Math.max(n,a),...o&&a<n?{backward:!0}:{}}}function Sr(e,o,t){var s,d;const n=o.nodeType===1?o:o.parentElement,a=n==null?void 0:n.closest("[data-block-start]"),l=En.get(o);if((l==null?void 0:l[t])!==void 0)return Number((a==null?void 0:a.dataset.blockStart)||0)+l[t];const i=n==null?void 0:n.closest("[data-source-start]");if(i&&e.contains(i)){if(o.nodeType===3&&i.childNodes.length===1)return Number(i.dataset.sourceStart)+t;const f=e.ownerDocument.createRange();return f.selectNodeContents(i),f.setEnd(o,t),Number(i.dataset.sourceStart)+f.toString().length}if(!a)return null;if(o.nodeType===1){const f=o.childNodes[t]||o.childNodes[t-1];if((f==null?void 0:f.nodeType)===1){const u=f,m=u.matches("[data-source-start]")?[u]:Array.from(u.querySelectorAll("[data-source-start]")),p=t===o.childNodes.length,y=p?m[m.length-1]:m[0];if(y)return Number(p?y.dataset.sourceEnd:y.dataset.sourceStart)}}const g=Array.from(a.querySelectorAll("[data-source-start]"));return Number(t===0?((s=g[0])==null?void 0:s.dataset.sourceStart)??a.dataset.blockStart:((d=g[g.length-1])==null?void 0:d.dataset.sourceEnd)??a.dataset.blockStart)}function oc(e,o){var s,d;const t=Array.from(e.querySelectorAll("[data-source-start]")),n=f=>{var y;let u,m=1/0;for(const x of t){const b=Number(x.dataset.sourceStart),C=Number(x.dataset.sourceEnd),k=f<b?b-f:f>C?f-C:0;k<m&&(u=x,m=k)}if(!u)return null;if(u.tagName==="BR"&&u.parentNode){const x=Array.from(u.parentNode.childNodes).indexOf(u);return[u.parentNode,x+(f>=Number(u.dataset.sourceEnd)?1:0)]}const p=u.firstChild;return(p==null?void 0:p.nodeType)===3?[p,Math.max(0,Math.min(f-Number(u.dataset.sourceStart),((y=p.textContent)==null?void 0:y.length)||0))]:[u,0]},a=n(o.start),l=n(o.end);if(!a||!l)return!1;const i=e.ownerDocument.createRange();i.setStart(...a),i.setEnd(...l),(d=(s=(o.backward?a:l)[0].parentElement)==null?void 0:s.closest('[contenteditable="true"]'))==null||d.focus({preventScroll:!0});const g=e.ownerDocument.getSelection();if(g!=null&&g.setBaseAndExtent){const f=o.backward?l:a,u=o.backward?a:l;g.setBaseAndExtent(...f,...u)}else g==null||g.removeAllRanges(),g==null||g.addRange(i),o.backward&&(g!=null&&g.extend)&&(g.collapse(...l),g.extend(...a));return!0}function jp(e){const o=e.ownerDocument.getSelection();let t="",n,a;const l=(s,d)=>{const f=En.get(s)||[];f[d]=t.length,En.set(s,f),(o==null?void 0:o.anchorNode)===s&&o.anchorOffset===d&&(n=t.length),(o==null?void 0:o.focusNode)===s&&o.focusOffset===d&&(a=t.length)},i=s=>{t+=s},g=(s,d="",f=!1,u=!1)=>{var C;if(s.nodeType===3){const k=s.textContent||"";for(let S=0;S<=k.length;S++)l(s,S),S<k.length&&i(f?k[S]:k[S]===`
52
+ `&&u?`
53
+ > `:/[\\`*_[\]<>~|#+]/.test(k[S])?"\\"+k[S]:k[S]);return}if(s.nodeType!==1)return;const m=s,p=m.tagName.toLowerCase();if(["script","style","iframe","object","embed"].includes(p)||m.contentEditable==="false")return;const y={strong:["**","**"],b:["**","**"],em:["*","*"],i:["*","*"],u:["<u>","</u>"],s:["~~","~~"],del:["~~","~~"],strike:["~~","~~"],code:["`","`"],a:["[",`](${m.getAttribute("href")||""})`]};if(p==="code"){const k="`".repeat(Math.max(1,...Array.from((m.textContent||"").matchAll(/`+/g),S=>S[0].length+1)));y.code=[k,k]}if(p==="br"){l(s,0),i(u?`
54
+ > `:m.hasAttribute("data-source-start")?"<br>":`
55
+ `);return}if(["p","div","h1","h2","h3","blockquote","ul","ol","table"].includes(p)&&s!==e&&t&&!t.endsWith(f?`
56
+ `:`
57
+
58
+ `)&&i(f||t.endsWith(`
59
+ `)?`
60
+ `:`
61
+
62
+ `),/^h[123]$/.test(p)&&i("#".repeat(Number(p[1]))+" "),p==="blockquote"&&i("> "),p==="li"){t&&!t.endsWith(`
63
+ `)&&i(`
64
+ `);const k=((C=m.parentElement)==null?void 0:C.tagName)==="OL",S=m.parentElement?Array.from(m.parentElement.children).indexOf(m)+1:1;i((m.dataset.listIndent??d)+(m.dataset.listMarker??(k?`${S}. `:"- ")))}if(p==="table"){Array.from(m.querySelectorAll("tr")).forEach((S,T)=>{T&&i(`
65
+ `),i("| "),Array.from(S.children).forEach(w=>{g(w,d),i(" | ")}),T===0&&i(`
66
+ `+(m.dataset.tableSeparator||"| "+Array.from(S.children).map(()=>"---").join(" | ")+" |"))});return}!f&&y[p]&&m.textContent&&i(y[p][0]);const b=Array.from(s.childNodes);b.forEach((k,S)=>{l(s,S),g(k,p==="li"?d+" ":d,f||p==="code",u||p==="blockquote")}),l(s,b.length),!f&&y[p]&&m.textContent&&i(y[p][1])};return g(e,"",e.hasAttribute("data-code-block")),{text:t,selection:{start:Math.min(n??t.length,a??t.length),end:Math.max(n??t.length,a??t.length)}}}let rc;function lt(e){var a,l,i;rc??(rc=new Intl.Segmenter(void 0,{granularity:"grapheme"}));const o=[],t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT);let n;for(;n=t.nextNode();){if((a=n.parentElement)!=null&&a.closest('[contenteditable="false"]'))continue;if(n.nodeType===1){if(n.tagName!=="BR")continue;const d=n.parentNode,f=Array.from(d.childNodes).indexOf(n),u=d;if(u.dataset.sourceStart!==void 0&&u.dataset.sourceStart===u.dataset.sourceEnd&&!u.textContent){o.push({node:d,offset:0,source:Number(u.dataset.sourceStart)});continue}const m=n.dataset.sourceEnd!==void 0?Number(n.dataset.sourceEnd):Sr(e,d,f+1);if(!o.length){const p=Sr(e,d,f);p!==null&&o.push({node:d,offset:f,source:p})}m!==null&&Number.isFinite(m)&&((l=o[o.length-1])==null?void 0:l.source)!==m&&o.push({node:d,offset:f+1,source:m});continue}const g=n.textContent||"",s=[0,...Array.from(rc.segment(g),d=>d.index+d.segment.length)];for(const d of s){const f=Sr(e,n,d);f!==null&&((i=o[o.length-1])==null?void 0:i.source)!==f&&o.push({node:n,offset:d,source:f})}}if(!o.length){const g=e.querySelector("[data-source-start]");g&&o.push({node:g,offset:0,source:Number(g.dataset.sourceStart)})}return o}function it(e){var n,a;const o=e.node.ownerDocument.createRange();o.setStart(e.node,e.offset),o.collapse(!0);const t=(n=o.getBoundingClientRect)==null?void 0:n.call(o);return t!=null&&t.height?t:(a=e.node.nodeType===1?e.node:e.node.parentElement)==null?void 0:a.getBoundingClientRect()}function tc(e,o){var n,a,l;const t="p,h1,h2,h3,li,td,th,pre,blockquote,div";return e.node!==o.node&&e.offset===((n=e.node.textContent)==null?void 0:n.length)&&o.offset===0&&((a=e.node.parentElement)==null?void 0:a.closest(t))===((l=o.node.parentElement)==null?void 0:l.closest(t))}function Wp(e,o,t,n){var S,T,w,F,v;if(typeof Intl.Segmenter!="function")return null;const a=e.ownerDocument.getSelection(),l=wr(e,!0);if(!l||!(a!=null&&a.focusNode)||!a.anchorNode)return null;const i=Array.from(e.querySelectorAll("[data-block-id]")),g=o==="ArrowLeft"||o==="ArrowUp",s=o==="ArrowUp"||o==="ArrowDown",d=a.focusNode.nodeType===1?a.focusNode:a.focusNode.parentElement;let f=i.indexOf(d==null?void 0:d.closest("[data-block-id]"));if(f<0)return null;let u=lt(i[f]);if(!u.length)return null;const m=l.backward?l.start:l.end;let p=u.findIndex(z=>z.node===a.focusNode&&z.offset===a.focusOffset);p<0&&(p=u.reduce((z,j,H)=>Math.abs(j.source-m)<Math.abs(u[z].source-m)?H:z,0));let y=u[p],x=s?n??((S=it(y))==null?void 0:S.left)??0:null;if(!t&&l.start!==l.end&&!s){const z=g?l.start:l.end,j=i.find(E=>{const M=E.querySelectorAll("[data-source-start]");return M.length&&z>=Number(M[0].dataset.sourceStart)&&z<=Number(M[M.length-1].dataset.sourceEnd)});y=(j?lt(j):u).reduce((E,M)=>Math.abs(M.source-z)<Math.abs(E.source-z)?M:E)}else if(s){const z=it(y),j=(E,M)=>{const I=E.map(V=>({point:V,rect:it(V)})).filter(V=>V.rect&&(!M||!z||(g?V.rect.bottom<z.bottom-z.height/2:V.rect.top>z.top+z.height/2)));if(!I.length)return null;const W=g?Math.max(...I.map(V=>V.rect.top)):Math.min(...I.map(V=>V.rect.top));return I.filter(V=>Math.abs(V.rect.top-W)<Math.max(1,V.rect.height/2)).reduce((V,P)=>Math.abs(P.rect.left-x)<Math.abs(V.rect.left-x)?P:V).point},H=j(u,!0);H?y=H:(f+=g?-1:1,i[f]&&(y=j(lt(i[f]),!1)??y))}else{const z=g?-1:1;let j=p+z;j>=0&&j<u.length&&(g?tc(u[j],u[p]):tc(u[p],u[j]))&&(j+=z),j>=0&&j<u.length?y=u[j]:(u=i[f+z]?lt(i[f+z]):[],u.length&&(y=u[g?u.length-1:0]))}const b=t?{node:a.anchorNode,offset:a.anchorOffset,source:l.backward?l.end:l.start}:y,C=(T=y.node.nodeType===1?y.node:y.node.parentElement)==null?void 0:T.closest("[data-editor-input]");C==null||C.focus({preventScroll:!0}),a.setBaseAndExtent(b.node,b.offset,y.node,y.offset);const k=it(y);return k&&(k.top<0||k.bottom>(((w=e.ownerDocument.defaultView)==null?void 0:w.innerHeight)??1/0))&&((v=(F=y.node.parentElement)==null?void 0:F.scrollIntoView)==null||v.call(F,{block:"nearest"})),{selection:{start:Math.min(b.source,y.source),end:Math.max(b.source,y.source),...y.source<b.source?{backward:!0}:{}},x}}function Ep(e,o,t,n,a=!1){const l=h.useRef(!1),i=h.useRef(null),[g,s]=h.useState(!1),d=h.useRef(null),f=h.useRef(null),u=h.useRef(null),m=()=>{l.current=!1,s(!1)};h.useEffect(()=>{const v=e.current.current.selection;!e.source&&!e.locked&&v.start===0&&v.end===e.value.length&&e.value.length>0&&(l.current=!0,s(!0)),(e.source||e.locked||e.current.current.selection.start===e.current.current.selection.end)&&m(),i.current=null,d.current=null,f.current=null,u.current=null},[e.value,e.source,e.locked]);const p=v=>{var j;const z=v instanceof Element?v.closest("[data-editor-input]"):null;return z&&((j=o.current)!=null&&j.contains(z))?z:null},y=v=>{if(l.current)return{start:0,end:e.current.current.value.length,...e.current.current.selection.backward?{backward:!0}:{}};if((v==null?void 0:v.tagName)==="TEXTAREA"){const z=v,j=Number(z.dataset.editorOffset||0);return{start:j+z.selectionStart,end:j+z.selectionEnd}}return o.current?wr(o.current,!0):null},x=v=>l.current||e.document.blocks.filter(z=>v.start<z.end&&v.end>z.start).length>1,b=(v,z,j)=>{if(e.source||v.tagName==="TEXTAREA")return null;if(z==="insertParagraph"||z==="insertLineBreak")return Ui(e.current.current.value,e.document.blocks,j,z==="insertLineBreak");const H=v.querySelector("[data-source-start]");if(z==="deleteContentBackward"&&j.start===j.end){const E=Array.from(v.querySelectorAll("li")).find(M=>{var I;return Number((I=M.querySelector("[data-source-start]"))==null?void 0:I.dataset.sourceStart)===j.start});if(j.start===Number(H==null?void 0:H.dataset.sourceStart)||E)return Gi(e.current.current.value,e.document.blocks,v.dataset.blockId||"",E&&j.start!==Number(H==null?void 0:H.dataset.sourceStart)?j.start:void 0)??{value:e.current.current.value,selection:j}}return null},C=()=>{var H,E,M;const v=(H=o.current)==null?void 0:H.ownerDocument.activeElement;if((v==null?void 0:v.tagName)==="INPUT"||(v==null?void 0:v.tagName)==="TEXTAREA"){const I=p(v);if(I){const W=y(I);W&&e.capture(W)}return null}const z=(E=o.current)==null?void 0:E.ownerDocument.getSelection();if(!(z!=null&&z.anchorNode)||!z.focusNode||!((M=o.current)!=null&&M.contains(z.anchorNode))||!o.current.contains(z.focusNode))return l.current&&m(),null;const j=y();return j&&e.capture(j),j},k=(v,z=!1)=>{const j=p(v.target);if(!j||j.tagName==="TEXTAREA")return;const H=y(j);!H||H.start===H.end||(v.clipboardData.setData("text/plain",e.current.current.value.slice(H.start,H.end)),v.preventDefault(),z&&!e.locked&&(e.capture(H),e.replace("",qi(e.document.blocks,H)),m()))},S=v=>{if(v.defaultPrevented||v.nativeEvent.isComposing)return;const z=p(v.target);if(!z)return;const j=y(z);j&&e.capture(j);const H=v.key.toLowerCase();H==="tab"&&m();const E=(v.ctrlKey||v.metaKey)&&!v.altKey;if(E&&H==="a"&&!v.shiftKey&&z.tagName!=="TEXTAREA"){v.preventDefault();const M=z.ownerDocument.createRange();M.selectNodeContents(t.current);const I=z.ownerDocument.getSelection();I==null||I.removeAllRanges(),I==null||I.addRange(M),l.current=!0,s(!0),e.capture({start:0,end:e.current.current.value.length});return}if(l.current&&["arrowleft","arrowright","arrowup","arrowdown","home","end","escape"].includes(H)){if(v.shiftKey&&o.current&&oc(o.current,{start:0,end:e.current.current.value.length,...e.current.current.selection.backward?{backward:!0}:{}}),m(),!v.shiftKey){v.preventDefault();const M=e.document.blocks[0],I=e.document.blocks[e.document.blocks.length-1],W=["arrowleft","arrowup","home"].includes(H)?M.bodyStart:I.kind==="codeBlock"?I.bodyStart+I.body.length:I.end;e.restoreSelection({start:W,end:W})}if(!v.shiftKey)return}if(!e.source&&!e.locked&&!E&&!v.altKey&&z.tagName!=="TEXTAREA"&&["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(v.key)&&o.current){const M=Wp(o.current,v.key,v.shiftKey,i.current);if(M){v.preventDefault(),i.current=M.x,e.capture(M.selection);return}}else i.current=null;if(!e.locked){if(E){H==="z"||H==="y"?(v.preventDefault(),m(),e.undo(H==="y"||v.shiftKey)):H==="s"&&n?(v.preventDefault(),n()):H==="a"&&v.shiftKey&&a?(v.preventDefault(),e.openAi("selection")):["b","i","u"].includes(H)?(v.preventDefault(),e.format({b:"bold",i:"italic",u:"underline"}[H])):H==="k"&&(v.preventDefault(),e.openLink());return}if(!v.altKey&&j&&["enter","backspace"].includes(H)){const M=b(z,H==="enter"?v.shiftKey?"insertLineBreak":"insertParagraph":"deleteContentBackward",j);if(M){v.preventDefault(),e.commit(M.value,M.selection),m();return}}if(z.tagName!=="TEXTAREA"&&j&&j.start!==j.end&&["backspace","delete"].includes(H)){v.preventDefault(),e.replace("",qi(e.document.blocks,j)),m();return}if(j&&x(j)){const M=H==="backspace"||H==="delete"?"":H==="enter"?`
67
+
68
+ `:v.key.length===1&&!v.altKey?v.key:null;if(M!==null){v.preventDefault(),e.replace(M,j,v.key.length===1),m();return}}}},T=v=>{var E;const z=p(v.target);if(!z||e.locked||v.isComposing||d.current)return;if(v.inputType==="historyUndo"||v.inputType==="historyRedo"){v.cancelable&&(v.preventDefault(),e.undo(v.inputType==="historyRedo"));return}const j=y(z);if(j){const M=b(z,v.inputType,j);if(M){e.capture(j),v.cancelable?(v.preventDefault(),e.commit(M.value,M.selection),m()):u.current=M;return}}if(!j||!x(j))return;const H=(E=v.inputType)!=null&&E.startsWith("delete")?"":["insertParagraph","insertLineBreak"].includes(v.inputType)?`
69
+
70
+ `:v.data;H!=null&&(v.cancelable?(v.preventDefault(),e.replace(H,j),m()):f.current={target:j,text:H})},w=h.useRef(T);return w.current=T,h.useEffect(()=>{const v=o.current,z=j=>w.current(j);return v==null||v.addEventListener("beforeinput",z,!0),()=>v==null?void 0:v.removeEventListener("beforeinput",z,!0)},[o]),{capture:C,selectedDocument:g,onKeyDown:S,onInputCapture:v=>{var E,M;const z=p(v.target),j=v.nativeEvent;if(!z||e.locked||j.isComposing||d.current)return;const H=u.current??b(z,j.inputType,e.current.current.selection);if(H){v.stopPropagation(),u.current=null,H.value===e.current.current.value?e.restoreSelection(H.selection):e.commit(H.value,H.selection),m();return}if(j.inputType==="historyUndo"||j.inputType==="historyRedo")v.stopPropagation(),e.undo(j.inputType==="historyRedo");else if(f.current||z.tagName!=="TEXTAREA"&&x(e.current.current.selection)&&(j.data!=null||(E=j.inputType)!=null&&E.startsWith("delete"))){v.stopPropagation();const{target:I,text:W}=f.current??{target:e.current.current.selection,text:(M=j.inputType)!=null&&M.startsWith("delete")?"":j.data};f.current=null,e.replace(W,I),m()}},onCopy:v=>k(v),onCut:v=>k(v,!0),onPaste:v=>{const z=p(v.target);if(!z||z.tagName==="TEXTAREA"||e.locked)return;const j=y(z);if(!j)return;v.preventDefault();const H=v.clipboardData.getData("text/plain");!H&&!Array.from(v.clipboardData.types||[]).includes("text/plain")||(e.capture(j),e.replace(H,j),m())},onPointerDownCapture:v=>{i.current=null,p(v.target)&&m()},onCompositionStartCapture:v=>{const z=p(v.target),j=z&&y(z);j&&x(j)&&!e.locked&&(d.current=j)},onCompositionEndCapture:v=>{const z=d.current;z&&(v.stopPropagation(),d.current=null,v.data?e.replace(v.data,z):e.restoreSelection(z),m())}}}function Ap({rect:e,state:o,props:t,preserve:n}){const a=h.useRef(null),{themeMode:l}=c.useTheme(),[i,g]=h.useState({top:8,left:8});return h.useLayoutEffect(()=>{var d;const s=(d=a.current)==null?void 0:d.getBoundingClientRect();s&&g({left:Math.max(8,Math.min(e.left,window.innerWidth-s.width-8)),top:Math.max(8,Math.min(e.top-s.height-8>=8?e.top-s.height-8:e.bottom+8,window.innerHeight-s.height-8))})},[e,o.linkOpen,o.message]),h.useEffect(()=>{if(!o.linkOpen)return;const s=d=>{var f;d.target instanceof Node&&!((f=a.current)!=null&&f.contains(d.target))&&o.closeLink(!1)};return document.addEventListener("pointerdown",s,!0),()=>document.removeEventListener("pointerdown",s,!0)},[o.linkOpen]),r.jsx(c.View,{ref:a,"data-editor-selection-toolbar":"true","data-editor-link-popover":o.linkOpen?"true":void 0,role:o.linkOpen?"dialog":void 0,"aria-label":o.linkOpen?o.labels.link:void 0,position:"fixed",top:i.top,left:i.left,maxWidth:"calc(100vw - 16px)",maxHeight:"calc(100vh - 16px)",overflow:"auto",backgroundColor:l==="dark"?"color-gray-900":"color-white",borderWidth:1,borderStyle:"solid",borderColor:l==="dark"?"color-gray-600":"color-gray-300",boxShadow:"0 6px 20px rgba(0, 0, 0, 0.18)",borderRadius:10,padding:6,zIndex:1e3,children:o.linkOpen?r.jsx(ec,{state:o,views:t.views,floating:!0}):r.jsx(Wn,{state:o,props:t,formatting:!0,preserve:n})})}function Hp({block:e,state:o,label:t,views:n}){const a=h.useRef(null),l=h.useRef(!1),i=h.useMemo(()=>r.jsx(Ri,{block:e}),[e.id,e.start,o.restoreVersion]),g=()=>{if(!a.current||l.current||o.locked)return;const s=jp(a.current);if(e.kind==="codeBlock"){const f=e.bodyStart-e.start;o.editBlock(e,eo(e.raw,{start:f,end:f+e.body.length},s.text),{start:f+s.selection.start,end:f+s.selection.end},!0,!1);return}const d=at(s.text);o.editBlock(e,s.text,s.selection,!0,d.blocks.length!==1||d.blocks[0].kind!==e.kind)};return r.jsx(c.View,{ref:a,"data-block-id":e.id,"data-block-start":e.kind==="codeBlock"?e.bodyStart:e.start,"data-code-block":e.kind==="codeBlock"?e.id:void 0,"data-editor-input":"true",contentEditable:!o.locked,suppressContentEditableWarning:!0,role:"textbox","aria-label":t,"aria-multiline":"true","aria-readonly":o.locked,minHeight:24,flex:1,outline:"none",...n==null?void 0:n.content,onFocus:()=>o.setActiveId(e.id),onBeforeInput:s=>{if(s.defaultPrevented)return;const d=a.current&&wr(a.current,!0);d&&o.capture(d)},onInput:s=>{g()},onCompositionStart:()=>{l.current=!0},onCompositionEnd:()=>{l.current=!1,g()},onKeyDown:s=>{if(s.nativeEvent.isComposing||o.locked)return;const d=a.current&&wr(a.current,!0);d&&o.capture(d),s.key==="/"&&!s.metaKey&&!s.ctrlKey&&!e.body.trim()&&(s.preventDefault(),o.setCommandId(e.id))},children:i},o.restoreVersion)}function Vp({state:e,...o}){const{value:t,defaultValue:n,onChange:a,generate:l,onSave:i,label:g=e.labels.document,isDisabled:s,isReadOnly:d,labels:f,views:u={},status:m,...p}=o,y=h.useRef(null),{themeMode:x}=c.useTheme(),[b,C]=h.useState(null),[k,S]=h.useState(null),T=h.useRef(null),w=h.useRef(null),F=Ep(e,y,T,i,!!o.generate);h.useLayoutEffect(()=>{if(!e.linkOpen||!y.current){S(null);return}const $=y.current.ownerDocument.getSelection(),O=$!=null&&$.rangeCount&&$.anchorNode&&y.current.contains($.anchorNode)?$.getRangeAt(0).cloneRange():null,B=w.current??y.current.querySelector(`[data-block-id="${e.activeId}"]`)??T.current??y.current,L=()=>{const U=O==null?void 0:O.getBoundingClientRect(),K=U!=null&&U.height?U:B.getBoundingClientRect();S({top:K.top,bottom:K.bottom,left:K.left})};return L(),window.addEventListener("scroll",L,!0),window.addEventListener("resize",L),()=>{window.removeEventListener("scroll",L,!0),window.removeEventListener("resize",L)}},[e.linkOpen]);const v=h.useRef(null),z=h.useRef(null),j=h.useRef(null),H=h.useRef(null),E=h.useRef([]),M=h.useRef(null),[I,W]=h.useState(null),D=$=>{$.preventDefault()},V=()=>{var $;return Array.from((($=T.current)==null?void 0:$.querySelectorAll("[data-editor-row]"))||[])},P=()=>{var $;j.current!==null&&window.cancelAnimationFrame(j.current),j.current=null,v.current=null,($=z.current)==null||$.remove(),z.current=null,M.current=null,W(null)},_=($,O)=>$>O.from&&$<=O.to?-O.extent:$>=O.to&&$<O.from?O.extent:0,q=($,O)=>{const B=V()[$];return B?B.offsetTop+($>O.from?B.offsetHeight-O.height:0):O.top},N=$=>{const O=M.current;if(!O||O.to===$)return;const B={...O,to:$,top:q($,O)};M.current=B,W(B)},G=$=>{const O=M.current;if(!O||!T.current)return null;const B=$-T.current.getBoundingClientRect().top;if(B>=O.top&&B<=O.top+O.height)return O.to;const L=V();let U=0;return L.forEach((K,J)=>{J!==O.from&&B>=K.offsetTop+_(J,O)+K.offsetHeight/2&&U++}),U};h.useEffect(()=>{P()},[e.value,e.locked,e.source]),h.useEffect(()=>{if(I!=null&&I.id)return window.addEventListener("resize",P),()=>window.removeEventListener("resize",P)},[I==null?void 0:I.id]),h.useEffect(()=>()=>{var $;j.current!==null&&window.cancelAnimationFrame(j.current),($=z.current)==null||$.remove(),E.current.forEach(O=>O.cancel())},[]),h.useLayoutEffect(()=>{var O;const $=H.current;$&&(H.current=null,E.current.forEach(B=>B.cancel()),E.current=[],!((O=window.matchMedia)!=null&&O.call(window,"(prefers-reduced-motion: reduce)").matches)&&V().forEach(B=>{const L=$.get(B.dataset.editorRow),U=L===void 0?0:L-B.getBoundingClientRect().top;Math.abs(U)<1||!B.animate||E.current.push(B.animate([{transform:`translateY(${U}px)`},{transform:"translateY(0)"}],{duration:180,easing:"cubic-bezier(0.2, 0, 0, 1)"}))}))}),h.useEffect(()=>{const $=()=>{var ne;const O=y.current;if(!O||e.holdSelection.current||e.linkOpen)return;if(v.current){C(null);return}const B=O.ownerDocument.activeElement,L=F.capture()??wr(O),U=O.ownerDocument.getSelection(),K=B==null?void 0:B.matches("input[data-editor-input],textarea[data-editor-input]");if(L&&L.start!==L.end&&(U!=null&&U.rangeCount)&&!K&&!e.locked){const re=U.getRangeAt(0).getBoundingClientRect();if(re.bottom>0&&re.top<window.innerHeight){C({top:re.top,bottom:re.bottom,left:re.left});return}}C(null);const J=O.ownerDocument.getSelection();if(J&&!J.isCollapsed&&J.anchorNode&&!O.contains(J.anchorNode)&&!((ne=J.anchorNode.parentElement)!=null&&ne.closest("[data-editor-block-list]"))){const re=e.current.current.selection.end;e.capture({start:re,end:re})}};return document.addEventListener("selectionchange",$),window.addEventListener("scroll",$,!0),window.addEventListener("resize",$),()=>{document.removeEventListener("selectionchange",$),window.removeEventListener("scroll",$,!0),window.removeEventListener("resize",$)}},[e.locked,e.source,e.linkOpen]),h.useLayoutEffect(()=>{!e.restoreVersion||!y.current||!e.restoreRequested.current||(e.restoreRequested.current=!1,e.source&&w.current?(w.current.focus({preventScroll:!0}),w.current.setSelectionRange(e.selection.start,e.selection.end,e.selection.backward?"backward":"forward")):oc(y.current,e.selection))},[e.restoreVersion,e.source]);const X=()=>{w.current&&e.capture({start:w.current.selectionStart,end:w.current.selectionEnd,...w.current.selectionDirection==="backward"?{backward:!0}:{}})};return r.jsxs(c.Vertical,{ref:y,gap:12,minWidth:0,"aria-label":g,"aria-disabled":s,...p,...u.container,onCopy:F.onCopy,onCut:F.onCut,onPaste:F.onPaste,onPointerDownCapture:F.onPointerDownCapture,onInputCapture:F.onInputCapture,onCompositionStartCapture:F.onCompositionStartCapture,onCompositionEndCapture:F.onCompositionEndCapture,onDragOver:$=>{if(!v.current||e.locked)return;$.preventDefault(),$.dataTransfer.dropEffect="move";const O=G($.clientY);O!==null&&N(O)},onDragLeave:$=>{const O=$.currentTarget.getBoundingClientRect();($.clientX<O.left||$.clientX>O.right||$.clientY<O.top||$.clientY>O.bottom)&&M.current&&N(M.current.from)},onDrop:$=>{var B;if(!v.current||e.locked)return;$.preventDefault();const O=G($.clientY);if(O!==null&&((B=e.document.blocks[O])==null?void 0:B.id)!==v.current){H.current=new Map(V().map(U=>[U.dataset.editorRow,U.getBoundingClientRect().top]));const L=M.current;L&&T.current&&H.current.set(L.id,T.current.getBoundingClientRect().top+q(O,L)),e.move(v.current,O)}P()},onKeyDown:$=>{$.nativeEvent.isComposing||($.key==="Escape"&&(P(),e.setCommandId(null),e.linkOpen&&e.closeLink(),e.ai&&e.closeAi(),C(null)),F.onKeyDown($))},children:[!d&&r.jsxs(c.Vertical,{position:"sticky",top:0,zIndex:10,backgroundColor:x==="dark"?"color-gray-900":"color-white",borderWidth:1,borderColor:"color-gray-200",borderStyle:"solid",borderRadius:8,padding:8,gap:4,children:[r.jsx(Wn,{state:e,props:o,preserve:D}),e.source&&r.jsx(Wn,{state:e,props:o,formatting:!0,preserve:D})]}),e.document.sourceMode&&r.jsx(c.Text,{role:"status",...u.notice,children:e.labels.sourceFallback}),e.message&&!e.linkOpen&&r.jsx(c.Text,{role:"status",...u.notice,children:e.message}),e.source?r.jsx(hr,{value:e.value,"data-editor-input":"true","data-editor-offset":0,label:g,isDisabled:s,isReadOnly:d,inputRef:$=>{w.current=$},onSelect:X,onFocus:X,onChange:$=>e.commit($,w.current?{start:w.current.selectionStart,end:w.current.selectionEnd}:e.selection,!0,!1),views:{textarea:{minHeight:240,fontFamily:"monospace",...u.source}}}):r.jsxs(c.Vertical,{ref:T,position:"relative",gap:12,"data-editor-block-list":"true",children:[I&&r.jsx(c.View,{"data-editor-drop-placeholder":I.to,"aria-hidden":"true",position:"absolute",left:0,right:0,top:0,height:I.height,borderWidth:1,borderStyle:"dashed",boxSizing:"border-box",borderColor:"theme-primary",borderRadius:8,backgroundColor:"theme-primary",opacity:.14,pointerEvents:"none",style:{transform:`translateY(${I.top}px)`,transition:I.reducedMotion?"none":"transform 180ms cubic-bezier(0.2, 0, 0, 1)"}}),e.document.blocks.map(($,O)=>{var B,L;return r.jsxs(c.Horizontal,{gap:8,alignItems:"flex-start",position:"relative",borderRadius:6,backgroundColor:F.selectedDocument?"theme-primary-100":e.activeId===$.id?"color-gray-50":void 0,_hover:{backgroundColor:"color-gray-50"},"data-editor-row":$.id,...u.block,opacity:(I==null?void 0:I.id)===$.id?0:((B=u.block)==null?void 0:B.opacity)??1,style:{...(L=u.block)==null?void 0:L.style,...I?{transform:`translateY(${_(O,I)}px)`,transition:I.reducedMotion?"none":"transform 180ms cubic-bezier(0.2, 0, 0, 1)"}:{}},children:[!d&&r.jsx(Yo,{views:{menu:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-300",backgroundColor:x==="dark"?"color-gray-900":"color-white",boxShadow:"0 6px 20px rgba(0, 0, 0, 0.18)"},item:{as:"button",type:"button",width:"100%",textAlign:"left",borderWidth:0,_focusVisible:{outline:"2px solid",outlineColor:"theme-primary"}}},trigger:r.jsx(ye,{type:"button",size:"sm",variant:"ghost",isIcon:!0,minWidth:36,width:36,minHeight:36,padding:4,title:`${e.labels.drag} · ${e.labels.blocks}`,style:{userSelect:"none"},draggable:!e.locked,isDisabled:e.locked,cursor:I?"grabbing":"grab","aria-label":e.labels.drag,onDragStart:U=>{var J;if(e.locked){U.preventDefault();return}v.current=$.id,E.current.forEach(ne=>ne.cancel()),E.current=[];const K=U.currentTarget.closest("[data-editor-row]");if(K){const ne=K.getBoundingClientRect(),re=V(),ce=re[O+1],Q=re[O-1],le=ce?ce.offsetTop-K.offsetTop-K.offsetHeight:Q?K.offsetTop-Q.offsetTop-Q.offsetHeight:0,he={id:$.id,from:O,to:O,height:K.offsetHeight,extent:K.offsetHeight+Math.max(0,le),top:K.offsetTop,reducedMotion:!!((J=window.matchMedia)!=null&&J.call(window,"(prefers-reduced-motion: reduce)").matches)};M.current=he,j.current=window.requestAnimationFrame(()=>{j.current=null,M.current&&W(M.current)});const ue=K.cloneNode(!0);let Ce="Canvas";for(let de=K;de;de=de.parentElement){const ie=window.getComputedStyle(de).backgroundColor;if(ie!=="transparent"&&ie!=="rgba(0, 0, 0, 0)"){Ce=ie;break}}Object.assign(ue.style,{position:"fixed",left:"-10000px",top:"0",width:`${ne.width}px`,padding:"8px",boxSizing:"border-box",borderRadius:"8px",backgroundColor:Ce,boxShadow:"0 8px 24px rgba(0,0,0,0.18)",opacity:"1"}),ue.dataset.editorDragPreview="true",ue.setAttribute("aria-hidden","true"),ue.inert=!0,ue.querySelectorAll("[contenteditable]").forEach(de=>{de.style.outline="none"}),K.ownerDocument.body.appendChild(ue),z.current=ue,U.dataTransfer.setDragImage(ue,U.clientX-ne.left+8,U.clientY-ne.top+8)}U.dataTransfer.setData("application/x-app-studio-block",$.id),U.dataTransfer.effectAllowed="move"},onDragEnd:P,children:r.jsx(ca,{widthHeight:18,strokeWidth:2})}),items:[{id:"transform",label:e.labels.blocks,disabled:e.locked,onClick:()=>e.setCommandId($.id)},...["below","duplicate","up","down","delete"].map(U=>({id:U,label:e.labels[U],disabled:e.locked||U==="up"&&O===0||U==="down"&&O===e.document.blocks.length-1,onClick:()=>e.action($.id,U)}))]},`${e.restoreVersion}-${e.commandId??""}`),r.jsx(Hp,{block:$,state:e,label:$.kind==="codeBlock"?e.labels.codeBlock:g,views:u})]},$.id)})]}),(e.linkOpen?k:!e.source&&b)&&!e.locked&&!e.ai&&r.jsx(nr,{children:r.jsx(Ap,{rect:e.linkOpen?k:b,state:e,props:o,preserve:D})}),r.jsx(Io,{open:!!e.commandId&&!e.locked,onOpenChange:$=>{$||e.closeCommand()},placeholder:e.labels.blocks,commands:rp.map($=>({id:$,name:e.labels[$],onSelect:()=>{e.commandId&&e.transform(e.commandId,$)}}))}),e.ai&&r.jsx(ec,{state:e,views:u}),m]})}const Pp=e=>{const o=lp(e);return r.jsx(Vp,{...e,state:o})};function Dp({value:e,label:o,onLinkPress:t,labels:n,views:a={},native:l=!1,codeFontFamily:i="monospace",...g}){const s=h.useMemo(()=>at(e),[e]);return r.jsx(c.Vertical,{gap:12,minWidth:0,...l?{accessibilityLabel:o}:{role:o?"region":void 0,"aria-label":o},...g,...a.container,children:s.sourceMode?r.jsxs(r.Fragment,{children:[r.jsx(c.Text,{...a.notice,children:(n==null?void 0:n.sourceFallback)??"This Markdown contains unsupported syntax. Its source is shown as plain text."}),r.jsx(c.Text,{fontFamily:i,...l?{selectable:!0}:{style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"}},...a.source,children:e})]}):s.blocks.filter(d=>d.raw).map(d=>r.jsx(c.View,{minWidth:0,...a.block,children:r.jsx(Ri,{block:d,native:l,codeFontFamily:i,isDisplay:!0,onLinkPress:t})},d.id))})}const $p=e=>r.jsx(Dp,{...e}),Lp=e=>{const o=ti(e);return r.jsx(ni,{...o,...e})},nc={"to-right":"to right","to-left":"to left","to-bottom":"to bottom","to-top":"to top","to-top-right":"to top right","to-top-left":"to top left","to-bottom-right":"to bottom right","to-bottom-left":"to bottom left"},ct={center:"center",top:"top",right:"right",bottom:"bottom",left:"left","top-right":"top right","top-left":"top left","bottom-right":"bottom right","bottom-left":"bottom left"},Bp={linear:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],radial:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],conic:[{color:"color-red-500",position:"0deg"},{color:"color-yellow-500",position:"90deg"},{color:"color-green-500",position:"180deg"},{color:"color-blue-500",position:"270deg"},{color:"color-red-500",position:"360deg"}]},_p=(e,o,t,n,a)=>{const l=o.map(i=>`${i.color} ${i.position||""}`).join(", ");switch(e){case"linear":return`linear-gradient(${t&&nc[t]?nc[t]:t||"to right"}, ${l})`;case"radial":const g=a&&ct[a]?ct[a]:a||"center";return`radial-gradient(${n||"circle"} at ${g}, ${l})`;case"conic":return`conic-gradient(from 0deg at ${a&&ct[a]?ct[a]:a||"center"}, ${l})`;default:return`linear-gradient(to right, ${l})`}},Op={linear:{backgroundSize:"200% 200%",transition:"background-position 3s ease-in-out",animate:{from:{backgroundPosition:"0% 50%"},"50%":{backgroundPosition:"100% 50%"},to:{backgroundPosition:"0% 50%"}}},radial:{backgroundSize:"100% 100%",transition:"background-position 3s ease-in-out, background-size 3s ease-in-out",animate:{from:{backgroundPosition:"center",backgroundSize:"100% 100%"},"50%":{backgroundSize:"120% 120%"},to:{backgroundPosition:"center",backgroundSize:"100% 100%"}}},conic:{transition:"transform 3s linear",animate:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}}},ac={container:{position:"relative",overflow:"hidden",borderRadius:"8px",transition:"border-radius 0.2s ease, opacity 0.2s ease"},content:{position:"relative",zIndex:1,width:"100%",height:"100%",padding:"16px"}},Np=({type:e="linear",direction:o="to-right",shape:t="circle",position:n="center",from:a,to:l,colors:i,animate:g=!1,animationDuration:s=3,children:d,views:f,themeMode:u,...m})=>{const p=h.useMemo(()=>i&&i.length>0?i:a&&l?[{color:a,position:"0%"},{color:l,position:"100%"}]:Bp[e],[i,a,l,e]),y=h.useMemo(()=>{const b=p.map(C=>({...C,color:C.color}));return _p(e,b,o,t,n)},[e,p,o,t,n]),x=h.useMemo(()=>{if(!g)return{};const b=Op[e];return{...b,transition:b.transition.replace("3s",`${s}s`),animationDuration:`${s}s`,animationIterationCount:"infinite",animationTimingFunction:e==="conic"?"linear":"ease-in-out"}},[g,s,e]);return r.jsx(c.View,{background:y,...ac.container,...x,...f==null?void 0:f.container,...m,children:d&&r.jsx(c.View,{...ac.content,...f==null?void 0:f.content,children:d})})},lc=e=>r.jsx(Np,{...e}),qp=(e=null,o=null)=>{const[t,n]=h.useState(e),[a,l]=h.useState(o),i=s=>a===s,g=s=>{l(d=>d===s?null:s)};return h.useEffect(()=>{const s=f=>{!f.composedPath().some(p=>(p==null?void 0:p.id)==="menubar-content"||(p==null?void 0:p.id)==="menubar-trigger")&&a!==null&&l(null)},d=f=>{f.key==="Escape"&&a!==null&&l(null)};if(!(typeof document>"u"))return document.addEventListener("mousedown",s),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",s),document.removeEventListener("keydown",d)}},[a]),{activeMenuId:t,setActiveMenuId:n,openMenuId:a,setOpenMenuId:l,isMenuOpen:i,toggleMenu:g}},ic={sm:{padding:"6px 10px",fontSize:"14px"},md:{padding:"8px 12px",fontSize:"16px"},lg:{padding:"10px 16px",fontSize:"18px"}},Up={default:{backgroundColor:"transparent",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Gp={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},st={active:{backgroundColor:"color-gray-200",fontWeight:"bold"},hover:{backgroundColor:"color-gray-100"},disabled:{opacity:.5,cursor:"not-allowed"}},cc=h.createContext({activeMenuId:null,setActiveMenuId:()=>{},openMenuId:null,setOpenMenuId:()=>{},isMenuOpen:()=>!1,toggleMenu:()=>{},orientation:"horizontal",size:"md",variant:"default",triggerRefs:{current:{}}}),dt=()=>h.useContext(cc),Yp=({value:e,children:o})=>r.jsx(cc.Provider,{value:e,children:o}),sc=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",views:a,...l})=>{const i=o==="horizontal"?c.Horizontal:c.Vertical;return r.jsx(i,{role:"menubar","aria-orientation":o,...Gp[o],...Up[n],...a==null?void 0:a.container,...l,children:e})},dc=({children:e,id:o,disabled:t=!1,views:n})=>{const{orientation:a}=dt(),l=a==="horizontal"?c.Horizontal:c.Vertical;return r.jsx(l,{role:"none",position:"relative",opacity:t?.5:1,pointerEvents:t?"none":"auto",...n==null?void 0:n.menu,children:h.Children.map(e,i=>h.isValidElement(i)?h.cloneElement(i,{...i.props,menuId:o}):i)})},gc=({children:e,menuId:o,disabled:t=!1,views:n})=>{const{activeMenuId:a,setActiveMenuId:l,toggleMenu:i,isMenuOpen:g,size:s,triggerRefs:d}=dt(),f=h.useRef(null),u=a===o,m=g(o);h.useEffect(()=>(f.current&&o&&(d.current[o]=f.current),()=>{o&&delete d.current[o]}),[o,d]);const p=()=>{t||(l(o),i(o))};return r.jsx(c.View,{ref:f,id:"menubar-trigger",role:"menuitem","aria-haspopup":"true","aria-expanded":m,userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",...ic[s],...u?st.active:{},...t?st.disabled:{},_hover:t?{}:st.hover,onClick:p,...n==null?void 0:n.trigger,children:e})},uc=({children:e,menuId:o,views:t})=>{const{isMenuOpen:n,orientation:a,triggerRefs:l}=dt(),i=h.useRef(null),[g,s]=h.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),d=n(o);if(h.useEffect(()=>{if(d&&i.current&&o&&l.current[o]){const u=i.current.getBoundingClientRect(),m=l.current[o].getBoundingClientRect(),p=Math.max(u.width||200,200),y=Math.max(u.height||150,150),x=window.innerWidth,b=window.innerHeight,C={top:m.top,right:x-m.right,bottom:b-m.bottom,left:m.left},k=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:m.left,y:m.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:m.left,y:m.top-y-8},{placement:"right",space:C.right,fits:C.right>=p+8,x:m.right+8,y:m.top},{placement:"left",space:C.left,fits:C.left>=p+8,x:m.left-p-8,y:m.top}]:[{placement:"right",space:C.right,fits:C.right>=p+8,x:m.right+8,y:m.top},{placement:"left",space:C.left,fits:C.left>=p+8,x:m.left-p-8,y:m.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:m.left,y:m.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:m.left,y:m.top-y-8}],S=k.find(v=>v.fits);if(S){s({x:S.x,y:S.y,placement:S.placement});return}const T=k.reduce((v,z)=>z.space>v.space?z:v);let w=T.x,F=T.y;w+p>x&&(w=x-p-8),w<8&&(w=8),F+y>b&&(F=b-y-8),F<8&&(F=8),s({x:w,y:F,placement:T.placement})}},[d,a,o,l]),!d)return null;const f={position:"fixed",left:g.x,top:g.y,zIndex:1e3};return r.jsx(c.View,{ref:i,id:"menubar-content",role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:f,...t==null?void 0:t.content,children:e})},hc=({children:e,icon:o,disabled:t=!1,onClick:n,views:a})=>{const{size:l}=dt(),i=()=>{t||!n||n()};return r.jsxs(c.View,{role:"menuitem",cursor:t?"not-allowed":"pointer",userSelect:"none",display:"flex",alignItems:"center",opacity:t?.5:1,...ic[l],_hover:t?{}:st.hover,onClick:i,...a==null?void 0:a.item,children:[o&&r.jsx(c.View,{marginRight:8,...a==null?void 0:a.icon,children:o}),e]})},fc=({views:e})=>r.jsx(c.View,{role:"separator",height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.separator}),Kp=({items:e,orientation:o,size:t,variant:n,views:a,themeMode:l})=>r.jsx(sc,{orientation:o,size:t,variant:n,views:a,children:e.map(i=>r.jsxs(dc,{id:i.id,disabled:i.disabled,views:a,children:[r.jsxs(gc,{menuId:i.id,views:a,children:[i.icon&&r.jsx(c.View,{marginRight:8,...a==null?void 0:a.icon,children:i.icon}),i.label]}),i.items&&i.items.length>0&&r.jsx(uc,{menuId:i.id,views:a,children:i.items.map((g,s)=>g.separator?r.jsx(fc,{views:a},`separator-${s}`):r.jsx(hc,{id:g.id,icon:g.icon,disabled:g.disabled,onClick:g.onClick,views:a,children:g.label},g.id))})]},i.id))}),Fo=({items:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultActiveMenuId:a=null,defaultOpenMenuId:l=null,views:i,...g})=>{const{activeMenuId:s,setActiveMenuId:d,openMenuId:f,setOpenMenuId:u,isMenuOpen:m,toggleMenu:p}=qp(a,l),y=h.useRef({});return r.jsx(Yp,{value:{activeMenuId:s,setActiveMenuId:d,openMenuId:f,setOpenMenuId:u,isMenuOpen:m,toggleMenu:p,orientation:o,size:t,variant:n,triggerRefs:y},children:r.jsx(Kp,{items:e,orientation:o,size:t,variant:n,views:i,...g})})};Fo.Root=sc,Fo.Menu=dc,Fo.Trigger=gc,Fo.Content=uc,Fo.Item=hc,Fo.Separator=fc;const Xp=(e,o,t)=>{const[n,a]=h.useState([]);return h.useEffect(()=>{a((()=>{const i=[];if(o<=t)for(let g=1;g<=o;g++)i.push(g);else{i.push(1);let g=Math.max(2,e-Math.floor((t-2)/2)),s=Math.min(o-1,g+t-3);s>=o-1&&(s=o-1,g=Math.max(2,s-(t-3))),g>2&&i.push("...");for(let d=g;d<=s;d++)i.push(d);s<o-1&&i.push("..."),i.push(o)}return i})())},[e,o,t]),{visiblePageNumbers:n}},Xo={sm:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px",media:{mobile:{fontSize:"11px",padding:"3px 6px",minWidth:"24px",height:"24px"}}},md:{fontSize:"14px",padding:"6px 10px",minWidth:"32px",height:"32px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}},lg:{fontSize:"14px",padding:"8px 12px",minWidth:"36px",height:"36px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}}},vr={default:{backgroundColor:"transparent",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-200"}},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}}},Tr={rounded:{borderRadius:8},square:{borderRadius:"0px"},circular:{borderRadius:"50%"}},Jp={backgroundColor:"theme-primary",color:"color-white",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"theme-primary",opacity:.9}},gt={opacity:.5,cursor:"not-allowed",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"transparent"}},Qp=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a=[{label:"10 / page",value:10},{label:"20 / page",value:20},{label:"50 / page",value:50},{label:"100 / page",value:100}],onPageSizeChange:l,showPageSizeSelector:i=!1,showPageInfo:g=!0,maxPageButtons:s=5,showFirstLastButtons:d=!1,size:f="md",variant:u="default",shape:m="rounded",visiblePageNumbers:p=[],views:y,...x})=>{const b=S=>{S<1||S>o||S===e||t(S)},C=S=>{l&&l(Number(S.target.value))},k=(S,T)=>{if(S==="...")return r.jsx(c.View,{display:"flex",alignItems:"center",justifyContent:"center",...Xo[f],...y==null?void 0:y.ellipsis,children:"..."},`ellipsis-${T}`);const w=S===e;return r.jsx(c.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:w?"default":"pointer",...Xo[f],...vr[u],...Tr[m],...w?Jp:{},onClick:()=>b(S),"aria-label":`Page ${S}`,"aria-current":w?"page":void 0,...w?y==null?void 0:y.activePageButton:y==null?void 0:y.pageButton,children:S},`page-${S}`)};return r.jsxs(c.Horizontal,{alignItems:"center",gap:8,...y==null?void 0:y.container,...x,children:[d&&r.jsxs(c.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Xo[f],...vr[u],...Tr[m],...e===1?gt:{},onClick:()=>b(1),"aria-label":"First page",disabled:e===1,...y==null?void 0:y.navigationButton,children:[r.jsx(we,{orientation:"left",widthHeight:16}),r.jsx(we,{orientation:"left",widthHeight:16,marginLeft:"-8px"})]}),r.jsx(c.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Xo[f],...vr[u],...Tr[m],...e===1?gt:{},onClick:()=>b(e-1),"aria-label":"Previous page",disabled:e===1,...y==null?void 0:y.navigationButton,children:r.jsx(we,{orientation:"left",widthHeight:16})}),p.map((S,T)=>k(S,T)),r.jsx(c.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Xo[f],...vr[u],...Tr[m],...e===o?gt:{},onClick:()=>b(e+1),"aria-label":"Next page",disabled:e===o,...y==null?void 0:y.navigationButton,children:r.jsx(we,{orientation:"right",widthHeight:16})}),d&&r.jsxs(c.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Xo[f],...vr[u],...Tr[m],...e===o?gt:{},onClick:()=>b(o),"aria-label":"Last page",disabled:e===o,...y==null?void 0:y.navigationButton,children:[r.jsx(we,{orientation:"right",widthHeight:16}),r.jsx(we,{orientation:"right",widthHeight:16,marginLeft:"-8px"})]}),g&&r.jsxs(c.Text,{marginLeft:16,color:"color-gray-600",...y==null?void 0:y.pageInfo,children:["Page ",e," of ",o]}),i&&l&&r.jsx(c.View,{as:"select",marginLeft:16,padding:"4px 8px",borderRadius:"4px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"color-white",cursor:"pointer",value:n,onChange:C,...y==null?void 0:y.pageSizeSelector,children:a.map(S=>r.jsx("option",{value:S.value,children:S.label},S.value))})]})},mc=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:i=!1,showPageInfo:g=!0,maxPageButtons:s=5,showFirstLastButtons:d=!1,size:f="md",variant:u="default",shape:m="rounded",views:p,...y})=>{const{visiblePageNumbers:x}=Xp(e,o,s);return r.jsx(Qp,{currentPage:e,totalPages:o,onPageChange:t,pageSize:n,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:i,showPageInfo:g,maxPageButtons:s,showFirstLastButtons:d,size:f,variant:u,shape:m,visiblePageNumbers:x,views:p,...y})},Zp=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Rp=h.memo(({shape:e="linear",value:o=0,max:t=100,color:n="theme-primary",backgroundColor:a="color-gray-200",height:l,size:i,radius:g=4,strokeWidth:s=10,showLabel:d=!1,labelColor:f="color-black-primary",animated:u=!0,animationDuration:m="0.5s",views:p,themeMode:y,...x})=>{var H;const{getColor:b,themeMode:C}=c.useTheme(),k=y||C,T=Math.min(t,Math.max(0,o))/t*100,w=E=>Zp(E)?E:b(E,{themeMode:k}),F=h.useMemo(()=>w(a),[b,a,k]),v=h.useMemo(()=>w(n),[b,n,k]);if(e==="circle"){const E=i||(typeof l=="number"?l:100),M=(E-s)/2,I=2*Math.PI*M,W=I-T/100*I;return r.jsxs(c.View,{width:E,height:E,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...p==null?void 0:p.container,...x,children:[r.jsxs("svg",{width:E,height:E,viewBox:`0 0 ${E} ${E}`,style:{transform:"rotate(-90deg)"},children:[r.jsx("circle",{cx:E/2,cy:E/2,r:M,stroke:F,strokeWidth:s,fill:"transparent",...p==null?void 0:p.track}),r.jsx("circle",{cx:E/2,cy:E/2,r:M,stroke:v,strokeWidth:s,strokeDasharray:I,strokeDashoffset:W,strokeLinecap:"round",fill:"transparent",style:{transition:u?`stroke-dashoffset ${m} ease-in-out`:"none"},...p==null?void 0:p.indicator})]}),d&&r.jsx(c.View,{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",children:r.jsxs(c.Text,{color:f,fontSize:`${E*.2}px`,fontWeight:"bold",...p==null?void 0:p.text,children:[Math.round(T),"%"]})})]})}const z=l||8,j={backgroundColor:F,...((H=p==null?void 0:p.container)==null?void 0:H.style)||{},...x.style||{}};return r.jsxs(c.View,{role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":t,width:"100%",height:z,borderRadius:g,overflow:"hidden",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...p==null?void 0:p.container,...x,style:j,children:[r.jsx("div",{style:{height:"100%",backgroundColor:v,borderRadius:typeof g=="number"?`${g}px`:g,position:"absolute",left:0,top:0,bottom:0,width:`${T}%`,transition:u?`width ${m} ease-in-out`:"none",...p==null?void 0:p.bar}}),d&&r.jsxs(c.Text,{color:f,fontSize:typeof z=="number"&&z>16?`${z*.6}px`:"10px",fontWeight:"bold",position:"relative",zIndex:1,...p==null?void 0:p.text,children:[Math.round(T),"%"]})]})}),pc=e=>{const o=Te("progress",e);return r.jsx(Rp,{...o})},ey=(e=>({solid:"solid",dashed:"dashed",dotted:"dotted"}))(),oy={thin:"1px",medium:"2px",thick:"4px"},Ir={container:{transition:"opacity 0.15s ease"},label:{fontSize:"14px",fontWeight:"500",color:"color-gray-600",paddingHorizontal:"8px",backgroundColor:"color-white",transition:"color 0.15s ease"}},ry=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),ty=({orientation:e="horizontal",variant:o="solid",thickness:t="thin",color:n,spacing:a="0px",label:l,decorative:i=!1,views:g,themeMode:s,...d})=>{const{themeMode:f}=c.useTheme(),u=n||"color-gray-200",m=ey[o],p=oy[t],y=i?{"aria-hidden":!0}:{role:"separator","aria-orientation":e},x=ry(u)?{style:{borderColor:u}}:{borderColor:u};return l&&e==="horizontal"?r.jsxs(c.Horizontal,{alignItems:"center",justifyContent:"center",width:"100%",padding:a,...y,...d,children:[r.jsx(c.View,{height:"0px",flexGrow:1,borderTop:`${p} ${m}`,...x,...Ir.container,...g==null?void 0:g.container}),r.jsx(c.Text,{...Ir.label,...g==null?void 0:g.label,children:l}),r.jsx(c.View,{height:"0px",flexGrow:1,borderTop:`${p} ${m}`,...x,...Ir.container,...g==null?void 0:g.container})]}):e==="horizontal"?r.jsx(c.View,{height:"0px",width:"100%",borderTop:`${p} ${m}`,padding:a,...x,...Ir.container,...y,...g==null?void 0:g.container,...d}):r.jsx(c.View,{width:"0px",height:"100%",borderLeft:`${p} ${m}`,padding:a,...x,...Ir.container,...y,...g==null?void 0:g.container,...d})},yc=e=>{const o=Te("separator",e);return r.jsx(ty,{...o})},ut=yc,ny=yc,ay={xs:12,sm:14,md:16,lg:18,xl:20},ly=({isSupported:e,isSharing:o,onShare:t,label:n,children:a,icon:l,size:i,isDisabled:g,isLoading:s,iconPosition:d,disableWhenUnsupported:f=!0,...u})=>{const m=i??"md",p=l??r.jsx(ua,{widthHeight:ay[m],strokeWidth:1.5,filled:!1}),y=!!g||!e&&f,x=!!s||o;return r.jsx(ye,{...u,size:m,icon:p,iconPosition:d??"left",isDisabled:y,isLoading:x,onClick:t,children:a??n??"Share"})},bc=()=>typeof navigator>"u"?void 0:navigator,iy=(e,o)=>{if(!e||typeof e.share!="function")return!1;if(typeof e.canShare=="function")try{return e.canShare(o)}catch{return!1}return!0},cy=e=>{if(typeof e=="object"&&e!==null&&"name"in e)return String(e.name)},sy=e=>{const{shareData:o,onClick:t,onUnsupported:n,onShareStart:a,onShareSuccess:l,onShareCancel:i,onShareError:g}=e,[s,d]=h.useState(!1),f=h.useMemo(()=>iy(bc(),o),[o]),u=h.useCallback((...m)=>{t==null||t(...m);const p=bc();if(!p||typeof p.share!="function"){n==null||n();return}if(!s){if(typeof p.canShare=="function")try{if(!p.canShare(o)){n==null||n();return}}catch(y){g==null||g(y);return}d(!0),a==null||a();try{p.share(o).then(()=>{l==null||l()}).catch(y=>{if(cy(y)==="AbortError"){i==null||i();return}g==null||g(y)}).finally(()=>{d(!1)})}catch(y){d(!1),g==null||g(y)}}},[s,t,i,g,a,l,n,o]);return{isSupported:f,isSharing:s,handleShare:u}},xc=e=>{const{isSupported:o,isSharing:t,handleShare:n}=sy(e),{shareData:a,onShareStart:l,onShareSuccess:i,onShareCancel:g,onShareError:s,onUnsupported:d,onClick:f,...u}=e;return r.jsx(ly,{...u,isSupported:o,isSharing:t,onShare:n})},dy=({label:e,status:o="default",views:t,themeMode:n,...a})=>{const{themeMode:l}=c.useTheme(),i=Ia();return r.jsxs(c.Horizontal,{alignItems:"center",gap:8,role:"status",...t==null?void 0:t.container,...a,children:[r.jsx(c.View,{"data-role":"status-dot","aria-hidden":"true",width:"8px",height:"8px",borderRadius:"50%",...i[o].indicator,...t==null?void 0:t.indicator}),e&&r.jsx(c.Text,{"data-role":"status-label",fontSize:"14px",lineHeight:"20px",...i[o].label,...t==null?void 0:t.label,children:e})]})},ht=e=>{const o=Te("status",e);return r.jsx(dy,{...o})},gy=(e=!0,o,t,n)=>{const{on:a}=c.useResponsive(),l=a("mobile"),[i,g]=h.useState(o!==void 0?o:e);return h.useEffect(()=>{o!==void 0&&g(o)},[o]),{isExpanded:i,toggleExpanded:()=>{const u=!i;g(u),t&&t(u)},expand:()=>{i||(g(!0),t&&t(!0))},collapse:()=>{i&&(g(!1),t&&t(!1))},isMobile:l}},uy={sm:{expandedWidth:"240px",collapsedWidth:"64px"},md:{expandedWidth:"280px",collapsedWidth:"72px"},lg:{expandedWidth:"320px",collapsedWidth:"80px"},xl:{expandedWidth:"360px",collapsedWidth:"88px"}},hy=(e=>({default:{backgroundColor:"color-white",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},subtle:{backgroundColor:"color-gray-50",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease"},elevated:{backgroundColor:"color-white",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",color:"color-gray-800",transition:"all 0.2s ease-in-out"}}))(),fy={left:{left:0,borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{right:0,borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"}},my={none:{},low:{boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},medium:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)"},high:{boxShadow:"0 10px 30px rgba(0, 0, 0, 0.15)"}},py={fast:"all 0.2s ease-in-out",normal:"all 0.3s ease-in-out",slow:"all 0.5s ease-in-out",bounce:"all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55)"},kc=h.createContext({isExpanded:!0,toggleExpanded:()=>{},expand:()=>{},collapse:()=>{},position:"left",size:"md",variant:"default"}),ft=()=>h.useContext(kc),yy=({value:e,children:o})=>r.jsx(kc.Provider,{value:e,children:o}),by=({children:e,showToggleButton:o=!0,views:t,...n})=>{const{isExpanded:a,toggleExpanded:l,position:i}=ft();return r.jsx(c.Horizontal,{width:"100%",padding:"16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:"space-between",...t==null?void 0:t.header,...n,children:a?r.jsxs(c.Horizontal,{width:"100%",alignItems:"center",justifyContent:"space-between",children:[e,o&&r.jsx(c.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(we,{orientation:i==="left"?"left":"right",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})]}):r.jsx(c.View,{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",children:o&&r.jsx(c.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(we,{orientation:i==="left"?"right":"left",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})})})},xy=({children:e,views:o,...t})=>{const{isExpanded:n}=ft();return r.jsx(c.View,{flex:"1",width:"100%",overflowY:"auto",overflowX:"hidden",padding:n?"16px":"8px",...o==null?void 0:o.content,...t,children:e})},ky=({children:e,views:o,...t})=>{const{isExpanded:n}=ft();return r.jsx(c.View,{width:"100%",padding:n?"16px":"8px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",...o==null?void 0:o.footer,...t,children:e})},Cy=({children:e,position:o="left",size:t="md",variant:n="default",fixed:a=!1,hasBackdrop:l=!0,expandedWidth:i,collapsedWidth:g,breakpoint:s,breakpointBehavior:d="overlay",elevation:f="none",transitionPreset:u="normal",ariaLabel:m="Sidebar navigation",showToggleButton:p,toggleExpanded:y,expand:x,isExpanded:b,isMobile:C,collapse:k,views:S,themeMode:T,...w})=>{const F=uy[t],v=b?i||F.expandedWidth:g||F.collapsedWidth,z=!C||C&&d!=="hide",j=a||C&&d==="overlay"?"fixed":"relative",H=l&&C&&b&&d==="overlay";return r.jsxs(r.Fragment,{children:[H&&r.jsx(c.View,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"color-dark-50-360",zIndex:998,onClick:k,...S==null?void 0:S.backdrop}),z&&r.jsx(c.Vertical,{position:j,top:0,height:"100vh",width:v,zIndex:999,transition:py[u],transform:C&&d==="overlay"&&!b?`translateX(${o==="left"?"-100%":"100%"})`:"translateX(0)",role:"navigation","aria-label":m,...hy[n],...fy[o],...my[f],...S==null?void 0:S.container,...w,children:h.Children.map(e,E=>E)})]})},Fr=({children:e,position:o="left",size:t="md",variant:n="default",defaultExpanded:a=!0,expanded:l,onExpandedChange:i,fixed:g=!1,hasBackdrop:s=!0,showToggleButton:d=!0,expandedWidth:f,collapsedWidth:u,breakpoint:m=768,breakpointBehavior:p="overlay",views:y,...x})=>{const{isExpanded:b,toggleExpanded:C,expand:k,collapse:S,isMobile:T}=gy(a,l,i);return r.jsx(yy,{value:{isExpanded:b,toggleExpanded:C,expand:k,collapse:S,position:o,size:t,variant:n,views:y},children:r.jsx(Cy,{position:o,size:t,variant:n,fixed:g,hasBackdrop:s,showToggleButton:d,expandedWidth:f,collapsedWidth:u,breakpoint:m,breakpointBehavior:p,isExpanded:b,isMobile:T,toggleExpanded:C,expand:k,collapse:S,views:y,...x,children:e})})};Fr.Header=by,Fr.Content=xy,Fr.Footer=ky,Fr.useContext=ft;const wy=()=>({getItem:e=>{try{return typeof localStorage>"u"?null:localStorage.getItem(`resizable-${e}`)}catch(o){return console.warn("Failed to access localStorage:",o),null}},setItem:(e,o)=>{try{if(typeof localStorage>"u")return;localStorage.setItem(`resizable-${e}`,o)}catch(t){console.warn("Failed to write to localStorage:",t)}}}),Sy=(e,o,t,n=50,a=1/0,l=!1,i,g,s=10)=>{const[d,f]=h.useState(!1),[u,m]=h.useState([]),p=h.useRef(null),y=h.useRef(null),x=h.useRef(0),b=h.useRef([]),C=h.useRef(g||(typeof window<"u"?wy():null)),k=h.useCallback(()=>p.current?e==="horizontal"?p.current.offsetWidth:p.current.offsetHeight:0,[e]),S=h.useCallback(()=>{if(!i||!C.current)return null;const D=C.current.getItem(i);if(!D)return null;try{const V=JSON.parse(D);return Array.isArray(V.sizes)?V.sizes:null}catch(V){return console.warn("Failed to parse saved panel sizes:",V),null}},[i]),T=h.useCallback(()=>{if(!i||!C.current||u.length===0)return;const D=u.map(V=>({id:V.id,size:V.size,collapsed:V.collapsed||!1}));C.current.setItem(i,JSON.stringify({sizes:D}))},[i,u]),w=h.useCallback((D,V,P,_,q)=>{m(N=>N.some(G=>G.id===D)?N:[...N,{id:D,size:V,minSize:P??n,maxSize:_??a,collapsible:q??l,collapsed:!1}])},[n,a,l]),F=h.useCallback(D=>{m(V=>V.filter(P=>P.id!==D))},[]),v=h.useCallback(D=>{const V=u.find(P=>P.id===D);return V?V.size:0},[u]),z=h.useCallback((D,V)=>{m(P=>P.map(_=>_.id===D?{..._,size:V}:_))},[]),j=h.useCallback(D=>{const V=u.find(P=>P.id===D);return V?!!V.collapsed:!1},[u]),H=h.useCallback(D=>{m(V=>{const P=V.findIndex(G=>G.id===D);if(P===-1)return V;const _=V[P];if(!_.collapsible)return V;const q={..._,collapsed:!_.collapsed},N=[...V];return N[P]=q,N})},[]),E=h.useCallback((D,V)=>{y.current=D,x.current=V,b.current=u.map(P=>P.size),f(!0)},[u]),M=h.useCallback(D=>{if(!d||!y.current)return;const V=y.current,P=D-x.current;let _=-1;const q=V.match(/\d+$/);if(q&&(_=parseInt(q[0],10)-1),_===-1&&u.length>=2&&(_=0),_<0||_>=u.length-1)return;const N=u[_],G=u[_+1];if(N.collapsed||G.collapsed)return;let X=b.current[_]+P,$=b.current[_+1]-P;X=Math.max(N.minSize??n,Math.min(N.maxSize??a,X)),$=Math.max(G.minSize??n,Math.min(G.maxSize??a,$)),m(O=>O.map((B,L)=>L===_?{...B,size:X}:L===_+1?{...B,size:$}:B))},[d,u,e,n,a]),I=h.useCallback(()=>{d&&t&&t(u.map(D=>D.size)),y.current=null,f(!1),i&&T()},[d,u,t,i,T]),W=h.useCallback(D=>{if(!d||!y.current)return;const V=y.current;let P=-1;const _=V.match(/\d+$/);if(_&&(P=parseInt(_[0],10)-1),P===-1&&u.length>=2&&(P=0),P<0||P>=u.length-1)return;let q=0;e==="horizontal"?(D.key==="ArrowLeft"&&(q=-s),D.key==="ArrowRight"&&(q=s),D.key==="Home"&&(q=-100),D.key==="End"&&(q=100)):(D.key==="ArrowUp"&&(q=-s),D.key==="ArrowDown"&&(q=s),D.key==="Home"&&(q=-100),D.key==="End"&&(q=100)),q!==0&&(D.preventDefault(),M(x.current+q)),D.key==="Escape"&&(m(N=>N.map((G,X)=>({...G,size:b.current[X]}))),I())},[d,u,e,M,I,s]);return h.useEffect(()=>{if(typeof document>"u")return;const D=_=>{if(!d)return;const q=e==="horizontal"?_.clientX:_.clientY;M(q)},V=_=>{if(!d||_.touches.length===0)return;const q=_.touches[0],N=e==="horizontal"?q.clientX:q.clientY;M(N)},P=()=>{d&&I()};return d&&(document.addEventListener("mousemove",D),document.addEventListener("touchmove",V),document.addEventListener("mouseup",P),document.addEventListener("touchend",P),document.addEventListener("keydown",W),document.body.style.cursor=e==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",D),document.removeEventListener("touchmove",V),document.removeEventListener("mouseup",P),document.removeEventListener("touchend",P),document.removeEventListener("keydown",W),document.body.style.cursor="",document.body.style.userSelect=""}},[d,e,M,I,W]),h.useEffect(()=>{if(u.length!==0){if(i){const D=S();if(D){m(V=>V.map(P=>{const _=D.find(q=>q.id===P.id);return _?{...P,size:_.size,collapsed:_.collapsed||!1}:P}));return}}if(!o){const V=k()/u.length;m(P=>P.map(_=>({..._,size:V})))}}},[u.length,o,k,i,S]),h.useEffect(()=>{if(!o||o.length===0||u.length===0)return;const D=k(),V=o.map(P=>typeof P=="string"&&P.endsWith("%")?parseFloat(P)/100*D:typeof P=="number"?P:parseFloat(P));m(P=>P.map((_,q)=>({..._,size:q<V.length?V[q]:_.size})))},[o,u.length,k]),h.useEffect(()=>{u.length>0&&i&&!d&&T()},[u,i,d,T]),{isResizing:d,setIsResizing:f,containerRef:p,panels:u,registerPanel:w,unregisterPanel:F,getPanelSize:v,setPanelSize:z,isPanelCollapsed:j,togglePanelCollapse:H,startResize:E,onResize:M,endResize:I}},vy={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},Ty=(e,o)=>({sm:{width:o==="horizontal"?"4px":"100%",height:o==="vertical"?"4px":"100%"},md:{width:o==="horizontal"?"6px":"100%",height:o==="vertical"?"6px":"100%"},lg:{width:o==="horizontal"?"8px":"100%",height:o==="vertical"?"8px":"100%"}})[e],Iy=(e=>({default:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}},subtle:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-100"},_active:{backgroundColor:"color-gray-200"}},prominent:{backgroundColor:"color-gray-100",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}}}))(),mt={horizontal:{width:"2px",height:"20px",backgroundColor:"color-gray-400",margin:"0 1px"},vertical:{width:"20px",height:"2px",backgroundColor:"color-gray-400",margin:"1px 0"}},Cc=h.createContext({orientation:"horizontal",size:"md",variant:"default",isResizing:!1,setIsResizing:()=>{},registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>0,setPanelSize:()=>{},isPanelCollapsed:()=>!1,togglePanelCollapse:()=>{},startResize:()=>{},onResize:()=>{},endResize:()=>{}}),wc=()=>h.useContext(Cc),Fy=({value:e,children:o})=>r.jsx(Cc.Provider,{value:e,children:o}),zy=({children:e,id:o,defaultSize:t,minSize:n,maxSize:a,collapsible:l,defaultCollapsed:i,onCollapseChange:g,views:s,...d})=>{const{orientation:f,registerPanel:u,unregisterPanel:m,getPanelSize:p,isPanelCollapsed:y,togglePanelCollapse:x}=wc(),b=typeof t=="string"&&t.endsWith("%")?0:typeof t=="number"?t:0;h.useEffect(()=>(u(o,b,n,a,l),()=>m(o)),[o,b,n,a,l,u,m]);const C=p(o),k=y(o);return h.useEffect(()=>{g&&k!==void 0&&g(k)},[k,g]),h.useEffect(()=>{l&&i&&!k&&x(o)},[o,l,i,k,x]),k?r.jsx(c.View,{flex:"0 0 auto",width:f==="horizontal"?"10px":"100%",height:f==="vertical"?"10px":"100%",backgroundColor:"color-gray-200",cursor:"pointer",onClick:()=>x(o),"aria-label":`Expand panel ${o}`,role:"button",tabIndex:0,...s==null?void 0:s.collapsedPanel,...d}):r.jsx(c.View,{flex:C>0?"0 0 auto":"1",width:f==="horizontal"?`${C}px`:"100%",height:f==="vertical"?`${C}px`:"100%",overflow:"auto",...s==null?void 0:s.panel,...d,children:e})},My=({id:e,position:o="both",disabled:t=!1,withVisualIndicator:n=!0,withCollapseButton:a=!1,collapseTarget:l,views:i,...g})=>{const{orientation:s,size:d,variant:f,startResize:u,isPanelCollapsed:m,togglePanelCollapse:p}=wc(),x=(()=>{if(l)return l;const w=e.match(/\d+$/);if(!w)return"";const F=parseInt(w[0],10);return isNaN(F)?"":`panel${F}`})(),b=m(x),C=w=>{if(t)return;w.preventDefault();const F=s==="horizontal"?w.clientX:w.clientY;u(e,F)},k=w=>{if(t||w.touches.length===0)return;w.preventDefault();const F=w.touches[0],v=s==="horizontal"?F.clientX:F.clientY;u(e,v)},S=w=>{t||(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),u(e,0))},T=w=>{w.stopPropagation(),x&&p(x)};return r.jsxs(c.View,{role:"separator","aria-orientation":s,"aria-valuemin":0,"aria-valuemax":100,tabIndex:t?-1:0,cursor:s==="horizontal"?"col-resize":"row-resize",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...Ty(d,s),...Iy[f],onMouseDown:C,onTouchStart:k,onKeyDown:S,opacity:t?.5:1,pointerEvents:t?"none":"auto",...i==null?void 0:i.handle,...g,children:[n&&r.jsx(c.View,{display:"flex",alignItems:"center",justifyContent:"center",width:s==="horizontal"?"100%":"auto",height:s==="vertical"?"100%":"auto",pointerEvents:"none",...i==null?void 0:i.handleIcon,children:s==="horizontal"?r.jsxs(c.Horizontal,{gap:1,children:[r.jsx(c.View,{...mt.horizontal}),r.jsx(c.View,{...mt.horizontal})]}):r.jsxs(c.Vertical,{gap:1,children:[r.jsx(c.View,{...mt.vertical}),r.jsx(c.View,{...mt.vertical})]})}),a&&x&&r.jsx(c.View,{position:"absolute",top:s==="horizontal"?"-20px":"50%",left:s==="horizontal"?"50%":"-20px",transform:s==="horizontal"?"translateX(-50%)":"translateY(-50%)",width:"16px",height:"16px",borderRadius:"full",backgroundColor:"color-gray-100",border:"1px solid",borderColor:"color-gray-300",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:1,onClick:T,"aria-label":b?`Expand panel ${x}`:`Collapse panel ${x}`,role:"button",tabIndex:0,pointerEvents:"auto",_hover:{backgroundColor:"color-gray-200"},...i==null?void 0:i.collapseIcon,children:r.jsx(c.View,{width:"8px",height:"8px",display:"flex",alignItems:"center",justifyContent:"center",children:b?r.jsxs(c.Horizontal,{children:[r.jsx(c.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"}),r.jsx(c.View,{width:"2px",height:"6px",backgroundColor:"color-gray-600",position:"absolute"})]}):r.jsx(c.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"})})})]})},jy=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,minSize:l,maxSize:i,collapsible:g=!1,containerRef:s,autoSaveId:d,keyboardResizeBy:f,onLayout:u,views:m,...p})=>{const y=o==="horizontal"?c.Horizontal:c.Vertical;return r.jsx(y,{ref:s,width:"100%",height:"100%",position:"relative",overflow:"hidden",...vy[o],...m==null?void 0:m.container,...p,children:e})},An=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,onSizesChange:l,minSize:i=50,maxSize:g,collapsible:s=!1,autoSaveId:d,storage:f,keyboardResizeBy:u=10,views:m,...p})=>{const{isResizing:y,setIsResizing:x,containerRef:b,registerPanel:C,unregisterPanel:k,getPanelSize:S,setPanelSize:T,isPanelCollapsed:w,togglePanelCollapse:F,startResize:v,onResize:z,endResize:j}=Sy(o,a,l,i,g,s,d,f,u);return r.jsx(Fy,{value:{orientation:o,size:t,variant:n,isResizing:y,setIsResizing:x,registerPanel:C,unregisterPanel:k,getPanelSize:S,setPanelSize:T,isPanelCollapsed:w,togglePanelCollapse:F,startResize:v,onResize:z,endResize:j},children:r.jsx(jy,{orientation:o,size:t,variant:n,defaultSizes:a,minSize:i,maxSize:g,collapsible:s,autoSaveId:d,keyboardResizeBy:u,containerRef:b,views:m,...p,children:e})})};An.Panel=zy,An.Handle=My;const pt={info:{container:{backgroundColor:"color-blue-50",border:"color-blue-300"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",border:"color-green-300"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},warning:{container:{backgroundColor:"color-orange-50",border:"color-orange-300"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}},error:{container:{backgroundColor:"color-red-50",border:"color-red-300"},content:{color:"color-red-700"},icon:{color:"color-red-500"}}},Wy={top:{top:"16px",left:"50%",transform:"translateX(-50%)"},"top-right":{top:"16px",right:"16px"},"top-left":{top:"16px",left:"16px"},bottom:{bottom:"16px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"16px",right:"16px"},"bottom-left":{bottom:"16px",left:"16px"}},Ey=()=>Math.random().toString(36).substring(2,9);let Jo=new Map;const zr=Wo.create(e=>({toasts:[],add:(o,t,n,a={})=>{const l=a.id||Ey(),i={id:l,variant:o,title:t,description:n,createdAt:Date.now(),isVisible:!0,...a};if(e(g=>({toasts:[...g.toasts,i]})),a.duration!==0){const g=a.duration||5e3,s=setTimeout(()=>{zr.getState().remove(l)},g);Jo.set(l,s)}return l},remove:o=>{e(t=>({toasts:t.toasts.map(n=>n.id===o?{...n,isVisible:!1}:n)})),Jo.has(o)&&(clearTimeout(Jo.get(o)),Jo.delete(o)),setTimeout(()=>{e(t=>({toasts:t.toasts.filter(n=>n.id!==o)}))},300)},removeAll:()=>{Jo.forEach(clearTimeout),Jo.clear(),e(o=>({toasts:o.toasts.map(t=>({...t,isVisible:!1}))})),setTimeout(()=>{e({toasts:[]})},300)}})),zo=(e,o,t,n)=>zr.getState().add(e,o,t,n),Sc=(e,o,t)=>zo("info",e,o,t),vc=(e,o,t)=>zo("success",e,o,t),Tc=(e,o,t)=>zo("warning",e,o,t),Ic=(e,o,t)=>zo("error",e,o,t),Fc=e=>{zr.getState().remove(e)},zc=()=>{zr.getState().removeAll()},Mc=({variant:e,title:o,description:t,onClose:n,isClosable:a=!0,action:l,actionText:i,showIcon:g=!0,theme:s,views:d,render:f,icon:u,id:m,isVisible:p=!0,themeMode:y})=>{const x=s??pt,b=()=>{var T,w;if(u!==void 0)return u;const S=e?(w=(T=pt[e])==null?void 0:T.icon)==null?void 0:w.color:pt.info.icon.color;switch(e){case"info":return r.jsx(lo,{widthHeight:20,color:S});case"success":return r.jsx(da,{widthHeight:20,color:S});case"warning":return r.jsx(lo,{widthHeight:20,color:S,orientation:"down"});case"error":return r.jsx(Hr,{widthHeight:20,color:S});default:return r.jsx(lo,{widthHeight:20,color:pt.info.icon.color})}};if(f)return r.jsx(r.Fragment,{children:f({id:m||"",onClose:n})});const C=e==="error"?"alert":"status",k=e==="error"||e==="warning"?"assertive":"polite";return r.jsxs(c.Horizontal,{role:C,"aria-live":k,"aria-atomic":"true","data-state":p?"open":"closed",gap:12,width:"100%",maxWidth:"380px",borderWidth:"1px",borderStyle:"solid",borderRadius:"12px",padding:"12px 14px",alignItems:"flex-start",position:"relative",backgroundColor:x[e].container.backgroundColor,borderColor:x[e].container.border,boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",opacity:p?1:0,transform:p?"translateY(0)":"translateY(4px)",transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",...d==null?void 0:d.container,children:[g&&r.jsx(c.View,{marginTop:"2px",...d==null?void 0:d.icon,children:b()}),r.jsxs(c.Vertical,{gap:4,flex:"1",children:[r.jsx(c.Text,{fontSize:"14px",lineHeight:"20px",fontWeight:"600",color:x[e].content.color,backgroundColor:x[e].container.backgroundColor,...d==null?void 0:d.title,children:o}),t&&r.jsx(c.Text,{fontSize:"12px",lineHeight:"18px",color:x[e].content.color,fontWeight:"400",backgroundColor:x[e].container.backgroundColor,...d==null?void 0:d.description,children:t}),l&&i&&r.jsx(c.Text,{fontSize:"14px",fontWeight:"600",marginTop:"6px",cursor:"pointer",color:x[e].content.color,backgroundColor:x[e].container.backgroundColor,onClick:S=>{S.stopPropagation(),l()},_hover:{textDecoration:"underline"},transition:"opacity 0.2s ease, color 0.2s ease",...d==null?void 0:d.actionButton,children:i})]}),a&&r.jsx(c.View,{as:"button","aria-label":"Close toast",backgroundColor:"transparent",border:"none",cursor:"pointer",padding:"4px",marginLeft:"8px",marginTop:"-2px",marginRight:"-4px",borderRadius:"9999px",onClick:S=>{S.stopPropagation(),n()},_hover:{backgroundColor:"color-black-900-60"},transition:"background-color 0.2s ease, opacity 0.2s ease",...d==null?void 0:d.closeButton,children:r.jsx(Le,{widthHeight:16,color:x[e].content.color})})]})},Ay=({position:e="top-right",gap:o=8,limit:t=5,containerStyle:n})=>{const{toasts:a,remove:l}=zr(),g=h.useMemo(()=>{const s={top:[],"top-right":[],"top-left":[],bottom:[],"bottom-right":[],"bottom-left":[]};return a.forEach(d=>{const f=d.position||e;s[f].push(d)}),Object.keys(s).forEach(d=>{s[d]=s[d].slice(-t)}),s},[a,e,t])[e];return r.jsx(c.View,{position:"fixed",zIndex:9999,display:"flex",flexDirection:e.includes("bottom")?"column-reverse":"column",gap:`${o}px`,width:"fit-content",maxWidth:"100%",pointerEvents:"none",...Wy[e],style:n,children:g.map(s=>r.jsx(c.View,{pointerEvents:"auto",animation:e.includes("right")?"slideInRight 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("left")?"slideInLeft 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("top")?"slideInDown 0.3s ease-out, fadeIn 0.3s ease-out":"slideInUp 0.3s ease-out, fadeIn 0.3s ease-out",children:r.jsx(Mc,{id:s.id,variant:s.variant,title:s.title,description:s.description,onClose:()=>l(s.id),isClosable:s.isClosable,action:s.action,actionText:s.actionText,showIcon:s.showIcon,views:s.views,render:s.render,icon:s.icon,isVisible:s.isVisible})},s.id))})},Hy=()=>({toast:(e,o,t,n)=>zo(e,o,t,n),info:(e,o,t)=>Sc(e,o,t),success:(e,o,t)=>vc(e,o,t),warning:(e,o,t)=>Tc(e,o,t),error:(e,o,t)=>Ic(e,o,t),remove:e=>Fc(e),removeAll:()=>zc()}),Vy=Object.assign(e=>r.jsx(Mc,{...e}),{Container:e=>r.jsx(Ay,{...e}),show:zo,info:Sc,success:vc,warning:Tc,error:Ic,remove:Fc,removeAll:zc}),Py=Hy,jc=()=>Math.random().toString(36).substring(2,11),Dy=({defaultOpen:e=!1,openDelay:o=200,closeDelay:t=200,isDisabled:n=!1}={})=>{const[a,l]=h.useState(e),i=h.useRef(null),g=h.useRef(null),s=h.useRef(null),d=h.useRef(null),f=h.useRef(`tooltip-trigger-${jc()}`).current,u=h.useRef(`tooltip-content-${jc()}`).current,m=h.useCallback(()=>{n||(d.current&&(clearTimeout(d.current),d.current=null),!a&&!s.current&&(s.current=setTimeout(()=>{l(!0),s.current=null},o)))},[a,o,n]),p=h.useCallback(()=>{s.current&&(clearTimeout(s.current),s.current=null),a&&!d.current&&(d.current=setTimeout(()=>{l(!1),d.current=null},t))},[a,t]),y=h.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]);return h.useEffect(()=>()=>{s.current&&clearTimeout(s.current),d.current&&clearTimeout(d.current)},[]),h.useEffect(()=>{if(typeof document>"u")return;const x=b=>{b.key==="Escape"&&a&&l(!1)};return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[a]),{isOpen:a,openTooltip:m,closeTooltip:p,cancelCloseTimer:y,triggerRef:i,contentRef:g,triggerId:f,contentId:u}},$y={sm:{padding:"4px 8px",fontSize:"12px",maxWidth:"200px"},md:{padding:"6px 10px",fontSize:"14px",maxWidth:"250px"},lg:{padding:"8px 12px",fontSize:"16px",maxWidth:"300px"}},Ly=(e=>({default:{backgroundColor:"color-gray-900",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.06)",transition:"opacity 0.15s ease"},light:{backgroundColor:"color-white",color:"color-gray-800",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.04)",transition:"opacity 0.15s ease"},dark:{backgroundColor:"color-gray-950",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.2), 0px 2px 4px rgba(0, 0, 0, 0.12)",transition:"opacity 0.15s ease"}}))(),By=e=>{const o={position:"absolute",width:"8px",height:"8px",backgroundColor:"inherit",borderStyle:"inherit",borderWidth:"inherit",borderColor:"inherit",transform:"rotate(45deg)"};switch(e){case"top":return{...o,bottom:"-4px",left:"50%",marginLeft:"-4px",borderTop:"none",borderLeft:"none"};case"right":return{...o,left:"-4px",top:"50%",marginTop:"-4px",borderRight:"none",borderTop:"none"};case"bottom":return{...o,top:"-4px",left:"50%",marginLeft:"-4px",borderBottom:"none",borderRight:"none"};case"left":return{...o,right:"-4px",top:"50%",marginTop:"-4px",borderLeft:"none",borderBottom:"none"};default:return o}},Wc=h.createContext({isOpen:!1,openTooltip:()=>{},closeTooltip:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),Hn=()=>h.useContext(Wc),_y=({value:e,children:o})=>r.jsx(Wc.Provider,{value:e,children:o}),Ec=h.memo(({children:e,views:o,asChild:t=!1,...n})=>{const{openTooltip:a,closeTooltip:l,triggerRef:i,contentId:g,triggerId:s}=Hn(),d=h.useCallback(()=>a(),[a]),f=h.useCallback(()=>l(),[l]),u=h.useCallback(()=>a(),[a]),m=h.useCallback(()=>l(),[l]),p={ref:i,onMouseEnter:d,onMouseLeave:f,onFocus:u,onBlur:m,id:s,"aria-describedby":g,...o==null?void 0:o.container,...n};return t&&h.isValidElement(e)?h.cloneElement(e,p):r.jsx(c.View,{display:"inline-block",...p,children:e})}),Oy=h.memo(({children:e,views:o,...t})=>{const{isOpen:n,contentRef:a,contentId:l,triggerId:i}=Hn();return n?r.jsx(c.View,{ref:a,id:l,role:"tooltip","aria-labelledby":i,...o==null?void 0:o.container,...t,children:e}):null}),Ny=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:l="default",showArrow:i=!0,views:g,themeMode:s,...d})=>{const{isOpen:f,triggerRef:u,contentRef:m,contentId:p,triggerId:y}=Hn(),{ref:x,relation:b}=c.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[C,k]=h.useState({x:0,y:0,placement:t});h.useEffect(()=>{u!=null&&u.current&&x&&(x.current=u.current)},[u,x,f]),h.useEffect(()=>{if(f&&(m!=null&&m.current)&&(u!=null&&u.current)){const w=u.current.getBoundingClientRect();let F=t;b&&(t==="top"&&b.space.vertical==="bottom"?F="bottom":t==="bottom"&&b.space.vertical==="top"?F="top":t==="right"&&b.space.horizontal==="left"?F="left":t==="left"&&b.space.horizontal==="right"&&(F="right"));let v=0,z=0;switch(F){case"top":v=n==="start"?w.left:n==="end"?w.right-120:w.left+w.width/2-60,z=w.top-8;break;case"bottom":v=n==="start"?w.left:n==="end"?w.right-120:w.left+w.width/2-60,z=w.bottom+8;break;case"right":v=w.right+8,z=n==="start"?w.top:n==="end"?w.bottom-32:w.top+w.height/2-16;break;case"left":v=w.left-8,z=n==="start"?w.top:n==="end"?w.bottom-32:w.top+w.height/2-16;break}k({x:v,y:z,placement:F})}},[f,t,n,u,m,b]);const S=h.useMemo(()=>i?By(C.placement):{},[i,C.placement]),T=h.useMemo(()=>{const w={position:"fixed",left:C.x,top:C.y,zIndex:1e3};switch(C.placement){case"top":return{...w,transform:"translateY(-100%)"};case"left":return{...w,transform:"translateX(-100%)"};case"bottom":case"right":default:return w}},[C.x,C.y,C.placement]);return r.jsxs(c.View,{position:"relative",display:"inline-block",...g==null?void 0:g.container,...d,children:[r.jsx(Ec,{children:o}),f&&r.jsxs(c.View,{ref:m,id:p,role:"tooltip","aria-labelledby":y,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",style:T,...$y[a],...Ly[l],...g==null?void 0:g.content,children:[typeof e=="string"?r.jsx(c.Text,{...g==null?void 0:g.text,children:e}):e,i&&r.jsx(c.View,{...S,...g==null?void 0:g.arrow})]})]})},yt=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:l="default",openDelay:i=200,closeDelay:g=200,showArrow:s=!0,defaultOpen:d=!1,isDisabled:f=!1,views:u,...m})=>{const p=Dy({defaultOpen:d,openDelay:i,closeDelay:g,isDisabled:f});return r.jsx(_y,{value:p,children:r.jsx(Ny,{content:e,position:t,align:n,size:a,variant:l,showArrow:s,views:u,...m,children:o})})};yt.Trigger=Ec,yt.Content=Oy;const Ac=h.forwardRef((e,o)=>{const t={...e,isAgentRunning:e.isAgentRunning??e.isWorkerRunning,onStopAgent:e.onStopAgent??e.onStopWorker,disabled:e.disabled??e.isDisabled},n=Pl(t);return h.useImperativeHandle(o,()=>({getValue:()=>{var a,l;return((a=n.hiddenInputRef.current)==null?void 0:a.value)??((l=n.editableRef.current)==null?void 0:l.textContent)??n.value??""},setValue:n.setValue,clear:()=>n.setValue(""),focus:()=>{var a;return(a=n.editableRef.current)==null?void 0:a.focus()},blur:()=>{var a;return(a=n.editableRef.current)==null?void 0:a.blur()},getElement:()=>n.editableRef.current,getInputElement:()=>n.hiddenInputRef.current})),r.jsx(Nl,{...t,...n})});Ac.displayName="ChatInput";const qy={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}},Hc={container:{position:"relative",display:"flex",flexDirection:"column",height:"100vh",alignItems:"center",justifyContent:"center"},gradient:{position:"absolute",inset:"-10px",opacity:.5,pointerEvents:"none",filter:"blur(10px)",backgroundSize:"300% 200%",backgroundPosition:"50% 50%, 50% 50%"}},Vn={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},image:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundAttachment:"scroll"},content:{position:"relative",width:"100%",height:"100%",zIndex:2}},Pn={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},video:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover"},content:{position:"relative",zIndex:2}},Uy=h.createContext({}),Gy=({children:e,showRadialGradient:o=!0,views:t,themeMode:n,...a})=>{const l={white:"rgba(255,255,255,1)",transparent:"rgba(255,255,255,0)"},i=["rgb(59, 130, 246)","rgb(196, 181, 253)","rgb(147, 197, 253)","rgb(221, 214, 254)","rgb(96, 165, 250)"],g={...Hc.gradient,backgroundImage:`
71
+ repeating-linear-gradient(100deg, ${i.join(", ")}),
28
72
  repeating-linear-gradient(100deg, ${l.white} 0%, ${l.white} 7%, ${l.transparent} 10%, ${l.transparent} 12%, ${l.white} 16%)
29
- `,animation:"aurora 4s ease infinite",...o?{maskImage:"radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%)"}:{}};return r.jsxs(i.View,{...Zi.container,...t==null?void 0:t.container,...a,children:[r.jsx(i.View,{style:s}),e,r.jsx("style",{children:`
73
+ `,animation:"aurora 4s ease infinite",...o?{maskImage:"radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%)"}:{}};return r.jsxs(c.View,{...Hc.container,...t==null?void 0:t.container,...a,children:[r.jsx(c.View,{style:g}),e,r.jsx("style",{children:`
30
74
  @keyframes aurora {
31
75
  0% { background-position: 0% 50%; }
32
76
  50% { background-position: 100% 50%; }
33
77
  100% { background-position: 0% 50%; }
34
78
  }
35
- `})]})},Ru=({number:e=20,children:o,...t})=>{const n=Array.from({length:e},(a,l)=>l);return r.jsxs(i.View,{width:"100%",height:"100%",backgroundColor:"black",position:"relative",overflow:"hidden",...t,children:[n.map(a=>{const l=a*37%200-100+"px",c=.2+a*13%6*.1+"s",s=(1+a*7%9)/2+"s",d=300+a*17%100+"px";return r.jsx(i.View,{position:"absolute",top:"0px",left:l,width:"2px",height:"2px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)",transform:"rotate(215deg)",zIndex:0,animate:{from:{transform:"translateX(-100%) translateY(-100%)"},to:{transform:`translateX(${d}) translateY(${d})`},iterationCount:"infinite",timingFunction:"linear",fillMode:"forwards",duration:s,delay:c},children:r.jsx(i.View,{position:"absolute",top:"-1px",left:"-1px",width:"1px",height:"1px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 10px 0 1px rgba(255, 255, 255, 0.1)"})},a)}),o&&r.jsx(i.View,{position:"relative",zIndex:1,width:"100%",height:"100%",children:o})]})},Ri=["rgb(186, 230, 253)","rgb(249, 168, 212)","rgb(134, 239, 172)","rgb(253, 224, 71)","rgb(252, 165, 165)","rgb(216, 180, 254)","rgb(147, 197, 253)","rgb(165, 180, 252)","rgb(196, 181, 253)"],ey=()=>Ri[Math.floor(Math.random()*Ri.length)],oy=({rows:e=15,cols:o=10,squareSize:t=40,...n})=>{const a=Array(e).fill(1),l=Array(o).fill(1);return r.jsx(i.View,{padding:16,width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-50",zIndex:0,transform:"skewX(-48deg) skewY(14deg) scale(0.675) rotate(0deg) translateZ(0)",...n,children:a.map((c,s)=>r.jsx(i.Horizontal,{gap:0,children:l.map((d,g)=>r.jsx(i.View,{height:t/3,width:t,borderStyle:"solid",borderColor:"color-gray-200",borderWidth:.5,backgroundColor:"transparent",cursor:"pointer",on:{hover:{backgroundColor:ey(),transition:"background-color 0.2s ease"}}},`col-${g}`))},`row-${s}`))})},ry=["rgb(59, 130, 246)","rgb(147, 51, 234)","rgb(236, 72, 153)","rgb(34, 197, 94)","rgb(251, 146, 60)","rgb(168, 85, 247)"],ty=({count:e=50,colors:o=ry,speed:t="medium",shapes:n=["circle"],...a})=>{const l=Array.from({length:e},(g,m)=>m),c=()=>{switch(t){case"slow":return .5;case"fast":return 2;default:return 1}},s=()=>n[Math.floor(Math.random()*n.length)],d=()=>o[Math.floor(Math.random()*o.length)];return r.jsx(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:l.map(g=>{const m=Math.random()*8+4,f=Math.random()*400,p=Math.random()*300,u=Math.random()*400,y=Math.random()*300,k=(Math.random()*10+5)/c(),x=Math.random()*5,C=s(),S=d(),w={circle:{borderRadius:"50%"},square:{borderRadius:"2px"},triangle:{borderRadius:"0",clipPath:"polygon(50% 0%, 0% 100%, 100% 100%)"}};return r.jsx(i.View,{position:"absolute",width:m,height:m,backgroundColor:S,opacity:.7,style:{left:f,top:p,...w[C]},animate:{from:{transform:"translate(0px, 0px) scale(0.5)",opacity:0},to:{transform:`translate(${u-f}px, ${y-p}px) scale(1)`,opacity:.7},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${k}s`,delay:`${x}s`}},g)})})},ny=({gridSize:e=30,lineColor:o="rgba(59, 130, 246, 0.3)",pulseColor:t="rgba(59, 130, 246, 0.8)",animationSpeed:n="medium",...a})=>{const l=()=>{switch(n){case"slow":return 4;case"fast":return 1;default:return 2}},c=Math.floor(400/e),s=Math.floor(300/e),d=c*s,g=Array.from({length:d},(m,f)=>f);return r.jsxs(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:[Array.from({length:c+1},(m,f)=>r.jsx(i.View,{position:"absolute",left:f*e,top:0,width:1,height:"100%",backgroundColor:o},`v-line-${f}`)),Array.from({length:s+1},(m,f)=>r.jsx(i.View,{position:"absolute",left:0,top:f*e,width:"100%",height:1,backgroundColor:o},`h-line-${f}`)),g.map(m=>{const f=m%c,p=Math.floor(m/c),u=(f+p)*.1;return r.jsx(i.View,{position:"absolute",left:f*e+1,top:p*e+1,width:e-2,height:e-2,backgroundColor:"transparent",animate:{from:{backgroundColor:"transparent"},to:{backgroundColor:t},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${l()}s`,delay:`${u}s`}},m)})]})},ay=["rgba(59, 130, 246, 0.6)","rgba(147, 51, 234, 0.6)","rgba(236, 72, 153, 0.6)","rgba(34, 197, 94, 0.6)"],ly=({rippleCount:e=5,colors:o=ay,maxSize:t=200,frequency:n=3,...a})=>{const l=Array.from({length:e},(c,s)=>({id:s,x:Math.random()*400,y:Math.random()*300,color:o[s%o.length],delay:s*(n/e),duration:3+Math.random()*2}));return r.jsxs(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-100",...a,children:[l.map(c=>r.jsx(i.View,{position:"absolute",width:20,height:20,borderRadius:"50%",style:{left:c.x-10,top:c.y-10,border:`2px solid ${c.color}`,backgroundColor:"transparent"},animate:{from:{transform:"scale(0)",opacity:1},to:{transform:`scale(${t/20})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${c.duration}s`,delay:`${c.delay}s`}},c.id)),l.map(c=>r.jsx(i.View,{position:"absolute",width:10,height:10,borderRadius:"50%",style:{left:c.x-5,top:c.y-5,backgroundColor:c.color},animate:{from:{transform:"scale(1)",opacity:.8},to:{transform:`scale(${t/40})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${c.duration*1.2}s`,delay:`${c.delay+.5}s`}},`secondary-${c.id}`))]})},iy=({children:e,src:o,backgroundSize:t="cover",backgroundPosition:n="center",backgroundRepeat:a="no-repeat",backgroundAttachment:l="scroll",imageOpacity:c=1,overlay:s=null,blendMode:d="normal",views:g,themeMode:m,...f})=>{const p={...un.image,backgroundImage:`url(${o})`,backgroundSize:t,backgroundPosition:n,backgroundRepeat:a,backgroundAttachment:l,opacity:c,mixBlendMode:d};return r.jsxs(i.View,{...un.container,...g==null?void 0:g.container,...f,children:[r.jsx(i.View,{style:p,...g==null?void 0:g.image}),s,e&&r.jsx(i.View,{...un.content,...g==null?void 0:g.content,children:e})]})},cy=({children:e,src:o,autoPlay:t=!0,loop:n=!0,muted:a=!0,playsInline:l=!0,overlay:c=null,blendMode:s="normal",views:d,themeMode:g,...m})=>r.jsxs(i.View,{...yn.container,...d==null?void 0:d.container,...m,children:[r.jsx(i.View,{as:"video",src:o,autoPlay:t,loop:n,muted:a,playsInline:l,style:{...yn.video,mixBlendMode:s},...d==null?void 0:d.video}),c,e&&r.jsx(i.View,{...yn.content,...d==null?void 0:d.content,children:e})]}),sy=({children:e,...o})=>r.jsx(xi,{...o,children:e}),dy=/^(color|theme|light|dark)-/,gy=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},hy=({contentPosition:e,backgroundColor:o="color-black-900",...t})=>{const n=dy.test(o),a=n?gy(o):o,c=(()=>{let s=`${a}-100`,d=`${a}-900`,g=`${a}-600`,m=`${a}-400`;switch(n||(s=`color-mix(in srgb, ${a} 10%, transparent)`,d=`color-mix(in srgb, ${a} 90%, transparent)`,g=`color-mix(in srgb, ${a} 70%, transparent)`,m=`color-mix(in srgb, ${a} 50%, transparent)`),e){case"left":return`radial-gradient(circle at 70% 50%, ${s} 0%, ${s} 100%), linear-gradient(to right, ${d} 0%, ${g} 65%, ${s} 100%)`;case"right":return`radial-gradient(circle at 30% 50%, ${s} 0%, ${s} 100%), linear-gradient(to left, ${d} 0%, ${g} 65%, ${s} 100%)`;case"top":return`radial-gradient(circle at 50% 40%, ${s} 0%, ${s} 100%), linear-gradient(to bottom, ${d} 0%, ${g} 60%, ${s} 100%)`;case"bottom":return`radial-gradient(circle at 50% 60%, ${s} 0%, ${s} 100%), linear-gradient(to top, ${d} 0%, ${g} 60%, ${s} 100%)`;case"center":return`radial-gradient(circle at 50% 70%, ${d} 0%, ${s} 100%)`;default:return m}})();return r.jsx(i.View,{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:c,pointerEvents:"none",zIndex:1,...t})},fy=({children:e,views:o,...t})=>r.jsx(Qu.Provider,{value:{},children:r.jsx(i.View,{...Ju.container,...o==null?void 0:o.container,...t,children:e})}),ec=h.forwardRef(({children:e,shape:o="rounded",decorationRotation:t=5,decorationScale:n=1,decorationOpacity:a=.8,views:l,...c},s)=>{const g=(k=>{switch(k){case"square":return"0px";case"pill":return"9999px";case"rounded":default:return"16px"}})(o),m=Math.abs(t)*(Math.PI/180),f=Math.sin(m)*100,p=(n-1)*100/2,u=Math.ceil(f+p),y=c.backgroundColor??"theme-primary";return r.jsx(i.View,{...c,ref:s,backgroundColor:"transparent",position:"relative",overflow:"visible",...l==null?void 0:l.container,children:r.jsxs(i.View,{padding:c.padding??`${96+u}px ${u}px`,position:"relative",overflow:"visible",children:[r.jsx(i.View,{position:"absolute",top:u,left:u,right:u,bottom:u,backgroundColor:y,borderRadius:g,opacity:a/1.5,transform:`scale(${n})`,pointerEvents:"none",zIndex:1,...l==null?void 0:l.back}),r.jsx(i.View,{position:"absolute",top:u,left:u,right:u,bottom:u,transform:`rotate(${t}deg) scale(${n})`,opacity:a/1.2,backgroundColor:y,borderRadius:g,pointerEvents:"none",zIndex:2,...l==null?void 0:l.front}),r.jsx(i.View,{margin:"0 auto",position:"relative",zIndex:3,...l==null?void 0:l.content,children:e})]})})});ec.displayName="Background.Layout";const fe=fy;fe.Aurora=Zu,fe.Meteors=Ru,fe.Wall=oy,fe.Particles=ty,fe.Grid=ny,fe.Ripples=ly,fe.Image=iy,fe.Video=cy,fe.Gradient=sy,fe.Overlay=hy,fe.Layout=ec;const oc=h.forwardRef((e,o)=>r.jsx(fe,{...e,ref:o}));oc.displayName="Background";const rc=Object.assign(oc,{Layout:fe.Layout,Aurora:fe.Aurora,Meteors:fe.Meteors,Wall:fe.Wall,Particles:fe.Particles,Grid:fe.Grid,Ripples:fe.Ripples,Image:fe.Image,Video:fe.Video,Gradient:fe.Gradient,Overlay:fe.Overlay});rc.displayName="Background";function my(e){const{inputValue:o,onInputChange:t,onSubmit:n,messages:a=[]}=e,[l,c]=h.useState(""),s=h.useRef(null),d=h.useRef(null),g=o!==void 0,m=o!==void 0?o:l,f=h.useCallback(u=>{g?t==null||t(u):c(u)},[g,t]),p=h.useCallback(u=>{u&&u.preventDefault();const y=m.trim();y&&n&&(n(y),g||c(""),s.current&&(s.current.style.height="auto"))},[m,n,g]);return h.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[a.length]),{internalInputValue:m,handleInputChange:f,handleSubmit:p,inputRef:s,messagesRef:d}}const py={sm:{fontSize:"12px",padding:"8px"},md:{fontSize:"14px",padding:"10px"},lg:{fontSize:"14px",padding:"12px"}},uy={default:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},glassy:{backgroundColor:"color-white-900",backdropFilter:"blur(10px)",border:"1px solid rgba(226, 232, 240, 0.9)",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},minimal:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px"}},yy={sm:{fontSize:"12px",padding:"8px 10px",borderRadius:"12px"},md:{fontSize:"14px",padding:"10px 12px",borderRadius:"12px"},lg:{fontSize:"14px",padding:"12px 14px",borderRadius:"14px"}},by={backgroundColor:"theme-primary",color:"color-white",alignSelf:"flex-end",borderBottomRightRadius:"4px"},xy={backgroundColor:"color-white",color:"color-gray-900",alignSelf:"flex-start",borderBottomLeftRadius:"4px",border:"1px solid color-gray-200"},Ye={container:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"hidden"},messagesContainer:{flex:1,overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px",padding:"16px",backgroundColor:"color-gray-50"},inputContainer:{position:"relative",backgroundColor:"color-white",borderTop:"1px solid color-gray-200",padding:"12px",display:"flex",alignItems:"flex-end",gap:"8px",transition:"background-color 0.2s ease, border-color 0.2s ease"},bubble:{maxWidth:"80%",position:"relative",wordWrap:"break-word",animation:"chatBubbleAppear 0.25s ease-out"},timestamp:{position:"absolute",top:"-24px",fontSize:"12px",color:"color-gray-500",backgroundColor:"color-white-900",padding:"2px 8px",borderRadius:"9999px",opacity:0,transition:"opacity 0.15s ease-out",border:"1px solid color-gray-200"},input:{flex:1,border:"none",outline:"none",backgroundColor:"transparent",resize:"none",fontFamily:"inherit",fontSize:"14px",minHeight:"24px",maxHeight:"120px"},sendButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s ease, opacity 0.2s ease",flexShrink:0},attachmentButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",transition:"background-color 0.2s ease",flexShrink:0}},ky=({messages:e=[],inputPlaceholder:o="Type a message...",disableInput:t=!1,variant:n="default",size:a="md",showTimestamps:l=!0,enableAttachments:c=!1,enableContextPicker:s=!1,selectedContextElements:d=[],onContextPickerClick:g,onRemoveContextElement:m,isLoading:f=!1,loadingText:p="Loading...",styles:u={},maxHeight:y="600px",internalInputValue:k,handleInputChange:x,handleSubmit:C,inputRef:S,messagesRef:w,inputValue:v,onInputChange:b,...I})=>{var V;const T={...Ye.container,...uy[n],...u.container},j={...Ye.messagesContainer,maxHeight:y,...u.messagesContainer},E={...Ye.inputContainer,...u.inputContainer},D={...Ye.input,...py[a],...u.input},W=h.useCallback(M=>{x(M.target.value),M.target.style.height="auto",M.target.style.height=`${M.target.scrollHeight}px`},[x]),A=h.useCallback(M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),C())},[C]),H=k.trim().length>0,{onSubmit:z,...P}=I;return r.jsxs(i.View,{...T,...P,children:[r.jsxs(i.View,{ref:w,...j,children:[e.length===0?r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",flex:1,color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:"No messages yet. Start a conversation."})}):e.map(M=>r.jsx(Cy,{message:M,size:a,showTimestamp:l,styles:{bubble:u.bubble,userBubble:u.userBubble,assistantBubble:u.assistantBubble,timestamp:u.timestamp,reasoningContainer:u.reasoningContainer,reasoningContent:u.reasoningContent,errorMessage:u.errorMessage,systemMessage:u.systemMessage,toolMessage:u.toolMessage}},M.id)),f&&r.jsxs(i.Horizontal,{justifyContent:"flex-start",alignItems:"center",gap:8,marginTop:"8px",...u.loadingIndicator,children:[r.jsx(bt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(i.Text,{color:"color-gray-500",fontSize:"14px",children:p})]})]}),r.jsxs(i.View,{children:[d.length>0&&r.jsx(i.Horizontal,{gap:8,marginBottom:"8px",flexWrap:"wrap",padding:"0 12px 8px",...u.contextChipsContainer,children:d.map(M=>r.jsxs(i.Horizontal,{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",borderRadius:"9999px",padding:"6px 10px",alignItems:"center",gap:6,children:[r.jsx(i.Text,{fontSize:"12px",color:"color-blue-700",fontWeight:"500",children:M.name}),r.jsx(i.View,{as:"button",type:"button",onClick:()=>m==null?void 0:m(M.id),cursor:"pointer",border:"none",backgroundColor:"transparent",display:"flex",alignItems:"center",children:r.jsx(He,{widthHeight:12,color:"color-blue-700"})})]},M.id))}),r.jsxs(i.View,{as:"form",onSubmit:C,...E,children:[c&&r.jsx(i.View,{as:"button",type:"button",...Ye.attachmentButton,...u.attachmentButton,_hover:{backgroundColor:"color-gray-100"},children:r.jsx(Xo,{widthHeight:16,color:"color-gray-600"})}),r.jsx(i.View,{as:"textarea",ref:S,value:k,onChange:W,onKeyDown:A,placeholder:o,disabled:t||f,...D,style:{...D,opacity:t||f?.5:1}}),r.jsxs(i.Vertical,{gap:4,alignItems:"center",children:[s&&r.jsx(i.View,{as:"button",type:"button",onClick:g,...Ye.attachmentButton,...u.contextPickerButton,_hover:{backgroundColor:"color-gray-100",...(V=u.contextPickerButton)==null?void 0:V._hover},title:"Select element from page",children:r.jsx(Xn,{widthHeight:16,color:"color-gray-600"})}),r.jsx(i.View,{as:"button",type:"submit",disabled:!H||t||f,...Ye.sendButton,backgroundColor:H?"theme-primary":"color-gray-300",_hover:{backgroundColor:H?"theme-primary":"color-gray-300"},...u.sendButton,style:{cursor:H?"pointer":"not-allowed",opacity:!H||t||f?.6:1},children:r.jsx(yt,{widthHeight:16,color:"color-white",filled:!1})})]})]})]})]})},Cy=({message:e,size:o,showTimestamp:t,styles:n})=>{const[a,l]=h.useState(!1),[c,s]=h.useState(!1),d=e.role==="user",g=e.messageType==="system",m=e.messageType==="error",f=e.messageType==="tool";if(g)return r.jsx(i.View,{display:"flex",justifyContent:"center",padding:"8px",width:"100%",...n.systemMessage,children:r.jsxs(i.Horizontal,{gap:6,alignItems:"center",opacity:.7,children:[r.jsx(Re,{widthHeight:12,color:"color-gray-600"}),r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.content})]})});if(f)return r.jsx(i.View,{display:"flex",justifyContent:"flex-start",padding:"8px 16px",width:"100%",...n.toolMessage,children:r.jsxs(i.Horizontal,{gap:8,alignItems:"center",backgroundColor:"color-gray-50",padding:"8px 10px",borderRadius:"8px",width:"100%",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(Un,{widthHeight:14,color:"color-gray-600"}),r.jsxs(i.Vertical,{gap:2,children:[r.jsx(i.Text,{fontSize:"11px",fontWeight:"600",color:"color-gray-700",children:"Tool Usage"}),r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontFamily:"monospace",children:e.content})]})]})});const p={...Ye.bubble,...yy[o],...d?by:xy,...m?{backgroundColor:"color-red-50",borderWidth:1,borderStyle:"solid",borderColor:"color-red-200",color:"color-red-700"}:{},...n.bubble,...d?n.userBubble:n.assistantBubble,...m?n.errorMessage:{}},u={...Ye.timestamp,[d?"right":"left"]:"8px",opacity:a?1:0,...n.timestamp};return r.jsx(i.View,{position:"relative",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),display:"flex",justifyContent:d?"flex-end":"flex-start",children:r.jsxs(i.View,{...p,children:[t&&r.jsx(i.View,{...u,children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),m&&r.jsxs(i.Horizontal,{gap:6,marginBottom:"4px",alignItems:"center",children:[r.jsx(vr,{widthHeight:14,color:"color-red-700"}),r.jsx(i.Text,{fontWeight:"600",fontSize:"12px",children:"Error"})]}),e.reasoning&&r.jsxs(i.View,{marginBottom:"8px",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:"color-gray-200",paddingBottom:"8px",...n.reasoningContainer,children:[r.jsxs(i.Horizontal,{as:"button",onClick:()=>s(!c),cursor:"pointer",gap:4,alignItems:"center",backgroundColor:"transparent",border:"none",padding:0,children:[r.jsx(i.Text,{fontSize:"11px",color:"color-gray-500",fontWeight:"600",children:"Thinking Process"}),r.jsx(he,{orientation:c?"down":"right",widthHeight:10,color:"color-gray-500"})]}),c&&r.jsx(i.View,{padding:"8px",backgroundColor:"color-gray-50",borderRadius:"8px",marginTop:"4px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",...n.reasoningContent,children:r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.reasoning})})]}),r.jsx(i.View,{whiteSpace:"pre-wrap",wordBreak:"break-word",children:e.content}),e.attachments&&e.attachments.length>0&&r.jsx(i.Vertical,{gap:4,marginTop:"8px",children:e.attachments.map(y=>r.jsxs(i.Horizontal,{gap:6,padding:"6px 8px",backgroundColor:"color-gray-50",borderRadius:"8px",fontSize:"12px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(Xo,{widthHeight:14}),r.jsx(i.Text,{children:y.name})]},y.id))}),e.contextElements&&e.contextElements.length>0&&r.jsxs(i.Vertical,{gap:4,marginTop:"8px",children:[r.jsx(i.Text,{fontSize:"11px",color:"color-black-500",fontWeight:"600",children:"Context:"}),e.contextElements.map(y=>r.jsx(i.Horizontal,{gap:6,padding:"6px 10px",backgroundColor:"color-blue-50",borderRadius:"9999px",fontSize:"11px",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",children:r.jsx(i.Text,{color:"color-blue-700",fontWeight:"500",children:y.name})},y.id))]})]})})},bn=e=>{const o=my(e);return r.jsx(ky,{...e,...o})};bn.displayName="ChatWidget";const tc=bn;function wy({onSelect:e,onCancel:o,active:t}){const[n,a]=h.useState(null);h.useRef(null);const l=h.useCallback(d=>{var u;if(!t)return;const g=document.elementFromPoint(d.clientX,d.clientY);if(!g||g===document.body||g.closest('[data-chatwidget-ignore="true"]')||g.closest("#chatwidget-overlay")){a(null);return}const m=g.getBoundingClientRect();let f=g.tagName.toLowerCase();if(g.id)f+=`#${g.id}`;else if(g.className&&typeof g.className=="string"){const y=g.className.split(" ")[0];y&&(f+=`.${y}`)}const p=(u=g.innerText)==null?void 0:u.slice(0,20);p&&(f+=` ("${p}...")`),a({id:g.id||`el-${Date.now()}`,name:f,tagName:g.tagName.toLowerCase(),rect:m})},[t]),c=h.useCallback(d=>{!t||d.target.closest('[data-chatwidget-ignore="true"]')||(d.preventDefault(),d.stopPropagation(),n&&e(n))},[t,n,e]),s=h.useCallback(d=>{t&&d.key==="Escape"&&o()},[t,o]);return h.useEffect(()=>{if(!(typeof document>"u"))return t?(document.addEventListener("mousemove",l),document.addEventListener("click",c,!0),document.addEventListener("keydown",s),document.body.style.cursor="crosshair"):(a(null),document.removeEventListener("mousemove",l),document.removeEventListener("click",c,!0),document.removeEventListener("keydown",s),document.body.style.cursor=""),()=>{document.removeEventListener("mousemove",l),document.removeEventListener("click",c,!0),document.removeEventListener("keydown",s),document.body.style.cursor=""}},[t,l,c,s]),{highlightedElement:n}}function Sy({element:e}){return e?r.jsx("div",{id:"chatwidget-overlay",style:{position:"fixed",top:e.rect.top,left:e.rect.left,width:e.rect.width,height:e.rect.height,border:"2px solid #1D4ED8",backgroundColor:"rgba(29, 78, 216, 0.08)",pointerEvents:"none",zIndex:99999,transition:"top 0.1s ease-out, left 0.1s ease-out, width 0.1s ease-out, height 0.1s ease-out",borderRadius:"8px"},children:r.jsx("div",{style:{position:"absolute",top:"-24px",left:"0",backgroundColor:"#1D4ED8",color:"white",padding:"2px 8px",borderRadius:"9999px",fontSize:"12px",fontWeight:"bold",whiteSpace:"nowrap"},children:e.name})}):null}const vy=({initialMessages:e=[],onSendMessage:o,bubbleSize:t="md"})=>{const[n,a]=h.useState(!1),[l,c]=h.useState(!1),[s,d]=h.useState(e),[g,m]=h.useState([]),{highlightedElement:f}=wy({active:l,onSelect:x=>{m(C=>[...C,x]),c(!1),a(!0)},onCancel:()=>{c(!1),a(!0)}}),p=()=>a(!n),u=()=>{c(!0),a(!1)},y=x=>{m(C=>C.filter(S=>S.id!==x))},k=x=>{const C={id:Date.now().toString(),role:"user",content:x,timestamp:new Date,contextElements:[...g]};d(S=>[...S,C]),o==null||o(x,g),m([]),setTimeout(()=>{var b;const S=Math.random()>.7,w=Math.random()>.4,v={id:(Date.now()+1).toString(),role:"assistant",timestamp:new Date,content:S?"I will highlight the selected element.":`I received your message regarding: ${((b=C.contextElements)==null?void 0:b.map(I=>I.name).join(", "))||"general context"}. How can I assist you further?`,messageType:S?"tool":"text",reasoning:w?"Analyzing the user input and context... The user seems to be asking about specific elements. I should tailor my response to the selected context.":void 0};d(I=>[...I,v]),S&&setTimeout(()=>{d(I=>[...I,{id:(Date.now()+2).toString(),role:"assistant",messageType:"system",content:'Tool "highlightElement" executed successfully.',timestamp:new Date}])},800)},1e3)};return r.jsxs(i.View,{position:"fixed",bottom:24,right:24,zIndex:9999,children:[r.jsx(Sy,{element:f}),l&&r.jsx(i.View,{position:"fixed",top:24,left:"50%",transform:"translateX(-50%)",backgroundColor:"rgba(0,0,0,0.8)",color:"white",padding:"8px 16px",borderRadius:"24px",zIndex:1e4,boxShadow:"0 4px 6px rgba(0,0,0,0.1)",children:r.jsx(i.Text,{fontWeight:"600",fontSize:"14px",children:"Click an element to select it. Press ESC to cancel."})}),n&&r.jsxs(i.View,{position:"absolute",bottom:60,right:0,width:"400px",height:"600px",marginBottom:"16px",backgroundColor:"rgba(255, 255, 255, 0.8)",backdropFilter:"blur(20px)",borderRadius:"24px",border:"1px solid rgba(255, 255, 255, 0.4)",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",overflow:"hidden",animation:"slideUp 0.3s ease-out",style:{animation:"fadeIn 0.2s ease-out",transformOrigin:"bottom right"},children:[r.jsxs(i.View,{padding:"16px",borderBottom:"1px solid rgba(0,0,0,0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"bold",color:"color-gray-800",children:"ChatWidget Assistant"}),r.jsx(i.View,{as:"button",onClick:()=>a(!1),cursor:"pointer",padding:"4px",borderRadius:"50%",border:"none",backgroundColor:"transparent",_hover:{backgroundColor:"rgba(0,0,0,0.05)"},children:r.jsx(He,{widthHeight:16,color:"color-gray-500"})})]}),r.jsx(tc,{messages:s,onSubmit:k,size:t,variant:"minimal",enableContextPicker:!0,selectedContextElements:g,onContextPickerClick:u,onRemoveContextElement:y,styles:{container:{height:"calc(100% - 60px)",backgroundColor:"transparent"},inputContainer:{backgroundColor:"white",margin:"0 16px 16px 16px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"}}})]}),!l&&r.jsx(i.View,{as:"button",onClick:p,width:"56px",height:"56px",borderRadius:"50%",backgroundColor:"theme-primary",border:"none",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",_hover:{transform:"scale(1.05)"},_active:{transform:"scale(0.95)"},"data-chatwidget-ignore":"true",children:n?r.jsx(He,{widthHeight:24,color:"white"}):r.jsx(Kn,{widthHeight:24,color:"white"})})]})};function xn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ty=typeof Element<"u",Iy=typeof Map=="function",Fy=typeof Set=="function",zy=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ot(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var t,n,a;if(Array.isArray(e)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(!ot(e[n],o[n]))return!1;return!0}var l;if(Iy&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;for(l=e.entries();!(n=l.next()).done;)if(!ot(n.value[1],o.get(n.value[0])))return!1;return!0}if(Fy&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;return!0}if(zy&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(e[n]!==o[n])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof o.valueOf=="function")return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof o.toString=="function")return e.toString()===o.toString();if(a=Object.keys(e),t=a.length,t!==Object.keys(o).length)return!1;for(n=t;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,a[n]))return!1;if(Ty&&e instanceof Element)return!1;for(n=t;n--!==0;)if(!((a[n]==="_owner"||a[n]==="__v"||a[n]==="__o")&&e.$$typeof)&&!ot(e[a[n]],o[a[n]]))return!1;return!0}return e!==e&&o!==o}var My=function(o,t){try{return ot(o,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const Wy=xn(My);var Hy=function(e,o,t,n,a,l,c,s){if(process.env.NODE_ENV!=="production"&&o===void 0)throw new Error("invariant requires an error message argument");if(!e){var d;if(o===void 0)d=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var g=[t,n,a,l,c,s],m=0;d=new Error(o.replace(/%s/g,function(){return g[m++]})),d.name="Invariant Violation"}throw d.framesToPop=1,d}},jy=Hy;const nc=xn(jy);var Py=function(o,t,n,a){var l=n?n.call(a,o,t):void 0;if(l!==void 0)return!!l;if(o===t)return!0;if(typeof o!="object"||!o||typeof t!="object"||!t)return!1;var c=Object.keys(o),s=Object.keys(t);if(c.length!==s.length)return!1;for(var d=Object.prototype.hasOwnProperty.bind(t),g=0;g<c.length;g++){var m=c[g];if(!d(m))return!1;var f=o[m],p=t[m];if(l=n?n.call(a,f,p,m):void 0,l===!1||l===void 0&&f!==p)return!1}return!0};const Vy=xn(Py);var ac=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(ac||{}),kn={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},lc=Object.values(ac),rt={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},ic=Object.entries(rt).reduce((e,[o,t])=>(e[t]=o,e),{}),_e="data-rh",No={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},qo=(e,o)=>{for(let t=e.length-1;t>=0;t-=1){const n=e[t];if(Object.prototype.hasOwnProperty.call(n,o))return n[o]}return null},Ay=e=>{let o=qo(e,"title");const t=qo(e,No.TITLE_TEMPLATE);if(Array.isArray(o)&&(o=o.join("")),t&&o)return t.replace(/%s/g,()=>o);const n=qo(e,No.DEFAULT_TITLE);return o||n||void 0},Ey=e=>qo(e,No.ON_CHANGE_CLIENT_STATE)||(()=>{}),Cn=(e,o)=>o.filter(t=>typeof t[e]<"u").map(t=>t[e]).reduce((t,n)=>({...t,...n}),{}),Dy=(e,o)=>o.filter(t=>typeof t.base<"u").map(t=>t.base).reverse().reduce((t,n)=>{if(!t.length){const a=Object.keys(n);for(let l=0;l<a.length;l+=1){const s=a[l].toLowerCase();if(e.indexOf(s)!==-1&&n[s])return t.concat(n)}}return t},[]),$y=e=>console&&typeof console.warn=="function"&&console.warn(e),mr=(e,o,t)=>{const n={};return t.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&$y(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,l)=>{const c={};l.filter(d=>{let g;const m=Object.keys(d);for(let p=0;p<m.length;p+=1){const u=m[p],y=u.toLowerCase();o.indexOf(y)!==-1&&!(g==="rel"&&d[g].toLowerCase()==="canonical")&&!(y==="rel"&&d[y].toLowerCase()==="stylesheet")&&(g=y),o.indexOf(u)!==-1&&(u==="innerHTML"||u==="cssText"||u==="itemprop")&&(g=u)}if(!g||!d[g])return!1;const f=d[g].toLowerCase();return n[g]||(n[g]={}),c[g]||(c[g]={}),n[g][f]?!1:(c[g][f]=!0,!0)}).reverse().forEach(d=>a.push(d));const s=Object.keys(c);for(let d=0;d<s.length;d+=1){const g=s[d],m={...n[g],...c[g]};n[g]=m}return a},[]).reverse()},Ly=(e,o)=>{if(Array.isArray(e)&&e.length){for(let t=0;t<e.length;t+=1)if(e[t][o])return!0}return!1},_y=e=>({baseTag:Dy(["href"],e),bodyAttributes:Cn("bodyAttributes",e),defer:qo(e,No.DEFER),encode:qo(e,No.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Cn("htmlAttributes",e),linkTags:mr("link",["rel","href"],e),metaTags:mr("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:mr("noscript",["innerHTML"],e),onChangeClientState:Ey(e),scriptTags:mr("script",["src","innerHTML"],e),styleTags:mr("style",["cssText"],e),title:Ay(e),titleAttributes:Cn("titleAttributes",e),prioritizeSeoTags:Ly(e,No.PRIORITIZE_SEO_TAGS)}),cc=e=>Array.isArray(e)?e.join(""):e,By=(e,o)=>{const t=Object.keys(e);for(let n=0;n<t.length;n+=1)if(o[t[n]]&&o[t[n]].includes(e[t[n]]))return!0;return!1},wn=(e,o)=>Array.isArray(e)?e.reduce((t,n)=>(By(n,o)?t.priority.push(n):t.default.push(n),t),{priority:[],default:[]}):{default:e,priority:[]},sc=(e,o)=>({...e,[o]:void 0}),Oy=["noscript","script","style"],Sn=(e,o=!0)=>o===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),dc=e=>Object.keys(e).reduce((o,t)=>{const n=typeof e[t]<"u"?`${t}="${e[t]}"`:`${t}`;return o?`${o} ${n}`:n},""),Ny=(e,o,t,n)=>{const a=dc(t),l=cc(o);return a?`<${e} ${_e}="true" ${a}>${Sn(l,n)}</${e}>`:`<${e} ${_e}="true">${Sn(l,n)}</${e}>`},qy=(e,o,t=!0)=>o.reduce((n,a)=>{const l=a,c=Object.keys(l).filter(g=>!(g==="innerHTML"||g==="cssText")).reduce((g,m)=>{const f=typeof l[m]>"u"?m:`${m}="${Sn(l[m],t)}"`;return g?`${g} ${f}`:f},""),s=l.innerHTML||l.cssText||"",d=Oy.indexOf(e)===-1;return`${n}<${e} ${_e}="true" ${c}${d?"/>":`>${s}</${e}>`}`},""),gc=(e,o={})=>Object.keys(e).reduce((t,n)=>{const a=rt[n];return t[a||n]=e[n],t},o),Uy=(e,o,t)=>{const n={key:o,[_e]:!0},a=gc(t,n);return[h.createElement("title",a,o)]},tt=(e,o)=>o.map((t,n)=>{const a={key:n,[_e]:!0};return Object.keys(t).forEach(l=>{const s=rt[l]||l;if(s==="innerHTML"||s==="cssText"){const d=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:d}}else a[s]=t[l]}),h.createElement(e,a)}),Ae=(e,o,t=!0)=>{switch(e){case"title":return{toComponent:()=>Uy(e,o.title,o.titleAttributes),toString:()=>Ny(e,o.title,o.titleAttributes,t)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>gc(o),toString:()=>dc(o)};default:return{toComponent:()=>tt(e,o),toString:()=>qy(e,o,t)}}},Gy=({metaTags:e,linkTags:o,scriptTags:t,encode:n})=>{const a=wn(e,kn.meta),l=wn(o,kn.link),c=wn(t,kn.script);return{priorityMethods:{toComponent:()=>[...tt("meta",a.priority),...tt("link",l.priority),...tt("script",c.priority)],toString:()=>`${Ae("meta",a.priority,n)} ${Ae("link",l.priority,n)} ${Ae("script",c.priority,n)}`},metaTags:a.default,linkTags:l.default,scriptTags:c.default}},Yy=e=>{const{baseTag:o,bodyAttributes:t,encode:n=!0,htmlAttributes:a,noscriptTags:l,styleTags:c,title:s="",titleAttributes:d,prioritizeSeoTags:g}=e;let{linkTags:m,metaTags:f,scriptTags:p}=e,u={toComponent:()=>[],toString:()=>""};return g&&({priorityMethods:u,linkTags:m,metaTags:f,scriptTags:p}=Gy(e)),{priority:u,base:Ae("base",o,n),bodyAttributes:Ae("bodyAttributes",t,n),htmlAttributes:Ae("htmlAttributes",a,n),link:Ae("link",m,n),meta:Ae("meta",f,n),noscript:Ae("noscript",l,n),script:Ae("script",p,n),style:Ae("style",c,n),title:Ae("title",{title:s,titleAttributes:d},n)}},vn=Yy,nt=[],Tn=!!(typeof window<"u"&&window.document&&window.document.createElement),In=class{constructor(e,o){Ze(this,"instances",[]);Ze(this,"canUseDOM",Tn);Ze(this,"context");Ze(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?nt:this.instances,add:e=>{(this.canUseDOM?nt:this.instances).push(e)},remove:e=>{const o=(this.canUseDOM?nt:this.instances).indexOf(e);(this.canUseDOM?nt:this.instances).splice(o,1)}}});this.context=e,this.canUseDOM=o||!1,o||(e.helmet=vn({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},Ky=parseInt(h.version.split(".")[0],10),Fn=Ky>=19,Xy={},hc=h.createContext(Xy),Jy=(wo=class extends h.Component{constructor(t){super(t);Ze(this,"helmetData");Fn?this.helmetData=null:this.helmetData=new In(this.props.context||{},wo.canUseDOM)}render(){return Fn?h.createElement(h.Fragment,null,this.props.children):h.createElement(hc.Provider,{value:this.helmetData.value},this.props.children)}},Ze(wo,"canUseDOM",Tn),wo),Uo=(e,o)=>{const t=document.head||document.querySelector("head"),n=t.querySelectorAll(`${e}[${_e}]`),a=[].slice.call(n),l=[];let c;return o&&o.length&&o.forEach(s=>{const d=document.createElement(e);for(const g in s)if(Object.prototype.hasOwnProperty.call(s,g))if(g==="innerHTML")d.innerHTML=s.innerHTML;else if(g==="cssText"){const m=s.cssText;d.appendChild(document.createTextNode(m))}else{const m=g,f=typeof s[m]>"u"?"":s[m];d.setAttribute(g,f)}d.setAttribute(_e,"true"),a.some((g,m)=>(c=m,d.isEqualNode(g)))?a.splice(c,1):l.push(d)}),a.forEach(s=>{var d;return(d=s.parentNode)==null?void 0:d.removeChild(s)}),l.forEach(s=>t.appendChild(s)),{oldTags:a,newTags:l}},zn=(e,o)=>{const t=document.getElementsByTagName(e)[0];if(!t)return;const n=t.getAttribute(_e),a=n?n.split(","):[],l=[...a],c=Object.keys(o);for(const s of c){const d=o[s]||"";t.getAttribute(s)!==d&&t.setAttribute(s,d),a.indexOf(s)===-1&&a.push(s);const g=l.indexOf(s);g!==-1&&l.splice(g,1)}for(let s=l.length-1;s>=0;s-=1)t.removeAttribute(l[s]);a.length===l.length?t.removeAttribute(_e):t.getAttribute(_e)!==c.join(",")&&t.setAttribute(_e,c.join(","))},Qy=(e,o)=>{typeof e<"u"&&document.title!==e&&(document.title=cc(e)),zn("title",o)},fc=(e,o)=>{const{baseTag:t,bodyAttributes:n,htmlAttributes:a,linkTags:l,metaTags:c,noscriptTags:s,onChangeClientState:d,scriptTags:g,styleTags:m,title:f,titleAttributes:p}=e;zn("body",n),zn("html",a),Qy(f,p);const u={baseTag:Uo("base",t),linkTags:Uo("link",l),metaTags:Uo("meta",c),noscriptTags:Uo("noscript",s),scriptTags:Uo("script",g),styleTags:Uo("style",m)},y={},k={};Object.keys(u).forEach(x=>{const{newTags:C,oldTags:S}=u[x];C.length&&(y[x]=C),S.length&&(k[x]=u[x].oldTags)}),o&&o(),d(e,y,k)},pr=null,Zy=e=>{pr&&cancelAnimationFrame(pr),e.defer?pr=requestAnimationFrame(()=>{fc(e,()=>{pr=null})}):(fc(e),pr=null)},Ry=Zy,mc=class extends h.Component{constructor(){super(...arguments);Ze(this,"rendered",!1)}shouldComponentUpdate(o){return!Vy(o,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:o}=this.props.context;o.remove(this),this.emitChange()}emitChange(){const{helmetInstances:o,setHelmet:t}=this.props.context;let n=null;const a=_y(o.get().map(l=>{const{context:c,...s}=l.props;return s}));Jy.canUseDOM?Ry(a):vn&&(n=vn(a)),t(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:o}=this.props.context;o.add(this),this.emitChange()}render(){return this.init(),null}},at=[],pc=e=>{const o={};for(const t of Object.keys(e))o[ic[t]||t]=e[t];return o},Co=e=>{const o={};for(const t of Object.keys(e)){const n=rt[t];o[n||t]=e[t]}return o},uc=(e,o)=>{if(!Tn)return;const t=document.getElementsByTagName(e)[0];if(!t)return;const n="data-rh-managed",a=t.getAttribute(n),l=a?a.split(","):[],c=Object.keys(o);for(const s of l)c.includes(s)||t.removeAttribute(s);for(const s of c){const d=o[s];d==null||d===!1?t.removeAttribute(s):d===!0?t.setAttribute(s,""):t.setAttribute(s,String(d))}c.length>0?t.setAttribute(n,c.join(",")):t.removeAttribute(n)},Mn=()=>{const e={},o={};for(const t of at){const{htmlAttributes:n,bodyAttributes:a}=t.props;n&&Object.assign(e,pc(n)),a&&Object.assign(o,pc(a))}uc("html",e),uc("body",o)},eb=class extends h.Component{componentDidMount(){at.push(this),Mn()}componentDidUpdate(){Mn()}componentWillUnmount(){const e=at.indexOf(this);e!==-1&&at.splice(e,1),Mn()}resolveTitle(){const{title:e,titleTemplate:o,defaultTitle:t}=this.props;return e&&o?o.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||t||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const o=this.props.titleAttributes||{};return h.createElement("title",Co(o),e)}renderBase(){const{base:e}=this.props;return e?h.createElement("base",Co(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>h.createElement("meta",{key:t,...Co(o)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>h.createElement("link",{key:t,...Co(o)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,l=Co(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("script",{key:t,...l})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{cssText:n,...a}=o,l=Co(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("style",{key:t,...l})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,l=Co(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("noscript",{key:t,...l})})}render(){return h.createElement(h.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},ob=(Pn=class extends h.Component{shouldComponentUpdate(e){return!Wy(sc(this.props,"helmetData"),sc(e,"helmetData"))}mapNestedChildrenToProps(e,o){if(!o)return null;switch(e.type){case"script":case"noscript":return{innerHTML:o};case"style":return{cssText:o};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,o,t,n){return{...o,[e.type]:[...o[e.type]||[],{...t,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,o,t,n){switch(e.type){case"title":return{...o,[e.type]:n,titleAttributes:{...t}};case"body":return{...o,bodyAttributes:{...t}};case"html":return{...o,htmlAttributes:{...t}};default:return{...o,[e.type]:{...t}}}}mapArrayTypeChildrenToProps(e,o){let t={...o};return Object.keys(e).forEach(n=>{t={...t,[n]:e[n]}}),t}warnOnInvalidChildren(e,o){return nc(lc.some(t=>e.type===t),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${lc.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),nc(!o||typeof o=="string"||Array.isArray(o)&&!o.some(t=>typeof t!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,o){let t={};return h.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...l}=n.props,c=Object.keys(l).reduce((d,g)=>(d[ic[g]||g]=l[g],d),{});let{type:s}=n;switch(typeof s=="symbol"?s=s.toString():this.warnOnInvalidChildren(n,a),s){case"Symbol(react.fragment)":o=this.mapChildrenToProps(a,o);break;case"link":case"meta":case"noscript":case"script":case"style":t=this.flattenArrayTypeChildren(n,t,c,a);break;default:o=this.mapObjectTypeChildren(n,o,c,a);break}}),this.mapArrayTypeChildrenToProps(t,o)}render(){const{children:e,...o}=this.props;let t={...o},{helmetData:n}=o;if(e&&(t=this.mapChildrenToProps(e,t)),n&&!(n instanceof In)){const a=n;n=new In(a.context,!0),delete t.helmetData}return Fn?h.createElement(eb,{...t}):n?h.createElement(mc,{...t,context:n.value}):h.createElement(hc.Consumer,null,a=>h.createElement(mc,{...t,context:a}))}},Ze(Pn,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Pn);const rb={airbnb:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},apple:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.03em"},coinbase:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.02em"},figma:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontWeight:700},linear:{highlightStyle:"gradient",fontWeight:600,letterSpacing:"-0.03em"},nike:{highlightStyle:"underline",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",highlightFontStyle:"italic",highlightFontWeight:900},notion:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontStyle:"italic"},revolut:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},shopify:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},spacex:{highlightStyle:"glow",fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",highlightLetterSpacing:"0.06em"},spotify:{highlightStyle:"background",fontWeight:800,letterSpacing:"-0.03em"},stripe:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},tesla:{highlightStyle:"solid",fontWeight:500,letterSpacing:"-0.01em",textTransform:"uppercase"},uber:{highlightStyle:"underline",fontWeight:700,letterSpacing:"-0.02em"},vercel:{highlightStyle:"outline",fontWeight:700,letterSpacing:"-0.04em"}},tb={highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},nb=e=>rb[e.metadata.id]??tb,yc=(e,o)=>{const t=e.theme;return{canvas:Te(t.canvas),surface:Te(t.surface),text:Te(t.text),muted:Te(t.muted),border:Te(t.border),primary:Te(t.primary),secondary:Te(t.secondary),success:Te(t.success),warning:Te(t.warning),error:Te(t.error),onPrimary:Te(t.onPrimary),appearance:o}},ab=e=>yc(e,"light"),lb=e=>yc(e,"dark"),me=({palette:e,label:o,config:t,children:n})=>r.jsxs(i.Vertical,{gap:10,flex:"1 1 320px",minWidth:0,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:10,height:10,borderRadius:9999,backgroundColor:e.appearance==="dark"?"#111111":"#ffffff",borderWidth:1,borderStyle:"solid",borderColor:"rgba(0,0,0,0.15)"}),r.jsx(i.Text,{fontSize:11,fontWeight:"700",letterSpacing:"0.08em",textTransform:"uppercase",children:o})]}),r.jsx(ht,{config:t,mode:e.appearance,children:r.jsx(i.View,{padding:20,borderRadius:16,borderWidth:1,borderStyle:"solid",backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",children:n})})]}),Te=e=>!e||typeof e!="string"?e:/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,Ke=(e,o)=>`color-mix(in srgb, ${Te(e)} ${o}%, transparent)`,ib=e=>e&&e.startsWith("var(--")?e.slice(6,-1):e,cb={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral"},sb=e=>e.personality||cb,Xe=(e,o="normal")=>{let n={light:300,regular:400,bold:700,black:800}[e.typeWeight];return o==="light"&&(n=Math.max(300,n-200)),o==="heavy"&&(n=Math.min(900,n+100)),n},ur=e=>{switch(e.density){case"tight":return{padding:16,gap:10,large:20};case"spacious":return{padding:28,gap:18,large:36};case"comfortable":default:return{padding:22,gap:14,large:28}}},db=e=>e.typeCase==="uppercase"?"uppercase":"none",lt=(e,o)=>{switch(e.surfaceTone){case"glass":return{backgroundColor:o.appearance==="dark"?"rgba(255,255,255,0.04)":"rgba(255,255,255,0.65)",backdropFilter:"blur(14px)"};case"mono":return{backgroundColor:o.appearance==="dark"?"#0a0a0a":Te(o.surface)};case"matte":return{backgroundColor:o.appearance==="dark"?"#181818":"#f4f4f4"};case"paper":default:return{backgroundColor:Te(o.surface)}}},Go=(e,o)=>{const t=Te(o.primary),n=Te(o.secondary||o.primary);switch(e.accentTreatment){case"gradient":return`linear-gradient(135deg, ${t} 0%, ${n} 100%)`;case"glow":return t;case"stripe":return`repeating-linear-gradient(45deg, ${t} 0 8px, ${n} 8px 16px)`;case"halftone":return`radial-gradient(circle at 30% 30%, ${t} 0%, ${n} 70%)`;case"flat":default:return t}},Yo=(e,o)=>{if(e.accentTreatment==="glow")return`0 0 24px ${Ke(o.primary,40)}, 0 0 4px ${Te(o.primary)}`},io=e=>({letterSpacing:e.letterSpacing,textTransform:db(e),fontStyle:e.typeStyle,fontWeight:Xe(e,"heavy")}),Se=e=>({letterSpacing:e.typeCase==="uppercase"?"0.12em":"0.06em",textTransform:"uppercase",fontStyle:e.typeStyle,fontWeight:Xe(e,"normal")}),gb=(e,o)=>{var n,a,l;const t=(n=e.components)==null?void 0:n[o];return(l=(a=t==null?void 0:t.views)==null?void 0:a.container)==null?void 0:l.borderRadius},hb=e=>{const o=e.tokens.rawCssVars||{},t=e.theme.border,n=e.theme.surface,a=e.theme.primary,l=o["shadow-ring"]||"rgba(0,0,0,0.08) 0px 0px 0px 1px",c=o["shadow-ring-light"]||`${t} 0px 0px 0px 1px`,s=o["shadow-card"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, ${n} 0px 0px 0px 1px`,d=o["shadow-card-full"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, ${n} 0px 0px 0px 1px`;return[{name:"Level 0",label:"Flat",description:"No shadow",shadow:"none"},{name:"Level 1",label:"Ring",description:"Shadow-as-border",shadow:l},{name:"Level 1b",label:"Light Ring",description:"Lighter ring",shadow:c},{name:"Level 2",label:"Card",description:"Ring + subtle lift",shadow:s},{name:"Level 3",label:"Full Card",description:"Ring + lift + ambient + glow",shadow:d},{name:"Focus",label:"Accessibility ring",description:"Focus state — 2px ring",shadow:`0 0 0 2px ${a}`}]},yr=(e,o)=>{const n={accordion:["accordion","card","alert"],tabs:["tabs","button"],panel:["card","alert"]}[o]??[o];for(const a of n){const l=gb(e,a);if(l!==void 0)return l}return"12px"},Wn=({glyph:e,badge:o})=>r.jsxs(i.View,{position:"relative",display:"inline-flex",children:[r.jsx(i.View,{width:32,height:32,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",style:{backgroundColor:"rgba(0,0,0,0.06)",fontSize:18,lineHeight:"20px"},children:e}),o?r.jsx(i.View,{position:"absolute",top:-10,right:-18,paddingHorizontal:6,paddingVertical:2,borderRadius:9999,style:{backgroundColor:"#ffffff",color:"#222222",fontSize:9,fontWeight:700,letterSpacing:"0.04em",boxShadow:"0 1px 3px rgba(0,0,0,0.18)"},children:o}):null]}),fb=[{title:"Homes",value:"homes",icon:r.jsx(Wn,{glyph:"🏠"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Tokens, inputs, and feedback components share the active config."})},{title:"Experiences",value:"experiences",icon:r.jsx(Wn,{glyph:"🎈",badge:"NEW"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Services",value:"services",icon:r.jsx(Wn,{glyph:"🛎️",badge:"NEW"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Each tab carries an icon. Active tab uses the theme primary underline."})}],mb=[{title:"Token",field:"token"},{title:"Value",field:"value"},{title:"Role",field:"role"}],pb=[{id:"overview",label:"Overview",href:"#"},{id:"components",label:"Components",href:"#"},{id:"tokens",label:"Tokens",href:"#"}],ub=({color:e,name:o,role:t,border:n})=>r.jsxs(i.View,{borderWidth:1,borderStyle:"solid",borderRadius:8,overflow:"hidden",minWidth:0,borderColor:n,children:[r.jsx(i.View,{height:76,backgroundColor:e}),r.jsxs(i.Vertical,{gap:4,padding:12,children:[r.jsx(i.Text,{fontSize:13,lineHeight:"18px",fontWeight:"700",children:o}),r.jsx(i.Text,{fontSize:12,lineHeight:"16px",opacity:.7,children:e}),r.jsx(i.Text,{fontSize:12,lineHeight:"16px",opacity:.72,children:t})]})]}),ue=({title:e,children:o,config:t})=>r.jsxs(i.Vertical,{gap:18,padding:24,borderWidth:1,borderStyle:"solid",borderRadius:12,backgroundColor:t.theme.canvas,borderColor:t.theme.border,children:[r.jsx(i.Text,{fontSize:18,lineHeight:"24px",fontWeight:"700",color:t.theme.text,children:e}),o]}),yb=({config:e})=>{const o=nb(e),t=o.highlightStyle==="background"?e.theme.onPrimary:e.theme.primary;return r.jsx(i.View,{width:"100%",borderRadius:20,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,backgroundColor:e.theme.surface,children:r.jsxs(i.Horizontal,{width:"100%",flexWrap:"wrap",alignItems:"stretch",gap:0,children:[r.jsxs(i.Vertical,{flex:"1 1 360px",minWidth:0,padding:36,gap:20,justifyContent:"center",children:[r.jsx(Fe,{variant:"outline",content:`${e.metadata.label} hero`}),r.jsx(ci,{size:"xl",responsive:!0,highlightText:"design system",highlightStyle:o.highlightStyle,highlightColor:e.theme.primary,highlightSecondaryColor:o.highlightStyle==="gradient"?e.theme.secondary:e.theme.onPrimary,views:{container:{color:e.theme.text},text:{color:e.theme.text,fontFamily:e.tokens.typography.fontFamily,fontWeight:o.fontWeight,style:{letterSpacing:o.letterSpacing,fontStyle:o.fontStyle??"normal",textTransform:o.textTransform??"none"}},highlight:{color:t,fontWeight:o.highlightFontWeight??o.fontWeight,style:{fontStyle:o.highlightFontStyle??o.fontStyle??"normal",letterSpacing:o.highlightLetterSpacing??o.letterSpacing,textTransform:o.textTransform??"none"}}},children:"Build a beautiful design system in minutes"},`${e.metadata.id}-${o.highlightStyle}`),r.jsxs(i.Text,{color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,style:{fontSize:16,lineHeight:"24px",maxWidth:520},children:["Each brand defines its own highlight treatment —"," ",r.jsx(i.Text,{as:"span",color:e.theme.primary,fontWeight:"700",children:o.highlightStyle})," ","with weight"," ",r.jsx(i.Text,{as:"span",fontWeight:"700",children:o.fontWeight}),o.highlightFontStyle==="italic"||o.fontStyle==="italic"?", italic":"",o.textTransform==="uppercase"?", uppercase":"","."]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",children:[r.jsx(de,{color:"theme-primary",size:"md",children:"Get started"}),r.jsx(de,{variant:"outline",color:"theme-primary",size:"md",children:"View docs"})]})]}),r.jsxs(i.View,{flex:"1 1 320px",minWidth:0,minHeight:260,position:"relative",overflow:"hidden",style:{backgroundImage:`linear-gradient(135deg, ${e.theme.primary}, ${e.theme.secondary||e.theme.primary})`},children:[r.jsx(i.View,{position:"absolute",top:"50%",left:"50%",width:180,height:180,borderRadius:9999,style:{transform:"translate(-50%, -50%)",backgroundColor:"rgba(255,255,255,0.18)",filter:"blur(40px)"}}),r.jsxs(i.Vertical,{width:"100%",height:"100%",minHeight:260,padding:32,justifyContent:"flex-end",alignItems:"flex-start",gap:12,children:[r.jsx(i.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:13,letterSpacing:"0.08em",textTransform:"uppercase"},children:e.metadata.label}),r.jsx(i.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:28,lineHeight:"32px",letterSpacing:"-0.02em"},children:e.theme.primary})]})]})]})})},bb=({config:e})=>{var t,n;const o=e.tokens.colors.slice(0,5).map(a=>({token:a.name,value:a.value,role:a.role}));return r.jsxs(i.Vertical,{gap:24,children:[r.jsx(ue,{title:"Color",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:12,children:e.tokens.colors.slice(0,12).map(a=>r.jsx(ub,{color:a.value,name:a.name,role:a.role,text:e.theme.text,border:e.theme.border},a.name))})}),r.jsx(ue,{title:"Typography",config:e,children:r.jsxs(i.Vertical,{gap:24,children:[r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:48,lineHeight:"1.0",fontWeight:"700",letterSpacing:"0.96px",textTransform:"uppercase",children:"Making Life Multiplanetary"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Display — 48px / Bold / 1.00 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:16,lineHeight:"1.7",fontWeight:"400",children:"SpaceX designs, manufactures and launches advanced rockets and spacecraft. The company was founded to revolutionize space technology."}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Body — 16px / 400 / 1.70"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:13,lineHeight:"0.94",fontWeight:"700",letterSpacing:"1.17px",textTransform:"uppercase",children:"Falcon 9 · Starship · Dragon"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Nav Bold — 13px / 700 / 0.94 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:12,lineHeight:"1.0",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Mission Overview"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Caption — 12px / 400 / 1.00 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:10,lineHeight:"0.94",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Launch Date: 2026-04-15"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Micro — 10px / 400 / 0.94 / Uppercase"})]}),r.jsx(i.Horizontal,{gap:10,flexWrap:"wrap",marginTop:12,children:e.tokens.typography.fontSizes.map(a=>r.jsx(Fe,{variant:"outline",content:a},a))})]})}),r.jsx(ue,{title:"Spacing, Radius, Shadow",config:e,children:r.jsxs(i.Vertical,{gap:18,children:[r.jsx(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"flex-end",children:e.tokens.spacing.slice(0,10).map(a=>r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:a,minWidth:4,height:24,borderRadius:2,backgroundColor:e.theme.primary}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(i.Horizontal,{gap:12,flexWrap:"wrap",children:e.tokens.radii.slice(0,6).map(a=>r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:64,height:64,borderRadius:a,borderWidth:1,borderStyle:"solid",backgroundColor:e.theme.surface,borderColor:e.theme.border}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(i.View,{width:"100%",maxWidth:"100%",overflowX:"auto",style:{WebkitOverflowScrolling:"touch",color:e.theme.text},children:r.jsx(Ve,{views:(n=(t=e.components)==null?void 0:t.table)==null?void 0:n.views,children:r.jsx(Ve.Template,{caption:"First extracted color tokens",columns:mb,data:o})})})]})})]})},bc=({palette:e})=>r.jsxs(we,{width:"min(100%, 420px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:24,fontWeight:"800",color:e.text,children:"$182"}),r.jsx(i.Text,{fontSize:14,color:e.muted,children:"night"})]}),r.jsx(Fe,{variant:"filled",content:"Best value"})]})}),r.jsx(we.Content,{children:r.jsxs(i.Vertical,{gap:12,children:[r.jsxs(i.Horizontal,{gap:0,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,overflow:"hidden",children:[r.jsxs(i.Vertical,{flex:1,padding:10,gap:2,borderRightWidth:1,borderRightStyle:"solid",borderColor:e.border,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECK-IN"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"Mar 12, 2026"})]}),r.jsxs(i.Vertical,{flex:1,padding:10,gap:2,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECKOUT"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"Mar 18, 2026"})]})]}),r.jsxs(i.Vertical,{padding:10,gap:2,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"GUESTS"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"2 adults"})]}),r.jsx(de,{isFilled:!0,size:"lg",children:"Reserve"}),r.jsx(Xr,{}),r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"$182 × 6 nights"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$1,092"})]}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"Cleaning fee"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$48"})]}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"Service fee"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$165"})]})]}),r.jsx(Xr,{}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"Total before taxes"}),r.jsx(i.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"$1,305"})]})]})})]}),xc=[{name:"Starter",tagline:"For solo makers shipping their first project.",price:"$0",period:"/ month",features:["1 workspace","Up to 3 projects","Community support"],ctaLabel:"Get started"},{name:"Pro",tagline:"For growing teams that need more room to build.",price:"$24",period:"/ month",features:["Unlimited projects","Advanced analytics","Priority email support","Custom domains"],ctaLabel:"Start free trial",featured:!0},{name:"Enterprise",tagline:"For organizations with security and scale needs.",price:"Custom",period:"",features:["SSO & SCIM","Audit logs","Dedicated success manager","99.99% uptime SLA"],ctaLabel:"Contact sales"}],kc=({palette:e,tier:o,personality:t})=>{const n=ur(t),a=lt(t,e),l=Go(t,e),c=Yo(t,e);return r.jsx(i.View,{width:"min(100%, 280px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:o.featured?0:1,borderStyle:"solid",style:{...o.featured?{background:l,boxShadow:c}:a,borderColor:e.border,color:o.featured?e.onPrimary:e.text},children:r.jsxs(i.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:Se(t),children:o.name}),o.featured?r.jsx(i.View,{paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,backgroundColor:Ke(e.onPrimary,22),children:r.jsxs(i.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1},children:t.signatureMotif}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:Se(t),children:t.voice.includes("mission")?"PRIORITY":"POPULAR"})]})}):null]}),r.jsx(i.Text,{fontSize:13,lineHeight:"18px",color:o.featured?Ke(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.tagline})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",gap:4,children:[r.jsx(i.Text,{fontSize:n.large+8,color:o.featured?e.onPrimary:e.text,style:io(t),children:o.price}),o.period?r.jsx(i.Text,{fontSize:14,color:o.featured?Ke(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.period}):null]}),r.jsx(i.Vertical,{gap:8,children:o.features.map(s=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:18,height:18,borderRadius:t.cornerStyle==="sharp"?2:9999,backgroundColor:o.featured?Ke(e.onPrimary,22):e.primary,alignItems:"center",justifyContent:"center",style:{display:"flex",flexShrink:0},children:r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(t,"heavy")},children:t.cornerStyle==="sharp"?"+":"✓"})}),r.jsx(i.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:{textTransform:t.typeCase==="uppercase"?"uppercase":"none",letterSpacing:t.typeCase==="uppercase"?"0.04em":"normal",fontStyle:t.typeStyle},children:s})]},s))}),r.jsx(i.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:t.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:o.featured?e.onPrimary:e.text},children:r.jsx(i.Text,{fontSize:14,color:o.featured?e.primary:e.canvas,style:{...Se(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.02em"},children:o.ctaLabel})})]})})},Cc=({palette:e,personality:o})=>{const t=ur(o),n=lt(o,e),a=o.voice.includes("athletic")||o.voice.includes("motion")?"Aero Runner GT":o.voice.includes("mission")||o.voice.includes("futurist")?"Module-04 Insulated Jacket":"Linen Throw Pillow",l=o.voice.includes("athletic")||o.voice.includes("motion")?"Court Black · Mens":o.voice.includes("mission")||o.voice.includes("futurist")?"Carbon · Standard fit":"Stonewashed · Sand";return r.jsx(i.View,{width:"min(100%, 320px)",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(i.View,{height:120,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Ke(e.primary,20)} 0%, ${Ke(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:15,color:e.text,style:io(o),children:a}),r.jsx(i.View,{paddingHorizontal:10,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:r.jsx(i.Text,{fontSize:10,color:e.text,style:Se(o),children:"IN STOCK"})})]}),r.jsx(i.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:l})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:24,color:e.text,style:io(o),children:"$42"}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$56"})]}),r.jsx(i.Text,{fontSize:12,color:e.success||e.muted,style:Se(o),children:"FREE SHIPPING"})]}),r.jsx(i.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Go(o,e),boxShadow:Yo(o,e)},children:r.jsx(i.Text,{fontSize:14,color:e.onPrimary,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})})},wc=({palette:e,personality:o})=>{const t=ur(o),n=lt(o,e),a=o.signatureMotif,l=o.voice.includes("athletic")?"★":o.voice.includes("mission")||o.voice.includes("futurist")?"◉":"♥",c=o.voice.includes("athletic")?"Velocity AirFlow 7":o.voice.includes("mission")||o.voice.includes("futurist")?"Sentinel Pro Headset":o.voice.includes("refined")?"Pulse Studio Monitor":"Aurora Wireless Headphones",s=o.voice.includes("athletic")?"Lightweight knit · 280g":o.voice.includes("mission")||o.voice.includes("futurist")?"Mil-spec audio · 60h endurance":"Active noise cancelling · 40h battery",d=o.voice.includes("mission")?"MISSION PICK":o.voice.includes("athletic")?"TEAM PICK":o.voice.includes("futurist")?"SIGNATURE":"BEST SELLER";return r.jsxs(i.View,{position:"relative",width:"min(100%, 320px)",children:[r.jsx(i.View,{position:"absolute",top:-10,left:16,paddingHorizontal:12,paddingVertical:6,borderRadius:o.badgeRadius,zIndex:2,style:{background:Go(o,e),boxShadow:Yo(o,e)||(e.appearance==="dark"?"0 6px 14px rgba(0,0,0,0.5)":"0 6px 14px rgba(0,0,0,0.12)")},children:r.jsxs(i.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(o,"heavy")},children:a}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:Se(o),children:d})]})}),r.jsx(i.View,{position:"absolute",top:12,right:12,width:36,height:36,borderRadius:o.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",zIndex:2,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:r.jsx(i.Text,{fontSize:16,color:l==="♥"&&e.error||e.primary,style:{lineHeight:1},children:l})}),r.jsx(i.View,{width:"100%",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(i.View,{height:140,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Ke(e.primary,20)} 0%, ${Ke(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(i.Text,{fontSize:13,color:e.warning||e.primary,style:{lineHeight:1},children:"★★★★★"}),r.jsx(i.Text,{fontSize:12,color:e.muted,children:"4.9 · 1,284 reviews"})]}),r.jsx(i.Text,{fontSize:18,color:e.text,style:io(o),children:c}),r.jsx(i.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:s})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:26,color:e.text,style:io(o),children:"$189"}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$249"})]}),r.jsx(i.View,{paddingHorizontal:8,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:r.jsx(i.Text,{fontSize:10,color:e.text,style:Se(o),children:"–24%"})})]}),r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(i.View,{flex:1,paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Go(o,e),boxShadow:Yo(o,e)},children:r.jsx(i.Text,{fontSize:13,color:e.onPrimary,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Buy now"})}),r.jsx(i.View,{paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",borderColor:e.border},children:r.jsx(i.Text,{fontSize:13,color:e.text,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})]})})]})},xb=[{slug:"PRIMARY-TINT",source:"primary",intensity:"tint",heading:"Bring everyone together with systems that scale",body:"Signature primary ground for systems, FAQ, and the contact form.",cta:"Get started"},{slug:"SECONDARY-TINT",source:"secondary",intensity:"tint",heading:"A faster, more efficient way of working",body:"Secondary ground for hero moments and supporting narrative.",cta:"Explore"},{slug:"WARNING-TINT",source:"warning",intensity:"tint",heading:"Designed for the way ideas actually move",body:"Warm tint for product storytelling and brand moments.",cta:"See the story"},{slug:"SUCCESS-TINT",source:"success",intensity:"tint",heading:"Ship with confidence, every single release",body:"Cool tint for changelogs, releases, and reliability notes.",cta:"Read changelog"},{slug:"ERROR-TINT",source:"error",intensity:"tint",heading:"Built for teams who care about the details",body:"Saturated tint for community stories and testimonials.",cta:"Meet the makers"},{slug:"INK-INVERTED",source:"ink",intensity:"inverted",heading:"Go deeper. Go further. Go all-in.",body:"Inverted ground for premium tiers and developer surfaces.",cta:"Open the docs"}],Hn=(e,o)=>{const t=e.replace("#","").padEnd(6,"0").slice(0,6),n=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),l=parseInt(t.slice(4,6),16);return[n,a,l].some(Number.isNaN)?e:`rgba(${n}, ${a}, ${l}, ${o})`},jn=e=>typeof e=="string"&&/^#([0-9a-f]{3}){1,2}$/i.test(e),Pe=(e,o,t)=>jn(e)?Hn(e,o):e.startsWith("rgba")||e.startsWith("rgb")?e.replace(/rgba?\(([^)]+)\)/,(n,a)=>`rgba(${a.split(",").slice(0,3).map(c=>c.trim()).join(", ")}, ${o})`):t==="dark"?`rgba(255,255,255,${o})`:`rgba(0,0,0,${o})`,kb=({block:e,palette:o,personality:t})=>{const n=ur(t);let a,l;if(e.source==="ink")a=o.text,l=o.canvas;else{const m=o[e.source]||o.primary;e.intensity==="solid"?(a=m,l=o.onPrimary):(a=Pe(m,.32,o.appearance),l=(o.appearance==="dark",o.text))}if(t.accentTreatment==="gradient"&&e.intensity==="tint"){const m=o[e.source],f=o.secondary;jn(m)&&jn(f)&&(a=`linear-gradient(135deg, ${Hn(m,.32)} 0%, ${Hn(f,.32)} 100%)`)}if(t.accentTreatment==="stripe"&&e.intensity==="tint"){const m=Pe(o[e.source],.32,o.appearance),f=Pe(o.secondary,.18,o.appearance);a=`repeating-linear-gradient(135deg, ${m} 0 18px, ${f} 18px 36px)`}const c=Pe(l,.72,o.appearance),s=Pe(l,.55,o.appearance),d=l,g=l===o.canvas?o.text:o.canvas;return r.jsx(i.View,{width:"min(100%, 460px)",borderRadius:t.cardRadius*2,padding:n.large,style:{background:a},children:r.jsxs(i.Vertical,{gap:n.gap+6,children:[r.jsxs(i.Text,{fontSize:11,color:s,style:{...Se(t),letterSpacing:"0.12em",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:[t.signatureMotif," ",e.slug]}),r.jsxs(i.Vertical,{gap:14,children:[r.jsx(i.Text,{fontSize:32,lineHeight:"36px",color:l,style:io(t),children:e.heading}),r.jsx(i.Text,{fontSize:16,lineHeight:"22px",color:c,style:{fontStyle:t.typeStyle},children:e.body})]}),r.jsx(i.View,{alignSelf:"flex-start",paddingHorizontal:28,paddingVertical:14,borderRadius:t.pillRadius,style:{backgroundColor:d,cursor:"pointer"},children:r.jsx(i.Text,{fontSize:15,color:g,style:{...Se(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.01em",textTransform:t.typeCase==="uppercase"?"uppercase":"none"},children:e.cta})})]})})},Sc=[{id:"design-tokens",badge:"NEW",badgeTone:"success",favorite:"♥",category:"Design systems",title:"Design tokens that survive a redesign",excerpt:"Why semantic naming beats raw values — and how to migrate a token set without breaking every consumer.",author:"Léa Martin",meta:"6 min read · Mar 10",imageTone:"warm"},{id:"shipping-faster",badge:"FEATURED",badgeTone:"primary",favorite:"★",category:"Engineering",title:"Shipping faster without skipping review",excerpt:"Three async patterns we use to keep PR cycle time under 24h while still catching the regressions that matter.",author:"Jordan Reyes",meta:"9 min read · Mar 04",imageTone:"cool"},{id:"a11y-audit",badge:"TRENDING",badgeTone:"warning",favorite:"⛉",category:"Accessibility",title:"The accessibility audit nobody asked for",excerpt:"A walkthrough of the 12 issues we found on our own marketing site — and the four-week fix plan that followed.",author:"Ines Okafor",meta:"12 min read · Feb 27",imageTone:"mono"}],vc=({palette:e,article:o,personality:t})=>{const n=ur(t),a=lt(t,e),l=e[o.badgeTone]||e.primary,c=e.secondary||e.primary,s=t.accentTreatment==="gradient"?`linear-gradient(135deg, ${Pe(l,.55,e.appearance)} 0%, ${Pe(c,.55,e.appearance)} 100%)`:t.accentTreatment==="stripe"?`repeating-linear-gradient(45deg, ${Pe(l,.45,e.appearance)} 0 16px, ${Pe(c,.25,e.appearance)} 16px 32px)`:t.accentTreatment==="halftone"?`radial-gradient(circle at 30% 30%, ${Pe(l,.55,e.appearance)} 0%, ${Pe(c,.35,e.appearance)} 70%)`:t.accentTreatment==="glow"?`radial-gradient(circle at 50% 60%, ${Pe(l,.45,e.appearance)} 0%, ${e.appearance==="dark"?"#050505":"#0a0a0a"} 100%)`:Pe(l,.32,e.appearance),d=t.voice.includes("mission")||t.voice.includes("futurist")?"◉":o.favorite,g=d==="♥"?e.error||e.primary:d==="★"&&e.warning||e.primary;return r.jsx(i.View,{width:"min(100%, 320px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...a,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(i.View,{position:"relative",height:160,borderRadius:t.cardRadius,overflow:"hidden",style:{background:s},children:[r.jsx(i.View,{position:"absolute",top:12,left:12,paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,style:{background:Go(t,{...e,primary:l}),boxShadow:Yo(t,e)},children:r.jsxs(i.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(t,"heavy")},children:t.signatureMotif}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:Se(t),children:o.badge})]})}),r.jsx(i.View,{position:"absolute",top:10,right:10,width:36,height:36,borderRadius:t.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:r.jsx(i.Text,{fontSize:16,color:g,style:{lineHeight:1},children:d})})]}),r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:11,color:e.muted,style:Se(t),children:o.category}),r.jsx(i.Text,{fontSize:18,lineHeight:"24px",color:e.text,style:io(t),children:o.title}),r.jsx(i.Text,{fontSize:13,lineHeight:"18px",color:e.muted,style:{fontStyle:t.typeStyle},children:o.excerpt})]}),r.jsxs(i.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(i.View,{width:28,height:28,borderRadius:t.cornerStyle==="sharp"?4:9999,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.08)"}}),r.jsxs(i.Vertical,{gap:0,children:[r.jsx(i.Text,{fontSize:12,color:e.text,style:{fontWeight:Xe(t,"normal"),fontStyle:t.typeStyle},children:o.author}),r.jsx(i.Text,{fontSize:11,color:e.muted,children:o.meta})]})]})]})})},Tc=({palette:e,personality:o,config:t})=>{var f,p,u,y;const n=o.signatureMotif,a=e.primary,l=Go(o,e),c=Yo(o,e),s=((p=(f=t.tokens)==null?void 0:f.typography)==null?void 0:p.fontFamily)||((y=(u=t.tokens)==null?void 0:u.rawCssVars)==null?void 0:y.display)||"inherit",d=o.voice.includes("mission")?"MAKING LIFE MULTIPLANETARY":o.voice.includes("athletic")?"JUST DO IT":o.voice.includes("refined")?"A new standard in payments":o.voice.includes("speed")?"Built for the makers":o.voice.includes("rhythmic")?"Music for everyone":o.voice.includes("thoughtful")?"The connected workspace":o.voice.includes("warm")?"Belong anywhere":o.voice.includes("minimal")?"Think different":o.voice.includes("commerce")?"The platform commerce is built on":o.voice.includes("bold-fintech")?"Money for the next generation":o.voice.includes("trustworthy")?"The future of money":o.voice.includes("playful")?"Nothing great is made alone":o.voice.includes("motion")?"Get there":o.voice.includes("deploy")?"Develop. Preview. Ship.":o.voice.includes("futurist")?"Accelerating the world to sustainable energy":`${t.metadata.label}`,g=o.typeCase==="uppercase"?"EXPLORE":"Get started",m=o.typeCase==="uppercase"?"LEARN MORE":"Learn more";return r.jsxs(i.View,{width:"100%",borderRadius:o.cardRadius*2,padding:o.density==="spacious"?56:o.density==="tight"?28:40,style:{backgroundColor:e.canvas,color:e.text,fontFamily:s,position:"relative",overflow:"hidden"},children:[o.accentTreatment==="glow"&&r.jsx(i.View,{position:"absolute",top:-120,right:-80,width:360,height:360,borderRadius:9999,style:{background:`radial-gradient(circle, ${a}40 0%, transparent 70%)`,pointerEvents:"none"}}),o.accentTreatment==="halftone"&&r.jsx(i.View,{position:"absolute",top:0,right:0,width:300,height:300,style:{background:`radial-gradient(circle at 70% 30%, ${a}30 0%, transparent 60%)`,pointerEvents:"none"}}),r.jsxs(i.Vertical,{gap:24,style:{position:"relative"},children:[r.jsxs(i.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(i.View,{width:32,height:32,borderRadius:o.cornerStyle==="pill"?9999:o.cornerStyle==="sharp"?0:8,alignItems:"center",justifyContent:"center",style:{display:"flex",background:l,boxShadow:c},children:r.jsx(i.Text,{fontSize:16,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(o,"heavy")},children:n})}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.18em":"0.06em"},children:t.metadata.label})]}),r.jsx(i.Text,{fontSize:o.density==="spacious"?56:o.density==="tight"?40:48,lineHeight:o.density==="spacious"?"60px":o.density==="tight"?"44px":"52px",color:e.text,style:{...io(o),letterSpacing:o.typeCase==="uppercase"?"0.06em":o.letterSpacing,maxWidth:580,fontFamily:s},children:d}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(i.View,{paddingHorizontal:o.density==="spacious"?32:24,paddingVertical:o.density==="spacious"?16:14,borderRadius:o.pillRadius,style:{display:"flex",cursor:"pointer",background:l,boxShadow:c},children:r.jsx(i.Text,{fontSize:15,color:e.onPrimary,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Xe(o,"heavy"),fontFamily:s},children:g})}),r.jsx(i.View,{paddingHorizontal:24,paddingVertical:14,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",style:{display:"flex",cursor:"pointer",borderColor:e.text},children:r.jsx(i.Text,{fontSize:15,color:e.text,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Xe(o,"heavy"),fontFamily:s},children:m})})]}),r.jsx(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"center",marginTop:8,children:[{label:"Primary",value:e.primary},{label:"Surface",value:e.surface},{label:"Text",value:e.text},{label:"Success",value:e.success}].map(k=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:20,height:20,borderRadius:o.cornerStyle==="sharp"?0:o.cornerStyle==="pill"?9999:4,borderWidth:1,borderStyle:"solid",style:{backgroundColor:k.value,borderColor:e.border}}),r.jsxs(i.Vertical,{gap:0,children:[r.jsx(i.Text,{fontSize:11,color:e.muted,style:Se(o),children:k.label}),r.jsx(i.Text,{fontSize:11,color:e.text,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:ib(k.value)})]})]},k.label))})]})]})},Ic=({palette:e,config:o})=>r.jsxs(i.Vertical,{gap:20,padding:36,alignItems:"center",borderRadius:16,style:{backgroundColor:e.surface},children:[r.jsx(Fe,{variant:"outline",content:"New release"}),r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsxs(i.Text,{fontSize:36,lineHeight:"40px",fontWeight:"800",textAlign:"center",color:e.text,children:[o.metadata.label," Pro"]}),r.jsx(i.Text,{fontSize:18,lineHeight:"24px",color:e.muted,textAlign:"center",children:"Pro. Beyond."})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",justifyContent:"center",children:[r.jsx(de,{shape:"pill",size:"md",children:"Learn more"}),r.jsx(de,{shape:"pill",size:"md",variant:"outline",children:"Buy"})]}),r.jsx(i.View,{width:220,height:140,borderRadius:20,backgroundColor:e.appearance==="dark"?e.canvas:e.text,opacity:.85})]}),Fc=({palette:e,config:o})=>r.jsxs(we,{width:"min(100%, 320px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(i.Text,{color:e.text,fontWeight:"700",children:o.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Fe,{variant:"filled",content:"New"})]})}),r.jsx(we.Content,{children:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",color:e.text,children:o.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),r.jsx(we.Footer,{children:r.jsx(de,{size:"sm",children:o.metadata.id==="spacex"?"Explore":"Review"})})]}),zc=({palette:e})=>r.jsxs(i.Vertical,{gap:14,children:[r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(de,{color:"theme-primary",children:"Primary"}),r.jsx(de,{color:"theme-secondary",children:"Secondary"}),r.jsx(de,{color:"color-black",children:"Black"}),r.jsx(de,{color:"color-white",textColor:"color-black",children:"White"})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(de,{variant:"outline",color:"theme-primary",children:"Primary"}),r.jsx(de,{variant:"outline",color:"theme-secondary",children:"Secondary"}),r.jsx(de,{variant:"outline",color:"color-black",children:"Black"}),r.jsx(de,{variant:"outline",color:"color-white",children:"White"})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(de,{variant:"ghost",views:{container:{color:e.text}},children:"Ghost"}),r.jsx(de,{variant:"link",views:{container:{color:e.primary}},children:"Link"}),r.jsx(de,{isDisabled:!0,children:"Disabled"}),r.jsx(de,{isLoading:!0,children:"Loading"})]})]}),Mc=({palette:e,config:o})=>r.jsx(i.View,{style:{color:e.text},children:r.jsxs(i.Vertical,{gap:14,children:[r.jsxs(i.Horizontal,{gap:10,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Fe,{content:"Badge"}),r.jsx(Fe,{variant:"outline",content:"Outline"}),r.jsx(Fe,{content:"Primary",views:{container:{backgroundColor:e.primary,color:e.onPrimary,borderColor:e.primary}}}),r.jsx(Fe,{content:"Success",views:{container:{backgroundColor:e.success,color:e.onPrimary,borderColor:e.success}}}),r.jsx(Fe,{content:"Warning",views:{container:{backgroundColor:e.warning,color:e.onPrimary,borderColor:e.warning}}}),r.jsx(Fe,{content:"Error",views:{container:{backgroundColor:e.error,color:e.onPrimary,borderColor:e.error}}})]}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Jr,{status:"success",label:"Operational"}),r.jsx(Jr,{status:"warning",label:"Degraded"}),r.jsx(Jr,{status:"error",label:"Outage"}),r.jsx(eo,{size:"sm",loaderColor:o.theme.primary})]}),r.jsx(St,{title:"Heads up",description:"Brand styling cascades through every alert.",variant:"info",views:{container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},title:{color:e.text},description:{color:e.muted}}}),r.jsx(Mi,{value:64,height:10,showLabel:!0,color:e.primary,backgroundColor:e.border,views:{container:{backgroundColor:e.border},bar:{backgroundColor:e.primary}}})]})}),Wc=({palette:e,config:o,mode:t})=>{const n={container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},field:{color:e.text}};return r.jsx(i.View,{style:{color:e.text},children:r.jsxs(i.Vertical,{gap:16,children:[r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(je,{size:"md",label:"Name",placeholder:"Ada Lovelace",views:n}),r.jsx(or,{id:`forms-${o.metadata.id}-${t}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{container:n.container,field:{fontSize:14,lineHeight:"20px",color:e.text},text:{fontSize:14,lineHeight:"20px",color:e.text}}}),r.jsx($t,{label:"Notes",placeholder:"Add implementation notes",views:n})]}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(_t,{label:"Email updates",defaultIsSelected:!0}),r.jsx(Nt,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(Dt,{label:"Enabled",isChecked:!0})]})]})})},Cb=({config:e})=>{const[o,t]=h.useState(1),n=ab(e),a=lb(e),l=sb(e);return r.jsxs(i.Vertical,{gap:24,children:[r.jsx(ue,{title:"Brand Snapshot (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Tc,{palette:n,personality:l,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Tc,{palette:a,personality:l,config:e})})]})}),r.jsx(ue,{title:"Buttons — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(zc,{palette:n})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(zc,{palette:a})})]})}),r.jsx(ue,{title:"Status & Feedback — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Mc,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Mc,{palette:a,config:e})})]})}),r.jsx(ue,{title:"Forms — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Wc,{palette:n,config:e,mode:"light"})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Wc,{palette:a,config:e,mode:"dark"})})]})}),r.jsx(ue,{title:"Forms (legacy preview)",config:e,children:r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",alignItems:"start",gap:16,children:[r.jsx(je,{size:"md",label:"Name",placeholder:"Ada Lovelace"}),r.jsx(or,{id:`design-system-select-${e.metadata.id}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),r.jsx($t,{label:"Notes",placeholder:"Add implementation notes"}),r.jsxs(i.Vertical,{gap:12,children:[r.jsx(_t,{label:"Email updates",defaultIsSelected:!0}),r.jsx(Nt,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(Dt,{label:"Enabled",isChecked:!0}),r.jsx(Bl,{defaultValue:58,showValue:!0}),r.jsx(ml,{length:6,label:"Verification Code"})]})]})}),r.jsx(ue,{title:"Form States",config:e,children:r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(je,{size:"md",label:"Default",placeholder:"Type here",helperText:"Resting state"}),r.jsx(je,{size:"md",label:"Filled",defaultValue:"Ada Lovelace",helperText:"Has value"}),r.jsx(je,{size:"md",label:"With helper",placeholder:"user@example.com",helperText:"We'll never share your email"}),r.jsx(je,{size:"md",label:"Error",defaultValue:"invalid@",error:"Please enter a valid email"}),r.jsx(je,{size:"md",label:"Disabled",isDisabled:!0,defaultValue:"Cannot edit",helperText:"Field locked"}),r.jsx(je,{size:"md",label:"Read only",defaultValue:"Read-only value",isReadOnly:!0,helperText:"View only"}),r.jsx(or,{id:`design-system-select-error-${e.metadata.id}`,size:"md",label:"Select error",placeholder:"Pick one",error:!0,helperText:"Selection required",options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),r.jsx(or,{id:`design-system-select-disabled-${e.metadata.id}`,size:"md",label:"Select disabled",placeholder:"Disabled",isDisabled:!0,options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}})]})}),r.jsx(ue,{title:"Elevation & Depth",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:20,children:hb(e).map(c=>r.jsxs(i.Vertical,{gap:12,children:[r.jsx(i.View,{height:120,borderRadius:12,backgroundColor:e.theme.canvas,style:{boxShadow:c.shadow}}),r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"baseline",flexWrap:"wrap",children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",children:c.name}),r.jsx(i.Text,{fontSize:11,fontWeight:"600",color:e.theme.primary,children:c.label})]}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:c.description}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,style:{wordBreak:"break-word",opacity:.8},children:c.shadow})]})]},c.name))})}),r.jsx(ue,{title:"Color Blocks",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:12,children:[["primary","Primary",e.theme.onPrimary],["secondary","Secondary",e.theme.onPrimary],["success","Success","#ffffff"],["warning","Warning","#ffffff"],["error","Error","#ffffff"],["canvas","Canvas",e.theme.text],["surface","Surface",e.theme.text],["text","Text",e.theme.canvas],["muted","Muted",e.theme.canvas],["border","Border",e.theme.text],["onPrimary","On primary",e.theme.text]].map(([c,s,d])=>{const g=e.theme[c];return r.jsxs(i.Vertical,{gap:0,borderRadius:12,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,children:[r.jsx(i.View,{height:88,backgroundColor:g}),r.jsxs(i.Vertical,{gap:4,padding:12,backgroundColor:e.theme.surface,children:[r.jsx(i.Text,{fontSize:13,fontWeight:"700",children:s}),r.jsxs(i.Text,{fontSize:11,color:e.theme.muted,children:["theme.",c]}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:g})]})]},c)})})}),r.jsx(ue,{title:"Pricing — Booking (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(bc,{palette:n})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(bc,{palette:a})})]})}),r.jsx(ue,{title:"Pricing — SaaS Tiers (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:xc.map(c=>r.jsx(kc,{palette:n,tier:c,personality:l},c.name))})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:xc.map(c=>r.jsx(kc,{palette:a,tier:c,personality:l},c.name))})})]})}),r.jsx(ue,{title:"Pricing — Product (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Cc,{palette:n,personality:l})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Cc,{palette:a,personality:l})})]})}),r.jsx(ue,{title:"Pricing — Featured w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(wc,{palette:n,personality:l})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(wc,{palette:a,personality:l})})]})}),r.jsx(ue,{title:"Content — Color Block Cards",config:e,children:r.jsx(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:xb.map(c=>r.jsx(kb,{block:c,palette:n,personality:l},c.slug))})}),r.jsx(ue,{title:"Content — Article Cards w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Sc.map(c=>r.jsx(vc,{palette:n,article:c,personality:l},c.id))})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Sc.map(c=>r.jsx(vc,{palette:a,article:c,personality:l},c.id))})})]})}),r.jsx(ue,{title:"CTA Card — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Ic,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Ic,{palette:a,config:e})})]})}),r.jsx(ue,{title:"Product Card — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Fc,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Fc,{palette:a,config:e})})]})}),r.jsx(ue,{title:"Content & Layout",config:e,children:r.jsxs(i.Vertical,{gap:24,children:[r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:[r.jsxs(we,{width:"min(100%, 320px)",children:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(i.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Fe,{variant:"filled",content:"New"})]})}),r.jsx(we.Content,{children:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:e.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),r.jsx(we.Footer,{children:r.jsx(de,{size:"sm",children:e.metadata.id==="spacex"?"Explore":"Review"})})]}),r.jsxs(we,{width:"min(100%, 320px)",children:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",children:[r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[r.jsx(na,{fallback:e.metadata.label.slice(0,2)}),r.jsxs(i.Vertical,{gap:2,children:[r.jsx(i.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Starship":e.metadata.label}),r.jsx(i.Text,{fontSize:12,color:e.theme.muted,children:e.metadata.id==="spacex"?"Multiplanetary mission":"Config-driven preview"})]})]}),r.jsx(Fe,{variant:"outline",content:"Active"})]})}),r.jsx(we.Content,{children:e.metadata.id==="spacex"?r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"The most powerful launch vehicle ever developed. Designed to carry crew and cargo to Mars and beyond."}):r.jsx(St,{variant:"info",title:"Config active",description:"This alert is rendered by the shared component."})})]})]}),r.jsx(yb,{config:e}),r.jsx(Rn,{ratio:16/9,borderRadius:12,overflow:"hidden",children:r.jsx(i.View,{width:"100%",height:"100%",backgroundColor:e.theme.primary,children:r.jsxs(i.Vertical,{height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[r.jsx(i.Text,{fontWeight:"700",color:e.theme.onPrimary,children:"16:9 Aspect Ratio"}),r.jsx(Fe,{content:"Config primary color"})]})})}),r.jsxs($e,{children:[r.jsx($e.Content,{children:[1,2,3].map(c=>r.jsx($e.Item,{children:r.jsx(i.View,{height:200,borderRadius:12,alignItems:"center",justifyContent:"center",backgroundColor:e.theme.surface,borderColor:e.theme.border,borderWidth:1,borderStyle:"solid",children:r.jsxs(i.Text,{fontSize:24,fontWeight:"700",children:["Slide ",c]})})},c))}),r.jsxs(i.Horizontal,{gap:12,marginTop:12,justifyContent:"center",children:[r.jsx($e.Previous,{}),r.jsx($e.Next,{})]})]})]})}),r.jsx(ue,{title:"Navigation & Interactive",config:e,children:r.jsxs(i.Vertical,{gap:18,children:[r.jsxs(i.Vertical,{gap:20,children:[r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"With icons"}),r.jsx($o,{tabs:fb,defaultValue:"homes",views:{tab:{borderRadius:yr(e,"tabs")},activeTab:{borderRadius:yr(e,"tabs")}}})]}),r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"Without icons"}),r.jsx($o,{defaultValue:"overview",views:{tab:{borderRadius:yr(e,"tabs")},activeTab:{borderRadius:yr(e,"tabs")}},tabs:[{title:"Overview",value:"overview",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Tokens and components share the active config."})},{title:"Usage",value:"usage",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Audit",value:"audit",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Plain text tabs without icons."})}]})]})]}),r.jsx(bo,{items:pb,orientation:"horizontal",defaultActiveItemId:"components"}),(()=>{const c=yr(e,"accordion"),s={borderWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,marginBottom:0,borderRadius:0},d={...s,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:e.theme.border};return r.jsxs(De,{defaultValue:"tokens",collapsible:!0,shape:"rounded",views:{container:{borderRadius:c,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border}},children:[r.jsxs(De.Item,{value:"tokens",...s,views:{item:s,trigger:{borderRadius:0}},children:[r.jsx(De.Trigger,{children:"Token extraction"}),r.jsx(De.Content,{children:r.jsxs(i.Text,{color:e.theme.muted,children:[Object.keys(e.tokens.rawCssVars).length," raw CSS variables were extracted from ",e.metadata.sourcePath,"."]})})]}),r.jsxs(De.Item,{value:"overrides",...d,views:{item:d,trigger:{borderRadius:0}},children:[r.jsx(De.Trigger,{children:"Override behavior"}),r.jsx(De.Content,{children:r.jsx(i.Text,{color:e.theme.muted,children:"Props passed directly to components override the design-system defaults."})})]})]})})(),r.jsx(Xr,{label:"advanced tools"}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Xt,{color:e.theme.primary,children:"Toggle Button"}),r.jsx(si,{color:e.theme.primary,items:[{id:"left",value:"Left"},{id:"center",value:"Center"},{id:"right",value:"Right"}]}),r.jsx(et,{content:"Tooltip message",children:r.jsx(de,{variant:"outline",children:"Hover for Tooltip"})}),r.jsxs(Me,{children:[r.jsx(Me.Trigger,{children:r.jsx(de,{variant:"ghost",children:"Hover Card"})}),r.jsx(Me.Content,{children:r.jsxs(i.Vertical,{gap:4,padding:12,children:[r.jsx(i.Text,{fontWeight:"700",children:"Detailed Info"}),r.jsx(i.Text,{fontSize:12,opacity:.8,children:"Hover cards provide more context."})]})})]}),r.jsx(ui,{value:e.theme.primary}),r.jsx(ji,{shareData:{url:"https://example.com",title:"Example"}}),r.jsx(Ft,{to:"#",children:"Inline Link component"})]}),r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:r.jsx(zi,{currentPage:o,totalPages:10,onPageChange:t})})]})})]})},wb=({config:e})=>{var o;return r.jsxs(ht,{config:e,children:[r.jsx(ob,{children:(o=e.metadata.googleFontLinks)==null?void 0:o.map(t=>r.jsx("link",{rel:"stylesheet",href:t},t))}),r.jsx(i.View,{minHeight:"100vh",padding:28,fontFamily:e.tokens.typography.fontFamily,backgroundColor:e.theme.canvas,color:e.theme.text,style:{textTransform:e.metadata.id==="spacex"?"uppercase":"none"},children:r.jsxs(i.Vertical,{gap:28,children:[r.jsxs(i.Vertical,{gap:12,maxWidth:900,children:[r.jsxs(i.Text,{as:"h1",fontSize:44,lineHeight:"48px",fontWeight:"800",fontFamily:e.tokens.typography.fontFamily,children:[e.metadata.label," Design System"]}),r.jsxs(i.Text,{fontSize:16,lineHeight:"24px",color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,children:["Live App Studio components rendered with the"," ",e.metadata.label," config defaults."]})]}),r.jsxs(i.Vertical,{gap:28,children:[r.jsx(bb,{config:e}),r.jsx(Cb,{config:e})]})]})})]})};F.Accordion=De,F.ActionSheet=md,F.Alert=St,F.ArrowIcon=ad,F.AspectRatio=Rn,F.AttachmentGroup=gi,F.AttachmentIcon=Xo,F.AttachmentPreview=lm,F.AudioIcon=Fo,F.AudioInput=Md,F.AudioWaveform=vt,F.Avatar=na,F.BackIcon=Ms,F.Background=rc,F.Badge=Fe,F.BatteryIcon=fs,F.BluetoothIcon=od,F.BoldArrowIcon=nd,F.BookmarkIcon=ms,F.Button=de,F.CHART_COLORS=Le,F.CalendarIcon=Us,F.CameraIcon=ed,F.Card=we,F.Carousel=$e,F.Chart=H0,F.ChartIcon=Is,F.ChatInput=Qi,F.ChatWidget=tc,F.ChatWidgetComponent=bn,F.ChatWidgetWidget=vy,F.CheckIcon=zs,F.Checkbox=_t,F.ChevronIcon=he,F.ClockIcon=Gs,F.CloseEyeIcon=xt,F.CloseIcon=He,F.CloudIcon=ps,F.ColorInput=Pg,F.ColorPicker=ui,F.ComboBox=rf,F.Command=Oo,F.ContextMenu=Ho,F.CookieConsent=A0,F.CopyIcon=us,F.CountryPicker=Lg,F.CreditCardIcon=Bs,F.CropIcon=cd,F.DEFAULT_CHART_COLORS=ba,F.DatePicker=Kh,F.DeleteIcon=ys,F.DesignSystem=wb,F.DesignSystemProvider=ht,F.Divider=Op,F.DocumentIcon=Ts,F.DownloadIcon=ks,F.DragAndDrop=np,F.DragAndDropComponent=di,F.DragHandleIcon=Zc,F.DragHandleLinesIcon=dd,F.Drawer=yo,F.DropZone=cp,F.DropdownMenu=cr,F.DustBinIcon=Cr,F.EditIcon=bs,F.EmojiPicker=wp,F.ErrorIcon=vr,F.ExternalLinkIcon=Yn,F.FacebookIcon=ls,F.FileIcon=go,F.FileImage=O0,F.FileSVG=B0,F.FilterIcon=qs,F.FolderIcon=Qc,F.FormikChatInput=If,F.FormikCheckbox=ff,F.FormikColorInput=Ff,F.FormikComboBox=Ef,F.FormikCountryPicker=Mf,F.FormikDatePicker=zf,F.FormikEmojiPicker=am,F.FormikForm=gf,F.FormikIconPicker=Rf,F.FormikOTPInput=Nf,F.FormikPassword=Af,F.FormikRadio=mf,F.FormikSelect=Wf,F.FormikSelector=Uf,F.FormikSlider=Bf,F.FormikSwitch=Hf,F.FormikTagInput=jf,F.FormikTextArea=Pf,F.FormikTextField=Vf,F.FormikToggle=Kf,F.FormikToggleGroup=Xf,F.FormikUploader=Hl,F.GiftIcon=Vs,F.Gradient=xi,F.HeartIcon=ds,F.HelpIcon=Jc,F.HomeIcon=xs,F.HoverCard=Me,F.Icon=kr,F.IconPicker=Sp,F.ImageIcon=es,F.InfoIcon=Re,F.InstagramIcon=ns,F.KeyboardAvoidingView=Ul,F.LayoutIcon=Ls,F.LikeIcon=Rs,F.Link=Ft,F.LinkIcon=$s,F.LinkedinIcon=is,F.Loader=eo,F.LoadingSpinnerIcon=bt,F.LockIcon=ws,F.LogoutIcon=Es,F.MagicWandIcon=Qs,F.MapPinIcon=Ys,F.MediaPreview=im,F.MenuIcon=Ks,F.Menubar=xo,F.MessageLayout=wd,F.MessageView=ra,F.MicrophoneIcon=ut,F.MinusIcon=Nn,F.Modal=uo,F.ModalLayout=Zt,F.ModalRouter=Zt,F.MoonIcon=Fs,F.MoreIcon=Os,F.MousePointerIcon=Xn,F.NavigationMenu=bo,F.NotificationIcon=vs,F.OTPInput=ml,F.OpenEyeIcon=kt,F.PageLayout=vm,F.Pagination=zi,F.PanelIcon=Kn,F.Password=Xh,F.PauseIcon=ss,F.PlayIcon=qn,F.PlusIcon=Cs,F.PowerOffIcon=Ds,F.PrintIcon=Js,F.ProfileIcon=Ss,F.ProgressBar=Mi,F.Radio=Nt,F.RadioGroup=wg,F.RefreshIcon=Xs,F.Resizable=fn,F.RotateIcon=Ps,F.Router=jm,F.SaveIcon=hs,F.SearchIcon=Sr,F.Select=or,F.Selector=gg,F.SendIcon=yt,F.Separator=Xr,F.SettingsIcon=Un,F.ShapeIcon=js,F.ShareButton=ji,F.ShareIcon=Gn,F.ShieldIcon=As,F.Sidebar=hr,F.Slider=Bl,F.SliderIcon=id,F.SpinnerIcon=ld,F.SplashScreen=Fm,F.StarIcon=gs,F.StatusIndicator=Jr,F.StopIcon=wr,F.SuccessIcon=Ct,F.Switch=Dt,F.Table=Ve,F.Tabs=$o,F.TagInput=nf,F.TextArea=$t,F.TextField=je,F.TextIcon=Hs,F.ThreadsIcon=cs,F.TickIcon=Jo,F.Title=ci,F.Toast=xu,F.Toggle=Xt,F.ToggleGroup=si,F.Tooltip=et,F.TrashIcon=Ns,F.TwitchIcon=ts,F.TwitterIcon=os,F.UnLikeIcon=Zs,F.UnlockIcon=rd,F.UploadIcon=wt,F.Uploader=Ir,F.UserIcon=Xc,F.VideoIcon=Rc,F.WarningIcon=pt,F.WifiIcon=td,F.XIcon=rs,F.YoutubeIcon=as,F.ZapIcon=_s,F.ZoomInIcon=sd,F.ZoomOutIcon=Ws,F.deepMerge=Be,F.defaultDesignSystemConfig=An,F.designSystemConfigList=$c,F.designSystemConfigs=st,F.getDesignSystemComponentProps=gt,F.goBack=Mm,F.hideDrawer=ql,F.hideMessage=oa,F.hideModal=Jt,F.matchPath=Gl,F.mergeDesignSystemComponentProps=$n,F.navigate=zm,F.normalizeDesignSystemComponentProps=dt,F.setSplashLoaded=Tm,F.setSplashStarted=Im,F.showDrawer=wm,F.showMessage=ea,F.showModal=cm,F.showToast=ko,F.useDesignSystem=xr,F.useDesignSystemComponentProps=Io,F.useDrawerStore=ao,F.useHistory=on,F.useMergedDesignSystemComponentProps=pe,F.useMessageStore=Tr,F.useModalStore=no,F.useRouterStore=qe,F.useSplashStore=Nr,F.useToast=ku,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});
79
+ `})]})},Yy=({number:e=20,children:o,...t})=>{const n=Array.from({length:e},(a,l)=>l);return r.jsxs(c.View,{width:"100%",height:"100%",backgroundColor:"black",position:"relative",overflow:"hidden",...t,children:[n.map(a=>{const l=a*37%200-100+"px",i=.2+a*13%6*.1+"s",g=(1+a*7%9)/2+"s",s=300+a*17%100+"px";return r.jsx(c.View,{position:"absolute",top:"0px",left:l,width:"2px",height:"2px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)",transform:"rotate(215deg)",zIndex:0,animate:{from:{transform:"translateX(-100%) translateY(-100%)"},to:{transform:`translateX(${s}) translateY(${s})`},iterationCount:"infinite",timingFunction:"linear",fillMode:"forwards",duration:g,delay:i},children:r.jsx(c.View,{position:"absolute",top:"-1px",left:"-1px",width:"1px",height:"1px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 10px 0 1px rgba(255, 255, 255, 0.1)"})},a)}),o&&r.jsx(c.View,{position:"relative",zIndex:1,width:"100%",height:"100%",children:o})]})},Vc=["rgb(186, 230, 253)","rgb(249, 168, 212)","rgb(134, 239, 172)","rgb(253, 224, 71)","rgb(252, 165, 165)","rgb(216, 180, 254)","rgb(147, 197, 253)","rgb(165, 180, 252)","rgb(196, 181, 253)"],Ky=()=>Vc[Math.floor(Math.random()*Vc.length)],Xy=({rows:e=15,cols:o=10,squareSize:t=40,...n})=>{const a=Array(e).fill(1),l=Array(o).fill(1);return r.jsx(c.View,{padding:16,width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-50",zIndex:0,transform:"skewX(-48deg) skewY(14deg) scale(0.675) rotate(0deg) translateZ(0)",...n,children:a.map((i,g)=>r.jsx(c.Horizontal,{gap:0,children:l.map((s,d)=>r.jsx(c.View,{height:t/3,width:t,borderStyle:"solid",borderColor:"color-gray-200",borderWidth:.5,backgroundColor:"transparent",cursor:"pointer",on:{hover:{backgroundColor:Ky(),transition:"background-color 0.2s ease"}}},`col-${d}`))},`row-${g}`))})},Jy=["rgb(59, 130, 246)","rgb(147, 51, 234)","rgb(236, 72, 153)","rgb(34, 197, 94)","rgb(251, 146, 60)","rgb(168, 85, 247)"],Qy=({count:e=50,colors:o=Jy,speed:t="medium",shapes:n=["circle"],...a})=>{const l=Array.from({length:e},(d,f)=>f),i=()=>{switch(t){case"slow":return .5;case"fast":return 2;default:return 1}},g=()=>n[Math.floor(Math.random()*n.length)],s=()=>o[Math.floor(Math.random()*o.length)];return r.jsx(c.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:l.map(d=>{const f=Math.random()*8+4,u=Math.random()*400,m=Math.random()*300,p=Math.random()*400,y=Math.random()*300,x=(Math.random()*10+5)/i(),b=Math.random()*5,C=g(),k=s(),S={circle:{borderRadius:"50%"},square:{borderRadius:"2px"},triangle:{borderRadius:"0",clipPath:"polygon(50% 0%, 0% 100%, 100% 100%)"}};return r.jsx(c.View,{position:"absolute",width:f,height:f,backgroundColor:k,opacity:.7,style:{left:u,top:m,...S[C]},animate:{from:{transform:"translate(0px, 0px) scale(0.5)",opacity:0},to:{transform:`translate(${p-u}px, ${y-m}px) scale(1)`,opacity:.7},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${x}s`,delay:`${b}s`}},d)})})},Zy=({gridSize:e=30,lineColor:o="rgba(59, 130, 246, 0.3)",pulseColor:t="rgba(59, 130, 246, 0.8)",animationSpeed:n="medium",...a})=>{const l=()=>{switch(n){case"slow":return 4;case"fast":return 1;default:return 2}},i=Math.floor(400/e),g=Math.floor(300/e),s=i*g,d=Array.from({length:s},(f,u)=>u);return r.jsxs(c.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:[Array.from({length:i+1},(f,u)=>r.jsx(c.View,{position:"absolute",left:u*e,top:0,width:1,height:"100%",backgroundColor:o},`v-line-${u}`)),Array.from({length:g+1},(f,u)=>r.jsx(c.View,{position:"absolute",left:0,top:u*e,width:"100%",height:1,backgroundColor:o},`h-line-${u}`)),d.map(f=>{const u=f%i,m=Math.floor(f/i),p=(u+m)*.1;return r.jsx(c.View,{position:"absolute",left:u*e+1,top:m*e+1,width:e-2,height:e-2,backgroundColor:"transparent",animate:{from:{backgroundColor:"transparent"},to:{backgroundColor:t},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${l()}s`,delay:`${p}s`}},f)})]})},Ry=["rgba(59, 130, 246, 0.6)","rgba(147, 51, 234, 0.6)","rgba(236, 72, 153, 0.6)","rgba(34, 197, 94, 0.6)"],eb=({rippleCount:e=5,colors:o=Ry,maxSize:t=200,frequency:n=3,...a})=>{const l=Array.from({length:e},(i,g)=>({id:g,x:Math.random()*400,y:Math.random()*300,color:o[g%o.length],delay:g*(n/e),duration:3+Math.random()*2}));return r.jsxs(c.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-100",...a,children:[l.map(i=>r.jsx(c.View,{position:"absolute",width:20,height:20,borderRadius:"50%",style:{left:i.x-10,top:i.y-10,border:`2px solid ${i.color}`,backgroundColor:"transparent"},animate:{from:{transform:"scale(0)",opacity:1},to:{transform:`scale(${t/20})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${i.duration}s`,delay:`${i.delay}s`}},i.id)),l.map(i=>r.jsx(c.View,{position:"absolute",width:10,height:10,borderRadius:"50%",style:{left:i.x-5,top:i.y-5,backgroundColor:i.color},animate:{from:{transform:"scale(1)",opacity:.8},to:{transform:`scale(${t/40})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${i.duration*1.2}s`,delay:`${i.delay+.5}s`}},`secondary-${i.id}`))]})},ob=({children:e,src:o,backgroundSize:t="cover",backgroundPosition:n="center",backgroundRepeat:a="no-repeat",backgroundAttachment:l="scroll",imageOpacity:i=1,overlay:g=null,blendMode:s="normal",views:d,themeMode:f,...u})=>{const m={...Vn.image,backgroundImage:`url(${o})`,backgroundSize:t,backgroundPosition:n,backgroundRepeat:a,backgroundAttachment:l,opacity:i,mixBlendMode:s};return r.jsxs(c.View,{...Vn.container,...d==null?void 0:d.container,...u,children:[r.jsx(c.View,{style:m,...d==null?void 0:d.image}),g,e&&r.jsx(c.View,{...Vn.content,...d==null?void 0:d.content,children:e})]})},rb=({children:e,src:o,autoPlay:t=!0,loop:n=!0,muted:a=!0,playsInline:l=!0,overlay:i=null,blendMode:g="normal",views:s,themeMode:d,...f})=>r.jsxs(c.View,{...Pn.container,...s==null?void 0:s.container,...f,children:[r.jsx(c.View,{as:"video",src:o,autoPlay:t,loop:n,muted:a,playsInline:l,style:{...Pn.video,mixBlendMode:g},...s==null?void 0:s.video}),i,e&&r.jsx(c.View,{...Pn.content,...s==null?void 0:s.content,children:e})]}),tb=({children:e,...o})=>r.jsx(lc,{...o,children:e}),nb=/^(color|theme|light|dark)-/,ab=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},lb=({contentPosition:e,backgroundColor:o="color-black-900",...t})=>{const n=nb.test(o),a=n?ab(o):o,i=(()=>{let g=`${a}-100`,s=`${a}-900`,d=`${a}-600`,f=`${a}-400`;switch(n||(g=`color-mix(in srgb, ${a} 10%, transparent)`,s=`color-mix(in srgb, ${a} 90%, transparent)`,d=`color-mix(in srgb, ${a} 70%, transparent)`,f=`color-mix(in srgb, ${a} 50%, transparent)`),e){case"left":return`radial-gradient(circle at 70% 50%, ${g} 0%, ${g} 100%), linear-gradient(to right, ${s} 0%, ${d} 65%, ${g} 100%)`;case"right":return`radial-gradient(circle at 30% 50%, ${g} 0%, ${g} 100%), linear-gradient(to left, ${s} 0%, ${d} 65%, ${g} 100%)`;case"top":return`radial-gradient(circle at 50% 40%, ${g} 0%, ${g} 100%), linear-gradient(to bottom, ${s} 0%, ${d} 60%, ${g} 100%)`;case"bottom":return`radial-gradient(circle at 50% 60%, ${g} 0%, ${g} 100%), linear-gradient(to top, ${s} 0%, ${d} 60%, ${g} 100%)`;case"center":return`radial-gradient(circle at 50% 70%, ${s} 0%, ${g} 100%)`;default:return f}})();return r.jsx(c.View,{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:i,pointerEvents:"none",zIndex:1,...t})},ib=({children:e,views:o,...t})=>r.jsx(Uy.Provider,{value:{},children:r.jsx(c.View,{...qy.container,...o==null?void 0:o.container,...t,children:e})}),Pc=h.forwardRef(({children:e,shape:o="rounded",decorationRotation:t=5,decorationScale:n=1,decorationOpacity:a=.8,views:l,...i},g)=>{const d=(x=>{switch(x){case"square":return"0px";case"pill":return"9999px";case"rounded":default:return"16px"}})(o),f=Math.abs(t)*(Math.PI/180),u=Math.sin(f)*100,m=(n-1)*100/2,p=Math.ceil(u+m),y=i.backgroundColor??"theme-primary";return r.jsx(c.View,{...i,ref:g,backgroundColor:"transparent",position:"relative",overflow:"visible",...l==null?void 0:l.container,children:r.jsxs(c.View,{padding:i.padding??`${96+p}px ${p}px`,position:"relative",overflow:"visible",children:[r.jsx(c.View,{position:"absolute",top:p,left:p,right:p,bottom:p,backgroundColor:y,borderRadius:d,opacity:a/1.5,transform:`scale(${n})`,pointerEvents:"none",zIndex:1,...l==null?void 0:l.back}),r.jsx(c.View,{position:"absolute",top:p,left:p,right:p,bottom:p,transform:`rotate(${t}deg) scale(${n})`,opacity:a/1.2,backgroundColor:y,borderRadius:d,pointerEvents:"none",zIndex:2,...l==null?void 0:l.front}),r.jsx(c.View,{margin:"0 auto",position:"relative",zIndex:3,...l==null?void 0:l.content,children:e})]})})});Pc.displayName="Background.Layout";const Se=ib;Se.Aurora=Gy,Se.Meteors=Yy,Se.Wall=Xy,Se.Particles=Qy,Se.Grid=Zy,Se.Ripples=eb,Se.Image=ob,Se.Video=rb,Se.Gradient=tb,Se.Overlay=lb,Se.Layout=Pc;const Dc=h.forwardRef((e,o)=>r.jsx(Se,{...e,ref:o}));Dc.displayName="Background";const $c=Object.assign(Dc,{Layout:Se.Layout,Aurora:Se.Aurora,Meteors:Se.Meteors,Wall:Se.Wall,Particles:Se.Particles,Grid:Se.Grid,Ripples:Se.Ripples,Image:Se.Image,Video:Se.Video,Gradient:Se.Gradient,Overlay:Se.Overlay});$c.displayName="Background";function cb(e){const{inputValue:o,onInputChange:t,onSubmit:n,messages:a=[]}=e,[l,i]=h.useState(""),g=h.useRef(null),s=h.useRef(null),d=o!==void 0,f=o!==void 0?o:l,u=h.useCallback(p=>{d?t==null||t(p):i(p)},[d,t]),m=h.useCallback(p=>{p&&p.preventDefault();const y=f.trim();y&&n&&(n(y),d||i(""),g.current&&(g.current.style.height="auto"))},[f,n,d]);return h.useEffect(()=>{s.current&&(s.current.scrollTop=s.current.scrollHeight)},[a.length]),{internalInputValue:f,handleInputChange:u,handleSubmit:m,inputRef:g,messagesRef:s}}const sb={sm:{fontSize:"12px",padding:"8px"},md:{fontSize:"14px",padding:"10px"},lg:{fontSize:"14px",padding:"12px"}},db={default:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},glassy:{backgroundColor:"color-white-900",backdropFilter:"blur(10px)",border:"1px solid rgba(226, 232, 240, 0.9)",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},minimal:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px"}},gb={sm:{fontSize:"12px",padding:"8px 10px",borderRadius:"12px"},md:{fontSize:"14px",padding:"10px 12px",borderRadius:"12px"},lg:{fontSize:"14px",padding:"12px 14px",borderRadius:"14px"}},ub={backgroundColor:"theme-primary",color:"color-white",alignSelf:"flex-end",borderBottomRightRadius:"4px"},hb={backgroundColor:"color-white",color:"color-gray-900",alignSelf:"flex-start",borderBottomLeftRadius:"4px",border:"1px solid color-gray-200"},ro={container:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"hidden"},messagesContainer:{flex:1,overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px",padding:"16px",backgroundColor:"color-gray-50"},inputContainer:{position:"relative",backgroundColor:"color-white",borderTop:"1px solid color-gray-200",padding:"12px",display:"flex",alignItems:"flex-end",gap:"8px",transition:"background-color 0.2s ease, border-color 0.2s ease"},bubble:{maxWidth:"80%",position:"relative",wordWrap:"break-word",animation:"chatBubbleAppear 0.25s ease-out"},timestamp:{position:"absolute",top:"-24px",fontSize:"12px",color:"color-gray-500",backgroundColor:"color-white-900",padding:"2px 8px",borderRadius:"9999px",opacity:0,transition:"opacity 0.15s ease-out",border:"1px solid color-gray-200"},input:{flex:1,border:"none",outline:"none",backgroundColor:"transparent",resize:"none",fontFamily:"inherit",fontSize:"14px",minHeight:"24px",maxHeight:"120px"},sendButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s ease, opacity 0.2s ease",flexShrink:0},attachmentButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",transition:"background-color 0.2s ease",flexShrink:0}},fb=({messages:e=[],inputPlaceholder:o="Type a message...",disableInput:t=!1,variant:n="default",size:a="md",showTimestamps:l=!0,enableAttachments:i=!1,enableContextPicker:g=!1,selectedContextElements:s=[],onContextPickerClick:d,onRemoveContextElement:f,isLoading:u=!1,loadingText:m="Loading...",styles:p={},maxHeight:y="600px",internalInputValue:x,handleInputChange:b,handleSubmit:C,inputRef:k,messagesRef:S,inputValue:T,onInputChange:w,...F})=>{var V;const v={...ro.container,...db[n],...p.container},z={...ro.messagesContainer,maxHeight:y,...p.messagesContainer},j={...ro.inputContainer,...p.inputContainer},H={...ro.input,...sb[a],...p.input},E=h.useCallback(P=>{b(P.target.value),P.target.style.height="auto",P.target.style.height=`${P.target.scrollHeight}px`},[b]),M=h.useCallback(P=>{P.key==="Enter"&&!P.shiftKey&&(P.preventDefault(),C())},[C]),I=x.trim().length>0,{onSubmit:W,...D}=F;return r.jsxs(c.View,{...v,...D,children:[r.jsxs(c.View,{ref:S,...z,children:[e.length===0?r.jsx(c.View,{display:"flex",alignItems:"center",justifyContent:"center",flex:1,color:"color-gray-500",children:r.jsx(c.Text,{fontSize:"14px",children:"No messages yet. Start a conversation."})}):e.map(P=>r.jsx(mb,{message:P,size:a,showTimestamp:l,styles:{bubble:p.bubble,userBubble:p.userBubble,assistantBubble:p.assistantBubble,timestamp:p.timestamp,reasoningContainer:p.reasoningContainer,reasoningContent:p.reasoningContent,errorMessage:p.errorMessage,systemMessage:p.systemMessage,toolMessage:p.toolMessage}},P.id)),u&&r.jsxs(c.Horizontal,{justifyContent:"flex-start",alignItems:"center",gap:8,marginTop:"8px",...p.loadingIndicator,children:[r.jsx(Vt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(c.Text,{color:"color-gray-500",fontSize:"14px",children:m})]})]}),r.jsxs(c.View,{children:[s.length>0&&r.jsx(c.Horizontal,{gap:8,marginBottom:"8px",flexWrap:"wrap",padding:"0 12px 8px",...p.contextChipsContainer,children:s.map(P=>r.jsxs(c.Horizontal,{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",borderRadius:"9999px",padding:"6px 10px",alignItems:"center",gap:6,children:[r.jsx(c.Text,{fontSize:"12px",color:"color-blue-700",fontWeight:"500",children:P.name}),r.jsx(c.View,{as:"button",type:"button",onClick:()=>f==null?void 0:f(P.id),cursor:"pointer",border:"none",backgroundColor:"transparent",display:"flex",alignItems:"center",children:r.jsx(Le,{widthHeight:12,color:"color-blue-700"})})]},P.id))}),r.jsxs(c.View,{as:"form",onSubmit:C,...j,children:[i&&r.jsx(c.View,{as:"button",type:"button",...ro.attachmentButton,...p.attachmentButton,_hover:{backgroundColor:"color-gray-100"},children:r.jsx(lr,{widthHeight:16,color:"color-gray-600"})}),r.jsx(c.View,{as:"textarea",ref:k,value:x,onChange:E,onKeyDown:M,placeholder:o,disabled:t||u,...H,style:{...H,opacity:t||u?.5:1}}),r.jsxs(c.Vertical,{gap:4,alignItems:"center",children:[g&&r.jsx(c.View,{as:"button",type:"button",onClick:d,...ro.attachmentButton,...p.contextPickerButton,_hover:{backgroundColor:"color-gray-100",...(V=p.contextPickerButton)==null?void 0:V._hover},title:"Select element from page",children:r.jsx(ma,{widthHeight:16,color:"color-gray-600"})}),r.jsx(c.View,{as:"button",disabled:!I||t||u,...ro.sendButton,backgroundColor:I?"theme-primary":"color-gray-300",_hover:{backgroundColor:I?"theme-primary":"color-gray-300"},...p.sendButton,style:{cursor:I?"pointer":"not-allowed",opacity:!I||t||u?.6:1},children:r.jsx(Ht,{widthHeight:16,color:"color-white",filled:!1})})]})]})]})]})},mb=({message:e,size:o,showTimestamp:t,styles:n})=>{const[a,l]=h.useState(!1),[i,g]=h.useState(!1),s=e.role==="user",d=e.messageType==="system",f=e.messageType==="error",u=e.messageType==="tool";if(d)return r.jsx(c.View,{display:"flex",justifyContent:"center",padding:"8px",width:"100%",...n.systemMessage,children:r.jsxs(c.Horizontal,{gap:6,alignItems:"center",opacity:.7,children:[r.jsx(lo,{widthHeight:12,color:"color-gray-600"}),r.jsx(c.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.content})]})});if(u)return r.jsx(c.View,{display:"flex",justifyContent:"flex-start",padding:"8px 16px",width:"100%",...n.toolMessage,children:r.jsxs(c.Horizontal,{gap:8,alignItems:"center",backgroundColor:"color-gray-50",padding:"8px 10px",borderRadius:"8px",width:"100%",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(ga,{widthHeight:14,color:"color-gray-600"}),r.jsxs(c.Vertical,{gap:2,children:[r.jsx(c.Text,{fontSize:"11px",fontWeight:"600",color:"color-gray-700",children:"Tool Usage"}),r.jsx(c.Text,{fontSize:"12px",color:"color-gray-600",fontFamily:"monospace",children:e.content})]})]})});const m={...ro.bubble,...gb[o],...s?ub:hb,...f?{backgroundColor:"color-red-50",borderWidth:1,borderStyle:"solid",borderColor:"color-red-200",color:"color-red-700"}:{},...n.bubble,...s?n.userBubble:n.assistantBubble,...f?n.errorMessage:{}},p={...ro.timestamp,[s?"right":"left"]:"8px",opacity:a?1:0,...n.timestamp};return r.jsx(c.View,{position:"relative",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),display:"flex",justifyContent:s?"flex-end":"flex-start",children:r.jsxs(c.View,{...m,children:[t&&r.jsx(c.View,{...p,children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),f&&r.jsxs(c.Horizontal,{gap:6,marginBottom:"4px",alignItems:"center",children:[r.jsx(Dr,{widthHeight:14,color:"color-red-700"}),r.jsx(c.Text,{fontWeight:"600",fontSize:"12px",children:"Error"})]}),e.reasoning&&r.jsxs(c.View,{marginBottom:"8px",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:"color-gray-200",paddingBottom:"8px",...n.reasoningContainer,children:[r.jsxs(c.Horizontal,{as:"button",onClick:()=>g(!i),cursor:"pointer",gap:4,alignItems:"center",backgroundColor:"transparent",border:"none",padding:0,children:[r.jsx(c.Text,{fontSize:"11px",color:"color-gray-500",fontWeight:"600",children:"Thinking Process"}),r.jsx(we,{orientation:i?"down":"right",widthHeight:10,color:"color-gray-500"})]}),i&&r.jsx(c.View,{padding:"8px",backgroundColor:"color-gray-50",borderRadius:"8px",marginTop:"4px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",...n.reasoningContent,children:r.jsx(c.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.reasoning})})]}),r.jsx(c.View,{whiteSpace:"pre-wrap",wordBreak:"break-word",children:e.content}),e.attachments&&e.attachments.length>0&&r.jsx(c.Vertical,{gap:4,marginTop:"8px",children:e.attachments.map(y=>r.jsxs(c.Horizontal,{gap:6,padding:"6px 8px",backgroundColor:"color-gray-50",borderRadius:"8px",fontSize:"12px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(lr,{widthHeight:14}),r.jsx(c.Text,{children:y.name})]},y.id))}),e.contextElements&&e.contextElements.length>0&&r.jsxs(c.Vertical,{gap:4,marginTop:"8px",children:[r.jsx(c.Text,{fontSize:"11px",color:"color-black-500",fontWeight:"600",children:"Context:"}),e.contextElements.map(y=>r.jsx(c.Horizontal,{gap:6,padding:"6px 10px",backgroundColor:"color-blue-50",borderRadius:"9999px",fontSize:"11px",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",children:r.jsx(c.Text,{color:"color-blue-700",fontWeight:"500",children:y.name})},y.id))]})]})})},Dn=e=>{const o=cb(e);return r.jsx(fb,{...e,...o})};Dn.displayName="ChatWidget";const Lc=Dn;function pb({onSelect:e,onCancel:o,active:t}){const[n,a]=h.useState(null);h.useRef(null);const l=h.useCallback(s=>{var p;if(!t)return;const d=document.elementFromPoint(s.clientX,s.clientY);if(!d||d===document.body||d.closest('[data-chatwidget-ignore="true"]')||d.closest("#chatwidget-overlay")){a(null);return}const f=d.getBoundingClientRect();let u=d.tagName.toLowerCase();if(d.id)u+=`#${d.id}`;else if(d.className&&typeof d.className=="string"){const y=d.className.split(" ")[0];y&&(u+=`.${y}`)}const m=(p=d.innerText)==null?void 0:p.slice(0,20);m&&(u+=` ("${m}...")`),a({id:d.id||`el-${Date.now()}`,name:u,tagName:d.tagName.toLowerCase(),rect:f})},[t]),i=h.useCallback(s=>{!t||s.target.closest('[data-chatwidget-ignore="true"]')||(s.preventDefault(),s.stopPropagation(),n&&e(n))},[t,n,e]),g=h.useCallback(s=>{t&&s.key==="Escape"&&o()},[t,o]);return h.useEffect(()=>{if(!(typeof document>"u"))return t?(document.addEventListener("mousemove",l),document.addEventListener("click",i,!0),document.addEventListener("keydown",g),document.body.style.cursor="crosshair"):(a(null),document.removeEventListener("mousemove",l),document.removeEventListener("click",i,!0),document.removeEventListener("keydown",g),document.body.style.cursor=""),()=>{document.removeEventListener("mousemove",l),document.removeEventListener("click",i,!0),document.removeEventListener("keydown",g),document.body.style.cursor=""}},[t,l,i,g]),{highlightedElement:n}}function yb({element:e}){return e?r.jsx("div",{id:"chatwidget-overlay",style:{position:"fixed",top:e.rect.top,left:e.rect.left,width:e.rect.width,height:e.rect.height,border:"2px solid #1D4ED8",backgroundColor:"rgba(29, 78, 216, 0.08)",pointerEvents:"none",zIndex:99999,transition:"top 0.1s ease-out, left 0.1s ease-out, width 0.1s ease-out, height 0.1s ease-out",borderRadius:"8px"},children:r.jsx("div",{style:{position:"absolute",top:"-24px",left:"0",backgroundColor:"#1D4ED8",color:"white",padding:"2px 8px",borderRadius:"9999px",fontSize:"12px",fontWeight:"bold",whiteSpace:"nowrap"},children:e.name})}):null}const bb=({initialMessages:e=[],onSendMessage:o,bubbleSize:t="md"})=>{const[n,a]=h.useState(!1),[l,i]=h.useState(!1),[g,s]=h.useState(e),[d,f]=h.useState([]),{highlightedElement:u}=pb({active:l,onSelect:b=>{f(C=>[...C,b]),i(!1),a(!0)},onCancel:()=>{i(!1),a(!0)}}),m=()=>a(!n),p=()=>{i(!0),a(!1)},y=b=>{f(C=>C.filter(k=>k.id!==b))},x=b=>{const C={id:Date.now().toString(),role:"user",content:b,timestamp:new Date,contextElements:[...d]};s(k=>[...k,C]),o==null||o(b,d),f([]),setTimeout(()=>{var w;const k=Math.random()>.7,S=Math.random()>.4,T={id:(Date.now()+1).toString(),role:"assistant",timestamp:new Date,content:k?"I will highlight the selected element.":`I received your message regarding: ${((w=C.contextElements)==null?void 0:w.map(F=>F.name).join(", "))||"general context"}. How can I assist you further?`,messageType:k?"tool":"text",reasoning:S?"Analyzing the user input and context... The user seems to be asking about specific elements. I should tailor my response to the selected context.":void 0};s(F=>[...F,T]),k&&setTimeout(()=>{s(F=>[...F,{id:(Date.now()+2).toString(),role:"assistant",messageType:"system",content:'Tool "highlightElement" executed successfully.',timestamp:new Date}])},800)},1e3)};return r.jsxs(c.View,{position:"fixed",bottom:24,right:24,zIndex:9999,children:[r.jsx(yb,{element:u}),l&&r.jsx(c.View,{position:"fixed",top:24,left:"50%",transform:"translateX(-50%)",backgroundColor:"rgba(0,0,0,0.8)",color:"white",padding:"8px 16px",borderRadius:"24px",zIndex:1e4,boxShadow:"0 4px 6px rgba(0,0,0,0.1)",children:r.jsx(c.Text,{fontWeight:"600",fontSize:"14px",children:"Click an element to select it. Press ESC to cancel."})}),n&&r.jsxs(c.View,{position:"absolute",bottom:60,right:0,width:"400px",height:"600px",marginBottom:"16px",backgroundColor:"rgba(255, 255, 255, 0.8)",backdropFilter:"blur(20px)",borderRadius:"24px",border:"1px solid rgba(255, 255, 255, 0.4)",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",overflow:"hidden",animation:"slideUp 0.3s ease-out",style:{animation:"fadeIn 0.2s ease-out",transformOrigin:"bottom right"},children:[r.jsxs(c.View,{padding:"16px",borderBottom:"1px solid rgba(0,0,0,0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(c.Text,{fontWeight:"bold",color:"color-gray-800",children:"ChatWidget Assistant"}),r.jsx(c.View,{as:"button",onClick:()=>a(!1),cursor:"pointer",padding:"4px",borderRadius:"50%",border:"none",backgroundColor:"transparent",_hover:{backgroundColor:"rgba(0,0,0,0.05)"},children:r.jsx(Le,{widthHeight:16,color:"color-gray-500"})})]}),r.jsx(Lc,{messages:g,onSubmit:x,size:t,variant:"minimal",enableContextPicker:!0,selectedContextElements:d,onContextPickerClick:p,onRemoveContextElement:y,styles:{container:{height:"calc(100% - 60px)",backgroundColor:"transparent"},inputContainer:{backgroundColor:"white",margin:"0 16px 16px 16px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"}}})]}),!l&&r.jsx(c.View,{as:"button",onClick:m,width:"56px",height:"56px",borderRadius:"50%",backgroundColor:"theme-primary",border:"none",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",_hover:{transform:"scale(1.05)"},_active:{transform:"scale(0.95)"},"data-chatwidget-ignore":"true",children:n?r.jsx(Le,{widthHeight:24,color:"white"}):r.jsx(fa,{widthHeight:24,color:"white"})})]})};function $n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xb=typeof Element<"u",kb=typeof Map=="function",Cb=typeof Set=="function",wb=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function bt(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var t,n,a;if(Array.isArray(e)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(!bt(e[n],o[n]))return!1;return!0}var l;if(kb&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;for(l=e.entries();!(n=l.next()).done;)if(!bt(n.value[1],o.get(n.value[0])))return!1;return!0}if(Cb&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;return!0}if(wb&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(e[n]!==o[n])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof o.valueOf=="function")return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof o.toString=="function")return e.toString()===o.toString();if(a=Object.keys(e),t=a.length,t!==Object.keys(o).length)return!1;for(n=t;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,a[n]))return!1;if(xb&&e instanceof Element)return!1;for(n=t;n--!==0;)if(!((a[n]==="_owner"||a[n]==="__v"||a[n]==="__o")&&e.$$typeof)&&!bt(e[a[n]],o[a[n]]))return!1;return!0}return e!==e&&o!==o}var Sb=function(o,t){try{return bt(o,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const vb=$n(Sb);var Tb=function(e,o,t,n,a,l,i,g){if(process.env.NODE_ENV!=="production"&&o===void 0)throw new Error("invariant requires an error message argument");if(!e){var s;if(o===void 0)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[t,n,a,l,i,g],f=0;s=new Error(o.replace(/%s/g,function(){return d[f++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}},Ib=Tb;const Bc=$n(Ib);var Fb=function(o,t,n,a){var l=n?n.call(a,o,t):void 0;if(l!==void 0)return!!l;if(o===t)return!0;if(typeof o!="object"||!o||typeof t!="object"||!t)return!1;var i=Object.keys(o),g=Object.keys(t);if(i.length!==g.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),d=0;d<i.length;d++){var f=i[d];if(!s(f))return!1;var u=o[f],m=t[f];if(l=n?n.call(a,u,m,f):void 0,l===!1||l===void 0&&u!==m)return!1}return!0};const zb=$n(Fb);var _c=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(_c||{}),Ln={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},Oc=Object.values(_c),xt={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Nc=Object.entries(xt).reduce((e,[o,t])=>(e[t]=o,e),{}),Ge="data-rh",Qo={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Zo=(e,o)=>{for(let t=e.length-1;t>=0;t-=1){const n=e[t];if(Object.prototype.hasOwnProperty.call(n,o))return n[o]}return null},Mb=e=>{let o=Zo(e,"title");const t=Zo(e,Qo.TITLE_TEMPLATE);if(Array.isArray(o)&&(o=o.join("")),t&&o)return t.replace(/%s/g,()=>o);const n=Zo(e,Qo.DEFAULT_TITLE);return o||n||void 0},jb=e=>Zo(e,Qo.ON_CHANGE_CLIENT_STATE)||(()=>{}),Bn=(e,o)=>o.filter(t=>typeof t[e]<"u").map(t=>t[e]).reduce((t,n)=>({...t,...n}),{}),Wb=(e,o)=>o.filter(t=>typeof t.base<"u").map(t=>t.base).reverse().reduce((t,n)=>{if(!t.length){const a=Object.keys(n);for(let l=0;l<a.length;l+=1){const g=a[l].toLowerCase();if(e.indexOf(g)!==-1&&n[g])return t.concat(n)}}return t},[]),Eb=e=>console&&typeof console.warn=="function"&&console.warn(e),Mr=(e,o,t)=>{const n={};return t.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&Eb(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,l)=>{const i={};l.filter(s=>{let d;const f=Object.keys(s);for(let m=0;m<f.length;m+=1){const p=f[m],y=p.toLowerCase();o.indexOf(y)!==-1&&!(d==="rel"&&s[d].toLowerCase()==="canonical")&&!(y==="rel"&&s[y].toLowerCase()==="stylesheet")&&(d=y),o.indexOf(p)!==-1&&(p==="innerHTML"||p==="cssText"||p==="itemprop")&&(d=p)}if(!d||!s[d])return!1;const u=s[d].toLowerCase();return n[d]||(n[d]={}),i[d]||(i[d]={}),n[d][u]?!1:(i[d][u]=!0,!0)}).reverse().forEach(s=>a.push(s));const g=Object.keys(i);for(let s=0;s<g.length;s+=1){const d=g[s],f={...n[d],...i[d]};n[d]=f}return a},[]).reverse()},Ab=(e,o)=>{if(Array.isArray(e)&&e.length){for(let t=0;t<e.length;t+=1)if(e[t][o])return!0}return!1},Hb=e=>({baseTag:Wb(["href"],e),bodyAttributes:Bn("bodyAttributes",e),defer:Zo(e,Qo.DEFER),encode:Zo(e,Qo.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Bn("htmlAttributes",e),linkTags:Mr("link",["rel","href"],e),metaTags:Mr("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Mr("noscript",["innerHTML"],e),onChangeClientState:jb(e),scriptTags:Mr("script",["src","innerHTML"],e),styleTags:Mr("style",["cssText"],e),title:Mb(e),titleAttributes:Bn("titleAttributes",e),prioritizeSeoTags:Ab(e,Qo.PRIORITIZE_SEO_TAGS)}),qc=e=>Array.isArray(e)?e.join(""):e,Vb=(e,o)=>{const t=Object.keys(e);for(let n=0;n<t.length;n+=1)if(o[t[n]]&&o[t[n]].includes(e[t[n]]))return!0;return!1},_n=(e,o)=>Array.isArray(e)?e.reduce((t,n)=>(Vb(n,o)?t.priority.push(n):t.default.push(n),t),{priority:[],default:[]}):{default:e,priority:[]},Uc=(e,o)=>({...e,[o]:void 0}),Pb=["noscript","script","style"],On=(e,o=!0)=>o===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),Gc=e=>Object.keys(e).reduce((o,t)=>{const n=typeof e[t]<"u"?`${t}="${e[t]}"`:`${t}`;return o?`${o} ${n}`:n},""),Db=(e,o,t,n)=>{const a=Gc(t),l=qc(o);return a?`<${e} ${Ge}="true" ${a}>${On(l,n)}</${e}>`:`<${e} ${Ge}="true">${On(l,n)}</${e}>`},$b=(e,o,t=!0)=>o.reduce((n,a)=>{const l=a,i=Object.keys(l).filter(d=>!(d==="innerHTML"||d==="cssText")).reduce((d,f)=>{const u=typeof l[f]>"u"?f:`${f}="${On(l[f],t)}"`;return d?`${d} ${u}`:u},""),g=l.innerHTML||l.cssText||"",s=Pb.indexOf(e)===-1;return`${n}<${e} ${Ge}="true" ${i}${s?"/>":`>${g}</${e}>`}`},""),Yc=(e,o={})=>Object.keys(e).reduce((t,n)=>{const a=xt[n];return t[a||n]=e[n],t},o),Lb=(e,o,t)=>{const n={key:o,[Ge]:!0},a=Yc(t,n);return[h.createElement("title",a,o)]},kt=(e,o)=>o.map((t,n)=>{const a={key:n,[Ge]:!0};return Object.keys(t).forEach(l=>{const g=xt[l]||l;if(g==="innerHTML"||g==="cssText"){const s=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:s}}else a[g]=t[l]}),h.createElement(e,a)}),_e=(e,o,t=!0)=>{switch(e){case"title":return{toComponent:()=>Lb(e,o.title,o.titleAttributes),toString:()=>Db(e,o.title,o.titleAttributes,t)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>Yc(o),toString:()=>Gc(o)};default:return{toComponent:()=>kt(e,o),toString:()=>$b(e,o,t)}}},Bb=({metaTags:e,linkTags:o,scriptTags:t,encode:n})=>{const a=_n(e,Ln.meta),l=_n(o,Ln.link),i=_n(t,Ln.script);return{priorityMethods:{toComponent:()=>[...kt("meta",a.priority),...kt("link",l.priority),...kt("script",i.priority)],toString:()=>`${_e("meta",a.priority,n)} ${_e("link",l.priority,n)} ${_e("script",i.priority,n)}`},metaTags:a.default,linkTags:l.default,scriptTags:i.default}},_b=e=>{const{baseTag:o,bodyAttributes:t,encode:n=!0,htmlAttributes:a,noscriptTags:l,styleTags:i,title:g="",titleAttributes:s,prioritizeSeoTags:d}=e;let{linkTags:f,metaTags:u,scriptTags:m}=e,p={toComponent:()=>[],toString:()=>""};return d&&({priorityMethods:p,linkTags:f,metaTags:u,scriptTags:m}=Bb(e)),{priority:p,base:_e("base",o,n),bodyAttributes:_e("bodyAttributes",t,n),htmlAttributes:_e("htmlAttributes",a,n),link:_e("link",f,n),meta:_e("meta",u,n),noscript:_e("noscript",l,n),script:_e("script",m,n),style:_e("style",i,n),title:_e("title",{title:g,titleAttributes:s},n)}},Nn=_b,Ct=[],qn=!!(typeof window<"u"&&window.document&&window.document.createElement),Un=class{constructor(e,o){ao(this,"instances",[]);ao(this,"canUseDOM",qn);ao(this,"context");ao(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Ct:this.instances,add:e=>{(this.canUseDOM?Ct:this.instances).push(e)},remove:e=>{const o=(this.canUseDOM?Ct:this.instances).indexOf(e);(this.canUseDOM?Ct:this.instances).splice(o,1)}}});this.context=e,this.canUseDOM=o||!1,o||(e.helmet=Nn({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},Ob=parseInt(h.version.split(".")[0],10),Gn=Ob>=19,Nb={},Kc=h.createContext(Nb),qb=(jo=class extends h.Component{constructor(t){super(t);ao(this,"helmetData");Gn?this.helmetData=null:this.helmetData=new Un(this.props.context||{},jo.canUseDOM)}render(){return Gn?h.createElement(h.Fragment,null,this.props.children):h.createElement(Kc.Provider,{value:this.helmetData.value},this.props.children)}},ao(jo,"canUseDOM",qn),jo),Ro=(e,o)=>{const t=document.head||document.querySelector("head"),n=t.querySelectorAll(`${e}[${Ge}]`),a=[].slice.call(n),l=[];let i;return o&&o.length&&o.forEach(g=>{const s=document.createElement(e);for(const d in g)if(Object.prototype.hasOwnProperty.call(g,d))if(d==="innerHTML")s.innerHTML=g.innerHTML;else if(d==="cssText"){const f=g.cssText;s.appendChild(document.createTextNode(f))}else{const f=d,u=typeof g[f]>"u"?"":g[f];s.setAttribute(d,u)}s.setAttribute(Ge,"true"),a.some((d,f)=>(i=f,s.isEqualNode(d)))?a.splice(i,1):l.push(s)}),a.forEach(g=>{var s;return(s=g.parentNode)==null?void 0:s.removeChild(g)}),l.forEach(g=>t.appendChild(g)),{oldTags:a,newTags:l}},Yn=(e,o)=>{const t=document.getElementsByTagName(e)[0];if(!t)return;const n=t.getAttribute(Ge),a=n?n.split(","):[],l=[...a],i=Object.keys(o);for(const g of i){const s=o[g]||"";t.getAttribute(g)!==s&&t.setAttribute(g,s),a.indexOf(g)===-1&&a.push(g);const d=l.indexOf(g);d!==-1&&l.splice(d,1)}for(let g=l.length-1;g>=0;g-=1)t.removeAttribute(l[g]);a.length===l.length?t.removeAttribute(Ge):t.getAttribute(Ge)!==i.join(",")&&t.setAttribute(Ge,i.join(","))},Ub=(e,o)=>{typeof e<"u"&&document.title!==e&&(document.title=qc(e)),Yn("title",o)},Xc=(e,o)=>{const{baseTag:t,bodyAttributes:n,htmlAttributes:a,linkTags:l,metaTags:i,noscriptTags:g,onChangeClientState:s,scriptTags:d,styleTags:f,title:u,titleAttributes:m}=e;Yn("body",n),Yn("html",a),Ub(u,m);const p={baseTag:Ro("base",t),linkTags:Ro("link",l),metaTags:Ro("meta",i),noscriptTags:Ro("noscript",g),scriptTags:Ro("script",d),styleTags:Ro("style",f)},y={},x={};Object.keys(p).forEach(b=>{const{newTags:C,oldTags:k}=p[b];C.length&&(y[b]=C),k.length&&(x[b]=p[b].oldTags)}),o&&o(),s(e,y,x)},jr=null,Gb=e=>{jr&&cancelAnimationFrame(jr),e.defer?jr=requestAnimationFrame(()=>{Xc(e,()=>{jr=null})}):(Xc(e),jr=null)},Yb=Gb,Jc=class extends h.Component{constructor(){super(...arguments);ao(this,"rendered",!1)}shouldComponentUpdate(o){return!zb(o,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:o}=this.props.context;o.remove(this),this.emitChange()}emitChange(){const{helmetInstances:o,setHelmet:t}=this.props.context;let n=null;const a=Hb(o.get().map(l=>{const{context:i,...g}=l.props;return g}));qb.canUseDOM?Yb(a):Nn&&(n=Nn(a)),t(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:o}=this.props.context;o.add(this),this.emitChange()}render(){return this.init(),null}},wt=[],Qc=e=>{const o={};for(const t of Object.keys(e))o[Nc[t]||t]=e[t];return o},Mo=e=>{const o={};for(const t of Object.keys(e)){const n=xt[t];o[n||t]=e[t]}return o},Zc=(e,o)=>{if(!qn)return;const t=document.getElementsByTagName(e)[0];if(!t)return;const n="data-rh-managed",a=t.getAttribute(n),l=a?a.split(","):[],i=Object.keys(o);for(const g of l)i.includes(g)||t.removeAttribute(g);for(const g of i){const s=o[g];s==null||s===!1?t.removeAttribute(g):s===!0?t.setAttribute(g,""):t.setAttribute(g,String(s))}i.length>0?t.setAttribute(n,i.join(",")):t.removeAttribute(n)},Kn=()=>{const e={},o={};for(const t of wt){const{htmlAttributes:n,bodyAttributes:a}=t.props;n&&Object.assign(e,Qc(n)),a&&Object.assign(o,Qc(a))}Zc("html",e),Zc("body",o)},Kb=class extends h.Component{componentDidMount(){wt.push(this),Kn()}componentDidUpdate(){Kn()}componentWillUnmount(){const e=wt.indexOf(this);e!==-1&&wt.splice(e,1),Kn()}resolveTitle(){const{title:e,titleTemplate:o,defaultTitle:t}=this.props;return e&&o?o.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||t||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const o=this.props.titleAttributes||{};return h.createElement("title",Mo(o),e)}renderBase(){const{base:e}=this.props;return e?h.createElement("base",Mo(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>h.createElement("meta",{key:t,...Mo(o)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>h.createElement("link",{key:t,...Mo(o)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,l=Mo(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("script",{key:t,...l})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{cssText:n,...a}=o,l=Mo(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("style",{key:t,...l})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,l=Mo(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("noscript",{key:t,...l})})}render(){return h.createElement(h.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},Xb=(Zn=class extends h.Component{shouldComponentUpdate(e){return!vb(Uc(this.props,"helmetData"),Uc(e,"helmetData"))}mapNestedChildrenToProps(e,o){if(!o)return null;switch(e.type){case"script":case"noscript":return{innerHTML:o};case"style":return{cssText:o};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,o,t,n){return{...o,[e.type]:[...o[e.type]||[],{...t,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,o,t,n){switch(e.type){case"title":return{...o,[e.type]:n,titleAttributes:{...t}};case"body":return{...o,bodyAttributes:{...t}};case"html":return{...o,htmlAttributes:{...t}};default:return{...o,[e.type]:{...t}}}}mapArrayTypeChildrenToProps(e,o){let t={...o};return Object.keys(e).forEach(n=>{t={...t,[n]:e[n]}}),t}warnOnInvalidChildren(e,o){return Bc(Oc.some(t=>e.type===t),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${Oc.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),Bc(!o||typeof o=="string"||Array.isArray(o)&&!o.some(t=>typeof t!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,o){let t={};return h.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...l}=n.props,i=Object.keys(l).reduce((s,d)=>(s[Nc[d]||d]=l[d],s),{});let{type:g}=n;switch(typeof g=="symbol"?g=g.toString():this.warnOnInvalidChildren(n,a),g){case"Symbol(react.fragment)":o=this.mapChildrenToProps(a,o);break;case"link":case"meta":case"noscript":case"script":case"style":t=this.flattenArrayTypeChildren(n,t,i,a);break;default:o=this.mapObjectTypeChildren(n,o,i,a);break}}),this.mapArrayTypeChildrenToProps(t,o)}render(){const{children:e,...o}=this.props;let t={...o},{helmetData:n}=o;if(e&&(t=this.mapChildrenToProps(e,t)),n&&!(n instanceof Un)){const a=n;n=new Un(a.context,!0),delete t.helmetData}return Gn?h.createElement(Kb,{...t}):n?h.createElement(Jc,{...t,context:n.value}):h.createElement(Kc.Consumer,null,a=>h.createElement(Jc,{...t,context:a}))}},ao(Zn,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Zn);const Jb={airbnb:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},apple:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.03em"},coinbase:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.02em"},figma:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontWeight:700},linear:{highlightStyle:"gradient",fontWeight:600,letterSpacing:"-0.03em"},nike:{highlightStyle:"underline",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",highlightFontStyle:"italic",highlightFontWeight:900},notion:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontStyle:"italic"},revolut:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},shopify:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},spacex:{highlightStyle:"glow",fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",highlightLetterSpacing:"0.06em"},spotify:{highlightStyle:"background",fontWeight:800,letterSpacing:"-0.03em"},stripe:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},tesla:{highlightStyle:"solid",fontWeight:500,letterSpacing:"-0.01em",textTransform:"uppercase"},uber:{highlightStyle:"underline",fontWeight:700,letterSpacing:"-0.02em"},vercel:{highlightStyle:"outline",fontWeight:700,letterSpacing:"-0.04em"}},Qb={highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},Zb=e=>Jb[e.metadata.id]??Qb,Rc=(e,o)=>{const t=e.theme;return{canvas:He(t.canvas),surface:He(t.surface),text:He(t.text),muted:He(t.muted),border:He(t.border),primary:He(t.primary),secondary:He(t.secondary),success:He(t.success),warning:He(t.warning),error:He(t.error),onPrimary:He(t.onPrimary),appearance:o}},Rb=e=>Rc(e,"light"),ex=e=>Rc(e,"dark"),ve=({palette:e,label:o,config:t,children:n})=>r.jsxs(c.Vertical,{gap:10,flex:"1 1 320px",minWidth:0,children:[r.jsxs(c.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(c.View,{width:10,height:10,borderRadius:9999,backgroundColor:e.appearance==="dark"?"#111111":"#ffffff",borderWidth:1,borderStyle:"solid",borderColor:"rgba(0,0,0,0.15)"}),r.jsx(c.Text,{fontSize:11,fontWeight:"700",letterSpacing:"0.08em",textTransform:"uppercase",children:o})]}),r.jsx(jt,{config:t,mode:e.appearance,children:r.jsx(c.View,{padding:20,borderRadius:16,borderWidth:1,borderStyle:"solid",backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",children:n})})]}),He=e=>!e||typeof e!="string"?e:/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,to=(e,o)=>`color-mix(in srgb, ${He(e)} ${o}%, transparent)`,ox=e=>e&&e.startsWith("var(--")?e.slice(6,-1):e,rx={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral"},tx=e=>e.personality||rx,no=(e,o="normal")=>{let n={light:300,regular:400,bold:700,black:800}[e.typeWeight];return o==="light"&&(n=Math.max(300,n-200)),o==="heavy"&&(n=Math.min(900,n+100)),n},Wr=e=>{switch(e.density){case"tight":return{padding:16,gap:10,large:20};case"spacious":return{padding:28,gap:18,large:36};case"comfortable":default:return{padding:22,gap:14,large:28}}},nx=e=>e.typeCase==="uppercase"?"uppercase":"none",St=(e,o)=>{switch(e.surfaceTone){case"glass":return{backgroundColor:o.appearance==="dark"?"rgba(255,255,255,0.04)":"rgba(255,255,255,0.65)",backdropFilter:"blur(14px)"};case"mono":return{backgroundColor:o.appearance==="dark"?"#0a0a0a":He(o.surface)};case"matte":return{backgroundColor:o.appearance==="dark"?"#181818":"#f4f4f4"};case"paper":default:return{backgroundColor:He(o.surface)}}},er=(e,o)=>{const t=He(o.primary),n=He(o.secondary||o.primary);switch(e.accentTreatment){case"gradient":return`linear-gradient(135deg, ${t} 0%, ${n} 100%)`;case"glow":return t;case"stripe":return`repeating-linear-gradient(45deg, ${t} 0 8px, ${n} 8px 16px)`;case"halftone":return`radial-gradient(circle at 30% 30%, ${t} 0%, ${n} 70%)`;case"flat":default:return t}},or=(e,o)=>{if(e.accentTreatment==="glow")return`0 0 24px ${to(o.primary,40)}, 0 0 4px ${He(o.primary)}`},fo=e=>({letterSpacing:e.letterSpacing,textTransform:nx(e),fontStyle:e.typeStyle,fontWeight:no(e,"heavy")}),Ee=e=>({letterSpacing:e.typeCase==="uppercase"?"0.12em":"0.06em",textTransform:"uppercase",fontStyle:e.typeStyle,fontWeight:no(e,"normal")}),ax=(e,o)=>{var n,a,l;const t=(n=e.components)==null?void 0:n[o];return(l=(a=t==null?void 0:t.views)==null?void 0:a.container)==null?void 0:l.borderRadius},lx=e=>{const o=e.tokens.rawCssVars||{},t=e.theme.border,n=e.theme.surface,a=e.theme.primary,l=o["shadow-ring"]||"rgba(0,0,0,0.08) 0px 0px 0px 1px",i=o["shadow-ring-light"]||`${t} 0px 0px 0px 1px`,g=o["shadow-card"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, ${n} 0px 0px 0px 1px`,s=o["shadow-card-full"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, ${n} 0px 0px 0px 1px`;return[{name:"Level 0",label:"Flat",description:"No shadow",shadow:"none"},{name:"Level 1",label:"Ring",description:"Shadow-as-border",shadow:l},{name:"Level 1b",label:"Light Ring",description:"Lighter ring",shadow:i},{name:"Level 2",label:"Card",description:"Ring + subtle lift",shadow:g},{name:"Level 3",label:"Full Card",description:"Ring + lift + ambient + glow",shadow:s},{name:"Focus",label:"Accessibility ring",description:"Focus state — 2px ring",shadow:`0 0 0 2px ${a}`}]},Er=(e,o)=>{const n={accordion:["accordion","card","alert"],tabs:["tabs","button"],panel:["card","alert"]}[o]??[o];for(const a of n){const l=ax(e,a);if(l!==void 0)return l}return"12px"},Xn=({glyph:e,badge:o})=>r.jsxs(c.View,{position:"relative",display:"inline-flex",children:[r.jsx(c.View,{width:32,height:32,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",style:{backgroundColor:"rgba(0,0,0,0.06)",fontSize:18,lineHeight:"20px"},children:e}),o?r.jsx(c.View,{position:"absolute",top:-10,right:-18,paddingHorizontal:6,paddingVertical:2,borderRadius:9999,style:{backgroundColor:"#ffffff",color:"#222222",fontSize:9,fontWeight:700,letterSpacing:"0.04em",boxShadow:"0 1px 3px rgba(0,0,0,0.18)"},children:o}):null]}),ix=[{title:"Homes",value:"homes",icon:r.jsx(Xn,{glyph:"🏠"}),content:r.jsx(c.Text,{fontSize:14,lineHeight:"20px",children:"Tokens, inputs, and feedback components share the active config."})},{title:"Experiences",value:"experiences",icon:r.jsx(Xn,{glyph:"🎈",badge:"NEW"}),content:r.jsx(c.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Services",value:"services",icon:r.jsx(Xn,{glyph:"🛎️",badge:"NEW"}),content:r.jsx(c.Text,{fontSize:14,lineHeight:"20px",children:"Each tab carries an icon. Active tab uses the theme primary underline."})}],cx=[{title:"Token",field:"token"},{title:"Value",field:"value"},{title:"Role",field:"role"}],sx=[{id:"overview",label:"Overview",href:"#"},{id:"components",label:"Components",href:"#"},{id:"tokens",label:"Tokens",href:"#"}],dx=({color:e,name:o,role:t,border:n})=>r.jsxs(c.View,{borderWidth:1,borderStyle:"solid",borderRadius:8,overflow:"hidden",minWidth:0,borderColor:n,children:[r.jsx(c.View,{height:76,backgroundColor:e}),r.jsxs(c.Vertical,{gap:4,padding:12,children:[r.jsx(c.Text,{fontSize:13,lineHeight:"18px",fontWeight:"700",children:o}),r.jsx(c.Text,{fontSize:12,lineHeight:"16px",opacity:.7,children:e}),r.jsx(c.Text,{fontSize:12,lineHeight:"16px",opacity:.72,children:t})]})]}),Ie=({title:e,children:o,config:t})=>r.jsxs(c.Vertical,{gap:18,padding:24,borderWidth:1,borderStyle:"solid",borderRadius:12,backgroundColor:t.theme.canvas,borderColor:t.theme.border,children:[r.jsx(c.Text,{fontSize:18,lineHeight:"24px",fontWeight:"700",color:t.theme.text,children:e}),o]}),gx=({config:e})=>{const o=Zb(e),t=o.highlightStyle==="background"?e.theme.onPrimary:e.theme.primary;return r.jsx(c.View,{width:"100%",borderRadius:20,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,backgroundColor:e.theme.surface,children:r.jsxs(c.Horizontal,{width:"100%",flexWrap:"wrap",alignItems:"stretch",gap:0,children:[r.jsxs(c.Vertical,{flex:"1 1 360px",minWidth:0,padding:36,gap:20,justifyContent:"center",children:[r.jsx(Ve,{variant:"outline",content:`${e.metadata.label} hero`}),r.jsx(Hi,{size:"xl",responsive:!0,highlightText:"design system",highlightStyle:o.highlightStyle,highlightColor:e.theme.primary,highlightSecondaryColor:o.highlightStyle==="gradient"?e.theme.secondary:e.theme.onPrimary,views:{container:{color:e.theme.text},text:{color:e.theme.text,fontFamily:e.tokens.typography.fontFamily,fontWeight:o.fontWeight,style:{letterSpacing:o.letterSpacing,fontStyle:o.fontStyle??"normal",textTransform:o.textTransform??"none"}},highlight:{color:t,fontWeight:o.highlightFontWeight??o.fontWeight,style:{fontStyle:o.highlightFontStyle??o.fontStyle??"normal",letterSpacing:o.highlightLetterSpacing??o.letterSpacing,textTransform:o.textTransform??"none"}}},children:"Build a beautiful design system in minutes"},`${e.metadata.id}-${o.highlightStyle}`),r.jsxs(c.Text,{color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,style:{fontSize:16,lineHeight:"24px",maxWidth:520},children:["Each brand defines its own highlight treatment —"," ",r.jsx(c.Text,{as:"span",color:e.theme.primary,fontWeight:"700",children:o.highlightStyle})," ","with weight"," ",r.jsx(c.Text,{as:"span",fontWeight:"700",children:o.fontWeight}),o.highlightFontStyle==="italic"||o.fontStyle==="italic"?", italic":"",o.textTransform==="uppercase"?", uppercase":"","."]}),r.jsxs(c.Horizontal,{gap:12,flexWrap:"wrap",children:[r.jsx(ye,{color:"theme-primary",size:"md",children:"Get started"}),r.jsx(ye,{variant:"outline",color:"theme-primary",size:"md",children:"View docs"})]})]}),r.jsxs(c.View,{flex:"1 1 320px",minWidth:0,minHeight:260,position:"relative",overflow:"hidden",style:{backgroundImage:`linear-gradient(135deg, ${e.theme.primary}, ${e.theme.secondary||e.theme.primary})`},children:[r.jsx(c.View,{position:"absolute",top:"50%",left:"50%",width:180,height:180,borderRadius:9999,style:{transform:"translate(-50%, -50%)",backgroundColor:"rgba(255,255,255,0.18)",filter:"blur(40px)"}}),r.jsxs(c.Vertical,{width:"100%",height:"100%",minHeight:260,padding:32,justifyContent:"flex-end",alignItems:"flex-start",gap:12,children:[r.jsx(c.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:13,letterSpacing:"0.08em",textTransform:"uppercase"},children:e.metadata.label}),r.jsx(c.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:28,lineHeight:"32px",letterSpacing:"-0.02em"},children:e.theme.primary})]})]})]})})},ux=({config:e})=>{var t,n;const o=e.tokens.colors.slice(0,5).map(a=>({token:a.name,value:a.value,role:a.role}));return r.jsxs(c.Vertical,{gap:24,children:[r.jsx(Ie,{title:"Color",config:e,children:r.jsx(c.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:12,children:e.tokens.colors.slice(0,12).map(a=>r.jsx(dx,{color:a.value,name:a.name,role:a.role,text:e.theme.text,border:e.theme.border},a.name))})}),r.jsx(Ie,{title:"Typography",config:e,children:r.jsxs(c.Vertical,{gap:24,children:[r.jsxs(c.Vertical,{gap:4,children:[r.jsx(c.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:48,lineHeight:"1.0",fontWeight:"700",letterSpacing:"0.96px",textTransform:"uppercase",children:"Making Life Multiplanetary"}),r.jsx(c.Text,{fontSize:10,color:e.theme.muted,children:"Display — 48px / Bold / 1.00 / Uppercase"})]}),r.jsxs(c.Vertical,{gap:4,children:[r.jsx(c.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:16,lineHeight:"1.7",fontWeight:"400",children:"SpaceX designs, manufactures and launches advanced rockets and spacecraft. The company was founded to revolutionize space technology."}),r.jsx(c.Text,{fontSize:10,color:e.theme.muted,children:"Body — 16px / 400 / 1.70"})]}),r.jsxs(c.Vertical,{gap:4,children:[r.jsx(c.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:13,lineHeight:"0.94",fontWeight:"700",letterSpacing:"1.17px",textTransform:"uppercase",children:"Falcon 9 · Starship · Dragon"}),r.jsx(c.Text,{fontSize:10,color:e.theme.muted,children:"Nav Bold — 13px / 700 / 0.94 / Uppercase"})]}),r.jsxs(c.Vertical,{gap:4,children:[r.jsx(c.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:12,lineHeight:"1.0",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Mission Overview"}),r.jsx(c.Text,{fontSize:10,color:e.theme.muted,children:"Caption — 12px / 400 / 1.00 / Uppercase"})]}),r.jsxs(c.Vertical,{gap:4,children:[r.jsx(c.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:10,lineHeight:"0.94",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Launch Date: 2026-04-15"}),r.jsx(c.Text,{fontSize:10,color:e.theme.muted,children:"Micro — 10px / 400 / 0.94 / Uppercase"})]}),r.jsx(c.Horizontal,{gap:10,flexWrap:"wrap",marginTop:12,children:e.tokens.typography.fontSizes.map(a=>r.jsx(Ve,{variant:"outline",content:a},a))})]})}),r.jsx(Ie,{title:"Spacing, Radius, Shadow",config:e,children:r.jsxs(c.Vertical,{gap:18,children:[r.jsx(c.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"flex-end",children:e.tokens.spacing.slice(0,10).map(a=>r.jsxs(c.Vertical,{gap:8,alignItems:"center",children:[r.jsx(c.View,{width:a,minWidth:4,height:24,borderRadius:2,backgroundColor:e.theme.primary}),r.jsx(c.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(c.Horizontal,{gap:12,flexWrap:"wrap",children:e.tokens.radii.slice(0,6).map(a=>r.jsxs(c.Vertical,{gap:8,alignItems:"center",children:[r.jsx(c.View,{width:64,height:64,borderRadius:a,borderWidth:1,borderStyle:"solid",backgroundColor:e.theme.surface,borderColor:e.theme.border}),r.jsx(c.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(c.View,{width:"100%",maxWidth:"100%",overflowX:"auto",style:{WebkitOverflowScrolling:"touch",color:e.theme.text},children:r.jsx(Fe,{views:(n=(t=e.components)==null?void 0:t.table)==null?void 0:n.views,children:r.jsx(Fe.Template,{caption:"First extracted color tokens",columns:cx,data:o})})})]})})]})},es=({palette:e})=>r.jsxs(We,{width:"min(100%, 420px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[r.jsx(We.Header,{children:r.jsxs(c.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsxs(c.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(c.Text,{fontSize:24,fontWeight:"800",color:e.text,children:"$182"}),r.jsx(c.Text,{fontSize:14,color:e.muted,children:"night"})]}),r.jsx(Ve,{variant:"filled",content:"Best value"})]})}),r.jsx(We.Content,{children:r.jsxs(c.Vertical,{gap:12,children:[r.jsxs(c.Horizontal,{gap:0,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,overflow:"hidden",children:[r.jsxs(c.Vertical,{flex:1,padding:10,gap:2,borderRightWidth:1,borderRightStyle:"solid",borderColor:e.border,children:[r.jsx(c.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECK-IN"}),r.jsx(c.Text,{fontSize:14,color:e.text,children:"Mar 12, 2026"})]}),r.jsxs(c.Vertical,{flex:1,padding:10,gap:2,children:[r.jsx(c.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECKOUT"}),r.jsx(c.Text,{fontSize:14,color:e.text,children:"Mar 18, 2026"})]})]}),r.jsxs(c.Vertical,{padding:10,gap:2,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,children:[r.jsx(c.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"GUESTS"}),r.jsx(c.Text,{fontSize:14,color:e.text,children:"2 adults"})]}),r.jsx(ye,{isFilled:!0,size:"lg",children:"Reserve"}),r.jsx(ut,{}),r.jsxs(c.Vertical,{gap:6,children:[r.jsxs(c.Horizontal,{justifyContent:"space-between",children:[r.jsx(c.Text,{fontSize:14,color:e.text,children:"$182 × 6 nights"}),r.jsx(c.Text,{fontSize:14,color:e.text,children:"$1,092"})]}),r.jsxs(c.Horizontal,{justifyContent:"space-between",children:[r.jsx(c.Text,{fontSize:14,color:e.text,children:"Cleaning fee"}),r.jsx(c.Text,{fontSize:14,color:e.text,children:"$48"})]}),r.jsxs(c.Horizontal,{justifyContent:"space-between",children:[r.jsx(c.Text,{fontSize:14,color:e.text,children:"Service fee"}),r.jsx(c.Text,{fontSize:14,color:e.text,children:"$165"})]})]}),r.jsx(ut,{}),r.jsxs(c.Horizontal,{justifyContent:"space-between",children:[r.jsx(c.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"Total before taxes"}),r.jsx(c.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"$1,305"})]})]})})]}),os=[{name:"Starter",tagline:"For solo makers shipping their first project.",price:"$0",period:"/ month",features:["1 workspace","Up to 3 projects","Community support"],ctaLabel:"Get started"},{name:"Pro",tagline:"For growing teams that need more room to build.",price:"$24",period:"/ month",features:["Unlimited projects","Advanced analytics","Priority email support","Custom domains"],ctaLabel:"Start free trial",featured:!0},{name:"Enterprise",tagline:"For organizations with security and scale needs.",price:"Custom",period:"",features:["SSO & SCIM","Audit logs","Dedicated success manager","99.99% uptime SLA"],ctaLabel:"Contact sales"}],rs=({palette:e,tier:o,personality:t})=>{const n=Wr(t),a=St(t,e),l=er(t,e),i=or(t,e);return r.jsx(c.View,{width:"min(100%, 280px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:o.featured?0:1,borderStyle:"solid",style:{...o.featured?{background:l,boxShadow:i}:a,borderColor:e.border,color:o.featured?e.onPrimary:e.text},children:r.jsxs(c.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(c.Vertical,{gap:6,children:[r.jsxs(c.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(c.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:Ee(t),children:o.name}),o.featured?r.jsx(c.View,{paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,backgroundColor:to(e.onPrimary,22),children:r.jsxs(c.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(c.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1},children:t.signatureMotif}),r.jsx(c.Text,{fontSize:10,color:e.onPrimary,style:Ee(t),children:t.voice.includes("mission")?"PRIORITY":"POPULAR"})]})}):null]}),r.jsx(c.Text,{fontSize:13,lineHeight:"18px",color:o.featured?to(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.tagline})]}),r.jsxs(c.Horizontal,{alignItems:"baseline",gap:4,children:[r.jsx(c.Text,{fontSize:n.large+8,color:o.featured?e.onPrimary:e.text,style:fo(t),children:o.price}),o.period?r.jsx(c.Text,{fontSize:14,color:o.featured?to(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.period}):null]}),r.jsx(c.Vertical,{gap:8,children:o.features.map(g=>r.jsxs(c.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(c.View,{width:18,height:18,borderRadius:t.cornerStyle==="sharp"?2:9999,backgroundColor:o.featured?to(e.onPrimary,22):e.primary,alignItems:"center",justifyContent:"center",style:{display:"flex",flexShrink:0},children:r.jsx(c.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:no(t,"heavy")},children:t.cornerStyle==="sharp"?"+":"✓"})}),r.jsx(c.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:{textTransform:t.typeCase==="uppercase"?"uppercase":"none",letterSpacing:t.typeCase==="uppercase"?"0.04em":"normal",fontStyle:t.typeStyle},children:g})]},g))}),r.jsx(c.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:t.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:o.featured?e.onPrimary:e.text},children:r.jsx(c.Text,{fontSize:14,color:o.featured?e.primary:e.canvas,style:{...Ee(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.02em"},children:o.ctaLabel})})]})})},ts=({palette:e,personality:o})=>{const t=Wr(o),n=St(o,e),a=o.voice.includes("athletic")||o.voice.includes("motion")?"Aero Runner GT":o.voice.includes("mission")||o.voice.includes("futurist")?"Module-04 Insulated Jacket":"Linen Throw Pillow",l=o.voice.includes("athletic")||o.voice.includes("motion")?"Court Black · Mens":o.voice.includes("mission")||o.voice.includes("futurist")?"Carbon · Standard fit":"Stonewashed · Sand";return r.jsx(c.View,{width:"min(100%, 320px)",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(c.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(c.View,{height:120,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${to(e.primary,20)} 0%, ${to(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(c.Vertical,{gap:4,children:[r.jsxs(c.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(c.Text,{fontSize:15,color:e.text,style:fo(o),children:a}),r.jsx(c.View,{paddingHorizontal:10,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:r.jsx(c.Text,{fontSize:10,color:e.text,style:Ee(o),children:"IN STOCK"})})]}),r.jsx(c.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:l})]}),r.jsxs(c.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(c.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(c.Text,{fontSize:24,color:e.text,style:fo(o),children:"$42"}),r.jsx(c.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$56"})]}),r.jsx(c.Text,{fontSize:12,color:e.success||e.muted,style:Ee(o),children:"FREE SHIPPING"})]}),r.jsx(c.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:er(o,e),boxShadow:or(o,e)},children:r.jsx(c.Text,{fontSize:14,color:e.onPrimary,style:{...Ee(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})})},ns=({palette:e,personality:o})=>{const t=Wr(o),n=St(o,e),a=o.signatureMotif,l=o.voice.includes("athletic")?"★":o.voice.includes("mission")||o.voice.includes("futurist")?"◉":"♥",i=o.voice.includes("athletic")?"Velocity AirFlow 7":o.voice.includes("mission")||o.voice.includes("futurist")?"Sentinel Pro Headset":o.voice.includes("refined")?"Pulse Studio Monitor":"Aurora Wireless Headphones",g=o.voice.includes("athletic")?"Lightweight knit · 280g":o.voice.includes("mission")||o.voice.includes("futurist")?"Mil-spec audio · 60h endurance":"Active noise cancelling · 40h battery",s=o.voice.includes("mission")?"MISSION PICK":o.voice.includes("athletic")?"TEAM PICK":o.voice.includes("futurist")?"SIGNATURE":"BEST SELLER";return r.jsxs(c.View,{position:"relative",width:"min(100%, 320px)",children:[r.jsx(c.View,{position:"absolute",top:-10,left:16,paddingHorizontal:12,paddingVertical:6,borderRadius:o.badgeRadius,zIndex:2,style:{background:er(o,e),boxShadow:or(o,e)||(e.appearance==="dark"?"0 6px 14px rgba(0,0,0,0.5)":"0 6px 14px rgba(0,0,0,0.12)")},children:r.jsxs(c.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(c.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:no(o,"heavy")},children:a}),r.jsx(c.Text,{fontSize:10,color:e.onPrimary,style:Ee(o),children:s})]})}),r.jsx(c.View,{position:"absolute",top:12,right:12,width:36,height:36,borderRadius:o.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",zIndex:2,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:r.jsx(c.Text,{fontSize:16,color:l==="♥"&&e.error||e.primary,style:{lineHeight:1},children:l})}),r.jsx(c.View,{width:"100%",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(c.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(c.View,{height:140,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${to(e.primary,20)} 0%, ${to(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(c.Vertical,{gap:6,children:[r.jsxs(c.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(c.Text,{fontSize:13,color:e.warning||e.primary,style:{lineHeight:1},children:"★★★★★"}),r.jsx(c.Text,{fontSize:12,color:e.muted,children:"4.9 · 1,284 reviews"})]}),r.jsx(c.Text,{fontSize:18,color:e.text,style:fo(o),children:i}),r.jsx(c.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:g})]}),r.jsxs(c.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(c.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(c.Text,{fontSize:26,color:e.text,style:fo(o),children:"$189"}),r.jsx(c.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$249"})]}),r.jsx(c.View,{paddingHorizontal:8,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:r.jsx(c.Text,{fontSize:10,color:e.text,style:Ee(o),children:"–24%"})})]}),r.jsxs(c.Horizontal,{gap:8,children:[r.jsx(c.View,{flex:1,paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:er(o,e),boxShadow:or(o,e)},children:r.jsx(c.Text,{fontSize:13,color:e.onPrimary,style:{...Ee(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Buy now"})}),r.jsx(c.View,{paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",borderColor:e.border},children:r.jsx(c.Text,{fontSize:13,color:e.text,style:{...Ee(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})]})})]})},hx=[{slug:"PRIMARY-TINT",source:"primary",intensity:"tint",heading:"Bring everyone together with systems that scale",body:"Signature primary ground for systems, FAQ, and the contact form.",cta:"Get started"},{slug:"SECONDARY-TINT",source:"secondary",intensity:"tint",heading:"A faster, more efficient way of working",body:"Secondary ground for hero moments and supporting narrative.",cta:"Explore"},{slug:"WARNING-TINT",source:"warning",intensity:"tint",heading:"Designed for the way ideas actually move",body:"Warm tint for product storytelling and brand moments.",cta:"See the story"},{slug:"SUCCESS-TINT",source:"success",intensity:"tint",heading:"Ship with confidence, every single release",body:"Cool tint for changelogs, releases, and reliability notes.",cta:"Read changelog"},{slug:"ERROR-TINT",source:"error",intensity:"tint",heading:"Built for teams who care about the details",body:"Saturated tint for community stories and testimonials.",cta:"Meet the makers"},{slug:"INK-INVERTED",source:"ink",intensity:"inverted",heading:"Go deeper. Go further. Go all-in.",body:"Inverted ground for premium tiers and developer surfaces.",cta:"Open the docs"}],Jn=(e,o)=>{const t=e.replace("#","").padEnd(6,"0").slice(0,6),n=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),l=parseInt(t.slice(4,6),16);return[n,a,l].some(Number.isNaN)?e:`rgba(${n}, ${a}, ${l}, ${o})`},Qn=e=>typeof e=="string"&&/^#([0-9a-f]{3}){1,2}$/i.test(e),Be=(e,o,t)=>Qn(e)?Jn(e,o):e.startsWith("rgba")||e.startsWith("rgb")?e.replace(/rgba?\(([^)]+)\)/,(n,a)=>`rgba(${a.split(",").slice(0,3).map(i=>i.trim()).join(", ")}, ${o})`):t==="dark"?`rgba(255,255,255,${o})`:`rgba(0,0,0,${o})`,fx=({block:e,palette:o,personality:t})=>{const n=Wr(t);let a,l;if(e.source==="ink")a=o.text,l=o.canvas;else{const f=o[e.source]||o.primary;e.intensity==="solid"?(a=f,l=o.onPrimary):(a=Be(f,.32,o.appearance),l=(o.appearance==="dark",o.text))}if(t.accentTreatment==="gradient"&&e.intensity==="tint"){const f=o[e.source],u=o.secondary;Qn(f)&&Qn(u)&&(a=`linear-gradient(135deg, ${Jn(f,.32)} 0%, ${Jn(u,.32)} 100%)`)}if(t.accentTreatment==="stripe"&&e.intensity==="tint"){const f=Be(o[e.source],.32,o.appearance),u=Be(o.secondary,.18,o.appearance);a=`repeating-linear-gradient(135deg, ${f} 0 18px, ${u} 18px 36px)`}const i=Be(l,.72,o.appearance),g=Be(l,.55,o.appearance),s=l,d=l===o.canvas?o.text:o.canvas;return r.jsx(c.View,{width:"min(100%, 460px)",borderRadius:t.cardRadius*2,padding:n.large,style:{background:a},children:r.jsxs(c.Vertical,{gap:n.gap+6,children:[r.jsxs(c.Text,{fontSize:11,color:g,style:{...Ee(t),letterSpacing:"0.12em",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:[t.signatureMotif," ",e.slug]}),r.jsxs(c.Vertical,{gap:14,children:[r.jsx(c.Text,{fontSize:32,lineHeight:"36px",color:l,style:fo(t),children:e.heading}),r.jsx(c.Text,{fontSize:16,lineHeight:"22px",color:i,style:{fontStyle:t.typeStyle},children:e.body})]}),r.jsx(c.View,{alignSelf:"flex-start",paddingHorizontal:28,paddingVertical:14,borderRadius:t.pillRadius,style:{backgroundColor:s,cursor:"pointer"},children:r.jsx(c.Text,{fontSize:15,color:d,style:{...Ee(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.01em",textTransform:t.typeCase==="uppercase"?"uppercase":"none"},children:e.cta})})]})})},as=[{id:"design-tokens",badge:"NEW",badgeTone:"success",favorite:"♥",category:"Design systems",title:"Design tokens that survive a redesign",excerpt:"Why semantic naming beats raw values — and how to migrate a token set without breaking every consumer.",author:"Léa Martin",meta:"6 min read · Mar 10",imageTone:"warm"},{id:"shipping-faster",badge:"FEATURED",badgeTone:"primary",favorite:"★",category:"Engineering",title:"Shipping faster without skipping review",excerpt:"Three async patterns we use to keep PR cycle time under 24h while still catching the regressions that matter.",author:"Jordan Reyes",meta:"9 min read · Mar 04",imageTone:"cool"},{id:"a11y-audit",badge:"TRENDING",badgeTone:"warning",favorite:"⛉",category:"Accessibility",title:"The accessibility audit nobody asked for",excerpt:"A walkthrough of the 12 issues we found on our own marketing site — and the four-week fix plan that followed.",author:"Ines Okafor",meta:"12 min read · Feb 27",imageTone:"mono"}],ls=({palette:e,article:o,personality:t})=>{const n=Wr(t),a=St(t,e),l=e[o.badgeTone]||e.primary,i=e.secondary||e.primary,g=t.accentTreatment==="gradient"?`linear-gradient(135deg, ${Be(l,.55,e.appearance)} 0%, ${Be(i,.55,e.appearance)} 100%)`:t.accentTreatment==="stripe"?`repeating-linear-gradient(45deg, ${Be(l,.45,e.appearance)} 0 16px, ${Be(i,.25,e.appearance)} 16px 32px)`:t.accentTreatment==="halftone"?`radial-gradient(circle at 30% 30%, ${Be(l,.55,e.appearance)} 0%, ${Be(i,.35,e.appearance)} 70%)`:t.accentTreatment==="glow"?`radial-gradient(circle at 50% 60%, ${Be(l,.45,e.appearance)} 0%, ${e.appearance==="dark"?"#050505":"#0a0a0a"} 100%)`:Be(l,.32,e.appearance),s=t.voice.includes("mission")||t.voice.includes("futurist")?"◉":o.favorite,d=s==="♥"?e.error||e.primary:s==="★"&&e.warning||e.primary;return r.jsx(c.View,{width:"min(100%, 320px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...a,borderColor:e.border,color:e.text},children:r.jsxs(c.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(c.View,{position:"relative",height:160,borderRadius:t.cardRadius,overflow:"hidden",style:{background:g},children:[r.jsx(c.View,{position:"absolute",top:12,left:12,paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,style:{background:er(t,{...e,primary:l}),boxShadow:or(t,e)},children:r.jsxs(c.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(c.Text,{fontSize:10,color:e.onPrimary,style:{lineHeight:1,fontWeight:no(t,"heavy")},children:t.signatureMotif}),r.jsx(c.Text,{fontSize:10,color:e.onPrimary,style:Ee(t),children:o.badge})]})}),r.jsx(c.View,{position:"absolute",top:10,right:10,width:36,height:36,borderRadius:t.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:r.jsx(c.Text,{fontSize:16,color:d,style:{lineHeight:1},children:s})})]}),r.jsxs(c.Vertical,{gap:8,children:[r.jsx(c.Text,{fontSize:11,color:e.muted,style:Ee(t),children:o.category}),r.jsx(c.Text,{fontSize:18,lineHeight:"24px",color:e.text,style:fo(t),children:o.title}),r.jsx(c.Text,{fontSize:13,lineHeight:"18px",color:e.muted,style:{fontStyle:t.typeStyle},children:o.excerpt})]}),r.jsxs(c.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(c.View,{width:28,height:28,borderRadius:t.cornerStyle==="sharp"?4:9999,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.08)"}}),r.jsxs(c.Vertical,{gap:0,children:[r.jsx(c.Text,{fontSize:12,color:e.text,style:{fontWeight:no(t,"normal"),fontStyle:t.typeStyle},children:o.author}),r.jsx(c.Text,{fontSize:11,color:e.muted,children:o.meta})]})]})]})})},is=({palette:e,personality:o,config:t})=>{var u,m,p,y;const n=o.signatureMotif,a=e.primary,l=er(o,e),i=or(o,e),g=((m=(u=t.tokens)==null?void 0:u.typography)==null?void 0:m.fontFamily)||((y=(p=t.tokens)==null?void 0:p.rawCssVars)==null?void 0:y.display)||"inherit",s=o.voice.includes("mission")?"MAKING LIFE MULTIPLANETARY":o.voice.includes("athletic")?"JUST DO IT":o.voice.includes("refined")?"A new standard in payments":o.voice.includes("speed")?"Built for the makers":o.voice.includes("rhythmic")?"Music for everyone":o.voice.includes("thoughtful")?"The connected workspace":o.voice.includes("warm")?"Belong anywhere":o.voice.includes("minimal")?"Think different":o.voice.includes("commerce")?"The platform commerce is built on":o.voice.includes("bold-fintech")?"Money for the next generation":o.voice.includes("trustworthy")?"The future of money":o.voice.includes("playful")?"Nothing great is made alone":o.voice.includes("motion")?"Get there":o.voice.includes("deploy")?"Develop. Preview. Ship.":o.voice.includes("futurist")?"Accelerating the world to sustainable energy":`${t.metadata.label}`,d=o.typeCase==="uppercase"?"EXPLORE":"Get started",f=o.typeCase==="uppercase"?"LEARN MORE":"Learn more";return r.jsxs(c.View,{width:"100%",borderRadius:o.cardRadius*2,padding:o.density==="spacious"?56:o.density==="tight"?28:40,style:{backgroundColor:e.canvas,color:e.text,fontFamily:g,position:"relative",overflow:"hidden"},children:[o.accentTreatment==="glow"&&r.jsx(c.View,{position:"absolute",top:-120,right:-80,width:360,height:360,borderRadius:9999,style:{background:`radial-gradient(circle, ${a}40 0%, transparent 70%)`,pointerEvents:"none"}}),o.accentTreatment==="halftone"&&r.jsx(c.View,{position:"absolute",top:0,right:0,width:300,height:300,style:{background:`radial-gradient(circle at 70% 30%, ${a}30 0%, transparent 60%)`,pointerEvents:"none"}}),r.jsxs(c.Vertical,{gap:24,style:{position:"relative"},children:[r.jsxs(c.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(c.View,{width:32,height:32,borderRadius:o.cornerStyle==="pill"?9999:o.cornerStyle==="sharp"?0:8,alignItems:"center",justifyContent:"center",style:{display:"flex",background:l,boxShadow:i},children:r.jsx(c.Text,{fontSize:16,color:e.onPrimary,style:{lineHeight:1,fontWeight:no(o,"heavy")},children:n})}),r.jsx(c.Text,{fontSize:13,color:e.muted,style:{...Ee(o),letterSpacing:o.typeCase==="uppercase"?"0.18em":"0.06em"},children:t.metadata.label})]}),r.jsx(c.Text,{fontSize:o.density==="spacious"?56:o.density==="tight"?40:48,lineHeight:o.density==="spacious"?"60px":o.density==="tight"?"44px":"52px",color:e.text,style:{...fo(o),letterSpacing:o.typeCase==="uppercase"?"0.06em":o.letterSpacing,maxWidth:580,fontFamily:g},children:s}),r.jsxs(c.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(c.View,{paddingHorizontal:o.density==="spacious"?32:24,paddingVertical:o.density==="spacious"?16:14,borderRadius:o.pillRadius,style:{display:"flex",cursor:"pointer",background:l,boxShadow:i},children:r.jsx(c.Text,{fontSize:15,color:e.onPrimary,style:{...Ee(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:no(o,"heavy"),fontFamily:g},children:d})}),r.jsx(c.View,{paddingHorizontal:24,paddingVertical:14,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",style:{display:"flex",cursor:"pointer",borderColor:e.text},children:r.jsx(c.Text,{fontSize:15,color:e.text,style:{...Ee(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:no(o,"heavy"),fontFamily:g},children:f})})]}),r.jsx(c.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"center",marginTop:8,children:[{label:"Primary",value:e.primary},{label:"Surface",value:e.surface},{label:"Text",value:e.text},{label:"Success",value:e.success}].map(x=>r.jsxs(c.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(c.View,{width:20,height:20,borderRadius:o.cornerStyle==="sharp"?0:o.cornerStyle==="pill"?9999:4,borderWidth:1,borderStyle:"solid",style:{backgroundColor:x.value,borderColor:e.border}}),r.jsxs(c.Vertical,{gap:0,children:[r.jsx(c.Text,{fontSize:11,color:e.muted,style:Ee(o),children:x.label}),r.jsx(c.Text,{fontSize:11,color:e.text,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:ox(x.value)})]})]},x.label))})]})]})},cs=({palette:e,config:o})=>r.jsxs(c.Vertical,{gap:20,padding:36,alignItems:"center",borderRadius:16,style:{backgroundColor:e.surface},children:[r.jsx(Ve,{variant:"outline",content:"New release"}),r.jsxs(c.Vertical,{gap:8,alignItems:"center",children:[r.jsxs(c.Text,{fontSize:36,lineHeight:"40px",fontWeight:"800",textAlign:"center",color:e.text,children:[o.metadata.label," Pro"]}),r.jsx(c.Text,{fontSize:18,lineHeight:"24px",color:e.muted,textAlign:"center",children:"Pro. Beyond."})]}),r.jsxs(c.Horizontal,{gap:12,flexWrap:"wrap",justifyContent:"center",children:[r.jsx(ye,{shape:"pill",size:"md",children:"Learn more"}),r.jsx(ye,{shape:"pill",size:"md",variant:"outline",children:"Buy"})]}),r.jsx(c.View,{width:220,height:140,borderRadius:20,backgroundColor:e.appearance==="dark"?e.canvas:e.text,opacity:.85})]}),ss=({palette:e,config:o})=>r.jsxs(We,{width:"min(100%, 320px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[r.jsx(We.Header,{children:r.jsxs(c.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(c.Text,{color:e.text,fontWeight:"700",children:o.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Ve,{variant:"filled",content:"New"})]})}),r.jsx(We.Content,{children:r.jsx(c.Text,{fontSize:14,lineHeight:"20px",color:e.text,children:o.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),r.jsx(We.Footer,{children:r.jsx(ye,{size:"sm",children:o.metadata.id==="spacex"?"Explore":"Review"})})]}),ds=({palette:e})=>r.jsxs(c.Vertical,{gap:14,children:[r.jsxs(c.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(ye,{color:"theme-primary",children:"Primary"}),r.jsx(ye,{color:"theme-secondary",children:"Secondary"}),r.jsx(ye,{color:"color-black",children:"Black"}),r.jsx(ye,{color:"color-white",textColor:"color-black",children:"White"})]}),r.jsxs(c.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(ye,{variant:"outline",color:"theme-primary",children:"Primary"}),r.jsx(ye,{variant:"outline",color:"theme-secondary",children:"Secondary"}),r.jsx(ye,{variant:"outline",color:"color-black",children:"Black"}),r.jsx(ye,{variant:"outline",color:"color-white",children:"White"})]}),r.jsxs(c.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(ye,{variant:"ghost",views:{container:{color:e.text}},children:"Ghost"}),r.jsx(ye,{variant:"link",views:{container:{color:e.primary}},children:"Link"}),r.jsx(ye,{isDisabled:!0,children:"Disabled"}),r.jsx(ye,{isLoading:!0,children:"Loading"})]})]}),gs=({palette:e,config:o})=>r.jsx(c.View,{style:{color:e.text},children:r.jsxs(c.Vertical,{gap:14,children:[r.jsxs(c.Horizontal,{gap:10,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Ve,{content:"Badge"}),r.jsx(Ve,{variant:"outline",content:"Outline"}),r.jsx(Ve,{content:"Primary",views:{container:{backgroundColor:e.primary,color:e.onPrimary,borderColor:e.primary}}}),r.jsx(Ve,{content:"Success",views:{container:{backgroundColor:e.success,color:e.onPrimary,borderColor:e.success}}}),r.jsx(Ve,{content:"Warning",views:{container:{backgroundColor:e.warning,color:e.onPrimary,borderColor:e.warning}}}),r.jsx(Ve,{content:"Error",views:{container:{backgroundColor:e.error,color:e.onPrimary,borderColor:e.error}}})]}),r.jsxs(c.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(ht,{status:"success",label:"Operational"}),r.jsx(ht,{status:"warning",label:"Degraded"}),r.jsx(ht,{status:"error",label:"Outage"}),r.jsx(io,{size:"sm",loaderColor:o.theme.primary})]}),r.jsx(Bt,{title:"Heads up",description:"Brand styling cascades through every alert.",variant:"info",views:{container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},title:{color:e.text},description:{color:e.muted}}}),r.jsx(pc,{value:64,height:10,showLabel:!0,color:e.primary,backgroundColor:e.border,views:{container:{backgroundColor:e.border},bar:{backgroundColor:e.primary}}})]})}),us=({palette:e,config:o,mode:t})=>{const n={container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},field:{color:e.text}};return r.jsx(c.View,{style:{color:e.text},children:r.jsxs(c.Vertical,{gap:16,children:[r.jsxs(c.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx($e,{size:"md",label:"Name",placeholder:"Ada Lovelace",views:n}),r.jsx(ur,{id:`forms-${o.metadata.id}-${t}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{container:n.container,field:{fontSize:14,lineHeight:"20px",color:e.text},text:{fontSize:14,lineHeight:"20px",color:e.text}}}),r.jsx(hr,{label:"Notes",placeholder:"Add implementation notes",views:n})]}),r.jsxs(c.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(on,{label:"Email updates",defaultIsSelected:!0}),r.jsx(nn,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(Rt,{label:"Enabled",isChecked:!0})]})]})})},mx=({config:e})=>{const[o,t]=h.useState(1),n=Rb(e),a=ex(e),l=tx(e);return r.jsxs(c.Vertical,{gap:24,children:[r.jsx(Ie,{title:"Brand Snapshot (Light & Dark)",config:e,children:r.jsxs(c.Vertical,{gap:20,children:[r.jsx(ve,{config:e,palette:n,label:"On light surface",children:r.jsx(is,{palette:n,personality:l,config:e})}),r.jsx(ve,{config:e,palette:a,label:"On dark surface",children:r.jsx(is,{palette:a,personality:l,config:e})})]})}),r.jsx(Ie,{title:"Buttons — Light & Dark",config:e,children:r.jsxs(c.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ve,{config:e,palette:n,label:"On light surface",children:r.jsx(ds,{palette:n})}),r.jsx(ve,{config:e,palette:a,label:"On dark surface",children:r.jsx(ds,{palette:a})})]})}),r.jsx(Ie,{title:"Status & Feedback — Light & Dark",config:e,children:r.jsxs(c.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ve,{config:e,palette:n,label:"On light surface",children:r.jsx(gs,{palette:n,config:e})}),r.jsx(ve,{config:e,palette:a,label:"On dark surface",children:r.jsx(gs,{palette:a,config:e})})]})}),r.jsx(Ie,{title:"Forms — Light & Dark",config:e,children:r.jsxs(c.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ve,{config:e,palette:n,label:"On light surface",children:r.jsx(us,{palette:n,config:e,mode:"light"})}),r.jsx(ve,{config:e,palette:a,label:"On dark surface",children:r.jsx(us,{palette:a,config:e,mode:"dark"})})]})}),r.jsx(Ie,{title:"Forms (legacy preview)",config:e,children:r.jsxs(c.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",alignItems:"start",gap:16,children:[r.jsx($e,{size:"md",label:"Name",placeholder:"Ada Lovelace"}),r.jsx(ur,{id:`design-system-select-${e.metadata.id}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),r.jsx(hr,{label:"Notes",placeholder:"Add implementation notes"}),r.jsxs(c.Vertical,{gap:12,children:[r.jsx(on,{label:"Email updates",defaultIsSelected:!0}),r.jsx(nn,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(Rt,{label:"Enabled",isChecked:!0}),r.jsx(ui,{defaultValue:58,showValue:!0}),r.jsx(Hl,{length:6,label:"Verification Code"})]})]})}),r.jsx(Ie,{title:"Form States",config:e,children:r.jsxs(c.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx($e,{size:"md",label:"Default",placeholder:"Type here",helperText:"Resting state"}),r.jsx($e,{size:"md",label:"Filled",defaultValue:"Ada Lovelace",helperText:"Has value"}),r.jsx($e,{size:"md",label:"With helper",placeholder:"user@example.com",helperText:"We'll never share your email"}),r.jsx($e,{size:"md",label:"Error",defaultValue:"invalid@",error:"Please enter a valid email"}),r.jsx($e,{size:"md",label:"Disabled",isDisabled:!0,defaultValue:"Cannot edit",helperText:"Field locked"}),r.jsx($e,{size:"md",label:"Read only",defaultValue:"Read-only value",isReadOnly:!0,helperText:"View only"}),r.jsx(ur,{id:`design-system-select-error-${e.metadata.id}`,size:"md",label:"Select error",placeholder:"Pick one",error:!0,helperText:"Selection required",options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),r.jsx(ur,{id:`design-system-select-disabled-${e.metadata.id}`,size:"md",label:"Select disabled",placeholder:"Disabled",isDisabled:!0,options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}})]})}),r.jsx(Ie,{title:"Elevation & Depth",config:e,children:r.jsx(c.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:20,children:lx(e).map(i=>r.jsxs(c.Vertical,{gap:12,children:[r.jsx(c.View,{height:120,borderRadius:12,backgroundColor:e.theme.canvas,style:{boxShadow:i.shadow}}),r.jsxs(c.Vertical,{gap:4,children:[r.jsxs(c.Horizontal,{gap:8,alignItems:"baseline",flexWrap:"wrap",children:[r.jsx(c.Text,{fontSize:12,fontWeight:"700",children:i.name}),r.jsx(c.Text,{fontSize:11,fontWeight:"600",color:e.theme.primary,children:i.label})]}),r.jsx(c.Text,{fontSize:11,color:e.theme.muted,children:i.description}),r.jsx(c.Text,{fontSize:10,color:e.theme.muted,style:{wordBreak:"break-word",opacity:.8},children:i.shadow})]})]},i.name))})}),r.jsx(Ie,{title:"Color Blocks",config:e,children:r.jsx(c.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:12,children:[["primary","Primary",e.theme.onPrimary],["secondary","Secondary",e.theme.onPrimary],["success","Success","#ffffff"],["warning","Warning","#ffffff"],["error","Error","#ffffff"],["canvas","Canvas",e.theme.text],["surface","Surface",e.theme.text],["text","Text",e.theme.canvas],["muted","Muted",e.theme.canvas],["border","Border",e.theme.text],["onPrimary","On primary",e.theme.text]].map(([i,g,s])=>{const d=e.theme[i];return r.jsxs(c.Vertical,{gap:0,borderRadius:12,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,children:[r.jsx(c.View,{height:88,backgroundColor:d}),r.jsxs(c.Vertical,{gap:4,padding:12,backgroundColor:e.theme.surface,children:[r.jsx(c.Text,{fontSize:13,fontWeight:"700",children:g}),r.jsxs(c.Text,{fontSize:11,color:e.theme.muted,children:["theme.",i]}),r.jsx(c.Text,{fontSize:11,color:e.theme.muted,children:d})]})]},i)})})}),r.jsx(Ie,{title:"Pricing — Booking (Light & Dark)",config:e,children:r.jsxs(c.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ve,{config:e,palette:n,label:"On light surface",children:r.jsx(es,{palette:n})}),r.jsx(ve,{config:e,palette:a,label:"On dark surface",children:r.jsx(es,{palette:a})})]})}),r.jsx(Ie,{title:"Pricing — SaaS Tiers (Light & Dark)",config:e,children:r.jsxs(c.Vertical,{gap:20,children:[r.jsx(ve,{config:e,palette:n,label:"On light surface",children:r.jsx(c.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:os.map(i=>r.jsx(rs,{palette:n,tier:i,personality:l},i.name))})}),r.jsx(ve,{config:e,palette:a,label:"On dark surface",children:r.jsx(c.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:os.map(i=>r.jsx(rs,{palette:a,tier:i,personality:l},i.name))})})]})}),r.jsx(Ie,{title:"Pricing — Product (Light & Dark)",config:e,children:r.jsxs(c.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ve,{config:e,palette:n,label:"On light surface",children:r.jsx(ts,{palette:n,personality:l})}),r.jsx(ve,{config:e,palette:a,label:"On dark surface",children:r.jsx(ts,{palette:a,personality:l})})]})}),r.jsx(Ie,{title:"Pricing — Featured w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(c.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ve,{config:e,palette:n,label:"On light surface",children:r.jsx(ns,{palette:n,personality:l})}),r.jsx(ve,{config:e,palette:a,label:"On dark surface",children:r.jsx(ns,{palette:a,personality:l})})]})}),r.jsx(Ie,{title:"Content — Color Block Cards",config:e,children:r.jsx(c.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:hx.map(i=>r.jsx(fx,{block:i,palette:n,personality:l},i.slug))})}),r.jsx(Ie,{title:"Content — Article Cards w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(c.Vertical,{gap:20,children:[r.jsx(ve,{config:e,palette:n,label:"On light surface",children:r.jsx(c.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:as.map(i=>r.jsx(ls,{palette:n,article:i,personality:l},i.id))})}),r.jsx(ve,{config:e,palette:a,label:"On dark surface",children:r.jsx(c.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:as.map(i=>r.jsx(ls,{palette:a,article:i,personality:l},i.id))})})]})}),r.jsx(Ie,{title:"CTA Card — Light & Dark",config:e,children:r.jsxs(c.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ve,{config:e,palette:n,label:"On light surface",children:r.jsx(cs,{palette:n,config:e})}),r.jsx(ve,{config:e,palette:a,label:"On dark surface",children:r.jsx(cs,{palette:a,config:e})})]})}),r.jsx(Ie,{title:"Product Card — Light & Dark",config:e,children:r.jsxs(c.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ve,{config:e,palette:n,label:"On light surface",children:r.jsx(ss,{palette:n,config:e})}),r.jsx(ve,{config:e,palette:a,label:"On dark surface",children:r.jsx(ss,{palette:a,config:e})})]})}),r.jsx(Ie,{title:"Content & Layout",config:e,children:r.jsxs(c.Vertical,{gap:24,children:[r.jsxs(c.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:[r.jsxs(We,{width:"min(100%, 320px)",children:[r.jsx(We.Header,{children:r.jsxs(c.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(c.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Ve,{variant:"filled",content:"New"})]})}),r.jsx(We.Content,{children:r.jsx(c.Text,{fontSize:14,lineHeight:"20px",children:e.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),r.jsx(We.Footer,{children:r.jsx(ye,{size:"sm",children:e.metadata.id==="spacex"?"Explore":"Review"})})]}),r.jsxs(We,{width:"min(100%, 320px)",children:[r.jsx(We.Header,{children:r.jsxs(c.Horizontal,{gap:12,alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",children:[r.jsxs(c.Horizontal,{gap:12,alignItems:"center",children:[r.jsx(va,{fallback:e.metadata.label.slice(0,2)}),r.jsxs(c.Vertical,{gap:2,children:[r.jsx(c.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Starship":e.metadata.label}),r.jsx(c.Text,{fontSize:12,color:e.theme.muted,children:e.metadata.id==="spacex"?"Multiplanetary mission":"Config-driven preview"})]})]}),r.jsx(Ve,{variant:"outline",content:"Active"})]})}),r.jsx(We.Content,{children:e.metadata.id==="spacex"?r.jsx(c.Text,{fontSize:14,lineHeight:"20px",children:"The most powerful launch vehicle ever developed. Designed to carry crew and cargo to Mars and beyond."}):r.jsx(Bt,{variant:"info",title:"Config active",description:"This alert is rendered by the shared component."})})]})]}),r.jsx(gx,{config:e}),r.jsx(xa,{ratio:16/9,borderRadius:12,overflow:"hidden",children:r.jsx(c.View,{width:"100%",height:"100%",backgroundColor:e.theme.primary,children:r.jsxs(c.Vertical,{height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[r.jsx(c.Text,{fontWeight:"700",color:e.theme.onPrimary,children:"16:9 Aspect Ratio"}),r.jsx(Ve,{content:"Config primary color"})]})})}),r.jsxs(qe,{children:[r.jsx(qe.Content,{children:[1,2,3].map(i=>r.jsx(qe.Item,{children:r.jsx(c.View,{height:200,borderRadius:12,alignItems:"center",justifyContent:"center",backgroundColor:e.theme.surface,borderColor:e.theme.border,borderWidth:1,borderStyle:"solid",children:r.jsxs(c.Text,{fontSize:24,fontWeight:"700",children:["Slide ",i]})})},i))}),r.jsxs(c.Horizontal,{gap:12,marginTop:12,justifyContent:"center",children:[r.jsx(qe.Previous,{}),r.jsx(qe.Next,{})]})]})]})}),r.jsx(Ie,{title:"Navigation & Interactive",config:e,children:r.jsxs(c.Vertical,{gap:18,children:[r.jsxs(c.Vertical,{gap:20,children:[r.jsxs(c.Vertical,{gap:8,children:[r.jsx(c.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"With icons"}),r.jsx(Go,{tabs:ix,defaultValue:"homes",views:{tab:{borderRadius:Er(e,"tabs")},activeTab:{borderRadius:Er(e,"tabs")}}})]}),r.jsxs(c.Vertical,{gap:8,children:[r.jsx(c.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"Without icons"}),r.jsx(Go,{defaultValue:"overview",views:{tab:{borderRadius:Er(e,"tabs")},activeTab:{borderRadius:Er(e,"tabs")}},tabs:[{title:"Overview",value:"overview",content:r.jsx(c.Text,{fontSize:14,lineHeight:"20px",children:"Tokens and components share the active config."})},{title:"Usage",value:"usage",content:r.jsx(c.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Audit",value:"audit",content:r.jsx(c.Text,{fontSize:14,lineHeight:"20px",children:"Plain text tabs without icons."})}]})]})]}),r.jsx(vo,{items:sx,orientation:"horizontal",defaultActiveItemId:"components"}),(()=>{const i=Er(e,"accordion"),g={borderWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,marginBottom:0,borderRadius:0},s={...g,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:e.theme.border};return r.jsxs(Ne,{defaultValue:"tokens",collapsible:!0,shape:"rounded",views:{container:{borderRadius:i,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border}},children:[r.jsxs(Ne.Item,{value:"tokens",...g,views:{item:g,trigger:{borderRadius:0}},children:[r.jsx(Ne.Trigger,{children:"Token extraction"}),r.jsx(Ne.Content,{children:r.jsxs(c.Text,{color:e.theme.muted,children:[Object.keys(e.tokens.rawCssVars).length," raw CSS variables were extracted from ",e.metadata.sourcePath,"."]})})]}),r.jsxs(Ne.Item,{value:"overrides",...s,views:{item:s,trigger:{borderRadius:0}},children:[r.jsx(Ne.Trigger,{children:"Override behavior"}),r.jsx(Ne.Content,{children:r.jsx(c.Text,{color:e.theme.muted,children:"Props passed directly to components override the design-system defaults."})})]})]})})(),r.jsx(ut,{label:"advanced tools"}),r.jsxs(c.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(gn,{color:e.theme.primary,children:"Toggle Button"}),r.jsx(Vi,{color:e.theme.primary,items:[{id:"left",value:"Left"},{id:"center",value:"Center"},{id:"right",value:"Right"}]}),r.jsx(yt,{content:"Tooltip message",children:r.jsx(ye,{variant:"outline",children:"Hover for Tooltip"})}),r.jsxs(De,{children:[r.jsx(De.Trigger,{children:r.jsx(ye,{variant:"ghost",children:"Hover Card"})}),r.jsx(De.Content,{children:r.jsxs(c.Vertical,{gap:4,padding:12,children:[r.jsx(c.Text,{fontWeight:"700",children:"Detailed Info"}),r.jsx(c.Text,{fontSize:12,opacity:.8,children:"Hover cards provide more context."})]})})]}),r.jsx(Oi,{value:e.theme.primary}),r.jsx(xc,{shareData:{url:"https://example.com",title:"Example"}}),r.jsx(Br,{to:"#",children:"Inline Link component"})]}),r.jsx(c.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:r.jsx(mc,{currentPage:o,totalPages:10,onPageChange:t})})]})})]})},px=({config:e})=>{var o;return r.jsxs(jt,{config:e,children:[r.jsx(Xb,{children:(o=e.metadata.googleFontLinks)==null?void 0:o.map(t=>r.jsx("link",{rel:"stylesheet",href:t},t))}),r.jsx(c.View,{minHeight:"100vh",padding:28,fontFamily:e.tokens.typography.fontFamily,backgroundColor:e.theme.canvas,color:e.theme.text,style:{textTransform:e.metadata.id==="spacex"?"uppercase":"none"},children:r.jsxs(c.Vertical,{gap:28,children:[r.jsxs(c.Vertical,{gap:12,maxWidth:900,children:[r.jsxs(c.Text,{as:"h1",fontSize:44,lineHeight:"48px",fontWeight:"800",fontFamily:e.tokens.typography.fontFamily,children:[e.metadata.label," Design System"]}),r.jsxs(c.Text,{fontSize:16,lineHeight:"24px",color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,children:["Live App Studio components rendered with the"," ",e.metadata.label," config defaults."]})]}),r.jsxs(c.Vertical,{gap:28,children:[r.jsx(ux,{config:e}),r.jsx(mx,{config:e})]})]})})]})};A.Accordion=Ne,A.ActionSheet=Kd,A.Alert=Bt,A.ArrowIcon=Ld,A.AspectRatio=xa,A.AttachmentGroup=Di,A.AttachmentIcon=lr,A.AttachmentPreview=_f,A.AudioIcon=Vo,A.AudioInput=s0,A.AudioWaveform=_t,A.Avatar=va,A.BackIcon=sd,A.Background=$c,A.Badge=Ve,A.BatteryIcon=Ys,A.BlockEditor=Pp,A.BluetoothIcon=Vd,A.BoldArrowIcon=$d,A.BookmarkIcon=Ks,A.Button=ye,A.CHART_COLORS=Ue,A.CalendarIcon=Td,A.CameraIcon=Hd,A.Card=We,A.Carousel=qe,A.Chart=gg,A.ChartIcon=ld,A.ChatInput=Ac,A.ChatWidget=Lc,A.ChatWidgetComponent=Dn,A.ChatWidgetWidget=bb,A.CheckIcon=cd,A.Checkbox=on,A.ChevronIcon=we,A.ClockIcon=Id,A.CloseEyeIcon=Pt,A.CloseIcon=Le,A.CloudIcon=Xs,A.ColorInput=hu,A.ColorPicker=Oi,A.ComboBox=Ph,A.Command=Io,A.ContextMenu=Lo,A.CookieConsent=mg,A.CopyIcon=Js,A.CountryPicker=xu,A.CreditCardIcon=Cd,A.CropIcon=Od,A.DEFAULT_CHART_COLORS=$a,A.DatePicker=zh,A.DefaultEmojiData=ii,A.DeleteIcon=Qs,A.DesignSystem=px,A.DesignSystemProvider=jt,A.Divider=ny,A.DocumentIcon=ad,A.DownloadIcon=ed,A.DragAndDrop=$m,A.DragAndDropComponent=Pi,A.DragHandleIcon=ca,A.DragHandleLinesIcon=qd,A.Drawer=So,A.DropZone=Om,A.DropdownMenu=Yo,A.DustBinIcon=Hr,A.EditIcon=Zs,A.EmojiPicker=Ni,A.ErrorIcon=Dr,A.ExternalLinkIcon=ha,A.FacebookIcon=Bs,A.FileIcon=po,A.FileImage=wg,A.FileSVG=Cg,A.FilterIcon=vd,A.FolderIcon=Es,A.FormikChatInput=af,A.FormikCheckbox=Gh,A.FormikColorInput=lf,A.FormikComboBox=pf,A.FormikCountryPicker=sf,A.FormikDatePicker=cf,A.FormikEmojiPicker=Bf,A.FormikForm=qh,A.FormikIconPicker=Af,A.FormikOTPInput=Sf,A.FormikPassword=mf,A.FormikRadio=Yh,A.FormikSelect=df,A.FormikSelector=Tf,A.FormikSlider=Cf,A.FormikSwitch=gf,A.FormikTagInput=uf,A.FormikTextArea=hf,A.FormikTextField=ff,A.FormikToggle=zf,A.FormikToggleGroup=Mf,A.FormikUploader=Ql,A.GiftIcon=fd,A.Gradient=lc,A.HeartIcon=qs,A.HelpIcon=Ws,A.HomeIcon=Rs,A.HoverCard=De,A.Icon=ar,A.IconPicker=Lp,A.ImageIcon=Hs,A.InfoIcon=lo,A.InstagramIcon=$s,A.KeyboardAvoidingView=pi,A.LayoutIcon=xd,A.LikeIcon=Ad,A.Link=Br,A.LinkIcon=bd,A.LinkedinIcon=_s,A.Loader=io,A.LoadingSpinnerIcon=Vt,A.LockIcon=rd,A.LogoutIcon=pd,A.MagicWandIcon=Wd,A.MapPinIcon=Fd,A.Markdown=$p,A.MediaPreview=Of,A.MenuIcon=zd,A.Menubar=Fo,A.MessageLayout=r0,A.MessageView=wa,A.MicrophoneIcon=At,A.MinusIcon=sa,A.Modal=wo,A.ModalLayout=fn,A.ModalRouter=fn,A.MoonIcon=id,A.MoreIcon=wd,A.MousePointerIcon=ma,A.NavigationMenu=vo,A.NotificationIcon=nd,A.OTPInput=Hl,A.OpenEyeIcon=Dt,A.PageLayout=am,A.Pagination=mc,A.PanelIcon=fa,A.Password=Mh,A.PauseIcon=Ns,A.PlayIcon=da,A.PlusIcon=od,A.PowerOffIcon=yd,A.PrintIcon=jd,A.ProfileIcon=td,A.ProgressBar=pc,A.QuickReactionEmojis=li,A.Radio=nn,A.RadioGroup=ru,A.RefreshIcon=Md,A.Resizable=An,A.RotateIcon=hd,A.Router=hm,A.SaveIcon=Gs,A.SearchIcon=Pr,A.Select=ur,A.Selector=Ug,A.SendIcon=Ht,A.Separator=ut,A.SettingsIcon=ga,A.ShapeIcon=ud,A.ShareButton=xc,A.ShareIcon=ua,A.ShieldIcon=md,A.Sidebar=Fr,A.Slider=ui,A.SliderIcon=_d,A.SpinnerIcon=Bd,A.SplashScreen=cm,A.StarIcon=Us,A.StatusIndicator=ht,A.StopIcon=Vr,A.SuccessIcon=$t,A.Switch=Rt,A.Table=Fe,A.Tabs=Go,A.TagInput=$h,A.TextArea=hr,A.TextField=$e,A.TextIcon=gd,A.ThreadsIcon=Os,A.TickIcon=ir,A.Title=Hi,A.Toast=Vy,A.Toggle=gn,A.ToggleGroup=Vi,A.Tooltip=yt,A.TrashIcon=Sd,A.TwitchIcon=Ds,A.TwitterIcon=Vs,A.UnLikeIcon=Ed,A.UnlockIcon=Pd,A.UploadIcon=Lt,A.Uploader=Lr,A.UserIcon=js,A.VideoIcon=As,A.WarningIcon=Et,A.WifiIcon=Dd,A.XIcon=Ps,A.YoutubeIcon=Ls,A.ZapIcon=kd,A.ZoomInIcon=Nd,A.ZoomOutIcon=dd,A.deepMerge=Ke,A.defaultBlockEditorLabels=Yi,A.defaultDesignSystemConfig=ea,A.defaultEmojiPickerLabels=ai,A.designSystemConfigList=xs,A.designSystemConfigs=Ft,A.getDesignSystemComponentProps=Mt,A.goBack=dm,A.hideDrawer=mi,A.hideMessage=Ca,A.hideModal=un,A.matchPath=yi,A.mergeDesignSystemComponentProps=ta,A.navigate=sm,A.normalizeDesignSystemComponentProps=zt,A.setSplashLoaded=lm,A.setSplashStarted=im,A.showDrawer=tm,A.showMessage=ka,A.showModal=Nf,A.showToast=zo,A.useDesignSystem=Ar,A.useDesignSystemComponentProps=Ho,A.useDrawerStore=uo,A.useHistory=yn,A.useMergedDesignSystemComponentProps=Te,A.useMessageStore=$r,A.useModalStore=go,A.useRouterStore=Qe,A.useSplashStore=tt,A.useToast=Py,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
36
80
  //# sourceMappingURL=web.umd.js.map