@duetds/components 6.8.3 → 6.8.5

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 (561) hide show
  1. package/hydrate/index.js +153 -28
  2. package/lib/cjs/duet-action-button.cjs.entry.js +11 -2
  3. package/lib/cjs/duet-alert.cjs.entry.js +14 -1
  4. package/lib/cjs/duet-badge.cjs.entry.js +1 -1
  5. package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
  6. package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
  7. package/lib/cjs/duet-button_2.cjs.entry.js +9 -1
  8. package/lib/cjs/duet-caption_4.cjs.entry.js +15 -1
  9. package/lib/cjs/duet-card.cjs.entry.js +1 -1
  10. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  11. package/lib/cjs/duet-checkmark.cjs.entry.js +1 -1
  12. package/lib/cjs/duet-choice_2.cjs.entry.js +22 -4
  13. package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
  14. package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
  15. package/lib/cjs/duet-contact-card.cjs.entry.js +1 -1
  16. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  17. package/lib/cjs/duet-date-picker.cjs.entry.js +15 -3
  18. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  19. package/lib/cjs/duet-editable-table_3.cjs.entry.js +1 -1
  20. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  21. package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
  22. package/lib/cjs/duet-footer.cjs.entry.js +14 -2
  23. package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
  24. package/lib/cjs/duet-header_2.cjs.entry.js +1 -1
  25. package/lib/cjs/duet-hero.cjs.entry.js +1 -1
  26. package/lib/cjs/duet-icon.cjs.entry.js +1 -1
  27. package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
  28. package/lib/cjs/duet-layout.cjs.entry.js +1 -1
  29. package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
  30. package/lib/cjs/duet-menu-bar-button.cjs.entry.js +1 -1
  31. package/lib/cjs/duet-menu-bar-dropdown-link.cjs.entry.js +1 -1
  32. package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +1 -1
  33. package/lib/cjs/duet-menu-bar-link.cjs.entry.js +1 -1
  34. package/lib/cjs/duet-menu-bar.cjs.entry.js +1 -1
  35. package/lib/cjs/duet-modal.cjs.entry.js +12 -2
  36. package/lib/cjs/duet-multiselect.cjs.entry.js +1 -1
  37. package/lib/cjs/duet-nav.cjs.entry.js +1 -1
  38. package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
  39. package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
  40. package/lib/cjs/duet-page-heading.cjs.entry.js +1 -1
  41. package/lib/cjs/duet-pagination_2.cjs.entry.js +6 -4
  42. package/lib/cjs/duet-progress.cjs.entry.js +1 -1
  43. package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
  44. package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
  45. package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
  46. package/lib/cjs/duet-section-layout.cjs.entry.js +1 -1
  47. package/lib/cjs/duet-select.cjs.entry.js +1 -1
  48. package/lib/cjs/duet-slideout-lang.cjs.entry.js +8 -1
  49. package/lib/cjs/duet-slideout-link.cjs.entry.js +1 -1
  50. package/lib/cjs/duet-slideout-panel-dropdown.cjs.entry.js +1 -1
  51. package/lib/cjs/duet-slideout-panel.cjs.entry.js +9 -2
  52. package/lib/cjs/duet-slideout.cjs.entry.js +9 -2
  53. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  54. package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +1 -1
  55. package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +1 -1
  56. package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +1 -1
  57. package/lib/cjs/duet-submenu-bar.cjs.entry.js +1 -1
  58. package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
  59. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  60. package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +1 -1
  61. package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +1 -1
  62. package/lib/cjs/duet-toolbar-link.cjs.entry.js +1 -1
  63. package/lib/cjs/duet-toolbar.cjs.entry.js +1 -1
  64. package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
  65. package/lib/cjs/duet-tray.cjs.entry.js +1 -1
  66. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
  67. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  68. package/lib/cjs/duet.cjs.js +2 -2
  69. package/lib/cjs/{focus-utils-2ff2eab6.js → focus-utils-37a486af.js} +1 -1
  70. package/lib/cjs/{index-6d5f06d0.js → index-6f5a3a97.js} +1 -1
  71. package/lib/cjs/loader.cjs.js +2 -2
  72. package/lib/collection/components/duet-action-button/duet-action-button.js +38 -3
  73. package/lib/collection/components/duet-alert/duet-alert.js +21 -4
  74. package/lib/collection/components/duet-button/duet-button.js +27 -12
  75. package/lib/collection/components/duet-caption/duet-caption.js +1 -1
  76. package/lib/collection/components/duet-card/duet-card.js +3 -3
  77. package/lib/collection/components/duet-checkbox/duet-checkbox.js +3 -3
  78. package/lib/collection/components/duet-choice/duet-choice.js +33 -11
  79. package/lib/collection/components/duet-choice-group/duet-choice-group.css +6 -1
  80. package/lib/collection/components/duet-collapsible/duet-collapsible.js +3 -3
  81. package/lib/collection/components/duet-combobox/duet-combobox.js +3 -3
  82. package/lib/collection/components/duet-cookie-consent/duet-cookie-consent.js +1 -1
  83. package/lib/collection/components/duet-date-picker/duet-date-picker.js +23 -9
  84. package/lib/collection/components/duet-divider/duet-divider.js +1 -1
  85. package/lib/collection/components/duet-editable-table/duet-editable-table.js +5 -5
  86. package/lib/collection/components/duet-empty-state/duet-empty-state.js +1 -1
  87. package/lib/collection/components/duet-footer/duet-footer.js +26 -12
  88. package/lib/collection/components/duet-grid/duet-grid.js +3 -3
  89. package/lib/collection/components/duet-header/duet-header.js +15 -15
  90. package/lib/collection/components/duet-heading/duet-heading.js +1 -1
  91. package/lib/collection/components/duet-hero/duet-hero.js +5 -5
  92. package/lib/collection/components/duet-icon/duet-icon.js +1 -1
  93. package/lib/collection/components/duet-input/duet-input.js +8 -8
  94. package/lib/collection/components/duet-label/duet-label.js +2 -2
  95. package/lib/collection/components/duet-layout/duet-layout.js +1 -1
  96. package/lib/collection/components/duet-link/duet-link.js +20 -3
  97. package/lib/collection/components/duet-list/duet-list.js +4 -4
  98. package/lib/collection/components/duet-logo/duet-logo.js +1 -1
  99. package/lib/collection/components/duet-menu-bar/duet-menu-bar.js +1 -1
  100. package/lib/collection/components/duet-modal/duet-modal.js +19 -7
  101. package/lib/collection/components/duet-multiselect/duet-multiselect.js +5 -5
  102. package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +1 -1
  103. package/lib/collection/components/duet-number-input/duet-number-input.js +4 -4
  104. package/lib/collection/components/duet-pagination/duet-pagination.js +2 -2
  105. package/lib/collection/components/duet-paragraph/duet-paragraph.js +3 -3
  106. package/lib/collection/components/duet-radio/duet-radio.js +3 -3
  107. package/lib/collection/components/duet-range-slider/duet-range-slider.js +2 -2
  108. package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +6 -4
  109. package/lib/collection/components/duet-select/duet-select.js +5 -5
  110. package/lib/collection/components/duet-slideout/duet-slideout.js +14 -2
  111. package/lib/collection/components/duet-slideout-lang/duet-slideout-lang.js +13 -1
  112. package/lib/collection/components/duet-slideout-panel/duet-slideout-panel.js +10 -2
  113. package/lib/collection/components/duet-spacer/duet-spacer.js +2 -2
  114. package/lib/collection/components/duet-spinner/duet-spinner.js +1 -1
  115. package/lib/collection/components/duet-step/duet-step.js +2 -2
  116. package/lib/collection/components/duet-stepper/duet-stepper.js +1 -1
  117. package/lib/collection/components/duet-tab-group/duet-tab-group.js +4 -4
  118. package/lib/collection/components/duet-textarea/duet-textarea.js +4 -4
  119. package/lib/collection/components/duet-toggle/duet-toggle.js +1 -1
  120. package/lib/collection/components/duet-tooltip/duet-tooltip.js +1 -1
  121. package/lib/collection/components/duet-upload/duet-upload.js +13 -13
  122. package/lib/dist-custom-elements/duet-action-button.js +1 -1
  123. package/lib/dist-custom-elements/duet-alert.js +1 -1
  124. package/lib/dist-custom-elements/duet-badge.js +1 -1
  125. package/lib/dist-custom-elements/duet-breadcrumb.js +2 -2
  126. package/lib/dist-custom-elements/duet-breadcrumbs.js +2 -2
  127. package/lib/dist-custom-elements/duet-button.js +1 -1
  128. package/lib/dist-custom-elements/duet-caption.js +1 -1
  129. package/lib/dist-custom-elements/duet-card.js +3 -3
  130. package/lib/dist-custom-elements/duet-checkbox.js +1 -1
  131. package/lib/dist-custom-elements/duet-checkmark.js +1 -1
  132. package/lib/dist-custom-elements/duet-choice-group.js +7 -7
  133. package/lib/dist-custom-elements/duet-choice.js +28 -9
  134. package/lib/dist-custom-elements/duet-collapsible.js +2 -2
  135. package/lib/dist-custom-elements/duet-combobox.js +2 -2
  136. package/lib/dist-custom-elements/duet-contact-card.js +8 -8
  137. package/lib/dist-custom-elements/duet-cookie-consent.js +6 -6
  138. package/lib/dist-custom-elements/duet-date-picker.js +26 -14
  139. package/lib/dist-custom-elements/duet-divider.js +1 -1
  140. package/lib/dist-custom-elements/duet-editable-table.js +1 -1
  141. package/lib/dist-custom-elements/duet-empty-state.js +1 -1
  142. package/lib/dist-custom-elements/duet-fieldset.js +1 -1
  143. package/lib/dist-custom-elements/duet-footer.js +20 -8
  144. package/lib/dist-custom-elements/duet-grid-item.js +1 -1
  145. package/lib/dist-custom-elements/duet-grid.js +1 -1
  146. package/lib/dist-custom-elements/duet-header.js +8 -8
  147. package/lib/dist-custom-elements/duet-heading.js +1 -1
  148. package/lib/dist-custom-elements/duet-hero.js +9 -9
  149. package/lib/dist-custom-elements/duet-icon.js +1 -1
  150. package/lib/dist-custom-elements/duet-input.js +1 -1
  151. package/lib/dist-custom-elements/duet-label.js +1 -1
  152. package/lib/dist-custom-elements/duet-layout.js +1 -1
  153. package/lib/dist-custom-elements/duet-link.js +1 -1
  154. package/lib/dist-custom-elements/duet-list-item.js +1 -1
  155. package/lib/dist-custom-elements/duet-list.js +1 -1
  156. package/lib/dist-custom-elements/duet-logo.js +1 -1
  157. package/lib/dist-custom-elements/duet-menu-bar-button.js +2 -2
  158. package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +2 -2
  159. package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +2 -2
  160. package/lib/dist-custom-elements/duet-menu-bar-link.js +2 -2
  161. package/lib/dist-custom-elements/duet-menu-bar.js +2 -2
  162. package/lib/dist-custom-elements/duet-modal.js +20 -10
  163. package/lib/dist-custom-elements/duet-multiselect.js +8 -8
  164. package/lib/dist-custom-elements/duet-nav.js +1 -1
  165. package/lib/dist-custom-elements/duet-notification-drawer.js +4 -4
  166. package/lib/dist-custom-elements/duet-notification.js +2 -2
  167. package/lib/dist-custom-elements/duet-number-input.js +9 -9
  168. package/lib/dist-custom-elements/duet-page-heading.js +2 -2
  169. package/lib/dist-custom-elements/duet-pagination.js +7 -7
  170. package/lib/dist-custom-elements/duet-paragraph.js +1 -1
  171. package/lib/dist-custom-elements/duet-progress.js +1 -1
  172. package/lib/dist-custom-elements/duet-radio-group.js +6 -6
  173. package/lib/dist-custom-elements/duet-radio.js +1 -1
  174. package/lib/dist-custom-elements/duet-range-slider.js +2 -2
  175. package/lib/dist-custom-elements/duet-range-stepper.js +9 -7
  176. package/lib/dist-custom-elements/duet-scrollable.js +1 -1
  177. package/lib/dist-custom-elements/duet-section-layout.js +1 -1
  178. package/lib/dist-custom-elements/duet-select.js +1 -1
  179. package/lib/dist-custom-elements/duet-slideout-lang.js +12 -4
  180. package/lib/dist-custom-elements/duet-slideout-link.js +2 -2
  181. package/lib/dist-custom-elements/duet-slideout-panel-dropdown.js +2 -2
  182. package/lib/dist-custom-elements/duet-slideout-panel.js +11 -3
  183. package/lib/dist-custom-elements/duet-slideout.js +11 -3
  184. package/lib/dist-custom-elements/duet-spacer.js +1 -1
  185. package/lib/dist-custom-elements/duet-spinner.js +1 -1
  186. package/lib/dist-custom-elements/duet-step.js +4 -4
  187. package/lib/dist-custom-elements/duet-stepper.js +2 -2
  188. package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +2 -2
  189. package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +2 -2
  190. package/lib/dist-custom-elements/duet-submenu-bar-link.js +2 -2
  191. package/lib/dist-custom-elements/duet-submenu-bar.js +2 -2
  192. package/lib/dist-custom-elements/duet-tab-group.js +9 -9
  193. package/lib/dist-custom-elements/duet-tab.js +1 -1
  194. package/lib/dist-custom-elements/duet-table.js +1 -1
  195. package/lib/dist-custom-elements/duet-textarea.js +8 -8
  196. package/lib/dist-custom-elements/duet-toggle.js +2 -2
  197. package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +2 -2
  198. package/lib/dist-custom-elements/duet-toolbar-dropdown.js +2 -2
  199. package/lib/dist-custom-elements/duet-toolbar-link.js +2 -2
  200. package/lib/dist-custom-elements/duet-toolbar.js +1 -1
  201. package/lib/dist-custom-elements/duet-tooltip.js +1 -1
  202. package/lib/dist-custom-elements/duet-tray.js +3 -3
  203. package/lib/dist-custom-elements/duet-upload-aria-status.js +1 -1
  204. package/lib/dist-custom-elements/duet-upload.js +18 -18
  205. package/lib/dist-custom-elements/duet-visually-hidden.js +1 -1
  206. package/lib/dist-custom-elements/index.js +1 -1
  207. package/lib/dist-custom-elements/{p-5ab6461c.js → p-02e545b7.js} +1 -1
  208. package/lib/dist-custom-elements/{p-89dbfa07.js → p-05ca18f5.js} +1 -1
  209. package/lib/dist-custom-elements/{p-a0efab88.js → p-0696d787.js} +15 -7
  210. package/lib/dist-custom-elements/{p-9b6166b7.js → p-0ccf72fa.js} +1 -1
  211. package/lib/dist-custom-elements/{p-f7a12024.js → p-14693ab8.js} +8 -8
  212. package/lib/dist-custom-elements/{p-53076cdd.js → p-28adb7fb.js} +2 -2
  213. package/lib/dist-custom-elements/{p-10030e7c.js → p-29249230.js} +1 -1
  214. package/lib/dist-custom-elements/{p-26afb575.js → p-2e134a85.js} +1 -1
  215. package/lib/dist-custom-elements/{p-9cfa785f.js → p-2fdc173c.js} +15 -5
  216. package/lib/dist-custom-elements/{p-c86c6df0.js → p-313e06d8.js} +2 -2
  217. package/lib/dist-custom-elements/{p-1cb77270.js → p-3c33adbf.js} +2 -2
  218. package/lib/dist-custom-elements/{p-87b5525b.js → p-4ebb8421.js} +20 -6
  219. package/lib/dist-custom-elements/{p-cb7de9dd.js → p-5c82d569.js} +1 -1
  220. package/lib/dist-custom-elements/{p-d5e06462.js → p-68cadecc.js} +1 -1
  221. package/lib/dist-custom-elements/{p-2e97d3cf.js → p-6b2ce804.js} +1 -1
  222. package/lib/dist-custom-elements/{p-05e73b74.js → p-702e2d96.js} +1 -1
  223. package/lib/dist-custom-elements/{p-4ad31816.js → p-7f29b745.js} +1 -1
  224. package/lib/dist-custom-elements/{p-9f1bb199.js → p-7f5d00ac.js} +1 -1
  225. package/lib/dist-custom-elements/{p-dd03af24.js → p-8c7ba159.js} +1 -1
  226. package/lib/dist-custom-elements/{p-8aa1b007.js → p-9487cba1.js} +1 -1
  227. package/lib/dist-custom-elements/{p-7a6f9236.js → p-959d322b.js} +1 -1
  228. package/lib/dist-custom-elements/{p-9556589f.js → p-a99b2301.js} +1 -1
  229. package/lib/dist-custom-elements/{p-4a7f34e4.js → p-aae0cdb6.js} +2 -2
  230. package/lib/dist-custom-elements/{p-db69ae9d.js → p-adfa75f8.js} +7 -7
  231. package/lib/dist-custom-elements/{p-13d9d4b0.js → p-b7ca2d79.js} +1 -1
  232. package/lib/dist-custom-elements/{p-9bf072bd.js → p-bf14f0f8.js} +2 -2
  233. package/lib/dist-custom-elements/{p-57aace09.js → p-c714f33d.js} +3 -3
  234. package/lib/dist-custom-elements/{p-ce7b7450.js → p-cd14282a.js} +1 -1
  235. package/lib/dist-custom-elements/{p-84c970d9.js → p-f8879c12.js} +1 -1
  236. package/lib/dist-custom-elements/{p-8d8f500f.js → p-fb2bc18b.js} +6 -6
  237. package/lib/dist-custom-elements/{p-6a8cdb7b.js → p-fb62bc38.js} +1 -1
  238. package/lib/dist-custom-elements/{p-681c9a42.js → p-fd472f42.js} +21 -7
  239. package/lib/duet/duet.esm.js +1 -1
  240. package/lib/duet/duet.js +1 -1
  241. package/lib/duet/{p-6c05e879.js → p-076452be.js} +1 -1
  242. package/lib/duet/{p-eb92e362.entry.js → p-0a5ee4c0.entry.js} +1 -1
  243. package/lib/duet/p-0de5b288.system.entry.js +4 -0
  244. package/lib/duet/{p-aabd9905.system.entry.js → p-0e045be0.system.entry.js} +1 -1
  245. package/lib/duet/{p-2d0a6607.system.entry.js → p-0e81a136.system.entry.js} +1 -1
  246. package/lib/duet/{p-d9a1ce3e.system.entry.js → p-0f79b452.system.entry.js} +1 -1
  247. package/lib/duet/{p-1ea20994.entry.js → p-126b0216.entry.js} +1 -1
  248. package/lib/duet/{p-4d25be5d.entry.js → p-12bb63b7.entry.js} +1 -1
  249. package/lib/duet/p-13a45164.entry.js +4 -0
  250. package/lib/duet/{p-70425e80.system.entry.js → p-15a2c27e.system.entry.js} +1 -1
  251. package/lib/duet/p-15c4eceb.entry.js +4 -0
  252. package/lib/duet/{p-abdd047f.system.entry.js → p-1b362e7c.system.entry.js} +1 -1
  253. package/lib/duet/{p-fd7a5a08.entry.js → p-1bd49c6c.entry.js} +1 -1
  254. package/lib/duet/{p-fd7de93a.entry.js → p-1dab1d9c.entry.js} +1 -1
  255. package/lib/duet/{p-d03517b4.system.entry.js → p-23e9caeb.system.entry.js} +1 -1
  256. package/lib/duet/p-24d3c4a8.entry.js +4 -0
  257. package/lib/duet/{p-dd6b8fec.system.entry.js → p-24e34082.system.entry.js} +1 -1
  258. package/lib/duet/{p-92d37e55.system.js → p-255ef2f1.system.js} +1 -1
  259. package/lib/duet/{p-a8d67797.entry.js → p-275d65d5.entry.js} +1 -1
  260. package/lib/duet/{p-def345e8.system.entry.js → p-2b3edac6.system.entry.js} +1 -1
  261. package/lib/duet/{p-3ffbaf35.system.entry.js → p-2d400724.system.entry.js} +1 -1
  262. package/lib/duet/p-2e49efe9.entry.js +4 -0
  263. package/lib/duet/{p-dbc13c36.system.js → p-2f72d12a.system.js} +1 -1
  264. package/lib/duet/{p-c88e1b86.system.entry.js → p-31bc70cf.system.entry.js} +2 -2
  265. package/lib/duet/{p-2c19f162.entry.js → p-320e55ab.entry.js} +1 -1
  266. package/lib/duet/{p-76fdc86f.system.entry.js → p-34b64696.system.entry.js} +1 -1
  267. package/lib/duet/{p-ecb55af2.system.entry.js → p-355552d3.system.entry.js} +1 -1
  268. package/lib/duet/{p-614c7065.system.entry.js → p-3aec0017.system.entry.js} +1 -1
  269. package/lib/duet/p-3b9604e9.system.entry.js +4 -0
  270. package/lib/duet/{p-85961465.entry.js → p-3d915826.entry.js} +1 -1
  271. package/lib/duet/p-3d9e1c4b.entry.js +4 -0
  272. package/lib/duet/{p-2b3c2e41.system.entry.js → p-3f2e2726.system.entry.js} +1 -1
  273. package/lib/duet/p-40a2b2fa.system.js +4 -0
  274. package/lib/duet/{p-4af19474.entry.js → p-42d2ad4e.entry.js} +1 -1
  275. package/lib/duet/{p-cc332f12.entry.js → p-45899b5e.entry.js} +1 -1
  276. package/lib/duet/{p-07f8de09.system.entry.js → p-4694e76b.system.entry.js} +1 -1
  277. package/lib/duet/{p-ca6f6878.entry.js → p-477f553f.entry.js} +1 -1
  278. package/lib/duet/p-47f8be1e.system.entry.js +4 -0
  279. package/lib/duet/{p-01833853.system.entry.js → p-4b9e5447.system.entry.js} +1 -1
  280. package/lib/duet/{p-53de8491.entry.js → p-4f973b10.entry.js} +1 -1
  281. package/lib/duet/{p-15e1c955.entry.js → p-576c31f3.entry.js} +1 -1
  282. package/lib/duet/{p-3aeb487a.entry.js → p-576e7135.entry.js} +1 -1
  283. package/lib/duet/{p-b3c6d973.system.entry.js → p-57846bb5.system.entry.js} +1 -1
  284. package/lib/duet/{p-39c79c00.system.entry.js → p-5956cfad.system.entry.js} +1 -1
  285. package/lib/duet/{p-d4e3b832.system.entry.js → p-5b36c6d6.system.entry.js} +1 -1
  286. package/lib/duet/{p-efdc7c2e.entry.js → p-5bfac643.entry.js} +1 -1
  287. package/lib/duet/{p-a6653cdc.system.entry.js → p-5eb41b56.system.entry.js} +1 -1
  288. package/lib/duet/{p-0f2c807b.entry.js → p-62228568.entry.js} +1 -1
  289. package/lib/duet/{p-3f01f964.system.entry.js → p-63ecf24a.system.entry.js} +1 -1
  290. package/lib/duet/{p-7ff34de9.entry.js → p-6446cfa5.entry.js} +1 -1
  291. package/lib/duet/{p-35afcb27.entry.js → p-6473dc0f.entry.js} +1 -1
  292. package/lib/duet/{p-9aebf3f7.entry.js → p-682ccc00.entry.js} +1 -1
  293. package/lib/duet/p-69b85da0.system.entry.js +4 -0
  294. package/lib/duet/{p-d94e5b57.system.entry.js → p-6b52b6f4.system.entry.js} +1 -1
  295. package/lib/duet/{p-75492e02.system.entry.js → p-6c4c2102.system.entry.js} +1 -1
  296. package/lib/duet/{p-1bb2106c.system.entry.js → p-6d7c1dcc.system.entry.js} +1 -1
  297. package/lib/duet/p-6f1da07b.entry.js +4 -0
  298. package/lib/duet/p-70aedb94.system.entry.js +4 -0
  299. package/lib/duet/{p-886c35c2.entry.js → p-715016fb.entry.js} +1 -1
  300. package/lib/duet/{p-d8d0fb8f.entry.js → p-72830e75.entry.js} +1 -1
  301. package/lib/duet/{p-8f1e0f63.entry.js → p-73d50c9c.entry.js} +1 -1
  302. package/lib/duet/{p-94fa2062.system.entry.js → p-74540b5e.system.entry.js} +1 -1
  303. package/lib/duet/{p-84cf594e.entry.js → p-7573fbcd.entry.js} +1 -1
  304. package/lib/duet/{p-2e5b3bcf.entry.js → p-7677034c.entry.js} +1 -1
  305. package/lib/duet/{p-b1296afd.system.entry.js → p-775fc78c.system.entry.js} +1 -1
  306. package/lib/duet/p-786be329.entry.js +4 -0
  307. package/lib/duet/{p-c989c952.entry.js → p-78ac6b1f.entry.js} +1 -1
  308. package/lib/duet/{p-259eff20.system.entry.js → p-7981e13b.system.entry.js} +1 -1
  309. package/lib/duet/{p-50ee41e3.entry.js → p-7e109c31.entry.js} +1 -1
  310. package/lib/duet/{p-1e86fdd0.system.entry.js → p-7ee5cf27.system.entry.js} +1 -1
  311. package/lib/duet/{p-1c21f6ee.entry.js → p-7fc39256.entry.js} +1 -1
  312. package/lib/duet/{p-cbd1e2c6.system.entry.js → p-7ff69245.system.entry.js} +1 -1
  313. package/lib/duet/{p-56b49a2b.system.entry.js → p-8044edc7.system.entry.js} +1 -1
  314. package/lib/duet/{p-ab4af140.entry.js → p-81d08141.entry.js} +1 -1
  315. package/lib/duet/{p-5fcf69f8.entry.js → p-870ef497.entry.js} +1 -1
  316. package/lib/duet/{p-7c7f6370.entry.js → p-88ed5a90.entry.js} +1 -1
  317. package/lib/duet/{p-8ed7e105.entry.js → p-8a801ef7.entry.js} +1 -1
  318. package/lib/duet/{p-2e6a3a17.entry.js → p-8f91a9d2.entry.js} +1 -1
  319. package/lib/duet/{p-15b65a7c.entry.js → p-91bdc352.entry.js} +1 -1
  320. package/lib/duet/{p-4266b177.entry.js → p-96a2cd90.entry.js} +1 -1
  321. package/lib/duet/{p-268a27e0.system.entry.js → p-983dabf1.system.entry.js} +1 -1
  322. package/lib/duet/{p-770f94ca.entry.js → p-98daf9ba.entry.js} +1 -1
  323. package/lib/duet/{p-c48232b6.entry.js → p-98ec16d6.entry.js} +1 -1
  324. package/lib/duet/p-9f9a8841.system.entry.js +4 -0
  325. package/lib/duet/{p-d4d0fd29.js → p-a07e1194.js} +1 -1
  326. package/lib/duet/{p-ef7c6a28.system.entry.js → p-a3a9a1b8.system.entry.js} +1 -1
  327. package/lib/duet/p-a495ef97.js +4 -0
  328. package/lib/duet/{p-d7d050f5.system.entry.js → p-a5f7e606.system.entry.js} +1 -1
  329. package/lib/duet/p-a8bb0bf7.entry.js +4 -0
  330. package/lib/duet/{p-51588335.entry.js → p-a9a5200e.entry.js} +1 -1
  331. package/lib/duet/{p-7f1506d7.entry.js → p-aa828067.entry.js} +1 -1
  332. package/lib/duet/{p-20291d6a.system.entry.js → p-ad936690.system.entry.js} +1 -1
  333. package/lib/duet/{p-49ebb54d.system.entry.js → p-af4294e7.system.entry.js} +1 -1
  334. package/lib/duet/p-b0416fcb.entry.js +4 -0
  335. package/lib/duet/{p-f998b544.system.entry.js → p-b132b5df.system.entry.js} +1 -1
  336. package/lib/duet/{p-18a1350b.system.entry.js → p-b17088f0.system.entry.js} +2 -2
  337. package/lib/duet/{p-9693b127.entry.js → p-b2838ccd.entry.js} +1 -1
  338. package/lib/duet/{p-1ec42ecd.entry.js → p-b41123b4.entry.js} +1 -1
  339. package/lib/duet/{p-1515b46a.entry.js → p-b581a3bb.entry.js} +1 -1
  340. package/lib/duet/{p-1ccc3647.system.entry.js → p-b5b3ab80.system.entry.js} +1 -1
  341. package/lib/duet/{p-48a22eca.entry.js → p-b6637423.entry.js} +1 -1
  342. package/lib/duet/{p-fc1cf69f.system.entry.js → p-b6a726fc.system.entry.js} +1 -1
  343. package/lib/duet/{p-04a1f201.entry.js → p-bb7d4e61.entry.js} +1 -1
  344. package/lib/duet/{p-9207cd90.system.entry.js → p-bc674367.system.entry.js} +1 -1
  345. package/lib/duet/{p-e30006d7.system.entry.js → p-bdc0fe30.system.entry.js} +1 -1
  346. package/lib/duet/{p-3c5967bc.entry.js → p-bf48a550.entry.js} +1 -1
  347. package/lib/duet/p-c1cbbc7d.entry.js +4 -0
  348. package/lib/duet/{p-3ab084e8.system.entry.js → p-c23ab387.system.entry.js} +1 -1
  349. package/lib/duet/{p-2765a53e.system.entry.js → p-c274e869.system.entry.js} +1 -1
  350. package/lib/duet/p-c3aafeac.entry.js +4 -0
  351. package/lib/duet/{p-4ddb8b0f.entry.js → p-c60c531f.entry.js} +1 -1
  352. package/lib/duet/{p-2ef88161.system.js → p-c8dc599d.system.js} +1 -1
  353. package/lib/duet/{p-d871a695.system.entry.js → p-cc6d13b2.system.entry.js} +1 -1
  354. package/lib/duet/{p-8ae86f38.system.entry.js → p-ce0ee352.system.entry.js} +1 -1
  355. package/lib/duet/{p-b7c160f8.system.entry.js → p-ce9b09ee.system.entry.js} +1 -1
  356. package/lib/duet/{p-a8432547.system.entry.js → p-d2d70510.system.entry.js} +1 -1
  357. package/lib/duet/{p-e651dcce.system.entry.js → p-d6d7165c.system.entry.js} +1 -1
  358. package/lib/duet/{p-40b6203e.system.entry.js → p-db9ac8a2.system.entry.js} +1 -1
  359. package/lib/duet/{p-9431cbd9.entry.js → p-dd416fcc.entry.js} +1 -1
  360. package/lib/duet/p-df5f218c.system.entry.js +4 -0
  361. package/lib/duet/{p-c3436d4d.system.entry.js → p-e0a5f9b5.system.entry.js} +1 -1
  362. package/lib/duet/{p-8d4c36cc.system.entry.js → p-e1007ea6.system.entry.js} +1 -1
  363. package/lib/duet/p-e165eb06.system.entry.js +4 -0
  364. package/lib/duet/{p-d7014558.entry.js → p-e24d6a72.entry.js} +1 -1
  365. package/lib/duet/p-e501c893.system.entry.js +4 -0
  366. package/lib/duet/{p-032d0db3.system.entry.js → p-e9c85d4e.system.entry.js} +1 -1
  367. package/lib/duet/{p-9ca2af16.system.entry.js → p-ea45098f.system.entry.js} +1 -1
  368. package/lib/duet/p-eb63c8f0.system.entry.js +4 -0
  369. package/lib/duet/{p-68ab467a.entry.js → p-ee01f20b.entry.js} +1 -1
  370. package/lib/duet/{p-0115b516.system.entry.js → p-f32e95bb.system.entry.js} +1 -1
  371. package/lib/duet/{p-74c8d3c2.entry.js → p-f3c22a2f.entry.js} +1 -1
  372. package/lib/duet/p-f4ad0c9c.entry.js +4 -0
  373. package/lib/duet/{p-cffc25f7.system.entry.js → p-f518c0a0.system.entry.js} +1 -1
  374. package/lib/duet/{p-2a57d9b6.entry.js → p-f6af1d70.entry.js} +1 -1
  375. package/lib/duet/{p-9abc893a.system.entry.js → p-f7c1f47c.system.entry.js} +1 -1
  376. package/lib/duet/{p-e459f448.entry.js → p-f8fe134c.entry.js} +1 -1
  377. package/lib/duet/{p-efe489f3.entry.js → p-fc0c9ac3.entry.js} +1 -1
  378. package/lib/duet/p-fda01bca.entry.js +4 -0
  379. package/lib/duet/{p-64c8ddb9.entry.js → p-fedc971f.entry.js} +1 -1
  380. package/lib/esm/duet-action-button.entry.js +12 -3
  381. package/lib/esm/duet-alert.entry.js +15 -2
  382. package/lib/esm/duet-badge.entry.js +1 -1
  383. package/lib/esm/duet-breadcrumb.entry.js +1 -1
  384. package/lib/esm/duet-breadcrumbs.entry.js +2 -2
  385. package/lib/esm/duet-button_2.entry.js +10 -2
  386. package/lib/esm/duet-caption_4.entry.js +16 -2
  387. package/lib/esm/duet-card.entry.js +1 -1
  388. package/lib/esm/duet-checkbox.entry.js +1 -1
  389. package/lib/esm/duet-checkmark.entry.js +1 -1
  390. package/lib/esm/duet-choice_2.entry.js +23 -5
  391. package/lib/esm/duet-collapsible.entry.js +1 -1
  392. package/lib/esm/duet-combobox.entry.js +2 -2
  393. package/lib/esm/duet-contact-card.entry.js +2 -2
  394. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  395. package/lib/esm/duet-date-picker.entry.js +16 -4
  396. package/lib/esm/duet-divider_2.entry.js +1 -1
  397. package/lib/esm/duet-editable-table_3.entry.js +2 -2
  398. package/lib/esm/duet-empty-state.entry.js +1 -1
  399. package/lib/esm/duet-fieldset.entry.js +1 -1
  400. package/lib/esm/duet-footer.entry.js +15 -3
  401. package/lib/esm/duet-grid_2.entry.js +1 -1
  402. package/lib/esm/duet-header_2.entry.js +2 -2
  403. package/lib/esm/duet-hero.entry.js +2 -2
  404. package/lib/esm/duet-icon.entry.js +1 -1
  405. package/lib/esm/duet-input_2.entry.js +2 -2
  406. package/lib/esm/duet-layout.entry.js +1 -1
  407. package/lib/esm/duet-list_2.entry.js +1 -1
  408. package/lib/esm/duet-menu-bar-button.entry.js +1 -1
  409. package/lib/esm/duet-menu-bar-dropdown-link.entry.js +1 -1
  410. package/lib/esm/duet-menu-bar-dropdown.entry.js +1 -1
  411. package/lib/esm/duet-menu-bar-link.entry.js +1 -1
  412. package/lib/esm/duet-menu-bar.entry.js +1 -1
  413. package/lib/esm/duet-modal.entry.js +13 -3
  414. package/lib/esm/duet-multiselect.entry.js +2 -2
  415. package/lib/esm/duet-nav.entry.js +1 -1
  416. package/lib/esm/duet-notification_2.entry.js +2 -2
  417. package/lib/esm/duet-number-input.entry.js +2 -2
  418. package/lib/esm/duet-page-heading.entry.js +1 -1
  419. package/lib/esm/duet-pagination_2.entry.js +7 -5
  420. package/lib/esm/duet-progress.entry.js +2 -2
  421. package/lib/esm/duet-radio_2.entry.js +1 -1
  422. package/lib/esm/duet-range-slider.entry.js +1 -1
  423. package/lib/esm/duet-scrollable_3.entry.js +2 -2
  424. package/lib/esm/duet-section-layout.entry.js +1 -1
  425. package/lib/esm/duet-select.entry.js +1 -1
  426. package/lib/esm/duet-slideout-lang.entry.js +9 -2
  427. package/lib/esm/duet-slideout-link.entry.js +1 -1
  428. package/lib/esm/duet-slideout-panel-dropdown.entry.js +1 -1
  429. package/lib/esm/duet-slideout-panel.entry.js +10 -3
  430. package/lib/esm/duet-slideout.entry.js +10 -3
  431. package/lib/esm/duet-step_2.entry.js +1 -1
  432. package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +1 -1
  433. package/lib/esm/duet-submenu-bar-dropdown.entry.js +1 -1
  434. package/lib/esm/duet-submenu-bar-link.entry.js +1 -1
  435. package/lib/esm/duet-submenu-bar.entry.js +1 -1
  436. package/lib/esm/duet-textarea.entry.js +1 -1
  437. package/lib/esm/duet-toggle.entry.js +1 -1
  438. package/lib/esm/duet-toolbar-dropdown-link.entry.js +1 -1
  439. package/lib/esm/duet-toolbar-dropdown.entry.js +1 -1
  440. package/lib/esm/duet-toolbar-link.entry.js +1 -1
  441. package/lib/esm/duet-toolbar.entry.js +1 -1
  442. package/lib/esm/duet-tooltip.entry.js +2 -2
  443. package/lib/esm/duet-tray.entry.js +2 -2
  444. package/lib/esm/duet-upload-aria-status.entry.js +1 -1
  445. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  446. package/lib/esm/duet.js +3 -3
  447. package/lib/esm/{focus-utils-24487417.js → focus-utils-6f660fbe.js} +1 -1
  448. package/lib/esm/{index-3b6ef857.js → index-3e7e0b4a.js} +1 -1
  449. package/lib/esm/{language-utils-7b211f31.js → language-utils-6be16ff0.js} +1 -1
  450. package/lib/esm/loader.js +3 -3
  451. package/lib/esm-es5/duet-action-button.entry.js +1 -1
  452. package/lib/esm-es5/duet-alert.entry.js +2 -2
  453. package/lib/esm-es5/duet-badge.entry.js +1 -1
  454. package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
  455. package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
  456. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  457. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  458. package/lib/esm-es5/duet-card.entry.js +1 -1
  459. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  460. package/lib/esm-es5/duet-checkmark.entry.js +1 -1
  461. package/lib/esm-es5/duet-choice_2.entry.js +2 -2
  462. package/lib/esm-es5/duet-collapsible.entry.js +1 -1
  463. package/lib/esm-es5/duet-combobox.entry.js +1 -1
  464. package/lib/esm-es5/duet-contact-card.entry.js +1 -1
  465. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  466. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  467. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  468. package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
  469. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  470. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  471. package/lib/esm-es5/duet-footer.entry.js +2 -2
  472. package/lib/esm-es5/duet-grid_2.entry.js +1 -1
  473. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  474. package/lib/esm-es5/duet-hero.entry.js +1 -1
  475. package/lib/esm-es5/duet-icon.entry.js +1 -1
  476. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  477. package/lib/esm-es5/duet-layout.entry.js +1 -1
  478. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  479. package/lib/esm-es5/duet-menu-bar-button.entry.js +1 -1
  480. package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
  481. package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +1 -1
  482. package/lib/esm-es5/duet-menu-bar-link.entry.js +1 -1
  483. package/lib/esm-es5/duet-menu-bar.entry.js +1 -1
  484. package/lib/esm-es5/duet-modal.entry.js +2 -2
  485. package/lib/esm-es5/duet-multiselect.entry.js +1 -1
  486. package/lib/esm-es5/duet-nav.entry.js +1 -1
  487. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  488. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  489. package/lib/esm-es5/duet-page-heading.entry.js +1 -1
  490. package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
  491. package/lib/esm-es5/duet-progress.entry.js +1 -1
  492. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  493. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  494. package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
  495. package/lib/esm-es5/duet-section-layout.entry.js +1 -1
  496. package/lib/esm-es5/duet-select.entry.js +1 -1
  497. package/lib/esm-es5/duet-slideout-lang.entry.js +1 -1
  498. package/lib/esm-es5/duet-slideout-link.entry.js +1 -1
  499. package/lib/esm-es5/duet-slideout-panel-dropdown.entry.js +1 -1
  500. package/lib/esm-es5/duet-slideout-panel.entry.js +2 -2
  501. package/lib/esm-es5/duet-slideout.entry.js +2 -2
  502. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  503. package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
  504. package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
  505. package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
  506. package/lib/esm-es5/duet-submenu-bar.entry.js +1 -1
  507. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  508. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  509. package/lib/esm-es5/duet-toolbar-dropdown-link.entry.js +1 -1
  510. package/lib/esm-es5/duet-toolbar-dropdown.entry.js +1 -1
  511. package/lib/esm-es5/duet-toolbar-link.entry.js +1 -1
  512. package/lib/esm-es5/duet-toolbar.entry.js +1 -1
  513. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  514. package/lib/esm-es5/duet-tray.entry.js +1 -1
  515. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  516. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  517. package/lib/esm-es5/duet.js +1 -1
  518. package/lib/esm-es5/focus-utils-6f660fbe.js +4 -0
  519. package/lib/esm-es5/{index-3b6ef857.js → index-3e7e0b4a.js} +1 -1
  520. package/lib/esm-es5/{language-utils-7b211f31.js → language-utils-6be16ff0.js} +1 -1
  521. package/lib/esm-es5/loader.js +1 -1
  522. package/lib/types/components/duet-action-button/duet-action-button.d.ts +6 -0
  523. package/lib/types/components/duet-alert/duet-alert.d.ts +4 -1
  524. package/lib/types/components/duet-button/duet-button.d.ts +3 -2
  525. package/lib/types/components/duet-choice/duet-choice.d.ts +6 -2
  526. package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +3 -0
  527. package/lib/types/components/duet-footer/duet-footer.d.ts +3 -0
  528. package/lib/types/components/duet-link/duet-link.d.ts +3 -0
  529. package/lib/types/components/duet-modal/duet-modal.d.ts +2 -0
  530. package/lib/types/components/duet-range-stepper/duet-range-stepper.d.ts +0 -1
  531. package/lib/types/components/duet-slideout/duet-slideout.d.ts +4 -1
  532. package/lib/types/components/duet-slideout-lang/duet-slideout-lang.d.ts +4 -1
  533. package/lib/types/components/duet-slideout-panel/duet-slideout-panel.d.ts +4 -1
  534. package/lib/types/components.d.ts +8 -4
  535. package/package.json +5 -5
  536. package/lib/duet/p-0335d3ba.system.entry.js +0 -4
  537. package/lib/duet/p-31159c85.system.entry.js +0 -4
  538. package/lib/duet/p-3dc1f3c6.system.entry.js +0 -4
  539. package/lib/duet/p-44c56bb6.entry.js +0 -4
  540. package/lib/duet/p-470e0520.entry.js +0 -4
  541. package/lib/duet/p-475f863c.entry.js +0 -4
  542. package/lib/duet/p-4d5cb241.entry.js +0 -4
  543. package/lib/duet/p-4f203781.js +0 -4
  544. package/lib/duet/p-5a884cab.entry.js +0 -4
  545. package/lib/duet/p-5bf71c27.entry.js +0 -4
  546. package/lib/duet/p-74e6b8fd.system.entry.js +0 -4
  547. package/lib/duet/p-77c2e21e.system.js +0 -4
  548. package/lib/duet/p-82e4f38f.entry.js +0 -4
  549. package/lib/duet/p-84f17b60.entry.js +0 -4
  550. package/lib/duet/p-8e6d9b39.entry.js +0 -4
  551. package/lib/duet/p-9a911da7.entry.js +0 -4
  552. package/lib/duet/p-9d4592dc.system.entry.js +0 -4
  553. package/lib/duet/p-9fd3df4e.system.entry.js +0 -4
  554. package/lib/duet/p-c96b1fae.entry.js +0 -4
  555. package/lib/duet/p-cb814de3.entry.js +0 -4
  556. package/lib/duet/p-da73f58c.system.entry.js +0 -4
  557. package/lib/duet/p-deb0bf2b.system.entry.js +0 -4
  558. package/lib/duet/p-f5708af6.system.entry.js +0 -4
  559. package/lib/duet/p-fee010a2.entry.js +0 -4
  560. package/lib/duet/p-ff84ff9d.system.entry.js +0 -4
  561. package/lib/esm-es5/focus-utils-24487417.js +0 -4
