@unchainedshop/admin-ui 5.0.0-alpha.1 → 5.0.0-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (972) hide show
  1. package/README.md +136 -16
  2. package/dist/chunk-3L6EZQ6P.js +135 -0
  3. package/dist/chunk-54DKBWXV.js +33 -0
  4. package/dist/chunk-5WPFHQZN.js +388 -0
  5. package/dist/chunk-6UGLNLJG.js +44 -0
  6. package/dist/chunk-BMDNY67T.js +22547 -0
  7. package/dist/chunk-BOMSMJF2.js +77 -0
  8. package/dist/chunk-COV7BREX.js +50 -0
  9. package/dist/chunk-E77YIMGR.js +2083 -0
  10. package/dist/chunk-EJDZRZSZ.js +59 -0
  11. package/dist/chunk-ELPURWDC.js +75 -0
  12. package/dist/chunk-F6LBNV3H.js +9 -0
  13. package/dist/chunk-FDHXLNZQ.js +44 -0
  14. package/dist/chunk-GY2DRQGW.js +166 -0
  15. package/dist/chunk-HERLM47Z.js +309 -0
  16. package/dist/chunk-HJKRGBDG.js +694 -0
  17. package/dist/chunk-I64TXIE7.js +618 -0
  18. package/dist/chunk-IAQPLRXZ.js +16 -0
  19. package/dist/chunk-ICJH36K4.js +326 -0
  20. package/dist/chunk-ILYPJE4N.js +57 -0
  21. package/dist/chunk-IWKDBADX.js +73 -0
  22. package/dist/chunk-IXBMHOB5.js +13 -0
  23. package/dist/chunk-IYKPRAWC.js +26 -0
  24. package/dist/chunk-J23QSWDL.js +8 -0
  25. package/dist/chunk-KH5MK6ZW.js +18 -0
  26. package/dist/chunk-KRIRF7F6.js +76 -0
  27. package/dist/chunk-NT7RB7AK.js +70 -0
  28. package/dist/chunk-OKGJ6HDE.js +26 -0
  29. package/dist/chunk-OTXM2UCD.js +19 -0
  30. package/dist/chunk-PJLYVMUM.js +3308 -0
  31. package/dist/chunk-PUI5BIKO.js +41 -0
  32. package/dist/chunk-Q6S3LBUF.js +180 -0
  33. package/dist/chunk-QHR23GVH.js +1099 -0
  34. package/dist/chunk-QWQ3WJJN.js +1 -0
  35. package/dist/chunk-RAQV2GYF.js +70 -0
  36. package/dist/chunk-VBO377AY.js +14 -0
  37. package/dist/chunk-VYEXPG3M.js +107 -0
  38. package/dist/chunk-WPLOTFGW.js +36 -0
  39. package/dist/chunk-YO6PT7KD.js +13 -0
  40. package/dist/chunk-ZUOVKRKC.js +957 -0
  41. package/dist/components/ui/Accordion/Accordion.d.ts +11 -0
  42. package/dist/components/ui/Accordion/Accordion.d.ts.map +1 -0
  43. package/dist/components/ui/Accordion/AccordionHeader.d.ts +6 -0
  44. package/dist/components/ui/Accordion/AccordionHeader.d.ts.map +1 -0
  45. package/dist/components/ui/Accordion/AccordionItem.d.ts +11 -0
  46. package/dist/components/ui/Accordion/AccordionItem.d.ts.map +1 -0
  47. package/dist/components/ui/ActiveInActive.d.ts +10 -0
  48. package/dist/components/ui/ActiveInActive.d.ts.map +1 -0
  49. package/dist/components/ui/AnimatedCounter.d.ts +7 -0
  50. package/dist/components/ui/AnimatedCounter.d.ts.map +1 -0
  51. package/dist/components/ui/Badge.d.ts +10 -0
  52. package/dist/components/ui/Badge.d.ts.map +1 -0
  53. package/dist/components/ui/BreadCrumbs.d.ts +7 -0
  54. package/dist/components/ui/BreadCrumbs.d.ts.map +1 -0
  55. package/dist/components/ui/Button.d.ts +36 -0
  56. package/dist/components/ui/Button.d.ts.map +1 -0
  57. package/dist/components/ui/CopyableText.d.ts +5 -0
  58. package/dist/components/ui/CopyableText.d.ts.map +1 -0
  59. package/dist/components/ui/DateInput.d.ts +15 -0
  60. package/dist/components/ui/DateInput.d.ts.map +1 -0
  61. package/dist/components/ui/DateRangeFilterInput.d.ts +4 -0
  62. package/dist/components/ui/DateRangeFilterInput.d.ts.map +1 -0
  63. package/dist/components/ui/DetailHeader.d.ts +6 -0
  64. package/dist/components/ui/DetailHeader.d.ts.map +1 -0
  65. package/dist/components/ui/DraggableIcon.d.ts +3 -0
  66. package/dist/components/ui/DraggableIcon.d.ts.map +1 -0
  67. package/dist/components/ui/ErrorBoundary.d.ts +18 -0
  68. package/dist/components/ui/ErrorBoundary.d.ts.map +1 -0
  69. package/dist/components/ui/ErrorFallback.d.ts +6 -0
  70. package/dist/components/ui/ErrorFallback.d.ts.map +1 -0
  71. package/dist/components/ui/HelpText.d.ts +11 -0
  72. package/dist/components/ui/HelpText.d.ts.map +1 -0
  73. package/dist/components/ui/ImageWithFallback.d.ts +7 -0
  74. package/dist/components/ui/ImageWithFallback.d.ts.map +1 -0
  75. package/dist/components/ui/InfoTextBanner.d.ts +6 -0
  76. package/dist/components/ui/InfoTextBanner.d.ts.map +1 -0
  77. package/dist/components/ui/JSONView.d.ts +6 -0
  78. package/dist/components/ui/JSONView.d.ts.map +1 -0
  79. package/dist/components/ui/ListHeader.d.ts +6 -0
  80. package/dist/components/ui/ListHeader.d.ts.map +1 -0
  81. package/dist/components/ui/Loading.d.ts +3 -0
  82. package/dist/components/ui/Loading.d.ts.map +1 -0
  83. package/dist/components/ui/NoData.d.ts +7 -0
  84. package/dist/components/ui/NoData.d.ts.map +1 -0
  85. package/dist/components/ui/NoImage.d.ts +7 -0
  86. package/dist/components/ui/NoImage.d.ts.map +1 -0
  87. package/dist/components/ui/NoImageSvg.d.ts +8 -0
  88. package/dist/components/ui/NoImageSvg.d.ts.map +1 -0
  89. package/dist/components/ui/PageHeader.d.ts +11 -0
  90. package/dist/components/ui/PageHeader.d.ts.map +1 -0
  91. package/dist/components/ui/Pagination.d.ts +8 -0
  92. package/dist/components/ui/Pagination.d.ts.map +1 -0
  93. package/dist/components/ui/Portal/Portal.d.ts +16 -0
  94. package/dist/components/ui/Portal/Portal.d.ts.map +1 -0
  95. package/dist/components/ui/Portal/Portal.types.d.ts +16 -0
  96. package/dist/components/ui/Portal/Portal.types.d.ts.map +1 -0
  97. package/dist/components/ui/SaveAndCancelButtons.d.ts +10 -0
  98. package/dist/components/ui/SaveAndCancelButtons.d.ts.map +1 -0
  99. package/dist/components/ui/SearchField.d.ts +7 -0
  100. package/dist/components/ui/SearchField.d.ts.map +1 -0
  101. package/dist/components/ui/Tab.d.ts +18 -0
  102. package/dist/components/ui/Tab.d.ts.map +1 -0
  103. package/dist/components/ui/Tag/TagInput.d.ts +19 -0
  104. package/dist/components/ui/Tag/TagInput.d.ts.map +1 -0
  105. package/dist/components/ui/Tag/TagList.d.ts +8 -0
  106. package/dist/components/ui/Tag/TagList.d.ts.map +1 -0
  107. package/dist/components/ui/Tag/TagListForm.d.ts +8 -0
  108. package/dist/components/ui/Tag/TagListForm.d.ts.map +1 -0
  109. package/dist/components/ui/Toggle.d.ts +11 -0
  110. package/dist/components/ui/Toggle.d.ts.map +1 -0
  111. package/dist/components/ui/ToolTip.d.ts +7 -0
  112. package/dist/components/ui/ToolTip.d.ts.map +1 -0
  113. package/dist/components/ui/card.d.ts +9 -0
  114. package/dist/components/ui/card.d.ts.map +1 -0
  115. package/dist/components/ui/chart.d.ts +42 -0
  116. package/dist/components/ui/chart.d.ts.map +1 -0
  117. package/dist/components/ui/form/CheckboxField.d.ts +4 -0
  118. package/dist/components/ui/form/CheckboxField.d.ts.map +1 -0
  119. package/dist/components/ui/form/ChoicesField.d.ts +12 -0
  120. package/dist/components/ui/form/ChoicesField.d.ts.map +1 -0
  121. package/dist/components/ui/form/Combobox.d.ts +20 -0
  122. package/dist/components/ui/form/Combobox.d.ts.map +1 -0
  123. package/dist/components/ui/form/DatePickerField.d.ts +4 -0
  124. package/dist/components/ui/form/DatePickerField.d.ts.map +1 -0
  125. package/dist/components/ui/form/EmailField.d.ts +7 -0
  126. package/dist/components/ui/form/EmailField.d.ts.map +1 -0
  127. package/dist/components/ui/form/FieldWithHelp.d.ts +10 -0
  128. package/dist/components/ui/form/FieldWithHelp.d.ts.map +1 -0
  129. package/dist/components/ui/form/FieldWrapper.d.ts +8 -0
  130. package/dist/components/ui/form/FieldWrapper.d.ts.map +1 -0
  131. package/dist/components/ui/form/FormErrors.d.ts +6 -0
  132. package/dist/components/ui/form/FormErrors.d.ts.map +1 -0
  133. package/dist/components/ui/form/JSONAreaField.d.ts +7 -0
  134. package/dist/components/ui/form/JSONAreaField.d.ts.map +1 -0
  135. package/dist/components/ui/form/MarkdownTextAreaField.d.ts +8 -0
  136. package/dist/components/ui/form/MarkdownTextAreaField.d.ts.map +1 -0
  137. package/dist/components/ui/form/PasswordField.d.ts +3 -0
  138. package/dist/components/ui/form/PasswordField.d.ts.map +1 -0
  139. package/dist/components/ui/form/SelectField.d.ts +11 -0
  140. package/dist/components/ui/form/SelectField.d.ts.map +1 -0
  141. package/dist/components/ui/form/SubmitButton.d.ts +9 -0
  142. package/dist/components/ui/form/SubmitButton.d.ts.map +1 -0
  143. package/dist/components/ui/form/TagInputField.d.ts +7 -0
  144. package/dist/components/ui/form/TagInputField.d.ts.map +1 -0
  145. package/dist/components/ui/form/TextAreaField.d.ts +8 -0
  146. package/dist/components/ui/form/TextAreaField.d.ts.map +1 -0
  147. package/dist/components/ui/form/TextField.d.ts +10 -0
  148. package/dist/components/ui/form/TextField.d.ts.map +1 -0
  149. package/dist/components/ui/form/index.d.ts +18 -0
  150. package/dist/components/ui/form/index.d.ts.map +1 -0
  151. package/dist/components/ui/icons.d.ts +4 -0
  152. package/dist/components/ui/icons.d.ts.map +1 -0
  153. package/dist/components/ui/index.d.ts +46 -0
  154. package/dist/components/ui/index.d.ts.map +1 -0
  155. package/dist/form.js +2617 -0
  156. package/dist/gql/operation-types.d.ts +13239 -0
  157. package/dist/gql/operation-types.d.ts.map +1 -0
  158. package/dist/gql/schema-types.d.ts +3876 -0
  159. package/dist/gql/schema-types.d.ts.map +1 -0
  160. package/dist/gql/types.d.ts +3 -0
  161. package/dist/gql/types.d.ts.map +1 -0
  162. package/dist/hooks.js +49 -0
  163. package/dist/lib/utils.d.ts +3 -0
  164. package/dist/lib/utils.d.ts.map +1 -0
  165. package/dist/modal.js +51 -0
  166. package/dist/modules/Auth/AuthContext.d.ts +9 -0
  167. package/dist/modules/Auth/AuthContext.d.ts.map +1 -0
  168. package/dist/modules/Auth/useAuth.d.ts +6 -0
  169. package/dist/modules/Auth/useAuth.d.ts.map +1 -0
  170. package/dist/modules/UnchainedContext/UnchainedContext.d.ts +8 -0
  171. package/dist/modules/UnchainedContext/UnchainedContext.d.ts.map +1 -0
  172. package/dist/modules/UnchainedContext/useUnchainedContext.d.ts +7 -0
  173. package/dist/modules/UnchainedContext/useUnchainedContext.d.ts.map +1 -0
  174. package/dist/modules/accounts/fragment/MD5MetaDataFragment.d.ts +3 -0
  175. package/dist/modules/accounts/fragment/MD5MetaDataFragment.d.ts.map +1 -0
  176. package/dist/modules/accounts/fragment/UserFragment.d.ts +3 -0
  177. package/dist/modules/accounts/fragment/UserFragment.d.ts.map +1 -0
  178. package/dist/modules/accounts/hooks/useCurrentUser.d.ts +10 -0
  179. package/dist/modules/accounts/hooks/useCurrentUser.d.ts.map +1 -0
  180. package/dist/modules/accounts/hooks/useUsersCount.d.ts +8 -0
  181. package/dist/modules/accounts/hooks/useUsersCount.d.ts.map +1 -0
  182. package/dist/modules/accounts.js +1349 -0
  183. package/dist/modules/assortment/hooks/useAssortmentsCount.d.ts +8 -0
  184. package/dist/modules/assortment/hooks/useAssortmentsCount.d.ts.map +1 -0
  185. package/dist/modules/assortment.js +1205 -0
  186. package/dist/modules/common/components/AppContext.d.ts +18 -0
  187. package/dist/modules/common/components/AppContext.d.ts.map +1 -0
  188. package/dist/modules/common/components/FormWrapper.d.ts +8 -0
  189. package/dist/modules/common/components/FormWrapper.d.ts.map +1 -0
  190. package/dist/modules/common/components/LocaleWrapper.d.ts +7 -0
  191. package/dist/modules/common/components/LocaleWrapper.d.ts.map +1 -0
  192. package/dist/modules/common/components/MediaAvatar.d.ts +6 -0
  193. package/dist/modules/common/components/MediaAvatar.d.ts.map +1 -0
  194. package/dist/modules/common/components/SelectOptions.d.ts +17 -0
  195. package/dist/modules/common/components/SelectOptions.d.ts.map +1 -0
  196. package/dist/modules/common/components/Table.d.ts +25 -0
  197. package/dist/modules/common/components/Table.d.ts.map +1 -0
  198. package/dist/modules/common/components/TableCell.d.ts +12 -0
  199. package/dist/modules/common/components/TableCell.d.ts.map +1 -0
  200. package/dist/modules/common/components/TableRow.d.ts +10 -0
  201. package/dist/modules/common/components/TableRow.d.ts.map +1 -0
  202. package/dist/modules/common/components/ThemeWrapper.d.ts +10 -0
  203. package/dist/modules/common/components/ThemeWrapper.d.ts.map +1 -0
  204. package/dist/modules/common/data/iso-codes.d.ts +4 -0
  205. package/dist/modules/common/data/iso-codes.d.ts.map +1 -0
  206. package/dist/modules/common/data/miscellaneous.d.ts +52 -0
  207. package/dist/modules/common/data/miscellaneous.d.ts.map +1 -0
  208. package/dist/modules/common/fragments/AddressFragment.d.ts +3 -0
  209. package/dist/modules/common/fragments/AddressFragment.d.ts.map +1 -0
  210. package/dist/modules/common/hooks/useApp.d.ts +11 -0
  211. package/dist/modules/common/hooks/useApp.d.ts.map +1 -0
  212. package/dist/modules/common/hooks/useBulkResultHandler.d.ts +8 -0
  213. package/dist/modules/common/hooks/useBulkResultHandler.d.ts.map +1 -0
  214. package/dist/modules/common/hooks/useBulkSelection.d.ts +12 -0
  215. package/dist/modules/common/hooks/useBulkSelection.d.ts.map +1 -0
  216. package/dist/modules/common/hooks/useCSVExport.d.ts +10 -0
  217. package/dist/modules/common/hooks/useCSVExport.d.ts.map +1 -0
  218. package/dist/modules/common/hooks/useCSVImport.d.ts +18 -0
  219. package/dist/modules/common/hooks/useCSVImport.d.ts.map +1 -0
  220. package/dist/modules/common/hooks/useChatEndpointChecker.d.ts +5 -0
  221. package/dist/modules/common/hooks/useChatEndpointChecker.d.ts.map +1 -0
  222. package/dist/modules/common/hooks/useConfirmMediaUpload.d.ts +10 -0
  223. package/dist/modules/common/hooks/useConfirmMediaUpload.d.ts.map +1 -0
  224. package/dist/modules/common/hooks/useDashboardMetrics.d.ts +23 -0
  225. package/dist/modules/common/hooks/useDashboardMetrics.d.ts.map +1 -0
  226. package/dist/modules/common/hooks/useLocalStorage.d.ts +3 -0
  227. package/dist/modules/common/hooks/useLocalStorage.d.ts.map +1 -0
  228. package/dist/modules/common/hooks/useOrderAnalytics.d.ts +25 -0
  229. package/dist/modules/common/hooks/useOrderAnalytics.d.ts.map +1 -0
  230. package/dist/modules/common/hooks/useOrderItemsAnalytics.d.ts +16 -0
  231. package/dist/modules/common/hooks/useOrderItemsAnalytics.d.ts.map +1 -0
  232. package/dist/modules/common/hooks/useOutsideClick.d.ts +3 -0
  233. package/dist/modules/common/hooks/useOutsideClick.d.ts.map +1 -0
  234. package/dist/modules/common/hooks/usePortal.d.ts +20 -0
  235. package/dist/modules/common/hooks/usePortal.d.ts.map +1 -0
  236. package/dist/modules/common/hooks/useScrollRestoration.d.ts +8 -0
  237. package/dist/modules/common/hooks/useScrollRestoration.d.ts.map +1 -0
  238. package/dist/modules/common/hooks/useShopConfiguration.d.ts +8 -0
  239. package/dist/modules/common/hooks/useShopConfiguration.d.ts.map +1 -0
  240. package/dist/modules/common/hooks/useShopInfo.d.ts +41 -0
  241. package/dist/modules/common/hooks/useShopInfo.d.ts.map +1 -0
  242. package/dist/modules/common/hooks/useStatusTypes.d.ts +10 -0
  243. package/dist/modules/common/hooks/useStatusTypes.d.ts.map +1 -0
  244. package/dist/modules/common/hooks/useSystemRoles.d.ts +7 -0
  245. package/dist/modules/common/hooks/useSystemRoles.d.ts.map +1 -0
  246. package/dist/modules/common/hooks/useTheme.d.ts +7 -0
  247. package/dist/modules/common/hooks/useTheme.d.ts.map +1 -0
  248. package/dist/modules/common/utils/deBounce.d.ts +3 -0
  249. package/dist/modules/common/utils/deBounce.d.ts.map +1 -0
  250. package/dist/modules/common/utils/defaultNextImageLoader.d.ts +7 -0
  251. package/dist/modules/common/utils/defaultNextImageLoader.d.ts.map +1 -0
  252. package/dist/modules/common/utils/formatUsername.d.ts +3 -0
  253. package/dist/modules/common/utils/formatUsername.d.ts.map +1 -0
  254. package/dist/modules/common/utils/getSetupStepsConfigurationsMeta.d.ts +30 -0
  255. package/dist/modules/common/utils/getSetupStepsConfigurationsMeta.d.ts.map +1 -0
  256. package/dist/modules/common/utils/normalizeFilterKeys.d.ts +4 -0
  257. package/dist/modules/common/utils/normalizeFilterKeys.d.ts.map +1 -0
  258. package/dist/modules/common/utils/sharedContext.d.ts +9 -0
  259. package/dist/modules/common/utils/sharedContext.d.ts.map +1 -0
  260. package/dist/modules/common/utils/useFormatDateTime.d.ts +16 -0
  261. package/dist/modules/common/utils/useFormatDateTime.d.ts.map +1 -0
  262. package/dist/modules/common/utils/utils.d.ts +21 -0
  263. package/dist/modules/common/utils/utils.d.ts.map +1 -0
  264. package/dist/modules/country/fragments/CountryFragment.d.ts +3 -0
  265. package/dist/modules/country/fragments/CountryFragment.d.ts.map +1 -0
  266. package/dist/modules/country/hooks/useCountries.d.ts +22 -0
  267. package/dist/modules/country/hooks/useCountries.d.ts.map +1 -0
  268. package/dist/modules/country.js +108 -0
  269. package/dist/modules/currency.js +119 -0
  270. package/dist/modules/delivery-provider.js +269 -0
  271. package/dist/modules/enrollment.js +431 -0
  272. package/dist/modules/event.js +123 -0
  273. package/dist/modules/filter.js +497 -0
  274. package/dist/modules/forms/components/Form.d.ts +8 -0
  275. package/dist/modules/forms/components/Form.d.ts.map +1 -0
  276. package/dist/modules/forms/hooks/useField.d.ts +35 -0
  277. package/dist/modules/forms/hooks/useField.d.ts.map +1 -0
  278. package/dist/modules/forms/hooks/useForm.d.ts +44 -0
  279. package/dist/modules/forms/hooks/useForm.d.ts.map +1 -0
  280. package/dist/modules/forms/hooks/useFormContext.d.ts +3 -0
  281. package/dist/modules/forms/hooks/useFormContext.d.ts.map +1 -0
  282. package/dist/modules/forms/lib/FormContext.d.ts +13 -0
  283. package/dist/modules/forms/lib/FormContext.d.ts.map +1 -0
  284. package/dist/modules/forms/lib/clean.d.ts +3 -0
  285. package/dist/modules/forms/lib/clean.d.ts.map +1 -0
  286. package/dist/modules/forms/lib/validators.d.ts +20 -0
  287. package/dist/modules/forms/lib/validators.d.ts.map +1 -0
  288. package/dist/modules/language/fragments/LanguageFragment.d.ts +3 -0
  289. package/dist/modules/language/fragments/LanguageFragment.d.ts.map +1 -0
  290. package/dist/modules/language/hooks/useLanguages.d.ts +19 -0
  291. package/dist/modules/language/hooks/useLanguages.d.ts.map +1 -0
  292. package/dist/modules/language.js +106 -0
  293. package/dist/modules/modal/components/AlertMessage.d.ts +9 -0
  294. package/dist/modules/modal/components/AlertMessage.d.ts.map +1 -0
  295. package/dist/modules/modal/components/DangerMessage.d.ts +13 -0
  296. package/dist/modules/modal/components/DangerMessage.d.ts.map +1 -0
  297. package/dist/modules/modal/components/ImportResultMessage.d.ts +14 -0
  298. package/dist/modules/modal/components/ImportResultMessage.d.ts.map +1 -0
  299. package/dist/modules/modal/components/Modal.d.ts +10 -0
  300. package/dist/modules/modal/components/Modal.d.ts.map +1 -0
  301. package/dist/modules/modal/components/ModalWrapper.d.ts +6 -0
  302. package/dist/modules/modal/components/ModalWrapper.d.ts.map +1 -0
  303. package/dist/modules/modal/hooks/useModal.d.ts +7 -0
  304. package/dist/modules/modal/hooks/useModal.d.ts.map +1 -0
  305. package/dist/modules/modal/utils/ModalContext.d.ts +9 -0
  306. package/dist/modules/modal/utils/ModalContext.d.ts.map +1 -0
  307. package/dist/modules/order/fragments/OrderDetailFragment.d.ts +3 -0
  308. package/dist/modules/order/fragments/OrderDetailFragment.d.ts.map +1 -0
  309. package/dist/modules/order/fragments/OrderFragment.d.ts +3 -0
  310. package/dist/modules/order/fragments/OrderFragment.d.ts.map +1 -0
  311. package/dist/modules/order/hooks/useOrders.d.ts +46 -0
  312. package/dist/modules/order/hooks/useOrders.d.ts.map +1 -0
  313. package/dist/modules/order.js +569 -0
  314. package/dist/modules/payment-providers.js +206 -0
  315. package/dist/modules/product/hooks/useProductsCount.d.ts +8 -0
  316. package/dist/modules/product/hooks/useProductsCount.d.ts.map +1 -0
  317. package/dist/modules/product-review.js +270 -0
  318. package/dist/modules/product.js +6914 -0
  319. package/dist/modules/quotation.js +324 -0
  320. package/dist/modules/token.js +143 -0
  321. package/dist/modules/warehousing-providers.js +206 -0
  322. package/dist/modules/work/fragments/WorkFragment.d.ts +3 -0
  323. package/dist/modules/work/fragments/WorkFragment.d.ts.map +1 -0
  324. package/dist/modules/work/hooks/useAddWork.d.ts +6 -0
  325. package/dist/modules/work/hooks/useAddWork.d.ts.map +1 -0
  326. package/dist/modules/work/hooks/useWork.d.ts +32 -0
  327. package/dist/modules/work/hooks/useWork.d.ts.map +1 -0
  328. package/dist/modules/work.js +232 -0
  329. package/dist/plugins.js +13 -0
  330. package/dist/providers.js +9 -0
  331. package/dist/sdk/hooks.d.ts +12 -0
  332. package/dist/sdk/hooks.d.ts.map +1 -0
  333. package/dist/sdk/modal.d.ts +7 -0
  334. package/dist/sdk/modal.d.ts.map +1 -0
  335. package/dist/sdk/plugins.d.ts +78 -0
  336. package/dist/sdk/plugins.d.ts.map +1 -0
  337. package/dist/sdk/providers.d.ts +5 -0
  338. package/dist/sdk/providers.d.ts.map +1 -0
  339. package/dist/sdk/shims/admin-ui-plugins.d.ts +3 -0
  340. package/dist/sdk/shims/admin-ui-plugins.d.ts.map +1 -0
  341. package/dist/sdk/shims/apollo-client-react.d.ts +3 -0
  342. package/dist/sdk/shims/apollo-client-react.d.ts.map +1 -0
  343. package/dist/sdk/shims/apollo-client.d.ts +3 -0
  344. package/dist/sdk/shims/apollo-client.d.ts.map +1 -0
  345. package/dist/sdk/shims/host.d.ts +17 -0
  346. package/dist/sdk/shims/host.d.ts.map +1 -0
  347. package/dist/sdk/shims/next-head.d.ts +3 -0
  348. package/dist/sdk/shims/next-head.d.ts.map +1 -0
  349. package/dist/sdk/shims/next-image.d.ts +3 -0
  350. package/dist/sdk/shims/next-image.d.ts.map +1 -0
  351. package/dist/sdk/shims/next-link.d.ts +3 -0
  352. package/dist/sdk/shims/next-link.d.ts.map +1 -0
  353. package/dist/sdk/shims/next-router.d.ts +3 -0
  354. package/dist/sdk/shims/next-router.d.ts.map +1 -0
  355. package/dist/sdk/shims/react-dom-client.d.ts +3 -0
  356. package/dist/sdk/shims/react-dom-client.d.ts.map +1 -0
  357. package/dist/sdk/shims/react-dom.d.ts +3 -0
  358. package/dist/sdk/shims/react-dom.d.ts.map +1 -0
  359. package/dist/sdk/shims/react-hook-form.d.ts +3 -0
  360. package/dist/sdk/shims/react-hook-form.d.ts.map +1 -0
  361. package/dist/sdk/shims/react-intl.d.ts +3 -0
  362. package/dist/sdk/shims/react-intl.d.ts.map +1 -0
  363. package/dist/sdk/shims/react-jsx-runtime.d.ts +3 -0
  364. package/dist/sdk/shims/react-jsx-runtime.d.ts.map +1 -0
  365. package/dist/sdk/shims/react-toastify.d.ts +3 -0
  366. package/dist/sdk/shims/react-toastify.d.ts.map +1 -0
  367. package/dist/sdk/shims/react.d.ts +3 -0
  368. package/dist/sdk/shims/react.d.ts.map +1 -0
  369. package/dist/sdk/theme.d.ts +26 -0
  370. package/dist/sdk/theme.d.ts.map +1 -0
  371. package/dist/shims/admin-ui-plugins.js +9 -0
  372. package/dist/shims/apollo-client-react.js +25 -0
  373. package/dist/shims/apollo-client.js +55 -0
  374. package/dist/shims/next-head.js +9 -0
  375. package/dist/shims/next-image.js +9 -0
  376. package/dist/shims/next-link.js +9 -0
  377. package/dist/shims/next-router.js +13 -0
  378. package/dist/shims/react-dom-client.js +11 -0
  379. package/dist/shims/react-dom.js +22 -0
  380. package/dist/shims/react-hook-form.js +25 -0
  381. package/dist/shims/react-intl.js +37 -0
  382. package/dist/shims/react-jsx-runtime.js +11 -0
  383. package/dist/shims/react-toastify.js +16 -0
  384. package/dist/shims/react.js +52 -0
  385. package/dist/theme.js +34 -0
  386. package/dist/ui.js +19731 -0
  387. package/out/403/index.html +3 -2
  388. package/out/404/index.html +3 -2
  389. package/out/404.html +3 -2
  390. package/out/423/index.html +3 -2
  391. package/out/500/index.html +3 -2
  392. package/out/_next/static/BPoacQET3TJr2q9E370Ez/_buildManifest.js +262 -0
  393. package/out/_next/static/chunks/01xy3u9ybz9ts.js +5 -0
  394. package/out/_next/static/chunks/02ir8k2vqhw7u.js +4 -0
  395. package/out/_next/static/chunks/03mdkmx9pb3yx.js +28 -0
  396. package/out/_next/static/chunks/03spbldywp99b.js +31 -0
  397. package/out/_next/static/chunks/0531sa8v36e39.js +1 -0
  398. package/out/_next/static/chunks/065ltxdt7s8b2.js +134 -0
  399. package/out/_next/static/chunks/06b1jza2fvc6f.js +4 -0
  400. package/out/_next/static/chunks/0701uizxsgs75.js +4 -0
  401. package/out/_next/static/chunks/09olk50zbo5r6.js +5 -0
  402. package/out/_next/static/chunks/09pabifvs84zb.js +12 -0
  403. package/out/_next/static/chunks/0_pn7w49dpkak.js +5 -0
  404. package/out/_next/static/chunks/0a_gulnq-c7to.js +709 -0
  405. package/out/_next/static/chunks/0agx-csdwbk-x.js +5 -0
  406. package/out/_next/static/chunks/0clmvy-auef0p.js +14 -0
  407. package/out/_next/static/chunks/0czktxcs2aa12.js +1 -0
  408. package/out/_next/static/chunks/0d_qylr054ab-.js +5 -0
  409. package/out/_next/static/chunks/0e2znhpcecrqs.js +175 -0
  410. package/out/_next/static/chunks/0ef4vp3ehm369.js +4 -0
  411. package/out/_next/static/chunks/0fggi8jpi5gjk.js +165 -0
  412. package/out/_next/static/chunks/0gyabz3vqllr6.js +83 -0
  413. package/out/_next/static/chunks/0j05dboa5_xkw.js +5 -0
  414. package/out/_next/static/chunks/0kr4ift9_1a3s.js +1 -0
  415. package/out/_next/static/chunks/0l8tmlevl_6p0.js +1 -0
  416. package/out/_next/static/chunks/0m73vd78oga92.js +342 -0
  417. package/out/_next/static/chunks/0o91usftba97q.js +54 -0
  418. package/out/_next/static/chunks/0oi1kpp0levnm.js +1 -0
  419. package/out/_next/static/chunks/0p7said9rdor1.js +1 -0
  420. package/out/_next/static/chunks/0p86ng98eiz5q.js +11 -0
  421. package/out/_next/static/chunks/0pw1zl8_l93xl.js +5 -0
  422. package/out/_next/static/chunks/0py8-umjmwiwi.js +156 -0
  423. package/out/_next/static/chunks/0q0m2pv-3b2e2.js +4 -0
  424. package/out/_next/static/chunks/0r57e83u39trg.js +5 -0
  425. package/out/_next/static/chunks/0r9a_mcjh1k24.js +6 -0
  426. package/out/_next/static/chunks/0rgtc82y8z7_x.js +5 -0
  427. package/out/_next/static/chunks/0rxhx_x-7dojh.js +182 -0
  428. package/out/_next/static/chunks/0s6u_6w75ggbw.js +297 -0
  429. package/out/_next/static/chunks/0teb3b5h78855.js +44 -0
  430. package/out/_next/static/chunks/0thsuuvsozjop.js +54 -0
  431. package/out/_next/static/chunks/0v6x3uondh5hw.js +5 -0
  432. package/out/_next/static/chunks/0v_uz3j8jolmq.js +4 -0
  433. package/out/_next/static/chunks/0vwmp6qrw7odm.js +7 -0
  434. package/out/_next/static/chunks/0w6t6v_jzrudq.js +4 -0
  435. package/out/_next/static/chunks/0w7gz501ry22r.js +4 -0
  436. package/out/_next/static/chunks/0xgn-89s97a5w.js +1 -0
  437. package/out/_next/static/chunks/0xqtemh7t38y9.js +119 -0
  438. package/out/_next/static/chunks/1-1rj15j67dqt.js +1 -0
  439. package/out/_next/static/chunks/10drou7w-k58p.js +4 -0
  440. package/out/_next/static/chunks/11w7hldkge7sg.js +8 -0
  441. package/out/_next/static/chunks/12yd8t4k6c0t1.js +1 -0
  442. package/out/_next/static/chunks/130c8cta7pec6.js +1 -0
  443. package/out/_next/static/chunks/13qi39a_b6gkv.js +1 -0
  444. package/out/_next/static/chunks/15142badc5ufq.js +4 -0
  445. package/out/_next/static/chunks/155boltbcvwo-.js +63 -0
  446. package/out/_next/static/chunks/15_nwd8p454gd.js +1 -0
  447. package/out/_next/static/chunks/15s4qkdyz56pg.js +115 -0
  448. package/out/_next/static/chunks/15vdx0kewzv-6.js +33 -0
  449. package/out/_next/static/chunks/16shuavdpgni8.js +327 -0
  450. package/out/_next/static/chunks/170j06y4-47o4.js +5 -0
  451. package/out/_next/static/chunks/18a5kibvycb6u.js +1 -0
  452. package/out/_next/static/chunks/1_bckhq06wfmb.js +4 -0
  453. package/out/_next/static/chunks/1_ymf_rfke1aw.js +6 -0
  454. package/out/_next/static/chunks/1a1m389awxw4k.js +1 -0
  455. package/out/_next/static/chunks/1albq_5cppsa1.js +5 -0
  456. package/out/_next/static/chunks/1bhibqf8k2-z1.js +117 -0
  457. package/out/_next/static/chunks/1bxesp6kakz8_.js +353 -0
  458. package/out/_next/static/chunks/1d80ahah359g5.js +174 -0
  459. package/out/_next/static/chunks/1dbjry-rs_5we.js +1 -0
  460. package/out/_next/static/chunks/1dlr1eig6zpl1.js +12 -0
  461. package/out/_next/static/chunks/1gq8ickcg_vmv.js +147 -0
  462. package/out/_next/static/chunks/1gyrsx1nip-lm.js +2 -0
  463. package/out/_next/static/chunks/1hma23kynopdj.js +3 -0
  464. package/out/_next/static/chunks/1i996uxxmc736.js +234 -0
  465. package/out/_next/static/chunks/1iamjw8qh1m4o.js +4 -0
  466. package/out/_next/static/chunks/1ivhp-mi-5l--.js +57 -0
  467. package/out/_next/static/chunks/1jmdpa0tc5puj.js +7 -0
  468. package/out/_next/static/chunks/1ktkks-wpk8q-.js +1 -0
  469. package/out/_next/static/chunks/1kz62r46jwi0y.js +5 -0
  470. package/out/_next/static/chunks/1lex3myb5hmsw.js +1 -0
  471. package/out/_next/static/chunks/1lha1nklxo2g7.js +1 -0
  472. package/out/_next/static/chunks/1mwmcucidjio0.js +8 -0
  473. package/out/_next/static/chunks/1mzejejof4s6g.js +147 -0
  474. package/out/_next/static/chunks/1os6pvhjeb16o.js +1 -0
  475. package/out/_next/static/chunks/1p937fyqa7ssz.js +1 -0
  476. package/out/_next/static/chunks/1po7d3udj6iv4.js +5 -0
  477. package/out/_next/static/chunks/1qxxbcidu-hmv.js +1 -0
  478. package/out/_next/static/chunks/1re4i2t_po4sr.js +95 -0
  479. package/out/_next/static/chunks/1s4oi1bw8zl5d.js +31 -0
  480. package/out/_next/static/chunks/1sb04cqudnfpj.js +4 -0
  481. package/out/_next/static/chunks/1sh2ogc7tcbu-.js +1 -0
  482. package/out/_next/static/chunks/1so6ouxrq_ffa.js +39 -0
  483. package/out/_next/static/chunks/1ulje1tawz8fl.js +1 -0
  484. package/out/_next/static/chunks/1uom050rz5iol.js +272 -0
  485. package/out/_next/static/chunks/1uymuiqrms2h8.js +103 -0
  486. package/out/_next/static/chunks/1wijj_fal57co.js +2 -0
  487. package/out/_next/static/chunks/1wpen9t3_zbte.js +1 -0
  488. package/out/_next/static/chunks/1wpv1sl7vwg04.js +99 -0
  489. package/out/_next/static/chunks/1y3poj860g968.js +24 -0
  490. package/out/_next/static/chunks/1yk0pxcl4urkd.js +4 -0
  491. package/out/_next/static/chunks/1z1mbux-7g74d.js +1 -0
  492. package/out/_next/static/chunks/1z2rl3h7scna4.js +7 -0
  493. package/out/_next/static/chunks/1zyhq82pkterc.js +61 -0
  494. package/out/_next/static/chunks/2-4610weysas_.js +1 -0
  495. package/out/_next/static/chunks/2-zr9-ri30va5.css +1 -0
  496. package/out/_next/static/chunks/20j8cdot33hql.js +13 -0
  497. package/out/_next/static/chunks/21fo9zerxyx-l.js +59 -0
  498. package/out/_next/static/chunks/22sxsq82r3cwy.js +41 -0
  499. package/out/_next/static/chunks/23nwkbry8kz0-.js +1 -0
  500. package/out/_next/static/chunks/259ckrmoldaqg.js +5 -0
  501. package/out/_next/static/chunks/25y2dqqrhstuq.js +5 -0
  502. package/out/_next/static/chunks/28myh-gi8t3t7.js +7 -0
  503. package/out/_next/static/chunks/28oppyg7ev102.js +1 -0
  504. package/out/_next/static/chunks/29y82c6-u55hj.js +5 -0
  505. package/out/_next/static/chunks/2ahlen2u4lbnm.js +16 -0
  506. package/out/_next/static/chunks/2ajr0rk0_yax6.js +1 -0
  507. package/out/_next/static/chunks/2c3ehieqiwiw8.js +119 -0
  508. package/out/_next/static/chunks/2c5gq6izeq6nx.js +81 -0
  509. package/out/_next/static/chunks/2cj8g3fxmitaa.js +1 -0
  510. package/out/_next/static/chunks/2d9lzme_uzwvq.js +1 -0
  511. package/out/_next/static/chunks/2dqoft2pp4355.js +1 -0
  512. package/out/_next/static/chunks/2gso7_8v7owco.js +1 -0
  513. package/out/_next/static/chunks/2hc4nowrexhn3.js +100 -0
  514. package/out/_next/static/chunks/2hoi6cb1lromr.js +4 -0
  515. package/out/_next/static/chunks/2hw2_8kkf_2fg.js +1 -0
  516. package/out/_next/static/chunks/2kd4p_esjbozz.js +21 -0
  517. package/out/_next/static/chunks/2l8gepfm4kyjp.js +1 -0
  518. package/out/_next/static/chunks/2lwhn1ypqwukz.js +11 -0
  519. package/out/_next/static/chunks/2oz432iieo_c6.js +43 -0
  520. package/out/_next/static/chunks/2qjnhmz4c5fq1.js +23 -0
  521. package/out/_next/static/chunks/2rdjgc7_za785.js +9 -0
  522. package/out/_next/static/chunks/2ru66cyp0hbxn.js +103 -0
  523. package/out/_next/static/chunks/2ung-az_h871_.js +4 -0
  524. package/out/_next/static/chunks/2v4rvvdyh028e.js +1 -0
  525. package/out/_next/static/chunks/2vsl3-revotpl.js +43 -0
  526. package/out/_next/static/chunks/2wbc_9uwtsjbp.js +15 -0
  527. package/out/_next/static/chunks/2xixk0t9e9mnw.js +1 -0
  528. package/out/_next/static/chunks/2y6i_xssusr93.js +1 -0
  529. package/out/_next/static/chunks/2y_t26eglpeka.js +4 -0
  530. package/out/_next/static/chunks/2yw5sk06gdixu.js +1 -0
  531. package/out/_next/static/chunks/3-hgyqm9mhcm9.js +33 -0
  532. package/out/_next/static/chunks/3-ve59izq9j-p.js +1 -0
  533. package/out/_next/static/chunks/364y5vueeinvz.js +276 -0
  534. package/out/_next/static/chunks/366b9y413lk4d.js +33 -0
  535. package/out/_next/static/chunks/36vauyb71ot_b.js +61 -0
  536. package/out/_next/static/chunks/394m309ssmlo3.js +5 -0
  537. package/out/_next/static/chunks/39pveojee3ma1.js +33 -0
  538. package/out/_next/static/chunks/3_--novhq2u1q.js +807 -0
  539. package/out/_next/static/chunks/3apnk6kuvwze8.js +5 -0
  540. package/out/_next/static/chunks/3b0868kyqqkn3.js +5 -0
  541. package/out/_next/static/chunks/3btkj1_irjkq7.js +161 -0
  542. package/out/_next/static/chunks/3dcwbsiechj8e.js +7 -0
  543. package/out/_next/static/chunks/3dyd0ilb-ee5w.js +8 -0
  544. package/out/_next/static/chunks/3eftzknnu45-s.js +1 -0
  545. package/out/_next/static/chunks/3ejsx4af27cct.js +7 -0
  546. package/out/_next/static/chunks/3es4yddhl8uwc.js +7 -0
  547. package/out/_next/static/chunks/3fpgg_wy6j2ph.js +2 -0
  548. package/out/_next/static/chunks/3inp15oicq85k.js +1 -0
  549. package/out/_next/static/chunks/3j25u7rzawm9f.js +367 -0
  550. package/out/_next/static/chunks/3jxeyjg2g7w94.js +1 -0
  551. package/out/_next/static/chunks/3kd-t_qz3nxh7.js +30 -0
  552. package/out/_next/static/chunks/3kl8vv7w9jkjr.js +23 -0
  553. package/out/_next/static/chunks/3kmfx3f7oyfdm.js +5 -0
  554. package/out/_next/static/chunks/3koj4-48a7p_9.js +4 -0
  555. package/out/_next/static/chunks/3l7glrtu8ueuo.js +4 -0
  556. package/out/_next/static/chunks/3lgq9oa_2erwo.js +5 -0
  557. package/out/_next/static/chunks/3m_9ozv0orvze.js +187 -0
  558. package/out/_next/static/chunks/3muxcxam24i5z.js +1 -0
  559. package/out/_next/static/chunks/3nimt7ngr5zv6.js +46 -0
  560. package/out/_next/static/chunks/3pwezwpggrz59.js +74 -0
  561. package/out/_next/static/chunks/3r02t7a7jknrv.js +7 -0
  562. package/out/_next/static/chunks/3s40iuaou1rt4.js +1 -0
  563. package/out/_next/static/chunks/3selzn479n73i.js +16 -0
  564. package/out/_next/static/chunks/3srflqnqdfd60.js +5 -0
  565. package/out/_next/static/chunks/3t57k35xu2eo8.js +5 -0
  566. package/out/_next/static/chunks/3tu90a7do336z.js +12 -0
  567. package/out/_next/static/chunks/3ukgj2jzxf10n.js +5 -0
  568. package/out/_next/static/chunks/3vosu-lpiis6v.js +5 -0
  569. package/out/_next/static/chunks/3xaz8fvw2x6b3.js +5 -0
  570. package/out/_next/static/chunks/3xgjhwzul66dp.js +4 -0
  571. package/out/_next/static/chunks/3zze6y1x00k__.js +165 -0
  572. package/out/_next/static/chunks/40730dyt912zu.js +5 -0
  573. package/out/_next/static/chunks/40f26tfp8txip.js +5 -0
  574. package/out/_next/static/chunks/40kc42ezz2dri.js +1 -0
  575. package/out/_next/static/chunks/41f60q88qcigi.js +39 -0
  576. package/out/_next/static/chunks/41l5iphw-rna3.js +44 -0
  577. package/out/_next/static/chunks/423kk9x5t9_b8.js +5 -0
  578. package/out/_next/static/chunks/42k5e3tr3uyzs.js +54 -0
  579. package/out/_next/static/chunks/43uqmej6-s4am.js +7 -0
  580. package/out/_next/static/chunks/4481d7yj7bm2q.js +5 -0
  581. package/out/_next/static/chunks/448is1kpt9eaa.js +39 -0
  582. package/out/_next/static/chunks/44fkzg2e80pqt.js +8 -0
  583. package/out/_next/static/chunks/turbopack-2c3mg3r-05n1w.js +1 -0
  584. package/out/_offline/index.html +3 -2
  585. package/out/account/forgot-password/index.html +3 -2
  586. package/out/account/index.html +3 -2
  587. package/out/assortments/AssortmentDetailPage/index.html +3 -2
  588. package/out/assortments/index.html +3 -2
  589. package/out/assortments/new/index.html +3 -2
  590. package/out/copilot/index.html +3 -2
  591. package/out/country/CountryDetailPage/index.html +3 -2
  592. package/out/country/index.html +3 -2
  593. package/out/country/new/index.html +3 -2
  594. package/out/currency/CurrencyDetailPage/index.html +3 -2
  595. package/out/currency/index.html +3 -2
  596. package/out/currency/new/index.html +3 -2
  597. package/out/delivery-provider/DeliveryProviderDetailPage/index.html +3 -2
  598. package/out/delivery-provider/index.html +3 -2
  599. package/out/delivery-provider/new/index.html +3 -2
  600. package/out/enrollments/EnrollmentDetailPage/index.html +3 -2
  601. package/out/enrollments/index.html +3 -2
  602. package/out/events/EventDetailPage/index.html +3 -2
  603. package/out/events/index.html +3 -2
  604. package/out/exports/index.html +3 -2
  605. package/out/ext/[[...slug]]/index.html +12 -0
  606. package/out/external/index.html +3 -2
  607. package/out/filters/FilterDetailPage/index.html +3 -2
  608. package/out/filters/index.html +3 -2
  609. package/out/filters/new/index.html +3 -2
  610. package/out/index.html +3 -2
  611. package/out/install/index.html +3 -2
  612. package/out/language/LanguageDetailPage/index.html +3 -2
  613. package/out/language/index.html +3 -2
  614. package/out/language/new/index.html +3 -2
  615. package/out/log-in/index.html +3 -2
  616. package/out/orders/OrderDetailPage/index.html +3 -2
  617. package/out/orders/index.html +3 -2
  618. package/out/payment-provider/PaymentProviderDetailPage/index.html +3 -2
  619. package/out/payment-provider/index.html +3 -2
  620. package/out/payment-provider/new/index.html +3 -2
  621. package/out/products/ProductDetailPage/index.html +3 -2
  622. package/out/products/index.html +3 -2
  623. package/out/products/new/index.html +3 -2
  624. package/out/quotations/QuotationDetailPage/index.html +3 -2
  625. package/out/quotations/index.html +3 -2
  626. package/out/reset-password/index.html +3 -2
  627. package/out/sign-up/index.html +3 -2
  628. package/out/styleguide/index.html +3 -2
  629. package/out/tokens/TokenDetailPage/index.html +3 -2
  630. package/out/tokens/index.html +3 -2
  631. package/out/users/UserDetailPage/index.html +3 -2
  632. package/out/users/index.html +3 -2
  633. package/out/users/new/index.html +3 -2
  634. package/out/verify-email/index.html +3 -2
  635. package/out/warehousing-provider/WarehousingProviderDetailPage/index.html +3 -2
  636. package/out/warehousing-provider/index.html +3 -2
  637. package/out/warehousing-provider/new/index.html +3 -2
  638. package/out/works/WorkDetailPage/index.html +3 -2
  639. package/out/works/WorkQueueListView/index.html +3 -2
  640. package/out/works/index.html +3 -2
  641. package/out/works/management/index.html +3 -2
  642. package/package.json +129 -32
  643. package/src/modules/accounts/index.ts +40 -0
  644. package/src/modules/assortment/index.ts +31 -0
  645. package/src/modules/copilot/index.ts +4 -0
  646. package/src/modules/country/index.ts +5 -0
  647. package/src/modules/currency/index.ts +5 -0
  648. package/src/modules/delivery-provider/index.ts +7 -0
  649. package/src/modules/enrollment/index.ts +8 -0
  650. package/src/modules/event/index.ts +3 -0
  651. package/src/modules/filter/index.ts +15 -0
  652. package/src/modules/language/index.ts +5 -0
  653. package/src/modules/order/index.ts +8 -0
  654. package/src/modules/payment-providers/index.ts +7 -0
  655. package/src/modules/product/index.ts +53 -0
  656. package/src/modules/product-review/index.ts +6 -0
  657. package/src/modules/quotation/index.ts +6 -0
  658. package/src/modules/token/index.ts +3 -0
  659. package/src/modules/warehousing-providers/index.ts +7 -0
  660. package/src/modules/work/index.ts +8 -0
  661. package/src/sdk/README.md +235 -0
  662. package/src/sdk/form-entry.test.mjs +11 -0
  663. package/src/sdk/hooks.ts +15 -0
  664. package/src/sdk/modal.ts +6 -0
  665. package/src/sdk/plugin-build.mjs +97 -0
  666. package/src/sdk/plugin-build.test.mjs +46 -0
  667. package/src/sdk/plugin-navigation.test.mjs +59 -0
  668. package/src/sdk/plugin-runtime.cjs +66 -0
  669. package/src/sdk/plugin-runtime.d.mts +11 -0
  670. package/src/sdk/plugin-runtime.mjs +27 -0
  671. package/src/sdk/plugin-runtime.test.mjs +32 -0
  672. package/src/sdk/plugins.mjs +17 -0
  673. package/src/sdk/plugins.ts +105 -0
  674. package/src/sdk/providers.ts +4 -0
  675. package/src/sdk/shared-context.test.mjs +40 -0
  676. package/src/sdk/shims/admin-ui-plugins.ts +3 -0
  677. package/src/sdk/shims/apollo-client-react.ts +3 -0
  678. package/src/sdk/shims/apollo-client.ts +3 -0
  679. package/src/sdk/shims/host.ts +61 -0
  680. package/src/sdk/shims/next-head.ts +3 -0
  681. package/src/sdk/shims/next-image.ts +3 -0
  682. package/src/sdk/shims/next-link.ts +3 -0
  683. package/src/sdk/shims/next-router.ts +3 -0
  684. package/src/sdk/shims/react-dom-client.ts +3 -0
  685. package/src/sdk/shims/react-dom.ts +3 -0
  686. package/src/sdk/shims/react-hook-form.ts +3 -0
  687. package/src/sdk/shims/react-intl.ts +3 -0
  688. package/src/sdk/shims/react-jsx-runtime.ts +3 -0
  689. package/src/sdk/shims/react-toastify.ts +3 -0
  690. package/src/sdk/shims/react.ts +3 -0
  691. package/src/sdk/tailwind-preset.mjs +94 -0
  692. package/src/sdk/theme.ts +61 -0
  693. package/src/styles/globals.css +291 -0
  694. package/out/_next/static/_ZCNVAj2ptQ3WvyS9d8fH/_buildManifest.js +0 -258
  695. package/out/_next/static/chunks/0-3aqi0z~0~kq.js +0 -1
  696. package/out/_next/static/chunks/0-_n2k06ojx7r.js +0 -5
  697. package/out/_next/static/chunks/0-b7z0cgkcxjg.js +0 -12
  698. package/out/_next/static/chunks/0-khetjtcca7j.js +0 -23
  699. package/out/_next/static/chunks/0-vzy055sp9wr.js +0 -1
  700. package/out/_next/static/chunks/0.7c6ora-keix.js +0 -291
  701. package/out/_next/static/chunks/0.7jou~9s-9ly.js +0 -342
  702. package/out/_next/static/chunks/0.9xrb29zv20w.js +0 -1
  703. package/out/_next/static/chunks/0.qq-wh2-26q3.js +0 -1
  704. package/out/_next/static/chunks/00.vtv-~sgyl1.js +0 -1
  705. package/out/_next/static/chunks/002w~0kz13czu.js +0 -2
  706. package/out/_next/static/chunks/00am.v9yslbhb.js +0 -227
  707. package/out/_next/static/chunks/00z-be-uhq5~b.js +0 -138
  708. package/out/_next/static/chunks/01.ky4xf9k36u.js +0 -1
  709. package/out/_next/static/chunks/01m_2h75jti7r.js +0 -173
  710. package/out/_next/static/chunks/01r~p51b_ree7.js +0 -12
  711. package/out/_next/static/chunks/01ua~kzkn_2re.js +0 -2
  712. package/out/_next/static/chunks/01~bicjgx9ycz.js +0 -13
  713. package/out/_next/static/chunks/02.h.hxc5z45l.js +0 -58
  714. package/out/_next/static/chunks/020ov1cd5ubsp.js +0 -1
  715. package/out/_next/static/chunks/022.6ji94gj66.js +0 -90
  716. package/out/_next/static/chunks/02ljwx.y7xl4e.js +0 -384
  717. package/out/_next/static/chunks/02mkjzfq3ks0c.js +0 -342
  718. package/out/_next/static/chunks/034ij~x6p.1xq.js +0 -7
  719. package/out/_next/static/chunks/0387wujkm6quw.js +0 -26
  720. package/out/_next/static/chunks/03j~743_iaz5a.js +0 -87
  721. package/out/_next/static/chunks/03zc-8olk-a4z.js +0 -11
  722. package/out/_next/static/chunks/042vny1lzms1d.js +0 -1
  723. package/out/_next/static/chunks/045b8oqunhkwz.js +0 -1
  724. package/out/_next/static/chunks/04d1nicvb1h43.js +0 -12
  725. package/out/_next/static/chunks/04hnzv8.xnhtq.js +0 -12
  726. package/out/_next/static/chunks/04j3vrvch7ujx.js +0 -1
  727. package/out/_next/static/chunks/04j47t-gfncz0.js +0 -17
  728. package/out/_next/static/chunks/04wxvqon75sl5.js +0 -15
  729. package/out/_next/static/chunks/0511iudhvmzyd.js +0 -14
  730. package/out/_next/static/chunks/054x6af~vznwl.js +0 -13
  731. package/out/_next/static/chunks/055l.ongzthsf.js +0 -2
  732. package/out/_next/static/chunks/05r6-kh0ahzac.js +0 -288
  733. package/out/_next/static/chunks/068vu6mcq90.a.js +0 -14
  734. package/out/_next/static/chunks/069qmjrpifff9.js +0 -10
  735. package/out/_next/static/chunks/06c.18b146dst.js +0 -43
  736. package/out/_next/static/chunks/06ciqx79i2-.y.js +0 -16
  737. package/out/_next/static/chunks/06em3notkoupj.js +0 -60
  738. package/out/_next/static/chunks/06fu~nzcm6-xx.js +0 -13
  739. package/out/_next/static/chunks/06ldt6o0kv861.js +0 -12
  740. package/out/_next/static/chunks/06nnfpkytc2xp.js +0 -101
  741. package/out/_next/static/chunks/071ms7.~t3bpc.js +0 -73
  742. package/out/_next/static/chunks/07absjbyi5efz.js +0 -200
  743. package/out/_next/static/chunks/07e9hvcn2m7m0.css +0 -1
  744. package/out/_next/static/chunks/07gn.w-1ng2vv.js +0 -13
  745. package/out/_next/static/chunks/07ok4zsn3fbvv.js +0 -8
  746. package/out/_next/static/chunks/07rzofd~n_8p3.js +0 -111
  747. package/out/_next/static/chunks/08mu1xcbu0z5i.js +0 -1
  748. package/out/_next/static/chunks/08np.usn69g26.js +0 -12
  749. package/out/_next/static/chunks/08oxo2i_s5k32.js +0 -22
  750. package/out/_next/static/chunks/09.xyqg-s5.hj.js +0 -1
  751. package/out/_next/static/chunks/09kdzdul.4ws~.js +0 -5
  752. package/out/_next/static/chunks/09u84u49rpg~q.js +0 -10
  753. package/out/_next/static/chunks/0_0s9kzhzuc0n.js +0 -51
  754. package/out/_next/static/chunks/0_34hlmm2xs02.js +0 -1
  755. package/out/_next/static/chunks/0__0blfuajz3u.js +0 -1
  756. package/out/_next/static/chunks/0_bohk37n03zc.js +0 -13
  757. package/out/_next/static/chunks/0_fs4fka5dmk4.js +0 -14
  758. package/out/_next/static/chunks/0_t._or66p529.js +0 -10
  759. package/out/_next/static/chunks/0a6n-.sxlxj9i.js +0 -44
  760. package/out/_next/static/chunks/0aewtng76o8~g.js +0 -1
  761. package/out/_next/static/chunks/0aokk5k383t_7.js +0 -1
  762. package/out/_next/static/chunks/0bb3o6y0psmp~.js +0 -137
  763. package/out/_next/static/chunks/0binkax94nk~0.js +0 -286
  764. package/out/_next/static/chunks/0b~s0.jgd-9e2.js +0 -1
  765. package/out/_next/static/chunks/0c6p-vlcfco03.js +0 -2
  766. package/out/_next/static/chunks/0cau~hqb0jkf..js +0 -1
  767. package/out/_next/static/chunks/0chk_j9c0w74~.js +0 -21
  768. package/out/_next/static/chunks/0cnjwc8yv_7du.js +0 -36
  769. package/out/_next/static/chunks/0d1xe7n4~ift~.js +0 -119
  770. package/out/_next/static/chunks/0d2egm4vz55tp.js +0 -16
  771. package/out/_next/static/chunks/0dcng-~m.1-6b.js +0 -31
  772. package/out/_next/static/chunks/0dwysww-f770p.js +0 -43
  773. package/out/_next/static/chunks/0d~ogeoavcw1p.js +0 -2
  774. package/out/_next/static/chunks/0eh08mw_ge-97.js +0 -20
  775. package/out/_next/static/chunks/0ehfzo.p_8b1p.js +0 -142
  776. package/out/_next/static/chunks/0ei4k52e-lv4o.js +0 -596
  777. package/out/_next/static/chunks/0eq_bq11j1d8h.js +0 -73
  778. package/out/_next/static/chunks/0exrsz6ax-mbc.js +0 -50
  779. package/out/_next/static/chunks/0f7dus4chk-b7.js +0 -1
  780. package/out/_next/static/chunks/0f_2kctvcf9fc.js +0 -132
  781. package/out/_next/static/chunks/0fiu9kb2mg_pe.js +0 -1
  782. package/out/_next/static/chunks/0fzcyuwh8xfnw.js +0 -2
  783. package/out/_next/static/chunks/0gepdh_x8l03e.js +0 -31
  784. package/out/_next/static/chunks/0h3apzm4sorb-.js +0 -144
  785. package/out/_next/static/chunks/0hf6k~k9i9dml.js +0 -101
  786. package/out/_next/static/chunks/0hggeos.n3ho1.js +0 -324
  787. package/out/_next/static/chunks/0hs_qs3vvqt40.js +0 -224
  788. package/out/_next/static/chunks/0i.xcdg6xys-l.js +0 -1
  789. package/out/_next/static/chunks/0i2a62pwzd90a.js +0 -1
  790. package/out/_next/static/chunks/0i6yv64iri6c7.js +0 -14
  791. package/out/_next/static/chunks/0id0hab4x07mp.js +0 -13
  792. package/out/_next/static/chunks/0itsov_woj_gc.js +0 -11
  793. package/out/_next/static/chunks/0j0vos96uuvzn.js +0 -19
  794. package/out/_next/static/chunks/0jl_db3hgihi8.js +0 -1
  795. package/out/_next/static/chunks/0jsod19bi_.b4.js +0 -1
  796. package/out/_next/static/chunks/0jt2g8-m-bu3h.js +0 -15
  797. package/out/_next/static/chunks/0jxpx..caiup3.js +0 -51
  798. package/out/_next/static/chunks/0k3anlop2ta22.js +0 -1
  799. package/out/_next/static/chunks/0kg9ib_s2gdgg.js +0 -13
  800. package/out/_next/static/chunks/0klqyqhl-cmiq.js +0 -46
  801. package/out/_next/static/chunks/0krimw~~gz366.js +0 -2
  802. package/out/_next/static/chunks/0kwn.hg1e.um~.js +0 -44
  803. package/out/_next/static/chunks/0kwrzdkwhn88r.js +0 -13
  804. package/out/_next/static/chunks/0lcrt1adr76yw.js +0 -8
  805. package/out/_next/static/chunks/0ljk.6lm3l484.js +0 -7
  806. package/out/_next/static/chunks/0lq8y5ij59ip~.js +0 -1
  807. package/out/_next/static/chunks/0ltj_coftxt~y.js +0 -3
  808. package/out/_next/static/chunks/0lvph83c6z2a-.js +0 -1
  809. package/out/_next/static/chunks/0mehfyjroyd5m.js +0 -22
  810. package/out/_next/static/chunks/0n0rvtqgyilhu.js +0 -13
  811. package/out/_next/static/chunks/0n_8yfa~wwmvn.js +0 -16
  812. package/out/_next/static/chunks/0ncx_fjx5r3e9.js +0 -13
  813. package/out/_next/static/chunks/0njruqifmj7eb.js +0 -73
  814. package/out/_next/static/chunks/0nxa2d3rd~_hk.js +0 -20
  815. package/out/_next/static/chunks/0oavskn-j3nfr.js +0 -12
  816. package/out/_next/static/chunks/0oe9_~e6jba2c.js +0 -108
  817. package/out/_next/static/chunks/0on_9mgul7_i2.js +0 -188
  818. package/out/_next/static/chunks/0o~whquist5u6.js +0 -1
  819. package/out/_next/static/chunks/0p1dktj9e81.u.js +0 -209
  820. package/out/_next/static/chunks/0p2l~~8x6478b.js +0 -73
  821. package/out/_next/static/chunks/0p47r5clv~tji.js +0 -10
  822. package/out/_next/static/chunks/0pu7s41rb3je3.js +0 -1
  823. package/out/_next/static/chunks/0pvo5m24k8fer.js +0 -61
  824. package/out/_next/static/chunks/0q_s9ru.9iese.js +0 -193
  825. package/out/_next/static/chunks/0qoukboupb.ht.js +0 -14
  826. package/out/_next/static/chunks/0qsxmm8vi313~.js +0 -1
  827. package/out/_next/static/chunks/0qvf8s9fxj~ah.js +0 -41
  828. package/out/_next/static/chunks/0qy-relppwey0.js +0 -384
  829. package/out/_next/static/chunks/0r-a0zxkpzy.c.js +0 -14
  830. package/out/_next/static/chunks/0r017e-0mhnx2.js +0 -16
  831. package/out/_next/static/chunks/0r4jylm5inuxv.js +0 -13
  832. package/out/_next/static/chunks/0r6m.pwe-fw0s.js +0 -18
  833. package/out/_next/static/chunks/0rbjbp6y.a5ze.js +0 -8
  834. package/out/_next/static/chunks/0rds3div~3bsj.js +0 -15
  835. package/out/_next/static/chunks/0ridpuenplsy6.js +0 -46
  836. package/out/_next/static/chunks/0rwb5kn3yi~nn.js +0 -16
  837. package/out/_next/static/chunks/0s8kpaa2at0vl.js +0 -1
  838. package/out/_next/static/chunks/0sbwu9f3ons7y.js +0 -13
  839. package/out/_next/static/chunks/0sqtyywk.m-gb.js +0 -119
  840. package/out/_next/static/chunks/0suvx3w6t11x1.js +0 -14
  841. package/out/_next/static/chunks/0t.cqbkm36.29.js +0 -16
  842. package/out/_next/static/chunks/0ta5trm5g8qpx.js +0 -1
  843. package/out/_next/static/chunks/0u5rgvh_590-0.js +0 -15
  844. package/out/_next/static/chunks/0uzv9isqw0xwo.js +0 -12
  845. package/out/_next/static/chunks/0vu00vv4k8fm2.js +0 -5
  846. package/out/_next/static/chunks/0wbeo27c~tc9b.js +0 -13
  847. package/out/_next/static/chunks/0wc49~p9kujfb.js +0 -137
  848. package/out/_next/static/chunks/0we-.8a4ky2dw.js +0 -2
  849. package/out/_next/static/chunks/0whq69wyy9mrh.js +0 -1
  850. package/out/_next/static/chunks/0wjcrj2l-j~_f.js +0 -188
  851. package/out/_next/static/chunks/0wo4urhtm22ug.js +0 -1
  852. package/out/_next/static/chunks/0wuu4uyer4mlk.js +0 -31
  853. package/out/_next/static/chunks/0x4-t7xmjlqx1.js +0 -12
  854. package/out/_next/static/chunks/0x6_x80dsgoq7.js +0 -2
  855. package/out/_next/static/chunks/0xczkhpv81j3p.js +0 -1
  856. package/out/_next/static/chunks/0xo2uquse155f.js +0 -26
  857. package/out/_next/static/chunks/0xve~a_ipc.21.js +0 -81
  858. package/out/_next/static/chunks/0y153o27bxgcb.js +0 -1
  859. package/out/_next/static/chunks/0y51ico3_h9g3.js +0 -346
  860. package/out/_next/static/chunks/0y5ttyo5uc5l-.js +0 -15
  861. package/out/_next/static/chunks/0ydxs-rl4u1j7.js +0 -8
  862. package/out/_next/static/chunks/0yrt60iy59wz5.js +0 -13
  863. package/out/_next/static/chunks/0z.rzro53h5n6.js +0 -15
  864. package/out/_next/static/chunks/0zhqlp5hndrqa.js +0 -1
  865. package/out/_next/static/chunks/0znn2bf~0xx64.js +0 -46
  866. package/out/_next/static/chunks/0zpe1nbzz~f8h.js +0 -5
  867. package/out/_next/static/chunks/0zr4c4gwoe48t.js +0 -15
  868. package/out/_next/static/chunks/0~gsuncyic_fy.js +0 -2
  869. package/out/_next/static/chunks/0~tk5o7vtfrjq.js +0 -66
  870. package/out/_next/static/chunks/103dw~jwhci8m.js +0 -61
  871. package/out/_next/static/chunks/1041bp0usprml.js +0 -217
  872. package/out/_next/static/chunks/10bhd86pfsoy5.js +0 -3
  873. package/out/_next/static/chunks/10jmwo0cv2790.js +0 -100
  874. package/out/_next/static/chunks/10m8c175impy1.js +0 -135
  875. package/out/_next/static/chunks/10y5-.kflf93t.js +0 -13
  876. package/out/_next/static/chunks/11_s223xijkg..js +0 -14
  877. package/out/_next/static/chunks/11fl4v~k-i6dd.js +0 -1
  878. package/out/_next/static/chunks/11rfgl5vsu7np.js +0 -147
  879. package/out/_next/static/chunks/11sml2nj796.7.js +0 -59
  880. package/out/_next/static/chunks/11smy7~k0731f.js +0 -12
  881. package/out/_next/static/chunks/12e_gn-hj1ad4.js +0 -5
  882. package/out/_next/static/chunks/12nnf6pgi3n_-.js +0 -16
  883. package/out/_next/static/chunks/12q9qfk5yyvku.js +0 -288
  884. package/out/_next/static/chunks/13h_3r03rklr2.js +0 -54
  885. package/out/_next/static/chunks/13tjz9q-ls~t3.js +0 -1
  886. package/out/_next/static/chunks/13ytbvm.zbpoc.js +0 -13
  887. package/out/_next/static/chunks/13ztct7h9n9ly.js +0 -1
  888. package/out/_next/static/chunks/14.go5qd.nd-p.js +0 -22
  889. package/out/_next/static/chunks/14e4xylnze3x2.js +0 -1
  890. package/out/_next/static/chunks/14kk7enrk.1zd.js +0 -14
  891. package/out/_next/static/chunks/14q69-rwokbvm.js +0 -13
  892. package/out/_next/static/chunks/14tbg01czewdy.js +0 -1
  893. package/out/_next/static/chunks/14vhb8kz5tl75.js +0 -471
  894. package/out/_next/static/chunks/15r--ckscx-95.js +0 -227
  895. package/out/_next/static/chunks/15wy-.8-w435h.js +0 -92
  896. package/out/_next/static/chunks/15z9m-o4tbe0n.js +0 -1
  897. package/out/_next/static/chunks/169ub5vhwew62.js +0 -1
  898. package/out/_next/static/chunks/16_-z_hnq-xk7.js +0 -12
  899. package/out/_next/static/chunks/16s_3ks~~cizu.js +0 -31
  900. package/out/_next/static/chunks/16wl81ja44b1o.js +0 -54
  901. package/out/_next/static/chunks/16yuttvlotzf1.js +0 -13
  902. package/out/_next/static/chunks/17iwj3.fr3dk8.js +0 -7
  903. package/out/_next/static/chunks/17l28vjc_z915.js +0 -596
  904. package/out/_next/static/chunks/17v04.so.9g1..js +0 -1
  905. package/out/_next/static/chunks/181fxym9wgh_m.js +0 -1
  906. package/out/_next/static/chunks/188m.-obobpy_.js +0 -178
  907. package/out/_next/static/chunks/turbopack-0-c-m~y_.l8n2.js +0 -1
  908. package/out/_next/static/chunks/turbopack-0-ly3m1ffx4wa.js +0 -1
  909. package/out/_next/static/chunks/turbopack-0-w~ect25bcud.js +0 -1
  910. package/out/_next/static/chunks/turbopack-0.2nskz5ux6vf.js +0 -1
  911. package/out/_next/static/chunks/turbopack-00s1egv_1qxjy.js +0 -1
  912. package/out/_next/static/chunks/turbopack-00xxfsstzot2t.js +0 -1
  913. package/out/_next/static/chunks/turbopack-01cocbtxks9vh.js +0 -1
  914. package/out/_next/static/chunks/turbopack-032afnigdvseo.js +0 -1
  915. package/out/_next/static/chunks/turbopack-03hvtuilfwgpp.js +0 -1
  916. package/out/_next/static/chunks/turbopack-04r-j8f.wnbc8.js +0 -1
  917. package/out/_next/static/chunks/turbopack-06m0ig9acgabg.js +0 -1
  918. package/out/_next/static/chunks/turbopack-06rfum.y.5-0h.js +0 -1
  919. package/out/_next/static/chunks/turbopack-07kkmwgy.zqc4.js +0 -1
  920. package/out/_next/static/chunks/turbopack-07qbascdm6h.j.js +0 -1
  921. package/out/_next/static/chunks/turbopack-087jzd1gou_ln.js +0 -1
  922. package/out/_next/static/chunks/turbopack-08h61bgwzagra.js +0 -1
  923. package/out/_next/static/chunks/turbopack-09d04tqccs343.js +0 -1
  924. package/out/_next/static/chunks/turbopack-0a1fdpd8.q282.js +0 -1
  925. package/out/_next/static/chunks/turbopack-0azc8sns1skk7.js +0 -1
  926. package/out/_next/static/chunks/turbopack-0b6fo_~4ih.xu.js +0 -1
  927. package/out/_next/static/chunks/turbopack-0bv6z-ics5a1v.js +0 -1
  928. package/out/_next/static/chunks/turbopack-0c6v~i5zl-_gb.js +0 -1
  929. package/out/_next/static/chunks/turbopack-0cn_kcha7l~dv.js +0 -1
  930. package/out/_next/static/chunks/turbopack-0d6899l2l47lo.js +0 -1
  931. package/out/_next/static/chunks/turbopack-0f3a-2xdfi37o.js +0 -1
  932. package/out/_next/static/chunks/turbopack-0h1nt4kh7q.sg.js +0 -1
  933. package/out/_next/static/chunks/turbopack-0hh49n1y8gh-z.js +0 -1
  934. package/out/_next/static/chunks/turbopack-0ike2xsgynih8.js +0 -1
  935. package/out/_next/static/chunks/turbopack-0iyvc628rll34.js +0 -1
  936. package/out/_next/static/chunks/turbopack-0j-vlj505~ob9.js +0 -1
  937. package/out/_next/static/chunks/turbopack-0j4w2c8pgyzts.js +0 -1
  938. package/out/_next/static/chunks/turbopack-0kblf3k62bseb.js +0 -1
  939. package/out/_next/static/chunks/turbopack-0l-~7v3-4~9hg.js +0 -1
  940. package/out/_next/static/chunks/turbopack-0lb9brrvzbipj.js +0 -1
  941. package/out/_next/static/chunks/turbopack-0lxybl6vxlhqz.js +0 -1
  942. package/out/_next/static/chunks/turbopack-0mlri9n~ktoxa.js +0 -1
  943. package/out/_next/static/chunks/turbopack-0mrgw~e1q9n4l.js +0 -1
  944. package/out/_next/static/chunks/turbopack-0na33zduv8spb.js +0 -1
  945. package/out/_next/static/chunks/turbopack-0o_.gb8s5jo85.js +0 -1
  946. package/out/_next/static/chunks/turbopack-0ofwh3p918g-t.js +0 -1
  947. package/out/_next/static/chunks/turbopack-0o~anfgw~s_~q.js +0 -1
  948. package/out/_next/static/chunks/turbopack-0q3dp3wkxb9ro.js +0 -1
  949. package/out/_next/static/chunks/turbopack-0q5hq623ooh_q.js +0 -1
  950. package/out/_next/static/chunks/turbopack-0rd~zo~yh9.xl.js +0 -1
  951. package/out/_next/static/chunks/turbopack-0s3jauzip9.x..js +0 -1
  952. package/out/_next/static/chunks/turbopack-0uukmkfqyl0h8.js +0 -1
  953. package/out/_next/static/chunks/turbopack-0w_qsium_grk3.js +0 -1
  954. package/out/_next/static/chunks/turbopack-0wbajkw2~1l3z.js +0 -1
  955. package/out/_next/static/chunks/turbopack-0wej6bu7ey9au.js +0 -1
  956. package/out/_next/static/chunks/turbopack-0wk424kj.kar2.js +0 -1
  957. package/out/_next/static/chunks/turbopack-0xew6rccsve8y.js +0 -1
  958. package/out/_next/static/chunks/turbopack-0y898tb-~kae~.js +0 -1
  959. package/out/_next/static/chunks/turbopack-0~lzxx1ip4b0u.js +0 -1
  960. package/out/_next/static/chunks/turbopack-11.ar48mv3rch.js +0 -1
  961. package/out/_next/static/chunks/turbopack-11eqwvrhzm6gb.js +0 -1
  962. package/out/_next/static/chunks/turbopack-12cd3.da_pv_e.js +0 -1
  963. package/out/_next/static/chunks/turbopack-12hcx9pi_e_wy.js +0 -1
  964. package/out/_next/static/chunks/turbopack-12pksi_8~z4-a.js +0 -1
  965. package/out/_next/static/chunks/turbopack-146i7rj93.pk3.js +0 -1
  966. package/out/_next/static/chunks/turbopack-15d8c1ob0a6m0.js +0 -1
  967. package/out/_next/static/chunks/turbopack-16-bzzuvc9d9..js +0 -1
  968. package/out/_next/static/chunks/turbopack-17sr.m9o6jhdb.js +0 -1
  969. package/out/_next/static/chunks/turbopack-1829xb~o3h36e.js +0 -1
  970. package/out/admin-ui-permissions.js +0 -129
  971. /package/out/_next/static/{_ZCNVAj2ptQ3WvyS9d8fH → BPoacQET3TJr2q9E370Ez}/_clientMiddlewareManifest.js +0 -0
  972. /package/out/_next/static/{_ZCNVAj2ptQ3WvyS9d8fH → BPoacQET3TJr2q9E370Ez}/_ssgManifest.js +0 -0
