@tempots/beatui 0.82.0 → 0.83.0

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 (551) hide show
  1. package/dist/_commonjsHelpers-DKOUU3wS.cjs +1 -0
  2. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  3. package/dist/ar-CBrjAlIY.cjs +1 -0
  4. package/dist/ar-DjMvIww5.js +175 -0
  5. package/dist/{ar-NCCPhOpI.js → ar-DwDxAANU.js} +16 -1
  6. package/dist/ar-kZBzg02I.cjs +1 -0
  7. package/dist/auth/index.cjs.js +1 -1
  8. package/dist/auth/index.es.js +64 -1351
  9. package/dist/auth-divider-C3_CgC0l.js +1375 -0
  10. package/dist/auth-divider-C4WTL71M.cjs +1 -0
  11. package/dist/beatui.css +11183 -5596
  12. package/dist/beatui.tailwind.css +11210 -5623
  13. package/dist/better-auth/index.cjs.js +1 -0
  14. package/dist/better-auth/index.es.js +741 -0
  15. package/dist/{colors-B2yrgHSW.cjs → colors-BI0YhONJ.cjs} +1 -1
  16. package/dist/{colors-DPo9GEJR.js → colors-BmLYKmoH.js} +38 -30
  17. package/dist/de-B03SM9eF.cjs +1 -0
  18. package/dist/{de-BVK2MkCk.js → de-CSGSC0xX.js} +18 -3
  19. package/dist/de-CrBw41po.cjs +1 -0
  20. package/dist/{de-f2xcEb34.js → de-wChFYqM4.js} +79 -5
  21. package/dist/deep-merge-CmQoIYPC.js +1689 -0
  22. package/dist/deep-merge-UghuPcyW.cjs +1 -0
  23. package/dist/duration-input-BJzKgI15.cjs +1 -0
  24. package/dist/{duration-input-B3vnnwBZ.js → duration-input-DaB6s0rL.js} +24 -23
  25. package/dist/editor-toolbar-group-BslfdazC.js +32 -0
  26. package/dist/editor-toolbar-group-_V1rDM-1.cjs +1 -0
  27. package/dist/{es-BxBeTRCv.cjs → es-BRa0hV-7.cjs} +1 -1
  28. package/dist/es-Ca5xT3NE.cjs +1 -0
  29. package/dist/es-CmPF3IGl.js +175 -0
  30. package/dist/{es-BQS8PL9j.js → es-dR46FTMF.js} +16 -1
  31. package/dist/{fa-DxPseW3g.cjs → fa-BxCSKn9j.cjs} +1 -1
  32. package/dist/fa-D696e75R.js +175 -0
  33. package/dist/fa-DhZJYuC6.cjs +1 -0
  34. package/dist/{fa-T-tkJSJr.js → fa-FsHBFjdY.js} +16 -1
  35. package/dist/fr-1nSKSIlw.cjs +1 -0
  36. package/dist/{fr-yOW_68YY.js → fr-B0jeX1Hx.js} +83 -9
  37. package/dist/{fr-CSRRhyCG.js → fr-Di6BT9_V.js} +18 -3
  38. package/dist/fr-Dq6RAY9s.cjs +1 -0
  39. package/dist/he-BBX1h9uD.cjs +1 -0
  40. package/dist/{he-Bxdc4M08.js → he-CXujw1Lw.js} +16 -1
  41. package/dist/he-DhcurPt5.cjs +1 -0
  42. package/dist/he-SgAsIYJA.js +175 -0
  43. package/dist/{hi-CJeFvTBe.js → hi-Bvh4d9bO.js} +16 -1
  44. package/dist/hi-Cd0YQZTU.cjs +1 -0
  45. package/dist/hi-CxsIxbfM.cjs +1 -0
  46. package/dist/hi-s9oiIihq.js +175 -0
  47. package/dist/{hls.light.min-Bhrf47iR.cjs → hls.light.min-C6xKDzRR.cjs} +1 -1
  48. package/dist/{hls.light.min-C6VwviEa.js → hls.light.min-hEMf_E8u.js} +1 -1
  49. package/dist/{index-ChsRjiIp.cjs → index-Bm43lZqE.cjs} +19 -19
  50. package/dist/{index-C5YCCgnn.cjs → index-C2_iX1um.cjs} +1 -1
  51. package/dist/{index-DT6-HMMz.js → index-C32iUFIr.js} +1432 -1462
  52. package/dist/{index-CiAVfKIZ.js → index-CEqc0H3v.js} +1 -1
  53. package/dist/index-DH37GTQj.cjs +1 -0
  54. package/dist/{index-DklKfzD4.js → index-Di1_W_7Q.js} +351 -361
  55. package/dist/index.cjs.js +4 -4
  56. package/dist/index.es.js +6310 -3528
  57. package/dist/input-container-CSi72GI1.cjs +1 -0
  58. package/dist/input-container-Nx0gMAzS.js +258 -0
  59. package/dist/it-ByIEk5Cq.cjs +1 -0
  60. package/dist/it-D_IcaYxp.cjs +1 -0
  61. package/dist/{it-6e6X-4BB.js → it-Dc4IMciD.js} +80 -6
  62. package/dist/{it-Zmp0BhIj.js → it-EWhykhHv.js} +18 -3
  63. package/dist/ja-CMGqpPo7.cjs +1 -0
  64. package/dist/{ja-BxNuNo2H.js → ja-D2t2g5xj.js} +85 -11
  65. package/dist/ja-DV6Fpp18.cjs +1 -0
  66. package/dist/{ja-DWjoA-hQ.js → ja-YZ0P5woj.js} +16 -1
  67. package/dist/json-schema/index.cjs.js +1 -1
  68. package/dist/json-schema/index.es.js +212 -205
  69. package/dist/json-schema-display/index.cjs.js +1 -1
  70. package/dist/json-schema-display/index.es.js +1 -1
  71. package/dist/json-structure/index.cjs.js +1 -1
  72. package/dist/json-structure/index.es.js +623 -762
  73. package/dist/ko-BPl5rP97.cjs +1 -0
  74. package/dist/ko-BRylA5JZ.js +175 -0
  75. package/dist/ko-DR1f0as8.cjs +1 -0
  76. package/dist/{ko-BOlI-33h.js → ko-U7BSUAxZ.js} +16 -1
  77. package/dist/lexical/index.cjs.js +46 -0
  78. package/dist/lexical/index.es.js +21397 -0
  79. package/dist/lexical.css +1122 -0
  80. package/dist/menu-CX72LaZ3.cjs +1 -0
  81. package/dist/menu-D_slbwl8.js +374 -0
  82. package/dist/modal-DaI1jH-X.js +488 -0
  83. package/dist/modal-kyZfvVZb.cjs +1 -0
  84. package/dist/nl-BSfaHFt0.cjs +1 -0
  85. package/dist/{nl-Dr-l6zUy.cjs → nl-CQF0N7Mc.cjs} +1 -1
  86. package/dist/{nl-kQNcAdY1.js → nl-CqAxoB4J.js} +18 -3
  87. package/dist/nl-Dh7LUWAn.js +176 -0
  88. package/dist/notice-Bc1L4Zpr.cjs +1 -0
  89. package/dist/{notice-CZHWWwOQ.js → notice-Dz4nX57_.js} +49 -48
  90. package/dist/{oneof-branch-detection-BVNoKU9d.js → oneof-branch-detection-BED_n2MT.js} +523 -520
  91. package/dist/{oneof-branch-detection-C8g3eWnx.cjs → oneof-branch-detection-Vov_e3kI.cjs} +4 -4
  92. package/dist/{pl-CKyPFvss.js → pl-C-weXGCB.js} +16 -1
  93. package/dist/pl-D-O4sCnr.cjs +1 -0
  94. package/dist/{pl-Bs4nLJ__.js → pl-XEG-p1Q9.js} +77 -3
  95. package/dist/{pl-BK0i_yvq.cjs → pl-y_w3DWF3.cjs} +1 -1
  96. package/dist/prosemirror/index.cjs.js +1 -1
  97. package/dist/prosemirror/index.es.js +1 -1
  98. package/dist/{pt-DBmUhaNI.js → pt-BjNGOoZH.js} +18 -3
  99. package/dist/pt-DYsDA2sZ.js +175 -0
  100. package/dist/pt-DqaZWmbG.cjs +1 -0
  101. package/dist/pt-chEEYLlt.cjs +1 -0
  102. package/dist/ru-B46hVpFF.cjs +1 -0
  103. package/dist/{ru-Bi1_DEKM.js → ru-BTKBykp-.js} +86 -12
  104. package/dist/{ru-CsJ_yT-7.js → ru-CFmeZBXK.js} +16 -1
  105. package/dist/ru-CISMzCHR.cjs +1 -0
  106. package/dist/session-id-3KiilioY.js +8 -0
  107. package/dist/session-id-B5lJMzbB.cjs +1 -0
  108. package/dist/styles-url-CVCcF0ra.cjs +1 -0
  109. package/dist/styles-url-DUdp56Ts.js +4 -0
  110. package/dist/tailwind/index.cjs.js +1 -1
  111. package/dist/tailwind/index.es.js +3 -3
  112. package/dist/tailwind/preset.cjs.js +1 -1
  113. package/dist/tailwind/preset.es.js +74 -4
  114. package/dist/tailwind/vite-plugin.cjs.js +10 -10
  115. package/dist/tailwind/vite-plugin.es.js +289 -410
  116. package/dist/text-input-8v79fzEy.cjs +1 -0
  117. package/dist/text-input-CPJzUC2r.js +45 -0
  118. package/dist/{toolbar-DR2Zd4Oo.js → toolbar-CjQG7l7X.js} +4 -4
  119. package/dist/toolbar-D3ZsC0g_.cjs +1 -0
  120. package/dist/{tr-Bn5ldVJs.js → tr-C5X2gFZS.js} +17 -2
  121. package/dist/tr-CaMaflJL.cjs +1 -0
  122. package/dist/{tr-DiYB-FwX.js → tr-Cp8ZCUic.js} +77 -3
  123. package/dist/{tr-CgJ8uhZu.cjs → tr-mWu2E__o.cjs} +1 -1
  124. package/dist/{translations-Cq8bUKJP.js → translations-BGblCUBj.js} +144 -70
  125. package/dist/translations-CZ0KOii3.cjs +1 -0
  126. package/dist/translations-gVgMyNno.cjs +1 -0
  127. package/dist/translations-jUYta1_1.js +87 -0
  128. package/dist/types/auth/index.d.ts +13 -0
  129. package/dist/types/auth-i18n/default.d.ts +14 -0
  130. package/dist/types/auth-i18n/locales/ar.d.ts +14 -0
  131. package/dist/types/auth-i18n/locales/de.d.ts +14 -0
  132. package/dist/types/auth-i18n/locales/en.d.ts +14 -0
  133. package/dist/types/auth-i18n/locales/es.d.ts +14 -0
  134. package/dist/types/auth-i18n/locales/fa.d.ts +14 -0
  135. package/dist/types/auth-i18n/locales/fr.d.ts +14 -0
  136. package/dist/types/auth-i18n/locales/he.d.ts +14 -0
  137. package/dist/types/auth-i18n/locales/hi.d.ts +14 -0
  138. package/dist/types/auth-i18n/locales/it.d.ts +14 -0
  139. package/dist/types/auth-i18n/locales/ja.d.ts +14 -0
  140. package/dist/types/auth-i18n/locales/ko.d.ts +14 -0
  141. package/dist/types/auth-i18n/locales/nl.d.ts +14 -0
  142. package/dist/types/auth-i18n/locales/pl.d.ts +14 -0
  143. package/dist/types/auth-i18n/locales/pt.d.ts +14 -0
  144. package/dist/types/auth-i18n/locales/ru.d.ts +14 -0
  145. package/dist/types/auth-i18n/locales/tr.d.ts +14 -0
  146. package/dist/types/auth-i18n/locales/ur.d.ts +14 -0
  147. package/dist/types/auth-i18n/locales/vi.d.ts +14 -0
  148. package/dist/types/auth-i18n/locales/zh.d.ts +14 -0
  149. package/dist/types/auth-i18n/translations.d.ts +14 -0
  150. package/dist/types/beatui-i18n/default.d.ts +99 -0
  151. package/dist/types/beatui-i18n/index.d.ts +11 -0
  152. package/dist/types/beatui-i18n/locales/en.d.ts +63 -0
  153. package/dist/types/beatui-i18n/translations.d.ts +87 -0
  154. package/dist/types/better-auth/bridge.d.ts +2 -0
  155. package/dist/types/better-auth/callbacks.d.ts +6 -0
  156. package/dist/types/better-auth/components/authenticated.d.ts +4 -0
  157. package/dist/types/better-auth/components/better-auth-container.d.ts +4 -0
  158. package/dist/types/better-auth/components/better-auth-modal.d.ts +4 -0
  159. package/dist/types/better-auth/components/magic-link-form.d.ts +7 -0
  160. package/dist/types/better-auth/components/passkey-management.d.ts +6 -0
  161. package/dist/types/better-auth/components/passkey-signin.d.ts +12 -0
  162. package/dist/types/better-auth/components/two-factor-setup.d.ts +8 -0
  163. package/dist/types/better-auth/components/two-factor-verify.d.ts +10 -0
  164. package/dist/types/better-auth/i18n/default.d.ts +29 -0
  165. package/dist/types/better-auth/i18n/locales/en.d.ts +28 -0
  166. package/dist/types/better-auth/i18n/translations.d.ts +27 -0
  167. package/dist/types/better-auth/index.d.ts +35 -0
  168. package/dist/types/better-auth/provider.d.ts +39 -0
  169. package/dist/types/better-auth/session.d.ts +14 -0
  170. package/dist/types/better-auth/social-mapping.d.ts +2 -0
  171. package/dist/types/better-auth/types.d.ts +276 -0
  172. package/dist/types/components/auth/auth-container.d.ts +63 -2
  173. package/dist/types/components/auth/auth-divider.d.ts +30 -0
  174. package/dist/types/components/auth/auth-email-prop.d.ts +25 -0
  175. package/dist/types/components/auth/index.d.ts +9 -0
  176. package/dist/types/components/auth/password-strength-indicator.d.ts +58 -0
  177. package/dist/types/components/auth/reset-password-form.d.ts +33 -0
  178. package/dist/types/components/auth/schemas.d.ts +183 -5
  179. package/dist/types/components/auth/signin-form.d.ts +33 -0
  180. package/dist/types/components/auth/signup-form.d.ts +36 -0
  181. package/dist/types/components/auth/social-login-button.d.ts +213 -0
  182. package/dist/types/components/auth/social-providers.d.ts +27 -1
  183. package/dist/types/components/auth/types.d.ts +301 -0
  184. package/dist/types/components/auth/utils.d.ts +198 -0
  185. package/dist/types/components/beatui.d.ts +35 -0
  186. package/dist/types/components/button/button.d.ts +61 -0
  187. package/dist/types/components/button/close-button.d.ts +32 -1
  188. package/dist/types/components/button/index.d.ts +2 -0
  189. package/dist/types/components/button/toggle-button-group.d.ts +95 -0
  190. package/dist/types/components/button/toggle-button.d.ts +60 -0
  191. package/dist/types/components/data/avatar-group.d.ts +74 -0
  192. package/dist/types/components/data/avatar.d.ts +62 -0
  193. package/dist/types/components/data/badge.d.ts +49 -2
  194. package/dist/types/components/data/calendar-shared.d.ts +59 -0
  195. package/dist/types/components/data/calendar.d.ts +107 -0
  196. package/dist/types/components/data/history-timeline.d.ts +35 -0
  197. package/dist/types/components/data/icon-badge.d.ts +14 -0
  198. package/dist/types/components/data/icon.d.ts +55 -4
  199. package/dist/types/components/data/index.d.ts +9 -0
  200. package/dist/types/components/data/page-drop-zone.d.ts +61 -8
  201. package/dist/types/components/data/presence-overlay.d.ts +26 -0
  202. package/dist/types/components/data/progress-bar.d.ts +81 -0
  203. package/dist/types/components/data/range-calendar.d.ts +104 -0
  204. package/dist/types/components/data/skeleton.d.ts +70 -0
  205. package/dist/types/components/data/table.d.ts +38 -11
  206. package/dist/types/components/data/tag.d.ts +40 -0
  207. package/dist/types/components/data/unstyled-drop-zone.d.ts +73 -0
  208. package/dist/types/components/editor-toolbar/editor-toolbar-button.d.ts +16 -0
  209. package/dist/types/components/editor-toolbar/editor-toolbar-group.d.ts +9 -0
  210. package/dist/types/components/editor-toolbar/index.d.ts +2 -0
  211. package/dist/types/components/form/control/control.d.ts +155 -0
  212. package/dist/types/components/form/control/date-utils.d.ts +81 -0
  213. package/dist/types/components/form/control/ensure-control.d.ts +28 -0
  214. package/dist/types/components/form/control/form-status.d.ts +63 -0
  215. package/dist/types/components/form/control/index.d.ts +10 -0
  216. package/dist/types/components/form/control/list-control.d.ts +100 -1
  217. package/dist/types/components/form/control/list-item-controls.d.ts +65 -0
  218. package/dist/types/components/form/controller/color-controller.d.ts +29 -1
  219. package/dist/types/components/form/controller/controller-validation.d.ts +31 -0
  220. package/dist/types/components/form/controller/controller.d.ts +286 -0
  221. package/dist/types/components/form/controller/index.d.ts +12 -0
  222. package/dist/types/components/form/controller/path.d.ts +69 -0
  223. package/dist/types/components/form/controller/union-controller.d.ts +106 -11
  224. package/dist/types/components/form/controller/utils.d.ts +67 -0
  225. package/dist/types/components/form/input/advanced-slider.d.ts +143 -0
  226. package/dist/types/components/form/input/appearance-selector.d.ts +39 -0
  227. package/dist/types/components/form/input/base64-input.d.ts +34 -0
  228. package/dist/types/components/form/input/base64s-input.d.ts +47 -0
  229. package/dist/types/components/form/input/bigint-input.d.ts +27 -0
  230. package/dist/types/components/form/input/checkbox-input.d.ts +46 -0
  231. package/dist/types/components/form/input/color-input.d.ts +42 -0
  232. package/dist/types/components/form/input/color-swatch-input.d.ts +53 -0
  233. package/dist/types/components/form/input/combobox-input.d.ts +73 -0
  234. package/dist/types/components/form/input/combobox-tags-input.d.ts +54 -0
  235. package/dist/types/components/form/input/date-input.d.ts +33 -0
  236. package/dist/types/components/form/input/date-time-input.d.ts +34 -0
  237. package/dist/types/components/form/input/dropdown-base.d.ts +52 -0
  238. package/dist/types/components/form/input/dropdown-input.d.ts +86 -0
  239. package/dist/types/components/form/input/duration-input.d.ts +18 -0
  240. package/dist/types/components/form/input/duration-mask.d.ts +24 -0
  241. package/dist/types/components/form/input/editable-text.d.ts +33 -0
  242. package/dist/types/components/form/input/email-input.d.ts +34 -0
  243. package/dist/types/components/form/input/file-input.d.ts +33 -0
  244. package/dist/types/components/form/input/files-input.d.ts +44 -0
  245. package/dist/types/components/form/input/index.d.ts +5 -0
  246. package/dist/types/components/form/input/input-adornment.d.ts +38 -0
  247. package/dist/types/components/form/input/input-container.d.ts +65 -0
  248. package/dist/types/components/form/input/input-options.d.ts +70 -0
  249. package/dist/types/components/form/input/input-wrapper.d.ts +78 -0
  250. package/dist/types/components/form/input/instant-input.d.ts +18 -0
  251. package/dist/types/components/form/input/lazy-native-select.d.ts +43 -0
  252. package/dist/types/components/form/input/list-input.d.ts +50 -0
  253. package/dist/types/components/form/input/mask-input.d.ts +158 -0
  254. package/dist/types/components/form/input/native-select.d.ts +50 -0
  255. package/dist/types/components/form/input/nullable-base64-input.d.ts +25 -0
  256. package/dist/types/components/form/input/nullable-bigint-input.d.ts +26 -0
  257. package/dist/types/components/form/input/nullable-date-input.d.ts +18 -0
  258. package/dist/types/components/form/input/nullable-date-time-input.d.ts +19 -0
  259. package/dist/types/components/form/input/nullable-duration-input.d.ts +19 -0
  260. package/dist/types/components/form/input/nullable-email-input.d.ts +18 -0
  261. package/dist/types/components/form/input/nullable-instant-input.d.ts +19 -0
  262. package/dist/types/components/form/input/nullable-mask-input.d.ts +24 -0
  263. package/dist/types/components/form/input/nullable-number-input.d.ts +29 -0
  264. package/dist/types/components/form/input/nullable-password-input.d.ts +18 -0
  265. package/dist/types/components/form/input/nullable-plain-date-input.d.ts +18 -0
  266. package/dist/types/components/form/input/nullable-plain-date-time-input.d.ts +18 -0
  267. package/dist/types/components/form/input/nullable-plain-month-day-input.d.ts +18 -0
  268. package/dist/types/components/form/input/nullable-plain-time-input.d.ts +18 -0
  269. package/dist/types/components/form/input/nullable-plain-year-month-input.d.ts +18 -0
  270. package/dist/types/components/form/input/nullable-rating-input.d.ts +33 -0
  271. package/dist/types/components/form/input/nullable-text-area.d.ts +27 -0
  272. package/dist/types/components/form/input/nullable-text-input.d.ts +18 -0
  273. package/dist/types/components/form/input/nullable-url-input.d.ts +18 -0
  274. package/dist/types/components/form/input/nullable-utils.d.ts +22 -2
  275. package/dist/types/components/form/input/nullable-uuid-input.d.ts +18 -0
  276. package/dist/types/components/form/input/nullable-zoned-date-time-input.d.ts +20 -0
  277. package/dist/types/components/form/input/number-input.d.ts +49 -0
  278. package/dist/types/components/form/input/option.d.ts +165 -0
  279. package/dist/types/components/form/input/otp-input.d.ts +77 -0
  280. package/dist/types/components/form/input/password-input.d.ts +39 -0
  281. package/dist/types/components/form/input/plain-date-input.d.ts +17 -0
  282. package/dist/types/components/form/input/plain-date-time-input.d.ts +17 -0
  283. package/dist/types/components/form/input/plain-month-day-input.d.ts +18 -0
  284. package/dist/types/components/form/input/plain-time-input.d.ts +17 -0
  285. package/dist/types/components/form/input/plain-year-month-input.d.ts +17 -0
  286. package/dist/types/components/form/input/radio-group.d.ts +108 -0
  287. package/dist/types/components/form/input/rating-input.d.ts +57 -0
  288. package/dist/types/components/form/input/segmented-input.d.ts +70 -1
  289. package/dist/types/components/form/input/select-tags-input.d.ts +69 -0
  290. package/dist/types/components/form/input/slider-input.d.ts +82 -0
  291. package/dist/types/components/form/input/switch.d.ts +59 -1
  292. package/dist/types/components/form/input/tag-input.d.ts +19 -0
  293. package/dist/types/components/form/input/tag-utils.d.ts +111 -0
  294. package/dist/types/components/form/input/tags-input.d.ts +18 -0
  295. package/dist/types/components/form/input/text-area.d.ts +42 -0
  296. package/dist/types/components/form/input/text-input.d.ts +63 -1
  297. package/dist/types/components/form/input/url-input.d.ts +34 -0
  298. package/dist/types/components/form/input/uuid-input.d.ts +19 -0
  299. package/dist/types/components/form/input/zoned-date-time-input.d.ts +20 -0
  300. package/dist/types/components/form/schema/standard-schema-v1.d.ts +98 -23
  301. package/dist/types/components/form/use-form.d.ts +146 -2
  302. package/dist/types/components/i18n/index.d.ts +9 -0
  303. package/dist/types/components/i18n/locale-direction.d.ts +21 -1
  304. package/dist/types/components/i18n/locale-selector.d.ts +45 -0
  305. package/dist/types/components/i18n/make-i18nprovider.d.ts +42 -0
  306. package/dist/types/components/json-schema/schema-types.d.ts +133 -0
  307. package/dist/types/components/json-structure/controls/control-utils.d.ts +19 -0
  308. package/dist/types/components/json-structure/controls/deprecation-utils.d.ts +2 -3
  309. package/dist/types/components/json-structure/controls/index.d.ts +1 -0
  310. package/dist/types/components/json-structure/structure-types.d.ts +473 -19
  311. package/dist/types/components/layout/accordion.d.ts +77 -0
  312. package/dist/types/components/layout/action-card.d.ts +90 -2
  313. package/dist/types/components/layout/app-shell.d.ts +76 -0
  314. package/dist/types/components/layout/card.d.ts +27 -0
  315. package/dist/types/components/layout/center.d.ts +39 -0
  316. package/dist/types/components/layout/collapse.d.ts +28 -0
  317. package/dist/types/components/layout/divider.d.ts +84 -0
  318. package/dist/types/components/layout/group.d.ts +15 -0
  319. package/dist/types/components/layout/index.d.ts +2 -0
  320. package/dist/types/components/layout/nine-slice-scroll-view.d.ts +105 -0
  321. package/dist/types/components/layout/scrollable-panel.d.ts +54 -0
  322. package/dist/types/components/layout/sink.d.ts +46 -0
  323. package/dist/types/components/layout/stack.d.ts +16 -0
  324. package/dist/types/components/layout/with-breakpoint.d.ts +194 -0
  325. package/dist/types/components/lexical/bare-editor.d.ts +29 -0
  326. package/dist/types/components/lexical/code/index.d.ts +1 -0
  327. package/dist/types/components/lexical/code/language-selector.d.ts +13 -0
  328. package/dist/types/components/lexical/contextual-editor.d.ts +22 -0
  329. package/dist/types/components/lexical/docked-editor.d.ts +23 -0
  330. package/dist/types/components/lexical/floating/block-handle.d.ts +16 -0
  331. package/dist/types/components/lexical/floating/floating-toolbar.d.ts +12 -0
  332. package/dist/types/components/lexical/floating/index.d.ts +6 -0
  333. package/dist/types/components/lexical/floating/slash-command-palette.d.ts +20 -0
  334. package/dist/types/components/lexical/index.d.ts +8 -0
  335. package/dist/types/components/lexical/lexical-editor-input.d.ts +30 -0
  336. package/dist/types/components/lexical/table/index.d.ts +1 -0
  337. package/dist/types/components/lexical/table/table-controls.d.ts +12 -0
  338. package/dist/types/components/lexical/toolbar/index.d.ts +6 -0
  339. package/dist/types/components/lexical/toolbar/lexical-toolbar.d.ts +12 -0
  340. package/dist/types/components/lexical/toolbar/toolbar-button.d.ts +1 -0
  341. package/dist/types/components/lexical/toolbar/toolbar-group.d.ts +1 -0
  342. package/dist/types/components/lexical/toolbar/toolbar-helpers.d.ts +32 -0
  343. package/dist/types/components/misc/empty-state.d.ts +86 -0
  344. package/dist/types/components/misc/expando.d.ts +81 -0
  345. package/dist/types/components/misc/index.d.ts +2 -1
  346. package/dist/types/components/misc/link-portal.d.ts +40 -2
  347. package/dist/types/components/misc/notice.d.ts +93 -0
  348. package/dist/types/components/misc/notification-panel.d.ts +21 -0
  349. package/dist/types/components/misc/notification-provider.d.ts +141 -0
  350. package/dist/types/components/misc/notification.d.ts +93 -0
  351. package/dist/types/components/misc/style-portal.d.ts +31 -1
  352. package/dist/types/components/monaco/monaco-editor-input.d.ts +59 -2
  353. package/dist/types/components/navigation/breadcrumbs.d.ts +96 -0
  354. package/dist/types/components/navigation/flyout.d.ts +118 -16
  355. package/dist/types/components/navigation/index.d.ts +3 -0
  356. package/dist/types/components/navigation/link/link.d.ts +100 -0
  357. package/dist/types/components/navigation/menu.d.ts +155 -35
  358. package/dist/types/components/navigation/pagination.d.ts +82 -0
  359. package/dist/types/components/navigation/sidebar/sidebar-group.d.ts +42 -0
  360. package/dist/types/components/navigation/sidebar/sidebar-link.d.ts +101 -0
  361. package/dist/types/components/navigation/sidebar/sidebar-separator.d.ts +17 -0
  362. package/dist/types/components/navigation/sidebar/sidebar.d.ts +57 -0
  363. package/dist/types/components/navigation/tabs/tabs.d.ts +3 -2
  364. package/dist/types/components/navigation/toolbar/toolbar.d.ts +125 -0
  365. package/dist/types/components/navigation/tree-view.d.ts +95 -0
  366. package/dist/types/components/overlay/announcement-bar.d.ts +41 -2
  367. package/dist/types/components/overlay/block-command-palette.d.ts +25 -0
  368. package/dist/types/components/overlay/command-palette.d.ts +17 -0
  369. package/dist/types/components/overlay/dialogs.d.ts +213 -0
  370. package/dist/types/components/overlay/drawer.d.ts +76 -12
  371. package/dist/types/components/overlay/index.d.ts +4 -0
  372. package/dist/types/components/overlay/lightbox.d.ts +53 -10
  373. package/dist/types/components/overlay/modal.d.ts +113 -13
  374. package/dist/types/components/overlay/overlay.d.ts +61 -0
  375. package/dist/types/components/overlay/popover.d.ts +100 -0
  376. package/dist/types/components/overlay/ribbon.d.ts +58 -9
  377. package/dist/types/components/prosemirror/etoolbar-button.d.ts +11 -11
  378. package/dist/types/components/prosemirror/etoolbar-group.d.ts +11 -4
  379. package/dist/types/components/prosemirror/link-control.d.ts +43 -2
  380. package/dist/types/components/prosemirror/prosemirror-toolbar.d.ts +46 -6
  381. package/dist/types/components/prosemirror/utils.d.ts +113 -1
  382. package/dist/types/components/theme/style-utils.d.ts +95 -0
  383. package/dist/types/components/theme/theme.d.ts +39 -0
  384. package/dist/types/components/theme/types.d.ts +133 -1
  385. package/dist/types/components/typography/index.d.ts +1 -0
  386. package/dist/types/components/typography/kbd.d.ts +48 -0
  387. package/dist/types/components/typography/label.d.ts +45 -0
  388. package/dist/types/index.d.ts +14 -0
  389. package/dist/types/json-schema/index.d.ts +13 -0
  390. package/dist/types/json-schema-display/index.d.ts +12 -0
  391. package/dist/types/json-structure/index.d.ts +9 -4
  392. package/dist/types/lexical/commands/index.d.ts +17 -0
  393. package/dist/types/lexical/headless.d.ts +39 -0
  394. package/dist/types/lexical/horizontal-rule-node.d.ts +20 -0
  395. package/dist/types/lexical/index.d.ts +20 -0
  396. package/dist/types/lexical/lazy-loader.d.ts +35 -0
  397. package/dist/types/lexical/nodes.d.ts +29 -0
  398. package/dist/types/lexical/plugins/auto-link.d.ts +7 -0
  399. package/dist/types/lexical/plugins/clipboard.d.ts +11 -0
  400. package/dist/types/lexical/plugins/code-shiki.d.ts +11 -0
  401. package/dist/types/lexical/plugins/code.d.ts +7 -0
  402. package/dist/types/lexical/plugins/dragon.d.ts +6 -0
  403. package/dist/types/lexical/plugins/file-io.d.ts +10 -0
  404. package/dist/types/lexical/plugins/hashtag.d.ts +7 -0
  405. package/dist/types/lexical/plugins/history.d.ts +7 -0
  406. package/dist/types/lexical/plugins/horizontal-rule.d.ts +12 -0
  407. package/dist/types/lexical/plugins/html-io.d.ts +9 -0
  408. package/dist/types/lexical/plugins/index.d.ts +24 -0
  409. package/dist/types/lexical/plugins/link.d.ts +6 -0
  410. package/dist/types/lexical/plugins/list.d.ts +6 -0
  411. package/dist/types/lexical/plugins/mark.d.ts +15 -0
  412. package/dist/types/lexical/plugins/markdown-io.d.ts +13 -0
  413. package/dist/types/lexical/plugins/offset.d.ts +6 -0
  414. package/dist/types/lexical/plugins/overflow.d.ts +7 -0
  415. package/dist/types/lexical/plugins/plain-text.d.ts +6 -0
  416. package/dist/types/lexical/plugins/rich-text.d.ts +6 -0
  417. package/dist/types/lexical/plugins/selection.d.ts +6 -0
  418. package/dist/types/lexical/plugins/slash-commands.d.ts +26 -0
  419. package/dist/types/lexical/plugins/table.d.ts +11 -0
  420. package/dist/types/lexical/plugins/text.d.ts +13 -0
  421. package/dist/types/lexical/plugins/yjs.d.ts +9 -0
  422. package/dist/types/lexical/styles-url.d.ts +2 -0
  423. package/dist/types/lexical/styles.d.ts +2 -0
  424. package/dist/types/lexical/types.d.ts +634 -0
  425. package/dist/types/lexical-i18n/default.d.ts +92 -0
  426. package/dist/types/lexical-i18n/index.d.ts +21 -0
  427. package/dist/types/lexical-i18n/locales/ar.d.ts +91 -0
  428. package/dist/types/lexical-i18n/locales/de.d.ts +91 -0
  429. package/dist/types/lexical-i18n/locales/en.d.ts +91 -0
  430. package/dist/types/lexical-i18n/locales/es.d.ts +91 -0
  431. package/dist/types/lexical-i18n/locales/fa.d.ts +91 -0
  432. package/dist/types/lexical-i18n/locales/fr.d.ts +91 -0
  433. package/dist/types/lexical-i18n/locales/he.d.ts +91 -0
  434. package/dist/types/lexical-i18n/locales/hi.d.ts +91 -0
  435. package/dist/types/lexical-i18n/locales/it.d.ts +91 -0
  436. package/dist/types/lexical-i18n/locales/ja.d.ts +91 -0
  437. package/dist/types/lexical-i18n/locales/ko.d.ts +91 -0
  438. package/dist/types/lexical-i18n/locales/nl.d.ts +91 -0
  439. package/dist/types/lexical-i18n/locales/pl.d.ts +91 -0
  440. package/dist/types/lexical-i18n/locales/pt.d.ts +91 -0
  441. package/dist/types/lexical-i18n/locales/ru.d.ts +91 -0
  442. package/dist/types/lexical-i18n/locales/tr.d.ts +91 -0
  443. package/dist/types/lexical-i18n/locales/ur.d.ts +91 -0
  444. package/dist/types/lexical-i18n/locales/vi.d.ts +91 -0
  445. package/dist/types/lexical-i18n/locales/zh.d.ts +91 -0
  446. package/dist/types/lexical-i18n/translations.d.ts +21 -0
  447. package/dist/types/markdown/index.d.ts +13 -0
  448. package/dist/types/monaco/index.d.ts +17 -0
  449. package/dist/types/monaco/lazy-loader.d.ts +79 -0
  450. package/dist/types/monaco/styles-url.d.ts +11 -0
  451. package/dist/types/monaco/styles.d.ts +11 -0
  452. package/dist/types/monaco/types.d.ts +47 -0
  453. package/dist/types/prosemirror/index.d.ts +12 -0
  454. package/dist/types/prosemirror/styles-url.d.ts +11 -0
  455. package/dist/types/prosemirror/styles.d.ts +10 -0
  456. package/dist/types/tailwind/google-fonts.d.ts +15 -0
  457. package/dist/types/tailwind/index.d.ts +13 -0
  458. package/dist/types/tailwind/preset.d.ts +111 -0
  459. package/dist/types/tailwind/vite-plugin.d.ts +39 -4
  460. package/dist/types/tokens/base-colors.d.ts +21 -0
  461. package/dist/types/tokens/breakpoints.d.ts +67 -0
  462. package/dist/types/tokens/colors.d.ts +213 -4
  463. package/dist/types/tokens/motion.d.ts +142 -3
  464. package/dist/types/tokens/radius.d.ts +99 -0
  465. package/dist/types/tokens/shadows.d.ts +85 -0
  466. package/dist/types/tokens/spacing.d.ts +111 -0
  467. package/dist/types/tokens/text-shadows.d.ts +82 -0
  468. package/dist/types/tokens/typography.d.ts +313 -25
  469. package/dist/types/tokens/z-index.d.ts +62 -0
  470. package/dist/types/utils/color.d.ts +297 -28
  471. package/dist/types/utils/download.d.ts +92 -0
  472. package/dist/types/utils/focus-trap.d.ts +67 -11
  473. package/dist/types/utils/format-file-size.d.ts +44 -0
  474. package/dist/ur-B6yB2JQ7.cjs +1 -0
  475. package/dist/ur-CvGP14xo.cjs +1 -0
  476. package/dist/{ur-Bg9eX81v.js → ur-Deo004ME.js} +16 -1
  477. package/dist/{ur-B69X-xNs.js → ur-DkIYJxsF.js} +82 -8
  478. package/dist/use-animated-toggle-89fKlXxy.js +195 -0
  479. package/dist/use-animated-toggle-DrqK7nUS.cjs +1 -0
  480. package/dist/{use-form-CgZyrACX.js → use-form-BurzbPVV.js} +271 -88
  481. package/dist/use-form-Uree6QFy.cjs +2 -0
  482. package/dist/vi-BYk1rJDv.js +53 -0
  483. package/dist/vi-DKw6PBja.js +175 -0
  484. package/dist/vi-Df4WZe9y.cjs +1 -0
  485. package/dist/vi-DneuUbkq.cjs +1 -0
  486. package/dist/{widget-customization-DRA7E9Zf.js → widget-customization-0is7oTeP.js} +233 -231
  487. package/dist/widget-customization-B-LmxkPE.cjs +1 -0
  488. package/dist/zh-C5a9NGFW.cjs +1 -0
  489. package/dist/zh-CaKHseXJ.js +175 -0
  490. package/dist/zh-DFHuW_5g.cjs +1 -0
  491. package/dist/{zh-BIykcEu9.js → zh-DR7QaM65.js} +16 -1
  492. package/package.json +48 -3
  493. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  494. package/dist/_commonjsHelpers-DwGv2jUC.cjs +0 -1
  495. package/dist/ar-BsUm-TCn.cjs +0 -1
  496. package/dist/ar-D7CXDmVZ.cjs +0 -1
  497. package/dist/ar-nOSKXpIW.js +0 -101
  498. package/dist/de-BUFLEyKr.cjs +0 -1
  499. package/dist/de-WzsOu9Gn.cjs +0 -1
  500. package/dist/deep-merge-CiOwVWn8.js +0 -1619
  501. package/dist/deep-merge-DxZqCkE5.cjs +0 -1
  502. package/dist/duration-input-Dg5SX3lM.cjs +0 -1
  503. package/dist/es-CDqqzpCw.js +0 -101
  504. package/dist/es-Ds2Xf3wV.cjs +0 -1
  505. package/dist/fa-C7tE_hR3.js +0 -101
  506. package/dist/fa-Ct1UtDB7.cjs +0 -1
  507. package/dist/fr-Cdyopuz3.cjs +0 -1
  508. package/dist/fr-CzAkRFed.cjs +0 -1
  509. package/dist/he-D2oUloCJ.js +0 -101
  510. package/dist/he-DarDNPn0.cjs +0 -1
  511. package/dist/he-DlXALrK7.cjs +0 -1
  512. package/dist/hi-3dBhLwDs.cjs +0 -1
  513. package/dist/hi-D5ZlZoQq.js +0 -101
  514. package/dist/hi-tATwsXJ6.cjs +0 -1
  515. package/dist/index-DE2tjivA.cjs +0 -1
  516. package/dist/it-BmFag7j0.cjs +0 -1
  517. package/dist/it-DohtcWi9.cjs +0 -1
  518. package/dist/ja-Dj-bAKLf.cjs +0 -1
  519. package/dist/ja-eyTArrgS.cjs +0 -1
  520. package/dist/ko-BFLCDMMs.cjs +0 -1
  521. package/dist/ko-BomUE-yQ.cjs +0 -1
  522. package/dist/ko-Ch0jFsBV.js +0 -101
  523. package/dist/modal-D2xE47kr.cjs +0 -1
  524. package/dist/modal-hkQD1bqZ.js +0 -655
  525. package/dist/nl-Bx2ACvr4.cjs +0 -1
  526. package/dist/nl-NuTdZO1s.js +0 -102
  527. package/dist/notice-C0SmlheE.cjs +0 -1
  528. package/dist/pl-QHl6sl8f.cjs +0 -1
  529. package/dist/pt-BETjHZrL.js +0 -101
  530. package/dist/pt-DZGw2Z-1.cjs +0 -1
  531. package/dist/pt-oBMmVYcu.cjs +0 -1
  532. package/dist/ru-CtxMmoa6.cjs +0 -1
  533. package/dist/ru-D03IuLqh.cjs +0 -1
  534. package/dist/text-input-CByq5OIo.cjs +0 -1
  535. package/dist/text-input-CFJntP7G.js +0 -287
  536. package/dist/toolbar-TPWYzoiF.cjs +0 -1
  537. package/dist/tr-B_-_1wua.cjs +0 -1
  538. package/dist/translations-B4-Zd2LM.cjs +0 -1
  539. package/dist/translations-D62qqNV9.cjs +0 -1
  540. package/dist/translations-DPr6c05Z.js +0 -67
  541. package/dist/ur-DvqAg9gW.cjs +0 -1
  542. package/dist/ur-DyUSmIbo.cjs +0 -1
  543. package/dist/use-form-JjeKCINk.cjs +0 -2
  544. package/dist/vi-BdzxA60L.js +0 -101
  545. package/dist/vi-CBmPaHxg.cjs +0 -1
  546. package/dist/vi-D5R3YcU0.cjs +0 -1
  547. package/dist/vi-DhdsHHf_.js +0 -38
  548. package/dist/widget-customization-G-QLB1rw.cjs +0 -1
  549. package/dist/zh-CCGXcj5r.cjs +0 -1
  550. package/dist/zh-Cb1b8uik.cjs +0 -1
  551. package/dist/zh-Dn1UJiZa.js +0 -101