@@ -1,4 +1,4 @@
1
1
  var __awaiter=this&&this.__awaiter||function(e,t,a,i){function r(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function l(e){try{s(i.next(e))}catch(t){n(t)}}function o(e){try{s(i["throw"](e))}catch(t){n(t)}}function s(e){e.done?a(e.value):r(e.value).then(l,o)}s((i=i.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:[]},i,r,n,l;return l={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function o(e){return function(t){return s([e,t])}}function s(o){if(i)throw new TypeError("Generator is already executing.");while(l&&(l=0,o[0]&&(a=0)),a)try{if(i=1,r&&(n=o[0]&2?r["return"]:o[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,o[1])).done)return n;if(r=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++;r=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(s){o=[6,s];r=0}finally{i=n=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,a){if(a||arguments.length===2)for(var i=0,r=t.length,n;i<r;i++){if(n||!(i in t)){if(!n)n=Array.prototype.slice.call(t,0,i);n[i]=t[i]}}return e.concat(n||Array.prototype.slice.call(t))};
2
2
  /*!
3
3
  * Built with Duet Design System
4
- */import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-3b6ef857.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{f as fieldSorter,d as debounce}from"./js-utils-fa98b8cd.js";import{i as isKeyboardClick}from"./keyboard-utils-d237bd5a.js";import{g as getLocaleString,s as sanitizeString}from"./language-utils-7b211f31.js";import{q as sizeNavigation,s as sizeHeader}from"./tokens.module-d3321092.js";import{b as breakpointToToken}from"./token-utils-b531747a.js";import{c as createID}from"./create-id-981107da.js";import{p as parsePossibleJSON}from"./string-utils-5954f458.js";var TableData=function(e,t){var a=e.data,i=e.groupId,r=e.alignment;var n="duet-editable-table duet-editable-table-content-".concat(i);if(typeof a==="string"){return h("td",{innerHTML:a,class:n,part:"".concat(i,"content"),style:{verticalAlign:r}})}else{return h("td",{class:n,part:"".concat(i,"content"),style:{verticalAlign:r}},a)}};var duetEditableTableCss=".sc-duet-editable-table-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-actions-menu.sc-duet-editable-table{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button.sc-duet-editable-table{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon.sc-duet-editable-table .duet-icon.sc-duet-editable-table{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row.sc-duet-editable-table .duet-text-right.sc-duet-editable-table{text-align:right}.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";var DuetEditableTable=function(){function e(e){var t=this;registerInstance(this,e);this.duetTableToggle=createEvent(this,"duetTableToggle",7);this.duetMenuClick=createEvent(this,"duetMenuClick",7);this.sortableDefaultLabel={fi:"Järjestä",en:"Click to sort",sv:"Klicka för att sortera"};this.actionColumnLabel={en:"Actions for rows",fi:"Toiminnot rivillä",sv:"Åtgärder för rader"};this.toggleColumn=function(e,a){a.preventDefault();var i=e.sort_order,r=e.direction,n=e.index,l=e.key;t.duetTableToggle.emit({sort_order:i,index:n,direction:r,key:l,component:"duet-editable-table",originalEvent:a})};this.handleKeyDown=function(e,a){if(isKeyboardClick(a)){t.toggleColumn(e,a)}};this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.actions=undefined;this.columns=undefined;this.rows=undefined;this.sortable=false;this.groupId="";this.theme="";this.accessibleRole=undefined}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.createLabel=function(e){var t=this;var a=e.sort_order,i=e.direction,r=e.index,n=e.label;var l=getLocaleString(n);if(!this.sortable){return l}var o=function(){if(!!a&&i===1){return"action-arrow-down-small"}else if(!!a&&i===-1){return"action-arrow-up-small"}return"action-subtract-small"};return h("span",{class:"duet-table-label","data-index":r},h("duet-button",{size:"small",icon:o(),"icon-size":"medium-small","accessible-label":getLocaleString(this.sortableDefaultLabel),variation:"plain",margin:"none","icon-right":true,onClick:function(a){return t.toggleColumn(e,a)},onKeyDown:function(a){return t.handleKeyDown(e,a)}},l))};e.prototype.getSortedColumns=function(){return __spreadArray([],this.columns,true).sort(fieldSorter(["index"]))};e.prototype.getRowSortOrder=function(){var e=__spreadArray([],this.columns,true).sort(fieldSorter(["sort_order"]));return e.filter((function(e){return e.sort_order})).map((function(e){return e.direction===-1?"-".concat(e.key):e.key}))};e.prototype.renderTableHeader=function(){var e=this;if(!this.columns){return}var t=this.getSortedColumns();return h("tr",{class:{"duet-table-action-header":!!this.actions}},t.map((function(t){if(t.display!==false){var a=e.createLabel(t);return a!==""?h("th",{scope:"col"},a):h("td",null)}})),this.actions&&h("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&h("duet-visually-hidden",null,getLocaleString(this.actionColumnLabel))))};e.prototype.renderActions=function(e,t){var a=this;if(!this.actions){return}return h("td",{class:"duet-text-right"},this.actions.map((function(i){return h("duet-action-button",{actionMeta:Object.assign({},(e===null||e===void 0?void 0:e.meta)||{},{index:t}),actionId:(e===null||e===void 0?void 0:e.uid)||(e===null||e===void 0?void 0:e.id)||null,actionName:i.name,theme:a.theme,iconName:i.icon,iconColor:i.color,iconSize:i.size,background:i.background,"accessible-label":"".concat(getLocaleString(i.label)," ").concat(e.name||"")})})))};e.prototype.renderTableBody=function(){var e=this;var t=this.getSortedColumns();var a=this.getRowSortOrder();var i=__spreadArray([],this.rows,true).sort(fieldSorter(a));return i.map((function(a,i){var r;return h("tr",{class:(r={"duet-table-action-row":!!e.actions,"duet-editable-table-row":true},r["duet-editable-table-row-".concat(e.groupId)]=true,r),"data-meta":JSON.stringify(a.meta)},t.map((function(t){var i=a[t.key]?a[t.key]:a.item;if(t.display!==false){return h(TableData,{data:i,groupId:e.groupId})}})),e.actions&&e.renderActions(a,i))}))};e.prototype.render=function(){var e;return h(Host,{class:(e={},e["duet-editable-table-".concat(this.variation)]=true,e["duet-editable-table"]=true,e["duet-editable-table-".concat(this.theme)]=true,e["duet-editable-table-scrollable"]=this.breakpoint==="none-scrollable",e["duet-editable-table-sortable"]=this.sortable,e["duet-editable-table-actions"]=!!this.actions,e["duet-m-0"]=this.margin==="none",e["duet-theme-turva"]=this.theme==="turva",e)},h("duet-table",{class:"duet-editable-table-table",sticky:this.sticky,stickyDistance:this.stickyDistance,margin:this.margin,theme:this.theme,variation:this.variation,breakpoint:this.breakpoint},h("table",{role:this.accessibleRole},h("caption",null,h("slot",{name:"tcaption"})),h("thead",null,h("tr",null,h("td",{class:"duet-editable-table-actions-menu",colSpan:99},h("slot",{name:"thead-first"}))),this.renderTableHeader(),h("tr",null,h("td",{class:"duet-editable-table-actions-menu",colSpan:99},h("slot",{name:"thead-last"})))),h("tbody",null,this.renderTableBody()),h("tfoot",null,h("tr",null,h("th",{class:"duet-editable-table-footer-menu",colSpan:99},h("slot",{name:"tfoot"})))))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetEditableTable.style=duetEditableTableCss;var duetTableCss='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead,duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead *{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:rgb(0, 41, 77)}duet-table.duet-theme-turva td{color:rgb(23, 28, 58)}duet-table th{font-weight:600;line-height:1.25;color:rgb(101, 119, 135);text-align:left}duet-table.duet-theme-turva th{color:rgb(116, 116, 117)}duet-table tbody th{font-weight:600;color:rgb(0, 41, 77)}duet-table.duet-theme-turva tbody th{color:rgb(23, 28, 58)}duet-table .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:rgb(101, 119, 135);text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:rgb(0, 41, 77);content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:rgb(23, 28, 58)}.duet-table-sticky thead th{position:sticky;top:0;background:rgb(255, 255, 255)}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:rgb(255, 255, 255)}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid rgb(225, 227, 230)}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:rgb(228, 228, 230)}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid rgb(225, 227, 230)}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:rgb(228, 228, 230)}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid rgb(225, 227, 230)}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:rgb(228, 228, 230)}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid rgb(101, 119, 135)}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:rgb(68, 68, 69)}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:rgb(225, 227, 230)}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:rgb(228, 228, 230)}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid rgb(225, 227, 230)}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:rgb(228, 228, 230)}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid rgb(225, 227, 230)}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:rgb(228, 228, 230)}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid rgb(225, 227, 230)}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid rgb(225, 227, 230)}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:rgb(228, 228, 230)}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(225, 227, 230)}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(228, 228, 230)}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}.duet-table-sortable tbody tr td:first-child,.duet-table-sortable thead tr th:first-child{padding:20px}.duet-table-sortable:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(225, 227, 230)}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(228, 228, 230)}.duet-table-actions table{table-layout:auto}.duet-table-actions thead th:last-child{width:1px;white-space:nowrap}.duet-editable-table-table.duet-table-flattened tr{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;gap:10px}.duet-editable-table-table.duet-table-flattened tr.duet-table-action-row td:last-child::before{padding:0;content:""}.duet-editable-table-table.duet-table-flattened td{grid-column:1/2}.duet-editable-table-table.duet-table-flattened td:first-child{grid-row:1;grid-column:1}.duet-editable-table-table.duet-table-flattened td:last-child{grid-row:1;grid-column:2}';var stickyTopValues={none:0,"with-links":parseFloat(sizeNavigation)*16,"without-links":parseFloat(sizeHeader)*16};var DuetTable=function(){function e(e){var t=this;registerInstance(this,e);this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu)";this.handleMediaQueryChange=function(e){t.matchesBreakpoint=e.matches};this.matchesBreakpoint=true;this.theme=undefined;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.hideHeadVisually=false}e.prototype.connectedCallback=function(){var e=this;var t=this.breakpoint==="none"||this.breakpoint==="none-scrollable"?"all":breakpointToToken[this.breakpoint];this.mq=matchMedia(t);this.mq.addEventListener("change",debounce(this.handleMediaQueryChange,50));this.handleMediaQueryChange(this.mq);this.observer=new MutationObserver((function(){return debounce(e.copyHeadingsToCells(),50)}));this.observer.observe(this.element,{childList:true,subtree:true})};e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.copyHeadingsToCells();if(this.sticky&&this.breakpoint==="none-scrollable"){console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence')}if(this.sticky){var e=stickyTopValues[this.stickyDistance];var t=this.element.querySelectorAll(this.headingSelector);t.forEach((function(t){return t.style.top="".concat(e,"px")}))}};e.prototype.componentDidLoad=function(){this.observer?this.observer.takeRecords():null};e.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true};e.prototype.copyHeadingsToCells=function(){var e=this.element.querySelectorAll(this.headingSelector);var t=this.element.querySelectorAll("tbody tr");var a=Array.from(e).map((function(e){return e.textContent.trim()}));t.forEach((function(e){e.querySelectorAll("td").forEach((function(e,t){if(a[t]){e.dataset.heading=a[t]}}))}))};e.prototype.render=function(){var e;return h(Host,{class:(e={},e["duet-table-".concat(this.variation)]=true,e["duet-table-flattened"]=!this.matchesBreakpoint,e["duet-table-sticky"]=this.matchesBreakpoint&&this.sticky,e["duet-table-scrollable"]=this.breakpoint==="none-scrollable",e["duet-m-0"]=this.margin==="none",e["duet-theme-turva"]=this.theme==="turva",e["duet-table-hide-head-visually"]=this.hideHeadVisually,e)},h("slot",null))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetTable.style=duetTableCss;var errorCodes=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}}];var getError=function(e,t){var a={type:undefined,system_message:undefined,message:undefined};t=parsePossibleJSON(t);a=t.filter((function(t){return t.type==e}))[0];if(!a){a=t.filter((function(e){return e.type==="default"}))[0]}return a};var getI18nError=function(e,t){var a=getError(e,t);var i=getLocaleString(a.message);if(i===""||!i){return a.system_message}else{return i}};var ErrorItem=function(e){var t=e.data,a=e.errorCodes;var i=t.item,r=t.error;var n=i.name;var l=r.type;return h("span",{class:"duet-upload-item-error",role:"status"},h("duet-paragraph",{class:"duet-upload-item-name",color:"danger",margin:"none",weight:"semi-bold"},h("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),h("duet-spacer",{size:"xx-small",direction:"horizontal"}),n),h("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},getI18nError(l,a)))};var ProgressItem=function(e){var t=e.progress,a=e.name;return h("span",{class:"duet-upload-item-name"},h("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),h("duet-spacer",{size:"xx-small",direction:"horizontal"}),a,h("br",null),h("duet-progress",{progress:Math.ceil(t),"aria-hidden":true}))};var PendingItem=function(e){var t=e.name;return h("span",{class:"duet-upload-item-name"},h("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),h("duet-spacer",{size:"xx-small",direction:"horizontal"}),t)};var formatBytes=function(e,t){if(t===void 0){t=2}if(e===0){return"0 Bytes"}var a=1024;var i=t<0?0:t;var r=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];var n=Math.floor(Math.log(e)/Math.log(a));return parseFloat((e/Math.pow(a,n)).toFixed(i))+" "+r[n]};var SuccessItem=function(e){var t=e.data,a=e.showLinks;var i=t.item,r=t.size,n=t.uploaded,l=t.url,o=t.meta;var s=i.name;var d=h("span",{class:"duet-upload-item-name"},h("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),h("duet-spacer",{size:"xx-small",direction:"horizontal"}),s);var u=h("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",formatBytes(r),")");var p=n&&l&&a?h("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},h("duet-link",{url:l,external:true},d),h("duet-spacer",{size:"xx-small",direction:"horizontal"}),u):h("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},d,h("duet-spacer",{size:"xx-small",direction:"horizontal"}),u);var c=o&&o.badges?h("span",null,h("duet-spacer",{size:"xx-small"}),o.badges.map((function(e){return h("duet-badge",{color:"primary"},e)}))):undefined;return h("span",{class:"duet-upload-item-success"},h("div",null,p),c)};var validateFileExtension=function(e,t){if(!t){return true}var a=e.split(".");var i=t.split(",");var r=a[a.length-1];return i.includes(r)};var validateFileMime=function(e,t){if(!t||!e){return true}var a=t.split(",");var i=false;a.forEach((function(t){var a=t.split("/");var r=e.split("/");if(a[0]===r[0]&&(a[1]===r[1]||a[1]==="*")){i=true}}));return i};var validateFileSize=function(e,t){if(!t||!e){return true}return t>=e};var validateFile=function(e,t,a){var i=t.allowedMimetypes,r=t.allowedExtensions,n=t.maxBytes;var l=false;var o=getError("default",a);if(e){var s=e.name,d=e.type,u=e.size;var p=validateFileMime(d,i);var h=r==="all"||r===""||r===" "||r===undefined?true:validateFileExtension(s.toLowerCase(),r);var c=validateFileSize(u,n);if(!p){o=getError("duet-upload-101",a)}if(!h){o=getError("duet-upload-100",a)}if(!c){o=getError("duet-upload-201",a)}l=p&&h&&c}else{l=false}return{valid:l,errorMessage:l?undefined:getLocaleString(o.message),errorSystem:l?undefined:o.system_message,errorType:l?undefined:o.type}};var validateTotalSizeIsAboveMax=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid&&e.size){a+=e.size}}));if(a>t){return true}}return false};var validateTotalAmountIsAboveMax=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid){a++}}));if(a>t){return true}}return false};var makeXhrRequest=function(e){var t=e.payload,a=e.options,i=e.onFailure,r=e.onSuccess,n=e.onProgress;var l=a.type,o=l===void 0?"POST":l,s=a.xhr,d=a.uri,u=a.argument,p=u===void 0?null:u,h=a.headers,c=h===void 0?null:h;s.open(o,"".concat(d).concat(p||""),true);var f=t.data,b=t.name;if(c){Object.keys(c).forEach((function(e){s.setRequestHeader(e,c[e])}))}if(o==="POST"){s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.DONE&&s.status>=200&&s.status<300){r(s,b,s.status)}if(s.readyState===XMLHttpRequest.DONE&&s.status>=300&&s.status<999){i(s,b,s.status)}};n(b)}s.send(f);return s};var duetUploadCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:rgb(245, 248, 250)}.duet-upload-filelist-empty-label{font-size:1rem;font-weight:400}.duet-upload-editable-table-header-hidden{display:none}.duet-upload-editable-table tbody .duet-upload-editable-table-data{padding:0 !important;border:0}.duet-upload-editable-table duet-editable-table tfoot,.duet-upload-editable-table duet-editable-table thead{display:none}.duet-upload-editable-table duet-editable-table .duet-editable-table-content{padding-right:0 !important;padding-left:0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td{padding:1rem 0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child{padding-right:0 !important}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending{position:relative}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-progress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-progress{position:absolute;bottom:0;width:100%}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button),.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-action-button::part(button){border:0}.duet-upload-editable-table .duet-upload-item-name duet-icon{position:relative;top:2px}duet-paragraph::part(duet-paragraph){word-break:break-word}";var DuetUpload=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent(this,"duetChange",3);this.duetBlur=createEvent(this,"duetBlur",7);this.duetFocus=createEvent(this,"duetFocus",7);this.duetReady=createEvent(this,"duetReady",7);this.duetDone=createEvent(this,"duetDone",3);this.duetState=createEvent(this,"duetState",3);this.duetDelete=createEvent(this,"duetDelete",3);this.duetCancel=createEvent(this,"duetCancel",3);this.duetProgress=createEvent(this,"duetProgress",3);this.duetUpload=createEvent(this,"duetUpload",3);this.buttonId=createID("DuetButton");this.labelId=createID("DuetLabel");this.uploadId=createID("DuetUpload");this.filesInProgress=new Map;this.fileMaxReached=false;this.bytesMaxReached=false;this.internalStatusMessageLabel=undefined;this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"};this.kick=debounce((function(){t.tick=Date.now()}),30);this.listenForActionEvents=function(){t.element.addEventListener("duetActionEvent",(function(e){var a=e.detail;var i=a.action,r=a.id,n=a.originalEvent;switch(i){case"delete":t.onDelete(r,n);break;case"cancel":t.onCancel(r,n);break}}))};this.verifyValidity=function(){var e=t.getFilesAsArray(),a=e.invalid,i=e.valid;var r=t.valid;t.valid=a.length===0&&i.length!==0;if(t.valid!==r){t.duetState.emit({originalEvent:undefined,data:{valid:t.valid,from:"componentWillRender"},component:"duet-upload"})}};this.getGroupFromItemData=function(e){if(e.valid&&e.progress===100){return t.DefaultGroups.success}else if(e.progress>0&&e.progress!==100){return t.DefaultGroups.inprogress}else if(!e.valid){return t.DefaultGroups.failure}else if(e.pending){return t.DefaultGroups.pending}else if(e.group){return e.group}else{return"none"}};this.getItemHTMLFromItemData=function(e,a){if(a===t.DefaultGroups.success){return h(SuccessItem,{data:e,showLinks:t.showLinks})}else if(a===t.DefaultGroups.inprogress){return h(ProgressItem,{progress:e.progress,name:e.item.name})}else if(a===t.DefaultGroups.pending){return h(PendingItem,{name:e.item.name})}else if(a===t.DefaultGroups.failure){return h(ErrorItem,{data:e,errorCodes:t.errorCodes})}else if(e.group){return e.html}else{return"none"}};this.genHashName=function(){return Date.now().toString(36)+Math.random()};this.updateValueInMap=function(e,a,i,r){if(r===void 0){r=true}try{var n=t.files.get(e);n[a]=i;t.files.set(e,n)}catch(l){}if(r){t.kick()}};this.updateProgress=function(e,a){var i=function(i){t.updateValueInMap(a,"progress",i);t.onProgress(a,i,e)};if(e.lengthComputable){var r=e.loaded/e.total*100;i(r)}else{console.log("cant read progress")}};this.trackProgress=function(e,a){if(a===void 0){a=false}if(a){t.filesInProgress.delete(e)}else{t.filesInProgress.set(e,"inprogress")}if(t.filesInProgress.size===0){t.onDone()}};this.getFilesAsArray=function(){var e=[];var a=[];t.files.forEach((function(t){if(t.valid&&!t.deleted){e.push(t)}else if(!t.valid&&!t.deleted){a.push(t)}}));return{valid:e,invalid:a}};this.resetFormFields=function(){t.nativeInput.value=""};this.startUpload=function(e,a){if(a===void 0){a=undefined}return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){this.metaData=a;this.nativeInput.click();this.onUpload(e,a);e.stopPropagation();e.preventDefault();return[2]}))}))};this.transferComplete=function(e){t.updateValueInMap(e,"progress",100,false);t.trackProgress(e,true)};this.transferDone=function(e,a,i){t.updateValueInMap(a,"status",i,false);t.updateValueInMap(a,"uploaded",true,false);try{var r=JSON.parse(e.response);t.updateValueInMap(a,"url",r.url)}catch(n){t.updateValueInMap(a,"url",null);console.error("Server did not respond with expected response {url: string}")}return};this.transferDoneWithFailure=function(e,a,i){try{var r=JSON.parse(e.response).error;t.updateValueInMap(a,"error",{message:r.message,type:r.type},false)}catch(n){console.error("Server did not respond with expected response error:{message: string, type: int}");t.updateValueInMap(a,"error",{type:i},false)}t.updateValueInMap(a,"valid",false,true)};this.transferFailed=function(e){t.updateValueInMap(e,"error",getI18nError("duet-upload-001",t.errorCodes))};this.transferCanceled=function(e){t.files.delete(e);t.validateTotals(e);t.kick()};this.validateTotals=function(e){var a=validateTotalSizeIsAboveMax(t.files,t.maxBytesTotal);var i=validateTotalAmountIsAboveMax(t.files,t.maxFiles);if(a&&e){t.updateValueInMap(e,"error",getI18nError("duet-upload-202",t.errorCodes),false)}if(i&&e){t.updateValueInMap(e,"error",getI18nError("duet-upload-301",t.errorCodes),false)}t.bytesMaxReached=a;t.fileMaxReached=i;return{bytesMaxReached:a,fileMaxReached:i}};this.uploadFile=function(e,a,i){if(a===void 0){a=false}return __awaiter(t,void 0,void 0,(function(){var t,r,n;return __generator(this,(function(l){switch(l.label){case 0:if(!a&&this.deferUpload){this.updateValueInMap(e.item.name,"pending",true,false);this.updateValueInMap(e.item.name,"group","pending",true)}else if(a){this.updateValueInMap(e.item.name,"pending",false,false);this.updateValueInMap(e.item.name,"group",undefined,true)}l.label=1;case 1:l.trys.push([1,4,,5]);if(!(!this.deferUpload||a))return[3,3];t=new FormData;t.append("file",e.item);if(i){t.append("key",i)}t.append("uid",e.uid);t.append("name",e.item.name);t.append("metadata",JSON.stringify({uid:e.uid,url:this.uri,size:e.item.size,meta:e.meta}));r=e;return[4,this.makeXHRPostRequest(t)];case 2:r.xhr=l.sent();l.label=3;case 3:return[3,5];case 4:n=l.sent();this.updateValueInMap(e.item.name,"valid",false,false);return[3,5];case 5:return[2]}}))}))};this.uploadPendingFiles=function(){for(var e=0,a=Array.from(t.files.entries());e<a.length;e++){var i=a[e],r=i[0],n=i[1];if(n.group==="pending"&&n.pending===true){t.uploadFile(n,true,r)}}};this.getItemFromUID=function(e){for(var a=0,i=Array.from(t.files.entries());a<i.length;a++){var r=i[a],n=r[0],l=r[1];if(l.uid===e){return{value:l,key:n}}}return null};this.onDelete=function(e,a){var i=t.getItemFromUID(e);var r=i.key;var n=t.files.get(r);t.files.delete(r);t.validateTotals();t.kick();t.duetDelete.emit({originalEvent:a,data:{deletion:n},component:"duet-upload"});if(!t.external&&!n.pending){t.makeXHRDeleteRequest(n)}t.resetFormFields()};this.onCancel=function(e,a){var i=t.getItemFromUID(e).key;var r=t.files.get(i);t.files.delete(i);if(!t.external){var n=r.xhr;if(n){n.abort()}}else{t.kick()}t.resetFormFields();t.duetCancel.emit({originalEvent:a,data:{cancelled:r},component:"duet-upload"})};this.onUpload=function(e,a){t.duetUpload.emit({originalEvent:e,metaData:a,component:"duet-upload"})};this.onBlur=function(e){t.duetBlur.emit({originalEvent:e,component:"duet-upload"})};this.onProgress=function(e,a,i){t.duetChange.emit({originalEvent:i,data:{key:e,percentComplete:a},component:"duet-upload"})};this.onFocus=function(e){t.duetFocus.emit({originalEvent:e,component:"duet-upload"})};this.onReady=function(){t.duetReady.emit({component:"duet-upload"})};this.onDone=function(){t.duetDone.emit({component:"duet-upload",data:{files:t.files}})};this.filterMap=function(){var e=Array.from(t.files.values());var a=[];var i=[];var r=[];var n=[];e.forEach((function(e){var l=t.getGroupFromItemData(e);var o=t.getItemHTMLFromItemData(e,l);if(l===t.DefaultGroups.success){n.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(l===t.DefaultGroups.inprogress){a.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(l===t.DefaultGroups.pending){r.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(l===t.DefaultGroups.failure){i.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(e.group){a.push({uid:e.uid,item:o,group:e.group,name:e.item.name})}}));return{pending:r,failure:i,success:n,inprogress:a}};this.getColumns=function(e){return[{sort_order:1,direction:-1,index:0,key:e.id,label:e.label}]};this.getActions=function(e){return t.actions.filter((function(t){return t.map.includes(e)}))};this.renderEditableTableGroups=function(){var e=t.filterMap();var a=t.groups.map((function(a){var i=e[a.id];if(!(i===null||i===void 0?void 0:i.length)){return}return h("duet-table",{variation:"plain",breakpoint:"none",role:"log",margin:t.hideGroups?"none":"auto"},h("table",{class:"duet-upload-editable-table"},h("thead",{class:"duet-upload-editable-table-header"},h("tr",null,h("th",{class:{"duet-upload-editable-table-header-hidden":t.hideGroups}},!t.hideGroups?getLocaleString(a.label):h("duet-visually-hidden",null,getLocaleString(a.label))))),h("tbody",null,h("tr",null,h("td",{class:"duet-upload-editable-table-data"},h("duet-editable-table",{breakpoint:"none",variation:"plain",groupId:a.id,columns:t.getColumns(a),actions:t.getActions(a.id),margin:"none",rows:i}))))))}));return a};this.tick=Date.now();this.accessibleActiveDescendant=undefined;this.accessibleDescribedBy=undefined;this.accessibleControls=undefined;this.accessibleOwns=undefined;this.external=false;this.middleware=null;this.deferUpload=false;this.hideButton=false;this.actions=[{icon:"action-delete",color:"color-danger",size:"x-small",background:"gray-lightest",name:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Delete the file",sv:"Ta bort filen"}},{icon:"navigation-close",color:"primary",size:"x-small",background:"gray-lightest",name:"cancel",map:["inprogress","pending"],label:{fi:"Keskeytä lähetys",en:"Cancel the upload",sv:"Stop överföringen"}}];this.uri=undefined;this.showLinks=false;this.caption=undefined;this.statusLabelDefaults={fi:{inProgress:"Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",inProgressWithErrors:"Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",done:"Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",files:"tiedostot",file:"tiedosto"},sv:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Alla {filesTotal} har lagts till",doneWithErrors:"Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"All {filesTotal} added successfully",doneWithErrors:"Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",files:"File",file:"file"}};this.statusMessageLabel=getLocaleString(this.statusLabelDefaults);this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"};this.buttonLabel=getLocaleString(this.buttonLabelDefaults);this.accessibleButtonLabel=undefined;this.theme="";this.disabled=false;this.identifier=undefined;this.margin="auto";this.required=false;this.alignment="middle";this.hideGroups=false;this.files=new Map;this.valid=!this.required;this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"};this.label=getLocaleString(this.labelDefaults);this.descriptionDefaults={en:"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.",sv:"Du kan bifoga följande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer åt gången, och lägga till upp till {maxfiles} bilagor åt gången varje inte större än {maxbytes}.",fi:"Voit liittää seuraavat tiedostotyypit: {filetypes} - sekä yleisimmät videotiedostot. Voit lähettää {maxbytestotal} tiedostoa kerrallaan, ja lisätä enintään {maxfiles} liitettä kerrallaan, jokainen enintään {maxbytes} kokoisena."};this.description=getLocaleString(this.descriptionDefaults);this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."};this.fileListEmpty=getLocaleString(this.fileListEmptyDefaults);this.error="";this.errorCodes=errorCodes;this.name=undefined;this.maxBytes=2e8;this.maxBytesTotal=undefined;this.maxFiles=99;this.allowedExtensions="all";this.allowedMimetypes="*";this.multiple=true;this.limitSelection=false;this.value=undefined;this.groups=[{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}},{id:this.DefaultGroups.success,label:{fi:"Valmiit tiedostot",sv:"Files success",en:"Files success"}},{id:this.DefaultGroups.failure,label:{fi:"Tiedostot, joissa on virheitä",sv:"Filer med fel",en:"Files with errors"}},{id:this.DefaultGroups.inprogress,label:{fi:"Kesken olevat tiedostot",sv:"Filer inprogress",en:"Files inprogress"}}]}e.prototype.watchValidHandler=function(e,t){if(e!==t){this.kick()}};e.prototype.componentWillLoad=function(){if(typeof this.statusMessageLabel==="string"){this.internalStatusMessageLabel=sanitizeString(this.groups)}else{this.internalStatusMessageLabel=this.statusMessageLabel}inheritGlobalTheme(this);this.listenForActionEvents();this.onReady()};e.prototype.componentWillRender=function(){this.verifyValidity()};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus(e)}return[2]}))}))};e.prototype.upload=function(e){if(e===void 0){e=undefined}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.setFocus()];case 1:t.sent();this.metaData=e;this.nativeInput.click();return[2]}}))}))};e.prototype.uploadPending=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.uploadPendingFiles();return[2]}))}))};e.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.kick();return[4,this.setFocus()];case 1:e.sent();return[2]}}))}))};e.prototype.getFiles=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.files||this.files.size===0){return[2,false]}return[2,this.getFilesAsArray()]}))}))};e.prototype.updateValue=function(e,t,a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.updateValueInMap(e,t,a);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this.identifier||this.uploadId;var a=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024);var i=Math.round(this.maxBytes/1024/1024);var r=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());r=r.replace(/{maxbytes}/g,"".concat(i.toString()," MB"));r=r.replace(/{maxbytestotal}/g,"".concat(a.toString()," MB"));r=r.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", "));return h(Host,{class:{"duet-m-0":this.margin==="none"}},h("duet-fieldset",{label:this.label,caption:r},h("slot",{name:"header"}),!this.files.size&&h("duet-label",{part:this.identifier?"".concat(this.identifier,"-empty-state"):"duet-upload-empty-state",theme:this.theme==="turva"?"turva":"default",size:"small",class:{"duet-upload-filelist-empty":!this.files.size,"duet-upload-filelist":true,"duet-upload-filelist-filled":this.files.size},id:this.labelId,for:t},h("span",{class:{"duet-upload-filelist-empty-label":!this.files.size}},this.fileListEmpty)),!!this.files.size&&h("slot",{name:"fileheader"}),!!this.files.size&&h("duet-upload-aria-status",{invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&this.renderEditableTableGroups(),!!this.files.size&&h("slot",{name:"filefooter"}),h("duet-spacer",{size:"large"}),!this.hideButton&&h("duet-button",{id:this.buttonId,onClick:this.startUpload,"accessible-controls":t,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"accessible-owns":t,size:"small",variation:"secondary",fixed:true,icon:"action-add-circle",part:this.identifier?"".concat(this.identifier,"-button-upload"):"duet-upload-button-upload"},this.buttonLabel),h("duet-spacer",{size:"medium"}),(this.fileMaxReached||this.bytesMaxReached)&&h("duet-alert",{part:this.identifier?"".concat(this.identifier,"-error-notification"):"duet-upload-error-notification"},this.fileMaxReached&&getI18nError("duet-upload-301",this.errorCodes),this.bytesMaxReached&&getI18nError("duet-upload-202",this.errorCodes)),h("duet-spacer",{size:"medium"}),h("duet-visually-hidden",{"aria-hidden":"true"},h("input",{ref:function(t){e.nativeInput=t},accept:!this.limitSelection?undefined:"".concat(this.allowedMimetypes,",").concat(this.allowedExtensions),onBlur:this.onBlur,onFocus:this.onFocus,onChange:function(t){return e.onChange(t)},type:"file",class:{"duet-upload":true},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,tabIndex:-1}))))};e.prototype.makeXHRPostRequest=function(e){var t=this;var a=new XMLHttpRequest;var i=e.get("name");a.upload.addEventListener("progress",(function(e){t.updateProgress(e,i)}));a.upload.addEventListener("load",(function(){t.transferComplete(i)}));a.upload.addEventListener("error",(function(){t.transferFailed(i)}));a.upload.addEventListener("abort",(function(){t.transferCanceled(i)}));var r={payload:{data:e,name:i},options:{type:"POST",uri:this.uri,xhr:a,argument:null,headers:undefined},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){r=this.middleware(r)}return makeXhrRequest(r)};e.prototype.makeXHRDeleteRequest=function(e){var t=e.uid,a=e.item;var i=new XMLHttpRequest;var r={"x-fileuid":t,"x-filename":a.name};var n={payload:{data:null,name:name},options:{type:"DELETE",xhr:i,uri:this.uri,argument:"?key=".concat(t,"&name=").concat(a.name),headers:r},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){n=this.middleware(n)}return makeXhrRequest(n)};e.prototype.onChange=function(e){return __awaiter(this,void 0,void 0,(function(){var t,a,i,r,n,l,o,s,d,u,p,h,c,f,b;return __generator(this,(function(m){switch(m.label){case 0:a=Array.from((t=this.nativeInput)===null||t===void 0?void 0:t.files);if(!a)return[3,8];i=0,r=a;m.label=1;case 1:if(!(i<r.length))return[3,8];n=r[i];l=validateFile(n,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),o=l.valid,s=l.errorMessage,d=l.errorType,u=l.errorSystem;p=this.genHashName();h={uid:p,item:n,size:n.size,meta:this.metaData,uploaded:false,valid:o,error:{type:o?undefined:d,message:o?undefined:s,system_message:o?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(n.name,h);c=this.validateTotals(n.name),f=c.bytesMaxReached,b=c.fileMaxReached;if(!f)return[3,2];this.updateValueInMap(n.name,"valid",false,false);return[3,6];case 2:if(!b)return[3,3];this.updateValueInMap(n.name,"valid",false,false);return[3,6];case 3:if(!(o&&!this.external))return[3,5];return[4,this.uploadFile(h)];case 4:m.sent();return[3,6];case 5:if(o&&this.external){this.updateValueInMap(h.item.name,"pending",true,false);this.updateValueInMap(h.item.name,"group","pending",true)}else if(!o){this.updateValueInMap(n.name,"valid",false,true)}m.label=6;case 6:this.kick();m.label=7;case 7:i++;return[3,1];case 8:this.resetFormFields();this.metaData=undefined;this.duetChange.emit({originalEvent:e,data:{files:this.files},component:"duet-upload"});return[2]}}))}))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{valid:["watchValidHandler"]}},enumerable:false,configurable:true});return e}();DuetUpload.style=duetUploadCss;export{DuetEditableTable as duet_editable_table,DuetTable as duet_table,DuetUpload as duet_upload};
4
+ */import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-3e7e0b4a.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{f as fieldSorter,d as debounce}from"./js-utils-fa98b8cd.js";import{i as isKeyboardClick}from"./keyboard-utils-d237bd5a.js";import{a as getLocaleString,s as sanitizeString}from"./language-utils-6be16ff0.js";import{q as sizeNavigation,s as sizeHeader}from"./tokens.module-d3321092.js";import{b as breakpointToToken}from"./token-utils-b531747a.js";import{c as createID}from"./create-id-981107da.js";import{p as parsePossibleJSON}from"./string-utils-5954f458.js";var TableData=function(e,t){var a=e.data,i=e.groupId,r=e.alignment;var n="duet-editable-table duet-editable-table-content-".concat(i);if(typeof a==="string"){return h("td",{innerHTML:a,class:n,part:"".concat(i,"content"),style:{verticalAlign:r}})}else{return h("td",{class:n,part:"".concat(i,"content"),style:{verticalAlign:r}},a)}};var duetEditableTableCss=".sc-duet-editable-table-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-actions-menu.sc-duet-editable-table{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button.sc-duet-editable-table{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon.sc-duet-editable-table .duet-icon.sc-duet-editable-table{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row.sc-duet-editable-table .duet-text-right.sc-duet-editable-table{text-align:right}.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";var DuetEditableTable=function(){function e(e){var t=this;registerInstance(this,e);this.duetTableToggle=createEvent(this,"duetTableToggle",7);this.duetMenuClick=createEvent(this,"duetMenuClick",7);this.sortableDefaultLabel={fi:"Järjestä",en:"Click to sort",sv:"Klicka för att sortera"};this.actionColumnLabel={en:"Actions for rows",fi:"Toiminnot rivillä",sv:"Åtgärder för rader"};this.toggleColumn=function(e,a){a.preventDefault();var i=e.sort_order,r=e.direction,n=e.index,l=e.key;t.duetTableToggle.emit({sort_order:i,index:n,direction:r,key:l,component:"duet-editable-table",originalEvent:a})};this.handleKeyDown=function(e,a){if(isKeyboardClick(a)){t.toggleColumn(e,a)}};this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.actions=undefined;this.columns=undefined;this.rows=undefined;this.sortable=false;this.groupId="";this.theme="";this.accessibleRole=undefined}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.createLabel=function(e){var t=this;var a=e.sort_order,i=e.direction,r=e.index,n=e.label;var l=getLocaleString(n);if(!this.sortable){return l}var o=function(){if(!!a&&i===1){return"action-arrow-down-small"}else if(!!a&&i===-1){return"action-arrow-up-small"}return"action-subtract-small"};return h("span",{class:"duet-table-label","data-index":r},h("duet-button",{size:"small",icon:o(),"icon-size":"medium-small","accessible-label":getLocaleString(this.sortableDefaultLabel),variation:"plain",margin:"none","icon-right":true,onClick:function(a){return t.toggleColumn(e,a)},onKeyDown:function(a){return t.handleKeyDown(e,a)}},l))};e.prototype.getSortedColumns=function(){return __spreadArray([],this.columns,true).sort(fieldSorter(["index"]))};e.prototype.getRowSortOrder=function(){var e=__spreadArray([],this.columns,true).sort(fieldSorter(["sort_order"]));return e.filter((function(e){return e.sort_order})).map((function(e){return e.direction===-1?"-".concat(e.key):e.key}))};e.prototype.renderTableHeader=function(){var e=this;if(!this.columns){return}var t=this.getSortedColumns();return h("tr",{class:{"duet-table-action-header":!!this.actions}},t.map((function(t){if(t.display!==false){var a=e.createLabel(t);return a!==""?h("th",{scope:"col"},a):h("td",null)}})),this.actions&&h("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&h("duet-visually-hidden",null,getLocaleString(this.actionColumnLabel))))};e.prototype.renderActions=function(e,t){var a=this;if(!this.actions){return}return h("td",{class:"duet-text-right"},this.actions.map((function(i){return h("duet-action-button",{actionMeta:Object.assign({},(e===null||e===void 0?void 0:e.meta)||{},{index:t}),actionId:(e===null||e===void 0?void 0:e.uid)||(e===null||e===void 0?void 0:e.id)||null,actionName:i.name,theme:a.theme,iconName:i.icon,iconColor:i.color,iconSize:i.size,background:i.background,"accessible-label":"".concat(getLocaleString(i.label)," ").concat(e.name||"")})})))};e.prototype.renderTableBody=function(){var e=this;var t=this.getSortedColumns();var a=this.getRowSortOrder();var i=__spreadArray([],this.rows,true).sort(fieldSorter(a));return i.map((function(a,i){var r;return h("tr",{class:(r={"duet-table-action-row":!!e.actions,"duet-editable-table-row":true},r["duet-editable-table-row-".concat(e.groupId)]=true,r),"data-meta":JSON.stringify(a.meta)},t.map((function(t){var i=a[t.key]?a[t.key]:a.item;if(t.display!==false){return h(TableData,{data:i,groupId:e.groupId})}})),e.actions&&e.renderActions(a,i))}))};e.prototype.render=function(){var e;return h(Host,{class:(e={},e["duet-editable-table-".concat(this.variation)]=true,e["duet-editable-table"]=true,e["duet-editable-table-".concat(this.theme)]=true,e["duet-editable-table-scrollable"]=this.breakpoint==="none-scrollable",e["duet-editable-table-sortable"]=this.sortable,e["duet-editable-table-actions"]=!!this.actions,e["duet-m-0"]=this.margin==="none",e["duet-theme-turva"]=this.theme==="turva",e)},h("duet-table",{class:"duet-editable-table-table",sticky:this.sticky,stickyDistance:this.stickyDistance,margin:this.margin,theme:this.theme,variation:this.variation,breakpoint:this.breakpoint},h("table",{role:this.accessibleRole},h("caption",null,h("slot",{name:"tcaption"})),h("thead",null,h("tr",null,h("td",{class:"duet-editable-table-actions-menu",colSpan:99},h("slot",{name:"thead-first"}))),this.renderTableHeader(),h("tr",null,h("td",{class:"duet-editable-table-actions-menu",colSpan:99},h("slot",{name:"thead-last"})))),h("tbody",null,this.renderTableBody()),h("tfoot",null,h("tr",null,h("th",{class:"duet-editable-table-footer-menu",colSpan:99},h("slot",{name:"tfoot"})))))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetEditableTable.style=duetEditableTableCss;var duetTableCss='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead,duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead *{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:rgb(0, 41, 77)}duet-table.duet-theme-turva td{color:rgb(23, 28, 58)}duet-table th{font-weight:600;line-height:1.25;color:rgb(101, 119, 135);text-align:left}duet-table.duet-theme-turva th{color:rgb(116, 116, 117)}duet-table tbody th{font-weight:600;color:rgb(0, 41, 77)}duet-table.duet-theme-turva tbody th{color:rgb(23, 28, 58)}duet-table .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:rgb(101, 119, 135);text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:rgb(0, 41, 77);content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:rgb(23, 28, 58)}.duet-table-sticky thead th{position:sticky;top:0;background:rgb(255, 255, 255)}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:rgb(255, 255, 255)}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid rgb(225, 227, 230)}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:rgb(228, 228, 230)}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid rgb(225, 227, 230)}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:rgb(228, 228, 230)}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid rgb(225, 227, 230)}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:rgb(228, 228, 230)}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid rgb(101, 119, 135)}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:rgb(68, 68, 69)}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:rgb(225, 227, 230)}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:rgb(228, 228, 230)}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid rgb(225, 227, 230)}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:rgb(228, 228, 230)}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid rgb(225, 227, 230)}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:rgb(228, 228, 230)}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid rgb(225, 227, 230)}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid rgb(225, 227, 230)}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:rgb(228, 228, 230)}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(225, 227, 230)}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(228, 228, 230)}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}.duet-table-sortable tbody tr td:first-child,.duet-table-sortable thead tr th:first-child{padding:20px}.duet-table-sortable:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(225, 227, 230)}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(228, 228, 230)}.duet-table-actions table{table-layout:auto}.duet-table-actions thead th:last-child{width:1px;white-space:nowrap}.duet-editable-table-table.duet-table-flattened tr{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;gap:10px}.duet-editable-table-table.duet-table-flattened tr.duet-table-action-row td:last-child::before{padding:0;content:""}.duet-editable-table-table.duet-table-flattened td{grid-column:1/2}.duet-editable-table-table.duet-table-flattened td:first-child{grid-row:1;grid-column:1}.duet-editable-table-table.duet-table-flattened td:last-child{grid-row:1;grid-column:2}';var stickyTopValues={none:0,"with-links":parseFloat(sizeNavigation)*16,"without-links":parseFloat(sizeHeader)*16};var DuetTable=function(){function e(e){var t=this;registerInstance(this,e);this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu)";this.handleMediaQueryChange=function(e){t.matchesBreakpoint=e.matches};this.matchesBreakpoint=true;this.theme=undefined;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.hideHeadVisually=false}e.prototype.connectedCallback=function(){var e=this;var t=this.breakpoint==="none"||this.breakpoint==="none-scrollable"?"all":breakpointToToken[this.breakpoint];this.mq=matchMedia(t);this.mq.addEventListener("change",debounce(this.handleMediaQueryChange,50));this.handleMediaQueryChange(this.mq);this.observer=new MutationObserver((function(){return debounce(e.copyHeadingsToCells(),50)}));this.observer.observe(this.element,{childList:true,subtree:true})};e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.copyHeadingsToCells();if(this.sticky&&this.breakpoint==="none-scrollable"){console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence')}if(this.sticky){var e=stickyTopValues[this.stickyDistance];var t=this.element.querySelectorAll(this.headingSelector);t.forEach((function(t){return t.style.top="".concat(e,"px")}))}};e.prototype.componentDidLoad=function(){this.observer?this.observer.takeRecords():null};e.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true};e.prototype.copyHeadingsToCells=function(){var e=this.element.querySelectorAll(this.headingSelector);var t=this.element.querySelectorAll("tbody tr");var a=Array.from(e).map((function(e){return e.textContent.trim()}));t.forEach((function(e){e.querySelectorAll("td").forEach((function(e,t){if(a[t]){e.dataset.heading=a[t]}}))}))};e.prototype.render=function(){var e;return h(Host,{class:(e={},e["duet-table-".concat(this.variation)]=true,e["duet-table-flattened"]=!this.matchesBreakpoint,e["duet-table-sticky"]=this.matchesBreakpoint&&this.sticky,e["duet-table-scrollable"]=this.breakpoint==="none-scrollable",e["duet-m-0"]=this.margin==="none",e["duet-theme-turva"]=this.theme==="turva",e["duet-table-hide-head-visually"]=this.hideHeadVisually,e)},h("slot",null))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetTable.style=duetTableCss;var errorCodes=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}}];var getError=function(e,t){var a={type:undefined,system_message:undefined,message:undefined};t=parsePossibleJSON(t);a=t.filter((function(t){return t.type==e}))[0];if(!a){a=t.filter((function(e){return e.type==="default"}))[0]}return a};var getI18nError=function(e,t){var a=getError(e,t);var i=getLocaleString(a.message);if(i===""||!i){return a.system_message}else{return i}};var ErrorItem=function(e){var t=e.data,a=e.errorCodes;var i=t.item,r=t.error;var n=i.name;var l=r.type;return h("span",{class:"duet-upload-item-error",role:"status"},h("duet-paragraph",{class:"duet-upload-item-name",color:"danger",margin:"none",weight:"semi-bold"},h("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),h("duet-spacer",{size:"xx-small",direction:"horizontal"}),n),h("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},getI18nError(l,a)))};var ProgressItem=function(e){var t=e.progress,a=e.name;return h("span",{class:"duet-upload-item-name"},h("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),h("duet-spacer",{size:"xx-small",direction:"horizontal"}),a,h("br",null),h("duet-progress",{progress:Math.ceil(t),"aria-hidden":true}))};var PendingItem=function(e){var t=e.name;return h("span",{class:"duet-upload-item-name"},h("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),h("duet-spacer",{size:"xx-small",direction:"horizontal"}),t)};var formatBytes=function(e,t){if(t===void 0){t=2}if(e===0){return"0 Bytes"}var a=1024;var i=t<0?0:t;var r=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];var n=Math.floor(Math.log(e)/Math.log(a));return parseFloat((e/Math.pow(a,n)).toFixed(i))+" "+r[n]};var SuccessItem=function(e){var t=e.data,a=e.showLinks;var i=t.item,r=t.size,n=t.uploaded,l=t.url,o=t.meta;var s=i.name;var d=h("span",{class:"duet-upload-item-name"},h("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),h("duet-spacer",{size:"xx-small",direction:"horizontal"}),s);var u=h("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",formatBytes(r),")");var p=n&&l&&a?h("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},h("duet-link",{url:l,external:true},d),h("duet-spacer",{size:"xx-small",direction:"horizontal"}),u):h("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},d,h("duet-spacer",{size:"xx-small",direction:"horizontal"}),u);var c=o&&o.badges?h("span",null,h("duet-spacer",{size:"xx-small"}),o.badges.map((function(e){return h("duet-badge",{color:"primary"},e)}))):undefined;return h("span",{class:"duet-upload-item-success"},h("div",null,p),c)};var validateFileExtension=function(e,t){if(!t){return true}var a=e.split(".");var i=t.split(",");var r=a[a.length-1];return i.includes(r)};var validateFileMime=function(e,t){if(!t||!e){return true}var a=t.split(",");var i=false;a.forEach((function(t){var a=t.split("/");var r=e.split("/");if(a[0]===r[0]&&(a[1]===r[1]||a[1]==="*")){i=true}}));return i};var validateFileSize=function(e,t){if(!t||!e){return true}return t>=e};var validateFile=function(e,t,a){var i=t.allowedMimetypes,r=t.allowedExtensions,n=t.maxBytes;var l=false;var o=getError("default",a);if(e){var s=e.name,d=e.type,u=e.size;var p=validateFileMime(d,i);var h=r==="all"||r===""||r===" "||r===undefined?true:validateFileExtension(s.toLowerCase(),r);var c=validateFileSize(u,n);if(!p){o=getError("duet-upload-101",a)}if(!h){o=getError("duet-upload-100",a)}if(!c){o=getError("duet-upload-201",a)}l=p&&h&&c}else{l=false}return{valid:l,errorMessage:l?undefined:getLocaleString(o.message),errorSystem:l?undefined:o.system_message,errorType:l?undefined:o.type}};var validateTotalSizeIsAboveMax=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid&&e.size){a+=e.size}}));if(a>t){return true}}return false};var validateTotalAmountIsAboveMax=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid){a++}}));if(a>t){return true}}return false};var makeXhrRequest=function(e){var t=e.payload,a=e.options,i=e.onFailure,r=e.onSuccess,n=e.onProgress;var l=a.type,o=l===void 0?"POST":l,s=a.xhr,d=a.uri,u=a.argument,p=u===void 0?null:u,h=a.headers,c=h===void 0?null:h;s.open(o,"".concat(d).concat(p||""),true);var f=t.data,b=t.name;if(c){Object.keys(c).forEach((function(e){s.setRequestHeader(e,c[e])}))}if(o==="POST"){s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.DONE&&s.status>=200&&s.status<300){r(s,b,s.status)}if(s.readyState===XMLHttpRequest.DONE&&s.status>=300&&s.status<999){i(s,b,s.status)}};n(b)}s.send(f);return s};var duetUploadCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:rgb(245, 248, 250)}.duet-upload-filelist-empty-label{font-size:1rem;font-weight:400}.duet-upload-editable-table-header-hidden{display:none}.duet-upload-editable-table tbody .duet-upload-editable-table-data{padding:0 !important;border:0}.duet-upload-editable-table duet-editable-table tfoot,.duet-upload-editable-table duet-editable-table thead{display:none}.duet-upload-editable-table duet-editable-table .duet-editable-table-content{padding-right:0 !important;padding-left:0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td{padding:1rem 0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child{padding-right:0 !important}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending{position:relative}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-progress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-progress{position:absolute;bottom:0;width:100%}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button),.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-action-button::part(button){border:0}.duet-upload-editable-table .duet-upload-item-name duet-icon{position:relative;top:2px}duet-paragraph::part(duet-paragraph){word-break:break-word}";var DuetUpload=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent(this,"duetChange",3);this.duetBlur=createEvent(this,"duetBlur",7);this.duetFocus=createEvent(this,"duetFocus",7);this.duetReady=createEvent(this,"duetReady",7);this.duetDone=createEvent(this,"duetDone",3);this.duetState=createEvent(this,"duetState",3);this.duetDelete=createEvent(this,"duetDelete",3);this.duetCancel=createEvent(this,"duetCancel",3);this.duetProgress=createEvent(this,"duetProgress",3);this.duetUpload=createEvent(this,"duetUpload",3);this.buttonId=createID("DuetButton");this.labelId=createID("DuetLabel");this.uploadId=createID("DuetUpload");this.filesInProgress=new Map;this.fileMaxReached=false;this.bytesMaxReached=false;this.internalStatusMessageLabel=undefined;this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"};this.kick=debounce((function(){t.tick=Date.now()}),30);this.listenForActionEvents=function(){t.element.addEventListener("duetActionEvent",(function(e){var a=e.detail;var i=a.action,r=a.id,n=a.originalEvent;switch(i){case"delete":t.onDelete(r,n);break;case"cancel":t.onCancel(r,n);break}}))};this.verifyValidity=function(){var e=t.getFilesAsArray(),a=e.invalid,i=e.valid;var r=t.valid;t.valid=a.length===0&&i.length!==0;if(t.valid!==r){t.duetState.emit({originalEvent:undefined,data:{valid:t.valid,from:"componentWillRender"},component:"duet-upload"})}};this.getGroupFromItemData=function(e){if(e.valid&&e.progress===100){return t.DefaultGroups.success}else if(e.progress>0&&e.progress!==100){return t.DefaultGroups.inprogress}else if(!e.valid){return t.DefaultGroups.failure}else if(e.pending){return t.DefaultGroups.pending}else if(e.group){return e.group}else{return"none"}};this.getItemHTMLFromItemData=function(e,a){if(a===t.DefaultGroups.success){return h(SuccessItem,{data:e,showLinks:t.showLinks})}else if(a===t.DefaultGroups.inprogress){return h(ProgressItem,{progress:e.progress,name:e.item.name})}else if(a===t.DefaultGroups.pending){return h(PendingItem,{name:e.item.name})}else if(a===t.DefaultGroups.failure){return h(ErrorItem,{data:e,errorCodes:t.errorCodes})}else if(e.group){return e.html}else{return"none"}};this.genHashName=function(){return Date.now().toString(36)+Math.random()};this.updateValueInMap=function(e,a,i,r){if(r===void 0){r=true}try{var n=t.files.get(e);n[a]=i;t.files.set(e,n)}catch(l){}if(r){t.kick()}};this.updateProgress=function(e,a){var i=function(i){t.updateValueInMap(a,"progress",i);t.onProgress(a,i,e)};if(e.lengthComputable){var r=e.loaded/e.total*100;i(r)}else{console.log("cant read progress")}};this.trackProgress=function(e,a){if(a===void 0){a=false}if(a){t.filesInProgress.delete(e)}else{t.filesInProgress.set(e,"inprogress")}if(t.filesInProgress.size===0){t.onDone()}};this.getFilesAsArray=function(){var e=[];var a=[];t.files.forEach((function(t){if(t.valid&&!t.deleted){e.push(t)}else if(!t.valid&&!t.deleted){a.push(t)}}));return{valid:e,invalid:a}};this.resetFormFields=function(){t.nativeInput.value=""};this.startUpload=function(e,a){if(a===void 0){a=undefined}return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){this.metaData=a;this.nativeInput.click();this.onUpload(e,a);e.stopPropagation();e.preventDefault();return[2]}))}))};this.transferComplete=function(e){t.updateValueInMap(e,"progress",100,false);t.trackProgress(e,true)};this.transferDone=function(e,a,i){t.updateValueInMap(a,"status",i,false);t.updateValueInMap(a,"uploaded",true,false);try{var r=JSON.parse(e.response);t.updateValueInMap(a,"url",r.url)}catch(n){t.updateValueInMap(a,"url",null);console.error("Server did not respond with expected response {url: string}")}return};this.transferDoneWithFailure=function(e,a,i){try{var r=JSON.parse(e.response).error;t.updateValueInMap(a,"error",{message:r.message,type:r.type},false)}catch(n){console.error("Server did not respond with expected response error:{message: string, type: int}");t.updateValueInMap(a,"error",{type:i},false)}t.updateValueInMap(a,"valid",false,true)};this.transferFailed=function(e){t.updateValueInMap(e,"error",getI18nError("duet-upload-001",t.errorCodes))};this.transferCanceled=function(e){t.files.delete(e);t.validateTotals(e);t.kick()};this.validateTotals=function(e){var a=validateTotalSizeIsAboveMax(t.files,t.maxBytesTotal);var i=validateTotalAmountIsAboveMax(t.files,t.maxFiles);if(a&&e){t.updateValueInMap(e,"error",getI18nError("duet-upload-202",t.errorCodes),false)}if(i&&e){t.updateValueInMap(e,"error",getI18nError("duet-upload-301",t.errorCodes),false)}t.bytesMaxReached=a;t.fileMaxReached=i;return{bytesMaxReached:a,fileMaxReached:i}};this.uploadFile=function(e,a,i){if(a===void 0){a=false}return __awaiter(t,void 0,void 0,(function(){var t,r,n;return __generator(this,(function(l){switch(l.label){case 0:if(!a&&this.deferUpload){this.updateValueInMap(e.item.name,"pending",true,false);this.updateValueInMap(e.item.name,"group","pending",true)}else if(a){this.updateValueInMap(e.item.name,"pending",false,false);this.updateValueInMap(e.item.name,"group",undefined,true)}l.label=1;case 1:l.trys.push([1,4,,5]);if(!(!this.deferUpload||a))return[3,3];t=new FormData;t.append("file",e.item);if(i){t.append("key",i)}t.append("uid",e.uid);t.append("name",e.item.name);t.append("metadata",JSON.stringify({uid:e.uid,url:this.uri,size:e.item.size,meta:e.meta}));r=e;return[4,this.makeXHRPostRequest(t)];case 2:r.xhr=l.sent();l.label=3;case 3:return[3,5];case 4:n=l.sent();this.updateValueInMap(e.item.name,"valid",false,false);return[3,5];case 5:return[2]}}))}))};this.uploadPendingFiles=function(){for(var e=0,a=Array.from(t.files.entries());e<a.length;e++){var i=a[e],r=i[0],n=i[1];if(n.group==="pending"&&n.pending===true){t.uploadFile(n,true,r)}}};this.getItemFromUID=function(e){for(var a=0,i=Array.from(t.files.entries());a<i.length;a++){var r=i[a],n=r[0],l=r[1];if(l.uid===e){return{value:l,key:n}}}return null};this.onDelete=function(e,a){var i=t.getItemFromUID(e);var r=i.key;var n=t.files.get(r);t.files.delete(r);t.validateTotals();t.kick();t.duetDelete.emit({originalEvent:a,data:{deletion:n},component:"duet-upload"});if(!t.external&&!n.pending){t.makeXHRDeleteRequest(n)}t.resetFormFields()};this.onCancel=function(e,a){var i=t.getItemFromUID(e).key;var r=t.files.get(i);t.files.delete(i);if(!t.external){var n=r.xhr;if(n){n.abort()}}else{t.kick()}t.resetFormFields();t.duetCancel.emit({originalEvent:a,data:{cancelled:r},component:"duet-upload"})};this.onUpload=function(e,a){t.duetUpload.emit({originalEvent:e,metaData:a,component:"duet-upload"})};this.onBlur=function(e){t.duetBlur.emit({originalEvent:e,component:"duet-upload"})};this.onProgress=function(e,a,i){t.duetChange.emit({originalEvent:i,data:{key:e,percentComplete:a},component:"duet-upload"})};this.onFocus=function(e){t.duetFocus.emit({originalEvent:e,component:"duet-upload"})};this.onReady=function(){t.duetReady.emit({component:"duet-upload"})};this.onDone=function(){t.duetDone.emit({component:"duet-upload",data:{files:t.files}})};this.filterMap=function(){var e=Array.from(t.files.values());var a=[];var i=[];var r=[];var n=[];e.forEach((function(e){var l=t.getGroupFromItemData(e);var o=t.getItemHTMLFromItemData(e,l);if(l===t.DefaultGroups.success){n.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(l===t.DefaultGroups.inprogress){a.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(l===t.DefaultGroups.pending){r.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(l===t.DefaultGroups.failure){i.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(e.group){a.push({uid:e.uid,item:o,group:e.group,name:e.item.name})}}));return{pending:r,failure:i,success:n,inprogress:a}};this.getColumns=function(e){return[{sort_order:1,direction:-1,index:0,key:e.id,label:e.label}]};this.getActions=function(e){return t.actions.filter((function(t){return t.map.includes(e)}))};this.renderEditableTableGroups=function(){var e=t.filterMap();var a=t.groups.map((function(a){var i=e[a.id];if(!(i===null||i===void 0?void 0:i.length)){return}return h("duet-table",{variation:"plain",breakpoint:"none",role:"log",margin:t.hideGroups?"none":"auto"},h("table",{class:"duet-upload-editable-table"},h("thead",{class:"duet-upload-editable-table-header"},h("tr",null,h("th",{class:{"duet-upload-editable-table-header-hidden":t.hideGroups}},!t.hideGroups?getLocaleString(a.label):h("duet-visually-hidden",null,getLocaleString(a.label))))),h("tbody",null,h("tr",null,h("td",{class:"duet-upload-editable-table-data"},h("duet-editable-table",{breakpoint:"none",variation:"plain",groupId:a.id,columns:t.getColumns(a),actions:t.getActions(a.id),margin:"none",rows:i}))))))}));return a};this.tick=Date.now();this.accessibleActiveDescendant=undefined;this.accessibleDescribedBy=undefined;this.accessibleControls=undefined;this.accessibleOwns=undefined;this.external=false;this.middleware=null;this.deferUpload=false;this.hideButton=false;this.actions=[{icon:"action-delete",color:"color-danger",size:"x-small",background:"gray-lightest",name:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Delete the file",sv:"Ta bort filen"}},{icon:"navigation-close",color:"primary",size:"x-small",background:"gray-lightest",name:"cancel",map:["inprogress","pending"],label:{fi:"Keskeytä lähetys",en:"Cancel the upload",sv:"Stop överföringen"}}];this.uri=undefined;this.showLinks=false;this.caption=undefined;this.statusLabelDefaults={fi:{inProgress:"Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",inProgressWithErrors:"Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",done:"Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",files:"tiedostot",file:"tiedosto"},sv:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Alla {filesTotal} har lagts till",doneWithErrors:"Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"All {filesTotal} added successfully",doneWithErrors:"Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",files:"File",file:"file"}};this.statusMessageLabel=getLocaleString(this.statusLabelDefaults);this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"};this.buttonLabel=getLocaleString(this.buttonLabelDefaults);this.accessibleButtonLabel=undefined;this.theme="";this.disabled=false;this.identifier=undefined;this.margin="auto";this.required=false;this.alignment="middle";this.hideGroups=false;this.files=new Map;this.valid=!this.required;this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"};this.label=getLocaleString(this.labelDefaults);this.descriptionDefaults={en:"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.",sv:"Du kan bifoga följande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer åt gången, och lägga till upp till {maxfiles} bilagor åt gången varje inte större än {maxbytes}.",fi:"Voit liittää seuraavat tiedostotyypit: {filetypes} - sekä yleisimmät videotiedostot. Voit lähettää {maxbytestotal} tiedostoa kerrallaan, ja lisätä enintään {maxfiles} liitettä kerrallaan, jokainen enintään {maxbytes} kokoisena."};this.description=getLocaleString(this.descriptionDefaults);this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."};this.fileListEmpty=getLocaleString(this.fileListEmptyDefaults);this.error="";this.errorCodes=errorCodes;this.name=undefined;this.maxBytes=2e8;this.maxBytesTotal=undefined;this.maxFiles=99;this.allowedExtensions="all";this.allowedMimetypes="*";this.multiple=true;this.limitSelection=false;this.value=undefined;this.groups=[{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}},{id:this.DefaultGroups.success,label:{fi:"Valmiit tiedostot",sv:"Files success",en:"Files success"}},{id:this.DefaultGroups.failure,label:{fi:"Tiedostot, joissa on virheitä",sv:"Filer med fel",en:"Files with errors"}},{id:this.DefaultGroups.inprogress,label:{fi:"Kesken olevat tiedostot",sv:"Filer inprogress",en:"Files inprogress"}}]}e.prototype.watchValidHandler=function(e,t){if(e!==t){this.kick()}};e.prototype.componentWillLoad=function(){if(typeof this.statusMessageLabel==="string"){this.internalStatusMessageLabel=sanitizeString(this.groups)}else{this.internalStatusMessageLabel=this.statusMessageLabel}inheritGlobalTheme(this);this.listenForActionEvents();this.onReady()};e.prototype.componentWillRender=function(){this.verifyValidity()};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus(e)}return[2]}))}))};e.prototype.upload=function(e){if(e===void 0){e=undefined}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.setFocus()];case 1:t.sent();this.metaData=e;this.nativeInput.click();return[2]}}))}))};e.prototype.uploadPending=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.uploadPendingFiles();return[2]}))}))};e.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.kick();return[4,this.setFocus()];case 1:e.sent();return[2]}}))}))};e.prototype.getFiles=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.files||this.files.size===0){return[2,false]}return[2,this.getFilesAsArray()]}))}))};e.prototype.updateValue=function(e,t,a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.updateValueInMap(e,t,a);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this.identifier||this.uploadId;var a=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024);var i=Math.round(this.maxBytes/1024/1024);var r=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());r=r.replace(/{maxbytes}/g,"".concat(i.toString()," MB"));r=r.replace(/{maxbytestotal}/g,"".concat(a.toString()," MB"));r=r.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", "));return h(Host,{class:{"duet-m-0":this.margin==="none"}},h("duet-fieldset",{label:this.label,caption:r},h("slot",{name:"header"}),!this.files.size&&h("duet-label",{part:this.identifier?"".concat(this.identifier,"-empty-state"):"duet-upload-empty-state",theme:this.theme==="turva"?"turva":"default",size:"small",class:{"duet-upload-filelist-empty":!this.files.size,"duet-upload-filelist":true,"duet-upload-filelist-filled":this.files.size},id:this.labelId,for:t},h("span",{class:{"duet-upload-filelist-empty-label":!this.files.size}},this.fileListEmpty)),!!this.files.size&&h("slot",{name:"fileheader"}),!!this.files.size&&h("duet-upload-aria-status",{invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&this.renderEditableTableGroups(),!!this.files.size&&h("slot",{name:"filefooter"}),h("duet-spacer",{size:"large"}),!this.hideButton&&h("duet-button",{id:this.buttonId,onClick:this.startUpload,"accessible-controls":t,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"accessible-owns":t,size:"small",variation:"secondary",fixed:true,icon:"action-add-circle",part:this.identifier?"".concat(this.identifier,"-button-upload"):"duet-upload-button-upload"},this.buttonLabel),h("duet-spacer",{size:"medium"}),(this.fileMaxReached||this.bytesMaxReached)&&h("duet-alert",{part:this.identifier?"".concat(this.identifier,"-error-notification"):"duet-upload-error-notification"},this.fileMaxReached&&getI18nError("duet-upload-301",this.errorCodes),this.bytesMaxReached&&getI18nError("duet-upload-202",this.errorCodes)),h("duet-spacer",{size:"medium"}),h("duet-visually-hidden",{"aria-hidden":"true"},h("input",{ref:function(t){e.nativeInput=t},accept:!this.limitSelection?undefined:"".concat(this.allowedMimetypes,",").concat(this.allowedExtensions),onBlur:this.onBlur,onFocus:this.onFocus,onChange:function(t){return e.onChange(t)},type:"file",class:{"duet-upload":true},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,tabIndex:-1}))))};e.prototype.makeXHRPostRequest=function(e){var t=this;var a=new XMLHttpRequest;var i=e.get("name");a.upload.addEventListener("progress",(function(e){t.updateProgress(e,i)}));a.upload.addEventListener("load",(function(){t.transferComplete(i)}));a.upload.addEventListener("error",(function(){t.transferFailed(i)}));a.upload.addEventListener("abort",(function(){t.transferCanceled(i)}));var r={payload:{data:e,name:i},options:{type:"POST",uri:this.uri,xhr:a,argument:null,headers:undefined},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){r=this.middleware(r)}return makeXhrRequest(r)};e.prototype.makeXHRDeleteRequest=function(e){var t=e.uid,a=e.item;var i=new XMLHttpRequest;var r={"x-fileuid":t,"x-filename":a.name};var n={payload:{data:null,name:name},options:{type:"DELETE",xhr:i,uri:this.uri,argument:"?key=".concat(t,"&name=").concat(a.name),headers:r},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){n=this.middleware(n)}return makeXhrRequest(n)};e.prototype.onChange=function(e){return __awaiter(this,void 0,void 0,(function(){var t,a,i,r,n,l,o,s,d,u,p,h,c,f,b;return __generator(this,(function(m){switch(m.label){case 0:a=Array.from((t=this.nativeInput)===null||t===void 0?void 0:t.files);if(!a)return[3,8];i=0,r=a;m.label=1;case 1:if(!(i<r.length))return[3,8];n=r[i];l=validateFile(n,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),o=l.valid,s=l.errorMessage,d=l.errorType,u=l.errorSystem;p=this.genHashName();h={uid:p,item:n,size:n.size,meta:this.metaData,uploaded:false,valid:o,error:{type:o?undefined:d,message:o?undefined:s,system_message:o?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(n.name,h);c=this.validateTotals(n.name),f=c.bytesMaxReached,b=c.fileMaxReached;if(!f)return[3,2];this.updateValueInMap(n.name,"valid",false,false);return[3,6];case 2:if(!b)return[3,3];this.updateValueInMap(n.name,"valid",false,false);return[3,6];case 3:if(!(o&&!this.external))return[3,5];return[4,this.uploadFile(h)];case 4:m.sent();return[3,6];case 5:if(o&&this.external){this.updateValueInMap(h.item.name,"pending",true,false);this.updateValueInMap(h.item.name,"group","pending",true)}else if(!o){this.updateValueInMap(n.name,"valid",false,true)}m.label=6;case 6:this.kick();m.label=7;case 7:i++;return[3,1];case 8:this.resetFormFields();this.metaData=undefined;this.duetChange.emit({originalEvent:e,data:{files:this.files},component:"duet-upload"});return[2]}}))}))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{valid:["watchValidHandler"]}},enumerable:false,configurable:true});return e}();DuetUpload.style=duetUploadCss;export{DuetEditableTable as duet_editable_table,DuetTable as duet_table,DuetUpload as duet_upload};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-3b6ef857.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";var duetEmptyStateCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;height:100%}.duet-empty-state{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%;padding:48px;color:rgb(0, 41, 77);text-align:center;background:rgb(245, 248, 250);border-radius:4px}.duet-empty-state.duet-theme-turva{color:rgb(23, 28, 58);background:rgb(245, 245, 247)}";var DuetEmptyState=function(){function e(e){registerInstance(this,e);this.theme="";this.icon="messaging-question";this.size="medium"}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.render=function(){return h(Host,null,h("div",{class:{"duet-empty-state":true,"duet-theme-turva":this.theme==="turva","duet-is-small":this.size==="small"}},h("duet-icon",{color:"currentColor",name:this.icon,size:this.size==="small"?"large":"x-large"}),h("div",null,h("slot",null))))};return e}();DuetEmptyState.style=duetEmptyStateCss;export{DuetEmptyState as duet_empty_state};
4
+ import{r as registerInstance,h,H as Host}from"./index-3e7e0b4a.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";var duetEmptyStateCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;height:100%}.duet-empty-state{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%;padding:48px;color:rgb(0, 41, 77);text-align:center;background:rgb(245, 248, 250);border-radius:4px}.duet-empty-state.duet-theme-turva{color:rgb(23, 28, 58);background:rgb(245, 245, 247)}";var DuetEmptyState=function(){function e(e){registerInstance(this,e);this.theme="";this.icon="messaging-question";this.size="medium"}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.render=function(){return h(Host,null,h("div",{class:{"duet-empty-state":true,"duet-theme-turva":this.theme==="turva","duet-is-small":this.size==="small"}},h("duet-icon",{color:"currentColor",name:this.icon,size:this.size==="small"?"large":"x-large"}),h("div",null,h("slot",null))))};return e}();DuetEmptyState.style=duetEmptyStateCss;export{DuetEmptyState as duet_empty_state};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-3b6ef857.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{c as createID}from"./create-id-981107da.js";var duetFieldsetCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;display:block;width:100%}:host(.duet-m-0){margin:0 !important}fieldset{position:relative;width:100%;min-width:0;border:0}fieldset legend{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-legend-wrapper{position:relative;display:block;width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.5;color:rgb(0, 41, 77);text-align:left;background:transparent}.duet-theme-turva .duet-legend-wrapper{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-fieldset-label{margin-bottom:12px !important;margin-top:8px}.duet-legend-has-caption .duet-fieldset-label{margin-bottom:6px !important}.duet-legend-has-tooltip .duet-fieldset-label{padding-right:36px}@media (min-width: 48em){.duet-legend-has-tooltip .duet-fieldset-label{margin-bottom:3px !important;padding-right:0}}@media (min-width: 48em){.duet-legend-has-tooltip.duet-legend-has-caption .duet-fieldset-label{margin-bottom:-3px !important}}.duet-fieldset-caption{margin-bottom:12px !important}.duet-fieldset-help{display:block;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;line-height:1.25;color:rgb(222, 35, 98);border-radius:4px}.duet-fieldset-help span{display:block;margin-top:12px}.duet-theme-turva .duet-fieldset-help{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(224, 42, 13)}::slotted(duet-tooltip){position:absolute;top:4px;right:0}@media (min-width: 48em){::slotted(duet-tooltip){position:relative;right:auto}}.duet-legend-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}';var DuetFieldset=function(){function e(e){var t=this;registerInstance(this,e);this.errorId=createID("DuetError");this.labelId=createID("DuetLabel");this.checkHasTooltip=function(){t.hasTooltip=!!t.element.querySelector("[slot='tooltip']")};this.hasTooltip=false;this.theme="";this.margin="auto";this.caption=undefined;this.label=undefined;this.error=undefined;this.labelHidden=false}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.checkHasTooltip()};e.prototype.render=function(){return h(Host,{class:{"duet-m-0":this.margin==="none"}},h("fieldset",{"aria-labelledby":"".concat(this.errorId," ").concat(this.labelId),"aria-errormessage":this.error?this.errorId:null,class:{"duet-fieldset":true,"duet-theme-turva":this.theme==="turva"}},h("legend",{id:this.labelId},h("span",null,this.label),this.caption&&h("span",null,this.caption)),h("div",{class:{"duet-legend-wrapper":true,"duet-legend-has-caption":!!this.caption,"duet-legend-has-tooltip":this.hasTooltip,"duet-legend-hidden":this.labelHidden}},h("div",{class:"duet-fieldset-label"},h("span",{"aria-hidden":"true"},this.label),h("slot",{onSlotchange:this.checkHasTooltip,name:"tooltip"})),this.caption&&h("div",{class:"duet-fieldset-caption","aria-hidden":"true"},h("duet-caption",{margin:"none"},this.caption))),h("slot",null),h("span",{class:"duet-fieldset-help",id:this.errorId,"aria-atomic":"true","aria-live":"polite","aria-relevant":"additions removals"},this.error&&h("span",null,this.error))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetFieldset.style=duetFieldsetCss;export{DuetFieldset as duet_fieldset};
4
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-3e7e0b4a.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{c as createID}from"./create-id-981107da.js";var duetFieldsetCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;display:block;width:100%}:host(.duet-m-0){margin:0 !important}fieldset{position:relative;width:100%;min-width:0;border:0}fieldset legend{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-legend-wrapper{position:relative;display:block;width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.5;color:rgb(0, 41, 77);text-align:left;background:transparent}.duet-theme-turva .duet-legend-wrapper{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-fieldset-label{margin-bottom:12px !important;margin-top:8px}.duet-legend-has-caption .duet-fieldset-label{margin-bottom:6px !important}.duet-legend-has-tooltip .duet-fieldset-label{padding-right:36px}@media (min-width: 48em){.duet-legend-has-tooltip .duet-fieldset-label{margin-bottom:3px !important;padding-right:0}}@media (min-width: 48em){.duet-legend-has-tooltip.duet-legend-has-caption .duet-fieldset-label{margin-bottom:-3px !important}}.duet-fieldset-caption{margin-bottom:12px !important}.duet-fieldset-help{display:block;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;line-height:1.25;color:rgb(222, 35, 98);border-radius:4px}.duet-fieldset-help span{display:block;margin-top:12px}.duet-theme-turva .duet-fieldset-help{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(224, 42, 13)}::slotted(duet-tooltip){position:absolute;top:4px;right:0}@media (min-width: 48em){::slotted(duet-tooltip){position:relative;right:auto}}.duet-legend-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}';var DuetFieldset=function(){function e(e){var t=this;registerInstance(this,e);this.errorId=createID("DuetError");this.labelId=createID("DuetLabel");this.checkHasTooltip=function(){t.hasTooltip=!!t.element.querySelector("[slot='tooltip']")};this.hasTooltip=false;this.theme="";this.margin="auto";this.caption=undefined;this.label=undefined;this.error=undefined;this.labelHidden=false}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.checkHasTooltip()};e.prototype.render=function(){return h(Host,{class:{"duet-m-0":this.margin==="none"}},h("fieldset",{"aria-labelledby":"".concat(this.errorId," ").concat(this.labelId),"aria-errormessage":this.error?this.errorId:null,class:{"duet-fieldset":true,"duet-theme-turva":this.theme==="turva"}},h("legend",{id:this.labelId},h("span",null,this.label),this.caption&&h("span",null,this.caption)),h("div",{class:{"duet-legend-wrapper":true,"duet-legend-has-caption":!!this.caption,"duet-legend-has-tooltip":this.hasTooltip,"duet-legend-hidden":this.labelHidden}},h("div",{class:"duet-fieldset-label"},h("span",{"aria-hidden":"true"},this.label),h("slot",{onSlotchange:this.checkHasTooltip,name:"tooltip"})),this.caption&&h("div",{class:"duet-fieldset-caption","aria-hidden":"true"},h("duet-caption",{margin:"none"},this.caption))),h("slot",null),h("span",{class:"duet-fieldset-help",id:this.errorId,"aria-atomic":"true","aria-live":"polite","aria-relevant":"additions removals"},this.error&&h("span",null,this.error))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetFieldset.style=duetFieldsetCss;export{DuetFieldset as duet_fieldset};
@@ -1,4 +1,4 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,o,r){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(t){n(t)}}function d(e){try{l(r["throw"](e))}catch(t){n(t)}}function l(e){e.done?o(e.value):i(e.value).then(a,d)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,i,n,a;return a={next:d(0),throw:d(1),return:d(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function d(e){return function(t){return l([e,t])}}function l(d){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,d[0]&&(o=0)),o)try{if(r=1,i&&(n=d[0]&2?i["return"]:d[0]?i["throw"]||((n=i["return"])&&n.call(i),0):i.next)&&!(n=n.call(i,d[1])).done)return n;if(i=0,n)d=[d[0]&2,n.value];switch(d[0]){case 0:case 1:n=d;break;case 4:o.label++;return{value:d[1],done:false};case 5:o.label++;i=d[1];d=[0];continue;case 7:d=o.ops.pop();o.trys.pop();continue;default:if(!(n=o.trys,n=n.length>0&&n[n.length-1])&&(d[0]===6||d[0]===2)){o=0;continue}if(d[0]===3&&(!n||d[1]>n[0]&&d[1]<n[3])){o.label=d[1];break}if(d[0]===6&&o.label<n[1]){o.label=n[1];n=d;break}if(n&&o.label<n[2]){o.label=n[2];o.ops.push(d);break}if(n[2])o.ops.pop();o.trys.pop();continue}d=t.call(e,o)}catch(l){d=[6,l];i=0}finally{r=n=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:true}}};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,o,r){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function d(e){try{l(r["throw"](e))}catch(t){i(t)}}function l(e){e.done?o(e.value):n(e.value).then(a,d)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,a;return a={next:d(0),throw:d(1),return:d(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function d(e){return function(t){return l([e,t])}}function l(d){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,d[0]&&(o=0)),o)try{if(r=1,n&&(i=d[0]&2?n["return"]:d[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,d[1])).done)return i;if(n=0,i)d=[d[0]&2,i.value];switch(d[0]){case 0:case 1:i=d;break;case 4:o.label++;return{value:d[1],done:false};case 5:o.label++;n=d[1];d=[0];continue;case 7:d=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){o=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){o.label=d[1];break}if(d[0]===6&&o.label<i[1]){o.label=i[1];i=d;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(d);break}if(i[2])o.ops.pop();o.trys.pop();continue}d=t.call(e,o)}catch(l){d=[6,l];n=0}finally{r=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Built with Duet Design System
4
- */import{r as registerInstance,c as createEvent$1,h,F as Fragment,g as getElement}from"./index-3b6ef857.js";import{a as actionArrowRight}from"./action-arrow-right-f7d56681.js";import{a as actionNewWindowSmall}from"./action-new-window-small-1945be91.js";import{D as DuetStringsExternalDefaults}from"./common-strings-97e04e4b.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{a as getLanguage,g as getLocaleString}from"./language-utils-7b211f31.js";import{p as parsePossibleJSON}from"./string-utils-5954f458.js";var actionNewWindow={title:"action-new-window",tags:"arrow open new window tab external link square box rectangle action",svg:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M10.25 2a.75.75 0 1 1 0 1.5h-6.5A2.252 2.252 0 0 0 1.5 5.75v14.5a2.252 2.252 0 0 0 2.25 2.25h14.5a2.252 2.252 0 0 0 2.25-2.25v-6.5a.75.75 0 0 1 1.5 0v6.5A3.754 3.754 0 0 1 18.25 24H3.75A3.754 3.754 0 0 1 0 20.25V5.75A3.754 3.754 0 0 1 3.75 2zm12.985-2c.1 0 .198.02.29.058l.025.011a.726.726 0 0 1 .15.091l.066.059a.755.755 0 0 1 .109.138l.051.1c.04.092.06.192.06.293l-.001 6.363c0 .2-.078.389-.22.53a.743.743 0 0 1-.53.22.743.743 0 0 1-.53-.22.743.743 0 0 1-.22-.53V2.559L15.28 9.764a.75.75 0 0 1-1.06-1.06l7.204-7.205h-4.553a.744.744 0 0 1-.75-.75c0-.2.078-.388.22-.53A.743.743 0 0 1 16.87 0z"/></svg>'};var duetFooterCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex-shrink:0;width:100%}.duet-footer{display:block;width:100%;padding-top:20px;padding-bottom:16px;margin-top:48px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:rgb(255, 255, 255);text-align:left;background:rgb(0, 41, 77)}.duet-footer.duet-p-0{padding:0 !important}.duet-footer.duet-m-0{margin:0 !important}@media (min-width: 36em){.duet-footer{padding-top:36px}}@media (min-width: 62em){.duet-footer{padding-top:48px;padding-bottom:36px}}.duet-footer.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";background:rgb(198, 12, 48)}.duet-footer a{color:rgb(255, 255, 255);text-decoration:none}@media (min-width: 62em){.duet-footer a{border-radius:4px}}.duet-footer a:focus{outline:0}:host(.user-is-tabbing) .duet-footer a:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px rgb(0, 119, 179)}:host(.user-is-tabbing) .duet-theme-turva a:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px rgb(23, 28, 58)}.duet-footer-wrapper{position:relative;margin:0 auto}@media (min-width: 62em){.duet-footer-wrapper{padding:0 72px 0 48px}}@media (min-width: 76.25em){.duet-footer-wrapper{max-width:1110px;padding:0 20px 0 0}}.duet-footer-top{width:100%}@media (min-width: 62em){.duet-footer-top{display:flex;flex-direction:row;align-items:center;justify-content:space-between}}duet-logo{margin-left:16px !important}@media (min-width: 36em){duet-logo{margin-left:28px !important}}@media (min-width: 62em){duet-logo{margin-left:0 !important}}.duet-footer-link{padding:16px !important;display:flex;flex-direction:row;align-items:center;width:100%;font-weight:600;border-bottom:1px solid rgba(255, 255, 255, 0.2);transition:background-color 300ms ease}@media (min-width: 36em){.duet-footer-link{padding-right:20px !important;padding-left:28px !important}}@media (min-width: 62em){.duet-footer-link{width:auto;min-width:0;padding-right:0 !important;padding-left:0 !important;border:0}}.duet-footer-link:first-of-type{margin-top:20px;border-top:1px solid rgba(255, 255, 255, 0.2)}@media (min-width: 62em){.duet-footer-link:first-of-type{margin:0;border:0}}.duet-footer-link span{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duet-footer-link:hover{background:rgba(0, 0, 0, 0.1)}@media (min-width: 62em){.duet-footer-link:hover{background:transparent}}.duet-footer-icon{display:flex;align-items:center;justify-content:center;padding:12px;margin-right:16px;background:rgb(0, 119, 179);border-radius:50%;transition:300ms ease}.duet-theme-turva .duet-footer-icon{background:transparent;box-shadow:0 0 0 1px rgb(255, 255, 255)}a:hover .duet-footer-icon{background:#006ba1}.duet-theme-turva a:hover .duet-footer-icon{background:transparent}.duet-footer-arrow{display:flex;align-items:center;justify-content:center;width:20px;min-width:20px;max-width:20px;height:20px;max-height:20px;margin-left:auto;color:rgb(255, 255, 255);transition:transform 300ms ease}@media (min-width: 62em){.duet-footer-arrow{width:10px;min-width:10px;margin-top:3px;margin-left:8px}}@media (min-width: 62em){.duet-footer-arrow{margin-right:0}}a:hover .duet-footer-arrow{transform:translateX(4px)}.duet-footer-arrow duet-icon{width:20px;height:20px}@media (min-width: 62em){.duet-footer-arrow duet-icon{width:10px;height:10px}}.duet-footer-menu{padding:20px !important;display:flex;gap:2rem;font-size:0.875rem}@media (min-width: 36em){.duet-footer-menu{padding:28px !important}}@media (min-width: 62em){.duet-footer-menu{padding-left:8px !important}}.duet-footer-menu a{display:inline-block;text-decoration:none;word-break:break-all}.duet-footer-menu a:hover,.duet-footer-menu a:focus{text-decoration:underline}.duet-footer-menu a:hover .duet-footer-divider,.duet-footer-menu a:focus .duet-footer-divider{text-decoration:none}.duet-footer-menu .duet-footer-divider{display:inline-block;margin:0 8px}.duet-footer-menu .duet-footer-divider-copyright{display:none}.duet-footer-menu .duet-footer-menu-links{flex:1}@media (min-width: 62em){.duet-footer-menu .duet-footer-menu-links{text-align:right}}.duet-footer-menu a:last-of-type .duet-footer-divider{display:none}.duet-footer-copyright{display:none;font-size:0.875rem;color:rgb(255, 255, 255)}@media (min-width: 62em){.duet-footer-copyright{display:inline}}.duet-footer-copyright.duet-footer-copyright-mobile{display:block;padding-top:0.5rem;padding-bottom:1.25rem;padding-left:2rem;text-align:left}@media (min-width: 62em){.duet-footer-copyright.duet-footer-copyright-mobile{display:none}}.duet-footer-simple{padding:0;margin:0;margin-top:16px;color:rgb(0, 41, 77);background:transparent !important;border-top:1px solid rgb(225, 227, 230)}.duet-footer-simple .duet-footer-wrapper{max-width:100%;padding:0 20px;margin:0}@media (min-width: 62em){.duet-footer-simple .duet-footer-wrapper{padding:0 36px}}@media (min-width: 106.25em){.duet-footer-simple .duet-footer-wrapper{padding:0 48px}}.duet-footer-simple .duet-footer-copyright,.duet-footer-simple .duet-footer-menu a{color:rgb(0, 41, 77)}.duet-footer-simple .duet-footer-menu{padding:20px 0 !important}.duet-footer-simple .duet-footer-copyright-mobile{padding-left:0}.duet-footer-simple.duet-theme-turva{color:rgb(23, 28, 58);border-color:rgb(228, 228, 230)}.duet-footer-simple.duet-theme-turva .duet-footer-copyright,.duet-footer-simple.duet-theme-turva .duet-footer-menu a{color:rgb(23, 28, 58)}.duet-footer-external{display:inline-block;margin-left:4px;color:rgb(0, 119, 179)}.duet-theme-turva .duet-footer-external{color:rgb(255, 255, 255)}.duet-footer-simple.duet-theme-turva .duet-footer-external{color:rgb(198, 12, 48)}';var i18n={fi:{lahi:"© LähiTapiola",turva:"© Turva"},sv:{lahi:"© LokalTapiola",turva:"© Turva"},en:{lahi:"© LocalTapiola",turva:"© Turva"}};var createEvent=function(e,t){return{component:"duet-footer",data:t,originalEvent:e}};var DuetFooter=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent$1(this,"duetChange",3);this.duetLogoClick=createEvent$1(this,"duetLogoClick",7);this.duetMenuClick=createEvent$1(this,"duetMenuClick",7);this.duetItemClick=createEvent$1(this,"duetItemClick",7);this.duetAnalytics=createEvent$1(this,"duetAnalytics",7);this.duetEvent=createEvent$1(this,"duetEvent",7);this.handleClick=function(e){if(e.data.analyticsId){t.duetAnalytics.emit({component:"duet-footer",analyticsId:e.data.analyticsId})}t.duetChange.emit(e)};this.handleLogoClick=function(e){var o=createEvent(e,{href:t.logoHref,label:"logo"});t.duetLogoClick.emit(o);t.handleClick(o)};this.handleMenuClick=function(e,o){var r=createEvent(e,o);t.handleClick(r);t.duetMenuClick.emit(r)};this.handleItemClick=function(e,o){var r=createEvent(e,o);t.handleClick(r);t.duetItemClick.emit(r)};this.emitDuetEvent=function(e,o){t.duetEvent.emit({component:"duet-footer",data:o,originalEvent:e})};this.processedMainItem=null;this.processedItems=null;this.processedMenu=null;this.theme="";this.variation="default";this.margin="auto";this.logoHref="/";this.language=getLanguage();this.items=undefined;this.accessibleLabelExternalDefaults=DuetStringsExternalDefaults;this.accessibleLabelExternal=getLocaleString(this.accessibleLabelExternalDefaults,this.language);this.menu=undefined}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.refresh()};e.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.processedItems=parsePossibleJSON(this.items);this.processedMenu=parsePossibleJSON(this.menu);return[2]}))}))};e.prototype.render=function(){var e=this;var t=getLocaleString(i18n);var o=this.theme==="turva"?t.turva:t.lahi;return h("footer",{class:{"duet-footer":true,"duet-m-0":this.margin==="none","duet-theme-turva":this.theme==="turva","duet-footer-simple":this.variation==="simple"}},h("div",{class:"duet-footer-wrapper"},h("div",{class:"duet-footer-top",part:"top"},this.variation!=="simple"&&h("duet-logo",{href:this.logoHref,onClick:this.handleLogoClick,size:"large",inverse:true,language:this.language,theme:this.theme}),this.processedItems&&this.variation!=="simple"&&this.processedItems.map((function(t){return h("a",{class:"duet-footer-link",href:t.href,id:t.id,target:t.external?"_blank":"_self",onClick:function(o){return e.handleItemClick(o,t)},onMouseEnter:function(o){return e.emitDuetEvent(o,t)},onTouchStart:function(o){return e.emitDuetEvent(o,t)}},h("div",{class:"duet-footer-icon"},h("duet-icon",{size:"medium",margin:"none",name:t.icon,color:"currentColor"})),h("span",null,t.label),t.external&&h("duet-visually-hidden",null,", ",e.accessibleLabelExternal),h("div",{class:"duet-footer-arrow"},t.external?h("duet-icon",{icon:actionNewWindow.svg,size:"xx-small",margin:"none",color:"currentColor"}):h("duet-icon",{icon:actionArrowRight.svg,size:"auto",margin:"none",color:"currentColor"})))}))),h("slot",{name:"extra"}),h("p",{class:"duet-footer-menu",part:"menu"},h("span",{class:"duet-footer-copyright"},"".concat(o," ").concat((new Date).getFullYear())),h("div",{class:"duet-footer-menu-links"},this.processedMenu&&h(Fragment,null,this.processedMenu.map((function(t){return h("a",{href:t.href,id:t.id,target:t.external?"_blank":"_self",onClick:function(o){return e.handleMenuClick(o,t)},onMouseEnter:function(o){return e.emitDuetEvent(o,t)},onTouchStart:function(o){return e.emitDuetEvent(o,t)}},t.label,t.external&&h(Fragment,null,h("duet-visually-hidden",null,", ",e.accessibleLabelExternal),h("div",{class:"duet-footer-external"},h("duet-icon",{icon:actionNewWindowSmall.svg,size:"xx-small",margin:"none",color:"currentColor"}))),h("span",{class:"duet-footer-divider",role:"presentation","aria-hidden":"true"},"/"))}))))),h("p",{class:"duet-footer-copyright duet-footer-copyright-mobile"},"".concat(o," ").concat((new Date).getFullYear()))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{menu:["refresh"],items:["refresh"]}},enumerable:false,configurable:true});return e}();DuetFooter.style=duetFooterCss;export{DuetFooter as duet_footer};
4
+ */import{r as registerInstance,c as createEvent$1,h,F as Fragment,g as getElement}from"./index-3e7e0b4a.js";import{a as actionArrowRight}from"./action-arrow-right-f7d56681.js";import{a as actionNewWindowSmall}from"./action-new-window-small-1945be91.js";import{D as DuetStringsExternalDefaults}from"./common-strings-97e04e4b.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{g as getLanguage,a as getLocaleString,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver}from"./language-utils-6be16ff0.js";import{p as parsePossibleJSON}from"./string-utils-5954f458.js";var actionNewWindow={title:"action-new-window",tags:"arrow open new window tab external link square box rectangle action",svg:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M10.25 2a.75.75 0 1 1 0 1.5h-6.5A2.252 2.252 0 0 0 1.5 5.75v14.5a2.252 2.252 0 0 0 2.25 2.25h14.5a2.252 2.252 0 0 0 2.25-2.25v-6.5a.75.75 0 0 1 1.5 0v6.5A3.754 3.754 0 0 1 18.25 24H3.75A3.754 3.754 0 0 1 0 20.25V5.75A3.754 3.754 0 0 1 3.75 2zm12.985-2c.1 0 .198.02.29.058l.025.011a.726.726 0 0 1 .15.091l.066.059a.755.755 0 0 1 .109.138l.051.1c.04.092.06.192.06.293l-.001 6.363c0 .2-.078.389-.22.53a.743.743 0 0 1-.53.22.743.743 0 0 1-.53-.22.743.743 0 0 1-.22-.53V2.559L15.28 9.764a.75.75 0 0 1-1.06-1.06l7.204-7.205h-4.553a.744.744 0 0 1-.75-.75c0-.2.078-.388.22-.53A.743.743 0 0 1 16.87 0z"/></svg>'};var duetFooterCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex-shrink:0;width:100%}.duet-footer{display:block;width:100%;padding-top:20px;padding-bottom:16px;margin-top:48px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:rgb(255, 255, 255);text-align:left;background:rgb(0, 41, 77)}.duet-footer.duet-p-0{padding:0 !important}.duet-footer.duet-m-0{margin:0 !important}@media (min-width: 36em){.duet-footer{padding-top:36px}}@media (min-width: 62em){.duet-footer{padding-top:48px;padding-bottom:36px}}.duet-footer.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";background:rgb(198, 12, 48)}.duet-footer a{color:rgb(255, 255, 255);text-decoration:none}@media (min-width: 62em){.duet-footer a{border-radius:4px}}.duet-footer a:focus{outline:0}:host(.user-is-tabbing) .duet-footer a:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px rgb(0, 119, 179)}:host(.user-is-tabbing) .duet-theme-turva a:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px rgb(23, 28, 58)}.duet-footer-wrapper{position:relative;margin:0 auto}@media (min-width: 62em){.duet-footer-wrapper{padding:0 72px 0 48px}}@media (min-width: 76.25em){.duet-footer-wrapper{max-width:1110px;padding:0 20px 0 0}}.duet-footer-top{width:100%}@media (min-width: 62em){.duet-footer-top{display:flex;flex-direction:row;align-items:center;justify-content:space-between}}duet-logo{margin-left:16px !important}@media (min-width: 36em){duet-logo{margin-left:28px !important}}@media (min-width: 62em){duet-logo{margin-left:0 !important}}.duet-footer-link{padding:16px !important;display:flex;flex-direction:row;align-items:center;width:100%;font-weight:600;border-bottom:1px solid rgba(255, 255, 255, 0.2);transition:background-color 300ms ease}@media (min-width: 36em){.duet-footer-link{padding-right:20px !important;padding-left:28px !important}}@media (min-width: 62em){.duet-footer-link{width:auto;min-width:0;padding-right:0 !important;padding-left:0 !important;border:0}}.duet-footer-link:first-of-type{margin-top:20px;border-top:1px solid rgba(255, 255, 255, 0.2)}@media (min-width: 62em){.duet-footer-link:first-of-type{margin:0;border:0}}.duet-footer-link span{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duet-footer-link:hover{background:rgba(0, 0, 0, 0.1)}@media (min-width: 62em){.duet-footer-link:hover{background:transparent}}.duet-footer-icon{display:flex;align-items:center;justify-content:center;padding:12px;margin-right:16px;background:rgb(0, 119, 179);border-radius:50%;transition:300ms ease}.duet-theme-turva .duet-footer-icon{background:transparent;box-shadow:0 0 0 1px rgb(255, 255, 255)}a:hover .duet-footer-icon{background:#006ba1}.duet-theme-turva a:hover .duet-footer-icon{background:transparent}.duet-footer-arrow{display:flex;align-items:center;justify-content:center;width:20px;min-width:20px;max-width:20px;height:20px;max-height:20px;margin-left:auto;color:rgb(255, 255, 255);transition:transform 300ms ease}@media (min-width: 62em){.duet-footer-arrow{width:10px;min-width:10px;margin-top:3px;margin-left:8px}}@media (min-width: 62em){.duet-footer-arrow{margin-right:0}}a:hover .duet-footer-arrow{transform:translateX(4px)}.duet-footer-arrow duet-icon{width:20px;height:20px}@media (min-width: 62em){.duet-footer-arrow duet-icon{width:10px;height:10px}}.duet-footer-menu{padding:20px !important;display:flex;gap:2rem;font-size:0.875rem}@media (min-width: 36em){.duet-footer-menu{padding:28px !important}}@media (min-width: 62em){.duet-footer-menu{padding-left:8px !important}}.duet-footer-menu a{display:inline-block;text-decoration:none;word-break:break-all}.duet-footer-menu a:hover,.duet-footer-menu a:focus{text-decoration:underline}.duet-footer-menu a:hover .duet-footer-divider,.duet-footer-menu a:focus .duet-footer-divider{text-decoration:none}.duet-footer-menu .duet-footer-divider{display:inline-block;margin:0 8px}.duet-footer-menu .duet-footer-divider-copyright{display:none}.duet-footer-menu .duet-footer-menu-links{flex:1}@media (min-width: 62em){.duet-footer-menu .duet-footer-menu-links{text-align:right}}.duet-footer-menu a:last-of-type .duet-footer-divider{display:none}.duet-footer-copyright{display:none;font-size:0.875rem;color:rgb(255, 255, 255)}@media (min-width: 62em){.duet-footer-copyright{display:inline}}.duet-footer-copyright.duet-footer-copyright-mobile{display:block;padding-top:0.5rem;padding-bottom:1.25rem;padding-left:2rem;text-align:left}@media (min-width: 62em){.duet-footer-copyright.duet-footer-copyright-mobile{display:none}}.duet-footer-simple{padding:0;margin:0;margin-top:16px;color:rgb(0, 41, 77);background:transparent !important;border-top:1px solid rgb(225, 227, 230)}.duet-footer-simple .duet-footer-wrapper{max-width:100%;padding:0 20px;margin:0}@media (min-width: 62em){.duet-footer-simple .duet-footer-wrapper{padding:0 36px}}@media (min-width: 106.25em){.duet-footer-simple .duet-footer-wrapper{padding:0 48px}}.duet-footer-simple .duet-footer-copyright,.duet-footer-simple .duet-footer-menu a{color:rgb(0, 41, 77)}.duet-footer-simple .duet-footer-menu{padding:20px 0 !important}.duet-footer-simple .duet-footer-copyright-mobile{padding-left:0}.duet-footer-simple.duet-theme-turva{color:rgb(23, 28, 58);border-color:rgb(228, 228, 230)}.duet-footer-simple.duet-theme-turva .duet-footer-copyright,.duet-footer-simple.duet-theme-turva .duet-footer-menu a{color:rgb(23, 28, 58)}.duet-footer-external{display:inline-block;margin-left:4px;color:rgb(0, 119, 179)}.duet-theme-turva .duet-footer-external{color:rgb(255, 255, 255)}.duet-footer-simple.duet-theme-turva .duet-footer-external{color:rgb(198, 12, 48)}';var i18n={fi:{lahi:"© LähiTapiola",turva:"© Turva"},sv:{lahi:"© LokalTapiola",turva:"© Turva"},en:{lahi:"© LocalTapiola",turva:"© Turva"}};var createEvent=function(e,t){return{component:"duet-footer",data:t,originalEvent:e}};var DuetFooter=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent$1(this,"duetChange",3);this.duetLogoClick=createEvent$1(this,"duetLogoClick",7);this.duetMenuClick=createEvent$1(this,"duetMenuClick",7);this.duetItemClick=createEvent$1(this,"duetItemClick",7);this.duetAnalytics=createEvent$1(this,"duetAnalytics",7);this.duetEvent=createEvent$1(this,"duetEvent",7);this.handleClick=function(e){if(e.data.analyticsId){t.duetAnalytics.emit({component:"duet-footer",analyticsId:e.data.analyticsId})}t.duetChange.emit(e)};this.handleLogoClick=function(e){var o=createEvent(e,{href:t.logoHref,label:"logo"});t.duetLogoClick.emit(o);t.handleClick(o)};this.handleMenuClick=function(e,o){var r=createEvent(e,o);t.handleClick(r);t.duetMenuClick.emit(r)};this.handleItemClick=function(e,o){var r=createEvent(e,o);t.handleClick(r);t.duetItemClick.emit(r)};this.emitDuetEvent=function(e,o){t.duetEvent.emit({component:"duet-footer",data:o,originalEvent:e})};this.processedMainItem=null;this.processedItems=null;this.processedMenu=null;this.theme="";this.variation="default";this.margin="auto";this.logoHref="/";this.language=getLanguage();this.items=undefined;this.accessibleLabelExternalDefaults=DuetStringsExternalDefaults;this.accessibleLabelExternal=getLocaleString(this.accessibleLabelExternalDefaults);this.menu=undefined}e.prototype.watchLanguageStateHandler=function(e,t){if(e!==t&&this.accessibleLabelExternal===this.accessibleLabelExternalDefaults[t]){this.accessibleLabelExternal=getLocaleString(this.accessibleLabelExternalDefaults,e)}};e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.refresh()};e.prototype.connectedCallback=function(){connectLanguageChangeObserver(this)};e.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this)};e.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.processedItems=parsePossibleJSON(this.items);this.processedMenu=parsePossibleJSON(this.menu);return[2]}))}))};e.prototype.render=function(){var e=this;var t=getLocaleString(i18n);var o=this.theme==="turva"?t.turva:t.lahi;return h("footer",{class:{"duet-footer":true,"duet-m-0":this.margin==="none","duet-theme-turva":this.theme==="turva","duet-footer-simple":this.variation==="simple"}},h("div",{class:"duet-footer-wrapper"},h("div",{class:"duet-footer-top",part:"top"},this.variation!=="simple"&&h("duet-logo",{href:this.logoHref,onClick:this.handleLogoClick,size:"large",inverse:true,language:this.language,theme:this.theme}),this.processedItems&&this.variation!=="simple"&&this.processedItems.map((function(t){return h("a",{class:"duet-footer-link",href:t.href,id:t.id,target:t.external?"_blank":"_self",onClick:function(o){return e.handleItemClick(o,t)},onMouseEnter:function(o){return e.emitDuetEvent(o,t)},onTouchStart:function(o){return e.emitDuetEvent(o,t)}},h("div",{class:"duet-footer-icon"},h("duet-icon",{size:"medium",margin:"none",name:t.icon,color:"currentColor"})),h("span",null,t.label),t.external&&h("duet-visually-hidden",null,", ",e.accessibleLabelExternal),h("div",{class:"duet-footer-arrow"},t.external?h("duet-icon",{icon:actionNewWindow.svg,size:"xx-small",margin:"none",color:"currentColor"}):h("duet-icon",{icon:actionArrowRight.svg,size:"auto",margin:"none",color:"currentColor"})))}))),h("slot",{name:"extra"}),h("p",{class:"duet-footer-menu",part:"menu"},h("span",{class:"duet-footer-copyright"},"".concat(o," ").concat((new Date).getFullYear())),h("div",{class:"duet-footer-menu-links"},this.processedMenu&&h(Fragment,null,this.processedMenu.map((function(t){return h("a",{href:t.href,id:t.id,target:t.external?"_blank":"_self",onClick:function(o){return e.handleMenuClick(o,t)},onMouseEnter:function(o){return e.emitDuetEvent(o,t)},onTouchStart:function(o){return e.emitDuetEvent(o,t)}},t.label,t.external&&h(Fragment,null,h("duet-visually-hidden",null,", ",e.accessibleLabelExternal),h("div",{class:"duet-footer-external"},h("duet-icon",{icon:actionNewWindowSmall.svg,size:"xx-small",margin:"none",color:"currentColor"}))),h("span",{class:"duet-footer-divider",role:"presentation","aria-hidden":"true"},"/"))}))))),h("p",{class:"duet-footer-copyright duet-footer-copyright-mobile"},"".concat(o," ").concat((new Date).getFullYear()))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{language:["watchLanguageStateHandler"],menu:["refresh"],items:["refresh"]}},enumerable:false,configurable:true});return e}();DuetFooter.style=duetFooterCss;export{DuetFooter as duet_footer};
@@ -1,4 +1,4 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,i,e,r){function n(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,d){function a(t){try{m(r.next(t))}catch(i){d(i)}}function o(t){try{m(r["throw"](t))}catch(i){d(i)}}function m(t){t.done?e(t.value):n(t.value).then(a,o)}m((r=r.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},r,n,d,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(t){return function(i){return m([t,i])}}function m(o){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(e=0)),e)try{if(r=1,n&&(d=o[0]&2?n["return"]:o[0]?n["throw"]||((d=n["return"])&&d.call(n),0):n.next)&&!(d=d.call(n,o[1])).done)return d;if(n=0,d)o=[o[0]&2,d.value];switch(o[0]){case 0:case 1:d=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;n=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(d=e.trys,d=d.length>0&&d[d.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!d||o[1]>d[0]&&o[1]<d[3])){e.label=o[1];break}if(o[0]===6&&e.label<d[1]){e.label=d[1];d=o;break}if(d&&e.label<d[2]){e.label=d[2];e.ops.push(o);break}if(d[2])e.ops.pop();e.trys.pop();continue}o=i.call(t,e)}catch(m){o=[6,m];n=0}finally{r=d=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Built with Duet Design System
4
- */import{r as registerInstance,h,g as getElement,H as Host}from"./index-3b6ef857.js";import{m as media_query_large,a as media_query_medium,b as media_query_small}from"./tokens-0963dc8b.js";import{w as watchForOptions,a as watchForElement}from"./watch-options-dd55bce8.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";var duetGridCss=".sc-duet-grid-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:flex !important;flex-direction:column !important;align-items:flex-start !important;justify-content:flex-start !important;width:100%;max-width:100%;height:auto}.duet-grid-breakpoint-x-small.sc-duet-grid-h{flex-direction:row !important}@media (max-width: 22.5em){.duet-grid-breakpoint-x-small.sc-duet-grid-h{flex-direction:column !important}}@media (min-width: 36em){.duet-grid-breakpoint-small.sc-duet-grid-h{flex-direction:row !important}}@media (min-width: 48em){.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:row !important}}@media (min-width: 62em){.duet-grid-breakpoint-large.sc-duet-grid-h{flex-direction:row !important}}@media (min-width: 64.0625em){.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:row !important}}.duet-grid-wrap.sc-duet-grid-h{flex-wrap:wrap !important}.duet-no-stacking.sc-duet-grid-h{flex-direction:row !important}.duet-grid-direction-vertical.duet-grid-breakpoint-x-small.sc-duet-grid-h{flex-direction:column !important}@media (max-width: 35.9375em){.duet-grid-direction-vertical.duet-grid-breakpoint-x-small.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-direction-vertical.duet-grid-breakpoint-small.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 36em){.duet-grid-direction-vertical.duet-grid-breakpoint-small.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-direction-vertical.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 48em){.duet-grid-direction-vertical.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-direction-vertical.duet-grid-breakpoint-large.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 62em){.duet-grid-direction-vertical.duet-grid-breakpoint-large.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-direction-vertical.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 64.0625em){.duet-grid-direction-vertical.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-align-top.duet-no-stacking.sc-duet-grid-h{align-items:flex-start !important}.duet-grid-align-bottom.duet-no-stacking.sc-duet-grid-h{align-items:flex-end !important}.duet-grid-align-center.duet-no-stacking.sc-duet-grid-h{align-items:center !important}.duet-grid-align-stretch.duet-no-stacking.sc-duet-grid-h{align-items:stretch !important}.duet-grid-align-baseline.duet-no-stacking.sc-duet-grid-h{align-items:baseline !important}.duet-grid-align-top.duet-grid-breakpoint-x-small.sc-duet-grid-h{align-items:flex-start !important}.duet-grid-align-bottom.duet-grid-breakpoint-x-small.sc-duet-grid-h{align-items:flex-end !important}.duet-grid-align-center.duet-grid-breakpoint-x-small.sc-duet-grid-h{align-items:center !important}.duet-grid-align-stretch.duet-grid-breakpoint-x-small.sc-duet-grid-h{align-items:stretch !important}.duet-grid-align-baseline.duet-grid-breakpoint-x-small.sc-duet-grid-h{align-items:baseline !important}@media (min-width: 36em){.duet-grid-align-top.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 36em){.duet-grid-align-bottom.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 36em){.duet-grid-align-center.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:center !important}}@media (min-width: 36em){.duet-grid-align-stretch.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 36em){.duet-grid-align-baseline.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:baseline !important}}@media (min-width: 48em){.duet-grid-align-top.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 48em){.duet-grid-align-bottom.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 48em){.duet-grid-align-center.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:center !important}}@media (min-width: 48em){.duet-grid-align-stretch.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 48em){.duet-grid-align-baseline.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:baseline !important}}@media (min-width: 62em){.duet-grid-align-top.duet-grid-breakpoint-large.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 62em){.duet-grid-align-bottom.duet-grid-breakpoint-large.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 62em){.duet-grid-align-center.duet-grid-breakpoint-large.sc-duet-grid-h{align-items:center !important}}@media (min-width: 62em){.duet-grid-align-stretch.duet-grid-breakpoint-large.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 62em){.duet-grid-align-baseline.duet-grid-breakpoint-large.sc-duet-grid-h{align-items:baseline !important}}@media (min-width: 64.0625em){.duet-grid-align-top.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 64.0625em){.duet-grid-align-bottom.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 64.0625em){.duet-grid-align-center.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:center !important}}@media (min-width: 64.0625em){.duet-grid-align-stretch.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 64.0625em){.duet-grid-align-baseline.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:baseline !important}}.duet-grid-distribution-left.sc-duet-grid-h{justify-content:flex-start !important}.duet-grid-distribution-right.sc-duet-grid-h{justify-content:flex-end !important}.duet-grid-distribution-center.sc-duet-grid-h{justify-content:center !important}.duet-grid-distribution-between.sc-duet-grid-h{justify-content:space-between !important}.duet-grid-distribution-around.sc-duet-grid-h{justify-content:space-around !important}.duet-grid-distribution-evenly.sc-duet-grid-h{justify-content:space-evenly !important}@media (max-width: 35.9375em){.duet-grid-mobile-left.sc-duet-grid-h{align-items:flex-start !important;justify-content:flex-start !important;text-align:left !important}}@media (max-width: 35.9375em){.duet-grid-mobile-center.sc-duet-grid-h{align-items:center !important;justify-content:center !important;text-align:center !important}.duet-grid-mobile-center.sc-duet-grid-h *.sc-duet-grid{text-align:center !important}}@media (max-width: 35.9375em){.duet-grid-mobile-right.sc-duet-grid-h{align-items:flex-end !important;justify-content:flex-end !important;text-align:right !important}.duet-grid-mobile-right.sc-duet-grid-h *.sc-duet-grid{text-align:right !important}}";function isGridItem(t){return t.tagName.toLowerCase()==="duet-grid-item"}var DuetGrid=function(){function t(t){registerInstance(this,t);this.mql=[window.matchMedia(media_query_large.replace(/'/g,"")),window.matchMedia(media_query_medium.replace(/'/g,"")),window.matchMedia(media_query_small.replace(/'/g,""))];this.distributeFormElement=false;this.responsive=false;this.breakpoint="small";this.direction="horizontal";this.alignment="top";this.distribution="default";this.mobile=""}t.prototype.outerHeight=function(t){var i=t.offsetHeight,e=window.getComputedStyle(t);return["top","bottom"].map((function(t){return parseInt(e["margin-".concat(t)])})).reduce((function(t,i){return t+i}),i)};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,i;var e=this;return __generator(this,(function(r){t=this.element;this.distributeFormElement=this.alignment==="form_distribute";this.mutationO=watchForOptions(t,"duet-grid-item",(function(){e.updateGridItems()}));if(this.distributeFormElement){this.mutation1=watchForElement(t,"duet-input",(function(){e.updateGridItemsWithInputFields()}));for(i=0;i<this.mql.length;i++){if(this.mql[i].addEventListener){this.mql[i].addEventListener("change",this.updateGridItemsWithInputFields.bind(this))}}}this.updateGridItems();return[2]}))}))};t.prototype.disconnectedCallback=function(){if(this.mutationO){this.mutationO.disconnect();this.mutationO=undefined}if(this.mutation1){this.mutation1.disconnect();this.mutation1=undefined}for(var t=0;t<this.mql.length;t++){if(this.mql[t].removeEventListener){this.mql[t].removeEventListener("change",this.updateGridItemsWithInputFields.bind(this))}}};t.prototype.updateGridItems=function(){return __awaiter(this,void 0,void 0,(function(){var t;var i=this;return __generator(this,(function(e){t=Array.from(this.element.children).filter(isGridItem);t.forEach((function(t){t.responsive=i.responsive;t.breakpoint=i.breakpoint}));return[2]}))}))};t.prototype.updateGridItemsWithInputFields=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,e,r;var n=this;return __generator(this,(function(d){t=Array.from(this.element.children).filter(isGridItem);i=window?window.getComputedStyle(this.element).flexDirection==="column":false;e=0;r=[];t.forEach((function(t){var i=t.querySelector("span.duet-input-error");var e=i?n.outerHeight(i):0;r.push(e)}));e=Math.max.apply(Math,r);t.forEach((function(t){var r=t.querySelector("span.duet-input-error");var d=r?n.outerHeight(r):0;if(d<e&&!i){t.setAttribute("style","padding-bottom: ".concat(e-d,"px;"))}else if(d===e||i){t.setAttribute("style","padding-bottom: 0px;")}}));return[2]}))}))};t.prototype.render=function(){return h(Host,{class:{"duet-grid":true,"duet-no-stacking":!this.responsive,"duet-grid-align-top":this.alignment==="top","duet-grid-align-bottom":this.alignment==="bottom"||this.alignment==="form_distribute","duet-grid-align-center":this.alignment==="center","duet-grid-align-stretch":this.alignment==="stretch","duet-grid-align-baseline":this.alignment==="baseline","duet-grid-distribution-left":this.distribution==="left","duet-grid-distribution-right":this.distribution==="right","duet-grid-distribution-center":this.distribution==="center","duet-grid-distribution-between":this.distribution==="space-between","duet-grid-distribution-around":this.distribution==="space-around","duet-grid-distribution-evenly":this.distribution==="space-evenly","duet-grid-mobile-left":this.mobile==="left","duet-grid-mobile-center":this.mobile==="center","duet-grid-mobile-right":this.mobile==="right","duet-grid-direction-horizontal":this.direction==="horizontal","duet-grid-direction-vertical":this.direction==="vertical","duet-grid-breakpoint-x-small":this.breakpoint==="x-small","duet-grid-breakpoint-small":this.breakpoint==="small","duet-grid-breakpoint-medium":this.breakpoint==="medium","duet-grid-breakpoint-large":this.breakpoint==="large","duet-grid-breakpoint-x-large":this.breakpoint==="x-large"}})};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{responsive:["updateGridItems"],breakpoint:["updateGridItems"]}},enumerable:false,configurable:true});return t}();DuetGrid.style=duetGridCss;var duetGridItemCss='.sc-duet-grid-item-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;min-width:0;max-width:100%;flex:0 0 auto;padding-right:8px;padding-left:8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-style:normal;font-weight:400;line-height:1.5;color:rgb(0, 41, 77)}.sc-duet-grid-item-h:first-child,.sc-duet-grid-item-h:first-of-type{padding-left:0}.sc-duet-grid-item-h:last-child,.sc-duet-grid-item-h:last-of-type{padding-right:0}@media (max-width: 35.9375em){.duet-grid-item-responsive.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important;padding-right:0;padding-left:0}}@media screen and (max-width: 47.9375em){.duet-grid-item-br-medium.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 47.9375em){.duet-grid-item-responsive.duet-grid-item-br-medium.sc-duet-grid-item-h{padding-right:0;padding-left:0}}@media screen and (max-width: 64em){.duet-grid-item-br-x-large.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 64em){.duet-grid-item-responsive.duet-grid-item-br-x-large.sc-duet-grid-item-h{padding-right:0;padding-left:0}}.duet-grid-item-fill.sc-duet-grid-item-h{flex:1 1 auto;width:100%}.duet-theme-turva.sc-duet-grid-item-h{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-m-0.sc-duet-grid-item-h{padding:0 !important;margin:0 !important}';var DuetGridItem=function(){function t(t){registerInstance(this,t);this.fill=false;this.maxWidth=undefined;this.minWidth=undefined;this.theme="";this.margin="auto";this.responsive=false;this.breakpoint="small"}t.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};t.prototype.render=function(){return h(Host,{style:{"min-width":this.minWidth,"max-width":this.maxWidth},class:{"duet-m-0":this.margin==="none","duet-theme-turva":this.theme==="turva","duet-grid-item":true,"duet-grid-item-fill":this.fill,"duet-grid-item-responsive":this.responsive,"duet-grid-item-br-medium":this.breakpoint==="medium","duet-grid-item-br-x-large":this.breakpoint==="x-large"}})};return t}();DuetGridItem.style=duetGridItemCss;export{DuetGrid as duet_grid,DuetGridItem as duet_grid_item};
4
+ */import{r as registerInstance,h,g as getElement,H as Host}from"./index-3e7e0b4a.js";import{m as media_query_large,a as media_query_medium,b as media_query_small}from"./tokens-0963dc8b.js";import{w as watchForOptions,a as watchForElement}from"./watch-options-dd55bce8.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";var duetGridCss=".sc-duet-grid-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:flex !important;flex-direction:column !important;align-items:flex-start !important;justify-content:flex-start !important;width:100%;max-width:100%;height:auto}.duet-grid-breakpoint-x-small.sc-duet-grid-h{flex-direction:row !important}@media (max-width: 22.5em){.duet-grid-breakpoint-x-small.sc-duet-grid-h{flex-direction:column !important}}@media (min-width: 36em){.duet-grid-breakpoint-small.sc-duet-grid-h{flex-direction:row !important}}@media (min-width: 48em){.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:row !important}}@media (min-width: 62em){.duet-grid-breakpoint-large.sc-duet-grid-h{flex-direction:row !important}}@media (min-width: 64.0625em){.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:row !important}}.duet-grid-wrap.sc-duet-grid-h{flex-wrap:wrap !important}.duet-no-stacking.sc-duet-grid-h{flex-direction:row !important}.duet-grid-direction-vertical.duet-grid-breakpoint-x-small.sc-duet-grid-h{flex-direction:column !important}@media (max-width: 35.9375em){.duet-grid-direction-vertical.duet-grid-breakpoint-x-small.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-direction-vertical.duet-grid-breakpoint-small.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 36em){.duet-grid-direction-vertical.duet-grid-breakpoint-small.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-direction-vertical.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 48em){.duet-grid-direction-vertical.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-direction-vertical.duet-grid-breakpoint-large.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 62em){.duet-grid-direction-vertical.duet-grid-breakpoint-large.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-direction-vertical.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 64.0625em){.duet-grid-direction-vertical.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-align-top.duet-no-stacking.sc-duet-grid-h{align-items:flex-start !important}.duet-grid-align-bottom.duet-no-stacking.sc-duet-grid-h{align-items:flex-end !important}.duet-grid-align-center.duet-no-stacking.sc-duet-grid-h{align-items:center !important}.duet-grid-align-stretch.duet-no-stacking.sc-duet-grid-h{align-items:stretch !important}.duet-grid-align-baseline.duet-no-stacking.sc-duet-grid-h{align-items:baseline !important}.duet-grid-align-top.duet-grid-breakpoint-x-small.sc-duet-grid-h{align-items:flex-start !important}.duet-grid-align-bottom.duet-grid-breakpoint-x-small.sc-duet-grid-h{align-items:flex-end !important}.duet-grid-align-center.duet-grid-breakpoint-x-small.sc-duet-grid-h{align-items:center !important}.duet-grid-align-stretch.duet-grid-breakpoint-x-small.sc-duet-grid-h{align-items:stretch !important}.duet-grid-align-baseline.duet-grid-breakpoint-x-small.sc-duet-grid-h{align-items:baseline !important}@media (min-width: 36em){.duet-grid-align-top.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 36em){.duet-grid-align-bottom.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 36em){.duet-grid-align-center.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:center !important}}@media (min-width: 36em){.duet-grid-align-stretch.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 36em){.duet-grid-align-baseline.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:baseline !important}}@media (min-width: 48em){.duet-grid-align-top.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 48em){.duet-grid-align-bottom.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 48em){.duet-grid-align-center.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:center !important}}@media (min-width: 48em){.duet-grid-align-stretch.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 48em){.duet-grid-align-baseline.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:baseline !important}}@media (min-width: 62em){.duet-grid-align-top.duet-grid-breakpoint-large.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 62em){.duet-grid-align-bottom.duet-grid-breakpoint-large.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 62em){.duet-grid-align-center.duet-grid-breakpoint-large.sc-duet-grid-h{align-items:center !important}}@media (min-width: 62em){.duet-grid-align-stretch.duet-grid-breakpoint-large.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 62em){.duet-grid-align-baseline.duet-grid-breakpoint-large.sc-duet-grid-h{align-items:baseline !important}}@media (min-width: 64.0625em){.duet-grid-align-top.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 64.0625em){.duet-grid-align-bottom.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 64.0625em){.duet-grid-align-center.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:center !important}}@media (min-width: 64.0625em){.duet-grid-align-stretch.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 64.0625em){.duet-grid-align-baseline.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:baseline !important}}.duet-grid-distribution-left.sc-duet-grid-h{justify-content:flex-start !important}.duet-grid-distribution-right.sc-duet-grid-h{justify-content:flex-end !important}.duet-grid-distribution-center.sc-duet-grid-h{justify-content:center !important}.duet-grid-distribution-between.sc-duet-grid-h{justify-content:space-between !important}.duet-grid-distribution-around.sc-duet-grid-h{justify-content:space-around !important}.duet-grid-distribution-evenly.sc-duet-grid-h{justify-content:space-evenly !important}@media (max-width: 35.9375em){.duet-grid-mobile-left.sc-duet-grid-h{align-items:flex-start !important;justify-content:flex-start !important;text-align:left !important}}@media (max-width: 35.9375em){.duet-grid-mobile-center.sc-duet-grid-h{align-items:center !important;justify-content:center !important;text-align:center !important}.duet-grid-mobile-center.sc-duet-grid-h *.sc-duet-grid{text-align:center !important}}@media (max-width: 35.9375em){.duet-grid-mobile-right.sc-duet-grid-h{align-items:flex-end !important;justify-content:flex-end !important;text-align:right !important}.duet-grid-mobile-right.sc-duet-grid-h *.sc-duet-grid{text-align:right !important}}";function isGridItem(t){return t.tagName.toLowerCase()==="duet-grid-item"}var DuetGrid=function(){function t(t){registerInstance(this,t);this.mql=[window.matchMedia(media_query_large.replace(/'/g,"")),window.matchMedia(media_query_medium.replace(/'/g,"")),window.matchMedia(media_query_small.replace(/'/g,""))];this.distributeFormElement=false;this.responsive=false;this.breakpoint="small";this.direction="horizontal";this.alignment="top";this.distribution="default";this.mobile=""}t.prototype.outerHeight=function(t){var i=t.offsetHeight,e=window.getComputedStyle(t);return["top","bottom"].map((function(t){return parseInt(e["margin-".concat(t)])})).reduce((function(t,i){return t+i}),i)};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,i;var e=this;return __generator(this,(function(r){t=this.element;this.distributeFormElement=this.alignment==="form_distribute";this.mutationO=watchForOptions(t,"duet-grid-item",(function(){e.updateGridItems()}));if(this.distributeFormElement){this.mutation1=watchForElement(t,"duet-input",(function(){e.updateGridItemsWithInputFields()}));for(i=0;i<this.mql.length;i++){if(this.mql[i].addEventListener){this.mql[i].addEventListener("change",this.updateGridItemsWithInputFields.bind(this))}}}this.updateGridItems();return[2]}))}))};t.prototype.disconnectedCallback=function(){if(this.mutationO){this.mutationO.disconnect();this.mutationO=undefined}if(this.mutation1){this.mutation1.disconnect();this.mutation1=undefined}for(var t=0;t<this.mql.length;t++){if(this.mql[t].removeEventListener){this.mql[t].removeEventListener("change",this.updateGridItemsWithInputFields.bind(this))}}};t.prototype.updateGridItems=function(){return __awaiter(this,void 0,void 0,(function(){var t;var i=this;return __generator(this,(function(e){t=Array.from(this.element.children).filter(isGridItem);t.forEach((function(t){t.responsive=i.responsive;t.breakpoint=i.breakpoint}));return[2]}))}))};t.prototype.updateGridItemsWithInputFields=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,e,r;var n=this;return __generator(this,(function(d){t=Array.from(this.element.children).filter(isGridItem);i=window?window.getComputedStyle(this.element).flexDirection==="column":false;e=0;r=[];t.forEach((function(t){var i=t.querySelector("span.duet-input-error");var e=i?n.outerHeight(i):0;r.push(e)}));e=Math.max.apply(Math,r);t.forEach((function(t){var r=t.querySelector("span.duet-input-error");var d=r?n.outerHeight(r):0;if(d<e&&!i){t.setAttribute("style","padding-bottom: ".concat(e-d,"px;"))}else if(d===e||i){t.setAttribute("style","padding-bottom: 0px;")}}));return[2]}))}))};t.prototype.render=function(){return h(Host,{class:{"duet-grid":true,"duet-no-stacking":!this.responsive,"duet-grid-align-top":this.alignment==="top","duet-grid-align-bottom":this.alignment==="bottom"||this.alignment==="form_distribute","duet-grid-align-center":this.alignment==="center","duet-grid-align-stretch":this.alignment==="stretch","duet-grid-align-baseline":this.alignment==="baseline","duet-grid-distribution-left":this.distribution==="left","duet-grid-distribution-right":this.distribution==="right","duet-grid-distribution-center":this.distribution==="center","duet-grid-distribution-between":this.distribution==="space-between","duet-grid-distribution-around":this.distribution==="space-around","duet-grid-distribution-evenly":this.distribution==="space-evenly","duet-grid-mobile-left":this.mobile==="left","duet-grid-mobile-center":this.mobile==="center","duet-grid-mobile-right":this.mobile==="right","duet-grid-direction-horizontal":this.direction==="horizontal","duet-grid-direction-vertical":this.direction==="vertical","duet-grid-breakpoint-x-small":this.breakpoint==="x-small","duet-grid-breakpoint-small":this.breakpoint==="small","duet-grid-breakpoint-medium":this.breakpoint==="medium","duet-grid-breakpoint-large":this.breakpoint==="large","duet-grid-breakpoint-x-large":this.breakpoint==="x-large"}})};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{responsive:["updateGridItems"],breakpoint:["updateGridItems"]}},enumerable:false,configurable:true});return t}();DuetGrid.style=duetGridCss;var duetGridItemCss='.sc-duet-grid-item-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;min-width:0;max-width:100%;flex:0 0 auto;padding-right:8px;padding-left:8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-style:normal;font-weight:400;line-height:1.5;color:rgb(0, 41, 77)}.sc-duet-grid-item-h:first-child,.sc-duet-grid-item-h:first-of-type{padding-left:0}.sc-duet-grid-item-h:last-child,.sc-duet-grid-item-h:last-of-type{padding-right:0}@media (max-width: 35.9375em){.duet-grid-item-responsive.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important;padding-right:0;padding-left:0}}@media screen and (max-width: 47.9375em){.duet-grid-item-br-medium.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 47.9375em){.duet-grid-item-responsive.duet-grid-item-br-medium.sc-duet-grid-item-h{padding-right:0;padding-left:0}}@media screen and (max-width: 64em){.duet-grid-item-br-x-large.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 64em){.duet-grid-item-responsive.duet-grid-item-br-x-large.sc-duet-grid-item-h{padding-right:0;padding-left:0}}.duet-grid-item-fill.sc-duet-grid-item-h{flex:1 1 auto;width:100%}.duet-theme-turva.sc-duet-grid-item-h{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-m-0.sc-duet-grid-item-h{padding:0 !important;margin:0 !important}';var DuetGridItem=function(){function t(t){registerInstance(this,t);this.fill=false;this.maxWidth=undefined;this.minWidth=undefined;this.theme="";this.margin="auto";this.responsive=false;this.breakpoint="small"}t.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};t.prototype.render=function(){return h(Host,{style:{"min-width":this.minWidth,"max-width":this.maxWidth},class:{"duet-m-0":this.margin==="none","duet-theme-turva":this.theme==="turva","duet-grid-item":true,"duet-grid-item-fill":this.fill,"duet-grid-item-responsive":this.responsive,"duet-grid-item-br-medium":this.breakpoint==="medium","duet-grid-item-br-x-large":this.breakpoint==="x-large"}})};return t}();DuetGridItem.style=duetGridItemCss;export{DuetGrid as duet_grid,DuetGridItem as duet_grid_item};