package/dist/form.js ADDED
@@ -0,0 +1,2617 @@
1
+ import { TextField_default } from './chunk-BMDNY67T.js';
2
+ export { FormErrors_default as FormErrors, MarkdownTextAreaField_default as MarkdownTextAreaField, TextField_default as TextField } from './chunk-BMDNY67T.js';
3
+ import { Z, l, b, u2, V, Ae, j, L, S as S$1, c as c$1, s, N, $0c4a58759813079a$export$4e328f61c538687f, $e969f22b6713ca4a$export$ae780daf29e6d456, w, e, u as u$1, Fe, ye, Re, Te, w2, u4, s2, g2, u3 as u3$1, p as p$1, c2 as c2$1, f, a as a$1, JSONView_default } from './chunk-PJLYVMUM.js';
4
+ import { HelpText_default, FieldWrapper_default, clsx_default, Badge_default, ChevronUpDownIcon_default, CheckIcon_default } from './chunk-HJKRGBDG.js';
5
+ export { FieldWrapper_default as FieldWrapper, Form_default as Form, SubmitButton_default as SubmitButton, TagInputField_default as TagInputField } from './chunk-HJKRGBDG.js';
6
+ import './chunk-ZUOVKRKC.js';
7
+ import { useField_default, validateMaxLength, validateDate, validateEmail } from './chunk-I64TXIE7.js';
8
+ import './chunk-HERLM47Z.js';
9
+ import { m, n as n$1, E } from './chunk-FDHXLNZQ.js';
10
+ import { A, Y, r, a, o2, u, S, n, x, k3 as k3$1, n2, K, c, i3, y, n3, o4, V as V$1, p, d, w as w$1, u2 as u2$1, u3, N as N$1, p2, f2, y2, x2, le, s as s$1, o, n4, c2, l2, l as l$1, T, k2, G } from './chunk-QHR23GVH.js';
11
+ import './chunk-J23QSWDL.js';
12
+ import './chunk-WPLOTFGW.js';
13
+ import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
14
+ import * as L2 from 'react';
15
+ import L2__default, { createContext, useRef, useCallback, useMemo, Fragment, useState, useContext, useEffect } from 'react';
16
+ import { flushSync } from 'react-dom';
17
+ import { useIntl } from 'react-intl';
18
+
19
+ var FieldWithHelp = ({
20
+ helpKey,
21
+ helpText,
22
+ helpValues,
23
+ ...textFieldProps
24
+ }) => {
25
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
26
+ /* @__PURE__ */ jsx(TextField_default, { ...textFieldProps }),
27
+ (helpKey || helpText) && /* @__PURE__ */ jsx(
28
+ HelpText_default,
29
+ {
30
+ messageKey: helpKey || `${textFieldProps.name}_help`,
31
+ defaultMessage: helpText,
32
+ values: helpValues,
33
+ className: "mt-1"
34
+ }
35
+ )
36
+ ] });
37
+ };
38
+ var FieldWithHelp_default = FieldWithHelp;
39
+ var TextAreaField = ({
40
+ maxLength,
41
+ validators = [],
42
+ ...props
43
+ }) => {
44
+ const field = useField_default({
45
+ validators: [...validators, maxLength && validateMaxLength(maxLength)],
46
+ ...props
47
+ });
48
+ return /* @__PURE__ */ jsx(FieldWrapper_default, { ...field, children: /* @__PURE__ */ jsx(
49
+ "textarea",
50
+ {
51
+ className: clsx_default(
52
+ "relative mt-1 block w-full dark:focus:autofill dark:hover:autofill dark:autofill dark:placeholder:text-slate-400 dark:bg-slate-900 dark:text-slate-200 appearance-none rounded-md border-1 border-border-default px-4 py-2.5 text-sm text-slate-900 placeholder-slate-400 shadow-xs placeholder:text-slate-400 focus:outline-hidden focus:ring-2 focus:ring-focus-ring",
53
+ field.className,
54
+ {
55
+ "border-rose-700 placeholder:text-rose-300 placeholder-rose-300": !!field.error
56
+ }
57
+ ),
58
+ disabled: field.disabled,
59
+ id: field.name,
60
+ name: field.name,
61
+ rows: field.rows || 10,
62
+ onChange: field.onChange,
63
+ onBlur: field.onBlur,
64
+ placeholder: field.placeholder,
65
+ autoComplete: field.autoComplete || "off",
66
+ value: field.value
67
+ }
68
+ ) });
69
+ };
70
+ var TextAreaField_default = TextAreaField;
71
+ var SelectField = (props) => {
72
+ const { options, ...field } = useField_default(props);
73
+ const { className } = props || { className: "" };
74
+ return /* @__PURE__ */ jsx(FieldWrapper_default, { ...field, children: /* @__PURE__ */ jsx("div", { className: "select-wrap", children: /* @__PURE__ */ jsxs(
75
+ "select",
76
+ {
77
+ className: clsx_default(
78
+ "block w-full bg-surface-input rounded-md border-1 border-border-default py-2.5 pl-3 pr-10 text-base text-text-primary shadow-xs focus:outline-hidden focus:ring-2 focus:ring-focus-ring sm:text-sm",
79
+ className,
80
+ {
81
+ "border-rose-700 text-rose-600 dark:border-rose-500 dark:text-rose-400": !!field.error
82
+ }
83
+ ),
84
+ disabled: field.disabled,
85
+ id: field.name,
86
+ name: field.name,
87
+ onChange: field.onChange,
88
+ onBlur: field.onBlur,
89
+ value: field.value,
90
+ children: [
91
+ /* @__PURE__ */ jsx(
92
+ "option",
93
+ {
94
+ className: "text-text-secondary",
95
+ value: "",
96
+ disabled: field.required,
97
+ hidden: field.required,
98
+ children: field.placeholder || field.label
99
+ }
100
+ ),
101
+ Object.entries(options).map(([value, display]) => /* @__PURE__ */ jsx("option", { className: "text-text-secondary", value, children: display }, value))
102
+ ]
103
+ }
104
+ ) }) });
105
+ };
106
+ var SelectField_default = SelectField;
107
+ var CheckboxField = (props) => {
108
+ const {
109
+ disabled,
110
+ labelClassName,
111
+ containerClassName,
112
+ inputClassName,
113
+ ...checkboxProps
114
+ } = props;
115
+ const field = useField_default({ ...props, type: "checkbox" });
116
+ return /* @__PURE__ */ jsxs(
117
+ "div",
118
+ {
119
+ className: clsx_default(
120
+ "",
121
+ {
122
+ "text-rose-600": !!field.error,
123
+ checkbox: true,
124
+ disabled: field.disabled,
125
+ required: field.required
126
+ },
127
+ containerClassName
128
+ ),
129
+ children: [
130
+ /* @__PURE__ */ jsx(
131
+ "input",
132
+ {
133
+ checked: !!field.value,
134
+ disabled,
135
+ id: field.name,
136
+ name: field.name,
137
+ onChange: field.onChange,
138
+ onBlur: field.onBlur,
139
+ type: "checkbox",
140
+ className: clsx_default(
141
+ "h-4 w-4 rounded-xs border-border-default bg-white dark:!bg-slate-800 text-indigo-600 dark:text-slate-200 focus:ring-focus-ring",
142
+ inputClassName,
143
+ props.className
144
+ ),
145
+ ...checkboxProps
146
+ }
147
+ ),
148
+ /* @__PURE__ */ jsx(
149
+ "label",
150
+ {
151
+ htmlFor: field.name,
152
+ className: clsx_default("text-sm text-text-primary", labelClassName, {
153
+ "text-danger": !!field.error
154
+ }),
155
+ children: field.label
156
+ }
157
+ )
158
+ ]
159
+ }
160
+ );
161
+ };
162
+ var CheckboxField_default = CheckboxField;
163
+ var ChoicesField = ({ multiple, options, ...props }) => {
164
+ const field = useField_default({ multiple, options, ...props });
165
+ const {
166
+ choiceClassName = "col-md-6 col-lg-4'",
167
+ choiceContainerClassName = "",
168
+ labelClassName = "",
169
+ inputClassName = ""
170
+ } = props;
171
+ const mappableValue = typeof field.value === "string" ? [field.value] : Array.isArray(field.value) ? field.value : [];
172
+ const handleChange = (event) => {
173
+ if (field.multiple) {
174
+ const clickedValue = event.target.value;
175
+ const newValues = event.target.checked ? [...mappableValue, clickedValue] : mappableValue.filter((v3) => v3 !== clickedValue);
176
+ field.setValue(newValues, true);
177
+ } else {
178
+ field.onChange(event);
179
+ }
180
+ };
181
+ const { className, hideLabel } = props;
182
+ return /* @__PURE__ */ jsxs(
183
+ "div",
184
+ {
185
+ className: clsx_default("container", className, {
186
+ "is-invalid": !!field.error,
187
+ disabled: field.disabled,
188
+ required: field.required
189
+ }),
190
+ children: [
191
+ /* @__PURE__ */ jsx(
192
+ "label",
193
+ {
194
+ className: clsx_default("text-sm", className, {
195
+ "text-rose-600": !!field.error,
196
+ "sr-only": hideLabel
197
+ }),
198
+ children: field.label
199
+ }
200
+ ),
201
+ /* @__PURE__ */ jsx(
202
+ "div",
203
+ {
204
+ className: clsx_default(
205
+ `row flex flex-row gap-3 ${choiceContainerClassName}`,
206
+ className
207
+ ),
208
+ children: Object.entries(field.options).map(([value, display]) => /* @__PURE__ */ jsx(
209
+ "div",
210
+ {
211
+ className: clsx_default(`-ml-2 ${choiceClassName}`, className),
212
+ children: /* @__PURE__ */ jsxs(
213
+ "label",
214
+ {
215
+ htmlFor: `${field.name}-${value}`,
216
+ className: clsx_default("", labelClassName),
217
+ children: [
218
+ /* @__PURE__ */ jsx(
219
+ "input",
220
+ {
221
+ value,
222
+ checked: mappableValue.includes(value),
223
+ className: clsx_default(
224
+ "mr-2 h-4 w-4 rounded-sm border-border-default bg-white dark:!bg-slate-800 text-slate-950 focus:ring-focus-ring",
225
+ inputClassName
226
+ ),
227
+ disabled: field.disabled,
228
+ id: `${field.name}-${value}`,
229
+ name: field.name,
230
+ onChange: handleChange,
231
+ type: field.multiple ? "checkbox" : "radio"
232
+ }
233
+ ),
234
+ /* @__PURE__ */ jsx("span", { children: display })
235
+ ]
236
+ }
237
+ )
238
+ },
239
+ value
240
+ ))
241
+ }
242
+ )
243
+ ]
244
+ }
245
+ );
246
+ };
247
+ var ChoicesField_default = ChoicesField;
248
+ var DatePickerField = ({
249
+ validators = [],
250
+ className,
251
+ ...props
252
+ }) => {
253
+ const field = useField_default({
254
+ validators: [...validators, validateDate],
255
+ ...props
256
+ });
257
+ const formattedValue = field.value ? new Date(field.value).toISOString().split("T")[0] : "";
258
+ return /* @__PURE__ */ jsx(FieldWrapper_default, { ...field, className: props.containerClassName, children: /* @__PURE__ */ jsx(
259
+ "input",
260
+ {
261
+ type: "date",
262
+ id: field.id,
263
+ name: field.name,
264
+ disabled: field.disabled,
265
+ className: clsx_default(
266
+ "relative mt-0 block w-full appearance-none rounded-md rounded-b-md border-1 border-border-default px-4 py-2.5 text-sm text-text-primary dark:bg-slate-900 placeholder-slate-400 shadow-xs focus:z-10 focus:outline-hidden focus:ring-2 focus:ring-focus-ring",
267
+ className,
268
+ {
269
+ "border-rose-700 placeholder:text-rose-300": !!field.error
270
+ }
271
+ ),
272
+ onChange: field.onChange,
273
+ onBlur: field.onBlur,
274
+ value: formattedValue,
275
+ placeholder: field.placeholder,
276
+ autoComplete: "off",
277
+ ...props
278
+ }
279
+ ) });
280
+ };
281
+ var DatePickerField_default = DatePickerField;
282
+ var EmailField = ({ validators = [], value = "", ...props }) => {
283
+ return /* @__PURE__ */ jsx(
284
+ TextField_default,
285
+ {
286
+ ...{
287
+ value,
288
+ autoComplete: props?.autoComplete || "on",
289
+ name: "email",
290
+ validators: [...validators, validateEmail],
291
+ ...props
292
+ }
293
+ }
294
+ );
295
+ };
296
+ var EmailField_default = EmailField;
297
+ var PasswordField = ({ autoComplete = "on", ...props }) => {
298
+ const [isPasswordVisible, setPasswordVisible] = useState(false);
299
+ const togglePassword = (event) => {
300
+ event.preventDefault();
301
+ setPasswordVisible(!isPasswordVisible);
302
+ };
303
+ return /* @__PURE__ */ jsxs("div", { className: clsx_default("relative", props.className), children: [
304
+ /* @__PURE__ */ jsx(
305
+ TextField_default,
306
+ {
307
+ ...{
308
+ autoComplete: autoComplete || "on",
309
+ name: "password",
310
+ ...props,
311
+ type: isPasswordVisible ? "text" : "password"
312
+ }
313
+ }
314
+ ),
315
+ /* @__PURE__ */ jsx(
316
+ "span",
317
+ {
318
+ role: "button",
319
+ tabIndex: -1,
320
+ "aria-label": "toggle password visibility",
321
+ className: "absolute translate-y-[-137%] outline-hidden block right-3",
322
+ onClick: togglePassword,
323
+ onKeyUp: togglePassword,
324
+ children: isPasswordVisible ? /* @__PURE__ */ jsxs(
325
+ "svg",
326
+ {
327
+ xmlns: "http://www.w3.org/2000/svg",
328
+ className: "h-6 w-6 stroke-slate-700",
329
+ fill: "none",
330
+ viewBox: "0 0 24 24",
331
+ children: [
332
+ /* @__PURE__ */ jsx(
333
+ "path",
334
+ {
335
+ strokeLinecap: "round",
336
+ strokeLinejoin: "round",
337
+ strokeWidth: "2",
338
+ d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
339
+ }
340
+ ),
341
+ /* @__PURE__ */ jsx(
342
+ "path",
343
+ {
344
+ strokeLinecap: "round",
345
+ strokeLinejoin: "round",
346
+ strokeWidth: "2",
347
+ d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
348
+ }
349
+ )
350
+ ]
351
+ }
352
+ ) : /* @__PURE__ */ jsx(
353
+ "svg",
354
+ {
355
+ xmlns: "http://www.w3.org/2000/svg",
356
+ className: "h-6 w-6 stroke-slate-700",
357
+ fill: "none",
358
+ viewBox: "0 0 24 24",
359
+ children: /* @__PURE__ */ jsx(
360
+ "path",
361
+ {
362
+ strokeLinecap: "round",
363
+ strokeLinejoin: "round",
364
+ strokeWidth: "2",
365
+ d: "M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"
366
+ }
367
+ )
368
+ }
369
+ )
370
+ }
371
+ )
372
+ ] });
373
+ };
374
+ var PasswordField_default = PasswordField;
375
+ var JSONAreaField = ({
376
+ validators = [],
377
+ rows = 10,
378
+ ...props
379
+ }) => {
380
+ const field = useField_default({
381
+ ...props,
382
+ validators: [
383
+ ...validators,
384
+ {
385
+ isValid: (v3) => {
386
+ try {
387
+ JSON?.parse(v3);
388
+ return true;
389
+ } catch (err) {
390
+ return false;
391
+ }
392
+ },
393
+ intlMessageDescriptor: {
394
+ id: "invalid_json_input",
395
+ defaultMessage: "Invalid JSON input"
396
+ }
397
+ }
398
+ ]
399
+ });
400
+ const handleOnChange = (e2) => {
401
+ try {
402
+ JSON.parse(e2.target.value || "{}");
403
+ field.setError("");
404
+ } catch (err) {
405
+ field.setError(err.message?.replace("JSON.parse", ""));
406
+ } finally {
407
+ field.setValue(e2.target.value, true);
408
+ field.setTouched(true);
409
+ }
410
+ };
411
+ const handleOnBlur = (e2) => {
412
+ try {
413
+ field.setValue(
414
+ JSON.stringify(JSON.parse(e2.target.value), void 0, 2),
415
+ true
416
+ );
417
+ field.setError("");
418
+ } catch (err) {
419
+ field.setError(err.message);
420
+ }
421
+ };
422
+ return /* @__PURE__ */ jsx(FieldWrapper_default, { ...field, children: /* @__PURE__ */ jsx(
423
+ JSONView_default,
424
+ {
425
+ className: clsx_default(
426
+ "mt-1 block w-full max-w-full rounded-md border-1 border-border-default dark:bg-slate-900 dark:text-slate-200 shadow-xs dark:shadow-none focus:ring-focus-ring sm:text-sm",
427
+ {
428
+ "border-rose-300 text-rose-600 focus:border-rose-600 focus:ring-rose-600": !!field.error
429
+ },
430
+ props.className
431
+ ),
432
+ disabled: field.disabled,
433
+ id: field.name,
434
+ name: field.name,
435
+ onChange: handleOnChange,
436
+ onBlur: handleOnBlur,
437
+ placeholder: field.placeholder,
438
+ autoComplete: field.autoComplete,
439
+ value: field.value
440
+ }
441
+ ) });
442
+ };
443
+ var JSONAreaField_default = JSONAreaField;
444
+
445
+ // ../node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js
446
+ function getMeasurementKey(item) {
447
+ return typeof item === "object" ? item.key : item;
448
+ }
449
+ function createLazyMeasurementsView(cache, flat) {
450
+ const count = cache.length;
451
+ return new Proxy(cache, {
452
+ get(target, prop, receiver) {
453
+ if (typeof prop === "string") {
454
+ const c5 = prop.charCodeAt(0);
455
+ if (c5 >= 48 && c5 <= 57) {
456
+ const i2 = +prop;
457
+ if (Number.isInteger(i2) && i2 >= 0 && i2 < count) {
458
+ let v3 = target[i2];
459
+ if (typeof v3 !== "object") {
460
+ const s4 = flat[i2 * 2];
461
+ v3 = target[i2] = {
462
+ index: i2,
463
+ key: v3,
464
+ start: s4,
465
+ size: flat[i2 * 2 + 1],
466
+ end: s4 + flat[i2 * 2 + 1],
467
+ lane: 0
468
+ };
469
+ }
470
+ return v3;
471
+ }
472
+ }
473
+ if (prop === "length") return count;
474
+ }
475
+ return Reflect.get(target, prop, receiver);
476
+ }
477
+ });
478
+ }
479
+
480
+ // ../node_modules/@tanstack/virtual-core/dist/esm/utils.js
481
+ function memo(getDeps, fn, opts) {
482
+ let deps = opts.initialDeps ?? [];
483
+ let result;
484
+ let isInitial = true;
485
+ function memoizedFunction() {
486
+ var _a;
487
+ const debugEnabled = !!opts.key && !!((_a = opts.debug) == null ? void 0 : _a.call(opts));
488
+ let depTime = 0;
489
+ if (debugEnabled) depTime = Date.now();
490
+ const newDeps = getDeps();
491
+ const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index) => deps[index] !== dep);
492
+ if (!depsChanged) {
493
+ return result;
494
+ }
495
+ deps = newDeps;
496
+ let resultTime = 0;
497
+ if (debugEnabled) resultTime = Date.now();
498
+ result = fn(...newDeps);
499
+ if (debugEnabled) {
500
+ const depEndTime = Math.round((Date.now() - depTime) * 100) / 100;
501
+ const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100;
502
+ const resultFpsPercentage = resultEndTime / 16;
503
+ const pad = (str, num) => {
504
+ str = String(str);
505
+ while (str.length < num) {
506
+ str = " " + str;
507
+ }
508
+ return str;
509
+ };
510
+ console.info(
511
+ `%c\u23F1 ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,
512
+ `
513
+ font-size: .6rem;
514
+ font-weight: bold;
515
+ color: hsl(${Math.max(
516
+ 0,
517
+ Math.min(120 - 120 * resultFpsPercentage, 120)
518
+ )}deg 100% 31%);`,
519
+ opts == null ? void 0 : opts.key
520
+ );
521
+ }
522
+ if ((opts == null ? void 0 : opts.onChange) && !(isInitial && opts.skipInitialOnChange)) {
523
+ opts.onChange(result);
524
+ }
525
+ isInitial = false;
526
+ return result;
527
+ }
528
+ memoizedFunction.updateDeps = (newDeps) => {
529
+ deps = newDeps;
530
+ };
531
+ return memoizedFunction;
532
+ }
533
+ function notUndefined(value, msg) {
534
+ if (value === void 0) {
535
+ throw new Error(`Unexpected undefined${""}`);
536
+ } else {
537
+ return value;
538
+ }
539
+ }
540
+ var approxEqual = (a4, b3) => Math.abs(a4 - b3) < 1.01;
541
+ var debounce = (targetWindow, fn, ms) => {
542
+ let timeoutId;
543
+ return Object.assign(
544
+ function(...args) {
545
+ targetWindow.clearTimeout(timeoutId);
546
+ timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms);
547
+ },
548
+ {
549
+ // The handle is closure-local, so a caller that has already
550
+ // unsubscribed has no way to stop a queued call. Teardown paths use
551
+ // this to drop the pending invocation instead of letting it land.
552
+ cancel: () => {
553
+ targetWindow.clearTimeout(timeoutId);
554
+ }
555
+ }
556
+ );
557
+ };
558
+
559
+ // ../node_modules/@tanstack/virtual-core/dist/esm/index.js
560
+ var _isIOSResult;
561
+ var isIOSWebKit = () => {
562
+ if (_isIOSResult !== void 0) return _isIOSResult;
563
+ if (typeof navigator === "undefined") return _isIOSResult = false;
564
+ if (/iP(hone|od|ad)/.test(navigator.userAgent)) return _isIOSResult = true;
565
+ const mtp = navigator.maxTouchPoints;
566
+ return _isIOSResult = navigator.platform === "MacIntel" && mtp !== void 0 && mtp > 0;
567
+ };
568
+ var getRect = (element) => {
569
+ const { offsetWidth, offsetHeight } = element;
570
+ return { width: offsetWidth, height: offsetHeight };
571
+ };
572
+ var defaultKeyExtractor = (index) => index;
573
+ var defaultRangeExtractor = (range) => {
574
+ const start = Math.max(range.startIndex - range.overscan, 0);
575
+ const end = Math.min(range.endIndex + range.overscan, range.count - 1);
576
+ const len = end - start + 1;
577
+ const arr = new Array(len);
578
+ for (let i2 = 0; i2 < len; i2++) {
579
+ arr[i2] = start + i2;
580
+ }
581
+ return arr;
582
+ };
583
+ var observeElementRect = (instance, cb) => {
584
+ const element = instance.scrollElement;
585
+ if (!element) {
586
+ return;
587
+ }
588
+ const targetWindow = instance.targetWindow;
589
+ if (!targetWindow) {
590
+ return;
591
+ }
592
+ const handler = (rect) => {
593
+ const { width, height } = rect;
594
+ cb({ width: Math.round(width), height: Math.round(height) });
595
+ };
596
+ handler(getRect(element));
597
+ if (!targetWindow.ResizeObserver) {
598
+ return () => {
599
+ };
600
+ }
601
+ const observer = new targetWindow.ResizeObserver((entries) => {
602
+ const run = () => {
603
+ const entry = entries[0];
604
+ if (entry == null ? void 0 : entry.borderBoxSize) {
605
+ const box = entry.borderBoxSize[0];
606
+ if (box) {
607
+ handler({ width: box.inlineSize, height: box.blockSize });
608
+ return;
609
+ }
610
+ }
611
+ handler(getRect(element));
612
+ };
613
+ instance.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run) : run();
614
+ });
615
+ observer.observe(element, { box: "border-box" });
616
+ return () => {
617
+ observer.unobserve(element);
618
+ };
619
+ };
620
+ var addEventListenerOptions = {
621
+ passive: true
622
+ };
623
+ var supportsScrollend = typeof window == "undefined" ? true : "onscrollend" in window;
624
+ var observeOffset = (instance, cb, readOffset) => {
625
+ const element = instance.scrollElement;
626
+ if (!element) {
627
+ return;
628
+ }
629
+ const targetWindow = instance.targetWindow;
630
+ if (!targetWindow) {
631
+ return;
632
+ }
633
+ const registerScrollendEvent = instance.options.useScrollendEvent && supportsScrollend;
634
+ let offset = 0;
635
+ const fallback = registerScrollendEvent ? null : debounce(
636
+ targetWindow,
637
+ () => cb(readOffset(element), false),
638
+ instance.options.isScrollingResetDelay
639
+ );
640
+ const createHandler = (isScrolling) => () => {
641
+ offset = readOffset(element);
642
+ fallback == null ? void 0 : fallback();
643
+ cb(offset, isScrolling);
644
+ };
645
+ const handler = createHandler(true);
646
+ const endHandler = createHandler(false);
647
+ element.addEventListener("scroll", handler, addEventListenerOptions);
648
+ if (registerScrollendEvent) {
649
+ element.addEventListener("scrollend", endHandler, addEventListenerOptions);
650
+ }
651
+ return () => {
652
+ element.removeEventListener("scroll", handler);
653
+ if (registerScrollendEvent) {
654
+ element.removeEventListener("scrollend", endHandler);
655
+ }
656
+ fallback == null ? void 0 : fallback.cancel();
657
+ };
658
+ };
659
+ var observeElementOffset = (instance, cb) => observeOffset(instance, cb, (el) => {
660
+ const { horizontal, isRtl } = instance.options;
661
+ return horizontal ? el.scrollLeft * (isRtl && -1 || 1) : el.scrollTop;
662
+ });
663
+ var measureElement = (element, entry, instance) => {
664
+ if (instance.options.useCachedMeasurements) {
665
+ const index = instance.indexFromElement(element);
666
+ const key = instance.options.getItemKey(index);
667
+ return instance.itemSizeCache.get(key) ?? instance.options.estimateSize(index);
668
+ }
669
+ if (entry == null ? void 0 : entry.borderBoxSize) {
670
+ const box = entry.borderBoxSize[0];
671
+ if (box) {
672
+ const size = Math.round(
673
+ box[instance.options.horizontal ? "inlineSize" : "blockSize"]
674
+ );
675
+ return size;
676
+ }
677
+ }
678
+ if (!entry) {
679
+ const index = instance.indexFromElement(element);
680
+ const key = instance.options.getItemKey(index);
681
+ const cachedSize = instance.itemSizeCache.get(key);
682
+ if (cachedSize !== void 0) {
683
+ return cachedSize;
684
+ }
685
+ }
686
+ return element[instance.options.horizontal ? "offsetWidth" : "offsetHeight"];
687
+ };
688
+ var scrollWithAdjustments = (offset, {
689
+ adjustments = 0,
690
+ behavior
691
+ }, instance) => {
692
+ var _a, _b;
693
+ (_b = (_a = instance.scrollElement) == null ? void 0 : _a.scrollTo) == null ? void 0 : _b.call(_a, {
694
+ [instance.options.horizontal ? "left" : "top"]: offset + adjustments,
695
+ behavior
696
+ });
697
+ };
698
+ var elementScroll = scrollWithAdjustments;
699
+ function isAppendWithTrim(prevCount, nextCount, getPreviousKey, getNextKey) {
700
+ if (nextCount === 0) return false;
701
+ const firstKey = getNextKey(0);
702
+ const removedKeys = /* @__PURE__ */ new Set();
703
+ let removedCount = 0;
704
+ while (removedCount < prevCount) {
705
+ const key = getPreviousKey(removedCount);
706
+ if (key === firstKey) break;
707
+ removedKeys.add(key);
708
+ removedCount++;
709
+ }
710
+ const retainedCount = prevCount - removedCount;
711
+ if (retainedCount === 0 || retainedCount >= nextCount) return false;
712
+ for (let i2 = 0; i2 < retainedCount; i2++) {
713
+ if (getNextKey(i2) !== getPreviousKey(removedCount + i2)) return false;
714
+ }
715
+ for (let i2 = retainedCount; i2 < nextCount; i2++) {
716
+ if (removedKeys.has(getNextKey(i2))) return false;
717
+ }
718
+ return true;
719
+ }
720
+ var Virtualizer = class {
721
+ constructor(opts) {
722
+ this.unsubs = [];
723
+ this.scrollElement = null;
724
+ this.targetWindow = null;
725
+ this.isScrolling = false;
726
+ this.scrollState = null;
727
+ this.measurementsCache = [];
728
+ this._singleLaneMeasurements = null;
729
+ this.itemSizeCache = /* @__PURE__ */ new Map();
730
+ this.itemSizeCacheVersion = 0;
731
+ this.laneAssignments = /* @__PURE__ */ new Map();
732
+ this.pendingMin = null;
733
+ this.prevLanes = void 0;
734
+ this.lanesChangedFlag = false;
735
+ this.lanesSettling = false;
736
+ this.pendingScrollAnchor = null;
737
+ this.scrollRect = null;
738
+ this.scrollOffset = null;
739
+ this.scrollDirection = null;
740
+ this.scrollAdjustments = 0;
741
+ this._iosDeferredAdjustment = 0;
742
+ this._iosTouching = false;
743
+ this._iosJustTouchEnded = false;
744
+ this._iosTouchEndTimerId = null;
745
+ this._intendedScrollOffset = null;
746
+ this._clampedAdjustment = null;
747
+ this.elementsCache = /* @__PURE__ */ new Map();
748
+ this.now = () => {
749
+ var _a, _b, _c;
750
+ return ((_c = (_b = (_a = this.targetWindow) == null ? void 0 : _a.performance) == null ? void 0 : _b.now) == null ? void 0 : _c.call(_b)) ?? Date.now();
751
+ };
752
+ this.observer = /* @__PURE__ */ (() => {
753
+ let _ro = null;
754
+ const get = () => {
755
+ if (_ro) {
756
+ return _ro;
757
+ }
758
+ if (!this.targetWindow || !this.targetWindow.ResizeObserver) {
759
+ return null;
760
+ }
761
+ return _ro = new this.targetWindow.ResizeObserver((entries) => {
762
+ entries.forEach((entry) => {
763
+ const run = () => {
764
+ const node = entry.target;
765
+ const index = this.indexFromElement(node);
766
+ if (!node.isConnected) {
767
+ this.observer.unobserve(node);
768
+ for (const [cacheKey, cachedNode] of this.elementsCache) {
769
+ if (cachedNode === node) {
770
+ this.elementsCache.delete(cacheKey);
771
+ break;
772
+ }
773
+ }
774
+ return;
775
+ }
776
+ if (!this.isIndexInRange(index)) return;
777
+ if (this.shouldMeasureDuringScroll(index)) {
778
+ this.resizeItem(
779
+ index,
780
+ this.options.measureElement(node, entry, this)
781
+ );
782
+ }
783
+ };
784
+ this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run) : run();
785
+ });
786
+ });
787
+ };
788
+ return {
789
+ disconnect: () => {
790
+ var _a;
791
+ (_a = get()) == null ? void 0 : _a.disconnect();
792
+ _ro = null;
793
+ },
794
+ observe: (target) => {
795
+ var _a;
796
+ return (_a = get()) == null ? void 0 : _a.observe(target, { box: "border-box" });
797
+ },
798
+ unobserve: (target) => {
799
+ var _a;
800
+ return (_a = get()) == null ? void 0 : _a.unobserve(target);
801
+ }
802
+ };
803
+ })();
804
+ this.range = null;
805
+ this.setOptions = (opts2) => {
806
+ var _a;
807
+ const merged = {
808
+ debug: false,
809
+ initialOffset: 0,
810
+ overscan: 1,
811
+ paddingStart: 0,
812
+ paddingEnd: 0,
813
+ scrollPaddingStart: 0,
814
+ scrollPaddingEnd: 0,
815
+ horizontal: false,
816
+ getItemKey: defaultKeyExtractor,
817
+ rangeExtractor: defaultRangeExtractor,
818
+ onChange: () => {
819
+ },
820
+ measureElement,
821
+ initialRect: { width: 0, height: 0 },
822
+ scrollMargin: 0,
823
+ gap: 0,
824
+ indexAttribute: "data-index",
825
+ initialMeasurementsCache: [],
826
+ lanes: 1,
827
+ anchorTo: "start",
828
+ followOnAppend: false,
829
+ scrollEndThreshold: 1,
830
+ isScrollingResetDelay: 150,
831
+ enabled: true,
832
+ isRtl: false,
833
+ useScrollendEvent: false,
834
+ useAnimationFrameWithResizeObserver: false,
835
+ laneAssignmentMode: "estimate",
836
+ useCachedMeasurements: false
837
+ };
838
+ for (const key in opts2) {
839
+ const v3 = opts2[key];
840
+ if (v3 !== void 0) merged[key] = v3;
841
+ }
842
+ const prevOptions = this.options;
843
+ let anchor = null;
844
+ let followOnAppend = null;
845
+ let edgeKeysChanged = false;
846
+ if (prevOptions !== void 0 && prevOptions.enabled && merged.enabled && merged.anchorTo === "end" && this.scrollElement !== null) {
847
+ const prevCount = prevOptions.count;
848
+ const nextCount = merged.count;
849
+ const measurements = this.getMeasurements();
850
+ const previousItems = ((_a = this._singleLaneMeasurements) == null ? void 0 : _a.items) ?? measurements;
851
+ const getPreviousKey = (index) => getMeasurementKey(previousItems[index]);
852
+ const prevFirstKey = prevCount > 0 ? getPreviousKey(0) : null;
853
+ const prevLastKey = prevCount > 0 ? getPreviousKey(prevCount - 1) : null;
854
+ const didCountChange = nextCount !== prevCount;
855
+ const didEdgeKeysChange = didCountChange || prevCount > 0 && nextCount > 0 && (merged.getItemKey(0) !== prevFirstKey || merged.getItemKey(nextCount - 1) !== prevLastKey);
856
+ if (didEdgeKeysChange) {
857
+ edgeKeysChanged = true;
858
+ const item = prevCount > 0 ? this.getVirtualItemForOffset(this.getScrollOffset()) ?? measurements[0] : null;
859
+ if (item) {
860
+ anchor = [item.key, this.getScrollOffset() - item.start];
861
+ }
862
+ const behavior = merged.followOnAppend === true ? "auto" : merged.followOnAppend || null;
863
+ if (behavior && nextCount > 0 && this.isAtEnd(prevOptions.scrollEndThreshold) && (prevCount === 0 || merged.getItemKey(nextCount - 1) !== prevLastKey)) {
864
+ if (nextCount > prevCount || isAppendWithTrim(
865
+ prevCount,
866
+ nextCount,
867
+ getPreviousKey,
868
+ merged.getItemKey
869
+ )) {
870
+ followOnAppend = behavior;
871
+ }
872
+ }
873
+ }
874
+ }
875
+ this.options = merged;
876
+ if (edgeKeysChanged) {
877
+ this.pendingMin = 0;
878
+ this.itemSizeCacheVersion++;
879
+ }
880
+ let anchorResolved = false;
881
+ let anchorDelta = 0;
882
+ if (anchor && this.scrollOffset !== null) {
883
+ const [anchorKey, anchorOffset] = anchor;
884
+ const newMeasurements = this.getMeasurements();
885
+ const { count, getItemKey } = this.options;
886
+ let idx = 0;
887
+ while (idx < count && getItemKey(idx) !== anchorKey) {
888
+ idx++;
889
+ }
890
+ if (idx < count) {
891
+ const anchorItem = newMeasurements[idx];
892
+ if (anchorItem) {
893
+ const newOffset = Math.max(0, anchorItem.start + anchorOffset);
894
+ if (!followOnAppend && newOffset !== this.scrollOffset) {
895
+ anchorDelta = newOffset - this.scrollOffset;
896
+ this.scrollOffset = newOffset;
897
+ anchorResolved = true;
898
+ }
899
+ }
900
+ }
901
+ }
902
+ if (anchorResolved || followOnAppend) {
903
+ this.pendingScrollAnchor = [
904
+ anchorResolved ? anchor[0] : null,
905
+ anchorResolved ? anchor[1] : 0,
906
+ followOnAppend,
907
+ anchorDelta
908
+ ];
909
+ }
910
+ };
911
+ this.notify = (sync) => {
912
+ var _a, _b;
913
+ (_b = (_a = this.options).onChange) == null ? void 0 : _b.call(_a, this, sync);
914
+ };
915
+ this.maybeNotify = memo(
916
+ () => {
917
+ this.calculateRange();
918
+ return [
919
+ this.isScrolling,
920
+ this.range ? this.range.startIndex : null,
921
+ this.range ? this.range.endIndex : null
922
+ ];
923
+ },
924
+ (isScrolling) => {
925
+ this.notify(isScrolling);
926
+ },
927
+ {
928
+ key: "maybeNotify",
929
+ debug: () => this.options.debug,
930
+ initialDeps: [
931
+ this.isScrolling,
932
+ this.range ? this.range.startIndex : null,
933
+ this.range ? this.range.endIndex : null
934
+ ]
935
+ }
936
+ );
937
+ this.cleanup = () => {
938
+ this.unsubs.filter(Boolean).forEach((d2) => d2());
939
+ this.unsubs = [];
940
+ this.observer.disconnect();
941
+ if (this.rafId != null && this.targetWindow) {
942
+ this.targetWindow.cancelAnimationFrame(this.rafId);
943
+ this.rafId = null;
944
+ }
945
+ this.scrollState = null;
946
+ this.isScrolling = false;
947
+ this.scrollDirection = null;
948
+ this._iosDeferredAdjustment = 0;
949
+ this._iosTouching = false;
950
+ this._iosJustTouchEnded = false;
951
+ this._clampedAdjustment = null;
952
+ this.scrollElement = null;
953
+ this.targetWindow = null;
954
+ };
955
+ this._didMount = () => {
956
+ return () => {
957
+ this.cleanup();
958
+ };
959
+ };
960
+ this._willUpdate = () => {
961
+ var _a, _b;
962
+ const scrollElement = this.options.enabled ? this.options.getScrollElement() : null;
963
+ if (this.scrollElement !== scrollElement) {
964
+ this.cleanup();
965
+ if (!scrollElement) {
966
+ this.maybeNotify();
967
+ return;
968
+ }
969
+ this.scrollElement = scrollElement;
970
+ if (this.scrollElement && "ownerDocument" in this.scrollElement) {
971
+ this.targetWindow = this.scrollElement.ownerDocument.defaultView;
972
+ } else {
973
+ this.targetWindow = ((_a = this.scrollElement) == null ? void 0 : _a.window) ?? null;
974
+ }
975
+ this.elementsCache.forEach((cached) => {
976
+ this.observer.observe(cached);
977
+ });
978
+ this.unsubs.push(
979
+ this.options.observeElementRect(this, (rect) => {
980
+ this.scrollRect = rect;
981
+ this.maybeNotify();
982
+ })
983
+ );
984
+ this.unsubs.push(
985
+ this.options.observeElementOffset(this, (offset, isScrolling) => {
986
+ if (isScrolling && this._intendedScrollOffset === null && offset === this.scrollOffset) {
987
+ return;
988
+ }
989
+ if (this._intendedScrollOffset !== null && Math.abs(offset - this._intendedScrollOffset) < 1.5) {
990
+ offset = this._intendedScrollOffset;
991
+ }
992
+ this._intendedScrollOffset = null;
993
+ if (this._clampedAdjustment !== null && Math.abs(offset - this._clampedAdjustment.maxAtWrite) >= 1.5) {
994
+ this._clampedAdjustment = null;
995
+ }
996
+ this.scrollAdjustments = 0;
997
+ const prevOffset = this.getScrollOffset();
998
+ this.scrollDirection = isScrolling ? prevOffset === offset ? this.scrollDirection : prevOffset < offset ? "forward" : "backward" : null;
999
+ this.scrollOffset = offset;
1000
+ this.isScrolling = isScrolling;
1001
+ this._flushIosDeferredIfReady();
1002
+ if (this.scrollState) {
1003
+ this.scheduleScrollReconcile();
1004
+ }
1005
+ this.maybeNotify();
1006
+ })
1007
+ );
1008
+ if ("addEventListener" in this.scrollElement) {
1009
+ const scrollEl = this.scrollElement;
1010
+ const onTouchStart = () => {
1011
+ this._iosTouching = true;
1012
+ this._iosJustTouchEnded = false;
1013
+ if (this._iosTouchEndTimerId !== null && this.targetWindow != null) {
1014
+ this.targetWindow.clearTimeout(this._iosTouchEndTimerId);
1015
+ this._iosTouchEndTimerId = null;
1016
+ }
1017
+ };
1018
+ const onTouchEnd = () => {
1019
+ this._iosTouching = false;
1020
+ if (!isIOSWebKit() || this.targetWindow == null) {
1021
+ return;
1022
+ }
1023
+ this._iosJustTouchEnded = true;
1024
+ this._iosTouchEndTimerId = this.targetWindow.setTimeout(() => {
1025
+ this._iosJustTouchEnded = false;
1026
+ this._iosTouchEndTimerId = null;
1027
+ this._flushIosDeferredIfReady();
1028
+ }, 150);
1029
+ };
1030
+ scrollEl.addEventListener(
1031
+ "touchstart",
1032
+ onTouchStart,
1033
+ addEventListenerOptions
1034
+ );
1035
+ scrollEl.addEventListener(
1036
+ "touchend",
1037
+ onTouchEnd,
1038
+ addEventListenerOptions
1039
+ );
1040
+ this.unsubs.push(() => {
1041
+ scrollEl.removeEventListener("touchstart", onTouchStart);
1042
+ scrollEl.removeEventListener("touchend", onTouchEnd);
1043
+ if (this._iosTouchEndTimerId !== null && this.targetWindow != null) {
1044
+ this.targetWindow.clearTimeout(this._iosTouchEndTimerId);
1045
+ this._iosTouchEndTimerId = null;
1046
+ }
1047
+ });
1048
+ }
1049
+ this._scrollToOffset(this.getScrollOffset(), {
1050
+ adjustments: void 0,
1051
+ behavior: void 0
1052
+ });
1053
+ }
1054
+ const anchor = this.pendingScrollAnchor;
1055
+ this.pendingScrollAnchor = null;
1056
+ if (anchor && this.scrollElement && this.options.enabled) {
1057
+ const [key, _offset, followOnAppend, anchorDelta] = anchor;
1058
+ if (key !== null && !followOnAppend) {
1059
+ if (isIOSWebKit() && (this.isScrolling || this._iosTouching || this._iosJustTouchEnded)) {
1060
+ if (anchorDelta !== 0) {
1061
+ this._iosDeferredAdjustment += anchorDelta;
1062
+ }
1063
+ } else if (((_b = this.scrollState) == null ? void 0 : _b.behavior) === "smooth" && !approxEqual(
1064
+ this.getScrollOffset() - anchorDelta,
1065
+ this.scrollState.lastTargetOffset
1066
+ )) ;
1067
+ else {
1068
+ this._scrollToOffset(this.getScrollOffset(), {
1069
+ adjustments: void 0,
1070
+ behavior: void 0
1071
+ });
1072
+ }
1073
+ }
1074
+ if (followOnAppend) {
1075
+ this.scrollToEnd({ behavior: followOnAppend });
1076
+ }
1077
+ }
1078
+ this._retryClampedAdjustment();
1079
+ };
1080
+ this._retryClampedAdjustment = () => {
1081
+ if (this._clampedAdjustment === null || !this.scrollElement || !this.options.enabled) {
1082
+ return;
1083
+ }
1084
+ const { target, maxAtWrite } = this._clampedAdjustment;
1085
+ const max = this.getMaxScrollOffset();
1086
+ if (max > maxAtWrite + 0.5) {
1087
+ this._clampedAdjustment = target > max + 0.5 ? { target, maxAtWrite: max } : null;
1088
+ this._scrollToOffset(target, {
1089
+ adjustments: void 0,
1090
+ behavior: void 0
1091
+ });
1092
+ }
1093
+ };
1094
+ this._flushIosDeferredIfReady = () => {
1095
+ if (this._iosDeferredAdjustment === 0) return;
1096
+ if (this.isScrolling) return;
1097
+ if (this._iosTouching) return;
1098
+ if (this._iosJustTouchEnded) return;
1099
+ const cur = this.getScrollOffset();
1100
+ const max = this.getMaxScrollOffset();
1101
+ if (cur < 0 || cur > max) return;
1102
+ if (this._iosDeferredAdjustment < 0 && cur >= max - 1) {
1103
+ this._iosDeferredAdjustment = 0;
1104
+ return;
1105
+ }
1106
+ const delta = this._iosDeferredAdjustment;
1107
+ this._iosDeferredAdjustment = 0;
1108
+ this._scrollToOffset(cur, {
1109
+ adjustments: this.scrollAdjustments += delta,
1110
+ behavior: void 0
1111
+ });
1112
+ };
1113
+ this.rafId = null;
1114
+ this.getSize = () => {
1115
+ if (!this.options.enabled) {
1116
+ this.scrollRect = null;
1117
+ return 0;
1118
+ }
1119
+ this.scrollRect = this.scrollRect ?? this.options.initialRect;
1120
+ return this.scrollRect[this.options.horizontal ? "width" : "height"];
1121
+ };
1122
+ this.getScrollOffset = () => {
1123
+ if (!this.options.enabled) {
1124
+ this.scrollOffset = null;
1125
+ return 0;
1126
+ }
1127
+ this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset === "function" ? this.options.initialOffset() : this.options.initialOffset);
1128
+ return this.scrollOffset;
1129
+ };
1130
+ this.getMeasurementOptions = memo(
1131
+ () => [
1132
+ this.options.count,
1133
+ this.options.paddingStart,
1134
+ this.options.scrollMargin,
1135
+ this.options.getItemKey,
1136
+ this.options.enabled,
1137
+ this.options.lanes,
1138
+ this.options.laneAssignmentMode,
1139
+ this.options.gap
1140
+ ],
1141
+ (count, paddingStart, scrollMargin, getItemKey, enabled, lanes, laneAssignmentMode, gap) => {
1142
+ const lanesChanged = this.prevLanes !== void 0 && this.prevLanes !== lanes;
1143
+ if (lanesChanged) {
1144
+ this.lanesChangedFlag = true;
1145
+ }
1146
+ this.prevLanes = lanes;
1147
+ this.pendingMin = null;
1148
+ return {
1149
+ count,
1150
+ paddingStart,
1151
+ scrollMargin,
1152
+ getItemKey,
1153
+ enabled,
1154
+ lanes,
1155
+ laneAssignmentMode,
1156
+ gap
1157
+ };
1158
+ },
1159
+ {
1160
+ key: false
1161
+ }
1162
+ );
1163
+ this.isIndexInRange = (index) => index >= 0 && index < this.options.count;
1164
+ this.getMeasurements = memo(
1165
+ () => [this.getMeasurementOptions(), this.itemSizeCacheVersion],
1166
+ ({
1167
+ count,
1168
+ paddingStart,
1169
+ scrollMargin,
1170
+ getItemKey,
1171
+ enabled,
1172
+ lanes,
1173
+ laneAssignmentMode,
1174
+ gap
1175
+ }, _itemSizeCacheVersion) => {
1176
+ var _a;
1177
+ const itemSizeCache = this.itemSizeCache;
1178
+ if (!enabled) {
1179
+ this.measurementsCache = [];
1180
+ this._singleLaneMeasurements = null;
1181
+ this.itemSizeCache.clear();
1182
+ this.laneAssignments.clear();
1183
+ return [];
1184
+ }
1185
+ if (this.laneAssignments.size > count) {
1186
+ for (const index of this.laneAssignments.keys()) {
1187
+ if (index >= count) {
1188
+ this.laneAssignments.delete(index);
1189
+ }
1190
+ }
1191
+ }
1192
+ if (this.lanesChangedFlag) {
1193
+ this.lanesChangedFlag = false;
1194
+ this.lanesSettling = true;
1195
+ this.measurementsCache = [];
1196
+ this._singleLaneMeasurements = null;
1197
+ this.itemSizeCache.clear();
1198
+ this.laneAssignments.clear();
1199
+ this.pendingMin = null;
1200
+ }
1201
+ if (this.measurementsCache.length === 0 && !this.lanesSettling) {
1202
+ this.measurementsCache = this.options.initialMeasurementsCache;
1203
+ this.measurementsCache.forEach((item) => {
1204
+ this.itemSizeCache.set(item.key, item.size);
1205
+ });
1206
+ }
1207
+ const min = this.lanesSettling ? 0 : this.pendingMin ?? 0;
1208
+ this.pendingMin = null;
1209
+ if (this.lanesSettling && this.measurementsCache.length === count) {
1210
+ this.lanesSettling = false;
1211
+ }
1212
+ if (lanes === 1) {
1213
+ const need = count * 2;
1214
+ let flat = (_a = this._singleLaneMeasurements) == null ? void 0 : _a.flat;
1215
+ if (!flat || flat.length < need) {
1216
+ const next = new Float64Array(need);
1217
+ if (flat && min > 0) next.set(flat.subarray(0, min * 2));
1218
+ flat = next;
1219
+ }
1220
+ const items = min === 0 ? new Array(count) : this._singleLaneMeasurements.items.slice();
1221
+ let runningStart;
1222
+ if (min === 0) {
1223
+ runningStart = paddingStart + scrollMargin;
1224
+ } else {
1225
+ const prevIdx = min - 1;
1226
+ runningStart = flat[prevIdx * 2] + flat[prevIdx * 2 + 1] + gap;
1227
+ }
1228
+ for (let i2 = min; i2 < count; i2++) {
1229
+ const key = getItemKey(i2);
1230
+ items[i2] = key;
1231
+ const measuredSize = itemSizeCache.get(key);
1232
+ const size = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i2);
1233
+ flat[i2 * 2] = runningStart;
1234
+ flat[i2 * 2 + 1] = size;
1235
+ runningStart += size + gap;
1236
+ }
1237
+ this._singleLaneMeasurements = { flat, items };
1238
+ const view = createLazyMeasurementsView(items, flat);
1239
+ this.measurementsCache = view;
1240
+ return view;
1241
+ }
1242
+ const measurements = this.measurementsCache.slice(0, min);
1243
+ const laneLastIndex = new Array(lanes).fill(
1244
+ void 0
1245
+ );
1246
+ const laneEnds = new Float64Array(lanes);
1247
+ let filledLanes = 0;
1248
+ for (let m3 = 0; m3 < min; m3++) {
1249
+ const item = measurements[m3];
1250
+ if (item) {
1251
+ if (laneLastIndex[item.lane] === void 0) filledLanes++;
1252
+ laneLastIndex[item.lane] = m3;
1253
+ laneEnds[item.lane] = item.end;
1254
+ }
1255
+ }
1256
+ for (let i2 = min; i2 < count; i2++) {
1257
+ const key = getItemKey(i2);
1258
+ const cachedLane = this.laneAssignments.get(i2);
1259
+ let lane;
1260
+ let start;
1261
+ const shouldCacheLane = laneAssignmentMode === "estimate" || itemSizeCache.has(key);
1262
+ if (cachedLane !== void 0 && this.options.lanes > 1) {
1263
+ lane = cachedLane;
1264
+ const prevIndex = laneLastIndex[lane];
1265
+ const prevInLane = prevIndex !== void 0 ? measurements[prevIndex] : void 0;
1266
+ start = prevInLane ? prevInLane.end + gap : paddingStart + scrollMargin;
1267
+ } else if (filledLanes === lanes) {
1268
+ let bestLane = 0;
1269
+ let bestEnd = laneEnds[0];
1270
+ let bestIdx = laneLastIndex[0];
1271
+ for (let l4 = 1; l4 < lanes; l4++) {
1272
+ const e2 = laneEnds[l4];
1273
+ if (e2 < bestEnd || e2 === bestEnd && laneLastIndex[l4] < bestIdx) {
1274
+ bestLane = l4;
1275
+ bestEnd = e2;
1276
+ bestIdx = laneLastIndex[l4];
1277
+ }
1278
+ }
1279
+ lane = bestLane;
1280
+ start = bestEnd + gap;
1281
+ if (shouldCacheLane) {
1282
+ this.laneAssignments.set(i2, lane);
1283
+ }
1284
+ } else {
1285
+ lane = i2 % this.options.lanes;
1286
+ start = paddingStart + scrollMargin;
1287
+ if (shouldCacheLane) {
1288
+ this.laneAssignments.set(i2, lane);
1289
+ }
1290
+ }
1291
+ const measuredSize = itemSizeCache.get(key);
1292
+ const size = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i2);
1293
+ const end = start + size;
1294
+ measurements[i2] = {
1295
+ index: i2,
1296
+ start,
1297
+ size,
1298
+ end,
1299
+ key,
1300
+ lane
1301
+ };
1302
+ if (laneLastIndex[lane] === void 0) filledLanes++;
1303
+ laneLastIndex[lane] = i2;
1304
+ laneEnds[lane] = end;
1305
+ }
1306
+ this.measurementsCache = measurements;
1307
+ return measurements;
1308
+ },
1309
+ {
1310
+ key: "getMeasurements",
1311
+ debug: () => this.options.debug
1312
+ }
1313
+ );
1314
+ this.calculateRange = memo(
1315
+ () => [
1316
+ this.getMeasurements(),
1317
+ this.getSize(),
1318
+ this.getScrollOffset(),
1319
+ this.options.lanes
1320
+ ],
1321
+ (measurements, outerSize, scrollOffset, lanes) => {
1322
+ if (measurements.length === 0 || outerSize === 0) {
1323
+ this.range = null;
1324
+ return null;
1325
+ }
1326
+ this.range = calculateRangeImpl(
1327
+ measurements,
1328
+ outerSize,
1329
+ scrollOffset,
1330
+ lanes,
1331
+ // Pass the typed array so binary search + forward-walk can read
1332
+ // start/end directly from Float64Array, skipping the Proxy traps.
1333
+ lanes === 1 && this._singleLaneMeasurements !== null ? this._singleLaneMeasurements.flat : null
1334
+ );
1335
+ return this.range;
1336
+ },
1337
+ {
1338
+ key: "calculateRange",
1339
+ debug: () => this.options.debug
1340
+ }
1341
+ );
1342
+ this.getVirtualIndexes = memo(
1343
+ () => {
1344
+ let startIndex = null;
1345
+ let endIndex = null;
1346
+ const range = this.calculateRange();
1347
+ if (range) {
1348
+ startIndex = range.startIndex;
1349
+ endIndex = range.endIndex;
1350
+ }
1351
+ this.maybeNotify.updateDeps([this.isScrolling, startIndex, endIndex]);
1352
+ return [
1353
+ this.options.rangeExtractor,
1354
+ this.options.overscan,
1355
+ this.options.count,
1356
+ startIndex,
1357
+ endIndex
1358
+ ];
1359
+ },
1360
+ (rangeExtractor, overscan, count, startIndex, endIndex) => {
1361
+ return startIndex === null || endIndex === null ? [] : rangeExtractor({
1362
+ startIndex,
1363
+ endIndex,
1364
+ overscan,
1365
+ count
1366
+ });
1367
+ },
1368
+ {
1369
+ key: "getVirtualIndexes",
1370
+ debug: () => this.options.debug
1371
+ }
1372
+ );
1373
+ this.indexFromElement = (node) => {
1374
+ const attributeName = this.options.indexAttribute;
1375
+ const indexStr = node.getAttribute(attributeName);
1376
+ if (!indexStr) {
1377
+ console.warn(
1378
+ `Missing attribute name '${attributeName}={index}' on measured element.`
1379
+ );
1380
+ return -1;
1381
+ }
1382
+ return parseInt(indexStr, 10);
1383
+ };
1384
+ this.shouldMeasureDuringScroll = (index) => {
1385
+ var _a;
1386
+ if (!this.scrollState || this.scrollState.behavior !== "smooth") {
1387
+ return true;
1388
+ }
1389
+ const scrollIndex = this.scrollState.index ?? ((_a = this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)) == null ? void 0 : _a.index);
1390
+ if (scrollIndex !== void 0 && this.range) {
1391
+ const bufferSize = Math.max(
1392
+ this.options.overscan,
1393
+ Math.ceil((this.range.endIndex - this.range.startIndex) / 2)
1394
+ );
1395
+ const minIndex = Math.max(0, scrollIndex - bufferSize);
1396
+ const maxIndex = Math.min(
1397
+ this.options.count - 1,
1398
+ scrollIndex + bufferSize
1399
+ );
1400
+ return index >= minIndex && index <= maxIndex;
1401
+ }
1402
+ return true;
1403
+ };
1404
+ this.measureElement = (node) => {
1405
+ if (!node) {
1406
+ this.elementsCache.forEach((cached, key2) => {
1407
+ if (!cached.isConnected) {
1408
+ this.observer.unobserve(cached);
1409
+ this.elementsCache.delete(key2);
1410
+ }
1411
+ });
1412
+ return;
1413
+ }
1414
+ const index = this.indexFromElement(node);
1415
+ if (!this.isIndexInRange(index)) return;
1416
+ const key = this.options.getItemKey(index);
1417
+ const prevNode = this.elementsCache.get(key);
1418
+ if (prevNode !== node) {
1419
+ if (prevNode) {
1420
+ this.observer.unobserve(prevNode);
1421
+ }
1422
+ this.observer.observe(node);
1423
+ this.elementsCache.set(key, node);
1424
+ }
1425
+ if ((!this.isScrolling || this.scrollState) && this.shouldMeasureDuringScroll(index)) {
1426
+ this.resizeItem(index, this.options.measureElement(node, void 0, this));
1427
+ }
1428
+ };
1429
+ this.resizeItem = (index, size) => {
1430
+ var _a, _b, _c;
1431
+ if (!this.isIndexInRange(index)) return;
1432
+ let cachedSize;
1433
+ let itemStart;
1434
+ let key;
1435
+ const flat = (_a = this._singleLaneMeasurements) == null ? void 0 : _a.flat;
1436
+ if (this.options.lanes === 1 && flat != null) {
1437
+ key = this.options.getItemKey(index);
1438
+ itemStart = flat[index * 2];
1439
+ cachedSize = flat[index * 2 + 1];
1440
+ } else {
1441
+ const item = this.measurementsCache[index];
1442
+ if (!item) return;
1443
+ key = item.key;
1444
+ itemStart = item.start;
1445
+ cachedSize = item.size;
1446
+ }
1447
+ const itemSize = this.itemSizeCache.get(key) ?? cachedSize;
1448
+ const delta = size - itemSize;
1449
+ if (delta !== 0) {
1450
+ const wasAtEnd = this.options.anchorTo === "end" && ((_b = this.scrollState) == null ? void 0 : _b.behavior) !== "smooth" && this.getVirtualDistanceFromEnd() <= this.options.scrollEndThreshold;
1451
+ const prevTotalSize = wasAtEnd ? this.getTotalSize() : 0;
1452
+ const scrollOffsetWithAdj = this.getScrollOffset() + this.scrollAdjustments;
1453
+ const isFirstMeasure = !this.itemSizeCache.has(key);
1454
+ const defaultShouldAdjust = isFirstMeasure ? (
1455
+ // First measurement: compensate any item whose top sits above the
1456
+ // fold — the estimate→actual delta must be corrected regardless of
1457
+ // scroll direction, since the whole estimated block was above it.
1458
+ itemStart < scrollOffsetWithAdj
1459
+ ) : (
1460
+ // Re-measurement: only compensate an item that is ENTIRELY above the
1461
+ // fold. An item that merely *spans* the fold (top above, bottom
1462
+ // below — e.g. a streaming chat message growing at its bottom)
1463
+ // changes size *below* the anchor point, so shifting scrollTop by the
1464
+ // delta would drag the viewport downward on every growth (#1218).
1465
+ // Also skip during backward scroll to avoid the "items jump while
1466
+ // scrolling up" cascade.
1467
+ itemStart + itemSize <= scrollOffsetWithAdj && this.scrollDirection !== "backward"
1468
+ );
1469
+ const shouldAdjustScroll = ((_c = this.scrollState) == null ? void 0 : _c.behavior) !== "smooth" && (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(
1470
+ // The callback expects a VirtualItem; build one lazily only
1471
+ // when the consumer actually supplied a custom predicate.
1472
+ this.measurementsCache[index] ?? {
1473
+ index,
1474
+ key,
1475
+ start: itemStart,
1476
+ size: cachedSize,
1477
+ end: itemStart + cachedSize,
1478
+ lane: 0
1479
+ },
1480
+ delta,
1481
+ this
1482
+ ) : defaultShouldAdjust);
1483
+ if (this.pendingMin === null || index < this.pendingMin) {
1484
+ this.pendingMin = index;
1485
+ }
1486
+ this.itemSizeCache.set(key, size);
1487
+ this.itemSizeCacheVersion++;
1488
+ let adjustedSync = false;
1489
+ if (wasAtEnd) {
1490
+ adjustedSync = this.applyScrollAdjustment(
1491
+ this.getTotalSize() - prevTotalSize
1492
+ );
1493
+ } else if (shouldAdjustScroll) {
1494
+ adjustedSync = this.applyScrollAdjustment(delta);
1495
+ }
1496
+ this.notify(adjustedSync);
1497
+ this._retryClampedAdjustment();
1498
+ }
1499
+ };
1500
+ this.getVirtualItems = memo(
1501
+ () => [this.getVirtualIndexes(), this.getMeasurements()],
1502
+ (indexes, measurements) => {
1503
+ const virtualItems = [];
1504
+ for (let k4 = 0, len = indexes.length; k4 < len; k4++) {
1505
+ const i2 = indexes[k4];
1506
+ const measurement = measurements[i2];
1507
+ virtualItems.push(measurement);
1508
+ }
1509
+ return virtualItems;
1510
+ },
1511
+ {
1512
+ key: "getVirtualItems",
1513
+ debug: () => this.options.debug
1514
+ }
1515
+ );
1516
+ this.getVirtualItemForOffset = (offset) => {
1517
+ var _a;
1518
+ const measurements = this.getMeasurements();
1519
+ if (measurements.length === 0) {
1520
+ return void 0;
1521
+ }
1522
+ const flat = (_a = this._singleLaneMeasurements) == null ? void 0 : _a.flat;
1523
+ const useFlat = this.options.lanes === 1 && flat != null;
1524
+ const idx = findNearestBinarySearch(
1525
+ 0,
1526
+ measurements.length - 1,
1527
+ useFlat ? (i2) => flat[i2 * 2] : (i2) => notUndefined(measurements[i2]).start,
1528
+ offset
1529
+ );
1530
+ return notUndefined(measurements[idx]);
1531
+ };
1532
+ this.getMaxScrollOffset = () => {
1533
+ if (!this.scrollElement) return 0;
1534
+ if ("scrollHeight" in this.scrollElement) {
1535
+ return this.options.horizontal ? this.scrollElement.scrollWidth - this.scrollElement.clientWidth : this.scrollElement.scrollHeight - this.scrollElement.clientHeight;
1536
+ } else {
1537
+ const doc = this.scrollElement.document.documentElement;
1538
+ return this.options.horizontal ? doc.scrollWidth - this.scrollElement.innerWidth : doc.scrollHeight - this.scrollElement.innerHeight;
1539
+ }
1540
+ };
1541
+ this.getVirtualDistanceFromEnd = () => {
1542
+ return Math.max(
1543
+ this.getTotalSize() - this.getSize() - this.getScrollOffset(),
1544
+ 0
1545
+ );
1546
+ };
1547
+ this.getDistanceFromEnd = () => {
1548
+ return Math.max(this.getMaxScrollOffset() - this.getScrollOffset(), 0);
1549
+ };
1550
+ this.isAtEnd = (threshold = this.options.scrollEndThreshold) => {
1551
+ return this.getDistanceFromEnd() <= threshold;
1552
+ };
1553
+ this.getOffsetForAlignment = (toOffset, align, itemSize = 0) => {
1554
+ if (!this.scrollElement) return 0;
1555
+ const size = this.getSize();
1556
+ const scrollOffset = this.getScrollOffset();
1557
+ if (align === "auto") {
1558
+ align = toOffset >= scrollOffset + size ? "end" : "start";
1559
+ }
1560
+ if (align === "center") {
1561
+ toOffset += (itemSize - size) / 2;
1562
+ } else if (align === "end") {
1563
+ toOffset -= size;
1564
+ }
1565
+ const maxOffset = this.getMaxScrollOffset();
1566
+ return Math.max(Math.min(maxOffset, toOffset), 0);
1567
+ };
1568
+ this.getOffsetForIndex = (index, align = "auto") => {
1569
+ index = Math.max(0, Math.min(index, this.options.count - 1));
1570
+ const size = this.getSize();
1571
+ const scrollOffset = this.getScrollOffset();
1572
+ const item = this.measurementsCache[index];
1573
+ if (!item) return;
1574
+ if (align === "auto") {
1575
+ if (item.end >= scrollOffset + size - this.options.scrollPaddingEnd) {
1576
+ align = "end";
1577
+ } else if (item.start <= scrollOffset + this.options.scrollPaddingStart) {
1578
+ align = "start";
1579
+ } else {
1580
+ return [scrollOffset, align];
1581
+ }
1582
+ }
1583
+ if (align === "end" && index === this.options.count - 1) {
1584
+ return [this.getMaxScrollOffset(), align];
1585
+ }
1586
+ const toOffset = align === "end" ? item.end + this.options.scrollPaddingEnd : item.start - this.options.scrollPaddingStart;
1587
+ return [
1588
+ this.getOffsetForAlignment(toOffset, align, item.size),
1589
+ align
1590
+ ];
1591
+ };
1592
+ this.scrollToOffset = (toOffset, { align = "start", behavior = "auto" } = {}) => {
1593
+ this._iosDeferredAdjustment = 0;
1594
+ const offset = this.getOffsetForAlignment(toOffset, align);
1595
+ const now = this.now();
1596
+ this.scrollState = {
1597
+ index: null,
1598
+ align,
1599
+ behavior,
1600
+ startedAt: now,
1601
+ lastTargetOffset: offset,
1602
+ stableFrames: 0
1603
+ };
1604
+ this._scrollToOffset(offset, { adjustments: void 0, behavior });
1605
+ this.scheduleScrollReconcile();
1606
+ };
1607
+ this.scrollToIndex = (index, {
1608
+ align: initialAlign = "auto",
1609
+ behavior = "auto"
1610
+ } = {}) => {
1611
+ this._iosDeferredAdjustment = 0;
1612
+ index = Math.max(0, Math.min(index, this.options.count - 1));
1613
+ const offsetInfo = this.getOffsetForIndex(index, initialAlign);
1614
+ if (!offsetInfo) {
1615
+ return;
1616
+ }
1617
+ const [offset, align] = offsetInfo;
1618
+ const now = this.now();
1619
+ this.scrollState = {
1620
+ index,
1621
+ align,
1622
+ behavior,
1623
+ startedAt: now,
1624
+ lastTargetOffset: offset,
1625
+ stableFrames: 0
1626
+ };
1627
+ this._scrollToOffset(offset, { adjustments: void 0, behavior });
1628
+ this.scheduleScrollReconcile();
1629
+ };
1630
+ this.scrollBy = (delta, { behavior = "auto" } = {}) => {
1631
+ const offset = this.getScrollOffset() + delta;
1632
+ const now = this.now();
1633
+ this.scrollState = {
1634
+ index: null,
1635
+ align: "start",
1636
+ behavior,
1637
+ startedAt: now,
1638
+ lastTargetOffset: offset,
1639
+ stableFrames: 0
1640
+ };
1641
+ this._scrollToOffset(offset, { adjustments: void 0, behavior });
1642
+ this.scheduleScrollReconcile();
1643
+ };
1644
+ this.scrollToEnd = ({ behavior = "auto" } = {}) => {
1645
+ if (this.options.count > 0) {
1646
+ this.scrollToIndex(this.options.count - 1, {
1647
+ align: "end",
1648
+ behavior
1649
+ });
1650
+ return;
1651
+ }
1652
+ this.scrollToOffset(Math.max(this.getTotalSize() - this.getSize(), 0), {
1653
+ behavior
1654
+ });
1655
+ };
1656
+ this.getTotalSize = () => {
1657
+ var _a, _b;
1658
+ const measurements = this.getMeasurements();
1659
+ let end;
1660
+ if (measurements.length === 0) {
1661
+ end = this.options.paddingStart;
1662
+ } else if (this.options.lanes === 1) {
1663
+ const lastIdx = measurements.length - 1;
1664
+ const flat = (_a = this._singleLaneMeasurements) == null ? void 0 : _a.flat;
1665
+ if (flat != null) {
1666
+ end = flat[lastIdx * 2] + flat[lastIdx * 2 + 1];
1667
+ } else {
1668
+ end = ((_b = measurements[lastIdx]) == null ? void 0 : _b.end) ?? 0;
1669
+ }
1670
+ } else {
1671
+ const endByLane = Array(this.options.lanes).fill(null);
1672
+ let endIndex = measurements.length - 1;
1673
+ while (endIndex >= 0 && endByLane.some((val) => val === null)) {
1674
+ const item = measurements[endIndex];
1675
+ if (endByLane[item.lane] === null) {
1676
+ endByLane[item.lane] = item.end;
1677
+ }
1678
+ endIndex--;
1679
+ }
1680
+ end = Math.max(...endByLane.filter((val) => val !== null));
1681
+ }
1682
+ return Math.max(
1683
+ end - this.options.scrollMargin + this.options.paddingEnd,
1684
+ 0
1685
+ );
1686
+ };
1687
+ this.takeSnapshot = () => {
1688
+ const snapshot = [];
1689
+ if (this.itemSizeCache.size === 0) return snapshot;
1690
+ const m3 = this.getMeasurements();
1691
+ for (const item of m3) {
1692
+ if (item && this.itemSizeCache.has(item.key)) {
1693
+ snapshot.push({
1694
+ index: item.index,
1695
+ key: item.key,
1696
+ start: item.start,
1697
+ size: item.size,
1698
+ end: item.end,
1699
+ lane: item.lane
1700
+ });
1701
+ }
1702
+ }
1703
+ return snapshot;
1704
+ };
1705
+ this._scrollToOffset = (offset, {
1706
+ adjustments,
1707
+ behavior
1708
+ }) => {
1709
+ this._intendedScrollOffset = offset + (adjustments ?? 0);
1710
+ this.options.scrollToFn(offset, { behavior, adjustments }, this);
1711
+ };
1712
+ this.measure = () => {
1713
+ this.pendingMin = null;
1714
+ this.itemSizeCache.clear();
1715
+ this.laneAssignments.clear();
1716
+ this.itemSizeCacheVersion++;
1717
+ this.notify(false);
1718
+ };
1719
+ this.setOptions(opts);
1720
+ }
1721
+ // Returns `true` when it performed a synchronous `scrollTop` write this
1722
+ // tick, `false` when the delta was zero or the write was deferred (iOS).
1723
+ // `resizeItem` uses that to decide whether the follow-up `notify` must be
1724
+ // synchronous so the grown transforms commit in the same paint (#1227).
1725
+ applyScrollAdjustment(delta, behavior) {
1726
+ if (delta === 0) return false;
1727
+ if (this.options.debug) {
1728
+ console.info("correction", delta);
1729
+ }
1730
+ if (isIOSWebKit() && (this.isScrolling || this._iosTouching || this._iosJustTouchEnded)) {
1731
+ this._iosDeferredAdjustment += delta;
1732
+ return false;
1733
+ } else {
1734
+ const target = this.getScrollOffset() + this.scrollAdjustments + delta;
1735
+ const el = this.scrollElement;
1736
+ const maxAtWrite = el !== null && ("scrollHeight" in el || "document" in el) ? this.getMaxScrollOffset() : null;
1737
+ this._clampedAdjustment = maxAtWrite !== null && target > maxAtWrite + 0.5 ? { target, maxAtWrite } : null;
1738
+ this._scrollToOffset(this.getScrollOffset(), {
1739
+ adjustments: this.scrollAdjustments += delta,
1740
+ behavior
1741
+ });
1742
+ if (this.scrollOffset !== null) {
1743
+ this.scrollOffset += this.scrollAdjustments;
1744
+ if (this.scrollOffset < 0) this.scrollOffset = 0;
1745
+ this.scrollAdjustments = 0;
1746
+ }
1747
+ return true;
1748
+ }
1749
+ }
1750
+ scheduleScrollReconcile() {
1751
+ if (!this.targetWindow) {
1752
+ this.scrollState = null;
1753
+ return;
1754
+ }
1755
+ if (this.rafId != null) return;
1756
+ this.rafId = this.targetWindow.requestAnimationFrame(() => {
1757
+ this.rafId = null;
1758
+ this.reconcileScroll();
1759
+ });
1760
+ }
1761
+ reconcileScroll() {
1762
+ if (!this.scrollState) return;
1763
+ const el = this.scrollElement;
1764
+ if (!el) return;
1765
+ const MAX_RECONCILE_MS = 5e3;
1766
+ if (this.now() - this.scrollState.startedAt > MAX_RECONCILE_MS) {
1767
+ this.scrollState = null;
1768
+ return;
1769
+ }
1770
+ const offsetInfo = this.scrollState.index != null ? this.getOffsetForIndex(this.scrollState.index, this.scrollState.align) : void 0;
1771
+ const targetOffset = offsetInfo ? offsetInfo[0] : this.scrollState.lastTargetOffset;
1772
+ const STABLE_FRAMES = 1;
1773
+ const targetChanged = targetOffset !== this.scrollState.lastTargetOffset;
1774
+ if (!targetChanged && approxEqual(targetOffset, this.getScrollOffset())) {
1775
+ this.scrollState.stableFrames++;
1776
+ if (this.scrollState.stableFrames >= STABLE_FRAMES) {
1777
+ if (this.getScrollOffset() !== targetOffset) {
1778
+ this._scrollToOffset(targetOffset, {
1779
+ adjustments: void 0,
1780
+ behavior: "auto"
1781
+ });
1782
+ }
1783
+ this.scrollState = null;
1784
+ return;
1785
+ }
1786
+ } else {
1787
+ this.scrollState.stableFrames = 0;
1788
+ if (targetChanged) {
1789
+ const viewport = this.getSize() || 600;
1790
+ const distance = Math.abs(targetOffset - this.getScrollOffset());
1791
+ const keepSmooth = this.scrollState.behavior === "smooth" && distance > viewport;
1792
+ this.scrollState.lastTargetOffset = targetOffset;
1793
+ if (!keepSmooth) {
1794
+ this.scrollState.behavior = "auto";
1795
+ }
1796
+ this._scrollToOffset(targetOffset, {
1797
+ adjustments: void 0,
1798
+ behavior: keepSmooth ? "smooth" : "auto"
1799
+ });
1800
+ }
1801
+ }
1802
+ this.scheduleScrollReconcile();
1803
+ }
1804
+ };
1805
+ var findNearestBinarySearch = (low, high, getCurrentValue, value) => {
1806
+ while (low <= high) {
1807
+ const middle = (low + high) / 2 | 0;
1808
+ const currentValue = getCurrentValue(middle);
1809
+ if (currentValue < value) {
1810
+ low = middle + 1;
1811
+ } else if (currentValue > value) {
1812
+ high = middle - 1;
1813
+ } else {
1814
+ return middle;
1815
+ }
1816
+ }
1817
+ if (low > 0) {
1818
+ return low - 1;
1819
+ } else {
1820
+ return 0;
1821
+ }
1822
+ };
1823
+ function findNearestBinarySearchFlat(flat, high, value) {
1824
+ let low = 0;
1825
+ while (low <= high) {
1826
+ const middle = (low + high) / 2 | 0;
1827
+ const currentValue = flat[middle * 2];
1828
+ if (currentValue < value) {
1829
+ low = middle + 1;
1830
+ } else if (currentValue > value) {
1831
+ high = middle - 1;
1832
+ } else {
1833
+ return middle;
1834
+ }
1835
+ }
1836
+ return low > 0 ? low - 1 : 0;
1837
+ }
1838
+ function calculateRangeImpl(measurements, outerSize, scrollOffset, lanes, flat) {
1839
+ const lastIndex = measurements.length - 1;
1840
+ if (measurements.length <= lanes) {
1841
+ return { startIndex: 0, endIndex: lastIndex };
1842
+ }
1843
+ if (lanes === 1 && flat !== null) {
1844
+ const startIndex2 = findNearestBinarySearchFlat(
1845
+ flat,
1846
+ lastIndex,
1847
+ scrollOffset
1848
+ );
1849
+ let endIndex2 = startIndex2;
1850
+ const limit = scrollOffset + outerSize;
1851
+ while (endIndex2 < lastIndex && flat[endIndex2 * 2] + flat[endIndex2 * 2 + 1] < limit) {
1852
+ endIndex2++;
1853
+ }
1854
+ return { startIndex: startIndex2, endIndex: endIndex2 };
1855
+ }
1856
+ const getStart = (index) => measurements[index].start;
1857
+ let startIndex = findNearestBinarySearch(0, lastIndex, getStart, scrollOffset);
1858
+ let endIndex = startIndex;
1859
+ if (lanes === 1) {
1860
+ while (endIndex < lastIndex && measurements[endIndex].end < scrollOffset + outerSize) {
1861
+ endIndex++;
1862
+ }
1863
+ } else if (lanes > 1) {
1864
+ const endPerLane = Array(lanes).fill(0);
1865
+ while (endIndex < lastIndex && endPerLane.some((pos) => pos < scrollOffset + outerSize)) {
1866
+ const item = measurements[endIndex];
1867
+ endPerLane[item.lane] = item.end;
1868
+ endIndex++;
1869
+ }
1870
+ const startPerLane = Array(lanes).fill(scrollOffset + outerSize);
1871
+ while (startIndex >= 0 && startPerLane.some((pos) => pos >= scrollOffset)) {
1872
+ const item = measurements[startIndex];
1873
+ startPerLane[item.lane] = item.start;
1874
+ startIndex--;
1875
+ }
1876
+ startIndex = Math.max(0, startIndex - startIndex % lanes);
1877
+ endIndex = Math.min(lastIndex, endIndex + (lanes - 1 - endIndex % lanes));
1878
+ }
1879
+ return { startIndex, endIndex };
1880
+ }
1881
+
1882
+ // ../node_modules/@tanstack/react-virtual/dist/esm/index.js
1883
+ var useIsomorphicLayoutEffect = typeof document !== "undefined" ? L2.useLayoutEffect : L2.useEffect;
1884
+ function useVirtualizerBase({
1885
+ useFlushSync = true,
1886
+ directDomUpdates = false,
1887
+ directDomUpdatesMode = "transform",
1888
+ ...options
1889
+ }) {
1890
+ const rerender = L2.useReducer((x3) => x3 + 1, 0)[1];
1891
+ const directRef = L2.useRef({
1892
+ enabled: directDomUpdates,
1893
+ mode: directDomUpdatesMode,
1894
+ container: null,
1895
+ lastSize: null,
1896
+ // Keyed by the element itself so a remounted node (same key, new DOM
1897
+ // node — e.g. when `enabled` is toggled off then on) is treated as fresh
1898
+ // and gets its style written.
1899
+ lastPositions: /* @__PURE__ */ new WeakMap(),
1900
+ prevRange: null
1901
+ });
1902
+ directRef.current.enabled = directDomUpdates;
1903
+ directRef.current.mode = directDomUpdatesMode;
1904
+ const measuringFromRef = L2.useRef(false);
1905
+ const applyContainerSize = (instance2) => {
1906
+ const state = directRef.current;
1907
+ if (!state.enabled || !state.container) return;
1908
+ const totalSize = instance2.getTotalSize();
1909
+ if (totalSize !== state.lastSize) {
1910
+ state.lastSize = totalSize;
1911
+ const sizeAxis = instance2.options.horizontal ? "width" : "height";
1912
+ state.container.style[sizeAxis] = `${totalSize}px`;
1913
+ }
1914
+ };
1915
+ const applyDirectStyles = (instance2) => {
1916
+ const state = directRef.current;
1917
+ if (!state.enabled || !state.container) return;
1918
+ applyContainerSize(instance2);
1919
+ const horizontal = !!instance2.options.horizontal;
1920
+ const useTransform = state.mode === "transform";
1921
+ const posAxis = horizontal ? "left" : "top";
1922
+ const scrollMargin = instance2.options.scrollMargin;
1923
+ const items = instance2.getVirtualItems();
1924
+ for (const item of items) {
1925
+ const next = item.start - scrollMargin;
1926
+ const el = instance2.elementsCache.get(item.key);
1927
+ if (!el) continue;
1928
+ if (state.lastPositions.get(el) === next) continue;
1929
+ state.lastPositions.set(el, next);
1930
+ if (useTransform) {
1931
+ el.style.transform = horizontal ? `translate3d(${next}px, 0, 0)` : `translate3d(0, ${next}px, 0)`;
1932
+ } else {
1933
+ el.style[posAxis] = `${next}px`;
1934
+ }
1935
+ }
1936
+ };
1937
+ const resolvedOptions = {
1938
+ ...options,
1939
+ onChange: (instance2, sync) => {
1940
+ var _a;
1941
+ const state = directRef.current;
1942
+ let shouldRerender = true;
1943
+ if (state.enabled) {
1944
+ applyDirectStyles(instance2);
1945
+ const range = instance2.range;
1946
+ const prev = state.prevRange;
1947
+ shouldRerender = !prev || prev.isScrolling !== instance2.isScrolling || prev.startIndex !== (range == null ? void 0 : range.startIndex) || prev.endIndex !== (range == null ? void 0 : range.endIndex);
1948
+ if (shouldRerender) {
1949
+ state.prevRange = range ? {
1950
+ startIndex: range.startIndex,
1951
+ endIndex: range.endIndex,
1952
+ isScrolling: instance2.isScrolling
1953
+ } : null;
1954
+ }
1955
+ }
1956
+ if (shouldRerender) {
1957
+ if (useFlushSync && sync && !measuringFromRef.current) {
1958
+ flushSync(rerender);
1959
+ } else {
1960
+ rerender();
1961
+ }
1962
+ }
1963
+ (_a = options.onChange) == null ? void 0 : _a.call(options, instance2, sync);
1964
+ }
1965
+ };
1966
+ const [instance] = L2.useState(() => {
1967
+ const v3 = new Virtualizer(resolvedOptions);
1968
+ const measureElement2 = v3.measureElement;
1969
+ v3.measureElement = (node) => {
1970
+ measuringFromRef.current = true;
1971
+ try {
1972
+ measureElement2(node);
1973
+ } finally {
1974
+ measuringFromRef.current = false;
1975
+ }
1976
+ };
1977
+ return Object.assign(v3, {
1978
+ containerRef: (node) => {
1979
+ const state = directRef.current;
1980
+ state.container = node;
1981
+ state.lastSize = null;
1982
+ if (node && state.enabled) {
1983
+ const total = v3.getTotalSize();
1984
+ state.lastSize = total;
1985
+ const axis = v3.options.horizontal ? "width" : "height";
1986
+ node.style[axis] = `${total}px`;
1987
+ }
1988
+ }
1989
+ });
1990
+ });
1991
+ instance.setOptions(resolvedOptions);
1992
+ useIsomorphicLayoutEffect(() => {
1993
+ return instance._didMount();
1994
+ }, []);
1995
+ useIsomorphicLayoutEffect(() => {
1996
+ applyContainerSize(instance);
1997
+ return instance._willUpdate();
1998
+ });
1999
+ useIsomorphicLayoutEffect(() => {
2000
+ applyDirectStyles(instance);
2001
+ });
2002
+ return instance;
2003
+ }
2004
+ function useVirtualizer(options) {
2005
+ return useVirtualizerBase({
2006
+ observeElementRect,
2007
+ observeElementOffset,
2008
+ scrollToFn: elementScroll,
2009
+ ...options
2010
+ });
2011
+ }
2012
+ function v(e2) {
2013
+ let l4 = useRef({ value: "", selectionStart: null, selectionEnd: null });
2014
+ return E(e2, "blur", (n6) => {
2015
+ let t = n6.target;
2016
+ l2(t) && (l4.current = { value: t.value, selectionStart: t.selectionStart, selectionEnd: t.selectionEnd });
2017
+ }), o2(() => {
2018
+ if (!d(e2) && l2(e2) && e2.isConnected) {
2019
+ if (e2.focus({ preventScroll: true }), e2.value !== l4.current.value) e2.setSelectionRange(e2.value.length, e2.value.length);
2020
+ else {
2021
+ let { selectionStart: n6, selectionEnd: t } = l4.current;
2022
+ n6 !== null && t !== null && e2.setSelectionRange(n6, t);
2023
+ }
2024
+ l4.current = { value: "", selectionStart: null, selectionEnd: null };
2025
+ }
2026
+ });
2027
+ }
2028
+ function F(c5, { container: e2, accept: t, walk: r3 }) {
2029
+ let o4 = useRef(t), l4 = useRef(r3);
2030
+ useEffect(() => {
2031
+ o4.current = t, l4.current = r3;
2032
+ }, [t, r3]), n(() => {
2033
+ if (!e2 || !c5) return;
2034
+ let n6 = l$1(e2);
2035
+ if (!n6) return;
2036
+ let f4 = o4.current, p5 = l4.current, i2 = Object.assign((m3) => f4(m3), { acceptNode: f4 }), u10 = n6.createTreeWalker(e2, NodeFilter.SHOW_ELEMENT, i2, false);
2037
+ for (; u10.nextNode(); ) p5(u10.currentNode);
2038
+ }, [e2, c5, o4, l4]);
2039
+ }
2040
+
2041
+ // ../node_modules/@headlessui/react/dist/components/combobox/combobox-machine.js
2042
+ var I = Object.defineProperty;
2043
+ var h = (t, i2, e2) => i2 in t ? I(t, i2, { enumerable: true, configurable: true, writable: true, value: e2 }) : t[i2] = e2;
2044
+ var f3 = (t, i2, e2) => (h(t, typeof i2 != "symbol" ? i2 + "" : i2, e2), e2);
2045
+ var P = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(P || {});
2046
+ var k3 = ((e2) => (e2[e2.Single = 0] = "Single", e2[e2.Multi = 1] = "Multi", e2))(k3 || {});
2047
+ var _ = ((n6) => (n6[n6.Pointer = 0] = "Pointer", n6[n6.Focus = 1] = "Focus", n6[n6.Other = 2] = "Other", n6))(_ || {});
2048
+ var D = ((l4) => (l4[l4.OpenCombobox = 0] = "OpenCombobox", l4[l4.CloseCombobox = 1] = "CloseCombobox", l4[l4.GoToOption = 2] = "GoToOption", l4[l4.SetTyping = 3] = "SetTyping", l4[l4.RegisterOption = 4] = "RegisterOption", l4[l4.UnregisterOption = 5] = "UnregisterOption", l4[l4.DefaultToFirstOption = 6] = "DefaultToFirstOption", l4[l4.SetActivationTrigger = 7] = "SetActivationTrigger", l4[l4.UpdateVirtualConfiguration = 8] = "UpdateVirtualConfiguration", l4[l4.SetInputElement = 9] = "SetInputElement", l4[l4.SetButtonElement = 10] = "SetButtonElement", l4[l4.SetOptionsElement = 11] = "SetOptionsElement", l4[l4.MarkInputAsMoved = 12] = "MarkInputAsMoved", l4))(D || {});
2049
+ function v2(t, i2 = (e2) => e2) {
2050
+ let e2 = t.activeOptionIndex !== null ? t.options[t.activeOptionIndex] : null, n6 = i2(t.options.slice()), o4 = n6.length > 0 && n6[0].dataRef.current.order !== null ? n6.sort((u10, a4) => u10.dataRef.current.order - a4.dataRef.current.order) : G(n6, (u10) => u10.dataRef.current.domRef.current), r3 = e2 ? o4.indexOf(e2) : null;
2051
+ return r3 === -1 && (r3 = null), { options: o4, activeOptionIndex: r3 };
2052
+ }
2053
+ var j2 = { [1](t) {
2054
+ var e2;
2055
+ if ((e2 = t.dataRef.current) != null && e2.disabled || t.comboboxState === 1) return t;
2056
+ let i2 = t.inputElement ? c2$1.Tracked(a$1(t.inputElement)) : t.inputPositionState;
2057
+ return { ...t, activeOptionIndex: null, comboboxState: 1, isTyping: false, activationTrigger: 2, inputPositionState: i2, __demoMode: false };
2058
+ }, [0](t) {
2059
+ var i2, e2;
2060
+ if ((i2 = t.dataRef.current) != null && i2.disabled || t.comboboxState === 0) return t;
2061
+ if ((e2 = t.dataRef.current) != null && e2.value) {
2062
+ let n6 = t.dataRef.current.calculateIndex(t.dataRef.current.value);
2063
+ if (n6 !== -1) return { ...t, activeOptionIndex: n6, comboboxState: 0, __demoMode: false, inputPositionState: c2$1.Idle };
2064
+ }
2065
+ return { ...t, comboboxState: 0, inputPositionState: c2$1.Idle, __demoMode: false };
2066
+ }, [3](t, i2) {
2067
+ return t.isTyping === i2.isTyping ? t : { ...t, isTyping: i2.isTyping };
2068
+ }, [2](t, i2) {
2069
+ var r3, u10, a4, s4;
2070
+ if ((r3 = t.dataRef.current) != null && r3.disabled || t.optionsElement && !((u10 = t.dataRef.current) != null && u10.optionsPropsRef.current.static) && t.comboboxState === 1) return t;
2071
+ if (t.virtual) {
2072
+ let { options: p5, disabled: c5 } = t.virtual, m3 = i2.focus === c$1.Specific ? i2.idx : f(i2, { resolveItems: () => p5, resolveActiveIndex: () => {
2073
+ var l4, x3;
2074
+ return (x3 = (l4 = t.activeOptionIndex) != null ? l4 : p5.findIndex((S3) => !c5(S3))) != null ? x3 : null;
2075
+ }, resolveDisabled: c5, resolveId() {
2076
+ throw new Error("Function not implemented.");
2077
+ } }), b3 = (a4 = i2.trigger) != null ? a4 : 2;
2078
+ return t.activeOptionIndex === m3 && t.activationTrigger === b3 ? t : { ...t, activeOptionIndex: m3, activationTrigger: b3, isTyping: false, __demoMode: false };
2079
+ }
2080
+ let e2 = v2(t);
2081
+ if (e2.activeOptionIndex === null) {
2082
+ let p5 = e2.options.findIndex((c5) => !c5.dataRef.current.disabled);
2083
+ p5 !== -1 && (e2.activeOptionIndex = p5);
2084
+ }
2085
+ let n6 = i2.focus === c$1.Specific ? i2.idx : f(i2, { resolveItems: () => e2.options, resolveActiveIndex: () => e2.activeOptionIndex, resolveId: (p5) => p5.id, resolveDisabled: (p5) => p5.dataRef.current.disabled }), o4 = (s4 = i2.trigger) != null ? s4 : 2;
2086
+ return t.activeOptionIndex === n6 && t.activationTrigger === o4 ? t : { ...t, ...e2, isTyping: false, activeOptionIndex: n6, activationTrigger: o4, __demoMode: false };
2087
+ }, [4]: (t, i2) => {
2088
+ var r3, u10, a4, s4;
2089
+ if ((r3 = t.dataRef.current) != null && r3.virtual) return { ...t, options: [...t.options, i2.payload] };
2090
+ let e2 = i2.payload, n6 = v2(t, (p5) => (p5.push(e2), p5));
2091
+ t.activeOptionIndex === null && (a4 = (u10 = t.dataRef.current).isSelected) != null && a4.call(u10, i2.payload.dataRef.current.value) && (n6.activeOptionIndex = n6.options.indexOf(e2));
2092
+ let o4 = { ...t, ...n6, activationTrigger: 2 };
2093
+ return (s4 = t.dataRef.current) != null && s4.__demoMode && t.dataRef.current.value === void 0 && (o4.activeOptionIndex = 0), o4;
2094
+ }, [5]: (t, i2) => {
2095
+ var n6;
2096
+ if ((n6 = t.dataRef.current) != null && n6.virtual) return { ...t, options: t.options.filter((o4) => o4.id !== i2.id) };
2097
+ let e2 = v2(t, (o4) => {
2098
+ let r3 = o4.findIndex((u10) => u10.id === i2.id);
2099
+ return r3 !== -1 && o4.splice(r3, 1), o4;
2100
+ });
2101
+ return { ...t, ...e2, activationTrigger: 2 };
2102
+ }, [6]: (t, i2) => t.defaultToFirstOption === i2.value ? t : { ...t, defaultToFirstOption: i2.value }, [7]: (t, i2) => t.activationTrigger === i2.trigger ? t : { ...t, activationTrigger: i2.trigger }, [8]: (t, i2) => {
2103
+ var n6, o4;
2104
+ if (t.virtual === null) return { ...t, virtual: { options: i2.options, disabled: (n6 = i2.disabled) != null ? n6 : () => false } };
2105
+ if (t.virtual.options === i2.options && t.virtual.disabled === i2.disabled) return t;
2106
+ let e2 = t.activeOptionIndex;
2107
+ if (t.activeOptionIndex !== null) {
2108
+ let r3 = i2.options.indexOf(t.virtual.options[t.activeOptionIndex]);
2109
+ r3 !== -1 ? e2 = r3 : e2 = null;
2110
+ }
2111
+ return { ...t, activeOptionIndex: e2, virtual: { options: i2.options, disabled: (o4 = i2.disabled) != null ? o4 : () => false } };
2112
+ }, [9]: (t, i2) => t.inputElement === i2.element ? t : { ...t, inputElement: i2.element }, [10]: (t, i2) => t.buttonElement === i2.element ? t : { ...t, buttonElement: i2.element }, [11]: (t, i2) => t.optionsElement === i2.element ? t : { ...t, optionsElement: i2.element }, [12](t) {
2113
+ return t.inputPositionState.kind !== "Tracked" ? t : { ...t, inputPositionState: c2$1.Moved };
2114
+ } };
2115
+ var y3 = class _y extends T {
2116
+ constructor(e2) {
2117
+ super(e2);
2118
+ f3(this, "actions", { onChange: (e3) => {
2119
+ let { onChange: n6, compare: o4, mode: r3, value: u10 } = this.state.dataRef.current;
2120
+ return u(r3, { [0]: () => n6 == null ? void 0 : n6(e3), [1]: () => {
2121
+ let a4 = u10.slice(), s4 = a4.findIndex((p5) => o4(p5, e3));
2122
+ return s4 === -1 ? a4.push(e3) : a4.splice(s4, 1), n6 == null ? void 0 : n6(a4);
2123
+ } });
2124
+ }, registerOption: (e3, n6) => (this.send({ type: 4, payload: { id: e3, dataRef: n6 } }), () => {
2125
+ this.state.activeOptionIndex === this.state.dataRef.current.calculateIndex(n6.current.value) && this.send({ type: 6, value: true }), this.send({ type: 5, id: e3 });
2126
+ }), goToOption: (e3, n6) => (this.send({ type: 6, value: false }), this.send({ type: 2, ...e3, trigger: n6 })), setIsTyping: (e3) => {
2127
+ this.send({ type: 3, isTyping: e3 });
2128
+ }, closeCombobox: () => {
2129
+ var e3, n6;
2130
+ this.send({ type: 1 }), this.send({ type: 6, value: false }), (n6 = (e3 = this.state.dataRef.current).onClose) == null || n6.call(e3);
2131
+ }, openCombobox: () => {
2132
+ this.send({ type: 0 }), this.send({ type: 6, value: true });
2133
+ }, setActivationTrigger: (e3) => {
2134
+ this.send({ type: 7, trigger: e3 });
2135
+ }, selectActiveOption: () => {
2136
+ let e3 = this.selectors.activeOptionIndex(this.state);
2137
+ if (e3 !== null) {
2138
+ if (this.actions.setIsTyping(false), this.state.virtual) this.actions.onChange(this.state.virtual.options[e3]);
2139
+ else {
2140
+ let { dataRef: n6 } = this.state.options[e3];
2141
+ this.actions.onChange(n6.current.value);
2142
+ }
2143
+ this.actions.goToOption({ focus: c$1.Specific, idx: e3 });
2144
+ }
2145
+ }, setInputElement: (e3) => {
2146
+ this.send({ type: 9, element: e3 });
2147
+ }, setButtonElement: (e3) => {
2148
+ this.send({ type: 10, element: e3 });
2149
+ }, setOptionsElement: (e3) => {
2150
+ this.send({ type: 11, element: e3 });
2151
+ } });
2152
+ f3(this, "selectors", { activeDescendantId: (e3) => {
2153
+ var o4, r3;
2154
+ let n6 = this.selectors.activeOptionIndex(e3);
2155
+ if (n6 !== null) return e3.virtual ? (r3 = e3.options.find((u10) => !u10.dataRef.current.disabled && e3.dataRef.current.compare(u10.dataRef.current.value, e3.virtual.options[n6]))) == null ? void 0 : r3.id : (o4 = e3.options[n6]) == null ? void 0 : o4.id;
2156
+ }, activeOptionIndex: (e3) => {
2157
+ if (e3.defaultToFirstOption && e3.activeOptionIndex === null && (e3.virtual ? e3.virtual.options.length > 0 : e3.options.length > 0)) {
2158
+ if (e3.virtual) {
2159
+ let { options: o4, disabled: r3 } = e3.virtual, u10 = o4.findIndex((a4) => {
2160
+ var s4;
2161
+ return !((s4 = r3 == null ? void 0 : r3(a4)) != null && s4);
2162
+ });
2163
+ if (u10 !== -1) return u10;
2164
+ }
2165
+ let n6 = e3.options.findIndex((o4) => !o4.dataRef.current.disabled);
2166
+ if (n6 !== -1) return n6;
2167
+ }
2168
+ return e3.activeOptionIndex;
2169
+ }, activeOption: (e3) => {
2170
+ var o4, r3;
2171
+ let n6 = this.selectors.activeOptionIndex(e3);
2172
+ return n6 === null ? null : e3.virtual ? e3.virtual.options[n6 != null ? n6 : 0] : (r3 = (o4 = e3.options[n6]) == null ? void 0 : o4.dataRef.current.value) != null ? r3 : null;
2173
+ }, isActive: (e3, n6, o4) => {
2174
+ var u10;
2175
+ let r3 = this.selectors.activeOptionIndex(e3);
2176
+ return r3 === null ? false : e3.virtual ? r3 === e3.dataRef.current.calculateIndex(n6) : ((u10 = e3.options[r3]) == null ? void 0 : u10.id) === o4;
2177
+ }, shouldScrollIntoView: (e3, n6, o4) => !(e3.virtual || e3.__demoMode || e3.comboboxState !== 0 || e3.activationTrigger === 0 || !this.selectors.isActive(e3, n6, o4)), didInputMove(e3) {
2178
+ return e3.inputPositionState.kind === "Moved";
2179
+ } });
2180
+ {
2181
+ let n6 = this.state.id, o4 = x.get(null);
2182
+ this.disposables.add(o4.on(k2.Push, (r3) => {
2183
+ !o4.selectors.isTop(r3, n6) && this.state.comboboxState === 0 && this.actions.closeCombobox();
2184
+ })), this.on(0, () => o4.actions.push(n6)), this.on(1, () => o4.actions.pop(n6));
2185
+ }
2186
+ this.disposables.group((n6) => {
2187
+ this.on(1, (o4) => {
2188
+ o4.inputElement && (n6.dispose(), n6.add(p$1(o4.inputElement, o4.inputPositionState, () => {
2189
+ this.send({ type: 12 });
2190
+ })));
2191
+ });
2192
+ });
2193
+ }
2194
+ static new({ id: e2, virtual: n6 = null, __demoMode: o4 = false }) {
2195
+ var r3;
2196
+ return new _y({ id: e2, dataRef: { current: {} }, comboboxState: o4 ? 0 : 1, isTyping: false, options: [], virtual: n6 ? { options: n6.options, disabled: (r3 = n6.disabled) != null ? r3 : () => false } : null, activeOptionIndex: null, activationTrigger: 2, inputElement: null, buttonElement: null, optionsElement: null, __demoMode: o4, inputPositionState: c2$1.Idle });
2197
+ }
2198
+ reduce(e2, n6) {
2199
+ return u(n6.type, j2, e2, n6);
2200
+ }
2201
+ };
2202
+ var u9 = createContext(null);
2203
+ function p4(n6) {
2204
+ let o4 = useContext(u9);
2205
+ if (o4 === null) {
2206
+ let e2 = new Error(`<${n6} /> is missing a parent <Combobox /> component.`);
2207
+ throw Error.captureStackTrace && Error.captureStackTrace(e2, b2), e2;
2208
+ }
2209
+ return o4;
2210
+ }
2211
+ function b2({ id: n6, virtual: o4 = null, __demoMode: e2 = false }) {
2212
+ let t = useMemo(() => y3.new({ id: n6, virtual: o4, __demoMode: e2 }), []);
2213
+ return c2(() => t.dispose()), t;
2214
+ }
2215
+
2216
+ // ../node_modules/@headlessui/react/dist/components/combobox/combobox.js
2217
+ var de = createContext(null);
2218
+ de.displayName = "ComboboxDataContext";
2219
+ function te(T3) {
2220
+ let O = useContext(de);
2221
+ if (O === null) {
2222
+ let e2 = new Error(`<${T3} /> is missing a parent <Combobox /> component.`);
2223
+ throw Error.captureStackTrace && Error.captureStackTrace(e2, te), e2;
2224
+ }
2225
+ return O;
2226
+ }
2227
+ var Le = createContext(null);
2228
+ function Eo(T3) {
2229
+ let O = p4("VirtualProvider"), e2 = te("VirtualProvider"), { options: o4 } = e2.virtual, E3 = S(O, (a4) => a4.optionsElement), [R, y4] = useMemo(() => {
2230
+ let a4 = E3;
2231
+ if (!a4) return [0, 0];
2232
+ let u10 = window.getComputedStyle(a4);
2233
+ return [parseFloat(u10.paddingBlockStart || u10.paddingTop), parseFloat(u10.paddingBlockEnd || u10.paddingBottom)];
2234
+ }, [E3]), b3 = useVirtualizer({ enabled: o4.length !== 0, scrollPaddingStart: R, scrollPaddingEnd: y4, count: o4.length, estimateSize() {
2235
+ return 40;
2236
+ }, getScrollElement() {
2237
+ return O.state.optionsElement;
2238
+ }, overscan: 12 }), [h2, p5] = useState(0);
2239
+ n(() => {
2240
+ p5((a4) => a4 + 1);
2241
+ }, [o4]);
2242
+ let f4 = b3.getVirtualItems(), n6 = S(O, (a4) => a4.activationTrigger === _.Pointer), m3 = S(O, O.selectors.activeOptionIndex);
2243
+ return f4.length === 0 ? null : L2__default.createElement(Le.Provider, { value: b3 }, L2__default.createElement("div", { style: { position: "relative", width: "100%", height: `${b3.getTotalSize()}px` }, ref: (a4) => {
2244
+ a4 && (n6 || m3 !== null && o4.length > m3 && b3.scrollToIndex(m3));
2245
+ } }, f4.map((a4) => {
2246
+ var u10;
2247
+ return L2__default.createElement(Fragment, { key: a4.key }, L2__default.cloneElement((u10 = T3.children) == null ? void 0 : u10.call(T3, { ...T3.slot, option: o4[a4.index] }), { key: `${h2}-${a4.key}`, "data-index": a4.index, "aria-setsize": o4.length, "aria-posinset": a4.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${a4.start}px)`, overflowAnchor: "none" } }));
2248
+ })));
2249
+ }
2250
+ var ho = Fragment;
2251
+ function Ao(T3, O) {
2252
+ let e2 = r(), o4 = a(), { value: E3, defaultValue: R, onChange: y4, form: b3, name: h2, by: p5, invalid: f4 = false, disabled: n6 = o4 || false, onClose: m3, __demoMode: a4 = false, multiple: u10 = false, immediate: A2 = false, virtual: d2 = null, nullable: X, ...G2 } = T3, C = l(R), [x3 = u10 ? [] : void 0, v3] = b(E3, y4, C), c5 = b2({ id: e2, virtual: d2, __demoMode: a4 }), z = useRef({ static: false, hold: false }), D2 = u2(p5), K2 = o2((i2) => d2 ? p5 === null ? d2.options.indexOf(i2) : d2.options.findIndex((M) => D2(M, i2)) : c5.state.options.findIndex((M) => D2(M.dataRef.current.value, i2))), W = useCallback((i2) => u(l4.mode, { [k3.Multi]: () => x3.some((M) => D2(M, i2)), [k3.Single]: () => D2(x3, i2) }), [x3]), S3 = S(c5, (i2) => i2.virtual), j3 = o2(() => m3 == null ? void 0 : m3()), l4 = useMemo(() => ({ __demoMode: a4, immediate: A2, optionsPropsRef: z, value: x3, defaultValue: C, disabled: n6, invalid: f4, mode: u10 ? k3.Multi : k3.Single, virtual: d2 ? S3 : null, onChange: v3, isSelected: W, calculateIndex: K2, compare: D2, onClose: j3 }), [a4, A2, z, x3, C, n6, f4, u10, d2, S3, v3, W, K2, D2, j3]);
2253
+ n(() => {
2254
+ var i2;
2255
+ d2 && c5.send({ type: D.UpdateVirtualConfiguration, options: d2.options, disabled: (i2 = d2.disabled) != null ? i2 : null });
2256
+ }, [d2, d2 == null ? void 0 : d2.options, d2 == null ? void 0 : d2.disabled]), n(() => {
2257
+ c5.state.dataRef.current = l4;
2258
+ }, [l4]);
2259
+ let [k4, Y2, s4, U] = S(c5, (i2) => [i2.comboboxState, i2.buttonElement, i2.inputElement, i2.optionsElement]), $ = x.get(null), ne = S($, useCallback((i2) => $.selectors.isTop(i2, e2), [$, e2]));
2260
+ k3$1(ne, [Y2, s4, U], () => c5.actions.closeCombobox());
2261
+ let be = S(c5, c5.selectors.activeOptionIndex), ee = S(c5, c5.selectors.activeOption), q = n2({ open: k4 === P.Open, disabled: n6, invalid: f4, activeIndex: be, activeOption: ee, value: x3 }), [t, V3] = V(), P2 = O === null ? {} : { ref: O }, N3 = useCallback(() => {
2262
+ if (C !== void 0) return v3 == null ? void 0 : v3(C);
2263
+ }, [v3, C]), g2 = K();
2264
+ return L2__default.createElement(V3, { value: t, props: { htmlFor: s4 == null ? void 0 : s4.id }, slot: { open: k4 === P.Open, disabled: n6 } }, L2__default.createElement(Ae, null, L2__default.createElement(de.Provider, { value: l4 }, L2__default.createElement(u9.Provider, { value: c5 }, L2__default.createElement(c, { value: u(k4, { [P.Open]: i3.Open, [P.Closed]: i3.Closed }) }, h2 != null && L2__default.createElement(j, { disabled: n6, data: x3 != null ? { [h2]: x3 } : {}, form: b3, onReset: N3 }), g2({ ourProps: P2, theirProps: G2, slot: q, defaultTag: ho, name: "Combobox" }))))));
2265
+ }
2266
+ var Io = "input";
2267
+ function Ro(T3, O) {
2268
+ var ee, q;
2269
+ let e2 = p4("Combobox.Input"), o4$1 = te("Combobox.Input"), E3 = r(), R = u$1(), { id: y4 = R || `headlessui-combobox-input-${E3}`, onChange: b3, displayValue: h2, disabled: p5 = o4$1.disabled || false, autoFocus: f4 = false, type: n6 = "text", ...m3 } = T3, a4 = useRef(null), u10 = y(a4, O, Fe(), e2.actions.setInputElement), [A2, d2] = S(e2, (t) => [t.comboboxState, t.isTyping]), X = p(), G2 = o2(() => {
2270
+ e2.actions.onChange(null), e2.state.optionsElement && (e2.state.optionsElement.scrollTop = 0), e2.actions.goToOption({ focus: c$1.Nothing });
2271
+ }), C = useMemo(() => {
2272
+ var t;
2273
+ return typeof h2 == "function" && o4$1.value !== void 0 ? (t = h2(o4$1.value)) != null ? t : "" : typeof o4$1.value == "string" ? o4$1.value : "";
2274
+ }, [o4$1.value, h2]);
2275
+ m(([t, V3], [P2, N3]) => {
2276
+ if (e2.state.isTyping) return;
2277
+ let g2 = a4.current;
2278
+ g2 && ((N3 === P.Open && V3 === P.Closed || t !== P2) && (g2.value = t), requestAnimationFrame(() => {
2279
+ if (e2.state.isTyping || !g2 || d(g2)) return;
2280
+ let { selectionStart: i2, selectionEnd: M } = g2;
2281
+ Math.abs((M != null ? M : 0) - (i2 != null ? i2 : 0)) === 0 && i2 === 0 && g2.setSelectionRange(g2.value.length, g2.value.length);
2282
+ }));
2283
+ }, [C, A2, d2]), m(([t], [V3]) => {
2284
+ if (t === P.Open && V3 === P.Closed) {
2285
+ if (e2.state.isTyping) return;
2286
+ let P2 = a4.current;
2287
+ if (!P2) return;
2288
+ let N3 = P2.value, { selectionStart: g2, selectionEnd: i2, selectionDirection: M } = P2;
2289
+ P2.value = "", P2.value = N3, M !== null ? P2.setSelectionRange(g2, i2, M) : P2.setSelectionRange(g2, i2);
2290
+ }
2291
+ }, [A2]);
2292
+ let x3 = useRef(false), v3 = o2(() => {
2293
+ x3.current = true;
2294
+ }), c5 = o2(() => {
2295
+ X.nextFrame(() => {
2296
+ x3.current = false;
2297
+ });
2298
+ }), z = o2((t) => {
2299
+ switch (e2.actions.setIsTyping(true), t.key) {
2300
+ case o4.Enter:
2301
+ if (e2.state.comboboxState !== P.Open || x3.current) return;
2302
+ if (t.preventDefault(), t.stopPropagation(), e2.selectors.activeOptionIndex(e2.state) === null) {
2303
+ e2.actions.closeCombobox();
2304
+ return;
2305
+ }
2306
+ e2.actions.selectActiveOption(), o4$1.mode === k3.Single && e2.actions.closeCombobox();
2307
+ break;
2308
+ case o4.ArrowDown:
2309
+ return t.preventDefault(), t.stopPropagation(), u(e2.state.comboboxState, { [P.Open]: () => e2.actions.goToOption({ focus: c$1.Next }), [P.Closed]: () => e2.actions.openCombobox() });
2310
+ case o4.ArrowUp:
2311
+ return t.preventDefault(), t.stopPropagation(), u(e2.state.comboboxState, { [P.Open]: () => e2.actions.goToOption({ focus: c$1.Previous }), [P.Closed]: () => {
2312
+ flushSync(() => e2.actions.openCombobox()), o4$1.value || e2.actions.goToOption({ focus: c$1.Last });
2313
+ } });
2314
+ case o4.Home:
2315
+ if (e2.state.comboboxState === P.Closed || t.shiftKey) break;
2316
+ return t.preventDefault(), t.stopPropagation(), e2.actions.goToOption({ focus: c$1.First });
2317
+ case o4.PageUp:
2318
+ return t.preventDefault(), t.stopPropagation(), e2.actions.goToOption({ focus: c$1.First });
2319
+ case o4.End:
2320
+ if (e2.state.comboboxState === P.Closed || t.shiftKey) break;
2321
+ return t.preventDefault(), t.stopPropagation(), e2.actions.goToOption({ focus: c$1.Last });
2322
+ case o4.PageDown:
2323
+ return t.preventDefault(), t.stopPropagation(), e2.actions.goToOption({ focus: c$1.Last });
2324
+ case o4.Escape:
2325
+ return e2.state.comboboxState !== P.Open ? void 0 : (t.preventDefault(), e2.state.optionsElement && !o4$1.optionsPropsRef.current.static && t.stopPropagation(), o4$1.mode === k3.Single && o4$1.value === null && G2(), e2.actions.closeCombobox());
2326
+ case o4.Tab:
2327
+ if (e2.actions.setIsTyping(false), e2.state.comboboxState !== P.Open) return;
2328
+ o4$1.mode === k3.Single && e2.state.activationTrigger !== _.Focus && e2.actions.selectActiveOption(), e2.actions.closeCombobox();
2329
+ break;
2330
+ }
2331
+ }), D2 = o2((t) => {
2332
+ b3 == null || b3(t), o4$1.mode === k3.Single && t.target.value === "" && G2(), e2.actions.openCombobox();
2333
+ }), K2 = o2((t) => {
2334
+ var P2, N3, g2;
2335
+ let V3 = (P2 = t.relatedTarget) != null ? P2 : n$1.find((i2) => i2 !== t.currentTarget);
2336
+ if (!((N3 = e2.state.optionsElement) != null && N3.contains(V3)) && !((g2 = e2.state.buttonElement) != null && g2.contains(V3)) && e2.state.comboboxState === P.Open) return t.preventDefault(), o4$1.mode === k3.Single && o4$1.value === null && G2(), e2.actions.closeCombobox();
2337
+ }), W = o2((t) => {
2338
+ var P2, N3, g2;
2339
+ let V3 = (P2 = t.relatedTarget) != null ? P2 : n$1.find((i2) => i2 !== t.currentTarget);
2340
+ (N3 = e2.state.buttonElement) != null && N3.contains(V3) || (g2 = e2.state.optionsElement) != null && g2.contains(V3) || o4$1.disabled || o4$1.immediate && e2.state.comboboxState !== P.Open && X.microTask(() => {
2341
+ flushSync(() => e2.actions.openCombobox()), e2.actions.setActivationTrigger(_.Focus);
2342
+ });
2343
+ }), S3 = N(), j3 = w$1(), { isFocused: l4, focusProps: k4 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: f4 }), { isHovered: Y2, hoverProps: s4 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: p5 }), U = S(e2, (t) => t.optionsElement), $ = n2({ open: A2 === P.Open, disabled: p5, invalid: o4$1.invalid, hover: Y2, focus: l4, autofocus: f4 }), ne = V$1({ ref: u10, id: y4, role: "combobox", type: n6, "aria-controls": U == null ? void 0 : U.id, "aria-expanded": A2 === P.Open, "aria-activedescendant": S(e2, e2.selectors.activeDescendantId), "aria-labelledby": S3, "aria-describedby": j3, "aria-autocomplete": "list", defaultValue: (q = (ee = T3.defaultValue) != null ? ee : o4$1.defaultValue !== void 0 ? h2 == null ? void 0 : h2(o4$1.defaultValue) : null) != null ? q : o4$1.defaultValue, disabled: p5 || void 0, autoFocus: f4, onCompositionStart: v3, onCompositionEnd: c5, onKeyDown: z, onChange: D2, onFocus: W, onBlur: K2 }, k4, s4);
2344
+ return K()({ ourProps: ne, theirProps: m3, slot: $, defaultTag: Io, name: "Combobox.Input" });
2345
+ }
2346
+ var _o = "button";
2347
+ function Fo(T3, O) {
2348
+ let e2 = p4("Combobox.Button"), o4$1 = te("Combobox.Button"), [E3, R] = useState(null), y4 = y(O, R, e2.actions.setButtonElement), b3 = r(), { id: h2 = `headlessui-combobox-button-${b3}`, disabled: p5 = o4$1.disabled || false, autoFocus: f4 = false, ...n6 } = T3, [m3, a4, u10] = S(e2, (l4) => [l4.comboboxState, l4.inputElement, l4.optionsElement]), A2 = v(a4), d2 = m3 === P.Open;
2349
+ L(d2, { trigger: E3, action: useCallback((l4) => {
2350
+ if (E3 != null && E3.contains(l4.target)) return S$1.Ignore;
2351
+ if (a4 != null && a4.contains(l4.target)) return S$1.Ignore;
2352
+ let k4 = l4.target.closest('[role="option"]:not([data-disabled])');
2353
+ return n3(k4) ? S$1.Select(k4) : u10 != null && u10.contains(l4.target) ? S$1.Ignore : S$1.Close;
2354
+ }, [E3, a4, u10]), close: e2.actions.closeCombobox, select: e2.actions.selectActiveOption });
2355
+ let X = o2((l4) => {
2356
+ switch (l4.key) {
2357
+ case o4.Space:
2358
+ case o4.Enter:
2359
+ l4.preventDefault(), l4.stopPropagation(), e2.state.comboboxState === P.Closed && flushSync(() => e2.actions.openCombobox()), A2();
2360
+ return;
2361
+ case o4.ArrowDown:
2362
+ l4.preventDefault(), l4.stopPropagation(), e2.state.comboboxState === P.Closed && (flushSync(() => e2.actions.openCombobox()), e2.state.dataRef.current.value || e2.actions.goToOption({ focus: c$1.First })), A2();
2363
+ return;
2364
+ case o4.ArrowUp:
2365
+ l4.preventDefault(), l4.stopPropagation(), e2.state.comboboxState === P.Closed && (flushSync(() => e2.actions.openCombobox()), e2.state.dataRef.current.value || e2.actions.goToOption({ focus: c$1.Last })), A2();
2366
+ return;
2367
+ case o4.Escape:
2368
+ if (e2.state.comboboxState !== P.Open) return;
2369
+ l4.preventDefault(), e2.state.optionsElement && !o4$1.optionsPropsRef.current.static && l4.stopPropagation(), flushSync(() => e2.actions.closeCombobox()), A2();
2370
+ return;
2371
+ default:
2372
+ return;
2373
+ }
2374
+ }), G2 = s(() => {
2375
+ e2.state.comboboxState === P.Open ? e2.actions.closeCombobox() : e2.actions.openCombobox(), A2();
2376
+ }), C = N([h2]), { isFocusVisible: x3, focusProps: v3 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: f4 }), { isHovered: c5, hoverProps: z } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: p5 }), { pressed: D2, pressProps: K2 } = w({ disabled: p5 }), W = n2({ open: m3 === P.Open, active: D2 || m3 === P.Open, disabled: p5, invalid: o4$1.invalid, value: o4$1.value, hover: c5, focus: x3 }), S3 = V$1({ ref: y4, id: h2, type: e(T3, E3), tabIndex: -1, "aria-haspopup": "listbox", "aria-controls": u10 == null ? void 0 : u10.id, "aria-expanded": m3 === P.Open, "aria-labelledby": C, disabled: p5 || void 0, autoFocus: f4, onKeyDown: X }, G2, v3, z, K2);
2377
+ return K()({ ourProps: S3, theirProps: n6, slot: W, defaultTag: _o, name: "Combobox.Button" });
2378
+ }
2379
+ var Do = "div";
2380
+ var So = A.RenderStrategy | A.Static;
2381
+ function Mo(T3, O) {
2382
+ var M, Ce, ve;
2383
+ let e2 = r(), { id: o4 = `headlessui-combobox-options-${e2}`, hold: E3 = false, anchor: R, portal: y4 = false, modal: b3 = true, transition: h2 = false, ...p5 } = T3, f4 = p4("Combobox.Options"), n6 = te("Combobox.Options"), m3 = ye(R);
2384
+ m3 && (y4 = true);
2385
+ let [a4, u10] = Re(m3), [A2, d2] = useState(null), X = Te(), G2 = y(O, m3 ? a4 : null, f4.actions.setOptionsElement, d2), [C, x3, v3, c5, z] = S(f4, (_2) => [_2.comboboxState, _2.inputElement, _2.buttonElement, _2.optionsElement, _2.activationTrigger]), D2 = u2$1(x3 || v3), K2 = u2$1(c5), W = u3(), [S3, j3] = N$1(h2, A2, W !== null ? (W & i3.Open) === i3.Open : C === P.Open);
2386
+ p2(S3, x3, f4.actions.closeCombobox);
2387
+ let l4 = n6.__demoMode ? false : b3 && C === P.Open;
2388
+ f2(l4, K2);
2389
+ let k4 = n6.__demoMode ? false : b3 && C === P.Open;
2390
+ y2(k4, { allowed: useCallback(() => [x3, v3, c5], [x3, v3, c5]) });
2391
+ let s4 = S(f4, f4.selectors.didInputMove) ? false : S3;
2392
+ n(() => {
2393
+ var _2;
2394
+ n6.optionsPropsRef.current.static = (_2 = T3.static) != null ? _2 : false;
2395
+ }, [n6.optionsPropsRef, T3.static]), n(() => {
2396
+ n6.optionsPropsRef.current.hold = E3;
2397
+ }, [n6.optionsPropsRef, E3]), F(C === P.Open, { container: c5, accept(_2) {
2398
+ return _2.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : _2.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
2399
+ }, walk(_2) {
2400
+ _2.setAttribute("role", "none");
2401
+ } });
2402
+ let U = N([v3 == null ? void 0 : v3.id]), $ = n2({ open: C === P.Open, option: void 0 }), ne = o2(() => {
2403
+ f4.actions.setActivationTrigger(_.Pointer);
2404
+ }), be = o2((_2) => {
2405
+ _2.preventDefault(), f4.actions.setActivationTrigger(_.Pointer);
2406
+ }), ee = V$1(m3 ? X() : {}, { "aria-labelledby": U, role: "listbox", "aria-multiselectable": n6.mode === k3.Multi ? true : void 0, id: o4, ref: G2, style: { ...p5.style, ...u10, "--input-width": w2(S3, x3, true).width, "--button-width": w2(S3, v3, true).width }, onWheel: z === _.Pointer ? void 0 : ne, onMouseDown: be, ...x2(j3) }), q = S3 && C === P.Closed && !T3.static, t = u4(q, (M = n6.virtual) == null ? void 0 : M.options), V3 = u4(q, n6.value), P2 = useCallback((_2) => n6.compare(V3, _2), [n6.compare, V3]), N3 = useMemo(() => {
2407
+ if (!n6.virtual) return n6;
2408
+ if (t === void 0) throw new Error("Missing `options` in virtual mode");
2409
+ return t !== n6.virtual.options ? { ...n6, virtual: { ...n6.virtual, options: t } } : n6;
2410
+ }, [n6, t, (Ce = n6.virtual) == null ? void 0 : Ce.options]);
2411
+ n6.virtual && Object.assign(p5, { children: L2__default.createElement(de.Provider, { value: N3 }, L2__default.createElement(Eo, { slot: $ }, p5.children)) });
2412
+ let g2 = K(), i2 = useMemo(() => n6.mode === k3.Multi ? n6 : { ...n6, isSelected: P2 }, [n6, P2]);
2413
+ return L2__default.createElement(le, { enabled: y4 ? T3.static || S3 : false, ownerDocument: D2 }, L2__default.createElement(de.Provider, { value: i2 }, g2({ ourProps: ee, theirProps: { ...p5, children: L2__default.createElement(s2, { freeze: q }, typeof p5.children == "function" ? (ve = p5.children) == null ? void 0 : ve.call(p5, $) : p5.children) }, slot: $, defaultTag: Do, features: So, visible: s4, name: "Combobox.Options" })));
2414
+ }
2415
+ var Lo = "div";
2416
+ function Vo(T3, O) {
2417
+ var l4, k4, Y2;
2418
+ let e2 = te("Combobox.Option"), o4 = p4("Combobox.Option"), E3 = r(), { id: R = `headlessui-combobox-option-${E3}`, value: y4, disabled: b3 = (Y2 = (k4 = (l4 = e2.virtual) == null ? void 0 : l4.disabled) == null ? void 0 : k4.call(l4, y4)) != null ? Y2 : false, order: h2 = null, ...p5 } = T3, [f4] = S(o4, (s4) => [s4.inputElement]), n6 = v(f4), m3 = S(o4, useCallback((s4) => o4.selectors.isActive(s4, y4, R), [y4, R])), a4 = e2.isSelected(y4), u10 = useRef(null), A2 = s$1({ disabled: b3, value: y4, domRef: u10, order: h2 }), d2 = useContext(Le), X = y(O, u10, d2 ? d2.measureElement : null), G2 = o2(() => {
2419
+ o4.actions.setIsTyping(false), o4.actions.onChange(y4);
2420
+ });
2421
+ n(() => o4.actions.registerOption(R, A2), [A2, R]);
2422
+ let C = S(o4, useCallback((s4) => o4.selectors.shouldScrollIntoView(s4, y4, R), [y4, R]));
2423
+ n(() => {
2424
+ if (C) return o().requestAnimationFrame(() => {
2425
+ var s4, U;
2426
+ (U = (s4 = u10.current) == null ? void 0 : s4.scrollIntoView) == null || U.call(s4, { block: "nearest" });
2427
+ });
2428
+ }, [C, u10]);
2429
+ let x3 = o2((s4) => {
2430
+ s4.preventDefault(), s4.button === g2.Left && (b3 || (G2(), n4() || requestAnimationFrame(() => n6()), e2.mode === k3.Single && o4.actions.closeCombobox()));
2431
+ }), v3 = o2(() => {
2432
+ if (b3) return o4.actions.goToOption({ focus: c$1.Nothing });
2433
+ let s4 = e2.calculateIndex(y4);
2434
+ o4.actions.goToOption({ focus: c$1.Specific, idx: s4 });
2435
+ }), c5 = u3$1(), z = o2((s4) => c5.update(s4)), D2 = o2((s4) => {
2436
+ if (!c5.wasMoved(s4) || b3 || m3 && o4.state.activationTrigger === _.Pointer) return;
2437
+ let U = e2.calculateIndex(y4);
2438
+ o4.actions.goToOption({ focus: c$1.Specific, idx: U }, _.Pointer);
2439
+ }), K2 = o2((s4) => {
2440
+ c5.wasMoved(s4) && (b3 || m3 && (e2.optionsPropsRef.current.hold || o4.state.activationTrigger === _.Pointer && o4.actions.goToOption({ focus: c$1.Nothing })));
2441
+ }), W = n2({ active: m3, focus: m3, selected: a4, disabled: b3 }), S3 = { id: R, ref: X, role: "option", tabIndex: b3 === true ? void 0 : -1, "aria-disabled": b3 === true ? true : void 0, "aria-selected": a4, disabled: void 0, onMouseDown: x3, onFocus: v3, onPointerEnter: z, onMouseEnter: z, onPointerMove: D2, onMouseMove: D2, onPointerLeave: K2, onMouseLeave: K2 };
2442
+ return K()({ ourProps: S3, theirProps: p5, slot: W, defaultTag: Lo, name: "Combobox.Option" });
2443
+ }
2444
+ var wo = Y(Ao);
2445
+ var Bo = Y(Fo);
2446
+ var ko = Y(Ro);
2447
+ var No = Z;
2448
+ var Uo = Y(Mo);
2449
+ var Ho = Y(Vo);
2450
+ var Ht = Object.assign(wo, { Input: ko, Button: Bo, Label: No, Options: Uo, Option: Ho });
2451
+ var Combobox = ({
2452
+ options,
2453
+ value,
2454
+ onChange,
2455
+ onSearch,
2456
+ placeholder = "Search...",
2457
+ multiple = false,
2458
+ isLoading = false,
2459
+ disabled = false,
2460
+ name,
2461
+ id,
2462
+ className
2463
+ }) => {
2464
+ const { formatMessage } = useIntl();
2465
+ const [query, setQuery] = useState("");
2466
+ const filteredOptions = useMemo(() => {
2467
+ if (onSearch) return options;
2468
+ if (!query) return options;
2469
+ return options.filter(
2470
+ (opt) => opt.label.toLowerCase().includes(query.toLowerCase())
2471
+ );
2472
+ }, [options, query, onSearch]);
2473
+ const handleInputChange = (e2) => {
2474
+ const q = e2.target.value;
2475
+ setQuery(q);
2476
+ onSearch?.(q);
2477
+ };
2478
+ const selectedLabels = useMemo(() => {
2479
+ if (!multiple || !Array.isArray(value)) return [];
2480
+ return value.map((v3) => options.find((o4) => o4.value === v3)).filter(Boolean);
2481
+ }, [value, options, multiple]);
2482
+ const displayValue = useMemo(() => {
2483
+ if (multiple) return "";
2484
+ if (!value || Array.isArray(value)) return "";
2485
+ return options.find((o4) => o4.value === value)?.label || "";
2486
+ }, [value, options, multiple]);
2487
+ if (multiple) {
2488
+ return /* @__PURE__ */ jsxs("div", { className, children: [
2489
+ selectedLabels.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mb-2", children: selectedLabels.map((opt) => /* @__PURE__ */ jsx(
2490
+ Badge_default,
2491
+ {
2492
+ text: opt.label,
2493
+ color: "slate",
2494
+ onClick: () => {
2495
+ const next = value.filter(
2496
+ (v3) => v3 !== opt.value
2497
+ );
2498
+ onChange(next);
2499
+ }
2500
+ },
2501
+ opt.value
2502
+ )) }),
2503
+ /* @__PURE__ */ jsx(
2504
+ Ht,
2505
+ {
2506
+ value: value || [],
2507
+ onChange,
2508
+ multiple: true,
2509
+ disabled,
2510
+ name,
2511
+ immediate: true,
2512
+ children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
2513
+ /* @__PURE__ */ jsx(
2514
+ ko,
2515
+ {
2516
+ id,
2517
+ className: "w-full rounded-md border border-border-default bg-surface-input py-2 pl-3 pr-10 text-sm text-text-primary placeholder:text-text-muted shadow-xs focus:outline-hidden focus:ring-2 focus:ring-focus-ring",
2518
+ placeholder,
2519
+ onChange: handleInputChange,
2520
+ displayValue: () => query
2521
+ }
2522
+ ),
2523
+ /* @__PURE__ */ jsx(Bo, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ jsx(
2524
+ ChevronUpDownIcon_default,
2525
+ {
2526
+ className: "h-5 w-5 text-text-muted",
2527
+ "aria-hidden": "true"
2528
+ }
2529
+ ) }),
2530
+ /* @__PURE__ */ jsx(Uo, { className: "absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-md bg-surface border border-border-subtle py-1 text-sm shadow-lg focus:outline-hidden", children: isLoading ? /* @__PURE__ */ jsx("div", { className: "px-4 py-2 text-text-muted", children: formatMessage({
2531
+ id: "loading",
2532
+ defaultMessage: "Loading ..."
2533
+ }) }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-4 py-2 text-text-muted", children: formatMessage({
2534
+ id: "no_results_found",
2535
+ defaultMessage: "No results found"
2536
+ }) }) : filteredOptions.map((opt) => /* @__PURE__ */ jsx(
2537
+ Ho,
2538
+ {
2539
+ value: opt.value,
2540
+ className: "group relative cursor-pointer select-none py-2 pl-10 pr-4 text-text-primary data-focus:bg-surface-raised",
2541
+ children: ({ selected }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
2542
+ /* @__PURE__ */ jsx(
2543
+ "span",
2544
+ {
2545
+ className: clsx_default(
2546
+ "block truncate",
2547
+ selected && "font-medium"
2548
+ ),
2549
+ children: opt.label
2550
+ }
2551
+ ),
2552
+ selected && /* @__PURE__ */ jsx("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-accent", children: /* @__PURE__ */ jsx(CheckIcon_default, { className: "h-5 w-5", "aria-hidden": "true" }) })
2553
+ ] })
2554
+ },
2555
+ opt.value
2556
+ )) })
2557
+ ] })
2558
+ }
2559
+ )
2560
+ ] });
2561
+ }
2562
+ return /* @__PURE__ */ jsx(
2563
+ Ht,
2564
+ {
2565
+ value: value || null,
2566
+ onChange,
2567
+ disabled,
2568
+ name,
2569
+ children: /* @__PURE__ */ jsxs("div", { className: clsx_default("relative", className), children: [
2570
+ /* @__PURE__ */ jsx(
2571
+ ko,
2572
+ {
2573
+ id,
2574
+ className: "w-full rounded-md border border-border-default bg-surface-input py-2.5 pl-4 pr-10 text-sm text-text-primary placeholder:text-text-muted shadow-xs focus:outline-hidden focus:ring-2 focus:ring-focus-ring",
2575
+ placeholder,
2576
+ onChange: handleInputChange,
2577
+ displayValue: () => query || displayValue
2578
+ }
2579
+ ),
2580
+ /* @__PURE__ */ jsx(Bo, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ jsx(
2581
+ ChevronUpDownIcon_default,
2582
+ {
2583
+ className: "h-5 w-5 text-text-muted",
2584
+ "aria-hidden": "true"
2585
+ }
2586
+ ) }),
2587
+ /* @__PURE__ */ jsx(Uo, { className: "absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-md bg-surface border border-border-subtle py-1 text-sm shadow-lg focus:outline-hidden", children: isLoading ? /* @__PURE__ */ jsx("div", { className: "px-4 py-2 text-text-muted", children: formatMessage({ id: "loading", defaultMessage: "Loading ..." }) }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-4 py-2 text-text-muted", children: formatMessage({
2588
+ id: "no_results_found",
2589
+ defaultMessage: "No results found"
2590
+ }) }) : filteredOptions.map((opt) => /* @__PURE__ */ jsx(
2591
+ Ho,
2592
+ {
2593
+ value: opt.value,
2594
+ className: "group relative cursor-pointer select-none py-2 pl-10 pr-4 text-text-primary data-focus:bg-surface-raised",
2595
+ children: ({ selected }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
2596
+ /* @__PURE__ */ jsx(
2597
+ "span",
2598
+ {
2599
+ className: clsx_default(
2600
+ "block truncate",
2601
+ selected && "font-medium"
2602
+ ),
2603
+ children: opt.label
2604
+ }
2605
+ ),
2606
+ selected && /* @__PURE__ */ jsx("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-accent", children: /* @__PURE__ */ jsx(CheckIcon_default, { className: "h-5 w-5", "aria-hidden": "true" }) })
2607
+ ] })
2608
+ },
2609
+ opt.value
2610
+ )) })
2611
+ ] })
2612
+ }
2613
+ );
2614
+ };
2615
+ var Combobox_default = Combobox;
2616
+
2617
+ export { CheckboxField_default as CheckboxField, ChoicesField_default as ChoicesField, Combobox_default as Combobox, DatePickerField_default as DatePickerField, EmailField_default as EmailField, FieldWithHelp_default as FieldWithHelp, JSONAreaField_default as JSONAreaField, PasswordField_default as PasswordField, SelectField_default as SelectField, TextAreaField_default as TextAreaField };