@webority/ui-elements 0.198.0 → 0.199.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/{WuiCommentThread-BGoAONw2.js → WuiCommentThread-BXd-Z7z1.js} +1 -1
  2. package/dist/{WuiContextMenu-oKlQvt3V.js → WuiContextMenu-CEJS12YY.js} +1 -1
  3. package/dist/{WuiDatePicker-B77M2_E7.js → WuiDatePicker-BSAqNqdx.js} +1 -1
  4. package/dist/{WuiDateRange-BQ1GH9Mu.js → WuiDateRange-ffla_FMG.js} +1 -1
  5. package/dist/{WuiDrawer-Dj7lXuGm.js → WuiDrawer-RmT2Wp9d.js} +1 -1
  6. package/dist/{WuiDropdown-6g074v1T.js → WuiDropdown-BRofo083.js} +1 -1
  7. package/dist/{WuiGantt-wx8VSXiZ.js → WuiGantt-B70jg1w5.js} +1 -1
  8. package/dist/{WuiHoverCard-DhJcIIM1.js → WuiHoverCard-B_plKt-t.js} +1 -1
  9. package/dist/{WuiLightbox-DFaHN2Fb.js → WuiLightbox-BSEVtv2x.js} +1 -1
  10. package/dist/{WuiMentionInput-Dcm3F-e-.js → WuiMentionInput-kUTy26hu.js} +1 -1
  11. package/dist/WuiModal-LgGTsIpb.js +1 -0
  12. package/dist/{WuiNavigationMenu-BvYLbEmA.js → WuiNavigationMenu-BebcHPiK.js} +1 -1
  13. package/dist/{WuiNotificationCenter-DWFg3H-C.js → WuiNotificationCenter-BSXqhz9M.js} +1 -1
  14. package/dist/{WuiPhone-qw_6W3Q2.js → WuiPhone-D7yYYLYr.js} +1 -1
  15. package/dist/{WuiPopover-BvWKRNQY.js → WuiPopover-y07DZA1J.js} +1 -1
  16. package/dist/{WuiSelect-DqHu2OW_.js → WuiSelect-DALTYOKl.js} +1 -1
  17. package/dist/{WuiShortcuts-CHOfUeFx.js → WuiShortcuts-Z8X5aSTz.js} +1 -1
  18. package/dist/{WuiTimePicker-Bl3GcIS_.js → WuiTimePicker-D0cM0pPe.js} +1 -1
  19. package/dist/WuiTour-b7N5FTLM.js +1 -0
  20. package/dist/{WuiWhatsNew-Dm4Yl68x.js → WuiWhatsNew-naVvdes5.js} +1 -1
  21. package/dist/WuiWizardStep-D1Ea6_9L.js +1 -0
  22. package/dist/{chips-DCkeuEvb.js → chips-BzSOOCI-.js} +1 -1
  23. package/dist/elements/comment-thread.js +1 -1
  24. package/dist/elements/context-menu.js +1 -1
  25. package/dist/elements/date-range.js +1 -1
  26. package/dist/elements/datepicker.js +1 -1
  27. package/dist/elements/drawer.js +1 -1
  28. package/dist/elements/dropdown.js +1 -1
  29. package/dist/elements/filter-popover.js +1 -1
  30. package/dist/elements/gantt.js +1 -1
  31. package/dist/elements/hover-card.js +1 -1
  32. package/dist/elements/lightbox.js +1 -1
  33. package/dist/elements/mention-input.js +1 -1
  34. package/dist/elements/modal.js +1 -1
  35. package/dist/elements/navigation-menu.js +1 -1
  36. package/dist/elements/notification-center.js +1 -1
  37. package/dist/elements/phone.js +1 -1
  38. package/dist/elements/popover.js +1 -1
  39. package/dist/elements/select.js +1 -1
  40. package/dist/elements/shortcuts.js +1 -1
  41. package/dist/elements/timepicker.js +1 -1
  42. package/dist/elements/tour.js +1 -1
  43. package/dist/elements/whats-new.js +1 -1
  44. package/dist/elements/wizard.js +1 -1
  45. package/dist/{filterPopover-DopUJ22D.js → filterPopover-IndnqT7G.js} +1 -1
  46. package/dist/helpers.js +1 -1
  47. package/dist/{nativeOverlay-BHD2QV02.js → nativeOverlay-MOABXAAh.js} +1 -1
  48. package/dist/{search-OPWGeniZ.js → search-Is-q8GR6.js} +1 -1
  49. package/dist/server.js +1 -1
  50. package/dist/ui-chart.global.js +15 -15
  51. package/dist/ui-chart.js +2 -2
  52. package/dist/ui-elements/calendar-views.global.js +1 -1
  53. package/dist/ui-elements/carousel.global.js +1 -1
  54. package/dist/ui-elements/code-block.global.js +1 -1
  55. package/dist/ui-elements/command-palette.global.js +1 -1
  56. package/dist/ui-elements/comment-thread.global.js +1 -1
  57. package/dist/ui-elements/consent-banner.global.js +1 -1
  58. package/dist/ui-elements/context-menu.global.js +1 -1
  59. package/dist/ui-elements/dashboard-grid.global.js +1 -1
  60. package/dist/ui-elements/data-table.global.js +1 -1
  61. package/dist/ui-elements/date-range.global.js +1 -1
  62. package/dist/ui-elements/date-time.global.js +1 -1
  63. package/dist/ui-elements/datepicker.global.js +1 -1
  64. package/dist/ui-elements/dock.global.js +1 -1
  65. package/dist/ui-elements/drawer.global.js +1 -1
  66. package/dist/ui-elements/dropdown.global.js +1 -1
  67. package/dist/ui-elements/entry-grid.global.js +1 -1
  68. package/dist/ui-elements/gantt.global.js +1 -1
  69. package/dist/ui-elements/glyphs-a.global.js +1 -1
  70. package/dist/ui-elements/glyphs-b.global.js +1 -1
  71. package/dist/ui-elements/glyphs-c.global.js +1 -1
  72. package/dist/ui-elements/glyphs-d.global.js +1 -1
  73. package/dist/ui-elements/glyphs-e.global.js +1 -1
  74. package/dist/ui-elements/glyphs-f.global.js +1 -1
  75. package/dist/ui-elements/glyphs-g.global.js +1 -1
  76. package/dist/ui-elements/glyphs-h.global.js +1 -1
  77. package/dist/ui-elements/glyphs-i.global.js +1 -1
  78. package/dist/ui-elements/glyphs-j.global.js +1 -1
  79. package/dist/ui-elements/glyphs-k.global.js +1 -1
  80. package/dist/ui-elements/glyphs-l.global.js +1 -1
  81. package/dist/ui-elements/glyphs-m.global.js +1 -1
  82. package/dist/ui-elements/glyphs-n.global.js +1 -1
  83. package/dist/ui-elements/glyphs-o.global.js +1 -1
  84. package/dist/ui-elements/glyphs-p.global.js +1 -1
  85. package/dist/ui-elements/glyphs-q.global.js +1 -1
  86. package/dist/ui-elements/glyphs-r.global.js +1 -1
  87. package/dist/ui-elements/glyphs-s.global.js +1 -1
  88. package/dist/ui-elements/glyphs-t.global.js +1 -1
  89. package/dist/ui-elements/glyphs-u.global.js +1 -1
  90. package/dist/ui-elements/glyphs-v.global.js +1 -1
  91. package/dist/ui-elements/glyphs-w.global.js +1 -1
  92. package/dist/ui-elements/glyphs-x.global.js +1 -1
  93. package/dist/ui-elements/glyphs-z.global.js +1 -1
  94. package/dist/ui-elements/glyphs.global.js +1 -1
  95. package/dist/ui-elements/hover-card.global.js +1 -1
  96. package/dist/ui-elements/image-crop.global.js +1 -1
  97. package/dist/ui-elements/inline-edit.global.js +1 -1
  98. package/dist/ui-elements/kanban.global.js +1 -1
  99. package/dist/ui-elements/lead-popup.global.js +1 -1
  100. package/dist/ui-elements/lightbox.global.js +1 -1
  101. package/dist/ui-elements/markdown.global.js +1 -1
  102. package/dist/ui-elements/mini-calendar.global.js +1 -1
  103. package/dist/ui-elements/navigation-menu.global.js +1 -1
  104. package/dist/ui-elements/notification-center.global.js +1 -1
  105. package/dist/ui-elements/offline-banner.global.js +1 -1
  106. package/dist/ui-elements/onboarding-checklist.global.js +1 -1
  107. package/dist/ui-elements/org-tree.global.js +1 -1
  108. package/dist/ui-elements/otp.global.js +1 -1
  109. package/dist/ui-elements/overflow.global.js +1 -1
  110. package/dist/ui-elements/phone.global.js +1 -1
  111. package/dist/ui-elements/popover.global.js +1 -1
  112. package/dist/ui-elements/rating.global.js +1 -1
  113. package/dist/ui-elements/record-pager.global.js +1 -1
  114. package/dist/ui-elements/relative-time.global.js +1 -1
  115. package/dist/ui-elements/saved-views.global.js +1 -1
  116. package/dist/ui-elements/select-chips.global.js +1 -1
  117. package/dist/ui-elements/select-recents.global.js +1 -1
  118. package/dist/ui-elements/select-search.global.js +1 -1
  119. package/dist/ui-elements/select-window.global.js +1 -1
  120. package/dist/ui-elements/server.global.js +1 -1
  121. package/dist/ui-elements/shell.global.js +1 -1
  122. package/dist/ui-elements/shortcuts.global.js +1 -1
  123. package/dist/ui-elements/show-more.global.js +1 -1
  124. package/dist/ui-elements/slider.global.js +1 -1
  125. package/dist/ui-elements/sortable.global.js +1 -1
  126. package/dist/ui-elements/status-icon.global.js +1 -1
  127. package/dist/ui-elements/table-export.global.js +1 -1
  128. package/dist/ui-elements/timepicker.global.js +1 -1
  129. package/dist/ui-elements/tour.global.js +1 -1
  130. package/dist/ui-elements/tree-picker.global.js +1 -1
  131. package/dist/ui-elements/tree.global.js +1 -1
  132. package/dist/ui-elements/truncate.global.js +1 -1
  133. package/dist/ui-elements/whats-new.global.js +1 -1
  134. package/dist/ui-elements/wizard.global.js +1 -1
  135. package/dist/ui-elements.global.js +1 -1
  136. package/dist/ui-elements.js +1 -1
  137. package/dist/ui-tour.global.js +1 -1
  138. package/package.json +5 -5
  139. package/types/WuiModal.d.ts +1 -0
  140. package/types/chartSpec.d.ts +6 -1
  141. package/types/nativeOverlay.d.ts +2 -2
  142. package/dist/WuiModal-DQbVJGUo.js +0 -1
  143. package/dist/WuiTour-BS7Jd1Tt.js +0 -1
  144. package/dist/WuiWizardStep-CSS4B8g4.js +0 -1