@@ -0,0 +1,1689 @@
1
+ import { Task as xe, Use as F, Value as f, prop as ce, html as h, attr as l, on as C, WithElement as ee, Empty as T, aria as G, bind as re, computedOf as V, style as ye, OnDispose as te, When as U, NotEmpty as Fe, Fragment as E, ForEach as K, coalesce as Re, Ensure as Ne, OneOfType as Pe, Repeat as je, signal as we, input as ne, emitValue as P, emitValueAsNumber as _e } from "@tempots/dom";
2
+ import { B as R, b as ke, f as Ce, I as O, d as oe } from "./translations-BGblCUBj.js";
3
+ import { l as We } from "./colors-BmLYKmoH.js";
4
+ import { g as Ze } from "./timer-Rd2sKnvH.js";
5
+ import { ElementRect as He } from "@tempots/ui";
6
+ import { I as W, a as qe, g as Ye, B as me } from "./input-container-Nx0gMAzS.js";
7
+ import { C as ie, m as Ge, c as Je, I as Be, d as ue, O as Q, e as De } from "./use-form-BurzbPVV.js";
8
+ import { C as q } from "./text-input-CPJzUC2r.js";
9
+ import { S as Ve } from "./stack-BJgsPJ9A.js";
10
+ let fe = null;
11
+ async function be() {
12
+ const t = globalThis;
13
+ return t.Temporal ? t.Temporal : (fe || (fe = import("./index.esm-ChUrm4xR.js").then((e) => {
14
+ const n = e.Temporal;
15
+ return t.Temporal || (t.Temporal = n), n;
16
+ })), fe);
17
+ }
18
+ const Xe = (t, e) => e ? xe(be, {
19
+ then: t,
20
+ pending: e.pending,
21
+ error: e.error
22
+ }) : xe(be, t);
23
+ function pe({
24
+ onChange: t,
25
+ value: e,
26
+ accept: n = "*/*",
27
+ enableClick: s = !0,
28
+ content: r,
29
+ disabled: b = !1,
30
+ allowMultiple: i
31
+ }) {
32
+ return F(R, (g) => {
33
+ const p = f.deriveProp(e ?? []), v = ce(!1), d = (u) => {
34
+ u.preventDefault(), u.stopPropagation(), v.value = !0;
35
+ }, m = (u) => {
36
+ u.preventDefault(), u.stopPropagation(), (!u.currentTarget || !u.currentTarget.contains(u.relatedTarget)) && (v.value = !1);
37
+ }, y = (u) => {
38
+ u.preventDefault(), u.stopPropagation(), v.value = !1;
39
+ const x = Array.from(u.dataTransfer?.files || []);
40
+ x.length > 0 && (p.value = x, t(x, "dragdrop"));
41
+ }, o = (u) => {
42
+ f.get(s) && u.currentTarget.querySelector(
43
+ 'input[type="file"]'
44
+ )?.click();
45
+ };
46
+ let a = null;
47
+ const D = () => {
48
+ if (a == null) return;
49
+ const u = Array.from(a.files ?? []);
50
+ u.length > 0 && (p.value = u, t(u, "click")), a.value = "";
51
+ }, $ = (u) => {
52
+ f.get(s) && (u.key === "Enter" || u.key === " ") && (u.preventDefault(), o(u));
53
+ };
54
+ return h.div(
55
+ l.role("button"),
56
+ l.tabindex(
57
+ f.map(s, (u) => u ? 0 : -1)
58
+ ),
59
+ l.style("position: relative;"),
60
+ C.dragover(d),
61
+ C.dragleave(m),
62
+ C.drop(y),
63
+ C.click(o),
64
+ C.keydown($),
65
+ // Hidden file input
66
+ h.input(
67
+ l.type("file"),
68
+ l.disabled(b),
69
+ l.accept(n),
70
+ l.multiple(i),
71
+ l.style(
72
+ "position: absolute; left: -9999px; opacity: 0; pointer-events: none;"
73
+ ),
74
+ C.change(D),
75
+ ee((u) => (a = u, p.on((x) => {
76
+ const M = globalThis.DataTransfer;
77
+ if (M != null) {
78
+ const I = new M();
79
+ x.forEach((A) => I.items.add(A)), u.files = I.files;
80
+ }
81
+ }), T))
82
+ ),
83
+ // Screen reader instructions
84
+ G.label(re(g.$.dropZoneInstructions)(s)),
85
+ // Content
86
+ r({ files: p, clear: () => p.value = [], change: p.set })
87
+ );
88
+ });
89
+ }
90
+ function Qe(t, e) {
91
+ return t.length === e.length && t.every((n, s) => n === e[s]);
92
+ }
93
+ function Ke(t, e, n) {
94
+ const s = ["bc-segmented-input", `bc-segmented-input--size-${t}`];
95
+ return n === "squared" && s.push("bc-segmented-input--squared"), e && s.push("bc-segmented-input--disabled"), s.join(" ");
96
+ }
97
+ function et(t) {
98
+ if (t == null) return "";
99
+ const e = /* @__PURE__ */ new Map(), n = ke(t, "solid", "light"), s = ke(t, "solid", "dark");
100
+ return e.set("--si-indicator-bg", n.backgroundColor), e.set("--si-active-text", n.textColor), e.set("--si-indicator-bg-dark", s.backgroundColor), e.set("--si-active-text-dark", s.textColor), Array.from(e.entries()).map(([r, b]) => `${r}: ${b}`).join("; ");
101
+ }
102
+ function It({
103
+ options: t,
104
+ value: e,
105
+ onChange: n,
106
+ size: s = "md",
107
+ disabled: r = !1,
108
+ variant: b = "pill",
109
+ color: i
110
+ }, ...g) {
111
+ const p = We(t).map(([v, d]) => ({
112
+ key: v,
113
+ label: d
114
+ }));
115
+ return ee(() => {
116
+ const v = Object.fromEntries(
117
+ p.map((m, y) => [m.key, y])
118
+ ), d = ce(
119
+ p.map(() => ({ left: 0, width: 0 })),
120
+ Qe
121
+ );
122
+ return h.div(
123
+ l.class(
124
+ V(
125
+ s,
126
+ r,
127
+ b
128
+ )(
129
+ (m, y, o) => Ke(
130
+ m ?? "md",
131
+ y ?? !1,
132
+ o ?? "pill"
133
+ )
134
+ )
135
+ ),
136
+ l.style(
137
+ i != null ? f.map(i, (m) => et(m)) : ""
138
+ ),
139
+ h.div(
140
+ l.class("bc-segmented-input__container"),
141
+ h.div(
142
+ l.class("bc-segmented-input__indicator"),
143
+ ye.width(
144
+ V(
145
+ e,
146
+ d
147
+ )((m, y) => {
148
+ const { width: o } = y[v[m] ?? 0];
149
+ return `${o}px`;
150
+ })
151
+ ),
152
+ ye.left(
153
+ V(
154
+ e,
155
+ d
156
+ )((m, y) => {
157
+ const { left: o } = y[v[m] ?? 0];
158
+ return `${o}px`;
159
+ })
160
+ )
161
+ ),
162
+ // clickable buttons
163
+ p.map(({ label: m, key: y }, o) => h.button(
164
+ l.type("button"),
165
+ C.click((a) => {
166
+ a.preventDefault(), f.get(r) || n?.(y);
167
+ }),
168
+ l.disabled(r),
169
+ l.class("bc-segmented-input__segment"),
170
+ l.class(
171
+ f.map(e, (a) => a === y ? "bc-segmented-input__segment--active" : "bc-segmented-input__segment--inactive")
172
+ ),
173
+ He((a) => {
174
+ function D() {
175
+ d.update((u) => {
176
+ const x = [...u];
177
+ return x[o] = {
178
+ width: a.value.width,
179
+ left: a.value.localLeft
180
+ }, x;
181
+ });
182
+ }
183
+ const $ = Ze(D);
184
+ return te($, a.on(D));
185
+ }),
186
+ m
187
+ ))
188
+ ),
189
+ ...g
190
+ );
191
+ });
192
+ }
193
+ function tt(t) {
194
+ const e = t.type.toLowerCase();
195
+ return e.startsWith("image/") && (e.includes("jpeg") || e.includes("jpg") || e.includes("png") || e.includes("gif") || e.includes("webp") || e.includes("svg"));
196
+ }
197
+ function nt(t) {
198
+ const e = t.type.toLowerCase();
199
+ return e.startsWith("image/") ? "vscode-icons:file-type-image" : e.startsWith("video/") ? "vscode-icons:file-type-video" : e.startsWith("audio/") ? "vscode-icons:file-type-audio" : e.includes("pdf") ? "vscode-icons:file-type-pdf2" : e.includes("word") || e.includes("document") ? "vscode-icons:file-type-word" : e.includes("excel") || e.includes("spreadsheet") ? "vscode-icons:file-type-excel" : e.includes("powerpoint") || e.includes("presentation") ? "vscode-icons:file-type-powerpoint" : e.includes("zip") || e.includes("archive") ? "vscode-icons:file-type-zip" : e.includes("text") ? "vscode-icons:file-type-text" : e.includes("json") ? "vscode-icons:file-type-json-official" : e.includes("csv") ? "vscode-icons:file-type-csv" : e.includes("xml") ? "vscode-icons:file-type-xml" : e.includes("yaml") ? "vscode-icons:file-type-yaml-official" : "vscode-icons:file-type-binary";
200
+ }
201
+ function de(t) {
202
+ return U(
203
+ t.map(tt),
204
+ () => {
205
+ const e = ce(null);
206
+ return t.on((n) => {
207
+ e.value && URL.revokeObjectURL(e.value);
208
+ const s = URL.createObjectURL(n);
209
+ e.value = s;
210
+ }), h.div(
211
+ te(() => {
212
+ e.value && URL.revokeObjectURL(e.value);
213
+ }),
214
+ l.class("bc-file-input__thumbnail-container"),
215
+ h.img(
216
+ l.src(e),
217
+ l.alt(t.map((n) => n.name)),
218
+ l.class("bc-file-input__thumbnail")
219
+ )
220
+ );
221
+ },
222
+ () => O({ icon: t.map(nt) })
223
+ );
224
+ }
225
+ const $t = (t, ...e) => {
226
+ const {
227
+ value: n = ce([]),
228
+ accept: s = "*/*",
229
+ maxFiles: r,
230
+ maxFileSize: b,
231
+ onChange: i,
232
+ onBlur: g,
233
+ disabled: p,
234
+ hasError: v,
235
+ mode: d = "default",
236
+ showFileList: m = !0,
237
+ ...y
238
+ } = t, o = n, a = f.map(d, (k) => k === "input"), D = f.map(d, (k) => k === "compact"), $ = (k) => {
239
+ let c = k;
240
+ if (r != null) {
241
+ const w = f.get(r);
242
+ c = c.slice(0, w);
243
+ }
244
+ if (b) {
245
+ const w = f.get(b);
246
+ c = c.filter((S) => S.size <= w);
247
+ }
248
+ i?.(c);
249
+ }, u = (k) => {
250
+ const w = o.value.filter((S, z) => z !== k);
251
+ i?.(w);
252
+ }, x = () => {
253
+ i?.([]);
254
+ }, M = ({
255
+ files: k,
256
+ clear: c,
257
+ change: w
258
+ }) => F(
259
+ R,
260
+ (S) => h.div(
261
+ l.class("bc-file-input__drop-zone"),
262
+ h.div(
263
+ l.class(
264
+ "bc-file-input__drop-zone-content bc-file-input__drop-zone-content--empty"
265
+ ),
266
+ O({ icon: "mdi:cloud-upload-outline", size: "xl" }),
267
+ h.div(
268
+ l.class("bc-file-input__drop-zone-text"),
269
+ re(S.$.filesInputInstructions)(
270
+ r,
271
+ b,
272
+ S.$.fileSizeUnits.value
273
+ )
274
+ )
275
+ )
276
+ )
277
+ ), I = ({
278
+ files: k
279
+ }) => F(
280
+ R,
281
+ (c) => h.div(
282
+ l.class("bc-file-input__compact-drop-zone"),
283
+ U(
284
+ k.map((w) => w.length > 0),
285
+ () => h.div(
286
+ l.class("bc-file-input__compact-file-list"),
287
+ K(k, (w, S) => {
288
+ const z = S.index;
289
+ return h.div(
290
+ l.class("bc-file-input__compact-file-item"),
291
+ h.div(
292
+ l.class("bc-file-input__compact-file-icon"),
293
+ de(w)
294
+ ),
295
+ h.div(
296
+ l.class("bc-file-input__compact-file-info"),
297
+ h.div(
298
+ l.class("bc-file-input__compact-file-name"),
299
+ l.title(w.$.name),
300
+ w.$.name
301
+ ),
302
+ h.div(
303
+ l.class("bc-file-input__compact-file-meta"),
304
+ V(
305
+ w.$.size,
306
+ c.$.fileSizeUnits
307
+ )((_, B) => Ce(_, { units: B })),
308
+ " • ",
309
+ V(
310
+ w.$.type,
311
+ c.$.unknownType
312
+ )((_, B) => _ || B)
313
+ )
314
+ ),
315
+ ie(
316
+ {
317
+ size: "sm",
318
+ label: c.$.removeFile,
319
+ disabled: p,
320
+ onClick: () => u(z)
321
+ },
322
+ l.class("bc-file-input__compact-remove-button")
323
+ )
324
+ );
325
+ })
326
+ ),
327
+ () => h.div(
328
+ l.class("bc-file-input__compact-placeholder"),
329
+ O({ icon: "mdi:cloud-upload-outline", size: "lg" }),
330
+ h.div(
331
+ l.class("bc-file-input__compact-placeholder-text"),
332
+ re(c.$.filesInputInstructions)(
333
+ r,
334
+ b,
335
+ c.$.fileSizeUnits.value
336
+ )
337
+ )
338
+ )
339
+ )
340
+ )
341
+ ), A = ({
342
+ files: k
343
+ }) => F(
344
+ R,
345
+ (c) => h.div(
346
+ l.class("bc-file-input__compact-input"),
347
+ U(
348
+ k.map((w) => w.length > 0),
349
+ () => h.span(
350
+ l.class("bc-file-input__compact-value"),
351
+ K(
352
+ k,
353
+ (w) => h.span(
354
+ l.class("bc-file-input__compact-value-item"),
355
+ de(w),
356
+ h.span(
357
+ l.class("bc-file-input__compact-value-item-name"),
358
+ w.$.name
359
+ )
360
+ )
361
+ )
362
+ ),
363
+ () => h.span(
364
+ l.class("bc-file-input__compact-placeholder"),
365
+ O({ icon: "mdi:cloud-upload-outline", size: "md" }),
366
+ " ",
367
+ re(c.$.filesInputInstructions)(
368
+ r,
369
+ b,
370
+ c.$.fileSizeUnits.value
371
+ )
372
+ )
373
+ )
374
+ )
375
+ );
376
+ return F(
377
+ R,
378
+ (k) => W(
379
+ {
380
+ baseContainer: f.map(a, (c) => !c),
381
+ disabled: p,
382
+ hasError: v,
383
+ after: U(
384
+ a,
385
+ () => U(
386
+ o.map(({ length: c }) => c > 0),
387
+ () => ie(
388
+ {
389
+ size: "sm",
390
+ label: k.$.clearAllFiles,
391
+ disabled: p,
392
+ onClick: x
393
+ },
394
+ l.class("bc-file-input__compact-clear")
395
+ )
396
+ )
397
+ ),
398
+ ...y,
399
+ input: U(
400
+ a,
401
+ () => h.div(
402
+ l.class("bc-file-input bc-file-input--input"),
403
+ pe({
404
+ value: o,
405
+ accept: s,
406
+ enableClick: !0,
407
+ allowMultiple: f.map(r ?? 1 / 0, (c) => c > 1),
408
+ disabled: p,
409
+ onChange: $,
410
+ content: A
411
+ })
412
+ ),
413
+ () => U(
414
+ D,
415
+ () => h.div(
416
+ l.class("bc-file-input bc-file-input--compact"),
417
+ pe({
418
+ value: o,
419
+ accept: s,
420
+ enableClick: !0,
421
+ allowMultiple: f.map(r ?? 1 / 0, (c) => c > 1),
422
+ disabled: p,
423
+ onChange: $,
424
+ content: I
425
+ })
426
+ ),
427
+ () => h.div(
428
+ l.class("bc-file-input"),
429
+ pe({
430
+ value: o,
431
+ accept: s,
432
+ enableClick: !0,
433
+ allowMultiple: f.map(r ?? 1 / 0, (c) => c > 1),
434
+ disabled: p,
435
+ onChange: $,
436
+ content: M
437
+ }),
438
+ U(
439
+ m,
440
+ () => Fe(
441
+ o,
442
+ () => E(
443
+ h.div(
444
+ l.class("bc-file-input__file-list"),
445
+ K(o, (c, w) => {
446
+ const S = w.index;
447
+ return h.div(
448
+ l.class("bc-file-input__file-item"),
449
+ h.div(
450
+ l.class("bc-file-input__file-icon"),
451
+ de(c)
452
+ ),
453
+ h.div(
454
+ l.class("bc-file-input__file-info"),
455
+ h.div(
456
+ l.class("bc-file-input__file-name"),
457
+ l.title(c.$.name),
458
+ c.$.name
459
+ ),
460
+ h.div(
461
+ l.class("bc-file-input__file-meta"),
462
+ V(
463
+ c.$.size,
464
+ k.$.fileSizeUnits
465
+ )(
466
+ (z, _) => Ce(z, { units: _ })
467
+ ),
468
+ " • ",
469
+ V(
470
+ c.$.type,
471
+ k.$.unknownType
472
+ )((z, _) => z || _)
473
+ )
474
+ ),
475
+ ie(
476
+ {
477
+ size: "sm",
478
+ label: k.$.removeFile,
479
+ disabled: p,
480
+ onClick: () => u(S)
481
+ },
482
+ l.class("bc-file-input__remove-button")
483
+ )
484
+ );
485
+ })
486
+ ),
487
+ U(
488
+ o.map(({ length: c }) => c > 1),
489
+ () => h.div(
490
+ l.class(
491
+ "bc-file-input__clear-all-button-container"
492
+ ),
493
+ h.button(
494
+ l.type("button"),
495
+ l.class("bc-file-input__clear-all-button"),
496
+ l.disabled(p),
497
+ k.$.clearAllFiles,
498
+ C.click((c) => {
499
+ c.preventDefault(), c.stopPropagation(), x();
500
+ })
501
+ )
502
+ )
503
+ )
504
+ )
505
+ )
506
+ )
507
+ )
508
+ )
509
+ )
510
+ },
511
+ ...e
512
+ )
513
+ );
514
+ }, he = "$$tts-exp-", st = (t, e) => ee((n) => {
515
+ const s = `${he}${t}`;
516
+ return te(f.on(e, (r) => Reflect.set(n, s, r)));
517
+ }), Mt = (t, e) => {
518
+ const n = `${he}${t}`;
519
+ return (s) => {
520
+ e(Reflect.get(s.target, n));
521
+ };
522
+ }, lt = (t, e) => {
523
+ const n = `${he}${t}`;
524
+ return (s) => {
525
+ const r = s.target, b = r.selectedIndex, i = r.options[b];
526
+ e(Reflect.get(i, n));
527
+ };
528
+ };
529
+ function Ie(...t) {
530
+ return h.div(l.class("bc-group"), ...t);
531
+ }
532
+ const Ae = (t, e, n) => Ne(
533
+ t,
534
+ (s) => Pe(s, {
535
+ value: (r) => {
536
+ const b = V(
537
+ r,
538
+ n
539
+ )((i, g) => e(i.value, g));
540
+ return h.option(
541
+ l.selected(b),
542
+ st("value", r.$.value),
543
+ r.$.label
544
+ );
545
+ },
546
+ group: (r) => h.optgroup(
547
+ l.label(r.$.group),
548
+ K(
549
+ r.$.options,
550
+ (b) => Ae(
551
+ b,
552
+ e,
553
+ n
554
+ )
555
+ )
556
+ ),
557
+ break: () => h.hr()
558
+ })
559
+ ), rt = (t) => {
560
+ const {
561
+ value: e,
562
+ onBlur: n,
563
+ onChange: s,
564
+ options: r,
565
+ unselectedLabel: b,
566
+ equality: i = (v, d) => v === d,
567
+ after: g
568
+ } = t;
569
+ let p;
570
+ return W(
571
+ {
572
+ ...t,
573
+ after: E(
574
+ qe({
575
+ icon: "ph:caret-down-bold",
576
+ color: "neutral",
577
+ size: "sm"
578
+ }),
579
+ g
580
+ ),
581
+ input: h.select(
582
+ ee((v) => {
583
+ p = v;
584
+ const d = new MutationObserver((m) => {
585
+ const { removedNodes: y } = m[0];
586
+ y.length > 0 && (p.selectedIndex = 0);
587
+ });
588
+ return d.observe(v, { childList: !0 }), te(() => d.disconnect());
589
+ }),
590
+ q(t),
591
+ l.class("bc-native-select bc-input"),
592
+ F(
593
+ R,
594
+ (v) => h.option(
595
+ l.hidden("hidden"),
596
+ Re(b, v.$.selectOne)
597
+ )
598
+ ),
599
+ K(r, (v) => Ae(v, i, e)),
600
+ n != null ? C.blur(n) : T,
601
+ s != null ? C.change(lt("value", (v) => s(v))) : T
602
+ )
603
+ },
604
+ C.click(() => {
605
+ if (p?.focus(), typeof p?.showPicker == "function")
606
+ try {
607
+ p.showPicker();
608
+ } catch {
609
+ }
610
+ })
611
+ );
612
+ };
613
+ function it(t) {
614
+ const { controller: e, onChange: n, onBlur: s, ...r } = t;
615
+ return rt({
616
+ ...r,
617
+ value: e.signal,
618
+ onChange: Je(e, n),
619
+ onBlur: Ge(e, s)
620
+ });
621
+ }
622
+ function Tt(t) {
623
+ return Be({
624
+ ...t,
625
+ content: it(t)
626
+ });
627
+ }
628
+ function ot(t, e, n) {
629
+ const s = t.length.map((r) => r);
630
+ return E(
631
+ je(
632
+ s,
633
+ (r) => {
634
+ const b = t.item(r.index), i = [];
635
+ return E(
636
+ te(() => {
637
+ i.forEach((g) => g());
638
+ }),
639
+ e({
640
+ list: t,
641
+ item: b,
642
+ position: r,
643
+ remove: () => t.removeAt(r.index),
644
+ move: (g) => {
645
+ switch (g) {
646
+ case "up":
647
+ if (r.index === 0) return;
648
+ t.move(r.index, r.index - 1);
649
+ break;
650
+ case "down":
651
+ if (r.index === t.length.value - 1) return;
652
+ t.move(r.index, r.index + 1);
653
+ break;
654
+ case "first":
655
+ t.move(r.index, 0);
656
+ break;
657
+ case "last":
658
+ t.move(r.index, t.length.value - 1);
659
+ }
660
+ },
661
+ canMove: (g) => {
662
+ const p = (() => {
663
+ switch (g) {
664
+ case "up":
665
+ return we(r.index > 0);
666
+ case "down":
667
+ return t.length.map((v) => r.index < v - 1);
668
+ }
669
+ })();
670
+ return i.push(() => p.dispose()), p;
671
+ },
672
+ cannotMove: (g) => {
673
+ const p = (() => {
674
+ switch (g) {
675
+ case "up":
676
+ return we(r.index === 0);
677
+ case "down":
678
+ return t.length.map((v) => r.index === v - 1);
679
+ }
680
+ })();
681
+ return i.push(() => p.dispose()), p;
682
+ }
683
+ })
684
+ );
685
+ },
686
+ n
687
+ )
688
+ );
689
+ }
690
+ const $e = {
691
+ 9: { pattern: /^[0-9]$/ },
692
+ A: { pattern: /^[A-Za-z]$/, transform: (t) => t.toUpperCase() },
693
+ "*": { pattern: /^.$/ }
694
+ }, ct = (t) => t instanceof RegExp;
695
+ function Le(t, e, n) {
696
+ if (t == null) return [];
697
+ const s = n ? { ...$e, ...e } : e ?? $e, r = (i, g) => {
698
+ const p = s[g];
699
+ p ? i.push({ type: "pattern", name: g, ...p }) : i.push({ type: "literal", char: g });
700
+ }, b = [];
701
+ if (typeof t == "string") {
702
+ for (const i of t) r(b, i);
703
+ return b;
704
+ }
705
+ for (const i of t)
706
+ if (typeof i == "string")
707
+ if (i.length <= 1) r(b, i);
708
+ else for (const g of i) r(b, g);
709
+ else ct(i) ? b.push({ type: "pattern", pattern: i }) : typeof i == "object" && i && b.push(i);
710
+ return b;
711
+ }
712
+ function at(t, e) {
713
+ return (n) => {
714
+ switch (t) {
715
+ case "digits":
716
+ return /[0-9]/.test(n);
717
+ case "letters":
718
+ return /[A-Za-z]/.test(n);
719
+ case "alphanumeric":
720
+ return /[A-Za-z0-9]/.test(n);
721
+ case "custom":
722
+ return e?.(n) ?? !0;
723
+ default:
724
+ return !0;
725
+ }
726
+ };
727
+ }
728
+ function Me(t, e, n, s, r, b) {
729
+ const i = {
730
+ raw: t,
731
+ previousConformed: e,
732
+ cursor: r ?? t.length,
733
+ completed: !1
734
+ }, g = s.definitions ?? {}, p = typeof n == "function" ? n(t, i) : n, v = Le(
735
+ p,
736
+ g,
737
+ s.useDefaultDefinitions ?? !0
738
+ ), d = at(s.allowMode, s.allow), m = /* @__PURE__ */ new Set();
739
+ for (const _ of v) _.type === "literal" && m.add(_.char);
740
+ if (s.prefix) for (const _ of s.prefix) m.add(_);
741
+ if (s.suffix) for (const _ of s.suffix) m.add(_);
742
+ const y = Array.from(t).filter((_) => d(_) && !m.has(_));
743
+ if (y.length === 0) return { value: "", cursor: 0, completed: !1 };
744
+ const o = [], a = [];
745
+ let D = 0, $ = 0, u = 0, x = -1;
746
+ for (const _ of v) {
747
+ if (_.type === "literal") {
748
+ o.push(_.char), a.push({ kind: "literal", filled: !0 });
749
+ continue;
750
+ }
751
+ $ += _.optional ? 0 : 1;
752
+ const B = y[D];
753
+ if (B == null)
754
+ break;
755
+ if (_.type === "any") {
756
+ u++, o.push(_.transform ? _.transform(B) : B), a.push({ kind: "slot", filled: !0 }), x = a.length - 1, D++;
757
+ continue;
758
+ }
759
+ if (_.type === "pattern")
760
+ if (_.pattern.test(B)) {
761
+ u++;
762
+ const N = _.transform ? _.transform(B) : B;
763
+ o.push(N), a.push({ kind: "slot", filled: !0 }), x = a.length - 1, D++;
764
+ } else {
765
+ D++;
766
+ continue;
767
+ }
768
+ }
769
+ const M = o.join(""), I = (s.prefix ?? "") + M + (s.suffix ?? "");
770
+ let k = (s.prefix ?? "").length;
771
+ if (x >= 0) {
772
+ let _ = x + 1;
773
+ if ((b?.policy ?? "smart") !== "sticky")
774
+ for (; _ < a.length && a[_].kind === "literal"; ) _++;
775
+ k += _;
776
+ }
777
+ const c = s.completion?.mode === "min" ? (s.completion.minChars ?? 0) <= u : s.completion?.mode === "custom" ? !!s.completion.isComplete?.(I) : $ > 0 && u >= $, w = s.pipe?.(I, { ...i, completed: c });
778
+ let S, z = k;
779
+ return w === !1 ? (S = e, z = e.length) : typeof w == "string" ? (S = w, z = w.length) : typeof w == "object" && w ? (S = w.value, z = w.cursor ?? w.value.length) : S = I, { value: S, cursor: z, completed: c };
780
+ }
781
+ function ut(t, e) {
782
+ const n = e?.strategy ?? "none";
783
+ return n === "custom" && e?.unmask ? e.unmask(t) : n === "strip" ? t.replace(/[^A-Za-z0-9]/g, "") : t;
784
+ }
785
+ const Ue = (t) => {
786
+ const {
787
+ value: e,
788
+ onBlur: n,
789
+ onChange: s,
790
+ onInput: r,
791
+ onAccept: b,
792
+ onComplete: i,
793
+ mask: g,
794
+ definitions: p,
795
+ useDefaultDefinitions: v,
796
+ extraLiterals: d,
797
+ prefix: m,
798
+ suffix: y,
799
+ autofix: o,
800
+ pipe: a,
801
+ completion: D,
802
+ unmask: $,
803
+ allowMode: u,
804
+ allow: x,
805
+ placeholder: M,
806
+ placeholderOptions: I
807
+ } = t, A = V(
808
+ e,
809
+ g,
810
+ p,
811
+ v,
812
+ d,
813
+ m,
814
+ y,
815
+ o,
816
+ D,
817
+ $,
818
+ u,
819
+ M,
820
+ I
821
+ )((c, w, S, z, _, B, N, J, X, Y, Z, se, j) => w ? Me(c ?? "", "", w, {
822
+ definitions: S ?? {},
823
+ useDefaultDefinitions: z ?? !0,
824
+ extraLiterals: _ ?? [],
825
+ autofix: J ?? "none",
826
+ completion: X ?? { mode: "mask" },
827
+ pipe: a ?? ((L) => L),
828
+ unmask: Y ?? { strategy: "none" },
829
+ allowMode: Z ?? "all",
830
+ allow: x,
831
+ prefix: B,
832
+ suffix: N
833
+ }).value : c ?? ""), k = (c, w) => {
834
+ const S = c.value ?? "", z = f.get(e) ?? "", _ = g != null ? f.get(g) : null, B = p != null ? f.get(p) : void 0, N = v != null ? f.get(v) : void 0, J = d != null ? f.get(d) : void 0, X = o != null ? f.get(o) : void 0, Y = D != null ? f.get(D) : void 0, Z = $ != null ? f.get($) : void 0, se = u != null ? f.get(u) : void 0, j = m != null ? f.get(m) : void 0, L = y != null ? f.get(y) : void 0, {
835
+ value: H,
836
+ cursor: ae,
837
+ completed: ge
838
+ } = _ ? Me(
839
+ S,
840
+ z,
841
+ _,
842
+ {
843
+ definitions: B ?? {},
844
+ useDefaultDefinitions: N ?? !0,
845
+ extraLiterals: J ?? [],
846
+ autofix: X ?? "none",
847
+ completion: Y ?? { mode: "mask" },
848
+ pipe: a ?? ((Oe) => Oe),
849
+ unmask: Z ?? { strategy: "none" },
850
+ allowMode: se ?? "all",
851
+ allow: x,
852
+ prefix: j,
853
+ suffix: L
854
+ },
855
+ c.selectionStart ?? S.length,
856
+ t.cursor ? f.get(t.cursor) : void 0
857
+ ) : { value: S, cursor: S.length, completed: !0 };
858
+ if (H !== S) {
859
+ c.value = H;
860
+ try {
861
+ c.setSelectionRange(ae, ae);
862
+ } catch {
863
+ }
864
+ }
865
+ const ve = ut(H, Z);
866
+ b?.({
867
+ raw: ve,
868
+ conformed: H,
869
+ completed: ge,
870
+ cursor: ae
871
+ }), w === "input" ? r?.(H) : (s?.(H), ge && i?.({ raw: ve, conformed: H }));
872
+ };
873
+ return E(
874
+ W({
875
+ ...t,
876
+ input: ne.text(
877
+ q(t),
878
+ l.value(A),
879
+ l.class("bc-input"),
880
+ n != null ? C.blur(n) : T,
881
+ ee(
882
+ (c) => c instanceof HTMLInputElement ? E(
883
+ C.input(() => k(c, "input")),
884
+ C.change(() => k(c, "change")),
885
+ C.keydown((w) => {
886
+ if (w.key !== "Backspace" || !(t.cursor ? f.get(t.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
887
+ const z = c.selectionStart ?? 0, _ = c.selectionEnd ?? z;
888
+ if (z !== _ || z <= 0) return;
889
+ const B = c.value ?? "", N = g != null ? f.get(g) : null;
890
+ if (!N) return;
891
+ const J = p != null ? f.get(p) : void 0, X = v != null ? f.get(v) : !0, Y = m != null ? f.get(m) : void 0, Z = y != null ? f.get(y) : void 0, se = Le(
892
+ typeof N == "function" ? N(B, {
893
+ raw: B,
894
+ previousConformed: B,
895
+ cursor: z,
896
+ completed: !1
897
+ }) : N,
898
+ J ?? {},
899
+ X ?? !0
900
+ ), j = /* @__PURE__ */ new Set();
901
+ for (const L of se)
902
+ L.type === "literal" && j.add(L.char);
903
+ if (Y) for (const L of Y) j.add(L);
904
+ if (Z) for (const L of Z) j.add(L);
905
+ if (j.has(B[z - 1])) {
906
+ let L = z - 1;
907
+ for (; L >= 0 && j.has(B[L]); ) L--;
908
+ L >= 0 && (w.preventDefault(), w.stopPropagation(), c.value = B.slice(0, L) + B.slice(L + 1), k(c, "input"));
909
+ }
910
+ })
911
+ ) : T
912
+ )
913
+ )
914
+ })
915
+ );
916
+ };
917
+ function Ee(t, e, n) {
918
+ const s = f.map(t, (i) => i != null), r = V(
919
+ s,
920
+ e ?? !1
921
+ )((i, g) => !i || g), b = oe.clearValue;
922
+ return h.button(
923
+ l.type("button"),
924
+ l.class("bc-input-container__reset"),
925
+ G.label(b),
926
+ l.title(b),
927
+ l.disabled(r),
928
+ O({ icon: "mdi:close", size: "sm" }),
929
+ C.click((i) => {
930
+ i.stopPropagation(), n?.(null);
931
+ })
932
+ );
933
+ }
934
+ const St = (t) => {
935
+ const { value: e, onBlur: n, onChange: s, onInput: r, rows: b } = t;
936
+ return W({
937
+ baseContainer: !0,
938
+ ...t,
939
+ input: h.textarea(
940
+ l.class(
941
+ V(t.size ?? "md")(
942
+ (i) => Ye(
943
+ !1,
944
+ i ?? "md"
945
+ )
946
+ )
947
+ ),
948
+ q(t),
949
+ l.rows(b ?? 3),
950
+ l.value(e),
951
+ l.class("bc-input"),
952
+ n != null ? C.blur(P(n)) : T,
953
+ s != null ? C.change(P(s)) : T,
954
+ r != null ? C.input(P(r)) : T
955
+ )
956
+ });
957
+ }, zt = (t) => {
958
+ const { value: e, step: n, min: s, max: r, onBlur: b, onChange: i, onInput: g, after: p } = t, v = (y) => {
959
+ const o = s != null ? f.get(s) : void 0, a = r != null ? f.get(r) : void 0;
960
+ return o != null && y < o ? o : a != null && y > a ? a : y;
961
+ }, d = n != null ? F(R, (y) => {
962
+ const o = V(
963
+ e,
964
+ s
965
+ )((u, x) => x == null ? !0 : (u ?? 0) > x), a = V(
966
+ e,
967
+ r
968
+ )((u, x) => x == null ? !0 : (u ?? 0) < x), D = (u) => {
969
+ const x = f.get(e) ?? 0, M = f.get(n), I = u?.shiftKey ? 10 : 1, A = x - M * I, k = s != null ? f.get(s) : void 0;
970
+ if (k != null && A < k)
971
+ return;
972
+ const c = v(A);
973
+ c !== x && i && i(c);
974
+ }, $ = (u) => {
975
+ const x = f.get(e) ?? 0, M = f.get(n), I = u?.shiftKey ? 10 : 1, A = x + M * I, k = r != null ? f.get(r) : void 0;
976
+ if (k != null && A > k)
977
+ return;
978
+ const c = v(A);
979
+ c !== x && i && i(c);
980
+ };
981
+ return Ve(
982
+ l.class("bc-number-input-steppers"),
983
+ // Increment second
984
+ h.button(
985
+ l.type("button"),
986
+ l.class(
987
+ "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
988
+ ),
989
+ l.disabled(
990
+ V(
991
+ a,
992
+ t.disabled ?? !1
993
+ )((u, x) => !u || x)
994
+ ),
995
+ C.click((u) => $(u)),
996
+ G.label(y.$.incrementValue),
997
+ O({ icon: "line-md:plus", size: "xs" })
998
+ ),
999
+ // Decrement first (matches tests expecting first button to be decrement)
1000
+ h.button(
1001
+ l.type("button"),
1002
+ l.class(
1003
+ "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1004
+ ),
1005
+ l.disabled(
1006
+ V(
1007
+ o,
1008
+ t.disabled ?? !1
1009
+ )((u, x) => !u || x)
1010
+ ),
1011
+ C.click((u) => D(u)),
1012
+ G.label(y.$.decrementValue),
1013
+ O({ icon: "line-md:minus", size: "xs" })
1014
+ )
1015
+ );
1016
+ }) : null, m = p != null && d != null ? E(d, p) : p ?? d;
1017
+ return W({
1018
+ ...t,
1019
+ input: ne.number(
1020
+ s != null ? l.min(s) : T,
1021
+ r != null ? l.max(r) : T,
1022
+ q(t),
1023
+ l.valueAsNumber(e),
1024
+ l.step(n),
1025
+ l.class("bc-input bc-number-input"),
1026
+ b != null ? C.blur(P(b)) : T,
1027
+ i != null ? C.change(_e(i)) : T,
1028
+ g != null ? C.input(_e(g)) : T,
1029
+ // Add wheel event support when step is defined
1030
+ n != null ? C.wheel((y) => {
1031
+ y.preventDefault();
1032
+ const o = f.get(e) ?? 0, a = f.get(n), D = y.shiftKey ? 10 : 1, $ = y.deltaY < 0 ? a * D : -a * D, u = v(o + $);
1033
+ u !== o && i && i(u);
1034
+ }) : T
1035
+ ),
1036
+ after: m
1037
+ });
1038
+ }, Te = (t) => {
1039
+ if (t == null || t === "") return null;
1040
+ const e = Number(t);
1041
+ return Number.isNaN(e) ? null : e;
1042
+ }, Bt = (t) => {
1043
+ const { value: e, step: n, min: s, max: r, onBlur: b, onChange: i, onInput: g, after: p } = t, v = (o) => {
1044
+ const a = s != null ? f.get(s) : void 0, D = r != null ? f.get(r) : void 0;
1045
+ return a != null && o < a ? a : D != null && o > D ? D : o;
1046
+ }, d = (() => {
1047
+ if (n == null) return null;
1048
+ const o = V(
1049
+ e,
1050
+ s
1051
+ )((x, M) => {
1052
+ const I = x ?? 0;
1053
+ return M == null ? !0 : I > M;
1054
+ }), a = V(
1055
+ e,
1056
+ r
1057
+ )((x, M) => {
1058
+ const I = x ?? 0;
1059
+ return M == null ? !0 : I < M;
1060
+ }), D = (x) => {
1061
+ const M = f.get(e) ?? 0, I = f.get(n), A = x?.shiftKey ? 10 : 1, k = M - I * A, c = s != null ? f.get(s) : void 0;
1062
+ if (c != null && k < c) return;
1063
+ const w = v(k);
1064
+ w !== M && i && i(w);
1065
+ }, $ = (x) => {
1066
+ const M = f.get(e) ?? 0, I = f.get(n), A = x?.shiftKey ? 10 : 1, k = M + I * A, c = r != null ? f.get(r) : void 0;
1067
+ if (c != null && k > c) return;
1068
+ const w = v(k);
1069
+ w !== M && i && i(w);
1070
+ };
1071
+ return ((x, M) => Ve(
1072
+ l.class("bc-number-input-steppers"),
1073
+ h.button(
1074
+ l.type("button"),
1075
+ l.class(
1076
+ "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
1077
+ ),
1078
+ l.disabled(
1079
+ V(
1080
+ a,
1081
+ t.disabled ?? !1
1082
+ )((I, A) => !I || A)
1083
+ ),
1084
+ C.click((I) => $(I)),
1085
+ G.label(x),
1086
+ O({ icon: "line-md:plus", size: "xs" })
1087
+ ),
1088
+ h.button(
1089
+ l.type("button"),
1090
+ l.class(
1091
+ "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1092
+ ),
1093
+ l.disabled(
1094
+ V(
1095
+ o,
1096
+ t.disabled ?? !1
1097
+ )((I, A) => !I || A)
1098
+ ),
1099
+ C.click((I) => D(I)),
1100
+ G.label(M),
1101
+ O({ icon: "line-md:minus", size: "xs" })
1102
+ )
1103
+ ))(
1104
+ oe.incrementValue,
1105
+ oe.decrementValue
1106
+ );
1107
+ })(), m = Ee(
1108
+ e,
1109
+ t.disabled,
1110
+ i ?? g
1111
+ ), y = p != null && d != null ? E(d, m, p) : p != null ? E(m, p) : d != null ? E(d, m) : m;
1112
+ return W({
1113
+ ...t,
1114
+ input: ne.number(
1115
+ // min/max attributes and reactive watchers (no forced correction)
1116
+ s != null ? l.min(s) : T,
1117
+ r != null ? l.max(r) : T,
1118
+ q(t),
1119
+ // Represent null as empty string so the field can be cleared
1120
+ l.value(f.map(e, (o) => o == null ? "" : String(o))),
1121
+ l.step(n),
1122
+ l.class("bc-input bc-number-input"),
1123
+ b != null ? C.blur(P(b)) : T,
1124
+ i != null ? C.change(
1125
+ P((o) => {
1126
+ const a = Te(o);
1127
+ i(a);
1128
+ })
1129
+ ) : T,
1130
+ g != null ? C.input(
1131
+ P((o) => {
1132
+ const a = Te(o);
1133
+ g(a);
1134
+ })
1135
+ ) : T,
1136
+ // Wheel support when step is defined
1137
+ n != null ? C.wheel((o) => {
1138
+ o.preventDefault();
1139
+ const a = f.get(e) ?? 0, D = f.get(n), $ = o.shiftKey ? 10 : 1, u = o.deltaY < 0 ? D * $ : -D * $, x = v(a + u);
1140
+ x !== a && i && i(x);
1141
+ }) : T
1142
+ ),
1143
+ after: y
1144
+ });
1145
+ }, Vt = (t) => {
1146
+ const e = {
1147
+ type: "pattern",
1148
+ pattern: /[0-9A-Fa-f]/,
1149
+ transform: (s) => s.toLowerCase()
1150
+ };
1151
+ return Ue({
1152
+ ...t,
1153
+ mask: [
1154
+ e,
1155
+ e,
1156
+ e,
1157
+ e,
1158
+ e,
1159
+ e,
1160
+ e,
1161
+ e,
1162
+ "-",
1163
+ e,
1164
+ e,
1165
+ e,
1166
+ e,
1167
+ "-",
1168
+ e,
1169
+ e,
1170
+ e,
1171
+ e,
1172
+ "-",
1173
+ e,
1174
+ e,
1175
+ e,
1176
+ e,
1177
+ "-",
1178
+ e,
1179
+ e,
1180
+ e,
1181
+ e,
1182
+ e,
1183
+ e,
1184
+ e,
1185
+ e,
1186
+ e,
1187
+ e,
1188
+ e,
1189
+ e
1190
+ ],
1191
+ // Sensible default placeholder; can be overridden via options.placeholder
1192
+ placeholder: t.placeholder ?? "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1193
+ });
1194
+ }, ft = /^P(\d+([YMWD]|$)){0,4}(T(\d+([HMS]|$)){0,3})?$/i, pt = /^P(?:(\d+Y)?(\d+M)?(\d+W)?(\d+D)?)(T(\d+H)?(\d+M)?(\d+S)?)?$/i;
1195
+ function dt(t) {
1196
+ return {
1197
+ mask: null,
1198
+ allowMode: "custom",
1199
+ allow: (e) => /[0-9ptwdhms]/i.test(e),
1200
+ pipe: (e) => {
1201
+ const n = e.toUpperCase();
1202
+ return n.length === 0 ? n : !n.startsWith("P") || !ft.test(n) ? !1 : n;
1203
+ },
1204
+ completion: {
1205
+ mode: "custom",
1206
+ isComplete: (e) => {
1207
+ const n = e.toUpperCase();
1208
+ if (!pt.test(n)) return !1;
1209
+ try {
1210
+ return t(n), !0;
1211
+ } catch {
1212
+ return !1;
1213
+ }
1214
+ }
1215
+ }
1216
+ };
1217
+ }
1218
+ const Se = (t, e) => {
1219
+ if (t == null) return null;
1220
+ try {
1221
+ return t.Duration.from(e);
1222
+ } catch {
1223
+ return null;
1224
+ }
1225
+ }, At = (t) => {
1226
+ const { value: e, onChange: n, onInput: s, after: r, disabled: b, onBlur: i } = t, g = () => {
1227
+ const d = Ee(e, b, n ?? s);
1228
+ return r != null ? E(d, r) : d;
1229
+ }, p = t.placeholder != null ? T : l.placeholder("P0DT0H0M0S");
1230
+ return Xe(
1231
+ (d) => Ue({
1232
+ ...t,
1233
+ value: f.map(e, (m) => m?.toString() ?? ""),
1234
+ onChange: n ? (m) => n(m === "" ? null : d.Duration.from(m)) : void 0,
1235
+ onInput: void 0,
1236
+ ...dt(d.Duration.from),
1237
+ placeholder: "P0DT0H0M0S",
1238
+ after: g()
1239
+ }),
1240
+ { pending: () => {
1241
+ const d = (m) => (y) => {
1242
+ const a = y.currentTarget?.value ?? "";
1243
+ if (a === "") {
1244
+ m(null);
1245
+ return;
1246
+ }
1247
+ const D = globalThis.Temporal, $ = Se(D, a);
1248
+ if ($ != null) {
1249
+ m($);
1250
+ return;
1251
+ }
1252
+ be().then((u) => {
1253
+ const x = Se(u, a);
1254
+ x != null && m(x);
1255
+ }).catch(() => {
1256
+ });
1257
+ };
1258
+ return W({
1259
+ ...t,
1260
+ input: ne.text(
1261
+ q(t),
1262
+ l.value(f.map(e, (m) => m?.toString() ?? "")),
1263
+ l.class("bc-input"),
1264
+ p,
1265
+ i != null ? C.blur(() => i()) : T,
1266
+ n != null ? C.change(d(n)) : T,
1267
+ s != null ? C.input(d(s)) : T
1268
+ ),
1269
+ after: g()
1270
+ });
1271
+ } }
1272
+ );
1273
+ }, Lt = (t) => {
1274
+ const { value: e, onBlur: n, onChange: s, onInput: r } = t;
1275
+ return W({
1276
+ ...t,
1277
+ input: ne.url(
1278
+ q(t),
1279
+ l.value(e),
1280
+ l.class("bc-input"),
1281
+ n != null ? C.blur(P(n)) : T,
1282
+ s != null ? C.change(P(s)) : T,
1283
+ r != null ? C.input(P(r)) : T
1284
+ )
1285
+ });
1286
+ };
1287
+ function mt(t, e) {
1288
+ const {
1289
+ onMove: n,
1290
+ cannotMoveUp: s,
1291
+ cannotMoveDown: r,
1292
+ onRemove: b,
1293
+ showMove: i = !0,
1294
+ showRemove: g = !0,
1295
+ removeDisabled: p,
1296
+ showMoveButtons: v = !0,
1297
+ layout: d = "aside"
1298
+ } = t, m = f.toSignal(d).map((a) => a === "aside"), y = U(
1299
+ i,
1300
+ () => h.div(
1301
+ l.class("bc-list-item-controls__move"),
1302
+ me(
1303
+ {
1304
+ size: "xs",
1305
+ roundedness: "full",
1306
+ variant: "text",
1307
+ onClick: () => n("up"),
1308
+ disabled: s
1309
+ },
1310
+ F(
1311
+ R,
1312
+ (a) => O({
1313
+ size: "xs",
1314
+ icon: "line-md:arrow-up",
1315
+ title: a.$.incrementValue
1316
+ })
1317
+ )
1318
+ ),
1319
+ me(
1320
+ {
1321
+ size: "xs",
1322
+ roundedness: "full",
1323
+ variant: "text",
1324
+ onClick: () => n("down"),
1325
+ disabled: r
1326
+ },
1327
+ F(
1328
+ R,
1329
+ (a) => O({
1330
+ size: "xs",
1331
+ icon: "line-md:arrow-down",
1332
+ title: a.$.decrementValue
1333
+ })
1334
+ )
1335
+ )
1336
+ )
1337
+ ), o = U(
1338
+ g,
1339
+ () => F(
1340
+ R,
1341
+ (a) => ie({
1342
+ size: "xs",
1343
+ label: f.map(a.$.removeItem, (D) => D.toLowerCase()),
1344
+ color: "danger",
1345
+ disabled: p,
1346
+ onClick: b
1347
+ })
1348
+ )
1349
+ );
1350
+ return U(
1351
+ m,
1352
+ () => h.div(
1353
+ l.class("bc-list-item-controls bc-list-item-controls--aside"),
1354
+ h.div(l.class("bc-list-item-controls__content"), e),
1355
+ h.div(
1356
+ l.class("bc-list-item-controls__actions"),
1357
+ U(v, () => y),
1358
+ o
1359
+ )
1360
+ ),
1361
+ () => h.div(
1362
+ l.class("bc-list-item-controls bc-list-item-controls--below"),
1363
+ h.div(l.class("bc-list-item-controls__content"), e),
1364
+ h.div(
1365
+ l.class("bc-list-item-controls__actions"),
1366
+ U(
1367
+ v,
1368
+ () => y,
1369
+ () => h.div()
1370
+ ),
1371
+ o
1372
+ )
1373
+ )
1374
+ );
1375
+ }
1376
+ const bt = (t) => {
1377
+ const {
1378
+ controller: e,
1379
+ element: n,
1380
+ separator: s,
1381
+ showMove: r = !0,
1382
+ showRemove: b = !0,
1383
+ showAdd: i = !0,
1384
+ createItem: g,
1385
+ addLabel: p,
1386
+ controlsLayout: v = "aside",
1387
+ removeDisabled: d,
1388
+ addDisabled: m
1389
+ } = t, y = U(
1390
+ V(i, g)((o, a) => o && a != null),
1391
+ () => Ie(
1392
+ l.class(
1393
+ "bc-group--gap-2 bc-group--align-center bc-group--justify-center"
1394
+ ),
1395
+ me(
1396
+ {
1397
+ size: "sm",
1398
+ variant: "filled",
1399
+ onClick: () => e.push(g()),
1400
+ disabled: V(
1401
+ e.disabled,
1402
+ m ?? !1
1403
+ )(
1404
+ (o, a) => o || a
1405
+ )
1406
+ },
1407
+ F(
1408
+ R,
1409
+ (o) => Ie(
1410
+ l.class("bc-group--gap-2"),
1411
+ O({ icon: "line-md:plus" }),
1412
+ p ?? o.$.addLabel
1413
+ )
1414
+ )
1415
+ )
1416
+ )
1417
+ );
1418
+ return E(
1419
+ ot(
1420
+ e,
1421
+ (o) => mt(
1422
+ {
1423
+ onMove: o.move,
1424
+ cannotMoveUp: o.cannotMove("up"),
1425
+ cannotMoveDown: o.cannotMove("down"),
1426
+ onRemove: o.remove,
1427
+ showMove: r,
1428
+ showRemove: b,
1429
+ removeDisabled: d,
1430
+ showMoveButtons: e.signal.map((a) => a.length > 1),
1431
+ layout: v
1432
+ },
1433
+ n(o)
1434
+ ),
1435
+ s
1436
+ ),
1437
+ y
1438
+ );
1439
+ }, Ut = (t, ...e) => {
1440
+ const {
1441
+ controller: n,
1442
+ element: s,
1443
+ separator: r,
1444
+ showMove: b,
1445
+ showRemove: i,
1446
+ showAdd: g,
1447
+ createItem: p,
1448
+ addLabel: v,
1449
+ controlsLayout: d,
1450
+ removeDisabled: m,
1451
+ addDisabled: y,
1452
+ ...o
1453
+ } = t;
1454
+ return Be(
1455
+ {
1456
+ ...o,
1457
+ content: bt({
1458
+ controller: n,
1459
+ element: s,
1460
+ separator: r,
1461
+ showMove: b,
1462
+ showRemove: i,
1463
+ showAdd: g,
1464
+ createItem: p,
1465
+ addLabel: v,
1466
+ controlsLayout: d,
1467
+ removeDisabled: m,
1468
+ addDisabled: y
1469
+ })
1470
+ },
1471
+ ...e
1472
+ );
1473
+ };
1474
+ class Et extends ue {
1475
+ /** The immutable list of branch definitions for this union */
1476
+ branches;
1477
+ /** Reactive signal containing the key of the currently active branch */
1478
+ activeBranch;
1479
+ /** @internal Reactive signal containing the controller for the active branch */
1480
+ #t;
1481
+ /** @internal Cache of lazily-created branch controllers */
1482
+ #e = /* @__PURE__ */ new Map();
1483
+ /**
1484
+ * Creates a new UnionController.
1485
+ *
1486
+ * @param path - The path segments identifying this controller in the form tree
1487
+ * @param change - Callback to propagate value changes to the parent
1488
+ * @param signal - Reactive signal holding the current union value
1489
+ * @param status - Reactive signal holding the current validation status
1490
+ * @param parent - Parent context providing disabled state and optional validation mode
1491
+ * @param branches - Array of branch definitions describing the possible value types
1492
+ * @param equals - Optional equality function for comparing values. Defaults to `strictEqual`.
1493
+ */
1494
+ constructor(e, n, s, r, b, i, g = Q) {
1495
+ super(e, n, s, r, b, g), this.branches = i;
1496
+ const p = (d) => {
1497
+ for (const m of i)
1498
+ if (m.detect(d))
1499
+ return m.key;
1500
+ return i[0]?.key ?? "unknown";
1501
+ };
1502
+ this.activeBranch = s.map(p, Q);
1503
+ const v = (d) => {
1504
+ if (this.#e.has(d))
1505
+ return this.#e.get(d);
1506
+ const m = i.find((o) => o.key === d);
1507
+ if (!m)
1508
+ throw new Error(`Unknown branch: ${d}`);
1509
+ const y = new ue(
1510
+ [...e, d],
1511
+ (o) => {
1512
+ this.change(o);
1513
+ },
1514
+ this.signal.map(
1515
+ (o) => m.detect(o) ? o : m.defaultValue(),
1516
+ g
1517
+ ),
1518
+ r.map(De([d])),
1519
+ {
1520
+ disabled: this.disabled,
1521
+ validationMode: this.parent.validationMode
1522
+ },
1523
+ g
1524
+ );
1525
+ return this.#e.set(d, y), y;
1526
+ };
1527
+ this.#t = this.activeBranch.map(
1528
+ (d) => v(d),
1529
+ Q
1530
+ ), this.onDispose(() => {
1531
+ for (const d of this.#e.values())
1532
+ d.dispose();
1533
+ this.#e.clear(), this.activeBranch.dispose(), this.#t.dispose();
1534
+ });
1535
+ }
1536
+ /**
1537
+ * Gets the controller for the currently active branch.
1538
+ *
1539
+ * The returned controller's value and type correspond to the branch that
1540
+ * matches the current union value.
1541
+ *
1542
+ * @returns The `Controller<unknown>` for the active branch
1543
+ */
1544
+ get activeController() {
1545
+ return f.get(this.#t);
1546
+ }
1547
+ /**
1548
+ * Gets or creates a controller for a specific branch by key.
1549
+ *
1550
+ * Controllers are created lazily and cached for subsequent calls.
1551
+ *
1552
+ * @param branchKey - The unique key of the branch to get a controller for
1553
+ * @returns The `Controller<unknown>` for the specified branch
1554
+ * @throws Error if the branch key is not found in the branches array
1555
+ */
1556
+ getBranchController(e) {
1557
+ const n = this.branches.find((r) => r.key === e);
1558
+ if (!n)
1559
+ throw new Error(`Unknown branch: ${e}`);
1560
+ if (this.#e.has(e))
1561
+ return this.#e.get(e);
1562
+ const s = new ue(
1563
+ [...this.path, e],
1564
+ (r) => {
1565
+ this.change(r);
1566
+ },
1567
+ this.signal.map(
1568
+ (r) => n.detect(r) ? r : n.defaultValue(),
1569
+ Q
1570
+ ),
1571
+ this.status.map(De([e])),
1572
+ {
1573
+ disabled: this.disabled,
1574
+ validationMode: this.parent.validationMode
1575
+ },
1576
+ Q
1577
+ );
1578
+ return this.#e.set(e, s), s;
1579
+ }
1580
+ /**
1581
+ * Switches the union value to a different branch.
1582
+ *
1583
+ * Attempts the following in order:
1584
+ * 1. If already on the target branch, returns `true` immediately
1585
+ * 2. If the branch has a `convert` function, tries to convert the current value
1586
+ * 3. If conversion fails and `confirmChange` is true, prompts the user with `window.confirm`
1587
+ * 4. Sets the value to the branch's default value
1588
+ *
1589
+ * @param branchKey - The key of the branch to switch to
1590
+ * @param confirmChange - If true, prompts the user before losing the current value when conversion fails
1591
+ * @returns `true` if the switch was successful, `false` if the user cancelled
1592
+ * @throws Error if the branch key is not found in the branches array
1593
+ */
1594
+ switchToBranch(e, n = !1) {
1595
+ const s = this.branches.find((i) => i.key === e);
1596
+ if (!s)
1597
+ throw new Error(`Unknown branch: ${e}`);
1598
+ const r = f.get(this.signal);
1599
+ if (s.detect(r))
1600
+ return !0;
1601
+ if (s.convert) {
1602
+ const i = s.convert(r);
1603
+ if (i.ok)
1604
+ return this.change(i.value), !0;
1605
+ }
1606
+ if (n && typeof window == "object" && typeof window.confirm == "function" && !window.confirm(oe.changeTypeConfirmation))
1607
+ return !1;
1608
+ const b = s.defaultValue();
1609
+ return this.change(b), !0;
1610
+ }
1611
+ /**
1612
+ * Gets the {@link UnionBranch} definition for the currently active branch.
1613
+ *
1614
+ * @returns The active branch definition, or `undefined` if no branch matches
1615
+ */
1616
+ get activeBranchDefinition() {
1617
+ const e = f.get(this.activeBranch);
1618
+ return this.branches.find((n) => n.key === e);
1619
+ }
1620
+ }
1621
+ function Ot(t) {
1622
+ return t.transform(
1623
+ (e) => e ?? null,
1624
+ (e) => e ?? void 0
1625
+ );
1626
+ }
1627
+ function Ft(t) {
1628
+ return t.transform(
1629
+ (e) => e ?? "",
1630
+ (e) => e === "" ? void 0 : e
1631
+ );
1632
+ }
1633
+ function Rt(t) {
1634
+ return t.transform(
1635
+ (e) => e ?? void 0,
1636
+ (e) => e ?? null
1637
+ );
1638
+ }
1639
+ function le(t) {
1640
+ return t !== null && typeof t == "object" && !Array.isArray(t) && Object.prototype.toString.call(t) === "[object Object]";
1641
+ }
1642
+ function ht(t, e) {
1643
+ if (e == null)
1644
+ return ze(t);
1645
+ if (t == null)
1646
+ return e;
1647
+ if (le(t) && le(e)) {
1648
+ const n = { ...e };
1649
+ for (const s of Object.keys(t))
1650
+ n[s] === void 0 ? n[s] = ze(t[s]) : le(t[s]) && le(n[s]) && (n[s] = ht(t[s], n[s]));
1651
+ return n;
1652
+ }
1653
+ return e;
1654
+ }
1655
+ function ze(t) {
1656
+ return typeof structuredClone == "function" ? structuredClone(t) : JSON.parse(JSON.stringify(t));
1657
+ }
1658
+ export {
1659
+ bt as B,
1660
+ st as E,
1661
+ $t as F,
1662
+ Ie as G,
1663
+ Ut as L,
1664
+ Ue as M,
1665
+ Ee as N,
1666
+ It as S,
1667
+ St as T,
1668
+ Vt as U,
1669
+ Xe as W,
1670
+ Lt as a,
1671
+ rt as b,
1672
+ At as c,
1673
+ dt as d,
1674
+ Ft as e,
1675
+ Bt as f,
1676
+ zt as g,
1677
+ Tt as h,
1678
+ Et as i,
1679
+ ht as j,
1680
+ pe as k,
1681
+ mt as l,
1682
+ Rt as m,
1683
+ ot as n,
1684
+ it as o,
1685
+ Mt as p,
1686
+ lt as q,
1687
+ be as r,
1688
+ Ot as t
1689
+ };