@g4rcez/components 1.2.5 → 1.2.6

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 (370) hide show
  1. package/dist/components/core/button.d.ts.map +1 -0
  2. package/dist/components/core/heading.d.ts.map +1 -0
  3. package/dist/components/core/polymorph.d.ts.map +1 -0
  4. package/dist/components/core/render-on-view.d.ts.map +1 -0
  5. package/dist/components/core/resizable.d.ts.map +1 -0
  6. package/dist/components/core/tag.d.ts.map +1 -0
  7. package/dist/components/display/alert.d.ts.map +1 -0
  8. package/dist/components/display/calendar.d.ts.map +1 -0
  9. package/dist/components/display/card.d.ts.map +1 -0
  10. package/dist/components/display/empty.d.ts.map +1 -0
  11. package/dist/components/display/list.d.ts.map +1 -0
  12. package/dist/components/display/notifications.d.ts.map +1 -0
  13. package/dist/components/display/progress.d.ts.map +1 -0
  14. package/dist/components/display/shortcut.d.ts.map +1 -0
  15. package/dist/components/display/skeleton.d.ts.map +1 -0
  16. package/dist/components/display/stats.d.ts.map +1 -0
  17. package/dist/components/display/step.d.ts.map +1 -0
  18. package/dist/components/display/tabs.d.ts.map +1 -0
  19. package/dist/components/display/timeline.d.ts.map +1 -0
  20. package/dist/components/floating/command-palette.d.ts.map +1 -0
  21. package/dist/components/floating/dropdown.d.ts.map +1 -0
  22. package/dist/components/floating/expand.d.ts.map +1 -0
  23. package/dist/components/floating/menu.d.ts.map +1 -0
  24. package/dist/components/floating/modal.d.ts.map +1 -0
  25. package/dist/components/floating/toolbar.d.ts.map +1 -0
  26. package/dist/components/floating/tooltip.d.ts.map +1 -0
  27. package/dist/components/form/autocomplete.d.ts.map +1 -0
  28. package/dist/components/form/checkbox.d.ts.map +1 -0
  29. package/dist/components/form/date-picker.d.ts.map +1 -0
  30. package/dist/components/form/file-upload.d.ts.map +1 -0
  31. package/dist/components/form/form.d.ts.map +1 -0
  32. package/dist/components/form/formReset.d.ts.map +1 -0
  33. package/dist/components/form/free-text.d.ts.map +1 -0
  34. package/dist/components/form/input-field.d.ts.map +1 -0
  35. package/dist/components/form/input.d.ts.map +1 -0
  36. package/dist/components/form/multi-select.d.ts.map +1 -0
  37. package/dist/components/form/radiobox.d.ts.map +1 -0
  38. package/dist/components/form/select.d.ts.map +1 -0
  39. package/dist/components/form/slider.d.ts.map +1 -0
  40. package/dist/components/form/switch.d.ts.map +1 -0
  41. package/dist/components/form/task-list.d.ts.map +1 -0
  42. package/dist/components/form/textarea.d.ts.map +1 -0
  43. package/dist/components/form/transfer-list.d.ts.map +1 -0
  44. package/dist/components/index.d.ts.map +1 -0
  45. package/dist/components/table/filter.d.ts.map +1 -0
  46. package/dist/{src/components → components}/table/filter.js +6 -6
  47. package/dist/components/table/group.d.ts.map +1 -0
  48. package/dist/components/table/index.d.ts.map +1 -0
  49. package/dist/components/table/metadata.d.ts.map +1 -0
  50. package/dist/components/table/pagination.d.ts.map +1 -0
  51. package/dist/components/table/row.d.ts.map +1 -0
  52. package/dist/components/table/sort.d.ts.map +1 -0
  53. package/dist/components/table/table-lib.d.ts.map +1 -0
  54. package/dist/components/table/thead.d.ts.map +1 -0
  55. package/dist/config/context.d.ts.map +1 -0
  56. package/dist/config/default-translations.d.ts.map +1 -0
  57. package/dist/config/default-tweaks.d.ts.map +1 -0
  58. package/dist/constants.d.ts.map +1 -0
  59. package/dist/flow/flow.d.ts.map +1 -0
  60. package/dist/hooks/use-click-outside.d.ts.map +1 -0
  61. package/dist/hooks/use-color-parser.d.ts.map +1 -0
  62. package/dist/{src/hooks → hooks}/use-components-provider.d.ts +1 -1
  63. package/dist/hooks/use-components-provider.d.ts.map +1 -0
  64. package/dist/{src/hooks → hooks}/use-components-provider.js +1 -1
  65. package/dist/hooks/use-debounce.d.ts.map +1 -0
  66. package/dist/hooks/use-form.d.ts.map +1 -0
  67. package/dist/hooks/use-hover.d.ts.map +1 -0
  68. package/dist/hooks/use-is-coarse-device.d.ts.map +1 -0
  69. package/dist/hooks/use-locale.d.ts.map +1 -0
  70. package/dist/hooks/use-media-query.d.ts.map +1 -0
  71. package/dist/hooks/use-on-event.d.ts.map +1 -0
  72. package/dist/hooks/use-parent.d.ts.map +1 -0
  73. package/dist/hooks/use-previous.d.ts.map +1 -0
  74. package/dist/hooks/use-reactive.d.ts.map +1 -0
  75. package/dist/hooks/use-remove-scroll.d.ts.map +1 -0
  76. package/dist/hooks/use-stable-ref.d.ts.map +1 -0
  77. package/dist/hooks/use-swipe.d.ts.map +1 -0
  78. package/dist/hooks/use-translations.d.ts.map +1 -0
  79. package/dist/hooks/use-tweaks.d.ts.map +1 -0
  80. package/dist/index.d.ts.map +1 -0
  81. package/dist/index.js +20 -247
  82. package/dist/index.js.map +1 -1
  83. package/dist/index.mjs +10 -10
  84. package/dist/index.mjs.map +1 -1
  85. package/dist/index.umd.js +1 -1
  86. package/dist/index.umd.js.map +1 -1
  87. package/dist/lib/combi-keys.d.ts.map +1 -0
  88. package/dist/lib/dict.d.ts.map +1 -0
  89. package/dist/lib/dom.d.ts.map +1 -0
  90. package/dist/lib/fns.d.ts.map +1 -0
  91. package/dist/lib/fzf.d.ts.map +1 -0
  92. package/dist/lib/keyboard-area.d.ts.map +1 -0
  93. package/dist/styles/common.d.ts.map +1 -0
  94. package/dist/styles/dark.d.ts.map +1 -0
  95. package/dist/styles/design-tokens.d.ts.map +1 -0
  96. package/dist/styles/light.d.ts.map +1 -0
  97. package/dist/styles/theme.d.ts.map +1 -0
  98. package/dist/styles/theme.types.d.ts.map +1 -0
  99. package/dist/types.d.ts.map +1 -0
  100. package/package.json +1 -1
  101. package/dist/preset.tailwind.d.ts +0 -11
  102. package/dist/preset.tailwind.d.ts.map +0 -1
  103. package/dist/preset.tailwind.js +0 -53
  104. package/dist/src/components/core/button.d.ts.map +0 -1
  105. package/dist/src/components/core/heading.d.ts.map +0 -1
  106. package/dist/src/components/core/polymorph.d.ts.map +0 -1
  107. package/dist/src/components/core/render-on-view.d.ts.map +0 -1
  108. package/dist/src/components/core/resizable.d.ts.map +0 -1
  109. package/dist/src/components/core/tag.d.ts.map +0 -1
  110. package/dist/src/components/display/alert.d.ts.map +0 -1
  111. package/dist/src/components/display/calendar.d.ts.map +0 -1
  112. package/dist/src/components/display/card.d.ts.map +0 -1
  113. package/dist/src/components/display/empty.d.ts.map +0 -1
  114. package/dist/src/components/display/list.d.ts.map +0 -1
  115. package/dist/src/components/display/notifications.d.ts.map +0 -1
  116. package/dist/src/components/display/progress.d.ts.map +0 -1
  117. package/dist/src/components/display/shortcut.d.ts.map +0 -1
  118. package/dist/src/components/display/skeleton.d.ts.map +0 -1
  119. package/dist/src/components/display/stats.d.ts.map +0 -1
  120. package/dist/src/components/display/step.d.ts.map +0 -1
  121. package/dist/src/components/display/tabs.d.ts.map +0 -1
  122. package/dist/src/components/display/timeline.d.ts.map +0 -1
  123. package/dist/src/components/floating/command-palette.d.ts.map +0 -1
  124. package/dist/src/components/floating/dropdown.d.ts.map +0 -1
  125. package/dist/src/components/floating/expand.d.ts.map +0 -1
  126. package/dist/src/components/floating/menu.d.ts.map +0 -1
  127. package/dist/src/components/floating/modal.d.ts.map +0 -1
  128. package/dist/src/components/floating/toolbar.d.ts.map +0 -1
  129. package/dist/src/components/floating/tooltip.d.ts.map +0 -1
  130. package/dist/src/components/form/autocomplete.d.ts.map +0 -1
  131. package/dist/src/components/form/checkbox.d.ts.map +0 -1
  132. package/dist/src/components/form/date-picker.d.ts.map +0 -1
  133. package/dist/src/components/form/file-upload.d.ts.map +0 -1
  134. package/dist/src/components/form/form.d.ts.map +0 -1
  135. package/dist/src/components/form/formReset.d.ts.map +0 -1
  136. package/dist/src/components/form/free-text.d.ts.map +0 -1
  137. package/dist/src/components/form/input-field.d.ts.map +0 -1
  138. package/dist/src/components/form/input.d.ts.map +0 -1
  139. package/dist/src/components/form/multi-select.d.ts.map +0 -1
  140. package/dist/src/components/form/radiobox.d.ts.map +0 -1
  141. package/dist/src/components/form/select.d.ts.map +0 -1
  142. package/dist/src/components/form/slider.d.ts.map +0 -1
  143. package/dist/src/components/form/switch.d.ts.map +0 -1
  144. package/dist/src/components/form/task-list.d.ts.map +0 -1
  145. package/dist/src/components/form/textarea.d.ts.map +0 -1
  146. package/dist/src/components/form/transfer-list.d.ts.map +0 -1
  147. package/dist/src/components/index.d.ts.map +0 -1
  148. package/dist/src/components/table/filter.d.ts.map +0 -1
  149. package/dist/src/components/table/group.d.ts.map +0 -1
  150. package/dist/src/components/table/index.d.ts.map +0 -1
  151. package/dist/src/components/table/metadata.d.ts.map +0 -1
  152. package/dist/src/components/table/pagination.d.ts.map +0 -1
  153. package/dist/src/components/table/row.d.ts.map +0 -1
  154. package/dist/src/components/table/sort.d.ts.map +0 -1
  155. package/dist/src/components/table/table-lib.d.ts.map +0 -1
  156. package/dist/src/components/table/thead.d.ts.map +0 -1
  157. package/dist/src/config/context.d.ts.map +0 -1
  158. package/dist/src/config/default-translations.d.ts.map +0 -1
  159. package/dist/src/config/default-tweaks.d.ts.map +0 -1
  160. package/dist/src/constants.d.ts.map +0 -1
  161. package/dist/src/flow/flow.d.ts.map +0 -1
  162. package/dist/src/hooks/use-click-outside.d.ts.map +0 -1
  163. package/dist/src/hooks/use-color-parser.d.ts.map +0 -1
  164. package/dist/src/hooks/use-components-provider.d.ts.map +0 -1
  165. package/dist/src/hooks/use-debounce.d.ts.map +0 -1
  166. package/dist/src/hooks/use-form.d.ts.map +0 -1
  167. package/dist/src/hooks/use-hover.d.ts.map +0 -1
  168. package/dist/src/hooks/use-is-coarse-device.d.ts.map +0 -1
  169. package/dist/src/hooks/use-locale.d.ts.map +0 -1
  170. package/dist/src/hooks/use-media-query.d.ts.map +0 -1
  171. package/dist/src/hooks/use-on-event.d.ts.map +0 -1
  172. package/dist/src/hooks/use-parent.d.ts.map +0 -1
  173. package/dist/src/hooks/use-previous.d.ts.map +0 -1
  174. package/dist/src/hooks/use-reactive.d.ts.map +0 -1
  175. package/dist/src/hooks/use-remove-scroll.d.ts.map +0 -1
  176. package/dist/src/hooks/use-stable-ref.d.ts.map +0 -1
  177. package/dist/src/hooks/use-swipe.d.ts.map +0 -1
  178. package/dist/src/hooks/use-translations.d.ts.map +0 -1
  179. package/dist/src/hooks/use-tweaks.d.ts.map +0 -1
  180. package/dist/src/index.d.ts.map +0 -1
  181. package/dist/src/index.js +0 -20
  182. package/dist/src/lib/combi-keys.d.ts.map +0 -1
  183. package/dist/src/lib/dict.d.ts.map +0 -1
  184. package/dist/src/lib/dom.d.ts.map +0 -1
  185. package/dist/src/lib/fns.d.ts.map +0 -1
  186. package/dist/src/lib/fzf.d.ts.map +0 -1
  187. package/dist/src/lib/keyboard-area.d.ts.map +0 -1
  188. package/dist/src/styles/common.d.ts.map +0 -1
  189. package/dist/src/styles/dark.d.ts.map +0 -1
  190. package/dist/src/styles/design-tokens.d.ts.map +0 -1
  191. package/dist/src/styles/light.d.ts.map +0 -1
  192. package/dist/src/styles/theme.d.ts.map +0 -1
  193. package/dist/src/styles/theme.types.d.ts.map +0 -1
  194. package/dist/src/types.d.ts.map +0 -1
  195. /package/dist/{src/components → components}/core/button.d.ts +0 -0
  196. /package/dist/{src/components → components}/core/button.js +0 -0
  197. /package/dist/{src/components → components}/core/heading.d.ts +0 -0
  198. /package/dist/{src/components → components}/core/heading.js +0 -0
  199. /package/dist/{src/components → components}/core/polymorph.d.ts +0 -0
  200. /package/dist/{src/components → components}/core/polymorph.js +0 -0
  201. /package/dist/{src/components → components}/core/render-on-view.d.ts +0 -0
  202. /package/dist/{src/components → components}/core/render-on-view.js +0 -0
  203. /package/dist/{src/components → components}/core/resizable.d.ts +0 -0
  204. /package/dist/{src/components → components}/core/resizable.js +0 -0
  205. /package/dist/{src/components → components}/core/tag.d.ts +0 -0
  206. /package/dist/{src/components → components}/core/tag.js +0 -0
  207. /package/dist/{src/components → components}/display/alert.d.ts +0 -0
  208. /package/dist/{src/components → components}/display/alert.js +0 -0
  209. /package/dist/{src/components → components}/display/calendar.d.ts +0 -0
  210. /package/dist/{src/components → components}/display/calendar.js +0 -0
  211. /package/dist/{src/components → components}/display/card.d.ts +0 -0
  212. /package/dist/{src/components → components}/display/card.js +0 -0
  213. /package/dist/{src/components → components}/display/empty.d.ts +0 -0
  214. /package/dist/{src/components → components}/display/empty.js +0 -0
  215. /package/dist/{src/components → components}/display/list.d.ts +0 -0
  216. /package/dist/{src/components → components}/display/list.js +0 -0
  217. /package/dist/{src/components → components}/display/notifications.d.ts +0 -0
  218. /package/dist/{src/components → components}/display/notifications.js +0 -0
  219. /package/dist/{src/components → components}/display/progress.d.ts +0 -0
  220. /package/dist/{src/components → components}/display/progress.js +0 -0
  221. /package/dist/{src/components → components}/display/shortcut.d.ts +0 -0
  222. /package/dist/{src/components → components}/display/shortcut.js +0 -0
  223. /package/dist/{src/components → components}/display/skeleton.d.ts +0 -0
  224. /package/dist/{src/components → components}/display/skeleton.js +0 -0
  225. /package/dist/{src/components → components}/display/stats.d.ts +0 -0
  226. /package/dist/{src/components → components}/display/stats.js +0 -0
  227. /package/dist/{src/components → components}/display/step.d.ts +0 -0
  228. /package/dist/{src/components → components}/display/step.js +0 -0
  229. /package/dist/{src/components → components}/display/tabs.d.ts +0 -0
  230. /package/dist/{src/components → components}/display/tabs.js +0 -0
  231. /package/dist/{src/components → components}/display/timeline.d.ts +0 -0
  232. /package/dist/{src/components → components}/display/timeline.js +0 -0
  233. /package/dist/{src/components → components}/floating/command-palette.d.ts +0 -0
  234. /package/dist/{src/components → components}/floating/command-palette.js +0 -0
  235. /package/dist/{src/components → components}/floating/dropdown.d.ts +0 -0
  236. /package/dist/{src/components → components}/floating/dropdown.js +0 -0
  237. /package/dist/{src/components → components}/floating/expand.d.ts +0 -0
  238. /package/dist/{src/components → components}/floating/expand.js +0 -0
  239. /package/dist/{src/components → components}/floating/menu.d.ts +0 -0
  240. /package/dist/{src/components → components}/floating/menu.js +0 -0
  241. /package/dist/{src/components → components}/floating/modal.d.ts +0 -0
  242. /package/dist/{src/components → components}/floating/modal.js +0 -0
  243. /package/dist/{src/components → components}/floating/toolbar.d.ts +0 -0
  244. /package/dist/{src/components → components}/floating/toolbar.js +0 -0
  245. /package/dist/{src/components → components}/floating/tooltip.d.ts +0 -0
  246. /package/dist/{src/components → components}/floating/tooltip.js +0 -0
  247. /package/dist/{src/components → components}/form/autocomplete.d.ts +0 -0
  248. /package/dist/{src/components → components}/form/autocomplete.js +0 -0
  249. /package/dist/{src/components → components}/form/checkbox.d.ts +0 -0
  250. /package/dist/{src/components → components}/form/checkbox.js +0 -0
  251. /package/dist/{src/components → components}/form/date-picker.d.ts +0 -0
  252. /package/dist/{src/components → components}/form/date-picker.js +0 -0
  253. /package/dist/{src/components → components}/form/file-upload.d.ts +0 -0
  254. /package/dist/{src/components → components}/form/file-upload.js +0 -0
  255. /package/dist/{src/components → components}/form/form.d.ts +0 -0
  256. /package/dist/{src/components → components}/form/form.js +0 -0
  257. /package/dist/{src/components → components}/form/formReset.d.ts +0 -0
  258. /package/dist/{src/components → components}/form/formReset.js +0 -0
  259. /package/dist/{src/components → components}/form/free-text.d.ts +0 -0
  260. /package/dist/{src/components → components}/form/free-text.js +0 -0
  261. /package/dist/{src/components → components}/form/input-field.d.ts +0 -0
  262. /package/dist/{src/components → components}/form/input-field.js +0 -0
  263. /package/dist/{src/components → components}/form/input.d.ts +0 -0
  264. /package/dist/{src/components → components}/form/input.js +0 -0
  265. /package/dist/{src/components → components}/form/multi-select.d.ts +0 -0
  266. /package/dist/{src/components → components}/form/multi-select.js +0 -0
  267. /package/dist/{src/components → components}/form/radiobox.d.ts +0 -0
  268. /package/dist/{src/components → components}/form/radiobox.js +0 -0
  269. /package/dist/{src/components → components}/form/select.d.ts +0 -0
  270. /package/dist/{src/components → components}/form/select.js +0 -0
  271. /package/dist/{src/components → components}/form/slider.d.ts +0 -0
  272. /package/dist/{src/components → components}/form/slider.js +0 -0
  273. /package/dist/{src/components → components}/form/switch.d.ts +0 -0
  274. /package/dist/{src/components → components}/form/switch.js +0 -0
  275. /package/dist/{src/components → components}/form/task-list.d.ts +0 -0
  276. /package/dist/{src/components → components}/form/task-list.js +0 -0
  277. /package/dist/{src/components → components}/form/textarea.d.ts +0 -0
  278. /package/dist/{src/components → components}/form/textarea.js +0 -0
  279. /package/dist/{src/components → components}/form/transfer-list.d.ts +0 -0
  280. /package/dist/{src/components → components}/form/transfer-list.js +0 -0
  281. /package/dist/{src/components → components}/index.d.ts +0 -0
  282. /package/dist/{src/components → components}/index.js +0 -0
  283. /package/dist/{src/components → components}/table/filter.d.ts +0 -0
  284. /package/dist/{src/components → components}/table/group.d.ts +0 -0
  285. /package/dist/{src/components → components}/table/group.js +0 -0
  286. /package/dist/{src/components → components}/table/index.d.ts +0 -0
  287. /package/dist/{src/components → components}/table/index.js +0 -0
  288. /package/dist/{src/components → components}/table/metadata.d.ts +0 -0
  289. /package/dist/{src/components → components}/table/metadata.js +0 -0
  290. /package/dist/{src/components → components}/table/pagination.d.ts +0 -0
  291. /package/dist/{src/components → components}/table/pagination.js +0 -0
  292. /package/dist/{src/components → components}/table/row.d.ts +0 -0
  293. /package/dist/{src/components → components}/table/row.js +0 -0
  294. /package/dist/{src/components → components}/table/sort.d.ts +0 -0
  295. /package/dist/{src/components → components}/table/sort.js +0 -0
  296. /package/dist/{src/components → components}/table/table-lib.d.ts +0 -0
  297. /package/dist/{src/components → components}/table/table-lib.js +0 -0
  298. /package/dist/{src/components → components}/table/thead.d.ts +0 -0
  299. /package/dist/{src/components → components}/table/thead.js +0 -0
  300. /package/dist/{src/config → config}/context.d.ts +0 -0
  301. /package/dist/{src/config → config}/context.js +0 -0
  302. /package/dist/{src/config → config}/default-translations.d.ts +0 -0
  303. /package/dist/{src/config → config}/default-translations.js +0 -0
  304. /package/dist/{src/config → config}/default-tweaks.d.ts +0 -0
  305. /package/dist/{src/config → config}/default-tweaks.js +0 -0
  306. /package/dist/{src/constants.d.ts → constants.d.ts} +0 -0
  307. /package/dist/{src/constants.js → constants.js} +0 -0
  308. /package/dist/{src/flow → flow}/flow.d.ts +0 -0
  309. /package/dist/{src/flow → flow}/flow.js +0 -0
  310. /package/dist/{src/hooks → hooks}/use-click-outside.d.ts +0 -0
  311. /package/dist/{src/hooks → hooks}/use-click-outside.js +0 -0
  312. /package/dist/{src/hooks → hooks}/use-color-parser.d.ts +0 -0
  313. /package/dist/{src/hooks → hooks}/use-color-parser.js +0 -0
  314. /package/dist/{src/hooks → hooks}/use-debounce.d.ts +0 -0
  315. /package/dist/{src/hooks → hooks}/use-debounce.js +0 -0
  316. /package/dist/{src/hooks → hooks}/use-form.d.ts +0 -0
  317. /package/dist/{src/hooks → hooks}/use-form.js +0 -0
  318. /package/dist/{src/hooks → hooks}/use-hover.d.ts +0 -0
  319. /package/dist/{src/hooks → hooks}/use-hover.js +0 -0
  320. /package/dist/{src/hooks → hooks}/use-is-coarse-device.d.ts +0 -0
  321. /package/dist/{src/hooks → hooks}/use-is-coarse-device.js +0 -0
  322. /package/dist/{src/hooks → hooks}/use-locale.d.ts +0 -0
  323. /package/dist/{src/hooks → hooks}/use-locale.js +0 -0
  324. /package/dist/{src/hooks → hooks}/use-media-query.d.ts +0 -0
  325. /package/dist/{src/hooks → hooks}/use-media-query.js +0 -0
  326. /package/dist/{src/hooks → hooks}/use-on-event.d.ts +0 -0
  327. /package/dist/{src/hooks → hooks}/use-on-event.js +0 -0
  328. /package/dist/{src/hooks → hooks}/use-parent.d.ts +0 -0
  329. /package/dist/{src/hooks → hooks}/use-parent.js +0 -0
  330. /package/dist/{src/hooks → hooks}/use-previous.d.ts +0 -0
  331. /package/dist/{src/hooks → hooks}/use-previous.js +0 -0
  332. /package/dist/{src/hooks → hooks}/use-reactive.d.ts +0 -0
  333. /package/dist/{src/hooks → hooks}/use-reactive.js +0 -0
  334. /package/dist/{src/hooks → hooks}/use-remove-scroll.d.ts +0 -0
  335. /package/dist/{src/hooks → hooks}/use-remove-scroll.js +0 -0
  336. /package/dist/{src/hooks → hooks}/use-stable-ref.d.ts +0 -0
  337. /package/dist/{src/hooks → hooks}/use-stable-ref.js +0 -0
  338. /package/dist/{src/hooks → hooks}/use-swipe.d.ts +0 -0
  339. /package/dist/{src/hooks → hooks}/use-swipe.js +0 -0
  340. /package/dist/{src/hooks → hooks}/use-translations.d.ts +0 -0
  341. /package/dist/{src/hooks → hooks}/use-translations.js +0 -0
  342. /package/dist/{src/hooks → hooks}/use-tweaks.d.ts +0 -0
  343. /package/dist/{src/hooks → hooks}/use-tweaks.js +0 -0
  344. /package/dist/{src/index.d.ts → index.d.ts} +0 -0
  345. /package/dist/{src/lib → lib}/combi-keys.d.ts +0 -0
  346. /package/dist/{src/lib → lib}/combi-keys.js +0 -0
  347. /package/dist/{src/lib → lib}/dict.d.ts +0 -0
  348. /package/dist/{src/lib → lib}/dict.js +0 -0
  349. /package/dist/{src/lib → lib}/dom.d.ts +0 -0
  350. /package/dist/{src/lib → lib}/dom.js +0 -0
  351. /package/dist/{src/lib → lib}/fns.d.ts +0 -0
  352. /package/dist/{src/lib → lib}/fns.js +0 -0
  353. /package/dist/{src/lib → lib}/fzf.d.ts +0 -0
  354. /package/dist/{src/lib → lib}/fzf.js +0 -0
  355. /package/dist/{src/lib → lib}/keyboard-area.d.ts +0 -0
  356. /package/dist/{src/lib → lib}/keyboard-area.js +0 -0
  357. /package/dist/{src/styles → styles}/common.d.ts +0 -0
  358. /package/dist/{src/styles → styles}/common.js +0 -0
  359. /package/dist/{src/styles → styles}/dark.d.ts +0 -0
  360. /package/dist/{src/styles → styles}/dark.js +0 -0
  361. /package/dist/{src/styles → styles}/design-tokens.d.ts +0 -0
  362. /package/dist/{src/styles → styles}/design-tokens.js +0 -0
  363. /package/dist/{src/styles → styles}/light.d.ts +0 -0
  364. /package/dist/{src/styles → styles}/light.js +0 -0
  365. /package/dist/{src/styles → styles}/theme.d.ts +0 -0
  366. /package/dist/{src/styles → styles}/theme.js +0 -0
  367. /package/dist/{src/styles → styles}/theme.types.d.ts +0 -0
  368. /package/dist/{src/styles → styles}/theme.types.js +0 -0
  369. /package/dist/{src/types.d.ts → types.d.ts} +0 -0
  370. /package/dist/{src/types.js → types.js} +0 -0
