@duetds/components 8.4.2 → 8.4.3

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 (585) hide show
  1. package/hydrate/index.js +80 -26
  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-banner.cjs.entry.js +2 -2
  6. package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
  7. package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
  8. package/lib/cjs/duet-button_2.cjs.entry.js +1 -1
  9. package/lib/cjs/duet-callout.cjs.entry.js +1 -1
  10. package/lib/cjs/duet-caption_4.cjs.entry.js +1 -1
  11. package/lib/cjs/duet-card.cjs.entry.js +1 -1
  12. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  13. package/lib/cjs/duet-checkmark.cjs.entry.js +1 -1
  14. package/lib/cjs/duet-chip.cjs.entry.js +1 -1
  15. package/lib/cjs/duet-choice_2.cjs.entry.js +2 -2
  16. package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
  17. package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
  18. package/lib/cjs/duet-contact-card.cjs.entry.js +1 -1
  19. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  20. package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
  21. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  22. package/lib/cjs/duet-editable-table_3.cjs.entry.js +11 -6
  23. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  24. package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
  25. package/lib/cjs/duet-file-chooser.cjs.entry.js +1 -1
  26. package/lib/cjs/duet-footer.cjs.entry.js +1 -1
  27. package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
  28. package/lib/cjs/duet-header_2.cjs.entry.js +2 -2
  29. package/lib/cjs/duet-hero.cjs.entry.js +1 -1
  30. package/lib/cjs/duet-icon.cjs.entry.js +1 -1
  31. package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
  32. package/lib/cjs/duet-layout.cjs.entry.js +1 -1
  33. package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
  34. package/lib/cjs/duet-menu-bar-button.cjs.entry.js +1 -1
  35. package/lib/cjs/duet-menu-bar-dropdown-link.cjs.entry.js +1 -1
  36. package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +1 -1
  37. package/lib/cjs/duet-menu-bar-item.cjs.entry.js +1 -1
  38. package/lib/cjs/duet-menu-bar-link.cjs.entry.js +1 -1
  39. package/lib/cjs/duet-menu-bar.cjs.entry.js +1 -1
  40. package/lib/cjs/duet-modal.cjs.entry.js +3 -3
  41. package/lib/cjs/duet-multiselect.cjs.entry.js +1 -1
  42. package/lib/cjs/duet-nav.cjs.entry.js +1 -1
  43. package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
  44. package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
  45. package/lib/cjs/duet-page-heading.cjs.entry.js +1 -1
  46. package/lib/cjs/duet-pagination_2.cjs.entry.js +1 -1
  47. package/lib/cjs/duet-popup-menu-item.cjs.entry.js +1 -1
  48. package/lib/cjs/duet-popup-menu.cjs.entry.js +3 -3
  49. package/lib/cjs/duet-progress.cjs.entry.js +1 -1
  50. package/lib/cjs/duet-promo-card.cjs.entry.js +1 -1
  51. package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
  52. package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
  53. package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
  54. package/lib/cjs/duet-section-layout.cjs.entry.js +1 -1
  55. package/lib/cjs/duet-select.cjs.entry.js +1 -1
  56. package/lib/cjs/duet-shaped-image.cjs.entry.js +1 -1
  57. package/lib/cjs/duet-show-more.cjs.entry.js +1 -1
  58. package/lib/cjs/duet-slideout-lang.cjs.entry.js +1 -1
  59. package/lib/cjs/duet-slideout-link.cjs.entry.js +1 -1
  60. package/lib/cjs/duet-slideout-panel-dropdown.cjs.entry.js +1 -1
  61. package/lib/cjs/duet-slideout-panel.cjs.entry.js +2 -2
  62. package/lib/cjs/duet-slideout.cjs.entry.js +3 -3
  63. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  64. package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +1 -1
  65. package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +1 -1
  66. package/lib/cjs/duet-submenu-bar-item.cjs.entry.js +1 -1
  67. package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +1 -1
  68. package/lib/cjs/duet-submenu-bar.cjs.entry.js +2 -2
  69. package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
  70. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  71. package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +1 -1
  72. package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +1 -1
  73. package/lib/cjs/duet-toolbar-item.cjs.entry.js +1 -1
  74. package/lib/cjs/duet-toolbar-link.cjs.entry.js +1 -1
  75. package/lib/cjs/duet-toolbar.cjs.entry.js +1 -1
  76. package/lib/cjs/duet-tooltip-button_2.cjs.entry.js +2 -2
  77. package/lib/cjs/duet-tooltip.cjs.entry.js +2 -2
  78. package/lib/cjs/duet-tray.cjs.entry.js +1 -1
  79. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
  80. package/lib/cjs/duet-upload-item.cjs.entry.js +9 -2
  81. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  82. package/lib/cjs/duet.cjs.js +2 -2
  83. package/lib/cjs/{floating-ui.dom.esm-a7d59d53.js → floating-ui.dom.esm-91f66430.js} +60 -20
  84. package/lib/cjs/{focus-utils-c103ab0a.js → focus-utils-a8f819a3.js} +1 -1
  85. package/lib/cjs/{index-7fe97a5d.js → index-cb4d7840.js} +1 -1
  86. package/lib/cjs/loader.cjs.js +2 -2
  87. package/lib/collection/collection-manifest.json +1 -1
  88. package/lib/collection/components/duet-banner/duet-banner.css +26 -0
  89. package/lib/collection/components/duet-upload/duet-upload.js +34 -4
  90. package/lib/collection/components/duet-upload-item/duet-upload-item.js +30 -2
  91. package/lib/dist-custom-elements/duet-action-button.js +1 -1
  92. package/lib/dist-custom-elements/duet-alert.js +1 -1
  93. package/lib/dist-custom-elements/duet-badge.js +1 -1
  94. package/lib/dist-custom-elements/duet-banner.js +5 -5
  95. package/lib/dist-custom-elements/duet-breadcrumb.js +3 -3
  96. package/lib/dist-custom-elements/duet-breadcrumbs.js +1 -1
  97. package/lib/dist-custom-elements/duet-button.js +1 -1
  98. package/lib/dist-custom-elements/duet-callout.js +2 -2
  99. package/lib/dist-custom-elements/duet-caption.js +1 -1
  100. package/lib/dist-custom-elements/duet-card.js +3 -3
  101. package/lib/dist-custom-elements/duet-checkbox.js +1 -1
  102. package/lib/dist-custom-elements/duet-checkmark.js +1 -1
  103. package/lib/dist-custom-elements/duet-chip.js +2 -2
  104. package/lib/dist-custom-elements/duet-choice-group.js +8 -8
  105. package/lib/dist-custom-elements/duet-choice.js +6 -6
  106. package/lib/dist-custom-elements/duet-collapsible.js +2 -2
  107. package/lib/dist-custom-elements/duet-combobox.js +3 -3
  108. package/lib/dist-custom-elements/duet-contact-card.js +8 -8
  109. package/lib/dist-custom-elements/duet-cookie-consent.js +6 -6
  110. package/lib/dist-custom-elements/duet-date-picker.js +14 -14
  111. package/lib/dist-custom-elements/duet-divider.js +1 -1
  112. package/lib/dist-custom-elements/duet-editable-table.js +8 -8
  113. package/lib/dist-custom-elements/duet-empty-state.js +1 -1
  114. package/lib/dist-custom-elements/duet-fieldset.js +1 -1
  115. package/lib/dist-custom-elements/duet-file-chooser.js +2 -2
  116. package/lib/dist-custom-elements/duet-footer.js +4 -4
  117. package/lib/dist-custom-elements/duet-grid-item.js +1 -1
  118. package/lib/dist-custom-elements/duet-grid.js +1 -1
  119. package/lib/dist-custom-elements/duet-header.js +10 -10
  120. package/lib/dist-custom-elements/duet-heading.js +1 -1
  121. package/lib/dist-custom-elements/duet-hero.js +9 -9
  122. package/lib/dist-custom-elements/duet-icon.js +1 -1
  123. package/lib/dist-custom-elements/duet-input.js +1 -1
  124. package/lib/dist-custom-elements/duet-label.js +1 -1
  125. package/lib/dist-custom-elements/duet-layout.js +1 -1
  126. package/lib/dist-custom-elements/duet-link.js +1 -1
  127. package/lib/dist-custom-elements/duet-list-item.js +1 -1
  128. package/lib/dist-custom-elements/duet-list.js +1 -1
  129. package/lib/dist-custom-elements/duet-logo.js +1 -1
  130. package/lib/dist-custom-elements/duet-menu-bar-button.js +2 -2
  131. package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +2 -2
  132. package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +2 -2
  133. package/lib/dist-custom-elements/duet-menu-bar-item.js +2 -2
  134. package/lib/dist-custom-elements/duet-menu-bar-link.js +2 -2
  135. package/lib/dist-custom-elements/duet-menu-bar.js +2 -2
  136. package/lib/dist-custom-elements/duet-modal.js +9 -9
  137. package/lib/dist-custom-elements/duet-multiselect.js +9 -9
  138. package/lib/dist-custom-elements/duet-nav.js +1 -1
  139. package/lib/dist-custom-elements/duet-notification-drawer.js +4 -4
  140. package/lib/dist-custom-elements/duet-notification.js +2 -2
  141. package/lib/dist-custom-elements/duet-number-input.js +11 -11
  142. package/lib/dist-custom-elements/duet-page-heading.js +2 -2
  143. package/lib/dist-custom-elements/duet-pagination.js +13 -13
  144. package/lib/dist-custom-elements/duet-paragraph.js +1 -1
  145. package/lib/dist-custom-elements/duet-popup-menu-item.js +2 -2
  146. package/lib/dist-custom-elements/duet-popup-menu.js +3 -3
  147. package/lib/dist-custom-elements/duet-progress.js +1 -1
  148. package/lib/dist-custom-elements/duet-promo-card.js +3 -3
  149. package/lib/dist-custom-elements/duet-radio-group.js +8 -8
  150. package/lib/dist-custom-elements/duet-radio.js +1 -1
  151. package/lib/dist-custom-elements/duet-range-slider.js +2 -2
  152. package/lib/dist-custom-elements/duet-range-stepper.js +4 -4
  153. package/lib/dist-custom-elements/duet-scrollable.js +1 -1
  154. package/lib/dist-custom-elements/duet-section-layout.js +1 -1
  155. package/lib/dist-custom-elements/duet-select.js +1 -1
  156. package/lib/dist-custom-elements/duet-shaped-image.js +1 -1
  157. package/lib/dist-custom-elements/duet-show-more.js +5 -5
  158. package/lib/dist-custom-elements/duet-slideout-lang.js +2 -2
  159. package/lib/dist-custom-elements/duet-slideout-link.js +2 -2
  160. package/lib/dist-custom-elements/duet-slideout-panel-dropdown.js +2 -2
  161. package/lib/dist-custom-elements/duet-slideout-panel.js +3 -3
  162. package/lib/dist-custom-elements/duet-slideout.js +4 -4
  163. package/lib/dist-custom-elements/duet-spacer.js +1 -1
  164. package/lib/dist-custom-elements/duet-spinner.js +1 -1
  165. package/lib/dist-custom-elements/duet-step.js +4 -4
  166. package/lib/dist-custom-elements/duet-stepper.js +2 -2
  167. package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +2 -2
  168. package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +2 -2
  169. package/lib/dist-custom-elements/duet-submenu-bar-item.js +2 -2
  170. package/lib/dist-custom-elements/duet-submenu-bar-link.js +2 -2
  171. package/lib/dist-custom-elements/duet-submenu-bar.js +3 -3
  172. package/lib/dist-custom-elements/duet-tab-group.js +13 -13
  173. package/lib/dist-custom-elements/duet-tab.js +1 -1
  174. package/lib/dist-custom-elements/duet-table.js +1 -1
  175. package/lib/dist-custom-elements/duet-textarea.js +10 -10
  176. package/lib/dist-custom-elements/duet-toggle.js +2 -2
  177. package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +2 -2
  178. package/lib/dist-custom-elements/duet-toolbar-dropdown.js +2 -2
  179. package/lib/dist-custom-elements/duet-toolbar-item.js +2 -2
  180. package/lib/dist-custom-elements/duet-toolbar-link.js +2 -2
  181. package/lib/dist-custom-elements/duet-toolbar.js +1 -1
  182. package/lib/dist-custom-elements/duet-tooltip-button.js +1 -1
  183. package/lib/dist-custom-elements/duet-tooltip-popup.js +1 -1
  184. package/lib/dist-custom-elements/duet-tooltip.js +1 -1
  185. package/lib/dist-custom-elements/duet-tray.js +3 -3
  186. package/lib/dist-custom-elements/duet-upload-aria-status.js +1 -1
  187. package/lib/dist-custom-elements/duet-upload-item.js +1 -1
  188. package/lib/dist-custom-elements/duet-upload.js +30 -23
  189. package/lib/dist-custom-elements/duet-visually-hidden.js +1 -1
  190. package/lib/dist-custom-elements/index.js +1 -1
  191. package/lib/dist-custom-elements/{p-61c2577e.js → p-010b0059.js} +3 -3
  192. package/lib/dist-custom-elements/{p-131d995f.js → p-04a28e53.js} +1 -1
  193. package/lib/dist-custom-elements/{p-f1f23dbd.js → p-09ac88f3.js} +4 -4
  194. package/lib/dist-custom-elements/{p-50ce213d.js → p-101df5e0.js} +2 -2
  195. package/lib/dist-custom-elements/{p-00c8a755.js → p-11e152cd.js} +60 -20
  196. package/lib/dist-custom-elements/{p-a48934c3.js → p-2103fc77.js} +1 -1
  197. package/lib/dist-custom-elements/{p-47e5367a.js → p-22530bf0.js} +1 -1
  198. package/lib/dist-custom-elements/{p-7e7a0c10.js → p-252800e5.js} +1 -1
  199. package/lib/dist-custom-elements/{p-6686826d.js → p-29282584.js} +1 -1
  200. package/lib/dist-custom-elements/{p-a15329e0.js → p-34f86ab2.js} +1 -1
  201. package/lib/dist-custom-elements/{p-e052b3b5.js → p-3a2a46d4.js} +2 -2
  202. package/lib/dist-custom-elements/{p-f5c39ead.js → p-3da9e71c.js} +5 -5
  203. package/lib/dist-custom-elements/{p-d4663c7c.js → p-3e7280f6.js} +8 -8
  204. package/lib/dist-custom-elements/{p-15c6804a.js → p-3fa35111.js} +2 -2
  205. package/lib/dist-custom-elements/{p-57761460.js → p-44cdc06d.js} +1 -1
  206. package/lib/dist-custom-elements/{p-eef66341.js → p-4bd749d9.js} +1 -1
  207. package/lib/dist-custom-elements/{p-2a308935.js → p-4da748b2.js} +1 -1
  208. package/lib/dist-custom-elements/{p-fa23b7fe.js → p-613dba69.js} +4 -4
  209. package/lib/dist-custom-elements/{p-2996bc9b.js → p-6a2c4e3a.js} +6 -6
  210. package/lib/dist-custom-elements/{p-d84e09c9.js → p-8af17456.js} +1 -1
  211. package/lib/dist-custom-elements/{p-c1c9234e.js → p-8d2fe91f.js} +10 -10
  212. package/lib/dist-custom-elements/{p-33a89c97.js → p-9b8fa220.js} +2 -2
  213. package/lib/dist-custom-elements/{p-45f0a5c5.js → p-a225fccd.js} +5 -5
  214. package/lib/dist-custom-elements/{p-601b571c.js → p-b7f8263a.js} +2 -2
  215. package/lib/dist-custom-elements/{p-3e696237.js → p-bb06c3ac.js} +1 -1
  216. package/lib/dist-custom-elements/{p-0d9a20d2.js → p-c5d64549.js} +19 -11
  217. package/lib/dist-custom-elements/{p-1364c672.js → p-c7343af9.js} +1 -1
  218. package/lib/dist-custom-elements/{p-9b65c21f.js → p-c7bbc1bd.js} +1 -1
  219. package/lib/dist-custom-elements/{p-12eef2ad.js → p-c8659f64.js} +1 -1
  220. package/lib/dist-custom-elements/{p-4f04ad3e.js → p-cd25ec2f.js} +1 -1
  221. package/lib/dist-custom-elements/{p-0a2e2799.js → p-d0cf13fd.js} +1 -1
  222. package/lib/dist-custom-elements/{p-a0fb1ecb.js → p-d940c692.js} +1 -1
  223. package/lib/dist-custom-elements/{p-177cbf72.js → p-d9f82ff4.js} +1 -1
  224. package/lib/dist-custom-elements/{p-59846fe0.js → p-e6920cf3.js} +2 -2
  225. package/lib/dist-custom-elements/{p-5b729ba0.js → p-ea4b4bbb.js} +1 -1
  226. package/lib/dist-custom-elements/{p-a41e92cd.js → p-f79a36ee.js} +1 -1
  227. package/lib/duet/duet.esm.js +1 -1
  228. package/lib/duet/duet.js +1 -1
  229. package/lib/duet/{p-e3f76452.entry.js → p-01a3e3f8.entry.js} +1 -1
  230. package/lib/duet/{p-d9f35a79.entry.js → p-01bf6506.entry.js} +1 -1
  231. package/lib/duet/{p-3134bfb1.system.entry.js → p-02833fe6.system.entry.js} +1 -1
  232. package/lib/duet/{p-dd11d532.system.entry.js → p-029e0713.system.entry.js} +1 -1
  233. package/lib/duet/{p-9f23897e.system.entry.js → p-04e058bc.system.entry.js} +1 -1
  234. package/lib/duet/{p-c0580b3f.system.entry.js → p-0806aac6.system.entry.js} +1 -1
  235. package/lib/duet/{p-3d1e8d07.system.entry.js → p-091d343c.system.entry.js} +1 -1
  236. package/lib/duet/{p-0571c7df.system.entry.js → p-098dcfbc.system.entry.js} +1 -1
  237. package/lib/duet/{p-ab0a3192.entry.js → p-0995d4db.entry.js} +1 -1
  238. package/lib/duet/{p-04d81b55.entry.js → p-0ad0dc08.entry.js} +1 -1
  239. package/lib/duet/{p-9da0ed12.system.entry.js → p-0b80e74d.system.entry.js} +1 -1
  240. package/lib/duet/{p-436828cd.entry.js → p-0cfba791.entry.js} +1 -1
  241. package/lib/duet/{p-96783b15.system.entry.js → p-0f33db5a.system.entry.js} +1 -1
  242. package/lib/duet/{p-deff3c18.entry.js → p-0f9796d8.entry.js} +1 -1
  243. package/lib/duet/p-11e152cd.js +4 -0
  244. package/lib/duet/{p-937a64ee.system.entry.js → p-142fffe3.system.entry.js} +1 -1
  245. package/lib/duet/{p-5a9a1c76.entry.js → p-16669185.entry.js} +1 -1
  246. package/lib/duet/{p-4afeea09.system.entry.js → p-17130b15.system.entry.js} +1 -1
  247. package/lib/duet/{p-f64f4ff8.system.entry.js → p-18b21092.system.entry.js} +1 -1
  248. package/lib/duet/{p-fe3a3989.entry.js → p-19348034.entry.js} +1 -1
  249. package/lib/duet/{p-fc353103.system.entry.js → p-1a2ff25f.system.entry.js} +1 -1
  250. package/lib/duet/{p-757451ff.system.entry.js → p-1b32fc71.system.entry.js} +1 -1
  251. package/lib/duet/{p-24c2902b.entry.js → p-1bf2c055.entry.js} +1 -1
  252. package/lib/duet/{p-936894c4.entry.js → p-1d7f59a7.entry.js} +1 -1
  253. package/lib/duet/{p-b0d5f427.system.entry.js → p-1e3a9599.system.entry.js} +1 -1
  254. package/lib/duet/{p-70e8e2e8.entry.js → p-205c1d86.entry.js} +1 -1
  255. package/lib/duet/{p-321f5636.system.entry.js → p-22d2d468.system.entry.js} +1 -1
  256. package/lib/duet/{p-738c2982.entry.js → p-2765967c.entry.js} +1 -1
  257. package/lib/duet/{p-22d72786.system.entry.js → p-29d5a763.system.entry.js} +1 -1
  258. package/lib/duet/{p-1d44acfe.entry.js → p-29e18bae.entry.js} +1 -1
  259. package/lib/duet/{p-49e02a59.system.entry.js → p-2a594105.system.entry.js} +1 -1
  260. package/lib/duet/{p-fe6d6541.entry.js → p-2bfe2f51.entry.js} +1 -1
  261. package/lib/duet/{p-ff58fdad.system.entry.js → p-2c1f79ac.system.entry.js} +1 -1
  262. package/lib/duet/{p-12597683.system.entry.js → p-2e53172a.system.entry.js} +1 -1
  263. package/lib/duet/{p-c46b15ea.entry.js → p-2f82c4d4.entry.js} +1 -1
  264. package/lib/duet/{p-2d679611.entry.js → p-30a6959f.entry.js} +1 -1
  265. package/lib/duet/{p-ff73f982.system.entry.js → p-31322a2c.system.entry.js} +1 -1
  266. package/lib/duet/{p-01cb4eba.entry.js → p-3266adc5.entry.js} +1 -1
  267. package/lib/duet/p-34eeb826.entry.js +4 -0
  268. package/lib/duet/{p-65b7afbd.system.entry.js → p-3736f46a.system.entry.js} +1 -1
  269. package/lib/duet/{p-846f6107.entry.js → p-389ec8d1.entry.js} +1 -1
  270. package/lib/duet/{p-95575931.entry.js → p-39b31261.entry.js} +1 -1
  271. package/lib/duet/{p-c57afc88.entry.js → p-3a93f309.entry.js} +1 -1
  272. package/lib/duet/{p-a8da4509.system.entry.js → p-3b930917.system.entry.js} +1 -1
  273. package/lib/duet/{p-407a1728.entry.js → p-3c47cc95.entry.js} +1 -1
  274. package/lib/duet/{p-10221818.system.entry.js → p-3d74d9ba.system.entry.js} +1 -1
  275. package/lib/duet/{p-dc234b3a.entry.js → p-3e86fc2f.entry.js} +1 -1
  276. package/lib/duet/{p-c1788410.entry.js → p-4128d086.entry.js} +1 -1
  277. package/lib/duet/{p-c0f44540.entry.js → p-41faac57.entry.js} +1 -1
  278. package/lib/duet/{p-78e5a38c.system.entry.js → p-4219a6cc.system.entry.js} +1 -1
  279. package/lib/duet/{p-cd03ee1c.entry.js → p-44dd3f6b.entry.js} +1 -1
  280. package/lib/duet/{p-69535738.system.entry.js → p-46efd28d.system.entry.js} +1 -1
  281. package/lib/duet/{p-cfc901c8.entry.js → p-473f2aeb.entry.js} +1 -1
  282. package/lib/duet/{p-798d2be8.entry.js → p-4999bd59.entry.js} +1 -1
  283. package/lib/duet/{p-2f75a831.system.entry.js → p-4dc1f780.system.entry.js} +1 -1
  284. package/lib/duet/{p-72fd7bb2.entry.js → p-4e22efae.entry.js} +1 -1
  285. package/lib/duet/{p-71fa6c5f.entry.js → p-4ebf7879.entry.js} +1 -1
  286. package/lib/duet/{p-f7681856.system.entry.js → p-51f24687.system.entry.js} +1 -1
  287. package/lib/duet/{p-b2387806.entry.js → p-543bc859.entry.js} +1 -1
  288. package/lib/duet/{p-4f40d4b7.system.entry.js → p-56c12a47.system.entry.js} +1 -1
  289. package/lib/duet/{p-9d2d5bb7.entry.js → p-57a3bf19.entry.js} +1 -1
  290. package/lib/duet/p-580aed81.system.entry.js +4 -0
  291. package/lib/duet/{p-4aada7ef.system.entry.js → p-5e396e57.system.entry.js} +1 -1
  292. package/lib/duet/{p-551e05af.system.entry.js → p-5ea4fe7b.system.entry.js} +1 -1
  293. package/lib/duet/{p-7a62a25c.system.entry.js → p-611fc71b.system.entry.js} +1 -1
  294. package/lib/duet/{p-da7f4cbf.system.entry.js → p-660c33d4.system.entry.js} +1 -1
  295. package/lib/duet/{p-66811869.system.entry.js → p-665cd245.system.entry.js} +1 -1
  296. package/lib/duet/{p-64d1ea6b.entry.js → p-67af148d.entry.js} +1 -1
  297. package/lib/duet/{p-f99a14a4.system.entry.js → p-682cc430.system.entry.js} +1 -1
  298. package/lib/duet/{p-fce3d5cc.system.entry.js → p-6aaaa6e6.system.entry.js} +1 -1
  299. package/lib/duet/{p-08e002f8.entry.js → p-6b9228dd.entry.js} +1 -1
  300. package/lib/duet/{p-1cf9481d.entry.js → p-71fc3743.entry.js} +1 -1
  301. package/lib/duet/{p-ddd516cc.entry.js → p-720b866c.entry.js} +1 -1
  302. package/lib/duet/{p-5935bb9e.system.entry.js → p-76d99102.system.entry.js} +1 -1
  303. package/lib/duet/{p-428adef7.system.entry.js → p-778af8b7.system.entry.js} +1 -1
  304. package/lib/duet/{p-42473291.system.entry.js → p-7a79672d.system.entry.js} +2 -2
  305. package/lib/duet/{p-0dfacf89.entry.js → p-7ac66521.entry.js} +1 -1
  306. package/lib/duet/{p-4fe29741.entry.js → p-7ad16b5f.entry.js} +1 -1
  307. package/lib/duet/{p-3c42ae99.system.entry.js → p-7b220ee3.system.entry.js} +1 -1
  308. package/lib/duet/{p-b40bceab.system.entry.js → p-7df9ed1a.system.entry.js} +1 -1
  309. package/lib/duet/{p-2fd350b6.entry.js → p-7e7d991d.entry.js} +1 -1
  310. package/lib/duet/{p-18a5ed57.entry.js → p-80ab419c.entry.js} +1 -1
  311. package/lib/duet/{p-f9932852.entry.js → p-81a240d4.entry.js} +1 -1
  312. package/lib/duet/{p-addd5e7e.system.entry.js → p-83d69e66.system.entry.js} +2 -2
  313. package/lib/duet/{p-c9ab053d.entry.js → p-841e2acc.entry.js} +1 -1
  314. package/lib/duet/{p-3a63e778.entry.js → p-849e68d1.entry.js} +1 -1
  315. package/lib/duet/{p-89ff1726.entry.js → p-85695c74.entry.js} +1 -1
  316. package/lib/duet/{p-50559904.system.entry.js → p-8606a8a4.system.entry.js} +1 -1
  317. package/lib/duet/{p-596fd1f4.entry.js → p-876f9b62.entry.js} +1 -1
  318. package/lib/duet/{p-f5414759.system.entry.js → p-8814dca5.system.entry.js} +1 -1
  319. package/lib/duet/{p-851a2197.system.entry.js → p-88f72255.system.entry.js} +1 -1
  320. package/lib/duet/{p-70192242.system.entry.js → p-88f9880c.system.entry.js} +1 -1
  321. package/lib/duet/{p-5a031276.entry.js → p-89beef33.entry.js} +1 -1
  322. package/lib/duet/{p-187e0e31.entry.js → p-8ad68512.entry.js} +1 -1
  323. package/lib/duet/{p-c34022cb.entry.js → p-8c6521c9.entry.js} +1 -1
  324. package/lib/duet/{p-a58f1913.system.entry.js → p-8cf21e97.system.entry.js} +1 -1
  325. package/lib/duet/{p-7a98a43c.entry.js → p-904b6f63.entry.js} +1 -1
  326. package/lib/duet/{p-0e015dcc.system.entry.js → p-916c05c0.system.entry.js} +1 -1
  327. package/lib/duet/{p-b685de1e.js → p-93872497.js} +1 -1
  328. package/lib/duet/{p-17a52ca1.entry.js → p-97574cd9.entry.js} +1 -1
  329. package/lib/duet/{p-3611d8db.entry.js → p-977832d7.entry.js} +1 -1
  330. package/lib/duet/{p-48a63ce5.system.entry.js → p-98f8ad8c.system.entry.js} +1 -1
  331. package/lib/duet/{p-a45fe7ea.system.entry.js → p-99528b33.system.entry.js} +1 -1
  332. package/lib/duet/{p-301fda37.entry.js → p-9bfa5c62.entry.js} +1 -1
  333. package/lib/duet/p-9ce7e4da.entry.js +4 -0
  334. package/lib/duet/{p-62d011ba.entry.js → p-9d3ff1f9.entry.js} +1 -1
  335. package/lib/duet/{p-0b31f281.entry.js → p-9dd9783c.entry.js} +1 -1
  336. package/lib/duet/{p-93e1f5f7.entry.js → p-9fa80a0d.entry.js} +1 -1
  337. package/lib/duet/{p-b46eaf22.system.entry.js → p-9ff8f713.system.entry.js} +1 -1
  338. package/lib/duet/{p-bba08afa.entry.js → p-a25a5bda.entry.js} +1 -1
  339. package/lib/duet/{p-4557d28f.entry.js → p-a7e7dc8e.entry.js} +1 -1
  340. package/lib/duet/{p-7de032fc.system.entry.js → p-a82cd36e.system.entry.js} +1 -1
  341. package/lib/duet/{p-99b0e6bb.system.entry.js → p-a8b99baa.system.entry.js} +1 -1
  342. package/lib/duet/{p-02064d40.entry.js → p-aaa9d7f0.entry.js} +1 -1
  343. package/lib/duet/{p-ffb8996b.system.js → p-ae31c909.system.js} +1 -1
  344. package/lib/duet/{p-b671985e.entry.js → p-afa55acc.entry.js} +1 -1
  345. package/lib/duet/{p-ea0114b0.system.entry.js → p-b6168b5a.system.entry.js} +1 -1
  346. package/lib/duet/{p-2ba2a50c.system.entry.js → p-b9678b20.system.entry.js} +1 -1
  347. package/lib/duet/{p-cf68eb94.entry.js → p-b9fe5e8a.entry.js} +1 -1
  348. package/lib/duet/{p-5df167ce.entry.js → p-ba1d9ad1.entry.js} +1 -1
  349. package/lib/duet/{p-5688f257.entry.js → p-bb134fb0.entry.js} +1 -1
  350. package/lib/duet/{p-e7bc8481.entry.js → p-bc715683.entry.js} +1 -1
  351. package/lib/duet/{p-1f3ff1d7.system.entry.js → p-be48cfce.system.entry.js} +1 -1
  352. package/lib/duet/{p-da3a4563.system.entry.js → p-bee1c0ab.system.entry.js} +1 -1
  353. package/lib/duet/{p-a6a2c0c2.entry.js → p-bef5842c.entry.js} +1 -1
  354. package/lib/duet/{p-10098739.system.entry.js → p-c1502939.system.entry.js} +1 -1
  355. package/lib/duet/{p-54cbe86f.system.entry.js → p-c746fdd9.system.entry.js} +1 -1
  356. package/lib/duet/{p-29301434.system.entry.js → p-c782fbd2.system.entry.js} +1 -1
  357. package/lib/duet/{p-230604b9.entry.js → p-c8405ffe.entry.js} +1 -1
  358. package/lib/duet/{p-e6a09596.entry.js → p-c946fab0.entry.js} +1 -1
  359. package/lib/duet/{p-71028a1e.entry.js → p-cacd3719.entry.js} +1 -1
  360. package/lib/duet/{p-69aa5532.system.entry.js → p-d1a08c91.system.entry.js} +1 -1
  361. package/lib/duet/{p-68563736.entry.js → p-d1acd619.entry.js} +1 -1
  362. package/lib/duet/{p-c32fb0ad.system.entry.js → p-d2fff81e.system.entry.js} +1 -1
  363. package/lib/duet/{p-bb0d4df8.system.entry.js → p-d40d6372.system.entry.js} +1 -1
  364. package/lib/duet/{p-ea787367.system.entry.js → p-d5366eb5.system.entry.js} +1 -1
  365. package/lib/duet/{p-d5c5992f.entry.js → p-d5e31ef5.entry.js} +1 -1
  366. package/lib/duet/{p-b3fac2f5.entry.js → p-d79938f5.entry.js} +1 -1
  367. package/lib/duet/{p-edbb800c.entry.js → p-d915620f.entry.js} +1 -1
  368. package/lib/duet/{p-514310af.system.entry.js → p-d9cbeb06.system.entry.js} +1 -1
  369. package/lib/duet/{p-e8ef41fb.entry.js → p-da899a00.entry.js} +1 -1
  370. package/lib/duet/{p-8f916ac7.system.entry.js → p-deb7a598.system.entry.js} +1 -1
  371. package/lib/duet/{p-ea92b78c.system.entry.js → p-dfedf8dc.system.entry.js} +1 -1
  372. package/lib/duet/{p-0a61dd54.system.entry.js → p-e066623e.system.entry.js} +1 -1
  373. package/lib/duet/{p-04c226e5.entry.js → p-e2d770ba.entry.js} +1 -1
  374. package/lib/duet/{p-10d39a4b.system.entry.js → p-e4206eb5.system.entry.js} +1 -1
  375. package/lib/duet/{p-fa5eff27.js → p-e45c589a.js} +1 -1
  376. package/lib/duet/{p-1ededd77.system.js → p-e56fe6af.system.js} +1 -1
  377. package/lib/duet/p-e639b9ee.system.js +4 -0
  378. package/lib/duet/{p-2acaaa8b.entry.js → p-e94af0bf.entry.js} +1 -1
  379. package/lib/duet/{p-1d2d899a.system.entry.js → p-e9a89efc.system.entry.js} +1 -1
  380. package/lib/duet/{p-df7a726b.entry.js → p-ebc5c075.entry.js} +1 -1
  381. package/lib/duet/{p-383a91dc.system.entry.js → p-ee3003f9.system.entry.js} +1 -1
  382. package/lib/duet/p-ef3fb30c.entry.js +4 -0
  383. package/lib/duet/{p-94d25cb5.entry.js → p-f0233912.entry.js} +1 -1
  384. package/lib/duet/{p-43931eed.system.entry.js → p-f102b3c6.system.entry.js} +1 -1
  385. package/lib/duet/{p-b3fe4d80.system.entry.js → p-f24be27e.system.entry.js} +1 -1
  386. package/lib/duet/{p-129bd497.system.entry.js → p-f2eee8be.system.entry.js} +1 -1
  387. package/lib/duet/{p-4a711595.system.entry.js → p-f3bcdaa7.system.entry.js} +1 -1
  388. package/lib/duet/{p-3dfbd404.system.entry.js → p-f441c24f.system.entry.js} +1 -1
  389. package/lib/duet/{p-d26277f5.entry.js → p-f598c39f.entry.js} +1 -1
  390. package/lib/duet/{p-c8fd77c9.system.entry.js → p-f624f421.system.entry.js} +1 -1
  391. package/lib/duet/{p-65126f35.system.entry.js → p-f63c4cea.system.entry.js} +1 -1
  392. package/lib/duet/p-f65457b0.system.js +4 -0
  393. package/lib/duet/{p-5855d879.system.entry.js → p-f7dc3756.system.entry.js} +1 -1
  394. package/lib/duet/p-f8ce87ee.system.entry.js +4 -0
  395. package/lib/duet/{p-ea0d7900.entry.js → p-fa9802a4.entry.js} +1 -1
  396. package/lib/esm/duet-action-button.entry.js +1 -1
  397. package/lib/esm/duet-alert.entry.js +1 -1
  398. package/lib/esm/duet-badge.entry.js +1 -1
  399. package/lib/esm/duet-banner.entry.js +2 -2
  400. package/lib/esm/duet-breadcrumb.entry.js +1 -1
  401. package/lib/esm/duet-breadcrumbs.entry.js +1 -1
  402. package/lib/esm/duet-button_2.entry.js +1 -1
  403. package/lib/esm/duet-callout.entry.js +1 -1
  404. package/lib/esm/duet-caption_4.entry.js +1 -1
  405. package/lib/esm/duet-card.entry.js +1 -1
  406. package/lib/esm/duet-checkbox.entry.js +1 -1
  407. package/lib/esm/duet-checkmark.entry.js +1 -1
  408. package/lib/esm/duet-chip.entry.js +1 -1
  409. package/lib/esm/duet-choice_2.entry.js +2 -2
  410. package/lib/esm/duet-collapsible.entry.js +1 -1
  411. package/lib/esm/duet-combobox.entry.js +1 -1
  412. package/lib/esm/duet-contact-card.entry.js +1 -1
  413. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  414. package/lib/esm/duet-date-picker.entry.js +2 -2
  415. package/lib/esm/duet-divider_2.entry.js +1 -1
  416. package/lib/esm/duet-editable-table_3.entry.js +11 -6
  417. package/lib/esm/duet-empty-state.entry.js +1 -1
  418. package/lib/esm/duet-fieldset.entry.js +1 -1
  419. package/lib/esm/duet-file-chooser.entry.js +1 -1
  420. package/lib/esm/duet-footer.entry.js +1 -1
  421. package/lib/esm/duet-grid_2.entry.js +1 -1
  422. package/lib/esm/duet-header_2.entry.js +2 -2
  423. package/lib/esm/duet-hero.entry.js +1 -1
  424. package/lib/esm/duet-icon.entry.js +1 -1
  425. package/lib/esm/duet-input_2.entry.js +1 -1
  426. package/lib/esm/duet-layout.entry.js +1 -1
  427. package/lib/esm/duet-list_2.entry.js +1 -1
  428. package/lib/esm/duet-menu-bar-button.entry.js +1 -1
  429. package/lib/esm/duet-menu-bar-dropdown-link.entry.js +1 -1
  430. package/lib/esm/duet-menu-bar-dropdown.entry.js +1 -1
  431. package/lib/esm/duet-menu-bar-item.entry.js +1 -1
  432. package/lib/esm/duet-menu-bar-link.entry.js +1 -1
  433. package/lib/esm/duet-menu-bar.entry.js +1 -1
  434. package/lib/esm/duet-modal.entry.js +3 -3
  435. package/lib/esm/duet-multiselect.entry.js +1 -1
  436. package/lib/esm/duet-nav.entry.js +1 -1
  437. package/lib/esm/duet-notification_2.entry.js +1 -1
  438. package/lib/esm/duet-number-input.entry.js +1 -1
  439. package/lib/esm/duet-page-heading.entry.js +1 -1
  440. package/lib/esm/duet-pagination_2.entry.js +1 -1
  441. package/lib/esm/duet-popup-menu-item.entry.js +1 -1
  442. package/lib/esm/duet-popup-menu.entry.js +3 -3
  443. package/lib/esm/duet-progress.entry.js +1 -1
  444. package/lib/esm/duet-promo-card.entry.js +1 -1
  445. package/lib/esm/duet-radio_2.entry.js +1 -1
  446. package/lib/esm/duet-range-slider.entry.js +1 -1
  447. package/lib/esm/duet-scrollable_3.entry.js +1 -1
  448. package/lib/esm/duet-section-layout.entry.js +1 -1
  449. package/lib/esm/duet-select.entry.js +1 -1
  450. package/lib/esm/duet-shaped-image.entry.js +1 -1
  451. package/lib/esm/duet-show-more.entry.js +1 -1
  452. package/lib/esm/duet-slideout-lang.entry.js +1 -1
  453. package/lib/esm/duet-slideout-link.entry.js +1 -1
  454. package/lib/esm/duet-slideout-panel-dropdown.entry.js +1 -1
  455. package/lib/esm/duet-slideout-panel.entry.js +2 -2
  456. package/lib/esm/duet-slideout.entry.js +3 -3
  457. package/lib/esm/duet-step_2.entry.js +1 -1
  458. package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +1 -1
  459. package/lib/esm/duet-submenu-bar-dropdown.entry.js +1 -1
  460. package/lib/esm/duet-submenu-bar-item.entry.js +1 -1
  461. package/lib/esm/duet-submenu-bar-link.entry.js +1 -1
  462. package/lib/esm/duet-submenu-bar.entry.js +2 -2
  463. package/lib/esm/duet-textarea.entry.js +1 -1
  464. package/lib/esm/duet-toggle.entry.js +1 -1
  465. package/lib/esm/duet-toolbar-dropdown-link.entry.js +1 -1
  466. package/lib/esm/duet-toolbar-dropdown.entry.js +1 -1
  467. package/lib/esm/duet-toolbar-item.entry.js +1 -1
  468. package/lib/esm/duet-toolbar-link.entry.js +1 -1
  469. package/lib/esm/duet-toolbar.entry.js +1 -1
  470. package/lib/esm/duet-tooltip-button_2.entry.js +2 -2
  471. package/lib/esm/duet-tooltip.entry.js +2 -2
  472. package/lib/esm/duet-tray.entry.js +1 -1
  473. package/lib/esm/duet-upload-aria-status.entry.js +1 -1
  474. package/lib/esm/duet-upload-item.entry.js +9 -2
  475. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  476. package/lib/esm/duet.js +3 -3
  477. package/lib/esm/{floating-ui.dom.esm-efad5c89.js → floating-ui.dom.esm-34e0a5fa.js} +60 -20
  478. package/lib/esm/{focus-utils-82a898ac.js → focus-utils-68697c1f.js} +1 -1
  479. package/lib/esm/{index-28be88c1.js → index-090eaa9b.js} +1 -1
  480. package/lib/esm/loader.js +3 -3
  481. package/lib/esm-es5/duet-action-button.entry.js +1 -1
  482. package/lib/esm-es5/duet-alert.entry.js +1 -1
  483. package/lib/esm-es5/duet-badge.entry.js +1 -1
  484. package/lib/esm-es5/duet-banner.entry.js +1 -1
  485. package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
  486. package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
  487. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  488. package/lib/esm-es5/duet-callout.entry.js +1 -1
  489. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  490. package/lib/esm-es5/duet-card.entry.js +1 -1
  491. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  492. package/lib/esm-es5/duet-checkmark.entry.js +1 -1
  493. package/lib/esm-es5/duet-chip.entry.js +1 -1
  494. package/lib/esm-es5/duet-choice_2.entry.js +1 -1
  495. package/lib/esm-es5/duet-collapsible.entry.js +1 -1
  496. package/lib/esm-es5/duet-combobox.entry.js +1 -1
  497. package/lib/esm-es5/duet-contact-card.entry.js +1 -1
  498. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  499. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  500. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  501. package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
  502. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  503. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  504. package/lib/esm-es5/duet-file-chooser.entry.js +1 -1
  505. package/lib/esm-es5/duet-footer.entry.js +1 -1
  506. package/lib/esm-es5/duet-grid_2.entry.js +1 -1
  507. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  508. package/lib/esm-es5/duet-hero.entry.js +1 -1
  509. package/lib/esm-es5/duet-icon.entry.js +1 -1
  510. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  511. package/lib/esm-es5/duet-layout.entry.js +1 -1
  512. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  513. package/lib/esm-es5/duet-menu-bar-button.entry.js +1 -1
  514. package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
  515. package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +1 -1
  516. package/lib/esm-es5/duet-menu-bar-item.entry.js +1 -1
  517. package/lib/esm-es5/duet-menu-bar-link.entry.js +1 -1
  518. package/lib/esm-es5/duet-menu-bar.entry.js +1 -1
  519. package/lib/esm-es5/duet-modal.entry.js +1 -1
  520. package/lib/esm-es5/duet-multiselect.entry.js +1 -1
  521. package/lib/esm-es5/duet-nav.entry.js +1 -1
  522. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  523. package/lib/esm-es5/duet-number-input.entry.js +2 -2
  524. package/lib/esm-es5/duet-page-heading.entry.js +1 -1
  525. package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
  526. package/lib/esm-es5/duet-popup-menu-item.entry.js +1 -1
  527. package/lib/esm-es5/duet-popup-menu.entry.js +1 -1
  528. package/lib/esm-es5/duet-progress.entry.js +1 -1
  529. package/lib/esm-es5/duet-promo-card.entry.js +1 -1
  530. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  531. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  532. package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
  533. package/lib/esm-es5/duet-section-layout.entry.js +1 -1
  534. package/lib/esm-es5/duet-select.entry.js +1 -1
  535. package/lib/esm-es5/duet-shaped-image.entry.js +1 -1
  536. package/lib/esm-es5/duet-show-more.entry.js +1 -1
  537. package/lib/esm-es5/duet-slideout-lang.entry.js +1 -1
  538. package/lib/esm-es5/duet-slideout-link.entry.js +1 -1
  539. package/lib/esm-es5/duet-slideout-panel-dropdown.entry.js +1 -1
  540. package/lib/esm-es5/duet-slideout-panel.entry.js +1 -1
  541. package/lib/esm-es5/duet-slideout.entry.js +1 -1
  542. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  543. package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
  544. package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
  545. package/lib/esm-es5/duet-submenu-bar-item.entry.js +1 -1
  546. package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
  547. package/lib/esm-es5/duet-submenu-bar.entry.js +1 -1
  548. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  549. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  550. package/lib/esm-es5/duet-toolbar-dropdown-link.entry.js +1 -1
  551. package/lib/esm-es5/duet-toolbar-dropdown.entry.js +1 -1
  552. package/lib/esm-es5/duet-toolbar-item.entry.js +1 -1
  553. package/lib/esm-es5/duet-toolbar-link.entry.js +1 -1
  554. package/lib/esm-es5/duet-toolbar.entry.js +1 -1
  555. package/lib/esm-es5/duet-tooltip-button_2.entry.js +1 -1
  556. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  557. package/lib/esm-es5/duet-tray.entry.js +1 -1
  558. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  559. package/lib/esm-es5/duet-upload-item.entry.js +2 -2
  560. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  561. package/lib/esm-es5/duet.js +1 -1
  562. package/lib/esm-es5/floating-ui.dom.esm-34e0a5fa.js +4 -0
  563. package/lib/esm-es5/{focus-utils-82a898ac.js → focus-utils-68697c1f.js} +1 -1
  564. package/lib/esm-es5/{index-28be88c1.js → index-090eaa9b.js} +1 -1
  565. package/lib/esm-es5/loader.js +1 -1
  566. package/lib/types/components/duet-upload/duet-upload.d.ts +7 -0
  567. package/lib/types/components/duet-upload-item/duet-upload-item.d.ts +8 -0
  568. package/lib/types/components.d.ts +20 -2
  569. package/package.json +7 -6
  570. package/lib/duet/p-00c8a755.js +0 -4
  571. package/lib/duet/p-04396632.entry.js +0 -4
  572. package/lib/duet/p-04423d37.system.entry.js +0 -4
  573. package/lib/duet/p-20a0342c.entry.js +0 -4
  574. package/lib/duet/p-232940fa.system.js +0 -4
  575. package/lib/duet/p-81f6a1a9.system.entry.js +0 -4
  576. package/lib/duet/p-9a056716.entry.js +0 -4
  577. package/lib/duet/p-f0f494dc.system.js +0 -4
  578. package/lib/esm-es5/floating-ui.dom.esm-efad5c89.js +0 -4
  579. /package/lib/cjs/{bodyScrollLock.es6-83f334d1.js → bodyScrollLock.es6-dd2d7d91.js} +0 -0
  580. /package/lib/dist-custom-elements/{p-62c7d9d4.js → p-33937fd7.js} +0 -0
  581. /package/lib/dist-custom-elements/{p-141e14d0.js → p-8354d1f1.js} +0 -0
  582. /package/lib/duet/{p-ed5a5071.system.js → p-49957220.system.js} +0 -0
  583. /package/lib/duet/{p-141e14d0.js → p-8354d1f1.js} +0 -0
  584. /package/lib/esm/{bodyScrollLock.es6-8dc7cca7.js → bodyScrollLock.es6-ecbf187e.js} +0 -0
  585. /package/lib/esm-es5/{bodyScrollLock.es6-8dc7cca7.js → bodyScrollLock.es6-ecbf187e.js} +0 -0
