@solid-design-system/components 6.4.0 → 6.4.2

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 (275) hide show
  1. package/cdn/chunks/chunk.I6EGY7RT.js +2 -0
  2. package/cdn/components/datepicker/datepicker.d.ts +3 -0
  3. package/cdn/components/datepicker/datepicker.js +1 -1
  4. package/cdn/custom-elements.json +8 -1
  5. package/cdn/solid-components.bundle.js +76 -76
  6. package/cdn/solid-components.iife.js +76 -76
  7. package/cdn/solid-components.js +1 -1
  8. package/cdn/web-types.json +2 -1
  9. package/cdn-versioned/chunks/chunk.2DPSCPM4.js +2 -2
  10. package/cdn-versioned/chunks/chunk.2HJLVWCE.js +2 -2
  11. package/cdn-versioned/chunks/chunk.2KV3QDYA.js +2 -2
  12. package/cdn-versioned/chunks/chunk.3ETEQAPR.js +2 -2
  13. package/cdn-versioned/chunks/chunk.47H4SDKN.js +2 -2
  14. package/cdn-versioned/chunks/chunk.4LGCXG7D.js +2 -2
  15. package/cdn-versioned/chunks/chunk.4P5PT6MV.js +2 -2
  16. package/cdn-versioned/chunks/chunk.5M2K2EXR.js +2 -2
  17. package/cdn-versioned/chunks/chunk.5OE2GCRH.js +2 -2
  18. package/cdn-versioned/chunks/chunk.6GU6NFBF.js +1 -1
  19. package/cdn-versioned/chunks/chunk.745GDIND.js +2 -2
  20. package/cdn-versioned/chunks/chunk.ALCKOGA7.js +1 -1
  21. package/cdn-versioned/chunks/chunk.BZ3VHECJ.js +3 -3
  22. package/cdn-versioned/chunks/chunk.C44GZOLG.js +9 -9
  23. package/cdn-versioned/chunks/chunk.C4QT4K6T.js +2 -2
  24. package/cdn-versioned/chunks/chunk.CDP46OS4.js +1 -1
  25. package/cdn-versioned/chunks/chunk.CJ34NUTS.js +1 -1
  26. package/cdn-versioned/chunks/chunk.CMY3VPYA.js +2 -2
  27. package/cdn-versioned/chunks/chunk.D5FVDNYV.js +2 -2
  28. package/cdn-versioned/chunks/chunk.DEEJ4ON7.js +2 -2
  29. package/cdn-versioned/chunks/chunk.DXGVZ3KG.js +1 -1
  30. package/cdn-versioned/chunks/chunk.E64WXH47.js +1 -1
  31. package/cdn-versioned/chunks/chunk.EASLRW3B.js +2 -2
  32. package/cdn-versioned/chunks/chunk.G42N3VHE.js +2 -2
  33. package/cdn-versioned/chunks/chunk.GP2QVZP5.js +1 -1
  34. package/cdn-versioned/chunks/chunk.H77CNSMK.js +2 -2
  35. package/cdn-versioned/chunks/chunk.HHASCDC2.js +5 -5
  36. package/cdn-versioned/chunks/chunk.I234MSSB.js +2 -2
  37. package/cdn-versioned/chunks/chunk.I3TTTGLW.js +1 -1
  38. package/cdn-versioned/chunks/chunk.I6EGY7RT.js +2 -0
  39. package/cdn-versioned/chunks/chunk.IAEOXYGB.js +1 -1
  40. package/cdn-versioned/chunks/chunk.JRSX44R6.js +2 -2
  41. package/cdn-versioned/chunks/chunk.KKKGNXIR.js +2 -2
  42. package/cdn-versioned/chunks/chunk.KM5W4EDY.js +2 -2
  43. package/cdn-versioned/chunks/chunk.L6PAHLSN.js +2 -2
  44. package/cdn-versioned/chunks/chunk.MWO5B7BA.js +2 -2
  45. package/cdn-versioned/chunks/chunk.OAVVKKBJ.js +2 -2
  46. package/cdn-versioned/chunks/chunk.OG2BQH6T.js +2 -2
  47. package/cdn-versioned/chunks/chunk.PDHMAKVQ.js +2 -2
  48. package/cdn-versioned/chunks/chunk.PPIS2HQ5.js +1 -1
  49. package/cdn-versioned/chunks/chunk.PRGLNPUF.js +1 -1
  50. package/cdn-versioned/chunks/chunk.PT6G5HKE.js +1 -1
  51. package/cdn-versioned/chunks/chunk.Q6GEIXGA.js +2 -2
  52. package/cdn-versioned/chunks/chunk.QMKNC76J.js +2 -2
  53. package/cdn-versioned/chunks/chunk.QUGI3FMS.js +2 -2
  54. package/cdn-versioned/chunks/chunk.RBVWPWFK.js +2 -2
  55. package/cdn-versioned/chunks/chunk.S4II2NTI.js +2 -2
  56. package/cdn-versioned/chunks/chunk.S7VIPIYX.js +2 -2
  57. package/cdn-versioned/chunks/chunk.TWNEU4H4.js +3 -3
  58. package/cdn-versioned/chunks/chunk.TWTQHJPN.js +2 -2
  59. package/cdn-versioned/chunks/chunk.U44PXBV2.js +2 -2
  60. package/cdn-versioned/chunks/chunk.U5N7L5RI.js +2 -2
  61. package/cdn-versioned/chunks/chunk.UVRZTPOZ.js +2 -2
  62. package/cdn-versioned/chunks/chunk.VAUP57XZ.js +2 -2
  63. package/cdn-versioned/chunks/chunk.VMUNNUNV.js +1 -1
  64. package/cdn-versioned/chunks/chunk.VTDQOKJM.js +2 -2
  65. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  66. package/cdn-versioned/chunks/chunk.WOZKICWV.js +5 -5
  67. package/cdn-versioned/chunks/chunk.XAPH6XNH.js +2 -2
  68. package/cdn-versioned/chunks/chunk.XQWDDXL2.js +2 -2
  69. package/cdn-versioned/chunks/chunk.XTRMRKZ6.js +2 -2
  70. package/cdn-versioned/chunks/chunk.Z6TAAGCD.js +2 -2
  71. package/cdn-versioned/chunks/chunk.ZTELVJ34.js +1 -1
  72. package/cdn-versioned/chunks/chunk.ZVHLKL7F.js +2 -2
  73. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  74. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  75. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  76. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  77. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  78. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  79. package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  80. package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  81. package/cdn-versioned/components/button/button.d.ts +1 -1
  82. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  83. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  84. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  85. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  86. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  87. package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
  88. package/cdn-versioned/components/datepicker/datepicker.d.ts +4 -1
  89. package/cdn-versioned/components/datepicker/datepicker.js +1 -1
  90. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  91. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  92. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  93. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  94. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  95. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  96. package/cdn-versioned/components/header/header.d.ts +1 -1
  97. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  98. package/cdn-versioned/components/include/include.d.ts +1 -1
  99. package/cdn-versioned/components/input/input.d.ts +1 -1
  100. package/cdn-versioned/components/link/link.d.ts +1 -1
  101. package/cdn-versioned/components/loader/loader.d.ts +1 -1
  102. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  103. package/cdn-versioned/components/menu/menu.d.ts +1 -1
  104. package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
  105. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  106. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  107. package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
  108. package/cdn-versioned/components/option/option.d.ts +1 -1
  109. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  110. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  111. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  112. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  113. package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
  114. package/cdn-versioned/components/range/range.d.ts +1 -1
  115. package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
  116. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  117. package/cdn-versioned/components/select/select.d.ts +1 -1
  118. package/cdn-versioned/components/skeleton/skeleton.d.ts +1 -1
  119. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  120. package/cdn-versioned/components/step/step.d.ts +1 -1
  121. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  122. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  123. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  124. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  125. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  126. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  127. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  128. package/cdn-versioned/components/theme-listener/theme-listener.d.ts +1 -1
  129. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  130. package/cdn-versioned/components/video/video.d.ts +1 -1
  131. package/cdn-versioned/custom-elements.json +251 -244
  132. package/cdn-versioned/internal/form.js +3 -3
  133. package/cdn-versioned/solid-components.bundle.js +86 -86
  134. package/cdn-versioned/solid-components.css +2 -2
  135. package/cdn-versioned/solid-components.iife.js +86 -86
  136. package/cdn-versioned/solid-components.js +1 -1
  137. package/cdn-versioned/vscode.html-custom-data.json +94 -94
  138. package/cdn-versioned/web-types.json +158 -157
  139. package/dist/chunks/{chunk.QM4E25CD.js → chunk.CMGWC5BG.js} +46 -15
  140. package/dist/components/datepicker/datepicker.d.ts +3 -0
  141. package/dist/components/datepicker/datepicker.js +1 -1
  142. package/dist/custom-elements.json +8 -1
  143. package/dist/solid-components.js +1 -1
  144. package/dist/web-types.json +2 -1
  145. package/dist-versioned/chunks/chunk.22PWID5B.js +2 -2
  146. package/dist-versioned/chunks/chunk.2EWH2DC2.js +1 -1
  147. package/dist-versioned/chunks/chunk.2HTII44Q.js +4 -4
  148. package/dist-versioned/chunks/chunk.2VPWVTT6.js +4 -4
  149. package/dist-versioned/chunks/chunk.3EJL5IKL.js +1 -1
  150. package/dist-versioned/chunks/chunk.3PTRIEGP.js +2 -2
  151. package/dist-versioned/chunks/chunk.4UT3FCHQ.js +2 -2
  152. package/dist-versioned/chunks/chunk.5XWO3USG.js +3 -3
  153. package/dist-versioned/chunks/chunk.75WDCMIC.js +24 -24
  154. package/dist-versioned/chunks/chunk.ASEJW6QN.js +5 -5
  155. package/dist-versioned/chunks/chunk.AUSBWPVD.js +7 -7
  156. package/dist-versioned/chunks/chunk.AZPOFDJP.js +4 -4
  157. package/dist-versioned/chunks/chunk.BBLAIT57.js +2 -2
  158. package/dist-versioned/chunks/chunk.BSP6J6R2.js +2 -2
  159. package/dist-versioned/chunks/chunk.BTNS6ZNO.js +4 -4
  160. package/dist-versioned/chunks/chunk.C3WIBDGG.js +3 -3
  161. package/dist-versioned/chunks/{chunk.QM4E25CD.js → chunk.CMGWC5BG.js} +48 -17
  162. package/dist-versioned/chunks/chunk.D4UC3BVQ.js +12 -12
  163. package/dist-versioned/chunks/chunk.D7CJJHHA.js +1 -1
  164. package/dist-versioned/chunks/chunk.DCHRUIDY.js +1 -1
  165. package/dist-versioned/chunks/chunk.DCOB6WLB.js +3 -3
  166. package/dist-versioned/chunks/chunk.DFHY67LW.js +5 -5
  167. package/dist-versioned/chunks/chunk.DTTVI7KT.js +11 -11
  168. package/dist-versioned/chunks/chunk.DXDDB6AB.js +1 -1
  169. package/dist-versioned/chunks/chunk.FKFGVTXH.js +3 -3
  170. package/dist-versioned/chunks/chunk.FSUOT4WC.js +12 -12
  171. package/dist-versioned/chunks/chunk.IJIPMNT2.js +3 -3
  172. package/dist-versioned/chunks/chunk.IYXPHPNO.js +1 -1
  173. package/dist-versioned/chunks/chunk.JGRI4R23.js +1 -1
  174. package/dist-versioned/chunks/chunk.K66JHYHC.js +2 -2
  175. package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
  176. package/dist-versioned/chunks/chunk.L2RS3IA6.js +8 -8
  177. package/dist-versioned/chunks/chunk.L3OEOSPQ.js +1 -1
  178. package/dist-versioned/chunks/chunk.L6ZE3RXX.js +14 -14
  179. package/dist-versioned/chunks/chunk.LBDV5GNR.js +4 -4
  180. package/dist-versioned/chunks/chunk.LZVVDTSP.js +26 -26
  181. package/dist-versioned/chunks/chunk.M2D3WWF3.js +8 -8
  182. package/dist-versioned/chunks/chunk.MH7JHBWP.js +2 -2
  183. package/dist-versioned/chunks/chunk.MLRNCOWA.js +3 -3
  184. package/dist-versioned/chunks/chunk.NEUULRS7.js +5 -5
  185. package/dist-versioned/chunks/chunk.OJXVBFUH.js +5 -5
  186. package/dist-versioned/chunks/chunk.P5FGSFP3.js +1 -1
  187. package/dist-versioned/chunks/chunk.PBXAIJQ4.js +5 -5
  188. package/dist-versioned/chunks/chunk.Q7ZMX7IB.js +3 -3
  189. package/dist-versioned/chunks/chunk.R56JDQAF.js +2 -2
  190. package/dist-versioned/chunks/chunk.RFDAZXJG.js +3 -3
  191. package/dist-versioned/chunks/chunk.SCWR4Q4K.js +10 -10
  192. package/dist-versioned/chunks/chunk.SQYISG5I.js +4 -4
  193. package/dist-versioned/chunks/chunk.SVYFJMYF.js +3 -3
  194. package/dist-versioned/chunks/chunk.T46LX45D.js +6 -6
  195. package/dist-versioned/chunks/chunk.TNJNUASM.js +1 -1
  196. package/dist-versioned/chunks/chunk.TUMONDN4.js +4 -4
  197. package/dist-versioned/chunks/chunk.TVWV4PUH.js +2 -2
  198. package/dist-versioned/chunks/chunk.U2BN2DBY.js +4 -4
  199. package/dist-versioned/chunks/chunk.UDPSGKZL.js +4 -4
  200. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  201. package/dist-versioned/chunks/chunk.UPCVQSXM.js +3 -3
  202. package/dist-versioned/chunks/chunk.UWQPJU3Q.js +3 -3
  203. package/dist-versioned/chunks/chunk.XALPLS2Y.js +6 -6
  204. package/dist-versioned/chunks/chunk.XV2UO6TF.js +2 -2
  205. package/dist-versioned/chunks/chunk.YATRFNET.js +28 -28
  206. package/dist-versioned/chunks/chunk.YFRD2UEO.js +8 -8
  207. package/dist-versioned/chunks/chunk.YNBR5ZDU.js +4 -4
  208. package/dist-versioned/chunks/chunk.ZMEUQIVY.js +9 -9
  209. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  210. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  211. package/dist-versioned/components/animation/animation.d.ts +1 -1
  212. package/dist-versioned/components/audio/audio.d.ts +1 -1
  213. package/dist-versioned/components/badge/badge.d.ts +1 -1
  214. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  215. package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  216. package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  217. package/dist-versioned/components/button/button.d.ts +1 -1
  218. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  219. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  220. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  221. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  222. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  223. package/dist-versioned/components/combobox/combobox.d.ts +1 -1
  224. package/dist-versioned/components/datepicker/datepicker.d.ts +4 -1
  225. package/dist-versioned/components/datepicker/datepicker.js +1 -1
  226. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  227. package/dist-versioned/components/divider/divider.d.ts +1 -1
  228. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  229. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  230. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  231. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  232. package/dist-versioned/components/header/header.d.ts +1 -1
  233. package/dist-versioned/components/icon/icon.d.ts +1 -1
  234. package/dist-versioned/components/include/include.d.ts +1 -1
  235. package/dist-versioned/components/input/input.d.ts +1 -1
  236. package/dist-versioned/components/link/link.d.ts +1 -1
  237. package/dist-versioned/components/loader/loader.d.ts +1 -1
  238. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  239. package/dist-versioned/components/menu/menu.d.ts +1 -1
  240. package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
  241. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  242. package/dist-versioned/components/notification/notification.d.ts +1 -1
  243. package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
  244. package/dist-versioned/components/option/option.d.ts +1 -1
  245. package/dist-versioned/components/popup/popup.d.ts +1 -1
  246. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  247. package/dist-versioned/components/radio/radio.d.ts +1 -1
  248. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  249. package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
  250. package/dist-versioned/components/range/range.d.ts +1 -1
  251. package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
  252. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  253. package/dist-versioned/components/select/select.d.ts +1 -1
  254. package/dist-versioned/components/skeleton/skeleton.d.ts +1 -1
  255. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  256. package/dist-versioned/components/step/step.d.ts +1 -1
  257. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  258. package/dist-versioned/components/switch/switch.d.ts +1 -1
  259. package/dist-versioned/components/tab/tab.d.ts +1 -1
  260. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  261. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  262. package/dist-versioned/components/tag/tag.d.ts +1 -1
  263. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  264. package/dist-versioned/components/theme-listener/theme-listener.d.ts +1 -1
  265. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  266. package/dist-versioned/components/video/video.d.ts +1 -1
  267. package/dist-versioned/custom-elements.json +251 -244
  268. package/dist-versioned/internal/form.js +3 -3
  269. package/dist-versioned/solid-components.css +2 -2
  270. package/dist-versioned/solid-components.js +1 -1
  271. package/dist-versioned/vscode.html-custom-data.json +94 -94
  272. package/dist-versioned/web-types.json +158 -157
  273. package/package.json +3 -3
  274. package/cdn/chunks/chunk.DC6UQXYF.js +0 -2
  275. package/cdn-versioned/chunks/chunk.DC6UQXYF.js +0 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@solid-design-system/components",