@@ -1 +1 @@
1
- import{n as e}from"./elementBase-Cxeyx0tU.js";import{n as ee}from"./filterPopover-DopUJ22D.js";import{t}from"./kanban-BkovNHsk.js";import{n}from"./statusIcons-DISKRFbg.js";import{t as r}from"./WuiCalendarViews-Dg9yRY1I.js";import{t as i}from"./WuiCarousel-UTqrn7Nx.js";import{t as te}from"./WuiCodeBlock-BnRpTBm_.js";import{t as a}from"./WuiCommandPalette-BSWDxEPw.js";import{t as o}from"./WuiCommentThread-BGoAONw2.js";import{t as s}from"./WuiConsentBanner-B8D2lE8q.js";import{t as c}from"./WuiContextMenu-oKlQvt3V.js";import{r as l}from"./WuiDashboardGrid-5rXZvTsm.js";import{t as u}from"./WuiDataTable-D_9TWU-r.js";import{t as d}from"./WuiDatePicker-B77M2_E7.js";import{t as f}from"./WuiDateRange-BQ1GH9Mu.js";import{t as p}from"./WuiDateTime-NTZCa0dZ.js";import{t as m}from"./WuiDock-2LGlbEFx.js";import{t as h}from"./WuiDrawer-Dj7lXuGm.js";import{t as g}from"./WuiDropdown-6g074v1T.js";import{t as _}from"./WuiEntryGrid-Z69-1YBh.js";import{t as v}from"./WuiGantt-wx8VSXiZ.js";import{t as y}from"./WuiHoverCard-DhJcIIM1.js";import{t as b}from"./WuiImageCrop-Cl97BHN4.js";import{t as x}from"./WuiInlineEdit-D0a_5oAM.js";import{t as S}from"./WuiLeadPopup-tkt78XlW.js";import{t as C}from"./WuiLightbox-DFaHN2Fb.js";import{t as w}from"./WuiMarkdown-DRtGPxQX.js";import{r as T}from"./WuiMentionInput-Dcm3F-e-.js";import{t as E}from"./WuiMiniCalendar-BhUTIGwe.js";import{t as D}from"./WuiModal-DQbVJGUo.js";import{t as O}from"./WuiNavigationMenu-BvYLbEmA.js";import{t as k}from"./WuiNotificationCenter-DWFg3H-C.js";import{t as A}from"./WuiOfflineBanner-DGTFCtyM.js";import{t as j}from"./WuiOnboardingChecklist-C-nllg2h.js";import{t as M}from"./WuiOrgTree-Be7gK2ls.js";import{t as N}from"./WuiOtp-Cc0formv.js";import{t as P}from"./WuiOverflow-DCNivxjH.js";import{t as F}from"./WuiPhone-qw_6W3Q2.js";import{t as I}from"./WuiPopover-BvWKRNQY.js";import{t as L}from"./WuiRating-DIQfif9x.js";import{t as R}from"./WuiRecordPager-DLO5IWE9.js";import{t as z}from"./WuiRelativeTime-BGeb8bNG.js";import{t as B}from"./WuiSavedViews-NAZArw5y.js";import{t as V}from"./WuiSelect-DqHu2OW_.js";import{t as H}from"./WuiShortcuts-CHOfUeFx.js";import{t as U}from"./WuiShowMore-B73_umah.js";import{t as W}from"./WuiSlider-BjzqYCFt.js";import{t as G}from"./WuiSortable-DjhJiH0o.js";import{t as K}from"./WuiTimePicker-Bl3GcIS_.js";import{t as q}from"./WuiTour-BS7Jd1Tt.js";import{t as J}from"./WuiTree-Qno7SM6z.js";import{t as Y}from"./WuiTreePicker-DWCLntLz.js";import{t as X}from"./WuiTruncate-BB4i8wHE.js";import{n as Z,t as ne}from"./WuiWhatsNew-Dm4Yl68x.js";import{n as Q,t as $}from"./WuiWizardStep-CSS4B8g4.js";import{c as re,f as ie,l as ae,m as oe,p as se,s as ce,u as le}from"./formatters-CXMylefd.js";import{_ as ue,r as de}from"./themeTransition-DowOV08f.js";import{t as fe}from"./drawerDiscard-mFYviRfI.js";import{n as pe}from"./shortcutKeys-CoZBxKsS.js";function me(){ee(),e(`wui-select`,V),e(`wui-saved-views`,B),e(`wui-phone`,F),e(`wui-datepicker`,d),e(`wui-mini-calendar`,E),e(`wui-date-range`,f),e(`wui-date-time`,p),e(`wui-dock`,m),e(`wui-image-crop`,b),e(`wui-kanban`,t),e(`wui-dashboard-grid`,l),e(`wui-lead-popup`,S),e(`wui-inline-edit`,x),e(`wui-consent-banner`,s),e(`wui-slider`,W),e(`wui-sortable`,G),e(`wui-timepicker`,K),e(`wui-tour`,q),e(`wui-tree`,J),e(`wui-tree-picker`,Y),e(`wui-org-tree`,M),e(`wui-command-palette`,a),e(`wui-context-menu`,c),e(`wui-otp`,N),e(`wui-status-icon`,n),e(`wui-shortcuts`,H),e(`wui-record-pager`,R),e(`wui-carousel`,i),e(`wui-code-block`,te),e(`wui-markdown`,w),e(`wui-modal`,D),e(`wui-data-table`,u),e(`wui-drawer`,h),e(`wui-dropdown`,g),e(`wui-entry-grid`,_),e(`wui-gantt`,v),e(`wui-hover-card`,y),e(`wui-lightbox`,C),e(`wui-navigation-menu`,O),e(`wui-notification-center`,k),e(`wui-onboarding-checklist`,j),e(`wui-overflow`,P),e(`wui-popover`,I),e(`wui-rating`,L),e(`wui-relative-time`,z),e(`wui-show-more`,U),e(`wui-calendar-views`,r),e(`wui-truncate`,X),e(`wui-whats-new`,Z),e(`wui-offline-banner`,A),e(`wui-mention-input`,T),e(`wui-comment-thread`,o),e(`wui-wizard-step`,$),e(`wui-wizard`,Q)}me();export{fe as DISCARD_EVENT,ue as ROW_DROP_EVENT,pe as SHORTCUT_EVENT,de as THEME_CHANGE_EVENT,ne as WHATS_NEW_READ_EVENT,r as WuiCalendarViews,i as WuiCarousel,te as WuiCodeBlock,a as WuiCommandPalette,o as WuiCommentThread,s as WuiConsentBanner,c as WuiContextMenu,l as WuiDashboardGrid,u as WuiDataTable,d as WuiDatePicker,f as WuiDateRange,p as WuiDateTime,m as WuiDock,h as WuiDrawer,g as WuiDropdown,_ as WuiEntryGrid,v as WuiGantt,y as WuiHoverCard,b as WuiImageCrop,x as WuiInlineEdit,t as WuiKanban,S as WuiLeadPopup,C as WuiLightbox,w as WuiMarkdown,T as WuiMentionInput,E as WuiMiniCalendar,D as WuiModal,O as WuiNavigationMenu,k as WuiNotificationCenter,A as WuiOfflineBanner,j as WuiOnboardingChecklist,M as WuiOrgTree,N as WuiOtp,P as WuiOverflow,F as WuiPhone,I as WuiPopover,L as WuiRating,R as WuiRecordPager,z as WuiRelativeTime,B as WuiSavedViews,V as WuiSelect,H as WuiShortcuts,U as WuiShowMore,W as WuiSlider,G as WuiSortable,n as WuiStatusIcon,K as WuiTimePicker,q as WuiTour,J as WuiTree,Y as WuiTreePicker,X as WuiTruncate,Z as WuiWhatsNew,Q as WuiWizard,$ as WuiWizardStep,me as defineWeborityElements,ce as formatCompact,re as formatCurrency,ae as formatDate,le as formatDateTime,ie as formatNumber,se as formatPercent,oe as formatValue};
1
+ import{n as e}from"./elementBase-Cxeyx0tU.js";import{n as ee}from"./filterPopover-IndnqT7G.js";import{t}from"./kanban-BkovNHsk.js";import{n}from"./statusIcons-DISKRFbg.js";import{t as r}from"./WuiCalendarViews-Dg9yRY1I.js";import{t as i}from"./WuiCarousel-UTqrn7Nx.js";import{t as te}from"./WuiCodeBlock-BnRpTBm_.js";import{t as a}from"./WuiCommandPalette-BSWDxEPw.js";import{t as o}from"./WuiCommentThread-BXd-Z7z1.js";import{t as s}from"./WuiConsentBanner-B8D2lE8q.js";import{t as c}from"./WuiContextMenu-CEJS12YY.js";import{r as l}from"./WuiDashboardGrid-5rXZvTsm.js";import{t as u}from"./WuiDataTable-D_9TWU-r.js";import{t as d}from"./WuiDatePicker-BSAqNqdx.js";import{t as f}from"./WuiDateRange-ffla_FMG.js";import{t as p}from"./WuiDateTime-NTZCa0dZ.js";import{t as m}from"./WuiDock-2LGlbEFx.js";import{t as h}from"./WuiDrawer-RmT2Wp9d.js";import{t as g}from"./WuiDropdown-BRofo083.js";import{t as _}from"./WuiEntryGrid-Z69-1YBh.js";import{t as v}from"./WuiGantt-B70jg1w5.js";import{t as y}from"./WuiHoverCard-B_plKt-t.js";import{t as b}from"./WuiImageCrop-Cl97BHN4.js";import{t as x}from"./WuiInlineEdit-D0a_5oAM.js";import{t as S}from"./WuiLeadPopup-tkt78XlW.js";import{t as C}from"./WuiLightbox-BSEVtv2x.js";import{t as w}from"./WuiMarkdown-DRtGPxQX.js";import{r as T}from"./WuiMentionInput-kUTy26hu.js";import{t as E}from"./WuiMiniCalendar-BhUTIGwe.js";import{t as D}from"./WuiModal-LgGTsIpb.js";import{t as O}from"./WuiNavigationMenu-BebcHPiK.js";import{t as k}from"./WuiNotificationCenter-BSXqhz9M.js";import{t as A}from"./WuiOfflineBanner-DGTFCtyM.js";import{t as j}from"./WuiOnboardingChecklist-C-nllg2h.js";import{t as M}from"./WuiOrgTree-Be7gK2ls.js";import{t as N}from"./WuiOtp-Cc0formv.js";import{t as P}from"./WuiOverflow-DCNivxjH.js";import{t as F}from"./WuiPhone-D7yYYLYr.js";import{t as I}from"./WuiPopover-y07DZA1J.js";import{t as L}from"./WuiRating-DIQfif9x.js";import{t as R}from"./WuiRecordPager-DLO5IWE9.js";import{t as z}from"./WuiRelativeTime-BGeb8bNG.js";import{t as B}from"./WuiSavedViews-NAZArw5y.js";import{t as V}from"./WuiSelect-DALTYOKl.js";import{t as H}from"./WuiShortcuts-Z8X5aSTz.js";import{t as U}from"./WuiShowMore-B73_umah.js";import{t as W}from"./WuiSlider-BjzqYCFt.js";import{t as G}from"./WuiSortable-DjhJiH0o.js";import{t as K}from"./WuiTimePicker-D0cM0pPe.js";import{t as q}from"./WuiTour-b7N5FTLM.js";import{t as J}from"./WuiTree-Qno7SM6z.js";import{t as Y}from"./WuiTreePicker-DWCLntLz.js";import{t as X}from"./WuiTruncate-BB4i8wHE.js";import{n as Z,t as ne}from"./WuiWhatsNew-naVvdes5.js";import{n as Q,t as $}from"./WuiWizardStep-D1Ea6_9L.js";import{c as re,f as ie,l as ae,m as oe,p as se,s as ce,u as le}from"./formatters-CXMylefd.js";import{_ as ue,r as de}from"./themeTransition-DowOV08f.js";import{t as fe}from"./drawerDiscard-mFYviRfI.js";import{n as pe}from"./shortcutKeys-CoZBxKsS.js";function me(){ee(),e(`wui-select`,V),e(`wui-saved-views`,B),e(`wui-phone`,F),e(`wui-datepicker`,d),e(`wui-mini-calendar`,E),e(`wui-date-range`,f),e(`wui-date-time`,p),e(`wui-dock`,m),e(`wui-image-crop`,b),e(`wui-kanban`,t),e(`wui-dashboard-grid`,l),e(`wui-lead-popup`,S),e(`wui-inline-edit`,x),e(`wui-consent-banner`,s),e(`wui-slider`,W),e(`wui-sortable`,G),e(`wui-timepicker`,K),e(`wui-tour`,q),e(`wui-tree`,J),e(`wui-tree-picker`,Y),e(`wui-org-tree`,M),e(`wui-command-palette`,a),e(`wui-context-menu`,c),e(`wui-otp`,N),e(`wui-status-icon`,n),e(`wui-shortcuts`,H),e(`wui-record-pager`,R),e(`wui-carousel`,i),e(`wui-code-block`,te),e(`wui-markdown`,w),e(`wui-modal`,D),e(`wui-data-table`,u),e(`wui-drawer`,h),e(`wui-dropdown`,g),e(`wui-entry-grid`,_),e(`wui-gantt`,v),e(`wui-hover-card`,y),e(`wui-lightbox`,C),e(`wui-navigation-menu`,O),e(`wui-notification-center`,k),e(`wui-onboarding-checklist`,j),e(`wui-overflow`,P),e(`wui-popover`,I),e(`wui-rating`,L),e(`wui-relative-time`,z),e(`wui-show-more`,U),e(`wui-calendar-views`,r),e(`wui-truncate`,X),e(`wui-whats-new`,Z),e(`wui-offline-banner`,A),e(`wui-mention-input`,T),e(`wui-comment-thread`,o),e(`wui-wizard-step`,$),e(`wui-wizard`,Q)}me();export{fe as DISCARD_EVENT,ue as ROW_DROP_EVENT,pe as SHORTCUT_EVENT,de as THEME_CHANGE_EVENT,ne as WHATS_NEW_READ_EVENT,r as WuiCalendarViews,i as WuiCarousel,te as WuiCodeBlock,a as WuiCommandPalette,o as WuiCommentThread,s as WuiConsentBanner,c as WuiContextMenu,l as WuiDashboardGrid,u as WuiDataTable,d as WuiDatePicker,f as WuiDateRange,p as WuiDateTime,m as WuiDock,h as WuiDrawer,g as WuiDropdown,_ as WuiEntryGrid,v as WuiGantt,y as WuiHoverCard,b as WuiImageCrop,x as WuiInlineEdit,t as WuiKanban,S as WuiLeadPopup,C as WuiLightbox,w as WuiMarkdown,T as WuiMentionInput,E as WuiMiniCalendar,D as WuiModal,O as WuiNavigationMenu,k as WuiNotificationCenter,A as WuiOfflineBanner,j as WuiOnboardingChecklist,M as WuiOrgTree,N as WuiOtp,P as WuiOverflow,F as WuiPhone,I as WuiPopover,L as WuiRating,R as WuiRecordPager,z as WuiRelativeTime,B as WuiSavedViews,V as WuiSelect,H as WuiShortcuts,U as WuiShowMore,W as WuiSlider,G as WuiSortable,n as WuiStatusIcon,K as WuiTimePicker,q as WuiTour,J as WuiTree,Y as WuiTreePicker,X as WuiTruncate,Z as WuiWhatsNew,Q as WuiWizard,$ as WuiWizardStep,me as defineWeborityElements,ce as formatCompact,re as formatCurrency,ae as formatDate,le as formatDateTime,ie as formatNumber,se as formatPercent,oe as formatValue};
@@ -1 +1 @@
1
- var WeborityTour=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(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 n=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(n);var r=HTMLElement;function i(e){return getComputedStyle(e).direction===`rtl`}function a(e,t){return t?e===`ArrowRight`?`ArrowLeft`:e===`ArrowLeft`?`ArrowRight`:e:e}function o(e,t){s(e),e._reanchor=t,e._reanchorScroll=n=>{n.composedPath().includes(e)||t()},window.addEventListener(`resize`,e._reanchor),window.addEventListener(`scroll`,e._reanchorScroll,!0)}function s(e){if(!e?._reanchor)return;window.removeEventListener(`resize`,e._reanchor);let t=e._reanchorScroll;t&&window.removeEventListener(`scroll`,t,!0),e._reanchor=null,e._reanchorScroll=null}var c=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0,l=`AppButton`,u=new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),d={solid:e=>`btn-${e}`,soft:e=>`btn-soft-${e}`,outline:e=>`btn-outline-${e}`,ghost:e=>`btn-ghost-${e}`,link:e=>`btn-link-${e}`,glass:()=>`btn-glass`};function f(e){return c(d,e)}function p(e=`primary`,t=`solid`,n=`md`){if(!u.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!f(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=d[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}function m(e,t,...n){if(e.toLowerCase()===`svg`)throw Error(`make() builds HTML elements; use svgRoot for svg`);let r=document.createElement(e);for(let[e,n]of Object.entries(t??{}))n===!0?r.setAttribute(e,``):(typeof n==`string`||typeof n==`number`)&&r.setAttribute(e,String(n));let i=[];for(let e of n)e instanceof Node?i.push(e):(typeof e==`string`||typeof e==`number`)&&i.push(document.createTextNode(String(e)));return r.append(...i),r}var h=`data-wui-dismiss`,g=`data-wui-closing`,_=`[${h}]`,v=`(prefers-reduced-motion: reduce)`,y=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,b=new WeakSet,x=Symbol.for(`webority.ui.modal-stack`),ee=Symbol.for(`webority.ui.root-watches`);function te(e){let t=e;return t[ee]??=new Set,t[ee]}function ne(e){let t=e.querySelector(`[data-autofocus]`);if(t)return t;let n=null;for(let t of e.querySelectorAll(y))if(!t.closest(`[hidden],[inert]`)){if(!t.closest(`${_},.wui-modal-back`))return t;n??=t}return n}function re(e){let t=[],n=new Map;for(let r of e.querySelectorAll(y))if(!(r.closest(`[hidden],[inert]`)||r.closest(`dialog`)!==e)&&!(r.tabIndex<0||r.getClientRects().length===0)){if(r instanceof HTMLInputElement&&r.type===`radio`&&r.name){let e=n.get(r.name);e?r.checked&&!e.checked&&(e.checked=r,t[t.indexOf(e.first)]=r):(n.set(r.name,{first:r,checked:r.checked?r:null}),t.push(r))}else t.push(r)}return t}function S(e){let t=e;return t[x]??=[],t[x]}function ie(e){C(e),S(e.ownerDocument).push(e)}function C(e){let t=S(e.ownerDocument),n=t.indexOf(e);n>=0&&t.splice(n,1)}function w(e){for(let t of te(e)){let n=T(e);t.last!==n&&(t.last=n,t.listener(n))}}function ae(e){let t=Promise.allSettled(e.getAnimations().map(e=>e.finished));return new Promise(e=>{let n=window.setTimeout(e,400);t.then(()=>{window.clearTimeout(n),e()})})}function oe(e,t){let n=t.focus===`first-control`?ne(e):null,r=n??e,i=r===e&&!e.hasAttribute(`tabindex`);i&&e.setAttribute(`tabindex`,`-1`);let a=!t.escape&&!e.hasAttribute(`closedby`);a&&e.setAttribute(`closedby`,`none`),b.add(e);let o=()=>{if(ie(e),!e.hasAttribute(`open`)){let t=n!==null&&!e.querySelector(`[autofocus]`);t&&n.setAttribute(`autofocus`,``);try{e.showModal()}catch(t){throw C(e),t}finally{t&&n.removeAttribute(`autofocus`)}}r.focus(),w(e.ownerDocument)},s=!1,c=n=>{if(n.key!==`Escape`||n.defaultPrevented||!t.escape||n.altKey||n.ctrlKey||n.metaKey)return;let r=e.ownerDocument;T(r)===e&&(e.querySelector(`:popover-open`)||r.querySelector(`[popover=""]:popover-open, [popover="auto"]:popover-open`)||(s=!0,window.setTimeout(()=>{s&&b.has(e)&&e.open&&(s=!1,t.onRequestClose(`escape`))},0)))},l=t=>{if(t.key!==`Tab`||t.defaultPrevented||t.altKey||t.ctrlKey||t.metaKey)return;let n=e.ownerDocument;if(T(n)!==e||e.querySelector(`:popover-open`))return;t.preventDefault();let r=re(e),i=r[0],a=r[r.length-1];if(!i||!a){e.focus();return}let o=n.activeElement,s=o?r.findIndex(e=>e===o||e.contains(o)):-1;s<0?(t.shiftKey?a:i).focus():r[((t.shiftKey?s-1:s+1)+r.length)%r.length]?.focus()},u=e=>{s=!1,e.preventDefault(),t.escape&&t.onRequestClose(`escape`)},d=n=>{let r=n.target;if(!(r instanceof Element))return;let i=r.closest(_);if(i&&i.closest(`dialog`)===e){t.onRequestClose(`dismiss`);return}if(r!==e||!t.backdrop)return;let a=e.getBoundingClientRect();(n.clientX<a.left||n.clientX>a.right||n.clientY<a.top||n.clientY>a.bottom)&&t.onRequestClose(`backdrop`)},f=()=>{let n=s;s=!1,C(e),b.has(e)?(o(),n&&t.onRequestClose(`escape`)):w(e.ownerDocument)},p=e.ownerDocument;return p.addEventListener(`keydown`,c),p.addEventListener(`keydown`,l),e.addEventListener(`cancel`,u),e.addEventListener(`click`,d),e.addEventListener(`close`,f),o(),()=>{p.removeEventListener(`keydown`,c),p.removeEventListener(`keydown`,l),e.removeEventListener(`cancel`,u),e.removeEventListener(`click`,d),e.removeEventListener(`close`,f),b.delete(e),i&&e.removeAttribute(`tabindex`),a&&e.removeAttribute(`closedby`),C(e),w(e.ownerDocument)}}async function se(e){b.delete(e),e.setAttribute(g,``),!window.matchMedia(v).matches&&typeof e.getAnimations==`function`&&e.getAnimations().length>0&&await ae(e),e.close(),C(e),w(e.ownerDocument),e.removeAttribute(g)}function ce(e){if(le(e),!e.isConnected)throw Error(`nativeOverlay: raisePopover was given a panel that is not on the page; a caller whose overlay root can leave the page skips the raise until the panel moves to the new root`);e.hidePopover(),e.showPopover()}function le(e){if(!e.hasAttribute(`popover`))throw Error(`nativeOverlay: the panel has no popover attribute`)}function T(e=document){let t=S(e);for(let e=t.length-1;e>=0;e--){let n=t[e];if(n?.isConnected&&n.hasAttribute(`open`))return n}return e.body}var ue=/\{([A-Za-z0-9_]+)\}/g,de=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0,fe=new Map,pe=0,me=new Map;function E(e,t){let n=fe.get(e);if(n===void 0)return t;let r=me.get(e);if(r!==void 0&&r.version===pe&&r.english===t&&ge(r.merged,t))return r.merged;let i=he(e,n,t);return me.set(e,{version:pe,english:t,merged:i}),i}function he(e,t,n){let r={};for(let[i,a]of Object.entries(t)){let t=de(n,i)?n[i]:void 0;if(t===void 0)throw RangeError(`Text ${e}.${i} is not a key of the English text. Allowed keys: ${Object.keys(n).join(`, `)}.`);let o=D(t);for(let t of D(a))if(!o.includes(t))throw RangeError(`Text ${e}.${i} uses {${t}}, which the English text does not have. Allowed placeholders: ${o.length===0?`none`:o.map(e=>`{${e}}`).join(`, `)}.`);r[i]=a}return Object.assign({},n,r)}function ge(e,t){let n=Object.keys(t);return Object.keys(e).length===n.length&&n.every(t=>de(e,t))}function D(e){return Array.from(e.matchAll(ue),e=>e[1]??``)}var O={backLabel:`Back`,doneLabel:`Done`,endMessage:`You know your way around now. Enjoy exploring.`,endTitle:`You're all set`,mediaPauseLabel:`Pause animation`,mediaPlayLabel:`Play animation`,nextLabel:`Next`,progressLabel:`Step {current} of {total}`,skipLabel:`Skip`},_e={advanceLabel:`Click {actionName} to continue.`},k=`data-advance`,A=`wui-tour-hint`,j=`wui-tour-pointer`,ve=`a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]`,ye=()=>E(`tourAdvance`,_e),M=(e,t)=>e?.advanceOn===`click`&&!!t,N=e=>(e??``).replace(/\s+/g,` `).trim(),be=e=>e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLMeterElement||e instanceof HTMLOutputElement||e instanceof HTMLProgressElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.labels:null,xe=e=>e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLFieldSetElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement?e.disabled:!1;function Se(e){let t=e.ownerDocument,n=(e.getAttribute(`aria-labelledby`)||``).split(/\s+/).filter(Boolean),r=e instanceof HTMLInputElement&&/^(button|submit|reset)$/.test(e.type)?e.value:``,i=[n.map(e=>t.getElementById(e)?.textContent??``).join(` `),e.getAttribute(`aria-label`),Array.from(be(e)??[],e=>e.textContent).join(` `),e.getAttribute(`alt`),r,e.textContent,e.getAttribute(`title`)];for(let e of i){let t=N(e);if(t)return t}return``}function Ce(e){for(let t of[e,...e.querySelectorAll(ve)])if((t instanceof HTMLElement||t instanceof SVGElement)&&t.tabIndex>=0&&!xe(t))return t;return null}function P(e,t,n){let r=(e.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(e=>e&&e!==t);n&&r.push(t),r.length>0?e.setAttribute(`aria-describedby`,r.join(` `)):e.removeAttribute(`aria-describedby`)}function we(e,t){let n=e.querySelector(`.${A}`),r=e.querySelector(`.wui-tour-text`)?.id,i=r?`${r.replace(/-text$/,``)}-hint`:``;if(!t)n?.remove(),i&&P(e,i,!1);else{if(!n){n=e.ownerDocument.createElement(`p`),n.className=A,i&&(n.id=i);let t=e.querySelector(`.wui-tour-actions`);if(!t)throw Error(`Tour card has no actions row.`);t.before(n)}n.textContent=t,i&&P(e,i,!0)}}function Te(e,t){let n=e.querySelector(`.${j}`);if(!t){n?.remove();return}if(n)return;let r=e.ownerDocument.createElement(`span`);r.className=j,r.setAttribute(`aria-hidden`,`true`),e.append(r)}var Ee=e=>getComputedStyle(e).animationName;function F(e,{layer:t,spot:n,card:r},i,a){let o=M(i,a);t.toggleAttribute(k,o&&!(t.getRootNode()instanceof ShadowRoot)),n.hasAttribute(k)&&(n.removeAttribute(k),o&&Ee(n)),o&&n.setAttribute(k,``),Te(n,o);let s=r.querySelector(`.wui-tour-next`);if(!(s instanceof HTMLElement))throw Error(`Tour card has no next button.`);s.classList.toggle(`btn-primary`,!o),s.classList.toggle(`btn-link`,o);let c=o?N(i?.actionLabel)||Se(a):``,l=e.getAttribute(`advance-label`)||ye().advanceLabel,u=c?l.replace(/\{actionName\}/g,()=>c):``;return we(r,u),u}function De(e,t,n){if(!M(e,t))return()=>{};let r,i=()=>{r??=setTimeout(n,0)};return t.addEventListener(`click`,i),()=>{t.removeEventListener(`click`,i),clearTimeout(r)}}function Oe(e,t,n,r){return e.contains(r)||M(t,n)&&n.contains(r)}function ke(e,{card:t,active:n,step:r,target:i}){let a=Array.from(t.querySelectorAll(`button`)).filter(e=>!e.hidden),o=M(r,i)?Ce(i):null;o&&a.push(o);let s=a.findIndex(e=>e===n||e===o&&i?.contains(n));e.preventDefault();let c=a[s===-1?e.shiftKey?a.length-1:0:(s+(e.shiftKey?-1:1)+a.length)%a.length];if(!c)throw Error(`Tour card has no focus stop.`);c.focus()}function Ae(e){return e.isComposing||e.keyCode===229}function je(e){return e.key===`Enter`&&!Ae(e)}var I=`http://www.w3.org/2000/svg`;function L(e){return e.map(Ne)}function Me(e,t){let n=document.createElementNS(I,`svg`);return R(n,e),n.append(...L(t)),n}function Ne(e){let[t,n,r]=e,i=document.createElementNS(I,t);return R(i,n),typeof r==`string`?i.append(document.createTextNode(r)):r&&i.append(...L(r)),i}function R(e,t){for(let[n,r]of Object.entries(t))r===!0?e.setAttribute(n,``):(typeof r==`string`||typeof r==`number`)&&e.setAttribute(n,String(r))}var Pe=2/3,Fe=1e3,Ie=new Set([`top`,`left`,`width`,`height`]),z=new WeakMap,B=(e,t)=>typeof e.getAnimations==`function`?e.getAnimations().filter(t):[],Le=e=>`transitionProperty`in e&&e.transitionProperty===`opacity`,Re=e=>`transitionProperty`in e&&typeof e.transitionProperty==`string`&&Ie.has(e.transitionProperty),ze=e=>`animationName`in e&&typeof e.animationName==`string`&&e.animationName.startsWith(`wui-tour-`);function Be(e){return e.length===0?null:new Promise(t=>{let n=setTimeout(t,Fe);Promise.allSettled(e.map(e=>e.finished)).then(()=>{clearTimeout(n),t()})})}function Ve(e){let t=e.parentElement?.querySelector(`:scope > .wui-tour-spot`),n=0;for(let e of t?B(t,Re):[]){let t=e.effect?.getComputedTiming?.();if(typeof t?.duration!=`number`)continue;let r=typeof e.currentTime==`number`?e.currentTime:0;n=Math.max(n,(t.delay??0)+t.duration*Pe-r)}return n}function He(e){let t=Ve(e);t>0?e.style.setProperty(`--wui-tour-card-delay`,`${Math.round(t)}ms`):e.style.removeProperty(`--wui-tour-card-delay`),e.dataset.state=`entering`;let n={};z.set(e,n);let r=()=>{z.get(e)===n&&e.dataset.state===`entering`&&(e.dataset.state=`shown`)},i=B(e,ze);i.length===0?r():Promise.allSettled(i.map(e=>e.finished)).then(r)}function Ue(e){return e.dataset.state=`leaving`,Be(B(e,Le))}function We(e){let t=e.shadowRoot?.querySelector(`.wui-tour-layer`),n=e.classList.contains(`wui-tour-layer`)?e:t instanceof HTMLElement?t:null;n&&(n.dataset.state=`leaving`);let r=n?Be(B(n,Le)):null;r?(e.setAttribute(`inert`,``),r.then(()=>e.remove())):e.remove()}var Ge=2,V=12,H=8,Ke=4,U=20,qe=`(max-width: 575.98px)`,Je=[`bottom`,`top`,`right`,`left`],Ye=[`bottom`,`top`,`left`,`right`],Xe=[`top-left`,`top-right`,`bottom-right`,`bottom-left`],Ze,W=(e,t,n)=>Math.max(t,Math.min(e,n)),G=(e,t,n,r)=>(Math.max(e,n)+Math.min(t,r))/2;function Qe(e,t){if(!t?.scrollIntoView)return;e.style.maxHeight=``;let n=it(e),r=e.offsetHeight+V;if(t.getBoundingClientRect().height+4+r*2<=n.bottom-n.top){t.scrollIntoView({block:`center`,inline:`nearest`});return}let i=t.style.scrollMarginTop;t.style.scrollMarginTop=`${n.top+r+Ge}px`,t.scrollIntoView({block:`start`,inline:`nearest`}),t.style.scrollMarginTop=i}function $e(e,t,n){let r=e.style,a=t.style,o=at(t);if(!n){r.top=`50%`,r.left=`50%`,r.width=`0px`,r.height=`0px`,r.boxShadow=`0 0 0 100vmax var(--color-scrim-strong)`;for(let e of Xe)r.removeProperty(`border-${e}-radius`),r.removeProperty(`corner-${e}-shape`);t.dataset.placement=`center`,o.hidden=!0,a.position=`fixed`,a.top=`50%`,a.left=`50%`,a.transform=`translate(-50%, -50%)`,a.maxHeight=`calc(100vh - 16px)`;return}r.boxShadow=``,a.transform=``,a.position=`fixed`;let s=n.getBoundingClientRect();r.top=`${s.top}px`,r.left=`${s.left}px`,r.width=`${s.width}px`,r.height=`${s.height}px`,et(r,n);let c=t.scrollTop;a.maxHeight=``;let l={width:t.offsetWidth,height:t.offsetHeight},u=it(t),d=u.bottom-u.top,f={bottom:u.bottom-s.bottom-V,top:s.top-V-u.top,right:u.right-s.right-V,left:s.left-V-u.left},p=window.matchMedia(qe).matches,m=(i(n)?Ye:Je).find(e=>e===`top`||e===`bottom`?l.height<=f[e]+1:!p&&l.width<=f[e]+1&&l.height<=d+1),h=Math.min(s.bottom,u.bottom+H)-Math.max(s.top,u.top-H);m?tt(t,o,m,s,u,l):h>=Math.min(l.height,d)+8?nt(t,o,s,u,l):rt(t,o,f.bottom>=f.top?`bottom`:`top`,s,u,l,f),t.scrollTop=c}function et(e,t){Ze??=CSS.supports(`corner-top-left-shape`,`squircle`);let n=getComputedStyle(t);for(let t of Xe)e.setProperty(`border-${t}-radius`,n.getPropertyValue(`border-${t}-radius`)),Ze&&e.setProperty(`corner-${t}-shape`,n.getPropertyValue(`corner-${t}-shape`))}function tt(e,t,n,r,i,a){let o=n===`top`||n===`bottom`,s,c,l;if(o){let e=G(r.left,r.right,i.left,i.right);s=W(e-a.width/2,i.left,i.right-a.width),c=n===`bottom`?r.bottom+V:r.top-V-a.height,l=W(e-s,U,a.width-U)}else{let e=G(r.top,r.bottom,i.top,i.bottom);c=W(e-a.height/2,i.top,i.bottom-a.height),s=n===`right`?r.right+V:r.left-V-a.width,l=W(e-c,U,a.height-U)}e.dataset.placement=n,e.style.top=`${c}px`,e.style.left=`${s}px`,t.hidden=!1,t.style.left=o?`${l-e.clientLeft-t.offsetWidth/2}px`:``,t.style.top=o?``:`${l-e.clientTop-t.offsetHeight/2}px`}function nt(e,t,n,r,i){let a=r.bottom-r.top;e.dataset.placement=`overlap`,t.hidden=!0,e.style.maxHeight=i.height>a?`${Math.max(a,0)}px`:``;let o=Math.min(n.bottom,r.bottom)-Ke;e.style.top=`${Math.max(r.top,o-Math.min(i.height,a))}px`,e.style.left=`${W(n.left+Ke,r.left,r.right-i.width)}px`}function rt(e,t,n,r,i,a,o){let s=Math.max(o[n],0),c=Math.min(a.height,s);e.dataset.placement=n,t.hidden=!0,e.style.maxHeight=a.height>s?`${s}px`:``,e.style.top=`${n===`bottom`?r.bottom+V:r.top-V-c}px`;let l=G(r.left,r.right,i.left,i.right);e.style.left=`${W(l-a.width/2,i.left,i.right-a.width)}px`}function it(e){let t=e.parentElement,n=t?getComputedStyle(t):null,r=e=>Number.parseFloat(n?.[e]??``)||0;return{top:r(`paddingTop`)+H,bottom:window.innerHeight-r(`paddingBottom`)-H,left:r(`paddingLeft`)+H,right:window.innerWidth-r(`paddingRight`)-H}}function at(e){let t=e.querySelector(`:scope > .wui-tour-arrow`);if(t instanceof HTMLElement)return t;let n=document.createElement(`span`);return n.className=`wui-tour-arrow`,n.setAttribute(`aria-hidden`,`true`),n.hidden=!0,e.append(n),n}var ot=0,st=`btn btn-sm btn-link`;function K(e,t,n){let r=e.querySelector(t);if(!(r instanceof n))throw Error(`Expected "${t}" to match a ${n.name}.`);return r}function ct(e,t){let n=`wui-tour-end-${++ot}`,{nextLabel:r,nextHref:i}=e,a=r&&i?m(`a`,{class:`${p(`primary`,`solid`,`sm`)} wui-tour-end-next`,"data-wui":l,href:i},r):null,o=a!==null,s=m(`button`,{type:`button`,class:`${o?st:p(`primary`,`solid`,`sm`)} wui-tour-end-button`,"data-wui":l},e.button);return m(t?`dialog`:`div`,{class:`wui-tour-card wui-tour-end`,"data-layout":`center`,"data-next":o||void 0,role:`dialog`,tabindex:-1,"aria-labelledby":`${n}-title`,"aria-describedby":`${n}-message`},m(`div`,{class:`wui-tour-end-mark`,"aria-hidden":`true`},Me({viewBox:`0 0 24 24`,focusable:`false`},[[`path`,{d:`M5 12.5l4.5 4.5L19 7.5`}]])),m(`h2`,{class:`wui-tour-title wui-tour-end-title`,id:`${n}-title`},e.title),m(`p`,{class:`wui-tour-text wui-tour-end-message`,id:`${n}-message`},e.message),m(`div`,{class:`wui-tour-actions`},a,s))}var lt=e=>e.button===0&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey;function ut(e,t,n){let r=e.ownerDocument,i=ct(t,e.getRootNode()===r),a=K(i,`.wui-tour-end-button`,HTMLButtonElement),o=i.querySelector(`.wui-tour-end-next`);if(o!==null&&!(o instanceof HTMLAnchorElement))throw Error(`The end dialog's next link is not a link.`);let s=o,c=s??a,l=new AbortController,u=i instanceof HTMLDialogElement?i:null,d=null;return new Promise(o=>{let f=e=>{if(l.abort(),d&&u){let e=d;d=null,se(u).then(e)}o(e)};if(n?.aborted){f(`done`);return}let p=K(e,`.wui-tour-card:not(.wui-tour-end)`,HTMLElement),m=K(e,`.wui-tour-spot`,HTMLElement),h=K(e,`[role=status]`,HTMLElement),g={signal:l.signal};n?.addEventListener(`abort`,()=>f(`done`),g),a.addEventListener(`click`,()=>f(`done`),g),s&&s.addEventListener(`click`,e=>{lt(e)&&(e.preventDefault(),f(`next`))},g),r.addEventListener(`keydown`,e=>{if(!(e.altKey||e.ctrlKey||e.metaKey)){if(e.key===`Escape`){if(d)return;e.preventDefault(),e.stopPropagation(),f(`done`)}else je(e)&&s&&!e.shiftKey&&(e.composedPath?.()[0]??e.target)===s&&(e.preventDefault(),f(`next`))}},{capture:!0,signal:l.signal});let _=()=>{l.signal.aborted||(p.hidden=!0,$e(m,p,null),e.append(i),He(i),u&&(d=oe(u,{escape:!0,backdrop:!1,focus:`first-control`,onRequestClose:()=>f(`done`)})),h.textContent=[t.title,t.message].filter(Boolean).join(`. `),c.focus())},v=Ue(p);v===null?_():v.then(_)})}var dt=` :host { all: initial; display: revert-layer; position: fixed; inset: 0; ${Object.entries({"--wui-z-tour":`1550`,"--wui-radius-sm":`8px`,"--wui-radius-2xl":`18px`,"--wui-shadow-popover":`0px 8px 28px -6px rgba(7, 20, 55, 0.14)`,"--wui-ease-out":`cubic-bezier(0.22, 1, 0.36, 1)`,"--wui-ease-linear":`cubic-bezier(0, 0, 1, 1)`,"--wui-duration-fast":`150ms`,"--wui-duration-default":`250ms`,"--wui-duration-slow":`400ms`,"--wui-space-xs":`4px`,"--wui-tour-motion-duration":`200ms`,"--wui-tour-motion-ease":`cubic-bezier(0.22, 1, 0.36, 1)`,"--wui-tour-spot-duration":`240ms`,"--wui-tour-spot-ease":`cubic-bezier(0.32, 0.72, 0, 1)`,"--color-primary":`#4F46E5`,"--color-primary-hover":`#4338CA`,"--color-primary-text":`#4F46E5`,"--color-focus-ring":`#4F46E5`,"--wui-focus-ring-width":`2px`,"--wui-focus-ring-offset":`2px`,"--color-on-primary":`#FFFFFF`,"--color-success-soft":`#E8FAEE`,"--color-success-text":`#0e7531`,"--color-on-scrim":`#FFFFFF`,"--color-scrim-strong":`color-mix(in srgb, #071437 62%, transparent)`,"--color-surface":`#FFFFFF`,"--color-text":`#071437`,"--color-text-muted":`#4B5675`,"--color-border":`#EBEDF3`,"--color-bg-muted":`#F5F6FA`}).map(([e,t])=>` ${e}: ${t};`).join(` `)} } *, *::before, *::after { box-sizing: border-box; } [hidden] { display: none !important; } .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; } .btn { display: inline-block; margin: 0; padding: 0.25rem 0.5rem; border: 1px solid transparent; border-radius: 0.375rem; background: transparent; font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1.5; text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer; } .btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; } .btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-on-primary); } .btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); } .btn-outline-neutral { border-color: var(--color-text-muted); color: var(--color-text-muted); } .btn-outline-neutral:hover { background: var(--color-bg-muted); color: var(--color-text); } .btn-link { font-weight: 400; color: var(--color-primary-text); text-decoration: underline; } .btn-link:hover { color: var(--color-primary-hover); } .wui-tour-layer { pointer-events: none; font-family: "Webority Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 1.5; color: var(--color-text); text-align: start; } .wui-tour-card { pointer-events: auto; } .wui-tour-layer { position: fixed; inset: 0; z-index: var(--wui-z-tour); width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: visible; background: none; } .wui-tour-spot { position: fixed; box-shadow: 0 0 0 2px var(--color-primary), 0 0 4px 2px color-mix(in srgb, var(--color-primary) 30%, transparent), 0 0 0 100vmax var(--color-scrim-strong); pointer-events: none; } .wui-tour-card { display: flex; flex-direction: column; gap: 8px; width: min(360px, 100vw - 16px); padding: 16px; overflow-y: auto; background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); border-radius: var(--wui-radius-2xl); corner-shape: squircle; box-shadow: var(--wui-shadow-popover); } .wui-tour-card:focus { outline: none; } .wui-tour-card:focus-visible { outline: var(--wui-focus-ring-width) solid var(--color-focus-ring); outline-offset: var(--wui-focus-ring-offset); } .wui-tour-title { margin: 0; font-size: 16px; font-weight: 600; } .wui-tour-text { margin: 0; font-size: 14px; color: var(--color-text-muted); } .wui-tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; } .wui-tour-nav { display: flex; gap: 8px; } .wui-tour-skip { color: var(--color-text-muted); } .wui-tour-back, .wui-tour-next { min-width: 64px; } @keyframes wui-tour-fade-in { from { opacity: 0; } to { opacity: 1; } } @keyframes wui-tour-card-enter { from { opacity: 0; scale: 0.96; translate: var(--wui-tour-card-lift, 0 6px); } to { opacity: 1; scale: 1; translate: 0 0; } } .wui-tour-layer[data-state=leaving], .wui-tour-card[data-state=leaving] { opacity: 0; } .wui-tour-layer[data-state=leaving], .wui-tour-layer[data-state=leaving] * { pointer-events: none; } @media (prefers-reduced-motion: no-preference) { .wui-tour-layer { animation: wui-tour-fade-in var(--wui-tour-motion-duration) var(--wui-tour-motion-ease); } .wui-tour-layer[data-state=leaving] { transition: opacity var(--wui-tour-motion-duration) var(--wui-tour-motion-ease); } .wui-tour-spot { transition: top var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), left var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), width var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), height var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), border-radius var(--wui-tour-spot-duration) var(--wui-tour-spot-ease); } .wui-tour-spot[data-tracking] { transition: none; } .wui-tour-card { --wui-tour-card-lift: 0 6px; transform-origin: top center; } .wui-tour-card[data-placement=top] { --wui-tour-card-lift: 0 -6px; transform-origin: bottom center; } .wui-tour-card[data-placement=bottom] { --wui-tour-card-lift: 0 6px; transform-origin: top center; } .wui-tour-card[data-placement=left] { --wui-tour-card-lift: -6px 0; transform-origin: right center; } .wui-tour-card[data-placement=right] { --wui-tour-card-lift: 6px 0; transform-origin: left center; } .wui-tour-card[data-placement=overlap], .wui-tour-card[data-placement=center] { --wui-tour-card-lift: 0 0; transform-origin: center; } .wui-tour-card[data-state=entering] { animation: wui-tour-card-enter var(--wui-tour-motion-duration) var(--wui-tour-motion-ease) var(--wui-tour-card-delay, 0ms) both; } .wui-tour-card[data-state=leaving] { transition: opacity calc(var(--wui-tour-motion-duration) / 2) var(--wui-tour-motion-ease); } } @media (prefers-reduced-motion: reduce) { .wui-tour-layer { animation: wui-tour-fade-in var(--wui-duration-fast) var(--wui-ease-linear); } .wui-tour-layer[data-state=leaving] { transition: opacity var(--wui-duration-fast) var(--wui-ease-linear); } .wui-tour-card[data-state=entering] { animation: wui-tour-fade-in var(--wui-duration-fast) var(--wui-ease-linear) both; } } .wui-tour-progress-bar { display: flex; gap: 4px; } .wui-tour-progress-segment { flex: 1 1 0; height: 4px; border-radius: 999px; background: var(--color-border); } .wui-tour-progress-segment[data-filled] { background: var(--color-primary); } .wui-tour-position { margin: 0; font-size: 12px; color: var(--color-text-muted); } .wui-tour-layer { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); } .wui-tour-card:has(.wui-tour-arrow:not([hidden])) { overflow: visible; } .wui-tour-arrow { position: absolute; width: 8px; height: 8px; background: var(--color-surface); border: 1px solid var(--color-border); rotate: 45deg; pointer-events: none; } .wui-tour-card[data-placement=bottom] .wui-tour-arrow { top: -5px; border-right-color: rgba(0, 0, 0, 0); border-bottom-color: rgba(0, 0, 0, 0); } .wui-tour-card[data-placement=top] .wui-tour-arrow { bottom: -5px; border-top-color: rgba(0, 0, 0, 0); border-left-color: rgba(0, 0, 0, 0); } .wui-tour-card[data-placement=right] .wui-tour-arrow { left: -5px; border-top-color: rgba(0, 0, 0, 0); border-right-color: rgba(0, 0, 0, 0); } .wui-tour-card[data-placement=left] .wui-tour-arrow { right: -5px; border-bottom-color: rgba(0, 0, 0, 0); border-left-color: rgba(0, 0, 0, 0); } @media (max-width: 575.98px) { .wui-tour-card { width: calc(100vw - 16px); } .wui-tour-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; } } .wui-tour-media { position: relative; order: -1; flex: none; aspect-ratio: 16/9; margin: -16px -16px 4px; overflow: hidden; background: var(--color-border); } .wui-tour-media>img, .wui-tour-media>video { display: block; width: 100%; height: 100%; object-fit: cover; } .wui-tour-card[data-welcome] { width: min(420px, 100vw - 16px); } .wui-tour-media-toggle { position: absolute; inset-block-end: 8px; inset-inline-end: 8px; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--color-scrim-strong); color: var(--color-on-scrim); cursor: pointer; } .wui-tour-media-toggle>svg { width: 20px; height: 20px; fill: currentColor; } .wui-tour-media-toggle:focus-visible { outline: 2px solid var(--color-on-scrim); outline-offset: var(--wui-focus-ring-offset); } .wui-tour-layer[data-advance] { pointer-events: none; } .wui-tour-layer[data-advance]:not([data-state=leaving]) .wui-tour-card { pointer-events: auto; } .wui-tour-layer[data-advance]:not([data-state=leaving]) .wui-tour-spot::before { content: ""; position: absolute; inset: -100vmax; pointer-events: auto; clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 100vmax 100vmax, calc(100% - 100vmax) 100vmax, calc(100% - 100vmax) calc(100% - 100vmax), 100vmax calc(100% - 100vmax), 100vmax 100vmax); } .wui-tour-hint { margin: 0; font-size: 14px; font-weight: 600; color: var(--color-text); } .wui-tour-pointer { position: absolute; top: 50%; left: 50%; width: 18px; height: 24px; pointer-events: none; } .wui-tour-pointer::before { content: ""; position: absolute; inset: 0; background: var(--color-primary); clip-path: polygon(0 0, 0 75%, 28% 58%, 46% 100%, 62% 92%, 45% 52%, 85% 52%); filter: drop-shadow(1px 0 0 var(--color-surface)) drop-shadow(-1px 0 0 var(--color-surface)) drop-shadow(0 1px 0 var(--color-surface)) drop-shadow(0 -1px 0 var(--color-surface)); } .wui-tour-pointer::after { content: ""; position: absolute; top: -16px; left: -16px; width: 32px; height: 32px; border-radius: 50%; background: var(--color-primary); opacity: 0; display: none; } @media (max-width: 575.98px) { .wui-tour-pointer { width: 24px; height: 24px; translate: -50% -50%; } .wui-tour-pointer::before { clip-path: none; border-radius: 50%; box-shadow: 0 0 0 2px var(--color-surface); filter: none; } .wui-tour-pointer::after { top: -4px; left: -4px; } } @keyframes wui-tour-tap { 0% { opacity: 0; transform: translate(56px, 44px) scale(1); } 10% { opacity: 1; transform: translate(56px, 44px) scale(1); } 45% { transform: translate(0, 0) scale(1); } 52% { transform: translate(0, 0) scale(0.86); } 60% { transform: translate(0, 0) scale(1); } 85% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(0, 0) scale(1); } } @keyframes wui-tour-tap-rtl { 0% { opacity: 0; transform: translate(-56px, 44px) scale(1); } 10% { opacity: 1; transform: translate(-56px, 44px) scale(1); } 45% { transform: translate(0, 0) scale(1); } 52% { transform: translate(0, 0) scale(0.86); } 60% { transform: translate(0, 0) scale(1); } 85% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(0, 0) scale(1); } } @keyframes wui-tour-ripple { 0%, 50% { opacity: 0; transform: scale(0.2); } 52% { opacity: 0.35; transform: scale(0.2); } 80%, 100% { opacity: 0; transform: scale(1); } } @media (prefers-reduced-motion: no-preference) { .wui-tour-pointer { opacity: 0; animation: wui-tour-tap calc(var(--wui-duration-slow) * 6) var(--wui-ease-out) var(--wui-tour-spot-duration) infinite; } .wui-tour-pointer:dir(rtl) { animation-name: wui-tour-tap-rtl; } .wui-tour-pointer::after { display: block; animation: wui-tour-ripple calc(var(--wui-duration-slow) * 6) var(--wui-ease-out) var(--wui-tour-spot-duration) infinite; } } @keyframes wui-tour-check { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } } .wui-tour-end[data-layout=center] { --wui-tour-card-lift: 0 0; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); transform-origin: center; align-items: center; gap: 8px; width: min(420px, 100vw - 16px); max-height: calc(100vh - 16px); padding: 24px; text-align: center; } .wui-tour-end[data-layout=center] .wui-tour-actions { justify-content: center; margin-top: 8px; } .wui-tour-end[data-layout=center][data-next] .wui-tour-actions { flex-direction: column; align-items: stretch; width: 100%; gap: var(--wui-space-xs); } .wui-tour-end-mark { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--color-success-soft); color: var(--color-success-text); } .wui-tour-end-mark>svg { width: 26px; height: 26px; } .wui-tour-end-mark path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; } .wui-tour-end-title { font-size: 18px; } .wui-tour-end-message { text-wrap: balance; } .wui-tour-end-next { text-wrap: balance; } .wui-tour-end-button { min-width: 120px; } @media (prefers-reduced-motion: no-preference) { .wui-tour-end-mark path { animation: wui-tour-check var(--wui-duration-default) var(--wui-ease-out) calc(var(--wui-tour-card-delay, 0ms) + var(--wui-duration-fast)) both; } } `,ft=()=>E(`tour`,O),pt=`wui-tour-media`,mt=`wui-tour-media-toggle`,ht=`http://www.w3.org/2000/svg`,gt=`M6 5h4v14H6zM14 5h4v14h-4z`,_t=`M8 5v14l11-7z`,vt=()=>({pause:ft().mediaPauseLabel,play:ft().mediaPlayLabel}),yt=()=>globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches===!0;function bt(e){let t=document.createElementNS(ht,`svg`);t.setAttribute(`viewBox`,`0 0 24 24`),t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`focusable`,`false`);let n=document.createElementNS(ht,`path`);return n.setAttribute(`d`,e),t.appendChild(n),t}function xt(e){let t=document.createElement(`img`);return t.setAttribute(`alt`,e.mediaAlt??``),t.setAttribute(`width`,`1280`),t.setAttribute(`height`,`720`),t.setAttribute(`loading`,`lazy`),t.setAttribute(`decoding`,`async`),t.setAttribute(`src`,e.media??``),t}function St(e,t){let n=document.createElement(`video`);return n.muted=!0,n.setAttribute(`muted`,``),n.loop=!0,n.setAttribute(`playsinline`,``),t&&n.setAttribute(`autoplay`,``),n.setAttribute(`preload`,t?`auto`:`metadata`),e.mediaAlt&&n.setAttribute(`aria-label`,e.mediaAlt),e.mediaPoster&&n.setAttribute(`poster`,e.mediaPoster),n.setAttribute(`src`,e.media??``),n}function Ct(e,t){let n=document.createElement(`button`);n.type=`button`,n.className=mt;let r=(r=!e.paused)=>{n.setAttribute(`aria-label`,r?t.pause:t.play),n.replaceChildren(bt(r?gt:_t))};return e.addEventListener(`play`,()=>r()),e.addEventListener(`pause`,()=>r()),n.addEventListener(`click`,()=>{e.paused?e.play()?.catch(()=>r()):e.pause()}),r(e.hasAttribute(`autoplay`)),n}function wt(e){let t=e.querySelector(`:scope > .${pt}`);if(!t)return;let n=t.querySelector(`video`);n&&(n.pause(),n.removeAttribute(`src`),n.load()),t.remove()}function Tt(e,t,n=vt()){if(wt(e),!t.media){e.removeAttribute(`data-media`);return}let r=document.createElement(`div`);if(r.className=pt,t.mediaType===`video`){let e=St(t,!yt());r.append(e,Ct(e,n))}else r.appendChild(xt(t));e.prepend(r),e.setAttribute(`data-media`,t.target?`step`:`welcome`)}var Et=`data-wui-tour-open`,Dt=()=>E(`tour`,O);function Ot(e){let t=new Set;return{drop:e=>{t.add(e)},position:e=>{t.delete(e);let n=0;for(let r of t)r<e&&n++;return e+1-n},total:()=>e-t.size}}function kt(e,t,n){return(e.getAttribute(`progress-label`)||Dt().progressLabel).replace(/\{(current|total)\}/g,(e,r)=>String(r===`current`?t:n))}function At(e,{text:t,position:n,total:r}){let i=e.querySelector(`.wui-tour-position`);if(!(i instanceof HTMLElement))throw Error(`tour position label missing`);i.textContent=t;let a=e.querySelector(`.wui-tour-progress-bar`);if(!a){let t=e.ownerDocument,n=t.createElement(`div`);n.className=`wui-tour-progress`,n.setAttribute(`aria-hidden`,`true`),a=t.createElement(`div`),a.className=`wui-tour-progress-bar`,n.append(a),i.before(n)}let o=a.children;for(;o.length<r;){let t=e.ownerDocument.createElement(`span`);t.className=`wui-tour-progress-segment`,a.append(t)}for(;o.length>r;){let e=a.lastElementChild;if(!e)throw Error(`progress bar segment missing`);e.remove()}for(let e=0;e<o.length;e++){let t=o[e];if(!t)throw Error(`progress bar segment missing`);t.toggleAttribute(`data-filled`,e<n)}}var jt=`wui-tour-seen:`;function Mt(e=jt,t=globalThis.localStorage){return{isSeen:async n=>t.getItem(e+n)===`1`,markSeen:async n=>{t.setItem(e+n,`1`)}}}function q(e){"@babel/helpers - typeof";return q=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},q(e)}function Nt(e,t){if(q(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(q(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Pt(e){var t=Nt(e,`string`);return q(t)==`symbol`?t:t+``}function J(e,t,n){return(t=Pt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ft=`wui-tour-step`,It=`wui-tour-host`,Y=`data-tracking`,X=()=>E(`tour`,O),Lt=()=>({back:X().backLabel,next:X().nextLabel,skip:X().skipLabel,done:X().doneLabel,mediaPause:X().mediaPauseLabel,mediaPlay:X().mediaPlayLabel,endTitle:X().endTitle,endMessage:X().endMessage,endButton:X().doneLabel}),Rt={back:`back-label`,next:`next-label`,skip:`skip-label`,done:`done-label`,mediaPause:`media-pause-label`,mediaPlay:`media-play-label`,endTitle:`end-title`,endMessage:`end-message`,endButton:`end-button`},zt=[[`media`,`media`],[`mediaAlt`,`media-alt`],[`mediaPoster`,`media-poster`],[`mediaType`,`media-type`],[`advanceOn`,`advance-on`],[`actionLabel`,`action-label`]],Bt={index:null,position:null,total:null},Vt=0,Z=e=>!e?.isConnected||getComputedStyle(e).visibility===`hidden`?!1:e.getClientRects().length>0,Ht=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));function Q(e,t,n){let r=e.querySelector(t);if(!(r instanceof n))throw Error(`<wui-tour> layer has no ${t}`);return r}var Ut=()=>{let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e},$=null;function Wt(e){$||($=new CSSStyleSheet,$.replaceSync(dt)),e.adoptedStyleSheets=[$]}var Gt=class extends r{static get observedAttributes(){return[`open`]}constructor(){super(),J(this,`seenStore`,void 0),J(this,`onBeforeStep`,void 0),J(this,`_run`,void 0),J(this,`_running`,void 0),J(this,`_layer`,void 0),J(this,`_outer`,void 0),J(this,`_shadow`,void 0),J(this,`_unbindAdvance`,void 0),J(this,`_ending`,void 0),J(this,`_seenMark`,void 0),J(this,`_steps`,[]),J(this,`_progress`,Ot(0)),J(this,`_firstIndex`,0),J(this,`_returnFocus`,null),J(this,`_current`,null),J(this,`_moving`,!1),J(this,`_card`,null),J(this,`_spot`,null),J(this,`_live`,null),J(this,`_onKey`,null),J(this,`_onFocusIn`,null),this.seenStore=null,this.onBeforeStep=null,this._run=0,this._running=!1,this._layer=null,this._outer=null,this._shadow=null,this._unbindAdvance=null,this._ending=null,this._seenMark=null}connectedCallback(){this.hasAttribute(`open`)&&this.start()}disconnectedCallback(){this.stop()}attributeChangedCallback(e,t,n){e===`open`&&this.isConnected&&(n===null?this.stop():this.start())}get tourId(){return this.getAttribute(`tour-id`)||``}set tourId(e){e==null||e===``?this.removeAttribute(`tour-id`):this.setAttribute(`tour-id`,String(e))}get isolated(){return this.hasAttribute(`isolated`)}set isolated(e){this.toggleAttribute(`isolated`,e===!0||e===``||e===`true`)}_stepList(){return Array.from(this.querySelectorAll(`:scope > ${Ft}`),e=>{let t={target:e.getAttribute(`target`)||``,title:e.getAttribute(`title`)||void 0,description:(e.textContent??``).trim()};for(let[n,r]of zt)e.hasAttribute(r)&&(t[n]=e.getAttribute(r)??``);return t})}_stepAt(e){let t=this._steps[e];if(!t)throw RangeError(`<wui-tour> has no step ${e}; it has ${this._steps.length}.`);return t}_store(){return this.seenStore?this.seenStore:this.getAttribute(`seen-store`)===`local`?Mt():null}_label(e){return this.getAttribute(Rt[e])||Lt()[e]}_endDialogText(){if(this.getAttribute(`end-dialog`)===`false`)return null;let e=(this.getAttribute(`end-next-label`)??``).trim(),t=(this.getAttribute(`end-next-href`)??``).trim();return{title:this._label(`endTitle`),message:this._label(`endMessage`),button:this._label(`endButton`),nextLabel:e,nextHref:t}}_markSeen(e){let t=this._store();return t?t.markSeen(this.tourId,e):null}async start(){if(this._running)return;this._running=!0;let e=++this._run;this.hasAttribute(`open`)||this.setAttribute(`open`,``);try{await this._start(e)}catch(t){throw e===this._run&&(this._running=!1),t}}async _start(e){this._steps=this._stepList(),this._progress=Ot(this._steps.length);let t=this._store();if(t&&!this.tourId)throw Error(`<wui-tour> needs a tour-id to use a seen store.`);if(t&&await t.isSeen(this.tourId)){e===this._run&&this._finish(`alreadySeen`);return}for(let[e,t]of this._steps.entries())t.target&&!Z(document.querySelector(t.target))&&this._progress.drop(e);this._returnFocus=document.activeElement;let n=await this._locate(0,1,e);e===this._run&&(n?(this._firstIndex=n.index,this.dispatchEvent(new CustomEvent(`wui-tour:start`,{bubbles:!0,detail:{total:this._progress.total()}})),e===this._run&&(this._build(),this._show(n))):this._finish(`noTargets`))}next(){return this._move(1)}back(){return!this._current||this._current.index<=this._firstIndex?Promise.resolve():this._move(-1)}async goTo(e){if(this._current){if(!Number.isInteger(e)||e<0||e>=this._steps.length)throw RangeError(`<wui-tour> has no step ${e}; it has ${this._steps.length}.`);await this._go(e,1)}}stop(){this._running&&(this._run++,this._teardown(),this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`))}async _locate(e,t,n){let r=this._steps;for(let i=e;i>=0&&i<r.length;i+=t){let e=r[i];if(!e)break;if(await this._beforeStep(e,i),n!==this._run)return null;if(!e.target)return{index:i,target:null};let t=document.querySelector(e.target),a=t instanceof HTMLElement||t instanceof SVGElement?t:null;if(Z(a))return this._progress.position(i),{index:i,target:a};this._progress.drop(i)}return null}async _beforeStep(e,t){let n=[];this.dispatchEvent(new CustomEvent(`wui-tour:beforestep`,{bubbles:!0,detail:{step:e,index:t,wait:e=>n.push(e)}})),await Promise.all(n),typeof this.onBeforeStep==`function`&&await this.onBeforeStep(e,t)}_build(){let e=`wui-tour-${++Vt}`,t=document.createElement(`div`);t.className=`wui-tour-layer`,t.replaceChildren(m(`div`,{class:`wui-tour-spot`,"aria-hidden":`true`}),m(`div`,{class:`wui-tour-card`,role:`dialog`,tabindex:`-1`,"aria-labelledby":`${e}-title`,"aria-describedby":`${e}-text`},m(`p`,{class:`wui-tour-position`}),m(`h2`,{class:`wui-tour-title`,id:`${e}-title`}),m(`p`,{class:`wui-tour-text`,id:`${e}-text`}),m(`div`,{class:`wui-tour-actions`},m(`button`,{type:`button`,class:`btn btn-sm btn-link wui-tour-skip`}),m(`div`,{class:`wui-tour-nav`},m(`button`,{type:`button`,class:`${p(`neutral`,`outline`,`sm`)} wui-tour-back`,"data-wui":l}),m(`button`,{type:`button`,class:`${p(`primary`,`solid`,`sm`)} wui-tour-next`,"data-wui":l})))),m(`div`,{class:`visually-hidden`,role:`status`,"aria-live":`polite`}));let n=t;this._shadow=null,this.isolated&&(n=document.createElement(It),this._shadow=n.attachShadow({mode:`open`}),Wt(this._shadow),this._shadow.appendChild(t)),n.setAttribute(`popover`,`manual`),T(document).appendChild(n),document.documentElement.setAttribute(Et,``),this._outer=n,this._layer=t;let r=Q(t,`.wui-tour-spot`,HTMLDivElement),i=Q(t,`.wui-tour-card`,HTMLDivElement),a=Q(t,`[role=status]`,HTMLElement);this._spot=r,this._card=i,this._live=a,Q(i,`.wui-tour-skip`,HTMLElement).addEventListener(`click`,()=>this._close(`skipped`,`button`)),Q(i,`.wui-tour-back`,HTMLElement).addEventListener(`click`,()=>this._move(-1)),Q(i,`.wui-tour-next`,HTMLElement).addEventListener(`click`,()=>this._move(1));let s=e=>this._key(e);this._onKey=s;let c=e=>{let t=this._layer;if(!t||this._ending)return;let n=this._current,r=n?this._stepAt(n.index):null;if(!(e.target instanceof Node))throw Error(`<wui-tour> saw a focus change from a non-node target`);Oe(t,r,n?.target??null,e.target)||i.focus()};this._onFocusIn=c,document.addEventListener(`keydown`,s,!0),this._shadow||document.addEventListener(`focusin`,c),o(n,()=>this._follow())}_active(){return this._shadow?this._shadow.activeElement:document.activeElement}_raise(){let e=this._outer;if(!e)throw Error(`<wui-tour> raises a step before its host is built`);let t=T(this.ownerDocument);e.parentElement!==t&&t.appendChild(e),ce(e)}_show(e){this._current=e;let{index:t,target:n}=e,r=this._stepAt(t),i=this._layer,a=this._spot,o=this._card,s=this._live;if(!i||!a||!o||!s)throw Error(`<wui-tour> shows a step before its layer is built`);this._raise();let c=this._progress.position(t),l=this._progress.total(),u=c===l&&!this._endDialogText(),d=kt(this,c,l);At(o,{text:d,position:c,total:l}),Tt(o,r,{pause:this._label(`mediaPause`),play:this._label(`mediaPlay`)}),o.toggleAttribute(`data-welcome`,!n);let f=F(this,{layer:i,spot:a,card:o},r,n),p=Q(o,`.wui-tour-title`,HTMLElement);p.textContent=r.title||``,p.hidden=!r.title,Q(o,`.wui-tour-text`,HTMLElement).textContent=r.description||``,Q(o,`.wui-tour-skip`,HTMLElement).textContent=this._label(`skip`);let m=Q(o,`.wui-tour-back`,HTMLElement);m.textContent=this._label(`back`),m.hidden=t<=this._firstIndex,Q(o,`.wui-tour-next`,HTMLElement).textContent=this._label(u?`done`:`next`);let h=[d,r.title,r.description].filter(Boolean).join(`. `);s.textContent=f?[h,f].join(/[.!?]$/.test(h)?` `:`. `):h,Qe(o,n),a.removeAttribute(Y),this._place(),He(o),this._unbindAdvance?.(),this._unbindAdvance=De(r,n,()=>void this._move(1));let g=this._active();(g!==null&&o.contains(g)?!(g instanceof HTMLElement&&g.hidden):this._shadow!==null&&Ht(Ut()))||o.focus(),this.dispatchEvent(new CustomEvent(`wui-tour:step`,{bubbles:!0,detail:{step:r,index:t,position:c,total:l}}))}_place(){if(!this._current||!this._layer)return;let e=this._spot,t=this._card;if(!e||!t)throw Error(`<wui-tour> places a step before its layer is built`);$e(e,t,this._current.target)}_follow(){if(!this._current||!this._layer||this._ending)return;let e=this._spot;if(!e)throw Error(`<wui-tour> follows a step before its spot is built`);let t=e.style.cssText;this._place(),e.style.cssText!==t&&e.setAttribute(Y,``)}async _move(e){this._current&&await this._go(this._current.index+e,e)}async _go(e,t){if(!this._current||this._moving)return;this._moving=!0;let n=this._run;try{let r=await this._locate(e,t,n);if(n!==this._run)return;if(r){let e=this._card;if(!e)throw Error(`<wui-tour> moved with no card showing`);let t=Ue(e);if(t!==null&&await t,n!==this._run)return;this._show(r)}else if(t>0){let e=this._endDialogText(),t=e?await this._showEnd(e):`done`;if(n!==this._run)return;let r=await this._close(t===`next`?`next`:`finished`);if(t===`next`&&r&&e){let t=this.ownerDocument.defaultView;if(!t)throw Error(`<wui-tour> has no window to follow its next link in`);t.location.assign(e.nextHref)}}}finally{this._moving=!1}}_showEnd(e){this._unbindAdvance?.(),this._unbindAdvance=null;let t=this._layer,n=this._spot,r=this._card;if(!t||!n||!r)throw Error(`<wui-tour> ends a tour before its layer is built`);return F(this,{layer:t,spot:n,card:r},null,null),n.removeAttribute(Y),this._ending=new AbortController,this._seenMark=this._markSeen(`finished`),ut(t,e,this._ending.signal)}_key(e){if(!this._layer||this._ending||e.altKey||e.ctrlKey||e.metaKey)return;let t=a(e.key,i(this));if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),this._close(`skipped`,`escape`);else if(t===`ArrowRight`||t===`ArrowLeft`){if(Ht(e.composedPath?.()[0]??e.target))return;if(e.preventDefault(),t===`ArrowRight`)this._move(1);else{let e=this._current;if(!e)throw Error(`<wui-tour> moved back with no step showing`);e.index>this._firstIndex&&this._move(-1)}}else if(e.key===`Tab`&&!this._shadow){let t=this._current,n=this._card;if(!t||!n)throw Error(`<wui-tour> cycled focus with no step showing`);ke(e,{card:n,active:this._active(),step:this._stepAt(t.index),target:t.target})}}_teardown(){if(!this._layer)return;this._onKey&&document.removeEventListener(`keydown`,this._onKey,!0),this._onFocusIn&&document.removeEventListener(`focusin`,this._onFocusIn);let e=!this._shadow||this._shadow.activeElement!==null||!document.activeElement||document.activeElement===document.body;this._unbindAdvance?.(),this._unbindAdvance=null,this._ending?.abort(),this._ending=null,this._seenMark=null;let t=this._outer;if(s(t),!t)throw Error(`<wui-tour> has a layer with no host to remove`);We(t),document.documentElement.removeAttribute(Et),this._outer=null,this._shadow=null,this._layer=null,this._current=null;let n=this._returnFocus;this._returnFocus=null,e&&n?.isConnected&&(n instanceof HTMLElement||n instanceof SVGElement)&&n.focus()}async _close(e,t=null){let n=this._run,r=this._current,i=r?{index:r.index,position:this._progress.position(r.index),total:this._progress.total()}:Bt,a=this._seenMark;this._teardown();let o=e===`next`?`finished`:e,s=!1;try{n===this._run&&await(a??this._markSeen(o)),s=n===this._run}finally{this._finish(e,i,t)}return s}_finish(e,t=Bt,n=null){this._run++,this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`),this.dispatchEvent(new CustomEvent(`wui-tour:close`,{bubbles:!0,detail:{reason:e,...t,via:n}}))}},Kt=class extends r{constructor(){super(),this.shadowRoot||this.attachShadow({mode:`open`})}};return t(`wui-tour`,Gt),t(`wui-tour-step`,Kt),e.WuiTourStep=Kt,e})({});
1
+ var WeborityTour=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(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 n=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(n);var r=HTMLElement;function i(e){return getComputedStyle(e).direction===`rtl`}function a(e,t){return t?e===`ArrowRight`?`ArrowLeft`:e===`ArrowLeft`?`ArrowRight`:e:e}function o(e,t){s(e),e._reanchor=t,e._reanchorScroll=n=>{n.composedPath().includes(e)||t()},window.addEventListener(`resize`,e._reanchor),window.addEventListener(`scroll`,e._reanchorScroll,!0)}function s(e){if(!e?._reanchor)return;window.removeEventListener(`resize`,e._reanchor);let t=e._reanchorScroll;t&&window.removeEventListener(`scroll`,t,!0),e._reanchor=null,e._reanchorScroll=null}var c=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0,l=`AppButton`,u=new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),d={solid:e=>`btn-${e}`,soft:e=>`btn-soft-${e}`,outline:e=>`btn-outline-${e}`,ghost:e=>`btn-ghost-${e}`,link:e=>`btn-link-${e}`,glass:()=>`btn-glass`};function f(e){return c(d,e)}function p(e=`primary`,t=`solid`,n=`md`){if(!u.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!f(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=d[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}function m(e,t,...n){if(e.toLowerCase()===`svg`)throw Error(`make() builds HTML elements; use svgRoot for svg`);let r=document.createElement(e);for(let[e,n]of Object.entries(t??{}))n===!0?r.setAttribute(e,``):(typeof n==`string`||typeof n==`number`)&&r.setAttribute(e,String(n));let i=[];for(let e of n)e instanceof Node?i.push(e):(typeof e==`string`||typeof e==`number`)&&i.push(document.createTextNode(String(e)));return r.append(...i),r}var h=`data-wui-dismiss`,g=`data-wui-closing`,_=`[${h}]`,v=`(prefers-reduced-motion: reduce)`,y=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,b=new WeakSet,x=Symbol.for(`webority.ui.modal-stack`),ee=Symbol.for(`webority.ui.root-watches`);function te(e){let t=e;return t[ee]??=new Set,t[ee]}function ne(e){let t=e.querySelector(`[data-autofocus]`);if(t)return t;let n=null;for(let t of e.querySelectorAll(y))if(!t.closest(`[hidden],[inert]`)){if(!t.closest(`${_},.wui-modal-back`))return t;n??=t}return n}function re(e){let t=[],n=new Map;for(let r of e.querySelectorAll(y))if(!(r.closest(`[hidden],[inert]`)||r.closest(`dialog`)!==e)&&!(r.tabIndex<0||r.getClientRects().length===0)){if(r instanceof HTMLInputElement&&r.type===`radio`&&r.name){let e=n.get(r.name);e?r.checked&&!e.checked&&(e.checked=r,t[t.indexOf(e.first)]=r):(n.set(r.name,{first:r,checked:r.checked?r:null}),t.push(r))}else t.push(r)}return t}function S(e){let t=e;return t[x]??=[],t[x]}function ie(e){C(e),S(e.ownerDocument).push(e)}function C(e){let t=S(e.ownerDocument),n=t.indexOf(e);n>=0&&t.splice(n,1)}function w(e){for(let t of te(e)){let n=T(e);t.last!==n&&(t.last=n,t.listener(n))}}function ae(e){let t=Promise.allSettled(e.getAnimations().map(e=>e.finished));return new Promise(e=>{let n=window.setTimeout(e,400);t.then(()=>{window.clearTimeout(n),e()})})}function oe(e,t){let n=t.focus===`first-control`?ne(e):null,r=n??e,i=r===e&&!e.hasAttribute(`tabindex`);i&&e.setAttribute(`tabindex`,`-1`);let a=!t.escape&&!e.hasAttribute(`closedby`);a&&e.setAttribute(`closedby`,`none`),b.add(e);let o=()=>{if(ie(e),!e.hasAttribute(`open`)){let t=n!==null&&!e.querySelector(`[autofocus]`);t&&n.setAttribute(`autofocus`,``);try{e.showModal()}catch(t){throw C(e),t}finally{t&&n.removeAttribute(`autofocus`)}}r.focus(),w(e.ownerDocument)},s=!1,c=n=>{if(n.key!==`Escape`||n.defaultPrevented||!t.escape||n.altKey||n.ctrlKey||n.metaKey)return;let r=e.ownerDocument;T(r)===e&&(e.querySelector(`:popover-open`)||r.querySelector(`[popover=""]:popover-open, [popover="auto"]:popover-open`)||(s=!0,window.setTimeout(()=>{s&&b.has(e)&&e.open&&(s=!1,t.onRequestClose(`escape`))},0)))},l=t=>{if(t.key!==`Tab`||t.defaultPrevented||t.altKey||t.ctrlKey||t.metaKey)return;let n=e.ownerDocument;if(T(n)!==e||e.querySelector(`:popover-open`))return;t.preventDefault();let r=re(e),i=r[0],a=r[r.length-1];if(!i||!a){e.focus();return}let o=n.activeElement,s=o?r.findIndex(e=>e===o||e.contains(o)):-1;s<0?(t.shiftKey?a:i).focus():r[((t.shiftKey?s-1:s+1)+r.length)%r.length]?.focus()},u=e=>{s=!1,e.preventDefault(),t.escape&&t.onRequestClose(`escape`)},d=n=>{let r=n.target;if(!(r instanceof Element))return;let i=r.closest(_);if(i&&i.closest(`dialog`)===e){t.onRequestClose(`dismiss`);return}let a=t.backdrop;if(!a||r.closest(`dialog`)!==e||r!==a&&a.contains(r))return;let o=a.getBoundingClientRect();(n.clientX<o.left||n.clientX>o.right||n.clientY<o.top||n.clientY>o.bottom)&&t.onRequestClose(`backdrop`)},f=()=>{let n=s;s=!1,C(e),b.has(e)?(o(),n&&t.onRequestClose(`escape`)):w(e.ownerDocument)},p=e.ownerDocument;return p.addEventListener(`keydown`,c),p.addEventListener(`keydown`,l),e.addEventListener(`cancel`,u),e.addEventListener(`click`,d),e.addEventListener(`close`,f),o(),()=>{p.removeEventListener(`keydown`,c),p.removeEventListener(`keydown`,l),e.removeEventListener(`cancel`,u),e.removeEventListener(`click`,d),e.removeEventListener(`close`,f),b.delete(e),i&&e.removeAttribute(`tabindex`),a&&e.removeAttribute(`closedby`),C(e),w(e.ownerDocument)}}async function se(e){b.delete(e),e.setAttribute(g,``),!window.matchMedia(v).matches&&typeof e.getAnimations==`function`&&e.getAnimations().length>0&&await ae(e),e.close(),C(e),w(e.ownerDocument),e.removeAttribute(g)}function ce(e){if(le(e),!e.isConnected)throw Error(`nativeOverlay: raisePopover was given a panel that is not on the page; a caller whose overlay root can leave the page skips the raise until the panel moves to the new root`);e.hidePopover(),e.showPopover()}function le(e){if(!e.hasAttribute(`popover`))throw Error(`nativeOverlay: the panel has no popover attribute`)}function T(e=document){let t=S(e);for(let e=t.length-1;e>=0;e--){let n=t[e];if(n?.isConnected&&n.hasAttribute(`open`))return n}return e.body}var ue=/\{([A-Za-z0-9_]+)\}/g,de=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0,fe=new Map,pe=0,me=new Map;function E(e,t){let n=fe.get(e);if(n===void 0)return t;let r=me.get(e);if(r!==void 0&&r.version===pe&&r.english===t&&ge(r.merged,t))return r.merged;let i=he(e,n,t);return me.set(e,{version:pe,english:t,merged:i}),i}function he(e,t,n){let r={};for(let[i,a]of Object.entries(t)){let t=de(n,i)?n[i]:void 0;if(t===void 0)throw RangeError(`Text ${e}.${i} is not a key of the English text. Allowed keys: ${Object.keys(n).join(`, `)}.`);let o=D(t);for(let t of D(a))if(!o.includes(t))throw RangeError(`Text ${e}.${i} uses {${t}}, which the English text does not have. Allowed placeholders: ${o.length===0?`none`:o.map(e=>`{${e}}`).join(`, `)}.`);r[i]=a}return Object.assign({},n,r)}function ge(e,t){let n=Object.keys(t);return Object.keys(e).length===n.length&&n.every(t=>de(e,t))}function D(e){return Array.from(e.matchAll(ue),e=>e[1]??``)}var O={backLabel:`Back`,doneLabel:`Done`,endMessage:`You know your way around now. Enjoy exploring.`,endTitle:`You're all set`,mediaPauseLabel:`Pause animation`,mediaPlayLabel:`Play animation`,nextLabel:`Next`,progressLabel:`Step {current} of {total}`,skipLabel:`Skip`},_e={advanceLabel:`Click {actionName} to continue.`},k=`data-advance`,A=`wui-tour-hint`,j=`wui-tour-pointer`,ve=`a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]`,ye=()=>E(`tourAdvance`,_e),M=(e,t)=>e?.advanceOn===`click`&&!!t,N=e=>(e??``).replace(/\s+/g,` `).trim(),be=e=>e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLMeterElement||e instanceof HTMLOutputElement||e instanceof HTMLProgressElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.labels:null,xe=e=>e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLFieldSetElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement?e.disabled:!1;function Se(e){let t=e.ownerDocument,n=(e.getAttribute(`aria-labelledby`)||``).split(/\s+/).filter(Boolean),r=e instanceof HTMLInputElement&&/^(button|submit|reset)$/.test(e.type)?e.value:``,i=[n.map(e=>t.getElementById(e)?.textContent??``).join(` `),e.getAttribute(`aria-label`),Array.from(be(e)??[],e=>e.textContent).join(` `),e.getAttribute(`alt`),r,e.textContent,e.getAttribute(`title`)];for(let e of i){let t=N(e);if(t)return t}return``}function Ce(e){for(let t of[e,...e.querySelectorAll(ve)])if((t instanceof HTMLElement||t instanceof SVGElement)&&t.tabIndex>=0&&!xe(t))return t;return null}function P(e,t,n){let r=(e.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(e=>e&&e!==t);n&&r.push(t),r.length>0?e.setAttribute(`aria-describedby`,r.join(` `)):e.removeAttribute(`aria-describedby`)}function we(e,t){let n=e.querySelector(`.${A}`),r=e.querySelector(`.wui-tour-text`)?.id,i=r?`${r.replace(/-text$/,``)}-hint`:``;if(!t)n?.remove(),i&&P(e,i,!1);else{if(!n){n=e.ownerDocument.createElement(`p`),n.className=A,i&&(n.id=i);let t=e.querySelector(`.wui-tour-actions`);if(!t)throw Error(`Tour card has no actions row.`);t.before(n)}n.textContent=t,i&&P(e,i,!0)}}function Te(e,t){let n=e.querySelector(`.${j}`);if(!t){n?.remove();return}if(n)return;let r=e.ownerDocument.createElement(`span`);r.className=j,r.setAttribute(`aria-hidden`,`true`),e.append(r)}var Ee=e=>getComputedStyle(e).animationName;function F(e,{layer:t,spot:n,card:r},i,a){let o=M(i,a);t.toggleAttribute(k,o&&!(t.getRootNode()instanceof ShadowRoot)),n.hasAttribute(k)&&(n.removeAttribute(k),o&&Ee(n)),o&&n.setAttribute(k,``),Te(n,o);let s=r.querySelector(`.wui-tour-next`);if(!(s instanceof HTMLElement))throw Error(`Tour card has no next button.`);s.classList.toggle(`btn-primary`,!o),s.classList.toggle(`btn-link`,o);let c=o?N(i?.actionLabel)||Se(a):``,l=e.getAttribute(`advance-label`)||ye().advanceLabel,u=c?l.replace(/\{actionName\}/g,()=>c):``;return we(r,u),u}function De(e,t,n){if(!M(e,t))return()=>{};let r,i=()=>{r??=setTimeout(n,0)};return t.addEventListener(`click`,i),()=>{t.removeEventListener(`click`,i),clearTimeout(r)}}function Oe(e,t,n,r){return e.contains(r)||M(t,n)&&n.contains(r)}function ke(e,{card:t,active:n,step:r,target:i}){let a=Array.from(t.querySelectorAll(`button`)).filter(e=>!e.hidden),o=M(r,i)?Ce(i):null;o&&a.push(o);let s=a.findIndex(e=>e===n||e===o&&i?.contains(n));e.preventDefault();let c=a[s===-1?e.shiftKey?a.length-1:0:(s+(e.shiftKey?-1:1)+a.length)%a.length];if(!c)throw Error(`Tour card has no focus stop.`);c.focus()}function Ae(e){return e.isComposing||e.keyCode===229}function je(e){return e.key===`Enter`&&!Ae(e)}var I=`http://www.w3.org/2000/svg`;function L(e){return e.map(Ne)}function Me(e,t){let n=document.createElementNS(I,`svg`);return R(n,e),n.append(...L(t)),n}function Ne(e){let[t,n,r]=e,i=document.createElementNS(I,t);return R(i,n),typeof r==`string`?i.append(document.createTextNode(r)):r&&i.append(...L(r)),i}function R(e,t){for(let[n,r]of Object.entries(t))r===!0?e.setAttribute(n,``):(typeof r==`string`||typeof r==`number`)&&e.setAttribute(n,String(r))}var Pe=2/3,Fe=1e3,Ie=new Set([`top`,`left`,`width`,`height`]),z=new WeakMap,B=(e,t)=>typeof e.getAnimations==`function`?e.getAnimations().filter(t):[],Le=e=>`transitionProperty`in e&&e.transitionProperty===`opacity`,Re=e=>`transitionProperty`in e&&typeof e.transitionProperty==`string`&&Ie.has(e.transitionProperty),ze=e=>`animationName`in e&&typeof e.animationName==`string`&&e.animationName.startsWith(`wui-tour-`);function Be(e){return e.length===0?null:new Promise(t=>{let n=setTimeout(t,Fe);Promise.allSettled(e.map(e=>e.finished)).then(()=>{clearTimeout(n),t()})})}function Ve(e){let t=e.parentElement?.querySelector(`:scope > .wui-tour-spot`),n=0;for(let e of t?B(t,Re):[]){let t=e.effect?.getComputedTiming?.();if(typeof t?.duration!=`number`)continue;let r=typeof e.currentTime==`number`?e.currentTime:0;n=Math.max(n,(t.delay??0)+t.duration*Pe-r)}return n}function He(e){let t=Ve(e);t>0?e.style.setProperty(`--wui-tour-card-delay`,`${Math.round(t)}ms`):e.style.removeProperty(`--wui-tour-card-delay`),e.dataset.state=`entering`;let n={};z.set(e,n);let r=()=>{z.get(e)===n&&e.dataset.state===`entering`&&(e.dataset.state=`shown`)},i=B(e,ze);i.length===0?r():Promise.allSettled(i.map(e=>e.finished)).then(r)}function Ue(e){return e.dataset.state=`leaving`,Be(B(e,Le))}function We(e){let t=e.shadowRoot?.querySelector(`.wui-tour-layer`),n=e.classList.contains(`wui-tour-layer`)?e:t instanceof HTMLElement?t:null;n&&(n.dataset.state=`leaving`);let r=n?Be(B(n,Le)):null;r?(e.setAttribute(`inert`,``),r.then(()=>e.remove())):e.remove()}var Ge=2,V=12,H=8,Ke=4,U=20,qe=`(max-width: 575.98px)`,Je=[`bottom`,`top`,`right`,`left`],Ye=[`bottom`,`top`,`left`,`right`],Xe=[`top-left`,`top-right`,`bottom-right`,`bottom-left`],Ze,W=(e,t,n)=>Math.max(t,Math.min(e,n)),G=(e,t,n,r)=>(Math.max(e,n)+Math.min(t,r))/2;function Qe(e,t){if(!t?.scrollIntoView)return;e.style.maxHeight=``;let n=it(e),r=e.offsetHeight+V;if(t.getBoundingClientRect().height+4+r*2<=n.bottom-n.top){t.scrollIntoView({block:`center`,inline:`nearest`});return}let i=t.style.scrollMarginTop;t.style.scrollMarginTop=`${n.top+r+Ge}px`,t.scrollIntoView({block:`start`,inline:`nearest`}),t.style.scrollMarginTop=i}function $e(e,t,n){let r=e.style,a=t.style,o=at(t);if(!n){r.top=`50%`,r.left=`50%`,r.width=`0px`,r.height=`0px`,r.boxShadow=`0 0 0 100vmax var(--color-scrim-strong)`;for(let e of Xe)r.removeProperty(`border-${e}-radius`),r.removeProperty(`corner-${e}-shape`);t.dataset.placement=`center`,o.hidden=!0,a.position=`fixed`,a.top=`50%`,a.left=`50%`,a.transform=`translate(-50%, -50%)`,a.maxHeight=`calc(100vh - 16px)`;return}r.boxShadow=``,a.transform=``,a.position=`fixed`;let s=n.getBoundingClientRect();r.top=`${s.top}px`,r.left=`${s.left}px`,r.width=`${s.width}px`,r.height=`${s.height}px`,et(r,n);let c=t.scrollTop;a.maxHeight=``;let l={width:t.offsetWidth,height:t.offsetHeight},u=it(t),d=u.bottom-u.top,f={bottom:u.bottom-s.bottom-V,top:s.top-V-u.top,right:u.right-s.right-V,left:s.left-V-u.left},p=window.matchMedia(qe).matches,m=(i(n)?Ye:Je).find(e=>e===`top`||e===`bottom`?l.height<=f[e]+1:!p&&l.width<=f[e]+1&&l.height<=d+1),h=Math.min(s.bottom,u.bottom+H)-Math.max(s.top,u.top-H);m?tt(t,o,m,s,u,l):h>=Math.min(l.height,d)+8?nt(t,o,s,u,l):rt(t,o,f.bottom>=f.top?`bottom`:`top`,s,u,l,f),t.scrollTop=c}function et(e,t){Ze??=CSS.supports(`corner-top-left-shape`,`squircle`);let n=getComputedStyle(t);for(let t of Xe)e.setProperty(`border-${t}-radius`,n.getPropertyValue(`border-${t}-radius`)),Ze&&e.setProperty(`corner-${t}-shape`,n.getPropertyValue(`corner-${t}-shape`))}function tt(e,t,n,r,i,a){let o=n===`top`||n===`bottom`,s,c,l;if(o){let e=G(r.left,r.right,i.left,i.right);s=W(e-a.width/2,i.left,i.right-a.width),c=n===`bottom`?r.bottom+V:r.top-V-a.height,l=W(e-s,U,a.width-U)}else{let e=G(r.top,r.bottom,i.top,i.bottom);c=W(e-a.height/2,i.top,i.bottom-a.height),s=n===`right`?r.right+V:r.left-V-a.width,l=W(e-c,U,a.height-U)}e.dataset.placement=n,e.style.top=`${c}px`,e.style.left=`${s}px`,t.hidden=!1,t.style.left=o?`${l-e.clientLeft-t.offsetWidth/2}px`:``,t.style.top=o?``:`${l-e.clientTop-t.offsetHeight/2}px`}function nt(e,t,n,r,i){let a=r.bottom-r.top;e.dataset.placement=`overlap`,t.hidden=!0,e.style.maxHeight=i.height>a?`${Math.max(a,0)}px`:``;let o=Math.min(n.bottom,r.bottom)-Ke;e.style.top=`${Math.max(r.top,o-Math.min(i.height,a))}px`,e.style.left=`${W(n.left+Ke,r.left,r.right-i.width)}px`}function rt(e,t,n,r,i,a,o){let s=Math.max(o[n],0),c=Math.min(a.height,s);e.dataset.placement=n,t.hidden=!0,e.style.maxHeight=a.height>s?`${s}px`:``,e.style.top=`${n===`bottom`?r.bottom+V:r.top-V-c}px`;let l=G(r.left,r.right,i.left,i.right);e.style.left=`${W(l-a.width/2,i.left,i.right-a.width)}px`}function it(e){let t=e.parentElement,n=t?getComputedStyle(t):null,r=e=>Number.parseFloat(n?.[e]??``)||0;return{top:r(`paddingTop`)+H,bottom:window.innerHeight-r(`paddingBottom`)-H,left:r(`paddingLeft`)+H,right:window.innerWidth-r(`paddingRight`)-H}}function at(e){let t=e.querySelector(`:scope > .wui-tour-arrow`);if(t instanceof HTMLElement)return t;let n=document.createElement(`span`);return n.className=`wui-tour-arrow`,n.setAttribute(`aria-hidden`,`true`),n.hidden=!0,e.append(n),n}var ot=0,st=`btn btn-sm btn-link`;function K(e,t,n){let r=e.querySelector(t);if(!(r instanceof n))throw Error(`Expected "${t}" to match a ${n.name}.`);return r}function ct(e,t){let n=`wui-tour-end-${++ot}`,{nextLabel:r,nextHref:i}=e,a=r&&i?m(`a`,{class:`${p(`primary`,`solid`,`sm`)} wui-tour-end-next`,"data-wui":l,href:i},r):null,o=a!==null,s=m(`button`,{type:`button`,class:`${o?st:p(`primary`,`solid`,`sm`)} wui-tour-end-button`,"data-wui":l},e.button);return m(t?`dialog`:`div`,{class:`wui-tour-card wui-tour-end`,"data-layout":`center`,"data-next":o||void 0,role:`dialog`,tabindex:-1,"aria-labelledby":`${n}-title`,"aria-describedby":`${n}-message`},m(`div`,{class:`wui-tour-end-mark`,"aria-hidden":`true`},Me({viewBox:`0 0 24 24`,focusable:`false`},[[`path`,{d:`M5 12.5l4.5 4.5L19 7.5`}]])),m(`h2`,{class:`wui-tour-title wui-tour-end-title`,id:`${n}-title`},e.title),m(`p`,{class:`wui-tour-text wui-tour-end-message`,id:`${n}-message`},e.message),m(`div`,{class:`wui-tour-actions`},a,s))}var lt=e=>e.button===0&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey;function ut(e,t,n){let r=e.ownerDocument,i=ct(t,e.getRootNode()===r),a=K(i,`.wui-tour-end-button`,HTMLButtonElement),o=i.querySelector(`.wui-tour-end-next`);if(o!==null&&!(o instanceof HTMLAnchorElement))throw Error(`The end dialog's next link is not a link.`);let s=o,c=s??a,l=new AbortController,u=i instanceof HTMLDialogElement?i:null,d=null;return new Promise(o=>{let f=e=>{if(l.abort(),d&&u){let e=d;d=null,se(u).then(e)}o(e)};if(n?.aborted){f(`done`);return}let p=K(e,`.wui-tour-card:not(.wui-tour-end)`,HTMLElement),m=K(e,`.wui-tour-spot`,HTMLElement),h=K(e,`[role=status]`,HTMLElement),g={signal:l.signal};n?.addEventListener(`abort`,()=>f(`done`),g),a.addEventListener(`click`,()=>f(`done`),g),s&&s.addEventListener(`click`,e=>{lt(e)&&(e.preventDefault(),f(`next`))},g),r.addEventListener(`keydown`,e=>{if(!(e.altKey||e.ctrlKey||e.metaKey)){if(e.key===`Escape`){if(d)return;e.preventDefault(),e.stopPropagation(),f(`done`)}else je(e)&&s&&!e.shiftKey&&(e.composedPath?.()[0]??e.target)===s&&(e.preventDefault(),f(`next`))}},{capture:!0,signal:l.signal});let _=()=>{l.signal.aborted||(p.hidden=!0,$e(m,p,null),e.append(i),He(i),u&&(d=oe(u,{escape:!0,backdrop:null,focus:`first-control`,onRequestClose:()=>f(`done`)})),h.textContent=[t.title,t.message].filter(Boolean).join(`. `),c.focus())},v=Ue(p);v===null?_():v.then(_)})}var dt=` :host { all: initial; display: revert-layer; position: fixed; inset: 0; ${Object.entries({"--wui-z-tour":`1550`,"--wui-radius-sm":`8px`,"--wui-radius-2xl":`18px`,"--wui-shadow-popover":`0px 8px 28px -6px rgba(7, 20, 55, 0.14)`,"--wui-ease-out":`cubic-bezier(0.22, 1, 0.36, 1)`,"--wui-ease-linear":`cubic-bezier(0, 0, 1, 1)`,"--wui-duration-fast":`150ms`,"--wui-duration-default":`250ms`,"--wui-duration-slow":`400ms`,"--wui-space-xs":`4px`,"--wui-tour-motion-duration":`200ms`,"--wui-tour-motion-ease":`cubic-bezier(0.22, 1, 0.36, 1)`,"--wui-tour-spot-duration":`240ms`,"--wui-tour-spot-ease":`cubic-bezier(0.32, 0.72, 0, 1)`,"--color-primary":`#4F46E5`,"--color-primary-hover":`#4338CA`,"--color-primary-text":`#4F46E5`,"--color-focus-ring":`#4F46E5`,"--wui-focus-ring-width":`2px`,"--wui-focus-ring-offset":`2px`,"--color-on-primary":`#FFFFFF`,"--color-success-soft":`#E8FAEE`,"--color-success-text":`#0e7531`,"--color-on-scrim":`#FFFFFF`,"--color-scrim-strong":`color-mix(in srgb, #071437 62%, transparent)`,"--color-surface":`#FFFFFF`,"--color-text":`#071437`,"--color-text-muted":`#4B5675`,"--color-border":`#EBEDF3`,"--color-bg-muted":`#F5F6FA`}).map(([e,t])=>` ${e}: ${t};`).join(` `)} } *, *::before, *::after { box-sizing: border-box; } [hidden] { display: none !important; } .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; } .btn { display: inline-block; margin: 0; padding: 0.25rem 0.5rem; border: 1px solid transparent; border-radius: 0.375rem; background: transparent; font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1.5; text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer; } .btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; } .btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-on-primary); } .btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); } .btn-outline-neutral { border-color: var(--color-text-muted); color: var(--color-text-muted); } .btn-outline-neutral:hover { background: var(--color-bg-muted); color: var(--color-text); } .btn-link { font-weight: 400; color: var(--color-primary-text); text-decoration: underline; } .btn-link:hover { color: var(--color-primary-hover); } .wui-tour-layer { pointer-events: none; font-family: "Webority Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 1.5; color: var(--color-text); text-align: start; } .wui-tour-card { pointer-events: auto; } .wui-tour-layer { position: fixed; inset: 0; z-index: var(--wui-z-tour); width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: visible; background: none; } .wui-tour-spot { position: fixed; box-shadow: 0 0 0 2px var(--color-primary), 0 0 4px 2px color-mix(in srgb, var(--color-primary) 30%, transparent), 0 0 0 100vmax var(--color-scrim-strong); pointer-events: none; } .wui-tour-card { display: flex; flex-direction: column; gap: 8px; width: min(360px, 100vw - 16px); padding: 16px; overflow-y: auto; background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); border-radius: var(--wui-radius-2xl); corner-shape: squircle; box-shadow: var(--wui-shadow-popover); } .wui-tour-card:focus { outline: none; } .wui-tour-card:focus-visible { outline: var(--wui-focus-ring-width) solid var(--color-focus-ring); outline-offset: var(--wui-focus-ring-offset); } .wui-tour-title { margin: 0; font-size: 16px; font-weight: 600; } .wui-tour-text { margin: 0; font-size: 14px; color: var(--color-text-muted); } .wui-tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; } .wui-tour-nav { display: flex; gap: 8px; } .wui-tour-skip { color: var(--color-text-muted); } .wui-tour-back, .wui-tour-next { min-width: 64px; } @keyframes wui-tour-fade-in { from { opacity: 0; } to { opacity: 1; } } @keyframes wui-tour-card-enter { from { opacity: 0; scale: 0.96; translate: var(--wui-tour-card-lift, 0 6px); } to { opacity: 1; scale: 1; translate: 0 0; } } .wui-tour-layer[data-state=leaving], .wui-tour-card[data-state=leaving] { opacity: 0; } .wui-tour-layer[data-state=leaving], .wui-tour-layer[data-state=leaving] * { pointer-events: none; } @media (prefers-reduced-motion: no-preference) { .wui-tour-layer { animation: wui-tour-fade-in var(--wui-tour-motion-duration) var(--wui-tour-motion-ease); } .wui-tour-layer[data-state=leaving] { transition: opacity var(--wui-tour-motion-duration) var(--wui-tour-motion-ease); } .wui-tour-spot { transition: top var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), left var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), width var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), height var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), border-radius var(--wui-tour-spot-duration) var(--wui-tour-spot-ease); } .wui-tour-spot[data-tracking] { transition: none; } .wui-tour-card { --wui-tour-card-lift: 0 6px; transform-origin: top center; } .wui-tour-card[data-placement=top] { --wui-tour-card-lift: 0 -6px; transform-origin: bottom center; } .wui-tour-card[data-placement=bottom] { --wui-tour-card-lift: 0 6px; transform-origin: top center; } .wui-tour-card[data-placement=left] { --wui-tour-card-lift: -6px 0; transform-origin: right center; } .wui-tour-card[data-placement=right] { --wui-tour-card-lift: 6px 0; transform-origin: left center; } .wui-tour-card[data-placement=overlap], .wui-tour-card[data-placement=center] { --wui-tour-card-lift: 0 0; transform-origin: center; } .wui-tour-card[data-state=entering] { animation: wui-tour-card-enter var(--wui-tour-motion-duration) var(--wui-tour-motion-ease) var(--wui-tour-card-delay, 0ms) both; } .wui-tour-card[data-state=leaving] { transition: opacity calc(var(--wui-tour-motion-duration) / 2) var(--wui-tour-motion-ease); } } @media (prefers-reduced-motion: reduce) { .wui-tour-layer { animation: wui-tour-fade-in var(--wui-duration-fast) var(--wui-ease-linear); } .wui-tour-layer[data-state=leaving] { transition: opacity var(--wui-duration-fast) var(--wui-ease-linear); } .wui-tour-card[data-state=entering] { animation: wui-tour-fade-in var(--wui-duration-fast) var(--wui-ease-linear) both; } } .wui-tour-progress-bar { display: flex; gap: 4px; } .wui-tour-progress-segment { flex: 1 1 0; height: 4px; border-radius: 999px; background: var(--color-border); } .wui-tour-progress-segment[data-filled] { background: var(--color-primary); } .wui-tour-position { margin: 0; font-size: 12px; color: var(--color-text-muted); } .wui-tour-layer { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); } .wui-tour-card:has(.wui-tour-arrow:not([hidden])) { overflow: visible; } .wui-tour-arrow { position: absolute; width: 8px; height: 8px; background: var(--color-surface); border: 1px solid var(--color-border); rotate: 45deg; pointer-events: none; } .wui-tour-card[data-placement=bottom] .wui-tour-arrow { top: -5px; border-right-color: rgba(0, 0, 0, 0); border-bottom-color: rgba(0, 0, 0, 0); } .wui-tour-card[data-placement=top] .wui-tour-arrow { bottom: -5px; border-top-color: rgba(0, 0, 0, 0); border-left-color: rgba(0, 0, 0, 0); } .wui-tour-card[data-placement=right] .wui-tour-arrow { left: -5px; border-top-color: rgba(0, 0, 0, 0); border-right-color: rgba(0, 0, 0, 0); } .wui-tour-card[data-placement=left] .wui-tour-arrow { right: -5px; border-bottom-color: rgba(0, 0, 0, 0); border-left-color: rgba(0, 0, 0, 0); } @media (max-width: 575.98px) { .wui-tour-card { width: calc(100vw - 16px); } .wui-tour-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; } } .wui-tour-media { position: relative; order: -1; flex: none; aspect-ratio: 16/9; margin: -16px -16px 4px; overflow: hidden; background: var(--color-border); } .wui-tour-media>img, .wui-tour-media>video { display: block; width: 100%; height: 100%; object-fit: cover; } .wui-tour-card[data-welcome] { width: min(420px, 100vw - 16px); } .wui-tour-media-toggle { position: absolute; inset-block-end: 8px; inset-inline-end: 8px; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--color-scrim-strong); color: var(--color-on-scrim); cursor: pointer; } .wui-tour-media-toggle>svg { width: 20px; height: 20px; fill: currentColor; } .wui-tour-media-toggle:focus-visible { outline: 2px solid var(--color-on-scrim); outline-offset: var(--wui-focus-ring-offset); } .wui-tour-layer[data-advance] { pointer-events: none; } .wui-tour-layer[data-advance]:not([data-state=leaving]) .wui-tour-card { pointer-events: auto; } .wui-tour-layer[data-advance]:not([data-state=leaving]) .wui-tour-spot::before { content: ""; position: absolute; inset: -100vmax; pointer-events: auto; clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 100vmax 100vmax, calc(100% - 100vmax) 100vmax, calc(100% - 100vmax) calc(100% - 100vmax), 100vmax calc(100% - 100vmax), 100vmax 100vmax); } .wui-tour-hint { margin: 0; font-size: 14px; font-weight: 600; color: var(--color-text); } .wui-tour-pointer { position: absolute; top: 50%; left: 50%; width: 18px; height: 24px; pointer-events: none; } .wui-tour-pointer::before { content: ""; position: absolute; inset: 0; background: var(--color-primary); clip-path: polygon(0 0, 0 75%, 28% 58%, 46% 100%, 62% 92%, 45% 52%, 85% 52%); filter: drop-shadow(1px 0 0 var(--color-surface)) drop-shadow(-1px 0 0 var(--color-surface)) drop-shadow(0 1px 0 var(--color-surface)) drop-shadow(0 -1px 0 var(--color-surface)); } .wui-tour-pointer::after { content: ""; position: absolute; top: -16px; left: -16px; width: 32px; height: 32px; border-radius: 50%; background: var(--color-primary); opacity: 0; display: none; } @media (max-width: 575.98px) { .wui-tour-pointer { width: 24px; height: 24px; translate: -50% -50%; } .wui-tour-pointer::before { clip-path: none; border-radius: 50%; box-shadow: 0 0 0 2px var(--color-surface); filter: none; } .wui-tour-pointer::after { top: -4px; left: -4px; } } @keyframes wui-tour-tap { 0% { opacity: 0; transform: translate(56px, 44px) scale(1); } 10% { opacity: 1; transform: translate(56px, 44px) scale(1); } 45% { transform: translate(0, 0) scale(1); } 52% { transform: translate(0, 0) scale(0.86); } 60% { transform: translate(0, 0) scale(1); } 85% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(0, 0) scale(1); } } @keyframes wui-tour-tap-rtl { 0% { opacity: 0; transform: translate(-56px, 44px) scale(1); } 10% { opacity: 1; transform: translate(-56px, 44px) scale(1); } 45% { transform: translate(0, 0) scale(1); } 52% { transform: translate(0, 0) scale(0.86); } 60% { transform: translate(0, 0) scale(1); } 85% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(0, 0) scale(1); } } @keyframes wui-tour-ripple { 0%, 50% { opacity: 0; transform: scale(0.2); } 52% { opacity: 0.35; transform: scale(0.2); } 80%, 100% { opacity: 0; transform: scale(1); } } @media (prefers-reduced-motion: no-preference) { .wui-tour-pointer { opacity: 0; animation: wui-tour-tap calc(var(--wui-duration-slow) * 6) var(--wui-ease-out) var(--wui-tour-spot-duration) infinite; } .wui-tour-pointer:dir(rtl) { animation-name: wui-tour-tap-rtl; } .wui-tour-pointer::after { display: block; animation: wui-tour-ripple calc(var(--wui-duration-slow) * 6) var(--wui-ease-out) var(--wui-tour-spot-duration) infinite; } } @keyframes wui-tour-check { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } } .wui-tour-end[data-layout=center] { --wui-tour-card-lift: 0 0; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); transform-origin: center; align-items: center; gap: 8px; width: min(420px, 100vw - 16px); max-height: calc(100vh - 16px); padding: 24px; text-align: center; } .wui-tour-end[data-layout=center] .wui-tour-actions { justify-content: center; margin-top: 8px; } .wui-tour-end[data-layout=center][data-next] .wui-tour-actions { flex-direction: column; align-items: stretch; width: 100%; gap: var(--wui-space-xs); } .wui-tour-end-mark { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--color-success-soft); color: var(--color-success-text); } .wui-tour-end-mark>svg { width: 26px; height: 26px; } .wui-tour-end-mark path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; } .wui-tour-end-title { font-size: 18px; } .wui-tour-end-message { text-wrap: balance; } .wui-tour-end-next { text-wrap: balance; } .wui-tour-end-button { min-width: 120px; } @media (prefers-reduced-motion: no-preference) { .wui-tour-end-mark path { animation: wui-tour-check var(--wui-duration-default) var(--wui-ease-out) calc(var(--wui-tour-card-delay, 0ms) + var(--wui-duration-fast)) both; } } `,ft=()=>E(`tour`,O),pt=`wui-tour-media`,mt=`wui-tour-media-toggle`,ht=`http://www.w3.org/2000/svg`,gt=`M6 5h4v14H6zM14 5h4v14h-4z`,_t=`M8 5v14l11-7z`,vt=()=>({pause:ft().mediaPauseLabel,play:ft().mediaPlayLabel}),yt=()=>globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches===!0;function bt(e){let t=document.createElementNS(ht,`svg`);t.setAttribute(`viewBox`,`0 0 24 24`),t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`focusable`,`false`);let n=document.createElementNS(ht,`path`);return n.setAttribute(`d`,e),t.appendChild(n),t}function xt(e){let t=document.createElement(`img`);return t.setAttribute(`alt`,e.mediaAlt??``),t.setAttribute(`width`,`1280`),t.setAttribute(`height`,`720`),t.setAttribute(`loading`,`lazy`),t.setAttribute(`decoding`,`async`),t.setAttribute(`src`,e.media??``),t}function St(e,t){let n=document.createElement(`video`);return n.muted=!0,n.setAttribute(`muted`,``),n.loop=!0,n.setAttribute(`playsinline`,``),t&&n.setAttribute(`autoplay`,``),n.setAttribute(`preload`,t?`auto`:`metadata`),e.mediaAlt&&n.setAttribute(`aria-label`,e.mediaAlt),e.mediaPoster&&n.setAttribute(`poster`,e.mediaPoster),n.setAttribute(`src`,e.media??``),n}function Ct(e,t){let n=document.createElement(`button`);n.type=`button`,n.className=mt;let r=(r=!e.paused)=>{n.setAttribute(`aria-label`,r?t.pause:t.play),n.replaceChildren(bt(r?gt:_t))};return e.addEventListener(`play`,()=>r()),e.addEventListener(`pause`,()=>r()),n.addEventListener(`click`,()=>{e.paused?e.play()?.catch(()=>r()):e.pause()}),r(e.hasAttribute(`autoplay`)),n}function wt(e){let t=e.querySelector(`:scope > .${pt}`);if(!t)return;let n=t.querySelector(`video`);n&&(n.pause(),n.removeAttribute(`src`),n.load()),t.remove()}function Tt(e,t,n=vt()){if(wt(e),!t.media){e.removeAttribute(`data-media`);return}let r=document.createElement(`div`);if(r.className=pt,t.mediaType===`video`){let e=St(t,!yt());r.append(e,Ct(e,n))}else r.appendChild(xt(t));e.prepend(r),e.setAttribute(`data-media`,t.target?`step`:`welcome`)}var Et=`data-wui-tour-open`,Dt=()=>E(`tour`,O);function Ot(e){let t=new Set;return{drop:e=>{t.add(e)},position:e=>{t.delete(e);let n=0;for(let r of t)r<e&&n++;return e+1-n},total:()=>e-t.size}}function kt(e,t,n){return(e.getAttribute(`progress-label`)||Dt().progressLabel).replace(/\{(current|total)\}/g,(e,r)=>String(r===`current`?t:n))}function At(e,{text:t,position:n,total:r}){let i=e.querySelector(`.wui-tour-position`);if(!(i instanceof HTMLElement))throw Error(`tour position label missing`);i.textContent=t;let a=e.querySelector(`.wui-tour-progress-bar`);if(!a){let t=e.ownerDocument,n=t.createElement(`div`);n.className=`wui-tour-progress`,n.setAttribute(`aria-hidden`,`true`),a=t.createElement(`div`),a.className=`wui-tour-progress-bar`,n.append(a),i.before(n)}let o=a.children;for(;o.length<r;){let t=e.ownerDocument.createElement(`span`);t.className=`wui-tour-progress-segment`,a.append(t)}for(;o.length>r;){let e=a.lastElementChild;if(!e)throw Error(`progress bar segment missing`);e.remove()}for(let e=0;e<o.length;e++){let t=o[e];if(!t)throw Error(`progress bar segment missing`);t.toggleAttribute(`data-filled`,e<n)}}var jt=`wui-tour-seen:`;function Mt(e=jt,t=globalThis.localStorage){return{isSeen:async n=>t.getItem(e+n)===`1`,markSeen:async n=>{t.setItem(e+n,`1`)}}}function q(e){"@babel/helpers - typeof";return q=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},q(e)}function Nt(e,t){if(q(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(q(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Pt(e){var t=Nt(e,`string`);return q(t)==`symbol`?t:t+``}function J(e,t,n){return(t=Pt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ft=`wui-tour-step`,It=`wui-tour-host`,Y=`data-tracking`,X=()=>E(`tour`,O),Lt=()=>({back:X().backLabel,next:X().nextLabel,skip:X().skipLabel,done:X().doneLabel,mediaPause:X().mediaPauseLabel,mediaPlay:X().mediaPlayLabel,endTitle:X().endTitle,endMessage:X().endMessage,endButton:X().doneLabel}),Rt={back:`back-label`,next:`next-label`,skip:`skip-label`,done:`done-label`,mediaPause:`media-pause-label`,mediaPlay:`media-play-label`,endTitle:`end-title`,endMessage:`end-message`,endButton:`end-button`},zt=[[`media`,`media`],[`mediaAlt`,`media-alt`],[`mediaPoster`,`media-poster`],[`mediaType`,`media-type`],[`advanceOn`,`advance-on`],[`actionLabel`,`action-label`]],Bt={index:null,position:null,total:null},Vt=0,Z=e=>!e?.isConnected||getComputedStyle(e).visibility===`hidden`?!1:e.getClientRects().length>0,Ht=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));function Q(e,t,n){let r=e.querySelector(t);if(!(r instanceof n))throw Error(`<wui-tour> layer has no ${t}`);return r}var Ut=()=>{let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e},$=null;function Wt(e){$||($=new CSSStyleSheet,$.replaceSync(dt)),e.adoptedStyleSheets=[$]}var Gt=class extends r{static get observedAttributes(){return[`open`]}constructor(){super(),J(this,`seenStore`,void 0),J(this,`onBeforeStep`,void 0),J(this,`_run`,void 0),J(this,`_running`,void 0),J(this,`_layer`,void 0),J(this,`_outer`,void 0),J(this,`_shadow`,void 0),J(this,`_unbindAdvance`,void 0),J(this,`_ending`,void 0),J(this,`_seenMark`,void 0),J(this,`_steps`,[]),J(this,`_progress`,Ot(0)),J(this,`_firstIndex`,0),J(this,`_returnFocus`,null),J(this,`_current`,null),J(this,`_moving`,!1),J(this,`_card`,null),J(this,`_spot`,null),J(this,`_live`,null),J(this,`_onKey`,null),J(this,`_onFocusIn`,null),this.seenStore=null,this.onBeforeStep=null,this._run=0,this._running=!1,this._layer=null,this._outer=null,this._shadow=null,this._unbindAdvance=null,this._ending=null,this._seenMark=null}connectedCallback(){this.hasAttribute(`open`)&&this.start()}disconnectedCallback(){this.stop()}attributeChangedCallback(e,t,n){e===`open`&&this.isConnected&&(n===null?this.stop():this.start())}get tourId(){return this.getAttribute(`tour-id`)||``}set tourId(e){e==null||e===``?this.removeAttribute(`tour-id`):this.setAttribute(`tour-id`,String(e))}get isolated(){return this.hasAttribute(`isolated`)}set isolated(e){this.toggleAttribute(`isolated`,e===!0||e===``||e===`true`)}_stepList(){return Array.from(this.querySelectorAll(`:scope > ${Ft}`),e=>{let t={target:e.getAttribute(`target`)||``,title:e.getAttribute(`title`)||void 0,description:(e.textContent??``).trim()};for(let[n,r]of zt)e.hasAttribute(r)&&(t[n]=e.getAttribute(r)??``);return t})}_stepAt(e){let t=this._steps[e];if(!t)throw RangeError(`<wui-tour> has no step ${e}; it has ${this._steps.length}.`);return t}_store(){return this.seenStore?this.seenStore:this.getAttribute(`seen-store`)===`local`?Mt():null}_label(e){return this.getAttribute(Rt[e])||Lt()[e]}_endDialogText(){if(this.getAttribute(`end-dialog`)===`false`)return null;let e=(this.getAttribute(`end-next-label`)??``).trim(),t=(this.getAttribute(`end-next-href`)??``).trim();return{title:this._label(`endTitle`),message:this._label(`endMessage`),button:this._label(`endButton`),nextLabel:e,nextHref:t}}_markSeen(e){let t=this._store();return t?t.markSeen(this.tourId,e):null}async start(){if(this._running)return;this._running=!0;let e=++this._run;this.hasAttribute(`open`)||this.setAttribute(`open`,``);try{await this._start(e)}catch(t){throw e===this._run&&(this._running=!1),t}}async _start(e){this._steps=this._stepList(),this._progress=Ot(this._steps.length);let t=this._store();if(t&&!this.tourId)throw Error(`<wui-tour> needs a tour-id to use a seen store.`);if(t&&await t.isSeen(this.tourId)){e===this._run&&this._finish(`alreadySeen`);return}for(let[e,t]of this._steps.entries())t.target&&!Z(document.querySelector(t.target))&&this._progress.drop(e);this._returnFocus=document.activeElement;let n=await this._locate(0,1,e);e===this._run&&(n?(this._firstIndex=n.index,this.dispatchEvent(new CustomEvent(`wui-tour:start`,{bubbles:!0,detail:{total:this._progress.total()}})),e===this._run&&(this._build(),this._show(n))):this._finish(`noTargets`))}next(){return this._move(1)}back(){return!this._current||this._current.index<=this._firstIndex?Promise.resolve():this._move(-1)}async goTo(e){if(this._current){if(!Number.isInteger(e)||e<0||e>=this._steps.length)throw RangeError(`<wui-tour> has no step ${e}; it has ${this._steps.length}.`);await this._go(e,1)}}stop(){this._running&&(this._run++,this._teardown(),this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`))}async _locate(e,t,n){let r=this._steps;for(let i=e;i>=0&&i<r.length;i+=t){let e=r[i];if(!e)break;if(await this._beforeStep(e,i),n!==this._run)return null;if(!e.target)return{index:i,target:null};let t=document.querySelector(e.target),a=t instanceof HTMLElement||t instanceof SVGElement?t:null;if(Z(a))return this._progress.position(i),{index:i,target:a};this._progress.drop(i)}return null}async _beforeStep(e,t){let n=[];this.dispatchEvent(new CustomEvent(`wui-tour:beforestep`,{bubbles:!0,detail:{step:e,index:t,wait:e=>n.push(e)}})),await Promise.all(n),typeof this.onBeforeStep==`function`&&await this.onBeforeStep(e,t)}_build(){let e=`wui-tour-${++Vt}`,t=document.createElement(`div`);t.className=`wui-tour-layer`,t.replaceChildren(m(`div`,{class:`wui-tour-spot`,"aria-hidden":`true`}),m(`div`,{class:`wui-tour-card`,role:`dialog`,tabindex:`-1`,"aria-labelledby":`${e}-title`,"aria-describedby":`${e}-text`},m(`p`,{class:`wui-tour-position`}),m(`h2`,{class:`wui-tour-title`,id:`${e}-title`}),m(`p`,{class:`wui-tour-text`,id:`${e}-text`}),m(`div`,{class:`wui-tour-actions`},m(`button`,{type:`button`,class:`btn btn-sm btn-link wui-tour-skip`}),m(`div`,{class:`wui-tour-nav`},m(`button`,{type:`button`,class:`${p(`neutral`,`outline`,`sm`)} wui-tour-back`,"data-wui":l}),m(`button`,{type:`button`,class:`${p(`primary`,`solid`,`sm`)} wui-tour-next`,"data-wui":l})))),m(`div`,{class:`visually-hidden`,role:`status`,"aria-live":`polite`}));let n=t;this._shadow=null,this.isolated&&(n=document.createElement(It),this._shadow=n.attachShadow({mode:`open`}),Wt(this._shadow),this._shadow.appendChild(t)),n.setAttribute(`popover`,`manual`),T(document).appendChild(n),document.documentElement.setAttribute(Et,``),this._outer=n,this._layer=t;let r=Q(t,`.wui-tour-spot`,HTMLDivElement),i=Q(t,`.wui-tour-card`,HTMLDivElement),a=Q(t,`[role=status]`,HTMLElement);this._spot=r,this._card=i,this._live=a,Q(i,`.wui-tour-skip`,HTMLElement).addEventListener(`click`,()=>this._close(`skipped`,`button`)),Q(i,`.wui-tour-back`,HTMLElement).addEventListener(`click`,()=>this._move(-1)),Q(i,`.wui-tour-next`,HTMLElement).addEventListener(`click`,()=>this._move(1));let s=e=>this._key(e);this._onKey=s;let c=e=>{let t=this._layer;if(!t||this._ending)return;let n=this._current,r=n?this._stepAt(n.index):null;if(!(e.target instanceof Node))throw Error(`<wui-tour> saw a focus change from a non-node target`);Oe(t,r,n?.target??null,e.target)||i.focus()};this._onFocusIn=c,document.addEventListener(`keydown`,s,!0),this._shadow||document.addEventListener(`focusin`,c),o(n,()=>this._follow())}_active(){return this._shadow?this._shadow.activeElement:document.activeElement}_raise(){let e=this._outer;if(!e)throw Error(`<wui-tour> raises a step before its host is built`);let t=T(this.ownerDocument);e.parentElement!==t&&t.appendChild(e),ce(e)}_show(e){this._current=e;let{index:t,target:n}=e,r=this._stepAt(t),i=this._layer,a=this._spot,o=this._card,s=this._live;if(!i||!a||!o||!s)throw Error(`<wui-tour> shows a step before its layer is built`);this._raise();let c=this._progress.position(t),l=this._progress.total(),u=c===l&&!this._endDialogText(),d=kt(this,c,l);At(o,{text:d,position:c,total:l}),Tt(o,r,{pause:this._label(`mediaPause`),play:this._label(`mediaPlay`)}),o.toggleAttribute(`data-welcome`,!n);let f=F(this,{layer:i,spot:a,card:o},r,n),p=Q(o,`.wui-tour-title`,HTMLElement);p.textContent=r.title||``,p.hidden=!r.title,Q(o,`.wui-tour-text`,HTMLElement).textContent=r.description||``,Q(o,`.wui-tour-skip`,HTMLElement).textContent=this._label(`skip`);let m=Q(o,`.wui-tour-back`,HTMLElement);m.textContent=this._label(`back`),m.hidden=t<=this._firstIndex,Q(o,`.wui-tour-next`,HTMLElement).textContent=this._label(u?`done`:`next`);let h=[d,r.title,r.description].filter(Boolean).join(`. `);s.textContent=f?[h,f].join(/[.!?]$/.test(h)?` `:`. `):h,Qe(o,n),a.removeAttribute(Y),this._place(),He(o),this._unbindAdvance?.(),this._unbindAdvance=De(r,n,()=>void this._move(1));let g=this._active();(g!==null&&o.contains(g)?!(g instanceof HTMLElement&&g.hidden):this._shadow!==null&&Ht(Ut()))||o.focus(),this.dispatchEvent(new CustomEvent(`wui-tour:step`,{bubbles:!0,detail:{step:r,index:t,position:c,total:l}}))}_place(){if(!this._current||!this._layer)return;let e=this._spot,t=this._card;if(!e||!t)throw Error(`<wui-tour> places a step before its layer is built`);$e(e,t,this._current.target)}_follow(){if(!this._current||!this._layer||this._ending)return;let e=this._spot;if(!e)throw Error(`<wui-tour> follows a step before its spot is built`);let t=e.style.cssText;this._place(),e.style.cssText!==t&&e.setAttribute(Y,``)}async _move(e){this._current&&await this._go(this._current.index+e,e)}async _go(e,t){if(!this._current||this._moving)return;this._moving=!0;let n=this._run;try{let r=await this._locate(e,t,n);if(n!==this._run)return;if(r){let e=this._card;if(!e)throw Error(`<wui-tour> moved with no card showing`);let t=Ue(e);if(t!==null&&await t,n!==this._run)return;this._show(r)}else if(t>0){let e=this._endDialogText(),t=e?await this._showEnd(e):`done`;if(n!==this._run)return;let r=await this._close(t===`next`?`next`:`finished`);if(t===`next`&&r&&e){let t=this.ownerDocument.defaultView;if(!t)throw Error(`<wui-tour> has no window to follow its next link in`);t.location.assign(e.nextHref)}}}finally{this._moving=!1}}_showEnd(e){this._unbindAdvance?.(),this._unbindAdvance=null;let t=this._layer,n=this._spot,r=this._card;if(!t||!n||!r)throw Error(`<wui-tour> ends a tour before its layer is built`);return F(this,{layer:t,spot:n,card:r},null,null),n.removeAttribute(Y),this._ending=new AbortController,this._seenMark=this._markSeen(`finished`),ut(t,e,this._ending.signal)}_key(e){if(!this._layer||this._ending||e.altKey||e.ctrlKey||e.metaKey)return;let t=a(e.key,i(this));if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),this._close(`skipped`,`escape`);else if(t===`ArrowRight`||t===`ArrowLeft`){if(Ht(e.composedPath?.()[0]??e.target))return;if(e.preventDefault(),t===`ArrowRight`)this._move(1);else{let e=this._current;if(!e)throw Error(`<wui-tour> moved back with no step showing`);e.index>this._firstIndex&&this._move(-1)}}else if(e.key===`Tab`&&!this._shadow){let t=this._current,n=this._card;if(!t||!n)throw Error(`<wui-tour> cycled focus with no step showing`);ke(e,{card:n,active:this._active(),step:this._stepAt(t.index),target:t.target})}}_teardown(){if(!this._layer)return;this._onKey&&document.removeEventListener(`keydown`,this._onKey,!0),this._onFocusIn&&document.removeEventListener(`focusin`,this._onFocusIn);let e=!this._shadow||this._shadow.activeElement!==null||!document.activeElement||document.activeElement===document.body;this._unbindAdvance?.(),this._unbindAdvance=null,this._ending?.abort(),this._ending=null,this._seenMark=null;let t=this._outer;if(s(t),!t)throw Error(`<wui-tour> has a layer with no host to remove`);We(t),document.documentElement.removeAttribute(Et),this._outer=null,this._shadow=null,this._layer=null,this._current=null;let n=this._returnFocus;this._returnFocus=null,e&&n?.isConnected&&(n instanceof HTMLElement||n instanceof SVGElement)&&n.focus()}async _close(e,t=null){let n=this._run,r=this._current,i=r?{index:r.index,position:this._progress.position(r.index),total:this._progress.total()}:Bt,a=this._seenMark;this._teardown();let o=e===`next`?`finished`:e,s=!1;try{n===this._run&&await(a??this._markSeen(o)),s=n===this._run}finally{this._finish(e,i,t)}return s}_finish(e,t=Bt,n=null){this._run++,this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`),this.dispatchEvent(new CustomEvent(`wui-tour:close`,{bubbles:!0,detail:{reason:e,...t,via:n}}))}},Kt=class extends r{constructor(){super(),this.shadowRoot||this.attachShadow({mode:`open`})}};return t(`wui-tour`,Gt),t(`wui-tour-step`,Kt),e.WuiTourStep=Kt,e})({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/ui-elements",
3
- "version": "0.198.0",
3
+ "version": "0.199.1",
4
4
  "description": "Webority framework-agnostic UI custom elements (<wui-*>): the single implementation of the interactive components, styled by @webority/theme. Used natively in Razor and wrapped by @webority/ui-react.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -295,10 +295,10 @@
295
295
  "@tiptap/starter-kit": "3.31.4",
296
296
  "@types/node": "25.6.0",
297
297
  "@vitest/coverage-v8": "5.1.0",
298
- "@webority/biome-config": "0.198.0",
299
- "@webority/markdown-core": "0.198.0",
300
- "@webority/theme": "0.198.0",
301
- "@webority/web-core": "0.198.0",
298
+ "@webority/biome-config": "0.199.1",
299
+ "@webority/markdown-core": "0.199.1",
300
+ "@webority/theme": "0.199.1",
301
+ "@webority/web-core": "0.199.1",
302
302
  "echarts": "6.1.0",
303
303
  "jsdom": "30.1.1",
304
304
  "libphonenumber-js": "^1.13.9",
@@ -46,5 +46,6 @@ export declare class WuiModal extends ElementBase {
46
46
  _announceOpened(): void;
47
47
  _requestClose(reason: OverlayCloseReason): void;
48
48
  _releaseDialog(): void;
49
+ _card(dialog: HTMLDialogElement): HTMLElement;
49
50
  _dialog(): HTMLDialogElement;
50
51
  }
@@ -110,6 +110,8 @@ export type ChartSpec = {
110
110
  trend?: boolean;
111
111
  /** Print each value on its bar or point. Line, column and bar only; ignored on a stacked chart. Default on for a line, off otherwise. */
112
112
  valueLabels?: boolean;
113
+ /** "full" prints every number from a series or axis format in full (₹1,50,000); "compact" (default) shortens it (₹1.5L). */
114
+ valueFormat?: "compact" | "full";
113
115
  /** The last period is not finished: a column or bar draws it lighter, a line or area draws its last segment dashed, and its tooltip says so far. Line, area, column and bar only; a stacked line or area ignores it. */
114
116
  incompleteLast?: boolean;
115
117
  /** A zoom slider under a line or area. Default: on above 5,000 rows. */
@@ -186,6 +188,7 @@ export type NormalizedSpec = {
186
188
  centerLabel: string;
187
189
  sliceValues: boolean;
188
190
  valueLabels: boolean;
191
+ valueFormat: "compact" | "full";
189
192
  incompleteLast: boolean;
190
193
  height: number;
191
194
  state: ChartState;
@@ -383,7 +386,9 @@ export declare function fileStem(spec: NormalizedSpec | null | undefined): strin
383
386
  * the legend entries switched off, so the description matches what is drawn.
384
387
  */
385
388
  export declare function summaryText(spec: NormalizedSpec, hidden?: Set<string>): string;
386
- /** The y axis' tick format: the compact form of the value format, or percent for a percent stack. */
389
+ /** The format a printed number uses: the compact form of a format, or the format itself when the spec asks for full values. */
390
+ export declare function printFormatOf(spec: NormalizedSpec, format?: FormatSpec): ReturnType<typeof compactFormatOf>;
391
+ /** The y axis' tick format: the print format of the value format, or percent for a percent stack. */
387
392
  export declare function axisFormat(spec: NormalizedSpec): ReturnType<typeof compactFormatOf>;
388
393
  /**
389
394
  * Where the keyboard focus moves: { index, series } (series is the index into spec.series), or
@@ -8,8 +8,8 @@ export declare const CLOSE_MOTION_LIMIT_MS = 400;
8
8
  export interface ModalDialogOptions {
9
9
  /** False: Escape does not ask to close (sets closedby="none" and prevents `cancel`). */
10
10
  escape: boolean;
11
- /** False: a press outside the dialog's box does not ask to close. */
12
- backdrop: boolean;
11
+ /** The box the person sees: a press outside it asks to close. Null: a press outside does not ask to close. */
12
+ backdrop: HTMLElement | null;
13
13
  /** "first-control": [data-autofocus], else the first control that is not the close or back button, else the first close or back button. "panel": the dialog itself. */
14
14
  focus: "first-control" | "panel";
15
15
  /** The person asked to close. The dialog never closes itself: the owner answers by calling closeModalDialog. */
@@ -1 +0,0 @@
1
- import{t as e}from"./elementBase-Cxeyx0tU.js";import{h as t,o as n,p as r,u as i}from"./nativeOverlay-BHD2QV02.js";var a=class extends e{_doc;_release;_opener;_returnTo;_session;_closing;_reopen;static get observedAttributes(){return[`open`,`static`,`no-escape`]}constructor(){super(),this._doc=null,this._release=null,this._opener=null,this._returnTo=null,this._session=0,this._closing=!1,this._reopen=!1}connectedCallback(){this._doc=this.ownerDocument,t(this._doc),this.hasAttribute(`open`)&&this._open()}disconnectedCallback(){this._session++,this._closing=!1,this._reopen=!1;let e=this.querySelector(`dialog`);this._release&&e instanceof HTMLDialogElement&&e.close(),this._releaseDialog(),this._opener=null,this._returnTo=null,this._doc=null}attributeChangedCallback(e){this._doc&&e===`open`&&(this.hasAttribute(`open`)?this._open():this._close())}get isOpen(){return this.hasAttribute(`open`)}show(e){e&&(this._opener=e),this.setAttribute(`open`,``)}hide(){this.removeAttribute(`open`)}_open(){if(this._closing){this._reopen=!0;return}if(this._release)return;let e=++this._session,t=this._opener;if(this._returnTo=t,this._opener=null,this.dispatchEvent(new CustomEvent(`wui-modal-open`,{bubbles:!0,detail:{trigger:t}})),!this.isOpen)return;let n=this._dialog();this._release=i(n,{escape:!this.hasAttribute(`no-escape`),backdrop:!this.hasAttribute(`static`),focus:`first-control`,onRequestClose:e=>this._requestClose(e)}),this._settle(e,n)}_close(){if(this._closing){this._reopen=!1;return}if(!this._release)return;this._closing=!0;let e=this._session,t=this._dialog();n(t).then(()=>{e===this._session&&(this._closing=!1,this._releaseDialog(),r(this._returnTo,t),this._returnTo=null,this.dispatchEvent(new CustomEvent(`wui-modal-closed`,{bubbles:!0})),this._reopen&&(this._reopen=!1,this.isOpen&&this._open()))})}_settle(e,t){let n=t.getAnimations?.()??[];n.length?Promise.allSettled(n.map(e=>e.finished)).then(()=>{e===this._session&&this.isOpen&&this._announceOpened()}):this._announceOpened()}_announceOpened(){this.dispatchEvent(new CustomEvent(`wui-modal-opened`,{bubbles:!0}))}_requestClose(e){this.dispatchEvent(new CustomEvent(`wui-modal-close`,{bubbles:!0,cancelable:!0,detail:{reason:e}}))&&this.removeAttribute(`open`)}_releaseDialog(){let e=this._release;this._release=null,e?.()}_dialog(){let e=this.querySelector(`dialog`);if(!(e instanceof HTMLDialogElement))throw TypeError(`wui-modal has no <dialog>`);return e}};export{a as t};
@@ -1 +0,0 @@
1
- import{n as e,r as t}from"./anchorOverlay-daGdh_91.js";import{n,t as r}from"./buttonClass-C8BRtTk8.js";import{r as i}from"./dom-DMQu--xV.js";import{t as a}from"./elementBase-Cxeyx0tU.js";import{d as o,f as s,o as c,u as l}from"./nativeOverlay-BHD2QV02.js";import{n as u,t as d}from"./rtl-g7G8Bsib.js";import{r as f}from"./textStore-Dh5iyZSR.js";import{n as p,t as m}from"./tourAdvance.g-BJqDnqag.js";import{n as h}from"./imeSafeEnter-DeO_3lXy.js";import{n as g}from"./svgNodes-CaPMDvv7.js";import{t as _}from"./tourOpenMark-nPeAJFSo.js";import{t as v}from"./tourSeenStore-z0Y_Znzx.js";var y=`data-advance`,b=`wui-tour-hint`,x=`wui-tour-pointer`,ee=`a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]`,te=()=>f(`tourAdvance`,m),S=(e,t)=>e?.advanceOn===`click`&&!!t,C=e=>(e??``).replace(/\s+/g,` `).trim(),ne=e=>e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLMeterElement||e instanceof HTMLOutputElement||e instanceof HTMLProgressElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.labels:null,re=e=>e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLFieldSetElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement?e.disabled:!1;function ie(e){let t=e.ownerDocument,n=(e.getAttribute(`aria-labelledby`)||``).split(/\s+/).filter(Boolean),r=e instanceof HTMLInputElement&&/^(button|submit|reset)$/.test(e.type)?e.value:``,i=[n.map(e=>t.getElementById(e)?.textContent??``).join(` `),e.getAttribute(`aria-label`),Array.from(ne(e)??[],e=>e.textContent).join(` `),e.getAttribute(`alt`),r,e.textContent,e.getAttribute(`title`)];for(let e of i){let t=C(e);if(t)return t}return``}function ae(e){for(let t of[e,...e.querySelectorAll(ee)])if((t instanceof HTMLElement||t instanceof SVGElement)&&t.tabIndex>=0&&!re(t))return t;return null}function w(e,t,n){let r=(e.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(e=>e&&e!==t);n&&r.push(t),r.length>0?e.setAttribute(`aria-describedby`,r.join(` `)):e.removeAttribute(`aria-describedby`)}function oe(e,t){let n=e.querySelector(`.${b}`),r=e.querySelector(`.wui-tour-text`)?.id,i=r?`${r.replace(/-text$/,``)}-hint`:``;if(!t)n?.remove(),i&&w(e,i,!1);else{if(!n){n=e.ownerDocument.createElement(`p`),n.className=b,i&&(n.id=i);let t=e.querySelector(`.wui-tour-actions`);if(!t)throw Error(`Tour card has no actions row.`);t.before(n)}n.textContent=t,i&&w(e,i,!0)}}function se(e,t){let n=e.querySelector(`.${x}`);if(!t){n?.remove();return}if(n)return;let r=e.ownerDocument.createElement(`span`);r.className=x,r.setAttribute(`aria-hidden`,`true`),e.append(r)}var ce=e=>getComputedStyle(e).animationName;function T(e,{layer:t,spot:n,card:r},i,a){let o=S(i,a);t.toggleAttribute(y,o&&!(t.getRootNode()instanceof ShadowRoot)),n.hasAttribute(y)&&(n.removeAttribute(y),o&&ce(n)),o&&n.setAttribute(y,``),se(n,o);let s=r.querySelector(`.wui-tour-next`);if(!(s instanceof HTMLElement))throw Error(`Tour card has no next button.`);s.classList.toggle(`btn-primary`,!o),s.classList.toggle(`btn-link`,o);let c=o?C(i?.actionLabel)||ie(a):``,l=e.getAttribute(`advance-label`)||te().advanceLabel,u=c?l.replace(/\{actionName\}/g,()=>c):``;return oe(r,u),u}function le(e,t,n){if(!S(e,t))return()=>{};let r,i=()=>{r??=setTimeout(n,0)};return t.addEventListener(`click`,i),()=>{t.removeEventListener(`click`,i),clearTimeout(r)}}function ue(e,t,n,r){return e.contains(r)||S(t,n)&&n.contains(r)}function de(e,{card:t,active:n,step:r,target:i}){let a=Array.from(t.querySelectorAll(`button`)).filter(e=>!e.hidden),o=S(r,i)?ae(i):null;o&&a.push(o);let s=a.findIndex(e=>e===n||e===o&&i?.contains(n));e.preventDefault();let c=a[s===-1?e.shiftKey?a.length-1:0:(s+(e.shiftKey?-1:1)+a.length)%a.length];if(!c)throw Error(`Tour card has no focus stop.`);c.focus()}var fe=2/3,pe=1e3,me=/* @__PURE__ */ new Set([`top`,`left`,`width`,`height`]),E=/* @__PURE__ */ new WeakMap,D=(e,t)=>typeof e.getAnimations==`function`?e.getAnimations().filter(t):[],O=e=>`transitionProperty`in e&&e.transitionProperty===`opacity`,he=e=>`transitionProperty`in e&&typeof e.transitionProperty==`string`&&me.has(e.transitionProperty),ge=e=>`animationName`in e&&typeof e.animationName==`string`&&e.animationName.startsWith(`wui-tour-`);function k(e){return e.length===0?null:new Promise(t=>{let n=setTimeout(t,pe);Promise.allSettled(e.map(e=>e.finished)).then(()=>{clearTimeout(n),t()})})}function _e(e){let t=e.parentElement?.querySelector(`:scope > .wui-tour-spot`),n=0;for(let e of t?D(t,he):[]){let t=e.effect?.getComputedTiming?.();if(typeof t?.duration!=`number`)continue;let r=typeof e.currentTime==`number`?e.currentTime:0;n=Math.max(n,(t.delay??0)+t.duration*fe-r)}return n}function A(e){let t=_e(e);t>0?e.style.setProperty(`--wui-tour-card-delay`,`${Math.round(t)}ms`):e.style.removeProperty(`--wui-tour-card-delay`),e.dataset.state=`entering`;let n={};E.set(e,n);let r=()=>{E.get(e)===n&&e.dataset.state===`entering`&&(e.dataset.state=`shown`)},i=D(e,ge);i.length===0?r():Promise.allSettled(i.map(e=>e.finished)).then(r)}function j(e){return e.dataset.state=`leaving`,k(D(e,O))}function ve(e){let t=e.shadowRoot?.querySelector(`.wui-tour-layer`),n=e.classList.contains(`wui-tour-layer`)?e:t instanceof HTMLElement?t:null;n&&(n.dataset.state=`leaving`);let r=n?k(D(n,O)):null;r?(e.setAttribute(`inert`,``),r.then(()=>e.remove())):e.remove()}var ye=2,M=12,N=8,P=4,F=20,be=`(max-width: 575.98px)`,xe=[`bottom`,`top`,`right`,`left`],Se=[`bottom`,`top`,`left`,`right`],I=[`top-left`,`top-right`,`bottom-right`,`bottom-left`],L,R=(e,t,n)=>Math.max(t,Math.min(e,n)),z=(e,t,n,r)=>(Math.max(e,n)+Math.min(t,r))/2;function Ce(e,t){if(!t?.scrollIntoView)return;e.style.maxHeight=``;let n=V(e),r=e.offsetHeight+M;if(t.getBoundingClientRect().height+4+r*2<=n.bottom-n.top){t.scrollIntoView({block:`center`,inline:`nearest`});return}let i=t.style.scrollMarginTop;t.style.scrollMarginTop=`${n.top+r+ye}px`,t.scrollIntoView({block:`start`,inline:`nearest`}),t.style.scrollMarginTop=i}function B(e,t,n){let r=e.style,i=t.style,a=Oe(t);if(!n){r.top=`50%`,r.left=`50%`,r.width=`0px`,r.height=`0px`,r.boxShadow=`0 0 0 100vmax var(--color-scrim-strong)`;for(let e of I)r.removeProperty(`border-${e}-radius`),r.removeProperty(`corner-${e}-shape`);t.dataset.placement=`center`,a.hidden=!0,i.position=`fixed`,i.top=`50%`,i.left=`50%`,i.transform=`translate(-50%, -50%)`,i.maxHeight=`calc(100vh - 16px)`;return}r.boxShadow=``,i.transform=``,i.position=`fixed`;let o=n.getBoundingClientRect();r.top=`${o.top}px`,r.left=`${o.left}px`,r.width=`${o.width}px`,r.height=`${o.height}px`,we(r,n);let s=t.scrollTop;i.maxHeight=``;let c={width:t.offsetWidth,height:t.offsetHeight},l=V(t),u=l.bottom-l.top,f={bottom:l.bottom-o.bottom-M,top:o.top-M-l.top,right:l.right-o.right-M,left:o.left-M-l.left},p=window.matchMedia(be).matches,m=(d(n)?Se:xe).find(e=>e===`top`||e===`bottom`?c.height<=f[e]+1:!p&&c.width<=f[e]+1&&c.height<=u+1),h=Math.min(o.bottom,l.bottom+N)-Math.max(o.top,l.top-N);m?Te(t,a,m,o,l,c):h>=Math.min(c.height,u)+8?Ee(t,a,o,l,c):De(t,a,f.bottom>=f.top?`bottom`:`top`,o,l,c,f),t.scrollTop=s}function we(e,t){L??=CSS.supports(`corner-top-left-shape`,`squircle`);let n=getComputedStyle(t);for(let t of I)e.setProperty(`border-${t}-radius`,n.getPropertyValue(`border-${t}-radius`)),L&&e.setProperty(`corner-${t}-shape`,n.getPropertyValue(`corner-${t}-shape`))}function Te(e,t,n,r,i,a){let o=n===`top`||n===`bottom`,s,c,l;if(o){let e=z(r.left,r.right,i.left,i.right);s=R(e-a.width/2,i.left,i.right-a.width),c=n===`bottom`?r.bottom+M:r.top-M-a.height,l=R(e-s,F,a.width-F)}else{let e=z(r.top,r.bottom,i.top,i.bottom);c=R(e-a.height/2,i.top,i.bottom-a.height),s=n===`right`?r.right+M:r.left-M-a.width,l=R(e-c,F,a.height-F)}e.dataset.placement=n,e.style.top=`${c}px`,e.style.left=`${s}px`,t.hidden=!1,t.style.left=o?`${l-e.clientLeft-t.offsetWidth/2}px`:``,t.style.top=o?``:`${l-e.clientTop-t.offsetHeight/2}px`}function Ee(e,t,n,r,i){let a=r.bottom-r.top;e.dataset.placement=`overlap`,t.hidden=!0,e.style.maxHeight=i.height>a?`${Math.max(a,0)}px`:``;let o=Math.min(n.bottom,r.bottom)-P;e.style.top=`${Math.max(r.top,o-Math.min(i.height,a))}px`,e.style.left=`${R(n.left+P,r.left,r.right-i.width)}px`}function De(e,t,n,r,i,a,o){let s=Math.max(o[n],0),c=Math.min(a.height,s);e.dataset.placement=n,t.hidden=!0,e.style.maxHeight=a.height>s?`${s}px`:``,e.style.top=`${n===`bottom`?r.bottom+M:r.top-M-c}px`;let l=z(r.left,r.right,i.left,i.right);e.style.left=`${R(l-a.width/2,i.left,i.right-a.width)}px`}function V(e){let t=e.parentElement,n=t?getComputedStyle(t):null,r=e=>Number.parseFloat(n?.[e]??``)||0;return{top:r(`paddingTop`)+N,bottom:window.innerHeight-r(`paddingBottom`)-N,left:r(`paddingLeft`)+N,right:window.innerWidth-r(`paddingRight`)-N}}function Oe(e){let t=e.querySelector(`:scope > .wui-tour-arrow`);if(t instanceof HTMLElement)return t;let n=document.createElement(`span`);return n.className=`wui-tour-arrow`,n.setAttribute(`aria-hidden`,`true`),n.hidden=!0,e.append(n),n}var ke=0,Ae=`btn btn-sm btn-link`;function H(e,t,n){let r=e.querySelector(t);if(!(r instanceof n))throw Error(`Expected "${t}" to match a ${n.name}.`);return r}function je(e,t){let a=`wui-tour-end-${++ke}`,{nextLabel:o,nextHref:s}=e,c=o&&s?i(`a`,{class:`${n(`primary`,`solid`,`sm`)} wui-tour-end-next`,"data-wui":r,href:s},o):null,l=c!==null,u=l?Ae:n(`primary`,`solid`,`sm`),d=i(`button`,{type:`button`,class:`${u} wui-tour-end-button`,"data-wui":r},e.button);return i(t?`dialog`:`div`,{class:`wui-tour-card wui-tour-end`,"data-layout":`center`,"data-next":l||void 0,role:`dialog`,tabindex:-1,"aria-labelledby":`${a}-title`,"aria-describedby":`${a}-message`},i(`div`,{class:`wui-tour-end-mark`,"aria-hidden":`true`},g({viewBox:`0 0 24 24`,focusable:`false`},[[`path`,{d:`M5 12.5l4.5 4.5L19 7.5`}]])),i(`h2`,{class:`wui-tour-title wui-tour-end-title`,id:`${a}-title`},e.title),i(`p`,{class:`wui-tour-text wui-tour-end-message`,id:`${a}-message`},e.message),i(`div`,{class:`wui-tour-actions`},c,d))}var Me=e=>e.button===0&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey;function Ne(e,t,n){let r=e.ownerDocument,i=je(t,e.getRootNode()===r),a=H(i,`.wui-tour-end-button`,HTMLButtonElement),o=i.querySelector(`.wui-tour-end-next`);if(o!==null&&!(o instanceof HTMLAnchorElement))throw Error(`The end dialog's next link is not a link.`);let s=o,u=s??a,d=new AbortController,f=i instanceof HTMLDialogElement?i:null,p=null;return new Promise(o=>{let m=e=>{if(d.abort(),p&&f){let e=p;p=null,c(f).then(e)}o(e)};if(n?.aborted){m(`done`);return}let g=H(e,`.wui-tour-card:not(.wui-tour-end)`,HTMLElement),_=H(e,`.wui-tour-spot`,HTMLElement),v=H(e,`[role=status]`,HTMLElement),y={signal:d.signal};n?.addEventListener(`abort`,()=>m(`done`),y),a.addEventListener(`click`,()=>m(`done`),y),s&&s.addEventListener(`click`,e=>{Me(e)&&(e.preventDefault(),m(`next`))},y),r.addEventListener(`keydown`,e=>{if(!(e.altKey||e.ctrlKey||e.metaKey)){if(e.key===`Escape`){if(p)return;e.preventDefault(),e.stopPropagation(),m(`done`)}else h(e)&&s&&!e.shiftKey&&(e.composedPath?.()[0]??e.target)===s&&(e.preventDefault(),m(`next`))}},{capture:!0,signal:d.signal});let b=()=>{d.signal.aborted||(g.hidden=!0,B(_,g,null),e.append(i),A(i),f&&(p=l(f,{escape:!0,backdrop:!1,focus:`first-control`,onRequestClose:()=>m(`done`)})),v.textContent=[t.title,t.message].filter(Boolean).join(`. `),u.focus())},x=j(g);x===null?b():x.then(b)})}var Pe=` :host { all: initial; display: revert-layer; position: fixed; inset: 0; ${Object.entries({"--wui-z-tour":`1550`,"--wui-radius-sm":`8px`,"--wui-radius-2xl":`18px`,"--wui-shadow-popover":`0px 8px 28px -6px rgba(7, 20, 55, 0.14)`,"--wui-ease-out":`cubic-bezier(0.22, 1, 0.36, 1)`,"--wui-ease-linear":`cubic-bezier(0, 0, 1, 1)`,"--wui-duration-fast":`150ms`,"--wui-duration-default":`250ms`,"--wui-duration-slow":`400ms`,"--wui-space-xs":`4px`,"--wui-tour-motion-duration":`200ms`,"--wui-tour-motion-ease":`cubic-bezier(0.22, 1, 0.36, 1)`,"--wui-tour-spot-duration":`240ms`,"--wui-tour-spot-ease":`cubic-bezier(0.32, 0.72, 0, 1)`,"--color-primary":`#4F46E5`,"--color-primary-hover":`#4338CA`,"--color-primary-text":`#4F46E5`,"--color-focus-ring":`#4F46E5`,"--wui-focus-ring-width":`2px`,"--wui-focus-ring-offset":`2px`,"--color-on-primary":`#FFFFFF`,"--color-success-soft":`#E8FAEE`,"--color-success-text":`#0e7531`,"--color-on-scrim":`#FFFFFF`,"--color-scrim-strong":`color-mix(in srgb, #071437 62%, transparent)`,"--color-surface":`#FFFFFF`,"--color-text":`#071437`,"--color-text-muted":`#4B5675`,"--color-border":`#EBEDF3`,"--color-bg-muted":`#F5F6FA`}).map(([e,t])=>` ${e}: ${t};`).join(` `)} } *, *::before, *::after { box-sizing: border-box; } [hidden] { display: none !important; } .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; } .btn { display: inline-block; margin: 0; padding: 0.25rem 0.5rem; border: 1px solid transparent; border-radius: 0.375rem; background: transparent; font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1.5; text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer; } .btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; } .btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-on-primary); } .btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); } .btn-outline-neutral { border-color: var(--color-text-muted); color: var(--color-text-muted); } .btn-outline-neutral:hover { background: var(--color-bg-muted); color: var(--color-text); } .btn-link { font-weight: 400; color: var(--color-primary-text); text-decoration: underline; } .btn-link:hover { color: var(--color-primary-hover); } .wui-tour-layer { pointer-events: none; font-family: "Webority Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 1.5; color: var(--color-text); text-align: start; } .wui-tour-card { pointer-events: auto; } .wui-tour-layer { position: fixed; inset: 0; z-index: var(--wui-z-tour); width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: visible; background: none; } .wui-tour-spot { position: fixed; box-shadow: 0 0 0 2px var(--color-primary), 0 0 4px 2px color-mix(in srgb, var(--color-primary) 30%, transparent), 0 0 0 100vmax var(--color-scrim-strong); pointer-events: none; } .wui-tour-card { display: flex; flex-direction: column; gap: 8px; width: min(360px, 100vw - 16px); padding: 16px; overflow-y: auto; background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); border-radius: var(--wui-radius-2xl); corner-shape: squircle; box-shadow: var(--wui-shadow-popover); } .wui-tour-card:focus { outline: none; } .wui-tour-card:focus-visible { outline: var(--wui-focus-ring-width) solid var(--color-focus-ring); outline-offset: var(--wui-focus-ring-offset); } .wui-tour-title { margin: 0; font-size: 16px; font-weight: 600; } .wui-tour-text { margin: 0; font-size: 14px; color: var(--color-text-muted); } .wui-tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; } .wui-tour-nav { display: flex; gap: 8px; } .wui-tour-skip { color: var(--color-text-muted); } .wui-tour-back, .wui-tour-next { min-width: 64px; } @keyframes wui-tour-fade-in { from { opacity: 0; } to { opacity: 1; } } @keyframes wui-tour-card-enter { from { opacity: 0; scale: 0.96; translate: var(--wui-tour-card-lift, 0 6px); } to { opacity: 1; scale: 1; translate: 0 0; } } .wui-tour-layer[data-state=leaving], .wui-tour-card[data-state=leaving] { opacity: 0; } .wui-tour-layer[data-state=leaving], .wui-tour-layer[data-state=leaving] * { pointer-events: none; } @media (prefers-reduced-motion: no-preference) { .wui-tour-layer { animation: wui-tour-fade-in var(--wui-tour-motion-duration) var(--wui-tour-motion-ease); } .wui-tour-layer[data-state=leaving] { transition: opacity var(--wui-tour-motion-duration) var(--wui-tour-motion-ease); } .wui-tour-spot { transition: top var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), left var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), width var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), height var(--wui-tour-spot-duration) var(--wui-tour-spot-ease), border-radius var(--wui-tour-spot-duration) var(--wui-tour-spot-ease); } .wui-tour-spot[data-tracking] { transition: none; } .wui-tour-card { --wui-tour-card-lift: 0 6px; transform-origin: top center; } .wui-tour-card[data-placement=top] { --wui-tour-card-lift: 0 -6px; transform-origin: bottom center; } .wui-tour-card[data-placement=bottom] { --wui-tour-card-lift: 0 6px; transform-origin: top center; } .wui-tour-card[data-placement=left] { --wui-tour-card-lift: -6px 0; transform-origin: right center; } .wui-tour-card[data-placement=right] { --wui-tour-card-lift: 6px 0; transform-origin: left center; } .wui-tour-card[data-placement=overlap], .wui-tour-card[data-placement=center] { --wui-tour-card-lift: 0 0; transform-origin: center; } .wui-tour-card[data-state=entering] { animation: wui-tour-card-enter var(--wui-tour-motion-duration) var(--wui-tour-motion-ease) var(--wui-tour-card-delay, 0ms) both; } .wui-tour-card[data-state=leaving] { transition: opacity calc(var(--wui-tour-motion-duration) / 2) var(--wui-tour-motion-ease); } } @media (prefers-reduced-motion: reduce) { .wui-tour-layer { animation: wui-tour-fade-in var(--wui-duration-fast) var(--wui-ease-linear); } .wui-tour-layer[data-state=leaving] { transition: opacity var(--wui-duration-fast) var(--wui-ease-linear); } .wui-tour-card[data-state=entering] { animation: wui-tour-fade-in var(--wui-duration-fast) var(--wui-ease-linear) both; } } .wui-tour-progress-bar { display: flex; gap: 4px; } .wui-tour-progress-segment { flex: 1 1 0; height: 4px; border-radius: 999px; background: var(--color-border); } .wui-tour-progress-segment[data-filled] { background: var(--color-primary); } .wui-tour-position { margin: 0; font-size: 12px; color: var(--color-text-muted); } .wui-tour-layer { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); } .wui-tour-card:has(.wui-tour-arrow:not([hidden])) { overflow: visible; } .wui-tour-arrow { position: absolute; width: 8px; height: 8px; background: var(--color-surface); border: 1px solid var(--color-border); rotate: 45deg; pointer-events: none; } .wui-tour-card[data-placement=bottom] .wui-tour-arrow { top: -5px; border-right-color: rgba(0, 0, 0, 0); border-bottom-color: rgba(0, 0, 0, 0); } .wui-tour-card[data-placement=top] .wui-tour-arrow { bottom: -5px; border-top-color: rgba(0, 0, 0, 0); border-left-color: rgba(0, 0, 0, 0); } .wui-tour-card[data-placement=right] .wui-tour-arrow { left: -5px; border-top-color: rgba(0, 0, 0, 0); border-right-color: rgba(0, 0, 0, 0); } .wui-tour-card[data-placement=left] .wui-tour-arrow { right: -5px; border-bottom-color: rgba(0, 0, 0, 0); border-left-color: rgba(0, 0, 0, 0); } @media (max-width: 575.98px) { .wui-tour-card { width: calc(100vw - 16px); } .wui-tour-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; } } .wui-tour-media { position: relative; order: -1; flex: none; aspect-ratio: 16/9; margin: -16px -16px 4px; overflow: hidden; background: var(--color-border); } .wui-tour-media>img, .wui-tour-media>video { display: block; width: 100%; height: 100%; object-fit: cover; } .wui-tour-card[data-welcome] { width: min(420px, 100vw - 16px); } .wui-tour-media-toggle { position: absolute; inset-block-end: 8px; inset-inline-end: 8px; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--color-scrim-strong); color: var(--color-on-scrim); cursor: pointer; } .wui-tour-media-toggle>svg { width: 20px; height: 20px; fill: currentColor; } .wui-tour-media-toggle:focus-visible { outline: 2px solid var(--color-on-scrim); outline-offset: var(--wui-focus-ring-offset); } .wui-tour-layer[data-advance] { pointer-events: none; } .wui-tour-layer[data-advance]:not([data-state=leaving]) .wui-tour-card { pointer-events: auto; } .wui-tour-layer[data-advance]:not([data-state=leaving]) .wui-tour-spot::before { content: ""; position: absolute; inset: -100vmax; pointer-events: auto; clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 100vmax 100vmax, calc(100% - 100vmax) 100vmax, calc(100% - 100vmax) calc(100% - 100vmax), 100vmax calc(100% - 100vmax), 100vmax 100vmax); } .wui-tour-hint { margin: 0; font-size: 14px; font-weight: 600; color: var(--color-text); } .wui-tour-pointer { position: absolute; top: 50%; left: 50%; width: 18px; height: 24px; pointer-events: none; } .wui-tour-pointer::before { content: ""; position: absolute; inset: 0; background: var(--color-primary); clip-path: polygon(0 0, 0 75%, 28% 58%, 46% 100%, 62% 92%, 45% 52%, 85% 52%); filter: drop-shadow(1px 0 0 var(--color-surface)) drop-shadow(-1px 0 0 var(--color-surface)) drop-shadow(0 1px 0 var(--color-surface)) drop-shadow(0 -1px 0 var(--color-surface)); } .wui-tour-pointer::after { content: ""; position: absolute; top: -16px; left: -16px; width: 32px; height: 32px; border-radius: 50%; background: var(--color-primary); opacity: 0; display: none; } @media (max-width: 575.98px) { .wui-tour-pointer { width: 24px; height: 24px; translate: -50% -50%; } .wui-tour-pointer::before { clip-path: none; border-radius: 50%; box-shadow: 0 0 0 2px var(--color-surface); filter: none; } .wui-tour-pointer::after { top: -4px; left: -4px; } } @keyframes wui-tour-tap { 0% { opacity: 0; transform: translate(56px, 44px) scale(1); } 10% { opacity: 1; transform: translate(56px, 44px) scale(1); } 45% { transform: translate(0, 0) scale(1); } 52% { transform: translate(0, 0) scale(0.86); } 60% { transform: translate(0, 0) scale(1); } 85% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(0, 0) scale(1); } } @keyframes wui-tour-tap-rtl { 0% { opacity: 0; transform: translate(-56px, 44px) scale(1); } 10% { opacity: 1; transform: translate(-56px, 44px) scale(1); } 45% { transform: translate(0, 0) scale(1); } 52% { transform: translate(0, 0) scale(0.86); } 60% { transform: translate(0, 0) scale(1); } 85% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(0, 0) scale(1); } } @keyframes wui-tour-ripple { 0%, 50% { opacity: 0; transform: scale(0.2); } 52% { opacity: 0.35; transform: scale(0.2); } 80%, 100% { opacity: 0; transform: scale(1); } } @media (prefers-reduced-motion: no-preference) { .wui-tour-pointer { opacity: 0; animation: wui-tour-tap calc(var(--wui-duration-slow) * 6) var(--wui-ease-out) var(--wui-tour-spot-duration) infinite; } .wui-tour-pointer:dir(rtl) { animation-name: wui-tour-tap-rtl; } .wui-tour-pointer::after { display: block; animation: wui-tour-ripple calc(var(--wui-duration-slow) * 6) var(--wui-ease-out) var(--wui-tour-spot-duration) infinite; } } @keyframes wui-tour-check { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } } .wui-tour-end[data-layout=center] { --wui-tour-card-lift: 0 0; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); transform-origin: center; align-items: center; gap: 8px; width: min(420px, 100vw - 16px); max-height: calc(100vh - 16px); padding: 24px; text-align: center; } .wui-tour-end[data-layout=center] .wui-tour-actions { justify-content: center; margin-top: 8px; } .wui-tour-end[data-layout=center][data-next] .wui-tour-actions { flex-direction: column; align-items: stretch; width: 100%; gap: var(--wui-space-xs); } .wui-tour-end-mark { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--color-success-soft); color: var(--color-success-text); } .wui-tour-end-mark>svg { width: 26px; height: 26px; } .wui-tour-end-mark path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; } .wui-tour-end-title { font-size: 18px; } .wui-tour-end-message { text-wrap: balance; } .wui-tour-end-next { text-wrap: balance; } .wui-tour-end-button { min-width: 120px; } @media (prefers-reduced-motion: no-preference) { .wui-tour-end-mark path { animation: wui-tour-check var(--wui-duration-default) var(--wui-ease-out) calc(var(--wui-tour-card-delay, 0ms) + var(--wui-duration-fast)) both; } } `,U=()=>f(`tour`,p),W=`wui-tour-media`,Fe=`wui-tour-media-toggle`,G=`http://www.w3.org/2000/svg`,Ie=`M6 5h4v14H6zM14 5h4v14h-4z`,Le=`M8 5v14l11-7z`,Re=()=>({pause:U().mediaPauseLabel,play:U().mediaPlayLabel}),ze=()=>globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches===!0;function Be(e){let t=document.createElementNS(G,`svg`);t.setAttribute(`viewBox`,`0 0 24 24`),t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`focusable`,`false`);let n=document.createElementNS(G,`path`);return n.setAttribute(`d`,e),t.appendChild(n),t}function Ve(e){let t=document.createElement(`img`);return t.setAttribute(`alt`,e.mediaAlt??``),t.setAttribute(`width`,`1280`),t.setAttribute(`height`,`720`),t.setAttribute(`loading`,`lazy`),t.setAttribute(`decoding`,`async`),t.setAttribute(`src`,e.media??``),t}function He(e,t){let n=document.createElement(`video`);return n.muted=!0,n.setAttribute(`muted`,``),n.loop=!0,n.setAttribute(`playsinline`,``),t&&n.setAttribute(`autoplay`,``),n.setAttribute(`preload`,t?`auto`:`metadata`),e.mediaAlt&&n.setAttribute(`aria-label`,e.mediaAlt),e.mediaPoster&&n.setAttribute(`poster`,e.mediaPoster),n.setAttribute(`src`,e.media??``),n}function Ue(e,t){let n=document.createElement(`button`);n.type=`button`,n.className=Fe;let r=(r=!e.paused)=>{n.setAttribute(`aria-label`,r?t.pause:t.play),n.replaceChildren(Be(r?Ie:Le))};return e.addEventListener(`play`,()=>r()),e.addEventListener(`pause`,()=>r()),n.addEventListener(`click`,()=>{e.paused?e.play()?.catch(()=>r()):e.pause()}),r(e.hasAttribute(`autoplay`)),n}function We(e){let t=e.querySelector(`:scope > .${W}`);if(!t)return;let n=t.querySelector(`video`);n&&(n.pause(),n.removeAttribute(`src`),n.load()),t.remove()}function Ge(e,t,n=Re()){if(We(e),!t.media){e.removeAttribute(`data-media`);return}let r=document.createElement(`div`);if(r.className=W,t.mediaType===`video`){let e=He(t,!ze());r.append(e,Ue(e,n))}else r.appendChild(Ve(t));e.prepend(r),e.setAttribute(`data-media`,t.target?`step`:`welcome`)}var Ke=()=>f(`tour`,p);function K(e){let t=/* @__PURE__ */ new Set;return{drop:e=>{t.add(e)},position:e=>{t.delete(e);let n=0;for(let r of t)r<e&&n++;return e+1-n},total:()=>e-t.size}}function qe(e,t,n){return(e.getAttribute(`progress-label`)||Ke().progressLabel).replace(/\{(current|total)\}/g,(e,r)=>String(r===`current`?t:n))}function Je(e,{text:t,position:n,total:r}){let i=e.querySelector(`.wui-tour-position`);if(!(i instanceof HTMLElement))throw Error(`tour position label missing`);i.textContent=t;let a=e.querySelector(`.wui-tour-progress-bar`);if(!a){let t=e.ownerDocument,n=t.createElement(`div`);n.className=`wui-tour-progress`,n.setAttribute(`aria-hidden`,`true`),a=t.createElement(`div`),a.className=`wui-tour-progress-bar`,n.append(a),i.before(n)}let o=a.children;for(;o.length<r;){let t=e.ownerDocument.createElement(`span`);t.className=`wui-tour-progress-segment`,a.append(t)}for(;o.length>r;){let e=a.lastElementChild;if(!e)throw Error(`progress bar segment missing`);e.remove()}for(let e=0;e<o.length;e++){let t=o[e];if(!t)throw Error(`progress bar segment missing`);t.toggleAttribute(`data-filled`,e<n)}}var Ye=`wui-tour-step`,Xe=`wui-tour-host`,q=`data-tracking`,J=()=>f(`tour`,p),Ze=()=>({back:J().backLabel,next:J().nextLabel,skip:J().skipLabel,done:J().doneLabel,mediaPause:J().mediaPauseLabel,mediaPlay:J().mediaPlayLabel,endTitle:J().endTitle,endMessage:J().endMessage,endButton:J().doneLabel}),Qe={back:`back-label`,next:`next-label`,skip:`skip-label`,done:`done-label`,mediaPause:`media-pause-label`,mediaPlay:`media-play-label`,endTitle:`end-title`,endMessage:`end-message`,endButton:`end-button`},$e=[[`media`,`media`],[`mediaAlt`,`media-alt`],[`mediaPoster`,`media-poster`],[`mediaType`,`media-type`],[`advanceOn`,`advance-on`],[`actionLabel`,`action-label`]],Y={index:null,position:null,total:null},et=0,X=e=>!e?.isConnected||getComputedStyle(e).visibility===`hidden`?!1:e.getClientRects().length>0,Z=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));function Q(e,t,n){let r=e.querySelector(t);if(!(r instanceof n))throw Error(`<wui-tour> layer has no ${t}`);return r}var tt=()=>{let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e},$=null;function nt(e){$||($=new CSSStyleSheet,$.replaceSync(Pe)),e.adoptedStyleSheets=[$]}var rt=class extends a{seenStore;onBeforeStep;_run;_running;_layer;_outer;_shadow;_unbindAdvance;_ending;_seenMark;_steps=[];_progress=K(0);_firstIndex=0;_returnFocus=null;_current=null;_moving=!1;_card=null;_spot=null;_live=null;_onKey=null;_onFocusIn=null;static get observedAttributes(){return[`open`]}constructor(){super(),this.seenStore=null,this.onBeforeStep=null,this._run=0,this._running=!1,this._layer=null,this._outer=null,this._shadow=null,this._unbindAdvance=null,this._ending=null,this._seenMark=null}connectedCallback(){this.hasAttribute(`open`)&&this.start()}disconnectedCallback(){this.stop()}attributeChangedCallback(e,t,n){e===`open`&&this.isConnected&&(n===null?this.stop():this.start())}get tourId(){return this.getAttribute(`tour-id`)||``}set tourId(e){e==null||e===``?this.removeAttribute(`tour-id`):this.setAttribute(`tour-id`,String(e))}get isolated(){return this.hasAttribute(`isolated`)}set isolated(e){this.toggleAttribute(`isolated`,e===!0||e===``||e===`true`)}_stepList(){return Array.from(this.querySelectorAll(`:scope > ${Ye}`),e=>{let t={target:e.getAttribute(`target`)||``,title:e.getAttribute(`title`)||void 0,description:(e.textContent??``).trim()};for(let[n,r]of $e)e.hasAttribute(r)&&(t[n]=e.getAttribute(r)??``);return t})}_stepAt(e){let t=this._steps[e];if(!t)throw RangeError(`<wui-tour> has no step ${e}; it has ${this._steps.length}.`);return t}_store(){return this.seenStore?this.seenStore:this.getAttribute(`seen-store`)===`local`?v():null}_label(e){return this.getAttribute(Qe[e])||Ze()[e]}_endDialogText(){if(this.getAttribute(`end-dialog`)===`false`)return null;let e=(this.getAttribute(`end-next-label`)??``).trim(),t=(this.getAttribute(`end-next-href`)??``).trim();return{title:this._label(`endTitle`),message:this._label(`endMessage`),button:this._label(`endButton`),nextLabel:e,nextHref:t}}_markSeen(e){let t=this._store();return t?t.markSeen(this.tourId,e):null}async start(){if(this._running)return;this._running=!0;let e=++this._run;this.hasAttribute(`open`)||this.setAttribute(`open`,``);try{await this._start(e)}catch(t){throw e===this._run&&(this._running=!1),t}}async _start(e){this._steps=this._stepList(),this._progress=K(this._steps.length);let t=this._store();if(t&&!this.tourId)throw Error(`<wui-tour> needs a tour-id to use a seen store.`);if(t&&await t.isSeen(this.tourId)){e===this._run&&this._finish(`alreadySeen`);return}for(let[e,t]of this._steps.entries())t.target&&!X(document.querySelector(t.target))&&this._progress.drop(e);this._returnFocus=document.activeElement;let n=await this._locate(0,1,e);e===this._run&&(n?(this._firstIndex=n.index,this.dispatchEvent(new CustomEvent(`wui-tour:start`,{bubbles:!0,detail:{total:this._progress.total()}})),e===this._run&&(this._build(),this._show(n))):this._finish(`noTargets`))}next(){return this._move(1)}back(){return!this._current||this._current.index<=this._firstIndex?Promise.resolve():this._move(-1)}async goTo(e){if(this._current){if(!Number.isInteger(e)||e<0||e>=this._steps.length)throw RangeError(`<wui-tour> has no step ${e}; it has ${this._steps.length}.`);await this._go(e,1)}}stop(){this._running&&(this._run++,this._teardown(),this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`))}async _locate(e,t,n){let r=this._steps;for(let i=e;i>=0&&i<r.length;i+=t){let e=r[i];if(!e)break;if(await this._beforeStep(e,i),n!==this._run)return null;if(!e.target)return{index:i,target:null};let t=document.querySelector(e.target),a=t instanceof HTMLElement||t instanceof SVGElement?t:null;if(X(a))return this._progress.position(i),{index:i,target:a};this._progress.drop(i)}return null}async _beforeStep(e,t){let n=[];this.dispatchEvent(new CustomEvent(`wui-tour:beforestep`,{bubbles:!0,detail:{step:e,index:t,wait:e=>n.push(e)}})),await Promise.all(n),typeof this.onBeforeStep==`function`&&await this.onBeforeStep(e,t)}_build(){let t=`wui-tour-${++et}`,a=document.createElement(`div`);a.className=`wui-tour-layer`,a.replaceChildren(i(`div`,{class:`wui-tour-spot`,"aria-hidden":`true`}),i(`div`,{class:`wui-tour-card`,role:`dialog`,tabindex:`-1`,"aria-labelledby":`${t}-title`,"aria-describedby":`${t}-text`},i(`p`,{class:`wui-tour-position`}),i(`h2`,{class:`wui-tour-title`,id:`${t}-title`}),i(`p`,{class:`wui-tour-text`,id:`${t}-text`}),i(`div`,{class:`wui-tour-actions`},i(`button`,{type:`button`,class:`btn btn-sm btn-link wui-tour-skip`}),i(`div`,{class:`wui-tour-nav`},i(`button`,{type:`button`,class:`${n(`neutral`,`outline`,`sm`)} wui-tour-back`,"data-wui":r}),i(`button`,{type:`button`,class:`${n(`primary`,`solid`,`sm`)} wui-tour-next`,"data-wui":r})))),i(`div`,{class:`visually-hidden`,role:`status`,"aria-live":`polite`}));let s=a;this._shadow=null,this.isolated&&(s=document.createElement(Xe),this._shadow=s.attachShadow({mode:`open`}),nt(this._shadow),this._shadow.appendChild(a)),s.setAttribute(`popover`,`manual`),o(document).appendChild(s),document.documentElement.setAttribute(_,``),this._outer=s,this._layer=a;let c=Q(a,`.wui-tour-spot`,HTMLDivElement),l=Q(a,`.wui-tour-card`,HTMLDivElement),u=Q(a,`[role=status]`,HTMLElement);this._spot=c,this._card=l,this._live=u,Q(l,`.wui-tour-skip`,HTMLElement).addEventListener(`click`,()=>this._close(`skipped`,`button`)),Q(l,`.wui-tour-back`,HTMLElement).addEventListener(`click`,()=>this._move(-1)),Q(l,`.wui-tour-next`,HTMLElement).addEventListener(`click`,()=>this._move(1));let d=e=>this._key(e);this._onKey=d;let f=e=>{let t=this._layer;if(!t||this._ending)return;let n=this._current,r=n?this._stepAt(n.index):null;if(!(e.target instanceof Node))throw Error(`<wui-tour> saw a focus change from a non-node target`);ue(t,r,n?.target??null,e.target)||l.focus()};this._onFocusIn=f,document.addEventListener(`keydown`,d,!0),this._shadow||document.addEventListener(`focusin`,f),e(s,()=>this._follow())}_active(){return this._shadow?this._shadow.activeElement:document.activeElement}_raise(){let e=this._outer;if(!e)throw Error(`<wui-tour> raises a step before its host is built`);let t=o(this.ownerDocument);e.parentElement!==t&&t.appendChild(e),s(e)}_show(e){this._current=e;let{index:t,target:n}=e,r=this._stepAt(t),i=this._layer,a=this._spot,o=this._card,s=this._live;if(!i||!a||!o||!s)throw Error(`<wui-tour> shows a step before its layer is built`);this._raise();let c=this._progress.position(t),l=this._progress.total(),u=c===l&&!this._endDialogText(),d=qe(this,c,l);Je(o,{text:d,position:c,total:l}),Ge(o,r,{pause:this._label(`mediaPause`),play:this._label(`mediaPlay`)}),o.toggleAttribute(`data-welcome`,!n);let f=T(this,{layer:i,spot:a,card:o},r,n),p=Q(o,`.wui-tour-title`,HTMLElement);p.textContent=r.title||``,p.hidden=!r.title,Q(o,`.wui-tour-text`,HTMLElement).textContent=r.description||``,Q(o,`.wui-tour-skip`,HTMLElement).textContent=this._label(`skip`);let m=Q(o,`.wui-tour-back`,HTMLElement);m.textContent=this._label(`back`),m.hidden=t<=this._firstIndex,Q(o,`.wui-tour-next`,HTMLElement).textContent=this._label(u?`done`:`next`);let h=[d,r.title,r.description].filter(Boolean).join(`. `);s.textContent=f?[h,f].join(/[.!?]$/.test(h)?` `:`. `):h,Ce(o,n),a.removeAttribute(q),this._place(),A(o),this._unbindAdvance?.(),this._unbindAdvance=le(r,n,()=>void this._move(1));let g=this._active();(g!==null&&o.contains(g)?!(g instanceof HTMLElement&&g.hidden):this._shadow!==null&&Z(tt()))||o.focus(),this.dispatchEvent(new CustomEvent(`wui-tour:step`,{bubbles:!0,detail:{step:r,index:t,position:c,total:l}}))}_place(){if(!this._current||!this._layer)return;let e=this._spot,t=this._card;if(!e||!t)throw Error(`<wui-tour> places a step before its layer is built`);B(e,t,this._current.target)}_follow(){if(!this._current||!this._layer||this._ending)return;let e=this._spot;if(!e)throw Error(`<wui-tour> follows a step before its spot is built`);let t=e.style.cssText;this._place(),e.style.cssText!==t&&e.setAttribute(q,``)}async _move(e){this._current&&await this._go(this._current.index+e,e)}async _go(e,t){if(!this._current||this._moving)return;this._moving=!0;let n=this._run;try{let r=await this._locate(e,t,n);if(n!==this._run)return;if(r){let e=this._card;if(!e)throw Error(`<wui-tour> moved with no card showing`);let t=j(e);if(t!==null&&await t,n!==this._run)return;this._show(r)}else if(t>0){let e=this._endDialogText(),t=e?await this._showEnd(e):`done`;if(n!==this._run)return;let r=await this._close(t===`next`?`next`:`finished`);if(t===`next`&&r&&e){let t=this.ownerDocument.defaultView;if(!t)throw Error(`<wui-tour> has no window to follow its next link in`);t.location.assign(e.nextHref)}}}finally{this._moving=!1}}_showEnd(e){this._unbindAdvance?.(),this._unbindAdvance=null;let t=this._layer,n=this._spot,r=this._card;if(!t||!n||!r)throw Error(`<wui-tour> ends a tour before its layer is built`);return T(this,{layer:t,spot:n,card:r},null,null),n.removeAttribute(q),this._ending=new AbortController,this._seenMark=this._markSeen(`finished`),Ne(t,e,this._ending.signal)}_key(e){if(!this._layer||this._ending||e.altKey||e.ctrlKey||e.metaKey)return;let t=u(e.key,d(this));if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),this._close(`skipped`,`escape`);else if(t===`ArrowRight`||t===`ArrowLeft`){if(Z(e.composedPath?.()[0]??e.target))return;if(e.preventDefault(),t===`ArrowRight`)this._move(1);else{let e=this._current;if(!e)throw Error(`<wui-tour> moved back with no step showing`);e.index>this._firstIndex&&this._move(-1)}}else if(e.key===`Tab`&&!this._shadow){let t=this._current,n=this._card;if(!t||!n)throw Error(`<wui-tour> cycled focus with no step showing`);de(e,{card:n,active:this._active(),step:this._stepAt(t.index),target:t.target})}}_teardown(){if(!this._layer)return;this._onKey&&document.removeEventListener(`keydown`,this._onKey,!0),this._onFocusIn&&document.removeEventListener(`focusin`,this._onFocusIn);let e=!this._shadow||this._shadow.activeElement!==null||!document.activeElement||document.activeElement===document.body;this._unbindAdvance?.(),this._unbindAdvance=null,this._ending?.abort(),this._ending=null,this._seenMark=null;let n=this._outer;if(t(n),!n)throw Error(`<wui-tour> has a layer with no host to remove`);ve(n),document.documentElement.removeAttribute(_),this._outer=null,this._shadow=null,this._layer=null,this._current=null;let r=this._returnFocus;this._returnFocus=null,e&&r?.isConnected&&(r instanceof HTMLElement||r instanceof SVGElement)&&r.focus()}async _close(e,t=null){let n=this._run,r=this._current,i=r?{index:r.index,position:this._progress.position(r.index),total:this._progress.total()}:Y,a=this._seenMark;this._teardown();let o=e===`next`?`finished`:e,s=!1;try{n===this._run&&await(a??this._markSeen(o)),s=n===this._run}finally{this._finish(e,i,t)}return s}_finish(e,t=Y,n=null){this._run++,this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`),this.dispatchEvent(new CustomEvent(`wui-tour:close`,{bubbles:!0,detail:{reason:e,...t,via:n}}))}};export{rt as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./elementBase-Cxeyx0tU.js";import{o as t,p as n,u as r}from"./nativeOverlay-BHD2QV02.js";import{r as i}from"./dom-DMQu--xV.js";import{r as a,t as o}from"./textStore-Dh5iyZSR.js";import{n as s}from"./devWarn-DXdRWZs3.js";import{n as c,t as l}from"./buttonClass-C8BRtTk8.js";import{t as u}from"./iconGlyphs.g-DRNDTVOs.js";import{n as d}from"./stepperHeader-yinJ_7Dk.js";import{t as f}from"./wizard.g-UKG1dMs_.js";var p=()=>a(`wizard`,f),m=`wui-wizard-step`,h=`:scope > [data-wui-glyphs]`,g=()=>({done:p().doneLabel,active:p().activeLabel,pending:p().pendingLabel,error:p().errorLabel,skipped:p().skippedLabel}),_=[`data-nav`,`data-step`,`data-close`],v=/* @__PURE__ */ new WeakSet,y=class extends e{_active;_skipped;_invalid;_finished;_rendered;_reflecting;_beforeNext;_header;_footer;_chromeInserted;_topBar;_onTopBarClick;_onHeaderClick;_onFooterClick;_known;_observer;_glyphs;_glyphObserver;_statusSlot;_extraSlot;_leave;_releaseLeave;_leaveWaiters;static get observedAttributes(){return[`active`,`variant`,`orientation`,`align`,`icon-size`,`non-linear`,`hide-stepper`,`hide-connectors`,`disabled`,`skippable`,`label`,`back-label`,`next-label`,`skip-label`,`finish-label`,`top-bar`,`bar-title`,`close-label`,`finish-loading`,`status-slot`,`extra-slot`]}constructor(){super(),this._active=0,this._skipped=/* @__PURE__ */ new Set,this._invalid=/* @__PURE__ */ new Set,this._finished=!1,this._rendered=!1,this._reflecting=!1,this._beforeNext=null,this._header=document.createElement(`nav`),this._header.className=`stepper wizard-stepper`,this._footer=document.createElement(`div`),this._footer.className=`form-actions wizard-footer form-actions-between`,this._chromeInserted=!1,this._topBar=null,this._onTopBarClick=e=>{let t=e.target;t instanceof Element&&t.closest(`[data-close]`)&&(this.hasAttribute(`dirty`)?this._openLeave():this.dispatchEvent(new CustomEvent(`wui-wizard:close`,{detail:{index:this._active},bubbles:!0})))},this._known=[],this._observer=null,this._glyphs=null,this._glyphObserver=null,this._statusSlot=null,this._extraSlot=null,this._leave=null,this._releaseLeave=null,this._leaveWaiters=[]}get active(){return this._active}set active(e){let t=Number.parseInt(String(e),10);Number.isFinite(t)&&this._go(t,`set`)}get beforeNext(){return this._beforeNext}set beforeNext(e){this._beforeNext=typeof e==`function`?e:null}get _steps(){return[...this.querySelectorAll(`:scope > ${m}`)].filter(e=>e instanceof HTMLElement)}refresh(){this._rendered&&this._renderChrome()}connectedCallback(){if(this._rendered)this._wire(),this._onStepsMutated();else{let e=Number.parseInt(this.getAttribute(`active`)??``,10);this._active=Number.isFinite(e)&&e>=0?e:0,this.render()}}disconnectedCallback(){this._teardown()}attributeChangedCallback(e,t,n){if(this._rendered&&!this._reflecting){if(e===`active`){let e=Number.parseInt(n??``,10);Number.isFinite(e)&&this._go(e,`set`)}else this._renderChrome()}}render(){let e=this._steps;if(!this._chromeInserted){let t=e[0],n=e[e.length-1];t&&n?(this.insertBefore(this._header,t),n.after(this._footer)):(this.prepend(this._header),this.append(this._footer)),this._chromeInserted=!0}this._known=e,this._renderChrome(),this._rendered=!0,this._wire()}_renderChrome(){let e=this._reconcileSteps();this._placeChrome(e),this._clampActive(e),this._syncPanels(e);let t=this._focusedControl();this._syncTopBar(e),this._syncSlots(),this._header.replaceChildren(...this._headerNodes(e)),this._footer.replaceChildren(...this._footerNodes(e)),this._header.hidden=this.hasAttribute(`hide-stepper`),this._restoreFocus(t)}_focusedControl(){let e=document.activeElement;if(!e||![this._topBar,this._header,this._footer].some(t=>t?.contains(e)))return null;let t=_.find(t=>e.hasAttribute(t));return t?{attr:t,value:e.getAttribute(t)}:null}_restoreFocus(e){if(e)for(let t of[this._topBar,this._header,this._footer]){let n=t&&[...t.querySelectorAll(`[${e.attr}]`)].find(t=>t.getAttribute(e.attr)===e.value);if(n){n instanceof HTMLElement&&!(n instanceof HTMLButtonElement&&n.disabled)&&n.focus({preventScroll:!0});return}}}_syncSlots(){this._statusSlot=this._slot(`status`,this._statusSlot,`wui-wizard-footer-status`),this._extraSlot=this._slot(`extra`,this._extraSlot,`wui-wizard-footer-extra`)}_slot(e,t,n){let r=`${e}-slot`,a=this.querySelector(`:scope > [data-wui-${e}]`);if(a&&!this.hasAttribute(r)&&(this._reflecting=!0,this.setAttribute(r,``),this._reflecting=!1),!this.hasAttribute(r))return null;let o=t??i(`div`,{class:n});return a&&(o.append(...a.childNodes),a.remove()),o}requestLeave(){return new Promise(e=>{this._leaveWaiters.push(e),this._openLeave()})}_settleLeave(e){for(let t of this._leaveWaiters.splice(0))t(e)}_leaveDialog(){if(this._leave)return this._leave;let e=p(),t=i(`dialog`,{class:`wui-wizard-leave`,"aria-label":e.leaveTitle},i(`h2`,{class:`wui-wizard-leave-title`},e.leaveTitle),i(`p`,{class:`wui-wizard-leave-message`},e.leaveMessage),i(`div`,{class:`wui-wizard-leave-actions`},i(`button`,{type:`button`,class:c(`danger`,`soft`,`md`),"data-leave":`discard`,"data-wui":l},e.leaveDiscardLabel),i(`span`,{class:`wui-wizard-leave-end`},i(`button`,{type:`button`,class:c(`neutral`,`soft`,`md`),"data-leave":`keep`,"data-autofocus":``,"data-wui":l},e.leaveKeepLabel),i(`button`,{type:`button`,class:c(`primary`,`solid`,`md`),"data-leave":`save`,"data-wui":l},e.leaveSaveLabel))));return t.addEventListener(`click`,e=>this._onLeaveClick(e)),this.append(t),this._leave=t,t}_openLeave(){let e=this._leaveDialog();e.open||(this._releaseLeave=r(e,{escape:!0,backdrop:!0,focus:`first-control`,onRequestClose:()=>{this._closeLeave(),this._settleLeave(!1)}}))}_closeLeave(){let e=this._leave;if(!e?.open)return;let r=this._releaseLeave;this._releaseLeave=null;let i=this._topBar?.querySelector(`[data-close]`)??null;t(e).then(()=>{r?.(),n(i,e)})}_onLeaveClick(e){let t=e.target instanceof Element?e.target.closest(`[data-leave]`):null;if(!t)return;this._closeLeave();let n=t.getAttribute(`data-leave`);this._settleLeave(n!==`keep`),n!==`keep`&&this.dispatchEvent(new CustomEvent(`wui-wizard:leave`,{detail:{action:n,index:this._active},bubbles:!0}))}_syncTopBar(e){if(!this.hasAttribute(`top-bar`)){this._topBar?.removeEventListener(`click`,this._onTopBarClick),this._topBar?.remove(),this._topBar=null;return}this._topBar||(this._topBar=document.createElement(`div`),this._topBar.className=`wui-wizard-topbar`,this._rendered&&this._topBar.addEventListener(`click`,this._onTopBarClick)),this._header.previousElementSibling!==this._topBar&&this.insertBefore(this._topBar,this._header);let t=this.getAttribute(`bar-title`)||``,n=this.getAttribute(`close-label`)||p().closeLabel,r=e.length?[i(`span`,{class:`wui-wizard-topbar-count`},o(p().stepOfText,{position:this._active+1,total:e.length}))]:[];this._topBar.replaceChildren(i(`span`,{class:`wui-wizard-topbar-title`},t||null),...r,i(`button`,{type:`button`,class:`wui-wizard-topbar-close`,"data-close":!0,"aria-label":n},this._glyph(`x`)))}_clampActive(e){let t=Math.max(0,e.length-1);this._active>t&&(this._active=t),this._active<0&&(this._active=0)}_reconcileSteps(){let e=this._steps,t=this._known;if(this._known=e,x(e,t))return e;let n=n=>new Set([...n].map(n=>{let r=t[n];return r?e.indexOf(r):-1}).filter(e=>e>=0));this._skipped=n(this._skipped),this._invalid=n(this._invalid);let r=t[this._active];if(!r)return e;let i=e.indexOf(r);if(i<0){let n=t=>e.includes(t),r=t.slice(this._active+1).find(n)??t.slice(0,this._active).reverse().find(n);i=r?e.indexOf(r):this._active}return i=Math.min(i,Math.max(0,e.length-1)),i!==this._active&&(this._active=i,this._reflectActive(i)),e}_placeChrome(e){let t=e[0],n=e[e.length-1];t&&n&&(this._header.nextElementSibling!==t&&this.insertBefore(this._header,t),this._footer.previousElementSibling!==n&&n.after(this._footer))}_onStepsMutated(){if(!this._rendered)return;let e=this._steps,t=!e.length||this._header.nextElementSibling===e[0]&&this._footer.previousElementSibling===e[e.length-1];this.querySelector(h)!==this._glyphs&&(this._watchGlyphs(),this._renderHeader()),t&&x(e,this._known)||(this._renderChrome(),this._observer?.takeRecords())}_syncPanels(e){e.forEach((e,t)=>{let n=t===this._active;e.classList.add(`wizard-panel`),e.hidden=!n,e.setAttribute(`role`,`tabpanel`),e.setAttribute(`aria-hidden`,n?`false`:`true`)})}_stepStatus(e,t){let n=e?.getAttribute(`status`);if(n){if(!b(n))throw Error(`wui-wizard: status "${n}" is not one of pending, active, done, error, skipped.`);return n}return this._invalid.has(t)?`error`:this._finished?`done`:t===this._active?`active`:t<this._active?this._skipped.has(t)?`skipped`:`done`:`pending`}_headerNodes(e){let t=this.getAttribute(`variant`)===`journey`,n=this.getAttribute(`variant`)===`icons`,r=this.getAttribute(`variant`)===`tiles`,a=this.getAttribute(`orientation`)===`vertical`,c=!this.hasAttribute(`hide-connectors`),l=this.getAttribute(`align`)===`start`;this._header.className=[`stepper`,`wizard-stepper`,t&&`stepper-journey`,n&&`stepper-icons`,r&&`wui-step-tiles`,a&&`stepper-vertical`,!c&&`wui-stepper-no-connectors`,l&&`wui-stepper-start`].filter(Boolean).join(` `),this._header.setAttribute(`aria-label`,this.getAttribute(`label`)||p().label);let u=this.hasAttribute(`non-linear`);for(let t of e)t.getAttribute(`label`)||v.has(t)||(v.add(t),s(`wui-wizard: a <wui-wizard-step> needs a label attribute; its header segment is empty.`));let f=d(e.map(e=>({label:e.getAttribute(`label`)||``,icon:e.getAttribute(`icon`)||void 0})),{statusOf:t=>this._stepStatus(e[t],t),journey:t,connectors:c}),m=g(),h=f.flatMap(a=>{let s=a.index,c=e[s];if(!c)return[];let l=a.status,d=c.getAttribute(`label`)||null,f=Number.parseInt(c.getAttribute(`error-count`)??``,10),h=f>0?o(p().errorCountText,{count:f}):c.getAttribute(`description`)||``,g=s+1,_=`icon`in a.glyph?this._glyph(a.glyph.icon):a.glyph.number,v=a.className,y=a.current?`step`:void 0,b=u||s<this._active;if(r){let e=[i(`span`,{class:`step-circle`},_),i(`span`,{class:`step-text`},i(`span`,{class:`step-label`},d),i(`span`,{class:`wui-step-tile-state`},m[l]??null))],t=b?i(`button`,{type:`button`,class:`wui-step-tile-body`,"data-step":s,"aria-current":y},...e):i(`div`,{class:`wui-step-tile-body`,"aria-current":y},...e);return[i(`li`,{class:l===`pending`?`wui-step-tile`:`wui-step-tile ${l}`},t)]}let x=h?[i(`span`,{class:`step-desc`},h)]:[],S;S=t?[i(`span`,{class:`step-circle`},_),i(`span`,{class:`step-text`},i(`span`,{class:`step-index`},o(p().stepText,{position:g})),i(`span`,{class:`step-label`},d),...x)]:n?[i(`span`,{class:`step-circle`},_),i(`span`,{class:`step-index`},o(p().stepText,{position:g})),i(`span`,{class:`step-label`},d),...x]:[i(`span`,{class:`step-circle`},_),i(`span`,{class:`step-label`},d),...x];let C=b?i(`button`,{type:`button`,class:v,"data-step":s,"aria-current":y},...S):i(`div`,{class:v,"aria-current":y},...S);return a.line?[C,i(`span`,{class:`step-line${a.line.done?` done`:``}`,"aria-hidden":`true`})]:[C]});return r?[i(`ol`,null,...h)]:h}_footerNodes(e){let t=this._active,n=e.length-1,r=this.hasAttribute(`disabled`),a=this.hasAttribute(`finish-loading`),o=e[t]?.hasAttribute(`optional`)||this.hasAttribute(`skippable`),s=this.getAttribute(`back-label`)||p().backLabel,d=this.getAttribute(`next-label`)||p().nextLabel,f=this.getAttribute(`skip-label`)||p().skipLabel,m=this.getAttribute(`finish-label`)||p().finishLabel,h=t>0?i(`button`,{type:`button`,class:c(`primary`,`soft`,`md`),"data-nav":`back`,disabled:r,"data-wui":l},u(`arrow-left`,{className:`me-2`}),s):i(`span`),g=o&&t<n?i(`button`,{type:`button`,class:c(`neutral`,`soft`,`md`),"data-nav":`skip`,disabled:r,"data-wui":l},f):null,_=t<n?i(`button`,{type:`button`,class:c(`primary`,`solid`,`md`),"data-nav":`next`,disabled:r,"data-wui":l},d,u(`arrow-right`,{className:`ms-2`})):i(`button`,{type:`button`,class:c(`primary`,`solid`,`md`),"data-nav":`finish`,disabled:r||a,"data-wui":l,...a?{"aria-busy":`true`}:{}},m),v=this._statusSlot?[this._statusSlot]:[],y=this._extraSlot?[this._extraSlot]:[];return[h,...v,i(`span`,{class:`wizard-footer-actions`},...y,g,_)]}_wire(){this._teardown(),this._onHeaderClick=e=>{let t=e.target instanceof Element?e.target.closest(`[data-step]`):null;t instanceof HTMLElement&&this.contains(t)&&this._stepTo(Number.parseInt(t.dataset.step??``,10))},this._onFooterClick=e=>{let t=e.target instanceof Element?e.target.closest(`[data-nav]`):null;if(!(t instanceof HTMLElement)||!this.contains(t)||this.hasAttribute(`disabled`))return;let n=t.dataset.nav;if(n===`back`)this._back();else if(n===`skip`)this._skip();else if(n===`next`||n===`finish`){if(n===`finish`&&this.hasAttribute(`finish-loading`))return;this._next()}},this._header.addEventListener(`click`,this._onHeaderClick),this._footer.addEventListener(`click`,this._onFooterClick),this._topBar?.addEventListener(`click`,this._onTopBarClick),this._observer=new MutationObserver(()=>this._onStepsMutated()),this._observer.observe(this,{childList:!0}),this._watchGlyphs()}_glyph(e){let t=this.querySelector(h),n=t&&[...t.children].find(t=>t.getAttribute(`data-icon`)===e);if(n)return n.cloneNode(!0);let r=Number.parseInt(this.getAttribute(`icon-size`)??``,10);return u(e,r>0?{size:r}:void 0)}_watchGlyphs(){this._glyphObserver?.disconnect(),this._glyphObserver=null,this._glyphs=this.querySelector(h),this._glyphs&&(this._glyphObserver=new MutationObserver(()=>this._renderHeader()),this._glyphObserver.observe(this._glyphs,{childList:!0,subtree:!0,attributes:!0,characterData:!0}))}_renderHeader(){if(!this._rendered)return;let e=this._focusedControl();this._header.replaceChildren(...this._headerNodes(this._steps)),this._restoreFocus(e)}_teardown(){this._header&&this._onHeaderClick&&this._header.removeEventListener(`click`,this._onHeaderClick),this._footer&&this._onFooterClick&&this._footer.removeEventListener(`click`,this._onFooterClick),this._topBar?.removeEventListener(`click`,this._onTopBarClick),this._observer?.disconnect(),this._observer=null,this._glyphObserver?.disconnect(),this._glyphObserver=null}_stepTo(e){this.hasAttribute(`disabled`)||!this.hasAttribute(`non-linear`)&&e>=this._active||this._go(e,`step`)}_back(){this._active>0&&this._go(this._active-1,`back`)}async _next(){this._reconcileSteps();let e=this._active,t=this._steps,n=e>=t.length-1,r=t[e];if(!this.dispatchEvent(new CustomEvent(`wui-wizard:beforechange`,{detail:n?{index:e,next:e,reason:`finish`}:{index:e,next:e+1,reason:`next`},cancelable:!0})))return this._flagInvalid(e);if(this._beforeNext){let i;try{i=await this._beforeNext(e)}catch{i=!1}if(this._reconcileSteps(),t=this._steps,e=r?t.indexOf(r):-1,e<0)return;if(n=e>=t.length-1,i===!1)return this._flagInvalid(e)}if(this._invalid.delete(e),this._skipped.delete(e),n)return this._finish();this._go(e+1,`next`)}_skip(){let e=this._active,t=this._steps;(t[e]?.hasAttribute(`optional`)||this.hasAttribute(`skippable`))&&(this._invalid.delete(e),this._skipped.add(e),this.dispatchEvent(new CustomEvent(`wui-wizard:skip`,{detail:{index:e}})),e>=t.length-1?this._finish():this._go(e+1,`skip`))}_flagInvalid(e){this._invalid.add(e),this._renderChrome(),this.dispatchEvent(new CustomEvent(`wui-wizard:invalid`,{detail:{index:e}}))}_finish(){this._invalid.delete(this._active),this._finished=!0,this._renderChrome(),this.dispatchEvent(new CustomEvent(`wui-wizard:finish`,{detail:{index:this._active}}))}_go(e,t){let n=this._reconcileSteps(),r=Math.max(0,n.length-1),i=Math.min(Math.max(e,0),r),a=this._active;this._finished=!1,this._invalid.delete(a),this._active=i,this._reflectActive(i),this._renderChrome(),t!==`silent`&&i!==a&&this.dispatchEvent(new CustomEvent(`wui-wizard:change`,{detail:{index:i,previous:a,reason:t}}))}_reflectActive(e){this._reflecting=!0,this.setAttribute(`active`,String(e)),this._reflecting=!1}},b=e=>e===`pending`||e===`active`||e===`done`||e===`error`||e===`skipped`,x=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),S=class extends e{static get observedAttributes(){return[`label`,`description`,`optional`,`icon`,`status`]}attributeChangedCallback(){let e=this.closest(`wui-wizard`);e&&`refresh`in e&&typeof e.refresh==`function`&&e.refresh()}};export{y as n,S as t};