@@ -1,4 +0,0 @@
1
- /*!
2
- * Built with Duet Design System
3
- */
4
- const t=Math.min,n=Math.max,e={left:"right",right:"left",bottom:"top",top:"bottom"},o={start:"end",end:"start"};function r(e,o,r){return n(e,t(o,r))}function i(t,n){return"function"==typeof t?t(n):t}function a(t){return t.split("-")[0]}function l(t){return t.split("-")[1]}function c(t){return"x"===t?"y":"x"}function s(t){return"y"===t?"height":"width"}function u(t){return["top","bottom"].includes(a(t))?"y":"x"}function f(t){return c(u(t))}function d(t){return t.replace(/start|end/g,(t=>o[t]))}function y(t){return t.replace(/left|right|bottom|top/g,(t=>e[t]))}function m(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function p(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function x(t,n,e){let{reference:o,floating:r}=t;const i=u(n),c=f(n),d=s(c),y=a(n),m="y"===i,p=o.x+o.width/2-r.width/2,x=o.y+o.height/2-r.height/2,h=o[d]/2-r[d]/2;let g;switch(y){case"top":g={x:p,y:o.y-r.height};break;case"bottom":g={x:p,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:x};break;case"left":g={x:o.x-r.width,y:x};break;default:g={x:o.x,y:o.y}}switch(l(n)){case"start":g[c]-=h*(e&&m?-1:1);break;case"end":g[c]+=h*(e&&m?-1:1)}return g}async function h(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:a,rects:l,elements:c,strategy:s}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:y=!1,padding:x=0}=i(n,t),h=m(x),g=c[y?"floating"===d?"reference":"floating":d],w=p(await a.getClippingRect({element:null==(e=await(null==a.isElement?void 0:a.isElement(g)))||e?g:g.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(c.floating)),boundary:u,rootBoundary:f,strategy:s})),b="floating"===d?{...l.floating,x:o,y:r}:l.reference,v=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c.floating)),A=await(null==a.isElement?void 0:a.isElement(v))&&await(null==a.getScale?void 0:a.getScale(v))||{x:1,y:1},k=p(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:v,strategy:s}):b);return{top:(w.top-k.top+h.top)/A.y,bottom:(k.bottom-w.bottom+h.bottom)/A.y,left:(w.left-k.left+h.left)/A.x,right:(k.right-w.right+h.right)/A.x}}const g=n=>({name:"arrow",options:n,async fn(e){const{x:o,y:a,placement:c,rects:u,platform:d,elements:y}=e,{element:p,padding:x=0}=i(n,e)||{};if(null==p)return{};const h=m(x),g={x:o,y:a},w=f(c),b=s(w),v=await d.getDimensions(p),A="y"===w,k=A?"top":"left",S=A?"bottom":"right",R=A?"clientHeight":"clientWidth",P=u.reference[b]+u.reference[w]-g[w]-u.floating[b],C=g[w]-u.reference[w],D=await(null==d.getOffsetParent?void 0:d.getOffsetParent(p));let F=D?D[R]:0;F&&await(null==d.isElement?void 0:d.isElement(D))||(F=y.floating[R]||u.floating[b]);const M=P/2-C/2,T=F/2-v[b]/2-1,B=t(h[k],T),L=t(h[S],T),E=B,O=F-v[b]-L,N=F/2-v[b]/2+M,j=r(E,N,O),H=null!=l(c)&&N!=j&&u.reference[b]/2-(N<E?B:L)-v[b]/2<0?N<E?E-N:O-N:0;return{[w]:g[w]-H,data:{[w]:j,centerOffset:N-j+H}}}}),w=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e;const{placement:o,middlewareData:r,rects:c,initialPlacement:u,platform:m,elements:p}=n,{mainAxis:x=!0,crossAxis:g=!0,fallbackPlacements:w,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:A=!0,...k}=i(t,n),S=a(o),R=a(u)===u,P=await(null==m.isRTL?void 0:m.isRTL(p.floating)),C=w||(R||!A?[y(u)]:function(t){const n=y(t);return[d(t),n,d(n)]}(u));w||"none"===v||C.push(...function(t,n,e,o){const r=l(t);let i=function(t,n,e){const o=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return e?n?r:o:n?o:r;case"left":case"right":return n?i:a;default:return[]}}(a(t),"start"===e,o);return r&&(i=i.map((t=>t+"-"+r)),n&&(i=i.concat(i.map(d)))),i}(u,A,v,P));const D=[u,...C],F=await h(n,k),M=[];let T=(null==(e=r.flip)?void 0:e.overflows)||[];if(x&&M.push(F[S]),g){const t=function(t,n,e){void 0===e&&(e=!1);const o=l(t),r=f(t),i=s(r);let a="x"===r?o===(e?"end":"start")?"right":"left":"start"===o?"bottom":"top";return n.reference[i]>n.floating[i]&&(a=y(a)),[a,y(a)]}(o,c,P);M.push(F[t[0]],F[t[1]])}if(T=[...T,{placement:o,overflows:M}],!M.every((t=>t<=0))){var B,L;const t=((null==(B=r.flip)?void 0:B.index)||0)+1,n=D[t];if(n)return{data:{index:t,overflows:T},reset:{placement:n}};let e=null==(L=T.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:L.placement;if(!e)switch(b){case"bestFit":{var E;const t=null==(E=T.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:E[0];t&&(e=t);break}case"initialPlacement":e=u}if(o!==e)return{reset:{placement:e}}}return{}}}},b=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(n){const{x:e,y:o}=n,r=await async function(t,n){const{placement:e,platform:o,elements:r}=t,c=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=a(e),f=l(e),d="y"===u(e),y=["left","top"].includes(s)?-1:1,m=c&&d?-1:1,p=i(n,t);let{mainAxis:x,crossAxis:h,alignmentAxis:g}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return f&&"number"==typeof g&&(h="end"===f?-1*g:g),d?{x:h*m,y:x*y}:{x:x*y,y:h*m}}(n,t);return{x:e+r.x,y:o+r.y,data:r}}}},v=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:l}=n,{mainAxis:s=!0,crossAxis:f=!1,limiter:d={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...y}=i(t,n),m={x:e,y:o},p=await h(n,y),x=u(a(l)),g=c(x);let w=m[g],b=m[x];s&&(w=r(w+p["y"===g?"top":"left"],w,w-p["y"===g?"bottom":"right"])),f&&(b=r(b+p["y"===x?"top":"left"],b,b-p["y"===x?"bottom":"right"]));const v=d.fn({...n,[g]:w,[x]:b});return{...v,data:{x:v.x-e,y:v.y-o}}}}};function A(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function k(t){return A(t).getComputedStyle(t)}function S(t){return t instanceof A(t).Node}function R(t){return S(t)?(t.nodeName||"").toLowerCase():""}function P(t){return t instanceof A(t).HTMLElement}function C(t){return t instanceof A(t).Element}function D(t){return"undefined"!=typeof ShadowRoot&&(t instanceof A(t).ShadowRoot||t instanceof ShadowRoot)}function F(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=k(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(r)}function M(t){return["table","td","th"].includes(R(t))}function T(t){const n=B(),e=k(t);return"none"!==e.transform||"none"!==e.perspective||!n&&!!e.backdropFilter&&"none"!==e.backdropFilter||!n&&!!e.filter&&"none"!==e.filter||["transform","perspective","filter"].some((t=>(e.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(e.contain||"").includes(t)))}function B(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function L(t){return["html","body","#document"].includes(R(t))}const E=Math.min,O=Math.max,N=Math.round;function j(t){const n=k(t);let e=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const r=P(t),i=r?t.offsetWidth:e,a=r?t.offsetHeight:o,l=N(e)!==i||N(o)!==a;return l&&(e=i,o=a),{width:e,height:o,fallback:l}}function H(t){return C(t)?t:t.contextElement}const V={x:1,y:1};function W(t){const n=H(t);if(!P(n))return V;const e=n.getBoundingClientRect(),{width:o,height:r,fallback:i}=j(n);let a=(i?N(e.width):e.width)/o,l=(i?N(e.height):e.height)/r;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const X={x:0,y:0};function Y(t,n,e){var o,r;if(void 0===n&&(n=!0),!B())return X;const i=t?A(t):window;return!e||n&&e!==i?X:{x:(null==(o=i.visualViewport)?void 0:o.offsetLeft)||0,y:(null==(r=i.visualViewport)?void 0:r.offsetTop)||0}}function _(t,n,e,o){void 0===n&&(n=!1),void 0===e&&(e=!1);const r=t.getBoundingClientRect(),i=H(t);let a=V;n&&(o?C(o)&&(a=W(o)):a=W(t));const l=Y(i,e,o);let c=(r.left+l.x)/a.x,s=(r.top+l.y)/a.y,u=r.width/a.x,f=r.height/a.y;if(i){const t=A(i),n=o&&C(o)?A(o):o;let e=t.frameElement;for(;e&&o&&n!==t;){const t=W(e),n=e.getBoundingClientRect(),o=getComputedStyle(e);n.x+=(e.clientLeft+parseFloat(o.paddingLeft))*t.x,n.y+=(e.clientTop+parseFloat(o.paddingTop))*t.y,c*=t.x,s*=t.y,u*=t.x,f*=t.y,c+=n.x,s+=n.y,e=A(e).frameElement}}return p({width:u,height:f,x:c,y:s})}function q(t){return((S(t)?t.ownerDocument:t.document)||window.document).documentElement}function z(t){return C(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function G(t){return _(q(t)).left+z(t).scrollLeft}function I(t){if("html"===R(t))return t;const n=t.assignedSlot||t.parentNode||D(t)&&t.host||q(t);return D(n)?n.host:n}function J(t){const n=I(t);return L(n)?n.ownerDocument.body:P(n)&&F(n)?n:J(n)}function K(t,n){var e;void 0===n&&(n=[]);const o=J(t),r=o===(null==(e=t.ownerDocument)?void 0:e.body),i=A(o);return r?n.concat(i,i.visualViewport||[],F(o)?o:[]):n.concat(o,K(o))}function Q(t,n,e){let o;if("viewport"===n)o=function(t,n){const e=A(t),o=q(t),r=e.visualViewport;let i=o.clientWidth,a=o.clientHeight,l=0,c=0;if(r){i=r.width,a=r.height;const t=B();(!t||t&&"fixed"===n)&&(l=r.offsetLeft,c=r.offsetTop)}return{width:i,height:a,x:l,y:c}}(t,e);else if("document"===n)o=function(t){const n=q(t),e=z(t),o=t.ownerDocument.body,r=O(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),i=O(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let a=-e.scrollLeft+G(t);const l=-e.scrollTop;return"rtl"===k(o).direction&&(a+=O(n.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:l}}(q(t));else if(C(n))o=function(t,n){const e=_(t,!0,"fixed"===n),o=e.top+t.clientTop,r=e.left+t.clientLeft,i=P(t)?W(t):{x:1,y:1};return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(n,e);else{const e=Y(t);o={...n,x:n.x-e.x,y:n.y-e.y}}return p(o)}function U(t,n){const e=I(t);return!(e===n||!C(e)||L(e))&&("fixed"===k(e).position||U(e,n))}function Z(t,n){return P(t)&&"fixed"!==k(t).position?n?n(t):t.offsetParent:null}function $(t,n){const e=A(t);if(!P(t))return e;let o=Z(t,n);for(;o&&M(o)&&"static"===k(o).position;)o=Z(o,n);return o&&("html"===R(o)||"body"===R(o)&&"static"===k(o).position&&!T(o))?e:o||function(t){let n=I(t);for(;P(n)&&!L(n);){if(T(n))return n;n=I(n)}return null}(t)||e}function tt(t,n,e){const o=P(n),r=q(n),i="fixed"===e,a=_(t,!0,i,n);let l={scrollLeft:0,scrollTop:0};const c={x:0,y:0};if(o||!o&&!i)if(("body"!==R(n)||F(r))&&(l=z(n)),P(n)){const t=_(n,!0,i,n);c.x=t.x+n.clientLeft,c.y=t.y+n.clientTop}else r&&(c.x=G(r));return{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}const nt={getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===e?function(t,n){const e=n.get(t);if(e)return e;let o=K(t).filter((t=>C(t)&&"body"!==R(t))),r=null;const i="fixed"===k(t).position;let a=i?I(t):t;for(;C(a)&&!L(a);){const n=k(a),e=T(a);e||"fixed"!==n.position||(r=null),(i?!e&&!r:!e&&"static"===n.position&&r&&["absolute","fixed"].includes(r.position)||F(a)&&!e&&U(t,a))?o=o.filter((t=>t!==a)):r=n,a=I(a)}return n.set(t,o),o}(n,this._c):[].concat(e),o],a=i.reduce(((t,e)=>{const o=Q(n,e,r);return t.top=O(o.top,t.top),t.right=E(o.right,t.right),t.bottom=E(o.bottom,t.bottom),t.left=O(o.left,t.left),t}),Q(n,i[0],r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:n,offsetParent:e,strategy:o}=t;const r=P(e),i=q(e);if(e===i)return n;let a={scrollLeft:0,scrollTop:0},l={x:1,y:1};const c={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==R(e)||F(i))&&(a=z(e)),P(e))){const t=_(e);l=W(e),c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+c.x,y:n.y*l.y-a.scrollTop*l.y+c.y}},isElement:C,getDimensions:function(t){return j(t)},getOffsetParent:$,getDocumentElement:q,getScale:W,async getElementRects(t){let{reference:n,floating:e,strategy:o}=t;const r=this.getOffsetParent||$,i=this.getDimensions;return{reference:tt(n,await r(e),o),floating:{x:0,y:0,...await i(e)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===k(t).direction},et=(t,n,e)=>{const o=new Map,r={platform:nt,...e},i={...r.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=e,l=i.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(n));let s=await a.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:f}=x(s,o,c),d=o,y={},m=0;for(let e=0;e<l.length;e++){const{name:i,fn:p}=l[e],{x:h,y:g,data:w,reset:b}=await p({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:y,rects:s,platform:a,elements:{reference:t,floating:n}});u=null!=h?h:u,f=null!=g?g:f,y={...y,[i]:{...y[i],...w}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(s=!0===b.rects?await a.getElementRects({reference:t,floating:n,strategy:r}):b.rects),({x:u,y:f}=x(s,d,c))),e=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:y}})(t,n,{...r,platform:i})};export{g as a,et as c,w as f,b as o,v as s}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Built with Duet Design System
3
- */
4
- import{r as e,c as t,h as a,H as i,g as o}from"./p-fa5eff27.js";import{a as s}from"./p-115c79b6.js";import{f as l,t as n}from"./p-d81ec707.js";import{i as r}from"./p-a58bd561.js";import{c as d}from"./p-5e59e970.js";import{i as c,s as p,u as h}from"./p-3624bad1.js";import{h as m}from"./p-796edee6.js";import{s as g}from"./p-0e052642.js";const u=class{constructor(a){e(this,a),this.duetToggle=t(this,"duetToggle",7),this.id=d("DuetCollapsible"),this.handleKeyDown=e=>{c(e)&&this.handleClick(e)},this.getFontSizeFromTokens=(e=this.headingSize)=>{if(e){const t=e.replace(/-/g,"_");return n[`font_size_${t}`]}return l},this.getEquivalentIconSize=(e=this.headingSize)=>{switch(e){case"x-small":case"small":case"medium":default:return"xx-small";case"large":return"x-small";case"x-large":return"small";case"xx-large":return"medium";case"xxx-large":return"x-large";case"xxxx-large":return"xxx-large"}},this.handleClick=e=>{e.preventDefault(),this.open=!this.open,this.duetToggle.emit({component:"duet-collapsible",originalEvent:e})},this.theme="",this.accessibleLabel=void 0,this.heading="",this.headingFullWidth=!1,this.centerHeading=!1,this.headingWeight="semibold",this.headingSize=void 0,this.headingLevel=void 0,this.margin="auto",this.open=!1}componentWillLoad(){r(this),this.hasAfterHeading=m(this.element,"after-heading")}connectedCallback(){p(this)}disconnectedCallback(){h(this)}async setFocus(e){this.nativeButton&&(this.element.classList.add("user-is-tabbing"),this.nativeButton.focus(e))}render(){const e=this.headingLevel?g(this.headingLevel):"div";return a(i,{class:{"duet-m-0":"none"===this.margin}},a(e,null,a("button",{class:{"duet-collapsible-heading":!0,"duet-collapsible-heading-centered":this.centerHeading,"duet-theme-turva":"turva"===this.theme,"duet-collapsible-normal-weight":"normal"===this.headingWeight,"has-after-heading":this.hasAfterHeading,"full-width":this.headingFullWidth},style:{"font-size":this.getFontSizeFromTokens()},role:"button",ref:e=>this.nativeButton=e,"aria-label":this.accessibleLabel,"aria-expanded":this.open?"true":"false","aria-controls":this.id,onClick:this.handleClick,onKeyDown:this.handleKeyDown},a("div",{class:"duet-collapsible-heading-icon"},a("duet-icon",{margin:"none",color:"turva"===this.theme?"secondary-turva":"secondary",size:this.getEquivalentIconSize(),icon:s.svg})),a("div",{class:"duet-collapsible-heading-content",part:"duet-collapsible-heading-content"},this.heading),this.hasAfterHeading&&a("div",{part:"duet-collapsible-after-heading"},a("slot",{name:"after-heading"})))),a("div",{id:this.id,class:{"duet-collapsible-content":!0,"duet-theme-turva":"turva"===this.theme},part:"duet-collapsible-content"},a("slot",null)))}get element(){return o(this)}};u.style='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=after-heading]){display:inline-block}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;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:1rem;font-weight:600;line-height:1.5;color:rgb(0, 41, 77)}:host(.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";color:rgb(23, 28, 58)}:host(.duet-m-0){margin:0 !important}.duet-collapsible-content{display:none;padding-left:18px;margin-top: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-weight:400;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:rgb(0, 41, 77)}@media (max-width: 35.9375em){.duet-collapsible-content{font-size:0.875rem}}.duet-collapsible-content.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";color:rgb(23, 28, 58)}:host([open])>.duet-collapsible-content{display:block}.duet-collapsible-heading{-webkit-user-select:none;user-select:none;display:flex;align-items:center;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;cursor:pointer;border-radius:4px}.duet-collapsible-heading.full-width{width:100%}.duet-collapsible-heading.duet-collapsible-heading-centered{margin:auto}.duet-collapsible-heading.duet-collapsible-normal-weight{font-weight:400}.duet-collapsible-heading.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";color:rgb(23, 28, 58)}.duet-collapsible-heading .duet-collapsible-heading-content{min-width:0}.duet-collapsible-heading.has-after-heading .duet-collapsible-heading-content+div{margin-left:16px}.duet-collapsible-heading.has-after-heading .duet-collapsible-heading-content+div.float-right{margin-left:auto}.duet-collapsible-heading:focus{outline:0}:host(.user-is-tabbing) .duet-collapsible-heading:focus{border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-collapsible-heading.duet-theme-turva:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-collapsible-heading-icon{margin-right:8px !important;display:flex;align-items:center;justify-content:center;color:rgb(0, 41, 77);transition:transform 300ms ease}.duet-collapsible-heading-icon:last-child,.duet-collapsible-heading-icon:last-of-type{margin-right:0 !important}[aria-expanded=true] .duet-collapsible-heading-icon{transform:rotate(180deg)}';export{u as duet_collapsible}
@@ -1,4 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,i){function a(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function o(e){try{u(i["throw"](e))}catch(e){r(e)}}function u(e){e.done?n(e.value):a(e.value).then(s,o)}u((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,a,r,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return u([e,t])}}function u(o){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(n=0)),n)try{if(i=1,a&&(r=o[0]&2?a["return"]:o[0]?a["throw"]||((r=a["return"])&&r.call(a),0):a.next)&&!(r=r.call(a,o[1])).done)return r;if(a=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;a=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){n.label=o[1];break}if(o[0]===6&&n.label<r[1]){n.label=r[1];r=o;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(o);break}if(r[2])n.ops.pop();n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e];a=0}finally{i=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
2
- /*!
3
- * Built with Duet Design System
4
- */System.register(["./p-ffb8996b.system.js","./p-50f4bca2.system.js","./p-224f6c46.system.js","./p-da20db91.system.js","./p-6ef75455.system.js"],(function(e){"use strict";var t,n,i,a,r,s;return{setters:[function(e){t=e.r;n=e.h;i=e.g},function(e){a=e.i},function(e){r=e.g},function(e){s=e.a},function(){}],execute:function(){var o=function(e,t){if(t===void 0){t=2}if(e===0){return"0 Bytes"}var n=1024;var i=t<0?0:t;var a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];var r=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,r)).toFixed(i))+" "+a[r]};var u=".file-link::part(duet-link){text-decoration:none}";var c=e("duet_upload_item",function(){function e(e){var n=this;t(this,e);this.fileUploadingInfo={fi:"Tiedosto latautuu",sv:"Filen laddas upp",en:"File is uploading"};this.onLinkClick=function(e){var t=n.data,i=t.url,a=t.meta;if(!!n.linkClickEvent){e.preventDefault();n.linkClickEvent.emit({component:"duet-upload",data:{name:n.data.item.name,url:i,meta:a}})}};this.theme="";this.data=undefined;this.type=undefined;this.showLinks=undefined;this.actions=undefined;this.label=undefined;this.categoryLabel=undefined;this.errorCodes=undefined;this.showCategory=undefined;this.linkClickEvent=undefined}e.prototype.componentWillLoad=function(){a(this)};e.prototype.focusActionButton=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!this.actionButton)return[3,2];return[4,this.actionButton.setFocus({preventScroll:true})];case 1:e.sent();this.actionButton.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"});e.label=2;case 2:return[2]}}))}))};e.prototype.getFileNameLine=function(){var e=this.data,t=e.item,i=e.size,a=e.uploaded,u=e.url,c=e.progress,l=e.error;var d=t.name;var h=n("span",{class:"duet-upload-item-name"},n("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),n("duet-spacer",{size:"xx-small",direction:"horizontal"}),d);var f=n("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",o(i),")");switch(this.type){case"inprogress":return n("span",{class:"duet-upload-item-name",role:"status"},n("duet-paragraph",{class:"duet-upload-item-name",color:"gray-darker",margin:"none",weight:"semi-bold"},n("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),n("duet-spacer",{size:"xx-small",direction:"horizontal"}),d),n("duet-visually-hidden",null,n("duet-paragraph",null,r(this.fileUploadingInfo))),n("duet-progress",{progress:Math.ceil(c),"aria-hidden":true}));case"pending":return n("span",{class:"duet-upload-item-name"},n("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),n("duet-spacer",{size:"xx-small",direction:"horizontal"}),d);case"failure":return n("span",{class:"duet-upload-item-error",role:"status"},n("duet-paragraph",{class:"duet-upload-item-name",color:"danger",margin:"none",weight:"semi-bold"},n("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),n("duet-spacer",{size:"xx-small",direction:"horizontal"}),d),n("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},s(l.type,this.errorCodes)));default:return a&&u&&this.showLinks?n("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},n("duet-link",{class:"file-link",onClick:this.onLinkClick,url:u},h),n("duet-spacer",{size:"xx-small",direction:"horizontal"}),f):n("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},h,n("duet-spacer",{size:"xx-small",direction:"horizontal"}),f)}};e.prototype.render=function(){var e=this;var t=this.data,i=t.uid,a=t.meta,s=t.item;var o=a&&a.badges?n("span",null,a.badges.map((function(e){return n("duet-badge",{color:"primary"},e)}))):undefined;var u="".concat(a&&a.badges?a.badges.join(","):""," ").concat(s.name);return n("div",{class:{"upload-item-row":true}},this.showCategory&&n("div",{class:"item-categories"},n("duet-heading",{class:"heading",color:"color-secondary",level:"h6",weight:"semibold"},r(this.categoryLabel)),o),n("div",{class:{"item-name":true,"no-category":!this.showCategory}},!!this.label&&n("duet-heading",{class:"heading",color:"color-secondary",level:"h6",weight:"semibold"},r(this.label)),this.getFileNameLine()),n("div",{class:"item-actions"},this.actions.map((function(t){return n("duet-action-button",{actionMeta:Object.assign({},a||{}),actionId:i||null,actionName:t.name,theme:e.theme,iconName:t.icon,iconColor:t.color,iconSize:t.size,background:t.background,"accessible-label":"".concat(u," ").concat(r(t.label)," "),accessibleTitle:false,ref:function(t){return e.actionButton=t}})}))))};Object.defineProperty(e.prototype,"element",{get:function(){return i(this)},enumerable:false,configurable:true});return e}());c.style=u}}}));
@@ -1,4 +0,0 @@
1
- /*!
2
- * Built with Duet Design System
3
- */
4
- import{h as t,r as e,c as i,H as a,g as s,F as d}from"./p-fa5eff27.js";import{i as l}from"./p-a58bd561.js";import{f as o,d as n}from"./p-9e371678.js";import{i as r}from"./p-3624bad1.js";import{a as h,c as u,d as b,g as p,s as m}from"./p-2e36d5bf.js";import{p as c,s as g}from"./p-f2aa1623.js";import{b as f,a as y}from"./p-5f87ea3d.js";import{c as v}from"./p-5e59e970.js";import{g as x,a as w}from"./p-fabb616b.js";import"./p-0e052642.js";const k=({data:e,groupId:i,alignment:a})=>{const s=`duet-editable-table duet-editable-table-content-${i}`;return"string"==typeof e?t("td",{innerHTML:e,class:s,part:`${i}content`,style:{verticalAlign:a}}):t("td",{class:s,part:`${i}content`,style:{verticalAlign:a}},e)},T=class{constructor(t){e(this,t),this.duetTableToggle=i(this,"duetTableToggle",7),this.duetMenuClick=i(this,"duetMenuClick",7),this.hasHeadSlotFirst=!1,this.hasHeadSlotLast=!1,this.hasFootSlot=!1,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=(t,e)=>{e.preventDefault();const{sort_order:i,direction:a,index:s,key:d}=t;this.duetTableToggle.emit({sort_order:i,index:s,direction:a,key:d,component:"duet-editable-table",originalEvent:e})},this.handleKeyDown=(t,e)=>{r(e)&&this.toggleColumn(t,e)},this.language=h(),this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small",this.actions=void 0,this.columns=void 0,this.rows=void 0,this.sortable=!1,this.groupId="",this.theme="",this.accessibleRole=void 0,this.hideHeadVisually=!1}componentWillLoad(){l(this),this.hasHeadSlotFirst=!!this.element.querySelector("[slot='thead-first']"),this.hasHeadSlotLast=!!this.element.querySelector("[slot='thead-last']"),this.hasFootSlot=!!this.element.querySelector("[slot='tfoot']")}connectedCallback(){u(this)}disconnectedCallback(){b(this)}createLabel(e){const{sort_order:i,direction:a,index:s,label:d}=e,l=p(d);return this.sortable?t("span",{class:"duet-table-label","data-index":s},t("duet-button",{size:"small",icon:i&&1===a?"action-arrow-down-small":i&&-1===a?"action-arrow-up-small":"action-subtract-small","icon-size":"medium-small","accessible-label":this.sortableDefaultLabel[this.language],variation:"plain",margin:"none","icon-right":!0,onClick:t=>this.toggleColumn(e,t),onKeyDown:t=>this.handleKeyDown(e,t)},l)):l}getSortedColumns(){return[...this.columns].sort(o(["index"]))}getRowSortOrder(){return[...this.columns].sort(o(["sort_order"])).filter((t=>t.sort_order)).map((t=>-1===t.direction?`-${t.key}`:t.key))}renderTableHeader(){if(!this.columns)return;const e=this.getSortedColumns();return t("tr",{class:{"duet-table-action-header":!!this.actions}},e.map((e=>{if(!1!==e.display){const i=this.createLabel(e);return""!==i?t("th",{scope:"col"},i):t("td",null)}})),this.actions&&t("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&t("duet-visually-hidden",null,this.actionColumnLabel[this.language])))}renderActions(e,i){if(this.actions)return t("td",{class:"duet-text-right"},this.actions.map((a=>t("duet-action-button",{actionMeta:Object.assign({},(null==e?void 0:e.meta)||{},{index:i}),actionId:(null==e?void 0:e.uid)||(null==e?void 0:e.id)||null,actionName:a.name,theme:this.theme,iconName:a.icon,iconColor:a.color,iconSize:a.size,background:a.background,"accessible-label":`${e.actionDescription||""} ${p(a.label)} `}))))}renderTableBody(){const e=this.getSortedColumns(),i=this.getRowSortOrder();return[...this.rows].sort(o(i)).map(((i,a)=>t("tr",{class:{"duet-table-action-row":!!this.actions,"duet-editable-table-row":!0,[`duet-editable-table-row-${this.groupId}`]:!0},"data-meta":JSON.stringify(i.meta)},e.map((e=>{if(!1!==e.display)return t(k,{data:i[e.key]?i[e.key]:i.item,groupId:this.groupId})})),this.actions&&this.renderActions(i,a))))}render(){return t(a,{class:{[`duet-editable-table-${this.variation}`]:!0,"duet-editable-table":!0,[`duet-editable-table-${this.theme}`]:!0,"duet-editable-table-scrollable":"none-scrollable"===this.breakpoint,"duet-editable-table-sortable":this.sortable,"duet-editable-table-actions":!!this.actions,"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme}},t("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},t("table",{role:this.accessibleRole},t("caption",null,t("slot",{name:"tcaption"})),t("thead",null,this.hasHeadSlotFirst&&t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-first"}))),this.renderTableHeader(),this.hasHeadSlotLast&&t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-last"})))),t("tbody",null,this.renderTableBody()),this.hasFootSlot&&t("tfoot",null,t("tr",null,t("td",{class:"duet-editable-table-footer-menu",colSpan:99},t("slot",{name:"tfoot"})))))))}get element(){return s(this)}};T.style=".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}";const L={none:0,"with-links":16*parseFloat(c),"without-links":16*parseFloat(g)},S=class{constructor(t){e(this,t),this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu)",this.handleMediaQueryChange=t=>{this.matchesBreakpoint=f.includes(this.breakpoint)?!t.matches:t.matches},this.matchesBreakpoint=!0,this.language=h(),this.theme=void 0,this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small",this.hideHeadVisually=!1}watchLanguageStateHandler(t,e){t!==e&&setTimeout((()=>this.copyHeadingsToCells()),50)}connectedCallback(){this.mq=matchMedia("none"===this.breakpoint||"none-scrollable"===this.breakpoint?"all":y[this.breakpoint]),this.mq.addEventListener("change",n(this.handleMediaQueryChange,50)),this.handleMediaQueryChange(this.mq),this.observer=new MutationObserver((()=>n(this.copyHeadingsToCells(),50))),this.observer.observe(this.element,{childList:!0,subtree:!0})}componentWillLoad(){if(l(this),this.copyHeadingsToCells(),this.sticky&&"none-scrollable"===this.breakpoint&&console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence'),this.sticky){const t=L[this.stickyDistance];this.element.querySelectorAll(this.headingSelector).forEach((e=>e.style.top=`${t}px`))}}componentDidLoad(){this.observer&&this.observer.takeRecords(),u(this)}disconnectedCallback(){this.observer.disconnect(),this.observer=null,this.mq.removeListener(this.handleMediaQueryChange),this.mq=null,this.matchesBreakpoint=!0,b(this)}copyHeadingsToCells(){const t=this.element.querySelectorAll(this.headingSelector),e=this.element.querySelectorAll("tbody tr"),i=Array.from(t).map((t=>t.textContent.trim()));e.forEach((t=>{t.querySelectorAll("td").forEach(((t,e)=>{if(i[e]){const a=t.querySelector(".duet-table-cell-heading");if(!a||a.textContent!==i[e]){null==a||a.remove();const s=document.createElement("span");s.textContent=i[e],s.classList.add("duet-table-cell-heading"),s.setAttribute("aria-hidden","true"),s.inert=!0,t.prepend(s)}}}))}))}render(){return t(a,{class:{[`duet-table-${this.variation}`]:!0,"duet-table-flattened":!this.matchesBreakpoint,"duet-table-sticky":this.matchesBreakpoint&&this.sticky,"duet-table-scrollable":"none-scrollable"===this.breakpoint,"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme,"duet-table-hide-head-visually":this.hideHeadVisually}},t("slot",null))}get element(){return s(this)}static get watchers(){return{language:["watchLanguageStateHandler"]}}};S.style='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 span.duet-table-cell-heading{display:none}.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 td span.duet-table-cell-heading{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:rgb(0, 41, 77)}.duet-table-flattened.duet-theme-turva td span.duet-table-cell-heading{color:rgb(23, 28, 58)}.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-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}';const j=[{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-203",system_message:"Files to upload exceed total byte size limit",message:{fi:"Yritit lisätä tiedostoja, jotka ylittäisivät suurimman sallitun yhteenlasketun koon.",sv:"Du försökte lägga till filer som skulle överskrida den maximala kombinerade storleken.",en:"You tried to add files that would exceed the maximum combined size."}},{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."}},{type:"duet-upload-302",system_message:"Files to upload exceeds limits",message:{fi:"Et voi lähettää enempää kuin enimmäismäärän liitteitä.",sv:"Du kan inte ladda upp fler än det maximala antalet bilagor.",en:"You can't upload more than maximum number of attachments."}}],E={fi:"Liiteluettelo",sv:"Lista över bilagor",en:"Attachments list"},z=({label:e,categoryLabel:i})=>t("div",{class:"items-header",tabindex:"-1","aria-label":p(E)},i&&t("duet-heading",{class:"category-header",border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},p(i)),t("duet-heading",{class:{"filename-header":!0,"no-category":!i},border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},p(e))),M=(t,e,i)=>{const{allowedMimetypes:a,allowedExtensions:s,maxBytes:d}=e;let l=!1,o=x("default",i);if(t){const{name:e,type:n,size:r}=t,h=((t,e)=>{if(!e||!t)return!0;const i=e.split(",");let a=!1;return i.forEach((e=>{const i=e.split("/"),s=t.split("/");i[0]!==s[0]||i[1]!==s[1]&&"*"!==i[1]||(a=!0)})),a})(n,a),u="all"===s||""===s||" "===s||void 0===s||((t,e)=>{if(!e)return!0;const i=t.split(".");return e.split(",").includes(i[i.length-1])})(e.toLowerCase(),s),b=((t,e)=>!e||!t||e>=t)(r,d);h||(o=x("duet-upload-101",i)),u||(o=x("duet-upload-100",i)),b||(o=x("duet-upload-201",i)),l=h&&u&&b}else l=!1;return{valid:l,errorMessage:l?void 0:p(o.message),errorSystem:l?void 0:o.system_message,errorType:l?void 0:o.type}},F=({payload:t,options:e,onFailure:i,onSuccess:a,onProgress:s})=>{const{type:d="POST",xhr:l,uri:o,argument:n=null,headers:r=null}=e;l.open(d,`${o}${n||""}`,!0);const{data:h,name:u}=t;return r&&Object.keys(r).forEach((t=>{l.setRequestHeader(t,r[t])})),"POST"===d&&(l.onreadystatechange=()=>{l.readyState===XMLHttpRequest.DONE&&l.status>=200&&l.status<300&&a(l,u,l.status),l.readyState===XMLHttpRequest.DONE&&l.status>=300&&l.status<999&&i(l,u,l.status)},s(u)),l.send(h),l},C=class{constructor(a){e(this,a),this.duetChange=i(this,"duetChange",3),this.duetBlur=i(this,"duetBlur",7),this.duetFocus=i(this,"duetFocus",7),this.duetReady=i(this,"duetReady",7),this.duetDone=i(this,"duetDone",3),this.duetState=i(this,"duetState",3),this.duetDelete=i(this,"duetDelete",3),this.duetCancel=i(this,"duetCancel",3),this.duetProgress=i(this,"duetProgress",3),this.duetUpload=i(this,"duetUpload",3),this.linkClick=i(this,"linkClick",3),this.buttonId=v("DuetButton"),this.labelId=v("DuetLabel"),this.uploadId=v("DuetUpload"),this.filesInProgress=new Map,this.fileMaxReached=!1,this.bytesMaxReached=!1,this.filesToUploadExceedsLimit=!1,this.filesToUploadTotalSizeIsAboveMax=!1,this.internalStatusMessageLabel=void 0,this.itemRefs=new Map,this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"},this.kick=n((()=>{this.tick=Date.now()}),30),this.categoryLabel={en:"Category",sv:"Filtyp",fi:"Tiedostotyyppi"},this.listenForActionEvents=()=>{this.element.addEventListener("duetActionEvent",(t=>{const e=t.detail,{action:i,id:a,originalEvent:s}=e;switch(i){case"delete":this.onDelete(a,s);break;case"cancel":this.onCancel(a,s)}}))},this.verifyValidity=()=>{const{invalid:t,valid:e}=this.getFilesAsArray(),i=this.valid;this.valid=0===t.length&&0!==e.length,this.valid!==i&&this.duetState.emit({originalEvent:void 0,data:{valid:this.valid,from:"componentWillRender"},component:"duet-upload"})},this.getGroupFromItemData=t=>t.valid&&100===t.progress?this.DefaultGroups.success:t.progress>0&&100!==t.progress?this.DefaultGroups.inprogress:t.valid?t.pending?this.DefaultGroups.pending:t.group?t.group:"none":this.DefaultGroups.failure,this.mapFilesToUploadItems=(e,i,a,s)=>i===this.DefaultGroups.success?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"success",data:e,showLinks:this.showLinks,linkClickEvent:this.emitEvent?this.linkClick:void 0,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,ref:t=>{this.itemRefs.set(e.uid,t)}}):i===this.DefaultGroups.inprogress?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"inprogress",data:e,showLinks:this.showLinks,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,ref:t=>{this.itemRefs.set(e.uid,t)}}):i===this.DefaultGroups.pending?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"pending",data:e,showLinks:this.showLinks,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,ref:t=>{this.itemRefs.set(e.uid,t)}}):i===this.DefaultGroups.failure?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"failure",data:e,showLinks:this.showLinks,errorCodes:this.errorCodes,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,ref:t=>{this.itemRefs.set(e.uid,t)}}):e.group?e.html:"none",this.genHashName=()=>Date.now().toString(36)+Math.random(),this.updateValueInMap=(t,e,i,a=!0)=>{try{const a=this.files.get(t);a[e]=i,this.files.set(t,a),this.external&&"url"!==e&&this.trackProgress(t,"uploaded"===e)}catch(t){}a&&this.kick()},this.updateProgress=(t,e)=>{t.lengthComputable?(i=>{this.updateValueInMap(e,"progress",i),this.onProgress(e,i,t)})(t.loaded/t.total*100):console.log("cant read progress")},this.trackProgress=(t,e=!1)=>{e?this.filesInProgress.delete(t):this.filesInProgress.set(t,"inprogress"),0===this.filesInProgress.size&&this.onDone()},this.getFilesAsArray=()=>{const t=[],e=[];return this.files.forEach((i=>{i.valid&&!i.deleted?t.push(i):i.valid||i.deleted||e.push(i)})),{valid:t,invalid:e}},this.resetFormFields=()=>{this.nativeInput.value=""},this.startUpload=async(t,e)=>{const{bytesMaxReached:i,fileMaxReached:a}=this.validateTotals();i||a?this.kick():(this.metaData=e,this.nativeInput.click(),this.onUpload(t,e),t.stopPropagation(),t.preventDefault())},this.transferComplete=t=>{this.updateValueInMap(t,"progress",100,!1),this.trackProgress(t,!0)},this.transferDone=(t,e,i)=>{this.updateValueInMap(e,"status",i,!1),this.updateValueInMap(e,"uploaded",!0,!1);try{const i=JSON.parse(t.response);this.updateValueInMap(e,"url",i.url)}catch(t){this.updateValueInMap(e,"url",null),console.error("Server did not respond with expected response {url: string}")}},this.transferDoneWithFailure=(t,e,i)=>{try{const{error:i}=JSON.parse(t.response);this.updateValueInMap(e,"error",{message:i.message,type:i.type},!1)}catch(t){console.error("Server did not respond with expected response error:{message: string, type: int}"),this.updateValueInMap(e,"error",{type:i},!1)}this.updateValueInMap(e,"valid",!1,!0)},this.transferFailed=t=>{this.updateValueInMap(t,"error",w("duet-upload-001",this.errorCodes))},this.transferCanceled=t=>{this.files.delete(t),this.validateTotals(t),this.kick()},this.validateTotals=t=>{const e=((t,e)=>{let i=0;return!!(e&&(this.files.forEach((t=>{t.valid&&t.size&&(i+=t.size)})),i>=e))})(0,this.maxBytesTotal),i=((t,e)=>{let i=0;return!!(e&&(this.files.forEach((t=>{t.valid&&i++})),i>=e))})(0,this.maxFiles);return e&&t&&this.updateValueInMap(t,"error",w("duet-upload-202",this.errorCodes),!1),i&&t&&this.updateValueInMap(t,"error",w("duet-upload-301",this.errorCodes),!1),this.bytesMaxReached=e,this.fileMaxReached=i,{bytesMaxReached:e,fileMaxReached:i}},this.uploadFile=async(t,e=!1,i)=>{!e&&this.deferUpload?(this.updateValueInMap(t.item.name,"pending",!0,!1),this.updateValueInMap(t.item.name,"group","pending",!0)):e&&(this.updateValueInMap(t.item.name,"pending",!1,!1),this.updateValueInMap(t.item.name,"group",void 0,!0));try{if(!this.deferUpload||e){const e=new FormData;e.append("file",t.item),i&&e.append("key",i),e.append("uid",t.uid),e.append("name",t.item.name),e.append("metadata",JSON.stringify({uid:t.uid,url:this.uri,size:t.item.size,meta:t.meta})),t.xhr=await this.makeXHRPostRequest(e)}}catch(e){this.updateValueInMap(t.item.name,"valid",!1,!1)}},this.uploadPendingFiles=()=>{for(const[t,e]of Array.from(this.files.entries()))"pending"===e.group&&!0===e.pending&&this.uploadFile(e,!0,t)},this.getItemFromUID=t=>{for(const[e,i]of Array.from(this.files.entries()))if(i.uid===t)return{value:i,key:e};return null},this.handleExternalUploadButton=(t,e)=>{this.externalUploadButton&&(this.externalUploadButton.disabled=!(!t&&!e))},this.onDelete=(t,e)=>{const i=this.getItemFromUID(t).key,a=this.files.get(i);this.files.delete(i);const{bytesMaxReached:s,fileMaxReached:d}=this.validateTotals();this.handleExternalUploadButton(s,d),this.kick(),this.duetDelete.emit({originalEvent:e,data:{deletion:a},component:"duet-upload"}),this.external||a.pending||this.makeXHRDeleteRequest(a),this.resetFormFields()},this.onCancel=(t,e)=>{const i=this.getItemFromUID(t).key,a=this.files.get(i);this.files.delete(i);const{bytesMaxReached:s,fileMaxReached:d}=this.validateTotals();if(this.handleExternalUploadButton(s,d),!this.external){const{xhr:t}=a;t&&t.abort()}this.kick(),this.resetFormFields(),this.duetCancel.emit({originalEvent:e,data:{cancelled:a},component:"duet-upload"})},this.onUpload=(t,e)=>{this.duetUpload.emit({originalEvent:t,metaData:e,component:"duet-upload"})},this.onBlur=t=>{this.duetBlur.emit({originalEvent:t,component:"duet-upload"})},this.onProgress=(t,e,i)=>{this.duetChange.emit({originalEvent:i,data:{key:t,percentComplete:e},component:"duet-upload"})},this.onFocus=t=>{this.duetFocus.emit({originalEvent:t,component:"duet-upload"})},this.onReady=()=>{this.duetReady.emit({component:"duet-upload"})},this.onDone=()=>{this.duetDone.emit({component:"duet-upload",data:{files:this.files}})},this.filterMap=()=>{const t=Array.from(this.files.values()),e=[],i=[],a=[],s=[];let d=!1;return t.forEach((t=>{const l=this.getGroupFromItemData(t);t.meta&&t.meta.badges&&(d=!0),l===this.DefaultGroups.success?s.push({uid:t.uid,data:t}):l===this.DefaultGroups.inprogress?e.push({uid:t.uid,data:t}):l===this.DefaultGroups.pending?a.push({uid:t.uid,data:t}):l===this.DefaultGroups.failure?i.push({uid:t.uid,data:t}):t.group&&e.push({uid:t.uid,data:t})})),{pending:a,failure:i,success:s,inprogress:e,hasCategory:d}},this.getActions=(t,e)=>e.filter((e=>e.map.includes(t))),this.renderUploadedItems=()=>{this.itemRefs.clear();const e=this.filterMap(),i=e.hasCategory,a=this.hideCancelButton?this.actions.filter((t=>"cancel"!==t.name)):this.actions,s=this.groups.map((s=>{const l=e[s.id];if(null==l?void 0:l.length)return t(d,null,!this.hideGroups&&t(z,{categoryLabel:i?this.categoryLabel:void 0,label:s.label}),l.map((t=>this.mapFilesToUploadItems(t.data,s.id,i,a))))}));return t(d,null,this.showUploadedItemsHeader&&t(z,{categoryLabel:i?this.categoryLabel:void 0,label:this.uploadedItemsHeaderLabel}),s)},this.tick=Date.now(),this.accessibleActiveDescendant=void 0,this.accessibleDescribedBy=void 0,this.accessibleControls=void 0,this.accessibleOwns=void 0,this.external=!1,this.middleware=null,this.deferUpload=!1,this.hideButton=!1,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=void 0,this.showLinks=!1,this.caption=void 0,this.statusLabelDefaults={fi:{inProgress:"Lähetetään {filesUploaded}, yhteensä lähetettävänä {filesTotal}.",inProgressWithErrors:"Lähetetään {filesInProgress}, lähetetty {filesUploaded}, yhteensä lähetettävänä {filesTotal}, {filesWithErrors} epäonnistui",done:"Lähetys valmis, {filesTotal} lisätty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} lisätty onnistuneesti, {filesWithErrors} epäonnistui",files:"tiedostoa",file:"tiedosto"},sv:{inProgress:"Laddar upp {filesUploaded} av {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Uppladdningen slutförd, {filesTotal} har lagts till",doneWithErrors:"Uppladdningen slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Uploading {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"Upload completed, {filesTotal} added successfully",doneWithErrors:"Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.",files:"files",file:"file"}},this.statusMessageLabel=p(this.statusLabelDefaults),this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"},this.buttonLabel=p(this.buttonLabelDefaults),this.accessibleButtonLabel=void 0,this.theme="",this.disabled=!1,this.identifier=void 0,this.margin="auto",this.required=!1,this.alignment="middle",this.hideGroups=!1,this.files=new Map,this.valid=!this.required,this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"},this.label=p(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=p(this.descriptionDefaults),this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."},this.fileListEmpty=p(this.fileListEmptyDefaults),this.error="",this.errorCodes=j,this.name=void 0,this.maxBytes=2e8,this.maxBytesTotal=void 0,this.maxFiles=99,this.allowedExtensions="all",this.allowedMimetypes="",this.multiple=!0,this.limitSelection=!1,this.hideCancelButton=!1,this.value=void 0,this.externalUploadButtonId=void 0,this.captionOnBottom=!1,this.showUploadedItemsHeader=!1,this.uploadedItemsHeaderLabel={fi:"Ladattu tiedosto",sv:"Lägg till en bilaga",en:"Uploaded file"},this.headerHeadingLevel="h3",this.hideHeader=!1,this.emitEvent=!1,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"}}]}watchValidHandler(t,e){t!==e&&this.kick()}componentWillLoad(){this.internalStatusMessageLabel="string"==typeof this.statusMessageLabel?m(this.groups):this.statusMessageLabel,l(this),this.listenForActionEvents(),this.onReady(),this.externalUploadButton=document.querySelector(`#${this.externalUploadButtonId}`)}componentWillRender(){this.verifyValidity()}async setFocus(t){this.nativeInput&&this.nativeInput.focus(t)}async upload(t){const{bytesMaxReached:e,fileMaxReached:i}=this.validateTotals();if(e||i)return this.handleExternalUploadButton(e,i),void this.kick();this.metaData=t,this.nativeInput.click()}async uploadPending(){this.uploadPendingFiles()}async refresh(){this.kick(),await this.setFocus()}async getFiles(){return!(!this.files||0===this.files.size)&&this.getFilesAsArray()}async updateValue(t,e,i){this.updateValueInMap(t,e,i)}async focusActionButton(t){var e;await(null===(e=this.itemRefs.get(t))||void 0===e?void 0:e.focusActionButton())}render(){const e=this.identifier||this.uploadId,i=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024),s=Math.round(this.maxBytes/1024/1024);let l=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());return l=l.replace(/{maxbytes}/g,`${s.toString()} MB`),l=l.replace(/{maxbytestotal}/g,`${i.toString()} MB`),l=l.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", ")),this.externalUploadButton&&(this.externalUploadButton.accessibleLabel=l),t(a,{class:{"duet-m-0":"none"===this.margin}},t("duet-fieldset",{"label-heading-level":this.headerHeadingLevel,"label-hidden":this.hideHeader,label:this.label,caption:this.captionOnBottom?void 0:l},t("slot",{name:"header"}),!this.files.size&&t("duet-empty-state",{id:this.labelId,part:this.identifier?`${this.identifier}-empty-state`:"duet-upload-empty-state",icon:"messaging-attachment"},t("duet-paragraph",{margin:"none"},this.fileListEmpty)),!!this.files.size&&t("slot",{name:"fileheader"}),!!this.files.size&&t("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&&t("slot",{name:"filefooter"}),t("slot",{name:"uploadfooter"}),this.captionOnBottom&&t("duet-caption",{margin:"none",size:"small"},t("div",{class:"upload-bottom-caption"},l)),t("slot",{name:"afterfooter"}),!this.hideButton&&t(d,null,t("duet-spacer",{size:"large"}),t("duet-button",{id:this.buttonId,onClick:this.startUpload,"accessible-controls":e,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"accessible-owns":e,size:"small",variation:"secondary",fixed:!0,icon:"action-add-circle",part:this.identifier?`${this.identifier}-button-upload`:"duet-upload-button-upload"},this.buttonLabel)),(this.fileMaxReached||this.bytesMaxReached||this.filesToUploadExceedsLimit||this.filesToUploadTotalSizeIsAboveMax)&&t(d,null,t("duet-spacer",{size:"medium"}),t("duet-alert",{part:this.identifier?`${this.identifier}-error-notification`:"duet-upload-error-notification"},this.fileMaxReached&&w("duet-upload-301",this.errorCodes),this.bytesMaxReached&&w("duet-upload-202",this.errorCodes),this.filesToUploadExceedsLimit&&w("duet-upload-302",this.errorCodes),this.filesToUploadTotalSizeIsAboveMax&&w("duet-upload-203",this.errorCodes))),t("duet-visually-hidden",{"aria-hidden":"true"},t("input",{ref:t=>{this.nativeInput=t},accept:this.limitSelection?`${this.allowedMimetypes},${this.allowedExtensions}`:void 0,onBlur:this.onBlur,onFocus:this.onFocus,onChange:t=>this.onChange(t),type:"file",class:{"duet-upload":!0},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,tabIndex:-1}))))}makeXHRPostRequest(t){const e=new XMLHttpRequest,i=t.get("name");e.upload.addEventListener("progress",(t=>{this.updateProgress(t,i)})),e.upload.addEventListener("load",(()=>{this.transferComplete(i)})),e.upload.addEventListener("error",(()=>{this.transferFailed(i)})),e.upload.addEventListener("abort",(()=>{this.transferCanceled(i)}));let a={payload:{data:t,name:i},options:{type:"POST",uri:this.uri,xhr:e,argument:null,headers:void 0},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(a=this.middleware(a)),F(a)}makeXHRDeleteRequest(t){const{uid:e,item:i}=t,a=new XMLHttpRequest;let s={payload:{data:null,name},options:{type:"DELETE",xhr:a,uri:this.uri,argument:`?key=${e}&name=${i.name}`,headers:{"x-fileuid":e,"x-filename":i.name}},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(s=this.middleware(s)),F(s)}async onChange(t){var e;const i=Array.from(null===(e=this.nativeInput)||void 0===e?void 0:e.files);if(this.filesToUploadExceedsLimit=!1,this.files.size+i.length>this.maxFiles)return this.filesToUploadExceedsLimit=!0,void this.kick();if(this.filesToUploadTotalSizeIsAboveMax=!1,((t,e,i)=>{let a=0;return!!(i&&(this.files.forEach((t=>{t.valid&&t.size&&(a+=t.size)})),e.forEach((t=>{t.size&&(a+=t.size)})),a>=i))})(0,i,this.maxBytesTotal))return this.filesToUploadTotalSizeIsAboveMax=!0,void this.kick();if(i)for(const t of i){const{valid:e,errorMessage:i,errorType:a,errorSystem:s}=M(t,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),d={uid:this.genHashName(),item:t,size:t.size,meta:this.metaData,uploaded:!1,valid:e,error:{type:e?void 0:a,message:e?void 0:i,system_message:e?void 0:s},progress:0,deleted:!1,xhr:!1,url:!1};this.files.set(t.name,d),e&&!this.external?await this.uploadFile(d):e&&this.external?(this.updateValueInMap(d.item.name,"pending",!0,!1),this.updateValueInMap(d.item.name,"group","pending",!0)):e||this.updateValueInMap(t.name,"valid",!1,!0),this.kick()}this.resetFormFields(),this.metaData=void 0,this.duetChange.emit({originalEvent:t,data:{files:this.files},component:"duet-upload"})}get element(){return s(this)}static get watchers(){return{valid:["watchValidHandler"]}}};C.style="*,*::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:16px;line-height:1.4rem}.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}";export{T as duet_editable_table,S as duet_table,C as duet_upload}
@@ -1,4 +0,0 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(r){for(var t,n=1,e=arguments.length;n<e;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))r[i]=t[i]}return r};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(r,t,n,e){function i(r){return r instanceof n?r:new n((function(t){t(r)}))}return new(n||(n=Promise))((function(n,a){function o(r){try{f(e.next(r))}catch(r){a(r)}}function u(r){try{f(e["throw"](r))}catch(r){a(r)}}function f(r){r.done?n(r.value):i(r.value).then(o,u)}f((e=e.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},e,i,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(r){return function(t){return f([r,t])}}function f(u){if(e)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(n=0)),n)try{if(e=1,i&&(a=u[0]&2?i["return"]:u[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;if(i=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;i=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1];a=u;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(u);break}if(a[2])n.ops.pop();n.trys.pop();continue}u=t.call(r,n)}catch(r){u=[6,r];i=0}finally{e=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __rest=this&&this.__rest||function(r,t){var n={};for(var e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&t.indexOf(e)<0)n[e]=r[e];if(r!=null&&typeof Object.getOwnPropertySymbols==="function")for(var i=0,e=Object.getOwnPropertySymbols(r);i<e.length;i++){if(t.indexOf(e[i])<0&&Object.prototype.propertyIsEnumerable.call(r,e[i]))n[e[i]]=r[e[i]]}return n};var __spreadArray=this&&this.__spreadArray||function(r,t,n){if(n||arguments.length===2)for(var e=0,i=t.length,a;e<i;e++){if(a||!(e in t)){if(!a)a=Array.prototype.slice.call(t,0,e);a[e]=t[e]}}return r.concat(a||Array.prototype.slice.call(t))};
2
- /*!
3
- * Built with Duet Design System
4
- */System.register([],(function(r){"use strict";return{execute:function(){var t=this;var n=Math.min;var e=Math.max;var i={left:"right",right:"left",bottom:"top",top:"bottom"};var a={start:"end",end:"start"};function o(r,t,i){return e(r,n(t,i))}function u(r,t){return typeof r==="function"?r(t):r}function f(r){return r.split("-")[0]}function c(r){return r.split("-")[1]}function s(r){return r==="x"?"y":"x"}function v(r){return r==="y"?"height":"width"}function l(r){return["top","bottom"].includes(f(r))?"y":"x"}function d(r){return s(l(r))}function h(r,t,n){if(n===void 0){n=false}var e=c(r);var i=d(r);var a=v(i);var o=i==="x"?e===(n?"end":"start")?"right":"left":e==="start"?"bottom":"top";if(t.reference[a]>t.floating[a]){o=m(o)}return[o,m(o)]}function _(r){var t=m(r);return[g(r),t,g(t)]}function g(r){return r.replace(/start|end/g,(function(r){return a[r]}))}function y(r,t,n){var e=["left","right"];var i=["right","left"];var a=["top","bottom"];var o=["bottom","top"];switch(r){case"top":case"bottom":if(n)return t?i:e;return t?e:i;case"left":case"right":return t?a:o;default:return[]}}function p(r,t,n,e){var i=c(r);var a=y(f(r),n==="start",e);if(i){a=a.map((function(r){return r+"-"+i}));if(t){a=a.concat(a.map(g))}}return a}function m(r){return r.replace(/left|right|bottom|top/g,(function(r){return i[r]}))}function x(r){return __assign({top:0,right:0,bottom:0,left:0},r)}function w(r){return typeof r!=="number"?x(r):{top:r,right:r,bottom:r,left:r}}function b(r){return __assign(__assign({},r),{top:r.y,left:r.x,right:r.x+r.width,bottom:r.y+r.height})}function A(r,t,n){var e=r.reference,i=r.floating;var a=l(t);var o=d(t);var u=v(o);var s=f(t);var h=a==="y";var _=e.x+e.width/2-i.width/2;var g=e.y+e.height/2-i.height/2;var y=e[u]/2-i[u]/2;var p;switch(s){case"top":p={x:_,y:e.y-i.height};break;case"bottom":p={x:_,y:e.y+e.height};break;case"right":p={x:e.x+e.width,y:g};break;case"left":p={x:e.x-i.width,y:g};break;default:p={x:e.x,y:e.y}}switch(c(t)){case"start":p[o]-=y*(n&&h?-1:1);break;case"end":p[o]+=y*(n&&h?-1:1);break}return p}var k=function(r,n,e){return __awaiter(t,void 0,void 0,(function(){var t,i,a,o,u,f,c,s,v,l,d,h,_,g,y,p,m,x,w,b,k,S,R,O,j,P;var T,C;return __generator(this,(function(F){switch(F.label){case 0:t=e.placement,i=t===void 0?"bottom":t,a=e.strategy,o=a===void 0?"absolute":a,u=e.middleware,f=u===void 0?[]:u,c=e.platform;s=f.filter(Boolean);return[4,c.isRTL==null?void 0:c.isRTL(n)];case 1:v=F.sent();return[4,c.getElementRects({reference:r,floating:n,strategy:o})];case 2:l=F.sent();d=A(l,i,v),h=d.x,_=d.y;g=i;y={};p=0;m=0;F.label=3;case 3:if(!(m<s.length))return[3,11];x=s[m],w=x.name,b=x.fn;return[4,b({x:h,y:_,initialPlacement:i,placement:g,strategy:o,middlewareData:y,rects:l,platform:c,elements:{reference:r,floating:n}})];case 4:k=F.sent(),S=k.x,R=k.y,O=k.data,j=k.reset;h=S!=null?S:h;_=R!=null?R:_;y=__assign(__assign({},y),(T={},T[w]=__assign(__assign({},y[w]),O),T));if(!(j&&p<=50))return[3,10];p++;if(!(typeof j==="object"))return[3,9];if(j.placement){g=j.placement}if(!j.rects)return[3,8];if(!(j.rects===true))return[3,6];return[4,c.getElementRects({reference:r,floating:n,strategy:o})];case 5:P=F.sent();return[3,7];case 6:P=j.rects;F.label=7;case 7:l=P;F.label=8;case 8:C=A(l,g,v),h=C.x,_=C.y;F.label=9;case 9:m=-1;return[3,10];case 10:m++;return[3,3];case 11:return[2,{x:h,y:_,placement:g,strategy:o,middlewareData:y}]}}))}))};function S(r,t){return __awaiter(this,void 0,void 0,(function(){var n,e,i,a,o,f,c,s,v,l,d,h,_,g,y,p,m,x,A,k,S,R,O,j,P,T,C,F,M,D,L,E,N,B;var G;return __generator(this,(function(H){switch(H.label){case 0:if(t===void 0){t={}}e=r.x,i=r.y,a=r.platform,o=r.rects,f=r.elements,c=r.strategy;s=u(t,r),v=s.boundary,l=v===void 0?"clippingAncestors":v,d=s.rootBoundary,h=d===void 0?"viewport":d,_=s.elementContext,g=_===void 0?"floating":_,y=s.altBoundary,p=y===void 0?false:y,m=s.padding,x=m===void 0?0:m;A=w(x);k=g==="floating"?"reference":"floating";S=f[p?k:g];O=b;P=(j=a).getClippingRect;G={};return[4,a.isElement==null?void 0:a.isElement(S)];case 1:if(!((n=H.sent())!=null?n:true))return[3,2];T=S;return[3,5];case 2:C=S.contextElement;if(C)return[3,4];return[4,a.getDocumentElement==null?void 0:a.getDocumentElement(f.floating)];case 3:C=H.sent();H.label=4;case 4:T=C;H.label=5;case 5:return[4,P.apply(j,[(G.element=T,G.boundary=l,G.rootBoundary=h,G.strategy=c,G)])];case 6:R=O.apply(void 0,[H.sent()]);F=g==="floating"?__assign(__assign({},o.floating),{x:e,y:i}):o.reference;return[4,a.getOffsetParent==null?void 0:a.getOffsetParent(f.floating)];case 7:M=H.sent();return[4,a.isElement==null?void 0:a.isElement(M)];case 8:if(!H.sent())return[3,10];return[4,a.getScale==null?void 0:a.getScale(M)];case 9:L=H.sent()||{x:1,y:1};return[3,11];case 10:L={x:1,y:1};H.label=11;case 11:D=L;N=b;if(!a.convertOffsetParentRelativeRectToViewportRelativeRect)return[3,13];return[4,a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:F,offsetParent:M,strategy:c})];case 12:B=H.sent();return[3,14];case 13:B=F;H.label=14;case 14:E=N.apply(void 0,[B]);return[2,{top:(R.top-E.top+A.top)/D.y,bottom:(E.bottom-R.bottom+A.bottom)/D.y,left:(R.left-E.left+A.left)/D.x,right:(E.right-R.right+A.right)/D.x}]}}))}))}var R=r("a",(function(r){return{name:"arrow",options:r,fn:function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,a,f,s,l,h,_,g,y,p,m,x,b,A,k,S,R,O,j,P,T,C,F,M,D,L,E,N,B,G,H,V,W;var q,z;return __generator(this,(function(I){switch(I.label){case 0:e=t.x,i=t.y,a=t.placement,f=t.rects,s=t.platform,l=t.elements;h=u(r,t)||{},_=h.element,g=h.padding,y=g===void 0?0:g;if(_==null){return[2,{}]}p=w(y);m={x:e,y:i};x=d(a);b=v(x);return[4,s.getDimensions(_)];case 1:A=I.sent();k=x==="y";S=k?"top":"left";R=k?"bottom":"right";O=k?"clientHeight":"clientWidth";j=f.reference[b]+f.reference[x]-m[x]-f.floating[b];P=m[x]-f.reference[x];return[4,s.getOffsetParent==null?void 0:s.getOffsetParent(_)];case 2:T=I.sent();C=T?T[O]:0;F=!C;if(F)return[3,4];return[4,s.isElement==null?void 0:s.isElement(T)];case 3:F=!I.sent();I.label=4;case 4:if(F){C=l.floating[O]||f.floating[b]}M=j/2-P/2;D=C/2-A[b]/2-1;L=n(p[S],D);E=n(p[R],D);N=L;B=C-A[b]-E;G=C/2-A[b]/2+M;H=o(N,G,B);V=c(a)!=null&&G!=H&&f.reference[b]/2-(G<N?L:E)-A[b]/2<0;W=V?G<N?N-G:B-G:0;return[2,(q={},q[x]=m[x]-W,q.data=(z={},z[x]=H,z.centerOffset=G-H+W,z),q)]}}))}))}}}));var O=r("f",(function(r){if(r===void 0){r={}}return{name:"flip",options:r,fn:function(t){return __awaiter(this,void 0,void 0,(function(){var n,e,i,a,o,c,s,v,l,d,g,y,x,w,b,A,k,R,O,j,P,T,C,F,M,D,L,E,N,B,G,H,V,W,q,z;return __generator(this,(function(I){switch(I.label){case 0:e=t.placement,i=t.middlewareData,a=t.rects,o=t.initialPlacement,c=t.platform,s=t.elements;v=u(r,t),l=v.mainAxis,d=l===void 0?true:l,g=v.crossAxis,y=g===void 0?true:g,x=v.fallbackPlacements,w=v.fallbackStrategy,b=w===void 0?"bestFit":w,A=v.fallbackAxisSideDirection,k=A===void 0?"none":A,R=v.flipAlignment,O=R===void 0?true:R,j=__rest(v,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);P=f(e);T=f(o)===o;return[4,c.isRTL==null?void 0:c.isRTL(s.floating)];case 1:C=I.sent();F=x||(T||!O?[m(o)]:_(o));if(!x&&k!=="none"){F.push.apply(F,p(o,O,k,C))}M=__spreadArray([o],F,true);return[4,S(t,j)];case 2:D=I.sent();L=[];E=((n=i.flip)==null?void 0:n.overflows)||[];if(d){L.push(D[P])}if(y){N=h(e,a,C);L.push(D[N[0]],D[N[1]])}E=__spreadArray(__spreadArray([],E,true),[{placement:e,overflows:L}],false);if(!L.every((function(r){return r<=0}))){H=(((B=i.flip)==null?void 0:B.index)||0)+1;V=M[H];if(V){return[2,{data:{index:H,overflows:E},reset:{placement:V}}]}W=(G=E.filter((function(r){return r.overflows[0]<=0})).sort((function(r,t){return r.overflows[1]-t.overflows[1]}))[0])==null?void 0:G.placement;if(!W){switch(b){case"bestFit":{z=(q=E.map((function(r){return[r.placement,r.overflows.filter((function(r){return r>0})).reduce((function(r,t){return r+t}),0)]})).sort((function(r,t){return r[1]-t[1]}))[0])==null?void 0:q[0];if(z){W=z}break}case"initialPlacement":W=o;break}}if(e!==W){return[2,{reset:{placement:W}}]}}return[2,{}]}}))}))}}}));function j(r,t){return __awaiter(this,void 0,void 0,(function(){var n,e,i,a,o,s,v,d,h,_,g,y,p,m;return __generator(this,(function(x){switch(x.label){case 0:n=r.placement,e=r.platform,i=r.elements;return[4,e.isRTL==null?void 0:e.isRTL(i.floating)];case 1:a=x.sent();o=f(n);s=c(n);v=l(n)==="y";d=["left","top"].includes(o)?-1:1;h=a&&v?-1:1;_=u(t,r);g=typeof _==="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:__assign({mainAxis:0,crossAxis:0,alignmentAxis:null},_),y=g.mainAxis,p=g.crossAxis,m=g.alignmentAxis;if(s&&typeof m==="number"){p=s==="end"?m*-1:m}return[2,v?{x:p*h,y:y*d}:{x:y*d,y:p*h}]}}))}))}var P=r("o",(function(r){if(r===void 0){r=0}return{name:"offset",options:r,fn:function(t){return __awaiter(this,void 0,void 0,(function(){var n,e,i;return __generator(this,(function(a){switch(a.label){case 0:n=t.x,e=t.y;return[4,j(t,r)];case 1:i=a.sent();return[2,{x:n+i.x,y:e+i.y,data:i}]}}))}))}}}));var T=r("s",(function(r){if(r===void 0){r={}}return{name:"shift",options:r,fn:function(t){return __awaiter(this,void 0,void 0,(function(){var n,e,i,a,c,v,d,h,_,g,y,p,m,x,w,b,A,k,R,O,j,k,R,P,T,C;var F;return __generator(this,(function(M){switch(M.label){case 0:n=t.x,e=t.y,i=t.placement;a=u(r,t),c=a.mainAxis,v=c===void 0?true:c,d=a.crossAxis,h=d===void 0?false:d,_=a.limiter,g=_===void 0?{fn:function(r){var t=r.x,n=r.y;return{x:t,y:n}}}:_,y=__rest(a,["mainAxis","crossAxis","limiter"]);p={x:n,y:e};return[4,S(t,y)];case 1:m=M.sent();x=l(f(i));w=s(x);b=p[w];A=p[x];if(v){k=w==="y"?"top":"left";R=w==="y"?"bottom":"right";O=b+m[k];j=b-m[R];b=o(O,b,j)}if(h){k=x==="y"?"top":"left";R=x==="y"?"bottom":"right";P=A+m[k];T=A-m[R];A=o(P,A,T)}C=g.fn(__assign(__assign({},t),(F={},F[w]=b,F[x]=A,F)));return[2,__assign(__assign({},C),{data:{x:C.x-n,y:C.y-e}})]}}))}))}}}));function C(r){var t;return((t=r.ownerDocument)==null?void 0:t.defaultView)||window}function F(r){return C(r).getComputedStyle(r)}function M(r){return r instanceof C(r).Node}function D(r){return M(r)?(r.nodeName||"").toLowerCase():""}function L(r){return r instanceof C(r).HTMLElement}function E(r){return r instanceof C(r).Element}function N(r){if(typeof ShadowRoot==="undefined"){return false}var t=C(r).ShadowRoot;return r instanceof t||r instanceof ShadowRoot}function B(r){var t=F(r),n=t.overflow,e=t.overflowX,i=t.overflowY,a=t.display;return/auto|scroll|overlay|hidden|clip/.test(n+i+e)&&!["inline","contents"].includes(a)}function G(r){return["table","td","th"].includes(D(r))}function H(r){var t=V();var n=F(r);return n.transform!=="none"||n.perspective!=="none"||!t&&(n.backdropFilter?n.backdropFilter!=="none":false)||!t&&(n.filter?n.filter!=="none":false)||["transform","perspective","filter"].some((function(r){return(n.willChange||"").includes(r)}))||["paint","layout","strict","content"].some((function(r){return(n.contain||"").includes(r)}))}function V(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function W(r){return["html","body","#document"].includes(D(r))}var q=Math.min;var z=Math.max;var I=Math.round;function J(r){var t=F(r);var n=parseFloat(t.width)||0;var e=parseFloat(t.height)||0;var i=L(r);var a=i?r.offsetWidth:n;var o=i?r.offsetHeight:e;var u=I(n)!==a||I(e)!==o;if(u){n=a;e=o}return{width:n,height:e,fallback:u}}function K(r){return!E(r)?r.contextElement:r}var Q={x:1,y:1};function U(r){var t=K(r);if(!L(t)){return Q}var n=t.getBoundingClientRect();var e=J(t),i=e.width,a=e.height,o=e.fallback;var u=(o?I(n.width):n.width)/i;var f=(o?I(n.height):n.height)/a;if(!u||!Number.isFinite(u)){u=1}if(!f||!Number.isFinite(f)){f=1}return{x:u,y:f}}var X={x:0,y:0};function Y(r,t,n){var e,i;if(t===void 0){t=true}if(!V()){return X}var a=r?C(r):window;if(!n||t&&n!==a){return X}return{x:((e=a.visualViewport)==null?void 0:e.offsetLeft)||0,y:((i=a.visualViewport)==null?void 0:i.offsetTop)||0}}function Z(r,t,n,e){if(t===void 0){t=false}if(n===void 0){n=false}var i=r.getBoundingClientRect();var a=K(r);var o=Q;if(t){if(e){if(E(e)){o=U(e)}}else{o=U(r)}}var u=Y(a,n,e);var f=(i.left+u.x)/o.x;var c=(i.top+u.y)/o.y;var s=i.width/o.x;var v=i.height/o.y;if(a){var l=C(a);var d=e&&E(e)?C(e):e;var h=l.frameElement;while(h&&e&&d!==l){var _=U(h);var g=h.getBoundingClientRect();var y=getComputedStyle(h);g.x+=(h.clientLeft+parseFloat(y.paddingLeft))*_.x;g.y+=(h.clientTop+parseFloat(y.paddingTop))*_.y;f*=_.x;c*=_.y;s*=_.x;v*=_.y;f+=g.x;c+=g.y;h=C(h).frameElement}}return b({width:s,height:v,x:f,y:c})}function $(r){return((M(r)?r.ownerDocument:r.document)||window.document).documentElement}function rr(r){if(E(r)){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}return{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function tr(r){var t=r.rect,n=r.offsetParent,e=r.strategy;var i=L(n);var a=$(n);if(n===a){return t}var o={scrollLeft:0,scrollTop:0};var u={x:1,y:1};var f={x:0,y:0};if(i||!i&&e!=="fixed"){if(D(n)!=="body"||B(a)){o=rr(n)}if(L(n)){var c=Z(n);u=U(n);f.x=c.x+n.clientLeft;f.y=c.y+n.clientTop}}return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-o.scrollLeft*u.x+f.x,y:t.y*u.y-o.scrollTop*u.y+f.y}}function nr(r){return Z($(r)).left+rr(r).scrollLeft}function er(r){var t=$(r);var n=rr(r);var e=r.ownerDocument.body;var i=z(t.scrollWidth,t.clientWidth,e.scrollWidth,e.clientWidth);var a=z(t.scrollHeight,t.clientHeight,e.scrollHeight,e.clientHeight);var o=-n.scrollLeft+nr(r);var u=-n.scrollTop;if(F(e).direction==="rtl"){o+=z(t.clientWidth,e.clientWidth)-i}return{width:i,height:a,x:o,y:u}}function ir(r){if(D(r)==="html"){return r}var t=r.assignedSlot||r.parentNode||N(r)&&r.host||$(r);return N(t)?t.host:t}function ar(r){var t=ir(r);if(W(t)){return t.ownerDocument.body}if(L(t)&&B(t)){return t}return ar(t)}function or(r,t){var n;if(t===void 0){t=[]}var e=ar(r);var i=e===((n=r.ownerDocument)==null?void 0:n.body);var a=C(e);if(i){return t.concat(a,a.visualViewport||[],B(e)?e:[])}return t.concat(e,or(e))}function ur(r,t){var n=C(r);var e=$(r);var i=n.visualViewport;var a=e.clientWidth;var o=e.clientHeight;var u=0;var f=0;if(i){a=i.width;o=i.height;var c=V();if(!c||c&&t==="fixed"){u=i.offsetLeft;f=i.offsetTop}}return{width:a,height:o,x:u,y:f}}function fr(r,t){var n=Z(r,true,t==="fixed");var e=n.top+r.clientTop;var i=n.left+r.clientLeft;var a=L(r)?U(r):{x:1,y:1};var o=r.clientWidth*a.x;var u=r.clientHeight*a.y;var f=i*a.x;var c=e*a.y;return{width:o,height:u,x:f,y:c}}function cr(r,t,n){var e;if(t==="viewport"){e=ur(r,n)}else if(t==="document"){e=er($(r))}else if(E(t)){e=fr(t,n)}else{var i=Y(r);e=__assign(__assign({},t),{x:t.x-i.x,y:t.y-i.y})}return b(e)}function sr(r,t){var n=ir(r);if(n===t||!E(n)||W(n)){return false}return F(n).position==="fixed"||sr(n,t)}function vr(r,t){var n=t.get(r);if(n){return n}var e=or(r).filter((function(r){return E(r)&&D(r)!=="body"}));var i=null;var a=F(r).position==="fixed";var o=a?ir(r):r;while(E(o)&&!W(o)){var u=F(o);var f=H(o);if(!f&&u.position==="fixed"){i=null}var c=a?!f&&!i:!f&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||B(o)&&!f&&sr(r,o);if(c){e=e.filter((function(r){return r!==o}))}else{i=u}o=ir(o)}t.set(r,e);return e}function lr(r){var t=r.element,n=r.boundary,e=r.rootBoundary,i=r.strategy;var a=n==="clippingAncestors"?vr(t,this._c):[].concat(n);var o=__spreadArray(__spreadArray([],a,true),[e],false);var u=o[0];var f=o.reduce((function(r,n){var e=cr(t,n,i);r.top=z(e.top,r.top);r.right=q(e.right,r.right);r.bottom=q(e.bottom,r.bottom);r.left=z(e.left,r.left);return r}),cr(t,u,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function dr(r){return J(r)}function hr(r,t){if(!L(r)||F(r).position==="fixed"){return null}if(t){return t(r)}return r.offsetParent}function _r(r){var t=ir(r);while(L(t)&&!W(t)){if(H(t)){return t}else{t=ir(t)}}return null}function gr(r,t){var n=C(r);if(!L(r)){return n}var e=hr(r,t);while(e&&G(e)&&F(e).position==="static"){e=hr(e,t)}if(e&&(D(e)==="html"||D(e)==="body"&&F(e).position==="static"&&!H(e))){return n}return e||_r(r)||n}function yr(r,t,n){var e=L(t);var i=$(t);var a=n==="fixed";var o=Z(r,true,a,t);var u={scrollLeft:0,scrollTop:0};var f={x:0,y:0};if(e||!e&&!a){if(D(t)!=="body"||B(i)){u=rr(t)}if(L(t)){var c=Z(t,true,a,t);f.x=c.x+t.clientLeft;f.y=c.y+t.clientTop}else if(i){f.x=nr(i)}}return{x:o.left+u.scrollLeft-f.x,y:o.top+u.scrollTop-f.y,width:o.width,height:o.height}}var pr={getClippingRect:lr,convertOffsetParentRelativeRectToViewportRelativeRect:tr,isElement:E,getDimensions:dr,getOffsetParent:gr,getDocumentElement:$,getScale:U,getElementRects:function(r){return __awaiter(this,void 0,void 0,(function(){var t,n,e,i,a,o,u,f;var c;return __generator(this,(function(s){switch(s.label){case 0:t=r.reference,n=r.floating,e=r.strategy;i=this.getOffsetParent||gr;a=this.getDimensions;c={};o=yr;u=[t];return[4,i(n)];case 1:c.reference=o.apply(void 0,u.concat([s.sent(),e]));f=[{x:0,y:0}];return[4,a(n)];case 2:return[2,(c.floating=__assign.apply(void 0,f.concat([s.sent()])),c)]}}))}))},getClientRects:function(r){return Array.from(r.getClientRects())},isRTL:function(r){return F(r).direction==="rtl"}};var mr=r("c",(function(r,t,n){var e=new Map;var i=__assign({platform:pr},n);var a=__assign(__assign({},i.platform),{_c:e});return k(r,t,__assign(__assign({},i),{platform:a}))}))}}}));
@@ -1,4 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,a){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function d(t){try{l(a.next(t))}catch(t){r(t)}}function o(t){try{l(a["throw"](t))}catch(t){r(t)}}function l(t){t.done?i(t.value):n(t.value).then(d,o)}l((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,n,r,d;return d={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function o(t){return function(e){return l([t,e])}}function l(o){if(a)throw new TypeError("Generator is already executing.");while(d&&(d=0,o[0]&&(i=0)),i)try{if(a=1,n&&(r=o[0]&2?n["return"]:o[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;if(n=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;n=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=e.call(t,i)}catch(t){o=[6,t];n=0}finally{a=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,i){if(i||arguments.length===2)for(var a=0,n=e.length,r;a<n;a++){if(r||!(a in e)){if(!r)r=Array.prototype.slice.call(e,0,a);r[a]=e[a]}}return t.concat(r||Array.prototype.slice.call(e))};
2
- /*!
3
- * Built with Duet Design System
4
- */System.register(["./p-ffb8996b.system.js","./p-50f4bca2.system.js","./p-41982d26.system.js","./p-b2716337.system.js","./p-224f6c46.system.js","./p-e1868c94.system.js","./p-abdbce02.system.js","./p-e6b5a1c7.system.js","./p-da20db91.system.js","./p-6ef75455.system.js"],(function(t){"use strict";var e,i,a,n,r,d,o,l,s,u,h,f,b,p,c,m,g,v,y,x,w,k;return{setters:[function(t){e=t.h;i=t.r;a=t.c;n=t.H;r=t.g;d=t.F},function(t){o=t.i},function(t){l=t.f;s=t.d},function(t){u=t.i},function(t){h=t.a;f=t.c;b=t.d;p=t.g;c=t.s},function(t){m=t.p;g=t.s},function(t){v=t.b;y=t.a},function(t){x=t.c},function(t){w=t.g;k=t.a},function(){}],execute:function(){var _=function(t,i){var a=t.data,n=t.groupId,r=t.alignment;var d="duet-editable-table duet-editable-table-content-".concat(n);if(typeof a==="string"){return e("td",{innerHTML:a,class:d,part:"".concat(n,"content"),style:{verticalAlign:r}})}else{return e("td",{class:d,part:"".concat(n,"content"),style:{verticalAlign:r}},a)}};var T=".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 j=t("duet_editable_table",function(){function t(t){var e=this;i(this,t);this.duetTableToggle=a(this,"duetTableToggle",7);this.duetMenuClick=a(this,"duetMenuClick",7);this.hasHeadSlotFirst=false;this.hasHeadSlotLast=false;this.hasFootSlot=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(t,i){i.preventDefault();var a=t.sort_order,n=t.direction,r=t.index,d=t.key;e.duetTableToggle.emit({sort_order:a,index:r,direction:n,key:d,component:"duet-editable-table",originalEvent:i})};this.handleKeyDown=function(t,i){if(u(i)){e.toggleColumn(t,i)}};this.language=h();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}t.prototype.componentWillLoad=function(){o(this);this.hasHeadSlotFirst=!!this.element.querySelector("[slot='thead-first']");this.hasHeadSlotLast=!!this.element.querySelector("[slot='thead-last']");this.hasFootSlot=!!this.element.querySelector("[slot='tfoot']")};t.prototype.connectedCallback=function(){f(this)};t.prototype.disconnectedCallback=function(){b(this)};t.prototype.createLabel=function(t){var i=this;var a=t.sort_order,n=t.direction,r=t.index,d=t.label;var o=p(d);if(!this.sortable){return o}var l=function(){if(!!a&&n===1){return"action-arrow-down-small"}else if(!!a&&n===-1){return"action-arrow-up-small"}return"action-subtract-small"};return e("span",{class:"duet-table-label","data-index":r},e("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(e){return i.toggleColumn(t,e)},onKeyDown:function(e){return i.handleKeyDown(t,e)}},o))};t.prototype.getSortedColumns=function(){return __spreadArray([],this.columns,true).sort(l(["index"]))};t.prototype.getRowSortOrder=function(){var t=__spreadArray([],this.columns,true).sort(l(["sort_order"]));return t.filter((function(t){return t.sort_order})).map((function(t){return t.direction===-1?"-".concat(t.key):t.key}))};t.prototype.renderTableHeader=function(){var t=this;if(!this.columns){return}var i=this.getSortedColumns();return e("tr",{class:{"duet-table-action-header":!!this.actions}},i.map((function(i){if(i.display!==false){var a=t.createLabel(i);return a!==""?e("th",{scope:"col"},a):e("td",null)}})),this.actions&&e("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&e("duet-visually-hidden",null,this.actionColumnLabel[this.language])))};t.prototype.renderActions=function(t,i){var a=this;if(!this.actions){return}return e("td",{class:"duet-text-right"},this.actions.map((function(n){return e("duet-action-button",{actionMeta:Object.assign({},(t===null||t===void 0?void 0:t.meta)||{},{index:i}),actionId:(t===null||t===void 0?void 0:t.uid)||(t===null||t===void 0?void 0:t.id)||null,actionName:n.name,theme:a.theme,iconName:n.icon,iconColor:n.color,iconSize:n.size,background:n.background,"accessible-label":"".concat(t.actionDescription||""," ").concat(p(n.label)," ")})})))};t.prototype.renderTableBody=function(){var t=this;var i=this.getSortedColumns();var a=this.getRowSortOrder();var n=__spreadArray([],this.rows,true).sort(l(a));return n.map((function(a,n){var r;return e("tr",{class:(r={"duet-table-action-row":!!t.actions,"duet-editable-table-row":true},r["duet-editable-table-row-".concat(t.groupId)]=true,r),"data-meta":JSON.stringify(a.meta)},i.map((function(i){var n=a[i.key]?a[i.key]:a.item;if(i.display!==false){return e(_,{data:n,groupId:t.groupId})}})),t.actions&&t.renderActions(a,n))}))};t.prototype.render=function(){var t;return e(n,{class:(t={},t["duet-editable-table-".concat(this.variation)]=true,t["duet-editable-table"]=true,t["duet-editable-table-".concat(this.theme)]=true,t["duet-editable-table-scrollable"]=this.breakpoint==="none-scrollable",t["duet-editable-table-sortable"]=this.sortable,t["duet-editable-table-actions"]=!!this.actions,t["duet-m-0"]=this.margin==="none",t["duet-theme-turva"]=this.theme==="turva",t)},e("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},e("table",{role:this.accessibleRole},e("caption",null,e("slot",{name:"tcaption"})),e("thead",null,this.hasHeadSlotFirst&&e("tr",null,e("td",{class:"duet-editable-table-actions-menu",colSpan:99},e("slot",{name:"thead-first"}))),this.renderTableHeader(),this.hasHeadSlotLast&&e("tr",null,e("td",{class:"duet-editable-table-actions-menu",colSpan:99},e("slot",{name:"thead-last"})))),e("tbody",null,this.renderTableBody()),this.hasFootSlot&&e("tfoot",null,e("tr",null,e("td",{class:"duet-editable-table-footer-menu",colSpan:99},e("slot",{name:"tfoot"})))))))};Object.defineProperty(t.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());j.style=T;var E='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 span.duet-table-cell-heading{display:none}.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 td span.duet-table-cell-heading{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:rgb(0, 41, 77)}.duet-table-flattened.duet-theme-turva td span.duet-table-cell-heading{color:rgb(23, 28, 58)}.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-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 S={none:0,"with-links":parseFloat(m)*16,"without-links":parseFloat(g)*16};var L=t("duet_table",function(){function t(t){var e=this;i(this,t);this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu)";this.handleMediaQueryChange=function(t){e.matchesBreakpoint=v.includes(e.breakpoint)?!t.matches:t.matches};this.matchesBreakpoint=true;this.language=h();this.theme=undefined;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.hideHeadVisually=false}t.prototype.watchLanguageStateHandler=function(t,e){var i=this;if(t!==e){setTimeout((function(){return i.copyHeadingsToCells()}),50)}};t.prototype.connectedCallback=function(){var t=this;var e=this.breakpoint==="none"||this.breakpoint==="none-scrollable"?"all":y[this.breakpoint];this.mq=matchMedia(e);this.mq.addEventListener("change",s(this.handleMediaQueryChange,50));this.handleMediaQueryChange(this.mq);this.observer=new MutationObserver((function(){return s(t.copyHeadingsToCells(),50)}));this.observer.observe(this.element,{childList:true,subtree:true})};t.prototype.componentWillLoad=function(){o(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 t=S[this.stickyDistance];var e=this.element.querySelectorAll(this.headingSelector);e.forEach((function(e){return e.style.top="".concat(t,"px")}))}};t.prototype.componentDidLoad=function(){this.observer?this.observer.takeRecords():null;f(this)};t.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true;b(this)};t.prototype.copyHeadingsToCells=function(){var t=this.element.querySelectorAll(this.headingSelector);var e=this.element.querySelectorAll("tbody tr");var i=Array.from(t).map((function(t){return t.textContent.trim()}));e.forEach((function(t){t.querySelectorAll("td").forEach((function(t,e){if(i[e]){var a=t.querySelector(".duet-table-cell-heading");if(!a||a.textContent!==i[e]){a===null||a===void 0?void 0:a.remove();var n=document.createElement("span");n.textContent=i[e];n.classList.add("duet-table-cell-heading");n.setAttribute("aria-hidden","true");n.inert=true;t.prepend(n)}}}))}))};t.prototype.render=function(){var t;return e(n,{class:(t={},t["duet-table-".concat(this.variation)]=true,t["duet-table-flattened"]=!this.matchesBreakpoint,t["duet-table-sticky"]=this.matchesBreakpoint&&this.sticky,t["duet-table-scrollable"]=this.breakpoint==="none-scrollable",t["duet-m-0"]=this.margin==="none",t["duet-theme-turva"]=this.theme==="turva",t["duet-table-hide-head-visually"]=this.hideHeadVisually,t)},e("slot",null))};Object.defineProperty(t.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{language:["watchLanguageStateHandler"]}},enumerable:false,configurable:true});return t}());L.style=E;var z=[{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-203",system_message:"Files to upload exceed total byte size limit",message:{fi:"Yritit lisätä tiedostoja, jotka ylittäisivät suurimman sallitun yhteenlasketun koon.",sv:"Du försökte lägga till filer som skulle överskrida den maximala kombinerade storleken.",en:"You tried to add files that would exceed the maximum combined size."}},{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."}},{type:"duet-upload-302",system_message:"Files to upload exceeds limits",message:{fi:"Et voi lähettää enempää kuin enimmäismäärän liitteitä.",sv:"Du kan inte ladda upp fler än det maximala antalet bilagor.",en:"You can't upload more than maximum number of attachments."}}];var A={fi:"Liiteluettelo",sv:"Lista över bilagor",en:"Attachments list"};var F=function(t){var i=t.label,a=t.categoryLabel;return e("div",{class:"items-header",tabindex:"-1","aria-label":p(A)},a&&e("duet-heading",{class:"category-header",border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},p(a)),e("duet-heading",{class:{"filename-header":true,"no-category":!a},border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},p(i)))};var M=function(t,e){if(!e){return true}var i=t.split(".");var a=e.split(",");var n=i[i.length-1];return a.includes(n)};var U=function(t,e){if(!e||!t){return true}var i=e.split(",");var a=false;i.forEach((function(e){var i=e.split("/");var n=t.split("/");if(i[0]===n[0]&&(i[1]===n[1]||i[1]==="*")){a=true}}));return a};var D=function(t,e){if(!e||!t){return true}return e>=t};var C=function(t,e,i){var a=e.allowedMimetypes,n=e.allowedExtensions,r=e.maxBytes;var d=false;var o=w("default",i);if(t){var l=t.name,s=t.type,u=t.size;var h=U(s,a);var f=n==="all"||n===""||n===" "||n===undefined?true:M(l.toLowerCase(),n);var b=D(u,r);if(!h){o=w("duet-upload-101",i)}if(!f){o=w("duet-upload-100",i)}if(!b){o=w("duet-upload-201",i)}d=h&&f&&b}else{d=false}return{valid:d,errorMessage:d?undefined:p(o.message),errorSystem:d?undefined:o.system_message,errorType:d?undefined:o.type}};var P=function(t,e){var i=0;if(e){t.forEach((function(t){if(t.valid&&t.size){i+=t.size}}));if(i>=e){return true}}return false};var I=function(t,e){var i=0;if(e){t.forEach((function(t){if(t.valid){i++}}));if(i>=e){return true}}return false};var O=function(t,e,i){if(t+e>i){return true}return false};var W=function(t,e,i){var a=0;if(i){t.forEach((function(t){if(t.valid&&t.size){a+=t.size}}));e.forEach((function(t){if(t.size){a+=t.size}}));if(a>=i){return true}}return false};var R=function(t){var e=t.payload,i=t.options,a=t.onFailure,n=t.onSuccess,r=t.onProgress;var d=i.type,o=d===void 0?"POST":d,l=i.xhr,s=i.uri,u=i.argument,h=u===void 0?null:u,f=i.headers,b=f===void 0?null:f;l.open(o,"".concat(s).concat(h||""),true);var p=e.data,c=e.name;if(b){Object.keys(b).forEach((function(t){l.setRequestHeader(t,b[t])}))}if(o==="POST"){l.onreadystatechange=function(){if(l.readyState===XMLHttpRequest.DONE&&l.status>=200&&l.status<300){n(l,c,l.status)}if(l.readyState===XMLHttpRequest.DONE&&l.status>=300&&l.status<999){a(l,c,l.status)}};r(c)}l.send(p);return l};var N="*,*::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:16px;line-height:1.4rem}.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 Y=t("duet_upload",function(){function t(t){var n=this;i(this,t);this.duetChange=a(this,"duetChange",3);this.duetBlur=a(this,"duetBlur",7);this.duetFocus=a(this,"duetFocus",7);this.duetReady=a(this,"duetReady",7);this.duetDone=a(this,"duetDone",3);this.duetState=a(this,"duetState",3);this.duetDelete=a(this,"duetDelete",3);this.duetCancel=a(this,"duetCancel",3);this.duetProgress=a(this,"duetProgress",3);this.duetUpload=a(this,"duetUpload",3);this.linkClick=a(this,"linkClick",3);this.buttonId=x("DuetButton");this.labelId=x("DuetLabel");this.uploadId=x("DuetUpload");this.filesInProgress=new Map;this.fileMaxReached=false;this.bytesMaxReached=false;this.filesToUploadExceedsLimit=false;this.filesToUploadTotalSizeIsAboveMax=false;this.internalStatusMessageLabel=undefined;this.itemRefs=new Map;this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"};this.kick=s((function(){n.tick=Date.now()}),30);this.categoryLabel={en:"Category",sv:"Filtyp",fi:"Tiedostotyyppi"};this.listenForActionEvents=function(){n.element.addEventListener("duetActionEvent",(function(t){var e=t.detail;var i=e.action,a=e.id,r=e.originalEvent;switch(i){case"delete":n.onDelete(a,r);break;case"cancel":n.onCancel(a,r);break}}))};this.verifyValidity=function(){var t=n.getFilesAsArray(),e=t.invalid,i=t.valid;var a=n.valid;n.valid=e.length===0&&i.length!==0;if(n.valid!==a){n.duetState.emit({originalEvent:undefined,data:{valid:n.valid,from:"componentWillRender"},component:"duet-upload"})}};this.getGroupFromItemData=function(t){if(t.valid&&t.progress===100){return n.DefaultGroups.success}else if(t.progress>0&&t.progress!==100){return n.DefaultGroups.inprogress}else if(!t.valid){return n.DefaultGroups.failure}else if(t.pending){return n.DefaultGroups.pending}else if(t.group){return t.group}else{return"none"}};this.mapFilesToUploadItems=function(t,i,a,r){if(i===n.DefaultGroups.success){return e("duet-upload-item",{theme:n.theme,actions:n.getActions(i,r),type:"success",data:t,showLinks:n.showLinks,linkClickEvent:n.emitEvent?n.linkClick:undefined,categoryLabel:n.categoryLabel,label:n.uploadedItemsHeaderLabel,showCategory:a,ref:function(e){n.itemRefs.set(t.uid,e)}})}else if(i===n.DefaultGroups.inprogress){return e("duet-upload-item",{theme:n.theme,actions:n.getActions(i,r),type:"inprogress",data:t,showLinks:n.showLinks,categoryLabel:n.categoryLabel,label:n.uploadedItemsHeaderLabel,showCategory:a,ref:function(e){n.itemRefs.set(t.uid,e)}})}else if(i===n.DefaultGroups.pending){return e("duet-upload-item",{theme:n.theme,actions:n.getActions(i,r),type:"pending",data:t,showLinks:n.showLinks,categoryLabel:n.categoryLabel,label:n.uploadedItemsHeaderLabel,showCategory:a,ref:function(e){n.itemRefs.set(t.uid,e)}})}else if(i===n.DefaultGroups.failure){return e("duet-upload-item",{theme:n.theme,actions:n.getActions(i,r),type:"failure",data:t,showLinks:n.showLinks,errorCodes:n.errorCodes,categoryLabel:n.categoryLabel,label:n.uploadedItemsHeaderLabel,showCategory:a,ref:function(e){n.itemRefs.set(t.uid,e)}})}else if(t.group){return t.html}else{return"none"}};this.genHashName=function(){return Date.now().toString(36)+Math.random()};this.updateValueInMap=function(t,e,i,a){if(a===void 0){a=true}try{var r=n.files.get(t);r[e]=i;n.files.set(t,r);if(n.external&&e!=="url"){n.trackProgress(t,e==="uploaded")}}catch(t){}if(a){n.kick()}};this.updateProgress=function(t,e){var i=function(i){n.updateValueInMap(e,"progress",i);n.onProgress(e,i,t)};if(t.lengthComputable){var a=t.loaded/t.total*100;i(a)}else{console.log("cant read progress")}};this.trackProgress=function(t,e){if(e===void 0){e=false}if(e){n.filesInProgress.delete(t)}else{n.filesInProgress.set(t,"inprogress")}if(n.filesInProgress.size===0){n.onDone()}};this.getFilesAsArray=function(){var t=[];var e=[];n.files.forEach((function(i){if(i.valid&&!i.deleted){t.push(i)}else if(!i.valid&&!i.deleted){e.push(i)}}));return{valid:t,invalid:e}};this.resetFormFields=function(){n.nativeInput.value=""};this.startUpload=function(t,e){if(e===void 0){e=undefined}return __awaiter(n,void 0,void 0,(function(){var i,a,n;return __generator(this,(function(r){i=this.validateTotals(),a=i.bytesMaxReached,n=i.fileMaxReached;if(a||n){this.kick();return[2]}this.metaData=e;this.nativeInput.click();this.onUpload(t,e);t.stopPropagation();t.preventDefault();return[2]}))}))};this.transferComplete=function(t){n.updateValueInMap(t,"progress",100,false);n.trackProgress(t,true)};this.transferDone=function(t,e,i){n.updateValueInMap(e,"status",i,false);n.updateValueInMap(e,"uploaded",true,false);try{var a=JSON.parse(t.response);n.updateValueInMap(e,"url",a.url)}catch(t){n.updateValueInMap(e,"url",null);console.error("Server did not respond with expected response {url: string}")}return};this.transferDoneWithFailure=function(t,e,i){try{var a=JSON.parse(t.response).error;n.updateValueInMap(e,"error",{message:a.message,type:a.type},false)}catch(t){console.error("Server did not respond with expected response error:{message: string, type: int}");n.updateValueInMap(e,"error",{type:i},false)}n.updateValueInMap(e,"valid",false,true)};this.transferFailed=function(t){n.updateValueInMap(t,"error",k("duet-upload-001",n.errorCodes))};this.transferCanceled=function(t){n.files.delete(t);n.validateTotals(t);n.kick()};this.validateTotals=function(t){var e=P(n.files,n.maxBytesTotal);var i=I(n.files,n.maxFiles);if(e&&t){n.updateValueInMap(t,"error",k("duet-upload-202",n.errorCodes),false)}if(i&&t){n.updateValueInMap(t,"error",k("duet-upload-301",n.errorCodes),false)}n.bytesMaxReached=e;n.fileMaxReached=i;return{bytesMaxReached:e,fileMaxReached:i}};this.uploadFile=function(t,e,i){if(e===void 0){e=false}return __awaiter(n,void 0,void 0,(function(){var a,n,r;return __generator(this,(function(d){switch(d.label){case 0:if(!e&&this.deferUpload){this.updateValueInMap(t.item.name,"pending",true,false);this.updateValueInMap(t.item.name,"group","pending",true)}else if(e){this.updateValueInMap(t.item.name,"pending",false,false);this.updateValueInMap(t.item.name,"group",undefined,true)}d.label=1;case 1:d.trys.push([1,4,,5]);if(!(!this.deferUpload||e))return[3,3];a=new FormData;a.append("file",t.item);if(i){a.append("key",i)}a.append("uid",t.uid);a.append("name",t.item.name);a.append("metadata",JSON.stringify({uid:t.uid,url:this.uri,size:t.item.size,meta:t.meta}));n=t;return[4,this.makeXHRPostRequest(a)];case 2:n.xhr=d.sent();d.label=3;case 3:return[3,5];case 4:r=d.sent();this.updateValueInMap(t.item.name,"valid",false,false);return[3,5];case 5:return[2]}}))}))};this.uploadPendingFiles=function(){for(var t=0,e=Array.from(n.files.entries());t<e.length;t++){var i=e[t],a=i[0],r=i[1];if(r.group==="pending"&&r.pending===true){n.uploadFile(r,true,a)}}};this.getItemFromUID=function(t){for(var e=0,i=Array.from(n.files.entries());e<i.length;e++){var a=i[e],r=a[0],d=a[1];if(d.uid===t){return{value:d,key:r}}}return null};this.handleExternalUploadButton=function(t,e){if(n.externalUploadButton){if(t||e){n.externalUploadButton.disabled=true}else{n.externalUploadButton.disabled=false}}};this.onDelete=function(t,e){var i=n.getItemFromUID(t);var a=i.key;var r=n.files.get(a);n.files.delete(a);var d=n.validateTotals(),o=d.bytesMaxReached,l=d.fileMaxReached;n.handleExternalUploadButton(o,l);n.kick();n.duetDelete.emit({originalEvent:e,data:{deletion:r},component:"duet-upload"});if(!n.external&&!r.pending){n.makeXHRDeleteRequest(r)}n.resetFormFields()};this.onCancel=function(t,e){var i=n.getItemFromUID(t).key;var a=n.files.get(i);n.files.delete(i);var r=n.validateTotals(),d=r.bytesMaxReached,o=r.fileMaxReached;n.handleExternalUploadButton(d,o);if(!n.external){var l=a.xhr;if(l){l.abort()}}n.kick();n.resetFormFields();n.duetCancel.emit({originalEvent:e,data:{cancelled:a},component:"duet-upload"})};this.onUpload=function(t,e){n.duetUpload.emit({originalEvent:t,metaData:e,component:"duet-upload"})};this.onBlur=function(t){n.duetBlur.emit({originalEvent:t,component:"duet-upload"})};this.onProgress=function(t,e,i){n.duetChange.emit({originalEvent:i,data:{key:t,percentComplete:e},component:"duet-upload"})};this.onFocus=function(t){n.duetFocus.emit({originalEvent:t,component:"duet-upload"})};this.onReady=function(){n.duetReady.emit({component:"duet-upload"})};this.onDone=function(){n.duetDone.emit({component:"duet-upload",data:{files:n.files}})};this.filterMap=function(){var t=Array.from(n.files.values());var e=[];var i=[];var a=[];var r=[];var d=false;t.forEach((function(t){var o=n.getGroupFromItemData(t);if(t.meta&&!!t.meta.badges){d=true}if(o===n.DefaultGroups.success){r.push({uid:t.uid,data:t})}else if(o===n.DefaultGroups.inprogress){e.push({uid:t.uid,data:t})}else if(o===n.DefaultGroups.pending){a.push({uid:t.uid,data:t})}else if(o===n.DefaultGroups.failure){i.push({uid:t.uid,data:t})}else if(t.group){e.push({uid:t.uid,data:t})}}));return{pending:a,failure:i,success:r,inprogress:e,hasCategory:d}};this.getActions=function(t,e){return e.filter((function(e){return e.map.includes(t)}))};this.renderUploadedItems=function(){n.itemRefs.clear();var t=n.filterMap();var i=t.hasCategory;var a=n.hideCancelButton?n.actions.filter((function(t){return t.name!=="cancel"})):n.actions;var r=n.groups.map((function(r){var o=t[r.id];if(!(o===null||o===void 0?void 0:o.length)){return}return e(d,null,!n.hideGroups&&e(F,{categoryLabel:i?n.categoryLabel:undefined,label:r.label}),o.map((function(t){return n.mapFilesToUploadItems(t.data,r.id,i,a)})))}));return e(d,null,n.showUploadedItemsHeader&&e(F,{categoryLabel:i?n.categoryLabel:undefined,label:n.uploadedItemsHeaderLabel}),r)};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}, yhteensä lähetettävänä {filesTotal}.",inProgressWithErrors:"Lähetetään {filesInProgress}, lähetetty {filesUploaded}, yhteensä lähetettävänä {filesTotal}, {filesWithErrors} epäonnistui",done:"Lähetys valmis, {filesTotal} lisätty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} lisätty onnistuneesti, {filesWithErrors} epäonnistui",files:"tiedostoa",file:"tiedosto"},sv:{inProgress:"Laddar upp {filesUploaded} av {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Uppladdningen slutförd, {filesTotal} har lagts till",doneWithErrors:"Uppladdningen slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Uploading {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"Upload completed, {filesTotal} added successfully",doneWithErrors:"Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.",files:"files",file:"file"}};this.statusMessageLabel=p(this.statusLabelDefaults);this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"};this.buttonLabel=p(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=p(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=p(this.descriptionDefaults);this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."};this.fileListEmpty=p(this.fileListEmptyDefaults);this.error="";this.errorCodes=z;this.name=undefined;this.maxBytes=2e8;this.maxBytesTotal=undefined;this.maxFiles=99;this.allowedExtensions="all";this.allowedMimetypes="";this.multiple=true;this.limitSelection=false;this.hideCancelButton=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.headerHeadingLevel="h3";this.hideHeader=false;this.emitEvent=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"}}]}t.prototype.watchValidHandler=function(t,e){if(t!==e){this.kick()}};t.prototype.componentWillLoad=function(){if(typeof this.statusMessageLabel==="string"){this.internalStatusMessageLabel=c(this.groups)}else{this.internalStatusMessageLabel=this.statusMessageLabel}o(this);this.listenForActionEvents();this.onReady();this.externalUploadButton=document.querySelector("#".concat(this.externalUploadButtonId))};t.prototype.componentWillRender=function(){this.verifyValidity()};t.prototype.setFocus=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.nativeInput){this.nativeInput.focus(t)}return[2]}))}))};t.prototype.upload=function(t){if(t===void 0){t=undefined}return __awaiter(this,void 0,void 0,(function(){var e,i,a;return __generator(this,(function(n){e=this.validateTotals(),i=e.bytesMaxReached,a=e.fileMaxReached;if(i||a){this.handleExternalUploadButton(i,a);this.kick();return[2]}this.metaData=t;this.nativeInput.click();return[2]}))}))};t.prototype.uploadPending=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.uploadPendingFiles();return[2]}))}))};t.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.kick();return[4,this.setFocus()];case 1:t.sent();return[2]}}))}))};t.prototype.getFiles=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.files||this.files.size===0){return[2,false]}return[2,this.getFilesAsArray()]}))}))};t.prototype.updateValue=function(t,e,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){this.updateValueInMap(t,e,i);return[2]}))}))};t.prototype.focusActionButton=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){switch(i.label){case 0:return[4,(e=this.itemRefs.get(t))===null||e===void 0?void 0:e.focusActionButton()];case 1:i.sent();return[2]}}))}))};t.prototype.render=function(){var t=this;var i=this.identifier||this.uploadId;var a=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024);var r=Math.round(this.maxBytes/1024/1024);var o=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());o=o.replace(/{maxbytes}/g,"".concat(r.toString()," MB"));o=o.replace(/{maxbytestotal}/g,"".concat(a.toString()," MB"));o=o.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", "));if(this.externalUploadButton){this.externalUploadButton.accessibleLabel=o}return e(n,{class:{"duet-m-0":this.margin==="none"}},e("duet-fieldset",{"label-heading-level":this.headerHeadingLevel,"label-hidden":this.hideHeader,label:this.label,caption:!this.captionOnBottom?o:undefined},e("slot",{name:"header"}),!this.files.size&&e("duet-empty-state",{id:this.labelId,part:this.identifier?"".concat(this.identifier,"-empty-state"):"duet-upload-empty-state",icon:"messaging-attachment"},e("duet-paragraph",{margin:"none"},this.fileListEmpty)),!!this.files.size&&e("slot",{name:"fileheader"}),!!this.files.size&&e("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&&e("slot",{name:"filefooter"}),e("slot",{name:"uploadfooter"}),this.captionOnBottom&&e("duet-caption",{margin:"none",size:"small"},e("div",{class:"upload-bottom-caption"},o)),e("slot",{name:"afterfooter"}),!this.hideButton&&e(d,null,e("duet-spacer",{size:"large"}),e("duet-button",{id:this.buttonId,onClick:this.startUpload,"accessible-controls":i,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"accessible-owns":i,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||this.filesToUploadExceedsLimit||this.filesToUploadTotalSizeIsAboveMax)&&e(d,null,e("duet-spacer",{size:"medium"}),e("duet-alert",{part:this.identifier?"".concat(this.identifier,"-error-notification"):"duet-upload-error-notification"},this.fileMaxReached&&k("duet-upload-301",this.errorCodes),this.bytesMaxReached&&k("duet-upload-202",this.errorCodes),this.filesToUploadExceedsLimit&&k("duet-upload-302",this.errorCodes),this.filesToUploadTotalSizeIsAboveMax&&k("duet-upload-203",this.errorCodes))),e("duet-visually-hidden",{"aria-hidden":"true"},e("input",{ref:function(e){t.nativeInput=e},accept:!this.limitSelection?undefined:"".concat(this.allowedMimetypes,",").concat(this.allowedExtensions),onBlur:this.onBlur,onFocus:this.onFocus,onChange:function(e){return t.onChange(e)},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}))))};t.prototype.makeXHRPostRequest=function(t){var e=this;var i=new XMLHttpRequest;var a=t.get("name");i.upload.addEventListener("progress",(function(t){e.updateProgress(t,a)}));i.upload.addEventListener("load",(function(){e.transferComplete(a)}));i.upload.addEventListener("error",(function(){e.transferFailed(a)}));i.upload.addEventListener("abort",(function(){e.transferCanceled(a)}));var n={payload:{data:t,name:a},options:{type:"POST",uri:this.uri,xhr:i,argument:null,headers:undefined},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){n=this.middleware(n)}return R(n)};t.prototype.makeXHRDeleteRequest=function(t){var e=t.uid,i=t.item;var a=new XMLHttpRequest;var n={"x-fileuid":e,"x-filename":i.name};var r={payload:{data:null,name:name},options:{type:"DELETE",xhr:a,uri:this.uri,argument:"?key=".concat(e,"&name=").concat(i.name),headers:n},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){r=this.middleware(r)}return R(r)};t.prototype.onChange=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,a,n,r,d,o,l,s,u,h,f;return __generator(this,(function(b){switch(b.label){case 0:i=Array.from((e=this.nativeInput)===null||e===void 0?void 0:e.files);this.filesToUploadExceedsLimit=false;if(O(this.files.size,i.length,this.maxFiles)){this.filesToUploadExceedsLimit=true;this.kick();return[2]}this.filesToUploadTotalSizeIsAboveMax=false;if(W(this.files,i,this.maxBytesTotal)){this.filesToUploadTotalSizeIsAboveMax=true;this.kick();return[2]}if(!i)return[3,6];a=0,n=i;b.label=1;case 1:if(!(a<n.length))return[3,6];r=n[a];d=C(r,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),o=d.valid,l=d.errorMessage,s=d.errorType,u=d.errorSystem;h=this.genHashName();f={uid:h,item:r,size:r.size,meta:this.metaData,uploaded:false,valid:o,error:{type:o?undefined:s,message:o?undefined:l,system_message:o?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(r.name,f);if(!(o&&!this.external))return[3,3];return[4,this.uploadFile(f)];case 2:b.sent();return[3,4];case 3:if(o&&this.external){this.updateValueInMap(f.item.name,"pending",true,false);this.updateValueInMap(f.item.name,"group","pending",true)}else if(!o){this.updateValueInMap(r.name,"valid",false,true)}b.label=4;case 4:this.kick();b.label=5;case 5:a++;return[3,1];case 6:this.resetFormFields();this.metaData=undefined;this.duetChange.emit({originalEvent:t,data:{files:this.files},component:"duet-upload"});return[2]}}))}))};Object.defineProperty(t.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{valid:["watchValidHandler"]}},enumerable:false,configurable:true});return t}());Y.style=N}}}));
@@ -1,4 +0,0 @@
1
- /*!
2
- * Built with Duet Design System
3
- */
4
- import{r as e,h as t,g as i}from"./p-fa5eff27.js";import{i as a}from"./p-a58bd561.js";import{g as s}from"./p-2e36d5bf.js";import{a as o}from"./p-fabb616b.js";import"./p-0e052642.js";const n=class{constructor(t){e(this,t),this.fileUploadingInfo={fi:"Tiedosto latautuu",sv:"Filen laddas upp",en:"File is uploading"},this.onLinkClick=e=>{const{url:t,meta:i}=this.data;this.linkClickEvent&&(e.preventDefault(),this.linkClickEvent.emit({component:"duet-upload",data:{name:this.data.item.name,url:t,meta:i}}))},this.theme="",this.data=void 0,this.type=void 0,this.showLinks=void 0,this.actions=void 0,this.label=void 0,this.categoryLabel=void 0,this.errorCodes=void 0,this.showCategory=void 0,this.linkClickEvent=void 0}componentWillLoad(){a(this)}async focusActionButton(){this.actionButton&&(await this.actionButton.setFocus({preventScroll:!0}),this.actionButton.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}))}getFileNameLine(){const{item:e,size:i,uploaded:a,url:n,progress:r,error:l}=this.data,{name:d}=e,c=t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),d),m=t("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",((e,t=2)=>{if(0===e)return"0 Bytes";const i=t<0?0:t,a=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,a)).toFixed(i))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][a]})(i),")");switch(this.type){case"inprogress":return t("span",{class:"duet-upload-item-name",role:"status"},t("duet-paragraph",{class:"duet-upload-item-name",color:"gray-darker",margin:"none",weight:"semi-bold"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),d),t("duet-visually-hidden",null,t("duet-paragraph",null,s(this.fileUploadingInfo))),t("duet-progress",{progress:Math.ceil(r),"aria-hidden":!0}));case"pending":return t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),d);case"failure":return t("span",{class:"duet-upload-item-error",role:"status"},t("duet-paragraph",{class:"duet-upload-item-name",color:"danger",margin:"none",weight:"semi-bold"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),d),t("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},o(l.type,this.errorCodes)));default:return t("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},a&&n&&this.showLinks?t("duet-link",{class:"file-link",onClick:this.onLinkClick,url:n},c):c,t("duet-spacer",{size:"xx-small",direction:"horizontal"}),m)}}render(){const{uid:e,meta:i,item:a}=this.data,o=i&&i.badges?t("span",null,i.badges.map((e=>t("duet-badge",{color:"primary"},e)))):void 0,n=`${i&&i.badges?i.badges.join(","):""} ${a.name}`;return t("div",{class:{"upload-item-row":!0}},this.showCategory&&t("div",{class:"item-categories"},t("duet-heading",{class:"heading",color:"color-secondary",level:"h6",weight:"semibold"},s(this.categoryLabel)),o),t("div",{class:{"item-name":!0,"no-category":!this.showCategory}},!!this.label&&t("duet-heading",{class:"heading",color:"color-secondary",level:"h6",weight:"semibold"},s(this.label)),this.getFileNameLine()),t("div",{class:"item-actions"},this.actions.map((a=>t("duet-action-button",{actionMeta:Object.assign({},i||{}),actionId:e||null,actionName:a.name,theme:this.theme,iconName:a.icon,iconColor:a.color,iconSize:a.size,background:a.background,"accessible-label":`${n} ${s(a.label)} `,accessibleTitle:!1,ref:e=>this.actionButton=e})))))}get element(){return i(this)}};n.style=".file-link::part(duet-link){text-decoration:none}";export{n as duet_upload_item}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Built with Duet Design System
3
- */
4
- System.register(["./p-ffb8996b.system.js"],(function(t){"use strict";var n;return{setters:[function(t){n=t.h}],execute:function(){var e=t("f",(function(t){if("setFocus"in t){t.setFocus()}else{t.focus()}}));var u=t("F",(function(t){var u=t.moveFocusTo;return n("div",{class:"duet-focus-guard","aria-hidden":"true",tabIndex:0,onFocus:function(){return e(u)}})}))}}}));
@@ -1,4 +0,0 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(n=0)),n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __rest=this&&this.__rest||function(e,t){var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0)n[r]=e[r];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++){if(t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i]))n[r[i]]=e[r[i]]}return n};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++){if(o||!(r in t)){if(!o)o=Array.prototype.slice.call(t,0,r);o[r]=t[r]}}return e.concat(o||Array.prototype.slice.call(t))};
2
- /*!
3
- * Built with Duet Design System
4
- */var min$1=Math.min;var max$1=Math.max;var oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"};var oppositeAlignmentMap={start:"end",end:"start"};function clamp(e,t,n){return max$1(e,min$1(t,n))}function evaluate(e,t){return typeof e==="function"?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return e==="x"?"y":"x"}function getAxisLength(e){return e==="y"?"height":"width"}function getSideAxis(e){return["top","bottom"].includes(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){if(n===void 0){n=false}var r=getAlignment(e);var i=getAlignmentAxis(e);var o=getAxisLength(i);var a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";if(t.reference[o]>t.floating[o]){a=getOppositePlacement(a)}return[a,getOppositePlacement(a)]}function getExpandedPlacements(e){var t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,(function(e){return oppositeAlignmentMap[e]}))}function getSideList(e,t,n){var r=["left","right"];var i=["right","left"];var o=["top","bottom"];var a=["bottom","top"];switch(e){case"top":case"bottom":if(n)return t?i:r;return t?r:i;case"left":case"right":return t?o:a;default:return[]}}function getOppositeAxisPlacements(e,t,n,r){var i=getAlignment(e);var o=getSideList(getSide(e),n==="start",r);if(i){o=o.map((function(e){return e+"-"+i}));if(t){o=o.concat(o.map(getOppositeAlignmentPlacement))}}return o}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,(function(e){return oppositeSideMap[e]}))}function expandPaddingObject(e){return __assign({top:0,right:0,bottom:0,left:0},e)}function getPaddingObject(e){return typeof e!=="number"?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){return __assign(__assign({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}function computeCoordsFromPlacement(e,t,n){var r=e.reference,i=e.floating;var o=getSideAxis(t);var a=getAlignmentAxis(t);var s=getAxisLength(a);var u=getSide(t);var c=o==="y";var l=r.x+r.width/2-i.width/2;var f=r.y+r.height/2-i.height/2;var g=r[s]/2-i[s]/2;var v;switch(u){case"top":v={x:l,y:r.y-i.height};break;case"bottom":v={x:l,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:f};break;case"left":v={x:r.x-i.width,y:f};break;default:v={x:r.x,y:r.y}}switch(getAlignment(t)){case"start":v[a]-=g*(n&&c?-1:1);break;case"end":v[a]+=g*(n&&c?-1:1);break}return v}var computePosition$1=function(e,t,n){return __awaiter(void 0,void 0,void 0,(function(){var r,i,o,a,s,u,c,l,f,g,v,d,m,p,h,_,w,y,x,A,b,S,C,O,E,P;var R,N;return __generator(this,(function(T){switch(T.label){case 0:r=n.placement,i=r===void 0?"bottom":r,o=n.strategy,a=o===void 0?"absolute":o,s=n.middleware,u=s===void 0?[]:s,c=n.platform;l=u.filter(Boolean);return[4,c.isRTL==null?void 0:c.isRTL(t)];case 1:f=T.sent();return[4,c.getElementRects({reference:e,floating:t,strategy:a})];case 2:g=T.sent();v=computeCoordsFromPlacement(g,i,f),d=v.x,m=v.y;p=i;h={};_=0;w=0;T.label=3;case 3:if(!(w<l.length))return[3,11];y=l[w],x=y.name,A=y.fn;return[4,A({x:d,y:m,initialPlacement:i,placement:p,strategy:a,middlewareData:h,rects:g,platform:c,elements:{reference:e,floating:t}})];case 4:b=T.sent(),S=b.x,C=b.y,O=b.data,E=b.reset;d=S!=null?S:d;m=C!=null?C:m;h=__assign(__assign({},h),(R={},R[x]=__assign(__assign({},h[x]),O),R));if(!(E&&_<=50))return[3,10];_++;if(!(typeof E==="object"))return[3,9];if(E.placement){p=E.placement}if(!E.rects)return[3,8];if(!(E.rects===true))return[3,6];return[4,c.getElementRects({reference:e,floating:t,strategy:a})];case 5:P=T.sent();return[3,7];case 6:P=E.rects;T.label=7;case 7:g=P;T.label=8;case 8:N=computeCoordsFromPlacement(g,p,f),d=N.x,m=N.y;T.label=9;case 9:w=-1;return[3,10];case 10:w++;return[3,3];case 11:return[2,{x:d,y:m,placement:p,strategy:a,middlewareData:h}]}}))}))};function detectOverflow(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l,f,g,v,d,m,p,h,_,w,y,x,A,b,S,C,O,E,P,R,N,T,L,k,M,B;var D;return __generator(this,(function($){switch($.label){case 0:if(t===void 0){t={}}r=e.x,i=e.y,o=e.platform,a=e.rects,s=e.elements,u=e.strategy;c=evaluate(t,e),l=c.boundary,f=l===void 0?"clippingAncestors":l,g=c.rootBoundary,v=g===void 0?"viewport":g,d=c.elementContext,m=d===void 0?"floating":d,p=c.altBoundary,h=p===void 0?false:p,_=c.padding,w=_===void 0?0:_;y=getPaddingObject(w);x=m==="floating"?"reference":"floating";A=s[h?x:m];S=rectToClientRect;O=(C=o).getClippingRect;D={};return[4,o.isElement==null?void 0:o.isElement(A)];case 1:if(!((n=$.sent())!=null?n:true))return[3,2];E=A;return[3,5];case 2:P=A.contextElement;if(P)return[3,4];return[4,o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)];case 3:P=$.sent();$.label=4;case 4:E=P;$.label=5;case 5:return[4,O.apply(C,[(D.element=E,D.boundary=f,D.rootBoundary=v,D.strategy=u,D)])];case 6:b=S.apply(void 0,[$.sent()]);R=m==="floating"?__assign(__assign({},a.floating),{x:r,y:i}):a.reference;return[4,o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)];case 7:N=$.sent();return[4,o.isElement==null?void 0:o.isElement(N)];case 8:if(!$.sent())return[3,10];return[4,o.getScale==null?void 0:o.getScale(N)];case 9:L=$.sent()||{x:1,y:1};return[3,11];case 10:L={x:1,y:1};$.label=11;case 11:T=L;M=rectToClientRect;if(!o.convertOffsetParentRelativeRectToViewportRelativeRect)return[3,13];return[4,o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:R,offsetParent:N,strategy:u})];case 12:B=$.sent();return[3,14];case 13:B=R;$.label=14;case 14:k=M.apply(void 0,[B]);return[2,{top:(b.top-k.top+y.top)/T.y,bottom:(k.bottom-b.bottom+y.bottom)/T.y,left:(b.left-k.left+y.left)/T.x,right:(k.right-b.right+y.right)/T.x}]}}))}))}var arrow=function(e){return{name:"arrow",options:e,fn:function(t){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l,f,g,v,d,m,p,h,_,w,y,x,A,b,S,C,O,E,P,R,N,T,L,k,M,B;var D,$;return __generator(this,(function(F){switch(F.label){case 0:n=t.x,r=t.y,i=t.placement,o=t.rects,a=t.platform,s=t.elements;u=evaluate(e,t)||{},c=u.element,l=u.padding,f=l===void 0?0:l;if(c==null){return[2,{}]}g=getPaddingObject(f);v={x:n,y:r};d=getAlignmentAxis(i);m=getAxisLength(d);return[4,a.getDimensions(c)];case 1:p=F.sent();h=d==="y";_=h?"top":"left";w=h?"bottom":"right";y=h?"clientHeight":"clientWidth";x=o.reference[m]+o.reference[d]-v[d]-o.floating[m];A=v[d]-o.reference[d];return[4,a.getOffsetParent==null?void 0:a.getOffsetParent(c)];case 2:b=F.sent();S=b?b[y]:0;C=!S;if(C)return[3,4];return[4,a.isElement==null?void 0:a.isElement(b)];case 3:C=!F.sent();F.label=4;case 4:if(C){S=s.floating[y]||o.floating[m]}O=x/2-A/2;E=S/2-p[m]/2-1;P=min$1(g[_],E);R=min$1(g[w],E);N=P;T=S-p[m]-R;L=S/2-p[m]/2+O;k=clamp(N,L,T);M=getAlignment(i)!=null&&L!=k&&o.reference[m]/2-(L<N?P:R)-p[m]/2<0;B=M?L<N?N-L:T-L:0;return[2,(D={},D[d]=v[d]-B,D.data=($={},$[d]=k,$.centerOffset=L-k+B,$),D)]}}))}))}}};var flip=function(e){if(e===void 0){e={}}return{name:"flip",options:e,fn:function(t){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l,f,g,v,d,m,p,h,_,w,y,x,A,b,S,C,O,E,P,R,N,T,L,k,M,B,D,$;return __generator(this,(function(F){switch(F.label){case 0:r=t.placement,i=t.middlewareData,o=t.rects,a=t.initialPlacement,s=t.platform,u=t.elements;c=evaluate(e,t),l=c.mainAxis,f=l===void 0?true:l,g=c.crossAxis,v=g===void 0?true:g,d=c.fallbackPlacements,m=c.fallbackStrategy,p=m===void 0?"bestFit":m,h=c.fallbackAxisSideDirection,_=h===void 0?"none":h,w=c.flipAlignment,y=w===void 0?true:w,x=__rest(c,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);A=getSide(r);b=getSide(a)===a;return[4,s.isRTL==null?void 0:s.isRTL(u.floating)];case 1:S=F.sent();C=d||(b||!y?[getOppositePlacement(a)]:getExpandedPlacements(a));if(!d&&_!=="none"){C.push.apply(C,getOppositeAxisPlacements(a,y,_,S))}O=__spreadArray([a],C,true);return[4,detectOverflow(t,x)];case 2:E=F.sent();P=[];R=((n=i.flip)==null?void 0:n.overflows)||[];if(f){P.push(E[A])}if(v){N=getAlignmentSides(r,o,S);P.push(E[N[0]],E[N[1]])}R=__spreadArray(__spreadArray([],R,true),[{placement:r,overflows:P}],false);if(!P.every((function(e){return e<=0}))){k=(((T=i.flip)==null?void 0:T.index)||0)+1;M=O[k];if(M){return[2,{data:{index:k,overflows:R},reset:{placement:M}}]}B=(L=R.filter((function(e){return e.overflows[0]<=0})).sort((function(e,t){return e.overflows[1]-t.overflows[1]}))[0])==null?void 0:L.placement;if(!B){switch(p){case"bestFit":{$=(D=R.map((function(e){return[e.placement,e.overflows.filter((function(e){return e>0})).reduce((function(e,t){return e+t}),0)]})).sort((function(e,t){return e[1]-t[1]}))[0])==null?void 0:D[0];if($){B=$}break}case"initialPlacement":B=a;break}}if(r!==B){return[2,{reset:{placement:B}}]}}return[2,{}]}}))}))}}};function convertValueToCoords(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l,f,g,v,d,m;return __generator(this,(function(p){switch(p.label){case 0:n=e.placement,r=e.platform,i=e.elements;return[4,r.isRTL==null?void 0:r.isRTL(i.floating)];case 1:o=p.sent();a=getSide(n);s=getAlignment(n);u=getSideAxis(n)==="y";c=["left","top"].includes(a)?-1:1;l=o&&u?-1:1;f=evaluate(t,e);g=typeof f==="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:__assign({mainAxis:0,crossAxis:0,alignmentAxis:null},f),v=g.mainAxis,d=g.crossAxis,m=g.alignmentAxis;if(s&&typeof m==="number"){d=s==="end"?m*-1:m}return[2,u?{x:d*l,y:v*c}:{x:v*c,y:d*l}]}}))}))}var offset=function(e){if(e===void 0){e=0}return{name:"offset",options:e,fn:function(t){return __awaiter(this,void 0,void 0,(function(){var n,r,i;return __generator(this,(function(o){switch(o.label){case 0:n=t.x,r=t.y;return[4,convertValueToCoords(t,e)];case 1:i=o.sent();return[2,{x:n+i.x,y:r+i.y,data:i}]}}))}))}}};var shift=function(e){if(e===void 0){e={}}return{name:"shift",options:e,fn:function(t){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l,f,g,v,d,m,p,h,_,w,y,x,A,w,y,b,S,C;var O;return __generator(this,(function(E){switch(E.label){case 0:n=t.x,r=t.y,i=t.placement;o=evaluate(e,t),a=o.mainAxis,s=a===void 0?true:a,u=o.crossAxis,c=u===void 0?false:u,l=o.limiter,f=l===void 0?{fn:function(e){var t=e.x,n=e.y;return{x:t,y:n}}}:l,g=__rest(o,["mainAxis","crossAxis","limiter"]);v={x:n,y:r};return[4,detectOverflow(t,g)];case 1:d=E.sent();m=getSideAxis(getSide(i));p=getOppositeAxis(m);h=v[p];_=v[m];if(s){w=p==="y"?"top":"left";y=p==="y"?"bottom":"right";x=h+d[w];A=h-d[y];h=clamp(x,h,A)}if(c){w=m==="y"?"top":"left";y=m==="y"?"bottom":"right";b=_+d[w];S=_-d[y];_=clamp(b,_,S)}C=f.fn(__assign(__assign({},t),(O={},O[p]=h,O[m]=_,O)));return[2,__assign(__assign({},C),{data:{x:C.x-n,y:C.y-r}})]}}))}))}}};function getWindow(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function isNode(e){return e instanceof getWindow(e).Node}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():""}function isHTMLElement(e){return e instanceof getWindow(e).HTMLElement}function isElement(e){return e instanceof getWindow(e).Element}function isShadowRoot(e){if(typeof ShadowRoot==="undefined"){return false}var t=getWindow(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function isOverflowElement(e){var t=getComputedStyle$1(e),n=t.overflow,r=t.overflowX,i=t.overflowY,o=t.display;return/auto|scroll|overlay|hidden|clip/.test(n+i+r)&&!["inline","contents"].includes(o)}function isTableElement(e){return["table","td","th"].includes(getNodeName(e))}function isContainingBlock(e){var t=isSafari();var n=getComputedStyle$1(e);return n.transform!=="none"||n.perspective!=="none"||!t&&(n.backdropFilter?n.backdropFilter!=="none":false)||!t&&(n.filter?n.filter!=="none":false)||["transform","perspective","filter"].some((function(e){return(n.willChange||"").includes(e)}))||["paint","layout","strict","content"].some((function(e){return(n.contain||"").includes(e)}))}function isSafari(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(e){return["html","body","#document"].includes(getNodeName(e))}var min=Math.min;var max=Math.max;var round=Math.round;function getCssDimensions(e){var t=getComputedStyle$1(e);var n=parseFloat(t.width)||0;var r=parseFloat(t.height)||0;var i=isHTMLElement(e);var o=i?e.offsetWidth:n;var a=i?e.offsetHeight:r;var s=round(n)!==o||round(r)!==a;if(s){n=o;r=a}return{width:n,height:r,fallback:s}}function unwrapElement(e){return!isElement(e)?e.contextElement:e}var FALLBACK_SCALE={x:1,y:1};function getScale(e){var t=unwrapElement(e);if(!isHTMLElement(t)){return FALLBACK_SCALE}var n=t.getBoundingClientRect();var r=getCssDimensions(t),i=r.width,o=r.height,a=r.fallback;var s=(a?round(n.width):n.width)/i;var u=(a?round(n.height):n.height)/o;if(!s||!Number.isFinite(s)){s=1}if(!u||!Number.isFinite(u)){u=1}return{x:s,y:u}}var noOffsets={x:0,y:0};function getVisualOffsets(e,t,n){var r,i;if(t===void 0){t=true}if(!isSafari()){return noOffsets}var o=e?getWindow(e):window;if(!n||t&&n!==o){return noOffsets}return{x:((r=o.visualViewport)==null?void 0:r.offsetLeft)||0,y:((i=o.visualViewport)==null?void 0:i.offsetTop)||0}}function getBoundingClientRect(e,t,n,r){if(t===void 0){t=false}if(n===void 0){n=false}var i=e.getBoundingClientRect();var o=unwrapElement(e);var a=FALLBACK_SCALE;if(t){if(r){if(isElement(r)){a=getScale(r)}}else{a=getScale(e)}}var s=getVisualOffsets(o,n,r);var u=(i.left+s.x)/a.x;var c=(i.top+s.y)/a.y;var l=i.width/a.x;var f=i.height/a.y;if(o){var g=getWindow(o);var v=r&&isElement(r)?getWindow(r):r;var d=g.frameElement;while(d&&r&&v!==g){var m=getScale(d);var p=d.getBoundingClientRect();var h=getComputedStyle(d);p.x+=(d.clientLeft+parseFloat(h.paddingLeft))*m.x;p.y+=(d.clientTop+parseFloat(h.paddingTop))*m.y;u*=m.x;c*=m.y;l*=m.x;f*=m.y;u+=p.x;c+=p.y;d=getWindow(d).frameElement}}return rectToClientRect({width:l,height:f,x:u,y:c})}function getDocumentElement(e){return((isNode(e)?e.ownerDocument:e.document)||window.document).documentElement}function getNodeScroll(e){if(isElement(e)){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){var t=e.rect,n=e.offsetParent,r=e.strategy;var i=isHTMLElement(n);var o=getDocumentElement(n);if(n===o){return t}var a={scrollLeft:0,scrollTop:0};var s={x:1,y:1};var u={x:0,y:0};if(i||!i&&r!=="fixed"){if(getNodeName(n)!=="body"||isOverflowElement(o)){a=getNodeScroll(n)}if(isHTMLElement(n)){var c=getBoundingClientRect(n);s=getScale(n);u.x=c.x+n.clientLeft;u.y=c.y+n.clientTop}}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+u.x,y:t.y*s.y-a.scrollTop*s.y+u.y}}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getNodeScroll(e).scrollLeft}function getDocumentRect(e){var t=getDocumentElement(e);var n=getNodeScroll(e);var r=e.ownerDocument.body;var i=max(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth);var o=max(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);var a=-n.scrollLeft+getWindowScrollBarX(e);var s=-n.scrollTop;if(getComputedStyle$1(r).direction==="rtl"){a+=max(t.clientWidth,r.clientWidth)-i}return{width:i,height:o,x:a,y:s}}function getParentNode(e){if(getNodeName(e)==="html"){return e}var t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){var t=getParentNode(e);if(isLastTraversableNode(t)){return t.ownerDocument.body}if(isHTMLElement(t)&&isOverflowElement(t)){return t}return getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t){var n;if(t===void 0){t=[]}var r=getNearestOverflowAncestor(e);var i=r===((n=e.ownerDocument)==null?void 0:n.body);var o=getWindow(r);if(i){return t.concat(o,o.visualViewport||[],isOverflowElement(r)?r:[])}return t.concat(r,getOverflowAncestors(r))}function getViewportRect(e,t){var n=getWindow(e);var r=getDocumentElement(e);var i=n.visualViewport;var o=r.clientWidth;var a=r.clientHeight;var s=0;var u=0;if(i){o=i.width;a=i.height;var c=isSafari();if(!c||c&&t==="fixed"){s=i.offsetLeft;u=i.offsetTop}}return{width:o,height:a,x:s,y:u}}function getInnerBoundingClientRect(e,t){var n=getBoundingClientRect(e,true,t==="fixed");var r=n.top+e.clientTop;var i=n.left+e.clientLeft;var o=isHTMLElement(e)?getScale(e):{x:1,y:1};var a=e.clientWidth*o.x;var s=e.clientHeight*o.y;var u=i*o.x;var c=r*o.y;return{width:a,height:s,x:u,y:c}}function getClientRectFromClippingAncestor(e,t,n){var r;if(t==="viewport"){r=getViewportRect(e,n)}else if(t==="document"){r=getDocumentRect(getDocumentElement(e))}else if(isElement(t)){r=getInnerBoundingClientRect(t,n)}else{var i=getVisualOffsets(e);r=__assign(__assign({},t),{x:t.x-i.x,y:t.y-i.y})}return rectToClientRect(r)}function hasFixedPositionAncestor(e,t){var n=getParentNode(e);if(n===t||!isElement(n)||isLastTraversableNode(n)){return false}return getComputedStyle$1(n).position==="fixed"||hasFixedPositionAncestor(n,t)}function getClippingElementAncestors(e,t){var n=t.get(e);if(n){return n}var r=getOverflowAncestors(e).filter((function(e){return isElement(e)&&getNodeName(e)!=="body"}));var i=null;var o=getComputedStyle$1(e).position==="fixed";var a=o?getParentNode(e):e;while(isElement(a)&&!isLastTraversableNode(a)){var s=getComputedStyle$1(a);var u=isContainingBlock(a);if(!u&&s.position==="fixed"){i=null}var c=o?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||isOverflowElement(a)&&!u&&hasFixedPositionAncestor(e,a);if(c){r=r.filter((function(e){return e!==a}))}else{i=s}a=getParentNode(a)}t.set(e,r);return r}function getClippingRect(e){var t=e.element,n=e.boundary,r=e.rootBoundary,i=e.strategy;var o=n==="clippingAncestors"?getClippingElementAncestors(t,this._c):[].concat(n);var a=__spreadArray(__spreadArray([],o,true),[r],false);var s=a[0];var u=a.reduce((function(e,n){var r=getClientRectFromClippingAncestor(t,n,i);e.top=max(r.top,e.top);e.right=min(r.right,e.right);e.bottom=min(r.bottom,e.bottom);e.left=max(r.left,e.left);return e}),getClientRectFromClippingAncestor(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function getDimensions(e){return getCssDimensions(e)}function getTrueOffsetParent(e,t){if(!isHTMLElement(e)||getComputedStyle$1(e).position==="fixed"){return null}if(t){return t(e)}return e.offsetParent}function getContainingBlock(e){var t=getParentNode(e);while(isHTMLElement(t)&&!isLastTraversableNode(t)){if(isContainingBlock(t)){return t}else{t=getParentNode(t)}}return null}function getOffsetParent(e,t){var n=getWindow(e);if(!isHTMLElement(e)){return n}var r=getTrueOffsetParent(e,t);while(r&&isTableElement(r)&&getComputedStyle$1(r).position==="static"){r=getTrueOffsetParent(r,t)}if(r&&(getNodeName(r)==="html"||getNodeName(r)==="body"&&getComputedStyle$1(r).position==="static"&&!isContainingBlock(r))){return n}return r||getContainingBlock(e)||n}function getRectRelativeToOffsetParent(e,t,n){var r=isHTMLElement(t);var i=getDocumentElement(t);var o=n==="fixed";var a=getBoundingClientRect(e,true,o,t);var s={scrollLeft:0,scrollTop:0};var u={x:0,y:0};if(r||!r&&!o){if(getNodeName(t)!=="body"||isOverflowElement(i)){s=getNodeScroll(t)}if(isHTMLElement(t)){var c=getBoundingClientRect(t,true,o,t);u.x=c.x+t.clientLeft;u.y=c.y+t.clientTop}else if(i){u.x=getWindowScrollBarX(i)}}return{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}var platform={getClippingRect:getClippingRect,convertOffsetParentRelativeRectToViewportRelativeRect:convertOffsetParentRelativeRectToViewportRelativeRect,isElement:isElement,getDimensions:getDimensions,getOffsetParent:getOffsetParent,getDocumentElement:getDocumentElement,getScale:getScale,getElementRects:function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,i,o,a,s,u;var c;return __generator(this,(function(l){switch(l.label){case 0:t=e.reference,n=e.floating,r=e.strategy;i=this.getOffsetParent||getOffsetParent;o=this.getDimensions;c={};a=getRectRelativeToOffsetParent;s=[t];return[4,i(n)];case 1:c.reference=a.apply(void 0,s.concat([l.sent(),r]));u=[{x:0,y:0}];return[4,o(n)];case 2:return[2,(c.floating=__assign.apply(void 0,u.concat([l.sent()])),c)]}}))}))},getClientRects:function(e){return Array.from(e.getClientRects())},isRTL:function(e){return getComputedStyle$1(e).direction==="rtl"}};var computePosition=function(e,t,n){var r=new Map;var i=__assign({platform:platform},n);var o=__assign(__assign({},i.platform),{_c:r});return computePosition$1(e,t,__assign(__assign({},i),{platform:o}))};export{arrow as a,computePosition as c,flip as f,offset as o,shift as s};
File without changes