@webority/ui-elements 0.149.0 → 0.152.0

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 (477) hide show
  1. package/dist/WuiCarousel-DthhDxH-.js +1 -0
  2. package/dist/WuiCodeBlock-DHpmEskS.js +1 -0
  3. package/dist/WuiCommandPalette-DqHh4lH6.js +2 -0
  4. package/dist/WuiCommentThread-BmRsl0K1.js +1 -0
  5. package/dist/WuiConsentBanner-Bm7tT3_5.js +1 -0
  6. package/dist/WuiContextMenu-sPTmEEVn.js +1 -0
  7. package/dist/WuiDataTable-B4BYCd_s.js +1 -0
  8. package/dist/WuiDatePicker-DLEsnzqG.js +31 -0
  9. package/dist/WuiDateRange-9Xqs5nvv.js +25 -0
  10. package/dist/WuiDock-d5abaLkL.js +1 -0
  11. package/dist/WuiDrawer-B3YFmxl2.js +1 -0
  12. package/dist/WuiHoverCard-CE3dHKaM.js +1 -0
  13. package/dist/WuiImageCrop-ChvH8GKb.js +17 -0
  14. package/dist/WuiInlineEdit-BlBuWkHG.js +1 -0
  15. package/dist/WuiLeadPopup-YN4YCbOe.js +382 -0
  16. package/dist/WuiLightbox-C2A14vHx.js +1 -0
  17. package/dist/WuiMarkdown-BXY0QKaO.js +4 -0
  18. package/dist/WuiMentionInput-8Xjkzdqg.js +1 -0
  19. package/dist/WuiNavigationMenu-CZ3XhFam.js +1 -0
  20. package/dist/WuiNotificationCenter-ClkCTUnp.js +1 -0
  21. package/dist/WuiOnboardingChecklist-Cx-TgpBY.js +1 -0
  22. package/dist/WuiOrgTree-DzeLFQxy.js +1 -0
  23. package/dist/{WuiOtp-BqWijfNj.js → WuiOtp-DonxSwVn.js} +2 -2
  24. package/dist/WuiOverflow-B0wA6aDe.js +1 -0
  25. package/dist/WuiPhone-BVNVerap.js +16 -0
  26. package/dist/WuiRating-DLVduJZ_.js +1 -0
  27. package/dist/WuiRecordPager-7HVGoFlP.js +1 -0
  28. package/dist/WuiRelativeTime-DyeUQOQ8.js +1 -0
  29. package/dist/WuiResizable-DQZdQVCz.js +1 -0
  30. package/dist/WuiRollingNumber-sfgNzaP0.js +1 -0
  31. package/dist/WuiSavedViews-UaiP6YNG.js +1 -0
  32. package/dist/WuiSelect-DBPre2oe.js +9 -0
  33. package/dist/WuiShortcuts-D3rWkaOm.js +1 -0
  34. package/dist/WuiShowMore-CvdNQXrA.js +1 -0
  35. package/dist/WuiSlider-D33Y3_t9.js +51 -0
  36. package/dist/WuiSortable-CBLMNRuZ.js +1 -0
  37. package/dist/WuiTimePicker-DOodgU2O.js +9 -0
  38. package/dist/WuiTour-Cx61ijsm.js +1 -0
  39. package/dist/WuiTree-0Yqu199O.js +1 -0
  40. package/dist/WuiTruncate-C2WV1-NN.js +1 -0
  41. package/dist/WuiWhatsNew-dLGyA4g1.js +1 -0
  42. package/dist/WuiWizardStep-Cencr-mT.js +1 -0
  43. package/dist/{anchorOverlay-DDrc2k6y.js → anchorOverlay-CXnWfezA.js} +1 -1
  44. package/dist/buttonClass-GtEi8hAY.js +1 -0
  45. package/dist/calendarMath-D6UUgYTD.js +1 -0
  46. package/dist/chips-Dony2fgq.js +2 -0
  47. package/dist/commentText-BnX7rA2-.js +1 -0
  48. package/dist/{countries-CvmZ2xpG.js → countries-DQL9nAUt.js} +1 -1
  49. package/dist/country-x5lqC5Xu.js +1 -0
  50. package/dist/customRule-Chp7YwFb.js +1 -0
  51. package/dist/dataTable-B-7oAeii.js +1 -0
  52. package/dist/dom-Do1pAA12.js +1 -0
  53. package/dist/drawerDiscard-C0yRSl1I.js +1 -0
  54. package/dist/elementBase-Cxeyx0tU.js +1 -0
  55. package/dist/elements/carousel.js +1 -1
  56. package/dist/elements/code-block.js +1 -1
  57. package/dist/elements/command-palette.js +1 -1
  58. package/dist/elements/comment-thread.js +1 -1
  59. package/dist/elements/consent-banner.js +1 -1
  60. package/dist/elements/context-menu.js +1 -1
  61. package/dist/elements/data-table.js +1 -1
  62. package/dist/elements/date-range.js +1 -1
  63. package/dist/elements/datepicker.js +1 -1
  64. package/dist/elements/dock.js +1 -1
  65. package/dist/elements/drawer.js +1 -1
  66. package/dist/elements/filter-popover.js +1 -1
  67. package/dist/elements/hover-card.js +1 -1
  68. package/dist/elements/image-crop.js +1 -1
  69. package/dist/elements/inline-edit.js +1 -1
  70. package/dist/elements/kanban.js +1 -1
  71. package/dist/elements/lead-popup.js +1 -1
  72. package/dist/elements/lightbox.js +1 -1
  73. package/dist/elements/markdown.js +1 -1
  74. package/dist/elements/mention-input.js +1 -1
  75. package/dist/elements/navigation-menu.js +1 -1
  76. package/dist/elements/notification-center.js +1 -1
  77. package/dist/elements/onboarding-checklist.js +1 -1
  78. package/dist/elements/org-tree.js +1 -1
  79. package/dist/elements/otp.js +1 -1
  80. package/dist/elements/overflow.js +1 -1
  81. package/dist/elements/phone.js +1 -1
  82. package/dist/elements/rating.js +1 -1
  83. package/dist/elements/record-pager.js +1 -1
  84. package/dist/elements/relative-time.js +1 -1
  85. package/dist/elements/resizable.js +1 -1
  86. package/dist/elements/rolling-number.js +1 -1
  87. package/dist/elements/saved-views.js +1 -1
  88. package/dist/elements/select.js +1 -1
  89. package/dist/elements/shortcuts.js +1 -1
  90. package/dist/elements/show-more.js +1 -1
  91. package/dist/elements/slider.js +1 -1
  92. package/dist/elements/sortable.js +1 -1
  93. package/dist/elements/status-icon.js +1 -1
  94. package/dist/elements/timepicker.js +1 -1
  95. package/dist/elements/tour.js +1 -1
  96. package/dist/elements/tree.js +1 -1
  97. package/dist/elements/truncate.js +1 -1
  98. package/dist/elements/whats-new.js +1 -1
  99. package/dist/elements/wizard.js +1 -1
  100. package/dist/{fileViewerImage-CLzN49Fd.js → fileViewerImage-Bt1jeArm.js} +2 -2
  101. package/dist/fileViewerMedia-Bp1uHJvC.js +1 -0
  102. package/dist/{fileViewerPdf-6MAAzmCM.js → fileViewerPdf-CdaDuaRJ.js} +11 -11
  103. package/dist/fileViewerUi-ResPjO1o.js +1 -0
  104. package/dist/filterPopover-D8BOb-Hz.js +1 -0
  105. package/dist/formMirror-9IpSgeZb.js +1 -0
  106. package/dist/formatters-ljfITOZ3.js +1 -0
  107. package/dist/helpers.js +1 -1
  108. package/dist/iconGlyphs.g-DPqoOoXy.js +1 -0
  109. package/dist/inlineEditText-CsLCQbcg.js +1 -0
  110. package/dist/kanban-Dz8m-17x.js +1 -0
  111. package/dist/kanbanModel-C2IOPJ8L.js +1 -0
  112. package/dist/listQuery.js +1 -1
  113. package/dist/listboxKeyNav-4LeEjKq6.js +1 -0
  114. package/dist/loader-ByHAB1wi.js +1 -0
  115. package/dist/mentionText-BJsw_opZ.js +1 -0
  116. package/dist/{notificationDays-dNQZGLlB.js → notificationDays-BIWczft0.js} +1 -1
  117. package/dist/{optionLabel-CLemms21.js → optionLabel-4xjXWy74.js} +1 -1
  118. package/dist/recents-CmLLdV8O.js +1 -0
  119. package/dist/relativeTime-BahImc8F.js +1 -0
  120. package/dist/search-C8xIzt6h.js +1 -0
  121. package/dist/server.js +1 -1
  122. package/dist/shortcutKeys-COVLox98.js +1 -0
  123. package/dist/{statusIcons-Dt2ZVJyk.js → statusIcons-CRtqA_1C.js} +2 -2
  124. package/dist/themeTransition-9LQC6fx8.js +1 -0
  125. package/dist/tourSeenStore-z0Y_Znzx.js +1 -0
  126. package/dist/ui-calendar.global.js +1 -1
  127. package/dist/ui-calendar.js +1 -1
  128. package/dist/ui-chart.global.js +15 -15
  129. package/dist/ui-chart.js +13 -13
  130. package/dist/ui-consent-banner.global.js +1 -1
  131. package/dist/ui-elements/carousel.global.js +1 -1
  132. package/dist/ui-elements/code-block.global.js +1 -1
  133. package/dist/ui-elements/command-palette.global.js +2 -2
  134. package/dist/ui-elements/comment-thread.global.js +1 -1
  135. package/dist/ui-elements/consent-banner.global.js +1 -1
  136. package/dist/ui-elements/context-menu.global.js +1 -1
  137. package/dist/ui-elements/date-range.global.js +4 -4
  138. package/dist/ui-elements/drawer.global.js +1 -1
  139. package/dist/ui-elements/glyphs.global.js +1 -0
  140. package/dist/ui-elements/image-crop.global.js +2 -2
  141. package/dist/ui-elements/inline-edit.global.js +1 -1
  142. package/dist/ui-elements/kanban.global.js +1 -1
  143. package/dist/ui-elements/lead-popup.global.js +3 -3
  144. package/dist/ui-elements/lightbox.global.js +1 -1
  145. package/dist/ui-elements/markdown.global.js +2 -2
  146. package/dist/ui-elements/org-tree.global.js +1 -1
  147. package/dist/ui-elements/phone.global.js +9 -9
  148. package/dist/ui-elements/resizable.global.js +1 -1
  149. package/dist/ui-elements/saved-views.global.js +1 -1
  150. package/dist/ui-elements/select-chips.global.js +2 -2
  151. package/dist/ui-elements/select-recents.global.js +1 -1
  152. package/dist/ui-elements/select-search.global.js +1 -1
  153. package/dist/ui-elements/slider.global.js +2 -2
  154. package/dist/ui-elements/sortable.global.js +1 -1
  155. package/dist/ui-elements/status-icon.global.js +2 -2
  156. package/dist/ui-elements/timepicker.global.js +2 -2
  157. package/dist/ui-elements/tour.global.js +1 -1
  158. package/dist/ui-elements/tree.global.js +1 -1
  159. package/dist/ui-elements/wizard.global.js +1 -1
  160. package/dist/ui-elements.global.js +19 -19
  161. package/dist/ui-elements.js +1 -1
  162. package/dist/ui-file-viewer.global.js +11 -11
  163. package/dist/ui-file-viewer.js +1 -1
  164. package/dist/ui-lead-popup.global.js +1 -1
  165. package/dist/ui-phone.global.js +8 -8
  166. package/dist/ui-rich-text.global.js +57 -57
  167. package/dist/ui-rich-text.js +56 -56
  168. package/dist/ui-tour.global.js +1 -1
  169. package/dist/wuiHttp-DGbD7Fra.js +1 -0
  170. package/dist/{zone-D82f-GU_.js → zone-BR02ZkHF.js} +1 -1
  171. package/package.json +208 -55
  172. package/types/WuiCalendar.d.ts +69 -0
  173. package/types/WuiCarousel.d.ts +64 -0
  174. package/types/WuiChart.d.ts +77 -0
  175. package/types/WuiCodeBlock.d.ts +27 -0
  176. package/types/WuiCommandPalette.d.ts +135 -0
  177. package/types/WuiCommentThread.d.ts +77 -0
  178. package/types/WuiConsentBanner.d.ts +73 -0
  179. package/types/WuiContextMenu.d.ts +90 -0
  180. package/types/WuiDataTable.d.ts +90 -0
  181. package/types/WuiDatePicker.d.ts +59 -0
  182. package/types/WuiDateRange.d.ts +61 -0
  183. package/types/WuiDock.d.ts +20 -0
  184. package/types/WuiDrawer.d.ts +65 -0
  185. package/types/WuiFileViewer.d.ts +111 -0
  186. package/types/WuiHoverCard.d.ts +29 -0
  187. package/types/WuiImageCrop.d.ts +119 -0
  188. package/types/WuiInlineEdit.d.ts +65 -0
  189. package/types/WuiLeadPopup.d.ts +83 -0
  190. package/types/WuiLightbox.d.ts +80 -0
  191. package/types/WuiMarkdown.d.ts +85 -0
  192. package/types/WuiMentionInput.d.ts +112 -0
  193. package/types/WuiNavigationMenu.d.ts +29 -0
  194. package/types/WuiNotificationCenter.d.ts +34 -0
  195. package/types/WuiOnboardingChecklist.d.ts +34 -0
  196. package/types/WuiOrgTree.d.ts +50 -0
  197. package/types/WuiOtp.d.ts +32 -0
  198. package/types/WuiOverflow.d.ts +29 -0
  199. package/types/WuiPhone.d.ts +37 -0
  200. package/types/WuiRating.d.ts +17 -0
  201. package/types/WuiRecordPager.d.ts +9 -0
  202. package/types/WuiRelativeTime.d.ts +17 -0
  203. package/types/WuiResizable.d.ts +79 -0
  204. package/types/WuiRichText.d.ts +45 -0
  205. package/types/WuiRollingNumber.d.ts +27 -0
  206. package/types/WuiSavedViews.d.ts +41 -0
  207. package/types/WuiSelect.d.ts +147 -0
  208. package/types/WuiShortcuts.d.ts +31 -0
  209. package/types/WuiShowMore.d.ts +16 -0
  210. package/types/WuiSlider.d.ts +126 -0
  211. package/types/WuiSortable.d.ts +127 -0
  212. package/types/WuiTimePicker.d.ts +68 -0
  213. package/types/WuiTour.d.ts +117 -0
  214. package/types/WuiTree.d.ts +112 -0
  215. package/types/WuiTruncate.d.ts +19 -0
  216. package/types/WuiWhatsNew.d.ts +36 -0
  217. package/types/WuiWizard.d.ts +78 -0
  218. package/types/WuiWizardStep.d.ts +5 -0
  219. package/types/anchorOverlay.d.ts +75 -0
  220. package/types/avatarHtml.d.ts +10 -0
  221. package/types/avatarPicker.d.ts +47 -0
  222. package/types/buttonClass.d.ts +8 -0
  223. package/types/calendar.d.ts +3 -0
  224. package/types/calendarAdapter.d.ts +68 -0
  225. package/types/calendarMath.d.ts +40 -0
  226. package/types/calendarModel.d.ts +78 -0
  227. package/types/chart.d.ts +4 -0
  228. package/types/chartAdapter.d.ts +160 -0
  229. package/types/chartSpec.d.ts +382 -0
  230. package/types/codeHighlight.d.ts +25 -0
  231. package/types/collapsibleSearch.d.ts +7 -0
  232. package/types/commandShortcut.d.ts +12 -0
  233. package/types/commentText.d.ts +40 -0
  234. package/types/consentBannerGlobal.d.ts +1 -0
  235. package/types/consentBannerStandalone.d.ts +2 -0
  236. package/types/copyText.d.ts +10 -0
  237. package/types/countries.d.ts +3 -0
  238. package/types/currency.d.ts +6 -0
  239. package/types/dataTable.d.ts +159 -0
  240. package/types/datePresets.d.ts +19 -0
  241. package/types/defaultCountry.d.ts +3 -0
  242. package/types/defineElement.d.ts +6 -0
  243. package/types/devWarn.d.ts +2 -0
  244. package/types/dom.d.ts +8 -0
  245. package/types/drawerSnap.d.ts +24 -0
  246. package/types/elementBase.d.ts +2 -0
  247. package/types/elementRegistry.d.ts +5 -0
  248. package/types/elements/carousel.d.ts +2 -0
  249. package/types/elements/code-block.d.ts +2 -0
  250. package/types/elements/command-palette.d.ts +2 -0
  251. package/types/elements/comment-thread.d.ts +4 -0
  252. package/types/elements/consent-banner.d.ts +2 -0
  253. package/types/elements/context-menu.d.ts +2 -0
  254. package/types/elements/data-table.d.ts +3 -0
  255. package/types/elements/date-range.d.ts +2 -0
  256. package/types/elements/datepicker.d.ts +2 -0
  257. package/types/elements/dock.d.ts +2 -0
  258. package/types/elements/drawer.d.ts +2 -0
  259. package/types/elements/filter-popover.d.ts +2 -0
  260. package/types/elements/hover-card.d.ts +2 -0
  261. package/types/elements/image-crop.d.ts +2 -0
  262. package/types/elements/inline-edit.d.ts +3 -0
  263. package/types/elements/kanban.d.ts +2 -0
  264. package/types/elements/lead-popup.d.ts +2 -0
  265. package/types/elements/lightbox.d.ts +2 -0
  266. package/types/elements/markdown.d.ts +2 -0
  267. package/types/elements/mention-input.d.ts +3 -5
  268. package/types/elements/navigation-menu.d.ts +2 -0
  269. package/types/elements/notification-center.d.ts +2 -0
  270. package/types/elements/onboarding-checklist.d.ts +2 -0
  271. package/types/elements/org-tree.d.ts +2 -0
  272. package/types/elements/otp.d.ts +2 -0
  273. package/types/elements/overflow.d.ts +2 -0
  274. package/types/elements/phone.d.ts +2 -0
  275. package/types/elements/rating.d.ts +2 -0
  276. package/types/elements/record-pager.d.ts +2 -0
  277. package/types/elements/relative-time.d.ts +3 -0
  278. package/types/elements/resizable.d.ts +2 -0
  279. package/types/elements/rolling-number.d.ts +2 -0
  280. package/types/elements/saved-views.d.ts +2 -0
  281. package/types/elements/select.d.ts +2 -0
  282. package/types/elements/shortcuts.d.ts +2 -0
  283. package/types/elements/show-more.d.ts +2 -0
  284. package/types/elements/slider.d.ts +2 -0
  285. package/types/elements/sortable.d.ts +2 -0
  286. package/types/elements/status-icon.d.ts +1 -0
  287. package/types/elements/timepicker.d.ts +2 -0
  288. package/types/elements/tour.d.ts +1 -6
  289. package/types/elements/tree.d.ts +2 -0
  290. package/types/elements/truncate.d.ts +2 -0
  291. package/types/elements/whats-new.d.ts +2 -0
  292. package/types/elements/wizard.d.ts +3 -0
  293. package/types/fieldState.d.ts +4 -0
  294. package/types/fileDrop.d.ts +31 -0
  295. package/types/fileValidation.d.ts +47 -0
  296. package/types/fileViewer.d.ts +3 -0
  297. package/types/fileViewerImage.d.ts +69 -0
  298. package/types/fileViewerMedia.d.ts +62 -0
  299. package/types/fileViewerPdf.d.ts +214 -0
  300. package/types/fileViewerSearch.d.ts +55 -0
  301. package/types/fileViewerUi.d.ts +33 -0
  302. package/types/filterPopover.d.ts +55 -0
  303. package/types/focusOrigin.d.ts +3 -0
  304. package/types/formMirror.d.ts +22 -0
  305. package/types/formatters.d.ts +124 -0
  306. package/types/global/chunks.d.ts +12 -0
  307. package/types/global/core.d.ts +57 -0
  308. package/types/global/glyphs.d.ts +10 -0
  309. package/types/global/loader.d.ts +16 -0
  310. package/types/global/parts/glyphs.d.ts +1 -0
  311. package/types/global/parts/select-chips.d.ts +1 -0
  312. package/types/global/parts/select-country.d.ts +1 -0
  313. package/types/global/parts/select-recents.d.ts +1 -0
  314. package/types/global/parts/select-search.d.ts +1 -0
  315. package/types/global/shared.d.ts +56 -0
  316. package/types/globals.d.ts +238 -0
  317. package/types/helpers.d.ts +29 -3
  318. package/types/iconGlyphs.g.d.ts +7 -0
  319. package/types/iconGlyphsCore.g.d.ts +1 -0
  320. package/types/iconGlyphsLazy.g.d.ts +1 -0
  321. package/types/imageCrop.d.ts +75 -0
  322. package/types/index.d.ts +54 -0
  323. package/types/inlineEditText.d.ts +47 -0
  324. package/types/inputMask.d.ts +70 -0
  325. package/types/kanban.d.ts +157 -0
  326. package/types/kanbanModel.d.ts +77 -0
  327. package/types/leadPopupGlobal.d.ts +1 -0
  328. package/types/leadPopupStandalone.d.ts +2 -0
  329. package/types/listQuery.d.ts +87 -0
  330. package/types/listboxKeyNav.d.ts +63 -0
  331. package/types/mentionText.d.ts +45 -0
  332. package/types/navReveal.d.ts +1 -0
  333. package/types/notificationDays.d.ts +50 -0
  334. package/types/optionLabel.d.ts +27 -0
  335. package/types/overlayRelease.d.ts +12 -0
  336. package/types/pageBarBulk.d.ts +4 -0
  337. package/types/passwordRules.d.ts +50 -0
  338. package/types/phoneData.d.ts +1 -0
  339. package/types/phoneLib.d.ts +15 -0
  340. package/types/phoneLibGlobal.d.ts +3 -0
  341. package/types/razor-js/modules/api.d.ts +36 -0
  342. package/types/razor-js/modules/avatars.d.ts +1 -0
  343. package/types/razor-js/modules/buttons.d.ts +1 -0
  344. package/types/razor-js/modules/dropZones.d.ts +2 -0
  345. package/types/razor-js/modules/fileHelpers.d.ts +16 -0
  346. package/types/razor-js/modules/filePickers.d.ts +6 -0
  347. package/types/razor-js/modules/filterBars.d.ts +1 -0
  348. package/types/razor-js/modules/imagePickers.d.ts +1 -0
  349. package/types/razor-js/modules/inputs.d.ts +10 -0
  350. package/types/razor-js/modules/look.d.ts +6 -0
  351. package/types/razor-js/modules/overlays.d.ts +5 -0
  352. package/types/razor-js/modules/pageListeners.d.ts +1 -0
  353. package/types/razor-js/modules/popovers.d.ts +1 -0
  354. package/types/razor-js/modules/serverBridge.d.ts +13 -0
  355. package/types/razor-js/modules/shared.d.ts +15 -0
  356. package/types/razor-js/modules/shell.d.ts +1 -0
  357. package/types/razor-js/modules/splitView.d.ts +2 -0
  358. package/types/razor-js/modules/tables.d.ts +9 -0
  359. package/types/razor-js/modules/tabs.d.ts +1 -0
  360. package/types/razor-js/modules/themeCopy.d.ts +2 -0
  361. package/types/razor-js/modules/toast.d.ts +3 -0
  362. package/types/razor-js/modules/validation.d.ts +11 -0
  363. package/types/razor-js/modules/widgets.d.ts +10 -0
  364. package/types/razor-js/webority-ui.d.ts +51 -0
  365. package/types/relativeTime.d.ts +10 -0
  366. package/types/richText.d.ts +2 -0
  367. package/types/richTextAdapter.d.ts +54 -0
  368. package/types/richTextIcons.d.ts +1 -0
  369. package/types/rowDrop.d.ts +12 -0
  370. package/types/scrollEdges.d.ts +10 -0
  371. package/types/select/chips.d.ts +2 -0
  372. package/types/select/country.d.ts +2 -0
  373. package/types/select/customRule.d.ts +3 -0
  374. package/types/select/list.d.ts +32 -0
  375. package/types/select/option.d.ts +21 -0
  376. package/types/select/part.d.ts +103 -0
  377. package/types/select/partRegistry.d.ts +7 -0
  378. package/types/select/parts.d.ts +1 -0
  379. package/types/select/partsGlobal.d.ts +4 -0
  380. package/types/select/recents.d.ts +2 -0
  381. package/types/select/remote.d.ts +2 -0
  382. package/types/select/search.d.ts +5 -0
  383. package/types/server/drawerDiscard.d.ts +9 -0
  384. package/types/server/index.d.ts +9 -0
  385. package/types/server/remoteModal.d.ts +96 -0
  386. package/types/server/serverActions.d.ts +33 -0
  387. package/types/server/serverTable.d.ts +48 -0
  388. package/types/server/shellParts.d.ts +24 -0
  389. package/types/server/toastAction.d.ts +7 -0
  390. package/types/server/toastHeader.d.ts +8 -0
  391. package/types/server/unsavedChanges.d.ts +17 -0
  392. package/types/server/wuiHttp.d.ts +86 -0
  393. package/types/shortcutKeys.d.ts +59 -0
  394. package/types/statusIconImages.d.ts +1 -0
  395. package/types/statusIcons.d.ts +12 -0
  396. package/types/stepperHeader.d.ts +31 -0
  397. package/types/submitOnce.d.ts +3 -0
  398. package/types/tableSelect.d.ts +34 -0
  399. package/types/textMatch.d.ts +9 -0
  400. package/types/themeTransition.d.ts +88 -0
  401. package/types/toastTypes.d.ts +20 -0
  402. package/types/tokenCommit.d.ts +13 -0
  403. package/types/tourAdvance.d.ts +51 -0
  404. package/types/tourEnd.d.ts +17 -0
  405. package/types/tourGlobal.d.ts +4 -0
  406. package/types/tourIsolated.d.ts +2 -0
  407. package/types/tourMedia.d.ts +19 -0
  408. package/types/tourMotion.d.ts +20 -0
  409. package/types/tourOpenMark.d.ts +1 -0
  410. package/types/tourPlacement.d.ts +24 -0
  411. package/types/tourProgress.d.ts +29 -0
  412. package/types/tourSeenStore.d.ts +12 -0
  413. package/types/zone.d.ts +24 -0
  414. package/types/zoneCountries.g.d.ts +1 -0
  415. package/dist/WuiCarousel-C2NWcFxr.js +0 -1
  416. package/dist/WuiCodeBlock-CCCJwsk5.js +0 -1
  417. package/dist/WuiCommandPalette-Bfrbocu6.js +0 -2
  418. package/dist/WuiCommentThread-Dx3vvBWp.js +0 -1
  419. package/dist/WuiConsentBanner-jkeRiC1_.js +0 -1
  420. package/dist/WuiContextMenu-KXD8TFfy.js +0 -1
  421. package/dist/WuiDataTable-DAxAegnG.js +0 -1
  422. package/dist/WuiDatePicker-kEyyILbM.js +0 -31
  423. package/dist/WuiDateRange-B05PsdJ3.js +0 -25
  424. package/dist/WuiDock-Bd2ijOaJ.js +0 -1
  425. package/dist/WuiDrawer-SkxcDhgf.js +0 -1
  426. package/dist/WuiHoverCard-Bqapy8Is.js +0 -1
  427. package/dist/WuiImageCrop-DzzzPagi.js +0 -17
  428. package/dist/WuiInlineEdit-BqgKfVMy.js +0 -1
  429. package/dist/WuiLeadPopup-Dwmg7coE.js +0 -382
  430. package/dist/WuiLightbox-DCTE3ULH.js +0 -1
  431. package/dist/WuiMarkdown-D5vm4sp4.js +0 -4
  432. package/dist/WuiMentionInput-Bi3VQoKo.js +0 -1
  433. package/dist/WuiNavigationMenu-DmH3waKW.js +0 -1
  434. package/dist/WuiNotificationCenter-DawJRGBc.js +0 -1
  435. package/dist/WuiOnboardingChecklist-DXUETu1h.js +0 -1
  436. package/dist/WuiOrgTree-DuaBtFl9.js +0 -1
  437. package/dist/WuiOverflow-DP3qEbDp.js +0 -1
  438. package/dist/WuiPhone-CFne_6XG.js +0 -16
  439. package/dist/WuiRating-DhhqYj5Z.js +0 -1
  440. package/dist/WuiRecordPager-BOaFcs_W.js +0 -1
  441. package/dist/WuiRelativeTime-BG6rgUhw.js +0 -1
  442. package/dist/WuiResizable-mt9EMhjQ.js +0 -1
  443. package/dist/WuiRollingNumber-CF3H6l7t.js +0 -1
  444. package/dist/WuiSavedViews-BMBQUv2K.js +0 -1
  445. package/dist/WuiSelect-oSJPev4N.js +0 -9
  446. package/dist/WuiShortcuts-BEvFCIu9.js +0 -1
  447. package/dist/WuiShowMore-D3VHRZJg.js +0 -1
  448. package/dist/WuiSlider-2kB__6zU.js +0 -51
  449. package/dist/WuiSortable-r5iZtzM1.js +0 -1
  450. package/dist/WuiTimePicker-DqqZPv0T.js +0 -9
  451. package/dist/WuiTour-B-V1PZnw.js +0 -1
  452. package/dist/WuiTree-B3cnH1PG.js +0 -1
  453. package/dist/WuiTruncate-DyDQWMBu.js +0 -1
  454. package/dist/WuiWhatsNew-B5jK2zwZ.js +0 -1
  455. package/dist/WuiWizardStep-CIYuIp4a.js +0 -1
  456. package/dist/buttonClass-Yk0Fwgs6.js +0 -1
  457. package/dist/calendarMath-BC2wGCD-.js +0 -1
  458. package/dist/chips-DbhCYoAp.js +0 -2
  459. package/dist/country-3uo7no9r.js +0 -1
  460. package/dist/customRule-BE7CusA3.js +0 -1
  461. package/dist/dataTable-BoyxeUL4.js +0 -1
  462. package/dist/drawerDiscard-D6YgF59q.js +0 -1
  463. package/dist/elementBase-DV9IZZCu.js +0 -1
  464. package/dist/fileViewerMedia-BQ0lVXy9.js +0 -1
  465. package/dist/fileViewerUi-DQH6_B1a.js +0 -1
  466. package/dist/filterPopover-DniNyLWI.js +0 -1
  467. package/dist/formMirror-BMQTenSi.js +0 -1
  468. package/dist/formatters-Ba0CvsTs.js +0 -1
  469. package/dist/iconGlyphs.g-BlwTSNXS.js +0 -1
  470. package/dist/kanban-BtgxVDE-.js +0 -1
  471. package/dist/listboxKeyNav-DMIvs9d6.js +0 -1
  472. package/dist/loader-Dw3IkGM0.js +0 -1
  473. package/dist/recents-BzN7j9kV.js +0 -1
  474. package/dist/search-CdAH8NGK.js +0 -1
  475. package/dist/shortcutKeys-CvxSh3bV.js +0 -1
  476. package/dist/themeTransition-rHRVbhHB.js +0 -1
  477. package/dist/wuiHttp-BuaTcumE.js +0 -1
