@duetds/components 6.9.6 → 6.9.7

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 (506) hide show
  1. package/hydrate/index.js +1246 -58
  2. package/lib/cjs/duet-action-button.cjs.entry.js +1 -1
  3. package/lib/cjs/duet-alert.cjs.entry.js +1 -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 +1 -1
  8. package/lib/cjs/duet-callout.cjs.entry.js +5 -2
  9. package/lib/cjs/duet-caption_4.cjs.entry.js +1 -1
  10. package/lib/cjs/duet-card.cjs.entry.js +1 -1
  11. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  12. package/lib/cjs/duet-checkmark.cjs.entry.js +1 -1
  13. package/lib/cjs/duet-choice_2.cjs.entry.js +5 -3
  14. package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
  15. package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
  16. package/lib/cjs/duet-contact-card.cjs.entry.js +1 -1
  17. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  18. package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
  19. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  20. package/lib/cjs/duet-editable-table_3.cjs.entry.js +12 -4
  21. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  22. package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
  23. package/lib/cjs/duet-footer.cjs.entry.js +1 -1
  24. package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
  25. package/lib/cjs/duet-header_2.cjs.entry.js +1 -1
  26. package/lib/cjs/duet-hero.cjs.entry.js +4 -3
  27. package/lib/cjs/duet-icon.cjs.entry.js +1 -1
  28. package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
  29. package/lib/cjs/duet-layout.cjs.entry.js +1 -1
  30. package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
  31. package/lib/cjs/duet-menu-bar-button.cjs.entry.js +1 -1
  32. package/lib/cjs/duet-menu-bar-dropdown-link.cjs.entry.js +1 -1
  33. package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +1 -1
  34. package/lib/cjs/duet-menu-bar-link.cjs.entry.js +1 -1
  35. package/lib/cjs/duet-menu-bar.cjs.entry.js +1 -1
  36. package/lib/cjs/duet-modal.cjs.entry.js +2 -2
  37. package/lib/cjs/duet-multiselect.cjs.entry.js +1 -1
  38. package/lib/cjs/duet-nav.cjs.entry.js +1 -1
  39. package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
  40. package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
  41. package/lib/cjs/duet-page-heading.cjs.entry.js +1 -1
  42. package/lib/cjs/duet-pagination_2.cjs.entry.js +1 -1
  43. package/lib/cjs/duet-progress.cjs.entry.js +1 -1
  44. package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
  45. package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
  46. package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
  47. package/lib/cjs/duet-section-layout.cjs.entry.js +1 -1
  48. package/lib/cjs/duet-select.cjs.entry.js +1 -1
  49. package/lib/cjs/duet-slideout-lang.cjs.entry.js +1 -1
  50. package/lib/cjs/duet-slideout-link.cjs.entry.js +1 -1
  51. package/lib/cjs/duet-slideout-panel-dropdown.cjs.entry.js +1 -1
  52. package/lib/cjs/duet-slideout-panel.cjs.entry.js +2 -2
  53. package/lib/cjs/duet-slideout.cjs.entry.js +2 -2
  54. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  55. package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +1 -1
  56. package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +1 -1
  57. package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +1 -1
  58. package/lib/cjs/duet-submenu-bar.cjs.entry.js +1 -1
  59. package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
  60. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  61. package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +1 -1
  62. package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +1 -1
  63. package/lib/cjs/duet-toolbar-link.cjs.entry.js +1 -1
  64. package/lib/cjs/duet-toolbar.cjs.entry.js +1 -1
  65. package/lib/cjs/duet-tooltip.cjs.entry.js +1220 -48
  66. package/lib/cjs/duet-tray.cjs.entry.js +1 -1
  67. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
  68. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  69. package/lib/cjs/duet.cjs.js +2 -2
  70. package/lib/cjs/{focus-utils-de2e491b.js → focus-utils-8852d70c.js} +1 -1
  71. package/lib/cjs/{index-978ec5b0.js → index-8baedc34.js} +1 -1
  72. package/lib/cjs/loader.cjs.js +2 -2
  73. package/lib/collection/components/duet-callout/duet-callout.js +4 -1
  74. package/lib/collection/components/duet-choice/duet-choice.js +3 -1
  75. package/lib/collection/components/duet-hero/duet-hero.css +10 -0
  76. package/lib/collection/components/duet-hero/duet-hero.js +3 -1
  77. package/lib/collection/components/duet-tooltip/duet-tooltip.css +39 -106
  78. package/lib/collection/components/duet-tooltip/duet-tooltip.js +53 -49
  79. package/lib/collection/components/duet-upload/duet-upload.js +3 -3
  80. package/lib/collection/components/duet-upload/upload-item.js +8 -2
  81. package/lib/dist-custom-elements/duet-action-button.js +1 -1
  82. package/lib/dist-custom-elements/duet-alert.js +1 -1
  83. package/lib/dist-custom-elements/duet-badge.js +1 -1
  84. package/lib/dist-custom-elements/duet-breadcrumb.js +2 -2
  85. package/lib/dist-custom-elements/duet-breadcrumbs.js +2 -2
  86. package/lib/dist-custom-elements/duet-button.js +1 -1
  87. package/lib/dist-custom-elements/duet-callout.js +7 -4
  88. package/lib/dist-custom-elements/duet-caption.js +1 -1
  89. package/lib/dist-custom-elements/duet-card.js +3 -3
  90. package/lib/dist-custom-elements/duet-checkbox.js +1 -1
  91. package/lib/dist-custom-elements/duet-checkmark.js +1 -1
  92. package/lib/dist-custom-elements/duet-choice-group.js +6 -6
  93. package/lib/dist-custom-elements/duet-choice.js +8 -6
  94. package/lib/dist-custom-elements/duet-collapsible.js +3 -3
  95. package/lib/dist-custom-elements/duet-combobox.js +2 -2
  96. package/lib/dist-custom-elements/duet-contact-card.js +8 -8
  97. package/lib/dist-custom-elements/duet-cookie-consent.js +6 -6
  98. package/lib/dist-custom-elements/duet-date-picker.js +10 -10
  99. package/lib/dist-custom-elements/duet-divider.js +1 -1
  100. package/lib/dist-custom-elements/duet-editable-table.js +7 -7
  101. package/lib/dist-custom-elements/duet-empty-state.js +1 -1
  102. package/lib/dist-custom-elements/duet-fieldset.js +1 -1
  103. package/lib/dist-custom-elements/duet-footer.js +4 -4
  104. package/lib/dist-custom-elements/duet-grid-item.js +1 -1
  105. package/lib/dist-custom-elements/duet-grid.js +1 -1
  106. package/lib/dist-custom-elements/duet-header.js +9 -9
  107. package/lib/dist-custom-elements/duet-heading.js +1 -1
  108. package/lib/dist-custom-elements/duet-hero.js +12 -11
  109. package/lib/dist-custom-elements/duet-icon.js +1 -1
  110. package/lib/dist-custom-elements/duet-input.js +1 -1
  111. package/lib/dist-custom-elements/duet-label.js +1 -1
  112. package/lib/dist-custom-elements/duet-layout.js +1 -1
  113. package/lib/dist-custom-elements/duet-link.js +1 -1
  114. package/lib/dist-custom-elements/duet-list-item.js +1 -1
  115. package/lib/dist-custom-elements/duet-list.js +1 -1
  116. package/lib/dist-custom-elements/duet-logo.js +1 -1
  117. package/lib/dist-custom-elements/duet-menu-bar-button.js +3 -3
  118. package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +2 -2
  119. package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +3 -3
  120. package/lib/dist-custom-elements/duet-menu-bar-link.js +3 -3
  121. package/lib/dist-custom-elements/duet-menu-bar.js +3 -3
  122. package/lib/dist-custom-elements/duet-modal.js +7 -7
  123. package/lib/dist-custom-elements/duet-multiselect.js +8 -8
  124. package/lib/dist-custom-elements/duet-nav.js +1 -1
  125. package/lib/dist-custom-elements/duet-notification-drawer.js +4 -4
  126. package/lib/dist-custom-elements/duet-notification.js +2 -2
  127. package/lib/dist-custom-elements/duet-number-input.js +9 -9
  128. package/lib/dist-custom-elements/duet-page-heading.js +2 -2
  129. package/lib/dist-custom-elements/duet-pagination.js +7 -7
  130. package/lib/dist-custom-elements/duet-paragraph.js +1 -1
  131. package/lib/dist-custom-elements/duet-progress.js +1 -1
  132. package/lib/dist-custom-elements/duet-radio-group.js +6 -6
  133. package/lib/dist-custom-elements/duet-radio.js +1 -1
  134. package/lib/dist-custom-elements/duet-range-slider.js +2 -2
  135. package/lib/dist-custom-elements/duet-range-stepper.js +4 -4
  136. package/lib/dist-custom-elements/duet-scrollable.js +1 -1
  137. package/lib/dist-custom-elements/duet-section-layout.js +1 -1
  138. package/lib/dist-custom-elements/duet-select.js +1 -1
  139. package/lib/dist-custom-elements/duet-slideout-lang.js +2 -2
  140. package/lib/dist-custom-elements/duet-slideout-link.js +2 -2
  141. package/lib/dist-custom-elements/duet-slideout-panel-dropdown.js +2 -2
  142. package/lib/dist-custom-elements/duet-slideout-panel.js +2 -2
  143. package/lib/dist-custom-elements/duet-slideout.js +2 -2
  144. package/lib/dist-custom-elements/duet-spacer.js +1 -1
  145. package/lib/dist-custom-elements/duet-spinner.js +1 -1
  146. package/lib/dist-custom-elements/duet-step.js +4 -4
  147. package/lib/dist-custom-elements/duet-stepper.js +2 -2
  148. package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +2 -2
  149. package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +3 -3
  150. package/lib/dist-custom-elements/duet-submenu-bar-link.js +3 -3
  151. package/lib/dist-custom-elements/duet-submenu-bar.js +3 -3
  152. package/lib/dist-custom-elements/duet-tab-group.js +9 -9
  153. package/lib/dist-custom-elements/duet-tab.js +1 -1
  154. package/lib/dist-custom-elements/duet-table.js +1 -1
  155. package/lib/dist-custom-elements/duet-textarea.js +8 -8
  156. package/lib/dist-custom-elements/duet-toggle.js +2 -2
  157. package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +2 -2
  158. package/lib/dist-custom-elements/duet-toolbar-dropdown.js +2 -2
  159. package/lib/dist-custom-elements/duet-toolbar-link.js +2 -2
  160. package/lib/dist-custom-elements/duet-toolbar.js +1 -1
  161. package/lib/dist-custom-elements/duet-tooltip.js +1 -1
  162. package/lib/dist-custom-elements/duet-tray.js +3 -3
  163. package/lib/dist-custom-elements/duet-upload-aria-status.js +1 -1
  164. package/lib/dist-custom-elements/duet-upload.js +28 -20
  165. package/lib/dist-custom-elements/duet-visually-hidden.js +1 -1
  166. package/lib/dist-custom-elements/index.js +1 -1
  167. package/lib/dist-custom-elements/p-1635a5ff.js +1446 -0
  168. package/lib/dist-custom-elements/{p-6f0966d2.js → p-1d207f70.js} +4 -4
  169. package/lib/dist-custom-elements/{p-0a6a8f11.js → p-2a351223.js} +1 -1
  170. package/lib/dist-custom-elements/{p-f9c288b5.js → p-369a9e6b.js} +3 -3
  171. package/lib/dist-custom-elements/{p-9ed66812.js → p-3d6100be.js} +2 -2
  172. package/lib/dist-custom-elements/{p-4d0f9f83.js → p-4d20fcd1.js} +1 -1
  173. package/lib/dist-custom-elements/{p-70ef0e9d.js → p-5119f1dc.js} +5 -5
  174. package/lib/dist-custom-elements/{p-5962ecc8.js → p-5183d2cf.js} +1 -1
  175. package/lib/dist-custom-elements/{p-a2fa664a.js → p-53c27e8e.js} +1 -1
  176. package/lib/dist-custom-elements/{p-087e9427.js → p-62683175.js} +1 -1
  177. package/lib/dist-custom-elements/{p-d8ca2c64.js → p-649043a8.js} +2 -2
  178. package/lib/dist-custom-elements/{p-f5d77e8e.js → p-67365843.js} +1 -1
  179. package/lib/dist-custom-elements/{p-a78d941c.js → p-68be9a91.js} +1 -1
  180. package/lib/dist-custom-elements/{p-c4689e7b.js → p-783a8425.js} +2 -2
  181. package/lib/dist-custom-elements/{p-5c9bf9ba.js → p-7a905f45.js} +3 -3
  182. package/lib/dist-custom-elements/{p-0b141ef0.js → p-7e395433.js} +1 -1
  183. package/lib/dist-custom-elements/{p-57bb44bf.js → p-87df78c6.js} +1 -1
  184. package/lib/dist-custom-elements/{p-c638adb2.js → p-8bad78a6.js} +1 -1
  185. package/lib/dist-custom-elements/{p-4a060f56.js → p-93fab31d.js} +1 -1
  186. package/lib/dist-custom-elements/{p-8160f98e.js → p-99687f8f.js} +6 -6
  187. package/lib/dist-custom-elements/{p-cbc12626.js → p-9d1b018a.js} +1 -1
  188. package/lib/dist-custom-elements/{p-a3ba0ed5.js → p-c243ec01.js} +1 -1
  189. package/lib/{esm/tokens-0963dc8b.js → dist-custom-elements/p-cb9787ec.js} +1 -1
  190. package/lib/dist-custom-elements/{p-f5252ae4.js → p-cbb67f4e.js} +1 -1
  191. package/lib/dist-custom-elements/{p-75f47a29.js → p-d95944c8.js} +1 -1
  192. package/lib/dist-custom-elements/{p-a27921ba.js → p-e080ccaa.js} +1 -1
  193. package/lib/dist-custom-elements/{p-49ef7e25.js → p-e2a3c6fa.js} +2 -2
  194. package/lib/dist-custom-elements/{p-064985f6.js → p-e4e40736.js} +2 -2
  195. package/lib/dist-custom-elements/{p-a1863bda.js → p-efa5255b.js} +1 -1
  196. package/lib/dist-custom-elements/{p-db20025e.js → p-f0e99128.js} +8 -8
  197. package/lib/dist-custom-elements/{p-b5a87909.js → p-f2d8763d.js} +2 -2
  198. package/lib/dist-custom-elements/{p-d54ecc52.js → p-f83c1df9.js} +1 -1
  199. package/lib/duet/duet.esm.js +1 -1
  200. package/lib/duet/duet.js +1 -1
  201. package/lib/duet/p-01d38ac9.entry.js +4 -0
  202. package/lib/duet/{p-7ecff545.system.entry.js → p-029f96ec.system.entry.js} +1 -1
  203. package/lib/duet/{p-0c1051da.entry.js → p-03bd5373.entry.js} +1 -1
  204. package/lib/duet/{p-4c812d78.system.entry.js → p-04da22d7.system.entry.js} +1 -1
  205. package/lib/duet/{p-b154ecd8.system.entry.js → p-07d0ed0a.system.entry.js} +1 -1
  206. package/lib/duet/{p-b8705a85.entry.js → p-08693a37.entry.js} +1 -1
  207. package/lib/duet/{p-11749645.system.entry.js → p-097da893.system.entry.js} +1 -1
  208. package/lib/duet/{p-50ce994c.system.entry.js → p-09d4bac7.system.entry.js} +1 -1
  209. package/lib/duet/{p-9c483f1d.system.entry.js → p-0a03a862.system.entry.js} +1 -1
  210. package/lib/duet/{p-0626d8a9.entry.js → p-0a6ff475.entry.js} +1 -1
  211. package/lib/duet/{p-26f3b159.system.entry.js → p-0b752687.system.entry.js} +1 -1
  212. package/lib/duet/{p-0a317f12.entry.js → p-0cdc880e.entry.js} +1 -1
  213. package/lib/duet/{p-6e5abb84.system.entry.js → p-0e165a4e.system.entry.js} +1 -1
  214. package/lib/duet/{p-da5583ea.entry.js → p-0f80e2fc.entry.js} +1 -1
  215. package/lib/duet/{p-f6e2e71a.system.entry.js → p-0fc1b439.system.entry.js} +1 -1
  216. package/lib/duet/{p-49eef496.system.entry.js → p-1028e393.system.entry.js} +1 -1
  217. package/lib/duet/{p-940f11ad.system.entry.js → p-106abf71.system.entry.js} +1 -1
  218. package/lib/duet/{p-67176e9e.entry.js → p-12afe002.entry.js} +1 -1
  219. package/lib/duet/{p-5707ba42.system.entry.js → p-1396c277.system.entry.js} +1 -1
  220. package/lib/duet/p-151892ff.system.entry.js +4 -0
  221. package/lib/duet/{p-830be23d.system.entry.js → p-1677ce5c.system.entry.js} +1 -1
  222. package/lib/duet/{p-336c0409.system.entry.js → p-1a0b0fe9.system.entry.js} +1 -1
  223. package/lib/duet/{p-44268138.system.js → p-1c0453e0.system.js} +1 -1
  224. package/lib/duet/{p-5da36d9e.entry.js → p-1c0a39db.entry.js} +1 -1
  225. package/lib/duet/{p-ca405201.entry.js → p-2125b071.entry.js} +1 -1
  226. package/lib/duet/{p-a3b22a18.entry.js → p-2879b97d.entry.js} +1 -1
  227. package/lib/duet/{p-7a7ef869.entry.js → p-29b9e99e.entry.js} +1 -1
  228. package/lib/duet/{p-1eece5bf.system.entry.js → p-2bc4d34e.system.entry.js} +1 -1
  229. package/lib/duet/p-2c68ee2d.system.entry.js +4 -0
  230. package/lib/duet/{p-e6d1e0be.system.entry.js → p-2d5be93c.system.entry.js} +1 -1
  231. package/lib/duet/{p-4058cee8.entry.js → p-2d71fa26.entry.js} +1 -1
  232. package/lib/duet/{p-d656d96e.system.entry.js → p-32eecc8d.system.entry.js} +1 -1
  233. package/lib/duet/{p-a03c4dcd.system.entry.js → p-344134e5.system.entry.js} +1 -1
  234. package/lib/duet/{p-c9edd0bb.system.entry.js → p-36bca919.system.entry.js} +1 -1
  235. package/lib/duet/{p-a0876e2e.system.entry.js → p-3b1ff9be.system.entry.js} +1 -1
  236. package/lib/duet/{p-2c31977d.entry.js → p-3c88792b.entry.js} +1 -1
  237. package/lib/duet/{p-13540a69.system.entry.js → p-3d6d2012.system.entry.js} +1 -1
  238. package/lib/duet/{p-728c2f13.entry.js → p-3de9ea90.entry.js} +1 -1
  239. package/lib/duet/{p-482497cd.entry.js → p-3e2c87e6.entry.js} +1 -1
  240. package/lib/duet/{p-50df271c.entry.js → p-3e7b62a4.entry.js} +1 -1
  241. package/lib/duet/{p-653eb7ce.system.entry.js → p-401a454b.system.entry.js} +1 -1
  242. package/lib/duet/{p-aa79548d.system.entry.js → p-41a69e48.system.entry.js} +1 -1
  243. package/lib/duet/{p-3d31b17b.system.entry.js → p-42844e9d.system.entry.js} +1 -1
  244. package/lib/duet/{p-f2f60847.entry.js → p-44f22e6b.entry.js} +1 -1
  245. package/lib/duet/{p-0eb4217a.entry.js → p-458dd158.entry.js} +1 -1
  246. package/lib/duet/{p-c2757db1.entry.js → p-45fe4429.entry.js} +1 -1
  247. package/lib/duet/p-4634f44d.entry.js +4 -0
  248. package/lib/duet/{p-51adf63c.system.entry.js → p-466c4910.system.entry.js} +1 -1
  249. package/lib/duet/{p-475d42a8.system.entry.js → p-48ef2786.system.entry.js} +1 -1
  250. package/lib/duet/{p-bdc400cf.entry.js → p-4a4cbba5.entry.js} +1 -1
  251. package/lib/duet/{p-745645b0.entry.js → p-4c1fb962.entry.js} +1 -1
  252. package/lib/duet/{p-8b148f79.system.entry.js → p-4c7fb05f.system.entry.js} +1 -1
  253. package/lib/duet/{p-636e5f15.entry.js → p-4cb43c38.entry.js} +1 -1
  254. package/lib/duet/p-5074accf.entry.js +4 -0
  255. package/lib/duet/{p-81c05491.system.entry.js → p-5573222d.system.entry.js} +1 -1
  256. package/lib/duet/{p-b672280a.entry.js → p-57a26a2a.entry.js} +1 -1
  257. package/lib/duet/{p-a92d4f59.system.entry.js → p-5c17a74a.system.entry.js} +1 -1
  258. package/lib/duet/{p-c6793076.system.entry.js → p-5d15cd89.system.entry.js} +1 -1
  259. package/lib/duet/{p-d6149423.entry.js → p-5e6542bc.entry.js} +1 -1
  260. package/lib/duet/{p-c42f3a40.system.entry.js → p-5f7a2639.system.entry.js} +1 -1
  261. package/lib/duet/{p-83b776f5.system.entry.js → p-613156e6.system.entry.js} +2 -2
  262. package/lib/duet/{p-da4c713c.system.entry.js → p-62a63d5b.system.entry.js} +1 -1
  263. package/lib/duet/{p-4d0d61a7.entry.js → p-6325ae2d.entry.js} +1 -1
  264. package/lib/duet/p-66fbed51.entry.js +4 -0
  265. package/lib/duet/{p-4ec88753.entry.js → p-675f844b.entry.js} +1 -1
  266. package/lib/duet/{p-e66936a4.system.entry.js → p-68ee9bfa.system.entry.js} +1 -1
  267. package/lib/duet/{p-5b17dfea.system.entry.js → p-6a0f118b.system.entry.js} +1 -1
  268. package/lib/duet/{p-d71ba70b.system.entry.js → p-6ba40ef9.system.entry.js} +1 -1
  269. package/lib/duet/{p-5cfb7c71.entry.js → p-6dc868fd.entry.js} +1 -1
  270. package/lib/duet/{p-ffbb062e.system.entry.js → p-6dcce504.system.entry.js} +1 -1
  271. package/lib/duet/{p-955782ae.entry.js → p-70e49d00.entry.js} +1 -1
  272. package/lib/duet/p-752fb0a0.system.entry.js +4 -0
  273. package/lib/duet/{p-3429690e.entry.js → p-75316086.entry.js} +1 -1
  274. package/lib/duet/p-789a9af4.entry.js +4 -0
  275. package/lib/duet/{p-be4bb297.system.entry.js → p-79dd09a6.system.entry.js} +1 -1
  276. package/lib/duet/{p-825fa6d7.entry.js → p-79eb3572.entry.js} +1 -1
  277. package/lib/duet/{p-1f66cbb6.entry.js → p-7b99f674.entry.js} +1 -1
  278. package/lib/duet/{p-587e1ad0.system.js → p-7bab508c.system.js} +1 -1
  279. package/lib/duet/{p-35664bb6.system.entry.js → p-7cf776fa.system.entry.js} +1 -1
  280. package/lib/duet/{p-46e061d9.entry.js → p-7e3e70df.entry.js} +1 -1
  281. package/lib/duet/{p-02fd20f6.system.entry.js → p-7f94280a.system.entry.js} +1 -1
  282. package/lib/duet/p-7fefe439.entry.js +4 -0
  283. package/lib/duet/{p-49c7c6fb.system.entry.js → p-8349ff2d.system.entry.js} +1 -1
  284. package/lib/duet/{p-fbc7ad71.entry.js → p-853ac360.entry.js} +1 -1
  285. package/lib/duet/{p-9f1699dc.system.entry.js → p-8d5edbbe.system.entry.js} +1 -1
  286. package/lib/duet/{p-c192f269.system.entry.js → p-91be047f.system.entry.js} +1 -1
  287. package/lib/duet/{p-7345aff9.system.entry.js → p-92e94229.system.entry.js} +1 -1
  288. package/lib/duet/{p-0ec6a000.entry.js → p-93a2c807.entry.js} +1 -1
  289. package/lib/duet/{p-ce00f1fd.system.entry.js → p-97528238.system.entry.js} +1 -1
  290. package/lib/duet/{p-0bcdec8b.system.entry.js → p-9791ab1b.system.entry.js} +1 -1
  291. package/lib/duet/{p-d24ebe03.system.entry.js → p-97df072f.system.entry.js} +1 -1
  292. package/lib/duet/{p-b731849c.system.entry.js → p-981f2443.system.entry.js} +1 -1
  293. package/lib/duet/{p-af932bca.system.entry.js → p-98777ba0.system.entry.js} +1 -1
  294. package/lib/duet/{p-e078ba11.entry.js → p-991271a2.entry.js} +1 -1
  295. package/lib/duet/{p-14ab7ebe.system.entry.js → p-9916b7d2.system.entry.js} +1 -1
  296. package/lib/duet/{p-02b08c30.entry.js → p-9c127e8f.entry.js} +1 -1
  297. package/lib/duet/p-9ec19751.entry.js +4 -0
  298. package/lib/duet/p-9f81873c.entry.js +4 -0
  299. package/lib/duet/{p-8ab66620.system.entry.js → p-a042bc85.system.entry.js} +2 -2
  300. package/lib/duet/{p-01dc716d.entry.js → p-a1a8395b.entry.js} +1 -1
  301. package/lib/duet/{p-cafb90c2.entry.js → p-a341e9c3.entry.js} +1 -1
  302. package/lib/duet/{p-a74c2dff.entry.js → p-a653bb02.entry.js} +1 -1
  303. package/lib/duet/{p-474bacf0.entry.js → p-a6aba2d3.entry.js} +1 -1
  304. package/lib/duet/{p-628600fa.entry.js → p-a903a315.entry.js} +1 -1
  305. package/lib/duet/{p-8078b081.system.js → p-a9a7d16c.system.js} +1 -1
  306. package/lib/duet/{p-c03df848.entry.js → p-a9d7b38d.entry.js} +1 -1
  307. package/lib/duet/{p-de62f610.system.entry.js → p-afcfc528.system.entry.js} +1 -1
  308. package/lib/duet/{p-8d98f055.entry.js → p-b4ff5c09.entry.js} +1 -1
  309. package/lib/duet/{p-1522db1d.entry.js → p-b90cdb91.entry.js} +1 -1
  310. package/lib/duet/{p-b651d2d1.entry.js → p-bb97ab92.entry.js} +1 -1
  311. package/lib/duet/{p-c9854b35.system.entry.js → p-bef59086.system.entry.js} +1 -1
  312. package/lib/duet/{p-041b483b.entry.js → p-c39467e4.entry.js} +1 -1
  313. package/lib/duet/{p-e4faf457.entry.js → p-c50233e1.entry.js} +1 -1
  314. package/lib/duet/{p-7000ce85.system.entry.js → p-c504d7cd.system.entry.js} +1 -1
  315. package/lib/duet/{p-f3d588ab.entry.js → p-c56dd6d7.entry.js} +1 -1
  316. package/lib/duet/{p-d9ef6f51.system.entry.js → p-c6a321f1.system.entry.js} +1 -1
  317. package/lib/duet/{p-e65709fc.entry.js → p-c94a423f.entry.js} +1 -1
  318. package/lib/duet/{p-c4d8cad0.js → p-cb9787ec.js} +1 -1
  319. package/lib/duet/{p-cc5a3edc.js → p-cca182be.js} +1 -1
  320. package/lib/duet/{p-cdea33d4.entry.js → p-cff8b0b3.entry.js} +1 -1
  321. package/lib/duet/{p-22c2c6d5.system.entry.js → p-d1b6fd73.system.entry.js} +1 -1
  322. package/lib/duet/p-d3bba23f.entry.js +4 -0
  323. package/lib/duet/{p-23ec6f02.entry.js → p-d4d2569e.entry.js} +1 -1
  324. package/lib/duet/{p-cb9991a5.system.entry.js → p-d6196775.system.entry.js} +1 -1
  325. package/lib/duet/{p-d0857e1f.system.js → p-d7e6a4ed.system.js} +1 -1
  326. package/lib/duet/{p-4b457bad.system.entry.js → p-da04e483.system.entry.js} +1 -1
  327. package/lib/duet/{p-420af35d.system.entry.js → p-dc4b4a04.system.entry.js} +1 -1
  328. package/lib/duet/{p-40b5d6b7.entry.js → p-de82bfee.entry.js} +1 -1
  329. package/lib/duet/{p-9c5001ab.entry.js → p-df7481e8.entry.js} +1 -1
  330. package/lib/duet/{p-9d0b30a0.system.entry.js → p-e057d8c4.system.entry.js} +1 -1
  331. package/lib/duet/{p-d20fb807.entry.js → p-e05c4a5b.entry.js} +1 -1
  332. package/lib/duet/{p-56f913f0.system.entry.js → p-e0848924.system.entry.js} +1 -1
  333. package/lib/duet/{p-332dc9a8.entry.js → p-e5d2b68e.entry.js} +1 -1
  334. package/lib/duet/{p-a57772d2.system.entry.js → p-e65bc05f.system.entry.js} +1 -1
  335. package/lib/duet/{p-1eccf55b.system.entry.js → p-e6f92c08.system.entry.js} +1 -1
  336. package/lib/duet/{p-d82963c2.system.entry.js → p-ed16d00b.system.entry.js} +1 -1
  337. package/lib/duet/p-f5a74f01.js +4 -0
  338. package/lib/duet/p-f5fd8e55.entry.js +4 -0
  339. package/lib/duet/{p-9ebea289.entry.js → p-f691d0b6.entry.js} +1 -1
  340. package/lib/duet/{p-55bdc762.entry.js → p-f7fbc435.entry.js} +1 -1
  341. package/lib/duet/{p-e4f417fe.entry.js → p-f8d91f4b.entry.js} +1 -1
  342. package/lib/esm/duet-action-button.entry.js +1 -1
  343. package/lib/esm/duet-alert.entry.js +1 -1
  344. package/lib/esm/duet-badge.entry.js +1 -1
  345. package/lib/esm/duet-breadcrumb.entry.js +1 -1
  346. package/lib/esm/duet-breadcrumbs.entry.js +1 -1
  347. package/lib/esm/duet-button_2.entry.js +1 -1
  348. package/lib/esm/duet-callout.entry.js +5 -2
  349. package/lib/esm/duet-caption_4.entry.js +1 -1
  350. package/lib/esm/duet-card.entry.js +1 -1
  351. package/lib/esm/duet-checkbox.entry.js +1 -1
  352. package/lib/esm/duet-checkmark.entry.js +1 -1
  353. package/lib/esm/duet-choice_2.entry.js +5 -3
  354. package/lib/esm/duet-collapsible.entry.js +2 -2
  355. package/lib/esm/duet-combobox.entry.js +1 -1
  356. package/lib/esm/duet-contact-card.entry.js +1 -1
  357. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  358. package/lib/esm/duet-date-picker.entry.js +2 -2
  359. package/lib/esm/duet-divider_2.entry.js +1 -1
  360. package/lib/esm/duet-editable-table_3.entry.js +12 -4
  361. package/lib/esm/duet-empty-state.entry.js +1 -1
  362. package/lib/esm/duet-fieldset.entry.js +1 -1
  363. package/lib/esm/duet-footer.entry.js +1 -1
  364. package/lib/esm/duet-grid_2.entry.js +2 -2
  365. package/lib/esm/duet-header_2.entry.js +2 -2
  366. package/lib/esm/duet-hero.entry.js +4 -3
  367. package/lib/esm/duet-icon.entry.js +1 -1
  368. package/lib/esm/duet-input_2.entry.js +1 -1
  369. package/lib/esm/duet-layout.entry.js +1 -1
  370. package/lib/esm/duet-list_2.entry.js +1 -1
  371. package/lib/esm/duet-menu-bar-button.entry.js +2 -2
  372. package/lib/esm/duet-menu-bar-dropdown-link.entry.js +1 -1
  373. package/lib/esm/duet-menu-bar-dropdown.entry.js +2 -2
  374. package/lib/esm/duet-menu-bar-link.entry.js +2 -2
  375. package/lib/esm/duet-menu-bar.entry.js +2 -2
  376. package/lib/esm/duet-modal.entry.js +2 -2
  377. package/lib/esm/duet-multiselect.entry.js +1 -1
  378. package/lib/esm/duet-nav.entry.js +1 -1
  379. package/lib/esm/duet-notification_2.entry.js +1 -1
  380. package/lib/esm/duet-number-input.entry.js +1 -1
  381. package/lib/esm/duet-page-heading.entry.js +1 -1
  382. package/lib/esm/duet-pagination_2.entry.js +1 -1
  383. package/lib/esm/duet-progress.entry.js +1 -1
  384. package/lib/esm/duet-radio_2.entry.js +1 -1
  385. package/lib/esm/duet-range-slider.entry.js +1 -1
  386. package/lib/esm/duet-scrollable_3.entry.js +1 -1
  387. package/lib/esm/duet-section-layout.entry.js +1 -1
  388. package/lib/esm/duet-select.entry.js +1 -1
  389. package/lib/esm/duet-slideout-lang.entry.js +1 -1
  390. package/lib/esm/duet-slideout-link.entry.js +1 -1
  391. package/lib/esm/duet-slideout-panel-dropdown.entry.js +1 -1
  392. package/lib/esm/duet-slideout-panel.entry.js +2 -2
  393. package/lib/esm/duet-slideout.entry.js +2 -2
  394. package/lib/esm/duet-step_2.entry.js +1 -1
  395. package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +1 -1
  396. package/lib/esm/duet-submenu-bar-dropdown.entry.js +2 -2
  397. package/lib/esm/duet-submenu-bar-link.entry.js +2 -2
  398. package/lib/esm/duet-submenu-bar.entry.js +2 -2
  399. package/lib/esm/duet-textarea.entry.js +1 -1
  400. package/lib/esm/duet-toggle.entry.js +1 -1
  401. package/lib/esm/duet-toolbar-dropdown-link.entry.js +1 -1
  402. package/lib/esm/duet-toolbar-dropdown.entry.js +1 -1
  403. package/lib/esm/duet-toolbar-link.entry.js +1 -1
  404. package/lib/esm/duet-toolbar.entry.js +1 -1
  405. package/lib/esm/duet-tooltip.entry.js +1220 -48
  406. package/lib/esm/duet-tray.entry.js +1 -1
  407. package/lib/esm/duet-upload-aria-status.entry.js +1 -1
  408. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  409. package/lib/esm/duet.js +3 -3
  410. package/lib/esm/{focus-utils-b482bcb1.js → focus-utils-1e6af8c1.js} +1 -1
  411. package/lib/esm/{index-5a68b13e.js → index-77de1d56.js} +1 -1
  412. package/lib/esm/loader.js +3 -3
  413. package/lib/{dist-custom-elements/p-c4d8cad0.js → esm/tokens-20d688dc.js} +1 -1
  414. package/lib/esm-es5/duet-action-button.entry.js +1 -1
  415. package/lib/esm-es5/duet-alert.entry.js +1 -1
  416. package/lib/esm-es5/duet-badge.entry.js +1 -1
  417. package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
  418. package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
  419. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  420. package/lib/esm-es5/duet-callout.entry.js +1 -1
  421. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  422. package/lib/esm-es5/duet-card.entry.js +1 -1
  423. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  424. package/lib/esm-es5/duet-checkmark.entry.js +1 -1
  425. package/lib/esm-es5/duet-choice_2.entry.js +1 -1
  426. package/lib/esm-es5/duet-collapsible.entry.js +1 -1
  427. package/lib/esm-es5/duet-combobox.entry.js +1 -1
  428. package/lib/esm-es5/duet-contact-card.entry.js +1 -1
  429. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  430. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  431. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  432. package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
  433. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  434. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  435. package/lib/esm-es5/duet-footer.entry.js +1 -1
  436. package/lib/esm-es5/duet-grid_2.entry.js +1 -1
  437. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  438. package/lib/esm-es5/duet-hero.entry.js +1 -1
  439. package/lib/esm-es5/duet-icon.entry.js +1 -1
  440. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  441. package/lib/esm-es5/duet-layout.entry.js +1 -1
  442. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  443. package/lib/esm-es5/duet-menu-bar-button.entry.js +1 -1
  444. package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
  445. package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +1 -1
  446. package/lib/esm-es5/duet-menu-bar-link.entry.js +1 -1
  447. package/lib/esm-es5/duet-menu-bar.entry.js +1 -1
  448. package/lib/esm-es5/duet-modal.entry.js +1 -1
  449. package/lib/esm-es5/duet-multiselect.entry.js +1 -1
  450. package/lib/esm-es5/duet-nav.entry.js +1 -1
  451. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  452. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  453. package/lib/esm-es5/duet-page-heading.entry.js +1 -1
  454. package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
  455. package/lib/esm-es5/duet-progress.entry.js +1 -1
  456. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  457. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  458. package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
  459. package/lib/esm-es5/duet-section-layout.entry.js +1 -1
  460. package/lib/esm-es5/duet-select.entry.js +1 -1
  461. package/lib/esm-es5/duet-slideout-lang.entry.js +1 -1
  462. package/lib/esm-es5/duet-slideout-link.entry.js +1 -1
  463. package/lib/esm-es5/duet-slideout-panel-dropdown.entry.js +1 -1
  464. package/lib/esm-es5/duet-slideout-panel.entry.js +1 -1
  465. package/lib/esm-es5/duet-slideout.entry.js +2 -2
  466. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  467. package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
  468. package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
  469. package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
  470. package/lib/esm-es5/duet-submenu-bar.entry.js +1 -1
  471. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  472. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  473. package/lib/esm-es5/duet-toolbar-dropdown-link.entry.js +1 -1
  474. package/lib/esm-es5/duet-toolbar-dropdown.entry.js +1 -1
  475. package/lib/esm-es5/duet-toolbar-link.entry.js +1 -1
  476. package/lib/esm-es5/duet-toolbar.entry.js +1 -1
  477. package/lib/esm-es5/duet-tooltip.entry.js +2 -2
  478. package/lib/esm-es5/duet-tray.entry.js +1 -1
  479. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  480. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  481. package/lib/esm-es5/duet.js +1 -1
  482. package/lib/esm-es5/{focus-utils-b482bcb1.js → focus-utils-1e6af8c1.js} +1 -1
  483. package/lib/esm-es5/{index-5a68b13e.js → index-77de1d56.js} +1 -1
  484. package/lib/esm-es5/loader.js +1 -1
  485. package/lib/esm-es5/{tokens-0963dc8b.js → tokens-20d688dc.js} +1 -1
  486. package/lib/types/components/duet-callout/duet-callout.d.ts +2 -0
  487. package/lib/types/components/duet-hero/duet-hero.d.ts +2 -0
  488. package/lib/types/components/duet-tooltip/duet-tooltip.d.ts +8 -7
  489. package/lib/types/components/duet-upload/duet-upload.d.ts +1 -1
  490. package/lib/types/components.d.ts +2 -2
  491. package/package.json +6 -5
  492. package/lib/dist-custom-elements/p-98c77c8d.js +0 -272
  493. package/lib/duet/p-2b1f8599.system.entry.js +0 -4
  494. package/lib/duet/p-3877d445.entry.js +0 -4
  495. package/lib/duet/p-42e60321.entry.js +0 -4
  496. package/lib/duet/p-4af2f77a.entry.js +0 -4
  497. package/lib/duet/p-60912840.entry.js +0 -4
  498. package/lib/duet/p-624d38a3.system.entry.js +0 -4
  499. package/lib/duet/p-673a6c11.entry.js +0 -4
  500. package/lib/duet/p-793dcfc2.js +0 -4
  501. package/lib/duet/p-95eb41b3.system.entry.js +0 -4
  502. package/lib/duet/p-a7953c81.entry.js +0 -4
  503. package/lib/duet/p-b1ae5c07.entry.js +0 -4
  504. package/lib/duet/p-b89cad4d.entry.js +0 -4
  505. package/lib/duet/p-bf4ceb06.entry.js +0 -4
  506. package/lib/duet/p-d5f65552.entry.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 o(e){try{s(i.next(e))}catch(t){n(t)}}function l(e){try{s(i["throw"](e))}catch(t){n(t)}}function s(e){e.done?a(e.value):r(e.value).then(o,l)}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,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(e){return function(t){return s([e,t])}}function s(l){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,l[0]&&(a=0)),a)try{if(i=1,r&&(n=l[0]&2?r["return"]:l[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,l[1])).done)return n;if(r=0,n)l=[l[0]&2,n.value];switch(l[0]){case 0:case 1:n=l;break;case 4:a.label++;return{value:l[1],done:false};case 5:a.label++;r=l[1];l=[0];continue;case 7:l=a.ops.pop();a.trys.pop();continue;default:if(!(n=a.trys,n=n.length>0&&n[n.length-1])&&(l[0]===6||l[0]===2)){a=0;continue}if(l[0]===3&&(!n||l[1]>n[0]&&l[1]<n[3])){a.label=l[1];break}if(l[0]===6&&a.label<n[1]){a.label=n[1];n=l;break}if(n&&a.label<n[2]){a.label=n[2];a.ops.push(l);break}if(n[2])a.ops.pop();a.trys.pop();continue}l=t.call(e,a)}catch(s){l=[6,s];r=0}finally{i=n=0}if(l[0]&5)throw l[1];return{value:l[0]?l[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,F as Fragment}from"./index-5a68b13e.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 getLanguage,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver,a as getLocaleString,s as sanitizeString}from"./language-utils-6be16ff0.js";import{p as sizeNavigation,s as sizeHeader}from"./tokens.module-5601adc9.js";import{b as breakpointTokensUpTo,a as breakpointToToken}from"./token-utils-5f4f3897.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.hasHeadSlotFirst=false;this.hasHeadSlotLast=false;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,o=e.key;t.duetTableToggle.emit({sort_order:i,index:n,direction:r,key:o,component:"duet-editable-table",originalEvent:a})};this.handleKeyDown=function(e,a){if(isKeyboardClick(a)){t.toggleColumn(e,a)}};this.language=getLanguage();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;this.hideHeadVisually=false}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.hasHeadSlotFirst=!!this.element.querySelector("[slot='thead-first']");this.hasHeadSlotLast=!!this.element.querySelector("[slot='thead-last']")};e.prototype.connectedCallback=function(){connectLanguageChangeObserver(this)};e.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this)};e.prototype.createLabel=function(e){var t=this;var a=e.sort_order,i=e.direction,r=e.index,n=e.label;var o=getLocaleString(n);if(!this.sortable){return o}var l=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:l(),"icon-size":"medium-small","accessible-label":this.sortableDefaultLabel[this.language],variation:"plain",margin:"none","icon-right":true,onClick:function(a){return t.toggleColumn(e,a)},onKeyDown:function(a){return t.handleKeyDown(e,a)}},o))};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,this.actionColumnLabel[this.language])))};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(e.actionDescription||""," ").concat(getLocaleString(i.label)," ")})})))};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,"hide-head-visually":this.hideHeadVisually},h("table",{role:this.accessibleRole},h("caption",null,h("slot",{name:"tcaption"})),h("thead",null,this.hasHeadSlotFirst&&h("tr",null,h("td",{class:"duet-editable-table-actions-menu",colSpan:99},h("slot",{name:"thead-first"}))),this.renderTableHeader(),this.hasHeadSlotLast&&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=breakpointTokensUpTo.includes(t.breakpoint)?!e.matches:e.matches};this.matchesBreakpoint=true;this.language=getLanguage();this.theme=undefined;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.hideHeadVisually=false}e.prototype.watchLanguageStateHandler=function(e,t){var a=this;if(e!==t){setTimeout((function(){return a.copyHeadingsToCells()}),50)}};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;connectLanguageChangeObserver(this)};e.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true;disconnectLanguageChangeObserver(this)};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});Object.defineProperty(e,"watchers",{get:function(){return{language:["watchLanguageStateHandler"]}},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 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 UploadItem=function(e){var t=e.data,a=e.showLinks,i=e.type,r=e.actions,n=e.errorCodes,o=e.theme,l=e.label,s=e.categoryLabel,d=e.showCategory;var u=t.uid,p=t.item,c=t.size,f=t.uploaded,b=t.url,m=t.meta,g=t.progress,y=t.error;var v=p.name;var x=function(){switch(i){case"inprogress":return h("span",{class:"duet-upload-item-name"},h("duet-paragraph",{class:"duet-upload-item-name",color:"gray-darker",margin:"none",weight:"semi-bold"},h("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),h("duet-spacer",{size:"xx-small",direction:"horizontal"}),v),h("duet-progress",{progress:Math.ceil(g),"aria-hidden":true}));case"pending":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"}),v);case"failure":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"}),v),h("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},getI18nError(y.type,n)));default:return f&&b&&a?h("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},h("duet-link",{url:b,external:true},k),h("duet-spacer",{size:"xx-small",direction:"horizontal"}),w):h("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},k,h("duet-spacer",{size:"xx-small",direction:"horizontal"}),w)}};var k=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"}),v);var w=h("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",formatBytes(c),")");var L=m&&m.badges?h("span",null,m.badges.map((function(e){return h("duet-badge",{color:"primary"},e)}))):undefined;var I="".concat(m&&m.badges?m.badges.join(","):""," ").concat(v);return h("div",{class:{"upload-item-row":true}},d&&h("div",{class:"item-categories"},h("duet-heading",{class:"heading",color:"color-secondary",level:"h6",weight:"semibold"},getLocaleString(s)),L),h("div",{class:{"item-name":true,"no-category":!d}},!!l&&h("duet-heading",{class:"heading",color:"color-secondary",level:"h6",weight:"semibold"},getLocaleString(l)),x()),h("div",{class:"item-actions"},r.map((function(e){return h("duet-action-button",{actionMeta:Object.assign({},m||{}),actionId:u||null,actionName:e.name,theme:o,iconName:e.icon,iconColor:e.color,iconSize:e.size,background:e.background,"accessible-label":"".concat(I," ").concat(getLocaleString(e.label)," ")})}))))};var UploadItemHeader=function(e){var t=e.label,a=e.categoryLabel;return h("div",{class:"items-header"},a&&h("duet-heading",{class:"category-header",border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none"},getLocaleString(a)),h("duet-heading",{class:{"filename-header":true,"no-category":!a},border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none"},getLocaleString(t)))};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 o=false;var l=getError("default",a);if(e){var s=e.name,d=e.type,u=e.size;var h=validateFileMime(d,i);var p=r==="all"||r===""||r===" "||r===undefined?true:validateFileExtension(s.toLowerCase(),r);var c=validateFileSize(u,n);if(!h){l=getError("duet-upload-101",a)}if(!p){l=getError("duet-upload-100",a)}if(!c){l=getError("duet-upload-201",a)}o=h&&p&&c}else{o=false}return{valid:o,errorMessage:o?undefined:getLocaleString(l.message),errorSystem:o?undefined:l.system_message,errorType:o?undefined:l.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 o=a.type,l=o===void 0?"POST":o,s=a.xhr,d=a.uri,u=a.argument,h=u===void 0?null:u,p=a.headers,c=p===void 0?null:p;s.open(l,"".concat(d).concat(h||""),true);var f=t.data,b=t.name;if(c){Object.keys(c).forEach((function(e){s.setRequestHeader(e,c[e])}))}if(l==="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}::slotted([slot=uploadfooter]){margin-top:20px}.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-paragraph::part(duet-paragraph){word-break:break-word}duet-editable-table tfoot{display:none}.upload-bottom-caption{margin-top:12px;margin-bottom:28px}.items-header{display:none;flex-direction:row;margin-bottom:0}@media (min-width: 36em){.items-header{display:flex}}.items-header:not(:last-child),.items-header:not(:first-child){margin-top:12px}.items-header .category-header{width:35%}.items-header .filename-header{width:65%}.items-header .filename-header.no-category{width:100%}.upload-item-row{display:flex;flex-direction:column;gap:16px;align-content:center;align-items:center;padding:16px 0 16px 0;border-bottom:1px solid rgb(225, 227, 230)}@media (min-width: 36em){.upload-item-row{flex-direction:row;gap:10px}}.upload-item-row .item-categories{width:100%}@media (min-width: 36em){.upload-item-row .item-categories{width:35%}}.upload-item-row .item-name{position:relative;bottom:2px;width:100%;text-align:left}@media (min-width: 36em){.upload-item-row .item-name{width:50%}.upload-item-row .item-name.no-category{width:85%}}.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:block}@media (min-width: 36em){.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:none}}.upload-item-row .item-actions{width:100%;margin-left:-8px;text-align:left}@media (min-width: 36em){.upload-item-row .item-actions{width:15%;padding-top:0;margin-left:auto;text-align:right}}.upload-item-row .duet-upload-item-name duet-icon{position:relative;top:4px}.upload-item-row .duet-upload-item-name duet-progress{display:block;margin-top:16px}";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.categoryLabel={en:"Category",sv:"Filtyp",fi:"Tiedostotyyppi"};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.mapFilesToUploadItems=function(e,a,i){if(a===t.DefaultGroups.success){return h(UploadItem,{theme:t.theme,actions:t.getActions(a),type:"success",data:e,showLinks:t.showLinks,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:i})}else if(a===t.DefaultGroups.inprogress){return h(UploadItem,{theme:t.theme,actions:t.getActions(a),type:"inprogress",data:e,showLinks:t.showLinks,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:i})}else if(a===t.DefaultGroups.pending){return h(UploadItem,{theme:t.theme,actions:t.getActions(a),type:"pending",data:e,showLinks:t.showLinks,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:i})}else if(a===t.DefaultGroups.failure){return h(UploadItem,{theme:t.theme,actions:t.getActions(a),type:"failure",data:e,showLinks:t.showLinks,errorCodes:t.errorCodes,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:i})}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);if(t.external&&a!=="url"){t.trackProgress(e,a==="uploaded")}}catch(o){}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(o){switch(o.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)}o.label=1;case 1:o.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=o.sent();o.label=3;case 3:return[3,5];case 4:n=o.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],o=r[1];if(o.uid===e){return{value:o,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=[];var o=false;e.forEach((function(e){var l=t.getGroupFromItemData(e);if(e.meta&&!!e.meta.badges){o=true}if(l===t.DefaultGroups.success){n.push({uid:e.uid,data:e})}else if(l===t.DefaultGroups.inprogress){a.push({uid:e.uid,data:e})}else if(l===t.DefaultGroups.pending){r.push({uid:e.uid,data:e})}else if(l===t.DefaultGroups.failure){i.push({uid:e.uid,data:e})}else if(e.group){a.push({uid:e.uid,data:e})}}));return{pending:r,failure:i,success:n,inprogress:a,hasCategory:o}};this.getActions=function(e){return t.actions.filter((function(t){return t.map.includes(e)}))};this.renderUploadedItems=function(){var e=t.filterMap();var a=e.hasCategory;var i=t.groups.map((function(i){var r=e[i.id];if(!(r===null||r===void 0?void 0:r.length)){return}return h(Fragment,null,!t.hideGroups&&h(UploadItemHeader,{categoryLabel:a?t.categoryLabel:undefined,label:i.label}),r.map((function(e){return t.mapFilesToUploadItems(e.data,i.id,a)})))}));return h(Fragment,null,t.showUploadedItemsHeader&&h(UploadItemHeader,{categoryLabel:a?t.categoryLabel:undefined,label:t.uploadedItemsHeaderLabel}),i)};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.externalUploadButtonId=undefined;this.captionOnBottom=false;this.showUploadedItemsHeader=false;this.uploadedItemsHeaderLabel={fi:"Ladattu tiedosto",sv:"Lägg till en bilaga",en:"Uploaded file"};this.hideHeader=false;this.groups=[{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"}},{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}}]}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();this.externalUploadButton=document.querySelector("#".concat(this.externalUploadButtonId))};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(", "));if(this.externalUploadButton){this.externalUploadButton.ariaLabel=r}return h(Host,{class:{"duet-m-0":this.margin==="none"}},h("duet-fieldset",{"label-hidden":this.hideHeader,label:this.label,caption:!this.captionOnBottom?r:undefined},h("slot",{name:"header"}),!this.files.size&&h("duet-empty-state",{id:this.labelId,part:this.identifier?"".concat(this.identifier,"-empty-state"):"duet-upload-empty-state",icon:"messaging-attachment"},h("duet-paragraph",{margin:"none"},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.renderUploadedItems(),!!this.files.size&&h("slot",{name:"filefooter"}),h("slot",{name:"uploadfooter"}),this.captionOnBottom&&h("duet-caption",{margin:"none",size:"small"},h("div",{class:"upload-bottom-caption"},r)),h("slot",{name:"afterfooter"}),!this.hideButton&&h(Fragment,null,h("duet-spacer",{size:"large"}),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)),(this.fileMaxReached||this.bytesMaxReached)&&h(Fragment,null,h("duet-spacer",{size:"medium"}),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-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,o,l,s,d,u,h,p,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];o=validateFile(n,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),l=o.valid,s=o.errorMessage,d=o.errorType,u=o.errorSystem;h=this.genHashName();p={uid:h,item:n,size:n.size,meta:this.metaData,uploaded:false,valid:l,error:{type:l?undefined:d,message:l?undefined:s,system_message:l?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(n.name,p);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(!(l&&!this.external))return[3,5];return[4,this.uploadFile(p)];case 4:m.sent();return[3,6];case 5:if(l&&this.external){this.updateValueInMap(p.item.name,"pending",true,false);this.updateValueInMap(p.item.name,"group","pending",true)}else if(!l){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,F as Fragment}from"./index-77de1d56.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 getLanguage,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver,a as getLocaleString,s as sanitizeString}from"./language-utils-6be16ff0.js";import{p as sizeNavigation,s as sizeHeader}from"./tokens.module-5601adc9.js";import{b as breakpointTokensUpTo,a as breakpointToToken}from"./token-utils-5f4f3897.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.hasHeadSlotFirst=false;this.hasHeadSlotLast=false;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,o=e.key;t.duetTableToggle.emit({sort_order:i,index:n,direction:r,key:o,component:"duet-editable-table",originalEvent:a})};this.handleKeyDown=function(e,a){if(isKeyboardClick(a)){t.toggleColumn(e,a)}};this.language=getLanguage();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;this.hideHeadVisually=false}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.hasHeadSlotFirst=!!this.element.querySelector("[slot='thead-first']");this.hasHeadSlotLast=!!this.element.querySelector("[slot='thead-last']")};e.prototype.connectedCallback=function(){connectLanguageChangeObserver(this)};e.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this)};e.prototype.createLabel=function(e){var t=this;var a=e.sort_order,i=e.direction,r=e.index,n=e.label;var o=getLocaleString(n);if(!this.sortable){return o}var l=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:l(),"icon-size":"medium-small","accessible-label":this.sortableDefaultLabel[this.language],variation:"plain",margin:"none","icon-right":true,onClick:function(a){return t.toggleColumn(e,a)},onKeyDown:function(a){return t.handleKeyDown(e,a)}},o))};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,this.actionColumnLabel[this.language])))};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(e.actionDescription||""," ").concat(getLocaleString(i.label)," ")})})))};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,"hide-head-visually":this.hideHeadVisually},h("table",{role:this.accessibleRole},h("caption",null,h("slot",{name:"tcaption"})),h("thead",null,this.hasHeadSlotFirst&&h("tr",null,h("td",{class:"duet-editable-table-actions-menu",colSpan:99},h("slot",{name:"thead-first"}))),this.renderTableHeader(),this.hasHeadSlotLast&&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=breakpointTokensUpTo.includes(t.breakpoint)?!e.matches:e.matches};this.matchesBreakpoint=true;this.language=getLanguage();this.theme=undefined;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.hideHeadVisually=false}e.prototype.watchLanguageStateHandler=function(e,t){var a=this;if(e!==t){setTimeout((function(){return a.copyHeadingsToCells()}),50)}};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;connectLanguageChangeObserver(this)};e.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true;disconnectLanguageChangeObserver(this)};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});Object.defineProperty(e,"watchers",{get:function(){return{language:["watchLanguageStateHandler"]}},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 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 fileUploadingInfo={fi:"Tiedosto latautuu",sv:"Filen laddas upp",en:"File is uploading"};var UploadItem=function(e){var t=e.data,a=e.showLinks,i=e.type,r=e.actions,n=e.errorCodes,o=e.theme,l=e.label,s=e.categoryLabel,d=e.showCategory;var u=t.uid,p=t.item,c=t.size,f=t.uploaded,b=t.url,m=t.meta,g=t.progress,y=t.error;var v=p.name;var x=function(){switch(i){case"inprogress":return h("span",{class:"duet-upload-item-name",role:"status"},h("duet-paragraph",{class:"duet-upload-item-name",color:"gray-darker",margin:"none",weight:"semi-bold"},h("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),h("duet-spacer",{size:"xx-small",direction:"horizontal"}),v),h("visually-hidden",null,h("duet-paragraph",null,getLocaleString(fileUploadingInfo))),h("duet-progress",{progress:Math.ceil(g),"aria-hidden":true}));case"pending":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"}),v);case"failure":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"}),v),h("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},getI18nError(y.type,n)));default:return f&&b&&a?h("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},h("duet-link",{url:b,external:true},k),h("duet-spacer",{size:"xx-small",direction:"horizontal"}),w):h("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},k,h("duet-spacer",{size:"xx-small",direction:"horizontal"}),w)}};var k=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"}),v);var w=h("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",formatBytes(c),")");var L=m&&m.badges?h("span",null,m.badges.map((function(e){return h("duet-badge",{color:"primary"},e)}))):undefined;var I="".concat(m&&m.badges?m.badges.join(","):""," ").concat(v);return h("div",{class:{"upload-item-row":true}},d&&h("div",{class:"item-categories"},h("duet-heading",{class:"heading",color:"color-secondary",level:"h6",weight:"semibold"},getLocaleString(s)),L),h("div",{class:{"item-name":true,"no-category":!d}},!!l&&h("duet-heading",{class:"heading",color:"color-secondary",level:"h6",weight:"semibold"},getLocaleString(l)),x()),h("div",{class:"item-actions"},r.map((function(e){return h("duet-action-button",{actionMeta:Object.assign({},m||{}),actionId:u||null,actionName:e.name,theme:o,iconName:e.icon,iconColor:e.color,iconSize:e.size,background:e.background,"accessible-label":"".concat(I," ").concat(getLocaleString(e.label)," "),accessibleTitle:false})}))))};var UploadItemHeader=function(e){var t=e.label,a=e.categoryLabel;return h("div",{class:"items-header"},a&&h("duet-heading",{class:"category-header",border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none"},getLocaleString(a)),h("duet-heading",{class:{"filename-header":true,"no-category":!a},border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none"},getLocaleString(t)))};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 o=false;var l=getError("default",a);if(e){var s=e.name,d=e.type,u=e.size;var h=validateFileMime(d,i);var p=r==="all"||r===""||r===" "||r===undefined?true:validateFileExtension(s.toLowerCase(),r);var c=validateFileSize(u,n);if(!h){l=getError("duet-upload-101",a)}if(!p){l=getError("duet-upload-100",a)}if(!c){l=getError("duet-upload-201",a)}o=h&&p&&c}else{o=false}return{valid:o,errorMessage:o?undefined:getLocaleString(l.message),errorSystem:o?undefined:l.system_message,errorType:o?undefined:l.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 o=a.type,l=o===void 0?"POST":o,s=a.xhr,d=a.uri,u=a.argument,h=u===void 0?null:u,p=a.headers,c=p===void 0?null:p;s.open(l,"".concat(d).concat(h||""),true);var f=t.data,b=t.name;if(c){Object.keys(c).forEach((function(e){s.setRequestHeader(e,c[e])}))}if(l==="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}::slotted([slot=uploadfooter]){margin-top:20px}.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-paragraph::part(duet-paragraph){word-break:break-word}duet-editable-table tfoot{display:none}.upload-bottom-caption{margin-top:12px;margin-bottom:28px}.items-header{display:none;flex-direction:row;margin-bottom:0}@media (min-width: 36em){.items-header{display:flex}}.items-header:not(:last-child),.items-header:not(:first-child){margin-top:12px}.items-header .category-header{width:35%}.items-header .filename-header{width:65%}.items-header .filename-header.no-category{width:100%}.upload-item-row{display:flex;flex-direction:column;gap:16px;align-content:center;align-items:center;padding:16px 0 16px 0;border-bottom:1px solid rgb(225, 227, 230)}@media (min-width: 36em){.upload-item-row{flex-direction:row;gap:10px}}.upload-item-row .item-categories{width:100%}@media (min-width: 36em){.upload-item-row .item-categories{width:35%}}.upload-item-row .item-name{position:relative;bottom:2px;width:100%;text-align:left}@media (min-width: 36em){.upload-item-row .item-name{width:50%}.upload-item-row .item-name.no-category{width:85%}}.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:block}@media (min-width: 36em){.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:none}}.upload-item-row .item-actions{width:100%;margin-left:-8px;text-align:left}@media (min-width: 36em){.upload-item-row .item-actions{width:15%;padding-top:0;margin-left:auto;text-align:right}}.upload-item-row .duet-upload-item-name duet-icon{position:relative;top:4px}.upload-item-row .duet-upload-item-name duet-progress{display:block;margin-top:16px}";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.categoryLabel={en:"Category",sv:"Filtyp",fi:"Tiedostotyyppi"};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.mapFilesToUploadItems=function(e,a,i){if(a===t.DefaultGroups.success){return h(UploadItem,{theme:t.theme,actions:t.getActions(a),type:"success",data:e,showLinks:t.showLinks,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:i})}else if(a===t.DefaultGroups.inprogress){return h(UploadItem,{theme:t.theme,actions:t.getActions(a),type:"inprogress",data:e,showLinks:t.showLinks,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:i})}else if(a===t.DefaultGroups.pending){return h(UploadItem,{theme:t.theme,actions:t.getActions(a),type:"pending",data:e,showLinks:t.showLinks,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:i})}else if(a===t.DefaultGroups.failure){return h(UploadItem,{theme:t.theme,actions:t.getActions(a),type:"failure",data:e,showLinks:t.showLinks,errorCodes:t.errorCodes,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:i})}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);if(t.external&&a!=="url"){t.trackProgress(e,a==="uploaded")}}catch(o){}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(o){switch(o.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)}o.label=1;case 1:o.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=o.sent();o.label=3;case 3:return[3,5];case 4:n=o.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],o=r[1];if(o.uid===e){return{value:o,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=[];var o=false;e.forEach((function(e){var l=t.getGroupFromItemData(e);if(e.meta&&!!e.meta.badges){o=true}if(l===t.DefaultGroups.success){n.push({uid:e.uid,data:e})}else if(l===t.DefaultGroups.inprogress){a.push({uid:e.uid,data:e})}else if(l===t.DefaultGroups.pending){r.push({uid:e.uid,data:e})}else if(l===t.DefaultGroups.failure){i.push({uid:e.uid,data:e})}else if(e.group){a.push({uid:e.uid,data:e})}}));return{pending:r,failure:i,success:n,inprogress:a,hasCategory:o}};this.getActions=function(e){return t.actions.filter((function(t){return t.map.includes(e)}))};this.renderUploadedItems=function(){var e=t.filterMap();var a=e.hasCategory;var i=t.groups.map((function(i){var r=e[i.id];if(!(r===null||r===void 0?void 0:r.length)){return}return h(Fragment,null,!t.hideGroups&&h(UploadItemHeader,{categoryLabel:a?t.categoryLabel:undefined,label:i.label}),r.map((function(e){return t.mapFilesToUploadItems(e.data,i.id,a)})))}));return h(Fragment,null,t.showUploadedItemsHeader&&h(UploadItemHeader,{categoryLabel:a?t.categoryLabel:undefined,label:t.uploadedItemsHeaderLabel}),i)};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:"Lataus valmis, {filesUploaded} tiedostoa ladattu 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.externalUploadButtonId=undefined;this.captionOnBottom=false;this.showUploadedItemsHeader=false;this.uploadedItemsHeaderLabel={fi:"Ladattu tiedosto",sv:"Lägg till en bilaga",en:"Uploaded file"};this.hideHeader=false;this.groups=[{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"}},{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}}]}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();this.externalUploadButton=document.querySelector("#".concat(this.externalUploadButtonId))};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(", "));if(this.externalUploadButton){this.externalUploadButton.ariaLabel=r}return h(Host,{class:{"duet-m-0":this.margin==="none"}},h("duet-fieldset",{"label-hidden":this.hideHeader,label:this.label,caption:!this.captionOnBottom?r:undefined},h("slot",{name:"header"}),!this.files.size&&h("duet-empty-state",{id:this.labelId,part:this.identifier?"".concat(this.identifier,"-empty-state"):"duet-upload-empty-state",icon:"messaging-attachment"},h("duet-paragraph",{margin:"none"},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.renderUploadedItems(),!!this.files.size&&h("slot",{name:"filefooter"}),h("slot",{name:"uploadfooter"}),this.captionOnBottom&&h("duet-caption",{margin:"none",size:"small"},h("div",{class:"upload-bottom-caption"},r)),h("slot",{name:"afterfooter"}),!this.hideButton&&h(Fragment,null,h("duet-spacer",{size:"large"}),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)),(this.fileMaxReached||this.bytesMaxReached)&&h(Fragment,null,h("duet-spacer",{size:"medium"}),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-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,o,l,s,d,u,h,p,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];o=validateFile(n,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),l=o.valid,s=o.errorMessage,d=o.errorType,u=o.errorSystem;h=this.genHashName();p={uid:h,item:n,size:n.size,meta:this.metaData,uploaded:false,valid:l,error:{type:l?undefined:d,message:l?undefined:s,system_message:l?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(n.name,p);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(!(l&&!this.external))return[3,5];return[4,this.uploadFile(p)];case 4:m.sent();return[3,6];case 5:if(l&&this.external){this.updateValueInMap(p.item.name,"pending",true,false);this.updateValueInMap(p.item.name,"group","pending",true)}else if(!l){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-5a68b13e.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-77de1d56.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-5a68b13e.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.accessibleLiveError="polite";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":this.labelId,"aria-describedby":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":this.accessibleLiveError,"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-77de1d56.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.accessibleLiveError="polite";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":this.labelId,"aria-describedby":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":this.accessibleLiveError,"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
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-5a68b13e.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};
4
+ */import{r as registerInstance,c as createEvent$1,h,F as Fragment,g as getElement}from"./index-77de1d56.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,e,i,r){function d(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,n){function a(t){try{m(r.next(t))}catch(e){n(e)}}function o(t){try{m(r["throw"](t))}catch(e){n(e)}}function m(t){t.done?i(t.value):d(t.value).then(a,o)}m((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,d,n,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(e){return m([t,e])}}function m(o){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(i=0)),i)try{if(r=1,d&&(n=o[0]&2?d["return"]:o[0]?d["throw"]||((n=d["return"])&&n.call(d),0):d.next)&&!(n=n.call(d,o[1])).done)return n;if(d=0,n)o=[o[0]&2,n.value];switch(o[0]){case 0:case 1:n=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;d=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!n||o[1]>n[0]&&o[1]<n[3])){i.label=o[1];break}if(o[0]===6&&i.label<n[1]){i.label=n[1];n=o;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(o);break}if(n[2])i.ops.pop();i.trys.pop();continue}o=e.call(t,i)}catch(m){o=[6,m];d=0}finally{r=n=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-5a68b13e.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}.duet-grid-breakpoint-x-small.duet-grid-row-reverse.sc-duet-grid-h{flex-direction:row-reverse !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}.duet-grid-breakpoint-small.duet-grid-row-reverse.sc-duet-grid-h{flex-direction:row-reverse !important}}@media (min-width: 48em){.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:row !important}.duet-grid-breakpoint-medium.duet-grid-row-reverse.sc-duet-grid-h{flex-direction:row-reverse !important}}@media (min-width: 62em){.duet-grid-breakpoint-large.sc-duet-grid-h{flex-direction:row !important}.duet-grid-breakpoint-large.duet-grid-row-reverse.sc-duet-grid-h{flex-direction:row-reverse !important}}@media (min-width: 64.0625em){.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:row !important}.duet-grid-breakpoint-x-large.duet-grid-row-reverse.sc-duet-grid-h{flex-direction:row-reverse !important}}.duet-grid-wrap.sc-duet-grid-h{flex-wrap:wrap !important}.duet-no-stacking.sc-duet-grid-h{flex-direction:row !important}.duet-no-stacking.duet-grid-row-reverse.sc-duet-grid-h{flex-direction:row-reverse !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.rowReverse=false;this.alignment="top";this.distribution="default";this.mobile=""}t.prototype.outerHeight=function(t){var e=t.offsetHeight,i=window.getComputedStyle(t);return["top","bottom"].map((function(t){return parseInt(i["margin-".concat(t)])})).reduce((function(t,e){return t+e}),e)};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;var i=this;return __generator(this,(function(r){t=this.element;this.distributeFormElement=this.alignment==="form_distribute";this.mutationO=watchForOptions(t,"duet-grid-item",(function(){i.updateGridItems()}));if(this.distributeFormElement){this.mutation1=watchForElement(t,"duet-input",(function(){i.updateGridItemsWithInputFields()}));for(e=0;e<this.mql.length;e++){if(this.mql[e].addEventListener){this.mql[e].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 e=this;return __generator(this,(function(i){t=Array.from(this.element.children).filter(isGridItem);t.forEach((function(t){t.responsive=e.responsive;t.breakpoint=e.breakpoint;t.direction=e.direction}));return[2]}))}))};t.prototype.updateGridItemsWithInputFields=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,r;var d=this;return __generator(this,(function(n){t=Array.from(this.element.children).filter(isGridItem);e=window?window.getComputedStyle(this.element).flexDirection==="column":false;i=0;r=[];t.forEach((function(t){var e=t.querySelector("span.duet-input-error");var i=e?d.outerHeight(e):0;r.push(i)}));i=Math.max.apply(Math,r);t.forEach((function(t){var r=t.querySelector("span.duet-input-error");var n=r?d.outerHeight(r):0;if(n<i&&!e){t.setAttribute("style","padding-bottom: ".concat(i-n,"px;"))}else if(n===i||e){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","duet-grid-row-reverse":this.rowReverse}})};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"],direction:["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)}.duet-grid-direction-horizontal.sc-duet-grid-item-h:first-child,.duet-grid-direction-horizontal.sc-duet-grid-item-h:first-of-type{padding-left:0}.duet-grid-direction-horizontal.sc-duet-grid-item-h:last-child,.duet-grid-direction-horizontal.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.direction="horizontal";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-direction-horizontal":this.direction==="horizontal","duet-grid-direction-vertical":this.direction==="vertical","duet-grid-item-br-x-small":this.breakpoint==="x-small","duet-grid-item-br-small":this.breakpoint==="small","duet-grid-item-br-medium":this.breakpoint==="medium","duet-grid-item-br-large":this.breakpoint==="large","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-77de1d56.js";import{a as media_query_large,m as media_query_medium,b as media_query_small}from"./tokens-20d688dc.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}.duet-grid-breakpoint-x-small.duet-grid-row-reverse.sc-duet-grid-h{flex-direction:row-reverse !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}.duet-grid-breakpoint-small.duet-grid-row-reverse.sc-duet-grid-h{flex-direction:row-reverse !important}}@media (min-width: 48em){.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:row !important}.duet-grid-breakpoint-medium.duet-grid-row-reverse.sc-duet-grid-h{flex-direction:row-reverse !important}}@media (min-width: 62em){.duet-grid-breakpoint-large.sc-duet-grid-h{flex-direction:row !important}.duet-grid-breakpoint-large.duet-grid-row-reverse.sc-duet-grid-h{flex-direction:row-reverse !important}}@media (min-width: 64.0625em){.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:row !important}.duet-grid-breakpoint-x-large.duet-grid-row-reverse.sc-duet-grid-h{flex-direction:row-reverse !important}}.duet-grid-wrap.sc-duet-grid-h{flex-wrap:wrap !important}.duet-no-stacking.sc-duet-grid-h{flex-direction:row !important}.duet-no-stacking.duet-grid-row-reverse.sc-duet-grid-h{flex-direction:row-reverse !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.rowReverse=false;this.alignment="top";this.distribution="default";this.mobile=""}t.prototype.outerHeight=function(t){var e=t.offsetHeight,i=window.getComputedStyle(t);return["top","bottom"].map((function(t){return parseInt(i["margin-".concat(t)])})).reduce((function(t,e){return t+e}),e)};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;var i=this;return __generator(this,(function(r){t=this.element;this.distributeFormElement=this.alignment==="form_distribute";this.mutationO=watchForOptions(t,"duet-grid-item",(function(){i.updateGridItems()}));if(this.distributeFormElement){this.mutation1=watchForElement(t,"duet-input",(function(){i.updateGridItemsWithInputFields()}));for(e=0;e<this.mql.length;e++){if(this.mql[e].addEventListener){this.mql[e].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 e=this;return __generator(this,(function(i){t=Array.from(this.element.children).filter(isGridItem);t.forEach((function(t){t.responsive=e.responsive;t.breakpoint=e.breakpoint;t.direction=e.direction}));return[2]}))}))};t.prototype.updateGridItemsWithInputFields=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,r;var d=this;return __generator(this,(function(n){t=Array.from(this.element.children).filter(isGridItem);e=window?window.getComputedStyle(this.element).flexDirection==="column":false;i=0;r=[];t.forEach((function(t){var e=t.querySelector("span.duet-input-error");var i=e?d.outerHeight(e):0;r.push(i)}));i=Math.max.apply(Math,r);t.forEach((function(t){var r=t.querySelector("span.duet-input-error");var n=r?d.outerHeight(r):0;if(n<i&&!e){t.setAttribute("style","padding-bottom: ".concat(i-n,"px;"))}else if(n===i||e){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","duet-grid-row-reverse":this.rowReverse}})};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"],direction:["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)}.duet-grid-direction-horizontal.sc-duet-grid-item-h:first-child,.duet-grid-direction-horizontal.sc-duet-grid-item-h:first-of-type{padding-left:0}.duet-grid-direction-horizontal.sc-duet-grid-item-h:last-child,.duet-grid-direction-horizontal.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.direction="horizontal";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-direction-horizontal":this.direction==="horizontal","duet-grid-direction-vertical":this.direction==="vertical","duet-grid-item-br-x-small":this.breakpoint==="x-small","duet-grid-item-br-small":this.breakpoint==="small","duet-grid-item-br-medium":this.breakpoint==="medium","duet-grid-item-br-large":this.breakpoint==="large","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};