@maggioli-design-system/magma 2.0.0-beta.5 → 2.0.1

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 (346) hide show
  1. package/README.md +2 -1
  2. package/dist/cjs/index.cjs.js +64 -22
  3. package/dist/cjs/{locale.it-D-rxNDkm.js → locale.it-CfUV2hxK.js} +13 -10
  4. package/dist/cjs/mds-avatar.cjs.entry.js +27 -32
  5. package/dist/cjs/mds-badge.cjs.entry.js +3 -2
  6. package/dist/cjs/mds-benchmark-bar.cjs.entry.js +3 -2
  7. package/dist/cjs/mds-bibliography.cjs.entry.js +4 -3
  8. package/dist/cjs/mds-button_3.cjs.entry.js +36 -10
  9. package/dist/cjs/mds-dropdown.cjs.entry.js +4 -3
  10. package/dist/cjs/mds-entity.cjs.entry.js +1 -1
  11. package/dist/cjs/mds-file-preview.cjs.entry.js +18 -18
  12. package/dist/cjs/mds-file.cjs.entry.js +1 -1
  13. package/dist/cjs/mds-header.cjs.entry.js +17 -8
  14. package/dist/cjs/mds-img.cjs.entry.js +3 -3
  15. package/dist/cjs/mds-input-date-range.cjs.entry.js +7 -5
  16. package/dist/cjs/mds-input-select.cjs.entry.js +10 -8
  17. package/dist/cjs/mds-input-upload.cjs.entry.js +10 -6
  18. package/dist/cjs/mds-input.cjs.entry.js +4 -4
  19. package/dist/cjs/mds-keyboard-key.cjs.entry.js +8 -5
  20. package/dist/cjs/mds-keyboard.cjs.entry.js +6 -3
  21. package/dist/cjs/mds-mention.cjs.entry.js +3 -2
  22. package/dist/cjs/mds-notification.cjs.entry.js +11 -8
  23. package/dist/cjs/mds-pref-language-item.cjs.entry.js +3 -2
  24. package/dist/cjs/mds-pref-theme-item.cjs.entry.js +3 -2
  25. package/dist/cjs/mds-push-notification-item.cjs.entry.js +1 -1
  26. package/dist/cjs/mds-stepper-bar.cjs.entry.js +5 -3
  27. package/dist/cjs/mds-tab-bar-item.cjs.entry.js +3 -2
  28. package/dist/cjs/mds-table-header-cell.cjs.entry.js +2 -2
  29. package/dist/cjs/mds-text.cjs.entry.js +2 -1
  30. package/dist/cjs/mds-toast.cjs.entry.js +9 -3
  31. package/dist/cjs/mds-tooltip.cjs.entry.js +4 -4
  32. package/dist/collection/common/file.js +13 -10
  33. package/dist/collection/components/mds-avatar/mds-avatar.js +27 -32
  34. package/dist/collection/components/mds-badge/mds-badge.js +3 -2
  35. package/dist/collection/components/mds-benchmark-bar/mds-benchmark-bar.js +3 -2
  36. package/dist/collection/components/mds-bibliography/mds-bibliography.js +4 -3
  37. package/dist/collection/components/mds-button/mds-button.js +7 -6
  38. package/dist/collection/components/mds-dropdown/mds-dropdown.js +4 -3
  39. package/dist/collection/components/mds-file-preview/mds-file-preview.js +6 -7
  40. package/dist/collection/components/mds-header/mds-header.js +17 -8
  41. package/dist/collection/components/mds-icon/mds-icon.js +29 -4
  42. package/dist/collection/components/mds-icon/services/icons-set.service.js +47 -18
  43. package/dist/collection/components/mds-img/mds-img.js +3 -3
  44. package/dist/collection/components/mds-input/mds-input.js +4 -4
  45. package/dist/collection/components/mds-input-date-range/mds-input-date-range.js +7 -5
  46. package/dist/collection/components/mds-input-select/mds-input-select.js +10 -8
  47. package/dist/collection/components/mds-input-upload/mds-input-upload.js +10 -6
  48. package/dist/collection/components/mds-keyboard/mds-keyboard.js +6 -3
  49. package/dist/collection/components/mds-keyboard-key/mds-keyboard-key.js +8 -5
  50. package/dist/collection/components/mds-mention/mds-mention.js +3 -2
  51. package/dist/collection/components/mds-notification/mds-notification.js +11 -8
  52. package/dist/collection/components/mds-pref-language-item/mds-pref-language-item.js +3 -2
  53. package/dist/collection/components/mds-pref-theme-item/mds-pref-theme-item.js +3 -2
  54. package/dist/collection/components/mds-stepper-bar/mds-stepper-bar.js +5 -3
  55. package/dist/collection/components/mds-tab-bar-item/mds-tab-bar-item.js +3 -2
  56. package/dist/collection/components/mds-table-header-cell/mds-table-header-cell.js +2 -2
  57. package/dist/collection/components/mds-text/mds-text.js +2 -1
  58. package/dist/collection/components/mds-toast/mds-toast.js +9 -3
  59. package/dist/collection/components/mds-tooltip/mds-tooltip.js +4 -4
  60. package/dist/collection/dictionary/icon.js +1 -1
  61. package/dist/components/index.js +1 -1
  62. package/dist/components/mds-accordion-item.js +1 -1
  63. package/dist/components/mds-accordion-timer-item.js +1 -1
  64. package/dist/components/mds-avatar-stack-item.js +1 -1
  65. package/dist/components/mds-avatar-stack.js +1 -1
  66. package/dist/components/mds-avatar.js +1 -1
  67. package/dist/components/mds-badge.js +1 -1
  68. package/dist/components/mds-banner.js +1 -1
  69. package/dist/components/mds-benchmark-bar.js +1 -1
  70. package/dist/components/mds-bibliography.js +1 -1
  71. package/dist/components/mds-breadcrumb-item.js +1 -1
  72. package/dist/components/mds-breadcrumb.js +1 -1
  73. package/dist/components/mds-button-dropdown.js +1 -1
  74. package/dist/components/mds-button.js +1 -1
  75. package/dist/components/mds-calendar-cell.js +1 -1
  76. package/dist/components/mds-calendar.js +1 -1
  77. package/dist/components/mds-chip.js +1 -1
  78. package/dist/components/mds-dropdown.js +1 -1
  79. package/dist/components/mds-entity.js +1 -1
  80. package/dist/components/mds-file-preview.js +1 -1
  81. package/dist/components/mds-file.js +3 -3
  82. package/dist/components/mds-filter-item.js +1 -1
  83. package/dist/components/mds-filter.js +1 -1
  84. package/dist/components/mds-header-bar.js +1 -1
  85. package/dist/components/mds-header.js +1 -1
  86. package/dist/components/mds-help.js +1 -1
  87. package/dist/components/mds-horizontal-scroll.js +1 -1
  88. package/dist/components/mds-icon.js +1 -1
  89. package/dist/components/mds-img.js +1 -1
  90. package/dist/components/mds-input-date-range-preselection.js +1 -1
  91. package/dist/components/mds-input-date-range.js +1 -1
  92. package/dist/components/mds-input-date.js +1 -1
  93. package/dist/components/mds-input-field.js +1 -1
  94. package/dist/components/mds-input-otp.js +1 -1
  95. package/dist/components/mds-input-range.js +1 -1
  96. package/dist/components/mds-input-select.js +1 -1
  97. package/dist/components/mds-input-switch.js +1 -1
  98. package/dist/components/mds-input-tip-item.js +1 -1
  99. package/dist/components/mds-input-upload.js +1 -1
  100. package/dist/components/mds-input.js +1 -1
  101. package/dist/components/mds-keyboard-key.js +1 -1
  102. package/dist/components/mds-keyboard.js +1 -1
  103. package/dist/components/mds-kpi-item.js +1 -1
  104. package/dist/components/mds-label.js +1 -1
  105. package/dist/components/mds-list-item.js +1 -1
  106. package/dist/components/mds-mention.js +1 -1
  107. package/dist/components/mds-modal.js +1 -1
  108. package/dist/components/mds-note.js +1 -1
  109. package/dist/components/mds-notification.js +1 -1
  110. package/dist/components/mds-paginator-item.js +1 -1
  111. package/dist/components/mds-paginator.js +1 -1
  112. package/dist/components/mds-policy-ai.js +1 -1
  113. package/dist/components/mds-pref-animation.js +1 -1
  114. package/dist/components/mds-pref-consumption.js +1 -1
  115. package/dist/components/mds-pref-contrast.js +1 -1
  116. package/dist/components/mds-pref-language-item.js +1 -1
  117. package/dist/components/mds-pref-language.js +1 -1
  118. package/dist/components/mds-pref-mode.js +1 -1
  119. package/dist/components/mds-pref-theme-item.js +1 -1
  120. package/dist/components/mds-pref-theme.js +1 -1
  121. package/dist/components/mds-pref.js +1 -1
  122. package/dist/components/mds-price-table-features-cell.js +1 -1
  123. package/dist/components/mds-price-table-features.js +1 -1
  124. package/dist/components/mds-price-table-list-item.js +1 -1
  125. package/dist/components/mds-progress.js +1 -1
  126. package/dist/components/mds-push-notification-item.js +1 -1
  127. package/dist/components/mds-push-notification.js +1 -1
  128. package/dist/components/mds-quote.js +1 -1
  129. package/dist/components/mds-radial-menu-item.js +1 -1
  130. package/dist/components/mds-radial-menu.js +1 -1
  131. package/dist/components/mds-radial-progress.js +1 -1
  132. package/dist/components/mds-status-bar.js +1 -1
  133. package/dist/components/mds-stepper-bar-item.js +1 -1
  134. package/dist/components/mds-stepper-bar.js +1 -1
  135. package/dist/components/mds-tab-bar-item.js +1 -1
  136. package/dist/components/mds-tab-item.js +1 -1
  137. package/dist/components/mds-table-header-cell.js +1 -1
  138. package/dist/components/mds-table-header.js +1 -1
  139. package/dist/components/mds-table-row.js +1 -1
  140. package/dist/components/mds-table.js +1 -1
  141. package/dist/components/mds-text.js +1 -1
  142. package/dist/components/mds-toast.js +1 -1
  143. package/dist/components/mds-tooltip.js +1 -1
  144. package/dist/components/mds-tree-item.js +1 -1
  145. package/dist/components/mds-url-view.js +1 -1
  146. package/dist/components/mds-usage.js +1 -1
  147. package/dist/components/{p-D3-GP4KF.js → p-6K9sFzLr.js} +1 -1
  148. package/dist/components/p-BBhbQT2f.js +1 -0
  149. package/dist/components/{p-B2A_hlV2.js → p-BFpRu7yD.js} +1 -1
  150. package/dist/components/p-BL63WAAq.js +8 -0
  151. package/dist/components/{p-Deh5Aia-.js → p-BShLEry5.js} +1 -1
  152. package/dist/components/{p-BJNK4p33.js → p-BYxxgEE_.js} +1 -1
  153. package/dist/components/p-BZFyAX-6.js +1 -0
  154. package/dist/components/p-BtMdmkID.js +1 -0
  155. package/dist/components/{p-Caksrfcd.js → p-ByaUOMp0.js} +1 -1
  156. package/dist/components/p-C1xZO_fq.js +1 -0
  157. package/dist/components/{p-cBZsPiMJ.js → p-C6Q4zFh6.js} +1 -1
  158. package/dist/components/{p-DLE5TNTp.js → p-CUQ7WIXh.js} +1 -1
  159. package/dist/components/p-Cd_8zD_I.js +1 -0
  160. package/dist/components/{p-DtxB7DYE.js → p-CnAeawmf.js} +1 -1
  161. package/dist/components/{p-Bt4xX5ww.js → p-DCrjf0F0.js} +1 -1
  162. package/dist/components/p-DlHJvYE7.js +1 -0
  163. package/dist/components/{p-BH3bWzRT.js → p-DlaJNPdd.js} +1 -1
  164. package/dist/components/{p-sqRs6oj4.js → p-DnrQaRnh.js} +1 -1
  165. package/dist/components/{p-CBLAz3_J.js → p-OPg_Naue.js} +1 -1
  166. package/dist/components/{p-C03KYHGv.js → p-RS4yyl41.js} +1 -1
  167. package/dist/components/{p--8aaJX-p.js → p-gv3eu44S.js} +1 -1
  168. package/dist/components/p-kff6xSdW.js +1 -0
  169. package/dist/components/p-pys1EQ60.js +1 -0
  170. package/dist/components/p-qketFgr0.js +1 -0
  171. package/dist/components/{p-B14Ci2fO.js → p-s2Gu6hY7.js} +1 -1
  172. package/dist/components/p-zml3K7nx.js +1 -0
  173. package/dist/documentation.json +5 -5
  174. package/dist/esm/index.js +64 -22
  175. package/dist/esm/{locale.it-Dj8sWDfj.js → locale.it-Cvxh7La5.js} +13 -10
  176. package/dist/esm/mds-avatar.entry.js +27 -32
  177. package/dist/esm/mds-badge.entry.js +3 -2
  178. package/dist/esm/mds-benchmark-bar.entry.js +3 -2
  179. package/dist/esm/mds-bibliography.entry.js +4 -3
  180. package/dist/esm/mds-button_3.entry.js +36 -10
  181. package/dist/esm/mds-dropdown.entry.js +4 -3
  182. package/dist/esm/mds-entity.entry.js +1 -1
  183. package/dist/esm/mds-file-preview.entry.js +18 -18
  184. package/dist/esm/mds-file.entry.js +1 -1
  185. package/dist/esm/mds-header.entry.js +17 -8
  186. package/dist/esm/mds-img.entry.js +3 -3
  187. package/dist/esm/mds-input-date-range.entry.js +7 -5
  188. package/dist/esm/mds-input-select.entry.js +10 -8
  189. package/dist/esm/mds-input-upload.entry.js +10 -6
  190. package/dist/esm/mds-input.entry.js +4 -4
  191. package/dist/esm/mds-keyboard-key.entry.js +8 -5
  192. package/dist/esm/mds-keyboard.entry.js +6 -3
  193. package/dist/esm/mds-mention.entry.js +3 -2
  194. package/dist/esm/mds-notification.entry.js +11 -8
  195. package/dist/esm/mds-pref-language-item.entry.js +3 -2
  196. package/dist/esm/mds-pref-theme-item.entry.js +3 -2
  197. package/dist/esm/mds-push-notification-item.entry.js +1 -1
  198. package/dist/esm/mds-stepper-bar.entry.js +5 -3
  199. package/dist/esm/mds-tab-bar-item.entry.js +3 -2
  200. package/dist/esm/mds-table-header-cell.entry.js +2 -2
  201. package/dist/esm/mds-text.entry.js +2 -1
  202. package/dist/esm/mds-toast.entry.js +9 -3
  203. package/dist/esm/mds-tooltip.entry.js +4 -4
  204. package/dist/esm-es5/index.js +37 -26
  205. package/dist/esm-es5/locale.it-Cvxh7La5.js +6 -0
  206. package/dist/esm-es5/mds-avatar.entry.js +4 -2
  207. package/dist/esm-es5/mds-badge.entry.js +2 -3
  208. package/dist/esm-es5/mds-benchmark-bar.entry.js +2 -3
  209. package/dist/esm-es5/mds-bibliography.entry.js +1 -1
  210. package/dist/esm-es5/mds-button_3.entry.js +14 -9
  211. package/dist/esm-es5/mds-dropdown.entry.js +2 -2
  212. package/dist/esm-es5/mds-entity.entry.js +1 -1
  213. package/dist/esm-es5/mds-file-preview.entry.js +13 -11
  214. package/dist/esm-es5/mds-file.entry.js +6 -6
  215. package/dist/esm-es5/mds-header.entry.js +8 -6
  216. package/dist/esm-es5/mds-img.entry.js +1 -1
  217. package/dist/esm-es5/mds-input-date-range.entry.js +5 -3
  218. package/dist/esm-es5/mds-input-select.entry.js +8 -6
  219. package/dist/esm-es5/mds-input-upload.entry.js +3 -1
  220. package/dist/esm-es5/mds-input.entry.js +3 -3
  221. package/dist/esm-es5/mds-keyboard-key.entry.js +3 -1
  222. package/dist/esm-es5/mds-keyboard.entry.js +4 -2
  223. package/dist/esm-es5/mds-mention.entry.js +1 -1
  224. package/dist/esm-es5/mds-notification.entry.js +4 -2
  225. package/dist/esm-es5/mds-pref-language-item.entry.js +2 -2
  226. package/dist/esm-es5/mds-pref-theme-item.entry.js +2 -2
  227. package/dist/esm-es5/mds-push-notification-item.entry.js +1 -1
  228. package/dist/esm-es5/mds-stepper-bar.entry.js +4 -4
  229. package/dist/esm-es5/mds-tab-bar-item.entry.js +3 -4
  230. package/dist/esm-es5/mds-table-header-cell.entry.js +1 -1
  231. package/dist/esm-es5/mds-text.entry.js +1 -1
  232. package/dist/esm-es5/mds-toast.entry.js +4 -2
  233. package/dist/esm-es5/mds-tooltip.entry.js +2 -2
  234. package/dist/hydrate/index.js +283 -174
  235. package/dist/hydrate/index.mjs +283 -174
  236. package/dist/magma-components/index.esm.js +1 -1
  237. package/dist/magma-components/magma-components.esm.js +1 -1
  238. package/dist/magma-components/p-005172ba.entry.js +1 -0
  239. package/dist/magma-components/{p-9ca7932d.system.entry.js → p-05fa40aa.system.entry.js} +5 -3
  240. package/dist/magma-components/p-0827a5bd.entry.js +1 -0
  241. package/dist/magma-components/{p-1a8c5086.system.entry.js → p-15c77a98.system.entry.js} +2 -2
  242. package/dist/magma-components/p-18473d2f.entry.js +1 -0
  243. package/dist/magma-components/{p-f0a168f4.system.entry.js → p-18667ae7.system.entry.js} +3 -3
  244. package/dist/magma-components/p-19adde9d.entry.js +1 -0
  245. package/dist/magma-components/p-2217a7be.entry.js +1 -0
  246. package/dist/magma-components/{p-5a7ead55.system.entry.js → p-2386f0d6.system.entry.js} +2 -2
  247. package/dist/magma-components/p-2b56fc14.entry.js +1 -0
  248. package/dist/magma-components/p-3f747a63.system.entry.js +1 -0
  249. package/dist/magma-components/p-3ff30842.system.entry.js +16 -0
  250. package/dist/magma-components/{p-be692266.system.entry.js → p-49b120cb.system.entry.js} +2 -2
  251. package/dist/magma-components/{p-6cd7cfe3.entry.js → p-4af76eb3.entry.js} +1 -1
  252. package/dist/magma-components/p-4ba6cb3f.entry.js +1 -0
  253. package/dist/magma-components/p-4cadbd49.entry.js +1 -0
  254. package/dist/magma-components/{p-7f2e3b74.system.entry.js → p-4f107cb2.system.entry.js} +31 -31
  255. package/dist/magma-components/p-4oB0woT9.system.js +6 -0
  256. package/dist/magma-components/p-518b55f3.entry.js +1 -0
  257. package/dist/magma-components/{p-960dc9b5.system.entry.js → p-5eec629c.system.entry.js} +4 -2
  258. package/dist/magma-components/{p-a8ec3080.system.entry.js → p-646034cb.system.entry.js} +1 -1
  259. package/dist/magma-components/{p-ce4e1a41.system.entry.js → p-677ab154.system.entry.js} +3 -1
  260. package/dist/magma-components/p-759133b3.entry.js +1 -0
  261. package/dist/magma-components/{p-cd5866c8.entry.js → p-7912f877.entry.js} +1 -1
  262. package/dist/magma-components/{p-3d8e63a2.system.entry.js → p-7d304fd4.system.entry.js} +3 -1
  263. package/dist/magma-components/{p-07fde74d.system.entry.js → p-7f6d708c.system.entry.js} +6 -4
  264. package/dist/magma-components/{p-6edc4f16.system.entry.js → p-88564e9b.system.entry.js} +1 -1
  265. package/dist/magma-components/{p-8103d4d4.system.entry.js → p-8b1abf81.system.entry.js} +12 -10
  266. package/dist/magma-components/p-8bbee38d.entry.js +1 -0
  267. package/dist/magma-components/{p-481008e9.system.entry.js → p-8bf680d6.system.entry.js} +5 -3
  268. package/dist/magma-components/{p-ce0ecc75.system.entry.js → p-8cb3a071.system.entry.js} +2 -2
  269. package/dist/magma-components/p-8f229eaf.entry.js +1 -0
  270. package/dist/magma-components/{p-3f7d3060.system.entry.js → p-94fa3396.system.entry.js} +14 -9
  271. package/dist/magma-components/{p-0ad3b4da.system.entry.js → p-9bbd4193.system.entry.js} +6 -6
  272. package/dist/magma-components/p-9caffe14.entry.js +1 -0
  273. package/dist/magma-components/p-9de1ac7f.entry.js +1 -0
  274. package/dist/magma-components/p-B6mQg6yQ.js +1 -0
  275. package/dist/magma-components/p-CnXBPjmc.system.js +1 -1
  276. package/dist/magma-components/{p-CBam2PI8.system.js → p-DVd2EM-q.system.js} +29 -18
  277. package/dist/magma-components/{p-f1462410.system.entry.js → p-a15da479.system.entry.js} +3 -4
  278. package/dist/magma-components/{p-e05d2df8.system.entry.js → p-ab997243.system.entry.js} +2 -2
  279. package/dist/magma-components/{p-efe8d359.entry.js → p-aea6081f.entry.js} +1 -1
  280. package/dist/magma-components/{p-1c0a7e24.system.entry.js → p-b0539d61.system.entry.js} +7 -5
  281. package/dist/magma-components/{p-9d9a947b.entry.js → p-b35c26f8.entry.js} +2 -2
  282. package/dist/magma-components/p-cc033985.system.entry.js +14 -0
  283. package/dist/magma-components/{p-a3fc2ea4.system.entry.js → p-cd84a264.system.entry.js} +7 -5
  284. package/dist/magma-components/p-d0457835.entry.js +1 -0
  285. package/dist/magma-components/p-d64311e2.entry.js +1 -0
  286. package/dist/magma-components/{p-54b995c2.system.entry.js → p-da4dc390.system.entry.js} +1 -1
  287. package/dist/magma-components/p-dda7a33b.entry.js +1 -0
  288. package/dist/magma-components/p-e375c8b1.entry.js +1 -0
  289. package/dist/magma-components/p-e3fce8ca.entry.js +1 -0
  290. package/dist/magma-components/{p-9626eaff.system.entry.js → p-e9a16f22.system.entry.js} +3 -3
  291. package/dist/magma-components/p-ea0091b6.entry.js +1 -0
  292. package/dist/magma-components/{p-a3279a73.system.entry.js → p-ec00defc.system.entry.js} +6 -4
  293. package/dist/magma-components/p-edfb0d7a.entry.js +1 -0
  294. package/dist/magma-components/{p-0715a2cb.system.entry.js → p-f9d9cf7c.system.entry.js} +2 -3
  295. package/dist/magma-components/p-fa163e86.entry.js +1 -0
  296. package/dist/magma-components/p-fe19080a.entry.js +8 -0
  297. package/dist/magma-components/p-ff49fb35.entry.js +1 -0
  298. package/dist/stats.json +411 -411
  299. package/dist/types/components/mds-avatar/mds-avatar.d.ts +2 -0
  300. package/dist/types/components/mds-header/mds-header.d.ts +1 -0
  301. package/dist/types/components/mds-icon/mds-icon.d.ts +5 -0
  302. package/dist/types/components/mds-icon/services/icons-set.service.d.ts +10 -9
  303. package/dist/types/components/mds-input-select/mds-input-select.d.ts +1 -0
  304. package/dist/types/components/mds-toast/mds-toast.d.ts +1 -0
  305. package/package.json +11 -11
  306. package/dist/components/p-B9DJLgwr.js +0 -1
  307. package/dist/components/p-BouRLCYL.js +0 -1
  308. package/dist/components/p-CVgKDZPF.js +0 -1
  309. package/dist/components/p-CatD1iUY.js +0 -1
  310. package/dist/components/p-CbufYCNj.js +0 -1
  311. package/dist/components/p-Cehcn85x.js +0 -1
  312. package/dist/components/p-D8I1RblC.js +0 -1
  313. package/dist/components/p-DaI5QqNu.js +0 -1
  314. package/dist/components/p-Dj_oN194.js +0 -1
  315. package/dist/components/p-DmELzfvf.js +0 -1
  316. package/dist/components/p-sUKtonkE.js +0 -8
  317. package/dist/esm-es5/locale.it-Dj8sWDfj.js +0 -1
  318. package/dist/magma-components/p-03be5c0c.entry.js +0 -1
  319. package/dist/magma-components/p-0af8d821.entry.js +0 -1
  320. package/dist/magma-components/p-1780b8ba.entry.js +0 -1
  321. package/dist/magma-components/p-1dcfb13e.entry.js +0 -1
  322. package/dist/magma-components/p-241dbf61.entry.js +0 -1
  323. package/dist/magma-components/p-4297da23.system.entry.js +0 -1
  324. package/dist/magma-components/p-454c4774.entry.js +0 -1
  325. package/dist/magma-components/p-59de81ac.entry.js +0 -1
  326. package/dist/magma-components/p-5e43274a.system.entry.js +0 -15
  327. package/dist/magma-components/p-66ce2dee.entry.js +0 -1
  328. package/dist/magma-components/p-69d1b815.entry.js +0 -1
  329. package/dist/magma-components/p-75fcf1a4.entry.js +0 -1
  330. package/dist/magma-components/p-78fef00a.entry.js +0 -1
  331. package/dist/magma-components/p-7d317ff0.entry.js +0 -8
  332. package/dist/magma-components/p-7fc29447.entry.js +0 -1
  333. package/dist/magma-components/p-8b7fa8d7.entry.js +0 -1
  334. package/dist/magma-components/p-9b2ee3fe.entry.js +0 -1
  335. package/dist/magma-components/p-CSb7Iu19.js +0 -1
  336. package/dist/magma-components/p-a5ac5e0b.entry.js +0 -1
  337. package/dist/magma-components/p-a906a02f.system.entry.js +0 -16
  338. package/dist/magma-components/p-ac544ab1.entry.js +0 -1
  339. package/dist/magma-components/p-b23a6c83.entry.js +0 -1
  340. package/dist/magma-components/p-b9fecfd5.entry.js +0 -1
  341. package/dist/magma-components/p-c1fb2eb7.entry.js +0 -1
  342. package/dist/magma-components/p-c70d7159.entry.js +0 -1
  343. package/dist/magma-components/p-ddbdce09.entry.js +0 -1
  344. package/dist/magma-components/p-e3e893c4.entry.js +0 -1
  345. package/dist/magma-components/p-e4868ade.entry.js +0 -1
  346. package/dist/magma-components/p-ihVfCXG4.system.js +0 -1