@@ -0,0 +1,2 @@
1
+ import{n as e,t}from"./fieldState-D-zQcXUS.js";import{t as n}from"./iconGlyphs.g-DPqoOoXy.js";import{a as r,i,n as a,r as o}from"./optionLabel-4xjXWy74.js";import{t as s}from"./customRule-Chp7YwFb.js";import{r as c}from"./WuiSelect-DBPre2oe.js";var l={enter:`Enter`,comma:`,`,space:` `,tab:`Tab`},u={enter:`
2
+ `,comma:`,`,space:` `,tab:` `},d=e=>l[e],ee=e=>u[e];function te(e,t){let n=[String(e??``)];for(let e of t)n=n.flatMap(t=>t.split(e));return n.map(e=>e.trim()).filter(Boolean)}var ne=(e,t)=>t.some(t=>String(e??``).includes(t));function f(e,t){if(e===null)throw TypeError(`The chip row needs ${t}, and it is not mounted.`);return e}var p=(e,t)=>{let n=document.createElement(e);return n.className=t,n};function m(){let l,u,m=null,h=null,g=null,_=null,v=null,y=null,b=null,x=null,S=!1,C=()=>f(h,`the draft input`),w=()=>l.mode===`tag`,T=()=>Array.isArray(l.value)?l.value.slice():[],E=()=>(l.getAttribute(`separators`)||`enter,comma`).split(`,`).map(e=>e.trim()).filter(Boolean),re=()=>new Set(E().map(d).filter(Boolean)),D=()=>{let e=parseInt(l.getAttribute(`max-tags`)??``,10);return e>0?e:0},O=()=>{let e=D();return e>0&&T().length>=e},k=(e,t)=>!l.hasAttribute(`allow-duplicates`)&&e.some(e=>e.toLowerCase()===t.toLowerCase()),A=e=>(l.options||[]).find(t=>String(t.value)===String(e)),j=e=>{let t=e.trim().toLowerCase();return(l.options||[]).find(e=>String(e.value??``).toLowerCase()===t||i(e).trim().toLowerCase()===t)},ie=e=>{for(let t of E()){let n=ee(t)??t;if(ne(e,[n]))return te(e,[n])}return[e.trim()]},M=()=>h?h.value:l._query||``,ae=()=>w()||l.hasAttribute(`allow-custom`),N=()=>l.getAttribute(`placeholder`)||(w()?`Add…`:`Select…`),P=()=>{let e=l.getAttribute(`aria-label`);if(e)return e;let t=l.closest(`label`)?.textContent?.trim();if(t)return t;let n=l.id;return(n?[...document.querySelectorAll(`label[for]`)].find(e=>e instanceof HTMLLabelElement&&e.htmlFor===n):void 0)?.textContent?.trim()||(w()?`Add tags`:`Select`)},F=()=>{h&&(h.setAttribute(`aria-expanded`,String(!u.menu.hidden)),u.list.id&&h.setAttribute(`aria-controls`,u.list.id),h.setAttribute(`aria-label`,P()))},oe=()=>!e(l)&&!l.hasAttribute(`loading`),se=e=>{S=!0,C().setAttribute(`aria-invalid`,`true`),l.setError(e)},I=()=>{S&&(S=!1,C().removeAttribute(`aria-invalid`),l.setError(null))},L=(e,{quiet:t=!1,strip:n=!1}={})=>{let r=T(),i=r.slice(),a=D(),o=[],c=``,u=!1;for(let t of e){let e=(n?t.trim().replace(/,+$/,``):t).trim();if(!e)continue;if(a&&i.length>=a)break;let r=j(e);if(r){if(r.disabled){o.push(e),c||=r.disabledHint||l.getAttribute(`invalid-message`)||`That option is not available.`;continue}k(i,String(r.value))||i.push(String(r.value));continue}let d=s(l,e);d?(o.push(e),c||=d):k(i,e)||(i.push(e),u=!0)}i.length!==r.length&&(u?l.commit(i,{isCustom:!0}):l.commit(i)),C().value=o.join(`, `),c?t||se(c):I()},R=e=>{t(l)||L([C().value],e)},z=e=>l.commit(T().filter(t=>t!==e)),ce=()=>{let e=p(`span`,`wui-select-placeholder`);return e.textContent=l.getAttribute(`placeholder`)||`Select…`,e},B=e=>{let t=A(e),s=p(`span`,`chip chip-sm`),c=p(`span`,`chip-label`);if(c.innerHTML=t?o(t):a(e),s.append(c),oe()){let a=p(`button`,`chip-remove`);a.type=`button`,a.dataset.remove=e;let o=t?i(t):r(e);a.setAttribute(`aria-label`,`Remove ${o}`),a.innerHTML=n(`x`),s.append(a)}return s};function V(){if(!m)return;m.querySelector(`:scope > .chip-more`)?.remove();let e=[...m.querySelectorAll(`:scope > .chip`)].map(e=>{if(!(e instanceof HTMLElement))throw Error(`The chip row holds a node that is not an element.`);return e});for(let t of e)t.style.display=``;let t=e.at(-1);if(!l.hasAttribute(`collapse-chips`)||!t)return;let n=m.clientWidth,r=e=>e.offsetLeft+e.offsetWidth;if(r(t)<=n)return;let i=p(`span`,`chip chip-sm chip-more`);i.textContent=`+${e.length}`,t.after(i);let a=i.offsetWidth+6,o=0;for(let t of e)if(r(t)<=n-a)o+=1;else break;o<1&&(o=1);for(let t of e.slice(o))t.style.display=`none`;i.textContent=`+${e.length-o}`}function H(){if(!m)return!1;m.parentNode!==u.value&&u.value.append(m);for(let e of m.querySelectorAll(`:scope > .chip, :scope > .wui-select-placeholder`))e.remove();let e=T(),n=m,r=e=>{h?n.insertBefore(e,h):n.append(e)};w()||h||e.length||r(ce());for(let t of e)r(B(t));return h&&(h.placeholder=w()||!e.length?N():``,h.disabled=l.hasAttribute(`disabled`),h.readOnly=t(l),F()),w()||(f(_,`the footer text`).textContent=(l.getAttribute(`selected-text`)||`{n} selected`).replace(`{n}`,()=>String(e.length)),f(v,`the clear-all button`).textContent=l.getAttribute(`clear-all-label`)||`Clear all`),V(),!0}function U(e){if(e.key===`Backspace`){let t=h?!M():!M()&&!u.menu.hidden,n=T().at(-1);return!t||n===void 0?!1:(e.preventDefault(),z(n),!0)}if(!h)return!1;let t=h.value;if(e.key===`Escape`){if(!w())return!1;let n=!u.menu.hidden;return!n&&!t?!1:(n&&(e.preventDefault(),e.stopPropagation()),h.value=``,I(),l.closeMenu({focusControl:!1}),!0)}let n=!w()&&!t.trim(),r=re();return e.key===`Enter`&&r.has(`Enter`)?n||u.list.querySelector(`.is-active`)?!1:(e.preventDefault(),R(),!0):e.key===`,`&&r.has(`,`)?!n&&(e.preventDefault(),R({strip:!0}),!0):e.key===` `&&r.has(` `)&&t.trim()||e.key===`Tab`&&r.has(`Tab`)&&!n?(e.preventDefault(),R(),!0):!1}function W(e){let t=String(e.value);if(w()||h&&!A(t))return L([t]),!0;let n=T();return n.includes(t)?l.commit(n.filter(e=>e!==t)):h?L([t]):l.commit([...n,t]),h?.value&&(h.value=``,I()),!0}function G(e){if(!h)return null;let t=String(e??``).trim().replace(/,+$/,``).trim();if(!t||O()||j(t)||k(T(),t))return null;let n=l.getAttribute(`create-label`)||`Create '{text}'`;return{position:w()?`top`:`bottom`,label:n.replace(`{text}`,()=>t),value:t}}function K(e){let n=e.target,r=n instanceof Element?n.closest(`[data-remove]`):null;if(r instanceof HTMLElement){if(t(l))return;e.stopPropagation(),z(r.dataset.remove??``),h?.focus()}else h&&!t(l)&&h.focus()}function q(){I();let e=C().value.trim();!w()&&e&&u.menu.hidden&&(G(e)||c(l.options||[],e).length)&&l.openMenu()}function J(e){e.preventDefault(),t(l)||L(ie(e.clipboardData?.getData(`text/plain`)??``))}function Y(){C().value.trim()&&R({quiet:!0,strip:!0}),l.closeMenu({focusControl:!1})}function X(e){e.relatedTarget instanceof Node&&l.contains(e.relatedTarget)||Y()}function le(){return h?(Y(),!0):!1}function Z(){C().value.trim()&&R({strip:!0})}function Q(){t(l)||l.commit([])}function $(e){e.target!==h&&e.preventDefault()}function ue(e,t,n={}){l=e,u=t,m=p(`div`,`wui-select-chips`),m.addEventListener(`click`,K),u.value.append(m),ae()&&(h=p(`input`,`wui-select-draft`),h.type=`text`,h.setAttribute(`autocomplete`,`off`),h.setAttribute(`role`,`combobox`),h.setAttribute(`aria-autocomplete`,`list`),l.hasAttribute(`required`)&&h.setAttribute(`aria-required`,`true`),x=new MutationObserver(F),x.observe(u.menu,{attributes:!0,attributeFilter:[`hidden`]}),m.append(h),h.value=n.carry?.draft??``,u.input=h,h.addEventListener(`input`,q),h.addEventListener(`paste`,J),h.addEventListener(`blur`,X),m.addEventListener(`mousedown`,$),y=l.closest(`form`),y?.addEventListener(`submit`,Z,!0)),w()||(g=p(`div`,`wui-select-footer`),_=document.createElement(`span`),v=p(`button`,`wui-select-clear-all`),v.type=`button`,v.addEventListener(`click`,Q),g.append(_,v),u.menu.append(g)),typeof ResizeObserver<`u`&&(b=new ResizeObserver(V),b.observe(m)),H()}function de(){m?.removeEventListener(`click`,K),m?.removeEventListener(`mousedown`,$),h&&(h.removeEventListener(`input`,q),h.removeEventListener(`paste`,J),h.removeEventListener(`blur`,X),u.input=null),v&&v.removeEventListener(`click`,Q),y?.removeEventListener(`submit`,Z,!0),y=null,b?.disconnect(),b=null,x?.disconnect(),x=null,g?.remove(),m?.remove(),m=null,h=null,g=null,S=!1}return{mount:ue,onKey:U,onPick:W,renderValue:H,actionRow:G,onQuery:()=>!1,onBlur:le,teardown:de}}export{m as default};
@@ -0,0 +1 @@
1
+ var e=Object.freeze([`👍`,`❤️`,`🎉`,`😄`,`👀`,`🙏`]),t=Object.freeze([`post`,`reply`,`edit`,`delete`,`react`]),n=`This did not go through. Refresh the page and try again.`,r=`Something went wrong on our side. Try again in a moment.`,i=Object.freeze({forbidden:`You do not have permission to do this.`,client:n,validation:`This was not accepted. Check it and try again.`,server:r,network:`Could not reach the server. Check your connection and try again.`}),a=Object.freeze({listName:`Comments`,empty:`No comments yet.`,deleted:`This comment was deleted.`,edited:`Edited`,reply:`Reply`,edit:`Edit`,delete:`Delete`,cancel:`Cancel`,save:`Save`,post:`Comment`,confirmDelete:`Delete this comment?`,composerLabel:`Add a comment`,composerPlaceholder:`Write a comment. Type @ to mention someone.`,replyLabel:e=>`Reply to ${e}`,replyPlaceholder:`Write a reply`,editLabel:`Edit comment`,repliesName:e=>`Replies to ${e}`,reactions:`Reactions`,addReaction:`Add a reaction`,pickerName:`Choose a reaction`,emptyBody:`Write something first.`,done:Object.freeze({post:`Comment posted.`,reply:`Reply posted.`,edit:`Comment saved.`,delete:`Comment deleted.`,react:``}),failed:i});export{r as a,n as i,e as n,a as r,t};
@@ -1 +1 @@
1
- var e=[[`AF`,`Afghanistan`,`93`],[`AX`,`Åland Islands`,`358`],[`AL`,`Albania`,`355`],[`DZ`,`Algeria`,`213`],[`AS`,`American Samoa`,`1`],[`AD`,`Andorra`,`376`],[`AO`,`Angola`,`244`],[`AI`,`Anguilla`,`1`],[`AG`,`Antigua & Barbuda`,`1`],[`AR`,`Argentina`,`54`],[`AM`,`Armenia`,`374`],[`AW`,`Aruba`,`297`],[`AC`,`Ascension Island`,`247`],[`AU`,`Australia`,`61`],[`AT`,`Austria`,`43`],[`AZ`,`Azerbaijan`,`994`],[`BS`,`Bahamas`,`1`],[`BH`,`Bahrain`,`973`],[`BD`,`Bangladesh`,`880`],[`BB`,`Barbados`,`1`],[`BY`,`Belarus`,`375`],[`BE`,`Belgium`,`32`],[`BZ`,`Belize`,`501`],[`BJ`,`Benin`,`229`],[`BM`,`Bermuda`,`1`],[`BT`,`Bhutan`,`975`],[`BO`,`Bolivia`,`591`],[`BA`,`Bosnia & Herzegovina`,`387`],[`BW`,`Botswana`,`267`],[`BR`,`Brazil`,`55`],[`IO`,`British Indian Ocean Territory`,`246`],[`VG`,`British Virgin Islands`,`1`],[`BN`,`Brunei`,`673`],[`BG`,`Bulgaria`,`359`],[`BF`,`Burkina Faso`,`226`],[`BI`,`Burundi`,`257`],[`KH`,`Cambodia`,`855`],[`CM`,`Cameroon`,`237`],[`CA`,`Canada`,`1`],[`CV`,`Cape Verde`,`238`],[`BQ`,`Caribbean Netherlands`,`599`],[`KY`,`Cayman Islands`,`1`],[`CF`,`Central African Republic`,`236`],[`TD`,`Chad`,`235`],[`CL`,`Chile`,`56`],[`CN`,`China`,`86`],[`CX`,`Christmas Island`,`61`],[`CC`,`Cocos (Keeling) Islands`,`61`],[`CO`,`Colombia`,`57`],[`KM`,`Comoros`,`269`],[`CG`,`Congo - Brazzaville`,`242`],[`CD`,`Congo - Kinshasa`,`243`],[`CK`,`Cook Islands`,`682`],[`CR`,`Costa Rica`,`506`],[`CI`,`Côte d’Ivoire`,`225`],[`HR`,`Croatia`,`385`],[`CU`,`Cuba`,`53`],[`CW`,`Curaçao`,`599`],[`CY`,`Cyprus`,`357`],[`CZ`,`Czechia`,`420`],[`DK`,`Denmark`,`45`],[`DJ`,`Djibouti`,`253`],[`DM`,`Dominica`,`1`],[`DO`,`Dominican Republic`,`1`],[`EC`,`Ecuador`,`593`],[`EG`,`Egypt`,`20`],[`SV`,`El Salvador`,`503`],[`GQ`,`Equatorial Guinea`,`240`],[`ER`,`Eritrea`,`291`],[`EE`,`Estonia`,`372`],[`SZ`,`Eswatini`,`268`],[`ET`,`Ethiopia`,`251`],[`FK`,`Falkland Islands`,`500`],[`FO`,`Faroe Islands`,`298`],[`FJ`,`Fiji`,`679`],[`FI`,`Finland`,`358`],[`FR`,`France`,`33`],[`GF`,`French Guiana`,`594`],[`PF`,`French Polynesia`,`689`],[`GA`,`Gabon`,`241`],[`GM`,`Gambia`,`220`],[`GE`,`Georgia`,`995`],[`DE`,`Germany`,`49`],[`GH`,`Ghana`,`233`],[`GI`,`Gibraltar`,`350`],[`GR`,`Greece`,`30`],[`GL`,`Greenland`,`299`],[`GD`,`Grenada`,`1`],[`GP`,`Guadeloupe`,`590`],[`GU`,`Guam`,`1`],[`GT`,`Guatemala`,`502`],[`GG`,`Guernsey`,`44`],[`GN`,`Guinea`,`224`],[`GW`,`Guinea-Bissau`,`245`],[`GY`,`Guyana`,`592`],[`HT`,`Haiti`,`509`],[`HN`,`Honduras`,`504`],[`HK`,`Hong Kong SAR China`,`852`],[`HU`,`Hungary`,`36`],[`IS`,`Iceland`,`354`],[`IN`,`India`,`91`],[`ID`,`Indonesia`,`62`],[`IR`,`Iran`,`98`],[`IQ`,`Iraq`,`964`],[`IE`,`Ireland`,`353`],[`IM`,`Isle of Man`,`44`],[`IL`,`Israel`,`972`],[`IT`,`Italy`,`39`],[`JM`,`Jamaica`,`1`],[`JP`,`Japan`,`81`],[`JE`,`Jersey`,`44`],[`JO`,`Jordan`,`962`],[`KZ`,`Kazakhstan`,`7`],[`KE`,`Kenya`,`254`],[`KI`,`Kiribati`,`686`],[`XK`,`Kosovo`,`383`],[`KW`,`Kuwait`,`965`],[`KG`,`Kyrgyzstan`,`996`],[`LA`,`Laos`,`856`],[`LV`,`Latvia`,`371`],[`LB`,`Lebanon`,`961`],[`LS`,`Lesotho`,`266`],[`LR`,`Liberia`,`231`],[`LY`,`Libya`,`218`],[`LI`,`Liechtenstein`,`423`],[`LT`,`Lithuania`,`370`],[`LU`,`Luxembourg`,`352`],[`MO`,`Macao SAR China`,`853`],[`MG`,`Madagascar`,`261`],[`MW`,`Malawi`,`265`],[`MY`,`Malaysia`,`60`],[`MV`,`Maldives`,`960`],[`ML`,`Mali`,`223`],[`MT`,`Malta`,`356`],[`MH`,`Marshall Islands`,`692`],[`MQ`,`Martinique`,`596`],[`MR`,`Mauritania`,`222`],[`MU`,`Mauritius`,`230`],[`YT`,`Mayotte`,`262`],[`MX`,`Mexico`,`52`],[`FM`,`Micronesia`,`691`],[`MD`,`Moldova`,`373`],[`MC`,`Monaco`,`377`],[`MN`,`Mongolia`,`976`],[`ME`,`Montenegro`,`382`],[`MS`,`Montserrat`,`1`],[`MA`,`Morocco`,`212`],[`MZ`,`Mozambique`,`258`],[`MM`,`Myanmar (Burma)`,`95`],[`NA`,`Namibia`,`264`],[`NR`,`Nauru`,`674`],[`NP`,`Nepal`,`977`],[`NL`,`Netherlands`,`31`],[`NC`,`New Caledonia`,`687`],[`NZ`,`New Zealand`,`64`],[`NI`,`Nicaragua`,`505`],[`NE`,`Niger`,`227`],[`NG`,`Nigeria`,`234`],[`NU`,`Niue`,`683`],[`NF`,`Norfolk Island`,`672`],[`KP`,`North Korea`,`850`],[`MK`,`North Macedonia`,`389`],[`MP`,`Northern Mariana Islands`,`1`],[`NO`,`Norway`,`47`],[`OM`,`Oman`,`968`],[`PK`,`Pakistan`,`92`],[`PW`,`Palau`,`680`],[`PS`,`Palestinian Territories`,`970`],[`PA`,`Panama`,`507`],[`PG`,`Papua New Guinea`,`675`],[`PY`,`Paraguay`,`595`],[`PE`,`Peru`,`51`],[`PH`,`Philippines`,`63`],[`PL`,`Poland`,`48`],[`PT`,`Portugal`,`351`],[`PR`,`Puerto Rico`,`1`],[`QA`,`Qatar`,`974`],[`RE`,`Réunion`,`262`],[`RO`,`Romania`,`40`],[`RU`,`Russia`,`7`],[`RW`,`Rwanda`,`250`],[`WS`,`Samoa`,`685`],[`SM`,`San Marino`,`378`],[`ST`,`São Tomé & Príncipe`,`239`],[`SA`,`Saudi Arabia`,`966`],[`SN`,`Senegal`,`221`],[`RS`,`Serbia`,`381`],[`SC`,`Seychelles`,`248`],[`SL`,`Sierra Leone`,`232`],[`SG`,`Singapore`,`65`],[`SX`,`Sint Maarten`,`1`],[`SK`,`Slovakia`,`421`],[`SI`,`Slovenia`,`386`],[`SB`,`Solomon Islands`,`677`],[`SO`,`Somalia`,`252`],[`ZA`,`South Africa`,`27`],[`KR`,`South Korea`,`82`],[`SS`,`South Sudan`,`211`],[`ES`,`Spain`,`34`],[`LK`,`Sri Lanka`,`94`],[`BL`,`St. Barthélemy`,`590`],[`SH`,`St. Helena`,`290`],[`KN`,`St. Kitts & Nevis`,`1`],[`LC`,`St. Lucia`,`1`],[`MF`,`St. Martin`,`590`],[`PM`,`St. Pierre & Miquelon`,`508`],[`VC`,`St. Vincent & Grenadines`,`1`],[`SD`,`Sudan`,`249`],[`SR`,`Suriname`,`597`],[`SJ`,`Svalbard & Jan Mayen`,`47`],[`SE`,`Sweden`,`46`],[`CH`,`Switzerland`,`41`],[`SY`,`Syria`,`963`],[`TW`,`Taiwan`,`886`],[`TJ`,`Tajikistan`,`992`],[`TZ`,`Tanzania`,`255`],[`TH`,`Thailand`,`66`],[`TL`,`Timor-Leste`,`670`],[`TG`,`Togo`,`228`],[`TK`,`Tokelau`,`690`],[`TO`,`Tonga`,`676`],[`TT`,`Trinidad & Tobago`,`1`],[`TA`,`Tristan da Cunha`,`290`],[`TN`,`Tunisia`,`216`],[`TR`,`Türkiye`,`90`],[`TM`,`Turkmenistan`,`993`],[`TC`,`Turks & Caicos Islands`,`1`],[`TV`,`Tuvalu`,`688`],[`VI`,`U.S. Virgin Islands`,`1`],[`UG`,`Uganda`,`256`],[`UA`,`Ukraine`,`380`],[`AE`,`United Arab Emirates`,`971`],[`GB`,`United Kingdom`,`44`],[`US`,`United States`,`1`],[`UY`,`Uruguay`,`598`],[`UZ`,`Uzbekistan`,`998`],[`VU`,`Vanuatu`,`678`],[`VA`,`Vatican City`,`39`],[`VE`,`Venezuela`,`58`],[`VN`,`Vietnam`,`84`],[`WF`,`Wallis & Futuna`,`681`],[`EH`,`Western Sahara`,`212`],[`YE`,`Yemen`,`967`],[`ZM`,`Zambia`,`260`],[`ZW`,`Zimbabwe`,`263`]],t=t=>(e.find(e=>e[0]===t)||[``,``,``])[2];export{t as n,e as t};
1
+ var e=[[`AF`,`Afghanistan`,`93`],[`AX`,`Åland Islands`,`358`],[`AL`,`Albania`,`355`],[`DZ`,`Algeria`,`213`],[`AS`,`American Samoa`,`1`],[`AD`,`Andorra`,`376`],[`AO`,`Angola`,`244`],[`AI`,`Anguilla`,`1`],[`AG`,`Antigua & Barbuda`,`1`],[`AR`,`Argentina`,`54`],[`AM`,`Armenia`,`374`],[`AW`,`Aruba`,`297`],[`AC`,`Ascension Island`,`247`],[`AU`,`Australia`,`61`],[`AT`,`Austria`,`43`],[`AZ`,`Azerbaijan`,`994`],[`BS`,`Bahamas`,`1`],[`BH`,`Bahrain`,`973`],[`BD`,`Bangladesh`,`880`],[`BB`,`Barbados`,`1`],[`BY`,`Belarus`,`375`],[`BE`,`Belgium`,`32`],[`BZ`,`Belize`,`501`],[`BJ`,`Benin`,`229`],[`BM`,`Bermuda`,`1`],[`BT`,`Bhutan`,`975`],[`BO`,`Bolivia`,`591`],[`BA`,`Bosnia & Herzegovina`,`387`],[`BW`,`Botswana`,`267`],[`BR`,`Brazil`,`55`],[`IO`,`British Indian Ocean Territory`,`246`],[`VG`,`British Virgin Islands`,`1`],[`BN`,`Brunei`,`673`],[`BG`,`Bulgaria`,`359`],[`BF`,`Burkina Faso`,`226`],[`BI`,`Burundi`,`257`],[`KH`,`Cambodia`,`855`],[`CM`,`Cameroon`,`237`],[`CA`,`Canada`,`1`],[`CV`,`Cape Verde`,`238`],[`BQ`,`Caribbean Netherlands`,`599`],[`KY`,`Cayman Islands`,`1`],[`CF`,`Central African Republic`,`236`],[`TD`,`Chad`,`235`],[`CL`,`Chile`,`56`],[`CN`,`China`,`86`],[`CX`,`Christmas Island`,`61`],[`CC`,`Cocos (Keeling) Islands`,`61`],[`CO`,`Colombia`,`57`],[`KM`,`Comoros`,`269`],[`CG`,`Congo - Brazzaville`,`242`],[`CD`,`Congo - Kinshasa`,`243`],[`CK`,`Cook Islands`,`682`],[`CR`,`Costa Rica`,`506`],[`CI`,`Côte d’Ivoire`,`225`],[`HR`,`Croatia`,`385`],[`CU`,`Cuba`,`53`],[`CW`,`Curaçao`,`599`],[`CY`,`Cyprus`,`357`],[`CZ`,`Czechia`,`420`],[`DK`,`Denmark`,`45`],[`DJ`,`Djibouti`,`253`],[`DM`,`Dominica`,`1`],[`DO`,`Dominican Republic`,`1`],[`EC`,`Ecuador`,`593`],[`EG`,`Egypt`,`20`],[`SV`,`El Salvador`,`503`],[`GQ`,`Equatorial Guinea`,`240`],[`ER`,`Eritrea`,`291`],[`EE`,`Estonia`,`372`],[`SZ`,`Eswatini`,`268`],[`ET`,`Ethiopia`,`251`],[`FK`,`Falkland Islands`,`500`],[`FO`,`Faroe Islands`,`298`],[`FJ`,`Fiji`,`679`],[`FI`,`Finland`,`358`],[`FR`,`France`,`33`],[`GF`,`French Guiana`,`594`],[`PF`,`French Polynesia`,`689`],[`GA`,`Gabon`,`241`],[`GM`,`Gambia`,`220`],[`GE`,`Georgia`,`995`],[`DE`,`Germany`,`49`],[`GH`,`Ghana`,`233`],[`GI`,`Gibraltar`,`350`],[`GR`,`Greece`,`30`],[`GL`,`Greenland`,`299`],[`GD`,`Grenada`,`1`],[`GP`,`Guadeloupe`,`590`],[`GU`,`Guam`,`1`],[`GT`,`Guatemala`,`502`],[`GG`,`Guernsey`,`44`],[`GN`,`Guinea`,`224`],[`GW`,`Guinea-Bissau`,`245`],[`GY`,`Guyana`,`592`],[`HT`,`Haiti`,`509`],[`HN`,`Honduras`,`504`],[`HK`,`Hong Kong SAR China`,`852`],[`HU`,`Hungary`,`36`],[`IS`,`Iceland`,`354`],[`IN`,`India`,`91`],[`ID`,`Indonesia`,`62`],[`IR`,`Iran`,`98`],[`IQ`,`Iraq`,`964`],[`IE`,`Ireland`,`353`],[`IM`,`Isle of Man`,`44`],[`IL`,`Israel`,`972`],[`IT`,`Italy`,`39`],[`JM`,`Jamaica`,`1`],[`JP`,`Japan`,`81`],[`JE`,`Jersey`,`44`],[`JO`,`Jordan`,`962`],[`KZ`,`Kazakhstan`,`7`],[`KE`,`Kenya`,`254`],[`KI`,`Kiribati`,`686`],[`XK`,`Kosovo`,`383`],[`KW`,`Kuwait`,`965`],[`KG`,`Kyrgyzstan`,`996`],[`LA`,`Laos`,`856`],[`LV`,`Latvia`,`371`],[`LB`,`Lebanon`,`961`],[`LS`,`Lesotho`,`266`],[`LR`,`Liberia`,`231`],[`LY`,`Libya`,`218`],[`LI`,`Liechtenstein`,`423`],[`LT`,`Lithuania`,`370`],[`LU`,`Luxembourg`,`352`],[`MO`,`Macao SAR China`,`853`],[`MG`,`Madagascar`,`261`],[`MW`,`Malawi`,`265`],[`MY`,`Malaysia`,`60`],[`MV`,`Maldives`,`960`],[`ML`,`Mali`,`223`],[`MT`,`Malta`,`356`],[`MH`,`Marshall Islands`,`692`],[`MQ`,`Martinique`,`596`],[`MR`,`Mauritania`,`222`],[`MU`,`Mauritius`,`230`],[`YT`,`Mayotte`,`262`],[`MX`,`Mexico`,`52`],[`FM`,`Micronesia`,`691`],[`MD`,`Moldova`,`373`],[`MC`,`Monaco`,`377`],[`MN`,`Mongolia`,`976`],[`ME`,`Montenegro`,`382`],[`MS`,`Montserrat`,`1`],[`MA`,`Morocco`,`212`],[`MZ`,`Mozambique`,`258`],[`MM`,`Myanmar (Burma)`,`95`],[`NA`,`Namibia`,`264`],[`NR`,`Nauru`,`674`],[`NP`,`Nepal`,`977`],[`NL`,`Netherlands`,`31`],[`NC`,`New Caledonia`,`687`],[`NZ`,`New Zealand`,`64`],[`NI`,`Nicaragua`,`505`],[`NE`,`Niger`,`227`],[`NG`,`Nigeria`,`234`],[`NU`,`Niue`,`683`],[`NF`,`Norfolk Island`,`672`],[`KP`,`North Korea`,`850`],[`MK`,`North Macedonia`,`389`],[`MP`,`Northern Mariana Islands`,`1`],[`NO`,`Norway`,`47`],[`OM`,`Oman`,`968`],[`PK`,`Pakistan`,`92`],[`PW`,`Palau`,`680`],[`PS`,`Palestinian Territories`,`970`],[`PA`,`Panama`,`507`],[`PG`,`Papua New Guinea`,`675`],[`PY`,`Paraguay`,`595`],[`PE`,`Peru`,`51`],[`PH`,`Philippines`,`63`],[`PL`,`Poland`,`48`],[`PT`,`Portugal`,`351`],[`PR`,`Puerto Rico`,`1`],[`QA`,`Qatar`,`974`],[`RE`,`Réunion`,`262`],[`RO`,`Romania`,`40`],[`RU`,`Russia`,`7`],[`RW`,`Rwanda`,`250`],[`WS`,`Samoa`,`685`],[`SM`,`San Marino`,`378`],[`ST`,`São Tomé & Príncipe`,`239`],[`SA`,`Saudi Arabia`,`966`],[`SN`,`Senegal`,`221`],[`RS`,`Serbia`,`381`],[`SC`,`Seychelles`,`248`],[`SL`,`Sierra Leone`,`232`],[`SG`,`Singapore`,`65`],[`SX`,`Sint Maarten`,`1`],[`SK`,`Slovakia`,`421`],[`SI`,`Slovenia`,`386`],[`SB`,`Solomon Islands`,`677`],[`SO`,`Somalia`,`252`],[`ZA`,`South Africa`,`27`],[`KR`,`South Korea`,`82`],[`SS`,`South Sudan`,`211`],[`ES`,`Spain`,`34`],[`LK`,`Sri Lanka`,`94`],[`BL`,`St. Barthélemy`,`590`],[`SH`,`St. Helena, Ascension & Tristan da Cunha`,`290`],[`KN`,`St. Kitts & Nevis`,`1`],[`LC`,`St. Lucia`,`1`],[`MF`,`St. Martin`,`590`],[`PM`,`St. Pierre & Miquelon`,`508`],[`VC`,`St. Vincent & Grenadines`,`1`],[`SD`,`Sudan`,`249`],[`SR`,`Suriname`,`597`],[`SJ`,`Svalbard & Jan Mayen`,`47`],[`SE`,`Sweden`,`46`],[`CH`,`Switzerland`,`41`],[`SY`,`Syria`,`963`],[`TW`,`Taiwan`,`886`],[`TJ`,`Tajikistan`,`992`],[`TZ`,`Tanzania`,`255`],[`TH`,`Thailand`,`66`],[`TL`,`Timor-Leste`,`670`],[`TG`,`Togo`,`228`],[`TK`,`Tokelau`,`690`],[`TO`,`Tonga`,`676`],[`TT`,`Trinidad & Tobago`,`1`],[`TA`,`Tristan da Cunha`,`290`],[`TN`,`Tunisia`,`216`],[`TR`,`Türkiye`,`90`],[`TM`,`Turkmenistan`,`993`],[`TC`,`Turks & Caicos Islands`,`1`],[`TV`,`Tuvalu`,`688`],[`VI`,`U.S. Virgin Islands`,`1`],[`UG`,`Uganda`,`256`],[`UA`,`Ukraine`,`380`],[`AE`,`United Arab Emirates`,`971`],[`GB`,`United Kingdom`,`44`],[`US`,`United States`,`1`],[`UY`,`Uruguay`,`598`],[`UZ`,`Uzbekistan`,`998`],[`VU`,`Vanuatu`,`678`],[`VA`,`Vatican City`,`39`],[`VE`,`Venezuela`,`58`],[`VN`,`Vietnam`,`84`],[`WF`,`Wallis & Futuna`,`681`],[`EH`,`Western Sahara`,`212`],[`YE`,`Yemen`,`967`],[`ZM`,`Zambia`,`260`],[`ZW`,`Zimbabwe`,`263`]],t=t=>e.find(e=>e[0]===t)?.[2]??``;export{t as n,e as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./countries-DQL9nAUt.js";var t=/^\+?\d+$/,n=e=>String(e??``).split(`,`).map(e=>e.trim().toUpperCase()).filter(Boolean),r=t=>{let r=n(t.getAttribute(`countries`)),i=r.length?new Set(r):null,a=e.filter(([e])=>!i||i.has(e)),o=new Map(a.map(e=>[e[0],e])),s=[...new Set(n(t.getAttribute(`suggested`)))].map(e=>o.get(e)).filter(e=>e!==void 0);if(!s.length)return a.map(e=>({tuple:e,group:null}));let c=new Set(s.map(e=>e[0])),l=t.getAttribute(`suggested-label`)||`Suggested`,u=t.getAttribute(`all-countries-label`)||`All countries`;return[...s.map(e=>({tuple:e,group:l})),...a.filter(e=>!c.has(e[0])).map(e=>({tuple:e,group:u}))]},i=({tuple:[e,t,n],group:r})=>({value:e,label:t,flag:e,meta:`+${n}`,...r?{group:r}:{}}),a=([,e,n],r)=>r?t.test(r)?n.startsWith(r.replace(`+`,``)):e.toLowerCase().includes(r):!0;function o(){let e,t=[];return{mount(n){e=n,t=r(n),n.setPartOptions(t.map(i))},onQuery(n){let r=n.trim().toLowerCase();return e.setPartOptions(t.filter(e=>a(e.tuple,r)).map(i)),!0},teardown(){}}}export{o as default};
@@ -0,0 +1 @@
1
+ import{n as e}from"./devWarn-DXdRWZs3.js";var t=/* @__PURE__ */ new Map,n=n=>{if(t.has(n))return t.get(n)??null;let r=null;try{r=RegExp(`^(?:${n})$`,`u`)}catch{e(`<wui-select> pattern is not a valid regular expression and is ignored: ${n}`)}return t.set(n,r),r},r=(e,t)=>{let r=e.getAttribute(`invalid-message`)||`Enter a valid value.`,i=e.getAttribute(`pattern`);if(i){let e=n(i);if(e&&!e.test(t))return r}let a=e.validate;if(typeof a!=`function`)return``;let o=a(t);return o===!0?``:typeof o==`string`&&o?o:r};export{r as t};
@@ -0,0 +1 @@
1
+ import{f as e}from"./formatters-ljfITOZ3.js";var t=48,n=1200,r=10,i=50,a=[`start`,`end`],o=8,s={comfortable:72,cozy:48,compact:40},c={resize:e=>e?`Resize ${e} column`:`Resize column`,width:e=>`${e} pixels`,rows:t=>`${e(t,{decimals:0})} ${t===1?`row`:`rows`}`,saved:e=>e?`${e} saved.`:`Row saved.`,savedMany:t=>`${e(t,{decimals:0})} rows saved.`,notSaved:(e,t)=>`${e?`${e} was not saved.`:`Row was not saved.`}${t?` ${t}`:``}`},l=t=>e(t,{decimals:0}),u=e=>Math.min(n,Math.max(48,Math.round(Number(e)||0)));function d(e,t,n=[]){let r=new Map(n.map(e=>[e,[]]));return e.forEach((e,n)=>{let i=t(e,n),a=r.get(i);a||(a=[],r.set(i,a)),a.push(e)}),[...r].filter(([,e])=>e.length>0).map(([e,t])=>({key:e,items:t}))}function f({scrollTop:e,viewport:t,rowHeight:n,count:r,overscan:i=8}){let a=n>0?n:s.comfortable,o=Math.floor(Math.max(0,e)/a),c=Math.max(0,o-i);c-=c%2;let l=Math.min(r,o+Math.ceil(Math.max(0,t)/a)+i),u=Math.min(c,l);return{start:u,end:l,before:u*a,after:Math.max(0,r-l)*a}}var p=e=>`wui-widths:${e}`;function m(e){if(!e)return{};try{let t=JSON.parse(window.localStorage.getItem(p(e))||`{}`),n={};if(t&&typeof t==`object`)for(let[e,r]of Object.entries(t))Number.isFinite(r)&&(n[e]=u(r));return n}catch{return{}}}function h(e,t){if(e)try{Object.keys(t).length?window.localStorage.setItem(p(e),JSON.stringify(t)):window.localStorage.removeItem(p(e))}catch{}}var g=(e,t)=>`--wui-pin-${e}-${t}`,_=`--wui-pin-at`,v=(e,t)=>`var(${g(e,t)}, 0px)`;function y(e){let t=e.map(()=>null),n=-1;e.forEach((e,t)=>{e===`start`&&(n=t)});let r=0;for(let i=0;i<=n;i++)(e[i]===`start`||e[i]===`lead`)&&(t[i]={side:`start`,ordinal:r++,edge:!1});let i=t[n];i&&(i.edge=!0);let a=-1;r=0;for(let n=e.length-1;n>=0;n--)e[n]===`end`&&(t[n]={side:`end`,ordinal:r++,edge:!1},a=n);let o=t[a];return o&&(o.edge=!0),t}var b=e=>e?`wui-pin-${e.side}${e.edge?` wui-pin-${e.side}-edge`:``}`:``,x=200,S=220,C=`cubic-bezier(0.22, 1, 0.36, 1)`,w=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,T=e=>e.getAttribute(`data-row-key`)??e;function E(e){let t=[...e];if(t.length>200)return null;let n=/* @__PURE__ */ new Map;for(let e of t)e.hidden||n.set(T(e),e.offsetTop);return n}function D(e,t){let n=[...e];if(!t||n.length>200||w())return 0;let r=0;for(let e of n){if(e.hidden||typeof e.animate!=`function`)continue;let n=t.get(T(e));if(n===void 0)continue;let i=n-e.offsetTop;Math.abs(i)<1||(e.animate([{transform:`translateY(${i}px)`},{transform:`translateY(0)`}],{duration:220,easing:C}),r++)}return r}function O(e,t){if(!e||!t)return!1;let n=new Set(t),r=new Set(e),i=e.filter(e=>n.has(e)),a=t.filter(e=>r.has(e));return i.some((e,t)=>e!==a[t])}var k=[`saving`,`error`],A=`data-wui-save-state`,j=`wui-row-save-error`,M=e=>{let t=e.querySelector(`:scope > .wui-name-cell`);return t instanceof HTMLTableCellElement?t:[...e.cells].find(e=>!e.matches(`.wui-select-cell, .wui-expand-cell`))??null};function N(e){let t=M(e);if(!t)return``;let n=t.querySelector(`.u-name`);if(n)return(n.textContent??``).trim();let r=``;for(let e of t.childNodes)e instanceof Element&&e.classList.contains(`wui-row-save-error`)||(r+=e.textContent??``);return r.replace(/\s+/g,` `).trim()}function P(e,t,n=``){if(t!==null&&!k.includes(t))throw Error(`A row's save state is ${k.join(` or `)} (or null to clear it), not "${t}".`);e.querySelector(`:scope > * > .${j}`)?.remove(),t===null?e.removeAttribute(A):e.setAttribute(A,t),t===`saving`?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`);let r=t===`error`&&n?M(e):null;if(r){let t=e.ownerDocument.createElement(`span`);t.className=j,t.textContent=n,r.append(t)}}function F(e,t){let n=[];if(!e)return n;for(let[r,i]of e){let e=t.get(r);i.state===`saving`&&e&&e.state!==`saving`&&n.push({label:e.label,ok:e.state!==`error`,message:e.message||``})}return n}function I(e){let t=e.filter(e=>e.ok),n=[],[r]=t;t.length===1&&r?n.push(c.saved(r.label)):t.length>1&&n.push(c.savedMany(t.length));for(let t of e)t.ok||n.push(c.notSaved(t.label,t.message));return n.join(` `)}export{F as A,y as C,O as D,N as E,h as M,I as O,g as S,m as T,d as _,a,v as b,s as c,A as d,j as f,l as g,u as h,_ as i,f as j,P as k,x as l,o as m,t as n,r as o,k as p,c as r,i as s,n as t,S as u,M as v,D as w,b as x,E as y};
@@ -0,0 +1 @@
1
+ function e(e,t){if(e==null)throw Error(t);return e}function t(e,t,n){if(!(e instanceof t))throw TypeError(n);return e}function n(e,t){return e instanceof Element?e.closest(t):null}export{t as n,e as r,n as t};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./buttonClass-GtEi8hAY.js";import{n,r,t as i}from"./dom-Do1pAA12.js";import{t as a}from"./loader-ByHAB1wi.js";import{n as o,t as s}from"./devWarn-DXdRWZs3.js";import{E as c,k as l,r as u,w as ee,y as d}from"./dataTable-B-7oAeii.js";import{t as te}from"./iconGlyphs.g-DPqoOoXy.js";import{LIST_QUERY_RESERVED as f,SEARCH_PARAM as p}from"./listQuery.js";import{l as ne,s as m}from"./wuiHttp-DGbD7Fra.js";function re(e,t){let n=e.getInstance(t);n&&(n.tip?.isConnected?(t.addEventListener(`hidden${e.EVENT_KEY}`,()=>n.dispose(),{once:!0}),n.hide()):n.dispose())}var h=`Select all rows`,g=`Select row`,_=`wui-select-cell`,ie=(e,t)=>{let n=e.createElement(`input`);return n.type=`checkbox`,n.className=`wui-check`,n.setAttribute(`aria-label`,t),n};function v(e=document){let t=e.createElement(`th`);return t.className=_,t.appendChild(ie(e,h)),t}function ae(e=document,{disabled:t=!1}={}){let n=e.createElement(`td`);n.className=_;let r=ie(e,g);return r.disabled=t,n.appendChild(r),n}function oe(e=document){let t=e.createElement(`td`);return t.className=_,t}var y=e=>e.firstElementChild?.classList.contains(_),b=e=>e.matches(`.wui-group-row, .wui-virtual-spacer`),x=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n);function se(e){for(let t of e){if(y(t)||b(t))continue;let e=t.getAttribute(`data-row-selectable`)===`false`;t.insertBefore(ae(t.ownerDocument,{disabled:e}),t.firstChild)}}function ce(e){let t=e.querySelector(`thead tr`);if(!(t instanceof HTMLTableRowElement))return null;y(t)||t.insertBefore(v(e.ownerDocument),t.firstChild),se(x(e,`tbody tr`,HTMLTableRowElement));for(let t of x(e,`tfoot tr`,HTMLTableRowElement))y(t)||t.insertBefore(oe(e.ownerDocument),t.firstChild);let n=t.querySelector(`.${_} .wui-check`);return n instanceof HTMLInputElement?n:null}function le(e){let t=e.querySelector(`thead .${_} .wui-check`),n=x(e,`tbody tr .wui-check:not(:disabled)`,HTMLInputElement),r=n.length,i=n.filter(e=>e.checked).length;t instanceof HTMLInputElement&&(t.checked=r>0&&i===r,t.indeterminate=i>0&&i<r);for(let t of x(e,`tbody tr`,HTMLTableRowElement)){let e=t.querySelector(`.wui-check`);t.classList.toggle(`is-selected`,e instanceof HTMLInputElement&&e.checked)}return{selected:i,total:r}}var ue=`tbody .${_} .wui-check:not(:disabled)`;function de(e,t){let n=null,r=e=>e instanceof Element&&e.matches(`.wui-select-cell .wui-check:not(:disabled)`)&&!!e.closest(`tbody`);e.addEventListener(`mousedown`,e=>{e.shiftKey&&r(e.target)&&e.preventDefault()}),e.addEventListener(`click`,i=>{let a=i.target;if(r(a)){if(i.shiftKey&&n?.isConnected&&n!==a){let r=x(e,ue,HTMLInputElement),i=r.indexOf(n),o=r.indexOf(a);if(i>=0&&o>=0){let e=[];for(let t of r.slice(Math.min(i,o),Math.max(i,o)+1))t!==a&&t.checked!==a.checked&&(t.checked=a.checked,e.push(t));e.length&&t?.(e,a.checked)}}n=a}})}var S=Object.freeze({loading:`Loading rows`,error:`These rows did not load. Try again.`,network:`The connection dropped before the rows loaded. Check it and try again.`,forbidden:`You do not have access to these rows.`,retry:`Retry`,actionFailed:`That did not work. Try again.`,actionForbidden:`You do not have permission to do that.`,empty:`No rows`}),fe=5,pe=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,me=e=>e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled,he=e=>pe(e)&&`type`in e&&e.type===`hidden`,C=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n),w=(e,t,n)=>{let r=e.querySelector(t);return r instanceof n?r:null},T=(e,t,n)=>{let r=e.closest(t);return r instanceof n?r:null},ge=e=>e.localName===`wui-select`,_e=/* @__PURE__ */ new WeakMap,E=(e,t)=>{let n=Number(e);return Number.isInteger(n)?n:t},ve=e=>({total:E(e.dataset.total,0),totalCapped:e.dataset.totalCapped===`true`,page:E(e.dataset.page,1),pageSize:E(e.dataset.pageSize,0),sortBy:e.dataset.sortBy||``,sortOrder:e.dataset.sortOrder===`desc`?`desc`:`asc`}),ye=(e,t)=>{e&&k().toast(e,{variant:t})},be=(e,t)=>{if(!e)return;let n=new Set([...e.elements].filter(e=>!he(e)||e.hasAttribute(`data-range-mirror`)).map(e=>e.getAttribute(`name`)).filter(e=>e&&!f.includes(e))),r=[...t].some(([e,t])=>t!==``&&n.has(e));for(let t of C(e,`[data-wui-filter-clear]`,HTMLElement))t.hidden=!r},xe=new Intl.NumberFormat(`en-IN`),Se=(e,t)=>t?`${xe.format(e)}+`:xe.format(e),Ce=(e,t,n)=>{let r=e.closest(`.wui-list-card`),i=r?w(r,`.wui-list-card-count`,HTMLElement):null;i&&(i.textContent=Se(t,n))};function D(e=document){let t=C(e,`[data-wui-server]`,HTMLElement);e instanceof HTMLElement&&e.matches(`[data-wui-server]`)&&t.unshift(e);for(let e of t){if(_e.has(e))continue;let t=we(e);_e.set(e,t),e.hasAttribute(`data-load-first-page`)&&t.reload()}}function O(e){let t=e instanceof Element?T(e,`[data-wui-server]`,HTMLElement):null;return t&&_e.get(t)||null}function we(n){let i=w(n,`.table-wrap`,HTMLElement),a=i?w(i,`:scope > table`,HTMLTableElement):null,re=n.dataset.src;if(!i||!a||!re)throw Error(`A server-paged table needs data-src and a .table-wrap > table: render it with <app-data-table src>.`);let h=w(i,`:scope > [data-wui-table-state]`,HTMLElement),g=w(n,`[data-wui-table-pager]`,HTMLElement),ie=w(n,`[data-wui-table-status]`,HTMLElement),v={urlState:n.dataset.urlState!==`false`,refreshOnSuccess:n.dataset.refreshOnSuccess!==`false`,filtersForm:n.dataset.filtersForm||null,filtersRegion:n.dataset.filtersRegion||null,searchInput:n.dataset.searchInput||null,loadingText:n.dataset.loadingText||S.loading,errorText:n.dataset.errorText||S.error},ae=new URL(re,window.location.href),oe=new Set(ae.searchParams.keys()),y=a.hasAttribute(`data-app-datatable-selectable`),b=/* @__PURE__ */ new Set,x=!1,ue=m(),_e=new AbortController,E={signal:_e.signal},xe=w(a,`:scope > tbody[data-wui-rows]`,HTMLTableSectionElement),D=r(xe,`A server-paged table needs its rows in <app-table-rows> (tbody[data-wui-rows]).`),O=ve(D),we=null,Te=null,Ee=e=>{let t=new URLSearchParams;for(let[n,r]of new URLSearchParams(e))oe.has(n)||t.append(n,r);return t},De=e=>Ee(new URL(e,window.location.href).search),Oe=e=>{let t=e.toString();return`${window.location.pathname}${t?`?${t}`:``}${window.location.hash}`},ke=e=>{let t=new URL(ae.href);for(let[n,r]of e)oe.has(n)||t.searchParams.append(n,r);return t.origin===window.location.origin?`${t.pathname}${t.search}`:t.href},je=(e,t)=>{let n=new URLSearchParams(e);return n.has(`page`)&&n.set(`page`,String(t.page)),n.has(`pageSize`)&&n.set(`pageSize`,String(t.pageSize)),n.has(`sortBy`)?t.sortBy?(n.set(`sortBy`,t.sortBy),n.set(`sortOrder`,t.sortOrder)):(n.delete(`sortBy`),n.delete(`sortOrder`)):n.delete(`sortOrder`),n},A=je(v.urlState?Ee(window.location.search):new URLSearchParams,O);v.urlState&&Oe(A)!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&window.history.replaceState(window.history.state,``,Oe(A));let j=(e,t)=>i.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:t})),M=e=>{ie&&(ie.textContent=e)},Me=e=>{if(e.total===0)return S.empty;let t=e.pageSize>0?Math.max(1,Math.ceil(e.total/e.pageSize)):1,n=e.totalCapped?Se(e.total,!0):`${e.total}`;return`Page ${e.page} of ${t}, ${n} ${e.total===1?`row`:`rows`}`},N=()=>C(a,`:scope > thead > tr:first-child > th`,HTMLTableCellElement),P=e=>{if(y&&C(e,`:scope > tr:not(.wui-group-row, .wui-virtual-spacer)`,HTMLTableRowElement).some(e=>!e.dataset.rowKey))throw Error(`A selectable server-paged table needs data-row-key on every row, so a selection can span pages.`)},F=e=>{let t=n.dataset.activeRowKey;if(t!==void 0)for(let n of e){let e=n.classList.contains(`wui-row-active`),r=t!==``&&n.dataset.rowKey===t;n.classList.toggle(`wui-row-active`,r),r?n.setAttribute(`aria-current`,`true`):e&&n.removeAttribute(`aria-current`)}},Ne=e=>{if(y){se(e);for(let t of e){let e=w(t,`.${_} .wui-check:not(:disabled)`,HTMLInputElement);e&&(x&&b.add(t.dataset.rowKey),e.checked=b.has(t.dataset.rowKey))}le(a)}F(e);let t=N();if(a.classList.contains(`wui-table-stack`))for(let n of e)[...n.cells].forEach((e,n)=>{let r=t[n]?.textContent?.trim();r&&!e.hasAttribute(`data-label`)&&e.setAttribute(`data-label`,r)});t.forEach((t,n)=>{if(t.classList.contains(`wui-col-hidden`))for(let t of e)t.cells[n]?.classList.add(`wui-col-hidden`)})},Pe=e=>Ne(C(e,`:scope > tr`,HTMLTableRowElement)),Fe=e=>{for(let t of e.querySelectorAll(`:scope > template[data-wui-pager], :scope > template[data-wui-empty], :scope > template[data-wui-filters]`))t.remove()},I=e=>e?.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0})),Ie=(e,t)=>{if(!h)return;let n=w(e,`:scope > template[data-wui-empty]`,HTMLTemplateElement);I(h),t.total===0&&n?(h.replaceChildren(n.content.cloneNode(!0)),h.hidden=!1):(h.replaceChildren(),h.hidden=!0)},Le=e=>{let t=ve(e),n=t.sortBy!==O.sortBy||t.sortOrder!==O.sortOrder?d(D.rows):null;if(g){let t=w(e,`:scope > template[data-wui-pager]`,HTMLTemplateElement);I(g),g.replaceChildren(...t?[t.content.cloneNode(!0)]:[]),g.hidden=!1}Ie(e,t);let r=w(e,`:scope > template[data-wui-filters]`,HTMLTemplateElement),o=v.filtersRegion&&r?w(document,v.filtersRegion,HTMLElement):null;o&&r&&(I(o),o.replaceChildren(r.content.cloneNode(!0))),Fe(e),I(D),a.replaceChild(e,D),D=e;let s=x&&t.total!==O.total;return O=t,s&&(x=!1),i.removeAttribute(`data-wui-table-error`),Pe(e),H(),ee(e.rows,n),s&&We(),o},Re=e=>{let t=document.createElement(`template`);t.innerHTML=`<table>${e}</table>`;let n=w(t.content,`tbody[data-wui-rows]`,HTMLTableSectionElement);return n&&P(n),n?document.importNode(n,!0):null},ze=(e,t=N())=>{let n=document.createElement(`tr`);for(let r=0;r<e;r++){let e=t[r],i=e?.classList.contains(`text-center`),a=!i&&(e?.classList.contains(`num`)||e?.classList.contains(`text-end`)||e?.classList.contains(`wui-cell-end`)),o=document.createElement(`td`);i?o.classList.add(`text-center`):a&&o.classList.add(e?.classList.contains(`num`)?`num`:`wui-cell-end`);let s=document.createElement(`span`);s.className=`skeleton`,s.setAttribute(`aria-hidden`,`true`);let c=i?44:a?56:60;s.style.cssText=`display:block;width:${c}%;height:12px;border-radius:6px`,o.append(s),n.append(o)}return n},L=()=>{if(D.querySelector(`:scope > tr:not([data-wui-skeleton])`))return;let e=Math.max(1,N().length);D.replaceChildren(...Array.from({length:fe},()=>{let t=ze(e);return t.setAttribute(`data-wui-skeleton`,``),t})),i.removeAttribute(`data-wui-table-error`),h&&(h.hidden=!0)},R=e=>{e?(i.setAttribute(`aria-busy`,`true`),L()):i.removeAttribute(`aria-busy`)},Be=e=>e===`forbidden`?S.forbidden:e===`network`?S.network:v.errorText,Ve=n=>{let r=Be(n);if(i.setAttribute(`data-wui-table-error`,n),g&&(g.hidden=!0),h){let i=document.createElement(`div`);i.className=`empty-state wui-empty-state-table wui-table-error`,i.setAttribute(`role`,`alert`);let a=document.createElement(`span`);a.className=`empty-state-icon`,a.innerHTML=te(n===`forbidden`?`lock`:`alert-circle`,{size:24});let o=document.createElement(`div`);o.className=`empty-state-title`,o.textContent=r;let s=document.createElement(`div`);s.className=`empty-state-action`;let c=document.createElement(`button`);c.type=`button`,c.className=e(`primary`,`outline`,`sm`),c.dataset.wui=t,c.setAttribute(`data-wui-table-retry`,``),c.textContent=S.retry,s.append(c),i.append(a,o,s),I(h),h.replaceChildren(i),h.hidden=!1}M(r)},z=()=>v.filtersForm?w(document,v.filtersForm,HTMLFormElement):null,B=async(e,t=`none`,{quiet:r=!1}={})=>{let a=new URLSearchParams(e);r||(we={query:a,mode:t},R(!0),M(v.loadingText)),j(`wui:table:loading`,{query:a.toString()});let c=await ue.run(ke(a));if(c.kind===`aborted`||c.kind===`stale`||c.kind===`session`)return c;r||R(!1);let l=null;if(c.ok)try{l=Re(c.html)}catch(e){s(e)}if(!c.ok||!l){let e=c.ok?`server`:c.kind;return r?o(`A quiet server table refresh failed; the rows on screen are kept.`,e):Ve(e),j(`wui:table:error`,{status:c.status,kind:e,message:Be(e)}),c}let u=Le(l);return A=je(a,O),be(z(),A),v.urlState&&t===`push`?window.history.pushState(window.history.state,``,Oe(A)):v.urlState&&t===`replace`&&window.history.replaceState(window.history.state,``,Oe(A)),r||M(Me(O)),k().refresh(i),u&&k().refresh(u),Ce(n,O.total,O.totalCapped),j(`wui:table:loaded`,{...O,query:A.toString()}),c},V=e=>(e.delete(`page`),e),He=()=>C(a,`:scope > thead th[data-sort-key]`,HTMLTableCellElement),H=()=>{for(let e of He()){let t=e.dataset.sortKey===O.sortBy;e.setAttribute(`aria-sort`,t?O.sortOrder===`desc`?`descending`:`ascending`:`none`)}};for(let e of He())if(e.classList.add(`sortable`),e.tabIndex=0,!e.querySelector(`.sort-icon`)){let t=e.classList.contains(`num`)||e.classList.contains(`text-end`),n=document.createElement(`span`);n.className=t?`sort-icon wui-sort-lead`:`sort-icon`,n.innerHTML=te(`chevrons-up-down`,{size:14}),t?e.prepend(n):e.append(n)}let Ue=e=>{let t=V(new URLSearchParams(A)),n=O.sortBy===e&&O.sortOrder===`asc`?`desc`:`asc`;return t.set(`sortBy`,e),t.set(`sortOrder`,n),B(t,`push`)};a.addEventListener(`click`,e=>{let t=e.target instanceof Element?T(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&a.tHead?.contains(t)&&Ue(t.dataset.sortKey??``)}),a.addEventListener(`keydown`,e=>{if(e.key!==`Enter`&&e.key!==` `)return;let t=e.target instanceof Element?T(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&a.tHead?.contains(t)&&(e.preventDefault(),Ue(t.dataset.sortKey??``))});let We=()=>{le(a);let e=x?{selected:O.total,total:O.total,allMatching:x}:{selected:b.size,total:O.total};a.dispatchEvent(new CustomEvent(`selectionchange`,{bubbles:!0,detail:e}))};y&&(de(a,(e,t)=>{for(let n of e){let e=T(n,`tr`,HTMLTableRowElement)?.dataset.rowKey;e&&(t?b.add(e):b.delete(e))}t||(x=!1)}),a.addEventListener(`change`,e=>{let t=e.target;if(t instanceof HTMLInputElement&&t.matches(`.wui-select-cell .wui-check:not(:disabled)`)){if(t.checked||(x=!1),a.tHead?.contains(t))for(let e of C(D,`:scope > tr`,HTMLTableRowElement)){let n=w(e,`.${_} .wui-check:not(:disabled)`,HTMLInputElement);n&&(n.checked=t.checked,t.checked?b.add(e.dataset.rowKey):b.delete(e.dataset.rowKey))}else{let e=T(t,`tr`,HTMLTableRowElement)?.dataset.rowKey;if(!e)return;t.checked?b.add(e):b.delete(e)}We()}})),g&&(g.addEventListener(`click`,e=>{let t=e.target instanceof Element?T(e.target,`a[href]`,HTMLAnchorElement):null;!t||e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(e.preventDefault(),B(De(t.getAttribute(`href`)??``),`push`))}),g.addEventListener(`change`,e=>{let t=e.target;t instanceof HTMLSelectElement&&t.classList.contains(`tpg-select`)&&t.value&&(e.stopPropagation(),B(De(t.value),`push`))}));let U=()=>{if(!v.searchInput)return null;let e=w(document,v.searchInput,HTMLElement);return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e:e?w(e,`input`,HTMLInputElement):null},W=()=>n.isConnected?!0:(_e.abort(),clearTimeout(Te??void 0),!1),Ge=(e,t)=>{let n=[...e.elements].filter(pe),r=/* @__PURE__ */ new Set;for(let e of n)e.name&&!he(e)&&r.add(e.name);let i=[];for(let e of n)if(e.name&&!me(e)){if(e instanceof HTMLInputElement&&e.matches(`input[type="hidden"][data-wui-carried]`))r.has(e.name)||i.push([e.name,e.value]);else if(e instanceof HTMLInputElement&&e.matches(`input[type=checkbox], input[type=radio]`))e.checked&&i.push([e.name,e.value]);else if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)e.matches(`[type=submit], [type=button], [type=reset], [type=image], [type=file]`)||i.push([e.name,e.value]);else if(e instanceof HTMLSelectElement)for(let t of e.selectedOptions)i.push([e.name,t.value])}return(t instanceof HTMLButtonElement||t instanceof HTMLInputElement)&&t.name&&!t.disabled&&i.push([t.name,t.value]),i},Ke=(e,t)=>{let n=new Set([...e.elements].filter(pe).map(e=>e.name).filter(Boolean)),r=new URLSearchParams,i=e=>e!==`search`&&f.includes(e);for(let[e,t]of A)e!==`page`&&(i(e)||!n.has(e))&&r.append(e,t);for(let[n,a]of Ge(e,t))a===``||i(n)||oe.has(n)||r.append(n,a);let a=U();if(a){r.delete(p);let e=a.value.trim();e&&r.set(p,e)}return B(r,`push`)},qe=e=>v.filtersForm&&e.closest?.(v.filtersForm)||v.filtersRegion&&e.closest?.(v.filtersRegion)||null;document.addEventListener(`submit`,e=>{W()&&v.filtersForm&&e.target instanceof HTMLFormElement&&e.target.matches(v.filtersForm)&&(e.preventDefault(),Ke(e.target,e.submitter))},E),document.addEventListener(`change`,e=>{if(!W()||!v.filtersForm||!(e.target instanceof Element))return;let t=T(e.target,v.filtersForm,HTMLFormElement);!t||e.target===U()||t.hasAttribute(`data-wui-apply-on-change`)||e.target.closest(`wui-filter-popover`)||Ke(t)},E);let Je=(e,t)=>{if(!e)return;let n=e=>t.get(e)??``;for(let r of C(e,`input[name]:not([type=hidden])`,HTMLInputElement))if(r.type===`checkbox`)r.checked=t.getAll(r.name).includes(r.value);else if(r.type===`radio`){let e=n(r.name)===r.value;if(r.checked===e)continue;r.checked=e,e&&r.dispatchEvent(new Event(`change`))}else r.value!==n(r.name)&&(r.value=n(r.name),r.dispatchEvent(new Event(`input`,{bubbles:!0})));for(let r of C(e,`select[name]`,HTMLSelectElement))if(!r.multiple)r.value=n(r.name);else for(let e of r.options)e.selected=t.getAll(r.name).includes(e.value);for(let r of[...e.querySelectorAll(`wui-select[name]`)].filter(ge)){let e=r.getAttribute(`name`)??``;r.value=r.mode===`multiple`||r.mode===`tag`?t.getAll(e):n(e)}for(let t of e.querySelectorAll(`wui-date-range`)){let e=t.getAttribute(`start-name`)||t.getAttribute(`name`),r=t.getAttribute(`end-name`);t.value={start:e?n(e):``,end:r?n(r):``}}};document.addEventListener(`click`,e=>{if(!W())return;let t=e.target instanceof Element?T(e.target,`a[href]`,HTMLAnchorElement):null;if(!t||!qe(t)||e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return;let n=new URL(t.getAttribute(`href`)??``,window.location.href);if(n.origin!==window.location.origin||n.pathname!==window.location.pathname)return;e.preventDefault();let r=V(De(n.href));Je(t.closest(`form`),r),be(t.closest(`form`),r),B(r,`push`)},E),document.addEventListener(`input`,e=>{if(!W())return;let t=U();t&&e.target===t&&(clearTimeout(Te??void 0),Te=setTimeout(()=>{if(!W())return;let e=V(new URLSearchParams(A)),n=t.value.trim();n?e.set(p,n):e.delete(p),e.toString()!==A.toString()&&B(e,`replace`)},300))},E),v.urlState&&window.addEventListener(`popstate`,()=>{if(!W())return;let e=Ee(window.location.search),t=U();t&&(t.value=e.get(`search`)??``),be(z(),e),B(e,`none`)},E),document.addEventListener(`wui:modal:success`,()=>{W()&&v.refreshOnSuccess&&B(A,`none`)},E),h?.addEventListener(`click`,e=>{e.target instanceof Element&&e.target.closest(`[data-wui-table-retry]`)&&we&&B(we.query,we.mode)});let G=e=>[...D.rows].find(t=>t.dataset.rowKey===e)??null,Ye=e=>{if(!e?.trim())return null;let t=document.createElement(`template`);if(t.innerHTML=`<table><tbody>${e}</tbody></table>`,t.content.querySelector(`tbody[data-wui-rows]`))return null;let n=C(t.content,`table > tbody > tr[data-row-key]`,HTMLTableRowElement);return n.length?n.map(e=>document.importNode(e,!0)):null},Xe=(e,t,n)=>{let r=n?e[0]:e.find(e=>e.dataset.rowKey===t.dataset.rowKey);if(!r)return null;let a=[];for(let n of e){let e=n===r?t:G(n.dataset.rowKey);e&&(I(e),e.replaceWith(n),a.push(n))}return Ne(a),k().refresh(i),r},Ze=e=>e.message||(e.kind===`forbidden`?S.actionForbidden:S.actionFailed),Qe=e=>{e?.isConnected&&e.getAttribute(`data-wui-save-state`)===`saving`&&l(e,null)},$e=e=>{if(e instanceof HTMLTableRowElement)return e;let t=document.createElement(`template`);t.innerHTML=`<table><tbody>${String(e)}</tbody></table>`;let n=w(t.content,`table > tbody > tr`,HTMLTableRowElement);return document.importNode(r(n,"saveRow's `row` is the row as it will read: a <tr> element or its HTML."),!0)},et=async({url:e,method:t=`POST`,body:n,key:r,row:a}={})=>{if(!e)throw Error("saveRow needs `url`: the handler that saves the row.");let o=r==null,s=o?null:G(String(r));if(!o&&!s)throw Error(`saveRow found no row with data-row-key="${r}" on this page.`);let ee=N().filter(e=>!e.classList.contains(_)),d=a?$e(a):s??ze(Math.max(1,ee.length),ee);s&&d!==s?s.replaceWith(d):s||D.insertBefore(d,D.firstChild),d!==s&&Ne([d]),h&&!i.hasAttribute(`data-wui-table-error`)&&(h.hidden=!0),l(d,`saving`);let te=c(d),f=await ne(e,{method:t.toUpperCase(),body:n});if(f.kind===`session`)return!1;if(f.ok){let e=Ye(f.html),t=e&&d.isConnected?Xe(e,d,o):null;return t?M(u.saved(c(t)||te)):(await B(A,`none`),Qe(d)),Ae(f,f.toastVariant||`success`),j(`wui:table:saved`,{key:t?.dataset.rowKey??(o?null:String(r)),added:o,status:f.status}),!0}let p=Ze(f),m=d;return s&&d!==s&&d.isConnected?(d.replaceWith(s),m=s):o&&!a&&(d.remove(),m=null,h?.childElementCount&&!D.querySelector(`:scope > tr`)&&(h.hidden=!1)),m?.isConnected&&l(m,`error`,p),f.kind!==`aborted`&&ye(p,`danger`),M(u.notSaved(te,p)),j(`wui:table:failed`,{key:o?null:String(r),added:o,status:f.status,kind:f.kind,message:p}),!1},tt=async e=>{let t=e.dataset.url;if(!t)throw Error(`A data-wui-row-action button needs data-url: the handler the action posts to.`);let n=T(e,`tr`,HTMLTableRowElement),r=n?.dataset.rowKey??null,i=e.dataset.wuiRowAction||``,a=n?c(n):``;e.disabled=!0,e.setAttribute(`aria-busy`,`true`),n&&l(n,`saving`);let o=await ne(t,{method:(e.dataset.method||`post`).toUpperCase()});if(e.disabled=!1,e.removeAttribute(`aria-busy`),o.kind===`session`||o.kind===`aborted`)Qe(n);else{if(o.ok){Ae(o,o.toastVariant||`success`);let e=n?.isConnected?Ye(o.html):null,t=e&&n?Xe(e,n,!1):null;t?M(u.saved(c(t)||a)):(await B(A,`none`),Qe(n))}else{let e=Ze(o);ye(e,`danger`),n?.isConnected&&l(n,`error`,e),M(u.notSaved(a,e))}j(`wui:table:action`,{action:i,key:r,ok:o.ok,status:o.status})}};return a.addEventListener(`click`,e=>{let t=e.target instanceof Element?T(e.target,`[data-wui-row-action]`,HTMLButtonElement):null;t&&D.contains(t)&&!t.disabled&&(e.preventDefault(),tt(t))}),P(D),Fe(D),y&&ce(a),Pe(D),H(),{el:n,reload:async e=>{let t=e?.quiet===!0;return t&&i.getAttribute(`aria-busy`)===`true`?null:B(A,`none`,{quiet:t})},query:()=>new URLSearchParams(A),setQuery:e=>{let t=new URLSearchParams(A);for(let[n,r]of Object.entries(e??{})){t.delete(n);for(let e of Array.isArray(r)?r:[r])e!=null&&e!==``&&t.append(n,String(e))}return e&&`page`in e||t.delete(`page`),B(t,`push`)},saveRow:et,setActiveRow:e=>{n.dataset.activeRowKey=e==null?``:String(e),F(C(D,`:scope > tr`,HTMLTableRowElement))},selection:{keys:()=>[...b],count:()=>x?O.total:b.size,allMatching:()=>x,selectAllMatching:()=>{x=!0;for(let e of C(D,`:scope > tr`,HTMLTableRowElement)){let t=w(e,`.${_} .wui-check`,HTMLInputElement);t?.disabled||(t&&(t.checked=!0),e.dataset.rowKey&&b.add(e.dataset.rowKey))}We()},clear:()=>{x=!1,b.clear();for(let e of C(D,`:scope > tr > .${_} .wui-check:not(:disabled)`,HTMLInputElement))e.checked=!1;We()}}}}var Te=8e3,Ee=`That did not work. Try again.`,De=[`success`,`info`,`warning`,`danger`],Oe=e=>De.some(t=>t===e);function ke(e){if(!Oe(e))throw RangeError(`Unknown toast variant "${e}".`);return e}function k(){return r(window.WUI,`window.WUI is not defined: the Razor behaviour script did not load on this page.`)}function Ae(e,t=`success`){if(!e?.message)return;let n=e.toastAction;n?k().toast(e.message,{variant:ke(t),duration:Te,action:{label:n.label,onClick:()=>je(n)}}):k().toast(e.message,{variant:ke(t)})}async function je(e){let t=await ne(e.url,{method:e.method});if(t.kind!==`session`&&t.kind!==`aborted`){if(t.ok){Ae(t,t.toastVariant||`success`);for(let e of document.querySelectorAll(`[data-wui-server]`))e instanceof HTMLElement&&e.dataset.refreshOnSuccess!==`false`&&O(e)?.reload()}else k().toast(t.message||Ee,{variant:`danger`})}}var A=`wui-remote-modal`,j=`wui-remote-drawer`,M=Object.freeze({sm:360,md:480,lg:640,xl:720}),Me=`wui-modal-fullscreen`,N=Object.freeze({sm:380,md:440,lg:640,xl:880}),P=Object.freeze({loading:`Loading`,close:`Close`,retry:`Try again`,errorTitle:`This could not be loaded`,forbidden:`You do not have access to this.`,client:`It may have been moved or deleted.`,server:`Something went wrong on our side. Try again in a moment.`,network:`Could not reach the server. Check your connection and try again.`,submitFailed:`Your changes were not saved.`,invalid:`Some fields need attention.`}),F=`a[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,Ne=`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled]),[contenteditable="true"]`,Pe=`[aria-invalid="true"], .is-invalid, .input-validation-error`,Fe=`.wui-error-summary, [data-wui-form-errors], .validation-summary-errors, [data-valmsg-summary]`,I=`[data-wui-modal-content]`,Ie=`[data-wui-pane-close], [data-bs-dismiss="modal"]`,Le=`<button type="button" class="wui-modal-close" data-bs-dismiss="modal" aria-label="Close"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18M6 6l12 12"></path></svg></button>`,Re=/* @__PURE__ */ new WeakMap,ze=/* @__PURE__ */ new WeakSet;function L(e,t){if(e==null)throw TypeError(`The remote modal needs ${t}, and the page does not have it.`);return e}var R=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Be=(e,t,n)=>L(R(e,t),n),Ve=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),z=()=>Object.assign(/* @__PURE__ */ Error(`The remote modal load was aborted.`),{name:`AbortError`}),B=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,V=(e,t)=>{let n=e instanceof Element?e.closest(t):null;return n instanceof HTMLElement?n:null},He=e=>{let t=window.bootstrap?.Modal;if(!t)throw Error(`WUI.modal.load(${String(e)}): Bootstrap's bundle (window.bootstrap) is not loaded on this page.`);return t},H=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},Ue=e=>Object.hasOwn(N,e),We=e=>Object.hasOwn(M,e);function U(e){if(e==null||e===``)return null;if(e===`fullscreen`)return{fullscreen:!0};if(Ue(e))return{px:N[e]};let t=typeof e==`number`?e:/^\d+$/.test(String(e))?Number(e):NaN;if(Number.isInteger(t)&&t>0)return{px:t};throw TypeError(`Unsupported modal size "${String(e)}". Use sm, md, lg, xl, fullscreen or a px number.`)}var W=e=>{if(e.classList.contains(`wui-modal-fullscreen`))return{fullscreen:!0};let t=Number.parseInt(e.style.getPropertyValue(`--wui-modal-max-width`),10);return{px:t>0?t:N.md}},Ge=(e,t)=>{e.classList.toggle(Me,!!t.fullscreen),t.fullscreen?e.style.removeProperty(`--wui-modal-max-width`):e.style.setProperty(`--wui-modal-max-width`,`${t.px}px`)},Ke=[`center`,`top`];function qe(e){if(e==null||e===``)return null;if(We(e))return{px:M[e]};let t=typeof e==`number`?e:/^\d+$/.test(String(e))?Number(e):NaN;if(Number.isInteger(t)&&t>0)return{px:t};throw TypeError(`Unsupported drawer size "${String(e)}". Use sm, md, lg, xl or a px number.`)}var Je=e=>e.container===`drawer`,G=e=>e.container===`pane`,Ye=e=>e.container!==`modal`,Xe=(e,t)=>Je(e)?qe(t):U(t),Ze=()=>document.getElementById(`wui-remote-drawer`)?.classList.contains(`show`)??!1,Qe=e=>{let t=typeof e==`string`?document.querySelector(e):e,n=t instanceof HTMLElement?t:null;return n?.matches(`[data-wui-pane-host]`)?n:null},$e=e=>G(e)?e.shell:Be(e.shell,`.modal-dialog`,`a dialog frame`);function et(e=`modal`){let t=e===`drawer`,n=t?j:A,r=document.getElementById(n);return r||(r=document.createElement(`div`),r.id=n,r.className=t?`modal fade wui-modal-shell wui-remote-drawer`:`modal fade wui-modal-shell`,r.tabIndex=-1,r.setAttribute(`aria-hidden`,`true`),r.setAttribute(`role`,`dialog`),r.setAttribute(`aria-modal`,`true`),r.style.setProperty(`--wui-modal-max-width`,`${t?M.md:N.md}px`),r.innerHTML=t?`<div class="modal-dialog wui-remote-drawer-dialog"><div class="modal-content wui-modal"></div></div>`:`<div class="modal-dialog modal-dialog-centered wui-rb-dialog"><div class="modal-content wui-modal"></div></div>`,document.body.appendChild(r),r)}var tt=e=>`<div class="wui-modal-header"><div class="wui-modal-heading"><div class="wui-modal-headtext"><div class="wui-modal-title">${H(e)}</div></div></div>${Le}</div>`,nt=e=>`<div class="modal-content wui-modal" aria-busy="true">${tt(e)}<div class="wui-modal-body"><div class="wui-modal-loading" role="status"><span class="visually-hidden">${H(P.loading)}</span><div class="skeleton wui-modal-skeleton"></div><div class="skeleton wui-modal-skeleton"></div><div class="skeleton wui-modal-skeleton wui-modal-skeleton--short"></div></div></div></div>`,rt=(n,r)=>`<div class="modal-content wui-modal" data-wui-modal-error="${H(r)}">${tt(n)}<div class="wui-modal-body"><div class="wui-modal-state" role="alert"><p class="wui-modal-state-title">${H(P.errorTitle)}</p><p class="wui-modal-state-text">${H(P[r]||P.server)}</p><div class="wui-modal-state-actions"><button type="button" class="${e(`primary`,`soft`,`md`)}" data-bs-dismiss="modal" data-wui="${t}">${H(P.close)}</button><button type="button" class="${e(`primary`,`solid`,`md`)}" data-wui-modal-retry data-wui="${t}">${H(P.retry)}</button></div></div></div></div>`,it=e=>{let t=document.createElement(`template`);return t.innerHTML=e,Be(t.content,`.modal-content`,`a card`)},K=e=>R(e.shell,`.modal-content`);function at(e){if(!e)return;e.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0}));let t=window.bootstrap,n=t?[t.Tooltip,t.Popover]:[];for(let r of[e,...e.querySelectorAll(`*`)]){for(let e of n)re(e,r);t?.Dropdown.getInstance(r)?.dispose()}}function ot(e,t){let n=K(e),r=n?ct(n):/* @__PURE__ */ new Map;at(n),n?n.replaceWith(t):$e(e).appendChild(t),lt(t,r),k().refresh()}var st=`input[type="file"][name]`;function ct(e){let t=/* @__PURE__ */ new Map;for(let n of e.querySelectorAll(st)){if(!(n instanceof HTMLInputElement))continue;let e=n.files;e&&e.length>0&&t.set(n.name,[...e])}return t}function lt(e,t){if(t.size!==0&&typeof DataTransfer<`u`)for(let n of e.querySelectorAll(st)){if(!(n instanceof HTMLInputElement))continue;let e=t.get(n.name);if(!e)continue;let r=new DataTransfer;for(let t of e)r.items.add(t);n.files=r.files,n.dispatchEvent(new Event(`change`,{bubbles:!0}))}}var ut=e=>G(e)?!e.shell.hidden:e.shell.classList.contains(`show`);function dt(e,t,n=!1){let r=t?R(e,Pe):null,i=r?r.matches(F)?r:R(r,F)||r:null;if(!i&&n)i=R(e,`[data-autofocus]`)||R(e,Ne)||R(e,`.wui-modal-close`);else if(!i){let t=Ve(e,F);i=R(e,`[data-autofocus]`)||t.find(e=>!e.classList.contains(`wui-modal-close`))||t[0]||e}r?i?.focus?.():i?.focus?.({preventScroll:!0})}function ft(e,t){let n=Ve(e,F).filter(e=>e.getClientRects().length>0&&getComputedStyle(e).visibility!==`hidden`);if(!n.length){t.preventDefault(),e.focus();return}let r=L(n[0],`a focusable control`),i=L(n[n.length-1],`a focusable control`),a=document.activeElement;!e.contains(a)||a===e?(t.preventDefault(),(t.shiftKey?i:r).focus()):t.shiftKey&&a===r?(t.preventDefault(),i.focus()):!t.shiftKey&&a===i&&(t.preventDefault(),r.focus())}function pt(e,t){let n=R(e.shell,`[data-wui-modal-live]`);n||(n=document.createElement(`div`),n.className=`visually-hidden`,n.setAttribute(`aria-live`,`assertive`),n.setAttribute(`data-wui-modal-live`,``),$e(e).appendChild(n)),n.textContent=``,n.textContent=t}var mt=e=>{let t=R(e.shell,`[data-wui-modal-live]`);t&&(t.textContent=``)},ht=(e,t,n)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))};function gt(e,t,n,r){let i={...r,container:e.container};ht(t,`wui:modal:${n}`,i),Je(e)&&ht(t,`wui:drawer:${n}`,i),G(e)&&ht(t,`wui:pane:${n}`,i)}var _t=e=>e.matches(`[data-wui-pane-host]`)?`pane`:e.classList.contains(`wui-remote-drawer`)?`drawer`:`modal`;function vt(e){let t=Re.get(e);if(t)return t;let n={shell:e,container:_t(e),queue:m(),defaultSize:W(e),defaultLabel:e.getAttribute(`aria-label`),placeholder:K({shell:e})?.outerHTML||`<div class="modal-content wui-modal"></div>`,remoteUrl:e.getAttribute(`data-wui-remote-url`),cache:e.getAttribute(`data-wui-remote-cache`)===`true`,loadedUrl:null,session:null};return Re.set(e,n),e.addEventListener(`submit`,e=>Rt(n,e)),e.addEventListener(`click`,e=>{V(e.target,`[data-wui-modal-retry]`)&&n.session&&(e.preventDefault(),J(n,n.session))}),G(n)&&e.addEventListener(`click`,t=>{let r=V(t.target,Ie);r&&e.contains(r)&&n.session&&q(n,n.session,`dismissed`,null)}),e.addEventListener(`hidden.bs.modal`,t=>{t.target===e&&(e.classList.contains(`wui-modal-stacked`)&&xt(n),St(n))}),e.addEventListener(`shown.bs.modal`,t=>{if(t.target!==e)return;e.classList.contains(`wui-modal-stacked`)&&[...document.querySelectorAll(`.modal-backdrop`)].at(-1)?.classList.add(`wui-modal-backdrop-stacked`);let r=K(n);n.session&&r?.matches(I)&&!r.contains(document.activeElement)&&dt(r,!1,Ye(n))}),n.remoteUrl&&e.addEventListener(`show.bs.modal`,t=>{t.target===e&&Ct(n,t)}),n}function yt(e,t,n){e.session&&(e.queue.abort(),e.session.resolveClosed({status:`dismissed`,detail:{replaced:!0}}));let r=()=>void 0,i=new Promise(e=>{r=e}),a={url:t,method:(n.method||`GET`).toUpperCase(),body:n.body,options:n,trigger:n.trigger||null,explicitSize:null,closing:null,resolveClosed:r,handle:{el:e.shell,closed:i,close:()=>q(e,a,`dismissed`,null),reload:()=>J(e,a)}};return e.session=a,a}function q(e,t,n,r){e.session===t&&(t.closing={status:n,detail:r},G(e)?bt(e,t):window.bootstrap?.Modal.getOrCreateInstance(e.shell).hide())}function bt(e,t){let n=e.shell,{status:r,detail:i}=L(t.closing,`the closing state`),a=n.contains(document.activeElement);e.queue.abort(),e.session=null,at(K(e)),n.replaceChildren(),n.hidden=!0,n.removeAttribute(`data-open`),t.resolveClosed({status:r,detail:i}),gt(e,n,`closed`,{status:r,url:t.url}),a&&t.trigger?.isConnected&&t.trigger.focus?.()}function xt(e){e.shell.classList.remove(`wui-modal-stacked`),Ze()&&(document.body.classList.add(`modal-open`),document.body.style.overflow=`hidden`)}function St(e){let t=e.session;if(e.queue.abort(),e.session=null,mt(e),t){let n=t.closing||{status:`dismissed`,detail:null};t.resolveClosed({status:n.status,detail:n.detail}),gt(e,e.shell,`closed`,{status:n.status,url:t.url});let r=document.activeElement;t.trigger?.isConnected&&(!r||r===document.body||e.shell.contains(r))&&t.trigger.focus?.()}e.cache||(ot(e,it(e.placeholder)),e.loadedUrl=null,Ge(e.shell,e.defaultSize),e.defaultLabel?e.shell.setAttribute(`aria-label`,e.defaultLabel):e.shell.removeAttribute(`aria-label`))}function Ct(e,t){let n=`relatedTarget`in t?t.relatedTarget:null,r=n instanceof HTMLElement?n:null,i=r?.getAttribute(`data-wui-url`)||e.remoteUrl||``,a=yt(e,i,{trigger:r});a.explicitSize=wt(e,r?.getAttribute(`data-wui-size`)),a.explicitSize&&Ge(e.shell,a.explicitSize),e.cache&&e.loadedUrl===i||(e.loadedUrl&&ot(e,it(e.placeholder)),J(e,a,{keepPlaceholder:!0}))}function wt(e,t){try{return Xe(e,t)}catch(e){return s(e),null}}async function J(e,t,{keepPlaceholder:n=!1}={}){n||ot(e,it(nt(t.options.title||Tt(e))));let r=await e.queue.run(t.url,{method:t.method,body:t.body,navigate:t.options.navigate});if(e.session!==t||r.kind===`aborted`||r.kind===`stale`)return`aborted`;if(r.kind===`session`)return`session`;if((r.kind===`ok`||r.kind===`validation`)&&kt(e,t,r.html,!1))return e.loadedUrl=t.url,gt(e,e.shell,`loaded`,{url:t.url,handle:t.handle}),`loaded`;let i=r.kind===`ok`||r.kind===`validation`?`server`:r.kind;return ot(e,it(rt(t.options.title||Tt(e),i))),ut(e)&&dt(L(K(e),`a card`),!1,Ye(e)),gt(e,e.shell,`error`,{url:t.url,kind:i,status:r.status}),`error`}var Tt=e=>K(e)?.querySelector(`.wui-modal-title`)?.textContent||e.shell.getAttribute(`aria-label`)||``,Et=`/_content/Webority.Ui.Razor/js/`,Dt=e=>new URL(e,window.location.href).pathname.includes(Et);function Ot(e){if([...document.scripts].some(t=>t.getAttribute(`src`)===e))return;let t=document.createElement(`script`);t.src=e,document.head.appendChild(t)}function kt(e,t,n,r){let i=document.createElement(`template`);i.innerHTML=n;let a=!1;for(let e of i.content.querySelectorAll(`script`)){if(e.getAttribute(`type`)===`application/json`)continue;let t=e.getAttribute(`src`);e.remove(),t&&Dt(t)?Ot(t):a=!0}a&&o(`WUI.modal: ${t.url} returned a fragment with script; it was removed. Keep page behaviour in the page.`);let c=R(i.content,I);if(!c)return s(`WUI.modal: ${t.url} did not answer with an <app-modal-content> fragment.`),!1;if(ot(e,c),r||mt(e),!G(e)){Ge(e.shell,t.explicitSize||wt(e,c.getAttribute(`data-wui-size`))||e.defaultSize);let n=c.getAttribute(`data-wui-title`);n&&e.shell.setAttribute(`aria-label`,n)}return ut(e)&&dt(c,r,Ye(e)),!0}var At=`button[type="submit"], button:not([type]), input[type="submit"], input[type="image"]`;function jt(e,t,n){let r=[...e.elements].filter(e=>e.matches(At));if(n){e.setAttribute(`data-wui-submitting`,``);let n=t&&r.includes(t)?t:r[0];for(let e of r)e.toggleAttribute(`data-wui-was-disabled`,e.disabled),e.disabled=!0;n&&(n.classList.add(`is-loading`),n.setAttribute(`aria-busy`,`true`),n.tagName===`BUTTON`&&n.insertAdjacentHTML(`afterbegin`,`<span class="spinner-border spinner-border-sm me-2" aria-hidden="true" data-wui-submit-spinner></span>`))}else{e.removeAttribute(`data-wui-submitting`);for(let e of r)e.disabled=e.hasAttribute(`data-wui-was-disabled`),e.removeAttribute(`data-wui-was-disabled`),e.classList.remove(`is-loading`),e.removeAttribute(`aria-busy`),e.querySelector(`[data-wui-submit-spinner]`)?.remove()}}function Mt(e){for(let t of e.querySelectorAll(Fe))t.remove();for(let t of e.querySelectorAll(Pe))t.removeAttribute(`aria-invalid`),t.classList.remove(`is-invalid`,`input-validation-error`);for(let t of e.querySelectorAll(`.field-error`))t.textContent=``}var Nt=/* @__PURE__ */ new Set(/* @__PURE__ */ `bad request.unauthorized.payment required.forbidden.not found.method not allowed.not acceptable.proxy authentication required.request timeout.conflict.gone.length required.precondition failed.payload too large.uri too long.unsupported media type.range not satisfiable.expectation failed.misdirected request.unprocessable content.unprocessable entity.locked.failed dependency.too early.upgrade required.precondition required.too many requests.request header fields too large.unavailable for legal reasons`.split(`.`)),Pt=(e,t)=>{if(typeof e==`object`&&e&&t in e)return Reflect.get(e,t)};async function Ft(e){if(!e||e.status<400||e.status>499||e.status===422||!e.headers.get(`content-type`)?.toLowerCase().includes(`json`))return null;let t;try{t=JSON.parse(await e.text())}catch{return null}let n=e=>typeof e==`string`?e.trim():``,r=n(Pt(t,`title`)),i=(e.statusText||``).trim().toLowerCase(),a=Nt.has(r.toLowerCase())||r.toLowerCase()===i;return n(Pt(t,`message`))||n(Pt(t,`detail`))||(r&&!a?r:null)}function It(e,t,n,r){let i=t.closest(`.wui-modal-body`)||t;i.querySelector(`[data-wui-modal-submit-error]`)?.remove(),Mt(i);let a=document.createElement(`div`);a.className=`alert alert-danger wui-modal-submit-error`,a.setAttribute(`role`,`alert`),a.setAttribute(`data-wui-modal-submit-error`,``),a.innerHTML=H(`${P.submitFailed} ${r||P[n]||P.server}`),i.prepend(a),pt(e,a.textContent)}var Lt=(e,t)=>{let n=new URL(e,window.location.href);for(let[e,r]of t)typeof r==`string`&&n.searchParams.append(e,r);return n.origin===window.location.origin?n.pathname+n.search:n.href};async function Rt(e,t){let n=t.target,r=e.session;if(!(n instanceof HTMLFormElement)||!r||n.hasAttribute(`data-wui-native`)||!n.closest(I)||(t.preventDefault(),n.hasAttribute(`data-wui-submitting`)))return;let i=`submitter`in t&&(t.submitter instanceof HTMLButtonElement||t.submitter instanceof HTMLInputElement)?t.submitter:null,a=i?.getAttribute(`formaction`)||n.getAttribute(`action`)||r.url,o=(i?.getAttribute(`formmethod`)||n.getAttribute(`method`)||`GET`).toUpperCase(),c=new FormData(n);i?.name&&!c.has(i.name)&&c.append(i.name,i.value);let l=o===`GET`;jt(n,i,!0);let u;try{u=await e.queue.run(l?Lt(a,c):a,{method:o,body:l?void 0:c,navigate:r.options.navigate})}catch(t){s(t),e.session===r&&n.isConnected&&(jt(n,i,!1),It(e,n,`server`,null));return}if(e.session!==r)return;if(n.isConnected&&jt(n,i,!1),u.kind===`ok`&&u.result===`success`){zt(e,r,u);return}if(u.kind===`aborted`||u.kind===`stale`||u.kind===`session`)return;if(u.kind===`validation`&&kt(e,r,u.html,!0)){let t=L(K(e),`a card`).querySelector(Fe)?.textContent?.replace(/\s+/g,` `).trim();pt(e,t||P.invalid);return}if(u.kind===`ok`&&u.html&&kt(e,r,u.html,!1))return;let ee=u.kind===`ok`||u.kind===`validation`?`server`:u.kind,d=await Ft(u.response);e.session===r&&It(e,n,ee,d)}function zt(e,t,n){let r=n.message,i=n.redirect||null,a=n.toastVariant||`success`;if(!Qt(a))throw TypeError(`Unknown toast variant "${a}". Use ${Zt.join(`, `)}.`);let o={url:t.url,trigger:t.trigger,handle:t.handle,message:r,redirect:i,data:n.data??null,container:e.container};i&&!t.options.navigate?Sn(r,a):r&&k().toast(r,{variant:a}),gt(e,t.trigger?.isConnected?t.trigger:document,`success`,o),t.options.onSuccess?.(o,t.handle),i&&(t.options.navigate||(e=>window.location.assign(e)))(i);let s=n.next;s&&!i?(t.url=s,t.method=`GET`,t.body=void 0,J(e,t)):n.keepOpen?n.html&&kt(e,t,n.html,!1):q(e,t,`success`,o)}function Bt(e){let t=V(e.target,`[data-wui-modal], [data-wui-drawer], [data-wui-pane]`);t&&(t.matches(`a[href]`)&&(e.ctrlKey||e.metaKey||e.shiftKey||e.button!==0)||(e.preventDefault(),t.hasAttribute(`data-wui-pane`)?Jt(t.getAttribute(`data-wui-pane`)??``,{target:t.getAttribute(`data-wui-pane-target`),trigger:t}).catch(e=>{B(e)||s(e)}):t.hasAttribute(`data-wui-modal`)?Wt(t.getAttribute(`data-wui-modal`)??``,{size:t.getAttribute(`data-wui-size`)||void 0,title:t.getAttribute(`data-wui-title`)||void 0,trigger:t}).catch(e=>{B(e)||s(e)}):Kt(t.getAttribute(`data-wui-drawer`)??``,{size:t.getAttribute(`data-wui-drawer-size`)||void 0,title:t.getAttribute(`data-wui-title`)||void 0,trigger:t}).catch(e=>{B(e)||s(e)})))}function Vt(e){if(e.key!==`Tab`||e.defaultPrevented)return;let t=e.currentTarget;if(!(t instanceof Document))return;let n=Ve(t,`.modal.show`),r=R(t,`.modal.show.wui-modal-stacked`)??n[n.length-1];r&&ft(r,e)}function Ht(e){if(e.key!==`Escape`||e.defaultPrevented)return;let t=V(e.target,qt),n=t&&Re.get(t),r=e.currentTarget;n?.session&&r instanceof Document&&!r.querySelector(`.modal.show`)&&q(n,n.session,`dismissed`,null)}function Ut(e=document){let t=e instanceof Document?e:L(e.ownerDocument,`an owner document`);ze.has(t)||(ze.add(t),t.addEventListener(`click`,Bt),t.addEventListener(`keydown`,Vt),t.addEventListener(`keydown`,Ht));let n=Ve(e,`.modal[data-wui-remote-url]`);e instanceof HTMLElement&&e.matches(`.modal[data-wui-remote-url]`)&&n.unshift(e);for(let e of n)vt(e)}function Wt(e,t={}){try{if(!e)throw TypeError(`WUI.modal.load: a fragment url is required.`);let n=He(e),r=t.container===`drawer`,i=r?qe(t.size):U(t.size),a=t.placement||`center`;if(!Ke.includes(a))throw TypeError(`WUI.modal.load: unsupported placement "${a}". Use center or top.`);if(t.signal?.aborted)return Promise.reject(z());let o=et(r?`drawer`:`modal`);Ut(document);let s=vt(o),c=ut(s),l=yt(s,e,t);l.explicitSize=i,Ge(o,i||s.defaultSize),r||Be(o,`.modal-dialog`,`a dialog frame`).classList.toggle(`modal-dialog-centered`,a===`center`),t.title&&o.setAttribute(`aria-label`,t.title),c||(!r&&Ze()&&(document.body.appendChild(o),o.classList.add(`wui-modal-stacked`)),n.getInstance(o)?.dispose(),n.getOrCreateInstance(o,{backdrop:t.staticBackdrop===!1||`static`,keyboard:t.staticBackdrop===!1}));let u=c?Promise.resolve():new Promise(e=>o.addEventListener(`shown.bs.modal`,()=>e(),{once:!0})),ee=J(s,l);return c||n.getOrCreateInstance(o).show(),Gt(s,l,t,u,ee,`WUI.modal.load`)}catch(e){return Promise.reject(e)}}function Gt(e,t,n,r,i,a){let o=new Promise((r,i)=>{n.signal?.addEventListener(`abort`,()=>{e.session===t&&(e.queue.abort(),q(e,t,`dismissed`,{aborted:!0})),i(z())},{once:!0})}),s=Promise.all([r,i]).then(([,e])=>{if(e===`aborted`)throw z();if(e===`session`)throw Error(`${a}(${t.url}): the session expired; the browser is signing in again.`);return t.handle});return Promise.race([s,o])}function Kt(e,t={}){return Wt(e,{...t,container:`drawer`,placement:void 0})}var qt=`[data-wui-pane-host]`;function Jt(e,t={}){try{if(!e)throw TypeError(`WUI.pane.load: a fragment url is required.`);let n=Qe(t.target);if(!n)throw TypeError(`WUI.pane.load: the target is not an <app-detail-pane>.`);if(t.signal?.aborted)return Promise.reject(z());Ut(document);let r=vt(n),i=yt(r,e,t);n.hidden=!1,n.setAttribute(`data-open`,``);let a=J(r,i);return Gt(r,i,t,Promise.resolve(),a,`WUI.pane.load`)}catch(e){return Promise.reject(e)}}function Yt(e){let t=Qe(e);if(!t)throw TypeError(`WUI.pane.close: the target is not an <app-detail-pane>.`);let n=Re.get(t);n?.session&&q(n,n.session,`dismissed`,null)}var Y=`wuiConfirm`,Xt=Object.freeze([`danger`]),Zt=Object.freeze([`success`,`info`,`warning`,`danger`]),Qt=e=>Zt.some(t=>t===e),$t=`wui.flash`,X=Object.freeze({confirmTitle:`Are you sure?`,confirmLabel:`Confirm`,cancelLabel:`Cancel`,failed:`That did not work. Try again.`,forbidden:`You do not have permission to do that.`,network:`Could not reach the server. Check your connection and try again.`}),en=/* @__PURE__ */ new WeakSet,tn=/* @__PURE__ */ new WeakSet,nn=null,rn=null,an=!1,on=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},sn=(e,t)=>{e&&k().toast(e,{variant:t})},cn=()=>r(window.bootstrap?.Modal,`data-wui-confirm: Bootstrap's bundle (window.bootstrap) is not loaded on this page.`);function ln(){let n=document.getElementById(Y);return n||(n=document.createElement(`div`),n.id=Y,n.className=`modal fade wui-modal-shell`,n.tabIndex=-1,n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`role`,`dialog`),n.setAttribute(`aria-modal`,`true`),n.style.setProperty(`--wui-modal-max-width`,`${N.md}px`),n.innerHTML=`<div class="modal-dialog modal-dialog-centered wui-rb-dialog"><div class="modal-content wui-modal wui-confirm"><div class="wui-modal-body"><div class="wui-confirm-content"><span class="wui-confirm-icon"><wui-status-icon tone="info" size="120"></wui-status-icon></span><h3 class="wui-confirm-title" tabindex="-1" data-autofocus></h3><p class="wui-confirm-msg"></p></div></div><div class="wui-modal-footer"><div class="wui-confirm-actions"><button type="button" class="${e(`primary`,`soft`,`md`)}" data-bs-dismiss="modal" data-wui="${t}">${on(X.cancelLabel)}</button><button type="button" class="${e(`primary`,`solid`,`md`)}" data-app-confirm data-wui="${t}"></button></div></div></div></div>`,document.body.appendChild(n),n)}function un(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!Xt.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);dn({title:e.getAttribute(`data-wui-confirm-title`),message:e.getAttribute(`data-wui-confirm`),label:e.getAttribute(`data-wui-confirm-label`),danger:n===`danger`},t)}function dn({title:e,message:t,label:n,danger:r},i){let a=cn(),o=ln(),s=o.querySelector(`.wui-confirm-title`),c=o.querySelector(`[data-app-confirm]`);if(!s||!c)throw Error(`#${Y} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${Y}"> without confirm-href, or leave the dialog to the library.`);let l=o.querySelector(`.wui-confirm-msg`);l||(l=document.createElement(`p`),l.className=`wui-confirm-msg`,s.after(l));let u=e||X.confirmTitle;s.textContent=u,l.textContent=t,c.textContent=n||X.confirmLabel,c.classList.toggle(`btn-danger`,r),c.classList.toggle(`btn-primary`,!r),o.querySelector(`wui-status-icon`)?.setAttribute(`tone`,r?`delete`:`info`),o.setAttribute(`aria-label`,u),rn=i,an=!1,a.getOrCreateInstance(o).show()}var fn=(e,t)=>{nn=e;try{t()}finally{nn=null}},pn=(e,t)=>{let n=Reflect.get(e,t);if(n===void 0||typeof n==`string`)return n;throw TypeError(`confirmAction: ${t} must be text.`)},mn=e=>{if(typeof e!=`object`||!e)throw TypeError(`confirmAction: options must be an object with a message.`);let t=`message`in e?e.message:void 0;if(typeof t!=`string`)throw TypeError(`confirmAction: message must be text.`);return{title:pn(e,`title`),message:t,label:pn(e,`label`),tone:pn(e,`tone`)}};function hn(e,t,n){let{title:r,message:i,label:a,tone:o}=mn(t);if(o!=null&&!Xt.includes(o))throw TypeError(`confirmAction: tone "${o}" is not supported. Use danger, or leave it off.`);Fn(e.ownerDocument),dn({title:r,message:i,label:a,danger:o===`danger`},()=>fn(e,n))}var gn=e=>`disabled`in e&&e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`,_n=e=>{n(e,HTMLElement,`data-wui-confirm needs an HTML element to click.`).click()};function vn(e){let t=i(e.target,`[data-wui-confirm]:not(form)`);t&&t!==nn&&!gn(t)&&(e.preventDefault(),e.stopImmediatePropagation(),un(t,()=>fn(t,()=>_n(t))))}function yn(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===nn||e.submitter&&e.submitter===nn||t.querySelector(`input[data-app-repeater-hidden]`))return;e.preventDefault(),e.stopImmediatePropagation();let n=e.submitter instanceof HTMLButtonElement||e.submitter instanceof HTMLInputElement?e.submitter:null,r=n?.form===t?n:void 0;un(t,()=>fn(t,()=>t.requestSubmit(r)))}function bn(e){let t=i(e.target,`#${Y} [data-app-confirm]`);if(!t||t.hasAttribute(`disabled`)||!rn)return;an=!0;let n=cn(),a=r(t.closest(`#${Y}`),`#${Y} is missing around its confirm button.`);n.getOrCreateInstance(a).hide()}function xn(e){if(!(e.target instanceof Element)||e.target.id!==`wuiConfirm`)return;let t=an?rn:null;rn=null,an=!1,t?.()}function Sn(e,t){e&&window.sessionStorage.setItem($t,JSON.stringify({message:e,variant:t}))}var Cn=e=>e===`forbidden`?X.forbidden:e===`network`?X.network:X.failed;function wn(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.getAttribute(`data-refresh-on-success`)!==`false`&&O(e)?.reload()}var Tn=(e,t)=>{`disabled`in e&&(e.disabled=t)};async function En(e){let t=e.getAttribute(`data-wui-post`);if(!t)throw Error(`A data-wui-post button needs the URL the action posts to.`);return Dn(t,e)}async function Dn(e,t,n){let r=t.getAttribute(`data-wui-post-reload`);if(r!==null&&r!==`page`)throw TypeError(`data-wui-post-reload="${r}" is not supported. Use page, or leave it off to reload the server tables.`);Tn(t,!0),t.setAttribute(`aria-busy`,`true`);let i=await ne(e,{method:`POST`,body:n});if(i.kind===`session`||i.kind===`aborted`)return;let a=i.toastVariant||`success`;i.ok&&(i.redirect||r===`page`)?(Sn(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload()):(Tn(t,!1),t.removeAttribute(`aria-busy`),i.ok?(Ae(i,a),wn()):sn(i.message||Cn(i.kind),`danger`))}function On(e,t){Tn(e,!1),e.removeAttribute(`aria-busy`),s(t),sn(X.failed,`danger`)}function kn(e){let t=i(e.target,`[data-wui-post]`);t&&(e.preventDefault(),gn(t)||t.getAttribute(`aria-busy`)===`true`||En(t).catch(e=>On(t,e)))}function An(e){let t=i(e.target,`form[data-wui-post-form]`);if(!(t instanceof HTMLFormElement)||e.defaultPrevented)return;e.preventDefault();let n=r(e.submitter||t.querySelector(`button:not(.repeater-add):not(.repeater-remove)`),`A data-wui-post-form needs a submit button to report its result on.`);if(n.getAttribute(`aria-busy`)===`true`)return;Dn(t.action,n,new FormData(t)).catch(e=>On(n,e));let a=t.closest(`.dropdown`)?.querySelector(`[data-bs-toggle='dropdown']`);a&&window.bootstrap?.Dropdown?.getInstance(a)?.hide()}function jn(){let e=window.sessionStorage.getItem($t);if(!e)return;window.sessionStorage.removeItem($t);let t=JSON.parse(e);if(typeof t!=`object`||!t)throw TypeError(`stored flash is not an object.`);let n=`message`in t?t.message:void 0,r=`variant`in t?t.variant:void 0;if(typeof r!=`string`||!Qt(r))throw TypeError(`stored flash variant "${String(r)}" is not supported.`);if(typeof n!=`string`)throw TypeError(`stored flash message is not text.`);sn(n,r)}function Mn(e){let t=e.querySelectorAll?[...e.querySelectorAll(`[data-wui-flash]`)]:[];e instanceof Element&&e.matches(`[data-wui-flash]`)&&t.unshift(e);for(let e of t){let t=e.getAttribute(`data-wui-flash-variant`)||`success`;if(!Qt(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${Zt.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||(e.textContent??``).trim();e.remove(),sn(n,t)}}var Nn=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.form:null;function Pn(e){if(!(e.target instanceof Element))return;let t=e.target.closest(`[data-wui-auto-submit]`);if(!t)return;let n=Nn(e.target)||t.closest(`form`);n instanceof HTMLFormElement&&n.requestSubmit()}function Fn(e){tn.has(e)||(tn.add(e),e.addEventListener(`click`,bn),e.addEventListener(`hidden.bs.modal`,xn))}function In(e=document){let t=e instanceof Element?e.ownerDocument:e;en.has(t)||(en.add(t),t.addEventListener(`click`,vn,!0),t.addEventListener(`submit`,yn,!0),Fn(t),t.addEventListener(`click`,kn),t.addEventListener(`submit`,An),t.addEventListener(`change`,Pn),jn()),Mn(e)}var Ln=Object.freeze({title:`Leave without saving?`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,leaveLabel:`Leave`}),Rn=`form[data-wui-unsaved]`,zn=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,Bn=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,Vn=/* @__PURE__ */ new Set([`submit`,`button`,`reset`,`image`]),Hn=/* @__PURE__ */ new Set([`hidden`,`checkbox`,`radio`,`file`,`submit`,`button`,`reset`,`image`,`range`,`color`]),Un=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,Wn=e=>Un(e)?e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled:`disabled`in e&&!!e.disabled,Gn=e=>`name`in e&&typeof e.name==`string`&&e.name!==``,Kn=e=>typeof e==`object`&&!!e,qn=e=>Array.isArray(e)&&e.every(e=>Array.isArray(e)&&typeof e[0]==`string`);function Jn(e){let t=JSON.parse(e);if(!qn(t))throw Error(`unsaved-changes snapshot is malformed`);return t}var Z=/* @__PURE__ */ new WeakMap,Yn=/* @__PURE__ */ new WeakSet,Xn=e=>`${e.name}:${e.size}:${e.lastModified}`,Zn=e=>[...e.querySelectorAll(Rn)].filter(e=>e instanceof HTMLFormElement);function Q(e){let t=[];for(let n of e.elements)Gn(n)&&!Wn(n)&&(Un(n)&&Vn.has(n.type)||(n instanceof HTMLInputElement&&(n.type===`checkbox`||n.type===`radio`)?t.push([n.name,n.value,n.checked]):n instanceof HTMLInputElement&&n.type===`file`?t.push([n.name,[...n.files||[]].map(Xn)]):n instanceof HTMLSelectElement&&n.type===`select-multiple`?t.push([n.name,[...n.selectedOptions].map(e=>e.value)]):n instanceof HTMLFieldSetElement||n instanceof HTMLObjectElement?t.push([n.name,null]):t.push([n.name,`value`in n?n.value:null])));return JSON.stringify(t)}function Qn(e){return Q(e)}function $n(e,t){let n=/* @__PURE__ */ new Map,r=Jn(t);for(let e of r){let t=n.get(e[0]);t?t.push(e):n.set(e[0],[e])}let i=Jn(Q(e)).map(e=>n.get(e[0])?.shift()??e);for(let e of n.values())i.push(...e);return JSON.stringify(i)}function er(e){for(let t of e.elements)if(Un(t)&&t.name&&!Wn(t)){if(t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!Hn.has(t.type)){if(t.value.trim()!==``)return!0}else if(t instanceof HTMLInputElement&&t.type===`file`&&(t.files?.length??0)>0)return!0}return!1}var tr=e=>({saved:e.querySelector(zn)&&er(e)?null:Q(e),engaged:!1,discarded:!1});function nr(e){let t=Z.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&Q(e)!==t.saved}var rr=(e,t)=>Zn(e).filter(e=>e!==t&&nr(e)),ir=()=>!!window.bootstrap?.Modal;function ar(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||Ln.message;hn(e,{title:Ln.title,message:r,label:Ln.leaveLabel,tone:`danger`},()=>{for(let e of t){let t=Z.get(e);t&&(t.discarded=!0)}n()})}function or(e){if(e.matches(Bn))return!1;let t=e.getAttribute(`target`);if(t&&t.toLowerCase()!==`_self`)return!1;let n=e.getAttribute(`href`);if(n===null)return!1;let r=new URL(n,window.location.href);if(r.protocol!==`http:`&&r.protocol!==`https:`)return!1;let i=window.location;return!(r.hash&&r.origin===i.origin&&r.pathname===i.pathname&&r.search===i.search)}function sr(e,t){if((t?.getAttribute(`formmethod`)||e.getAttribute(`method`)||`get`).toLowerCase()===`dialog`)return!1;let n=t?.getAttribute(`formtarget`)||e.getAttribute(`target`);return!n||n.toLowerCase()===`_self`}function cr(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target,n=i(t,`a[href]`);if(!(n instanceof HTMLAnchorElement)||!or(n))return;let r=rr(n.ownerDocument,null);r.length&&ir()&&(e.preventDefault(),ar(n,r,()=>n.click()))}function lr(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!sr(t,e.submitter))return;let n=rr(t.ownerDocument,t);if(n.length&&ir()){e.preventDefault();let r=e.submitter,i=(r instanceof HTMLButtonElement||r instanceof HTMLInputElement)&&r.form===t?r:void 0;ar(t,n,()=>t.requestSubmit(i));return}let r=Z.get(t);r&&(r.saved=Q(t),r.discarded=!1)}function ur(e){rr(document,null).length&&(e.preventDefault(),e.returnValue=``)}function dr(e){let t=e.target,n=i(t,Rn);return n instanceof HTMLFormElement?n:null}function fr(e){let t=dr(e);if(!t)return;let n=Z.get(t);n&&!n.engaged&&(n.saved!==null&&(n.saved=Q(t)),n.engaged=!0)}function pr(e){let t=dr(e),n=t&&Z.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function mr(e){for(let t of Zn(e)){let e=Z.get(t);e?.saved&&(e.saved=$n(t,e.saved))}}function hr(e){let t=Kn(e)?e.handle:void 0;return Kn(t)?t.el:void 0}function gr(e){if(!(e instanceof CustomEvent))return;let t=hr(e.detail);if(t instanceof Element)for(let e of Zn(t))vr(e)}function _r(e=document){let t=e instanceof Document?e:e.ownerDocument;if(!Yn.has(t)){Yn.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,fr,!0);for(let e of[`input`,`change`])t.addEventListener(e,pr,!0);t.addEventListener(`click`,cr),t.addEventListener(`submit`,lr),t.addEventListener(`wui:modal:success`,gr),t.addEventListener(a,()=>mr(t)),r(t.defaultView,`unsaved-changes guard needs a document with a window`).addEventListener(`beforeunload`,ur)}let n=Zn(e);e instanceof HTMLFormElement&&e.matches(Rn)&&n.unshift(e);for(let e of n)Z.has(e)||Z.set(e,tr(e))}function vr(e){if(!(e instanceof HTMLFormElement)||!e.matches(Rn))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);Z.set(e,{saved:Q(e),engaged:!1,discarded:!1})}var yr=Object.freeze({question:`Discard your changes?`,discard:`Discard`,keep:`Keep editing`}),br=`wui:drawer:discard`,xr=`wui-drawer[confirm-discard]`,Sr=`.wui-modal-shell`,Cr=`data-wui-no-discard`,wr=`.wui-drawer-discard`,Tr=`input, select, textarea`,Er=e=>typeof e==`object`&&!!e||typeof e==`function`;function Dr(e){let t=e.currentTarget;if(!(t instanceof Document))throw Error(`The discard guard is not wired on a document.`);return t}function Or(e,t){return i(e,t)}var kr=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement,$=/* @__PURE__ */ new WeakMap,Ar=/* @__PURE__ */ new WeakSet,jr=/* @__PURE__ */ new WeakSet;function Mr(n,r,i,a,o){let s=n.createElement(`button`);return s.type=`button`,s.className=e(r,i,`sm`),s.dataset.wui=t,s.setAttribute(a,``),s.textContent=o,s}function Nr(e,t){let n=e.createElement(`div`);n.className=`wui-drawer-discard`,n.setAttribute(`role`,`alert`);let r=e.createElement(`span`);return r.className=`wui-drawer-discard-text`,r.textContent=t,n.append(r,Mr(e,`danger`,`solid`,`data-wui-discard-confirm`,yr.discard),Mr(e,`primary`,`soft`,`data-wui-discard-keep`,yr.keep)),n}function Pr(e){if(!(e instanceof Element))return null;let t=e.closest(xr);if(t)return t;let n=e.closest(Sr);return n&&Lr(n).length?n:null}function Fr(e){return e.closest(xr)??e.closest(Sr)}function Ir(e,t){return t.hasAttribute(Cr)||e.hasAttribute(Cr)?!1:t.hasAttribute(`confirm-discard`)||e.hasAttribute(`data-wui-confirm-discard`)?!0:(e.getAttribute(`method`)||`get`).toLowerCase()!==`get`}function Lr(e){return e.matches(xr)?e.querySelectorAll(`form`):[...e.querySelectorAll(`form`)].filter(t=>Ir(t,e))}function Rr(e){let t=$.get(e);return t!=null&&Qn(e)!==t}function zr(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,r(e.querySelector(`.wui-drawer-panel`),`The drawer has no panel to hold its footer.`).append(t),jr.add(t),t}function Br(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-modal-footer`,(e.querySelector(`.wui-modal-body`)?.parentElement??e.querySelector(`.modal-content`)??e).append(t),jr.add(t),t}function Vr(e){let t=e.querySelector(`[data-wui-discard-confirm]`);if(!(t instanceof HTMLElement))throw Error(`The discard prompt has no confirm button.`);t.focus()}function Hr(e,t,n){let r=e.querySelector(wr);if(r){Vr(r);return}let i=Nr(e.ownerDocument,t),a;if(e.matches(xr))a=e.querySelector(`.wui-drawer-footer`)??zr(e),a.prepend(i);else if(e.hasAttribute(`confirm-discard`))a=e.querySelector(`.wui-modal-footer`)??Br(e),a.prepend(i);else{if(!n)throw Error(`A discard prompt needs the form that is dirty.`);a=n.querySelector(`.modal-footer`),a?a.prepend(i):(a=n,n.append(i))}a.classList.add(`wui-drawer-discarding`),Vr(i)}function Ur(e){let t=e.parentElement;if(e.remove(),!t)throw Error(`The discard prompt has no footer.`);t.classList.remove(`wui-drawer-discarding`),jr.has(t)&&t.remove()}function Wr(e){for(let t of Lr(e))for(let e of t.querySelectorAll(Tr))if(kr(e)&&e.type!==`hidden`&&!e.disabled){e.focus({preventScroll:!0});return}}function Gr(e){let t=Pr(e.target);if(t)for(let e of Lr(t))$.get(e)??$.set(e,Qn(e))}function Kr(e){for(let t of Dr(e).querySelectorAll(`form`)){let e=$.get(t);e!=null&&$.set(t,$n(t,e))}}function qr(e){let t=e.target;t instanceof HTMLFormElement&&Pr(t)&&$.set(t,Qn(t))}function Jr(e){if(!Er(e))return;let t=`handle`in e?e.handle:void 0;if(Er(t))return`el`in t?t.el:void 0}function Yr(e){if(!(e instanceof CustomEvent))return;let t=e.detail,n=Jr(t);if(n instanceof Element)for(let e of n.querySelectorAll(`form`))$.delete(e)}function Xr(e){let t=e.target;t instanceof Element&&t.matches(xr)&&[...Lr(t)].some(Rr)&&(e.preventDefault(),Hr(t,t.getAttribute(`confirm-discard`),null))}function Zr(e){let t=e.target;if(!(t instanceof Element)||!t.matches(Sr))return;let n=[...Lr(t)].find(Rr);n&&(e.preventDefault(),Hr(t,n.getAttribute(`data-wui-confirm-discard`)??t.getAttribute(`confirm-discard`)??yr.question,n))}function Qr(e){let t=e.closest(`wui-drawer`);if(t){t.dispatchEvent(new CustomEvent(`wui-drawer-close`,{bubbles:!0,cancelable:!0}))&&t.hide();return}let n=e.closest(Sr);n&&window.bootstrap?.Modal.getInstance(n)?.hide()}function $r(e){let t=r(e.closest(wr),`The discard button is outside its prompt.`),n=Fr(t);if(Ur(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);for(let e of Lr(n))$.set(e,Qn(e));n.dispatchEvent(new CustomEvent(br,{bubbles:!0})),n.matches(xr)?r(n.closest(`wui-drawer`),`The confirm-discard drawer is not a wui-drawer.`).hide():r(window.bootstrap?.Modal.getInstance(n),`Bootstrap's Modal has no instance for the discarded dialog.`).hide()}function ei(e){let t=r(e.closest(wr),`The keep button is outside its prompt.`),n=Fr(t);if(Ur(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);Wr(n)}function ti(e){let t=Or(e.target,`[data-wui-discard-confirm]`);if(t){$r(t);return}let n=Or(e.target,`[data-wui-discard-keep]`);if(n){ei(n);return}let r=Or(e.target,`[data-wui-dismiss]`);r&&Qr(r)}function ni(e){if(e.key!==`Escape`)return;let t=Dr(e).querySelector(wr);if(!t)return;e.preventDefault(),e.stopPropagation();let n=Fr(t);if(Ur(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);Wr(n)}function ri(e=document){let t=e instanceof Document?e:e.ownerDocument;Ar.has(t)||(Ar.add(t),t.addEventListener(`focusin`,Gr),t.addEventListener(`pointerdown`,Gr),t.addEventListener(`submit`,qr),t.addEventListener(a,Kr),t.addEventListener(`wui:modal:success`,Yr),t.addEventListener(`wui:modal:loaded`,Yr),t.addEventListener(`wui-drawer-close`,Xr,!0),t.addEventListener(`hide.bs.modal`,Zr),t.addEventListener(`click`,ti),t.addEventListener(`keydown`,ni,!0))}export{Ae as C,je as S,D as T,Ut as _,Ln as a,Jt as b,vr as c,$t as d,Zt as f,Yt as g,In as h,ri as i,Y as l,hn as m,yr as n,Qn as o,X as p,Nr as r,_r as s,br as t,Xt as u,Kt as v,O as w,Te as x,Wt as y};
@@ -0,0 +1 @@
1
+ function e(e,t){if(typeof customElements>`u`||customElements.get(e))return;let n=[];if(typeof document<`u`)for(let r of document.querySelectorAll(e))for(let i of Object.keys(r)){let a=Object.getOwnPropertyDescriptor(t.prototype,i);if(a&&(a.set||a.get)&&(n.push([r,i,Reflect.get(r,i)]),!Reflect.deleteProperty(r,i)))throw Error(`defineElement: could not clear the early "${i}" property on <${e}>.`)}customElements.define(e,t);for(let[t,r,i]of n)if(!Reflect.set(t,r,i))throw Error(`defineElement: could not restore the "${r}" property on <${e}>.`)}var t=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(t);var n=HTMLElement;export{e as n,n as t};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiCarousel-C2NWcFxr.js";e(`wui-carousel`,t);export{t as WuiCarousel};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiCarousel-DthhDxH-.js";e(`wui-carousel`,t);export{t as WuiCarousel};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiCodeBlock-CCCJwsk5.js";e(`wui-code-block`,t);export{t as WuiCodeBlock};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiCodeBlock-DHpmEskS.js";e(`wui-code-block`,t);export{t as WuiCodeBlock};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiCommandPalette-Bfrbocu6.js";e(`wui-command-palette`,t);export{t as WuiCommandPalette};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiCommandPalette-DqHh4lH6.js";e(`wui-command-palette`,t);export{t as WuiCommandPalette};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{i as t,n,r,t as i}from"../WuiCommentThread-Dx3vvBWp.js";import"./mention-input.js";e(`wui-comment-thread`,t);export{i as COMMENT_INTENTS,n as COMMENT_REACTIONS,r as COMMENT_TEXT,t as WuiCommentThread};
1
+ import{n as e,r as t,t as n}from"../commentText-BnX7rA2-.js";import{n as r}from"../elementBase-Cxeyx0tU.js";import{t as i}from"../WuiCommentThread-BmRsl0K1.js";import"./mention-input.js";r(`wui-comment-thread`,i);export{n as COMMENT_INTENTS,e as COMMENT_REACTIONS,t as COMMENT_TEXT,i as WuiCommentThread};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiConsentBanner-jkeRiC1_.js";e(`wui-consent-banner`,t);export{t as WuiConsentBanner};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiConsentBanner-Bm7tT3_5.js";e(`wui-consent-banner`,t);export{t as WuiConsentBanner};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiContextMenu-KXD8TFfy.js";e(`wui-context-menu`,t);export{t as WuiContextMenu};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiContextMenu-sPTmEEVn.js";e(`wui-context-menu`,t);export{t as WuiContextMenu};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiDataTable-DAxAegnG.js";import{A as n,C as r,D as i,E as a,M as o,O as s,S as c,T as l,_ as u,a as d,b as f,c as p,d as m,f as h,g,h as _,i as v,j as y,k as b,l as x,m as S,n as C,o as w,p as T,r as E,s as D,t as O,u as k,v as A,w as j,x as M,y as N}from"../dataTable-BoyxeUL4.js";e(`wui-data-table`,t);export{O as COLUMN_MAX_WIDTH,C as COLUMN_MIN_WIDTH,E as DATA_TABLE_TEXT,v as PIN_AT_VAR,d as PIN_SIDES,w as RESIZE_STEP,D as RESIZE_STEP_LARGE,p as ROW_HEIGHTS,x as ROW_MOVE_LIMIT,k as ROW_MOVE_MS,m as ROW_SAVE_ATTR,h as ROW_SAVE_ERROR_CLASS,T as ROW_SAVE_STATES,S as VIRTUAL_OVERSCAN,t as WuiDataTable,_ as clampColumnWidth,g as groupCount,u as groupItems,A as identityCell,N as measureRows,f as pinAtValue,M as pinClasses,c as pinOffsetVar,r as planPins,j as playRowMoves,l as readColumnWidths,a as rowLabel,i as rowOrderChanged,s as saveOutcomeText,b as setRowSaveState,n as settledRows,y as virtualRange,o as writeColumnWidths};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiDataTable-B4BYCd_s.js";import{A as n,C as r,D as i,E as a,M as o,O as s,S as c,T as l,_ as u,a as d,b as f,c as p,d as m,f as h,g,h as _,i as v,j as y,k as b,l as x,m as S,n as C,o as w,p as T,r as E,s as D,t as O,u as k,v as A,w as j,x as M,y as N}from"../dataTable-B-7oAeii.js";e(`wui-data-table`,t);export{O as COLUMN_MAX_WIDTH,C as COLUMN_MIN_WIDTH,E as DATA_TABLE_TEXT,v as PIN_AT_VAR,d as PIN_SIDES,w as RESIZE_STEP,D as RESIZE_STEP_LARGE,p as ROW_HEIGHTS,x as ROW_MOVE_LIMIT,k as ROW_MOVE_MS,m as ROW_SAVE_ATTR,h as ROW_SAVE_ERROR_CLASS,T as ROW_SAVE_STATES,S as VIRTUAL_OVERSCAN,t as WuiDataTable,_ as clampColumnWidth,g as groupCount,u as groupItems,A as identityCell,N as measureRows,f as pinAtValue,M as pinClasses,c as pinOffsetVar,r as planPins,j as playRowMoves,l as readColumnWidths,a as rowLabel,i as rowOrderChanged,s as saveOutcomeText,b as setRowSaveState,n as settledRows,y as virtualRange,o as writeColumnWidths};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiDateRange-B05PsdJ3.js";e(`wui-date-range`,t);export{t as WuiDateRange};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiDateRange-9Xqs5nvv.js";e(`wui-date-range`,t);export{t as WuiDateRange};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiDatePicker-kEyyILbM.js";e(`wui-datepicker`,t);export{t as WuiDatePicker};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiDatePicker-DLEsnzqG.js";e(`wui-datepicker`,t);export{t as WuiDatePicker};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiDock-Bd2ijOaJ.js";e(`wui-dock`,t);export{t as WuiDock};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiDock-d5abaLkL.js";e(`wui-dock`,t);export{t as WuiDock};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiDrawer-SkxcDhgf.js";e(`wui-drawer`,t);export{t as WuiDrawer};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiDrawer-B3YFmxl2.js";e(`wui-drawer`,t);export{t as WuiDrawer};
@@ -1 +1 @@
1
- import{n as e,t}from"../filterPopover-DniNyLWI.js";e();export{t as FILTER_POPOVER_MAX_CHIPS};
1
+ import{n as e,t}from"../filterPopover-D8BOb-Hz.js";e();export{t as FILTER_POPOVER_MAX_CHIPS};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiHoverCard-Bqapy8Is.js";e(`wui-hover-card`,t);export{t as WuiHoverCard};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiHoverCard-CE3dHKaM.js";e(`wui-hover-card`,t);export{t as WuiHoverCard};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiImageCrop-DzzzPagi.js";e(`wui-image-crop`,t);export{t as WuiImageCrop};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiImageCrop-ChvH8GKb.js";e(`wui-image-crop`,t);export{t as WuiImageCrop};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{a as t,i as n,n as r,r as i,t as a}from"../WuiInlineEdit-BqgKfVMy.js";e(`wui-inline-edit`,n);export{a as INLINE_EDIT_SAVED_MS,r as INLINE_EDIT_TEXT,i as INLINE_EDIT_TYPES,n as WuiInlineEdit,t as inlineEditText};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{i as t,n,r,t as i}from"../inlineEditText-CsLCQbcg.js";import{t as a}from"../WuiInlineEdit-BlBuWkHG.js";e(`wui-inline-edit`,a);export{i as INLINE_EDIT_SAVED_MS,n as INLINE_EDIT_TEXT,r as INLINE_EDIT_TYPES,a as WuiInlineEdit,t as inlineEditText};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{a as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,n as u,o as d,p as f,r as p,s as m,t as h,u as g}from"../kanban-BtgxVDE-.js";e(`wui-kanban`,n);export{h as KANBAN_DRAG_THRESHOLD_PX,u as KANBAN_LONG_PRESS_MS,p as KANBAN_PHONE_QUERY,s as KANBAN_STORAGE_PREFIX,t as KANBAN_SUMMARY_FORMATS,d as KANBAN_TEXT,m as KANBAN_TONES,n as WuiKanban,c as kanbanCardLabel,g as kanbanOverflow,r as kanbanStorageKey,i as kanbanSummaryFormat,f as kanbanVisibleLimit,l as readKanbanCollapsed,o as sumKanbanValues,a as writeKanbanCollapsed};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../kanban-Dz8m-17x.js";import{a as n,c as r,d as i,f as a,h as o,i as s,l as c,m as l,n as u,o as d,p as f,r as p,s as m,t as h,u as g}from"../kanbanModel-C2IOPJ8L.js";e(`wui-kanban`,t);export{h as KANBAN_DRAG_THRESHOLD_PX,u as KANBAN_LONG_PRESS_MS,p as KANBAN_PHONE_QUERY,s as KANBAN_STORAGE_PREFIX,n as KANBAN_SUMMARY_FORMATS,d as KANBAN_TEXT,m as KANBAN_TONES,t as WuiKanban,r as kanbanCardLabel,c as kanbanOverflow,g as kanbanStorageKey,i as kanbanSummaryFormat,a as kanbanVisibleLimit,f as readKanbanCollapsed,l as sumKanbanValues,o as writeKanbanCollapsed};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiLeadPopup-Dwmg7coE.js";e(`wui-lead-popup`,t);export{t as WuiLeadPopup};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiLeadPopup-YN4YCbOe.js";e(`wui-lead-popup`,t);export{t as WuiLeadPopup};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiLightbox-DCTE3ULH.js";e(`wui-lightbox`,t);export{t as WuiLightbox};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiLightbox-C2A14vHx.js";e(`wui-lightbox`,t);export{t as WuiLightbox};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiMarkdown-D5vm4sp4.js";e(`wui-markdown`,t);export{t as WuiMarkdown};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiMarkdown-BXY0QKaO.js";e(`wui-markdown`,t);export{t as WuiMarkdown};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{a as t,c as n,i as r,l as i,n as a,o,r as s,s as c,t as l,u}from"../WuiMentionInput-Bi3VQoKo.js";e(`wui-mention-input`,r);export{t as MENTION_ID_PATTERN,l as MENTION_MAX_QUERY,a as MENTION_MAX_RESULTS,s as MENTION_TEXT,r as WuiMentionInput,o as mentionLabel,c as mentionTextFromValue,n as mentionValueFromText,i as mentionedIds,u as parseMentionValue};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{i as t,n,r,t as i}from"../mentionText-BJsw_opZ.js";import{i as a,n as o,r as s,t as c}from"../WuiMentionInput-8Xjkzdqg.js";e(`wui-mention-input`,a);export{i as MENTION_ID_PATTERN,c as MENTION_MAX_QUERY,o as MENTION_MAX_RESULTS,s as MENTION_TEXT,a as WuiMentionInput,n as mentionLabel,r as mentionTextFromValue,t as mentionValueFromText};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiNavigationMenu-DmH3waKW.js";e(`wui-navigation-menu`,t);export{t as WuiNavigationMenu};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiNavigationMenu-CZ3XhFam.js";e(`wui-navigation-menu`,t);export{t as WuiNavigationMenu};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiNotificationCenter-DawJRGBc.js";e(`wui-notification-center`,t);export{t as WuiNotificationCenter};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiNotificationCenter-ClkCTUnp.js";e(`wui-notification-center`,t);export{t as WuiNotificationCenter};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiOnboardingChecklist-DXUETu1h.js";e(`wui-onboarding-checklist`,t);export{t as WuiOnboardingChecklist};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiOnboardingChecklist-Cx-TgpBY.js";e(`wui-onboarding-checklist`,t);export{t as WuiOnboardingChecklist};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiOrgTree-DuaBtFl9.js";e(`wui-org-tree`,t);export{t as WuiOrgTree};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiOrgTree-DzeLFQxy.js";e(`wui-org-tree`,t);export{t as WuiOrgTree};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiOtp-BqWijfNj.js";e(`wui-otp`,t);export{t as WuiOtp};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiOtp-DonxSwVn.js";e(`wui-otp`,t);export{t as WuiOtp};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiOverflow-DP3qEbDp.js";e(`wui-overflow`,t);export{t as WuiOverflow};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiOverflow-B0wA6aDe.js";e(`wui-overflow`,t);export{t as WuiOverflow};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiPhone-CFne_6XG.js";e(`wui-phone`,t);export{t as WuiPhone};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiPhone-BVNVerap.js";e(`wui-phone`,t);export{t as WuiPhone};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiRating-DhhqYj5Z.js";e(`wui-rating`,t);export{t as WuiRating};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiRating-DLVduJZ_.js";e(`wui-rating`,t);export{t as WuiRating};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiRecordPager-BOaFcs_W.js";e(`wui-record-pager`,t);export{t as WuiRecordPager};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiRecordPager-7HVGoFlP.js";e(`wui-record-pager`,t);export{t as WuiRecordPager};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{n as t,r as n,t as r}from"../WuiRelativeTime-BG6rgUhw.js";e(`wui-relative-time`,r);export{r as WuiRelativeTime,t as formatRelativeTime,n as relativeTimeTitle};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiRelativeTime-DyeUQOQ8.js";import{n,r}from"../relativeTime-BahImc8F.js";e(`wui-relative-time`,t);export{t as WuiRelativeTime,n as formatRelativeTime,r as relativeTimeTitle};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiResizable-mt9EMhjQ.js";e(`wui-resizable`,t);export{t as WuiResizable};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiResizable-DQZdQVCz.js";e(`wui-resizable`,t);export{t as WuiResizable};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiRollingNumber-CF3H6l7t.js";e(`wui-rolling-number`,t);export{t as WuiRollingNumber};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiRollingNumber-sfgNzaP0.js";e(`wui-rolling-number`,t);export{t as WuiRollingNumber};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiSavedViews-BMBQUv2K.js";e(`wui-saved-views`,t);export{t as WuiSavedViews};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiSavedViews-UaiP6YNG.js";e(`wui-saved-views`,t);export{t as WuiSavedViews};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiSelect-oSJPev4N.js";e(`wui-select`,t);export{t as WuiSelect};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiSelect-DBPre2oe.js";e(`wui-select`,t);export{t as WuiSelect};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiShortcuts-BEvFCIu9.js";e(`wui-shortcuts`,t);export{t as WuiShortcuts};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiShortcuts-D3rWkaOm.js";e(`wui-shortcuts`,t);export{t as WuiShortcuts};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiShowMore-D3VHRZJg.js";e(`wui-show-more`,t);export{t as WuiShowMore};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiShowMore-CvdNQXrA.js";e(`wui-show-more`,t);export{t as WuiShowMore};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiSlider-2kB__6zU.js";e(`wui-slider`,t);export{t as WuiSlider};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiSlider-D33Y3_t9.js";e(`wui-slider`,t);export{t as WuiSlider};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiSortable-r5iZtzM1.js";e(`wui-sortable`,t);export{t as WuiSortable};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiSortable-CBLMNRuZ.js";e(`wui-sortable`,t);export{t as WuiSortable};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{n as t,t as n}from"../statusIcons-Dt2ZVJyk.js";e(`wui-status-icon`,t);export{n as STATUS_TONES,t as WuiStatusIcon};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{n as t,t as n}from"../statusIcons-CRtqA_1C.js";e(`wui-status-icon`,t);export{n as STATUS_TONES,t as WuiStatusIcon};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiTimePicker-DqqZPv0T.js";e(`wui-timepicker`,t);export{t as WuiTimePicker};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiTimePicker-DOodgU2O.js";e(`wui-timepicker`,t);export{t as WuiTimePicker};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{n as t,t as n}from"../WuiTour-B-V1PZnw.js";e(`wui-tour`,n);export{n as WuiTour,t as createLocalSeenStore};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiTour-Cx61ijsm.js";e(`wui-tour`,t);export{t as WuiTour};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiTree-B3cnH1PG.js";e(`wui-tree`,t);export{t as WuiTree};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiTree-0Yqu199O.js";e(`wui-tree`,t);export{t as WuiTree};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{t}from"../WuiTruncate-DyDQWMBu.js";e(`wui-truncate`,t);export{t as WuiTruncate};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{t}from"../WuiTruncate-C2WV1-NN.js";e(`wui-truncate`,t);export{t as WuiTruncate};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{n as t,t as n}from"../WuiWhatsNew-B5jK2zwZ.js";e(`wui-whats-new`,t);export{n as WHATS_NEW_READ_EVENT,t as WuiWhatsNew};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{n as t,t as n}from"../WuiWhatsNew-dLGyA4g1.js";e(`wui-whats-new`,t);export{n as WHATS_NEW_READ_EVENT,t as WuiWhatsNew};
@@ -1 +1 @@
1
- import{n as e}from"../elementBase-DV9IZZCu.js";import{n as t,t as n}from"../WuiWizardStep-CIYuIp4a.js";e(`wui-wizard-step`,n),e(`wui-wizard`,t);export{t as WuiWizard,n as WuiWizardStep};
1
+ import{n as e}from"../elementBase-Cxeyx0tU.js";import{n as t,t as n}from"../WuiWizardStep-Cencr-mT.js";e(`wui-wizard-step`,n),e(`wui-wizard`,t);export{t as WuiWizard,n as WuiWizardStep};
@@ -1,3 +1,3 @@
1
- import{a as e,n as t,o as n,t as r}from"./fileViewerUi-DQH6_B1a.js";var i=[.1,.25,.5,.75,1,1.5,2,3,4],a=[.25,.5,1,2,4],o=5,s=class{constructor(e,t){this.shell=e,this.source=t,this.zoom=`fit`,this.rotation=0,this.area={width:0,height:0},this.destroyed=!1}load(){let e=document.createElement(`img`);e.className=`wui-file-viewer-image`,e.alt=this.shell.name(),e.decoding=`async`,e.draggable=!1,e.addEventListener(`load`,()=>{this.destroyed||(this.natural={width:e.naturalWidth||300,height:e.naturalHeight||150},this._build(e),this.shell.loaded({kind:`image`,pages:1}))}),e.addEventListener(`error`,()=>{this.destroyed||this.shell.fail(/* @__PURE__ */ Error(`The image could not be decoded.`))}),e.src=this.source.src,this.img=e}destroy(){this.destroyed=!0,this._resizeObserver?.disconnect(),this._onKeyDown&&this.shell.host.removeEventListener(`keydown`,this._onKeyDown),this._printFrame?.remove(),this.img?.removeAttribute(`src`)}_build(e){let{center:n,end:i,body:o,host:s}=this.shell;this.zoomOutButton=r(`zoom-out`,`Zoom out`),this.zoomOutButton.addEventListener(`click`,()=>this._stepZoom(-1)),this.zoomButton=document.createElement(`button`),this.zoomButton.type=`button`,this.zoomButton.className=`wui-file-viewer-zoom`,t(this.zoomButton,{label:`Zoom`,items:()=>[...a.map(e=>({key:String(e),label:`${Math.round(e*100)}%`,checked:this.zoom===e})),{key:`fit-divider`,divider:!0},{key:`fit`,label:`Fit`,checked:this.zoom===`fit`}],onPick:e=>this._setZoom(e===`fit`?`fit`:Number(e))}),this.zoomInButton=r(`zoom-in`,`Zoom in`),this.zoomInButton.addEventListener(`click`,()=>this._stepZoom(1));let c=r(`rotate-ccw`,`Rotate left`);c.addEventListener(`click`,()=>this._rotate(-90));let l=r(`rotate-cw`,`Rotate right`);l.addEventListener(`click`,()=>this._rotate(90));let u=document.createElement(`span`);u.className=`wui-file-viewer-divider wui-file-viewer-print`;let d=r(`printer`,`Print`,{className:`wui-file-viewer-print`});d.addEventListener(`click`,()=>this.print()),u.hidden=d.hidden=!this.shell.print(),n.append(this.zoomOutButton,this.zoomButton,this.zoomInButton),i.prepend(c,l,u,d),this.scroller=document.createElement(`div`),this.scroller.className=`wui-file-viewer-scroll wui-file-viewer-image-scroll wui-scroll`,this.scroller.tabIndex=0,this.scroller.setAttribute(`role`,`region`),this.scroller.setAttribute(`aria-label`,`Image`),this.stage=document.createElement(`div`),this.stage.className=`wui-file-viewer-image-stage`,this.stage.append(e),this.scroller.append(this.stage),o.replaceChildren(this.scroller),this.scroller.addEventListener(`pointerdown`,e=>this._panStart(e)),this.scroller.addEventListener(`pointermove`,e=>this._panMove(e));for(let e of[`pointerup`,`pointercancel`,`lostpointercapture`])this.scroller.addEventListener(e,()=>this._panEnd());this.scroller.addEventListener(`wheel`,e=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let t=performance.now();t-(this._lastWheelZoom??0)<120||(this._lastWheelZoom=t,this._stepZoom(e.deltaY<0?1:-1))},{passive:!1}),this._onKeyDown=e=>this._keyDown(e),s.addEventListener(`keydown`,this._onKeyDown),this._resizeObserver=new ResizeObserver(()=>{let e=this.scroller.clientWidth,t=this.scroller.clientHeight;(e!==this.area.width||t!==this.area.height)&&(this.area={width:e,height:t},this._layout())}),this._resizeObserver.observe(this.scroller),this.area={width:this.scroller.clientWidth,height:this.scroller.clientHeight},this._layout()}_turned(){let{width:e,height:t}=this.natural;return this.rotation%180==0?{width:e,height:t}:{width:t,height:e}}scale(){if(typeof this.zoom==`number`)return this.zoom;let{width:e,height:t}=this._turned(),n=Math.min((this.area.width-32)/e,(this.area.height-32)/t);return Math.max(n,.01)}_layout(){if(!this.stage)return;let t=this.scale(),n=this._turned();this.stage.style.width=`${Math.round(n.width*t)}px`,this.stage.style.height=`${Math.round(n.height*t)}px`,this.img.style.width=`${Math.round(this.natural.width*t)}px`,this.img.style.height=`${Math.round(this.natural.height*t)}px`,this.img.style.transform=`translate(-50%, -50%) rotate(${this.rotation}deg)`;let r=Math.round(t*100);this.zoomButton.innerHTML=`${r}%${e(`chevron-down`,{size:12})}`,this.zoomButton.setAttribute(`aria-label`,`Zoom, ${r}%`),this.zoomOutButton.disabled=this._zoomStep(-1)==null,this.zoomInButton.disabled=this._zoomStep(1)==null}_zoomStep(e){let t=Math.round(this.scale()*100);return e>0?i.find(e=>Math.round(e*100)>t)??null:[...i].reverse().find(e=>Math.round(e*100)<t)??null}_stepZoom(e){let t=this._zoomStep(e);t!=null&&this._setZoom(t)}_setZoom(e){let t=this.scroller,n=(t.scrollLeft+t.clientWidth/2)/Math.max(t.scrollWidth,1),r=(t.scrollTop+t.clientHeight/2)/Math.max(t.scrollHeight,1);this.zoom=e,this._layout(),t.scrollLeft=n*t.scrollWidth-t.clientWidth/2,t.scrollTop=r*t.scrollHeight-t.clientHeight/2}_rotate(e){this.rotation=(this.rotation+e+360)%360,this._setZoom(this.zoom)}_keyDown(e){if(!(e.defaultPrevented||e.altKey||!(e.ctrlKey||e.metaKey))){if(e.key===`+`||e.key===`=`)this._stepZoom(1);else if(e.key===`-`||e.key===`_`)this._stepZoom(-1);else if(e.key===`0`)this._setZoom(`fit`);else return;e.preventDefault()}}_panStart(e){let t=this.scroller;e.button!==0||t.scrollWidth<=t.clientWidth&&t.scrollHeight<=t.clientHeight||(this._pan={id:e.pointerId,x:e.clientX,y:e.clientY,left:t.scrollLeft,top:t.scrollTop,active:!1})}_panMove(e){let t=this._pan;if(!t)return;let n=e.clientX-t.x,r=e.clientY-t.y;if(!t.active){if(Math.abs(n)<o&&Math.abs(r)<o)return;t.active=!0,this.scroller.setPointerCapture(t.id),this.scroller.classList.add(`wui-file-viewer-panning`)}this.scroller.scrollLeft=t.left-n,this.scroller.scrollTop=t.top-r}_panEnd(){let e=this._pan;e?.active&&(this.scroller.hasPointerCapture(e.id)&&this.scroller.releasePointerCapture(e.id),this.scroller.classList.remove(`wui-file-viewer-panning`)),this._pan=null}print(){this._printFrame?.remove();let e=document.createElement(`iframe`);e.className=`wui-file-viewer-print-frame`,e.title=`Image for printing`,e.tabIndex=-1,e.setAttribute(`aria-hidden`,`true`);let t=this.rotation%180!=0,r=new URL(this.source.src,document.baseURI).href;e.srcdoc=`<!doctype html><html><head><title>${c(this.shell.name())}</title></head><body></body></html>`,e.addEventListener(`load`,async()=>{try{let n=e.contentDocument,i=new e.contentWindow.CSSStyleSheet;i.replaceSync(`@page { margin: 10mm; }
1
+ import{a as e,n as t,s as n,t as r}from"./fileViewerUi-ResPjO1o.js";var i=[.1,.25,.5,.75,1,1.5,2,3,4],a=[.25,.5,1,2,4],o=5,s=class{constructor(e,t){this.shell=e,this.source=t,this.zoom=`fit`,this.rotation=0,this.area={width:0,height:0},this.destroyed=!1}load(){let e=document.createElement(`img`);e.className=`wui-file-viewer-image`,e.alt=this.shell.name(),e.decoding=`async`,e.draggable=!1,e.addEventListener(`load`,()=>{this.destroyed||(this.natural={width:e.naturalWidth||300,height:e.naturalHeight||150},this._build(e),this.shell.loaded({kind:`image`,pages:1}))}),e.addEventListener(`error`,()=>{this.destroyed||this.shell.fail(/* @__PURE__ */ Error(`The image could not be decoded.`))}),e.src=this.source.src,this.img=e}destroy(){this.destroyed=!0,this._resizeObserver?.disconnect(),this._onKeyDown&&this.shell.host.removeEventListener(`keydown`,this._onKeyDown),this._printFrame?.remove(),this.img?.removeAttribute(`src`)}_build(e){let{center:n,end:i,body:o,host:s}=this.shell;this.zoomOutButton=r(`zoom-out`,`Zoom out`),this.zoomOutButton.addEventListener(`click`,()=>this._stepZoom(-1)),this.zoomButton=document.createElement(`button`),this.zoomButton.type=`button`,this.zoomButton.className=`wui-file-viewer-zoom`,t(this.zoomButton,{label:`Zoom`,items:()=>[...a.map(e=>({key:String(e),label:`${Math.round(e*100)}%`,checked:this.zoom===e})),{key:`fit-divider`,divider:!0},{key:`fit`,label:`Fit`,checked:this.zoom===`fit`}],onPick:e=>this._setZoom(e===`fit`?`fit`:Number(e))}),this.zoomInButton=r(`zoom-in`,`Zoom in`),this.zoomInButton.addEventListener(`click`,()=>this._stepZoom(1));let c=r(`rotate-ccw`,`Rotate left`);c.addEventListener(`click`,()=>this._rotate(-90));let l=r(`rotate-cw`,`Rotate right`);l.addEventListener(`click`,()=>this._rotate(90));let u=document.createElement(`span`);u.className=`wui-file-viewer-divider wui-file-viewer-print`;let d=r(`printer`,`Print`,{className:`wui-file-viewer-print`});d.addEventListener(`click`,()=>this.print()),u.hidden=d.hidden=!this.shell.print(),n.append(this.zoomOutButton,this.zoomButton,this.zoomInButton),i.prepend(c,l,u,d),this.scroller=document.createElement(`div`),this.scroller.className=`wui-file-viewer-scroll wui-file-viewer-image-scroll wui-scroll`,this.scroller.tabIndex=0,this.scroller.setAttribute(`role`,`region`),this.scroller.setAttribute(`aria-label`,`Image`),this.stage=document.createElement(`div`),this.stage.className=`wui-file-viewer-image-stage`,this.stage.append(e),this.scroller.append(this.stage),o.replaceChildren(this.scroller),this.scroller.addEventListener(`pointerdown`,e=>this._panStart(e)),this.scroller.addEventListener(`pointermove`,e=>this._panMove(e));for(let e of[`pointerup`,`pointercancel`,`lostpointercapture`])this.scroller.addEventListener(e,()=>this._panEnd());this.scroller.addEventListener(`wheel`,e=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let t=performance.now();t-(this._lastWheelZoom??0)<120||(this._lastWheelZoom=t,this._stepZoom(e.deltaY<0?1:-1))},{passive:!1}),this._onKeyDown=e=>this._keyDown(e),s.addEventListener(`keydown`,this._onKeyDown),this._resizeObserver=new ResizeObserver(()=>{let e=this.scroller.clientWidth,t=this.scroller.clientHeight;(e!==this.area.width||t!==this.area.height)&&(this.area={width:e,height:t},this._layout())}),this._resizeObserver.observe(this.scroller),this.area={width:this.scroller.clientWidth,height:this.scroller.clientHeight},this._layout()}_turned(){let{width:e,height:t}=this.natural;return this.rotation%180==0?{width:e,height:t}:{width:t,height:e}}scale(){if(typeof this.zoom==`number`)return this.zoom;let{width:e,height:t}=this._turned(),n=Math.min((this.area.width-32)/e,(this.area.height-32)/t);return Math.max(n,.01)}_layout(){if(!this.stage)return;let t=this.scale(),n=this._turned();this.stage.style.width=`${Math.round(n.width*t)}px`,this.stage.style.height=`${Math.round(n.height*t)}px`,this.img.style.width=`${Math.round(this.natural.width*t)}px`,this.img.style.height=`${Math.round(this.natural.height*t)}px`,this.img.style.transform=`translate(-50%, -50%) rotate(${this.rotation}deg)`;let r=Math.round(t*100);this.zoomButton.innerHTML=`${r}%${e(`chevron-down`,{size:12})}`,this.zoomButton.setAttribute(`aria-label`,`Zoom, ${r}%`),this.zoomOutButton.disabled=this._zoomStep(-1)==null,this.zoomInButton.disabled=this._zoomStep(1)==null}_zoomStep(e){let t=Math.round(this.scale()*100);return e>0?i.find(e=>Math.round(e*100)>t)??null:[...i].reverse().find(e=>Math.round(e*100)<t)??null}_stepZoom(e){let t=this._zoomStep(e);t!=null&&this._setZoom(t)}_setZoom(e){let t=this.scroller,n=(t.scrollLeft+t.clientWidth/2)/Math.max(t.scrollWidth,1),r=(t.scrollTop+t.clientHeight/2)/Math.max(t.scrollHeight,1);this.zoom=e,this._layout(),t.scrollLeft=n*t.scrollWidth-t.clientWidth/2,t.scrollTop=r*t.scrollHeight-t.clientHeight/2}_rotate(e){this.rotation=(this.rotation+e+360)%360,this._setZoom(this.zoom)}_keyDown(e){if(!(e.defaultPrevented||e.altKey||!(e.ctrlKey||e.metaKey))){if(e.key===`+`||e.key===`=`)this._stepZoom(1);else if(e.key===`-`||e.key===`_`)this._stepZoom(-1);else if(e.key===`0`)this._setZoom(`fit`);else return;e.preventDefault()}}_panStart(e){let t=this.scroller;e.button!==0||t.scrollWidth<=t.clientWidth&&t.scrollHeight<=t.clientHeight||(this._pan={id:e.pointerId,x:e.clientX,y:e.clientY,left:t.scrollLeft,top:t.scrollTop,active:!1})}_panMove(e){let t=this._pan;if(!t)return;let n=e.clientX-t.x,r=e.clientY-t.y;if(!t.active){if(Math.abs(n)<o&&Math.abs(r)<o)return;t.active=!0,this.scroller.setPointerCapture(t.id),this.scroller.classList.add(`wui-file-viewer-panning`)}this.scroller.scrollLeft=t.left-n,this.scroller.scrollTop=t.top-r}_panEnd(){let e=this._pan;e?.active&&(this.scroller.hasPointerCapture(e.id)&&this.scroller.releasePointerCapture(e.id),this.scroller.classList.remove(`wui-file-viewer-panning`)),this._pan=null}print(){this._printFrame?.remove();let e=document.createElement(`iframe`);e.className=`wui-file-viewer-print-frame`,e.title=`Image for printing`,e.tabIndex=-1,e.setAttribute(`aria-hidden`,`true`);let t=this.rotation%180!=0,r=new URL(this.source.src,document.baseURI).href;e.srcdoc=`<!doctype html><html><head><title>${l(this.shell.name())}</title></head><body></body></html>`,e.addEventListener(`load`,async()=>{try{let n=e.contentWindow,i=e.contentDocument;if(!n||!i)throw TypeError(`The print frame has no document.`);let a=`CSSStyleSheet`in n?n.CSSStyleSheet:void 0;if(!c(a))throw TypeError(`The print frame has no CSSStyleSheet.`);let o=new a;o.replaceSync(`@page { margin: 10mm; }
2
2
  html, body { margin: 0; height: 100%; }
3
- body { display: flex; align-items: center; justify-content: center; }`),n.adoptedStyleSheets=[i];let a=n.createElement(`img`);a.src=r,a.alt=``,a.style.setProperty(`max-width`,t?`100vh`:`100vw`),a.style.setProperty(`max-height`,t?`100vw`:`100vh`),a.style.setProperty(`transform`,`rotate(${this.rotation}deg)`),n.body.append(a),a.complete||await new Promise(e=>{a.addEventListener(`load`,e,{once:!0}),a.addEventListener(`error`,e,{once:!0})}),e.contentWindow.focus(),e.contentWindow.print()}catch(e){n(`[wui-file-viewer] print failed:`,e?.message),window.open(this.source.src,`_blank`,`noopener`)}},{once:!0}),this._printFrame=e,document.body.append(e)}},c=e=>String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`);export{s as ImageView};
3
+ body { display: flex; align-items: center; justify-content: center; }`),i.adoptedStyleSheets=[o];let s=i.createElement(`img`);s.src=r,s.alt=``,s.style.setProperty(`max-width`,t?`100vh`:`100vw`),s.style.setProperty(`max-height`,t?`100vw`:`100vh`),s.style.setProperty(`transform`,`rotate(${this.rotation}deg)`),i.body.append(s),s.complete||await new Promise(e=>{s.addEventListener(`load`,e,{once:!0}),s.addEventListener(`error`,e,{once:!0})}),n.focus(),n.print()}catch(e){n(`[wui-file-viewer] print failed:`,e instanceof Error?e.message:void 0),window.open(this.source.src,`_blank`,`noopener`)}},{once:!0}),this._printFrame=e,document.body.append(e)}},c=e=>typeof e==`function`,l=e=>String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`);export{s as ImageView};
@@ -0,0 +1 @@
1
+ import{a as e,i as t,n,r,s as i,t as a}from"./fileViewerUi-ResPjO1o.js";var o=[.5,.75,1,1.25,1.5,2],s=5,c=.1;function l(e){if(!Number.isFinite(e)||e<0)return`0:00`;let t=Math.floor(e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=String(t%60).padStart(2,`0`);return n?`${n}:${String(r).padStart(2,`0`)}:${i}`:`${r}:${i}`}var u=e=>typeof e==`number`&&o.includes(e),d=e=>e instanceof Element&&e.closest(`input, textarea, select, button, a, .dropdown-menu`),f=class{constructor(e,t){this.shell=e,this.source=t,this.destroyed=!1}load(){let{kind:e,src:t,captions:n}=this.source,r=e===`video`?document.createElement(`video`):document.createElement(`audio`);if(r.className=`wui-file-viewer-${e}`,r.preload=`metadata`,Object.assign(r,{playsInline:!0}),e===`video`&&n){let e=document.createElement(`track`);e.kind=`captions`,e.label=`Captions`,e.srclang=`en`,e.src=n,r.append(e)}let i=this.shell.prefs;typeof i.volume==`number`&&(r.volume=Math.min(Math.max(i.volume,0),1)),r.muted=i.muted===!0,r.addEventListener(`loadedmetadata`,()=>{this.destroyed||(r.playbackRate=u(i.speed)?i.speed:1,this._build(),this.shell.loaded({kind:e,pages:1}))},{once:!0}),r.addEventListener(`error`,()=>{this.destroyed||this.shell.fail(/* @__PURE__ */ Error(`The file could not be played.`))}),r.src=t,this.media=r}destroy(){this.destroyed=!0,this._onKeyDown&&this.shell.host.removeEventListener(`keydown`,this._onKeyDown),this.media&&(this.media.pause(),this.media.removeAttribute(`src`),this.media.load())}_build(){let{body:t,host:r}=this.shell,i=this.media,s=this.source.kind,c=document.createElement(`div`);c.className=`wui-file-viewer-player wui-file-viewer-player-${s}`;let l=document.createElement(`div`);if(l.className=`wui-file-viewer-stage`,l.tabIndex=0,l.setAttribute(`role`,`group`),l.setAttribute(`aria-label`,s===`video`?`Video`:`Audio`),s===`audio`){let t=document.createElement(`div`);t.className=`wui-file-viewer-audio-art`,t.innerHTML=e(`music`,{size:40}),l.append(t,i)}else l.append(i),i.addEventListener(`click`,()=>this.togglePlay());let u=document.createElement(`div`);u.className=`wui-file-viewer-controls`,this.playButton=a(`play`,`Play`,{size:18}),this.playButton.addEventListener(`click`,()=>this.togglePlay()),this.timeNow=document.createElement(`span`),this.timeNow.className=`wui-file-viewer-time`,this.seek=document.createElement(`input`),this.seek.type=`range`,this.seek.className=`form-range wui-file-viewer-seek`,this.seek.min=`0`,this.seek.step=`any`,this.seek.setAttribute(`aria-label`,`Seek`),this.seek.addEventListener(`input`,()=>{i.currentTime=Number(this.seek.value)}),this.timeTotal=document.createElement(`span`),this.timeTotal.className=`wui-file-viewer-time`,this.muteButton=a(`volume-high`,`Mute`,{size:18}),this.muteButton.addEventListener(`click`,()=>this._setMuted(!i.muted)),this.volume=document.createElement(`input`),this.volume.type=`range`,this.volume.className=`form-range wui-file-viewer-volume`,this.volume.min=`0`,this.volume.max=`1`,this.volume.step=`0.05`,this.volume.setAttribute(`aria-label`,`Volume`),this.volume.addEventListener(`input`,()=>this._setVolume(Number(this.volume.value))),this.speedButton=document.createElement(`button`),this.speedButton.type=`button`,this.speedButton.className=`wui-file-viewer-zoom wui-file-viewer-speed`,n(this.speedButton,{label:`Playback speed`,items:()=>o.map(e=>({key:String(e),label:`${e}x`,checked:i.playbackRate===e})),onPick:e=>this._setSpeed(Number(e))}),u.append(this.playButton,this.timeNow,this.seek,this.timeTotal,this.muteButton,this.volume,this.speedButton),s===`video`&&this.source.captions&&(this.captionsButton=a(`subtitle`,`Show captions`,{size:18}),this.captionsButton.addEventListener(`click`,()=>this._setCaptions(!this._captionsOn())),u.append(this.captionsButton)),c.append(l,u),t.replaceChildren(c);for(let e of[`play`,`pause`,`ended`])i.addEventListener(e,()=>this._syncPlay());i.addEventListener(`timeupdate`,()=>this._syncTime()),i.addEventListener(`durationchange`,()=>this._syncTime()),i.addEventListener(`volumechange`,()=>this._syncVolume()),i.addEventListener(`ratechange`,()=>this._syncSpeed()),this._onKeyDown=e=>this._keyDown(e),r.addEventListener(`keydown`,this._onKeyDown),this._syncPlay(),this._syncTime(),this._syncVolume(),this._syncSpeed(),this._syncCaptions()}seekTo(e){let t=this.media.duration;this.media.currentTime=Math.min(Math.max(e,0),Number.isFinite(t)?t:1/0)}togglePlay(){this.media.paused||this.media.ended?this.media.play().catch(e=>{i(`[wui-file-viewer] play refused:`,e instanceof Error?e.message:void 0)}):this.media.pause()}_setMuted(e){this.media.muted=e,!e&&this.media.volume===0&&(this.media.volume=.5),this.shell.savePrefs({muted:this.media.muted,volume:this.media.volume})}_setVolume(e){this.media.volume=Math.min(Math.max(e,0),1),this.media.muted=this.media.volume===0,this.shell.savePrefs({muted:this.media.muted,volume:this.media.volume})}_setSpeed(e){this.media.playbackRate=e,this.shell.savePrefs({speed:e})}_captionsOn(){return this.media.textTracks?.[0]?.mode===`showing`}_setCaptions(e){let t=this.media.textTracks?.[0];t&&(t.mode=e?`showing`:`hidden`),this._syncCaptions()}_syncPlay(){let e=!this.media.paused&&!this.media.ended;r(this.playButton,e?`pause`:`play`,18),t(this.playButton,e?`Pause`:`Play`),this.shell.host.classList.toggle(`wui-file-viewer-playing`,e)}_syncTime(){let e=this.media.currentTime,t=this.media.duration;this.timeNow.textContent=l(e),this.timeTotal.textContent=l(t),this.seek.max=String(Number.isFinite(t)?t:0),this.seek.value=String(e),this.seek.setAttribute(`aria-valuetext`,`${l(e)} of ${l(t)}`)}_syncVolume(){let e=this.media.muted||this.media.volume===0;r(this.muteButton,e?`volume-mute`:`volume-high`,18),t(this.muteButton,e?`Unmute`:`Mute`),this.volume.value=String(this.media.muted?0:this.media.volume)}_syncSpeed(){let e=`${this.media.playbackRate}x`;this.speedButton.textContent=e,this.speedButton.setAttribute(`aria-label`,`Playback speed, ${e}`)}_syncCaptions(){if(!this.captionsButton)return;let e=this._captionsOn();this.captionsButton.setAttribute(`aria-pressed`,String(e)),t(this.captionsButton,e?`Hide captions`:`Show captions`)}_keyDown(e){if(e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey||d(e.target))return;let t=this.media,n=e.key.toLowerCase();if(n===` `||n===`k`)this.togglePlay();else if(n===`arrowleft`)t.currentTime=Math.max(0,t.currentTime-s);else if(n===`arrowright`)t.currentTime=Math.min(t.duration||0,t.currentTime+s);else if(n===`arrowup`)this._setVolume(t.volume+c);else if(n===`arrowdown`)this._setVolume(t.volume-c);else if(n===`m`)this._setMuted(!t.muted);else if(n===`c`&&this.captionsButton)this._setCaptions(!this._captionsOn());else return;e.preventDefault()}};export{f as MediaView};