package/dist/index.umd.js CHANGED
@@ -243,5 +243,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
243
243
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T1(e,t){if(e){if(typeof e=="string")return tp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tp(e,t)}}function tp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function l$(e){if(Array.isArray(e))return e}var c$=typeof ep=="function"?ep:ep.default,u$="file-invalid-type",d$="file-too-large",f$="file-too-small",p$="too-many-files",h$=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:u$,message:"File type must be ".concat(r)}},E1=function(t){return{code:d$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},C1=function(t){return{code:f$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},m$={code:p$,message:"Too many files"};function k1(e,t){var n=e.type==="application/x-moz-file"||c$(e,t);return[n,n?null:h$(t)]}function P1(e,t,n){if(oo(e.size))if(oo(t)&&oo(n)){if(e.size>n)return[!1,E1(n)];if(e.size<t)return[!1,C1(t)]}else{if(oo(t)&&e.size<t)return[!1,C1(t)];if(oo(n)&&e.size>n)return[!1,E1(n)]}return[!0,null]}function oo(e){return e!=null}function g$(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(l){var c=k1(l,n),u=ba(c,1),d=u[0],p=P1(l,r,o),f=ba(p,1),m=f[0],g=s?s(l):null;return d&&m&&!g})}function pl(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function hl(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function A1(e){e.preventDefault()}function v$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function y$(e){return e.indexOf("Edge/")!==-1}function b$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return v$(e)||y$(e)}function Bn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!pl(r)&&s&&s.apply(void 0,[r].concat(i)),pl(r)})}}function x$(){return"showOpenFilePicker"in window}function w$(e){if(oo(e)){var t=Object.entries(e).filter(function(n){var r=ba(n,2),o=r[0],i=r[1],a=!0;return _1(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(i)||!i.every(I1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=ba(r,2),i=o[0],a=o[1];return w1(w1({},n),{},S1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function S$(e){if(oo(e))return Object.entries(e).reduce(function(t,n){var r=ba(n,2),o=r[0],i=r[1];return[].concat(b1(t),[o],b1(i))},[]).filter(function(t){return _1(t)||I1(t)}).join(",")}function T$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function E$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function _1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function I1(e){return/^.*\.[\w]+$/.test(e)}var C$=["children"],k$=["open"],P$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],A$=["refKey","onChange","onClick"];function _$(e){return M$(e)||O$(e)||O1(e)||I$()}function I$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
244
244
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function M$(e){if(Array.isArray(e))return rp(e)}function np(e,t){return F$(e)||N$(e,t)||O1(e,t)||D$()}function D$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
245
245
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O1(e,t){if(e){if(typeof e=="string")return rp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rp(e,t)}}function rp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function N$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function F$(e){if(Array.isArray(e))return e}function M1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M1(Object(n),!0).forEach(function(r){op(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function op(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ml(e,t){if(e==null)return{};var n=L$(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function L$(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var ip=E.forwardRef(function(e,t){var n=e.children,r=ml(e,C$),o=N1(r),i=o.open,a=ml(o,k$);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(vt(vt({},a),{},{open:i})))});ip.displayName="Dropzone";var D1={disabled:!1,getFilesFromEvent:UV,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};ip.defaultProps=D1,ip.propTypes={children:at.func,accept:at.objectOf(at.arrayOf(at.string)),multiple:at.bool,preventDropOnDocument:at.bool,noClick:at.bool,noKeyboard:at.bool,noDrag:at.bool,noDragEventsBubbling:at.bool,minSize:at.number,maxSize:at.number,maxFiles:at.number,disabled:at.bool,getFilesFromEvent:at.func,onFileDialogCancel:at.func,onFileDialogOpen:at.func,useFsAccessApi:at.bool,autoFocus:at.bool,onDragEnter:at.func,onDragLeave:at.func,onDragOver:at.func,onDrop:at.func,onDropAccepted:at.func,onDropRejected:at.func,onError:at.func,validator:at.func};var ap={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function N1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},D1),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,S=t.noClick,w=t.noKeyboard,T=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,P=E.useMemo(function(){return S$(n)},[n]),L=E.useMemo(function(){return w$(n)},[n]),N=E.useMemo(function(){return typeof h=="function"?h:F1},[h]),$=E.useMemo(function(){return typeof g=="function"?g:F1},[g]),_=E.useRef(null),M=E.useRef(null),D=E.useReducer(V$,ap),V=np(D,2),F=V[0],H=V[1],O=F.isFocused,B=F.isFileDialogActive,X=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&x$()),Q=function(){!X.current&&B&&setTimeout(function(){if(M.current){var ne=M.current.files;ne.length||(H({type:"closeDialog"}),$())}},300)};E.useEffect(function(){return window.addEventListener("focus",Q,!1),function(){window.removeEventListener("focus",Q,!1)}},[M,B,$,X]);var J=E.useRef([]),G=function(ne){_.current&&_.current.contains(ne.target)||(ne.preventDefault(),J.current=[])};E.useEffect(function(){return x&&(document.addEventListener("dragover",A1,!1),document.addEventListener("drop",G,!1)),function(){x&&(document.removeEventListener("dragover",A1),document.removeEventListener("drop",G))}},[_,x]),E.useEffect(function(){return!r&&b&&_.current&&_.current.focus(),function(){}},[_,b,r]);var K=E.useCallback(function(q){k?k(q):console.error(q)},[k]),Z=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),J.current=[].concat(_$(J.current),[q.target]),hl(q)&&Promise.resolve(o(q)).then(function(ne){if(!(pl(q)&&!C)){var me=ne.length,De=me>0&&g$({files:ne,accept:P,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),Ue=me>0&&!De;H({isDragAccept:De,isDragReject:Ue,isDragActive:!0,type:"setDraggedFiles"}),c&&c(q)}}).catch(function(ne){return K(ne)})},[o,c,K,C,P,a,i,s,l,I]),j=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q);var ne=hl(q);if(ne&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return ne&&d&&d(q),!1},[d,C]),z=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q);var ne=J.current.filter(function(De){return _.current&&_.current.contains(De)}),me=ne.indexOf(q.target);me!==-1&&ne.splice(me,1),J.current=ne,!(ne.length>0)&&(H({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),hl(q)&&u&&u(q))},[_,u,C]),Y=E.useCallback(function(q,ne){var me=[],De=[];q.forEach(function(Ue){var Qe=k1(Ue,P),$t=np(Qe,2),Cn=$t[0],Wn=$t[1],Ir=P1(Ue,a,i),Or=np(Ir,2),Mr=Or[0],W=Or[1],U=I?I(Ue):null;if(Cn&&Mr&&!U)me.push(Ue);else{var Re=[Wn,W];U&&(Re=Re.concat(U)),De.push({file:Ue,errors:Re.filter(function(ot){return ot})})}}),(!s&&me.length>1||s&&l>=1&&me.length>l)&&(me.forEach(function(Ue){De.push({file:Ue,errors:[m$]})}),me.splice(0)),H({acceptedFiles:me,fileRejections:De,isDragReject:De.length>0,type:"setFiles"}),p&&p(me,De,ne),De.length>0&&m&&m(De,ne),me.length>0&&f&&f(me,ne)},[H,s,P,a,i,l,p,f,m,I]),ae=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),J.current=[],hl(q)&&Promise.resolve(o(q)).then(function(ne){pl(q)&&!C||Y(ne,q)}).catch(function(ne){return K(ne)}),H({type:"reset"})},[o,Y,K,C]),R=E.useCallback(function(){if(X.current){H({type:"openDialog"}),N();var q={multiple:s,types:L};window.showOpenFilePicker(q).then(function(ne){return o(ne)}).then(function(ne){Y(ne,null),H({type:"closeDialog"})}).catch(function(ne){T$(ne)?($(ne),H({type:"closeDialog"})):E$(ne)?(X.current=!1,M.current?(M.current.value=null,M.current.click()):K(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):K(ne)});return}M.current&&(H({type:"openDialog"}),N(),M.current.value=null,M.current.click())},[H,N,$,v,Y,K,L,s]),be=E.useCallback(function(q){!_.current||!_.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),R())},[_,R]),Ce=E.useCallback(function(){H({type:"focus"})},[]),Ie=E.useCallback(function(){H({type:"blur"})},[]),Be=E.useCallback(function(){S||(b$()?setTimeout(R,0):R())},[S,R]),le=function(ne){return r?null:ne},we=function(ne){return w?null:le(ne)},ce=function(ne){return T?null:le(ne)},Se=function(ne){C&&ne.stopPropagation()},ie=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=q.refKey,me=ne===void 0?"ref":ne,De=q.role,Ue=q.onKeyDown,Qe=q.onFocus,$t=q.onBlur,Cn=q.onClick,Wn=q.onDragEnter,Ir=q.onDragOver,Or=q.onDragLeave,Mr=q.onDrop,W=ml(q,P$);return vt(vt(op({onKeyDown:we(Bn(Ue,be)),onFocus:we(Bn(Qe,Ce)),onBlur:we(Bn($t,Ie)),onClick:le(Bn(Cn,Be)),onDragEnter:ce(Bn(Wn,Z)),onDragOver:ce(Bn(Ir,j)),onDragLeave:ce(Bn(Or,z)),onDrop:ce(Bn(Mr,ae)),role:typeof De=="string"&&De!==""?De:"presentation"},me,_),!r&&!w?{tabIndex:0}:{}),W)}},[_,be,Ce,Ie,Be,Z,j,z,ae,w,T,r]),de=E.useCallback(function(q){q.stopPropagation()},[]),te=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=q.refKey,me=ne===void 0?"ref":ne,De=q.onChange,Ue=q.onClick,Qe=ml(q,A$),$t=op({accept:P,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:le(Bn(De,ae)),onClick:le(Bn(Ue,de)),tabIndex:-1},me,M);return vt(vt({},$t),Qe)}},[M,n,s,ae,r]);return vt(vt({},F),{},{isFocused:O&&!r,getRootProps:ie,getInputProps:te,rootRef:_,inputRef:M,open:le(R)})}function V$(e,t){switch(t.type){case"focus":return vt(vt({},e),{},{isFocused:!0});case"blur":return vt(vt({},e),{},{isFocused:!1});case"openDialog":return vt(vt({},ap),{},{isFileDialogActive:!0});case"closeDialog":return vt(vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return vt(vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return vt(vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return vt({},ap);default:return e}}function F1(){}const L1=E.createContext([null,()=>{}]),$$=()=>E.useContext(L1),j$=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,z$={csv:qu,xls:qu,mov:Ey,mp4:Ey,xlsx:qu,pdf:Ty,txt:Ty,json:M_,mp3:P_},B$=e=>{const[,t]=$$(),[n,r]=E.useState({url:"",type:"",size:""});E.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:j$(l),size:NV(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{var c;l.preventDefault(),l.stopPropagation(),(c=e.onDeleteFile)==null||c.call(e,e.file)},a=z$[e.file.name.split(".").at(-1)]??Cy,s=n.type==="img"?y.jsx("img",{src:n.url,className:"block w-full",alt:e.file.name}):y.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return y.jsxs("li",{className:"flex w-full flex-row justify-between gap-4 border-b border-card-border last:border-b-transparent",children:[y.jsxs("div",{className:"flex flex-col gap-4",children:[y.jsxs("div",{className:"flex flex-row items-center gap-4",children:[y.jsx("button",{type:"button",onClick:o,className:"flex size-20 items-center justify-center",children:s}),y.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[y.jsx("span",{children:e.file.name}),y.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?y.jsx("div",{className:"min-w-full flex-1",children:y.jsx(e.File,{file:e.file})}):null]}),y.jsx("div",{className:"align-start justify-start flex py-4 transition-colors duration-300 ease-linear hover:text-danger-hover",children:y.jsx("button",{onClick:i,type:"button",className:"size-6 flex items-center justify-center",children:y.jsx(Hi,{size:16})})})]})},R$=e=>y.jsx("ul",{className:"w-full space-y-8",children:e.files.map(t=>y.jsx(B$,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),V1=e=>{const t=Ct(),n=e.dragging?D_:N_;return y.jsxs("div",{className:"flex flex-col items-center justify-center",children:[y.jsx("div",{className:"flex flex-col items-center justify-center gap-2",children:y.jsx(n,{className:"text-primary",size:80})}),y.jsxs("div",{className:"my-4 flex flex-col items-center gap-1",children:[y.jsx("p",{children:t.uploadIdle}),y.jsx("button",{className:"text-primary underline",type:"button",children:t.uploadIdleButton})]})]})},H$=e=>e.isDragActive?y.jsx(V1,{files:e.files,dragging:!0}):e.files.length>0?y.jsx(R$,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):y.jsx(E.Fragment,{children:e.idle}),W$=y.jsx(V1,{dragging:!1}),q$=e=>{const t=e.item.file,n=e.item.type;return y.jsxs("div",{className:"flex flex-col gap-4",children:[y.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),y.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?y.jsx("img",{className:"container block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?y.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?y.jsx("figure",{children:y.jsx("audio",{controls:!0,src:e.item.url})}):null]})},U$=({idle:e=W$,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Ct(),a=E.useState(null),[s,l]=E.useState([]),c=o.files??s,u=()=>a[1](null),d=g=>{r==null||r(g),l(h=>h.concat(g))},{getRootProps:p,getInputProps:f,isDragActive:m}=N1({onDrop:d});return y.jsxs(L1.Provider,{value:a,children:[y.jsx(ff,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?y.jsx(q$,{item:a[0]}):null}),y.jsxs("div",{...p(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[y.jsx("input",{...f(o),name:o.name,id:o.name}),y.jsx(H$,{File:n,onDeleteFile:t,isDragActive:m,idle:e,files:c})]})]})},Y$=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return y.jsx("form",{...e,onSubmit:t})},$1=40,K$=e=>y.jsx(E.Fragment,{children:e.children}),G$={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},j1=[],Z$=E.forwardRef(function(t,n){return y.jsx(pt.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:y.jsx(rr,{children:t.children})})}),X$=E.forwardRef(function({item:t,context:n,...r},o){return y.jsx(pt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),Q$={List:Z$,Item:X$},J$=e=>{const t=Ct(),n=E.useRef(null),r=E.Children.count(e.children),[o,i]=E.useState(!1);return E.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>a.width)return i(!0)},[r]),y.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?y.jsxs(Na,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},ej=E.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,onChangeOptions:g,...h},v)=>{const b=E.useMemo(()=>new xn(r.map(te=>[te.value,te])),[r]),x=E.useRef(null),S=E.useRef(null),w=h.value??h.defaultValue??j1,T=Ct(),[C,k]=E.useState(0),[I,P]=E.useState(!1),[L,N]=E.useState(""),[$,_]=E.useState(()=>{const te=new xn;return w.forEach(q=>{const ne=b.get(q);return ne?te.set(q,ne):void 0}),te}),M=E.useMemo(()=>Array.from($.keys()),[$]),[D,V]=E.useState(()=>{const te=new Set(w);return r.reduce((q,ne)=>te.has(ne.value)?[...q,ne.label??ne.value]:q,[])??w}),[F,H]=E.useState(null),O=E.useRef(j1),B=m&&L!==""?[{value:L,label:L,"data-dynamic":"true"},...r]:r,X=L.length===0?B:lf(B,"value",[{key:"value",value:L},{key:"label",value:L}]),Q=uf(I,"block-only"),J=X.filter(te=>te.hidden!==!0),G=J.length===0,{x:K,y:Z,strategy:j,refs:z,context:Y}=br({open:I,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:P,whileElementsMounted:qo,middleware:[ea(4),rx({padding:10,elementContext:"reference",apply(te){const q=te.elements.floating.querySelector("ul"),ne=(q==null?void 0:q.getBoundingClientRect().height)||0,me=wi(z.reference.current,window.innerHeight),De=Math.min(ne<$1?me:ne,me,te.availableHeight),Ue=J.length===0?$1:Math.min(De,me,ne),Qe=`${x.current.getBoundingClientRect().width}px`;Object.assign(te.elements.floating.style,{width:Qe,maxWidth:Qe,height:Ue})}})]}),ae=jx(Y,G$),{getReferenceProps:R,getFloatingProps:be,getItemProps:Ce}=xr([eo(Y,{role:"listbox"}),Jr(Y),Us(Y,{cols:0,listRef:O,loop:!0,virtual:!0,allowEscape:!0,activeIndex:F,selectedIndex:F,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:te=>H(q=>te??q)})]);E.useEffect(()=>{if(!I)return k(0);const te=z.reference;if(te.current===null)return;const q=wi(te.current,window.innerHeight);setTimeout(()=>k(Math.min(q,J.length*40)),100)},[L,I,z.reference]),E.useEffect(()=>{h.value&&_(new xn(h.value.map(te=>[te,b.get(te)])))},[h.value,b]),E.useEffect(()=>{const te=z.reference.current;if(te)return xi(te)},[]);const Ie=(te,q)=>{const ne=$.clone(Ue=>Ue.has(te.value)?Ue.remove(te.value):Ue.set(te.value,te));_(ne);const me=z.reference.current;if(!me)return;const De=ne.map(Ue=>Ue.value);me==null||me.setAttribute("data-value",JSON.stringify(De)),g&&g(De),V(Ue=>Ue.concat(te.label??"")),N(""),H(q)},Be=te=>{const q=te.target.value;return N(q),!I&&q===""?P(!0):(te.target.name=h.name||"",q?P(!0):void 0)},le=()=>{var te;P(!0),N(""),(te=z.reference.current)==null||te.focus()},we=()=>{P(!0),N("")},ce=()=>{var te;(te=z.reference.current)==null||te.setAttribute("data-value","[]"),N(""),P(!1),_(new xn),g==null||g([])},Se=h.id||h.name,ie=$.map((te,q)=>y.jsx(Na,{size:"small",icon:y.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),Ie(te,q)},children:y.jsx(Hi,{size:14})}),children:te.label??te.value},`MultiSelect-${te.value}-x`)),de={height:G?"0":$.size===0?C-49:C-86};return y.jsxs(va,{...h,left:e,error:t,ref:x,form:h.form,name:h.name,feedback:d,hideLeft:p,required:f,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:y.jsxs("span",{className:"flex items-center gap-0.5",children:[n,y.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:le,children:[y.jsx(Ru,{size:20}),y.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),$?y.jsx("button",{type:"button",onClick:ce,className:"transition-colors link:text-danger",children:y.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[y.jsxs("ul",{...R({...h,onFocus:we,id:`${Se}-shadow`,name:`${Se}-shadow`,ref:z.setReference}),tabIndex:0,role:"button","data-name":Se,"data-target":Se,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":M.join(","),className:Ae("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",h.className),children:[M.length>0?null:y.jsx("li",{className:"text-input-placeholder",children:h.placeholder}),y.jsx(J$,{label:c,children:ie})]}),y.jsx("input",{id:Se,name:Se,type:"hidden","data-origin":Se,ref:v,required:f,defaultValue:h.value||M||void 0}),y.jsx(Xr,{preserveTabOrder:!0,children:I?y.jsx(Ax,{lockScroll:!0,children:y.jsx(Qo,{modal:!0,guards:!0,returnFocus:!1,context:Y,initialFocus:-1,visuallyHiddenDismiss:!0,children:y.jsxs("div",{...be({ref:z.setFloating,style:{...ae.styles,top:Z??0,position:j,left:K,height:C-(M.length===0?65:30)}}),"data-floating":"true",className:"shadow-floating isolate z-floating m-0 max-h-96 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground",children:[y.jsx("input",{autoFocus:!0,value:L,onChange:Be,title:h.title,placeholder:T.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:te=>{var q,ne;if(te.key==="ArrowDown"){let me=F+1;return me>J.length-1&&(me=0),(q=S.current)==null||q.scrollIntoView({index:me}),H(me)}if(te.key==="ArrowUp"){let me=F-1;return me<0&&(me=J.length-1),(ne=S.current)==null||ne.scrollIntoView({index:me}),H(me)}if(te.key==="Escape")return te.currentTarget.blur(),P(!1);if(te.key==="Enter"){if(F!==null&&J[F])return te.preventDefault(),Ie(J[F],F);if(J.length===1)return te.preventDefault(),Ie(J[0],0)}}}),G?y.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:y.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||T.autocompleteEmpty})}):null,G?null:y.jsx(pt.div,{initial:!1,"data-floating":"true",ref:Q,animate:{height:G?"auto":C},style:de,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!I)return k(0);const q=z.floating.current.querySelectorAll("li").item(0),ne=(q?q.getBoundingClientRect().height:40)*J.length;return bi.flushSync(()=>k(ne+2))},children:y.jsx($f,{ref:S,hidden:G,data:J,components:Q$,style:de,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(te,q)=>{const ne=q.Render??K$,me=$.has(q.value)||$.has(q.label??""),De=F===te,Ue=q.label??q.value;return y.jsxs("button",{"data-value":q.value,...Ce({ref:Qe=>void(O.current[te]=Qe),role:"option",type:"button","aria-checked":me,"aria-current":me,"aria-selected":me,"aria-busy":q.disabled,onClick:()=>Ie(q,te)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${me||De?"bg-floating-hover text-floating-foreground":""}`,children:[y.jsx(Hf,{onChange:fd,checked:me,"aria-checked":me,onClick:Qe=>{Qe.stopPropagation(),Ie(q,te)}}),y.jsx(ne,{...h,label:q.label,value:q.value,children:Ue})]})}})}),y.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:$.size===0?y.jsx(Na,{theme:"muted",size:"small",children:T.autocompleteEmpty}):ie})]})})}):null})]})}),tj=({children:e,className:t="",size:n,...r})=>y.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[y.jsx("input",{...r,type:"radio",className:Ae("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),io=E.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:p,left:f,error:m,...g},h)=>{const v=Ct(),b=E.useRef(null),x=g.id??g.name;E.useImperativeHandle(h,()=>b.current),E.useEffect(()=>{if(b.current===null)return;const w=new AbortController,T=b.current,C=xi(b.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const S=()=>{var w;return(w=b.current)==null?void 0:w.focus()};return y.jsx(va,{info:n,left:f,error:m,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:y.jsxs("label",{htmlFor:x,children:[p,y.jsxs("button",{onClick:S,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[y.jsx(Ru,{size:20}),y.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:y.jsxs("select",{...g,id:x,name:x,required:e,ref:qn(h,b),"data-selected":!!g.value||!1,title:typeof g.title=="string"?g.title:void 0,className:Ae("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",g.className),children:[y.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>E.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${x}-select-option-${w.value}`}))]})})}),nj=e=>{const[t,n]=E.useState(null),r=E.useRef(null);return E.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Le.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Le.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),y.jsx(hf,{title:"",ref:r,as:zD,enabled:e.tooltip,className:"block rounded-full bg-input-switch size-5 cursor-grab border-1 border-input-border shadow-shadow-floating active:cursor-grabbing",children:t})},rj=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef(Lo()),s=r||o||[];return y.jsxs(VD,{...i,defaultValue:r,value:o,className:Ae("relative flex h-5 w-full touch-none select-none items-center",n),children:[y.jsx($D,{className:"relative h-2 rounded-full grow bg-background",children:y.jsx(jD,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>y.jsx(nj,{tooltip:t??!1},`${a.current}-${c}`))]})},oj=E.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=E.useId(),[s,l]=E.useState(o.checked??!1),c=s,u=E.useRef(null),d=nr(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},m=u.current;return m.addEventListener("change",f),()=>m==null?void 0:m.removeEventListener("change",f)}},[]);const p=()=>{var m,g;const f=!((m=u.current)!=null&&m.checked);l(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return y.jsxs("fieldset",{className:Ae("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[y.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[y.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:f=>l(f.target.checked)}),y.jsx("button",{type:"button",role:"switch",onClick:p,"aria-checked":c,"data-checked":c,"aria-labelledby":`${a}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:y.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),y.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:y.jsx("span",{className:"font-medium text-foreground",children:e})})]}),y.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),ij=e=>{const[t,n]=u_();return E.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const a=i.target,s=Array.from(r.querySelectorAll("input[data-task=true]")),l=s.every(u=>u.checked),c=s.indexOf(a);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:m_(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),y.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},aj=Xw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
246
- `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),sj=e=>{const[t,n]=E.useState(0);return E.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},lj={Item:E.forwardRef(function(t,n){return y.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return y.jsx("ul",{...t,ref:n,className:"space-y-3"})})},cj=e=>{const t=E.useRef(null),n=sj(t);return y.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[y.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[y.jsx("header",{className:"border-b border-card-border pb-2"}),y.jsxs("div",{className:"px-8 space-y-2",children:[y.jsx(ya,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),y.jsx($f,{height:n,useWindowScroll:!0,data:e.source,components:lj,itemContent:(r,o)=>y.jsx(E.Fragment,{children:y.jsx(Hf,{children:y.jsx(e.Item,{data:o})})})})]})]}),y.jsx("div",{children:y.jsx(Da,{children:y.jsx(Hu,{})})}),y.jsx("div",{})]})};var uj=Object.defineProperty,z1=Object.getOwnPropertySymbols,dj=Object.prototype.hasOwnProperty,fj=Object.prototype.propertyIsEnumerable,B1=(e,t,n)=>t in e?uj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pj=(e,t)=>{for(var n in t||(t={}))dj.call(t,n)&&B1(e,n,t[n]);if(z1)for(var n of z1(t))fj.call(t,n)&&B1(e,n,t[n]);return e},sp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},hj=(e,t,n,r)=>vl(sp,e,t,n,r),li=e=>typeof e=="object",Cr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!li(e)&&!li(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Cr(e[r],t[r]))},mj=(e,t)=>(li(e)||Array.isArray(e))&&t?e[t]:e,gj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,gl=e=>/[0-9.]+/.test(e),R1=e=>["string","number"].includes(typeof e),H1=e=>e==null||(e==null?void 0:e.length)===0||e==="",W1={eq:Cr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:H1,notEmpty:e=>!H1(e),in:(e,t)=>sp(t,n=>Cr(e,n)),notIn:(e,t)=>q1(t,n=>!Cr(e,n))},vj=e=>{if(e in W1)return W1[e];throw new Error("Linq - Symbol not found")},ci=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},vl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=vj(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},yj=(e,t,n,r)=>vl(ci,e,t,n,r),q1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},bj=(e,t,n,r)=>vl(q1,e,t,n,r),U1=e=>{if(e===null)return null;const t=pj({},e);return Object.keys(t).forEach(n=>t[n]=li(e[n])?U1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Y1=(e,t)=>{if(li(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Cr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Cr(t,r))return!0}return!1},xj=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},wj=e=>ci(e,(t,n,r)=>li(t)?n===r.findIndex(o=>Cr(o,t)):n===r.indexOf(t)),Sj=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},K1=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},Tj=(e,t)=>K1(e,n=>n[t]),G1=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},Ej=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},Cj=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return gl(e)&&gl(t)?r.map(a=>Number.parseInt(a)):r},lp=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&gl(e)&&gl(t)){const o=[],[i,a]=Ej(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return Cj(e,t,r)},kj=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?lp(r,o,1):lp(r,i,Number.parseInt(o,10))}return R1(e)&&R1(t)?lp(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},cp=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},Z1=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},Pj=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},Aj=(e,t,n,r)=>vl(Pj,e,t,n,r),X1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(gj(t))},Q1=(e=>(e.Asc="asc",e.Desc="desc",e))(Q1||{}),_j=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.key,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),Ij=(e,t)=>e.sort(_j(t)),Oj=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ci(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},Mj=class Bp{constructor(t=[]){this.array=t}static Range(...t){return kj(...t)}static New(t){return new Bp(t)}Where(t,n,r){return this.array=yj(this.array,t,n,r),this}Some(t,n,r){return hj(this.array,t,n,r)}All(t,n,r){return bj(this.array,t,n,r)}Reverse(){return this.array=Z1(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=Aj(this.array,t,n,r),this}Distinct(){return this.array=wj(this.array),this}First(t){return t===void 0?this.array[0]:Sj(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?cp((n,r)=>n+r,0,this.array):cp((n,r)=>n+mj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return Tj(this.array,t)}GroupWith(t){return K1(this.array,t)}Except(t){return ci(this.array,n=>!Y1(t,n))}Intersect(t){return ci(this.array,n=>Y1(t,n))}OrderBy(t,n){let r;return r=t?X1(this.array,t):this.array.toSorted(),this.array=n==="desc"?Z1(r):r,this}Includes(t){return sp(this.array,n=>Cr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return cp(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(G1(this.array,n=>[t,n]))}Zip(t,n){return G1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ci(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Bp(U1(this.array))}ToObject(t){return xj(this.array,t)}Sort(t){return Array.isArray(t)?Ij(this.array,t):X1(this.array,t)}Unique(t){return Oj(this.array,t)}},J1=Mj,up={},eS;function Dj(){return eS||(eS=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,v)=>{try{Object.keys(h).forEach(v)}catch(b){window.console.log(b)}},n=h=>h==null,r=h=>{const v=typeof h;return v==="string"||v==="number"||v==="boolean"||n(h)},o=(h,v)=>{const b=v.getItem(h);try{return JSON.parse(b)}catch{return b??null}},i=h=>Object.keys(h).reduce((v,b)=>({...v,[b]:o(b,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,v)=>(h[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(v=>v(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const v=h.domain??"";return v===""?"":`domain=${h.multiDomain?".":""}${v}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(v=>v.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const v=p.json()[h];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,v,b={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((w,T)=>{const C=T.parse(b);return C===""?w:w.concat(C)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=S,u()}},f=h=>{const v=new Set,b=x=>{h().removeItem(x);const S=i(h());v.forEach(w=>w(S))};return{delete:b,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const S=h().getItem(x);return!n(S)},deleteAll:()=>{t(h(),b),v.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,S)=>{h().setItem(x,JSON.stringify(S)),v.forEach(w=>w(h()))}}},m=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=m,e.createStorage=f}(up)),up}var xa=Dj();const dp=e=>e.headerLabel??e.thead??e.id,fp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var ui=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(ui||{});const pp=e=>e.type==="number"?e.valueAsNumber:e.value,Nj=e=>{let t=[];return e({add:(o,i,a)=>t.push({...a,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},Fj={},Lj=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const a=r.get(o.id);return a===void 0?e[i]:a})},Vj=(e,t,n=Fj)=>{const r=cr()?null:xa.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=sd({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:Lj(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return cr()||xa.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},$j=e=>{const t=nr(e),n=E.useRef(null),r=E.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-colid="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},jj=()=>cr()?void 0:document.querySelector('[data-component="modal-body"]'),hp=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??ui.Text,a=t[i]??[],s=((c=a.find(d=>d["data-default"]))==null?void 0:c.value)??((u=a[0])==null?void 0:u.value),l=n[s];return{id:Lo(),operation:l,label:dp(e),name:o,type:i,value:"",...r}},mp=()=>{const e=Ct(),t=E.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:E.useMemo(()=>({[ui.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[ui.Boolean]:[t.is,t.isNot],[ui.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},zj=e=>{const t=Ct(),n=mp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,hp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>{if(c!==p.id)return p;const f=e.cols.find(m=>u===m.id);return hp(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,operation:n.operations[u]}:p))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=pp(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return y.jsx(E.Fragment,{children:y.jsx(ei,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(L_,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:y.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return y.jsxs("li",{className:"flex flex-nowrap gap-3",children:[y.jsx(io,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),y.jsx(io,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),y.jsx(ya,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),y.jsx("div",{className:"mt-5 flex items-center justify-center",children:y.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:y.jsx(os,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[y.jsx(Wu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},Bj=({filter:e,onDelete:t,set:n})=>{const r=Ct(),o=mp(),i=s=>{const l=s.target.value,c=s.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},a=s=>{const l=s.target.dataset.id||"",c=pp(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return y.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[y.jsx(io,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),y.jsx(ya,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),y.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:y.jsx(os,{className:"text-danger",size:14})})]})},Rj=({item:e,onPointerDown:t})=>{const n=rs(0);return y.jsxs(yy,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[y.jsx("button",{type:"button",className:"cursor-grab",children:y.jsx(F_,{size:14})}),y.jsx("span",{children:e.groupName})]},e.groupId)},Hj=e=>{var l;const t=Ct(),n=fp(e.cols),r=p_(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var h;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((h=u.options.item(p))==null?void 0:h.label)||"";i(f);const m=new J1(e.rows).GroupBy(d),g=e.cols.find(v=>v.id===d);e.setGroups(gT(m).map((v,b)=>{const x=m[v];return{...g,groupId:Lo(),groupKey:d,index:b,rows:x,groupName:v}}))},s=()=>e.setGroups([]);return y.jsx(E.Fragment,{children:y.jsxs(ei,{arrow:!1,title:t.tableGroupLabel,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(B_,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[y.jsxs("div",{className:"flex flex-nowrap items-center",children:[y.jsx(io,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),y.jsx(Da,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:y.jsx(os,{size:16,className:"text-danger"})})]}),e.groups.length>0?y.jsxs("section",{className:"my-4",children:[y.jsx("header",{children:y.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),y.jsx(CE,{children:y.jsx(gy,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>y.jsx(Rj,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},Wj=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),qj=(e,t)=>e.toSorted(Wj(t)),tS=(e,t,n)=>({label:t,id:Lo(),type:n,value:e.id}),Uj=e=>{const t=Ct(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,tS(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return y.jsx(E.Fragment,{children:y.jsx(ei,{title:t.tableSortDropdownTitle,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(wy,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:y.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>y.jsxs("li",{className:"flex flex-nowrap gap-3",children:[y.jsx(io,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),y.jsx(io,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),y.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:y.jsx(os,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[y.jsx(Wu,{size:14})," ",t.tableSortAddButton]})})]})})})},Yj=e=>{const t=Ct(),[n,r]=E.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");E.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=tS(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=dp(e.col);return y.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[y.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?y.jsx(k_,{size:14}):null,n==="desc"?y.jsx(C_,{size:14}):null,n==="undefined"?y.jsx(wy,{size:14}):null]})},Kj=e=>y.jsx("header",{className:"min-w-full mb-1",children:y.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[y.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[y.jsx("span",{children:y.jsx(zj,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),y.jsx("span",{children:y.jsx(Uj,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),y.jsx("span",{children:y.jsx(Hj,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),y.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>y.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[y.jsxs("span",{children:[y.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),y.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[y.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),y.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=pp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function Gj(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let s=o>2?o:2;s<=Math.min(t,i);s++)n.push(s);const a=t-2;return i+1!==a&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const Zj=e=>{const t=E.useId(),n=Ct(),r=E.useMemo(()=>Gj(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return y.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[y.jsx("p",{children:y.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?y.jsxs(E.Fragment,{children:[y.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),y.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>y.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),y.jsx("nav",{children:y.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?y.jsx("li",{children:y.jsx(ln,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:y.jsx(E.Fragment,{children:typeof i=="string"?y.jsx("li",{children:"..."}):y.jsx("li",{children:y.jsx(ln,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?y.jsx("li",{children:y.jsx(ln,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},Xj=e=>{const t=E.useRef(null),n=E.useRef(null),[r,o]=E.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return E.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),y.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full min-w-8 max-w-20 items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:y.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},Qj=(e,t,n)=>{const r=n.cols,o=n.loading;return y.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,l=ud(t,i.id),c=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"",d=a===0&&n.Aside&&o===!1,p=n.Aside;return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`group-table-cell py-2 sm:py-2 flex flex-col md:table-cell md:h-14 md:border-l md:border-table-border px-2 first:border-transparent ${u}`},d?y.jsx(Xj,{children:y.jsx(p,{col:i,row:t,rowIndex:e})}):null,y.jsx("span",{className:"block md:hidden text-sm font-bold leading-tight",children:i.thead}),y.jsx("span",{className:"relative",children:o?cf:c?y.jsx(E.Fragment,{children:y.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):y.jsx(E.Fragment,{children:Le.nil(l)?"":l})}))})})},Jj={top:0,left:0,right:0,bottom:-1},ez=e=>{var g;const t=Rf(),n=Ct(),r=e.filters.filter(h=>h.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=mp(),l=o?$_:j_,c=E.useRef(null),u=h=>{const v=h.currentTarget.dataset.id||"";return e.setFilters(b=>b.filter(x=>x.id!==v))},d=E.useCallback(h=>{if(h===null)return;c.current=h;const v=new AbortController;return h.addEventListener("pointerdown",b=>{if(b.target.dataset.type==="resizer")return b.stopPropagation(),b.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),p=e.sorters.find(h=>e.header.id===h.value),f=p!=null&&p.type?p.type===Q1.Asc?"ascending":"descending":"none",m=dp(e.header);return y.jsxs(yy,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative min-w-0 cursor-grab font-medium ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[y.jsx("span",{className:`flex h-full items-center justify-between bg-table-header px-2 py-4 ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:y.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?y.jsx(ei,{arrow:!0,trigger:y.jsxs("span",{children:[y.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),y.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:y.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",y.jsx("span",{className:"font-medium",children:m})]}),children:y.jsxs("ul",{className:"font-medium",children:[r.length===0?null:y.jsx(E.Fragment,{children:r.map(h=>y.jsx("li",{className:"my-1",children:y.jsx(Bj,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),y.jsx("li",{children:y.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(h=>h.concat(hp(e.header,s.options,s.operations))),children:[y.jsx(Wu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,y.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?y.jsx(Yj,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:y.jsx(pt.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:Jj,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:h=>void h.currentTarget.focus(),onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,x=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(v+x)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,v)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const b=c.current.getBoundingClientRect().width,x=v.delta.x;c.current.style.width=`${Math.abs(b+x)}px`}})]})},tz=e=>{const[t,n]=$j(e.setCols);return y.jsx(gy,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,children:y.jsx(rr,{children:e.headers.map((r,o)=>y.jsx(ez,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},nS=E.createContext({}),nz=()=>E.useContext(nS),rz=E.forwardRef(({context:e,className:t="",...n},r)=>y.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:y.jsx(rr,{children:n.children})})),oz=E.forwardRef(({context:e,className:t="",...n},r)=>y.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-separate text-left ${t??""}`})),iz=E.forwardRef(({context:e,...t},n)=>{const r=nz(),o={...t==null?void 0:t.style,top:Le.number(r.sticky)?`${r.sticky}px`:void 0};return y.jsx("thead",{...t,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group shadow-shadow-card group:sticky",ref:n})}),az=E.forwardRef(({context:e,item:t,...n},r)=>y.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${(n==null?void 0:n.className)??""}`})),sz=E.forwardRef((e,t)=>e.context.loadingMore?y.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:y.jsx("tr",{role:"row",className:"bg-card-background",children:y.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:y.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),lz={TableHead:iz,Table:oz,TableBody:rz,TableRow:az,TableFoot:sz},cz=[0,0,0,0,0,0,0,0,0,0],uz=e=>y.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?cf:y.jsx(Ob,{})}),dz=()=>y.jsx(E.Fragment,{}),fz=()=>y.jsx(E.Fragment,{}),pz=[],rS=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,border:l=!1,pagination:c=null,useControl:u=!1,...d})=>{const p=E.useRef(null),[f,m]=E.useState(!1),g=nr(a),h=nr(d.loadingMore),v=E.useMemo(()=>{if(d.loading)return cz;if(u)return d.rows;const S=new J1(d.rows);return t.length>0&&t.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:S.Where(w.name,w.operation.symbol,w.value)),r.length===0?S.Select():qj(S.Select(),r)},[d.loading,d.rows,u,t,r]);E.useEffect(()=>{if(p.current===null)return()=>{};const S=p.current,w=new IntersectionObserver(T=>{var I;return T[T.length-1].isIntersecting&&h.current?((I=g.current)==null||I.call(g),void m(!0)):m(!1)});return w.observe(S),()=>w.disconnect()},[h,g]);const b=v.length===0,x={loading:d.loading,loadingMore:d.loadingMore,cols:e,Aside:d.Aside};return y.jsxs("div",{className:"min-w-full",children:[y.jsxs("div",{className:`group w-full relative rounded-lg ${l?"border border-table-border":""}`,children:[y.jsx(aV,{context:x,components:lz,totalCount:v.length,style:{height:"100%"},itemContent:b?dz:Qj,data:b?pz:v,useWindowScroll:!s,fixedFooterContent:f?fz:null,customScrollParent:s?s():void 0,fixedHeaderContent:()=>y.jsx(tz,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!d.loading,inlineFilter:d.inlineFilter,inlineSorter:d.inlineSorter})}),b?y.jsx(uz,{loading:d.loading}):null,y.jsx("div",{"aria-hidden":"true",ref:p,className:"w-full h-0.5"})]}),c!==null?y.jsx(Zj,{...c}):null]})},hz=(e,t)=>typeof t=="function"?t(e):t,yl=(e,t,n)=>e===t||n==null?void 0:n(t),mz=e=>{const t=Rf(),n=E.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=E.useMemo(()=>fp(e.cols),[e.cols]),[i,a]=sd({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:hz(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>{var c;return(c=e.set)==null||c.call(e,s),yl((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),yl((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),yl((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),yl((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return y.jsxs(nS.Provider,{value:n,children:[r?y.jsx(Kj,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?y.jsx(rS,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):y.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>y.jsx("div",{className:"min-w-full",children:y.jsx(rS,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})},gz=["INPUT","SELECT"],oS=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{gz.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var gp,iS;function vp(){if(iS)return gp;iS=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return gp={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},gp}var yp,aS;function sS(){if(aS)return yp;aS=1;var e=vp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],v=0;v<256;++v)h.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return h}(),o=function(v){for(;v.length>1;){var b=v.pop(),x=b.obj[b.prop];if(n(x)){for(var S=[],w=0;w<x.length;++w)typeof x[w]<"u"&&S.push(x[w]);b.obj[b.prop]=S}}},i=function(v,b){for(var x=b&&b.plainObjects?{__proto__:null}:{},S=0;S<v.length;++S)typeof v[S]<"u"&&(x[S]=v[S]);return x},a=function h(v,b,x){if(!b)return v;if(typeof b!="object"&&typeof b!="function"){if(n(v))v.push(b);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,b))&&(v[b]=!0);else return[v,b];return v}if(!v||typeof v!="object")return[v].concat(b);var S=v;return n(v)&&!n(b)&&(S=i(v,x)),n(v)&&n(b)?(b.forEach(function(w,T){if(t.call(v,T)){var C=v[T];C&&typeof C=="object"&&w&&typeof w=="object"?v[T]=h(C,w,x):v.push(w)}else v[T]=w}),v):Object.keys(b).reduce(function(w,T){var C=b[T];return t.call(w,T)?w[T]=h(w[T],C,x):w[T]=C,w},S)},s=function(v,b){return Object.keys(b).reduce(function(x,S){return x[S]=b[S],x},v)},l=function(h,v,b){var x=h.replace(/\+/g," ");if(b==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(v,b,x,S,w){if(v.length===0)return v;var T=v;if(typeof v=="symbol"?T=Symbol.prototype.toString.call(v):typeof v!="string"&&(T=String(v)),x==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function($){return"%26%23"+parseInt($.slice(2),16)+"%3B"});for(var C="",k=0;k<T.length;k+=c){for(var I=T.length>=c?T.slice(k,k+c):T,P=[],L=0;L<I.length;++L){var N=I.charCodeAt(L);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||w===e.RFC1738&&(N===40||N===41)){P[P.length]=I.charAt(L);continue}if(N<128){P[P.length]=r[N];continue}if(N<2048){P[P.length]=r[192|N>>6]+r[128|N&63];continue}if(N<55296||N>=57344){P[P.length]=r[224|N>>12]+r[128|N>>6&63]+r[128|N&63];continue}L+=1,N=65536+((N&1023)<<10|I.charCodeAt(L)&1023),P[P.length]=r[240|N>>18]+r[128|N>>12&63]+r[128|N>>6&63]+r[128|N&63]}C+=P.join("")}return C},d=function(v){for(var b=[{obj:{o:v},prop:"o"}],x=[],S=0;S<b.length;++S)for(var w=b[S],T=w.obj[w.prop],C=Object.keys(T),k=0;k<C.length;++k){var I=C[k],P=T[I];typeof P=="object"&&P!==null&&x.indexOf(P)===-1&&(b.push({obj:T,prop:I}),x.push(P))}return o(b),v},p=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},m=function(v,b){return[].concat(v,b)},g=function(v,b){if(n(v)){for(var x=[],S=0;S<v.length;S+=1)x.push(b(v[S]));return x}return b(v)};return yp={arrayToObject:i,assign:s,combine:m,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},yp}var bp,lS;function vz(){if(lS)return bp;lS=1;var e=dT(),t=sS(),n=vp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,v){return h+"["+v+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,v,b,x,S,w,T,C,k,I,P,L,N,$,_,M,D,V){for(var F=h,H=V,O=0,B=!1;(H=H.get(p))!==void 0&&!B;){var X=H.get(h);if(O+=1,typeof X<"u"){if(X===O)throw new RangeError("Cyclic object value");B=!0}typeof H.get(p)>"u"&&(O=0)}if(typeof I=="function"?F=I(v,F):F instanceof Date?F=N(F):b==="comma"&&i(F)&&(F=t.maybeMap(F,function(Ie){return Ie instanceof Date?N(Ie):Ie})),F===null){if(w)return k&&!M?k(v,u.encoder,D,"key",$):v;F=""}if(d(F)||t.isBuffer(F)){if(k){var Q=M?v:k(v,u.encoder,D,"key",$);return[_(Q)+"="+_(k(F,u.encoder,D,"value",$))]}return[_(v)+"="+_(String(F))]}var J=[];if(typeof F>"u")return J;var G;if(b==="comma"&&i(F))M&&k&&(F=t.maybeMap(F,k)),G=[{value:F.length>0?F.join(",")||null:void 0}];else if(i(I))G=I;else{var K=Object.keys(F);G=P?K.sort(P):K}var Z=C?String(v).replace(/\./g,"%2E"):String(v),j=x&&i(F)&&F.length===1?Z+"[]":Z;if(S&&i(F)&&F.length===0)return j+"[]";for(var z=0;z<G.length;++z){var Y=G[z],ae=typeof Y=="object"&&Y&&typeof Y.value<"u"?Y.value:F[Y];if(!(T&&ae===null)){var R=L&&C?String(Y).replace(/\./g,"%2E"):String(Y),be=i(F)?typeof b=="function"?b(j,R):j:j+(L?"."+R:"["+R+"]");V.set(h,O);var Ce=e();Ce.set(p,V),s(J,g(ae,be,b,x,S,w,T,C,b==="comma"&&M&&i(F)?null:k,I,P,L,N,$,_,M,D,Ce))}}return J},m=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");b=h.format}var x=n.formatters[b],S=u.filter;(typeof h.filter=="function"||i(h.filter))&&(S=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var T=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:S,format:b,formatter:x,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return bp=function(g,h){var v=g,b=m(h),x,S;typeof b.filter=="function"?(S=b.filter,v=S("",v)):i(b.filter)&&(S=b.filter,x=S);var w=[];if(typeof v!="object"||v===null)return"";var T=o[b.arrayFormat],C=T==="comma"&&b.commaRoundTrip;x||(x=Object.keys(v)),b.sort&&x.sort(b.sort);for(var k=e(),I=0;I<x.length;++I){var P=x[I],L=v[P];b.skipNulls&&L===null||s(w,f(L,P,T,C,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,k))}var N=w.join(b.delimiter),$=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),N.length>0?$+N:""},bp}var xp,cS;function yz(){if(cS)return xp;cS=1;var e=sS(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,f,m){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&m>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,m){var g={__proto__:null},h=m.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=m.parameterLimit===1/0?void 0:m.parameterLimit,b=h.split(m.delimiter,m.throwOnLimitExceeded?v+1:v);if(m.throwOnLimitExceeded&&b.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var x=-1,S,w=m.charset;if(m.charsetSentinel)for(S=0;S<b.length;++S)b[S].indexOf("utf8=")===0&&(b[S]===s?w="utf-8":b[S]===a&&(w="iso-8859-1"),x=S,S=b.length);for(S=0;S<b.length;++S)if(S!==x){var T=b[S],C=T.indexOf("]="),k=C===-1?T.indexOf("="):C+1,I,P;k===-1?(I=m.decoder(T,r.decoder,w,"key"),P=m.strictNullHandling?null:""):(I=m.decoder(T.slice(0,k),r.decoder,w,"key"),P=e.maybeMap(i(T.slice(k+1),m,n(g[I])?g[I].length:0),function(N){return m.decoder(N,r.decoder,w,"value")})),P&&m.interpretNumericEntities&&w==="iso-8859-1"&&(P=o(String(P))),T.indexOf("[]=")>-1&&(P=n(P)?[P]:P);var L=t.call(g,I);L&&m.duplicates==="combine"?g[I]=e.combine(g[I],P):(!L||m.duplicates==="last")&&(g[I]=P)}return g},c=function(p,f,m,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");h=Array.isArray(f)&&f[v]?f[v].length:0}for(var b=g?f:i(f,m,h),x=p.length-1;x>=0;--x){var S,w=p[x];if(w==="[]"&&m.parseArrays)S=m.allowEmptyArrays&&(b===""||m.strictNullHandling&&b===null)?[]:e.combine([],b);else{S=m.plainObjects?{__proto__:null}:{};var T=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=m.decodeDotInKeys?T.replace(/%2E/g,"."):T,k=parseInt(C,10);!m.parseArrays&&C===""?S={0:b}:!isNaN(k)&&w!==C&&String(k)===C&&k>=0&&m.parseArrays&&k<=m.arrayLimit?(S=[],S[k]=b):C!=="__proto__"&&(S[C]=b)}b=S}return b},u=function(f,m,g,h){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,b=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,S=g.depth>0&&b.exec(v),w=S?v.slice(0,S.index):v,T=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;T.push(w)}for(var C=0;g.depth>0&&(S=x.exec(v))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,S[1].slice(1,-1))&&!g.allowPrototypes)return;T.push(S[1])}if(S){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");T.push("["+v.slice(S.index)+"]")}return c(T,m,g,h)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return xp=function(p,f){var m=d(f);if(p===""||p===null||typeof p>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,m):p,h=m.plainObjects?{__proto__:null}:{},v=Object.keys(g),b=0;b<v.length;++b){var x=v[b],S=u(x,g[x],m,typeof p=="string");h=e.merge(h,S,m)}return m.allowSparse===!0?h:e.compact(h)},xp}var wp,uS;function bz(){if(uS)return wp;uS=1;var e=vz(),t=yz(),n=vp();return wp={formats:n,parse:t,stringify:e},wp}var xz=bz(),qe;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(qe||(qe={}));var dS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(dS||(dS={}));const fe=qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),kr=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},oe=qe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class mn extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof mn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,qe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}mn.create=e=>new mn(e);const wa=(e,t)=>{let n;switch(e.code){case oe.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case oe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,qe.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:n=`Unrecognized key(s) in object: ${qe.joinValues(e.keys,", ")}`;break;case oe.invalid_union:n="Invalid input";break;case oe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${qe.joinValues(e.options)}`;break;case oe.invalid_enum_value:n=`Invalid enum value. Expected ${qe.joinValues(e.options)}, received '${e.received}'`;break;case oe.invalid_arguments:n="Invalid function arguments";break;case oe.invalid_return_type:n="Invalid function return type";break;case oe.invalid_date:n="Invalid date";break;case oe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:qe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case oe.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case oe.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case oe.custom:n="Invalid input";break;case oe.invalid_intersection_types:n="Intersection results could not be merged";break;case oe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case oe.not_finite:n="Number must be finite";break;default:n=t.defaultError,qe.assertNever(e)}return{message:n}};let wz=wa;function Sp(){return wz}const Tp=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ue(e,t){const n=Sp(),r=Tp({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===wa?void 0:wa].filter(o=>!!o)});e.common.issues.push(r)}class Yt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Pe;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return Yt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return Pe;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Pe=Object.freeze({status:"aborted"}),Sa=e=>({status:"dirty",value:e}),Qt=e=>({status:"valid",value:e}),fS=e=>e.status==="aborted",pS=e=>e.status==="dirty",di=e=>e.status==="valid",bl=e=>typeof Promise<"u"&&e instanceof Promise;function xl(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function hS(e,t,n,r,o){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var ye;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ye||(ye={}));var Ta,Ea;class Rn{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const mS=(e,t)=>{if(di(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new mn(e.common.issues);return this._error=n,this._error}}};function Me(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{var l,c;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:o}}class je{get description(){return this._def.description}_getType(t){return kr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:kr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Yt,ctx:{common:t.parent.common,data:t.data,parsedType:kr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(bl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:kr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return mS(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:kr(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return di(i)?{value:i.value}:{issues:o.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>di(i)?{value:i.value}:{issues:o.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:kr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(bl(o)?o:Promise.resolve(o));return mS(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:oe.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Jn({schema:this,typeName:Ee.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return er.create(this,this._def)}nullable(){return lo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Hn.create(this)}promise(){return Pa.create(this,this._def)}or(t){return Tl.create([this,t],this._def)}and(t){return El.create(this,t,this._def)}transform(t){return new Jn({...Me(this._def),schema:this,typeName:Ee.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new _l({...Me(this._def),innerType:this,defaultValue:n,typeName:Ee.ZodDefault})}brand(){return new bS({typeName:Ee.ZodBranded,type:this,...Me(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Il({...Me(this._def),innerType:this,catchValue:n,typeName:Ee.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ol.create(this,t)}readonly(){return Ml.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Sz=/^c[^\s-]{8,}$/i,Tz=/^[0-9a-z]+$/,Ez=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Cz=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,kz=/^[a-z0-9_-]{21}$/i,Pz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Az=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,_z=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Iz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ep;const Oz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Mz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Dz=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Nz=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Fz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Lz=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gS="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Vz=new RegExp(`^${gS}$`);function vS(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function $z(e){return new RegExp(`^${vS(e)}$`)}function jz(e){let t=`${gS}T${vS(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function zz(e,t){return!!((t==="v4"||!t)&&Oz.test(e)||(t==="v6"||!t)&&Dz.test(e))}function Bz(e,t){if(!Pz.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function Rz(e,t){return!!((t==="v4"||!t)&&Mz.test(e)||(t==="v6"||!t)&&Nz.test(e))}class Zn extends je{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_type,expected:fe.string,received:i.parsedType}),Pe}const r=new Yt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?ue(o,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ue(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")_z.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"email",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ep||(Ep=new RegExp(Iz,"u")),Ep.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"emoji",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Cz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"uuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")kz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"nanoid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Sz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Tz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid2",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Ez.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ulid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ue(o,{validation:"url",code:oe.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"regex",code:oe.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?jz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Vz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?$z(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Az.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?zz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ip",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Bz(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"jwt",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Rz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cidr",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Fz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Lz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64url",code:oe.invalid_string,message:i.message}),r.dirty()):qe.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:oe.invalid_string,...ye.errToObj(r)})}_addCheck(t){return new Zn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ye.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ye.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ye.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ye.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ye.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ye.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ye.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ye.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ye.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ye.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ye.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ye.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ye.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ye.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ye.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ye.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ye.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ye.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ye.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ye.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ye.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ye.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ye.errToObj(n)})}nonempty(t){return this.min(1,ye.errToObj(t))}trim(){return new Zn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Zn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Zn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Zn.create=e=>{var t;return new Zn({checks:[],typeName:Ee.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};function Hz(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class ao extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==fe.number){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_type,expected:fe.number,received:i.parsedType}),Pe}let r;const o=new Yt;for(const i of this._def.checks)i.kind==="int"?qe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Hz(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.not_finite,message:i.message}),o.dirty()):qe.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new ao({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new ao({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ye.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ye.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ye.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ye.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&qe.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}ao.create=e=>new ao({checks:[],typeName:Ee.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class fi extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==fe.bigint)return this._getInvalidInput(t);let r;const o=new Yt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):qe.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ue(n,{code:oe.invalid_type,expected:fe.bigint,received:n.parsedType}),Pe}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new fi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new fi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}fi.create=e=>{var t;return new fi({checks:[],typeName:Ee.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};class Cp extends je{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.boolean,received:r.parsedType}),Pe}return Qt(t.data)}}Cp.create=e=>new Cp({typeName:Ee.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class Ca extends je{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_type,expected:fe.date,received:i.parsedType}),Pe}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_date}),Pe}const r=new Yt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):qe.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ca({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ye.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ye.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ca.create=e=>new Ca({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ee.ZodDate,...Me(e)});class kp extends je{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.symbol,received:r.parsedType}),Pe}return Qt(t.data)}}kp.create=e=>new kp({typeName:Ee.ZodSymbol,...Me(e)});class wl extends je{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.undefined,received:r.parsedType}),Pe}return Qt(t.data)}}wl.create=e=>new wl({typeName:Ee.ZodUndefined,...Me(e)});class Sl extends je{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.null,received:r.parsedType}),Pe}return Qt(t.data)}}Sl.create=e=>new Sl({typeName:Ee.ZodNull,...Me(e)});class Pp extends je{constructor(){super(...arguments),this._any=!0}_parse(t){return Qt(t.data)}}Pp.create=e=>new Pp({typeName:Ee.ZodAny,...Me(e)});class pi extends je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Qt(t.data)}}pi.create=e=>new pi({typeName:Ee.ZodUnknown,...Me(e)});class Pr extends je{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:oe.invalid_type,expected:fe.never,received:n.parsedType}),Pe}}Pr.create=e=>new Pr({typeName:Ee.ZodNever,...Me(e)});class Ap extends je{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.void,received:r.parsedType}),Pe}return Qt(t.data)}}Ap.create=e=>new Ap({typeName:Ee.ZodVoid,...Me(e)});class Hn extends je{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ue(n,{code:oe.invalid_type,expected:fe.array,received:n.parsedType}),Pe;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ue(n,{code:a?oe.too_big:oe.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ue(n,{code:oe.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ue(n,{code:oe.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new Rn(n,a,n.path,s)))).then(a=>Yt.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Rn(n,a,n.path,s)));return Yt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Hn({...this._def,minLength:{value:t,message:ye.toString(n)}})}max(t,n){return new Hn({...this._def,maxLength:{value:t,message:ye.toString(n)}})}length(t,n){return new Hn({...this._def,exactLength:{value:t,message:ye.toString(n)}})}nonempty(t){return this.min(1,t)}}Hn.create=(e,t)=>new Hn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ee.ZodArray,...Me(t)});function hi(e){if(e instanceof wt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=er.create(hi(r))}return new wt({...e._def,shape:()=>t})}else return e instanceof Hn?new Hn({...e._def,type:hi(e.element)}):e instanceof er?er.create(hi(e.unwrap())):e instanceof lo?lo.create(hi(e.unwrap())):e instanceof Qn?Qn.create(e.items.map(t=>hi(t))):e}class wt extends je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=qe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return ue(c,{code:oe.invalid_type,expected:fe.object,received:c.parsedType}),Pe}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Pr&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Rn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Pr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(ue(o,{code:oe.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Rn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>Yt.mergeObjectSync(r,c)):Yt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ye.errToObj,new wt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ye.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new wt({...this._def,unknownKeys:"strip"})}passthrough(){return new wt({...this._def,unknownKeys:"passthrough"})}extend(t){return new wt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new wt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ee.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new wt({...this._def,catchall:t})}pick(t){const n={};return qe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new wt({...this._def,shape:()=>n})}omit(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new wt({...this._def,shape:()=>n})}deepPartial(){return hi(this)}partial(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new wt({...this._def,shape:()=>n})}required(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof er;)i=i._def.innerType;n[r]=i}}),new wt({...this._def,shape:()=>n})}keyof(){return yS(qe.objectKeys(this.shape))}}wt.create=(e,t)=>new wt({shape:()=>e,unknownKeys:"strip",catchall:Pr.create(),typeName:Ee.ZodObject,...Me(t)}),wt.strictCreate=(e,t)=>new wt({shape:()=>e,unknownKeys:"strict",catchall:Pr.create(),typeName:Ee.ZodObject,...Me(t)}),wt.lazycreate=(e,t)=>new wt({shape:e,unknownKeys:"strip",catchall:Pr.create(),typeName:Ee.ZodObject,...Me(t)});class Tl extends je{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new mn(s.ctx.common.issues));return ue(n,{code:oe.invalid_union,unionErrors:a}),Pe}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new mn(l));return ue(n,{code:oe.invalid_union,unionErrors:s}),Pe}}get options(){return this._def.options}}Tl.create=(e,t)=>new Tl({options:e,typeName:Ee.ZodUnion,...Me(t)});const Xn=e=>e instanceof kl?Xn(e.schema):e instanceof Jn?Xn(e.innerType()):e instanceof Pl?[e.value]:e instanceof so?e.options:e instanceof Al?qe.objectValues(e.enum):e instanceof _l?Xn(e._def.innerType):e instanceof wl?[void 0]:e instanceof Sl?[null]:e instanceof er?[void 0,...Xn(e.unwrap())]:e instanceof lo?[null,...Xn(e.unwrap())]:e instanceof bS||e instanceof Ml?Xn(e.unwrap()):e instanceof Il?Xn(e._def.innerType):[];class _p extends je{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ue(n,{code:oe.invalid_type,expected:fe.object,received:n.parsedType}),Pe;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ue(n,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Pe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=Xn(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new _p({typeName:Ee.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Me(r)})}}function Ip(e,t){const n=kr(e),r=kr(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=qe.objectKeys(t),i=qe.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Ip(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=Ip(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class El extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(fS(i)||fS(a))return Pe;const s=Ip(i.value,a.value);return s.valid?((pS(i)||pS(a))&&n.dirty(),{status:n.value,value:s.data}):(ue(r,{code:oe.invalid_intersection_types}),Pe)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}El.create=(e,t,n)=>new El({left:e,right:t,typeName:Ee.ZodIntersection,...Me(n)});class Qn extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ue(r,{code:oe.invalid_type,expected:fe.array,received:r.parsedType}),Pe;if(r.data.length<this._def.items.length)return ue(r,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Pe;!this._def.rest&&r.data.length>this._def.items.length&&(ue(r,{code:oe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Rn(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Yt.mergeArray(n,a)):Yt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Qn({...this._def,rest:t})}}Qn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qn({items:e,typeName:Ee.ZodTuple,rest:null,...Me(t)})};class Cl extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.object)return ue(r,{code:oe.invalid_type,expected:fe.object,received:r.parsedType}),Pe;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new Rn(r,s,r.path,s)),value:a._parse(new Rn(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?Yt.mergeObjectAsync(n,o):Yt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof je?new Cl({keyType:t,valueType:n,typeName:Ee.ZodRecord,...Me(r)}):new Cl({keyType:Zn.create(),valueType:t,typeName:Ee.ZodRecord,...Me(n)})}}class Op extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.map)return ue(r,{code:oe.invalid_type,expected:fe.map,received:r.parsedType}),Pe;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Rn(r,s,r.path,[c,"key"])),value:i._parse(new Rn(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Pe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Pe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Op.create=(e,t,n)=>new Op({valueType:t,keyType:e,typeName:Ee.ZodMap,...Me(n)});class mi extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ue(r,{code:oe.invalid_type,expected:fe.set,received:r.parsedType}),Pe;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ue(r,{code:oe.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ue(r,{code:oe.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Pe;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new Rn(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new mi({...this._def,minSize:{value:t,message:ye.toString(n)}})}max(t,n){return new mi({...this._def,maxSize:{value:t,message:ye.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}mi.create=(e,t)=>new mi({valueType:e,minSize:null,maxSize:null,typeName:Ee.ZodSet,...Me(t)});class ka extends je{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ue(n,{code:oe.invalid_type,expected:fe.function,received:n.parsedType}),Pe;function r(s,l){return Tp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Sp(),wa].filter(c=>!!c),issueData:{code:oe.invalid_arguments,argumentsError:l}})}function o(s,l){return Tp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Sp(),wa].filter(c=>!!c),issueData:{code:oe.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Pa){const s=this;return Qt(async function(...l){const c=new mn([]),u=await s._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const s=this;return Qt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new mn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new mn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ka({...this._def,args:Qn.create(t).rest(pi.create())})}returns(t){return new ka({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ka({args:t||Qn.create([]).rest(pi.create()),returns:n||pi.create(),typeName:Ee.ZodFunction,...Me(r)})}}class kl extends je{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}kl.create=(e,t)=>new kl({getter:e,typeName:Ee.ZodLazy,...Me(t)});class Pl extends je{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:oe.invalid_literal,expected:this._def.value}),Pe}return{status:"valid",value:t.data}}get value(){return this._def.value}}Pl.create=(e,t)=>new Pl({value:e,typeName:Ee.ZodLiteral,...Me(t)});function yS(e,t){return new so({values:e,typeName:Ee.ZodEnum,...Me(t)})}class so extends je{constructor(){super(...arguments),Ta.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{expected:qe.joinValues(r),received:n.parsedType,code:oe.invalid_type}),Pe}if(xl(this,Ta)||hS(this,Ta,new Set(this._def.values)),!xl(this,Ta).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{received:n.data,code:oe.invalid_enum_value,options:r}),Pe}return Qt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return so.create(t,{...this._def,...n})}exclude(t,n=this._def){return so.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ta=new WeakMap,so.create=yS;class Al extends je{constructor(){super(...arguments),Ea.set(this,void 0)}_parse(t){const n=qe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=qe.objectValues(n);return ue(r,{expected:qe.joinValues(o),received:r.parsedType,code:oe.invalid_type}),Pe}if(xl(this,Ea)||hS(this,Ea,new Set(qe.getValidEnumValues(this._def.values))),!xl(this,Ea).has(t.data)){const o=qe.objectValues(n);return ue(r,{received:r.data,code:oe.invalid_enum_value,options:o}),Pe}return Qt(t.data)}get enum(){return this._def.values}}Ea=new WeakMap,Al.create=(e,t)=>new Al({values:e,typeName:Ee.ZodNativeEnum,...Me(t)});class Pa extends je{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ue(n,{code:oe.invalid_type,expected:fe.promise,received:n.parsedType}),Pe;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Qt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Pa.create=(e,t)=>new Pa({type:e,typeName:Ee.ZodPromise,...Me(t)});class Jn extends je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ue(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Pe;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Pe:l.status==="dirty"||n.value==="dirty"?Sa(l.value):l});{if(n.value==="aborted")return Pe;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Pe:s.status==="dirty"||n.value==="dirty"?Sa(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Pe:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Pe:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!di(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>di(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);qe.assertNever(o)}}Jn.create=(e,t,n)=>new Jn({schema:e,typeName:Ee.ZodEffects,effect:t,...Me(n)}),Jn.createWithPreprocess=(e,t,n)=>new Jn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ee.ZodEffects,...Me(n)});class er extends je{_parse(t){return this._getType(t)===fe.undefined?Qt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}er.create=(e,t)=>new er({innerType:e,typeName:Ee.ZodOptional,...Me(t)});class lo extends je{_parse(t){return this._getType(t)===fe.null?Qt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}lo.create=(e,t)=>new lo({innerType:e,typeName:Ee.ZodNullable,...Me(t)});class _l extends je{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}_l.create=(e,t)=>new _l({innerType:e,typeName:Ee.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Me(t)});class Il extends je{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return bl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new mn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new mn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Il.create=(e,t)=>new Il({innerType:e,typeName:Ee.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Me(t)});class Mp extends je{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.nan,received:r.parsedType}),Pe}return{status:"valid",value:t.data}}}Mp.create=e=>new Mp({typeName:Ee.ZodNaN,...Me(e)});class bS extends je{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ol extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Pe:i.status==="dirty"?(n.dirty(),Sa(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Pe:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Ol({in:t,out:n,typeName:Ee.ZodPipeline})}}class Ml extends je{_parse(t){const n=this._def.innerType._parse(t),r=o=>(di(o)&&(o.value=Object.freeze(o.value)),o);return bl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ml.create=(e,t)=>new Ml({innerType:e,typeName:Ee.ZodReadonly,...Me(t)}),wt.lazycreate;var Ee;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ee||(Ee={})),Zn.create,ao.create,Mp.create,fi.create,Cp.create,Ca.create,kp.create,wl.create,Sl.create,Pp.create,pi.create,Pr.create,Ap.create,Hn.create,wt.create,wt.strictCreate,Tl.create,_p.create,El.create,Qn.create,Cl.create,Op.create,mi.create,ka.create,kl.create,Pl.create,so.create,Al.create,Pa.create,Jn.create,er.create,lo.create,Jn.createWithPreprocess,Ol.create;const Wz=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},qz=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const a=t[o+1];e[i]=isNaN(Number(a))?{}:[]}e=e[i]}}},xS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),an=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):xS(t),o=structuredClone(e);return qz(o,r,n),o},Uz=(e,t)=>e.localeCompare(t),gi={},wS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return SS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=wS(e._def.innerType);return t==="ZodArray"?n??[]:n}},SS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,wS(n)])),TS=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],i=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?n[r]=TS(i,o):n[r]=o||i)}return n},Yz={sort:Uz,allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},ES=e=>{const t=new FormData(e),n=new URLSearchParams(t);return xz.parse(n.toString(),Yz)},Ar=(e,t)=>xS(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),_r=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Dp=e=>{const t=e.dataset.target;if(!t)return _r(e);const n=document.querySelector(`[data-origin="${t}"]`);return _r(n||e)},Kz={state:{},loading:!1,useOnChange:!1},CS=e=>e.dataset.target||e.name,Gz=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=xa.LocalStorage.get(t);return Wz(n)?n:{}},clear:()=>void xa.LocalStorage.delete(t),set:n=>xa.LocalStorage.set(t,n)}},Zz=(e,t,n=Kz)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>Le.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??SS(e)??{}),l=E.useCallback(x=>{var P;const S=x.target,w=x.currentTarget;if(S.dataset.optional==="true")return;const C=CS(S),k=Dp(S)||(w?_r(w):""),I=Ar(C,e);if(S.setAttribute("data-initialized","true"),I){const L=I.safeParse(k),N=L.success?void 0:((P=L.error.issues[0])==null?void 0:P.message)??"";o($=>an($??{},C,N))}},[e]),c=E.useCallback(x=>S=>{const w=S.currentTarget,T=Object.values(i.current).reduce((k,I)=>{var _;const P=I.element,L=I.schema.safeParse(_r(P));if(P.dataset.ignore==="ignore"||L.success)return k;const N=(_=L.error.issues[0])==null?void 0:_.message;P.setAttribute("data-initialized","true");const $=P.dataset.name||P.name||"";return an(k,$,N)},{}),C=Le.empty(T)?null:T;o(C),console.error(C),x==null||x({form:w,errors:C||{}})},[]),u=(x,S=gi)=>{const w=Ar(x,e),T=C=>{var I;if(!Uu(C))return;s(P=>an(P,x,C.toISOString())),o(P=>an(P,x,void 0));const k=i.current[x].element;if(k){const P=k.getAttribute("data-origin"),L=document.querySelector(`input[data-target="${P}"]`);L&&L.setCustomValidity("")}(I=S==null?void 0:S.onChange)==null||I.call(S,C)};return{...S,loading:n.loading,name:x,id:x,onChange:T,form:t,date:Le.string(a[x])?new Date(a[x]):a[x],required:S.required??!w.isOptional(),error:Pn(r,x),ref:C=>{C!==null&&(i.current[x]={element:C,schema:w})}}},d=(x,S=gi)=>{const w=Ar(x,e);return{...S,name:x,id:x,onChange:C=>{var I;const k=C.target.value;s(P=>an(P,x,k)),(I=S==null?void 0:S.onChange)==null||I.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Pn(r,x,void 0),value:Pn(a,x,void 0)??"",required:S.required??!w.isOptional(),ref:C=>C!==null?i.current[x]={element:C,schema:w}:void 0}},p=(x,S=gi)=>{const w=Ar(x,e);return{...S,name:x,id:x,onChange:C=>{var I;const k=C.target.checked;s(P=>an(P??{},x,k)),(I=S==null?void 0:S.onChange)==null||I.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Pn(r,x,void 0),required:S.required??!w.isOptional(),ref:C=>C!==null?void(i.current[x]={element:C,schema:w}):void 0}},f=(x,S=gi)=>{const w=Ar(x,e),T=C=>{var I,P;(I=C.persist)==null||I.call(C);const k=C.target.value;(P=S==null?void 0:S.onChange)==null||P.call(S,C),s(L=>an(L,x,k))};return{...S,loading:n.loading,name:x,id:x,onChange:T,form:t,onInvalid:l,error:Pn(r,x,void 0),required:S.required??!w.isOptional(),value:Pn(a,x,void 0)||(S==null?void 0:S.value)||"",type:Le.instance(w,ao)?"number":(S==null?void 0:S.type)??"text",ref:C=>C===null?void 0:i.current[x]={element:C,schema:w}}},m=(x,S=gi)=>{const w=Ar(x,e);return{...S,name:x,id:x,onChangeOptions:C=>{s(k=>an(k,x,C))},form:t,loading:n.loading,onInvalid:l,error:Pn(r,x,void 0),required:S.required??!w.isOptional(),value:Pn(a,x,void 0)||(S==null?void 0:S.value)||[],ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:w})}},g=(x,S=gi)=>{const w=Ar(x,e),T=w._def.typeName==="ZodNumber";return{...S,name:x,id:x,onChange:k=>{var P,L;(P=k.persist)==null||P.call(k);const I=T?k.target.valueAsNumber:k.target.value;(L=S==null?void 0:S.onChange)==null||L.call(S,k),s(N=>an(N,x,I))},form:t,loading:n.loading,onInvalid:l,error:Pn(r,x,void 0),required:S.required??!w.isOptional(),type:T?"number":(S==null?void 0:S.type)??"text",value:Pn(a,x,void 0)||(S==null?void 0:S.value)||"",ref:k=>k===null?void 0:void(i.current[x]={element:k,schema:w})}};E.useEffect(()=>{const x=Object.values(i.current).map(w=>{const T=w.element.dataset.origin?document.querySelector(`[data-target="${w.element.name}"]`):w.element,C=w.schema.safeParse(_r(T)),k=N=>{var V;const $=CS(N.target);if(!$)return!1;const _=N.target,M=Dp(N.target)||(N.relatedTarget?_r(N.relatedTarget):""),D=w.schema.safeParse(M);if(_.setAttribute("value",M),D.success)return T.setCustomValidity&&T.setCustomValidity(""),o(F=>{if(Le.null(F))return null;const H=an(F,$,void 0);return Le.empty(F)||Le.nil(F)||Le.empty(H)?null:H}),!1;if(T.required){const F=((V=D.error.issues[0])==null?void 0:V.message)||"";T.setCustomValidity&&T.setCustomValidity(F),o(H=>{if(Le.null(H))return null;const O=an(H,$,F||void 0);return Le.empty(O)?null:O})}return!1},I=new AbortController,P=T.getAttribute("data-trigger")||"blur";T.addEventListener(P,k,{signal:I.signal});const L=T.dataset.shadow?!1:T.required?!C.success:!1;return{input:w,hasInitialError:L,unsubscribe:()=>I.abort()}});return x.some(w=>w.hasInitialError)&&o(w=>w===null?{}:w),()=>x.forEach(w=>w.unsubscribe())});const h=x=>S=>{var L;S.preventDefault();const w=S.currentTarget;let T=ES(w);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(w.elements)).forEach(N=>{if(N.tagName==="SELECT"){const $=N;T=an(T,$.name,$.value)}if(N.tagName==="INPUT"){const $=N,_=Dp($)||($?_r($):"");T=an(T,$.dataset.target||$.name,_)}});const k=TS(T,a),I=e.safeParse(k),P=()=>{var N;oS(w),(N=n.interceptor)==null||N.clear()};if(I.success){const N=JSON.stringify(I.data);return w.setAttribute("data-json",N),(L=n.interceptor)==null||L.clear(),x==null?void 0:x(S,{form:w,event:S,reset:P,setErrors:o,errors:[],success:!0,data:I.data,json:I.data})}return console.group("useForm error"),console.info(I),console.info(I.error.issues),console.error(I.error),console.groupEnd(),w.reportValidity(),x==null?void 0:x(S,{form:w,json:T,event:S,reset:P,setErrors:o,data:T,success:!1,errors:I.error.issues.map(N=>({message:N.message,path:N.path.map($=>String($))}))})},v=x=>ud(a,x)||"",b=x=>({...x,id:t,name:t});return E.useEffect(()=>{var x;n.interceptor&&((x=n.interceptor)==null||x.set(a))},[a]),{get:v,input:g,state:a,errors:r,select:d,checkbox:p,onSubmit:h,setState:s,textarea:f,onInvalid:c,controller:b,datepicker:u,name:t,multiselect:m,disabled:r!==null}},Xz=e=>e?JSON.parse(e.getAttribute("data-json")):{},Qz=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},kS={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},PS={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},AS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},Jz={name:"dark",zIndex:AS,rounded:kS,spacing:PS,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",muted:"hsla(210, 10%, 40%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},eB={rounded:kS,spacing:PS,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},zIndex:AS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 45%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 95%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 20%, 97%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},tB=Jz,nB=eB,rB=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...bs,...e.tweaks},parser:e.parser||gs.hsla,map:{...ys,...e.map}}),[e]);return y.jsx(Fo.Provider,{value:t,children:e.children})},oB=()=>{const e=E.useContext(Fo);return e?e.parser:gs.hsla};ee.Alert=W_,ee.Autocomplete=PV,ee.Button=Da,ee.Calendar=Ib,ee.Card=hd,ee.Checkbox=Hf,ee.ColType=ui,ee.Collapse=_y,ee.CommandPalette=FF,ee.ComponentsProvider=rB,ee.Context=Fo,ee.DatePicker=_V,ee.Dict=xn,ee.Dropdown=ei,ee.Empty=Ob,ee.Expand=LF,ee.FileUpload=U$,ee.Form=Y$,ee.Input=ya,ee.InputFeedback=Zw,ee.InputField=va,ee.Menu=jF,ee.MenuItem=$F,ee.Modal=ff,ee.MultiSelect=ej,ee.Notifications=mN,ee.Polymorph=ln,ee.Progress=gN,ee.Radiobox=tj,ee.RenderOnView=cE,ee.Select=io,ee.Slider=rj,ee.Stats=vN,ee.Switch=oj,ee.Tab=wN,ee.Table=mz,ee.Tabs=bN,ee.Tag=Na,ee.TaskList=ij,ee.Textarea=aj,ee.Timeline=SN,ee.TimelineItem=Ps,ee.Toolbar=zF,ee.Tooltip=hf,ee.TransferList=cj,ee.createColumns=Nj,ee.createCssProperties=IM,ee.createDesignTokens=yb,ee.createFormStorage=Gz,ee.createOptionCols=fp,ee.createStyles=PM,ee.createTheme=_M,ee.createTokenStyles=OM,ee.css=Ae,ee.defaultDarkTheme=tB,ee.defaultLightTheme=nB,ee.defaultTranslations=ys,ee.defaultTweaks=bs,ee.dispatchInput=nm,ee.formReset=oS,ee.formToJson=ES,ee.getCoords=iE,ee.getJsonForm=Xz,ee.getModalScrollerRef=jj,ee.getRemainingSize=wi,ee.getSchemaShape=Ar,ee.hasVerticalScroll=rm,ee.initializeInputDataset=xi,ee.isMobile=Eb,ee.isReactComponent=oE,ee.isReactFC=Oc,ee.isSsr=cr,ee.mergeRefs=qn,ee.negate=MM,ee.noop=fd,ee.parsers=gs,ee.path=ud,ee.reduceTokens=lr,ee.safeRegex=dd,ee.splitInto=Tb,ee.useColorParser=oB,ee.useForm=Zz,ee.useLocale=cd,ee.useNotification=pN,ee.usePrevious=Qz,ee.useReactive=A0,ee.useStableRef=nr,ee.useSwipe=xb,ee.useTablePreferences=Vj,ee.useTranslations=Ct,ee.uuid=Lo,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
246
+ `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),sj=e=>{const[t,n]=E.useState(0);return E.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},lj={Item:E.forwardRef(function(t,n){return y.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return y.jsx("ul",{...t,ref:n,className:"space-y-3"})})},cj=e=>{const t=E.useRef(null),n=sj(t);return y.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[y.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[y.jsx("header",{className:"border-b border-card-border pb-2"}),y.jsxs("div",{className:"px-8 space-y-2",children:[y.jsx(ya,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),y.jsx($f,{height:n,useWindowScroll:!0,data:e.source,components:lj,itemContent:(r,o)=>y.jsx(E.Fragment,{children:y.jsx(Hf,{children:y.jsx(e.Item,{data:o})})})})]})]}),y.jsx("div",{children:y.jsx(Da,{children:y.jsx(Hu,{})})}),y.jsx("div",{})]})};var uj=Object.defineProperty,z1=Object.getOwnPropertySymbols,dj=Object.prototype.hasOwnProperty,fj=Object.prototype.propertyIsEnumerable,B1=(e,t,n)=>t in e?uj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pj=(e,t)=>{for(var n in t||(t={}))dj.call(t,n)&&B1(e,n,t[n]);if(z1)for(var n of z1(t))fj.call(t,n)&&B1(e,n,t[n]);return e},sp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},hj=(e,t,n,r)=>vl(sp,e,t,n,r),li=e=>typeof e=="object",Cr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!li(e)&&!li(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Cr(e[r],t[r]))},mj=(e,t)=>(li(e)||Array.isArray(e))&&t?e[t]:e,gj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,gl=e=>/[0-9.]+/.test(e),R1=e=>["string","number"].includes(typeof e),H1=e=>e==null||(e==null?void 0:e.length)===0||e==="",W1={eq:Cr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:H1,notEmpty:e=>!H1(e),in:(e,t)=>sp(t,n=>Cr(e,n)),notIn:(e,t)=>q1(t,n=>!Cr(e,n))},vj=e=>{if(e in W1)return W1[e];throw new Error("Linq - Symbol not found")},ci=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},vl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=vj(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},yj=(e,t,n,r)=>vl(ci,e,t,n,r),q1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},bj=(e,t,n,r)=>vl(q1,e,t,n,r),U1=e=>{if(e===null)return null;const t=pj({},e);return Object.keys(t).forEach(n=>t[n]=li(e[n])?U1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Y1=(e,t)=>{if(li(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Cr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Cr(t,r))return!0}return!1},xj=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},wj=e=>ci(e,(t,n,r)=>li(t)?n===r.findIndex(o=>Cr(o,t)):n===r.indexOf(t)),Sj=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},K1=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},Tj=(e,t)=>K1(e,n=>n[t]),G1=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},Ej=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},Cj=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return gl(e)&&gl(t)?r.map(a=>Number.parseInt(a)):r},lp=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&gl(e)&&gl(t)){const o=[],[i,a]=Ej(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return Cj(e,t,r)},kj=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?lp(r,o,1):lp(r,i,Number.parseInt(o,10))}return R1(e)&&R1(t)?lp(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},cp=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},Z1=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},Pj=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},Aj=(e,t,n,r)=>vl(Pj,e,t,n,r),X1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(gj(t))},Q1=(e=>(e.Asc="asc",e.Desc="desc",e))(Q1||{}),_j=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.key,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),Ij=(e,t)=>e.sort(_j(t)),Oj=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ci(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},Mj=class Bp{constructor(t=[]){this.array=t}static Range(...t){return kj(...t)}static New(t){return new Bp(t)}Where(t,n,r){return this.array=yj(this.array,t,n,r),this}Some(t,n,r){return hj(this.array,t,n,r)}All(t,n,r){return bj(this.array,t,n,r)}Reverse(){return this.array=Z1(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=Aj(this.array,t,n,r),this}Distinct(){return this.array=wj(this.array),this}First(t){return t===void 0?this.array[0]:Sj(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?cp((n,r)=>n+r,0,this.array):cp((n,r)=>n+mj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return Tj(this.array,t)}GroupWith(t){return K1(this.array,t)}Except(t){return ci(this.array,n=>!Y1(t,n))}Intersect(t){return ci(this.array,n=>Y1(t,n))}OrderBy(t,n){let r;return r=t?X1(this.array,t):this.array.toSorted(),this.array=n==="desc"?Z1(r):r,this}Includes(t){return sp(this.array,n=>Cr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return cp(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(G1(this.array,n=>[t,n]))}Zip(t,n){return G1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ci(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Bp(U1(this.array))}ToObject(t){return xj(this.array,t)}Sort(t){return Array.isArray(t)?Ij(this.array,t):X1(this.array,t)}Unique(t){return Oj(this.array,t)}},J1=Mj,up={},eS;function Dj(){return eS||(eS=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,v)=>{try{Object.keys(h).forEach(v)}catch(b){window.console.log(b)}},n=h=>h==null,r=h=>{const v=typeof h;return v==="string"||v==="number"||v==="boolean"||n(h)},o=(h,v)=>{const b=v.getItem(h);try{return JSON.parse(b)}catch{return b??null}},i=h=>Object.keys(h).reduce((v,b)=>({...v,[b]:o(b,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,v)=>(h[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(v=>v(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const v=h.domain??"";return v===""?"":`domain=${h.multiDomain?".":""}${v}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(v=>v.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const v=p.json()[h];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,v,b={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((w,T)=>{const C=T.parse(b);return C===""?w:w.concat(C)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=S,u()}},f=h=>{const v=new Set,b=x=>{h().removeItem(x);const S=i(h());v.forEach(w=>w(S))};return{delete:b,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const S=h().getItem(x);return!n(S)},deleteAll:()=>{t(h(),b),v.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,S)=>{h().setItem(x,JSON.stringify(S)),v.forEach(w=>w(h()))}}},m=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=m,e.createStorage=f}(up)),up}var xa=Dj();const dp=e=>e.headerLabel??e.thead??e.id,fp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var ui=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(ui||{});const pp=e=>e.type==="number"?e.valueAsNumber:e.value,Nj=e=>{let t=[];return e({add:(o,i,a)=>t.push({...a,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},Fj={},Lj=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const a=r.get(o.id);return a===void 0?e[i]:a})},Vj=(e,t,n=Fj)=>{const r=cr()?null:xa.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=sd({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:Lj(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return cr()||xa.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},$j=e=>{const t=nr(e),n=E.useRef(null),r=E.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-colid="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},jj=()=>cr()?void 0:document.querySelector('[data-component="modal-body"]'),hp=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??ui.Text,a=t[i]??[],s=((c=a.find(d=>d["data-default"]))==null?void 0:c.value)??((u=a[0])==null?void 0:u.value),l=n[s];return{id:Lo(),operation:l,label:dp(e),name:o,type:i,value:"",...r}},mp=()=>{const e=Ct(),t=E.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:E.useMemo(()=>({[ui.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[ui.Boolean]:[t.is,t.isNot],[ui.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},zj=e=>{const t=Ct(),n=mp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,hp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>{if(c!==p.id)return p;const f=e.cols.find(m=>u===m.id);return hp(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,operation:n.operations[u]}:p))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=pp(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return y.jsx(E.Fragment,{children:y.jsx(ei,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:y.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[y.jsx(L_,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:y.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return y.jsxs("li",{className:"flex flex-nowrap gap-3",children:[y.jsx(io,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),y.jsx(io,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),y.jsx(ya,{optionalText:"","data-id":l.id,onChange:s,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),y.jsx("div",{className:"flex justify-center items-center mt-5",children:y.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:y.jsx(os,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[y.jsx(Wu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},Bj=({filter:e,onDelete:t,set:n})=>{const r=Ct(),o=mp(),i=s=>{const l=s.target.value,c=s.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},a=s=>{const l=s.target.dataset.id||"",c=pp(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return y.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[y.jsx(io,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),y.jsx(ya,{optionalText:" ","data-id":e.id,onChange:a,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),y.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:y.jsx(os,{className:"text-danger",size:14})})]})},Rj=({item:e,onPointerDown:t})=>{const n=rs(0);return y.jsxs(yy,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[y.jsx("button",{type:"button",className:"cursor-grab",children:y.jsx(F_,{size:14})}),y.jsx("span",{children:e.groupName})]},e.groupId)},Hj=e=>{var l;const t=Ct(),n=fp(e.cols),r=p_(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var h;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((h=u.options.item(p))==null?void 0:h.label)||"";i(f);const m=new J1(e.rows).GroupBy(d),g=e.cols.find(v=>v.id===d);e.setGroups(gT(m).map((v,b)=>{const x=m[v];return{...g,groupId:Lo(),groupKey:d,index:b,rows:x,groupName:v}}))},s=()=>e.setGroups([]);return y.jsx(E.Fragment,{children:y.jsxs(ei,{arrow:!1,title:t.tableGroupLabel,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(B_,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[y.jsxs("div",{className:"flex flex-nowrap items-center",children:[y.jsx(io,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),y.jsx(Da,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:y.jsx(os,{size:16,className:"text-danger"})})]}),e.groups.length>0?y.jsxs("section",{className:"my-4",children:[y.jsx("header",{children:y.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),y.jsx(CE,{children:y.jsx(gy,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>y.jsx(Rj,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},Wj=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),qj=(e,t)=>e.toSorted(Wj(t)),tS=(e,t,n)=>({label:t,id:Lo(),type:n,value:e.id}),Uj=e=>{const t=Ct(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,tS(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return y.jsx(E.Fragment,{children:y.jsx(ei,{title:t.tableSortDropdownTitle,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(wy,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:y.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>y.jsxs("li",{className:"flex flex-nowrap gap-3",children:[y.jsx(io,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),y.jsx(io,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),y.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:y.jsx(os,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[y.jsx(Wu,{size:14})," ",t.tableSortAddButton]})})]})})})},Yj=e=>{const t=Ct(),[n,r]=E.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");E.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=tS(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=dp(e.col);return y.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[y.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?y.jsx(k_,{size:14}):null,n==="desc"?y.jsx(C_,{size:14}):null,n==="undefined"?y.jsx(wy,{size:14}):null]})},Kj=e=>y.jsx("header",{className:"min-w-full mb-1",children:y.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[y.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[y.jsx("span",{children:y.jsx(zj,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),y.jsx("span",{children:y.jsx(Uj,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),y.jsx("span",{children:y.jsx(Hj,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),y.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>y.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[y.jsxs("span",{children:[y.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),y.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[y.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),y.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=pp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function Gj(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let s=o>2?o:2;s<=Math.min(t,i);s++)n.push(s);const a=t-2;return i+1!==a&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const Zj=e=>{const t=E.useId(),n=Ct(),r=E.useMemo(()=>Gj(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return y.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[y.jsx("p",{children:y.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?y.jsxs(E.Fragment,{children:[y.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),y.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>y.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),y.jsx("nav",{children:y.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?y.jsx("li",{children:y.jsx(ln,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:y.jsx(E.Fragment,{children:typeof i=="string"?y.jsx("li",{children:"..."}):y.jsx("li",{children:y.jsx(ln,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?y.jsx("li",{children:y.jsx(ln,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},Xj=e=>{const t=E.useRef(null),n=E.useRef(null),[r,o]=E.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return E.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),y.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full min-w-8 max-w-20 items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:y.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},Qj=(e,t,n)=>{const r=n.cols,o=n.loading;return y.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,l=ud(t,i.id),c=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"",d=a===0&&n.Aside&&o===!1,p=n.Aside;return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`group-table-cell py-2 sm:py-2 flex flex-col md:table-cell md:h-14 md:border-l md:border-table-border px-2 first:border-transparent ${u}`},d?y.jsx(Xj,{children:y.jsx(p,{col:i,row:t,rowIndex:e})}):null,y.jsx("span",{className:"block md:hidden text-sm font-bold leading-tight",children:i.thead}),y.jsx("span",{className:"relative",children:o?cf:c?y.jsx(E.Fragment,{children:y.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):y.jsx(E.Fragment,{children:Le.nil(l)?"":l})}))})})},Jj={top:0,left:0,right:0,bottom:-1},ez=e=>{var g;const t=Rf(),n=Ct(),r=e.filters.filter(h=>h.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=mp(),l=o?$_:j_,c=E.useRef(null),u=h=>{const v=h.currentTarget.dataset.id||"";return e.setFilters(b=>b.filter(x=>x.id!==v))},d=E.useCallback(h=>{if(h===null)return;c.current=h;const v=new AbortController;return h.addEventListener("pointerdown",b=>{if(b.target.dataset.type==="resizer")return b.stopPropagation(),b.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),p=e.sorters.find(h=>e.header.id===h.value),f=p!=null&&p.type?p.type===Q1.Asc?"ascending":"descending":"none",m=dp(e.header);return y.jsxs(yy,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative min-w-0 cursor-grab font-medium ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[y.jsx("span",{className:`flex h-full items-center justify-between bg-table-header px-2 py-4 ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:y.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?y.jsx(ei,{arrow:!0,trigger:y.jsxs("span",{children:[y.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),y.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:y.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",y.jsx("span",{className:"font-medium",children:m})]}),children:y.jsxs("ul",{className:"font-medium",children:[r.length===0?null:y.jsx(E.Fragment,{children:r.map(h=>y.jsx("li",{className:"my-1",children:y.jsx(Bj,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),y.jsx("li",{children:y.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(h=>h.concat(hp(e.header,s.options,s.operations))),children:[y.jsx(Wu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,y.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?y.jsx(Yj,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:y.jsx(pt.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:Jj,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:h=>void h.currentTarget.focus(),onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,x=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(v+x)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,v)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const b=c.current.getBoundingClientRect().width,x=v.delta.x;c.current.style.width=`${Math.abs(b+x)}px`}})]})},tz=e=>{const[t,n]=$j(e.setCols);return y.jsx(gy,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,children:y.jsx(rr,{children:e.headers.map((r,o)=>y.jsx(ez,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},nS=E.createContext({}),nz=()=>E.useContext(nS),rz=E.forwardRef(({context:e,className:t="",...n},r)=>y.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:y.jsx(rr,{children:n.children})})),oz=E.forwardRef(({context:e,className:t="",...n},r)=>y.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-separate text-left ${t??""}`})),iz=E.forwardRef(({context:e,...t},n)=>{const r=nz(),o={...t==null?void 0:t.style,top:Le.number(r.sticky)?`${r.sticky}px`:void 0};return y.jsx("thead",{...t,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group shadow-shadow-card group:sticky",ref:n})}),az=E.forwardRef(({context:e,item:t,...n},r)=>y.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${(n==null?void 0:n.className)??""}`})),sz=E.forwardRef((e,t)=>e.context.loadingMore?y.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:y.jsx("tr",{role:"row",className:"bg-card-background",children:y.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:y.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),lz={TableHead:iz,Table:oz,TableBody:rz,TableRow:az,TableFoot:sz},cz=[0,0,0,0,0,0,0,0,0,0],uz=e=>y.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?cf:y.jsx(Ob,{})}),dz=()=>y.jsx(E.Fragment,{}),fz=()=>y.jsx(E.Fragment,{}),pz=[],rS=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,border:l=!1,pagination:c=null,useControl:u=!1,...d})=>{const p=E.useRef(null),[f,m]=E.useState(!1),g=nr(a),h=nr(d.loadingMore),v=E.useMemo(()=>{if(d.loading)return cz;if(u)return d.rows;const S=new J1(d.rows);return t.length>0&&t.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:S.Where(w.name,w.operation.symbol,w.value)),r.length===0?S.Select():qj(S.Select(),r)},[d.loading,d.rows,u,t,r]);E.useEffect(()=>{if(p.current===null)return()=>{};const S=p.current,w=new IntersectionObserver(T=>{var I;return T[T.length-1].isIntersecting&&h.current?((I=g.current)==null||I.call(g),void m(!0)):m(!1)});return w.observe(S),()=>w.disconnect()},[h,g]);const b=v.length===0,x={loading:d.loading,loadingMore:d.loadingMore,cols:e,Aside:d.Aside};return y.jsxs("div",{className:"min-w-full",children:[y.jsxs("div",{className:`group w-full relative rounded-lg ${l?"border border-table-border":""}`,children:[y.jsx(aV,{context:x,components:lz,totalCount:v.length,style:{height:"100%"},itemContent:b?dz:Qj,data:b?pz:v,useWindowScroll:!s,fixedFooterContent:f?fz:null,customScrollParent:s?s():void 0,fixedHeaderContent:()=>y.jsx(tz,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!d.loading,inlineFilter:d.inlineFilter,inlineSorter:d.inlineSorter})}),b?y.jsx(uz,{loading:d.loading}):null,y.jsx("div",{"aria-hidden":"true",ref:p,className:"w-full h-0.5"})]}),c!==null?y.jsx(Zj,{...c}):null]})},hz=(e,t)=>typeof t=="function"?t(e):t,yl=(e,t,n)=>e===t||n==null?void 0:n(t),mz=e=>{const t=Rf(),n=E.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=E.useMemo(()=>fp(e.cols),[e.cols]),[i,a]=sd({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:hz(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>{var c;return(c=e.set)==null||c.call(e,s),yl((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),yl((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),yl((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),yl((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return y.jsxs(nS.Provider,{value:n,children:[r?y.jsx(Kj,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?y.jsx(rS,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):y.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>y.jsx("div",{className:"min-w-full",children:y.jsx(rS,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})},gz=["INPUT","SELECT"],oS=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{gz.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var gp,iS;function vp(){if(iS)return gp;iS=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return gp={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},gp}var yp,aS;function sS(){if(aS)return yp;aS=1;var e=vp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],v=0;v<256;++v)h.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return h}(),o=function(v){for(;v.length>1;){var b=v.pop(),x=b.obj[b.prop];if(n(x)){for(var S=[],w=0;w<x.length;++w)typeof x[w]<"u"&&S.push(x[w]);b.obj[b.prop]=S}}},i=function(v,b){for(var x=b&&b.plainObjects?{__proto__:null}:{},S=0;S<v.length;++S)typeof v[S]<"u"&&(x[S]=v[S]);return x},a=function h(v,b,x){if(!b)return v;if(typeof b!="object"&&typeof b!="function"){if(n(v))v.push(b);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,b))&&(v[b]=!0);else return[v,b];return v}if(!v||typeof v!="object")return[v].concat(b);var S=v;return n(v)&&!n(b)&&(S=i(v,x)),n(v)&&n(b)?(b.forEach(function(w,T){if(t.call(v,T)){var C=v[T];C&&typeof C=="object"&&w&&typeof w=="object"?v[T]=h(C,w,x):v.push(w)}else v[T]=w}),v):Object.keys(b).reduce(function(w,T){var C=b[T];return t.call(w,T)?w[T]=h(w[T],C,x):w[T]=C,w},S)},s=function(v,b){return Object.keys(b).reduce(function(x,S){return x[S]=b[S],x},v)},l=function(h,v,b){var x=h.replace(/\+/g," ");if(b==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(v,b,x,S,w){if(v.length===0)return v;var T=v;if(typeof v=="symbol"?T=Symbol.prototype.toString.call(v):typeof v!="string"&&(T=String(v)),x==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function($){return"%26%23"+parseInt($.slice(2),16)+"%3B"});for(var C="",k=0;k<T.length;k+=c){for(var I=T.length>=c?T.slice(k,k+c):T,P=[],L=0;L<I.length;++L){var N=I.charCodeAt(L);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||w===e.RFC1738&&(N===40||N===41)){P[P.length]=I.charAt(L);continue}if(N<128){P[P.length]=r[N];continue}if(N<2048){P[P.length]=r[192|N>>6]+r[128|N&63];continue}if(N<55296||N>=57344){P[P.length]=r[224|N>>12]+r[128|N>>6&63]+r[128|N&63];continue}L+=1,N=65536+((N&1023)<<10|I.charCodeAt(L)&1023),P[P.length]=r[240|N>>18]+r[128|N>>12&63]+r[128|N>>6&63]+r[128|N&63]}C+=P.join("")}return C},d=function(v){for(var b=[{obj:{o:v},prop:"o"}],x=[],S=0;S<b.length;++S)for(var w=b[S],T=w.obj[w.prop],C=Object.keys(T),k=0;k<C.length;++k){var I=C[k],P=T[I];typeof P=="object"&&P!==null&&x.indexOf(P)===-1&&(b.push({obj:T,prop:I}),x.push(P))}return o(b),v},p=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},m=function(v,b){return[].concat(v,b)},g=function(v,b){if(n(v)){for(var x=[],S=0;S<v.length;S+=1)x.push(b(v[S]));return x}return b(v)};return yp={arrayToObject:i,assign:s,combine:m,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},yp}var bp,lS;function vz(){if(lS)return bp;lS=1;var e=dT(),t=sS(),n=vp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,v){return h+"["+v+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,v,b,x,S,w,T,C,k,I,P,L,N,$,_,M,D,V){for(var F=h,H=V,O=0,B=!1;(H=H.get(p))!==void 0&&!B;){var X=H.get(h);if(O+=1,typeof X<"u"){if(X===O)throw new RangeError("Cyclic object value");B=!0}typeof H.get(p)>"u"&&(O=0)}if(typeof I=="function"?F=I(v,F):F instanceof Date?F=N(F):b==="comma"&&i(F)&&(F=t.maybeMap(F,function(Ie){return Ie instanceof Date?N(Ie):Ie})),F===null){if(w)return k&&!M?k(v,u.encoder,D,"key",$):v;F=""}if(d(F)||t.isBuffer(F)){if(k){var Q=M?v:k(v,u.encoder,D,"key",$);return[_(Q)+"="+_(k(F,u.encoder,D,"value",$))]}return[_(v)+"="+_(String(F))]}var J=[];if(typeof F>"u")return J;var G;if(b==="comma"&&i(F))M&&k&&(F=t.maybeMap(F,k)),G=[{value:F.length>0?F.join(",")||null:void 0}];else if(i(I))G=I;else{var K=Object.keys(F);G=P?K.sort(P):K}var Z=C?String(v).replace(/\./g,"%2E"):String(v),j=x&&i(F)&&F.length===1?Z+"[]":Z;if(S&&i(F)&&F.length===0)return j+"[]";for(var z=0;z<G.length;++z){var Y=G[z],ae=typeof Y=="object"&&Y&&typeof Y.value<"u"?Y.value:F[Y];if(!(T&&ae===null)){var R=L&&C?String(Y).replace(/\./g,"%2E"):String(Y),be=i(F)?typeof b=="function"?b(j,R):j:j+(L?"."+R:"["+R+"]");V.set(h,O);var Ce=e();Ce.set(p,V),s(J,g(ae,be,b,x,S,w,T,C,b==="comma"&&M&&i(F)?null:k,I,P,L,N,$,_,M,D,Ce))}}return J},m=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");b=h.format}var x=n.formatters[b],S=u.filter;(typeof h.filter=="function"||i(h.filter))&&(S=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var T=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:S,format:b,formatter:x,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return bp=function(g,h){var v=g,b=m(h),x,S;typeof b.filter=="function"?(S=b.filter,v=S("",v)):i(b.filter)&&(S=b.filter,x=S);var w=[];if(typeof v!="object"||v===null)return"";var T=o[b.arrayFormat],C=T==="comma"&&b.commaRoundTrip;x||(x=Object.keys(v)),b.sort&&x.sort(b.sort);for(var k=e(),I=0;I<x.length;++I){var P=x[I],L=v[P];b.skipNulls&&L===null||s(w,f(L,P,T,C,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,k))}var N=w.join(b.delimiter),$=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),N.length>0?$+N:""},bp}var xp,cS;function yz(){if(cS)return xp;cS=1;var e=sS(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,f,m){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&m>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,m){var g={__proto__:null},h=m.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=m.parameterLimit===1/0?void 0:m.parameterLimit,b=h.split(m.delimiter,m.throwOnLimitExceeded?v+1:v);if(m.throwOnLimitExceeded&&b.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var x=-1,S,w=m.charset;if(m.charsetSentinel)for(S=0;S<b.length;++S)b[S].indexOf("utf8=")===0&&(b[S]===s?w="utf-8":b[S]===a&&(w="iso-8859-1"),x=S,S=b.length);for(S=0;S<b.length;++S)if(S!==x){var T=b[S],C=T.indexOf("]="),k=C===-1?T.indexOf("="):C+1,I,P;k===-1?(I=m.decoder(T,r.decoder,w,"key"),P=m.strictNullHandling?null:""):(I=m.decoder(T.slice(0,k),r.decoder,w,"key"),P=e.maybeMap(i(T.slice(k+1),m,n(g[I])?g[I].length:0),function(N){return m.decoder(N,r.decoder,w,"value")})),P&&m.interpretNumericEntities&&w==="iso-8859-1"&&(P=o(String(P))),T.indexOf("[]=")>-1&&(P=n(P)?[P]:P);var L=t.call(g,I);L&&m.duplicates==="combine"?g[I]=e.combine(g[I],P):(!L||m.duplicates==="last")&&(g[I]=P)}return g},c=function(p,f,m,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");h=Array.isArray(f)&&f[v]?f[v].length:0}for(var b=g?f:i(f,m,h),x=p.length-1;x>=0;--x){var S,w=p[x];if(w==="[]"&&m.parseArrays)S=m.allowEmptyArrays&&(b===""||m.strictNullHandling&&b===null)?[]:e.combine([],b);else{S=m.plainObjects?{__proto__:null}:{};var T=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=m.decodeDotInKeys?T.replace(/%2E/g,"."):T,k=parseInt(C,10);!m.parseArrays&&C===""?S={0:b}:!isNaN(k)&&w!==C&&String(k)===C&&k>=0&&m.parseArrays&&k<=m.arrayLimit?(S=[],S[k]=b):C!=="__proto__"&&(S[C]=b)}b=S}return b},u=function(f,m,g,h){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,b=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,S=g.depth>0&&b.exec(v),w=S?v.slice(0,S.index):v,T=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;T.push(w)}for(var C=0;g.depth>0&&(S=x.exec(v))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,S[1].slice(1,-1))&&!g.allowPrototypes)return;T.push(S[1])}if(S){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");T.push("["+v.slice(S.index)+"]")}return c(T,m,g,h)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return xp=function(p,f){var m=d(f);if(p===""||p===null||typeof p>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,m):p,h=m.plainObjects?{__proto__:null}:{},v=Object.keys(g),b=0;b<v.length;++b){var x=v[b],S=u(x,g[x],m,typeof p=="string");h=e.merge(h,S,m)}return m.allowSparse===!0?h:e.compact(h)},xp}var wp,uS;function bz(){if(uS)return wp;uS=1;var e=vz(),t=yz(),n=vp();return wp={formats:n,parse:t,stringify:e},wp}var xz=bz(),qe;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(qe||(qe={}));var dS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(dS||(dS={}));const fe=qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),kr=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},oe=qe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class mn extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof mn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,qe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}mn.create=e=>new mn(e);const wa=(e,t)=>{let n;switch(e.code){case oe.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case oe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,qe.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:n=`Unrecognized key(s) in object: ${qe.joinValues(e.keys,", ")}`;break;case oe.invalid_union:n="Invalid input";break;case oe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${qe.joinValues(e.options)}`;break;case oe.invalid_enum_value:n=`Invalid enum value. Expected ${qe.joinValues(e.options)}, received '${e.received}'`;break;case oe.invalid_arguments:n="Invalid function arguments";break;case oe.invalid_return_type:n="Invalid function return type";break;case oe.invalid_date:n="Invalid date";break;case oe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:qe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case oe.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case oe.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case oe.custom:n="Invalid input";break;case oe.invalid_intersection_types:n="Intersection results could not be merged";break;case oe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case oe.not_finite:n="Number must be finite";break;default:n=t.defaultError,qe.assertNever(e)}return{message:n}};let wz=wa;function Sp(){return wz}const Tp=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ue(e,t){const n=Sp(),r=Tp({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===wa?void 0:wa].filter(o=>!!o)});e.common.issues.push(r)}class Yt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Pe;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return Yt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return Pe;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Pe=Object.freeze({status:"aborted"}),Sa=e=>({status:"dirty",value:e}),Qt=e=>({status:"valid",value:e}),fS=e=>e.status==="aborted",pS=e=>e.status==="dirty",di=e=>e.status==="valid",bl=e=>typeof Promise<"u"&&e instanceof Promise;function xl(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function hS(e,t,n,r,o){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var ye;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ye||(ye={}));var Ta,Ea;class Rn{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const mS=(e,t)=>{if(di(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new mn(e.common.issues);return this._error=n,this._error}}};function Me(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{var l,c;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:o}}class je{get description(){return this._def.description}_getType(t){return kr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:kr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Yt,ctx:{common:t.parent.common,data:t.data,parsedType:kr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(bl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:kr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return mS(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:kr(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return di(i)?{value:i.value}:{issues:o.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>di(i)?{value:i.value}:{issues:o.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:kr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(bl(o)?o:Promise.resolve(o));return mS(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:oe.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Jn({schema:this,typeName:Ee.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return er.create(this,this._def)}nullable(){return lo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Hn.create(this)}promise(){return Pa.create(this,this._def)}or(t){return Tl.create([this,t],this._def)}and(t){return El.create(this,t,this._def)}transform(t){return new Jn({...Me(this._def),schema:this,typeName:Ee.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new _l({...Me(this._def),innerType:this,defaultValue:n,typeName:Ee.ZodDefault})}brand(){return new bS({typeName:Ee.ZodBranded,type:this,...Me(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Il({...Me(this._def),innerType:this,catchValue:n,typeName:Ee.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ol.create(this,t)}readonly(){return Ml.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Sz=/^c[^\s-]{8,}$/i,Tz=/^[0-9a-z]+$/,Ez=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Cz=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,kz=/^[a-z0-9_-]{21}$/i,Pz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Az=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,_z=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Iz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ep;const Oz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Mz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Dz=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Nz=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Fz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Lz=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gS="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Vz=new RegExp(`^${gS}$`);function vS(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function $z(e){return new RegExp(`^${vS(e)}$`)}function jz(e){let t=`${gS}T${vS(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function zz(e,t){return!!((t==="v4"||!t)&&Oz.test(e)||(t==="v6"||!t)&&Dz.test(e))}function Bz(e,t){if(!Pz.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function Rz(e,t){return!!((t==="v4"||!t)&&Mz.test(e)||(t==="v6"||!t)&&Nz.test(e))}class Zn extends je{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_type,expected:fe.string,received:i.parsedType}),Pe}const r=new Yt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?ue(o,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ue(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")_z.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"email",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ep||(Ep=new RegExp(Iz,"u")),Ep.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"emoji",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Cz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"uuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")kz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"nanoid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Sz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Tz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid2",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Ez.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ulid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ue(o,{validation:"url",code:oe.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"regex",code:oe.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?jz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Vz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?$z(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Az.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?zz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ip",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Bz(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"jwt",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Rz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cidr",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Fz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Lz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64url",code:oe.invalid_string,message:i.message}),r.dirty()):qe.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:oe.invalid_string,...ye.errToObj(r)})}_addCheck(t){return new Zn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ye.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ye.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ye.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ye.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ye.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ye.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ye.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ye.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ye.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ye.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ye.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ye.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ye.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ye.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ye.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ye.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ye.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ye.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ye.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ye.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ye.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ye.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ye.errToObj(n)})}nonempty(t){return this.min(1,ye.errToObj(t))}trim(){return new Zn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Zn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Zn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Zn.create=e=>{var t;return new Zn({checks:[],typeName:Ee.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};function Hz(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class ao extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==fe.number){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_type,expected:fe.number,received:i.parsedType}),Pe}let r;const o=new Yt;for(const i of this._def.checks)i.kind==="int"?qe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Hz(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.not_finite,message:i.message}),o.dirty()):qe.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new ao({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new ao({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ye.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ye.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ye.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ye.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&qe.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}ao.create=e=>new ao({checks:[],typeName:Ee.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class fi extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==fe.bigint)return this._getInvalidInput(t);let r;const o=new Yt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):qe.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ue(n,{code:oe.invalid_type,expected:fe.bigint,received:n.parsedType}),Pe}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new fi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new fi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}fi.create=e=>{var t;return new fi({checks:[],typeName:Ee.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};class Cp extends je{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.boolean,received:r.parsedType}),Pe}return Qt(t.data)}}Cp.create=e=>new Cp({typeName:Ee.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class Ca extends je{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_type,expected:fe.date,received:i.parsedType}),Pe}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_date}),Pe}const r=new Yt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):qe.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ca({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ye.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ye.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ca.create=e=>new Ca({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ee.ZodDate,...Me(e)});class kp extends je{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.symbol,received:r.parsedType}),Pe}return Qt(t.data)}}kp.create=e=>new kp({typeName:Ee.ZodSymbol,...Me(e)});class wl extends je{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.undefined,received:r.parsedType}),Pe}return Qt(t.data)}}wl.create=e=>new wl({typeName:Ee.ZodUndefined,...Me(e)});class Sl extends je{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.null,received:r.parsedType}),Pe}return Qt(t.data)}}Sl.create=e=>new Sl({typeName:Ee.ZodNull,...Me(e)});class Pp extends je{constructor(){super(...arguments),this._any=!0}_parse(t){return Qt(t.data)}}Pp.create=e=>new Pp({typeName:Ee.ZodAny,...Me(e)});class pi extends je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Qt(t.data)}}pi.create=e=>new pi({typeName:Ee.ZodUnknown,...Me(e)});class Pr extends je{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:oe.invalid_type,expected:fe.never,received:n.parsedType}),Pe}}Pr.create=e=>new Pr({typeName:Ee.ZodNever,...Me(e)});class Ap extends je{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.void,received:r.parsedType}),Pe}return Qt(t.data)}}Ap.create=e=>new Ap({typeName:Ee.ZodVoid,...Me(e)});class Hn extends je{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ue(n,{code:oe.invalid_type,expected:fe.array,received:n.parsedType}),Pe;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ue(n,{code:a?oe.too_big:oe.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ue(n,{code:oe.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ue(n,{code:oe.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new Rn(n,a,n.path,s)))).then(a=>Yt.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Rn(n,a,n.path,s)));return Yt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Hn({...this._def,minLength:{value:t,message:ye.toString(n)}})}max(t,n){return new Hn({...this._def,maxLength:{value:t,message:ye.toString(n)}})}length(t,n){return new Hn({...this._def,exactLength:{value:t,message:ye.toString(n)}})}nonempty(t){return this.min(1,t)}}Hn.create=(e,t)=>new Hn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ee.ZodArray,...Me(t)});function hi(e){if(e instanceof wt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=er.create(hi(r))}return new wt({...e._def,shape:()=>t})}else return e instanceof Hn?new Hn({...e._def,type:hi(e.element)}):e instanceof er?er.create(hi(e.unwrap())):e instanceof lo?lo.create(hi(e.unwrap())):e instanceof Qn?Qn.create(e.items.map(t=>hi(t))):e}class wt extends je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=qe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return ue(c,{code:oe.invalid_type,expected:fe.object,received:c.parsedType}),Pe}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Pr&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Rn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Pr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(ue(o,{code:oe.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Rn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>Yt.mergeObjectSync(r,c)):Yt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ye.errToObj,new wt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ye.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new wt({...this._def,unknownKeys:"strip"})}passthrough(){return new wt({...this._def,unknownKeys:"passthrough"})}extend(t){return new wt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new wt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ee.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new wt({...this._def,catchall:t})}pick(t){const n={};return qe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new wt({...this._def,shape:()=>n})}omit(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new wt({...this._def,shape:()=>n})}deepPartial(){return hi(this)}partial(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new wt({...this._def,shape:()=>n})}required(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof er;)i=i._def.innerType;n[r]=i}}),new wt({...this._def,shape:()=>n})}keyof(){return yS(qe.objectKeys(this.shape))}}wt.create=(e,t)=>new wt({shape:()=>e,unknownKeys:"strip",catchall:Pr.create(),typeName:Ee.ZodObject,...Me(t)}),wt.strictCreate=(e,t)=>new wt({shape:()=>e,unknownKeys:"strict",catchall:Pr.create(),typeName:Ee.ZodObject,...Me(t)}),wt.lazycreate=(e,t)=>new wt({shape:e,unknownKeys:"strip",catchall:Pr.create(),typeName:Ee.ZodObject,...Me(t)});class Tl extends je{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new mn(s.ctx.common.issues));return ue(n,{code:oe.invalid_union,unionErrors:a}),Pe}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new mn(l));return ue(n,{code:oe.invalid_union,unionErrors:s}),Pe}}get options(){return this._def.options}}Tl.create=(e,t)=>new Tl({options:e,typeName:Ee.ZodUnion,...Me(t)});const Xn=e=>e instanceof kl?Xn(e.schema):e instanceof Jn?Xn(e.innerType()):e instanceof Pl?[e.value]:e instanceof so?e.options:e instanceof Al?qe.objectValues(e.enum):e instanceof _l?Xn(e._def.innerType):e instanceof wl?[void 0]:e instanceof Sl?[null]:e instanceof er?[void 0,...Xn(e.unwrap())]:e instanceof lo?[null,...Xn(e.unwrap())]:e instanceof bS||e instanceof Ml?Xn(e.unwrap()):e instanceof Il?Xn(e._def.innerType):[];class _p extends je{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ue(n,{code:oe.invalid_type,expected:fe.object,received:n.parsedType}),Pe;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ue(n,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Pe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=Xn(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new _p({typeName:Ee.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Me(r)})}}function Ip(e,t){const n=kr(e),r=kr(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=qe.objectKeys(t),i=qe.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Ip(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=Ip(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class El extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(fS(i)||fS(a))return Pe;const s=Ip(i.value,a.value);return s.valid?((pS(i)||pS(a))&&n.dirty(),{status:n.value,value:s.data}):(ue(r,{code:oe.invalid_intersection_types}),Pe)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}El.create=(e,t,n)=>new El({left:e,right:t,typeName:Ee.ZodIntersection,...Me(n)});class Qn extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ue(r,{code:oe.invalid_type,expected:fe.array,received:r.parsedType}),Pe;if(r.data.length<this._def.items.length)return ue(r,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Pe;!this._def.rest&&r.data.length>this._def.items.length&&(ue(r,{code:oe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Rn(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Yt.mergeArray(n,a)):Yt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Qn({...this._def,rest:t})}}Qn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qn({items:e,typeName:Ee.ZodTuple,rest:null,...Me(t)})};class Cl extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.object)return ue(r,{code:oe.invalid_type,expected:fe.object,received:r.parsedType}),Pe;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new Rn(r,s,r.path,s)),value:a._parse(new Rn(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?Yt.mergeObjectAsync(n,o):Yt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof je?new Cl({keyType:t,valueType:n,typeName:Ee.ZodRecord,...Me(r)}):new Cl({keyType:Zn.create(),valueType:t,typeName:Ee.ZodRecord,...Me(n)})}}class Op extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.map)return ue(r,{code:oe.invalid_type,expected:fe.map,received:r.parsedType}),Pe;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Rn(r,s,r.path,[c,"key"])),value:i._parse(new Rn(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Pe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Pe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Op.create=(e,t,n)=>new Op({valueType:t,keyType:e,typeName:Ee.ZodMap,...Me(n)});class mi extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ue(r,{code:oe.invalid_type,expected:fe.set,received:r.parsedType}),Pe;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ue(r,{code:oe.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ue(r,{code:oe.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Pe;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new Rn(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new mi({...this._def,minSize:{value:t,message:ye.toString(n)}})}max(t,n){return new mi({...this._def,maxSize:{value:t,message:ye.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}mi.create=(e,t)=>new mi({valueType:e,minSize:null,maxSize:null,typeName:Ee.ZodSet,...Me(t)});class ka extends je{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ue(n,{code:oe.invalid_type,expected:fe.function,received:n.parsedType}),Pe;function r(s,l){return Tp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Sp(),wa].filter(c=>!!c),issueData:{code:oe.invalid_arguments,argumentsError:l}})}function o(s,l){return Tp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Sp(),wa].filter(c=>!!c),issueData:{code:oe.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Pa){const s=this;return Qt(async function(...l){const c=new mn([]),u=await s._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const s=this;return Qt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new mn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new mn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ka({...this._def,args:Qn.create(t).rest(pi.create())})}returns(t){return new ka({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ka({args:t||Qn.create([]).rest(pi.create()),returns:n||pi.create(),typeName:Ee.ZodFunction,...Me(r)})}}class kl extends je{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}kl.create=(e,t)=>new kl({getter:e,typeName:Ee.ZodLazy,...Me(t)});class Pl extends je{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:oe.invalid_literal,expected:this._def.value}),Pe}return{status:"valid",value:t.data}}get value(){return this._def.value}}Pl.create=(e,t)=>new Pl({value:e,typeName:Ee.ZodLiteral,...Me(t)});function yS(e,t){return new so({values:e,typeName:Ee.ZodEnum,...Me(t)})}class so extends je{constructor(){super(...arguments),Ta.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{expected:qe.joinValues(r),received:n.parsedType,code:oe.invalid_type}),Pe}if(xl(this,Ta)||hS(this,Ta,new Set(this._def.values)),!xl(this,Ta).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{received:n.data,code:oe.invalid_enum_value,options:r}),Pe}return Qt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return so.create(t,{...this._def,...n})}exclude(t,n=this._def){return so.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ta=new WeakMap,so.create=yS;class Al extends je{constructor(){super(...arguments),Ea.set(this,void 0)}_parse(t){const n=qe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=qe.objectValues(n);return ue(r,{expected:qe.joinValues(o),received:r.parsedType,code:oe.invalid_type}),Pe}if(xl(this,Ea)||hS(this,Ea,new Set(qe.getValidEnumValues(this._def.values))),!xl(this,Ea).has(t.data)){const o=qe.objectValues(n);return ue(r,{received:r.data,code:oe.invalid_enum_value,options:o}),Pe}return Qt(t.data)}get enum(){return this._def.values}}Ea=new WeakMap,Al.create=(e,t)=>new Al({values:e,typeName:Ee.ZodNativeEnum,...Me(t)});class Pa extends je{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ue(n,{code:oe.invalid_type,expected:fe.promise,received:n.parsedType}),Pe;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Qt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Pa.create=(e,t)=>new Pa({type:e,typeName:Ee.ZodPromise,...Me(t)});class Jn extends je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ue(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Pe;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Pe:l.status==="dirty"||n.value==="dirty"?Sa(l.value):l});{if(n.value==="aborted")return Pe;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Pe:s.status==="dirty"||n.value==="dirty"?Sa(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Pe:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Pe:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!di(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>di(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);qe.assertNever(o)}}Jn.create=(e,t,n)=>new Jn({schema:e,typeName:Ee.ZodEffects,effect:t,...Me(n)}),Jn.createWithPreprocess=(e,t,n)=>new Jn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ee.ZodEffects,...Me(n)});class er extends je{_parse(t){return this._getType(t)===fe.undefined?Qt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}er.create=(e,t)=>new er({innerType:e,typeName:Ee.ZodOptional,...Me(t)});class lo extends je{_parse(t){return this._getType(t)===fe.null?Qt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}lo.create=(e,t)=>new lo({innerType:e,typeName:Ee.ZodNullable,...Me(t)});class _l extends je{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}_l.create=(e,t)=>new _l({innerType:e,typeName:Ee.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Me(t)});class Il extends je{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return bl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new mn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new mn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Il.create=(e,t)=>new Il({innerType:e,typeName:Ee.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Me(t)});class Mp extends je{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.nan,received:r.parsedType}),Pe}return{status:"valid",value:t.data}}}Mp.create=e=>new Mp({typeName:Ee.ZodNaN,...Me(e)});class bS extends je{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ol extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Pe:i.status==="dirty"?(n.dirty(),Sa(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Pe:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Ol({in:t,out:n,typeName:Ee.ZodPipeline})}}class Ml extends je{_parse(t){const n=this._def.innerType._parse(t),r=o=>(di(o)&&(o.value=Object.freeze(o.value)),o);return bl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ml.create=(e,t)=>new Ml({innerType:e,typeName:Ee.ZodReadonly,...Me(t)}),wt.lazycreate;var Ee;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ee||(Ee={})),Zn.create,ao.create,Mp.create,fi.create,Cp.create,Ca.create,kp.create,wl.create,Sl.create,Pp.create,pi.create,Pr.create,Ap.create,Hn.create,wt.create,wt.strictCreate,Tl.create,_p.create,El.create,Qn.create,Cl.create,Op.create,mi.create,ka.create,kl.create,Pl.create,so.create,Al.create,Pa.create,Jn.create,er.create,lo.create,Jn.createWithPreprocess,Ol.create;const Wz=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},qz=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const a=t[o+1];e[i]=isNaN(Number(a))?{}:[]}e=e[i]}}},xS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),an=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):xS(t),o=structuredClone(e);return qz(o,r,n),o},Uz=(e,t)=>e.localeCompare(t),gi={},wS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return SS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=wS(e._def.innerType);return t==="ZodArray"?n??[]:n}},SS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,wS(n)])),TS=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],i=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?n[r]=TS(i,o):n[r]=o||i)}return n},Yz={sort:Uz,allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},ES=e=>{const t=new FormData(e),n=new URLSearchParams(t);return xz.parse(n.toString(),Yz)},Ar=(e,t)=>xS(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),_r=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Dp=e=>{const t=e.dataset.target;if(!t)return _r(e);const n=document.querySelector(`[data-origin="${t}"]`);return _r(n||e)},Kz={state:{},loading:!1,useOnChange:!1},CS=e=>e.dataset.target||e.name,Gz=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=xa.LocalStorage.get(t);return Wz(n)?n:{}},clear:()=>void xa.LocalStorage.delete(t),set:n=>xa.LocalStorage.set(t,n)}},Zz=(e,t,n=Kz)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>Le.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??SS(e)??{}),l=E.useCallback(x=>{var P;const S=x.target,w=x.currentTarget;if(S.dataset.optional==="true")return;const C=CS(S),k=Dp(S)||(w?_r(w):""),I=Ar(C,e);if(S.setAttribute("data-initialized","true"),I){const L=I.safeParse(k),N=L.success?void 0:((P=L.error.issues[0])==null?void 0:P.message)??"";o($=>an($??{},C,N))}},[e]),c=E.useCallback(x=>S=>{const w=S.currentTarget,T=Object.values(i.current).reduce((k,I)=>{var _;const P=I.element,L=I.schema.safeParse(_r(P));if(P.dataset.ignore==="ignore"||L.success)return k;const N=(_=L.error.issues[0])==null?void 0:_.message;P.setAttribute("data-initialized","true");const $=P.dataset.name||P.name||"";return an(k,$,N)},{}),C=Le.empty(T)?null:T;o(C),console.error(C),x==null||x({form:w,errors:C||{}})},[]),u=(x,S=gi)=>{const w=Ar(x,e),T=C=>{var I;if(!Uu(C))return;s(P=>an(P,x,C.toISOString())),o(P=>an(P,x,void 0));const k=i.current[x].element;if(k){const P=k.getAttribute("data-origin"),L=document.querySelector(`input[data-target="${P}"]`);L&&L.setCustomValidity("")}(I=S==null?void 0:S.onChange)==null||I.call(S,C)};return{...S,loading:n.loading,name:x,id:x,onChange:T,form:t,date:Le.string(a[x])?new Date(a[x]):a[x],required:S.required??!w.isOptional(),error:Pn(r,x),ref:C=>{C!==null&&(i.current[x]={element:C,schema:w})}}},d=(x,S=gi)=>{const w=Ar(x,e);return{...S,name:x,id:x,onChange:C=>{var I;const k=C.target.value;s(P=>an(P,x,k)),(I=S==null?void 0:S.onChange)==null||I.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Pn(r,x,void 0),value:Pn(a,x,void 0)??"",required:S.required??!w.isOptional(),ref:C=>C!==null?i.current[x]={element:C,schema:w}:void 0}},p=(x,S=gi)=>{const w=Ar(x,e);return{...S,name:x,id:x,onChange:C=>{var I;const k=C.target.checked;s(P=>an(P??{},x,k)),(I=S==null?void 0:S.onChange)==null||I.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Pn(r,x,void 0),required:S.required??!w.isOptional(),ref:C=>C!==null?void(i.current[x]={element:C,schema:w}):void 0}},f=(x,S=gi)=>{const w=Ar(x,e),T=C=>{var I,P;(I=C.persist)==null||I.call(C);const k=C.target.value;(P=S==null?void 0:S.onChange)==null||P.call(S,C),s(L=>an(L,x,k))};return{...S,loading:n.loading,name:x,id:x,onChange:T,form:t,onInvalid:l,error:Pn(r,x,void 0),required:S.required??!w.isOptional(),value:Pn(a,x,void 0)||(S==null?void 0:S.value)||"",type:Le.instance(w,ao)?"number":(S==null?void 0:S.type)??"text",ref:C=>C===null?void 0:i.current[x]={element:C,schema:w}}},m=(x,S=gi)=>{const w=Ar(x,e);return{...S,name:x,id:x,onChangeOptions:C=>{s(k=>an(k,x,C))},form:t,loading:n.loading,onInvalid:l,error:Pn(r,x,void 0),required:S.required??!w.isOptional(),value:Pn(a,x,void 0)||(S==null?void 0:S.value)||[],ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:w})}},g=(x,S=gi)=>{const w=Ar(x,e),T=w._def.typeName==="ZodNumber";return{...S,name:x,id:x,onChange:k=>{var P,L;(P=k.persist)==null||P.call(k);const I=T?k.target.valueAsNumber:k.target.value;(L=S==null?void 0:S.onChange)==null||L.call(S,k),s(N=>an(N,x,I))},form:t,loading:n.loading,onInvalid:l,error:Pn(r,x,void 0),required:S.required??!w.isOptional(),type:T?"number":(S==null?void 0:S.type)??"text",value:Pn(a,x,void 0)||(S==null?void 0:S.value)||"",ref:k=>k===null?void 0:void(i.current[x]={element:k,schema:w})}};E.useEffect(()=>{const x=Object.values(i.current).map(w=>{const T=w.element.dataset.origin?document.querySelector(`[data-target="${w.element.name}"]`):w.element,C=w.schema.safeParse(_r(T)),k=N=>{var V;const $=CS(N.target);if(!$)return!1;const _=N.target,M=Dp(N.target)||(N.relatedTarget?_r(N.relatedTarget):""),D=w.schema.safeParse(M);if(_.setAttribute("value",M),D.success)return T.setCustomValidity&&T.setCustomValidity(""),o(F=>{if(Le.null(F))return null;const H=an(F,$,void 0);return Le.empty(F)||Le.nil(F)||Le.empty(H)?null:H}),!1;if(T.required){const F=((V=D.error.issues[0])==null?void 0:V.message)||"";T.setCustomValidity&&T.setCustomValidity(F),o(H=>{if(Le.null(H))return null;const O=an(H,$,F||void 0);return Le.empty(O)?null:O})}return!1},I=new AbortController,P=T.getAttribute("data-trigger")||"blur";T.addEventListener(P,k,{signal:I.signal});const L=T.dataset.shadow?!1:T.required?!C.success:!1;return{input:w,hasInitialError:L,unsubscribe:()=>I.abort()}});return x.some(w=>w.hasInitialError)&&o(w=>w===null?{}:w),()=>x.forEach(w=>w.unsubscribe())});const h=x=>S=>{var L;S.preventDefault();const w=S.currentTarget;let T=ES(w);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(w.elements)).forEach(N=>{if(N.tagName==="SELECT"){const $=N;T=an(T,$.name,$.value)}if(N.tagName==="INPUT"){const $=N,_=Dp($)||($?_r($):"");T=an(T,$.dataset.target||$.name,_)}});const k=TS(T,a),I=e.safeParse(k),P=()=>{var N;oS(w),(N=n.interceptor)==null||N.clear()};if(I.success){const N=JSON.stringify(I.data);return w.setAttribute("data-json",N),(L=n.interceptor)==null||L.clear(),x==null?void 0:x(S,{form:w,event:S,reset:P,setErrors:o,errors:[],success:!0,data:I.data,json:I.data})}return console.group("useForm error"),console.info(I),console.info(I.error.issues),console.error(I.error),console.groupEnd(),w.reportValidity(),x==null?void 0:x(S,{form:w,json:T,event:S,reset:P,setErrors:o,data:T,success:!1,errors:I.error.issues.map(N=>({message:N.message,path:N.path.map($=>String($))}))})},v=x=>ud(a,x)||"",b=x=>({...x,id:t,name:t});return E.useEffect(()=>{var x;n.interceptor&&((x=n.interceptor)==null||x.set(a))},[a]),{get:v,input:g,state:a,errors:r,select:d,checkbox:p,onSubmit:h,setState:s,textarea:f,onInvalid:c,controller:b,datepicker:u,name:t,multiselect:m,disabled:r!==null}},Xz=e=>e?JSON.parse(e.getAttribute("data-json")):{},Qz=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},kS={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},PS={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},AS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},Jz={name:"dark",zIndex:AS,rounded:kS,spacing:PS,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",muted:"hsla(210, 10%, 40%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},eB={rounded:kS,spacing:PS,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},zIndex:AS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 45%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 95%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 20%, 97%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},tB=Jz,nB=eB,rB=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...bs,...e.tweaks},parser:e.parser||gs.hsla,map:{...ys,...e.map}}),[e]);return y.jsx(Fo.Provider,{value:t,children:e.children})},oB=()=>{const e=E.useContext(Fo);return e?e.parser:gs.hsla};ee.Alert=W_,ee.Autocomplete=PV,ee.Button=Da,ee.Calendar=Ib,ee.Card=hd,ee.Checkbox=Hf,ee.ColType=ui,ee.Collapse=_y,ee.CommandPalette=FF,ee.ComponentsProvider=rB,ee.Context=Fo,ee.DatePicker=_V,ee.Dict=xn,ee.Dropdown=ei,ee.Empty=Ob,ee.Expand=LF,ee.FileUpload=U$,ee.Form=Y$,ee.Input=ya,ee.InputFeedback=Zw,ee.InputField=va,ee.Menu=jF,ee.MenuItem=$F,ee.Modal=ff,ee.MultiSelect=ej,ee.Notifications=mN,ee.Polymorph=ln,ee.Progress=gN,ee.Radiobox=tj,ee.RenderOnView=cE,ee.Select=io,ee.Slider=rj,ee.Stats=vN,ee.Switch=oj,ee.Tab=wN,ee.Table=mz,ee.Tabs=bN,ee.Tag=Na,ee.TaskList=ij,ee.Textarea=aj,ee.Timeline=SN,ee.TimelineItem=Ps,ee.Toolbar=zF,ee.Tooltip=hf,ee.TransferList=cj,ee.createColumns=Nj,ee.createCssProperties=IM,ee.createDesignTokens=yb,ee.createFormStorage=Gz,ee.createOptionCols=fp,ee.createStyles=PM,ee.createTheme=_M,ee.createTokenStyles=OM,ee.css=Ae,ee.defaultDarkTheme=tB,ee.defaultLightTheme=nB,ee.defaultTranslations=ys,ee.defaultTweaks=bs,ee.dispatchInput=nm,ee.formReset=oS,ee.formToJson=ES,ee.getCoords=iE,ee.getJsonForm=Xz,ee.getModalScrollerRef=jj,ee.getRemainingSize=wi,ee.getSchemaShape=Ar,ee.hasVerticalScroll=rm,ee.initializeInputDataset=xi,ee.isMobile=Eb,ee.isReactComponent=oE,ee.isReactFC=Oc,ee.isSsr=cr,ee.mergeRefs=qn,ee.negate=MM,ee.noop=fd,ee.parsers=gs,ee.path=ud,ee.reduceTokens=lr,ee.safeRegex=dd,ee.splitInto=Tb,ee.useColorParser=oB,ee.useForm=Zz,ee.useLocale=cd,ee.useNotification=pN,ee.usePrevious=Qz,ee.useReactive=A0,ee.useStableRef=nr,ee.useSwipe=xb,ee.useTablePreferences=Vj,ee.useTranslations=Ct,ee.uuid=Lo,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
247
247
  //# sourceMappingURL=index.umd.js.map