3
3
  "description": "Solid Design System: Components",
4
- "version": "6.4.0",
4
+ "version": "6.4.2",
5
5
  "homepage": "https://solid-design-system.fe.union-investment.de/docs/",
6
6
  "author": "Union Investment",
7
7
  "license": "MIT",
@@ -118,8 +118,8 @@
118
118
  "readme": "README.md",
119
119
  "meta": {
120
120
  "bundleSizeInKb": {
121
- "uncompressed": 589,
122
- "gzip": 133
121
+ "uncompressed": 590,
122
+ "gzip": 134
123
123
  }
124
124
  },
125
125
  "scripts": {
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk.3MADQ6HK.js";import{b as U}from"./chunk.CJ34NUTS.js";import{a as G}from"./chunk.CGQ2BPPZ.js";import{a as K}from"./chunk.IQPMMUES.js";import{a as I}from"./chunk.YFQFOIEM.js";import{a as Y}from"./chunk.NYKJXI3Q.js";import{a as W,b as v,c as E,d as q,h as H}from"./chunk.ALCKOGA7.js";import{b as N,e as V,i as R}from"./chunk.763RLJEK.js";import{e as h}from"./chunk.6EV4YU6C.js";var B={fromAttribute(O){if(!O)return null;let t=O.trim().replace(/[./]/g,"-").match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;let e=`${t[1]}-${t[2]}-${t[3]}`,s=new Date(+t[1],+t[2]-1,+t[3]);return s.getFullYear()!==+t[1]||s.getMonth()!==+t[2]-1||s.getDate()!==+t[3]?null:e},toAttribute(O){return O!=null?O:""}},_={fromAttribute(O){if(!O)return[];let A=[],t=O.trim();if(t.startsWith("["))try{let s=JSON.parse(t);Array.isArray(s)&&(A=s.map(String))}catch(s){return[]}else A=t.split(/[\s,]+/).map(s=>s.trim()).filter(Boolean);let e=[];for(let s of A){let n=s.replace(/[-/]/g,".").split(".");if(n.length!==3)continue;let[l,u,f]=n.map(Number);if(!l||!u||!f)continue;let m=new Date(l,u-1,f);if(m.getFullYear()!==l||m.getMonth()!==u-1||m.getDate()!==f)continue;let d=`${l}-${String(u).padStart(2,"0")}-${String(f).padStart(2,"0")}`;e.push(d)}return e},toAttribute(O){return O?O.join(","):""}},o=class extends H{constructor(){super();this.localize=new K(this);this.hasSlotController=new G(this,"label","help-text","tooltip");this.formControlController=new U(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.floatingLabel=!1;this.disabled=!1;this.required=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=a.startOfDayLocal(new Date);this.disabledDatesSet=new Set;this.previewEnd=null;this.statusNavText="";this.statusSelectText="";this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.currentPlacement=this.placement;this.inputValue="";this.tabbingIntoGrid=!1;this.statusBumpCounter=0;this.onFocusOut=t=>{let e=t.relatedTarget;e&&this.contains(e)||(this.open&&(this.hide(),this.emit("sd-datepicker-close")),this.hasFocus=!1)};this.onFocusIn=t=>{if(this.disabled||this.visuallyDisabled)return;t.composedPath().some(i=>{var n,l;return i instanceof HTMLElement&&(((n=i.classList)==null?void 0:n.contains("nav"))||((l=i.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var l,u,f,m,d;if(this.disabled||this.visuallyDisabled){(l=t.preventDefault)==null||l.call(t),(u=t.stopPropagation)==null||u.call(t);return}let e=t.target,s=e.value,i=(f=e.selectionStart)!=null?f:s.length,n=(m=t.inputType)==null?void 0:m.startsWith("delete");if(this.range){let c=s.replace(/\D/g,""),r=c.slice(0,8),p=c.slice(8,16),b=this.buildDmyFromDigits(r),S=this.buildDmyFromDigits(p),M;r.length===0?M="":r.length<8?M=b:p.length>0?M=`${b} - ${S}`:M=n?b:`${b} -`;let L=this.countDigitsBeforeCaret(s,i),y;if(L<=8){let g=this.digitIndexToDmyCaretPos(Math.min(L,8));y=Math.min(g,b.length)}else{let g=r.length<8?b.length:b.length+3,D=Math.min(L-8,8),x=this.digitIndexToDmyCaretPos(D);y=g+Math.min(x,S.length)}this.inputValue=M;let $=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(b)){let g=this.dmyToIso(b),D=g?a.parseLocalISO(g):null;!!D&&!this.isDisabled(D)&&this.inMinMax(D)&&this.rangeStart!==g&&(this.rangeStart=g,this.previewEnd=null,this.viewMonth=new Date(D.getFullYear(),D.getMonth(),1),this.focusedDate=a.startOfDayLocal(D),$=!0)}else this.rangeStart&&(this.rangeStart=null,$=!0),this.rangeEnd&&(this.rangeEnd=null,$=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(S)&&this.rangeStart){let g=a.parseLocalISO(this.rangeStart),D=this.dmyToIso(S),x=D?a.parseLocalISO(D):null;if(!!x&&!this.isDisabled(x)&&this.inMinMax(x)){let[k,C]=a.compareDates(g,x)<=0?[g,x]:[x,g],z=a.isSameDay(k,C);if((this.allowSameDayRange||!z)&&!this.wouldRangeContainDisabled(k,C)){let F=a.toLocalISODate(a.startOfDayLocal(k)),P=a.toLocalISODate(a.startOfDayLocal(C));(this.rangeStart!==F||this.rangeEnd!==P)&&(this.rangeStart=F,this.rangeEnd=P,this.viewMonth=new Date(C.getFullYear(),C.getMonth(),1),this.focusedDate=a.startOfDayLocal(C),$=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,$=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),$&&(this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})),Promise.resolve().then(()=>{requestAnimationFrame(()=>{var D;let g=(D=this.input)!=null?D:e;g&&(g.value=this.inputValue,g.setSelectionRange(y,y))})})}else{let c=e,r=c.value,p=(d=c.selectionStart)!=null?d:r.length,b=r.replace(/\D/g,"").slice(0,8),S=b.slice(0,2),M=b.slice(2,4),L=b.slice(4,8),y="";S.length>0&&(y+=S,S.length===2&&(y+=".")),M.length>0&&S.length===2&&(y+=M,M.length===2&&(y+=".")),L.length>0&&S.length===2&&M.length===2&&(y+=L),y=y.replace(/\.\.+/g,".");let $=this.inputValue||"";this.inputValue=y;let g=p,D=w=>{let F=[];for(let P=0;P<w.length;P++)w[P]==="."&&F.push(P);return F},x=D($),T=D(y),k=x.filter(w=>w<p).length,z=T.filter(w=>w<p).length-k;if(z>0?g+=z:!x.includes(p)&&T.includes(p)&&(g+=1),g=Math.min(Math.max(0,g),y.length),requestAnimationFrame(()=>{var F;let w=(F=this.input)!=null?F:c;w&&(w.value=this.inputValue,w.setSelectionRange(g,g))}),/^\d{2}\.\d{2}\.\d{4}$/.test(y)){let w=this.parseInputText(y);this.applyParsedInput(w)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let c=this.rangeStart?a.parseLocalISO(this.rangeStart):null,r=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;c&&!r?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(c)}`):c&&r&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(c)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(r)}`)}else if(this.value){let c=a.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(c)}`)}};this.handleInputBlur=()=>{if(this.disabled||this.visuallyDisabled){this.handleBlur();return}let t=this.parseInputText(this.inputValue);t.valid?this.applyParsedInput(t):(this.inputValue=this.formatInputValue(),this.showInvalidStyle=!!this.inputValue&&!this.value&&!this.rangeStart),this.handleBlur()};this.handleCurrentPlacement=t=>{this.currentPlacement=t.detail.placement};this.handleHeaderKeyDown=(t,e,s,i)=>{if(t.key==="Tab"&&!t.shiftKey){i&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(s):this.setYear(s))};this.onKeyDown=t=>{if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let e=t.key,s=!0,i=new Date(this.focusedDate);switch(e){case"ArrowLeft":i.setDate(i.getDate()-1);break;case"ArrowRight":i.setDate(i.getDate()+1);break;case"ArrowUp":i.setDate(i.getDate()-7);break;case"ArrowDown":i.setDate(i.getDate()+7);break;case"Escape":{this.previewEnd?(this.previewEnd=null,this.setNavStatus(this.localize.term("selectionCleared"))):this.range&&this.rangeStart&&!this.rangeEnd&&(this.rangeStart=null,this.setNavStatus(this.localize.term("selectionCleared")),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})),this.open&&(this.hide(),this.emit("sd-datepicker-close"));break}case"Enter":case" ":this.selectDate(this.focusedDate);break;default:s=!1}if(s){if(t.preventDefault(),i.getMonth()!==this.viewMonth.getMonth()||i.getFullYear()!==this.viewMonth.getFullYear()){this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1);let f=this.formatMonthYear(this.viewMonth);this.setNavStatus(f)}let l=a.startOfDayLocal(i);(!this.focusedDate||l.getTime()!==this.focusedDate.getTime())&&(this.focusedDate=l);let u=l.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(u),this.requestUpdate(),requestAnimationFrame(()=>{let f=this.shadowRoot,m=f==null?void 0:f.querySelector("button.day.focused");m==null||m.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?a.parseLocalISO(this.value):null,e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,s=this.range&&e?e:t!=null?t:a.startOfDayLocal(new Date);this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.clampDateToMonth(s,this.viewMonth),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?a.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=a.startOfDayLocal(t)),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var s;let e=this.input;if(e){e.value=(s=this.inputValue)!=null?s:"";let i=e.value.length;e.setSelectionRange(i,i)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?a.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null,s=t!=null?t:e;s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.startOfDayLocal(s)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var n;let i=this.input;if(i){i.value=(n=this.inputValue)!=null?n:"";let l=i.value.length;i.setSelectionRange(l,l)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return a.parseLocalISO(t)}inMinMax(t){let e=this.min===null?null:this.parseISO(String(this.min)),s=this.max===null?null:this.parseISO(String(this.max));return!(e&&t<e||s&&t>s)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),n=`${e}-${s}-${i}`;return this.disabledDatesSet.has(n)}isWeekend(t){let e=t.getDay();return e===0||e===6}isDisabled(t){var e;return!!(!this.inMinMax(t)||this.disabledWeekends&&this.isWeekend(t)||this.isInDisabledDates(t)||(e=this.isDateDisabled)!=null&&e.call(this,t))}setNavStatus(t){this.statusNavText=t}announceSelect(t,e=40){setTimeout(()=>{this.statusBumpCounter++;let s="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+s},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),s=this.ordinal(e),i=t.toLocaleDateString("en-US",{month:"long"}),n=t.getFullYear();return`${s} of ${i} ${n}`}ordinal(t){let e=["th","st","nd","rd"],s=t%100,i=e[(s-20)%10]||e[s]||e[0];return t+i}syncDisabledDatesSet(){let t=[];if(Array.isArray(this.disabledDates))t=this.disabledDates;else if(typeof this.disabledDates=="string"){let e=this.disabledDates.trim();if(e.startsWith("["))try{let s=JSON.parse(e);Array.isArray(s)&&(t=s)}catch(s){t=[]}else e.length>0&&(t=e.split(",").map(s=>s.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let s=a.compareDates(t,e)<=0?a.startOfDayLocal(t):a.startOfDayLocal(e),i=a.compareDates(t,e)<=0?a.startOfDayLocal(e):a.startOfDayLocal(t),n=new Date(s);for(;a.compareDates(n,i)<=0;){if(this.isDisabled(n))return!0;n.setDate(n.getDate()+1)}return!1}termStartSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"startDateSelected")}termEndSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"endDateSelected")}isoToDmy(t){if(!t)return"";let e=a.parseLocalISO(t);if(e||(e=a.parseLocalISO(t.replace(/-/g,"."))),!e)return"";let s=String(e.getDate()).padStart(2,"0"),i=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getFullYear());return`${s}.${i}.${n}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let s=Number(e[1]),i=Number(e[2]),n=Number(e[3]),l=new Date(n,i-1,s);if(l.getFullYear()!==n||l.getMonth()!==i-1||l.getDate()!==s)return null;let u=a.startOfDayLocal(l);return a.toLocalISODate(u)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),i=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let n=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return n&&l?`${n} ${i} ${l}`:n&&!l?`${n} ${i}`:""}parseInputText(t){var i,n;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let u=l[0];if(!u)return{start:null,end:null,valid:!0};let f=this.dmyToIso(u);return f?{start:f,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let u=(i=l[0])!=null?i:"",f=(n=l[1])!=null?n:"",m=u?this.dmyToIso(u):null,d=f?this.dmyToIso(f):null;return u&&!m?{start:null,end:null,valid:!1}:f&&!d?{start:null,end:null,valid:!1}:{start:m,end:d,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let s=this.dmyToIso(e);return s?{single:s,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var u,f,m,d;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=c=>{if(!c)return!0;let r=a.parseLocalISO(c);return!(!this.inMinMax(r)||this.isDisabled(r))},s=!1;if(this.range){let c=(u=t.start)!=null?u:null,r=(f=t.end)!=null?f:null;if(!e(c)||r&&!e(r))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let p=c?a.parseLocalISO(c):null,b=r?a.parseLocalISO(r):null;if(p&&b){if(a.compareDates(p,b)>0){let L=p;p=b,b=L}if(!this.allowSameDayRange&&a.isSameDay(p,b))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(p,b))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let S=p?a.toLocalISODate(a.startOfDayLocal(p)):null,M=b?a.toLocalISODate(a.startOfDayLocal(b)):null;if(this.rangeStart!==S||this.rangeEnd!==M){this.rangeStart=S,this.rangeEnd=M,this.previewEnd=null,s=!0;let L=(m=p!=null?p:b)!=null?m:this.today;this.viewMonth=new Date(L.getFullYear(),L.getMonth(),1),this.focusedDate=a.startOfDayLocal(L),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let i=(d=t.single)!=null?d:null;if(!e(i))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let n=i?a.parseLocalISO(i):null,l=n?a.toLocalISODate(a.startOfDayLocal(n)):null;return this.value!==l&&(this.value=l,s=!0,n&&(this.viewMonth=new Date(n.getFullYear(),n.getMonth(),1),this.focusedDate=a.startOfDayLocal(n)),this.emit("sd-select",{detail:{value:this.value,date:n!=null?n:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),s}buildDmyFromDigits(t){let e=t.slice(0,8),s=e.slice(0,2),i=e.slice(2,4),n=e.slice(4,8),l=s;return i.length&&(l+="."+i),n.length&&(l+="."+n),l}digitIndexToDmyCaretPos(t){return t<=2?t:t<=4?3+(t-2):6+(t-4)}countDigitsBeforeCaret(t,e){return t.slice(0,e).replace(/\D/g,"").length}handleOutsideClick(t){var s,i;((i=(s=t.composedPath)==null?void 0:s.call(t))!=null?i:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.emit("sd-focus")}setMonth(t){let e=new Date(this.viewMonth.getFullYear(),this.viewMonth.getMonth()+t,1);if(e.getMonth()===this.viewMonth.getMonth()&&e.getFullYear()===this.viewMonth.getFullYear())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-change",{detail:{month:this.viewMonth}})}setYear(t){let e=new Date(this.viewMonth.getFullYear()+t,this.viewMonth.getMonth(),1);if(e.getFullYear()===this.viewMonth.getFullYear()&&e.getMonth()===this.viewMonth.getMonth())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-year",{detail:{month:this.viewMonth}})}focusInitialGridDay(){let t=null;if(!this.range&&this.value){let s=a.parseLocalISO(this.value);s&&(t=a.startOfDayLocal(s))}if(this.range){let s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;i?t=a.startOfDayLocal(i):s&&(t=a.startOfDayLocal(s))}if(!(s=>s?s.getFullYear()===this.viewMonth.getFullYear()&&s.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(s):!1)(t)){let{weeks:s}=this.getMonthMatrix(this.viewMonth),i=s.flat().find(n=>n.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(n,this.today)&&!this.isDisabled(n));if(i)t=a.startOfDayLocal(i);else{let n=s.flat().find(l=>l.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(l));t=n?a.startOfDayLocal(n):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let s=this.shadowRoot,i=(s==null?void 0:s.querySelector("button.day.selected"))||(s==null?void 0:s.querySelector("button.day.focused"))||(s==null?void 0:s.querySelector('button.day[tabindex="0"]'))||(s==null?void 0:s.querySelector("button.day"));i==null||i.focus({preventScroll:!0})})}selectSingleDate(t){if(this.isDisabled(t))return;let e=a.startOfDayLocal(t),s=a.toLocalISODate(e);if(this.value===s)return;this.value=s;let i=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(i),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let n=this.input;n&&(n.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=n.value.length;n.setSelectionRange(u,u)})}))})}selectRangeDate(t){let e=a.startOfDayLocal(t),s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(!s&&!i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))});return}if(s&&!i){if(this.isDisabled(e))return;if(a.isSameDay(s,e)){if(!this.allowSameDayRange){this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let c=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${c}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var p;let r=this.input;r&&(r.value=(p=this.inputValue)!=null?p:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let b=r.value.length;r.setSelectionRange(b,b)})}))});return}this.rangeStart=a.toLocalISODate(e),this.rangeEnd=a.toLocalISODate(e),this.previewEnd=null;let d=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${d}`,40),this.announceSelect(`${this.termEndSelected()}: ${d}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var r;let c=this.input;c&&(c.value=(r=this.inputValue)!=null?r:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=c.value.length;c.setSelectionRange(p,p)})}))});return}let n=a.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(n,e))return;let[l,u]=a.compareDates(n,e)<=0?[n,e]:[e,n];this.rangeStart=a.toLocalISODate(l),this.rangeEnd=a.toLocalISODate(u),this.previewEnd=null;let f=this.formatSelectionLabel(l),m=this.formatSelectionLabel(u);this.announceSelect(`${this.termStartSelected()}: ${f}`,40),this.announceSelect(`${this.termEndSelected()}: ${m}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var c;let d=this.input;d&&(d.value=(c=this.inputValue)!=null?c:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let r=d.value.length;d.setSelectionRange(r,r)})}))});return}if(s&&i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))})}}selectDate(t){this.range?this.selectRangeDate(t):this.selectSingleDate(t)}getMonthMatrix(t){var m;let e=(m=this.firstDayOfWeek)!=null?m:1,s=new Date(t.getFullYear(),t.getMonth(),1),i=new Date(s),n=(s.getDay()-e+7)%7;i.setDate(s.getDate()-n);let l=[],u=i;for(let d=0;d<6;d++){let c=[];for(let r=0;r<7;r++)c.push(new Date(u)),u.setDate(u.getDate()+1);l.push(c)}let f=d=>d.every(c=>c.getMonth()!==t.getMonth());for(;l.length>0&&f(l[l.length-1]);)l.pop();return{weeks:l}}formatMonthYear(t){try{return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}catch(e){return`${t.toLocaleString(void 0,{month:"long"})} ${t.getFullYear()}`}}weekdayLabels(){var i;let t=(i=this.firstDayOfWeek)!=null?i:1,e=new Date(2021,7,1),s=[];for(let n=0;n<7;n++){let l=new Date(e);l.setDate(e.getDate()+(t+n)%7);try{s.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(u){s.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return s}getTabTargetDayForCurrentView(t){let e=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(i,this.today)&&!this.isDisabled(i));if(e)return a.startOfDayLocal(e);let s=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(i));return s?a.startOfDayLocal(s):null}onDayMouseEnter(t){if(!this.range)return;let e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,s=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(e&&!s){let i=a.startOfDayLocal(t);this.previewEnd=this.isDisabled(i)?null:i,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){let{weeks:t}=this.getMonthMatrix(this.viewMonth),e=this.formatMonthYear(this.viewMonth),s=this.weekdayLabels(),i=this.value?this.parseISO(this.value):null,n=this.rangeStart?this.parseISO(this.rangeStart):null,l=this.rangeEnd?this.parseISO(this.rangeEnd):null,u=this.previewEnd,f=d=>!this.range||!n||l||!u?!1:a.isBetweenInclusive(d,n,u),m=this.getTabTargetDayForCurrentView(t);return V`<div part="datepicker" class="w-[284px] z-50 absolute top-full bg-white border-2 border-t-0 border-primary py-3 px-4 ${this.open?"block rounded-bl-default rounded-br-default":"hidden"} ${this.alignment==="left"?"left-0":"right-0"}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-icon></button> <button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base !text-primary" part="month-label" aria-live="polite">${e}</div><div class="flex items-center"><button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-icon></button> <button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-icon></button></div></div><sd-divider></sd-divider><div class="sr-only" aria-live="polite" aria-atomic="true">${this.statusNavText}</div><div class="sr-only" aria-live="assertive" aria-atomic="true">${this.statusSelectText}</div><div class="sr-only" id="keyboard-hint">${this.localize.term("datePickerInfo")}</div><div class="grid mt-2" role="grid" aria-describedby="keyboard-hint" aria-label="${e}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${s.map((d,c)=>V`<div role="columnheader" aria-colindex="${c+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${d}" title="${d}" id="${"col-"+(c+1)}">${d}</div>`)}</div>${t.map((d,c)=>V`<div class="grid-row grid grid-cols-7 ${c===0?"mt-2":""}" role="row" aria-rowindex="${c+2}">${d.map((r,p)=>{let b=r.getMonth()===this.viewMonth.getMonth(),S=this.isDisabled(r)||!this.inMinMax(r),M=a.isSameDay(r,this.focusedDate),L=a.isSameDay(r,this.today),y=!this.range&&i?a.isSameDay(r,i):!1,$=this.range&&n?a.isSameDay(r,n):!1,g=this.range&&l?a.isSameDay(r,l):!1,D=this.range&&n&&l?a.isBetweenInclusive(r,n,l):!1,x=f(r)&&!S,T=-1,k=m&&a.isSameDay(r,m);(this.tabbingIntoGrid&&k||!this.tabbingIntoGrid&&M)&&(T=0);let C=this.isWeekend(r),z=r.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),w=$?this.localize.term("startDateSelected"):g?this.localize.term("endDateSelected"):void 0;return V`<button type="button" part="day" class="${I("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded-md w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",$||g?"hover:bg-primary-500":"hover:bg-primary-100 hover:text-primary-500",b?this.isInDisabledDates(r)||!this.inMinMax(r)?"out-month text-neutral-500":this.disabledWeekends&&C?"weekend-day text-neutral-500":"in-month text-primary":this.disabledWeekends&&C?"out-month weekend-day text-neutral-500":C?"out-month weekend-day text-neutral-700":"out-month text-neutral-700",y?"selected border-primary bg-primary text-white hover:bg-primary-500 hover:text-white":"",$?"bg-primary text-white rounded-l-md rounded-r-none":"",g?"bg-primary text-white range-end rounded-r-md rounded-l-none":"",D&&!$&&!g?"in-range selected bg-primary-100 text-primary-500 rounded-none hover:bg-primary-500 hover:text-white":"",!D&&x&&!$&&!g?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",L&&!y&&!$&&!g&&M?"today border-[1px] border-primary font-bold":"",S?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",M&&!L?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${p+1}" aria-labelledby="${"col-"+(p+1)}" .tabIndex="${T}" ?disabled="${S||this.disabled}" aria-disabled="${S||this.visuallyDisabled||this.disabled?"true":"false"}" aria-selected="${y||D||$||g?"true":"false"}" aria-current="${L?"date":R}" aria-label="${z}" aria-roledescription="${w!=null?w:R}" @focus="${()=>this.focusedDate=a.startOfDayLocal(r)}" @mouseenter="${()=>this.onDayMouseEnter(r)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=a.startOfDayLocal(r),this.selectDate(r)}}">${r.getDate()}</button>`})}</div>`)}</div></div>`}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,s=this.helpText?!0:!!t.helpText,i=!!t.tooltip,n=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,l=this.floatingLabel&&e&&(this.hasFocus||this.open||n)&&!this.disabled&&!this.visuallyDisabled,u=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",f={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],d=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",c={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[d],r=this.size==="sm"?"text-sm":"text-base";return V`<div part="form-control" class="${I("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e&&!this.floatingLabel||i?V`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${I(e?"inline-block form-control-color-text":"hidden",r)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?V`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${I("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${I("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",c,this.open&&this.alignment==="left"?"rounded-bl-none":"",this.open&&this.alignment==="right"?"rounded-br-none":"")}">${e&&this.floatingLabel?V`<label id="label" part="form-control-floating-label" class="${I("absolute left-4 z-20 pointer-events-none transition-all duration-200",l?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 text-base",l&&"mt-1")}" for="input"><span class="${I("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",l&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}</div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${I("inline-flex relative w-full")}" sync="width" auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${I("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",d==="disabled"||d==="visuallyDisabled"?"text-neutral-500":"text-black")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${s?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${I("min-w-0 flex-grow focus:outline-none bg-transparent hover:cursor-pointer form-control-color-text",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",{sm:"h-8",md:"h-10",lg:"h-12"}[this.size],r,this.floatingLabel&&"mt-4")}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel||l?this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder"):""}" ?disabled="${this.disabled}" ?required="${this.required}" ?readonly="${this.readonly||this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${this.showInvalidStyle?V`<sd-icon part="invalid-icon" class="${I("text-error",f,m)}" library="_internal" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?V`<sd-icon class="${I("text-success flex-shrink-0",f,m)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-icon>`:""}<sd-icon class="${I(u,f,m,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-icon>${this.renderCalendar()}</div></sd-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${I("text-sm text-neutral-700 mt-1",s?"block":"hidden")}" aria-hidden="${!s}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};o.styles=[...H.styles,N`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{position:relative;display:inline-block;width:100%;--tw-outline-style:none;outline-style:none}:host([required]) #label::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}`],h([v({type:String,reflect:!0})],o.prototype,"locale",2),h([v({type:String,converter:B,reflect:!0})],o.prototype,"value",2),h([v({type:Boolean,reflect:!0})],o.prototype,"range",2),h([v({attribute:"range-start",converter:B,reflect:!0})],o.prototype,"rangeStart",2),h([v({attribute:"range-end",converter:B,reflect:!0})],o.prototype,"rangeEnd",2),h([v({type:Boolean})],o.prototype,"allowSameDayRange",2),h([v({type:String,converter:B,reflect:!0})],o.prototype,"min",2),h([v({type:String,converter:B,reflect:!0})],o.prototype,"max",2),h([v({type:Number})],o.prototype,"firstDayOfWeek",2),h([v({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],o.prototype,"disabledWeekends",2),h([v({attribute:"disabled-dates",converter:_})],o.prototype,"disabledDates",2),h([v({attribute:!1})],o.prototype,"isDateDisabled",2),h([v({type:String,reflect:!0})],o.prototype,"size",2),h([v({type:String})],o.prototype,"alignment",2),h([v({type:String,reflect:!0})],o.prototype,"label",2),h([v({type:String,attribute:"help-text",reflect:!0})],o.prototype,"helpText",2),h([v({attribute:"floating-label",type:Boolean,reflect:!0})],o.prototype,"floatingLabel",2),h([v({type:Boolean,reflect:!0})],o.prototype,"disabled",2),h([v({type:Boolean,reflect:!0})],o.prototype,"required",2),h([v({type:Boolean,attribute:"visually-disabled"})],o.prototype,"visuallyDisabled",2),h([v({type:Boolean,reflect:!0,attribute:"style-on-valid"})],o.prototype,"styleOnValid",2),h([v({type:Boolean,reflect:!0})],o.prototype,"readonly",2),h([v({type:String,reflect:!0})],o.prototype,"placement",2),h([v({type:String,reflect:!0})],o.prototype,"placeholder",2),h([v({reflect:!0})],o.prototype,"name",2),h([v({type:String,reflect:!0})],o.prototype,"form",2),h([E()],o.prototype,"open",2),h([E()],o.prototype,"viewMonth",2),h([E()],o.prototype,"focusedDate",2),h([E()],o.prototype,"today",2),h([E()],o.prototype,"disabledDatesSet",2),h([E()],o.prototype,"previewEnd",2),h([E()],o.prototype,"statusNavText",2),h([E()],o.prototype,"statusSelectText",2),h([E()],o.prototype,"hasFocus",2),h([E()],o.prototype,"showValidStyle",2),h([E()],o.prototype,"showInvalidStyle",2),h([E()],o.prototype,"currentPlacement",2),h([E()],o.prototype,"inputValue",2),h([q("#invalid-message")],o.prototype,"invalidMessage",2),h([q("#input")],o.prototype,"input",2),h([Y("locale")],o.prototype,"handleLocaleChange",1),h([Y("disabledDates")],o.prototype,"handleDisabledDatesChange",1),h([Y("value")],o.prototype,"handleValueChange",1),h([Y("rangeStart"),Y("rangeEnd")],o.prototype,"handleRangeChange",1),h([Y(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],o.prototype,"handleDisabledChange",1),o=h([W("sd-datepicker")],o);export{o as a};
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk.3MADQ6HK.js";import{b as U}from"./chunk.CJ34NUTS.js";import{a as G}from"./chunk.CGQ2BPPZ.js";import{a as K}from"./chunk.IQPMMUES.js";import{a as I}from"./chunk.YFQFOIEM.js";import{a as Y}from"./chunk.NYKJXI3Q.js";import{a as W,b as v,c as E,d as q,h as H}from"./chunk.ALCKOGA7.js";import{b as N,e as V,i as R}from"./chunk.763RLJEK.js";import{e as h}from"./chunk.6EV4YU6C.js";var B={fromAttribute(O){if(!O)return null;let t=O.trim().replace(/[./]/g,"-").match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;let e=`${t[1]}-${t[2]}-${t[3]}`,s=new Date(+t[1],+t[2]-1,+t[3]);return s.getFullYear()!==+t[1]||s.getMonth()!==+t[2]-1||s.getDate()!==+t[3]?null:e},toAttribute(O){return O!=null?O:""}},_={fromAttribute(O){if(!O)return[];let A=[],t=O.trim();if(t.startsWith("["))try{let s=JSON.parse(t);Array.isArray(s)&&(A=s.map(String))}catch(s){return[]}else A=t.split(/[\s,]+/).map(s=>s.trim()).filter(Boolean);let e=[];for(let s of A){let n=s.replace(/[-/]/g,".").split(".");if(n.length!==3)continue;let[l,u,f]=n.map(Number);if(!l||!u||!f)continue;let m=new Date(l,u-1,f);if(m.getFullYear()!==l||m.getMonth()!==u-1||m.getDate()!==f)continue;let d=`${l}-${String(u).padStart(2,"0")}-${String(f).padStart(2,"0")}`;e.push(d)}return e},toAttribute(O){return O?O.join(","):""}},o=class extends H{constructor(){super();this.localize=new K(this);this.hasSlotController=new G(this,"label","help-text","tooltip");this.formControlController=new U(this,{assumeInteractionOn:["sd-blur","sd-6-4-0-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.floatingLabel=!1;this.disabled=!1;this.required=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=a.startOfDayLocal(new Date);this.disabledDatesSet=new Set;this.previewEnd=null;this.statusNavText="";this.statusSelectText="";this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.currentPlacement=this.placement;this.inputValue="";this.tabbingIntoGrid=!1;this.statusBumpCounter=0;this.onFocusOut=t=>{let e=t.relatedTarget;e&&this.contains(e)||(this.open&&(this.hide(),this.emit("sd-datepicker-close")),this.hasFocus=!1)};this.onFocusIn=t=>{if(this.disabled||this.visuallyDisabled)return;t.composedPath().some(i=>{var n,l;return i instanceof HTMLElement&&(((n=i.classList)==null?void 0:n.contains("nav"))||((l=i.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var l,u,f,m,d;if(this.disabled||this.visuallyDisabled){(l=t.preventDefault)==null||l.call(t),(u=t.stopPropagation)==null||u.call(t);return}let e=t.target,s=e.value,i=(f=e.selectionStart)!=null?f:s.length,n=(m=t.inputType)==null?void 0:m.startsWith("delete");if(this.range){let c=s.replace(/\D/g,""),r=c.slice(0,8),p=c.slice(8,16),b=this.buildDmyFromDigits(r),S=this.buildDmyFromDigits(p),M;r.length===0?M="":r.length<8?M=b:p.length>0?M=`${b} - ${S}`:M=n?b:`${b} -`;let L=this.countDigitsBeforeCaret(s,i),y;if(L<=8){let g=this.digitIndexToDmyCaretPos(Math.min(L,8));y=Math.min(g,b.length)}else{let g=r.length<8?b.length:b.length+3,D=Math.min(L-8,8),x=this.digitIndexToDmyCaretPos(D);y=g+Math.min(x,S.length)}this.inputValue=M;let $=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(b)){let g=this.dmyToIso(b),D=g?a.parseLocalISO(g):null;!!D&&!this.isDisabled(D)&&this.inMinMax(D)&&this.rangeStart!==g&&(this.rangeStart=g,this.previewEnd=null,this.viewMonth=new Date(D.getFullYear(),D.getMonth(),1),this.focusedDate=a.startOfDayLocal(D),$=!0)}else this.rangeStart&&(this.rangeStart=null,$=!0),this.rangeEnd&&(this.rangeEnd=null,$=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(S)&&this.rangeStart){let g=a.parseLocalISO(this.rangeStart),D=this.dmyToIso(S),x=D?a.parseLocalISO(D):null;if(!!x&&!this.isDisabled(x)&&this.inMinMax(x)){let[k,C]=a.compareDates(g,x)<=0?[g,x]:[x,g],z=a.isSameDay(k,C);if((this.allowSameDayRange||!z)&&!this.wouldRangeContainDisabled(k,C)){let F=a.toLocalISODate(a.startOfDayLocal(k)),P=a.toLocalISODate(a.startOfDayLocal(C));(this.rangeStart!==F||this.rangeEnd!==P)&&(this.rangeStart=F,this.rangeEnd=P,this.viewMonth=new Date(C.getFullYear(),C.getMonth(),1),this.focusedDate=a.startOfDayLocal(C),$=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,$=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),$&&(this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})),Promise.resolve().then(()=>{requestAnimationFrame(()=>{var D;let g=(D=this.input)!=null?D:e;g&&(g.value=this.inputValue,g.setSelectionRange(y,y))})})}else{let c=e,r=c.value,p=(d=c.selectionStart)!=null?d:r.length,b=r.replace(/\D/g,"").slice(0,8),S=b.slice(0,2),M=b.slice(2,4),L=b.slice(4,8),y="";S.length>0&&(y+=S,S.length===2&&(y+=".")),M.length>0&&S.length===2&&(y+=M,M.length===2&&(y+=".")),L.length>0&&S.length===2&&M.length===2&&(y+=L),y=y.replace(/\.\.+/g,".");let $=this.inputValue||"";this.inputValue=y;let g=p,D=w=>{let F=[];for(let P=0;P<w.length;P++)w[P]==="."&&F.push(P);return F},x=D($),T=D(y),k=x.filter(w=>w<p).length,z=T.filter(w=>w<p).length-k;if(z>0?g+=z:!x.includes(p)&&T.includes(p)&&(g+=1),g=Math.min(Math.max(0,g),y.length),requestAnimationFrame(()=>{var F;let w=(F=this.input)!=null?F:c;w&&(w.value=this.inputValue,w.setSelectionRange(g,g))}),/^\d{2}\.\d{2}\.\d{4}$/.test(y)){let w=this.parseInputText(y);this.applyParsedInput(w)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let c=this.rangeStart?a.parseLocalISO(this.rangeStart):null,r=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;c&&!r?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(c)}`):c&&r&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(c)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(r)}`)}else if(this.value){let c=a.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(c)}`)}};this.handleInputBlur=()=>{if(this.disabled||this.visuallyDisabled){this.handleBlur();return}let t=this.parseInputText(this.inputValue);t.valid?this.applyParsedInput(t):(this.inputValue=this.formatInputValue(),this.showInvalidStyle=!!this.inputValue&&!this.value&&!this.rangeStart),this.handleBlur()};this.handleCurrentPlacement=t=>{this.currentPlacement=t.detail.placement};this.handleHeaderKeyDown=(t,e,s,i)=>{if(t.key==="Tab"&&!t.shiftKey){i&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(s):this.setYear(s))};this.onKeyDown=t=>{if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let e=t.key,s=!0,i=new Date(this.focusedDate);switch(e){case"ArrowLeft":i.setDate(i.getDate()-1);break;case"ArrowRight":i.setDate(i.getDate()+1);break;case"ArrowUp":i.setDate(i.getDate()-7);break;case"ArrowDown":i.setDate(i.getDate()+7);break;case"Escape":{this.previewEnd?(this.previewEnd=null,this.setNavStatus(this.localize.term("selectionCleared"))):this.range&&this.rangeStart&&!this.rangeEnd&&(this.rangeStart=null,this.setNavStatus(this.localize.term("selectionCleared")),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})),this.open&&(this.hide(),this.emit("sd-datepicker-close"));break}case"Enter":case" ":this.selectDate(this.focusedDate);break;default:s=!1}if(s){if(t.preventDefault(),i.getMonth()!==this.viewMonth.getMonth()||i.getFullYear()!==this.viewMonth.getFullYear()){this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1);let f=this.formatMonthYear(this.viewMonth);this.setNavStatus(f)}let l=a.startOfDayLocal(i);(!this.focusedDate||l.getTime()!==this.focusedDate.getTime())&&(this.focusedDate=l);let u=l.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(u),this.requestUpdate(),requestAnimationFrame(()=>{let f=this.shadowRoot,m=f==null?void 0:f.querySelector("button.day.focused");m==null||m.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?a.parseLocalISO(this.value):null,e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,s=this.range&&e?e:t!=null?t:a.startOfDayLocal(new Date);this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.clampDateToMonth(s,this.viewMonth),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?a.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=a.startOfDayLocal(t)),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var s;let e=this.input;if(e){e.value=(s=this.inputValue)!=null?s:"";let i=e.value.length;e.setSelectionRange(i,i)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?a.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null,s=t!=null?t:e;s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.startOfDayLocal(s)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var n;let i=this.input;if(i){i.value=(n=this.inputValue)!=null?n:"";let l=i.value.length;i.setSelectionRange(l,l)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return a.parseLocalISO(t)}inMinMax(t){let e=this.min===null?null:this.parseISO(String(this.min)),s=this.max===null?null:this.parseISO(String(this.max));return!(e&&t<e||s&&t>s)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),n=`${e}-${s}-${i}`;return this.disabledDatesSet.has(n)}isWeekend(t){let e=t.getDay();return e===0||e===6}isDisabled(t){var e;return!!(!this.inMinMax(t)||this.disabledWeekends&&this.isWeekend(t)||this.isInDisabledDates(t)||(e=this.isDateDisabled)!=null&&e.call(this,t))}setNavStatus(t){this.statusNavText=t}announceSelect(t,e=40){setTimeout(()=>{this.statusBumpCounter++;let s="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+s},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),s=this.ordinal(e),i=t.toLocaleDateString("en-US",{month:"long"}),n=t.getFullYear();return`${s} of ${i} ${n}`}ordinal(t){let e=["th","st","nd","rd"],s=t%100,i=e[(s-20)%10]||e[s]||e[0];return t+i}syncDisabledDatesSet(){let t=[];if(Array.isArray(this.disabledDates))t=this.disabledDates;else if(typeof this.disabledDates=="string"){let e=this.disabledDates.trim();if(e.startsWith("["))try{let s=JSON.parse(e);Array.isArray(s)&&(t=s)}catch(s){t=[]}else e.length>0&&(t=e.split(",").map(s=>s.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let s=a.compareDates(t,e)<=0?a.startOfDayLocal(t):a.startOfDayLocal(e),i=a.compareDates(t,e)<=0?a.startOfDayLocal(e):a.startOfDayLocal(t),n=new Date(s);for(;a.compareDates(n,i)<=0;){if(this.isDisabled(n))return!0;n.setDate(n.getDate()+1)}return!1}termStartSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"startDateSelected")}termEndSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"endDateSelected")}isoToDmy(t){if(!t)return"";let e=a.parseLocalISO(t);if(e||(e=a.parseLocalISO(t.replace(/-/g,"."))),!e)return"";let s=String(e.getDate()).padStart(2,"0"),i=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getFullYear());return`${s}.${i}.${n}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let s=Number(e[1]),i=Number(e[2]),n=Number(e[3]),l=new Date(n,i-1,s);if(l.getFullYear()!==n||l.getMonth()!==i-1||l.getDate()!==s)return null;let u=a.startOfDayLocal(l);return a.toLocalISODate(u)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),i=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let n=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return n&&l?`${n} ${i} ${l}`:n&&!l?`${n} ${i}`:""}parseInputText(t){var i,n;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let u=l[0];if(!u)return{start:null,end:null,valid:!0};let f=this.dmyToIso(u);return f?{start:f,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let u=(i=l[0])!=null?i:"",f=(n=l[1])!=null?n:"",m=u?this.dmyToIso(u):null,d=f?this.dmyToIso(f):null;return u&&!m?{start:null,end:null,valid:!1}:f&&!d?{start:null,end:null,valid:!1}:{start:m,end:d,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let s=this.dmyToIso(e);return s?{single:s,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var u,f,m,d;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=c=>{if(!c)return!0;let r=a.parseLocalISO(c);return!(!this.inMinMax(r)||this.isDisabled(r))},s=!1;if(this.range){let c=(u=t.start)!=null?u:null,r=(f=t.end)!=null?f:null;if(!e(c)||r&&!e(r))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let p=c?a.parseLocalISO(c):null,b=r?a.parseLocalISO(r):null;if(p&&b){if(a.compareDates(p,b)>0){let L=p;p=b,b=L}if(!this.allowSameDayRange&&a.isSameDay(p,b))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(p,b))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let S=p?a.toLocalISODate(a.startOfDayLocal(p)):null,M=b?a.toLocalISODate(a.startOfDayLocal(b)):null;if(this.rangeStart!==S||this.rangeEnd!==M){this.rangeStart=S,this.rangeEnd=M,this.previewEnd=null,s=!0;let L=(m=p!=null?p:b)!=null?m:this.today;this.viewMonth=new Date(L.getFullYear(),L.getMonth(),1),this.focusedDate=a.startOfDayLocal(L),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let i=(d=t.single)!=null?d:null;if(!e(i))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let n=i?a.parseLocalISO(i):null,l=n?a.toLocalISODate(a.startOfDayLocal(n)):null;return this.value!==l&&(this.value=l,s=!0,n&&(this.viewMonth=new Date(n.getFullYear(),n.getMonth(),1),this.focusedDate=a.startOfDayLocal(n)),this.emit("sd-select",{detail:{value:this.value,date:n!=null?n:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),s}buildDmyFromDigits(t){let e=t.slice(0,8),s=e.slice(0,2),i=e.slice(2,4),n=e.slice(4,8),l=s;return i.length&&(l+="."+i),n.length&&(l+="."+n),l}digitIndexToDmyCaretPos(t){return t<=2?t:t<=4?3+(t-2):6+(t-4)}countDigitsBeforeCaret(t,e){return t.slice(0,e).replace(/\D/g,"").length}handleOutsideClick(t){var s,i;((i=(s=t.composedPath)==null?void 0:s.call(t))!=null?i:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.emit("sd-focus")}setMonth(t){let e=new Date(this.viewMonth.getFullYear(),this.viewMonth.getMonth()+t,1);if(e.getMonth()===this.viewMonth.getMonth()&&e.getFullYear()===this.viewMonth.getFullYear())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-change",{detail:{month:this.viewMonth}})}setYear(t){let e=new Date(this.viewMonth.getFullYear()+t,this.viewMonth.getMonth(),1);if(e.getFullYear()===this.viewMonth.getFullYear()&&e.getMonth()===this.viewMonth.getMonth())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-year",{detail:{month:this.viewMonth}})}focusInitialGridDay(){let t=null;if(!this.range&&this.value){let s=a.parseLocalISO(this.value);s&&(t=a.startOfDayLocal(s))}if(this.range){let s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;i?t=a.startOfDayLocal(i):s&&(t=a.startOfDayLocal(s))}if(!(s=>s?s.getFullYear()===this.viewMonth.getFullYear()&&s.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(s):!1)(t)){let{weeks:s}=this.getMonthMatrix(this.viewMonth),i=s.flat().find(n=>n.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(n,this.today)&&!this.isDisabled(n));if(i)t=a.startOfDayLocal(i);else{let n=s.flat().find(l=>l.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(l));t=n?a.startOfDayLocal(n):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let s=this.shadowRoot,i=(s==null?void 0:s.querySelector("button.day.selected"))||(s==null?void 0:s.querySelector("button.day.focused"))||(s==null?void 0:s.querySelector('button.day[tabindex="0"]'))||(s==null?void 0:s.querySelector("button.day"));i==null||i.focus({preventScroll:!0})})}selectSingleDate(t){if(this.isDisabled(t))return;let e=a.startOfDayLocal(t),s=a.toLocalISODate(e);if(this.value===s)return;this.value=s;let i=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(i),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let n=this.input;n&&(n.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=n.value.length;n.setSelectionRange(u,u)})}))})}selectRangeDate(t){let e=a.startOfDayLocal(t),s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(!s&&!i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))});return}if(s&&!i){if(this.isDisabled(e))return;if(a.isSameDay(s,e)){if(!this.allowSameDayRange){this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let c=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${c}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var p;let r=this.input;r&&(r.value=(p=this.inputValue)!=null?p:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let b=r.value.length;r.setSelectionRange(b,b)})}))});return}this.rangeStart=a.toLocalISODate(e),this.rangeEnd=a.toLocalISODate(e),this.previewEnd=null;let d=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${d}`,40),this.announceSelect(`${this.termEndSelected()}: ${d}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var r;let c=this.input;c&&(c.value=(r=this.inputValue)!=null?r:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=c.value.length;c.setSelectionRange(p,p)})}))});return}let n=a.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(n,e))return;let[l,u]=a.compareDates(n,e)<=0?[n,e]:[e,n];this.rangeStart=a.toLocalISODate(l),this.rangeEnd=a.toLocalISODate(u),this.previewEnd=null;let f=this.formatSelectionLabel(l),m=this.formatSelectionLabel(u);this.announceSelect(`${this.termStartSelected()}: ${f}`,40),this.announceSelect(`${this.termEndSelected()}: ${m}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var c;let d=this.input;d&&(d.value=(c=this.inputValue)!=null?c:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let r=d.value.length;d.setSelectionRange(r,r)})}))});return}if(s&&i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))})}}selectDate(t){this.range?this.selectRangeDate(t):this.selectSingleDate(t)}getMonthMatrix(t){var m;let e=(m=this.firstDayOfWeek)!=null?m:1,s=new Date(t.getFullYear(),t.getMonth(),1),i=new Date(s),n=(s.getDay()-e+7)%7;i.setDate(s.getDate()-n);let l=[],u=i;for(let d=0;d<6;d++){let c=[];for(let r=0;r<7;r++)c.push(new Date(u)),u.setDate(u.getDate()+1);l.push(c)}let f=d=>d.every(c=>c.getMonth()!==t.getMonth());for(;l.length>0&&f(l[l.length-1]);)l.pop();return{weeks:l}}formatMonthYear(t){try{return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}catch(e){return`${t.toLocaleString(void 0,{month:"long"})} ${t.getFullYear()}`}}weekdayLabels(){var i;let t=(i=this.firstDayOfWeek)!=null?i:1,e=new Date(2021,7,1),s=[];for(let n=0;n<7;n++){let l=new Date(e);l.setDate(e.getDate()+(t+n)%7);try{s.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(u){s.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return s}getTabTargetDayForCurrentView(t){let e=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(i,this.today)&&!this.isDisabled(i));if(e)return a.startOfDayLocal(e);let s=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(i));return s?a.startOfDayLocal(s):null}onDayMouseEnter(t){if(!this.range)return;let e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,s=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(e&&!s){let i=a.startOfDayLocal(t);this.previewEnd=this.isDisabled(i)?null:i,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){let{weeks:t}=this.getMonthMatrix(this.viewMonth),e=this.formatMonthYear(this.viewMonth),s=this.weekdayLabels(),i=this.value?this.parseISO(this.value):null,n=this.rangeStart?this.parseISO(this.rangeStart):null,l=this.rangeEnd?this.parseISO(this.rangeEnd):null,u=this.previewEnd,f=d=>!this.range||!n||l||!u?!1:a.isBetweenInclusive(d,n,u),m=this.getTabTargetDayForCurrentView(t);return V`<div part="datepicker" class="w-[284px] z-50 absolute top-full bg-white border-2 border-t-0 border-primary py-3 px-4 ${this.open?"block rounded-bl-default rounded-br-default":"hidden"} ${this.alignment==="left"?"left-0":"right-0"}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-6-4-0-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-6-4-0-icon></button> <button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-6-4-0-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-6-4-0-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base !text-primary" part="month-label" aria-live="polite">${e}</div><div class="flex items-center"><button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-6-4-0-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-6-4-0-icon></button> <button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-6-4-0-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-6-4-0-icon></button></div></div><sd-6-4-0-divider></sd-6-4-0-divider><div class="sr-only" aria-live="polite" aria-atomic="true">${this.statusNavText}</div><div class="sr-only" aria-live="assertive" aria-atomic="true">${this.statusSelectText}</div><div class="sr-only" id="keyboard-hint">${this.localize.term("datePickerInfo")}</div><div class="grid mt-2" role="grid" aria-describedby="keyboard-hint" aria-label="${e}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${s.map((d,c)=>V`<div role="columnheader" aria-colindex="${c+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${d}" title="${d}" id="${"col-"+(c+1)}">${d}</div>`)}</div>${t.map((d,c)=>V`<div class="grid-row grid grid-cols-7 ${c===0?"mt-2":""}" role="row" aria-rowindex="${c+2}">${d.map((r,p)=>{let b=r.getMonth()===this.viewMonth.getMonth(),S=this.isDisabled(r)||!this.inMinMax(r),M=a.isSameDay(r,this.focusedDate),L=a.isSameDay(r,this.today),y=!this.range&&i?a.isSameDay(r,i):!1,$=this.range&&n?a.isSameDay(r,n):!1,g=this.range&&l?a.isSameDay(r,l):!1,D=this.range&&n&&l?a.isBetweenInclusive(r,n,l):!1,x=f(r)&&!S,T=-1,k=m&&a.isSameDay(r,m);(this.tabbingIntoGrid&&k||!this.tabbingIntoGrid&&M)&&(T=0);let C=this.isWeekend(r),z=r.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),w=$?this.localize.term("startDateSelected"):g?this.localize.term("endDateSelected"):void 0;return V`<button type="button" part="day" class="${I("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded-md w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",$||g?"hover:bg-primary-500":"hover:bg-primary-100 hover:text-primary-500",b?this.isInDisabledDates(r)||!this.inMinMax(r)?"out-month text-neutral-500":this.disabledWeekends&&C?"weekend-day text-neutral-500":"in-month text-primary":this.disabledWeekends&&C?"out-month weekend-day text-neutral-500":C?"out-month weekend-day text-neutral-700":"out-month text-neutral-700",y?"selected border-primary bg-primary text-white hover:bg-primary-500 hover:text-white":"",$?"bg-primary text-white rounded-l-md rounded-r-none":"",g?"bg-primary text-white range-end rounded-r-md rounded-l-none":"",D&&!$&&!g?"in-range selected bg-primary-100 text-primary-500 rounded-none hover:bg-primary-500 hover:text-white":"",!D&&x&&!$&&!g?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",L&&!y&&!$&&!g&&M?"today border-[1px] border-primary font-bold":"",S?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",M&&!L?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${p+1}" aria-labelledby="${"col-"+(p+1)}" .tabIndex="${T}" ?disabled="${S||this.disabled}" aria-disabled="${S||this.visuallyDisabled||this.disabled?"true":"false"}" aria-selected="${y||D||$||g?"true":"false"}" aria-current="${L?"date":R}" aria-label="${z}" aria-roledescription="${w!=null?w:R}" @focus="${()=>this.focusedDate=a.startOfDayLocal(r)}" @mouseenter="${()=>this.onDayMouseEnter(r)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=a.startOfDayLocal(r),this.selectDate(r)}}">${r.getDate()}</button>`})}</div>`)}</div></div>`}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,s=this.helpText?!0:!!t.helpText,i=!!t.tooltip,n=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,l=this.floatingLabel&&e&&(this.hasFocus||this.open||n)&&!this.disabled&&!this.visuallyDisabled,u=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",f={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],d=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",c={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[d],r=this.size==="sm"?"text-sm":"text-base";return V`<div part="form-control" class="${I("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e&&!this.floatingLabel||i?V`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${I(e?"inline-block form-control-color-text":"hidden",r)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?V`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${I("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${I("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",c,this.open&&this.alignment==="left"?"rounded-bl-none":"",this.open&&this.alignment==="right"?"rounded-br-none":"")}">${e&&this.floatingLabel?V`<label id="label" part="form-control-floating-label" class="${I("absolute left-4 z-20 pointer-events-none transition-all duration-200",l?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 text-base",l&&"mt-1")}" for="input"><span class="${I("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",l&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}</div><sd-6-4-0-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${I("inline-flex relative w-full")}" sync="width" auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${I("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",d==="disabled"||d==="visuallyDisabled"?"text-neutral-500":"text-black")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${s?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${I("min-w-0 flex-grow focus:outline-none bg-transparent hover:cursor-pointer form-control-color-text",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",{sm:"h-8",md:"h-10",lg:"h-12"}[this.size],r,this.floatingLabel&&"mt-4")}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel||l?this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder"):""}" ?disabled="${this.disabled}" ?required="${this.required}" ?readonly="${this.readonly||this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${this.showInvalidStyle?V`<sd-6-4-0-icon part="invalid-icon" class="${I("text-error",f,m)}" library="_internal" name="risk"></sd-6-4-0-icon>`:""} ${this.showValidStyle&&this.styleOnValid?V`<sd-6-4-0-icon class="${I("text-success flex-shrink-0",f,m)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-4-0-icon>`:""}<sd-6-4-0-icon class="${I(u,f,m,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-6-4-0-icon>${this.renderCalendar()}</div></sd-6-4-0-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${I("text-sm text-neutral-700 mt-1",s?"block":"hidden")}" aria-hidden="${!s}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};o.styles=[...H.styles,N`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{position:relative;display:inline-block;width:100%;--tw-outline-style:none;outline-style:none}:host([required]) #label::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}`],h([v({type:String,reflect:!0})],o.prototype,"locale",2),h([v({type:String,converter:B,reflect:!0})],o.prototype,"value",2),h([v({type:Boolean,reflect:!0})],o.prototype,"range",2),h([v({attribute:"range-start",converter:B,reflect:!0})],o.prototype,"rangeStart",2),h([v({attribute:"range-end",converter:B,reflect:!0})],o.prototype,"rangeEnd",2),h([v({type:Boolean})],o.prototype,"allowSameDayRange",2),h([v({type:String,converter:B,reflect:!0})],o.prototype,"min",2),h([v({type:String,converter:B,reflect:!0})],o.prototype,"max",2),h([v({type:Number})],o.prototype,"firstDayOfWeek",2),h([v({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],o.prototype,"disabledWeekends",2),h([v({attribute:"disabled-dates",converter:_})],o.prototype,"disabledDates",2),h([v({attribute:!1})],o.prototype,"isDateDisabled",2),h([v({type:String,reflect:!0})],o.prototype,"size",2),h([v({type:String})],o.prototype,"alignment",2),h([v({type:String,reflect:!0})],o.prototype,"label",2),h([v({type:String,attribute:"help-text",reflect:!0})],o.prototype,"helpText",2),h([v({attribute:"floating-label",type:Boolean,reflect:!0})],o.prototype,"floatingLabel",2),h([v({type:Boolean,reflect:!0})],o.prototype,"disabled",2),h([v({type:Boolean,reflect:!0})],o.prototype,"required",2),h([v({type:Boolean,attribute:"visually-disabled"})],o.prototype,"visuallyDisabled",2),h([v({type:Boolean,reflect:!0,attribute:"style-on-valid"})],o.prototype,"styleOnValid",2),h([v({type:Boolean,reflect:!0})],o.prototype,"readonly",2),h([v({type:String,reflect:!0})],o.prototype,"placement",2),h([v({type:String,reflect:!0})],o.prototype,"placeholder",2),h([v({reflect:!0})],o.prototype,"name",2),h([v({type:String,reflect:!0})],o.prototype,"form",2),h([E()],o.prototype,"open",2),h([E()],o.prototype,"viewMonth",2),h([E()],o.prototype,"focusedDate",2),h([E()],o.prototype,"today",2),h([E()],o.prototype,"disabledDatesSet",2),h([E()],o.prototype,"previewEnd",2),h([E()],o.prototype,"statusNavText",2),h([E()],o.prototype,"statusSelectText",2),h([E()],o.prototype,"hasFocus",2),h([E()],o.prototype,"showValidStyle",2),h([E()],o.prototype,"showInvalidStyle",2),h([E()],o.prototype,"currentPlacement",2),h([E()],o.prototype,"inputValue",2),h([q("#invalid-message")],o.prototype,"invalidMessage",2),h([q("#input")],o.prototype,"input",2),h([Y("locale")],o.prototype,"handleLocaleChange",1),h([Y("disabledDates")],o.prototype,"handleDisabledDatesChange",1),h([Y("value")],o.prototype,"handleValueChange",1),h([Y("rangeStart"),Y("rangeEnd")],o.prototype,"handleRangeChange",1),h([Y(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],o.prototype,"handleDisabledChange",1),o=h([W("sd-6-4-0-datepicker")],o);export{o as a};