@@ -1,29 +1,31 @@
1
- import{r as registerInstance,d as createEvent,h,e as Host,g as getElement}from"./index-DIiEV39g.js";import{m as miBaselineCancel}from"./cancel-BJ8rpzfj.js";import{c as clsx}from"./clsx-ChV9xqsO.js";import{f as fileDescriptionLocaleIt,a as fileDescriptionLocaleEs,b as fileDescriptionLocaleEn,c as fileDescriptionLocaleEl,g as getExtensionInfos,d as getSuffix,e as getFormatsVariant}from"./locale.it-Dj8sWDfj.js";import{L as Locale}from"./locale-CbJbTW_c.js";import{p as preferenceStore}from"./preference-CKerJx2M.js";import"./file-extensions-BxIk5ZFV.js";import"./panorama-b1ORvfSX.js";
1
+ import{r as registerInstance,d as createEvent,h,e as Host,g as getElement}from"./index-DIiEV39g.js";import{m as miBaselineCancel}from"./cancel-BJ8rpzfj.js";import{c as clsx}from"./clsx-ChV9xqsO.js";import{f as fileDescriptionLocaleIt,a as fileDescriptionLocaleEs,b as fileDescriptionLocaleEn,c as fileDescriptionLocaleEl,g as getExtensionInfos,d as getSuffix,e as getFormatsVariant}from"./locale.it-Cvxh7La5.js";import{L as Locale}from"./locale-CbJbTW_c.js";import{p as preferenceStore}from"./preference-CKerJx2M.js";import"./file-extensions-BxIk5ZFV.js";import"./panorama-b1ORvfSX.js";
2
2
  /**
3
3
  * filesize
4
4
  *
5
- * @copyright 2023 Jason Mulligan <jason.mulligan@avoidwork.com>
5
+ * @copyright 2024 Jason Mulligan <jason.mulligan@avoidwork.com>
6
6
  * @license BSD-3-Clause
7
- * @version 10.1.0
8
- */var ARRAY="array";var BIT="bit";var BITS="bits";var BYTE="byte";var BYTES="bytes";var EMPTY="";var EXPONENT="exponent";var FUNCTION="function";var IEC="iec";var INVALID_NUMBER="Invalid number";var INVALID_ROUND="Invalid rounding method";var JEDEC="jedec";var OBJECT="object";var PERIOD=".";var ROUND="round";var S="s";var SI="si";var SI_KBIT="kbit";var SI_KBYTE="kB";var SPACE=" ";var STRING="string";var ZERO="0";var STRINGS={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function filesize(e,r){var a=r===void 0?{}:r,i=a.bits,t=i===void 0?false:i,o=a.pad,s=o===void 0?false:o,l=a.base,n=l===void 0?-1:l,v=a.round,c=v===void 0?2:v,m=a.locale,d=m===void 0?EMPTY:m,b=a.localeOptions,g=b===void 0?{}:b,f=a.separator,p=f===void 0?EMPTY:f,u=a.spacer,h=u===void 0?SPACE:u,w=a.symbols,x=w===void 0?{}:w,k=a.standard,y=k===void 0?EMPTY:k,E=a.output,I=E===void 0?STRING:E,B=a.fullform,T=B===void 0?false:B,N=a.fullforms,j=N===void 0?[]:N,D=a.exponent,O=D===void 0?-1:D,M=a.roundingMethod,R=M===void 0?ROUND:M,P=a.precision,q=P===void 0?0:P;var C=O,Y=Number(e),L=[],F=0,z=EMPTY;
7
+ * @version 10.1.6
8
+ */var ARRAY="array";var BIT="bit";var BITS="bits";var BYTE="byte";var BYTES="bytes";var EMPTY="";var EXPONENT="exponent";var FUNCTION="function";var IEC="iec";var INVALID_NUMBER="Invalid number";var INVALID_ROUND="Invalid rounding method";var JEDEC="jedec";var OBJECT="object";var PERIOD=".";var ROUND="round";var S="s";var SI="si";var SI_KBIT="kbit";var SI_KBYTE="kB";var SPACE=" ";var STRING="string";var ZERO="0";var STRINGS={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function filesize(e,r){var a=r===void 0?{}:r,i=a.bits,t=i===void 0?false:i,o=a.pad,s=o===void 0?false:o,l=a.base,n=l===void 0?-1:l,v=a.round,c=v===void 0?2:v,m=a.locale,d=m===void 0?EMPTY:m,b=a.localeOptions,g=b===void 0?{}:b,f=a.separator,p=f===void 0?EMPTY:f,u=a.spacer,h=u===void 0?SPACE:u,w=a.symbols,x=w===void 0?{}:w,k=a.standard,y=k===void 0?EMPTY:k,E=a.output,I=E===void 0?STRING:E,B=a.fullform,T=B===void 0?false:B,N=a.fullforms,D=N===void 0?[]:N,j=a.exponent,O=j===void 0?-1:j,M=a.roundingMethod,R=M===void 0?ROUND:M,C=a.precision,P=C===void 0?0:C;var q=O,Y=Number(e),L=[],F=0,z=EMPTY;
9
9
  // Sync base & standard
10
10
  if(y===SI){n=10;y=JEDEC}else if(y===IEC||y===JEDEC){n=2}else if(n===2){y=IEC}else{n=10;y=JEDEC}var _=n===10?1e3:1024,A=T===true,G=Y<0,V=Math[R];if(typeof e!=="bigint"&&isNaN(e)){throw new TypeError(INVALID_NUMBER)}if(typeof V!==FUNCTION){throw new TypeError(INVALID_ROUND)}
11
11
  // Flipping a negative number to determine the size
12
12
  if(G){Y=-Y}
13
13
  // Determining the exponent
14
- if(C===-1||isNaN(C)){C=Math.floor(Math.log(Y)/Math.log(_));if(C<0){C=0}}
14
+ if(q===-1||isNaN(q)){q=Math.floor(Math.log(Y)/Math.log(_));if(q<0){q=0}}
15
15
  // Exceeding supported length, time to reduce & multiply
16
- if(C>8){if(q>0){q+=8-C}C=8}if(I===EXPONENT){return C}
16
+ if(q>8){if(P>0){P+=8-q}q=8}if(I===EXPONENT){return q}
17
17
  // Zero is now a special case because bytes divide by 1
18
- if(Y===0){L[0]=0;z=L[1]=STRINGS.symbol[y][t?BITS:BYTES][C]}else{F=Y/(n===2?Math.pow(2,C*10):Math.pow(1e3,C));if(t){F=F*8;if(F>=_&&C<8){F=F/_;C++}}var J=Math.pow(10,C>0?c:0);L[0]=V(F*J)/J;if(L[0]===_&&C<8&&O===-1){L[0]=1;C++}z=L[1]=n===10&&C===1?t?SI_KBIT:SI_KBYTE:STRINGS.symbol[y][t?BITS:BYTES][C]}
18
+ if(Y===0){L[0]=0;z=L[1]=STRINGS.symbol[y][t?BITS:BYTES][q]}else{F=Y/(n===2?Math.pow(2,q*10):Math.pow(1e3,q));if(t){F=F*8;if(F>=_&&q<8){F=F/_;q++}}var J=Math.pow(10,q>0?c:0);L[0]=V(F*J)/J;if(L[0]===_&&q<8&&O===-1){L[0]=1;q++}z=L[1]=n===10&&q===1?t?SI_KBIT:SI_KBYTE:STRINGS.symbol[y][t?BITS:BYTES][q]}
19
19
  // Decorating a 'diff'
20
20
  if(G){L[0]=-L[0]}
21
21
  // Setting optional precision
22
- if(q>0){L[0]=L[0].toPrecision(q)}
22
+ if(P>0){L[0]=L[0].toPrecision(P)}
23
23
  // Applying custom symbol
24
- L[1]=x[L[1]]||L[1];if(d===true){L[0]=L[0].toLocaleString()}else if(d.length>0){L[0]=L[0].toLocaleString(d,g)}else if(p.length>0){L[0]=L[0].toString().replace(PERIOD,p)}if(s&&Number.isInteger(L[0])===false&&c>0){var K=p||PERIOD,U=L[0].toString().split(K),Z=U[1]||EMPTY,$=Z.length,X=c-$;L[0]="".concat(U[0]).concat(K).concat(Z.padEnd($+X,ZERO))}if(A){L[1]=j[C]?j[C]:STRINGS.fullform[y][C]+(t?BIT:BYTE)+(L[0]===1?EMPTY:S)}
24
+ L[1]=x[L[1]]||L[1];if(d===true){L[0]=L[0].toLocaleString()}else if(d.length>0){L[0]=L[0].toLocaleString(d,g)}else if(p.length>0){L[0]=L[0].toString().replace(PERIOD,p)}if(s&&c>0){var K=L[0].toString(),U=p||((K.match(/(\D)/g)||[]).pop()||PERIOD),Z=K.toString().split(U),$=Z[1]||EMPTY,X=$.length,H=c-X;L[0]="".concat(Z[0]).concat(U).concat($.padEnd(X+H,ZERO))}if(A){L[1]=D[q]?D[q]:STRINGS.fullform[y][q]+(t?BIT:BYTE)+(L[0]===1?EMPTY:S)}
25
25
  // Returning Array, Object, or String (default)
26
- return I===ARRAY?L:I===OBJECT?{value:L[0],symbol:L[1],exponent:C,unit:z}:L.join(h)}var remove$3="Αφαιρέστε το αρχείο από την ουρά μεταφόρτωσης";var localeEl={remove:remove$3};var remove$2="Remove file from upload queue";var localeEn={remove:remove$2};var remove$1="Eliminar archivo de la cola de carga";var localeEs={remove:remove$1};var remove="Rimuovi file dalla coda di upload";var localeIt={remove:remove};var mdsFilePreviewCss=function(){return"@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-badge,mds-button,mds-icon,mds-img,mds-text):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-file-preview-background-color:rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248))));--mds-file-preview-border-radius:var(--magma-radius-2xl,var(--radius-squircle-2xl,40px));--mds-file-preview-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--mds-file-preview-icon-background:inherit;--mds-file-preview-icon-color:var(--mds-file-preview-color,rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73)))));--mds-file-preview-transition-duration:0s;--private-file-preview-padding:calc(var(--spacing,.0025rem)*400);--private-file-preview-transition-duration:var(--mds-file-preview-transition-duration);background-color:var(--mds-file-preview-background-color,rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248)))));border-radius:var(--mds-file-preview-border-radius,var(--magma-radius-2xl,var(--radius-squircle-2xl,40px)));-webkit-box-shadow:var(--shadow-box-md,#0000000f 0 0 0 1px,#00000008 0 1px 1px -.5px,#0000000a 0 2px 2px -1px,#0000000a 0 3px 3px -1.5px,#00000008 0 5px 5px -2.5px,#00000008 0 10px 10px -5px,#00000008 0 24px 24px -8px);box-shadow:var(--shadow-box-md,#0000000f 0 0 0 1px,#00000008 0 1px 1px -.5px,#0000000a 0 2px 2px -1px,#0000000a 0 3px 3px -1.5px,#00000008 0 5px 5px -2.5px,#00000008 0 10px 10px -5px,#00000008 0 24px 24px -8px);corner-shape:var(--magma-corner-shape,squircle);align-items:stretch;fill:var(--mds-file-preview-color,rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73)))));-ms-flex-pack:stretch;display:flex;justify-content:stretch;overflow:hidden;position:relative;-webkit-transition-duration:var(--private-file-preview-transition-duration);transition-duration:var(--private-file-preview-transition-duration)}.card{display:grid;gap:calc(var(--spacing,.0025rem)*200);grid-template-columns:repeat(1,minmax(1px,100%));padding:var(--private-file-preview-padding)}.card,.preview{corner-shape:inherit;width:100%}.preview{aspect-ratio:var(--aspect-square,1/1);background-color:var(--mds-file-preview-icon-background);border-radius:max(0px,calc(var(--mds-file-preview-border-radius,var(--magma-radius-2xl,var(--radius-squircle-2xl,40px))) - var(--private-file-preview-padding)));box-sizing:border-box;color:var(--mds-file-preview-color,rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73)))));fill:var(--mds-file-preview-icon-color,rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73)))));-webkit-transition-duration:inherit;transition-duration:inherit}.preview--image{filter:brightness(.975);padding:0!important}.preview--icon,.preview--status{align-items:center;display:flex;flex-direction:column;justify-content:center}.preview--status{gap:calc(var(--spacing,.0025rem)*200);padding:calc(var(--spacing,.0025rem)*400)}.icon{height:calc(var(--spacing,.0025rem)*1200);width:calc(var(--spacing,.0025rem)*1200)}.message{text-align:center}.action-delete{background-color:var(--mds-file-preview-background-color,rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248)))));position:absolute;right:0;top:0;z-index:10}.infos{align-items:baseline;display:flex;gap:calc(var(--spacing,.0025rem)*200)}.suffix{flex-shrink:0}.infos--has-file-size{justify-content:space-between}.file-name{--mds-text-line-clamp:2}:host([format=archive]),:host([format=executable]){--mds-file-preview-color:rgb(var(--label-amaranth-04,213 12 47));--mds-file-preview-icon-background:rgb(var(--label-amaranth-10,254 232 236));--mds-file-preview-icon-color:rgb(var(--label-amaranth-04,213 12 47))}:host([format=attachment]){--mds-file-preview-color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))));--mds-file-preview-icon-background:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))));--mds-file-preview-icon-color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:host([format=audio]),:host([format=video]){--mds-file-preview-color:rgb(var(--label-violet-04,126 73 245));--mds-file-preview-icon-background:rgb(var(--label-violet-10,240 234 254));--mds-file-preview-icon-color:rgb(var(--label-violet-04,126 73 245))}:host([format=code]),:host([format=data]),:host([format=markup]){--mds-file-preview-color:rgb(var(--label-yellow-04,141 107 5));--mds-file-preview-icon-background:rgb(var(--label-yellow-10,253 236 186));--mds-file-preview-icon-color:rgb(var(--label-yellow-04,141 107 5))}:host([format=certificate]),:host([format=document]){--mds-file-preview-color:rgb(var(--label-orange-04,185 78 5));--mds-file-preview-icon-background:rgb(var(--label-orange-10,254 233 219));--mds-file-preview-icon-color:rgb(var(--label-orange-04,185 78 5))}:host([format=email]),:host([format=text]){--mds-file-preview-color:rgb(var(--label-blue-04,63 94 248));--mds-file-preview-icon-background:rgb(var(--label-blue-10,233 236 254));--mds-file-preview-icon-color:rgb(var(--label-blue-04,63 94 248))}:host([format=image]){--mds-file-preview-color:rgb(var(--label-green-04,22 128 61));--mds-file-preview-icon-background:rgb(var(--label-green-10,206 247 221));--mds-file-preview-icon-color:rgb(var(--label-green-04,22 128 61))}:host([format=slide]){--mds-file-preview-color:rgb(var(--label-orchid-04,206 21 113));--mds-file-preview-icon-background:rgb(var(--label-orchid-10,253 231 242));--mds-file-preview-icon-color:rgb(var(--label-orchid-04,206 21 113))}:host([format=spreadsheet]){--mds-file-preview-color:rgb(var(--label-lime-04,81 124 13));--mds-file-preview-icon-background:rgb(var(--label-lime-10,219 247 178));--mds-file-preview-icon-color:rgb(var(--label-lime-04,81 124 13))}:host([format=vector]){--mds-file-preview-color:rgb(var(--label-aqua-04,4 122 143));--mds-file-preview-icon-background:rgb(var(--label-aqua-10,199 245 253));--mds-file-preview-icon-color:rgb(var(--label-aqua-04,4 122 143))}:host([variant=primary][message]){--mds-file-preview-icon-background:rgb(var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231))));--mds-file-preview-icon-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))}:host([variant=info][message]){--mds-file-preview-icon-background:rgb(var(--magma-info-wash-base,var(--status-info-09,193 230 246)));--mds-file-preview-icon-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)));--mds-file-preview-color:rgb(var(--magma-info-text-subtle,var(--text-info-subtle,0 94 137)))}:host([variant=success][message]){--mds-file-preview-icon-background:rgb(var(--magma-success-wash-base,var(--status-success-09,191 233 205)));--mds-file-preview-icon-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)));--mds-file-preview-color:rgb(var(--magma-success-text-subtle,var(--text-success-subtle,0 102 32)))}:host([variant=warning][message]){--mds-file-preview-icon-background:rgb(var(--magma-warning-wash-base,var(--status-warning-09,255 220 117)));--mds-file-preview-icon-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)));--mds-file-preview-color:rgb(var(--magma-warning-text-subtle,var(--text-warning-subtle,113 85 0)))}:host([variant=error][message]){--mds-file-preview-icon-background:rgb(var(--magma-danger-wash-base,var(--status-error-09,255 214 211)));--mds-file-preview-icon-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)));--mds-file-preview-color:rgb(var(--magma-danger-text-subtle,var(--text-error-subtle,165 33 40)))}:host([variant=amaranth][message]){--mds-file-preview-icon-background:rgb(var(--label-amaranth-09,253 214 221));--mds-file-preview-icon-color:rgb(var(--label-amaranth-04,213 12 47));--mds-file-preview-color:rgb(var(--label-amaranth-03,170 10 37))}:host([variant=aqua][message]){--mds-file-preview-icon-background:rgb(var(--label-aqua-09,151 237 252));--mds-file-preview-icon-color:rgb(var(--label-aqua-04,4 122 143));--mds-file-preview-color:rgb(var(--label-aqua-03,3 97 114))}:host([variant=blue][message]){--mds-file-preview-icon-background:rgb(var(--label-blue-09,216 222 254));--mds-file-preview-icon-color:rgb(var(--label-blue-04,63 94 248));--mds-file-preview-color:rgb(var(--label-blue-03,11 51 246))}:host([variant=green][message]){--mds-file-preview-icon-background:rgb(var(--label-green-09,165 240 193));--mds-file-preview-icon-color:rgb(var(--label-green-04,22 128 61));--mds-file-preview-color:rgb(var(--label-green-03,18 103 49))}:host([variant=lime][message]){--mds-file-preview-icon-background:rgb(var(--label-lime-09,189 239 111));--mds-file-preview-icon-color:rgb(var(--label-lime-04,81 124 13));--mds-file-preview-color:rgb(var(--label-lime-03,64 99 11))}:host([variant=orange][message]){--mds-file-preview-icon-background:rgb(var(--label-orange-09,253 217 191));--mds-file-preview-icon-color:rgb(var(--label-orange-04,185 78 5));--mds-file-preview-color:rgb(var(--label-orange-03,147 63 4))}:host([variant=orchid][message]){--mds-file-preview-icon-background:rgb(var(--label-orchid-09,251 213 232));--mds-file-preview-icon-color:rgb(var(--label-orchid-04,206 21 113));--mds-file-preview-color:rgb(var(--label-orchid-03,165 17 90))}:host([variant=purple][message]){--mds-file-preview-icon-background:rgb(var(--label-purple-09,235 216 253));--mds-file-preview-icon-color:rgb(var(--label-purple-04,150 51 245));--mds-file-preview-color:rgb(var(--label-purple-03,116 10 217))}:host([variant=red][message]){--mds-file-preview-icon-background:rgb(var(--label-red-09,250 215 215));--mds-file-preview-icon-color:rgb(var(--label-red-04,212 28 28));--mds-file-preview-color:rgb(var(--label-red-03,169 22 22))}:host([variant=sky][message]){--mds-file-preview-icon-background:rgb(var(--label-sky-09,185 231 251));--mds-file-preview-icon-color:rgb(var(--label-sky-04,10 118 167));--mds-file-preview-color:rgb(var(--label-sky-03,8 94 133))}:host([variant=violet][message]){--mds-file-preview-icon-background:rgb(var(--label-violet-09,229 218 253));--mds-file-preview-icon-color:rgb(var(--label-violet-04,126 73 245));--mds-file-preview-color:rgb(var(--label-violet-03,87 20 242))}:host([variant=yellow][message]){--mds-file-preview-icon-background:rgb(var(--label-yellow-09,251 221 131));--mds-file-preview-icon-color:rgb(var(--label-yellow-04,141 107 5));--mds-file-preview-color:rgb(var(--label-yellow-03,112 85 4))}:host([pref-contrast=more]):host([variant=primary][message]){--mds-file-preview-icon-background:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))));--mds-file-preview-icon-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))));--mds-file-preview-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([pref-contrast=more]):host([variant=info][message]){--mds-file-preview-icon-background:rgb(var(--magma-info-wash-soft,var(--status-info-10,220 240 250)));--mds-file-preview-icon-color:rgb(var(--magma-info-text-muted,var(--text-info-muted,0 71 114)));--mds-file-preview-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}:host([pref-contrast=more]):host([variant=success][message]){--mds-file-preview-icon-background:rgb(var(--magma-success-wash-soft,var(--status-success-10,220 243 227)));--mds-file-preview-icon-color:rgb(var(--magma-success-text-muted,var(--text-success-muted,0 80 7)));--mds-file-preview-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:host([pref-contrast=more]):host([variant=warning][message]){--mds-file-preview-icon-background:rgb(var(--magma-warning-wash-soft,var(--status-warning-10,255 237 181)));--mds-file-preview-icon-color:rgb(var(--magma-warning-text-muted,var(--text-warning-muted,88 66 0)));--mds-file-preview-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:host([pref-contrast=more]):host([variant=error][message]){--mds-file-preview-icon-background:rgb(var(--magma-danger-wash-soft,var(--status-error-10,255 232 230)));--mds-file-preview-icon-color:rgb(var(--magma-danger-text-muted,var(--text-error-muted,132 0 11)));--mds-file-preview-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:host([pref-contrast=more]):host([variant=amaranth][message]){--mds-file-preview-icon-background:rgb(var(--label-amaranth-10,254 232 236));--mds-file-preview-icon-color:rgb(var(--label-amaranth-02,131 8 29));--mds-file-preview-color:rgb(var(--label-amaranth-01,88 5 19))}:host([pref-contrast=more]):host([variant=aqua][message]){--mds-file-preview-icon-background:rgb(var(--label-aqua-10,199 245 253));--mds-file-preview-icon-color:rgb(var(--label-aqua-02,2 75 88));--mds-file-preview-color:rgb(var(--label-aqua-01,2 50 59))}:host([pref-contrast=more]):host([variant=blue][message]){--mds-file-preview-icon-background:rgb(var(--label-blue-10,233 236 254));--mds-file-preview-icon-color:rgb(var(--label-blue-02,7 39 192));--mds-file-preview-color:rgb(var(--label-blue-01,5 26 127))}:host([pref-contrast=more]):host([variant=green][message]){--mds-file-preview-icon-background:rgb(var(--label-green-10,206 247 221));--mds-file-preview-icon-color:rgb(var(--label-green-02,14 80 38));--mds-file-preview-color:rgb(var(--label-green-01,9 52 25))}:host([pref-contrast=more]):host([variant=lime][message]){--mds-file-preview-icon-background:rgb(var(--label-lime-10,219 247 178));--mds-file-preview-icon-color:rgb(var(--label-lime-02,49 76 8));--mds-file-preview-color:rgb(var(--label-lime-01,33 51 6))}:host([pref-contrast=more]):host([variant=orange][message]){--mds-file-preview-icon-background:rgb(var(--label-orange-10,254 233 219));--mds-file-preview-icon-color:rgb(var(--label-orange-02,114 48 3));--mds-file-preview-color:rgb(var(--label-orange-01,76 32 2))}:host([pref-contrast=more]):host([variant=orchid][message]){--mds-file-preview-icon-background:rgb(var(--label-orchid-10,253 231 242));--mds-file-preview-icon-color:rgb(var(--label-orchid-02,127 13 70));--mds-file-preview-color:rgb(var(--label-orchid-01,85 9 47))}:host([pref-contrast=more]):host([variant=purple][message]){--mds-file-preview-icon-background:rgb(var(--label-purple-10,244 233 254));--mds-file-preview-icon-color:rgb(var(--label-purple-02,90 8 168));--mds-file-preview-color:rgb(var(--label-purple-01,60 5 112))}:host([pref-contrast=more]):host([variant=red][message]){--mds-file-preview-icon-background:rgb(var(--label-red-10,252 233 233));--mds-file-preview-icon-color:rgb(var(--label-red-02,131 17 17));--mds-file-preview-color:rgb(var(--label-red-01,87 11 11))}:host([pref-contrast=more]):host([variant=sky][message]){--mds-file-preview-icon-background:rgb(var(--label-sky-10,217 241 253));--mds-file-preview-icon-color:rgb(var(--label-sky-02,6 73 104));--mds-file-preview-color:rgb(var(--label-sky-01,4 48 68))}:host([pref-contrast=more]):host([variant=violet][message]){--mds-file-preview-icon-background:rgb(var(--label-violet-10,240 234 254));--mds-file-preview-icon-color:rgb(var(--label-violet-02,65 11 190));--mds-file-preview-color:rgb(var(--label-violet-01,43 7 127))}:host([pref-contrast=more]):host([variant=yellow][message]){--mds-file-preview-icon-background:rgb(var(--label-yellow-10,253 236 186));--mds-file-preview-icon-color:rgb(var(--label-yellow-02,87 67 3));--mds-file-preview-color:rgb(var(--label-yellow-01,58 44 2))}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-file-preview-transition-duration:0s}:host([pref-mode=dark]:not([pref-theme-scheme=light])){-webkit-box-shadow:var(--shadow-ring,0 0 0 1px rgb(var(--tone-neutral-01,5 5 5)/.3));box-shadow:var(--shadow-ring,0 0 0 1px rgb(var(--tone-neutral-01,5 5 5)/.3))}:host([pref-contrast=more]){--mds-file-preview-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));-webkit-box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3));box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}@media (prefers-contrast:more){:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=primary][message]){--mds-file-preview-icon-background:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))));--mds-file-preview-icon-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))));--mds-file-preview-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=info][message]){--mds-file-preview-icon-background:rgb(var(--magma-info-wash-soft,var(--status-info-10,220 240 250)));--mds-file-preview-icon-color:rgb(var(--magma-info-text-muted,var(--text-info-muted,0 71 114)));--mds-file-preview-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=success][message]){--mds-file-preview-icon-background:rgb(var(--magma-success-wash-soft,var(--status-success-10,220 243 227)));--mds-file-preview-icon-color:rgb(var(--magma-success-text-muted,var(--text-success-muted,0 80 7)));--mds-file-preview-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=warning][message]){--mds-file-preview-icon-background:rgb(var(--magma-warning-wash-soft,var(--status-warning-10,255 237 181)));--mds-file-preview-icon-color:rgb(var(--magma-warning-text-muted,var(--text-warning-muted,88 66 0)));--mds-file-preview-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=error][message]){--mds-file-preview-icon-background:rgb(var(--magma-danger-wash-soft,var(--status-error-10,255 232 230)));--mds-file-preview-icon-color:rgb(var(--magma-danger-text-muted,var(--text-error-muted,132 0 11)));--mds-file-preview-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=amaranth][message]){--mds-file-preview-icon-background:rgb(var(--label-amaranth-10,254 232 236));--mds-file-preview-icon-color:rgb(var(--label-amaranth-02,131 8 29));--mds-file-preview-color:rgb(var(--label-amaranth-01,88 5 19))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=aqua][message]){--mds-file-preview-icon-background:rgb(var(--label-aqua-10,199 245 253));--mds-file-preview-icon-color:rgb(var(--label-aqua-02,2 75 88));--mds-file-preview-color:rgb(var(--label-aqua-01,2 50 59))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=blue][message]){--mds-file-preview-icon-background:rgb(var(--label-blue-10,233 236 254));--mds-file-preview-icon-color:rgb(var(--label-blue-02,7 39 192));--mds-file-preview-color:rgb(var(--label-blue-01,5 26 127))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=green][message]){--mds-file-preview-icon-background:rgb(var(--label-green-10,206 247 221));--mds-file-preview-icon-color:rgb(var(--label-green-02,14 80 38));--mds-file-preview-color:rgb(var(--label-green-01,9 52 25))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=lime][message]){--mds-file-preview-icon-background:rgb(var(--label-lime-10,219 247 178));--mds-file-preview-icon-color:rgb(var(--label-lime-02,49 76 8));--mds-file-preview-color:rgb(var(--label-lime-01,33 51 6))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=orange][message]){--mds-file-preview-icon-background:rgb(var(--label-orange-10,254 233 219));--mds-file-preview-icon-color:rgb(var(--label-orange-02,114 48 3));--mds-file-preview-color:rgb(var(--label-orange-01,76 32 2))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=orchid][message]){--mds-file-preview-icon-background:rgb(var(--label-orchid-10,253 231 242));--mds-file-preview-icon-color:rgb(var(--label-orchid-02,127 13 70));--mds-file-preview-color:rgb(var(--label-orchid-01,85 9 47))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=purple][message]){--mds-file-preview-icon-background:rgb(var(--label-purple-10,244 233 254));--mds-file-preview-icon-color:rgb(var(--label-purple-02,90 8 168));--mds-file-preview-color:rgb(var(--label-purple-01,60 5 112))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=red][message]){--mds-file-preview-icon-background:rgb(var(--label-red-10,252 233 233));--mds-file-preview-icon-color:rgb(var(--label-red-02,131 17 17));--mds-file-preview-color:rgb(var(--label-red-01,87 11 11))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=sky][message]){--mds-file-preview-icon-background:rgb(var(--label-sky-10,217 241 253));--mds-file-preview-icon-color:rgb(var(--label-sky-02,6 73 104));--mds-file-preview-color:rgb(var(--label-sky-01,4 48 68))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=violet][message]){--mds-file-preview-icon-background:rgb(var(--label-violet-10,240 234 254));--mds-file-preview-icon-color:rgb(var(--label-violet-02,65 11 190));--mds-file-preview-color:rgb(var(--label-violet-01,43 7 127))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=yellow][message]){--mds-file-preview-icon-background:rgb(var(--label-yellow-10,253 236 186));--mds-file-preview-icon-color:rgb(var(--label-yellow-02,87 67 3));--mds-file-preview-color:rgb(var(--label-yellow-01,58 44 2))}:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-file-preview-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));-webkit-box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3));box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-file-preview-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){-webkit-box-shadow:var(--shadow-ring,0 0 0 1px rgb(var(--tone-neutral-01,5 5 5)/.3));box-shadow:var(--shadow-ring,0 0 0 1px rgb(var(--tone-neutral-01,5 5 5)/.3))}}"};var MdsFilePreview=/** @class */function(){function e(e){var r=this;registerInstance(this,e);this.downloadedEvent=createEvent(this,"mdsFileDownload",7);this.deletedEvent=createEvent(this,"mdsFileDelete",7);this.t=new Locale({el:Object.assign(Object.assign({},localeEl),fileDescriptionLocaleEl),en:Object.assign(Object.assign({},localeEn),fileDescriptionLocaleEn),es:Object.assign(Object.assign({},localeEs),fileDescriptionLocaleEs),it:Object.assign(Object.assign({},localeIt),fileDescriptionLocaleIt)});
26
+ return I===ARRAY?L:I===OBJECT?{value:L[0],symbol:L[1],exponent:q,unit:z}:L.join(h)}var remove$3="Αφαιρέστε το αρχείο από την ουρά μεταφόρτωσης";var localeEl={remove:remove$3};var remove$2="Remove file from upload queue";var localeEn={remove:remove$2};var remove$1="Eliminar archivo de la cola de carga";var localeEs={remove:remove$1};var remove="Rimuovi file dalla coda di upload";var localeIt={remove:remove};var mdsFilePreviewCss=function(){return"@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-badge,mds-button,mds-icon,mds-img,mds-text):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-file-preview-background-color:rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248))));--mds-file-preview-border-radius:var(--magma-radius-2xl,var(--radius-squircle-2xl,40px));--mds-file-preview-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--mds-file-preview-icon-background:inherit;--mds-file-preview-icon-color:var(--mds-file-preview-color,rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73)))));--mds-file-preview-transition-duration:0s;--private-file-preview-padding:calc(var(--spacing,.0025rem)*400);--private-file-preview-transition-duration:var(--mds-file-preview-transition-duration);background-color:var(--mds-file-preview-background-color,rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248)))));border-radius:var(--mds-file-preview-border-radius,var(--magma-radius-2xl,var(--radius-squircle-2xl,40px)));-webkit-box-shadow:var(--shadow-box-md,#0000000f 0 0 0 1px,#00000008 0 1px 1px -.5px,#0000000a 0 2px 2px -1px,#0000000a 0 3px 3px -1.5px,#00000008 0 5px 5px -2.5px,#00000008 0 10px 10px -5px,#00000008 0 24px 24px -8px);box-shadow:var(--shadow-box-md,#0000000f 0 0 0 1px,#00000008 0 1px 1px -.5px,#0000000a 0 2px 2px -1px,#0000000a 0 3px 3px -1.5px,#00000008 0 5px 5px -2.5px,#00000008 0 10px 10px -5px,#00000008 0 24px 24px -8px);corner-shape:var(--magma-corner-shape,squircle);align-items:stretch;fill:var(--mds-file-preview-color,rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73)))));-ms-flex-pack:stretch;display:flex;justify-content:stretch;overflow:hidden;position:relative;-webkit-transition-duration:var(--private-file-preview-transition-duration);transition-duration:var(--private-file-preview-transition-duration)}.card{display:grid;gap:calc(var(--spacing,.0025rem)*200);grid-template-columns:repeat(1,minmax(1px,100%));padding:var(--private-file-preview-padding)}.card,.preview{corner-shape:inherit;width:100%}.preview{aspect-ratio:var(--aspect-square,1/1);background-color:var(--mds-file-preview-icon-background);border-radius:max(0px,calc(var(--mds-file-preview-border-radius,var(--magma-radius-2xl,var(--radius-squircle-2xl,40px))) - var(--private-file-preview-padding)));box-sizing:border-box;color:var(--mds-file-preview-color,rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73)))));fill:var(--mds-file-preview-icon-color,rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73)))));-webkit-transition-duration:inherit;transition-duration:inherit}.preview--image{filter:brightness(.975);padding:0!important}.preview--icon,.preview--status{align-items:center;display:flex;flex-direction:column;justify-content:center}.preview--status{gap:calc(var(--spacing,.0025rem)*200);padding:calc(var(--spacing,.0025rem)*400)}.icon{height:calc(var(--spacing,.0025rem)*1200);width:calc(var(--spacing,.0025rem)*1200)}.message{text-align:center}.action-delete{background-color:var(--mds-file-preview-background-color,rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248)))));position:absolute;right:0;top:0;z-index:10}.infos{align-items:baseline;display:flex;gap:calc(var(--spacing,.0025rem)*200)}.suffix{flex-shrink:0}.infos--has-file-size{justify-content:space-between}.file-name{--mds-text-line-clamp:2}:host([format=archive]),:host([format=executable]){--mds-file-preview-color:rgb(var(--label-amaranth-04,213 12 47));--mds-file-preview-icon-background:rgb(var(--label-amaranth-10,254 232 236));--mds-file-preview-icon-color:rgb(var(--label-amaranth-04,213 12 47))}:host([format=attachment]){--mds-file-preview-color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))));--mds-file-preview-icon-background:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))));--mds-file-preview-icon-color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:host([format=audio]),:host([format=video]){--mds-file-preview-color:rgb(var(--label-violet-04,126 73 245));--mds-file-preview-icon-background:rgb(var(--label-violet-10,240 234 254));--mds-file-preview-icon-color:rgb(var(--label-violet-04,126 73 245))}:host([format=code]),:host([format=data]),:host([format=markup]){--mds-file-preview-color:rgb(var(--label-yellow-04,141 107 5));--mds-file-preview-icon-background:rgb(var(--label-yellow-10,253 236 186));--mds-file-preview-icon-color:rgb(var(--label-yellow-04,141 107 5))}:host([format=certificate]),:host([format=document]){--mds-file-preview-color:rgb(var(--label-orange-04,185 78 5));--mds-file-preview-icon-background:rgb(var(--label-orange-10,254 233 219));--mds-file-preview-icon-color:rgb(var(--label-orange-04,185 78 5))}:host([format=email]),:host([format=text]){--mds-file-preview-color:rgb(var(--label-blue-04,63 94 248));--mds-file-preview-icon-background:rgb(var(--label-blue-10,233 236 254));--mds-file-preview-icon-color:rgb(var(--label-blue-04,63 94 248))}:host([format=image]){--mds-file-preview-color:rgb(var(--label-green-04,22 128 61));--mds-file-preview-icon-background:rgb(var(--label-green-10,206 247 221));--mds-file-preview-icon-color:rgb(var(--label-green-04,22 128 61))}:host([format=slide]){--mds-file-preview-color:rgb(var(--label-orchid-04,206 21 113));--mds-file-preview-icon-background:rgb(var(--label-orchid-10,253 231 242));--mds-file-preview-icon-color:rgb(var(--label-orchid-04,206 21 113))}:host([format=spreadsheet]){--mds-file-preview-color:rgb(var(--label-lime-04,81 124 13));--mds-file-preview-icon-background:rgb(var(--label-lime-10,219 247 178));--mds-file-preview-icon-color:rgb(var(--label-lime-04,81 124 13))}:host([format=vector]){--mds-file-preview-color:rgb(var(--label-aqua-04,4 122 143));--mds-file-preview-icon-background:rgb(var(--label-aqua-10,199 245 253));--mds-file-preview-icon-color:rgb(var(--label-aqua-04,4 122 143))}:host([variant=primary][message]){--mds-file-preview-icon-background:rgb(var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231))));--mds-file-preview-icon-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))}:host([variant=info][message]){--mds-file-preview-icon-background:rgb(var(--magma-info-wash-base,var(--status-info-09,193 230 246)));--mds-file-preview-icon-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)));--mds-file-preview-color:rgb(var(--magma-info-text-subtle,var(--text-info-subtle,0 94 137)))}:host([variant=success][message]){--mds-file-preview-icon-background:rgb(var(--magma-success-wash-base,var(--status-success-09,191 233 205)));--mds-file-preview-icon-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)));--mds-file-preview-color:rgb(var(--magma-success-text-subtle,var(--text-success-subtle,0 102 32)))}:host([variant=warning][message]){--mds-file-preview-icon-background:rgb(var(--magma-warning-wash-base,var(--status-warning-09,255 220 117)));--mds-file-preview-icon-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)));--mds-file-preview-color:rgb(var(--magma-warning-text-subtle,var(--text-warning-subtle,113 85 0)))}:host([variant=error][message]){--mds-file-preview-icon-background:rgb(var(--magma-danger-wash-base,var(--status-error-09,255 214 211)));--mds-file-preview-icon-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)));--mds-file-preview-color:rgb(var(--magma-danger-text-subtle,var(--text-error-subtle,165 33 40)))}:host([variant=amaranth][message]){--mds-file-preview-icon-background:rgb(var(--label-amaranth-09,253 214 221));--mds-file-preview-icon-color:rgb(var(--label-amaranth-04,213 12 47));--mds-file-preview-color:rgb(var(--label-amaranth-03,170 10 37))}:host([variant=aqua][message]){--mds-file-preview-icon-background:rgb(var(--label-aqua-09,151 237 252));--mds-file-preview-icon-color:rgb(var(--label-aqua-04,4 122 143));--mds-file-preview-color:rgb(var(--label-aqua-03,3 97 114))}:host([variant=blue][message]){--mds-file-preview-icon-background:rgb(var(--label-blue-09,216 222 254));--mds-file-preview-icon-color:rgb(var(--label-blue-04,63 94 248));--mds-file-preview-color:rgb(var(--label-blue-03,11 51 246))}:host([variant=green][message]){--mds-file-preview-icon-background:rgb(var(--label-green-09,165 240 193));--mds-file-preview-icon-color:rgb(var(--label-green-04,22 128 61));--mds-file-preview-color:rgb(var(--label-green-03,18 103 49))}:host([variant=lime][message]){--mds-file-preview-icon-background:rgb(var(--label-lime-09,189 239 111));--mds-file-preview-icon-color:rgb(var(--label-lime-04,81 124 13));--mds-file-preview-color:rgb(var(--label-lime-03,64 99 11))}:host([variant=orange][message]){--mds-file-preview-icon-background:rgb(var(--label-orange-09,253 217 191));--mds-file-preview-icon-color:rgb(var(--label-orange-04,185 78 5));--mds-file-preview-color:rgb(var(--label-orange-03,147 63 4))}:host([variant=orchid][message]){--mds-file-preview-icon-background:rgb(var(--label-orchid-09,251 213 232));--mds-file-preview-icon-color:rgb(var(--label-orchid-04,206 21 113));--mds-file-preview-color:rgb(var(--label-orchid-03,165 17 90))}:host([variant=purple][message]){--mds-file-preview-icon-background:rgb(var(--label-purple-09,235 216 253));--mds-file-preview-icon-color:rgb(var(--label-purple-04,150 51 245));--mds-file-preview-color:rgb(var(--label-purple-03,116 10 217))}:host([variant=red][message]){--mds-file-preview-icon-background:rgb(var(--label-red-09,250 215 215));--mds-file-preview-icon-color:rgb(var(--label-red-04,212 28 28));--mds-file-preview-color:rgb(var(--label-red-03,169 22 22))}:host([variant=sky][message]){--mds-file-preview-icon-background:rgb(var(--label-sky-09,185 231 251));--mds-file-preview-icon-color:rgb(var(--label-sky-04,10 118 167));--mds-file-preview-color:rgb(var(--label-sky-03,8 94 133))}:host([variant=violet][message]){--mds-file-preview-icon-background:rgb(var(--label-violet-09,229 218 253));--mds-file-preview-icon-color:rgb(var(--label-violet-04,126 73 245));--mds-file-preview-color:rgb(var(--label-violet-03,87 20 242))}:host([variant=yellow][message]){--mds-file-preview-icon-background:rgb(var(--label-yellow-09,251 221 131));--mds-file-preview-icon-color:rgb(var(--label-yellow-04,141 107 5));--mds-file-preview-color:rgb(var(--label-yellow-03,112 85 4))}:host([pref-contrast=more]):host([variant=primary][message]){--mds-file-preview-icon-background:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))));--mds-file-preview-icon-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))));--mds-file-preview-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([pref-contrast=more]):host([variant=info][message]){--mds-file-preview-icon-background:rgb(var(--magma-info-wash-soft,var(--status-info-10,220 240 250)));--mds-file-preview-icon-color:rgb(var(--magma-info-text-muted,var(--text-info-muted,0 71 114)));--mds-file-preview-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}:host([pref-contrast=more]):host([variant=success][message]){--mds-file-preview-icon-background:rgb(var(--magma-success-wash-soft,var(--status-success-10,220 243 227)));--mds-file-preview-icon-color:rgb(var(--magma-success-text-muted,var(--text-success-muted,0 80 7)));--mds-file-preview-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:host([pref-contrast=more]):host([variant=warning][message]){--mds-file-preview-icon-background:rgb(var(--magma-warning-wash-soft,var(--status-warning-10,255 237 181)));--mds-file-preview-icon-color:rgb(var(--magma-warning-text-muted,var(--text-warning-muted,88 66 0)));--mds-file-preview-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:host([pref-contrast=more]):host([variant=error][message]){--mds-file-preview-icon-background:rgb(var(--magma-danger-wash-soft,var(--status-error-10,255 232 230)));--mds-file-preview-icon-color:rgb(var(--magma-danger-text-muted,var(--text-error-muted,132 0 11)));--mds-file-preview-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:host([pref-contrast=more]):host([variant=amaranth][message]){--mds-file-preview-icon-background:rgb(var(--label-amaranth-10,254 232 236));--mds-file-preview-icon-color:rgb(var(--label-amaranth-02,131 8 29));--mds-file-preview-color:rgb(var(--label-amaranth-01,88 5 19))}:host([pref-contrast=more]):host([variant=aqua][message]){--mds-file-preview-icon-background:rgb(var(--label-aqua-10,199 245 253));--mds-file-preview-icon-color:rgb(var(--label-aqua-02,2 75 88));--mds-file-preview-color:rgb(var(--label-aqua-01,2 50 59))}:host([pref-contrast=more]):host([variant=blue][message]){--mds-file-preview-icon-background:rgb(var(--label-blue-10,233 236 254));--mds-file-preview-icon-color:rgb(var(--label-blue-02,7 39 192));--mds-file-preview-color:rgb(var(--label-blue-01,5 26 127))}:host([pref-contrast=more]):host([variant=green][message]){--mds-file-preview-icon-background:rgb(var(--label-green-10,206 247 221));--mds-file-preview-icon-color:rgb(var(--label-green-02,14 80 38));--mds-file-preview-color:rgb(var(--label-green-01,9 52 25))}:host([pref-contrast=more]):host([variant=lime][message]){--mds-file-preview-icon-background:rgb(var(--label-lime-10,219 247 178));--mds-file-preview-icon-color:rgb(var(--label-lime-02,49 76 8));--mds-file-preview-color:rgb(var(--label-lime-01,33 51 6))}:host([pref-contrast=more]):host([variant=orange][message]){--mds-file-preview-icon-background:rgb(var(--label-orange-10,254 233 219));--mds-file-preview-icon-color:rgb(var(--label-orange-02,114 48 3));--mds-file-preview-color:rgb(var(--label-orange-01,76 32 2))}:host([pref-contrast=more]):host([variant=orchid][message]){--mds-file-preview-icon-background:rgb(var(--label-orchid-10,253 231 242));--mds-file-preview-icon-color:rgb(var(--label-orchid-02,127 13 70));--mds-file-preview-color:rgb(var(--label-orchid-01,85 9 47))}:host([pref-contrast=more]):host([variant=purple][message]){--mds-file-preview-icon-background:rgb(var(--label-purple-10,244 233 254));--mds-file-preview-icon-color:rgb(var(--label-purple-02,90 8 168));--mds-file-preview-color:rgb(var(--label-purple-01,60 5 112))}:host([pref-contrast=more]):host([variant=red][message]){--mds-file-preview-icon-background:rgb(var(--label-red-10,252 233 233));--mds-file-preview-icon-color:rgb(var(--label-red-02,131 17 17));--mds-file-preview-color:rgb(var(--label-red-01,87 11 11))}:host([pref-contrast=more]):host([variant=sky][message]){--mds-file-preview-icon-background:rgb(var(--label-sky-10,217 241 253));--mds-file-preview-icon-color:rgb(var(--label-sky-02,6 73 104));--mds-file-preview-color:rgb(var(--label-sky-01,4 48 68))}:host([pref-contrast=more]):host([variant=violet][message]){--mds-file-preview-icon-background:rgb(var(--label-violet-10,240 234 254));--mds-file-preview-icon-color:rgb(var(--label-violet-02,65 11 190));--mds-file-preview-color:rgb(var(--label-violet-01,43 7 127))}:host([pref-contrast=more]):host([variant=yellow][message]){--mds-file-preview-icon-background:rgb(var(--label-yellow-10,253 236 186));--mds-file-preview-icon-color:rgb(var(--label-yellow-02,87 67 3));--mds-file-preview-color:rgb(var(--label-yellow-01,58 44 2))}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-file-preview-transition-duration:0s}:host([pref-mode=dark]:not([pref-theme-scheme=light])){-webkit-box-shadow:var(--shadow-ring,0 0 0 1px rgb(var(--tone-neutral-01,5 5 5)/.3));box-shadow:var(--shadow-ring,0 0 0 1px rgb(var(--tone-neutral-01,5 5 5)/.3))}:host([pref-contrast=more]){--mds-file-preview-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));-webkit-box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3));box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}@media (prefers-contrast:more){:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=primary][message]){--mds-file-preview-icon-background:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))));--mds-file-preview-icon-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))));--mds-file-preview-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=info][message]){--mds-file-preview-icon-background:rgb(var(--magma-info-wash-soft,var(--status-info-10,220 240 250)));--mds-file-preview-icon-color:rgb(var(--magma-info-text-muted,var(--text-info-muted,0 71 114)));--mds-file-preview-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=success][message]){--mds-file-preview-icon-background:rgb(var(--magma-success-wash-soft,var(--status-success-10,220 243 227)));--mds-file-preview-icon-color:rgb(var(--magma-success-text-muted,var(--text-success-muted,0 80 7)));--mds-file-preview-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=warning][message]){--mds-file-preview-icon-background:rgb(var(--magma-warning-wash-soft,var(--status-warning-10,255 237 181)));--mds-file-preview-icon-color:rgb(var(--magma-warning-text-muted,var(--text-warning-muted,88 66 0)));--mds-file-preview-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=error][message]){--mds-file-preview-icon-background:rgb(var(--magma-danger-wash-soft,var(--status-error-10,255 232 230)));--mds-file-preview-icon-color:rgb(var(--magma-danger-text-muted,var(--text-error-muted,132 0 11)));--mds-file-preview-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=amaranth][message]){--mds-file-preview-icon-background:rgb(var(--label-amaranth-10,254 232 236));--mds-file-preview-icon-color:rgb(var(--label-amaranth-02,131 8 29));--mds-file-preview-color:rgb(var(--label-amaranth-01,88 5 19))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=aqua][message]){--mds-file-preview-icon-background:rgb(var(--label-aqua-10,199 245 253));--mds-file-preview-icon-color:rgb(var(--label-aqua-02,2 75 88));--mds-file-preview-color:rgb(var(--label-aqua-01,2 50 59))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=blue][message]){--mds-file-preview-icon-background:rgb(var(--label-blue-10,233 236 254));--mds-file-preview-icon-color:rgb(var(--label-blue-02,7 39 192));--mds-file-preview-color:rgb(var(--label-blue-01,5 26 127))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=green][message]){--mds-file-preview-icon-background:rgb(var(--label-green-10,206 247 221));--mds-file-preview-icon-color:rgb(var(--label-green-02,14 80 38));--mds-file-preview-color:rgb(var(--label-green-01,9 52 25))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=lime][message]){--mds-file-preview-icon-background:rgb(var(--label-lime-10,219 247 178));--mds-file-preview-icon-color:rgb(var(--label-lime-02,49 76 8));--mds-file-preview-color:rgb(var(--label-lime-01,33 51 6))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=orange][message]){--mds-file-preview-icon-background:rgb(var(--label-orange-10,254 233 219));--mds-file-preview-icon-color:rgb(var(--label-orange-02,114 48 3));--mds-file-preview-color:rgb(var(--label-orange-01,76 32 2))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=orchid][message]){--mds-file-preview-icon-background:rgb(var(--label-orchid-10,253 231 242));--mds-file-preview-icon-color:rgb(var(--label-orchid-02,127 13 70));--mds-file-preview-color:rgb(var(--label-orchid-01,85 9 47))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=purple][message]){--mds-file-preview-icon-background:rgb(var(--label-purple-10,244 233 254));--mds-file-preview-icon-color:rgb(var(--label-purple-02,90 8 168));--mds-file-preview-color:rgb(var(--label-purple-01,60 5 112))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=red][message]){--mds-file-preview-icon-background:rgb(var(--label-red-10,252 233 233));--mds-file-preview-icon-color:rgb(var(--label-red-02,131 17 17));--mds-file-preview-color:rgb(var(--label-red-01,87 11 11))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=sky][message]){--mds-file-preview-icon-background:rgb(var(--label-sky-10,217 241 253));--mds-file-preview-icon-color:rgb(var(--label-sky-02,6 73 104));--mds-file-preview-color:rgb(var(--label-sky-01,4 48 68))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=violet][message]){--mds-file-preview-icon-background:rgb(var(--label-violet-10,240 234 254));--mds-file-preview-icon-color:rgb(var(--label-violet-02,65 11 190));--mds-file-preview-color:rgb(var(--label-violet-01,43 7 127))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))):host([variant=yellow][message]){--mds-file-preview-icon-background:rgb(var(--label-yellow-10,253 236 186));--mds-file-preview-icon-color:rgb(var(--label-yellow-02,87 67 3));--mds-file-preview-color:rgb(var(--label-yellow-01,58 44 2))}:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-file-preview-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));-webkit-box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3));box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-file-preview-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){-webkit-box-shadow:var(--shadow-ring,0 0 0 1px rgb(var(--tone-neutral-01,5 5 5)/.3));box-shadow:var(--shadow-ring,0 0 0 1px rgb(var(--tone-neutral-01,5 5 5)/.3))}}"};var MdsFilePreview=/** @class */function(){function e(e){var r=this;registerInstance(this,e);this.downloadedEvent=createEvent(this,"mdsFileDownload",7);this.deletedEvent=createEvent(this,"mdsFileDelete",7);this.t=new Locale({el:Object.assign(Object.assign({},localeEl),fileDescriptionLocaleEl),en:Object.assign(Object.assign({},localeEn),fileDescriptionLocaleEn),es:Object.assign(Object.assign({},localeEs),fileDescriptionLocaleEs),it:Object.assign(Object.assign({},localeIt),fileDescriptionLocaleIt)});
27
27
  /**
28
28
  * Truncates the filename shown
29
- */this.truncate="word";this.getDefaultKeyDescription=function(){return getExtensionInfos(r.filename,r.suffix).description};this.onClickDeletedEvent=function(){r.deletedEvent.emit({target:r.host,filename:r.filename,extension:getSuffix(r.filename,r.suffix)})};this.onClickDownloadEvent=function(){r.downloadedEvent.emit({target:r.host,filename:r.filename,extension:getSuffix(r.filename,r.suffix)})}}e.prototype.componentWillLoad=function(){this.format=getExtensionInfos(this.filename,this.suffix).format};e.prototype.componentDidLoad=function(){this.handleDownloadable(this.downloadable)};e.prototype.handleFilename=function(e){this.format=getExtensionInfos(e,this.suffix).format};e.prototype.handleDownloadable=function(e,r){var a;if(e===r)return;var i=(a=this.host.shadowRoot)===null||a===void 0?void 0:a.querySelector(".card");if(e){i===null||i===void 0?void 0:i.addEventListener("click",this.onClickDownloadEvent);return}i===null||i===void 0?void 0:i.removeEventListener("click",this.onClickDownloadEvent)};e.prototype.render=function(){var e,r,a;return h(Host,{key:"389451c485ded68d3d3d99e950ec2e2ad08f4ac9","pref-animation":preferenceStore.state.animation,"pref-contrast":preferenceStore.state.contrast,"pref-mode":preferenceStore.state.mode,"pref-theme-scheme":preferenceStore.state["theme-scheme"]},this.deletable&&h("mds-button",{key:"e04b3974185c09a3d9407b74168a37afce9d23de",title:this.t.get("remove"),class:"action-delete",icon:miBaselineCancel,variant:"light",onClick:this.onClickDeletedEvent}),h("div",{key:"f899421ec875a83f2593890e0a736759b903b24f",class:"card",part:"card",onClick:this.onClickDownloadEvent},this.src!==undefined&&this.src!==""&&(this.message===undefined||this.message==="")&&getExtensionInfos(this.filename,this.suffix).preview?h("mds-img",{src:this.src,class:"preview preview--image","aspect-ratio":"1/1"}):h("div",{class:clsx("preview",this.message===undefined||this.message===""?"preview--icon":"preview--status")},this.icon!==undefined&&this.icon!==""?h("mds-icon",{class:"icon",name:this.icon}):h("mds-icon",{class:"icon",name:getFormatsVariant(this.filename,this.suffix).icon}),this.message&&h("mds-text",{class:"message",typography:"caption",variant:"info"},this.message)),h("mds-text",{key:"32d3359b9c41a845001e17987ce703219ba29843",class:"file-name",typography:"h6",variant:"title",truncate:this.truncate,title:this.filename},this.filename),h("div",{key:"79e555cedfc5d35b2d54ec6a3aee7591cc0edf2e",class:clsx("infos",this.filesize&&"infos--has-file-size")},this.filesize&&this.filesize===Number(this.filesize).toString()&&h("mds-text",{key:"84e7d78e1d0639e637173a1c781a61f21e459b6d",class:"file-size",truncate:"word",typography:"caption",variant:"info"},filesize(Number(this.filesize),{standard:"jedec"})),this.filesize&&this.filesize!==Number(this.filesize).toString()&&h("mds-text",{key:"8945ff2c6224b7a4803390eae2fc12474903a3dd",class:"file-size",truncate:"word",typography:"caption",variant:"info"},this.filesize),getSuffix(this.filename,this.suffix)&&h("mds-badge",{key:"5581cb1f4d13f6f15f28c0957094dcd5982f0a0f",variant:getFormatsVariant(this.filename,this.suffix).variant,tone:"weak",class:"suffix",title:(e=this.description)!==null&&e!==void 0?e:this.t.get(this.getDefaultKeyDescription())},getSuffix(this.filename,this.suffix)),(this.filesize===undefined||this.filesize==="")&&h("mds-text",{key:"d743b838cc6fa9fed0f5cdf7914c7652bfc3e1ac",class:"description",truncate:"word",typography:"caption",variant:"info",title:(r=this.description)!==null&&r!==void 0?r:this.t.get(this.getDefaultKeyDescription())},(a=this.description)!==null&&a!==void 0?a:this.t.get(this.getDefaultKeyDescription())))))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{filename:[{handleFilename:0}],downloadable:[{handleDownloadable:0}]}},enumerable:false,configurable:true});return e}();MdsFilePreview.style=mdsFilePreviewCss();export{MdsFilePreview as mds_file_preview};
29
+ */this.truncate="word";this.getDefaultKeyDescription=function(){return getExtensionInfos(r.filename,r.suffix).description};this.onClickDeletedEvent=function(){r.deletedEvent.emit({target:r.host,filename:r.filename,extension:getSuffix(r.filename,r.suffix)})};this.onClickDownloadEvent=function(){r.downloadedEvent.emit({target:r.host,filename:r.filename,extension:getSuffix(r.filename,r.suffix)})}}e.prototype.componentWillLoad=function(){this.format=getExtensionInfos(this.filename,this.suffix).format};e.prototype.componentDidLoad=function(){this.handleDownloadable(this.downloadable)};e.prototype.handleFilename=function(e){this.format=getExtensionInfos(e,this.suffix).format};e.prototype.handleDownloadable=function(e,r){var a;if(e===r)return;var i=(a=this.host.shadowRoot)===null||a===void 0?void 0:a.querySelector(".card");if(e){i===null||i===void 0?void 0:i.addEventListener("click",this.onClickDownloadEvent);return}i===null||i===void 0?void 0:i.removeEventListener("click",this.onClickDownloadEvent)};e.prototype.render=function(){var e,r,a,i,t,o,s;
30
+ // a removed attribute or a null bound by a framework counts as not set, like an empty value
31
+ var l=((e=this.message)!==null&&e!==void 0?e:"")!=="";return h(Host,{key:"4450e7351e840c4b0f7d72c9b1bc441d9087ad7e","pref-animation":preferenceStore.state.animation,"pref-contrast":preferenceStore.state.contrast,"pref-mode":preferenceStore.state.mode,"pref-theme-scheme":preferenceStore.state["theme-scheme"]},this.deletable&&h("mds-button",{key:"8f1d4ced62f8c479a5e1c324b5ce940cf7aa2d84",title:this.t.get("remove"),class:"action-delete",icon:miBaselineCancel,variant:"light",onClick:this.onClickDeletedEvent}),h("div",{key:"45d38745f7466b0da5b8f2724879ef46d6826bfd",class:"card",part:"card",onClick:this.onClickDownloadEvent},((r=this.src)!==null&&r!==void 0?r:"")!==""&&!l&&getExtensionInfos(this.filename,this.suffix).preview?h("mds-img",{src:this.src,class:"preview preview--image","aspect-ratio":"1/1"}):h("div",{class:clsx("preview",l?"preview--status":"preview--icon")},((a=this.icon)!==null&&a!==void 0?a:"")!==""?h("mds-icon",{class:"icon",name:this.icon}):h("mds-icon",{class:"icon",name:getFormatsVariant(this.filename,this.suffix).icon}),this.message&&h("mds-text",{class:"message",typography:"caption",variant:"info"},this.message)),h("mds-text",{key:"e87d673948267ccf70636d4c2940fb8885f2fb96",class:"file-name",typography:"h6",variant:"title",truncate:this.truncate,title:this.filename},this.filename),h("div",{key:"25e05eb7f5bef19a392b87401f2e780bd8e605cd",class:clsx("infos",this.filesize&&"infos--has-file-size")},this.filesize&&this.filesize===Number(this.filesize).toString()&&h("mds-text",{key:"cdd7ebbbc99f90caee0c49d74a4b8f4ce0769a2a",class:"file-size",truncate:"word",typography:"caption",variant:"info"},filesize(Number(this.filesize),{standard:"jedec"})),this.filesize&&this.filesize!==Number(this.filesize).toString()&&h("mds-text",{key:"381998bfae5b4d76fed78c70f38ef2aab5d13f9e",class:"file-size",truncate:"word",typography:"caption",variant:"info"},this.filesize),getSuffix(this.filename,this.suffix)&&h("mds-badge",{key:"89f980cf0ec10d220c83f5a6e8ded4a4d9491a0c",variant:getFormatsVariant(this.filename,this.suffix).variant,tone:"weak",class:"suffix",title:(i=this.description)!==null&&i!==void 0?i:this.t.get(this.getDefaultKeyDescription())},getSuffix(this.filename,this.suffix)),((t=this.filesize)!==null&&t!==void 0?t:"")===""&&h("mds-text",{key:"f29356eb97dbb5bc137d3d278176633ce938111f",class:"description",truncate:"word",typography:"caption",variant:"info",title:(o=this.description)!==null&&o!==void 0?o:this.t.get(this.getDefaultKeyDescription())},(s=this.description)!==null&&s!==void 0?s:this.t.get(this.getDefaultKeyDescription())))))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{filename:[{handleFilename:0}],downloadable:[{handleDownloadable:0}]}},enumerable:false,configurable:true});return e}();MdsFilePreview.style=mdsFilePreviewCss();export{MdsFilePreview as mds_file_preview};
@@ -1,4 +1,4 @@
1
- import{r as registerInstance,d as createEvent,h,e as Host,g as getElement}from"./index-DIiEV39g.js";import{a as getAugmentedNamespace,c as commonjsGlobal}from"./_commonjsHelpers-E-ZsRS8r.js";import{f as fileDescriptionLocaleIt,a as fileDescriptionLocaleEs,b as fileDescriptionLocaleEn,c as fileDescriptionLocaleEl,g as getExtensionInfos,d as getSuffix,h as getName,e as getFormatsVariant}from"./locale.it-Dj8sWDfj.js";import{L as Locale}from"./locale-CbJbTW_c.js";import{p as preferenceStore}from"./preference-CKerJx2M.js";import"./file-extensions-BxIk5ZFV.js";import"./panorama-b1ORvfSX.js";var cryptoJs$1={exports:{}};function commonjsRequire(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var core$1={exports:{}};var _nodeResolve_empty={};var _nodeResolve_empty$1=Object.freeze({__proto__:null,default:_nodeResolve_empty});var require$$0=getAugmentedNamespace(_nodeResolve_empty$1);var core=core$1.exports;var hasRequiredCore;function requireCore(){if(hasRequiredCore)return core$1.exports;hasRequiredCore=1;(function(r,e){(function(e,a){{
1
+ import{r as registerInstance,d as createEvent,h,e as Host,g as getElement}from"./index-DIiEV39g.js";import{a as getAugmentedNamespace,c as commonjsGlobal}from"./_commonjsHelpers-E-ZsRS8r.js";import{f as fileDescriptionLocaleIt,a as fileDescriptionLocaleEs,b as fileDescriptionLocaleEn,c as fileDescriptionLocaleEl,g as getExtensionInfos,d as getSuffix,h as getName,e as getFormatsVariant}from"./locale.it-Cvxh7La5.js";import{L as Locale}from"./locale-CbJbTW_c.js";import{p as preferenceStore}from"./preference-CKerJx2M.js";import"./file-extensions-BxIk5ZFV.js";import"./panorama-b1ORvfSX.js";var cryptoJs$1={exports:{}};function commonjsRequire(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var core$1={exports:{}};var _nodeResolve_empty={};var _nodeResolve_empty$1=Object.freeze({__proto__:null,default:_nodeResolve_empty});var require$$0=getAugmentedNamespace(_nodeResolve_empty$1);var core=core$1.exports;var hasRequiredCore;function requireCore(){if(hasRequiredCore)return core$1.exports;hasRequiredCore=1;(function(r,e){(function(e,a){{
2
2
  // CommonJS
3
3
  r.exports=a()}})(core,(function(){
4
4
  /*globals window, global, require*/
@@ -1164,7 +1164,7 @@ var f=[];(function(){for(var r=0;r<80;r++){f[r]=v()}})();
1164
1164
  // Shortcuts
1165
1165
  var a=this._hash.words;var i=a[0];var t=a[1];var n=a[2];var o=a[3];var s=a[4];var v=a[5];var c=a[6];var d=a[7];var h=i.high;var l=i.low;var p=t.high;var m=t.low;var b=n.high;var g=n.low;var q=o.high;var w=o.low;var x=s.high;var y=s.low;var $=v.high;var C=v.low;var R=c.high;var k=c.low;var S=d.high;var E=d.low;
1166
1166
  // Working variables
1167
- var B=h;var _=l;var M=p;var z=m;var I=b;var P=g;var D=q;var F=w;var L=x;var A=y;var j=$;var H=C;var O=R;var T=k;var U=S;var N=E;
1167
+ var B=h;var _=l;var M=p;var z=m;var I=b;var P=g;var F=q;var D=w;var L=x;var A=y;var H=$;var O=C;var j=R;var T=k;var U=S;var N=E;
1168
1168
  // Rounds
1169
1169
  for(var J=0;J<80;J++){var G;var Z;
1170
1170
  // Shortcut
@@ -1172,19 +1172,19 @@ var X=f[J];
1172
1172
  // Extend message
1173
1173
  if(J<16){Z=X.high=r[e+J*2]|0;G=X.low=r[e+J*2+1]|0}else{
1174
1174
  // Gamma0
1175
- var Y=f[J-15];var V=Y.high;var W=Y.low;var K=(V>>>1|W<<31)^(V>>>8|W<<24)^V>>>7;var Q=(W>>>1|V<<31)^(W>>>8|V<<24)^(W>>>7|V<<25);
1175
+ var Y=f[J-15];var V=Y.high;var K=Y.low;var W=(V>>>1|K<<31)^(V>>>8|K<<24)^V>>>7;var Q=(K>>>1|V<<31)^(K>>>8|V<<24)^(K>>>7|V<<25);
1176
1176
  // Gamma1
1177
1177
  var rr=f[J-2];var er=rr.high;var ar=rr.low;var ir=(er>>>19|ar<<13)^(er<<3|ar>>>29)^er>>>6;var tr=(ar>>>19|er<<13)^(ar<<3|er>>>29)^(ar>>>6|er<<26);
1178
1178
  // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]
1179
- var nr=f[J-7];var or=nr.high;var sr=nr.low;var vr=f[J-16];var ur=vr.high;var fr=vr.low;G=Q+sr;Z=K+or+(G>>>0<Q>>>0?1:0);G=G+tr;Z=Z+ir+(G>>>0<tr>>>0?1:0);G=G+fr;Z=Z+ur+(G>>>0<fr>>>0?1:0);X.high=Z;X.low=G}var cr=L&j^~L&O;var dr=A&H^~A&T;var hr=B&M^B&I^M&I;var lr=_&z^_&P^z&P;var pr=(B>>>28|_<<4)^(B<<30|_>>>2)^(B<<25|_>>>7);var mr=(_>>>28|B<<4)^(_<<30|B>>>2)^(_<<25|B>>>7);var br=(L>>>14|A<<18)^(L>>>18|A<<14)^(L<<23|A>>>9);var gr=(A>>>14|L<<18)^(A>>>18|L<<14)^(A<<23|L>>>9);
1179
+ var nr=f[J-7];var or=nr.high;var sr=nr.low;var vr=f[J-16];var ur=vr.high;var fr=vr.low;G=Q+sr;Z=W+or+(G>>>0<Q>>>0?1:0);G=G+tr;Z=Z+ir+(G>>>0<tr>>>0?1:0);G=G+fr;Z=Z+ur+(G>>>0<fr>>>0?1:0);X.high=Z;X.low=G}var cr=L&H^~L&j;var dr=A&O^~A&T;var hr=B&M^B&I^M&I;var lr=_&z^_&P^z&P;var pr=(B>>>28|_<<4)^(B<<30|_>>>2)^(B<<25|_>>>7);var mr=(_>>>28|B<<4)^(_<<30|B>>>2)^(_<<25|B>>>7);var br=(L>>>14|A<<18)^(L>>>18|A<<14)^(L<<23|A>>>9);var gr=(A>>>14|L<<18)^(A>>>18|L<<14)^(A<<23|L>>>9);
1180
1180
  // t1 = h + sigma1 + ch + K[i] + W[i]
1181
1181
  var qr=u[J];var wr=qr.high;var xr=qr.low;var yr=N+gr;var $r=U+br+(yr>>>0<N>>>0?1:0);var yr=yr+dr;var $r=$r+cr+(yr>>>0<dr>>>0?1:0);var yr=yr+xr;var $r=$r+wr+(yr>>>0<xr>>>0?1:0);var yr=yr+G;var $r=$r+Z+(yr>>>0<G>>>0?1:0);
1182
1182
  // t2 = sigma0 + maj
1183
1183
  var Cr=mr+lr;var Rr=pr+hr+(Cr>>>0<mr>>>0?1:0);
1184
1184
  // Update working variables
1185
- U=O;N=T;O=j;T=H;j=L;H=A;A=F+yr|0;L=D+$r+(A>>>0<F>>>0?1:0)|0;D=I;F=P;I=M;P=z;M=B;z=_;_=yr+Cr|0;B=$r+Rr+(_>>>0<yr>>>0?1:0)|0}
1185
+ U=j;N=T;j=H;T=O;H=L;O=A;A=D+yr|0;L=F+$r+(A>>>0<D>>>0?1:0)|0;F=I;D=P;I=M;P=z;M=B;z=_;_=yr+Cr|0;B=$r+Rr+(_>>>0<yr>>>0?1:0)|0}
1186
1186
  // Intermediate hash value
1187
- l=i.low=l+_;i.high=h+B+(l>>>0<_>>>0?1:0);m=t.low=m+z;t.high=p+M+(m>>>0<z>>>0?1:0);g=n.low=g+P;n.high=b+I+(g>>>0<P>>>0?1:0);w=o.low=w+F;o.high=q+D+(w>>>0<F>>>0?1:0);y=s.low=y+A;s.high=x+L+(y>>>0<A>>>0?1:0);C=v.low=C+H;v.high=$+j+(C>>>0<H>>>0?1:0);k=c.low=k+T;c.high=R+O+(k>>>0<T>>>0?1:0);E=d.low=E+N;d.high=S+U+(E>>>0<N>>>0?1:0)},_doFinalize:function(){
1187
+ l=i.low=l+_;i.high=h+B+(l>>>0<_>>>0?1:0);m=t.low=m+z;t.high=p+M+(m>>>0<z>>>0?1:0);g=n.low=g+P;n.high=b+I+(g>>>0<P>>>0?1:0);w=o.low=w+D;o.high=q+F+(w>>>0<D>>>0?1:0);y=s.low=y+A;s.high=x+L+(y>>>0<A>>>0?1:0);C=v.low=C+O;v.high=$+H+(C>>>0<O>>>0?1:0);k=c.low=k+T;c.high=R+j+(k>>>0<T>>>0?1:0);E=d.low=E+N;d.high=S+U+(E>>>0<N>>>0?1:0)},_doFinalize:function(){
1188
1188
  // Shortcuts
1189
1189
  var r=this._data;var e=r.words;var a=this._nDataBytes*8;var i=r.sigBytes*8;
1190
1190
  // Add padding
@@ -1,4 +1,4 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,a,r){function i(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function d(e){try{s(r.next(e))}catch(e){n(e)}}function o(e){try{s(r["throw"](e))}catch(e){n(e)}}function s(e){e.done?a(e.value):i(e.value).then(d,o)}s((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,i,n,d=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return d.next=o(0),d["throw"]=o(1),d["return"]=o(2),typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function o(e){return function(t){return s([e,t])}}function s(o){if(r)throw new TypeError("Generator is already executing.");while(d&&(d=0,o[0]&&(a=0)),a)try{if(r=1,i&&(n=o[0]&2?i["return"]:o[0]?i["throw"]||((n=i["return"])&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;if(i=0,n)o=[o[0]&2,n.value];switch(o[0]){case 0:case 1:n=o;break;case 4:a.label++;return{value:o[1],done:false};case 5:a.label++;i=o[1];o=[0];continue;case 7:o=a.ops.pop();a.trys.pop();continue;default:if(!(n=a.trys,n=n.length>0&&n[n.length-1])&&(o[0]===6||o[0]===2)){a=0;continue}if(o[0]===3&&(!n||o[1]>n[0]&&o[1]<n[3])){a.label=o[1];break}if(o[0]===6&&a.label<n[1]){a.label=n[1];n=o;break}if(n&&a.label<n[2]){a.label=n[2];a.ops.push(o);break}if(n[2])a.ops.pop();a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e];i=0}finally{r=n=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,d as createEvent,h,e as Host,g as getElement}from"./index-DIiEV39g.js";import{a as queryChildBySlot}from"./slot-C0o_l0td.js";import{p as preferenceStore}from"./preference-CKerJx2M.js";var mdsHeaderCss=function(){return'@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-modal:not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-header-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-header-hidden-bar-translate-inline:translateY(-150%);--mds-header-hidden-bar-translate-stripe:translateY(-110%);--mds-header-icon-color:var(--mds-header-color,rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)))));--mds-header-modal-icon-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-header-backdrop-blur-strength:2px;--mds-header-backdrop-height:calc(var(--spacing,.0025rem)*1600);--mds-header-backdrop-show:true;--mds-header-z-index:var(--magma-header-z-index,1000);--mds-header-inline-margin-mobile:calc(var(--spacing,.0025rem)*400);--mds-header-inline-margin:calc(var(--spacing,.0025rem)*600);--mds-header-backdrop-background-image:linear-gradient(0deg,#0000,#00000026);--private-mask-opacity:1;color:var(--mds-header-color,rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)))));display:block;fill:var(--mds-header-icon-color,rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)))));position:relative;z-index:var(--mds-header-z-index)}.modal{--mds-modal-close-icon-color:var(--mds-header-modal-icon-color,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))));z-index:var(--mds-header-z-index)}:host([appearance=inline]) ::slotted(mds-header-bar){--mds-header-inline-margin-current:var(--mds-header-inline-margin,calc(var(--spacing,.0025rem)*600));border-radius:var(--radius-lg,16px);margin-bottom:var(--mds-header-inline-margin-current);margin-top:var(--mds-header-inline-margin-current);max-width:var(--breakpoint-wide,1280px);width:calc(100% - var(--mds-header-inline-margin-current)*2)}:host([menu=none]) .menu{display:none}:host([visibility=hidden][appearance=stripe]) ::slotted(mds-header-bar){-webkit-transform:var(--mds-header-hidden-bar-translate-stripe);transform:var(--mds-header-hidden-bar-translate-stripe)}:host([visibility=hidden][appearance=inline]) ::slotted(mds-header-bar){-webkit-transform:var(--mds-header-hidden-bar-translate-inline);transform:var(--mds-header-hidden-bar-translate-inline)}.backdrop{align-items:center;-webkit-backdrop-filter:blur(var(--mds-header-backdrop-blur-strength,10px));backdrop-filter:blur(var(--mds-header-backdrop-blur-strength,10px));background-image:var(--mds-header-backdrop-background-image);content:"";display:flex;height:var(--mds-header-backdrop-height,calc(var(--spacing,.0025rem)*1600));inset:0;opacity:1;position:fixed;transform:translate(0);transition-duration:.2s;transition-property:opacity,transform;width:100%}.backdrop-blur-item{--private-gradient-position:calc(100% - (sibling-count() - sibling-index())*5%);display:none}.backdrop-blur-item:first-child{--private-gradient-position:100%}.backdrop-blur-item:nth-child(2){--private-gradient-position:95%}.backdrop-blur-item:nth-child(3){--private-gradient-position:90%}.backdrop-blur-item:nth-child(4){--private-gradient-position:85%}.backdrop-blur-item:nth-child(5){--private-gradient-position:80%}.backdrop-blur-item:nth-child(6){--private-gradient-position:75%}.backdrop-blur-item:nth-child(7){--private-gradient-position:70%}.backdrop-blur-item:nth-child(8){--private-gradient-position:65%}.backdrop-blur-item:nth-child(9){--private-gradient-position:60%}.backdrop-blur-item:nth-child(10){--private-gradient-position:55%}.backdrop-blur-item:nth-child(11){--private-gradient-position:50%}@supports ((-webkit-mask-image:linear-gradient(rgb(0 0 0/1),transparent)) or (mask-image:linear-gradient(rgb(0 0 0/1),transparent))){.backdrop{-webkit-backdrop-filter:none;backdrop-filter:none;background-image:none}.backdrop-blur-item{-webkit-backdrop-filter:blur(var(--mds-header-backdrop-blur-strength,1px));backdrop-filter:blur(var(--mds-header-backdrop-blur-strength,1px));display:flex;inset:0;-webkit-mask-image:-webkit-gradient(linear,left top,left bottom,color-stop(40%,rgb(0 0 0/var(--private-mask-opacity,1))),to(#0000));mask-image:-webkit-gradient(linear,left top,left bottom,color-stop(40%,rgb(0 0 0/var(--private-mask-opacity,1))),to(#0000));-webkit-mask-image:linear-gradient(to bottom,rgb(0 0 0/var(--private-mask-opacity,1)) 40%,#0000 var(--private-gradient-position,100%));mask-image:linear-gradient(to bottom,rgb(0 0 0/var(--private-mask-opacity,1)) 40%,#0000 var(--private-gradient-position,100%));pointer-events:none;position:absolute}}:host([appearance=inline]) .backdrop{transform:translate(0)}:host([appearance=stripe]) .backdrop,:host([visibility=hidden]) .backdrop{--mds-header-backdrop-blur-strength:0px;transform:translateY(-100%)}@container style(--mds-header-backdrop-show:false){.backdrop{display:none}}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-header-modal-icon-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([pref-consumption=high]) .backdrop{--mds-header-backdrop-background-image:none}:host([pref-consumption=medium]) .backdrop{--mds-header-backdrop-blur-strength:1px}:host([pref-consumption=low]) .backdrop{--mds-header-backdrop-blur-strength:0px;display:none}@media (max-width:767px){:host([appearance=inline]) ::slotted(mds-header-bar){--mds-header-inline-margin-current:var(--mds-header-inline-margin-mobile,calc(var(--spacing,.0025rem)*400))}}@media not all and (min-width:768px){:host([menu=desktop]) .menu{display:none}}@media (min-width:1024px){:host([menu=mobile]) .menu{display:none}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-header-modal-icon-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}}'};var MdsHeader=/** @class */function(){function e(e){var t=this;registerInstance(this,e);this.closedEvent=createEvent(this,"mdsHeaderClose",7);this.visibleEvent=createEvent(this,"mdsHeaderVisibilityChange",7);this.relativeTresholdDown=0;this.relativePosition=0;this.relativeThresholdUp=0;this.sanitizedAppearance=["stripe"];this.appearanceThreshold=300;
1
+ var __awaiter=this&&this.__awaiter||function(e,t,r,a){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function d(e){try{s(a.next(e))}catch(e){n(e)}}function o(e){try{s(a["throw"](e))}catch(e){n(e)}}function s(e){e.done?r(e.value):i(e.value).then(d,o)}s((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,i,n,d=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return d.next=o(0),d["throw"]=o(1),d["return"]=o(2),typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function o(e){return function(t){return s([e,t])}}function s(o){if(a)throw new TypeError("Generator is already executing.");while(d&&(d=0,o[0]&&(r=0)),r)try{if(a=1,i&&(n=o[0]&2?i["return"]:o[0]?i["throw"]||((n=i["return"])&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;if(i=0,n)o=[o[0]&2,n.value];switch(o[0]){case 0:case 1:n=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;i=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(n=r.trys,n=n.length>0&&n[n.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!n||o[1]>n[0]&&o[1]<n[3])){r.label=o[1];break}if(o[0]===6&&r.label<n[1]){r.label=n[1];n=o;break}if(n&&r.label<n[2]){r.label=n[2];r.ops.push(o);break}if(n[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];i=0}finally{a=n=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,d as createEvent,h,e as Host,g as getElement}from"./index-DIiEV39g.js";import{a as queryChildBySlot}from"./slot-C0o_l0td.js";import{p as preferenceStore}from"./preference-CKerJx2M.js";var mdsHeaderCss=function(){return'@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-modal:not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-header-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-header-hidden-bar-translate-inline:translateY(-150%);--mds-header-hidden-bar-translate-stripe:translateY(-110%);--mds-header-icon-color:var(--mds-header-color,rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)))));--mds-header-modal-icon-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-header-backdrop-blur-strength:2px;--mds-header-backdrop-height:calc(var(--spacing,.0025rem)*1600);--mds-header-backdrop-show:true;--mds-header-z-index:var(--magma-header-z-index,1000);--mds-header-inline-margin-mobile:calc(var(--spacing,.0025rem)*400);--mds-header-inline-margin:calc(var(--spacing,.0025rem)*600);--mds-header-backdrop-background-image:linear-gradient(0deg,#0000,#00000026);--private-mask-opacity:1;color:var(--mds-header-color,rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)))));display:block;fill:var(--mds-header-icon-color,rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)))));position:relative;z-index:var(--mds-header-z-index)}.modal{--mds-modal-close-icon-color:var(--mds-header-modal-icon-color,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))));z-index:var(--mds-header-z-index)}:host([appearance=inline]) ::slotted(mds-header-bar){--mds-header-inline-margin-current:var(--mds-header-inline-margin,calc(var(--spacing,.0025rem)*600));border-radius:var(--radius-lg,16px);margin-bottom:var(--mds-header-inline-margin-current);margin-top:var(--mds-header-inline-margin-current);max-width:var(--breakpoint-wide,1280px);width:calc(100% - var(--mds-header-inline-margin-current)*2)}:host([menu=none]) .menu{display:none}:host([visibility=hidden][appearance=stripe]) ::slotted(mds-header-bar){-webkit-transform:var(--mds-header-hidden-bar-translate-stripe);transform:var(--mds-header-hidden-bar-translate-stripe)}:host([visibility=hidden][appearance=inline]) ::slotted(mds-header-bar){-webkit-transform:var(--mds-header-hidden-bar-translate-inline);transform:var(--mds-header-hidden-bar-translate-inline)}.backdrop{align-items:center;-webkit-backdrop-filter:blur(var(--mds-header-backdrop-blur-strength,10px));backdrop-filter:blur(var(--mds-header-backdrop-blur-strength,10px));background-image:var(--mds-header-backdrop-background-image);content:"";display:flex;height:var(--mds-header-backdrop-height,calc(var(--spacing,.0025rem)*1600));inset:0;opacity:1;position:fixed;transform:translate(0);transition-duration:.2s;transition-property:opacity,transform;width:100%}.backdrop-blur-item{--private-gradient-position:calc(100% - (sibling-count() - sibling-index())*5%);display:none}.backdrop-blur-item:first-child{--private-gradient-position:100%}.backdrop-blur-item:nth-child(2){--private-gradient-position:95%}.backdrop-blur-item:nth-child(3){--private-gradient-position:90%}.backdrop-blur-item:nth-child(4){--private-gradient-position:85%}.backdrop-blur-item:nth-child(5){--private-gradient-position:80%}.backdrop-blur-item:nth-child(6){--private-gradient-position:75%}.backdrop-blur-item:nth-child(7){--private-gradient-position:70%}.backdrop-blur-item:nth-child(8){--private-gradient-position:65%}.backdrop-blur-item:nth-child(9){--private-gradient-position:60%}.backdrop-blur-item:nth-child(10){--private-gradient-position:55%}.backdrop-blur-item:nth-child(11){--private-gradient-position:50%}@supports ((-webkit-mask-image:linear-gradient(rgb(0 0 0/1),transparent)) or (mask-image:linear-gradient(rgb(0 0 0/1),transparent))){.backdrop{-webkit-backdrop-filter:none;backdrop-filter:none;background-image:none}.backdrop-blur-item{-webkit-backdrop-filter:blur(var(--mds-header-backdrop-blur-strength,1px));backdrop-filter:blur(var(--mds-header-backdrop-blur-strength,1px));display:flex;inset:0;-webkit-mask-image:-webkit-gradient(linear,left top,left bottom,color-stop(40%,rgb(0 0 0/var(--private-mask-opacity,1))),to(#0000));mask-image:-webkit-gradient(linear,left top,left bottom,color-stop(40%,rgb(0 0 0/var(--private-mask-opacity,1))),to(#0000));-webkit-mask-image:linear-gradient(to bottom,rgb(0 0 0/var(--private-mask-opacity,1)) 40%,#0000 var(--private-gradient-position,100%));mask-image:linear-gradient(to bottom,rgb(0 0 0/var(--private-mask-opacity,1)) 40%,#0000 var(--private-gradient-position,100%));pointer-events:none;position:absolute}}:host([appearance=inline]) .backdrop{transform:translate(0)}:host([appearance=stripe]) .backdrop,:host([visibility=hidden]) .backdrop{--mds-header-backdrop-blur-strength:0px;transform:translateY(-100%)}@container style(--mds-header-backdrop-show:false){.backdrop{display:none}}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-header-modal-icon-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([pref-consumption=high]) .backdrop{--mds-header-backdrop-background-image:none}:host([pref-consumption=medium]) .backdrop{--mds-header-backdrop-blur-strength:1px}:host([pref-consumption=low]) .backdrop{--mds-header-backdrop-blur-strength:0px;display:none}@media (max-width:767px){:host([appearance=inline]) ::slotted(mds-header-bar){--mds-header-inline-margin-current:var(--mds-header-inline-margin-mobile,calc(var(--spacing,.0025rem)*400))}}@media not all and (min-width:768px){:host([menu=desktop]) .menu{display:none}}@media (min-width:1024px){:host([menu=mobile]) .menu{display:none}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-header-modal-icon-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}}'};var MdsHeader=/** @class */function(){function e(e){var t=this;registerInstance(this,e);this.closedEvent=createEvent(this,"mdsHeaderClose",7);this.visibleEvent=createEvent(this,"mdsHeaderVisibilityChange",7);this.relativeTresholdDown=0;this.relativePosition=0;this.relativeThresholdUp=0;this.sanitizedAppearance=["stripe"];this.appearanceThreshold=300;
2
2
  /**
3
3
  * Sets the appearance of the header bar element when loaded,
4
4
  * it can be changed depending on how `appearance-set` attribute is set
@@ -17,14 +17,16 @@ var __awaiter=this&&this.__awaiter||function(e,t,a,r){function i(e){return e ins
17
17
  */this.threshold=1;
18
18
  /**
19
19
  * Sets the visibility type of the navigation menu of mds-header-bar
20
- */this.visibility="visible";this.mobileMenu=function(){return queryChildBySlot(t.host,"menu")};this.close=function(){t.isOpened=false;t.closedEvent.emit({bar:t.headerBar});t.headerBar.setOpened(false)};this.handleVisibility=function(){if(t.autoHide===undefined||t.autoHide===0||Number.isNaN(t.autoHide)){return}
20
+ */this.visibility="visible";this.mobileMenu=function(){return queryChildBySlot(t.host,"menu")};this.close=function(){t.isOpened=false;t.closedEvent.emit({bar:t.headerBar});t.headerBar.setOpened(false)};
21
+ // a removed attribute leaves null, which turns the auto hide off like 0
22
+ this.getAutoHide=function(){var e;var r=(e=t.autoHide)!==null&&e!==void 0?e:0;return Number.isNaN(r)?0:r};this.handleVisibility=function(){var e=t.getAutoHide();if(e===0){return}
21
23
  // reset var if the page is scrolled to top
22
- if(window.scrollY<t.autoHide){t.visibility="visible";t.relativeThresholdUp=0;t.relativeTresholdDown=0;t.relativePosition=0;return}if(t.relativeTresholdDown-window.scrollY<=0){t.visibility="hidden";t.relativePosition=t.relativeTresholdDown}if(t.relativeThresholdUp-window.scrollY>=t.threshold){t.visibility="visible";t.relativeThresholdUp=window.scrollY;t.relativePosition=t.relativeThresholdUp}
24
+ if(window.scrollY<e){t.visibility="visible";t.relativeThresholdUp=0;t.relativeTresholdDown=0;t.relativePosition=0;return}if(t.relativeTresholdDown-window.scrollY<=0){t.visibility="hidden";t.relativePosition=t.relativeTresholdDown}if(t.relativeThresholdUp-window.scrollY>=t.threshold){t.visibility="visible";t.relativeThresholdUp=window.scrollY;t.relativePosition=t.relativeThresholdUp}
23
25
  // set hidden for the first scroll from top
24
- if(t.relativePosition<t.autoHide&&t.autoHide-window.scrollY<=0){t.visibility="hidden";t.relativePosition=t.autoHide}
26
+ if(t.relativePosition<e&&e-window.scrollY<=0){t.visibility="hidden";t.relativePosition=e}
25
27
  // update respective threshold if page is scrolled up or down
26
- if(window.scrollY>t.relativeThresholdUp){t.relativeThresholdUp=window.scrollY}else{t.relativeTresholdDown=window.scrollY+t.threshold}};this.sanitizeAppearance=function(){if(t.appearanceSet===undefined||t.appearanceSet===""){return[t.appearance]}var e=/\b(\w+)\b/g;var a=t.appearanceSet.match(e);if(a){return a}return[t.appearance]};this.handleAppearance=function(){var e,a;if(window.scrollY>=t.appearanceThreshold){t.appearance=(e=t.sanitizedAppearance[1])!==null&&e!==void 0?e:t.appearance;return}t.appearance=(a=t.sanitizedAppearance[0])!==null&&a!==void 0?a:t.appearance};this.handleScroll=function(){if(typeof window==="undefined")return;if(t.autoHide!==undefined&&t.autoHide!==0&&!Number.isNaN(t.autoHide)){t.handleVisibility()}if(t.sanitizedAppearance.length>1){t.handleAppearance()}};this.setAppearanceSetData=function(){t.sanitizedAppearance=t.sanitizeAppearance();if(t.sanitizedAppearance[2]!==undefined&&t.sanitizedAppearance[2]!==0&&!Number.isNaN(t.sanitizedAppearance[2])){t.appearanceThreshold=t.sanitizedAppearance[2]}t.relativeTresholdDown=t.threshold};this.initScrollListener=function(){if(typeof window==="undefined"){return}t.setAppearanceSetData();window.addEventListener("scroll",t.handleScroll)};this.defineHeaderBar=function(){t.headerBar=t.host.querySelector("mds-header-bar")}}
28
+ if(window.scrollY>t.relativeThresholdUp){t.relativeThresholdUp=window.scrollY}else{t.relativeTresholdDown=window.scrollY+t.threshold}};this.sanitizeAppearance=function(){var e;var r=(e=t.appearanceSet)!==null&&e!==void 0?e:"";if(r===""){return[t.appearance]}var a=/\b(\w+)\b/g;var i=r.match(a);if(i){return i}return[t.appearance]};this.handleAppearance=function(){var e,r;if(window.scrollY>=t.appearanceThreshold){t.appearance=(e=t.sanitizedAppearance[1])!==null&&e!==void 0?e:t.appearance;return}t.appearance=(r=t.sanitizedAppearance[0])!==null&&r!==void 0?r:t.appearance};this.handleScroll=function(){if(typeof window==="undefined")return;if(t.getAutoHide()!==0){t.handleVisibility()}if(t.sanitizedAppearance.length>1){t.handleAppearance()}};this.setAppearanceSetData=function(){t.sanitizedAppearance=t.sanitizeAppearance();if(t.sanitizedAppearance[2]!==undefined&&t.sanitizedAppearance[2]!==0&&!Number.isNaN(t.sanitizedAppearance[2])){t.appearanceThreshold=t.sanitizedAppearance[2]}t.relativeTresholdDown=t.threshold};this.initScrollListener=function(){if(typeof window==="undefined"){return}t.setAppearanceSetData();window.addEventListener("scroll",t.handleScroll)};this.defineHeaderBar=function(){t.headerBar=t.host.querySelector("mds-header-bar")}}
27
29
  /**
28
30
  * Opens or closes the header.
29
31
  * @param isOpened whether the header should be opened
30
- */e.prototype.setOpened=function(){return __awaiter(this,arguments,void 0,(function(e){if(e===void 0){e=true}return __generator(this,(function(t){this.isOpened=e;return[2/*return*/]}))}))};e.prototype.disconnectedCallback=function(){if(typeof window==="undefined"){return}window.removeEventListener("scroll",this.handleScroll)};e.prototype.componentWillLoad=function(){this.hasMenu=this.mobileMenu()!==null;if(this.hasMenu){this.onMenuChangedHandler(this.menu);return}this.onMenuChangedHandler("none")};e.prototype.componentDidLoad=function(){this.defineHeaderBar();this.onMenuChangedHandler(this.menu);this.onNavChangedHandler(this.nav);this.initScrollListener()};e.prototype.onMenuChangedHandler=function(e,t){if(e===t){return}if(this.headerBar!=null){this.headerBar.menu=e}};e.prototype.onNavChangedHandler=function(e,t){if(e===t){return}if(this.headerBar!=null){this.headerBar.nav=e}};e.prototype.onAppearanceSetChangedHandler=function(){this.setAppearanceSetData()};e.prototype.handleVisibilityChange=function(e,t){if(e!==t){this.visibleEvent.emit({visibility:e})}};e.prototype.render=function(){return h(Host,{key:"c6555033c0158d17685d8b7162c45866f8037285","pref-consumption":preferenceStore.state.consumption,"pref-mode":preferenceStore.state.mode,"pref-theme-scheme":preferenceStore.state["theme-scheme"]},!this.hideBackdrop&&h("div",{key:"fe183e0caf03b46b982bc18efb99ec0919c33f7a",class:"backdrop"},h("div",{key:"466c441e5e99830a95c2a4042e7f35dcc9e939de",class:"backdrop-blur-item"}),h("div",{key:"f4908f6ad7b260300bb8e21941c3af23ab922fd1",class:"backdrop-blur-item"}),h("div",{key:"f303889b90a8e6ea16689c90795890c365f949be",class:"backdrop-blur-item"}),h("div",{key:"8f48b4a5aaeaf05e8631188e2153fbd9da9a5b1b",class:"backdrop-blur-item"}),h("div",{key:"8355bc57ae5af9b902bd58e0ad4a67a492871333",class:"backdrop-blur-item"}),h("div",{key:"ff5c243df68a4dd26baa862abe2a50050e9ed386",class:"backdrop-blur-item"}),h("div",{key:"0f7c9da08faf5ddc14bd34a098003ebe73911b99",class:"backdrop-blur-item"}),h("div",{key:"b36c0beab493efd6736294a5a934556107a6fc13",class:"backdrop-blur-item"}),h("div",{key:"9e39753de2c9f661b3d91cca248e4f222a7e09f3",class:"backdrop-blur-item"}),h("div",{key:"2dbec569325d216a9ef2d414f49b44e6da95db37",class:"backdrop-blur-item"})),h("slot",{key:"d57ef1616405d7f4fb41b4ab7e948b22fb85f409"}),this.hasMenu&&h("div",{key:"3c252d5e09ae4c93e9909533f2d990d18b31e647",class:"menu",part:"menu"},h("mds-modal",{key:"2016f4000527a86b15ca0959347dc229db59f2ad",class:"modal",opened:this.isOpened,onMdsModalClose:this.close,position:"right"},h("slot",{key:"bb7115881458039e1483caf152901c2d35adc44f",name:"menu"}))))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{menu:[{onMenuChangedHandler:0}],nav:[{onNavChangedHandler:0}],appearanceSet:[{onAppearanceSetChangedHandler:0}],visibility:[{handleVisibilityChange:0}]}},enumerable:false,configurable:true});return e}();MdsHeader.style=mdsHeaderCss();export{MdsHeader as mds_header};
32
+ */e.prototype.setOpened=function(){return __awaiter(this,arguments,void 0,(function(e){if(e===void 0){e=true}return __generator(this,(function(t){this.isOpened=e;return[2/*return*/]}))}))};e.prototype.disconnectedCallback=function(){if(typeof window==="undefined"){return}window.removeEventListener("scroll",this.handleScroll)};e.prototype.componentWillLoad=function(){this.hasMenu=this.mobileMenu()!==null;if(this.hasMenu){this.onMenuChangedHandler(this.menu);return}this.onMenuChangedHandler("none")};e.prototype.componentDidLoad=function(){this.defineHeaderBar();this.onMenuChangedHandler(this.menu);this.onNavChangedHandler(this.nav);this.initScrollListener()};e.prototype.onMenuChangedHandler=function(e,t){if(e===t){return}if(this.headerBar!=null){this.headerBar.menu=e}};e.prototype.onNavChangedHandler=function(e,t){if(e===t){return}if(this.headerBar!=null){this.headerBar.nav=e}};e.prototype.onAppearanceSetChangedHandler=function(){this.setAppearanceSetData()};e.prototype.handleVisibilityChange=function(e,t){if(e!==t){this.visibleEvent.emit({visibility:e})}};e.prototype.render=function(){return h(Host,{key:"f672f81878e181d21c234188d2ad02ded1bdb039","pref-consumption":preferenceStore.state.consumption,"pref-mode":preferenceStore.state.mode,"pref-theme-scheme":preferenceStore.state["theme-scheme"]},!this.hideBackdrop&&h("div",{key:"6bf87ed021bcdb62c728fbee3818a8ad11895b06",class:"backdrop"},h("div",{key:"6a3ad84c2e41313c14531b514b2752f972986ec4",class:"backdrop-blur-item"}),h("div",{key:"b8031f912733bcc01f47ae28e756ae9f9f184bf1",class:"backdrop-blur-item"}),h("div",{key:"b9fddc9c2c459bc1b16ef7cc4fe0dd62c6ae0357",class:"backdrop-blur-item"}),h("div",{key:"fb97781789e0773d35b31744a3f28bd23816e9eb",class:"backdrop-blur-item"}),h("div",{key:"1d464ccd4d846ac79d1b0ea303ab66f41af84116",class:"backdrop-blur-item"}),h("div",{key:"7ab61f7f2f21da6ad94408442237b8e2a16d32c1",class:"backdrop-blur-item"}),h("div",{key:"90fb7f3244c8047c6a576288dad756451de07cdf",class:"backdrop-blur-item"}),h("div",{key:"955ff4ac62f6a5e50726fcf5d097202622e760d2",class:"backdrop-blur-item"}),h("div",{key:"49e995993b74ce17e06c3a05004e7411442dd694",class:"backdrop-blur-item"}),h("div",{key:"d0c693752ed5b8eee3f0c6925e158168b4e06822",class:"backdrop-blur-item"})),h("slot",{key:"564de9025f4cdc11edb1dadf27c0c3e03be5d06d"}),this.hasMenu&&h("div",{key:"c6cd25b6e417675a67662bbe4e2a8f0c89e1fd74",class:"menu",part:"menu"},h("mds-modal",{key:"cb330659a98adcf88e8af18097450edb71cb1423",class:"modal",opened:this.isOpened,onMdsModalClose:this.close,position:"right"},h("slot",{key:"d4f1dbcaee3303ad4c2130d7f7d64be3486bdc19",name:"menu"}))))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{menu:[{onMenuChangedHandler:0}],nav:[{onNavChangedHandler:0}],appearanceSet:[{onAppearanceSetChangedHandler:0}],visibility:[{handleVisibilityChange:0}]}},enumerable:false,configurable:true});return e}();MdsHeader.style=mdsHeaderCss();export{MdsHeader as mds_header};
@@ -12,4 +12,4 @@ import{r as registerInstance,d as createEvent,h,e as Host,g as getElement}from".
12
12
  */this.loading="lazy";
13
13
  /**
14
14
  * Specifies which referrer information to use when fetching an image.
15
- */this.referrerpolicy="no-referrer-when-downgrade";this.onSuccess=function(t){a.image=t.target;a.loadSuccessEvent.emit({image:a.image})};this.onError=function(t){a.image=t.target;a.loadErrorEvent.emit({image:a.image});a.imageError=true};this.formatConsumptionData=function(t){var a={};t.split(",").forEach((function(t){var r=t.trim().replace(/[ ]{2,}/g," ").split(" ");if(r[1].toLocaleLowerCase()==="low"){a.low=r[0]}if(r[1].toLocaleLowerCase()==="medium"){a.medium=r[0]}if(r[1].toLocaleLowerCase()==="high"){a.high=r[0]}}));return a};this.autoAltName=function(){if(a.src!==undefined&&a.src!==""){var t=a.src.lastIndexOf("/")+1;return a.src.substring(t)}return""};this.setAriaAttributes=function(){setAttributeIfEmpty(a.host,"aria-label",a.alt)};this.handleConsumptionLoadClick=function(){a.imageConsumptionLoaded=true}}t.prototype.srcsetConsumptionHandler=function(t){this.srcsetConsumptionData=this.formatConsumptionData(t)};t.prototype.srcHandler=function(){this.imageError=false};t.prototype.componentWillLoad=function(){var t;this.consumptionMode=(t=localStorage.getItem("mdsPrefConsumption"))!==null&&t!==void 0?t:"high";if(this.srcsetConsumption!==undefined&&this.srcsetConsumption!==""){this.srcsetConsumptionData=this.formatConsumptionData(this.srcsetConsumption)}this.image=this.host.querySelector("img");if(this.alt===""){this.alt=this.autoAltName()}};t.prototype.componentDidLoad=function(){this.setAriaAttributes()};t.prototype.render=function(){var t,a;if(this.imageError){return h(Host,{"aria-label":this.alt,role:"img"},h("div",{class:"contrast-area-50"}),h("div",{class:"alt-text-container alt-text-container--error alt-text-container--default-aspect-ratio"},h("mds-icon",{class:"icon",name:miBaselineBrokenImage}),h("mds-text",{class:"alt-text","aria-hidden":"true",typography:"h6"},h("i",null,this.alt))))}if(this.srcsetConsumptionData){if(this.consumptionMode==="low"){return h(Host,{"aria-label":this.alt,role:"img",onClick:this.handleConsumptionLoadClick},h("div",{class:"contrast-area-50"}),!this.imageConsumptionLoaded?h("div",{"aria-hidden":"true",class:"alt-text-container alt-text-container--default-aspect-ratio"},h("mds-icon",{class:"icon",name:miBaselinePanorama}),h("mds-text",{class:"alt-text",typography:"h6"},h("i",null,this.alt)),h("mds-button",{"aria-hidden":"true",role:"none",class:"click-to-load",tabIndex:-1,variant:"light",tone:"outline",label:this.t.get("clickToLoad")})):h("img",{alt:this.alt,"aria-hidden":"true",height:this.height,loading:this.loading,onError:this.onError,onLoad:this.onSuccess,part:"media",sizes:this.sizes,src:(t=this.srcsetConsumptionData[this.consumptionMode])!==null&&t!==void 0?t:this.src,srcset:this.srcset,width:this.width}))}return h(Host,{"aria-label":this.alt,role:"img"},h("div",{class:"contrast-area-50"}),h("img",{alt:this.alt,"aria-hidden":"true",height:this.height,loading:this.loading,onError:this.onError,onLoad:this.onSuccess,part:"media",sizes:this.sizes,src:(a=this.srcsetConsumptionData[this.consumptionMode])!==null&&a!==void 0?a:this.src,srcset:this.srcset,width:this.width}))}return h(Host,{"aria-label":this.alt,role:"img"},h("div",{class:"contrast-area-50"}),h("img",{alt:this.alt,"aria-hidden":"true",height:this.height,loading:this.loading,onError:this.onError,onLoad:this.onSuccess,part:"media",sizes:this.sizes,src:this.src,srcset:this.srcset,width:this.width}))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{srcsetConsumption:[{srcsetConsumptionHandler:0}],src:[{srcHandler:0}]}},enumerable:false,configurable:true});return t}();MdsImg.style=mdsImgCss();export{MdsImg as mds_img};
15
+ */this.referrerpolicy="no-referrer-when-downgrade";this.onSuccess=function(t){a.image=t.target;a.loadSuccessEvent.emit({image:a.image})};this.onError=function(t){a.image=t.target;a.loadErrorEvent.emit({image:a.image});a.imageError=true};this.formatConsumptionData=function(t){var a={};t.split(",").forEach((function(t){var r=t.trim().replace(/[ ]{2,}/g," ").split(" ");if(r[1].toLocaleLowerCase()==="low"){a.low=r[0]}if(r[1].toLocaleLowerCase()==="medium"){a.medium=r[0]}if(r[1].toLocaleLowerCase()==="high"){a.high=r[0]}}));return a};this.autoAltName=function(){if(a.src!==undefined&&a.src!==""){var t=a.src.lastIndexOf("/")+1;return a.src.substring(t)}return""};this.setAriaAttributes=function(){setAttributeIfEmpty(a.host,"aria-label",a.alt)};this.handleConsumptionLoadClick=function(){a.imageConsumptionLoaded=true}}t.prototype.srcsetConsumptionHandler=function(t){this.srcsetConsumptionData=this.formatConsumptionData(t)};t.prototype.srcHandler=function(){this.imageError=false};t.prototype.componentWillLoad=function(){var t,a;this.consumptionMode=(t=localStorage.getItem("mdsPrefConsumption"))!==null&&t!==void 0?t:"high";if(this.srcsetConsumption!=null&&this.srcsetConsumption!==""){this.srcsetConsumptionData=this.formatConsumptionData(this.srcsetConsumption)}this.image=this.host.querySelector("img");if(((a=this.alt)!==null&&a!==void 0?a:"")===""){this.alt=this.autoAltName()}};t.prototype.componentDidLoad=function(){this.setAriaAttributes()};t.prototype.render=function(){var t,a;if(this.imageError){return h(Host,{"aria-label":this.alt,role:"img"},h("div",{class:"contrast-area-50"}),h("div",{class:"alt-text-container alt-text-container--error alt-text-container--default-aspect-ratio"},h("mds-icon",{class:"icon",name:miBaselineBrokenImage}),h("mds-text",{class:"alt-text","aria-hidden":"true",typography:"h6"},h("i",null,this.alt))))}if(this.srcsetConsumptionData){if(this.consumptionMode==="low"){return h(Host,{"aria-label":this.alt,role:"img",onClick:this.handleConsumptionLoadClick},h("div",{class:"contrast-area-50"}),!this.imageConsumptionLoaded?h("div",{"aria-hidden":"true",class:"alt-text-container alt-text-container--default-aspect-ratio"},h("mds-icon",{class:"icon",name:miBaselinePanorama}),h("mds-text",{class:"alt-text",typography:"h6"},h("i",null,this.alt)),h("mds-button",{"aria-hidden":"true",role:"none",class:"click-to-load",tabIndex:-1,variant:"light",tone:"outline",label:this.t.get("clickToLoad")})):h("img",{alt:this.alt,"aria-hidden":"true",height:this.height,loading:this.loading,onError:this.onError,onLoad:this.onSuccess,part:"media",sizes:this.sizes,src:(t=this.srcsetConsumptionData[this.consumptionMode])!==null&&t!==void 0?t:this.src,srcset:this.srcset,width:this.width}))}return h(Host,{"aria-label":this.alt,role:"img"},h("div",{class:"contrast-area-50"}),h("img",{alt:this.alt,"aria-hidden":"true",height:this.height,loading:this.loading,onError:this.onError,onLoad:this.onSuccess,part:"media",sizes:this.sizes,src:(a=this.srcsetConsumptionData[this.consumptionMode])!==null&&a!==void 0?a:this.src,srcset:this.srcset,width:this.width}))}return h(Host,{"aria-label":this.alt,role:"img"},h("div",{class:"contrast-area-50"}),h("img",{alt:this.alt,"aria-hidden":"true",height:this.height,loading:this.loading,onError:this.onError,onLoad:this.onSuccess,part:"media",sizes:this.sizes,src:this.src,srcset:this.srcset,width:this.width}))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{srcsetConsumption:[{srcsetConsumptionHandler:0}],src:[{srcHandler:0}]}},enumerable:false,configurable:true});return t}();MdsImg.style=mdsImgCss();export{MdsImg as mds_img};
@@ -27,13 +27,15 @@ var __awaiter=this&&this.__awaiter||function(t,a,e,r){function i(t){return t ins
27
27
  */this.dualCalendar=false;this.lastEmittedStartDate=null;this.lastEmittedEndDate=null;this.initialStartDate="";this.initialEndDate="";this.hoveredCalendarDate=null;this.syncingInputSlots=new Set;this.handleFocusOut=function(t){if(!a.host.contains(t.relatedTarget)){var e=DateTime.fromISO(a.internalStartDate).isValid;var r=DateTime.fromISO(a.internalEndDate).isValid;if(e&&r){a.validateDateRange();a.syncFormValue();a.checkPreselections();a.emitValueChanged()}}};this.focusInput=function(t){t.focusInput()};this.focusDateInput=function(t){if(t.target!==a.host){return}a.focusStartDateInput(t)};this.focusStartDateInput=function(t){t.preventDefault();t.stopPropagation();a.focusInput(a.host.querySelector('mds-input-date[slot="start"]'))};this.focusEndDateInput=function(t){t.preventDefault();t.stopPropagation();a.focusInput(a.host.querySelector('mds-input-date[slot="end"]'))};
28
28
  // the two fields render their native input in their own shadow root, out of reach of the
29
29
  // visible labels of this one: each is named after the range and the end it covers
30
- this.nameSlottedFields=function(){[["start",a.t.get("startDate")],["end",a.t.get("endDate")]].forEach((function(t){var e=t[0],r=t[1];var i;var n=a.host.querySelector('[slot="'.concat(e,'"]'));if(n===null)return;setAttributeIfEmpty(n,"aria-label",((i=a.accessibleName)!==null&&i!==void 0?i:"")!==""?"".concat(a.accessibleName,", ").concat(r):r)}))};this.handleCalendarHover=function(t){if(a.internalStartDate===""||a.internalEndDate!==""){a.clearHoverPreview();return}var e=t.detail.hoverDate;if(a.hoveredCalendarDate===e)return;a.hoveredCalendarDate=e;a.syncCalendarsHoverAttributes()};this.handleCalendarChange=function(t){a.clearHoverPreview();a.internalStartDate=t.detail.startDate;a.updateInputValue("start",a.internalStartDate);if(t.detail.endDate!==undefined&&t.detail.endDate!==""){a.internalEndDate=t.detail.endDate;a.updateInputValue("end",a.internalEndDate)}else{a.internalEndDate="";a.updateInputValue("end",a.internalEndDate)}a.syncFormValue();a.syncCalendarsSelectionAttributes();if(a.internalStartDate!==""&&a.internalEndDate!==""){a.emitValueChanged();a.closeDropdownAfterSelection()}};this.handleCalendarNavigate=function(t){if(!a.dualCalendar)return;var e=a.getCalendars();var r=e.indexOf(t.target);var i=DateTime.fromISO(t.detail.currentDate);if(!i.isValid)return;a.visibleCalendarDate=i.minus({months:r===1?1:0}).startOf("month").toISODate()};this.handleCalendarPreselect=function(){a.checkPreselections()};this.handleOpenCalendarClick=function(){a.calendarKey+=1}}t.prototype.getCalendars=function(){var t,a;return Array.from((a=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("mds-calendar"))!==null&&a!==void 0?a:[])};t.prototype.resolveVisibleCalendarDate=function(t,a){var e;var r=[t,a].map((function(t){return DateTime.fromISO(t!==null&&t!==void 0?t:"")})).filter((function(t){return t.isValid}));var i=(e=r[0])!==null&&e!==void 0?e:DateTime.now();return i.startOf("month").toISODate()};t.prototype.getCalendarViewDate=function(t){if(t===void 0){t=0}var a=DateTime.fromISO(this.visibleCalendarDate);var e=DateTime.fromISO(this.internalStartDate);var r=DateTime.now();if(a.isValid){r=a}else if(e.isValid){r=e}return r.startOf("month").plus({months:t}).toISODate()};t.prototype.setVisibleCalendarDate=function(t){var a=DateTime.fromISO(t);if(a.isValid){this.visibleCalendarDate=a.startOf("month").toISODate()}};t.prototype.closeDropdownAfterSelection=function(){if(this.delay===0)return;var t=this.dropdownRef;if(t){setTimeout((function(){t.visible=false}),this.delay)}};t.prototype.syncCalendarsSelectionAttributes=function(){var t=this;var a;(a=this.host.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll("mds-calendar").forEach((function(a){if(t.internalStartDate!==""){a.setAttribute("start-date",t.internalStartDate)}else{a.removeAttribute("start-date")}if(t.internalEndDate!==""){a.setAttribute("end-date",t.internalEndDate)}else{a.removeAttribute("end-date")}}));this.syncCalendarsHoverAttributes()};t.prototype.syncCalendarsHoverAttributes=function(){var t=this;var a;(a=this.host.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll("mds-calendar").forEach((function(a){if(t.hoveredCalendarDate!==null&&t.hoveredCalendarDate!==""){a.setAttribute("hover-date",t.hoveredCalendarDate)}else{a.removeAttribute("hover-date")}}))};t.prototype.clearHoverPreview=function(){if(this.hoveredCalendarDate===null)return;this.hoveredCalendarDate=null;this.syncCalendarsHoverAttributes()};t.prototype.getEmittableDateRangeDetail=function(){var t=DateTime.fromISO(this.internalStartDate);var a=DateTime.fromISO(this.internalEndDate);if(!t.isValid||!a.isValid){return null}return{startDate:this.internalStartDate,endDate:this.internalEndDate}};t.prototype.emitValueChanged=function(){var t=this.getEmittableDateRangeDetail();if(!t)return false;if(t.startDate===this.lastEmittedStartDate&&t.endDate===this.lastEmittedEndDate){return false}this.valueChanged.emit(t);this.lastEmittedStartDate=t.startDate;this.lastEmittedEndDate=t.endDate;return true};t.prototype.handleStartDateChange=function(t){this.syncExternalDate("start",t)};t.prototype.handleEndDateChange=function(t){this.syncExternalDate("end",t)};t.prototype.componentWillLoad=function(){this.internalStartDate=this.startDate;this.internalEndDate=this.endDate;this.initialStartDate=this.startDate;this.initialEndDate=this.endDate;this.visibleCalendarDate=this.resolveVisibleCalendarDate(this.internalStartDate,this.internalEndDate);
30
+ this.nameSlottedFields=function(){[["start",a.t.get("startDate")],["end",a.t.get("endDate")]].forEach((function(t){var e=t[0],r=t[1];var i;var n=a.host.querySelector('[slot="'.concat(e,'"]'));if(n===null)return;setAttributeIfEmpty(n,"aria-label",((i=a.accessibleName)!==null&&i!==void 0?i:"")!==""?"".concat(a.accessibleName,", ").concat(r):r)}))};this.handleCalendarHover=function(t){if(a.internalStartDate===""||a.internalEndDate!==""){a.clearHoverPreview();return}var e=t.detail.hoverDate;if(a.hoveredCalendarDate===e)return;a.hoveredCalendarDate=e;a.syncCalendarsHoverAttributes()};this.handleCalendarChange=function(t){a.clearHoverPreview();a.internalStartDate=t.detail.startDate;a.updateInputValue("start",a.internalStartDate);if(t.detail.endDate!==undefined&&t.detail.endDate!==""){a.internalEndDate=t.detail.endDate;a.updateInputValue("end",a.internalEndDate)}else{a.internalEndDate="";a.updateInputValue("end",a.internalEndDate)}a.syncFormValue();a.syncCalendarsSelectionAttributes();if(a.internalStartDate!==""&&a.internalEndDate!==""){a.emitValueChanged();a.closeDropdownAfterSelection()}};this.handleCalendarNavigate=function(t){if(!a.dualCalendar)return;var e=a.getCalendars();var r=e.indexOf(t.target);var i=DateTime.fromISO(t.detail.currentDate);if(!i.isValid)return;a.visibleCalendarDate=i.minus({months:r===1?1:0}).startOf("month").toISODate()};this.handleCalendarPreselect=function(){a.checkPreselections()};this.handleOpenCalendarClick=function(){a.calendarKey+=1}}t.prototype.getCalendars=function(){var t,a;return Array.from((a=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("mds-calendar"))!==null&&a!==void 0?a:[])};t.prototype.resolveVisibleCalendarDate=function(t,a){var e;var r=[t,a].map((function(t){return DateTime.fromISO(t!==null&&t!==void 0?t:"")})).filter((function(t){return t.isValid}));var i=(e=r[0])!==null&&e!==void 0?e:DateTime.now();return i.startOf("month").toISODate()};t.prototype.getCalendarViewDate=function(t){if(t===void 0){t=0}var a=DateTime.fromISO(this.visibleCalendarDate);var e=DateTime.fromISO(this.internalStartDate);var r=DateTime.now();if(a.isValid){r=a}else if(e.isValid){r=e}return r.startOf("month").plus({months:t}).toISODate()};t.prototype.setVisibleCalendarDate=function(t){var a=DateTime.fromISO(t);if(a.isValid){this.visibleCalendarDate=a.startOf("month").toISODate()}};t.prototype.closeDropdownAfterSelection=function(){if(this.delay===0)return;var t=this.dropdownRef;if(t){setTimeout((function(){t.visible=false}),this.delay)}};t.prototype.syncCalendarsSelectionAttributes=function(){var t=this;var a;(a=this.host.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll("mds-calendar").forEach((function(a){if(t.internalStartDate!==""){a.setAttribute("start-date",t.internalStartDate)}else{a.removeAttribute("start-date")}if(t.internalEndDate!==""){a.setAttribute("end-date",t.internalEndDate)}else{a.removeAttribute("end-date")}}));this.syncCalendarsHoverAttributes()};t.prototype.syncCalendarsHoverAttributes=function(){var t=this;var a;(a=this.host.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll("mds-calendar").forEach((function(a){if(t.hoveredCalendarDate!==null&&t.hoveredCalendarDate!==""){a.setAttribute("hover-date",t.hoveredCalendarDate)}else{a.removeAttribute("hover-date")}}))};t.prototype.clearHoverPreview=function(){if(this.hoveredCalendarDate===null)return;this.hoveredCalendarDate=null;this.syncCalendarsHoverAttributes()};t.prototype.getEmittableDateRangeDetail=function(){var t=DateTime.fromISO(this.internalStartDate);var a=DateTime.fromISO(this.internalEndDate);if(!t.isValid||!a.isValid){return null}return{startDate:this.internalStartDate,endDate:this.internalEndDate}};t.prototype.emitValueChanged=function(){var t=this.getEmittableDateRangeDetail();if(!t)return false;if(t.startDate===this.lastEmittedStartDate&&t.endDate===this.lastEmittedEndDate){return false}this.valueChanged.emit(t);this.lastEmittedStartDate=t.startDate;this.lastEmittedEndDate=t.endDate;return true};t.prototype.handleStartDateChange=function(t){this.syncExternalDate("start",t)};t.prototype.handleEndDateChange=function(t){this.syncExternalDate("end",t)};t.prototype.componentWillLoad=function(){var t,a;
31
+ // a null bound by a framework counts as no date, as the watchers already do
32
+ this.internalStartDate=(t=this.startDate)!==null&&t!==void 0?t:"";this.internalEndDate=(a=this.endDate)!==null&&a!==void 0?a:"";this.initialStartDate=this.internalStartDate;this.initialEndDate=this.internalEndDate;this.visibleCalendarDate=this.resolveVisibleCalendarDate(this.internalStartDate,this.internalEndDate);
31
33
  // Se max è precedente a min, imposto max uguale a min
32
- if(this.min!==null&&this.min!==""&&this.max!==null&&this.max!==""){var t=DateTime.fromISO(this.min);var a=DateTime.fromISO(this.max);if(a<t){this.max=this.min}}this.syncFormValue()};t.prototype.disconnectedCallback=function(){var t;this.host.removeEventListener("focusout",this.handleFocusOut);(t=this.host.shadowRoot)===null||t===void 0?void 0:t.removeEventListener("mdsCalendarHover",this.handleCalendarHover)};
34
+ if(this.min!==null&&this.min!==""&&this.max!==null&&this.max!==""){var e=DateTime.fromISO(this.min);var r=DateTime.fromISO(this.max);if(r<e){this.max=this.min}}this.syncFormValue()};t.prototype.disconnectedCallback=function(){var t;this.host.removeEventListener("focusout",this.handleFocusOut);(t=this.host.shadowRoot)===null||t===void 0?void 0:t.removeEventListener("mdsCalendarHover",this.handleCalendarHover)};
33
35
  /**
34
36
  * Applies the given preselection range to the input.
35
37
  * @param event the preselection range to apply
36
38
  */t.prototype.preselect=function(t){return __awaiter(this,void 0,void 0,(function(){var a,e,r;var i=this;return __generator(this,(function(n){switch(n.label){case 0:if(this.togglePreselection==null){this.togglePreselection=Array.from(this.host.querySelectorAll("mds-input-date-range-preselection"))}this.togglePreselection.forEach((function(t){t.selected=false}));t.caller.selected=true;this.clearHoverPreview();a=DateTime.fromISO(t.start);if(a.isValid){this.internalStartDate=t.start;this.setVisibleCalendarDate(this.internalStartDate);this.updateInputValue("start",this.internalStartDate)}if(t.end!==undefined){e=DateTime.fromISO(t.end);if(e.isValid){this.internalEndDate=t.end}}else{this.internalEndDate=t.start}this.updateInputValue("end",this.internalEndDate);this.syncFormValue();r=this.getCalendars();if(!(r.length!==0))return[3/*break*/,2];return[4/*yield*/,Promise.all(r.map((function(t,a){return t.updateCurrentDate(i.getCalendarViewDate(a))})))];case 1:n.sent();this.closeDropdownAfterSelection();n.label=2;case 2:this.emitValueChanged();return[2/*return*/,Promise.resolve()]}}))}))};t.prototype.componentDidLoad=function(){var t;this.nameSlottedFields();this.updateInputListeners();this.updateInputValue("start",this.internalStartDate);this.updateInputValue("end",this.internalEndDate);this.syncFormValue();this.host.addEventListener("focusout",this.handleFocusOut);(t=this.host.shadowRoot)===null||t===void 0?void 0:t.addEventListener("mdsCalendarHover",this.handleCalendarHover)};t.prototype.formResetCallback=function(){this.clearHoverPreview();this.internalStartDate=this.initialStartDate;this.internalEndDate=this.initialEndDate;this.visibleCalendarDate=this.resolveVisibleCalendarDate(this.initialStartDate,this.initialEndDate);this.updateInputValue("start",this.internalStartDate);this.updateInputValue("end",this.internalEndDate);this.checkPreselections();this.syncFormValue()};t.prototype.syncExternalDate=function(t,a){var e=a!==null&&a!==void 0?a:"";this.clearHoverPreview();if(t==="start"){if(e===this.internalStartDate)return;this.internalStartDate=e;this.setVisibleCalendarDate(this.internalStartDate)}else{if(e===this.internalEndDate)return;this.internalEndDate=e}this.validateDateRange();this.updateInputValue("start",this.internalStartDate);this.updateInputValue("end",this.internalEndDate);this.checkPreselections();this.syncFormValue()};t.prototype.updateInputValue=function(t,a){var e=this;var r;var i=(r=this.host.shadowRoot)===null||r===void 0?void 0:r.querySelector('slot[name="'.concat(t,'"]'));var n=i===null||i===void 0?void 0:i.assignedElements()[0];if(n!=null){this.syncingInputSlots.add(t);n.setValue(a).finally((function(){requestAnimationFrame((function(){e.syncingInputSlots.delete(t)}))}))}};t.prototype.updateInputListeners=function(){var t,a;var e=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector('slot[name="start"]');var r=(a=this.host.shadowRoot)===null||a===void 0?void 0:a.querySelector('slot[name="end"]');this.hasPreselection=this.host.querySelector("mds-input-date-range-preselection")!==null;
37
39
  // assignedElements() is empty in the hydrate/SSR runtime (mock-doc):
38
40
  // listener wiring happens on the client
39
- var i=e===null||e===void 0?void 0:e.assignedElements()[0];if(i!=null){i.addEventListener("mdsInputDateSelect",this.createFocusoutListener("start"))}var n=r===null||r===void 0?void 0:r.assignedElements()[0];if(n!=null){n.addEventListener("mdsInputDateSelect",this.createFocusoutListener("end"))}};t.prototype.createFocusoutListener=function(t){var a=this;return function(e){if(a.syncingInputSlots.has(t)){return}var r=e;a.clearHoverPreview();if(t==="start"){a.internalStartDate=r.detail;a.setVisibleCalendarDate(a.internalStartDate)}else{a.internalEndDate=r.detail}a.syncFormValue()}};t.prototype.validateDateRange=function(){if(this.internalStartDate!==""&&this.internalEndDate!==""){var t=DateTime.fromISO(this.internalStartDate);var a=DateTime.fromISO(this.internalEndDate);if(a<t){this.internalEndDate=this.internalStartDate;this.updateInputValue("end",this.internalEndDate)}}};t.prototype.checkPreselections=function(){var t=this;var a=Array.from(this.host.querySelectorAll("mds-input-date-range-preselection"));if(a!=null){a.forEach((function(a){var e=a;var r=e.start===t.internalStartDate&&e.end===t.internalEndDate;var i=e.start===t.internalStartDate&&t.internalStartDate===t.internalEndDate&&e.end===undefined;if(r||i){e.selected=true}else{e.selected=false}}))}};t.prototype.renderCalendarPreselectionPanel=function(){if(!this.hasPreselection)return null;return h("div",{class:"calendar-preselection-panel"},h("div",{class:clsx("date-preselection",this.hasPreselection&&"date-preselection--has-preselection")},h("slot",{name:"calendar-preselection"})))};t.prototype.renderSingleCalendar=function(){return h("div",{class:"calendar-single"},this.renderCalendarPreselectionPanel(),h("mds-calendar",Object.assign({key:this.calendarKey,hideToday:this.hideToday,onMdsCalendarChange:this.handleCalendarChange,onMdsCalendarPreselect:this.handleCalendarPreselect,startDate:this.internalStartDate,endDate:this.internalEndDate},this.min!==null&&this.min!==""?{min:this.min}:{},this.max!==null&&this.max!==""?{max:this.max}:{})))};t.prototype.renderDualCalendars=function(){return h("div",{class:"calendars"},this.renderCalendarPreselectionPanel(),h("mds-calendar",Object.assign({key:"".concat(this.calendarKey,"-start"),hideToday:this.hideToday,hideNextButton:true,disableMonthYearSelection:true,viewDate:this.getCalendarViewDate(),onMdsCalendarNavigate:this.handleCalendarNavigate,onMdsCalendarChange:this.handleCalendarChange,onMdsCalendarPreselect:this.handleCalendarPreselect,startDate:this.internalStartDate,endDate:this.internalEndDate},this.min!==null&&this.min!==""?{min:this.min}:{},this.max!==null&&this.max!==""?{max:this.max}:{})),h("mds-calendar",Object.assign({key:"".concat(this.calendarKey,"-end"),hideToday:this.hideToday,hidePreviousButton:true,disableMonthYearSelection:true,viewDate:this.getCalendarViewDate(1),onMdsCalendarNavigate:this.handleCalendarNavigate,onMdsCalendarChange:this.handleCalendarChange,onMdsCalendarPreselect:this.handleCalendarPreselect,startDate:this.internalStartDate,endDate:this.internalEndDate},this.min!==null&&this.min!==""?{min:this.min}:{},this.max!==null&&this.max!==""?{max:this.max}:{})))};t.prototype.render=function(){var t=this;return h(Host,{key:"0b4803ed205a3f80ed75d736155922bb9a89f75f",onClick:this.focusDateInput,"pref-animation":preferenceStore.state.animation,"pref-contrast":preferenceStore.state.contrast,"pref-mode":preferenceStore.state.mode,"pref-theme-scheme":preferenceStore.state["theme-scheme"]},h("div",{key:"22e8c579d83fa509c95c370900c4fb505d84b208",class:"inputs"},h("div",{key:"6c5723d097ca2d34d7b3ec54f45651f4ba1e44d2",class:"input-element"},h("mds-text",{key:"a3024c5b10350d669780e793dc968559bdc8872e",class:"date-label",typography:"detail",onClick:this.focusStartDateInput},this.t.get("from")),h("div",{key:"60b90b73a958b948b797db6e4a1a19cbaf39b1da",class:"input-wrapper"},h("slot",{key:"e4c1d1883f4450dc48f0a076838c676909b28002",name:"start"}))),h("div",{key:"0372128ff074223195d2d78271a12182dfd36e3c",class:"input-element"},h("mds-text",{key:"0f76780975b2f7967ee293fc7abcd8cc6c88d621",class:"date-label",typography:"detail",onClick:this.focusEndDateInput},this.t.get("to")),h("div",{key:"9c53027e6b5350e8717039b725739fa3f65c1fda",class:"input-wrapper"},h("slot",{key:"121672e05c51699522826cca5785e3f691ae06c9",name:"end"})))),h("div",{key:"4a5d117a67f835f88a6f80806330b6c95d8890f9",class:"action-open-calendar-wrapper"},h("mds-button",{key:"b1a69bc2672f8e525372d2df000937f84f5156c6",class:"action-open-calendar",variant:"dark",tone:"text",icon:miBaselineCalendarToday,id:"calendar-dropdown",onClick:this.handleOpenCalendarClick})),h("mds-dropdown",{key:"af1380b78a263024355729655be085f6ad707fbe",ref:function(a){return t.dropdownRef=a},target:"#calendar-dropdown","disable-auto-placement":true,placement:"bottom-end",role:"group"},this.dualCalendar?this.renderDualCalendars():this.renderSingleCalendar()))};t.prototype.syncFormValue=function(){var t,a,e,r;var i=(a=(t=this.internalStartDate)===null||t===void 0?void 0:t.trim())!==null&&a!==void 0?a:"";var n=(r=(e=this.internalEndDate)===null||e===void 0?void 0:e.trim())!==null&&r!==void 0?r:"";if(i===""&&n===""){setFormValue(this.internals,null);return}setFormValue(this.internals,JSON.stringify({startDate:i,endDate:n}))};Object.defineProperty(t,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{startDate:[{handleStartDateChange:0}],endDate:[{handleEndDateChange:0}]}},enumerable:false,configurable:true});return t}();MdsInputDateRange.style=mdsInputDateRangeCss();export{MdsInputDateRange as mds_input_date_range};
41
+ var i=e===null||e===void 0?void 0:e.assignedElements()[0];if(i!=null){i.addEventListener("mdsInputDateSelect",this.createFocusoutListener("start"))}var n=r===null||r===void 0?void 0:r.assignedElements()[0];if(n!=null){n.addEventListener("mdsInputDateSelect",this.createFocusoutListener("end"))}};t.prototype.createFocusoutListener=function(t){var a=this;return function(e){if(a.syncingInputSlots.has(t)){return}var r=e;a.clearHoverPreview();if(t==="start"){a.internalStartDate=r.detail;a.setVisibleCalendarDate(a.internalStartDate)}else{a.internalEndDate=r.detail}a.syncFormValue()}};t.prototype.validateDateRange=function(){if(this.internalStartDate!==""&&this.internalEndDate!==""){var t=DateTime.fromISO(this.internalStartDate);var a=DateTime.fromISO(this.internalEndDate);if(a<t){this.internalEndDate=this.internalStartDate;this.updateInputValue("end",this.internalEndDate)}}};t.prototype.checkPreselections=function(){var t=this;var a=Array.from(this.host.querySelectorAll("mds-input-date-range-preselection"));if(a!=null){a.forEach((function(a){var e=a;var r=e.start===t.internalStartDate&&e.end===t.internalEndDate;var i=e.start===t.internalStartDate&&t.internalStartDate===t.internalEndDate&&e.end===undefined;if(r||i){e.selected=true}else{e.selected=false}}))}};t.prototype.renderCalendarPreselectionPanel=function(){if(!this.hasPreselection)return null;return h("div",{class:"calendar-preselection-panel"},h("div",{class:clsx("date-preselection",this.hasPreselection&&"date-preselection--has-preselection")},h("slot",{name:"calendar-preselection"})))};t.prototype.renderSingleCalendar=function(){return h("div",{class:"calendar-single"},this.renderCalendarPreselectionPanel(),h("mds-calendar",Object.assign({key:this.calendarKey,hideToday:this.hideToday,onMdsCalendarChange:this.handleCalendarChange,onMdsCalendarPreselect:this.handleCalendarPreselect,startDate:this.internalStartDate,endDate:this.internalEndDate},this.min!==null&&this.min!==""?{min:this.min}:{},this.max!==null&&this.max!==""?{max:this.max}:{})))};t.prototype.renderDualCalendars=function(){return h("div",{class:"calendars"},this.renderCalendarPreselectionPanel(),h("mds-calendar",Object.assign({key:"".concat(this.calendarKey,"-start"),hideToday:this.hideToday,hideNextButton:true,disableMonthYearSelection:true,viewDate:this.getCalendarViewDate(),onMdsCalendarNavigate:this.handleCalendarNavigate,onMdsCalendarChange:this.handleCalendarChange,onMdsCalendarPreselect:this.handleCalendarPreselect,startDate:this.internalStartDate,endDate:this.internalEndDate},this.min!==null&&this.min!==""?{min:this.min}:{},this.max!==null&&this.max!==""?{max:this.max}:{})),h("mds-calendar",Object.assign({key:"".concat(this.calendarKey,"-end"),hideToday:this.hideToday,hidePreviousButton:true,disableMonthYearSelection:true,viewDate:this.getCalendarViewDate(1),onMdsCalendarNavigate:this.handleCalendarNavigate,onMdsCalendarChange:this.handleCalendarChange,onMdsCalendarPreselect:this.handleCalendarPreselect,startDate:this.internalStartDate,endDate:this.internalEndDate},this.min!==null&&this.min!==""?{min:this.min}:{},this.max!==null&&this.max!==""?{max:this.max}:{})))};t.prototype.render=function(){var t=this;return h(Host,{key:"718cf4ea938605b2569a5fa19e264cf176282a80",onClick:this.focusDateInput,"pref-animation":preferenceStore.state.animation,"pref-contrast":preferenceStore.state.contrast,"pref-mode":preferenceStore.state.mode,"pref-theme-scheme":preferenceStore.state["theme-scheme"]},h("div",{key:"f8dade2fe985e70d2943aee08d6f84123e53f38b",class:"inputs"},h("div",{key:"be2dd565a6364f3ccf287514ea5726e332577389",class:"input-element"},h("mds-text",{key:"a6c3e21e613ee60986acb06edc852f110357fc31",class:"date-label",typography:"detail",onClick:this.focusStartDateInput},this.t.get("from")),h("div",{key:"08cdedb27bcdcfd35b94e90ae261f64d8694b0ef",class:"input-wrapper"},h("slot",{key:"da01b0a0fc65c8cf7094cf0db83be1d942b332b1",name:"start"}))),h("div",{key:"63e620c85a9a23660645a0e28648912cbcd79919",class:"input-element"},h("mds-text",{key:"801f3a01f11502a5878e0ede645f238ef80fa388",class:"date-label",typography:"detail",onClick:this.focusEndDateInput},this.t.get("to")),h("div",{key:"fa57d66e7f8318685256e1febf35b291f7b59f19",class:"input-wrapper"},h("slot",{key:"68e860a29b253276b3ebb29b502e7c432bb1ea9c",name:"end"})))),h("div",{key:"cb145bf4822dda4e6dbe07240089944740b090fe",class:"action-open-calendar-wrapper"},h("mds-button",{key:"9216baaff6c990532db1c8366b054655065a399f",class:"action-open-calendar",variant:"dark",tone:"text",icon:miBaselineCalendarToday,id:"calendar-dropdown",onClick:this.handleOpenCalendarClick})),h("mds-dropdown",{key:"94f181ff090a617de824cd46ea21981806f7f40a",ref:function(a){return t.dropdownRef=a},target:"#calendar-dropdown","disable-auto-placement":true,placement:"bottom-end",role:"group"},this.dualCalendar?this.renderDualCalendars():this.renderSingleCalendar()))};t.prototype.syncFormValue=function(){var t,a,e,r;var i=(a=(t=this.internalStartDate)===null||t===void 0?void 0:t.trim())!==null&&a!==void 0?a:"";var n=(r=(e=this.internalEndDate)===null||e===void 0?void 0:e.trim())!==null&&r!==void 0?r:"";if(i===""&&n===""){setFormValue(this.internals,null);return}setFormValue(this.internals,JSON.stringify({startDate:i,endDate:n}))};Object.defineProperty(t,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{startDate:[{handleStartDateChange:0}],endDate:[{handleEndDateChange:0}]}},enumerable:false,configurable:true});return t}();MdsInputDateRange.style=mdsInputDateRangeCss();export{MdsInputDateRange as mds_input_date_range};
@@ -1,4 +1,4 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,r,a){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,n){function o(t){try{c(a.next(t))}catch(t){n(t)}}function s(t){try{c(a["throw"](t))}catch(t){n(t)}}function c(t){t.done?r(t.value):i(t.value).then(o,s)}c((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,i,n,o=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return o.next=s(0),o["throw"]=s(1),o["return"]=s(2),typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(s){if(a)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(r=0)),r)try{if(a=1,i&&(n=s[0]&2?i["return"]:s[0]?i["throw"]||((n=i["return"])&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;if(i=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(n=r.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){r.label=s[1];break}if(s[0]===6&&r.label<n[1]){r.label=n[1];n=s;break}if(n&&r.label<n[2]){r.label=n[2];r.ops.push(s);break}if(n[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];i=0}finally{a=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,d as createEvent,h,e as Host,g as getElement}from"./index-DIiEV39g.js";import{p as preferenceStore}from"./preference-CKerJx2M.js";import{m as miBaselineKeyboardArrowDown}from"./keyboard-arrow-down-DiWN48aq.js";import{s as setFormValue}from"./form-A9TZf0Ii.js";var mdsInputSelectCss=function(){return'@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-input-tip,mds-input-tip-item):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-input-select-variant-color-rgb:var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)));--mds-input-select-ring:0 0 0 1px rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.1);--mds-input-select-shadow:0 1px 3px 0 rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.1),0 1px 2px 0 rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.06);--mds-input-select-arrow-icon-background-color:var(--mds-input-select-arrow-icon-blur-background-color,#0000);--mds-input-select-arrow-icon-blur-background-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/0);--mds-input-select-arrow-icon-blur-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.5);--mds-input-select-arrow-icon-color:var(--mds-input-select-arrow-icon-blur-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.5);--mds-input-select-arrow-icon-hover-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0));--mds-input-tip-horizontal-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*1000);--mds-input-tip-vertical-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-background:rgb(var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73))));--mds-input-select-transition-duration:var(--duration-300,.3s);--mds-input-select-icon-transition-duration:var(--duration-200,.2s);--private-input-select-transition-duration:var(--mds-input-select-transition-duration);--private-input-select-icon-transition-duration:var(--mds-input-select-icon-transition-duration);font-family:var(--font-info,Karla,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);font-size:var(--text-size-info-detail,1rem);font-weight:var(--tw-font-weight,var(--text-size-info-detail--font-weight,400));line-height:var(--tw-leading,var(--text-size-info-detail--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));display:flex;position:relative;-webkit-user-select:none;user-select:none;--mds-input-select-variant-color-rgb:0 0 0;--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))))}:host([required]:not([required=false]):focus-within) .icon{-webkit-transform:translate(calc(var(--spacing,.0025rem)*150),calc(var(--spacing,.0025rem)*150));transform:translate(calc(var(--spacing,.0025rem)*150),calc(var(--spacing,.0025rem)*150))}:host(:focus-within),:host(:hover){--mds-input-select-variant-color-rgb:var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204)));--mds-input-select-ring:0 0 0 3px rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/1);--mds-input-select-shadow:0 4px 6px -1px rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.1),0 2px 4px -1px rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.06);--mds-input-select-arrow-icon-background-color:var(--mds-input-select-arrow-icon-hover-background-color,#0000);--mds-input-select-arrow-icon-color:var(--mds-input-select-arrow-icon-hover-color,rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204)))));--mds-input-select-variant-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))}.input{font-family:var(--font-info,Karla,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);font-size:var(--text-size-info-detail,1rem);font-weight:var(--tw-font-weight,var(--text-size-info-detail--font-weight,400));line-height:var(--tw-leading,var(--text-size-info-detail--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;appearance:none;background-color:rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))));border:0;border-radius:var(--radius-xs,8px);-webkit-box-shadow:var(--mds-input-select-ring),var(--mds-input-select-shadow);box-shadow:var(--mds-input-select-ring),var(--mds-input-select-shadow);box-sizing:border-box;color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));cursor:pointer;margin:0;min-height:calc(var(--spacing,.0025rem)*1200);overflow:hidden;padding-left:calc(var(--spacing,.0025rem)*400);padding-right:calc(var(--spacing,.0025rem)*1200);text-overflow:ellipsis;transition-property:background-color,border-color,box-shadow,color,fill;width:100%}.input,.input:focus,.input:hover{-webkit-transition-duration:var(--private-input-select-transition-duration);transition-duration:var(--private-input-select-transition-duration);-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input:focus,.input:hover{--tw-outline-style:none;color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));outline-style:none}:host([value]:not([value=""])) .input{color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([required]:not([required=false])) .input{color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}.input:disabled{background-color:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))));opacity:1}:host([disabled]:not([disabled=false])),:host([disabled]:not([disabled=false])) .input{pointer-events:none}:host([disabled]:not([disabled=false])) .icon{fill:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));-webkit-transform:translate(calc(var(--spacing,.0025rem)*250),calc(var(--spacing,.0025rem)*200));transform:translate(calc(var(--spacing,.0025rem)*250),calc(var(--spacing,.0025rem)*200))}.icon-container{align-items:center;color:inherit;display:flex;height:calc(var(--spacing,.0025rem)*1200);pointer-events:none;position:absolute;right:calc(var(--spacing,.0025rem)*400)}.icon{background-color:var(--mds-input-select-arrow-icon-background-color,#0000);border-radius:var(--radius-full,1000px);display:flex;fill:var(--mds-input-select-arrow-icon-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));-webkit-transition-duration:var(--private-input-select-icon-transition-duration);transition-duration:var(--private-input-select-icon-transition-duration);transition-property:background-color,fill}.icon svg{aspect-ratio:var(--aspect-square,1/1);height:100%;width:100%}.option-container{display:none}mds-input-tip{--mds-input-tip-horizontal-offset:inherit;--mds-input-tip-horizontal-offset-focused:inherit;--mds-input-tip-vertical-offset:inherit;--mds-input-tip-background:inherit}@container (max-width:210px){:host .tip__content,:host(:focus-within) .tip__content{grid-template-columns:0fr;opacity:0}:host .tip{padding-left:0;padding-right:0}}:host([variant=info]){--mds-input-tip-background:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=info]:focus-within),:host([variant=info]:hover){--mds-input-select-variant-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164))}:host([variant=success]){--mds-input-tip-background:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=success]:focus-within),:host([variant=success]:hover){--mds-input-select-variant-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57))}:host([variant=warning]){--mds-input-tip-background:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=warning]:focus-within),:host([variant=warning]:hover){--mds-input-select-variant-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0))}:host([variant=error]){--mds-input-tip-background:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=error]:focus-within),:host([variant=error]:hover){--mds-input-select-variant-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65))}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-input-select-transition-duration:0s;--private-input-select-icon-transition-duration:0s}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-select-ring:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}:host([pref-mode=dark]:not([pref-theme-scheme=light])) .input{color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([pref-contrast=more]){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}:host([pref-contrast=more]) .input{color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}@media (forced-colors:active){.input:focus,.input:hover{outline:2px solid #0000;outline-offset:2px}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-input-select-transition-duration:0s;--private-input-select-icon-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-select-ring:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))) .input{color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input{color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}}'};var MdsInputSelect=/** @class */function(){function t(t){var e=this;registerInstance(this,t);this.changeEvent=createEvent(this,"mdsInputSelectChange",7);if(t.$hostElement$["s-ei"]){this.internals=t.$hostElement$["s-ei"]}else{this.internals=t.$hostElement$.attachInternals();t.$hostElement$["s-ei"]=this.internals}
1
+ var __awaiter=this&&this.__awaiter||function(t,r,e,a){function i(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,n){function o(t){try{c(a.next(t))}catch(t){n(t)}}function s(t){try{c(a["throw"](t))}catch(t){n(t)}}function c(t){t.done?e(t.value):i(t.value).then(o,s)}c((a=a.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,i,n,o=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return o.next=s(0),o["throw"]=s(1),o["return"]=s(2),typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(r){return c([t,r])}}function c(s){if(a)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(e=0)),e)try{if(a=1,i&&(n=s[0]&2?i["return"]:s[0]?i["throw"]||((n=i["return"])&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;if(i=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;i=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(n=e.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){e.label=s[1];break}if(s[0]===6&&e.label<n[1]){e.label=n[1];n=s;break}if(n&&e.label<n[2]){e.label=n[2];e.ops.push(s);break}if(n[2])e.ops.pop();e.trys.pop();continue}s=r.call(t,e)}catch(t){s=[6,t];i=0}finally{a=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,d as createEvent,h,e as Host,g as getElement}from"./index-DIiEV39g.js";import{p as preferenceStore}from"./preference-CKerJx2M.js";import{m as miBaselineKeyboardArrowDown}from"./keyboard-arrow-down-DiWN48aq.js";import{s as setFormValue}from"./form-A9TZf0Ii.js";var mdsInputSelectCss=function(){return'@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-input-tip,mds-input-tip-item):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-input-select-variant-color-rgb:var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)));--mds-input-select-ring:0 0 0 1px rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.1);--mds-input-select-shadow:0 1px 3px 0 rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.1),0 1px 2px 0 rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.06);--mds-input-select-arrow-icon-background-color:var(--mds-input-select-arrow-icon-blur-background-color,#0000);--mds-input-select-arrow-icon-blur-background-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/0);--mds-input-select-arrow-icon-blur-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.5);--mds-input-select-arrow-icon-color:var(--mds-input-select-arrow-icon-blur-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.5);--mds-input-select-arrow-icon-hover-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0));--mds-input-tip-horizontal-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*1000);--mds-input-tip-vertical-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-background:rgb(var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73))));--mds-input-select-transition-duration:var(--duration-300,.3s);--mds-input-select-icon-transition-duration:var(--duration-200,.2s);--private-input-select-transition-duration:var(--mds-input-select-transition-duration);--private-input-select-icon-transition-duration:var(--mds-input-select-icon-transition-duration);font-family:var(--font-info,Karla,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);font-size:var(--text-size-info-detail,1rem);font-weight:var(--tw-font-weight,var(--text-size-info-detail--font-weight,400));line-height:var(--tw-leading,var(--text-size-info-detail--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));display:flex;position:relative;-webkit-user-select:none;user-select:none;--mds-input-select-variant-color-rgb:0 0 0;--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))))}:host([required]:not([required=false]):focus-within) .icon{-webkit-transform:translate(calc(var(--spacing,.0025rem)*150),calc(var(--spacing,.0025rem)*150));transform:translate(calc(var(--spacing,.0025rem)*150),calc(var(--spacing,.0025rem)*150))}:host(:focus-within),:host(:hover){--mds-input-select-variant-color-rgb:var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204)));--mds-input-select-ring:0 0 0 3px rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/1);--mds-input-select-shadow:0 4px 6px -1px rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.1),0 2px 4px -1px rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.06);--mds-input-select-arrow-icon-background-color:var(--mds-input-select-arrow-icon-hover-background-color,#0000);--mds-input-select-arrow-icon-color:var(--mds-input-select-arrow-icon-hover-color,rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204)))));--mds-input-select-variant-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))}.input{font-family:var(--font-info,Karla,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);font-size:var(--text-size-info-detail,1rem);font-weight:var(--tw-font-weight,var(--text-size-info-detail--font-weight,400));line-height:var(--tw-leading,var(--text-size-info-detail--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;appearance:none;background-color:rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))));border:0;border-radius:var(--radius-xs,8px);-webkit-box-shadow:var(--mds-input-select-ring),var(--mds-input-select-shadow);box-shadow:var(--mds-input-select-ring),var(--mds-input-select-shadow);box-sizing:border-box;color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));cursor:pointer;margin:0;min-height:calc(var(--spacing,.0025rem)*1200);overflow:hidden;padding-left:calc(var(--spacing,.0025rem)*400);padding-right:calc(var(--spacing,.0025rem)*1200);text-overflow:ellipsis;transition-property:background-color,border-color,box-shadow,color,fill;width:100%}.input,.input:focus,.input:hover{-webkit-transition-duration:var(--private-input-select-transition-duration);transition-duration:var(--private-input-select-transition-duration);-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input:focus,.input:hover{--tw-outline-style:none;color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));outline-style:none}:host([value]:not([value=""])) .input{color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([required]:not([required=false])) .input{color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}.input:disabled{background-color:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))));opacity:1}:host([disabled]:not([disabled=false])),:host([disabled]:not([disabled=false])) .input{pointer-events:none}:host([disabled]:not([disabled=false])) .icon{fill:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));-webkit-transform:translate(calc(var(--spacing,.0025rem)*250),calc(var(--spacing,.0025rem)*200));transform:translate(calc(var(--spacing,.0025rem)*250),calc(var(--spacing,.0025rem)*200))}.icon-container{align-items:center;color:inherit;display:flex;height:calc(var(--spacing,.0025rem)*1200);pointer-events:none;position:absolute;right:calc(var(--spacing,.0025rem)*400)}.icon{background-color:var(--mds-input-select-arrow-icon-background-color,#0000);border-radius:var(--radius-full,1000px);display:flex;fill:var(--mds-input-select-arrow-icon-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));-webkit-transition-duration:var(--private-input-select-icon-transition-duration);transition-duration:var(--private-input-select-icon-transition-duration);transition-property:background-color,fill}.icon svg{aspect-ratio:var(--aspect-square,1/1);height:100%;width:100%}.option-container{display:none}mds-input-tip{--mds-input-tip-horizontal-offset:inherit;--mds-input-tip-horizontal-offset-focused:inherit;--mds-input-tip-vertical-offset:inherit;--mds-input-tip-background:inherit}@container (max-width:210px){:host .tip__content,:host(:focus-within) .tip__content{grid-template-columns:0fr;opacity:0}:host .tip{padding-left:0;padding-right:0}}:host([variant=info]){--mds-input-tip-background:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=info]:focus-within),:host([variant=info]:hover){--mds-input-select-variant-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164))}:host([variant=success]){--mds-input-tip-background:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=success]:focus-within),:host([variant=success]:hover){--mds-input-select-variant-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57))}:host([variant=warning]){--mds-input-tip-background:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=warning]:focus-within),:host([variant=warning]:hover){--mds-input-select-variant-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0))}:host([variant=error]){--mds-input-tip-background:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=error]:focus-within),:host([variant=error]:hover){--mds-input-select-variant-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65))}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-input-select-transition-duration:0s;--private-input-select-icon-transition-duration:0s}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-select-ring:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}:host([pref-mode=dark]:not([pref-theme-scheme=light])) .input{color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([pref-contrast=more]){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}:host([pref-contrast=more]) .input{color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}@media (forced-colors:active){.input:focus,.input:hover{outline:2px solid #0000;outline-offset:2px}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-input-select-transition-duration:0s;--private-input-select-icon-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-select-ring:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))) .input{color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input{color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}}'};var MdsInputSelect=/** @class */function(){function t(t){var r=this;registerInstance(this,t);this.changeEvent=createEvent(this,"mdsInputSelectChange",7);if(t.$hostElement$["s-ei"]){this.internals=t.$hostElement$["s-ei"]}else{this.internals=t.$hostElement$.attachInternals();t.$hostElement$["s-ei"]=this.internals}
2
2
  // @State() selected: boolean
3
3
  this.hasFocus=false;
4
4
  /**
@@ -15,13 +15,15 @@ this.hasFocus=false;
15
15
  */this.size=0;
16
16
  /**
17
17
  * Specifies the value of the component
18
- */this.value="";this.onInput=function(t){var r=t.target;if(r){e.value=r.value}};this.onBlur=function(){e.hasFocus=false};this.onFocus=function(){e.hasFocus=true};this.emptyOptions=function(){var t;var r=(t=e.host.shadowRoot)===null||t===void 0?void 0:t.querySelector("select");var a=r===null||r===void 0?void 0:r.querySelectorAll("option");if(!a){return}a.forEach((function(t,r){if(e.placeholder===undefined||e.placeholder===""){t.remove()}if(e.placeholder!==undefined&&e.placeholder!==""&&r>0){t.remove()}}))};this.onSlotChangeHandler=function(){var t,r,a;var i=(r=(t=e.host.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("slot")[0])===null||r===void 0?void 0:r.assignedNodes();var n=(a=e.selectEl)===null||a===void 0?void 0:a.querySelectorAll("option");if(n==null){return}if((e.placeholder===undefined||e.placeholder==="")&&n.length>0){e.emptyOptions()}if(e.placeholder!==undefined&&e.placeholder!==""&&n.length>1){e.emptyOptions()}i===null||i===void 0?void 0:i.forEach((function(t){var r;(r=e.selectEl)===null||r===void 0?void 0:r.appendChild(t.cloneNode(true))}));e.setCurrentValue()};this.setCurrentValue=function(){var t;if(e.selectEl==null)return;if(e.value!=null&&e.value!==""&&e.value!==0&&!Number.isNaN(e.value)){e.selectEl.querySelectorAll("option").forEach((function(t){t.selected=t.value===e.value}))}else if(e.placeholder===undefined||e.placeholder===""){e.value=(t=e.selectEl)===null||t===void 0?void 0:t.querySelectorAll("option")[0].value}}}
18
+ */this.value="";this.onInput=function(t){var e=t.target;if(e){r.value=e.value}};this.onBlur=function(){r.hasFocus=false};this.onFocus=function(){r.hasFocus=true};
19
+ // a removed attribute or a null bound by a framework counts as no placeholder, like ''
20
+ this.hasPlaceholder=function(){var t;return((t=r.placeholder)!==null&&t!==void 0?t:"")!==""};this.emptyOptions=function(){var t;var e=(t=r.host.shadowRoot)===null||t===void 0?void 0:t.querySelector("select");var a=e===null||e===void 0?void 0:e.querySelectorAll("option");if(!a){return}a.forEach((function(t,e){if(!r.hasPlaceholder()){t.remove()}if(r.hasPlaceholder()&&e>0){t.remove()}}))};this.onSlotChangeHandler=function(){var t,e,a;var i=(e=(t=r.host.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("slot")[0])===null||e===void 0?void 0:e.assignedNodes();var n=(a=r.selectEl)===null||a===void 0?void 0:a.querySelectorAll("option");if(n==null){return}if(!r.hasPlaceholder()&&n.length>0){r.emptyOptions()}if(r.hasPlaceholder()&&n.length>1){r.emptyOptions()}i===null||i===void 0?void 0:i.forEach((function(t){var e;(e=r.selectEl)===null||e===void 0?void 0:e.appendChild(t.cloneNode(true))}));r.setCurrentValue()};this.setCurrentValue=function(){var t;if(r.selectEl==null)return;if(r.value!=null&&r.value!==""&&r.value!==0&&!Number.isNaN(r.value)){r.selectEl.querySelectorAll("option").forEach((function(t){t.selected=t.value===r.value}))}else if(!r.hasPlaceholder()){r.value=(t=r.selectEl)===null||t===void 0?void 0:t.querySelectorAll("option")[0].value}}}
19
21
  /**
20
22
  * Sets the value of the component
21
- */t.prototype.setValue=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.value=t;return[2/*return*/,Promise.resolve()]}))}))};
23
+ */t.prototype.setValue=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){this.value=t;return[2/*return*/,Promise.resolve()]}))}))};
22
24
  /**
23
25
  * Emits the change event when the component value changes
24
- */t.prototype.valueChanged=function(){var t,e,r;this.changeEvent.emit({value:(t=this.value)===null||t===void 0?void 0:t.toString()});this.setCurrentValue();setFormValue(this.internals,(r=(e=this.value)===null||e===void 0?void 0:e.toString())!==null&&r!==void 0?r:null)};t.prototype.disabledChanged=function(t){
26
+ */t.prototype.valueChanged=function(){var t,r,e;this.changeEvent.emit({value:(t=this.value)===null||t===void 0?void 0:t.toString()});this.setCurrentValue();setFormValue(this.internals,(e=(r=this.value)===null||r===void 0?void 0:r.toString())!==null&&e!==void 0?e:null)};t.prototype.disabledChanged=function(t){
25
27
  /**
26
28
  * This is related to ALL disabled attributes set on Magma input components
27
29
  * if solved, please check mds-button, mds-input, mds-input-*
@@ -34,6 +36,6 @@ if(t){setFormValue(this.internals,null)}};
34
36
  * Here the option is brought back to the first position
35
37
  * @param newValue placeholder new value
36
38
  * @param oldValue placeholder old value
37
- */t.prototype.placeholderChanged=function(t,e){if(t!==undefined&&t!==""&&(e===undefined||e==="")){var r=document.querySelector(".placeholder-option");if(r)r.remove();r=document.createElement("option");this.selectEl.insertBefore(r,this.selectEl.firstChild);r.value="";r.text=t;if(this.defaultValue==null||this.defaultValue===""||this.defaultValue===0||Number.isNaN(this.defaultValue)){r.selected=true;this.value=undefined}if(this.required)r.disabled=true}};t.prototype.formResetCallback=function(){setFormValue(this.internals,"")};t.prototype.componentWillLoad=function(){
39
+ */t.prototype.placeholderChanged=function(t,r){if(t!=null&&t!==""&&(r!==null&&r!==void 0?r:"")===""){var e=document.querySelector(".placeholder-option");if(e)e.remove();e=document.createElement("option");this.selectEl.insertBefore(e,this.selectEl.firstChild);e.value="";e.text=t;if(this.defaultValue==null||this.defaultValue===""||this.defaultValue===0||Number.isNaN(this.defaultValue)){e.selected=true;this.value=undefined}if(this.required)e.disabled=true}};t.prototype.formResetCallback=function(){setFormValue(this.internals,"")};t.prototype.componentWillLoad=function(){
38
40
  // needed for react component, this prop should be used as default-value html attributo instead of defaultValue prop
39
- if(this.defaultValue!=null&&this.defaultValue!==""&&this.defaultValue!==0&&!Number.isNaN(this.defaultValue)){this.value=this.defaultValue}};t.prototype.componentDidLoad=function(){if(this.value!=null&&this.value!==""&&this.value!==0&&!Number.isNaN(this.value)){setFormValue(this.internals,this.value.toString())}};t.prototype.render=function(){var t=this;return h(Host,{key:"b561106215eaf3c4627be567b2012df33869ca57","pref-animation":preferenceStore.state.animation,"pref-contrast":preferenceStore.state.contrast,"pref-mode":preferenceStore.state.mode,"pref-theme-scheme":preferenceStore.state["theme-scheme"]},h("select",{key:"2c08f43c6eb2158fcf14d47bae513275a8e6984d","aria-label":this.accessibleName,class:"input",onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,name:this.name,required:this.required,disabled:this.disabled,multiple:this.multiple,size:this.size,part:"select",ref:function(e){return t.selectEl=e}},h("option",{key:"784153070f787d18874602fea5a966ef0780d499",class:"placeholder-option",value:"",disabled:!this.required?undefined:true,selected:this.defaultValue!=null&&this.defaultValue!==""&&this.defaultValue!==0&&!Number.isNaN(this.defaultValue)?undefined:true},this.placeholder)),h("div",{key:"a00dc86d1ab765f58b28379fa9f34907e6fec0ef",class:"icon-container"},h("mds-icon",{key:"beacd0d5a5c970c0a9ec733b2ec1b9670a27e83e",class:"icon",name:miBaselineKeyboardArrowDown})),h("div",{key:"adcdc196b279e17e2e418b8dfedb1f4c1e0e0a72",class:"option-container"},h("slot",{key:"a108fe3bab7f65bf69f7e7caea89fe4d2d5d44ba",onSlotchange:this.onSlotChangeHandler})),h("mds-input-tip",{key:"63273ebf58279dcda1671e30e7d6ab24ccfe4132",position:"top",active:this.hasFocus,part:"tip-top"},this.disabled&&h("mds-input-tip-item",{key:"af787ee323723818934e6007f984d630212a36f5",expanded:true,variant:"disabled"}),this.required&&h("mds-input-tip-item",{key:"50b4e96405e0adcdccc47f00e9d07c50f4117501",expanded:this.hasFocus,variant:this.value===""?"required":"required-success"})))};Object.defineProperty(t,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:[{valueChanged:0}],disabled:[{disabledChanged:0}],placeholder:[{placeholderChanged:0}]}},enumerable:false,configurable:true});return t}();MdsInputSelect.style=mdsInputSelectCss();export{MdsInputSelect as mds_input_select};
41
+ if(this.defaultValue!=null&&this.defaultValue!==""&&this.defaultValue!==0&&!Number.isNaN(this.defaultValue)){this.value=this.defaultValue}};t.prototype.componentDidLoad=function(){if(this.value!=null&&this.value!==""&&this.value!==0&&!Number.isNaN(this.value)){setFormValue(this.internals,this.value.toString())}};t.prototype.render=function(){var t=this;return h(Host,{key:"d592094ab2ad5a0af7603c62516dcc85961b1986","pref-animation":preferenceStore.state.animation,"pref-contrast":preferenceStore.state.contrast,"pref-mode":preferenceStore.state.mode,"pref-theme-scheme":preferenceStore.state["theme-scheme"]},h("select",{key:"3d8afceda13a8f8cda25008aa159131512607185","aria-label":this.accessibleName,class:"input",onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,name:this.name,required:this.required,disabled:this.disabled,multiple:this.multiple,size:this.size,part:"select",ref:function(r){return t.selectEl=r}},h("option",{key:"d51ff2bc9e48b52042a5a1b11f4cd9249ad3f841",class:"placeholder-option",value:"",disabled:!this.required?undefined:true,selected:this.defaultValue!=null&&this.defaultValue!==""&&this.defaultValue!==0&&!Number.isNaN(this.defaultValue)?undefined:true},this.placeholder)),h("div",{key:"e7433aed2a6eb737f729267ae910ac7ad0d66f91",class:"icon-container"},h("mds-icon",{key:"1000ecef2c0d3967ab36ca6b26492f0d16828e0b",class:"icon",name:miBaselineKeyboardArrowDown})),h("div",{key:"f50de5c45a4a81a1671c11eb7f5208cf90ad420c",class:"option-container"},h("slot",{key:"4e81caee891537bb05722c66bd08fdea2656d2f5",onSlotchange:this.onSlotChangeHandler})),h("mds-input-tip",{key:"8b2529c44303088088d451632239594d1029d328",position:"top",active:this.hasFocus,part:"tip-top"},this.disabled&&h("mds-input-tip-item",{key:"ba2ab348eb11aada0385bb88908ff0f218146a69",expanded:true,variant:"disabled"}),this.required&&h("mds-input-tip-item",{key:"a4c571f697981eb930b6aed49cd5788dc9a98cfd",expanded:this.hasFocus,variant:this.value===""?"required":"required-success"})))};Object.defineProperty(t,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:[{valueChanged:0}],disabled:[{disabledChanged:0}],placeholder:[{placeholderChanged:0}]}},enumerable:false,configurable:true});return t}();MdsInputSelect.style=mdsInputSelectCss();export{MdsInputSelect as mds_input_select};