@webority/ui-elements 0.173.1 → 0.174.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.
- package/dist/{WuiCarousel-CFKmFVzc.js → WuiCarousel-B0yPDH5I.js} +1 -1
- package/dist/WuiCodeBlock-BJ14DaLH.js +1 -0
- package/dist/{WuiCommandPalette-BQCy0bon.js → WuiCommandPalette-u1XD5WMv.js} +2 -2
- package/dist/WuiCommentThread-ChTsQWet.js +1 -0
- package/dist/{WuiConsentBanner-DlAE3DTf.js → WuiConsentBanner-nTua-kEd.js} +1 -1
- package/dist/{WuiDataTable-B-JaTsrI.js → WuiDataTable-3Vd8EAMV.js} +1 -1
- package/dist/{WuiDatePicker-4tdWakGX.js → WuiDatePicker-CPr0Yni3.js} +1 -1
- package/dist/{WuiDateRange-D7LJuY2F.js → WuiDateRange-DvuE4wfG.js} +1 -1
- package/dist/{WuiDateTime-BSJfyZ0q.js → WuiDateTime-Vimu6grS.js} +1 -1
- package/dist/{WuiDrawer-D-XfW1kl.js → WuiDrawer-BsY0fs_u.js} +1 -1
- package/dist/WuiGantt-DJat5idS.js +1 -0
- package/dist/{WuiImageCrop-CIAjHOGk.js → WuiImageCrop-UakcSM2k.js} +1 -1
- package/dist/{WuiInlineEdit-C9FxCWCk.js → WuiInlineEdit-Bfe_m5px.js} +1 -1
- package/dist/{WuiLeadPopup-KyguGV-q.js → WuiLeadPopup-DaYZ2zCJ.js} +1 -1
- package/dist/{WuiLightbox-CBiqJmGE.js → WuiLightbox-CuzbFBck.js} +1 -1
- package/dist/WuiMentionInput-Dmtm3N62.js +1 -0
- package/dist/{WuiNotificationCenter-DZariS2K.js → WuiNotificationCenter-1Hw7W0st.js} +1 -1
- package/dist/{WuiOrgTree-CFxoY9Vr.js → WuiOrgTree-DYMNCGTh.js} +1 -1
- package/dist/{WuiOverflow-CXYk2ubC.js → WuiOverflow-fZKqdsr-.js} +1 -1
- package/dist/{WuiPhone-BI438y4S.js → WuiPhone-BEyz-J2q.js} +1 -1
- package/dist/{WuiRecordPager-DAyoD650.js → WuiRecordPager-BXoe4KfU.js} +1 -1
- package/dist/{WuiRelativeTime-CPzs4tjM.js → WuiRelativeTime-CSg9vzfk.js} +1 -1
- package/dist/{WuiSavedViews-BAqHgVj2.js → WuiSavedViews-OjB-ZiCo.js} +1 -1
- package/dist/WuiSelect-C_nfrNr5.js +1 -0
- package/dist/{WuiShortcuts-DWzmRKEG.js → WuiShortcuts-CRCctX82.js} +1 -1
- package/dist/{WuiShowMore-DyfGnrob.js → WuiShowMore-BoYCrYYf.js} +1 -1
- package/dist/{WuiSlider-LE2wquOo.js → WuiSlider-R_mTula0.js} +1 -1
- package/dist/{WuiSortable-DxwYjicc.js → WuiSortable-x8Mg0tOv.js} +1 -1
- package/dist/{WuiTimePicker-xrPYytjq.js → WuiTimePicker-Bcc1PfCT.js} +1 -1
- package/dist/{WuiTour-D-H5sMJS.js → WuiTour-C71Wmed-.js} +1 -1
- package/dist/WuiTree-BQk23SSF.js +1 -0
- package/dist/WuiTreePicker-DP1lCno3.js +1 -0
- package/dist/{WuiWizardStep-n8Ge5GDI.js → WuiWizardStep-Uag__kTu.js} +1 -1
- package/dist/buttonClass-C8BRtTk8.js +1 -0
- package/dist/{calendarMath-rI1aBVRd.js → calendarMath-CT99RyhR.js} +1 -1
- package/dist/chips-BaB5xZXq.js +2 -0
- package/dist/{country-B7jmc--B.js → country-T7AfpJpN.js} +1 -1
- package/dist/{customRule-BXJdj57A.js → customRule-BpwcjVLb.js} +1 -1
- package/dist/{dataTable-Bz6HxUx0.js → dataTable-VB3nBucm.js} +1 -1
- package/dist/drawerDiscard-DGmosZR2.js +1 -0
- package/dist/elements/carousel.js +1 -1
- package/dist/elements/code-block.js +1 -1
- package/dist/elements/command-palette.js +1 -1
- package/dist/elements/comment-thread.js +1 -1
- package/dist/elements/consent-banner.js +1 -1
- package/dist/elements/data-table.js +1 -1
- package/dist/elements/date-range.js +1 -1
- package/dist/elements/date-time.js +1 -1
- package/dist/elements/datepicker.js +1 -1
- package/dist/elements/drawer.js +1 -1
- package/dist/elements/filter-popover.js +1 -1
- package/dist/elements/gantt.js +1 -1
- package/dist/elements/image-crop.js +1 -1
- package/dist/elements/inline-edit.js +1 -1
- package/dist/elements/kanban.js +1 -1
- package/dist/elements/lead-popup.js +1 -1
- package/dist/elements/lightbox.js +1 -1
- package/dist/elements/mention-input.js +1 -1
- package/dist/elements/notification-center.js +1 -1
- package/dist/elements/org-tree.js +1 -1
- package/dist/elements/overflow.js +1 -1
- package/dist/elements/phone.js +1 -1
- package/dist/elements/record-pager.js +1 -1
- package/dist/elements/relative-time.js +1 -1
- package/dist/elements/saved-views.js +1 -1
- package/dist/elements/select.js +1 -1
- package/dist/elements/shortcuts.js +1 -1
- package/dist/elements/show-more.js +1 -1
- package/dist/elements/slider.js +1 -1
- package/dist/elements/sortable.js +1 -1
- package/dist/elements/timepicker.js +1 -1
- package/dist/elements/tour.js +1 -1
- package/dist/elements/tree-picker.js +1 -1
- package/dist/elements/tree.js +1 -1
- package/dist/elements/wizard.js +1 -1
- package/dist/fileViewer.g-DupSpQYS.js +1 -0
- package/dist/{fileViewerImage-ItX9j9U9.js → fileViewerImage-CCtdOYm3.js} +1 -1
- package/dist/{fileViewerMedia-BCqp2Z96.js → fileViewerMedia-Dbwn694I.js} +1 -1
- package/dist/{fileViewerPdf-aaI2R2nB.js → fileViewerPdf-Lu6vcnYW.js} +1 -1
- package/dist/{filterPopover-D7LGrhnO.js → filterPopover-DskHFNLi.js} +1 -1
- package/dist/{formatters-DikbTYA4.js → formatters-DTW53DjY.js} +1 -1
- package/dist/hasOwn-CJsplJ62.js +1 -0
- package/dist/helpers.js +1 -1
- package/dist/iconGlyphs.g-Dj8sa1HF.js +1 -0
- package/dist/{inlineEditText-C6g6qhye.js → inlineEditText-DRBhMnam.js} +1 -1
- package/dist/kanban-DlVHIpxL.js +1 -0
- package/dist/{kanbanModel-CuMgMnSc.js → kanbanModel-BzXK4SkM.js} +1 -1
- package/dist/{loader-B3lirubB.js → loader-C2hgZrCR.js} +1 -1
- package/dist/{notificationDays-grsj1DtM.js → notificationDays-wMr8rZko.js} +1 -1
- package/dist/{optionLabel-CmrOSHbD.js → optionLabel-CghX6DYo.js} +1 -1
- package/dist/{recents-BQ0fD7Y0.js → recents-B9efQ1Au.js} +1 -1
- package/dist/{relativeTime-vdCXtfKg.js → relativeTime-CNgauvqB.js} +1 -1
- package/dist/{search-DwboX91o.js → search-Cj1eEPIN.js} +1 -1
- package/dist/server.js +1 -1
- package/dist/{shortcutKeys-6iLc6oDR.js → shortcutKeys-BMTWgV2g.js} +1 -1
- package/dist/text.js +1 -1
- package/dist/textStore-DBplASiZ.js +1 -0
- package/dist/{themeTransition-D7HJ4A4m.js → themeTransition-CRnGw929.js} +1 -1
- package/dist/ui-calendar.global.js +1 -1
- package/dist/ui-calendar.js +1 -1
- package/dist/ui-chart.global.js +2 -2
- package/dist/ui-chart.js +2 -2
- package/dist/ui-consent-banner.global.js +1 -1
- package/dist/ui-elements/carousel.global.js +1 -1
- package/dist/ui-elements/code-block.global.js +1 -1
- package/dist/ui-elements/command-palette.global.js +2 -2
- package/dist/ui-elements/comment-thread.global.js +1 -1
- package/dist/ui-elements/consent-banner.global.js +1 -1
- package/dist/ui-elements/context-menu.global.js +1 -1
- package/dist/ui-elements/date-range.global.js +1 -1
- package/dist/ui-elements/date-time.global.js +1 -1
- package/dist/ui-elements/datepicker.global.js +1 -1
- package/dist/ui-elements/drawer.global.js +1 -1
- package/dist/ui-elements/dropdown.global.js +1 -1
- package/dist/ui-elements/entry-grid.global.js +1 -1
- package/dist/ui-elements/gantt.global.js +1 -1
- package/dist/ui-elements/glyphs.global.js +1 -1
- package/dist/ui-elements/image-crop.global.js +1 -1
- package/dist/ui-elements/inline-edit.global.js +1 -1
- package/dist/ui-elements/kanban.global.js +1 -1
- package/dist/ui-elements/lead-popup.global.js +1 -1
- package/dist/ui-elements/lightbox.global.js +1 -1
- package/dist/ui-elements/markdown.global.js +1 -1
- package/dist/ui-elements/org-tree.global.js +1 -1
- package/dist/ui-elements/phone.global.js +1 -1
- package/dist/ui-elements/popover.global.js +1 -1
- package/dist/ui-elements/saved-views.global.js +1 -1
- package/dist/ui-elements/select-chips.global.js +2 -2
- package/dist/ui-elements/select-recents.global.js +1 -1
- package/dist/ui-elements/select-search.global.js +1 -1
- package/dist/ui-elements/select-window.global.js +1 -1
- package/dist/ui-elements/slider.global.js +1 -1
- package/dist/ui-elements/sortable.global.js +1 -1
- package/dist/ui-elements/status-icon.global.js +1 -1
- package/dist/ui-elements/table-export.global.js +1 -1
- package/dist/ui-elements/timepicker.global.js +1 -1
- package/dist/ui-elements/tour.global.js +1 -1
- package/dist/ui-elements/tree-picker.global.js +1 -1
- package/dist/ui-elements/tree.global.js +1 -1
- package/dist/ui-elements/wizard.global.js +1 -1
- package/dist/ui-elements.global.js +1 -1
- package/dist/ui-elements.js +1 -1
- package/dist/ui-file-viewer.global.js +10 -10
- package/dist/ui-file-viewer.js +1 -1
- package/dist/ui-lead-popup.global.js +1 -1
- package/dist/ui-rich-text.global.js +51 -51
- package/dist/ui-rich-text.js +53 -53
- package/dist/ui-tour.global.js +1 -1
- package/package.json +5 -5
- package/types/global/shared.d.ts +2 -0
- package/types/hasOwn.d.ts +1 -0
- package/dist/WuiCodeBlock-fBc3Uwsw.js +0 -1
- package/dist/WuiCommentThread-B58UyYGD.js +0 -1
- package/dist/WuiGantt-XMvgsZsn.js +0 -1
- package/dist/WuiMentionInput-CktKQjQc.js +0 -1
- package/dist/WuiSelect-htggZB0v.js +0 -1
- package/dist/WuiTree-BnlK9fYL.js +0 -1
- package/dist/WuiTreePicker-Bx9nvRrC.js +0 -1
- package/dist/buttonClass-GtEi8hAY.js +0 -1
- package/dist/chips-DrTvHdbb.js +0 -2
- package/dist/drawerDiscard-B33Oc_Sv.js +0 -1
- package/dist/fileViewer.g-B6N9K2xi.js +0 -1
- package/dist/iconGlyphs.g-P04RJkSE.js +0 -1
- package/dist/kanban-CX6DyApZ.js +0 -1
- package/dist/textStore-opIEM4lu.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},r=n({defineElement:()=>i});function i(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 a=n({ElementBase:()=>s,NO_DOM_MESSAGE:()=>o}),o=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(o);var s=HTMLElement,c=n({isRtl:()=>l,mirrorKey:()=>u});function l(e){return getComputedStyle(e).direction===`rtl`}function u(e,t){return t?e===`ArrowRight`?`ArrowLeft`:e===`ArrowLeft`?`ArrowRight`:e:e}var d=n({anchorOverlay:()=>T,bindReanchor:()=>E,unbindReanchor:()=>D}),f=4,p=8,m=300,h=400;function g(e,t,n){let r=t.offsetWidth,i=t.offsetHeight,a=n?e.left-f-r<f:e.right+f+r>window.innerWidth-f,o=n?!a:a,s=o?e.left-f-r:e.right+f;t.style.left=`${Math.max(f,s)}px`,t.style.top=`${Math.max(f,Math.min(e.top,window.innerHeight-i-f))}px`,t.dataset.side=o?`start`:`end`}function _(e,t){return t?e===`start`?`end`:e===`end`?`start`:e:e}var v=8,y={top:`bottom`,bottom:`top`,start:`end`,end:`start`},b=[`bottom`,`top`,`end`,`start`];function x(e,t){return e===`bottom`?window.innerHeight-t.bottom:e===`top`?t.top:e===`end`?window.innerWidth-t.right:t.left}function S(e,t,n,r){return e===`start`?t:e===`end`?n-r:t+(n-t-r)/2}function C(e,t,n){return Math.max(v,Math.min(e,t-n-v))}function w(e,t,n,r){let i=r.gap??f,a=r.align??`start`,o=t.offsetWidth,s=t.offsetHeight,c=n===`auto`?b.reduce((t,n)=>x(n,e)>x(t,e)?n:t):n,l=c===`top`||c===`bottom`,u=(l?s:o)+i,d=x(c,e)<u&&x(y[c],e)>x(c,e)?y[c]:c,p=s;if(r.clampHeight){let n=d===`bottom`?window.innerHeight-e.bottom-i-f:d===`top`?e.top-i-f:window.innerHeight-8;n<s&&(p=Math.max(n,0),t.style.maxHeight=`${p}px`)}let m,h;if(l){h=d===`bottom`?e.bottom+i:Math.max(f,e.top-p-i);let t=S(a,e.left,e.right,o);r.flipAlign&&a===`start`&&t+o>window.innerWidth-f&&e.right-o>=f?t=e.right-o:r.flipAlign&&a===`end`&&t<f&&e.left+o<=window.innerWidth-f&&(t=e.left),m=Math.max(f,Math.min(t,window.innerWidth-o-f))}else m=Math.max(f,d===`end`?e.right+i:e.left-o-i),h=Math.max(f,Math.min(S(a,e.top,e.bottom,p),window.innerHeight-p-f));t.style.left=`${m}px`,t.style.top=`${h}px`,t.dataset.side=d;let g=r.arrow;if(g){if(l){let t=(e.left+e.right)/2-m-g.offsetWidth/2;g.style.left=`${C(t,o,g.offsetWidth)}px`}else{let t=(e.top+e.bottom)/2-h-g.offsetHeight/2;g.style.top=`${C(t,p,g.offsetHeight)}px`}}}function T(e,t,n={}){if(!e)throw Error(`anchorOverlay: missing trigger`);if(!t)throw Error(`anchorOverlay: missing panel`);t.style.position=`fixed`;let r=e.getBoundingClientRect(),i=e instanceof Element&&l(e);if(n.beside){g(r,t,i);return}if(n.side!==void 0){let e=n.clampHeight?Array.from(t.children,e=>[e,e.scrollTop]):[];t.classList.remove(`drop-up`),t.style.maxHeight=``,w(r,t,n.side===`auto`?`auto`:_(n.side,i),n);for(let[t,n]of e)t.scrollTop=n;return}let a=n.clampHeight?t.scrollTop:0;n.clampHeight&&(t.style.maxHeight=``);let o=t.offsetHeight,s=window.innerHeight-r.bottom,c=!n.below&&s<o+f&&r.top>s;if(t.classList.toggle(`drop-up`,c),t.style.top=c?`${Math.max(f,r.top-o-f)}px`:`${r.bottom+f}px`,n.clampHeight){let e=c?r.top-8:window.innerHeight-r.bottom-8;e<o&&(t.style.maxHeight=`${Math.max(e,0)}px`),t.scrollTop=a}n.matchWidth&&(r.width>=m?(t.style.minWidth=`${r.width}px`,t.style.width=`${r.width}px`,t.style.maxWidth=`${r.width}px`):(t.style.minWidth=`${r.width}px`,t.style.width=`max-content`,t.style.maxWidth=`${Math.min(h,window.innerWidth-8)}px`));let u=t.offsetWidth;if(n.alignEnd){let e=r.right-u,n=e>=p?e:r.left,i=Math.max(p,Math.min(n,window.innerWidth-u-p));t.style.left=`${i}px`}else{let e=n.flipAlign&&r.left+u>window.innerWidth-f&&r.right-u>=f,i=Math.min(e?r.right-u:r.left,window.innerWidth-u-f);t.style.left=`${Math.max(f,i)}px`}}function E(e,t){D(e),e._reanchor=t,e._reanchorScroll=n=>{n.composedPath().includes(e)||t()},window.addEventListener(`resize`,e._reanchor),window.addEventListener(`scroll`,e._reanchorScroll,!0)}function D(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 O=n({CLOSE_MOTION_LIMIT_MS:()=>400,CLOSING_ATTRIBUTE:()=>ee,DISMISS_ATTRIBUTE:()=>A,OPEN_ATTRIBUTE:()=>k,closeAnchoredPopover:()=>M,closeModalDialog:()=>De,isPopoverOpen:()=>N,onOverlayRootChange:()=>Ne,openAnchoredPopover:()=>Oe,openModalDialog:()=>Ee,overlayRoot:()=>Me,raisePopover:()=>Ae,returnFocus:()=>Ce,setPopoverOpen:()=>ke,wireOpenTriggers:()=>Pe}),k=`data-wui-open`,A=`data-wui-dismiss`,ee=`data-wui-closing`,te=`[${A}]`,ne=`[${k}]`,re=`(prefers-reduced-motion: reduce)`,ie=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,ae=400,oe=new WeakSet,se=new WeakSet,ce=new WeakSet,le=Symbol.for(`webority.ui.modal-stack`),ue=Symbol.for(`webority.ui.root-watches`);function de(e){let t=e;return t[ue]??=new Set,t[ue]}var fe=new WeakMap,pe=new WeakMap,me=new WeakMap;function he(e){let t=e.querySelector(`[data-autofocus]`);if(t)return t;let n=null;for(let t of e.querySelectorAll(ie))if(!t.closest(`[hidden],[inert]`)){if(!t.closest(`${te},.wui-modal-back`))return t;n??=t}return n}function ge(e){let t=[],n=new Map;for(let r of e.querySelectorAll(ie))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 _e(e){return e.localName.includes(`-`)&&`show`in e&&typeof e.show==`function`}function ve(e){return e.localName.includes(`-`)&&customElements.get(e.localName)===void 0}function ye(e){let t=e;return t[le]??=[],t[le]}function j(e){be(e),ye(e.ownerDocument).push(e)}function be(e){let t=ye(e.ownerDocument),n=t.indexOf(e);n>=0&&t.splice(n,1)}function xe(e){for(let t of de(e)){let n=Me(e);t.last!==n&&(t.last=n,t.listener(n))}}function Se(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 Ce(e,t){if(!e?.isConnected)return;let n=e.ownerDocument.activeElement;(!n||n===e.ownerDocument.body||t.contains(n))&&e.focus()}function we(e){let t=e.getBoundingClientRect();return t.bottom<0||t.right<0||t.top>window.innerHeight||t.left>window.innerWidth}function Te(e,t){me.get(e)?.();let n=t.ownerDocument,r=0,i=()=>{window.clearTimeout(o),window.clearTimeout(r),n.removeEventListener(`pointerdown`,i,!0),n.removeEventListener(`keydown`,i,!0),t.removeEventListener(`click`,a,!0),me.delete(e)},a=()=>{t.removeEventListener(`click`,a,!0),r=window.setTimeout(i,0)},o=window.setTimeout(i,ae);n.addEventListener(`pointerdown`,i,!0),n.addEventListener(`keydown`,i,!0),t.addEventListener(`click`,a,!0),me.set(e,i)}function Ee(e,t){let n=t.focus===`first-control`?he(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`),oe.add(e);let o=()=>{if(j(e),!e.hasAttribute(`open`)){let t=n!==null&&!e.querySelector(`[autofocus]`);t&&n.setAttribute(`autofocus`,``);try{e.showModal()}catch(t){throw be(e),t}finally{t&&n.removeAttribute(`autofocus`)}}r.focus(),xe(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;Me(r)===e&&(e.querySelector(`:popover-open`)||r.querySelector(`[popover=""]:popover-open, [popover="auto"]:popover-open`)||(s=!0,window.setTimeout(()=>{s&&oe.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(Me(n)!==e||e.querySelector(`:popover-open`))return;t.preventDefault();let r=ge(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(te);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,be(e),oe.has(e)?(o(),n&&t.onRequestClose(`escape`)):xe(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),oe.delete(e),i&&e.removeAttribute(`tabindex`),a&&e.removeAttribute(`closedby`),be(e),xe(e.ownerDocument)}}async function De(e){oe.delete(e),e.setAttribute(ee,``),!window.matchMedia(re).matches&&typeof e.getAnimations==`function`&&e.getAnimations().length>0&&await Se(e),e.close(),be(e),xe(e.ownerDocument),e.removeAttribute(ee)}function Oe(e,t,n){let r=me.get(t);if(r){r();return}fe.get(t)?.(),t.setAttribute(`popover`,n.mode),t.showPopover();let i=()=>T(e,t,n);try{i()}catch(e){throw M(t),e}E(t,()=>{!N(t)||!t.isConnected?pe.get(t)?.():e.isConnected&&n.scrollSettling?.()?i():!e.isConnected||!n.keepOffscreen&&we(e)?M(t):i()});let a=new ResizeObserver(()=>{N(t)&&t.isConnected&&e.isConnected&&i()});a.observe(t);let o=e=>{`newState`in e&&e.newState===`closed`&&pe.get(t)?.()},s=()=>{n.mode===`auto`&&N(t)&&Te(t,e)};t.addEventListener(`toggle`,o),e.addEventListener(`pointerdown`,s,!0),fe.set(t,()=>{t.removeEventListener(`toggle`,o),e.removeEventListener(`pointerdown`,s,!0),D(t),a.disconnect(),fe.delete(t),pe.delete(t)}),pe.set(t,()=>{fe.get(t)?.(),n.onClosed?.()})}function M(e){N(e)&&e.hidePopover(),pe.get(e)?.()}function N(e){return e.matches(`:popover-open`)}function ke(e,t){je(e),N(e)!==t&&(t?e.showPopover():e.hidePopover())}function Ae(e){if(je(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 je(e){if(!e.hasAttribute(`popover`))throw Error(`nativeOverlay: the panel has no popover attribute`)}function Me(e=document){let t=ye(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}function Ne(e,t=document){se.has(t)||(se.add(t),t.addEventListener(`toggle`,()=>xe(t),!0),t.addEventListener(`close`,()=>xe(t),!0));let n={last:Me(t),listener:e};return de(t).add(n),()=>{de(t).delete(n)}}function Pe(e){ce.has(e)||(ce.add(e),e.addEventListener(`click`,t=>{let n=t.target,r=n instanceof Element?n.closest(ne):null;if(!(r instanceof HTMLElement))return;let i=(r.getAttribute(`data-wui-open`)??``).replace(/^#/,``),a=e.getElementById(i);if(!a)throw Error(`[data-wui-open] names #${i}, which is not on the page.`);_e(a)?(t.preventDefault(),a.show(r)):ve(a)&&(t.preventDefault(),customElements.whenDefined(a.localName).then(()=>{a.isConnected&&_e(a)&&a.show(r)}))}))}var Fe=n({closestOf:()=>F,elementOf:()=>Ie,make:()=>I,must:()=>P});function P(e,t){if(e==null)throw Error(t);return e}function Ie(e,t,n){if(!(e instanceof t))throw TypeError(n);return e}function F(e,t){return e instanceof Element?e.closest(t):null}function I(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 Le=n({fillText:()=>R,pluralText:()=>Je,readText:()=>L,setText:()=>Ge,subscribeText:()=>Ke,textLocale:()=>qe}),Re=`en-IN`,ze=/\{([A-Za-z0-9_]+)\}/g,Be,Ve=new Map,He=0,Ue=new Set,We=new Map;function Ge(e){let t=new Map,n,r=Object.entries(e);for(let[e,i]of r)if(i!==void 0){if(e===`locale`){if(typeof i!=`string`)throw RangeError(`Text locale must be a BCP 47 tag string.`);n=i}else{if(!Ye(i))throw RangeError(`Text ${e} must be an object of string keys.`);t.set(e,Xe(e,i))}}Be=n,Ve=t,He+=1;for(let e of Array.from(Ue))e()}function L(e,t){let n=Ve.get(e);if(n===void 0)return t;let r=We.get(e);if(r!==void 0&&r.version===He&&r.english===t&&Qe(r.merged,t))return r.merged;let i=Ze(e,n,t);return We.set(e,{version:He,english:t,merged:i}),i}function Ke(e){return Ue.add(e),()=>{Ue.delete(e)}}function qe(){return Be??Re}function R(e,t){return e.replace(ze,(e,n)=>Object.hasOwn(t,n)?String(t[n]):e)}function Je(e,t,n,r){let i=`${t}Other`;if(!Object.hasOwn(e,i))throw RangeError(`Plural text ${t} has no ${i} key; every plural needs its Other form.`);let a=new Intl.PluralRules(qe()).select(n),o=`${t}${a.charAt(0).toUpperCase()}${a.slice(1)}`,s=e[Object.hasOwn(e,o)?o:i];if(s===void 0)throw RangeError(`Plural text ${t} has no ${o} key.`);return R(s,{count:n,...r})}function Ye(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Xe(e,t){let n={};for(let[r,i]of Object.entries(t)){if(typeof i!=`string`)throw RangeError(`Text ${e}.${r} must be a string.`);n[r]=i}return n}function Ze(e,t,n){let r={};for(let[i,a]of Object.entries(t)){let t=Object.hasOwn(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=$e(t);for(let t of $e(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 Qe(e,t){let n=Object.keys(t);return Object.keys(e).length===n.length&&n.every(t=>Object.hasOwn(e,t))}function $e(e){return Array.from(e.matchAll(ze),e=>e[1]??``)}var et=`data-wui-shortcuts`,tt=`data-shortcut-scope`,nt=`wui:shortcut`,rt={"/":`slash`,"?":`help`,Escape:`esc`,Esc:`esc`,Enter:`enter`},it={esc:`Esc`,escape:`Esc`,enter:`Enter`,slash:`/`,help:`?`},at={esc:`Escape`,ctrl:`Control`,cmd:`Meta`,option:`Alt`,opt:`Alt`},ot=new Set([`checkbox`,`radio`,`button`,`submit`,`reset`,`range`,`color`,`file`,`image`]),st=new Set([`textbox`,`searchbox`,`combobox`]),ct=`a[href], button, summary, input, select, textarea, [role="button"], [role="link"], [role="menuitem"], [role="option"], [role="tab"], [role="checkbox"], [role="switch"]`;function lt(e){if(!e||e.ctrlKey||e.metaKey||e.altKey)return null;let t=e.key;return typeof t!=`string`||!t?null:rt[t]?rt[t]:t.length===1&&t.trim()?t.toLowerCase():null}function ut(e){let t=String(e??``).trim();return t.length===1?t.toUpperCase():it[t.toLowerCase()]??t}function dt(e){return String(e??``).trim().split(/\s+/).filter(Boolean).map(e=>at[e.toLowerCase()]??(e.length===1?e.toUpperCase():e)).join(`+`)}function ft(e){if(!e||!pt(e))return!1;if(e instanceof HTMLElement&&e.isContentEditable||e.closest?.(`[contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]`)||e.tagName===`TEXTAREA`||e.tagName===`SELECT`)return!0;if(e.tagName===`INPUT`){let t=e instanceof HTMLInputElement&&e.type?e.type:`text`;return!ot.has(t.toLowerCase())}return st.has(e.getAttribute?.(`role`))}function pt(e){return e.nodeType===1}function mt(e=typeof document>`u`?null:document){return e?.documentElement?.getAttribute(et)===`off`}function ht(e,t){if(!t||e&&t.contains(e))return!0;let n=t.ownerDocument;return(!e||e===n.body||e===n.documentElement)&&n.querySelector(`[data-shortcut-scope]`)===t}function gt(e,t,n=null){let r=e.target instanceof Node?e.target:null;if(!t||e.defaultPrevented||mt(r?.ownerDocument??void 0))return!1;let i=lt(e);if(!i||!ht(r,n)||ft(r))return!1;let a=t[i]??(i.length===1?t[i.toUpperCase()]:void 0);return typeof a!=`function`||i===`enter`&&r instanceof Element&&r.closest(ct)?!1:(e.preventDefault(),a(e),!0)}function _t(e,t){let n=e[0]?.ownerDocument;if(!n)return null;let r=n.activeElement,i=e.findIndex(e=>e===r||e.contains(r));if(i<0&&r&&r!==n.body){let t=r.closest?.(`li, tr`);t&&(i=e.findIndex(e=>t.contains(e)))}i<0&&(i=e.findIndex(e=>e.getAttribute(`aria-current`)===`true`));let a=P(e[i<0?t>0?0:e.length-1:Math.min(e.length-1,Math.max(0,i+t))],`moveFocus: no item at the clamped index`);return a.focus(),a.scrollIntoView?.({block:`nearest`}),a}var vt=2,yt=`wui-filter-popover-pinned`,bt=`.wui-filter-popover-trigger`,xt=`.wui-filter-popover-panel`,St=`.wui-filter-popover-head`,Ct=`input:not([type]),input[type="text"],input[type="search"]`,wt=`a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1'])`;function Tt(){try{return sessionStorage.getItem(yt)===`1`}catch{return!1}}function Et(e){try{e?sessionStorage.setItem(yt,`1`):sessionStorage.removeItem(yt)}catch(e){if(!(e instanceof DOMException))throw e}}function Dt(e){if(e===null||e instanceof Node)return e;throw TypeError(`event target is not a node`)}function Ot(e,t){let n=e?.querySelector(t)??null;return n instanceof HTMLElement?n:null}var kt=class extends s{_doc;_timer;_sticky;_closingByCode;_inside;_pendingSubmit;_onEnter;_onLeave;_onClick;_onChange;_onListClose;_onFocusOut;_onKeyDown;_onShortcut;constructor(){super(),this._doc=null,this._timer=null,this._sticky=!1,this._closingByCode=!1,this._inside=!1,this._pendingSubmit=!1,this._onEnter=e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`&&(this._inside=!0,this._schedule(!0))},this._onLeave=e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`&&(this._inside=!1,this._schedule(!1))},this._onClick=e=>{this._trigger?.contains(Dt(e.target))&&(this._clear(),this.isOpen&&this._sticky?this._close(!0):this._open(!0,e.detail===0))},this._onChange=e=>{let t=this._pin;if(t&&e.target===t){Et(t.checked),t.checked?this._clear():this._schedule(!1);return}let n=e.target;if(n instanceof Element&&n.closest(`wui-select[mode="multiple"], wui-select[mode="tag"]`)?.querySelector(`[aria-expanded="true"]`)){this._pendingSubmit=!0;return}let r=this.closest(`form.wui-filter-form`);r instanceof HTMLFormElement&&r.requestSubmit()},this._onListClose=()=>{if(!this._pendingSubmit)return;this._pendingSubmit=!1;let e=this.closest(`form.wui-filter-form`);e instanceof HTMLFormElement&&e.requestSubmit()},this._onFocusOut=e=>{this.contains(Dt(e.relatedTarget))||this._schedule(!1)},this._onKeyDown=e=>{let t=e.target;if(e.key!==`Enter`||!(t instanceof Element)||!this._panel?.contains(t)||!t.matches(Ct))return;e.preventDefault();let n=this.closest(`form.wui-filter-form`);n instanceof HTMLFormElement&&n.requestSubmit()},this._onShortcut=e=>{this.ownerDocument.querySelector(`wui-filter-popover`)===this&>(e,{f:()=>this._open(!0,!0)})}}get isOpen(){let e=this._panel;return e?N(e):!1}connectedCallback(){this._doc=this.ownerDocument,this.addEventListener(`pointerenter`,this._onEnter),this.addEventListener(`pointerleave`,this._onLeave),this.addEventListener(`click`,this._onClick),this.addEventListener(`change`,this._onChange),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`wui-select:close`,this._onListClose),this._doc.addEventListener(`keydown`,this._onShortcut),Tt()&&this._pin&&(this._pin.checked=!0,this._open(!1,!1))}disconnectedCallback(){this._clear();let e=this._panel;e&&this._closeByCode(e),this.removeEventListener(`pointerenter`,this._onEnter),this.removeEventListener(`pointerleave`,this._onLeave),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`change`,this._onChange),this.removeEventListener(`focusout`,this._onFocusOut),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`wui-select:close`,this._onListClose),this._doc?.removeEventListener(`keydown`,this._onShortcut),this._doc=null}get _trigger(){return Ot(this,bt)}get _panel(){return Ot(this,xt)}get _pin(){let e=this.querySelector(`${St} input[type="checkbox"]`);return e instanceof HTMLInputElement?e:null}get _pinned(){return this._pin?.checked===!0}_clear(){this._timer!==null&&clearTimeout(this._timer),this._timer=null}_schedule(e){if(this._clear(),e){if(this.isOpen)return;this._timer=setTimeout(()=>{this._timer=null,this._open(!1,!1)},150)}else this.isOpen&&!this._stayOpen()&&(this._timer=setTimeout(()=>{this._timer=null,this._stayOpen()||this._close(!1)},400))}_stayOpen(){let e=this._panel;return e?this._pinned||this._inside||e.contains(this.ownerDocument.activeElement)||e.querySelector(`[aria-expanded="true"]`)!==null:!1}_open(e,t){this._clear();let n=this._panel,r=this._trigger;n&&r&&(this.isOpen?e&&(this._sticky=!0):(r.setAttribute(`aria-expanded`,`true`),this._sticky=e,Oe(r,n,{mode:`auto`,clampHeight:!0,alignEnd:!0,onClosed:()=>this._closed()})),t&&(Ot(n.querySelector(`.wui-filter-popover-grid`),wt)??Ot(n,wt))?.focus())}_close(e){this._clear();let t=this._panel;if(!t||!this.isOpen)return;let n=t.contains(this.ownerDocument.activeElement);this._closeByCode(t),e&&n&&this._trigger?.focus()}_closeByCode(e){this._closingByCode=!0;try{M(e)}finally{this._closingByCode=!1}}_closed(){if(this._trigger?.setAttribute(`aria-expanded`,`false`),this._sticky=!1,this._closingByCode)return;let e=this._trigger,t=this._panel,n=this.ownerDocument.activeElement;e&&(n===this.ownerDocument.body||t?.contains(n))&&e.focus()}};function At(){i(`wui-filter-popover`,kt)}var jt=`INR`,Mt=Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`,JPY:`¥`}),Nt=e=>typeof e==`string`&&/^[A-Z]{3}$/.test(e),Pt=(e=`INR`)=>Mt[e]??`${e} `,Ft={aprShortLabel:`Apr`,aprilLabel:`April`,augShortLabel:`Aug`,augustLabel:`August`,decShortLabel:`Dec`,decemberLabel:`December`,emptyValueLabel:`-`,febShortLabel:`Feb`,februaryLabel:`February`,friMinLabel:`Fr`,friShortLabel:`Fri`,fridayLabel:`Friday`,janShortLabel:`Jan`,januaryLabel:`January`,julShortLabel:`Jul`,julyLabel:`July`,junShortLabel:`Jun`,juneLabel:`June`,marShortLabel:`Mar`,marchLabel:`March`,mayLabel:`May`,mayShortLabel:`May`,monMinLabel:`Mo`,monShortLabel:`Mon`,mondayLabel:`Monday`,novShortLabel:`Nov`,novemberLabel:`November`,octShortLabel:`Oct`,octoberLabel:`October`,satMinLabel:`Sa`,satShortLabel:`Sat`,saturdayLabel:`Saturday`,sepShortLabel:`Sep`,septemberLabel:`September`,sunMinLabel:`Su`,sunShortLabel:`Sun`,sundayLabel:`Sunday`,thuMinLabel:`Th`,thuShortLabel:`Thu`,thursdayLabel:`Thursday`,tueMinLabel:`Tu`,tueShortLabel:`Tue`,tuesdayLabel:`Tuesday`,wedMinLabel:`We`,wedShortLabel:`Wed`,wednesdayLabel:`Wednesday`},It=n({IST_OFFSET_MS:()=>Lt,IST_TIME_ZONE:()=>z,isTimeZone:()=>Bt,nowIn:()=>qt,todayIn:()=>Kt,wallClockOf:()=>Gt,wallToInstant:()=>Ut,zoneOffsetMs:()=>Ht,zoneParts:()=>Vt}),z=`Asia/Kolkata`,Lt=198e5,Rt=new Map;function zt(e){let t=Rt.get(e);return t||(t=new Intl.DateTimeFormat(`en-US`,{timeZone:e,hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),Rt.set(e,t)),t}function Bt(e){if(typeof e!=`string`||e===``)return!1;try{return zt(e),!0}catch{return!1}}function Vt(e,t=z){if(t===`Asia/Kolkata`){let t=new Date(e+Lt);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}let n=Object.fromEntries(zt(t).formatToParts(e).map(e=>[e.type,Number(e.value)]));return{year:Number(n.year),month:Number(n.month)-1,day:Number(n.day),hour:Number(n.hour)%24,minute:Number(n.minute),second:Number(n.second)}}function Ht(e,t=z){if(t===`Asia/Kolkata`)return Lt;let n=Vt(e,t),r=new Date(0);return r.setUTCFullYear(n.year,n.month,n.day),r.setUTCHours(n.hour,n.minute,n.second,0),r.getTime()-Math.floor(e/1e3)*1e3}function Ut(e,t=z){let n=e-Ht(e,t);return n=e-Ht(n,t),n}var Wt=e=>e instanceof Date?e.getTime():e;function Gt(e,t=z){return new Date(e+Ht(e,t)).toISOString().slice(0,19)}function Kt(e=z,t=Date.now()){return Gt(Wt(t),e).slice(0,10)}function qt(e=z,t=Date.now()){let n=Wt(t);return new Date(n+Ht(n,e))}var Jt=n({CURRENCIES:()=>Xt,DATE_PATTERNS:()=>$t,DURATION_UNITS:()=>Qt,FORMAT_STYLES:()=>Yt,IST_OFFSET_MS:()=>Lt,IST_TIME_ZONE:()=>z,MAX_DECIMALS:()=>20,MONEY_UNITS:()=>Zt,compactFormatOf:()=>Rn,emptyValueLabel:()=>B,formatCompact:()=>kn,formatCurrency:()=>Dn,formatDate:()=>Fn,formatDateTime:()=>zn,formatDayShort:()=>In,formatDuration:()=>Mn,formatNumber:()=>En,formatPercent:()=>An,formatValue:()=>Ln,isMoneyUnit:()=>en,istParts:()=>Pn,monthLabel:()=>cn,monthLongLabel:()=>ln,paiseToRupeeText:()=>Sn,timeZoneLabel:()=>Hn,toInstant:()=>Nn,weekdayLabel:()=>un}),Yt=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],Xt=[`INR`,`USD`,`EUR`,`GBP`],Zt=[`rupees`,`paise`],Qt=[`ms`,`s`,`min`,`h`],$t=[`day`,`month`,`year`,`datetime`,`time`];function en(e){return Zt.some(t=>t===e)}var tn=()=>L(`formatters`,Ft),B=()=>tn().emptyValueLabel,nn=`−`,rn=[`janShortLabel`,`febShortLabel`,`marShortLabel`,`aprShortLabel`,`mayShortLabel`,`junShortLabel`,`julShortLabel`,`augShortLabel`,`sepShortLabel`,`octShortLabel`,`novShortLabel`,`decShortLabel`],an=[`januaryLabel`,`februaryLabel`,`marchLabel`,`aprilLabel`,`mayLabel`,`juneLabel`,`julyLabel`,`augustLabel`,`septemberLabel`,`octoberLabel`,`novemberLabel`,`decemberLabel`],on={short:[`sunShortLabel`,`monShortLabel`,`tueShortLabel`,`wedShortLabel`,`thuShortLabel`,`friShortLabel`,`satShortLabel`],long:[`sundayLabel`,`mondayLabel`,`tuesdayLabel`,`wednesdayLabel`,`thursdayLabel`,`fridayLabel`,`saturdayLabel`],min:[`sunMinLabel`,`monMinLabel`,`tueMinLabel`,`wedMinLabel`,`thuMinLabel`,`friMinLabel`,`satMinLabel`]},sn=(e,t)=>tn()[P(e[t],`no date name at index ${t}`)],cn=e=>sn(rn,e),ln=e=>sn(an,e);function un(e,t){return sn(on[t],e)}var dn=(e,t)=>P(e[t],`no compact unit at index ${t}`),fn=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],pn=[[1e9,`B`],[1e6,`M`],[1e3,`K`]],mn=e=>!e||e===`INR`?`en-IN`:`en-US`,hn=(e,t)=>typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=20?e:t,gn=new Map,_n=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=gn.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:e}),gn.set(n,r)),r},vn=new Map,yn=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=vn.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:e,maximumFractionDigits:e}),vn.set(n,r)),r},bn=e=>typeof e==`number`&&Number.isFinite(e),xn=e=>e<0&&!Object.is(Math.abs(e),0)?nn:``;function Sn(e){if(!Number.isInteger(e))throw Error(`A paise amount must be a whole number, got ${e}`);let t=BigInt(Math.abs(e)).toString().padStart(3,`0`);return`${e<0?`-`:``}${t.slice(0,-2)}.${t.slice(-2)}`}var Cn=(e,t)=>t===`paise`?Number(Sn(e)):e,wn=2,Tn=(e,t,n)=>{let r=Math.min(t,wn),i=10n**BigInt(wn-r),a=(BigInt(Sn(e).replace(`.`,``))+i/2n)/i,o=10n**BigInt(r),s=yn(0,n).format(a/o);return t===0?s:`${s}.${(a%o).toString().padStart(r,`0`)}${`0`.repeat(t-r)}`};function En(e,{decimals:t}={}){if(!bn(e))return B();let n=_n(hn(t,2)).format(Math.abs(e));return n===`0`?`0`:xn(e)+n}function Dn(e,t){if(!t?.currency)throw TypeError(`[@webority/ui-elements] formatCurrency needs options.currency, an ISO 4217 code such as "INR".`);if(!bn(e))return B();let{unit:n=`rupees`,decimals:r,currency:i}=t,a=hn(r,0),o=mn(i),s=n===`paise`?Tn(Math.abs(e),a,o):yn(a,o).format(Math.abs(e));return(Number(s.replace(/,/g,``))===0?``:xn(e))+Pt(i)+s}var On=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function kn(e,{currency:t,unit:n=`rupees`}={}){if(!bn(e))return B();let r=t?Cn(e,n):e,i=t?Pt(t):``,a=t?mn(t):`en-IN`,o=a===`en-IN`?fn:pn,s=Math.abs(r),c=o.findIndex(([e])=>s>=e);if(c===-1){let e=_n(On(s),a).format(s);if(e!==`1,000`)return(e===`0`?``:xn(r))+i+e;c=o.length-1}let[l,u]=dn(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f));return p>=100&&c>0&&(--c,[l,u]=dn(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f))),`${xn(r)}${i}${_n(f,a).format(p)} ${u}`}function An(e,{decimals:t}={}){return bn(e)?`${En(e*100,{decimals:hn(t,1)})}%`:B()}var jn={ms:1,s:1e3,min:6e4,h:36e5};function Mn(e,{unit:t=`s`}={}){if(!bn(e))return B();let n=jn[t]??1e3,r=Math.abs(e*n),i=xn(e);if(Math.round(r)<1e3)return`${i}${_n(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${_n(1).format(a)}s`;let o=Math.round(a);if(o<60)return`${i}${o}s`;let s=e=>String(e).padStart(2,`0`),c=Math.floor(o/60);if(c<60)return`${i}${c}m ${s(o%60)}s`;let l=Math.floor(c/60);return`${i}${_n(0).format(l)}h ${s(c%60)}m`}function Nn(e,t=z){if(e instanceof Date)return e.getTime();if(bn(e))return e;if(typeof e!=`string`)return NaN;let n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(n){let[e,r,i]=[Number(n[1]),Number(n[2]),Number(n[3])],a=new Date(Date.UTC(2e3,r-1,i));return a.setUTCFullYear(e),a.getUTCFullYear()===e&&a.getUTCMonth()===r-1&&a.getUTCDate()===i?Ut(a.getTime(),t):NaN}return Date.parse(e)}function Pn(e,t=z){let{year:n,month:r,day:i,hour:a,minute:o}=Vt(e,t);return{year:n,month:r,day:i,hour:a,minute:o}}function Fn(e,{pattern:t=`day`,timeZone:n=z}={}){let r=Nn(e,n);if(!Number.isFinite(r))return B();let i=Pn(r,n),a=e=>String(e).padStart(2,`0`),o=`${a(i.day)}-${cn(i.month)}-${i.year}`,s=`${a(i.hour)}:${a(i.minute)}`;switch(t){case`month`:return`${cn(i.month)}-${i.year}`;case`year`:return String(i.year);case`datetime`:return`${o} ${s}`;case`time`:return s;default:return o}}function In(e,{timeZone:t=z}={}){let n=Nn(e,t);if(!Number.isFinite(n))return B();let r=Pn(n,t);return`${String(r.day).padStart(2,`0`)}-${cn(r.month)}`}function Ln(e,t){if(e==null||e===``)return B();let n=t?.style;if(n===`date`)return Fn(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return Dn(e,{...t,currency:t?.currency??``});case`percent`:return An(e,t);case`compact`:return kn(e,t);case`duration`:return Mn(e,t);default:return En(e,t)}}function Rn(e){let t=e?.style;if(t===`currency`){if(!e?.currency)throw TypeError(`[@webority/ui-elements] a currency format needs a currency, an ISO 4217 code such as "INR".`);return{style:`compact`,currency:e.currency,unit:e.unit}}return!t||t===`number`?{style:`compact`}:e??{}}function zn(e,{timeZone:t=z}={}){let n=Nn(e);if(!Number.isFinite(n))return B();let r=Object.fromEntries(Vn(t).formatToParts(n).map(e=>[e.type,e.value])),i=r.dayPeriod;if(i===void 0)throw Error(`Intl returned no day period for a 12-hour clock`);return`${r.day}-${cn(Number(r.month)-1)}-${r.year}, ${r.hour}:${r.minute} ${i.toUpperCase()}`}var Bn=new Map;function Vn(e){let t=Bn.get(e);return t||(t=new Intl.DateTimeFormat(`en-IN`,{day:`2-digit`,month:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0,timeZone:e}),Bn.set(e,t)),t}function Hn(e=z){return new Intl.DateTimeFormat(`en-IN`,{timeZone:e,timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??e}var Un={actionFailedMessage:`That did not work. Try again.`,actionForbiddenMessage:`You do not have permission to do that.`,collapseRowLabel:`Collapse row`,densityComfortableLabel:`Comfortable rows`,densityCompactLabel:`Compact rows`,densityLabel:`Row density`,empty:`No records found.`,emptyLabel:`No rows`,errorText:`These rows did not load. Try again.`,expandLabel:`Expand`,expandRowLabel:`Expand row`,exportCsvLabel:`Download CSV`,exportExcelLabel:`Download Excel`,forbiddenMessage:`You do not have access to these rows.`,groupRowsOne:`1 row`,groupRowsOther:`{count} rows`,loadingText:`Loading rows`,moreActionsForText:`More actions for {firstValue}`,networkMessage:`The connection dropped before the rows loaded. Check it and try again.`,pageTextOne:`Page {page} of {pages}, {total} row`,pageTextOther:`Page {page} of {pages}, {total} rows`,pageTextPending:`Page {page}`,resizeColumnLabel:`Resize column`,resizeColumnText:`Resize {label} column`,resizeText:`{px} pixels`,retryLabel:`Retry`,rowActionsLabel:`Actions`,rowSavedText:`Row saved.`,rowWasNotSavedText:`Row was not saved.`,rowsSavedText:`{n} rows saved.`,savedText:`{label} saved.`,selectAllRowsLabel:`Select all rows`,selectRowLabel:`Select row`,timeoutMessage:`The server did not answer in time. Check your connection and try again.`,wasNotSavedText:`{label} was not saved.`},Wn=n({COLUMN_MAX_WIDTH:()=>Kn,COLUMN_MIN_WIDTH:()=>48,PIN_AT_VAR:()=>pr,PIN_SIDES:()=>Yn,RESIZE_STEP:()=>10,RESIZE_STEP_LARGE:()=>50,ROW_HEIGHTS:()=>Zn,ROW_MOVE_LIMIT:()=>200,ROW_MOVE_MS:()=>220,ROW_SAVE_ATTR:()=>Er,ROW_SAVE_ERROR_CLASS:()=>Dr,ROW_SAVE_STATES:()=>Tr,VIRTUAL_OVERSCAN:()=>8,clampColumnWidth:()=>or,groupCount:()=>ar,groupItems:()=>sr,groupRowsText:()=>tr,identityCell:()=>Or,measureRows:()=>Sr,notSavedText:()=>ir,pinAtValue:()=>mr,pinClasses:()=>gr,pinOffsetVar:()=>fr,planPins:()=>hr,playRowMoves:()=>Cr,readColumnWidths:()=>ur,resizeName:()=>$n,rowLabel:()=>kr,rowOrderChanged:()=>wr,saveOutcomeText:()=>Mr,savedManyText:()=>rr,savedText:()=>nr,setRowSaveState:()=>Ar,settledRows:()=>jr,virtualRange:()=>cr,widthText:()=>er,writeColumnWidths:()=>dr}),Gn=48,Kn=1200,qn=10,Jn=50,Yn=[`start`,`end`],Xn=8,Zn={comfortable:72,cozy:48,compact:40},Qn=()=>L(`dataTable`,Un),$n=e=>e?R(Qn().resizeColumnText,{label:e}):Qn().resizeColumnLabel,er=e=>R(Qn().resizeText,{px:e}),tr=e=>Je(Qn(),`groupRows`,e,{count:En(e,{decimals:0})}),nr=e=>e?R(Qn().savedText,{label:e}):Qn().rowSavedText,rr=e=>R(Qn().rowsSavedText,{n:En(e,{decimals:0})}),ir=(e,t)=>`${e?R(Qn().wasNotSavedText,{label:e}):Qn().rowWasNotSavedText}${t?` ${t}`:``}`,ar=e=>En(e,{decimals:0}),or=e=>Math.min(Kn,Math.max(48,Math.round(Number(e)||0)));function sr(e,t,n=[]){let r=new Map(n.map(e=>[e,[]]));return e.forEach((e,n)=>{let i=t(e,n),a=r.get(i);a||(a=[],r.set(i,a)),a.push(e)}),[...r].filter(([,e])=>e.length>0).map(([e,t])=>({key:e,items:t}))}function cr({scrollTop:e,viewport:t,rowHeight:n,count:r,overscan:i=8}){let a=n>0?n:Zn.cozy,o=Math.floor(Math.max(0,e)/a),s=Math.max(0,o-i);s-=s%2;let c=Math.min(r,o+Math.ceil(Math.max(0,t)/a)+i),l=Math.min(s,c);return{start:l,end:c,before:l*a,after:Math.max(0,r-c)*a}}var lr=e=>`wui-widths:${e}`;function ur(e){if(!e)return{};try{let t=JSON.parse(window.localStorage.getItem(lr(e))||`{}`),n={};if(t&&typeof t==`object`)for(let[e,r]of Object.entries(t))Number.isFinite(r)&&(n[e]=or(r));return n}catch{return{}}}function dr(e,t){if(e)try{Object.keys(t).length?window.localStorage.setItem(lr(e),JSON.stringify(t)):window.localStorage.removeItem(lr(e))}catch(e){if(!(e instanceof DOMException))throw e}}var fr=(e,t)=>`--wui-pin-${e}-${t}`,pr=`--wui-pin-at`,mr=(e,t)=>`var(${fr(e,t)}, 0px)`;function hr(e){let t=e.map(()=>null),n=-1;e.forEach((e,t)=>{e===`start`&&(n=t)});let r=0;for(let i=0;i<=n;i++)(e[i]===`start`||e[i]===`lead`)&&(t[i]={side:`start`,ordinal:r++,edge:!1});let i=t[n];i&&(i.edge=!0);let a=-1;r=0;for(let n=e.length-1;n>=0;n--)e[n]===`end`&&(t[n]={side:`end`,ordinal:r++,edge:!1},a=n);let o=t[a];return o&&(o.edge=!0),t}var gr=e=>e?`wui-pin-${e.side}${e.edge?` wui-pin-${e.side}-edge`:``}`:``,_r=200,vr=220,yr=`cubic-bezier(0.22, 1, 0.36, 1)`,br=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,xr=e=>e.getAttribute(`data-row-key`)??e;function Sr(e){let t=[...e];if(t.length>200)return null;let n=new Map;for(let e of t)e.hidden||n.set(xr(e),e.offsetTop);return n}function Cr(e,t){let n=[...e];if(!t||n.length>200||br())return 0;let r=0;for(let e of n){if(e.hidden||typeof e.animate!=`function`)continue;let n=t.get(xr(e));if(n===void 0)continue;let i=n-e.offsetTop;Math.abs(i)<1||(e.animate([{transform:`translateY(${i}px)`},{transform:`translateY(0)`}],{duration:220,easing:yr}),r++)}return r}function wr(e,t){if(!e||!t)return!1;let n=new Set(t),r=new Set(e),i=e.filter(e=>n.has(e)),a=t.filter(e=>r.has(e));return i.some((e,t)=>e!==a[t])}var Tr=[`saving`,`error`],Er=`data-wui-save-state`,Dr=`wui-row-save-error`,Or=e=>{let t=e.querySelector(`:scope > .wui-name-cell`);return t instanceof HTMLTableCellElement?t:[...e.cells].find(e=>!e.matches(`.wui-select-cell, .wui-expand-cell`))??null};function kr(e){let t=Or(e);if(!t)return``;let n=t.querySelector(`.u-name`);if(n)return(n.textContent??``).trim();let r=``;for(let e of t.childNodes)e instanceof Element&&e.classList.contains(`wui-row-save-error`)||(r+=e.textContent??``);return r.replace(/\s+/g,` `).trim()}function Ar(e,t,n=``){if(t!==null&&!Tr.includes(t))throw Error(`A row's save state is ${Tr.join(` or `)} (or null to clear it), not "${t}".`);e.querySelector(`:scope > * > .${Dr}`)?.remove(),t===null?e.removeAttribute(Er):e.setAttribute(Er,t),t===`saving`?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`);let r=t===`error`&&n?Or(e):null;if(r){let t=e.ownerDocument.createElement(`span`);t.className=Dr,t.textContent=n,r.append(t)}}function jr(e,t){let n=[];if(!e)return n;for(let[r,i]of e){let e=t.get(r);i.state===`saving`&&e&&e.state!==`saving`&&n.push({label:e.label,ok:e.state!==`error`,message:e.message||``})}return n}function Mr(e){let t=e.filter(e=>e.ok),n=[],[r]=t;t.length===1&&r?n.push(nr(r.label)):t.length>1&&n.push(rr(t.length));for(let t of e)t.ok||n.push(ir(t.label,t.message));return n.join(` `)}var Nr=n({isImeSafeEnter:()=>Pr});function Pr(e){return e.key===`Enter`&&e.isComposing!==!0&&e.keyCode!==229}var Fr=n({svgNodes:()=>Lr,svgRoot:()=>Rr}),Ir=`http://www.w3.org/2000/svg`;function Lr(e){return e.map(zr)}function Rr(e,t){let n=document.createElementNS(Ir,`svg`);return Br(n,e),n.append(...Lr(t)),n}function zr(e){let[t,n,r]=e,i=document.createElementNS(Ir,t);return Br(i,n),typeof r==`string`?i.append(document.createTextNode(r)):r&&i.append(...Lr(r)),i}function Br(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 Vr=n({devError:()=>V,devWarn:()=>Hr});function Hr(e,...t){console.warn(e,...t)}function V(e,...t){console.error(e,...t)}var Ur=Object.freeze({carousel:{entries:[`elements/carousel.ts`],tags:[`wui-carousel`]},"code-block":{entries:[`elements/code-block.ts`],tags:[`wui-code-block`]},"command-palette":{entries:[`elements/command-palette.ts`],tags:[`wui-command-palette`]},"comment-thread":{entries:[`elements/comment-thread.ts`],tags:[`wui-mention-input`,`wui-comment-thread`]},"consent-banner":{entries:[`elements/consent-banner.ts`],tags:[`wui-consent-banner`]},"context-menu":{entries:[`elements/context-menu.ts`],tags:[`wui-context-menu`]},"date-range":{entries:[`elements/date-range.ts`],tags:[`wui-date-range`]},"date-time":{entries:[`elements/date-time.ts`],tags:[`wui-date-time`]},datepicker:{entries:[`elements/datepicker.ts`],tags:[`wui-datepicker`]},drawer:{entries:[`elements/drawer.ts`],tags:[`wui-drawer`]},dropdown:{entries:[`elements/dropdown.ts`],tags:[`wui-dropdown`]},"entry-grid":{entries:[`elements/entry-grid.ts`],tags:[`wui-entry-grid`]},gantt:{entries:[`elements/gantt.ts`],tags:[`wui-gantt`]},"image-crop":{entries:[`elements/image-crop.ts`],tags:[`wui-image-crop`]},"inline-edit":{entries:[`elements/inline-edit.ts`],tags:[`wui-inline-edit`]},kanban:{entries:[`elements/kanban.ts`],tags:[`wui-kanban`]},"lead-popup":{entries:[`elements/lead-popup.ts`],tags:[`wui-lead-popup`]},lightbox:{entries:[`elements/lightbox.ts`],tags:[`wui-lightbox`]},"org-tree":{entries:[`elements/org-tree.ts`],tags:[`wui-org-tree`]},markdown:{entries:[`elements/markdown.ts`],tags:[`wui-markdown`]},phone:{entries:[`elements/phone.ts`,`global/parts/select-country.ts`],tags:[`wui-phone`]},popover:{entries:[`elements/popover.ts`],tags:[`wui-popover`]},"saved-views":{entries:[`elements/saved-views.ts`],tags:[`wui-saved-views`]},glyphs:{entries:[`global/parts/glyphs.ts`],tags:[]},"select-chips":{entries:[`global/parts/select-chips.ts`],tags:[]},"select-recents":{entries:[`global/parts/select-recents.ts`],tags:[]},"select-search":{entries:[`global/parts/select-search.ts`],tags:[]},"select-window":{entries:[`global/parts/select-window.ts`],tags:[]},"table-export":{entries:[`global/parts/table-export.ts`],tags:[]},slider:{entries:[`elements/slider.ts`],tags:[`wui-slider`]},sortable:{entries:[`elements/sortable.ts`],tags:[`wui-sortable`]},"status-icon":{entries:[`elements/status-icon.ts`],tags:[`wui-status-icon`]},timepicker:{entries:[`elements/timepicker.ts`],tags:[`wui-timepicker`]},tour:{entries:[`elements/tour.ts`],tags:[`wui-tour`]},tree:{entries:[`elements/tree.ts`],tags:[`wui-tree`]},"tree-picker":{entries:[`elements/tree-picker.ts`],tags:[`wui-tree-picker`]},wizard:{entries:[`elements/wizard.ts`],tags:[`wui-wizard-step`,`wui-wizard`]},chart:{file:`ui-chart.global.js`,tags:[`wui-chart`],selfContained:!0},calendar:{file:`ui-calendar.global.js`,tags:[`wui-calendar`],selfContained:!0},"rich-text":{file:`ui-rich-text.global.js`,tags:[`wui-rich-text`],selfContained:!0},"file-viewer":{file:`ui-file-viewer.global.js`,tags:[`wui-file-viewer`],selfContained:!0}});Object.freeze({anchorOverlay:`anchorOverlay.ts`,avatarNode:`avatarNode.ts`,buttonClass:`buttonClass.ts`,calendarMath:`calendarMath.ts`,copyText:`copyText.ts`,dataTable:`dataTable.ts`,datePickerText:`text/web/datePicker.g.ts`,defineElement:`defineElement.ts`,devWarn:`devWarn.ts`,dom:`dom.ts`,drawerText:`text/web/drawer.g.ts`,elementBase:`elementBase.ts`,fieldState:`fieldState.ts`,formatters:`formatters.ts`,formMirror:`formMirror.ts`,glyphs:`global/glyphs.ts`,iconGlyphs:`iconGlyphs.g.ts`,imeSafeEnter:`imeSafeEnter.ts`,isDrawn:`isDrawn.ts`,listboxKeyNav:`listboxKeyNav.ts`,loader:`global/loader.ts`,mentionText:`mentionText.ts`,menuKeyNav:`menuKeyNav.ts`,nativeOverlay:`nativeOverlay.ts`,notificationDays:`notificationDays.ts`,optionLabel:`optionLabel.ts`,partRegistry:`select/partRegistry.ts`,rtl:`rtl.ts`,selectList:`select/list.ts`,selectRemote:`select/remote.ts`,selectText:`text/web/select.g.ts`,selectWindow:`select/window.ts`,serverHtml:`server/serverHtml.ts`,stepperHeader:`stepperHeader.ts`,svgNodes:`svgNodes.ts`,tableExport:`global/tableExport.ts`,tableSelect:`tableSelect.ts`,textMatch:`textMatch.ts`,textStore:`text/textStore.ts`,tooltips:`tooltips.ts`,wuiHttp:`server/wuiHttp.ts`,WuiSelect:`WuiSelect.ts`,zone:`zone.ts`});var Wr=`ui-elements/`;function Gr(e){let t=Ur[e];if(t===void 0)throw Error(`[webority-ui] No on-demand element chunk is named ${e}.`);return t}function Kr(e){let t=Gr(e);if(!t.selfContained)return`${Wr+e}.global.js`;if(t.file===void 0)throw Error(`[webority-ui] The self-contained element chunk ${e} names no file.`);return t.file}var qr=n({CHUNK_DIR:()=>Wr,CHUNK_RETRY_MS:()=>Xr,ELEMENTS_DEFINED_EVENT:()=>Jr,ELEMENTS_LOAD_ERROR_EVENT:()=>Yr,assetUrl:()=>li,loadChunk:()=>ui,startElementLoader:()=>oi,stopElementLoader:()=>si,whenElementsReady:()=>ci}),Jr=`wui-elements:defined`,Yr=`wui-elements:load-error`,Xr=1e3,Zr={"ui-elements/carousel.global.js":`3d94a0285000`,"ui-elements/code-block.global.js":`e97330f89649`,"ui-elements/command-palette.global.js":`b496f26b31c2`,"ui-elements/comment-thread.global.js":`52129c82bc63`,"ui-elements/consent-banner.global.js":`411c53c0bb02`,"ui-elements/context-menu.global.js":`ab621b470fb2`,"ui-elements/date-range.global.js":`dcf94f879f5b`,"ui-elements/date-time.global.js":`3b59506f4c01`,"ui-elements/datepicker.global.js":`57b6929499dd`,"ui-elements/drawer.global.js":`8b071289480d`,"ui-elements/dropdown.global.js":`07a0dcb92825`,"ui-elements/entry-grid.global.js":`02559b670873`,"ui-elements/gantt.global.js":`97fe23dbb9ce`,"ui-elements/image-crop.global.js":`20f4a3393b95`,"ui-elements/inline-edit.global.js":`9fb451e99149`,"ui-elements/kanban.global.js":`887c8db1a485`,"ui-elements/lead-popup.global.js":`a842060c366e`,"ui-elements/lightbox.global.js":`4623c026e408`,"ui-elements/org-tree.global.js":`176eb506f335`,"ui-elements/markdown.global.js":`a14280a00bdd`,"ui-elements/phone.global.js":`eda15e0b23f5`,"ui-elements/popover.global.js":`bef2b06d1b76`,"ui-elements/saved-views.global.js":`6a50d0804484`,"ui-elements/glyphs.global.js":`5a11eaaa51cd`,"ui-elements/select-chips.global.js":`1ef571edc615`,"ui-elements/select-recents.global.js":`ec5a9d6cf7f3`,"ui-elements/select-search.global.js":`2380954fcdad`,"ui-elements/select-window.global.js":`43e95091eb79`,"ui-elements/table-export.global.js":`5d5da1335e2f`,"ui-elements/slider.global.js":`c5e577c94dfc`,"ui-elements/sortable.global.js":`d7957b6bf4e0`,"ui-elements/status-icon.global.js":`e9c605bff918`,"ui-elements/timepicker.global.js":`28ef23b656a2`,"ui-elements/tour.global.js":`942312418ef0`,"ui-elements/tree.global.js":`88995ee6ec7c`,"ui-elements/tree-picker.global.js":`bbd13ab714eb`,"ui-elements/wizard.global.js":`738733b84680`,"ui-chart.global.js":`d6be822b2af0`,"ui-calendar.global.js":`e9ffe234aa48`,"ui-rich-text.global.js":`64bcd997849a`,"ui-file-viewer.global.js":`26b795a4159c`,"ui-phone.global.js":`c646775bc1d1`},Qr=new Map;for(let[e,t]of Object.entries(Ur))for(let n of t.tags)Qr.set(n,e);var $r=[...Qr.keys()].join(`,`),ei=null,ti=``,ni=!1,ri=null,ii=new Map;function ai(){let e=document.currentScript;return e instanceof HTMLScriptElement?e:null}function oi(e=ai()){ni||(ni=!0,ei=e?.src?e.src:null,ti=e?.nonce||``,mi(document),ri=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&mi(e)}),ri.observe(document.documentElement,{childList:!0,subtree:!0}))}function si(){ri?.disconnect(),ri=null,ni=!1,ei=null,ti=``,ii.clear()}function ci(e=document){return Promise.all([...pi(e)].map(e=>ui(e))).then(()=>void 0)}function li(e){if(ei===null)throw Error(`The on-demand element files have no address to load from.`);let t=new URL(e,ei);return t.search=Object.hasOwn(Zr,e)?`?v=${Zr[e]}`:``,t.href}function ui(e){let t=ii.get(e)?.promise??null;if(t!==null)return t;let n=Gr(e),{tags:r}=n,i=Kr(e),a=()=>Promise.all(r.map(e=>customElements.whenDefined(e))),o={status:`loading`,promise:null},s=new Promise((t,s)=>{let c=``,l=()=>{ri&&Object.keys(Ur).every(e=>ii.get(e)?.status===`loaded`||ii.get(e)?.status===`failed`)&&ri.disconnect()},u=()=>{o.status=`loaded`,l(),document.dispatchEvent(new CustomEvent(Jr,{detail:{chunk:e,tags:r}})),t()},d=t=>{o.status=`failed`,l(),V(`[webority-ui] Could not load ${c} for ${r.length?r.join(`, `):e}.${t?` ${t.message}`:``}`),document.dispatchEvent(new CustomEvent(Yr,{detail:{chunk:e,url:c,tags:r}})),s(Error(`[webority-ui] The ${e} elements failed to load.`))},f=(e,t)=>{let i=document.createElement(`script`);i.src=e,i.async=!1,ti&&(i.nonce=ti),i.addEventListener(`load`,()=>{!n.selfContained&&!r.every(e=>customElements.get(e))?d(Error(`The file ran but did not define its elements; see the error above.`)):a().then(u)}),i.addEventListener(`error`,()=>{i.remove(),t?d():setTimeout(()=>f(e,!0),Xr)}),document.head.append(i)};if([...document.scripts].some(e=>new URL(e.src,location.href).pathname.endsWith(`/${i}`)))a().then(u);else{try{c=li(i)}catch(e){d(e instanceof Error?e:void 0);return}f(c,!1)}});return o.promise=s,ii.set(e,o),s}function di(e){return Qr.has(e.localName)&&!customElements.get(e.localName)}function fi(e,t){let n=Qr.get(t.localName);n!==void 0&&di(t)&&e.add(n)}function pi(e){let t=new Set;e instanceof Element&&fi(t,e);for(let n of e.querySelectorAll($r))fi(t,n);return t}function mi(e){for(let t of pi(e))Promise.allSettled([ui(t)])}var hi=n({TABLE_EXPORT_CHUNK:()=>gi,loadTableExport:()=>vi,registerTableExport:()=>yi}),gi=`table-export`,_i=null;function vi(){return _i===null?ui(gi).then(()=>{if(_i===null)throw Error(`[webority-ui] The table-export chunk ran without handing over its writers.`);return _i}):Promise.resolve(_i)}function yi(e){_i=e}var bi=`.wui-col-resize`,xi=`.wui-group-row, .wui-virtual-spacer`,Si=`.wui-select-cell, .wui-expand-cell`;function Ci(){return Rr({class:`wui-icon`,"data-icon":`chevron-down`,"data-wui":`AppIcon`,width:16,height:16,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`},[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M19.92 8.95l-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95`}]])}function H(e){if(e==null)throw TypeError(`Missing DOM node`);return e}function wi(e,t){if(e instanceof t)return e;throw TypeError(`Missing DOM node`)}var Ti=e=>{let t=F(e,bi);return t instanceof HTMLElement?t:null},Ei=e=>e.hasAttribute(`data-wui-skeleton`)||!!e.querySelector(`:scope > td > .skeleton`),Di=class extends s{_frame;_headDirty;_rowsDirty;_frozenSig;_natural;_widths;_collapsed;_groupOrder;_items;_range;_drag;_userSized;_swallowClick;_mo;_ro;_fonts;_onPointerDown;_onKeyDown;_onClick;_onDblClick;_onScroll;_onFonts;_top=null;_bottom=null;_rowHeight=0;constructor(){super(),this._frame=0,this._headDirty=!0,this._rowsDirty=!0,this._frozenSig=null,this._natural=[],this._widths={},this._collapsed=new Set,this._groupOrder=[],this._items=[],this._range=null,this._drag=null,this._userSized=!1,this._swallowClick=!1,this._mo=null,this._ro=null,this._fonts=null,this._onPointerDown=e=>this._startDrag(e),this._onKeyDown=e=>this._key(e),this._onClick=e=>this._click(e),this._onDblClick=e=>{let t=Ti(e.target);t&&this.contains(t)&&this._reset(t.closest(`th`))},this._onScroll=()=>{this.hasAttribute(`virtual`)&&this._schedule()},this._onFonts=()=>{this._userSized||this._drag||this._frozenSig===null||!this.hasAttribute(`resizable`)||(this._frozenSig=null,this._schedule())}}connectedCallback(){this._widths=ur(this.getAttribute(`view-key`)),this.addEventListener(`pointerdown`,this._onPointerDown,!0),this.addEventListener(`keydown`,this._onKeyDown,!0),this.addEventListener(`click`,this._onClick,!0),this.addEventListener(`dblclick`,this._onDblClick),this.addEventListener(`scroll`,this._onScroll,{passive:!0}),this._fonts=this.ownerDocument.fonts??null,this._fonts?.addEventListener(`loadingdone`,this._onFonts),typeof MutationObserver<`u`&&(this._mo=new MutationObserver(e=>this._mutated(e)),this._mo.observe(this,{childList:!0,subtree:!0})),typeof ResizeObserver<`u`&&(this._ro=new ResizeObserver(()=>this._schedule()),this._ro.observe(this)),this._headDirty=!0,this._rowsDirty=!0,this._schedule()}disconnectedCallback(){this.removeEventListener(`pointerdown`,this._onPointerDown,!0),this.removeEventListener(`keydown`,this._onKeyDown,!0),this.removeEventListener(`click`,this._onClick,!0),this.removeEventListener(`dblclick`,this._onDblClick),this.removeEventListener(`scroll`,this._onScroll),this._fonts?.removeEventListener(`loadingdone`,this._onFonts),this._fonts=null,this._mo?.disconnect(),this._ro?.disconnect(),this._mo=null,this._ro=null,this._frame&&cancelAnimationFrame(this._frame),this._frame=0,this._drag=null}refresh(){this._headDirty=!0,this._rowsDirty=!0,this._run()}get _table(){let e=this.querySelector(`:scope > table`);return e instanceof HTMLTableElement?e:null}_headCells(e){let t=e.tHead?.rows[0];return t?[...t.cells]:[]}_schedule(){this._frame||=requestAnimationFrame(()=>{this._frame=0,this._run()})}_mutated(e){for(let t of e){let e=t.target instanceof Element?t.target:t.target.parentElement;e&&((e.closest(`thead`)||e===this._table||e===this)&&(this._headDirty=!0),(e.closest(`tbody, tfoot`)||e===this._table||e===this)&&(this._rowsDirty=!0))}this._schedule()}_run(){let e=this._table;if(!e)return;let t=this._headDirty,n=this._rowsDirty;this._headDirty=!1,this._rowsDirty=!1,n&&this.hasAttribute(`group-by`)&&this._group(e),this._pins(e,t||n),this.hasAttribute(`resizable`)&&(t&&this._handles(e),this._layout(e)),this.hasAttribute(`virtual`)&&this._virtual(e,t||n),this._mo?.takeRecords()}_pins(e,t){let n=this._headCells(e),r=n.map(e=>{let t=e.dataset.pin;return t===`start`||t===`end`?t:e.matches(Si)?`lead`:null});if(!r.some(e=>e===`start`||e===`end`))return;let i=hr(r);i.forEach((e,t)=>{e&&this._ro?.observe(H(n[t]))});let a=e=>H(n[e]).getBoundingClientRect().width,o=0;i.forEach((t,n)=>{t?.side===`start`&&(this._setVar(e,fr(`start`,t.ordinal),o),o+=a(n))}),o=0;for(let t=i.length-1;t>=0;t--){let n=i[t];n?.side===`end`&&(this._setVar(e,fr(`end`,n.ordinal),o),o+=a(t))}if(t)for(let t of e.rows)t.matches(`${xi}, .wui-row-expanded`)||t.cells.length!==n.length||i.forEach((e,n)=>{if(!e)return;let r=H(t.cells[n]);r.classList.contains(`wui-pin-${e.side}`)||r.classList.add(`wui-pin-${e.side}`),e.edge&&!r.classList.contains(`wui-pin-${e.side}-edge`)&&r.classList.add(`wui-pin-${e.side}-edge`);let i=mr(e.side,e.ordinal);r.style.getPropertyValue(`--wui-pin-at`)!==i&&r.style.setProperty(pr,i)})}_setVar(e,t,n){let r=`${Math.round(n*100)/100}px`;e.style.getPropertyValue(t)!==r&&e.style.setProperty(t,r)}_resizable(e){return e.map((t,n)=>n<e.length-1&&!t.matches(Si))}_handles(e){let t=this._headCells(e),n=this._resizable(t);t.forEach((e,t)=>{if(!n[t]||e.querySelector(bi))return;let r=e.ownerDocument.createElement(`span`);r.className=`wui-col-resize`,r.setAttribute(`role`,`separator`),r.setAttribute(`aria-orientation`,`vertical`),r.setAttribute(`aria-valuemin`,`48`),r.setAttribute(`aria-valuemax`,String(Kn)),r.setAttribute(`tabindex`,`0`);let i=(e.textContent??``).trim();r.setAttribute(`aria-label`,$n(i)),i&&!e.hasAttribute(`aria-label`)&&e.setAttribute(`aria-label`,i),e.classList.add(`wui-col-resizable`),e.appendChild(r)})}_hasRows(e){for(let t of e.tBodies)for(let e of t.rows)if(!e.matches(xi)&&!Ei(e))return!0;return!1}_signature(e){return e.map(e=>e.dataset.key||(e.textContent??``).trim()).join(``)}_layout(e){let t=this._headCells(e),n=this._signature(t);t.length&&n!==this._frozenSig&&(this._hasRows(e)?this._freeze(e,t,n):this._applyRemembered(t))}_applyRemembered(e){for(let t of e){let e=t.dataset.key&&this._widths[t.dataset.key];e&&(t.style.width=`${e}px`);let n=t.querySelector(bi);n&&this._handleValue(n,or(e||t.getBoundingClientRect().width))}}_freeze(e,t,n){e.style.tableLayout=``,e.style.width=``,e.removeAttribute(`data-wui-fixed`);for(let e of t)e.hasAttribute(`data-wui-width`)&&(e.style.width=``,e.removeAttribute(`data-wui-width`));this._natural=t.map(e=>e.getBoundingClientRect().width),t.forEach((e,n)=>{if(n===t.length-1||e.matches(Si))return;let r=e.dataset.key&&this._widths[e.dataset.key];this._setWidth(e,r||this._natural[n])}),e.style.tableLayout=`fixed`,e.setAttribute(`data-wui-fixed`,``),this._frozenSig=n,this._fitTable(e,t)}_setWidth(e,t){let n=or(t);e.style.width=`${n}px`,e.setAttribute(`data-wui-width`,``);let r=e.querySelector(bi);return r&&this._handleValue(r,n),n}_handleValue(e,t){e.setAttribute(`aria-valuenow`,String(t)),e.setAttribute(`aria-valuetext`,er(t))}_fitTable(e,t){let n=t.length-1,r=this._natural[n]||0;for(let e=0;e<n;e++)r+=Number.parseFloat(H(t[e]).style.width)||this._natural[e]||0;e.style.width=`max(100%, ${Math.round(r)}px)`}_ensureFrozen(e){let t=this._headCells(e),n=this._signature(t);return n!==this._frozenSig&&this._freeze(e,t,n),t}_resizeTo(e,t,n){let r=this._table;if(!r)return;let i=this._ensureFrozen(r);this._userSized=!0,this._setWidth(e,t),this._fitTable(r,i),n&&this._remember(e),this._pins(r,!1)}_remember(e){let t=e.dataset.key;t&&(this._widths={...this._widths,[t]:Number.parseFloat(e.style.width)},dr(this.getAttribute(`view-key`),this._widths))}_reset(e){let t=this._table;if(!e||!t)return;let n=this._ensureFrozen(t);this._userSized=!0;let r=e.dataset.key;if(r&&r in this._widths){let{[r]:e,...t}=this._widths;this._widths=t,dr(this.getAttribute(`view-key`),this._widths)}this._setWidth(e,this._natural[n.indexOf(e)]||0),this._fitTable(t,n),this._pins(t,!1)}_rtl(){return getComputedStyle(this).direction===`rtl`}_startDrag(e){let t=Ti(e.target);if(!t||!this.contains(t)||e.button!==0)return;e.preventDefault(),e.stopPropagation();let n=t.closest(`th`),r=this._table;if(!n||!r)return;this._ensureFrozen(r);let i={th:n,x:e.clientX,from:n.getBoundingClientRect().width,dir:this._rtl()?-1:1,moved:!1};this._drag=i,t.setPointerCapture?.(e.pointerId),t.classList.add(`is-dragging`);let a=e=>{let t=(e.clientX-i.x)*i.dir;Math.abs(t)>1&&(i.moved=!0),this._resizeTo(n,i.from+t,!1)},o=e=>{t.removeEventListener(`pointermove`,a),t.removeEventListener(`pointerup`,o),t.removeEventListener(`pointercancel`,o),t.classList.remove(`is-dragging`),this._drag=null,e.type===`pointercancel`?this._resizeTo(n,i.from,!1):i.moved&&this._remember(n),this._swallowClick=!0,setTimeout(()=>{this._swallowClick=!1},0)};t.addEventListener(`pointermove`,a),t.addEventListener(`pointerup`,o),t.addEventListener(`pointercancel`,o)}_key(e){let t=Ti(e.target);if(!t||!this.contains(t))return;let n=t.closest(`th`);if(Pr(e)||e.key===` `){e.preventDefault(),e.stopPropagation();return}if(e.key===`Home`){e.preventDefault(),e.stopPropagation(),this._reset(n);return}if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault(),e.stopPropagation();let r=this._table;if(!r)return;this._ensureFrozen(r);let i=H(n),a=e.shiftKey?50:10,o=e.key===`ArrowRight`!==this._rtl(),s=Number.parseFloat(i.style.width)||i.getBoundingClientRect().width;this._resizeTo(i,s+(o?a:-a),!0)}_click(e){let t=e.target instanceof Element&&e.target.closest(bi)!==null;if(this._swallowClick||t){e.stopPropagation(),(t||this._swallowClick)&&e.preventDefault(),this._swallowClick=!1;return}let n=F(e.target,`[data-wui-table-export], [data-wui-density]`);if(n&&this.contains(n)){e.preventDefault(),n.hasAttribute(`data-wui-density`)?this._setDensity(n.getAttribute(`data-wui-density`)??``):this._export(n.getAttribute(`data-wui-table-export`)??``);return}if(!this.hasAttribute(`group-by`))return;let r=F(e.target,`.wui-group-toggle`)?.closest(`.wui-group-row`);if(!(r instanceof HTMLTableRowElement)||!this.contains(r))return;let i=r.dataset.groupKey;this._collapsed.has(i)?this._collapsed.delete(i):this._collapsed.add(i),this._showGroup(r,!this._collapsed.has(i));let a=this._table;a&&this.hasAttribute(`virtual`)&&(this._virtual(a,!0),this._mo?.takeRecords())}async _export(e){if(e!==`csv`&&e!==`xlsx`)return;let t=this.querySelector(`:scope > table`);if(!(t instanceof HTMLTableElement))return;let n=Array.from(t.tBodies[0]?.rows??[]).filter(e=>!e.hidden&&!e.matches(`.wui-group-row, .wui-virtual-spacer, .wui-row-expanded`)&&!Ei(e)),r=new Set;for(let e of n)for(let[t,n]of Array.from(e.cells).entries())(n.matches(Si)||n.querySelector(`.u-row-actions`))&&r.add(t);let i=e=>Array.from(e).filter((e,t)=>!r.has(t)).map(e=>{let t=e.cloneNode(!0);if(!(t instanceof Element))return``;for(let e of t.querySelectorAll(`.visually-hidden, .wui-col-resize, .infotip`))e.remove();return(t.textContent??``).replace(/\s+/g,` `).trim()}),a=i(t.tHead?.rows[0]?.cells??[]),o=n.map(e=>i(e.cells)),s=this.getAttribute(`export-name`)??`table`,{downloadTable:c,tableCsv:l,tableXlsx:u}=await vi();e===`csv`?c([l(a,o)],`text/csv;charset=utf-8`,`${s}.csv`):c([u(a,o)],`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,`${s}.xlsx`)}_setDensity(e){let t=this.querySelector(`:scope > table`);if(t instanceof HTMLTableElement){t.classList.remove(`wui-table-cozy`,`wui-table-compact`),(e===`cozy`||e===`compact`)&&t.classList.add(`wui-table-${e}`);for(let t of this.querySelectorAll(`[data-wui-density]`))t.setAttribute(`aria-pressed`,String(t.getAttribute(`data-wui-density`)===e))}}_group(e){let t=this.getAttribute(`group-by`),n=this._headCells(e),r=n.findIndex(e=>e.dataset.key===t);if(r<0)throw Error(`<wui-data-table group-by="${t}"> needs a header cell with data-key="${t}".`);let i=e.tBodies[0];if(!i)return;let a=[...i.rows].filter(e=>!e.matches(xi));if(a.some(Ei))return;let o=this.ownerDocument,s=new Map;for(let e of i.querySelectorAll(`:scope > tr.wui-group-row`))e instanceof HTMLTableRowElement&&s.set(e.dataset.groupKey,e);let c=sr(a,e=>e.dataset.group??e.cells[r]?.textContent?.trim()??``,this.closest(`[data-wui-server]`)?[]:this._groupOrder);this._groupOrder=c.map(e=>e.key);let l=o.createDocumentFragment(),u=c.map(e=>{let t=s.get(e.key)??this._groupRow(o,e.key);return s.delete(e.key),wi(t.querySelector(`.wui-group-cell`),HTMLTableCellElement).colSpan=n.length,wi(t.querySelector(`.wui-group-count`),HTMLElement).textContent=ar(e.items.length),wi(t.querySelector(`.wui-group-rows`),HTMLElement).textContent=`, ${tr(e.items.length)}`,l.append(t,...e.items),[t,e.key]});for(let e of s.values())e.remove();i.insertBefore(l,this._bottom?.parentNode===i?this._bottom:null);for(let[e,t]of u)this._showGroup(e,!this._collapsed.has(t))}_groupRow(e,t){let n=e.createElement(`tr`);n.className=`wui-group-row`,n.dataset.groupKey=t;let r=e.createElement(`th`);r.className=`wui-group-cell`,r.scope=`rowgroup`;let i=e.createElement(`button`);i.type=`button`,i.className=`wui-group-toggle`,i.replaceChildren(Ci());let a=e.createElement(`span`);a.className=`wui-group-label`,a.textContent=t;let o=e.createElement(`span`);o.className=`wui-group-count`,o.setAttribute(`aria-hidden`,`true`);let s=e.createElement(`span`);return s.className=`visually-hidden wui-group-rows`,i.append(a,o,s),r.append(i),n.append(r),n}_showGroup(e,t){if(e){e.querySelector(`.wui-group-toggle`)?.setAttribute(`aria-expanded`,String(t));for(let n=e.nextElementSibling;n&&!n.matches(xi);n=n.nextElementSibling)n instanceof HTMLElement&&(n.hidden=!t)}}_spacer(e,t){if(t?.parentNode===e)return t;let n=e.ownerDocument,r=n.createElement(`tr`);return r.className=`wui-virtual-spacer`,r.setAttribute(`aria-hidden`,`true`),r.append(n.createElement(`td`)),r}_virtual(e,t){let n=e.tBodies[0];if(!n)return;if(t){this._top=this._spacer(n,this._top),this._bottom=this._spacer(n,this._bottom),n.firstElementChild!==this._top&&n.insertBefore(this._top,n.firstChild),n.lastElementChild!==this._bottom&&n.append(this._bottom);let t=Math.max(1,this._headCells(e).length);H(this._top.cells[0]).colSpan=t,H(this._bottom.cells[0]).colSpan=t,this._items=[...n.rows].filter(e=>!e.classList.contains(`wui-virtual-spacer`)&&!e.hidden),this._range=null,e.setAttribute(`aria-rowcount`,String(this._items.length+1)),e.tHead?.rows[0]?.setAttribute(`aria-rowindex`,`1`),this._items.forEach((e,t)=>{e.setAttribute(`aria-rowindex`,String(t+2))}),this._rowHeight>0||(this._rowHeight=this._measureRow(e))}let r=e.tHead?.getBoundingClientRect().height||0,i=cr({scrollTop:this.scrollTop-r,viewport:this.clientHeight,rowHeight:this._rowHeight,count:this._items.length}),a=this._range;if(a&&a.start===i.start&&a.end===i.end)return;let o=a?Math.min(a.start,i.start):0,s=a?Math.max(a.end,i.end):this._items.length;for(let e=o;e<s;e++){let t=e<i.start||e>=i.end,n=H(this._items[e]);n.classList.contains(`wui-virtual-off`)!==t&&n.classList.toggle(`wui-virtual-off`,t)}this._range=i;let c=H(this._top),l=H(this._bottom);c.hidden=i.before===0,l.hidden=i.after===0,H(c.cells[0]).style.height=`${i.before}px`,H(l.cells[0]).style.height=`${i.after}px`}_measureRow(e){let t=this._items.find(e=>!e.classList.contains(`wui-group-row`)&&!e.classList.contains(`wui-virtual-off`))?.getBoundingClientRect().height??0;return t>0?t:e.classList.contains(`wui-table-compact`)?Zn.compact:e.classList.contains(`wui-table-cozy`)?Zn.cozy:Zn.comfortable}},Oi=class extends s{_pointerMoveListener;_pointerLeaveListener;_frame;_pointerX;static get observedAttributes(){return[`static`,`max-scale`,`radius`]}constructor(){super(),this._pointerMoveListener=null,this._pointerLeaveListener=null,this._frame=0,this._pointerX=0}connectedCallback(){this._wire()}disconnectedCallback(){this._teardown()}attributeChangedCallback(e,t,n){e===`static`&&this.isConnected&&this._wire()}_maxScale(){return Ai(this.getAttribute(`max-scale`),1.6)}_radius(){return Ai(this.getAttribute(`radius`),100)}_magnifyEnabled(){return!(this.hasAttribute(`static`)||typeof matchMedia==`function`&&(matchMedia(`(pointer: coarse)`).matches||matchMedia(`(prefers-reduced-motion: reduce)`).matches))}_applyMagnification(){this._frame=0;let e=this._maxScale(),t=this._radius();for(let n of this.querySelectorAll(`.dock-item`)){let r=ki(n),i=r.getBoundingClientRect(),a=Math.abs(this._pointerX-(i.left+i.width/2)),o=Math.max(0,1-a/t),s=1+(e-1)*o;r.style.setProperty(`--wui-dock-mag`,s.toFixed(3))}}_resetMagnification(){this._frame&&=(cancelAnimationFrame(this._frame),0);for(let e of this.querySelectorAll(`.dock-item`))ki(e).style.removeProperty(`--wui-dock-mag`)}_wire(){this._teardown(),this._magnifyEnabled()&&(this._pointerMoveListener=e=>{this._pointerX=e.clientX,this._frame||=requestAnimationFrame(()=>this._applyMagnification())},this._pointerLeaveListener=()=>this._resetMagnification(),this.addEventListener(`pointermove`,this._pointerMoveListener),this.addEventListener(`pointerleave`,this._pointerLeaveListener))}_teardown(){this._pointerMoveListener&&=(this.removeEventListener(`pointermove`,this._pointerMoveListener),null),this._pointerLeaveListener&&=(this.removeEventListener(`pointerleave`,this._pointerLeaveListener),null),this._resetMagnification()}},ki=e=>Ie(e,HTMLElement,`wui-dock item must be an HTML element`),Ai=(e,t)=>{let n=Number.parseFloat(e??``);return Number.isFinite(n)?n:t},ji=300,Mi=150,Ni=`.wui-hover-card-trigger`,Pi=`.wui-hover-card-panel`,Fi=`a[href],button,input,select,textarea,[tabindex]`,Ii=0;function Li(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}var Ri=class extends s{_doc;_timer;_described;_refocusing;_onOver;_onOut;_onFocusIn;_onFocusOut;_onKeyDown;static get observedAttributes(){return[`open`]}constructor(){super(),this._doc=null,this._timer=null,this._described=null,this._refocusing=!1,this._onOver=e=>{if(e.pointerType===`touch`||e.pointerType===`pen`)return;let t=this._zone(e.target);t===`panel`?this._clear():t===`trigger`&&this._schedule(!0)},this._onOut=e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`&&this._zone(e.target)&&!this._zone(e.relatedTarget)&&this._schedule(!1)},this._onFocusIn=e=>{this._refocusing||(this._zone(e.target)===`trigger`?this._schedule(!0):this._zone(e.target)===`panel`&&this._clear())},this._onFocusOut=e=>{this._zone(e.target)&&!this._zone(e.relatedTarget)&&this._schedule(!1)},this._onKeyDown=e=>{if(e.key!==`Escape`||!this.isOpen||this.hasAttribute(`open`))return;e.preventDefault();let t=this._zone(this.ownerDocument.activeElement)===`panel`;this._clear(),this._setOpen(!1),t&&(this._refocusing=!0,this._anchor?.focus(),this._refocusing=!1)}}get isOpen(){let e=this._panel;return e!==null&&N(e)}connectedCallback(){this._doc=this.ownerDocument,this.addEventListener(`pointerover`,this._onOver),this.addEventListener(`pointerout`,this._onOut),this.addEventListener(`focusin`,this._onFocusIn),this.addEventListener(`focusout`,this._onFocusOut),this._syncOpen()}attributeChangedCallback(){this.isConnected&&this._syncOpen()}disconnectedCallback(){this._clear();let e=this._panel;e&&M(e),this.removeEventListener(`pointerover`,this._onOver),this.removeEventListener(`pointerout`,this._onOut),this.removeEventListener(`focusin`,this._onFocusIn),this.removeEventListener(`focusout`,this._onFocusOut),this._doc=null}get _trigger(){return Li(this,Ni)}get _panel(){return Li(this,Pi)}get _anchor(){let e=this._trigger;return e?Li(e,Fi)??e:null}_zone(e){if(!(e instanceof Node)||!this.contains(e))return null;let t=e instanceof Element?e:e.parentElement;return this._panel?.contains(t)?`panel`:this._trigger?.contains(t)?`trigger`:null}_delay(e,t){let n=Number(this.getAttribute(e));return this.hasAttribute(e)&&Number.isFinite(n)&&n>=0?n:t}_clear(){this._timer!==null&&clearTimeout(this._timer),this._timer=null}_syncOpen(){this._clear(),this._setOpen(this.hasAttribute(`open`))}_schedule(e){if(!e&&this.hasAttribute(`open`)||(this._clear(),this.isOpen===e))return;let t=e?this._delay(`open-delay`,ji):this._delay(`close-delay`,Mi);this._timer=setTimeout(()=>{this._timer=null,this._setOpen(e)},t)}_setOpen(e){let t=this._panel;if(!t||this.isOpen===e)return;if(!e){M(t);return}let n=this._trigger;if(!n)throw Error(`wui-hover-card: panel without a trigger`);Oe(n,t,{mode:`manual`,clampHeight:!0,keepOffscreen:this.hasAttribute(`open`),onClosed:()=>this._closed()}),this._doc?.addEventListener(`keydown`,this._onKeyDown,!0),this._describe(t),this.dispatchEvent(new CustomEvent(`wui:hover-card:open`,{bubbles:!0}))}_closed(){this._doc?.removeEventListener(`keydown`,this._onKeyDown,!0),this._described?.removeAttribute(`aria-describedby`),this._described=null,this.dispatchEvent(new CustomEvent(`wui:hover-card:close`,{bubbles:!0}))}_describe(e){let t=this._anchor;t&&(e.id||=`wui-hover-card-${++Ii}`,t.setAttribute(`aria-describedby`,e.id),this._described=t)}},zi=class extends s{_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,Pe(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=Ee(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();De(t).then(()=>{e===this._session&&(this._closing=!1,this._releaseDialog(),Ce(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}},Bi=`.wui-nav-menu-link`,Vi=`(max-width: 767.98px)`,Hi=`data-open`,Ui=e=>e instanceof Element?e:e instanceof Node?e.parentElement:null,Wi=e=>[...e].filter(e=>e instanceof HTMLElement),Gi=e=>{let t=e.children[0];if(!(t instanceof HTMLElement))throw Error(`Navigation entry has no control.`);return t},Ki=e=>{let t=e.children[1];return t instanceof HTMLElement?t:null},qi=(e,t,n)=>{let r=e[t];if(r===void 0)throw Error(n);return r},Ji=class extends s{constructor(){super(),this._onClick=e=>this._handleClick(e),this._onKeyDown=e=>this._handleKeyDown(e),this._onFocusOut=e=>{let t=this._openItem(),n=e.relatedTarget;t&&n instanceof Node&&!t.contains(n)&&this._set(t,!1)},this._onPointerDown=()=>{this._pressedOpen=this._openItem()},this._onModeChange=()=>{let e=this._openItem();e&&this._set(e,!1)},this._onOutsidePress=e=>{let t=this._openItem();t&&!e.composedPath().includes(t)&&this._set(t,!1)},this._pressedOpen=null,this._media=null}connectedCallback(){this._teardown(),this.addEventListener(`click`,this._onClick),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`pointerdown`,this._onPointerDown,!0),this._media=window.matchMedia(Vi),this._media.addEventListener(`change`,this._onModeChange)}disconnectedCallback(){this._teardown()}open(e){let t=this._items().find(t=>{let n=t.children[0];return n instanceof HTMLElement&&this._isTrigger(n)&&n.dataset.key===e});t&&this._set(t,!0)}close(e=!1){let t=this._openItem();t&&(this._set(t,!1),e&&Gi(t).focus({preventScroll:!0}))}_items(){return Wi(this.querySelectorAll(`.wui-nav-menu-item`))}_openItem(){return this._items().find(e=>{let t=Ki(e);return t!==null&&this._isOpen(t)})??null}_isOpen(e){return e.hasAttribute(Hi)||N(e)}_isTrigger(e){return!!e?.classList.contains(`wui-nav-menu-trigger`)}_entries(){return this._items().map(Gi)}_links(e){let t=Ki(e);return t?Wi(t.querySelectorAll(Bi)):[]}_set(e,t){let n=Ki(e);if(!n)return;let r=Gi(e);if(t){let t=this._openItem();if(t&&t!==e&&this._set(t,!1),this._isOpen(n))return;r.setAttribute(`aria-expanded`,`true`),window.matchMedia(Vi).matches?(n.setAttribute(Hi,``),document.addEventListener(`pointerdown`,this._onOutsidePress,!0)):Oe(r,n,{mode:`auto`,below:!0,flipAlign:!0,onClosed:()=>this._settle(e)}),this._emit(r,!0)}else n.removeAttribute(Hi),document.removeEventListener(`pointerdown`,this._onOutsidePress,!0),N(n)&&M(n),this._settle(e)}_settle(e){let t=Gi(e);t.getAttribute(`aria-expanded`)!==`false`&&(t.setAttribute(`aria-expanded`,`false`),this._emit(t,!1))}_emit(e,t){this.dispatchEvent(new CustomEvent(`wui-navigation-menu:toggle`,{bubbles:!0,detail:{key:e.dataset.key??null,open:t}}))}_handleClick(e){let t=this._pressedOpen;this._pressedOpen=null;let n=Ui(e.target),r=n?.closest(`.wui-nav-menu-trigger`);if(r&&this.contains(r)){let e=P(r.parentElement,`Navigation trigger has no entry.`),n=P(Ki(e),`Navigation entry has no panel.`),i=t===e||this._isOpen(n);this._set(e,!i);return}let i=n?.closest(Bi);i&&this.contains(i)&&this.close()}_handleKeyDown(e){if(this._pressedOpen=null,e.altKey||e.ctrlKey||e.metaKey)return;let t=Ui(e.target)?.closest(`.wui-nav-menu-trigger, .wui-nav-menu-toplink, .wui-nav-menu-link`);if(!(t instanceof HTMLElement)||!this.contains(t))return;let n=this._openItem();if(e.key===`Escape`){if(!n||!Ki(n)?.hasAttribute(Hi))return;e.preventDefault(),e.stopPropagation();let r=n.contains(t);this._set(n,!1),r&&Gi(n).focus({preventScroll:!0});return}if(t.matches(Bi)){this._linkKey(e,t);return}let r=this._entries(),i=r.indexOf(t),a=u(e.key,l(this));if(a===`ArrowRight`||a===`ArrowLeft`||a===`Home`||a===`End`){e.preventDefault();let t=a===`Home`?0:a===`End`?r.length-1:(i+(a===`ArrowRight`?1:-1)+r.length)%r.length;n&&this._set(n,!1),qi(r,t,`Navigation has no entry to focus.`).focus({preventScroll:!0})}else if(e.key===`ArrowDown`&&this._isTrigger(t)){e.preventDefault();let n=P(t.parentElement,`Navigation trigger has no entry.`);this._set(n,!0),qi(this._links(n),0,`Navigation panel has no link to focus.`).focus({preventScroll:!0})}}_linkKey(e,t){let n=P(t.closest(`.wui-nav-menu-item`),`Navigation link has no entry.`),r=this._links(n),i=r.indexOf(t);e.key===`ArrowDown`||e.key===`ArrowUp`?(e.preventDefault(),qi(r,(i+(e.key===`ArrowDown`?1:-1)+r.length)%r.length,`Navigation panel has no link to focus.`).focus({preventScroll:!0})):e.key===`Home`?(e.preventDefault(),qi(r,0,`Navigation panel has no link to focus.`).focus({preventScroll:!0})):e.key===`End`&&(e.preventDefault(),qi(r,r.length-1,`Navigation panel has no link to focus.`).focus({preventScroll:!0}))}_teardown(){for(let e of this._items()){let t=Ki(e);if(!t)continue;let n=t.hasAttribute(Hi);t.removeAttribute(Hi),M(t),n&&this._settle(e)}this._media?.removeEventListener(`change`,this._onModeChange),this._media=null,document.removeEventListener(`pointerdown`,this._onOutsidePress,!0),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`focusout`,this._onFocusOut),this.removeEventListener(`pointerdown`,this._onPointerDown,!0)}},Yi=n({isDrawn:()=>Xi});function Xi(e){return typeof e.checkVisibility==`function`?e.checkVisibility():e.closest(`[hidden]`)===null&&getComputedStyle(e).display!==`none`}var Zi={allLabel:`All`,allReadText:`All notifications marked as read.`,archivedLabel:`Archived`,clientMessage:`These could not be marked as read. Refresh the page and try again.`,emptyText:`You are all caught up.`,forbiddenMessage:`You do not have permission to mark these as read.`,label:`Notifications`,markAllLabel:`Mark all read`,networkMessage:`Could not reach the server, so these were not marked as read. Check your connection and try again.`,noneUnreadText:`No unread notifications`,scrollTabsBackwardLabel:`Scroll tabs backward`,scrollTabsForwardLabel:`Scroll tabs forward`,serverMessage:`Something went wrong on our side, so these were not marked as read. Try again in a moment.`,todayLabel:`Today`,unreadAnnouncementTextOne:`{unread} unread notification`,unreadAnnouncementTextOther:`{unread} unread notifications`,unreadLabel:`Unread`,unreadPrefixText:`Unread:`,unreadWordLabel:`unread`,viewAllLabel:`View all`,yesterdayLabel:`Yesterday`},Qi=n({NOTIFICATION_COUNT_CAP:()=>99,groupNotificationsByDay:()=>sa,notificationCountText:()=>na,notificationDayHeading:()=>oa,notificationTime:()=>aa,notificationTriggerLabel:()=>ra,notificationUnreadAnnouncement:()=>ia}),$i=99,ea=864e5,ta=()=>L(`notificationCentre`,Zi);function na(e){return e>99?`99+`:String(e)}function ra(e,t){return t===0?e:`${e}, ${na(t)} ${ta().unreadWordLabel}`}function ia(e){return e===0?ta().noneUnreadText:Je(ta(),`unreadAnnouncementText`,e,{unread:na(e)})}function aa(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?``:Fn(e,{pattern:`time`})}function oa(e,t=Date.now()){let n=Fn(e);return n===Fn(t)?ta().todayLabel:n===Fn(Nn(t)-ea)?ta().yesterdayLabel:n}function sa(e,t=Date.now()){let n=new Map;for(let r of e){if(!Number.isFinite(Nn(r.at)))throw Error(`<AppNotificationCenter> item "${r.id}": at must be an ISO date-time with its zone (or a YYYY-MM-DD day), got ${String(r.at)}.`);let e=Fn(r.at),i=n.get(e);i||(i={key:e,heading:oa(r.at,t),items:[]},n.set(e,i)),i.items.push(r)}return[...n.values()]}var ca=Object.freeze([`POST`,`PUT`,`PATCH`,`DELETE`]),la=e=>(Hr(`[@webority/ui-elements] Wui-Toast-Action: ${e}; the toast shows no action.`),null),ua=e=>typeof e==`object`&&!!e;function da(e){if(e==null||e===``)return null;let t;try{t=JSON.parse(e)}catch{return la(`the value is not JSON`)}let n=ua(t)?t:{},r=n.label,i=n.url,a=String(n.method??`POST`).toUpperCase();return typeof r!=`string`||r===``||typeof i!=`string`||i===``?la(`label and url must be non-empty strings`):ca.includes(a)?{label:r,url:i,method:a}:la(`method must be one of ${ca.join(`, `)}`)}var fa=n({CSRF_META_NAME:()=>pa,DEFAULT_CSRF_HEADER:()=>ma,DEFAULT_TIMEOUT_MS:()=>wa,HTTP_KINDS:()=>va,WUI_HEADERS:()=>U,WUI_REQUEST_HEADER:()=>_a,classifyStatus:()=>Sa,configureCsrf:()=>ga,createRequestQueue:()=>Da,readCsrf:()=>ba,timeoutFromAttribute:()=>Ta,wuiFetch:()=>W}),pa=`wui-csrf`,ma=`RequestVerificationToken`,ha={metaName:pa,header:ma};function ga({metaName:e=pa,header:t=ma}={}){ha={metaName:e,header:t}}var _a=`Wui-Request`,U=Object.freeze({fragment:`Wui-Fragment`,message:`Wui-Message`,redirect:`Wui-Redirect`,result:`Wui-Result`,keepOpen:`Wui-Keep-Open`,toastVariant:`Wui-Toast-Variant`,toastAction:`Wui-Toast-Action`,data:`Wui-Data`,next:`Wui-Next`}),va=Object.freeze([`ok`,`validation`,`forbidden`,`client`,`server`,`network`,`timeout`,`aborted`,`stale`,`session`]),ya=new Set([`GET`,`HEAD`]);function ba(e=document){let t=[...e.querySelectorAll(`meta`)].find(e=>e.getAttribute(`name`)===ha.metaName),n=t?.getAttribute(`content`);return!t||!n?null:{header:t.getAttribute(`data-header`)||ha.header,token:n}}var xa=e=>{try{return new URL(e,window.location.href).origin===window.location.origin}catch{return!1}};function Sa(e){return e>=200&&e<300?`ok`:e===401?`session`:e===403?`forbidden`:e===422?`validation`:e>=400&&e<500?`client`:`server`}var Ca=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,wa=3e4;function Ta(e){let t=e?.trim()??``;return/^\d+$/.test(t)?Number(t):void 0}var Ea=e=>{if(e==null||e===``)return null;try{return JSON.parse(e)}catch(e){throw TypeError(`The ${U.data} response header is not JSON: ${e instanceof Error?e.message:String(e)}`,{cause:e})}};async function W(e,t={}){let n=(t.method||`GET`).toUpperCase(),r=t.navigate||(e=>window.location.assign(e)),i={Accept:`text/html`,"X-Requested-With":`XMLHttpRequest`,[_a]:`1`,...t.headers};if(!ya.has(n)&&xa(e)){let e=ba();e&&(i[e.header]=e.token)}let a=e=>{if(e==null)return null;try{return decodeURIComponent(e)}catch{return e}},o=(e,t=null,n=``)=>{let r=e=>t?.headers.get(e)??null;return{kind:e,ok:e===`ok`,status:t?.status??0,html:n,response:t,message:a(r(U.message)),redirect:r(U.redirect),result:r(U.result),keepOpen:r(U.keepOpen)===`1`,toastVariant:r(U.toastVariant),toastAction:da(r(U.toastAction)),fragment:r(U.fragment)===`1`,data:Ea(a(r(U.data))),next:r(U.next)}},s=new AbortController,c=()=>s.abort(),l=t.signal;l?.aborted&&s.abort(),l?.addEventListener(`abort`,c,{once:!0});let u=t.timeoutMs??0,d=!1,f=u>0?setTimeout(()=>{d=!0,s.abort()},u):void 0,p=e=>l?.aborted?`aborted`:d?`timeout`:Ca(e)?`aborted`:`network`;try{let a;try{a=await fetch(e,{method:n,...t.body===void 0?{}:{body:t.body},headers:i,signal:s.signal,credentials:`same-origin`})}catch(e){return o(p(e))}let c=Sa(a.status);if(c===`ok`&&a.redirected&&a.headers.get(U.fragment)!==`1`&&(c=`session`),c===`session`)return r(a.status===401?a.headers.get(`Location`)||window.location.href:a.url),o(c,a);let l=``;if(c===`ok`||c===`validation`)try{l=await a.text()}catch(e){return o(p(e),a)}return o(c,a,l)}finally{clearTimeout(f),l?.removeEventListener(`abort`,c)}}function Da(){let e=null,t=0;return{async run(n,r={}){e?.abort();let i=new AbortController;e=i;let a=++t,o=r.signal;o&&(o.aborted?i.abort():o.addEventListener(`abort`,()=>i.abort(),{once:!0}));let s;try{s=await W(n,{...r,signal:i.signal})}finally{e===i&&(e=null)}return a!==t&&s.kind!==`aborted`?{...s,kind:`stale`,ok:!1}:s},abort(){e?.abort(),e=null}}}var Oa=()=>L(`notificationCentre`,Zi),ka=`.wui-notification-center-trigger`,Aa=`.wui-notification-center-panel`,ja=`.wui-notification-center-count`,Ma=`.wui-notification-center-live`,Na=`.wui-notification-center-markall`,Pa=`.wui-notification-center-item`,Fa=`wui-notification-center-item-read`,Ia=`.wui-notification-center-unread-label`,La=`.app-tabs`,Ra=`.wui-notification-center-tabs [role='tablist']`,za=`.wui-notification-center-tabs [role='tab']`,Ba=`.wui-notification-center-empty`,Va=`(max-width: 767.98px)`,Ha={ArrowDown:1,ArrowUp:-1,Home:`first`,End:`last`},Ua=e=>!!e,Wa=()=>({forbidden:Oa().forbiddenMessage,client:Oa().clientMessage,validation:Oa().clientMessage,server:Oa().serverMessage,network:Oa().networkMessage}),G=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Ga=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Ka=class extends s{constructor(){super(),this._unread=0,this._busy=!1,this._sheet=!1,this._awaitChildren=null,this._onClick=e=>this._click(e),this._onKeyDown=e=>this._key(e),this._onToggle=e=>{e.type===`toggle`&&`newState`in e&&e.newState===`closed`&&this._closedByBrowser()},this._onFocusOut=e=>{let t=e.relatedTarget;t instanceof Node&&!this.contains(t)&&this.close()}}static get observedAttributes(){return[`open`]}connectedCallback(){this._unread=this._initialUnread(),this.addEventListener(`click`,this._onClick),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`toggle`,this._onToggle,!0),this.isOpen&&(G(this,Aa)===null||G(this,ka)===null)?(this._awaitChildren=new MutationObserver(()=>this._finishAwaitedOpen()),this._awaitChildren.observe(this,{childList:!0})):(this._syncOpen(),this.isOpen&&this._showPanel())}disconnectedCallback(){this._disarmAwait(),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`focusout`,this._onFocusOut),this.removeEventListener(`toggle`,this._onToggle,!0);let e=G(this,Aa);e&&M(e)}attributeChangedCallback(e,t,n){e===`open`&&t!==n&&(this._awaitChildren?n===null&&this._disarmAwait():this.isConnected&&(n===null?this._hidePanel():this._showPanel()))}_finishAwaitedOpen(){G(this,Aa)!==null&&G(this,ka)!==null&&(this._disarmAwait(),this._syncOpen(),this._showPanel())}_disarmAwait(){this._awaitChildren?.disconnect(),this._awaitChildren=null}_showPanel(){let e=P(G(this,Aa),`<wui-notification-center> needs its panel to open.`),t=P(G(this,ka),`<wui-notification-center> needs its trigger to open.`);N(e)||(this._sheet=window.matchMedia(Va).matches,this._sheet?ke(e,!0):Oe(t,e,{mode:`auto`,onClosed:()=>this._closedByBrowser()}),N(e)&&this._layoutTabs())}_hidePanel(){let e=G(this,Aa);e&&N(e)&&(this._sheet?ke(e,!1):M(e))}_closedByBrowser(){if(!this.isConnected||!this.hasAttribute(`open`))return;let e=G(this,Aa);this.close({restoreFocus:e?.contains(this.ownerDocument.activeElement)??!1})}get isOpen(){return this.hasAttribute(`open`)}open(){this.isOpen||(P(G(this,Aa),`<wui-notification-center> needs its panel to open.`),P(G(this,ka),`<wui-notification-center> needs its trigger to open.`),this.setAttribute(`open`,``),this._syncOpen(),G(this,Aa)?.focus(),this._announceToggle())}close({restoreFocus:e=!1}={}){this.isOpen&&(this.removeAttribute(`open`),this._syncOpen(),e&&G(this,ka)?.focus(),this._announceToggle())}toggle(){this.isOpen?this.close():this.open()}_announceToggle(){this.dispatchEvent(new CustomEvent(`wui:notification-center:toggle`,{bubbles:!0,detail:{open:this.isOpen}}))}_syncOpen(){this.querySelector(ka)?.setAttribute(`aria-expanded`,this.isOpen?`true`:`false`)}_initialUnread(){let e=Number.parseInt(this.getAttribute(`unread`)??``,10);return Number.isInteger(e)&&e>=0?e:this.querySelectorAll(`${Pa}:not(.${Fa}):not([data-archived="true"])`).length}_click(e){let t=e.target;if(!(t instanceof Element))return;let n=t.closest(za);if(n instanceof HTMLElement&&this.contains(n)){if(this.hasAttribute(`controlled`))return;this._pickTab(n);return}let r=t.closest(`${ka}, ${Na}, ${Pa}`);r instanceof HTMLElement&&this.contains(r)&&(r.matches(ka)?this.toggle():this.hasAttribute(`controlled`)||(r.matches(Na)?this._markAll():this._markItem(r)))}_key(e){if(!this.isOpen)return;let t=e.target;if(!(t instanceof Element))throw Error(`Keyboard event target is not an element.`);if(!this.querySelector(Aa)?.contains(t)||t.closest(La))return;let n=Ha[e.key];if(n===void 0)return;let r=Ga(this,Pa).filter(Xi);if(r.length===0)return;let i=t.closest(Pa),a=i instanceof HTMLElement?r.indexOf(i):-1,o;o=n===`first`?0:n===`last`?r.length-1:a===-1?n===1?0:r.length-1:Math.min(r.length-1,Math.max(0,a+n)),e.preventDefault(),r[o]?.focus()}_markItem(e){e.classList.contains(Fa)||(this._applyRead(e),e.dataset.archived!==`true`&&(this._unread=Math.max(0,this._unread-1)),this._render(),this._say(ia(this._unread)),this._emitRead([e.dataset.id].filter(Ua),!1))}async _markAll(){if(this._busy)return;let e=Ga(this,`${Pa}:not(.${Fa})`);if(e.length===0&&this._unread===0)return;let t=e.map(e=>e.dataset.id).filter(Ua),n=this.getAttribute(`read-action`);if(n){this._setBusy(!0);let e=new URLSearchParams;for(let n of t)e.append(`ids`,n);let r=await W(n,{method:`POST`,body:e});if(this._setBusy(!1),!r.ok){if(r.kind===`session`||r.kind===`aborted`)return;let e=r.kind,t=r.message||Wa()[e]||Oa().serverMessage;this._say(t),this.dispatchEvent(new CustomEvent(`wui:notification-center:failed`,{bubbles:!0,detail:{kind:e,message:t}}));return}}for(let t of e)this._applyRead(t);this._unread=0,this._render(),this._say(Oa().allReadText),this._emitRead(t,!0)}_pickTab(e){let t=e.closest(Ra);if(t instanceof HTMLElement){for(let n of Ga(t,za)){let t=n===e;n.classList.toggle(`active`,t),n.setAttribute(`aria-selected`,t?`true`:`false`),n.setAttribute(`tabindex`,t?`0`:`-1`)}this._layoutTabs(),this._filterItems(e.dataset.key)}}_layoutTabs(){for(let e of Ga(this,Ra)){let t=G(e,`.app-tab.active`);t&&(e.style.setProperty(`--wui-tab-x`,`${t.offsetLeft}px`),e.style.setProperty(`--wui-tab-w`,`${t.offsetWidth}px`)),e.setAttribute(`data-wui-tabs`,``)}}_filterItems(e){let t=!1;for(let n of Ga(this,Pa)){let r=n.dataset.archived===`true`,i=n.classList.contains(Fa),a=e===`archived`?r:!r&&(e!==`unread`||!i);a&&(t=!0);let o=n.closest(`li`);o&&(o.hidden=!a)}for(let e of Ga(this,`.wui-notification-center-list section`))e.hidden=[...e.querySelectorAll(`li`)].every(e=>e.hidden);let n=G(this,Ba);n&&(n.hidden=t)}_applyRead(e){e.classList.add(Fa),e.querySelector(Ia)?.remove()}_setBusy(e){this._busy=e;let t=this.querySelector(Na);t instanceof HTMLButtonElement&&(t.disabled=e||this._unread===0,e?t.setAttribute(`aria-busy`,`true`):t.removeAttribute(`aria-busy`))}_render(){let e=G(this,ja);e&&(e.textContent=na(this._unread),e.hidden=this._unread===0),this.querySelector(ka)?.setAttribute(`aria-label`,ra(this.getAttribute(`label`)||Oa().label,this._unread));let t=this.querySelector(Na);t instanceof HTMLButtonElement&&(t.disabled=this._unread===0)}_say(e){let t=this.querySelector(Ma);t&&(t.textContent=e)}_emitRead(e,t){this.dispatchEvent(new CustomEvent(`wui:notification-center:read`,{bubbles:!0,detail:{ids:e,all:t}}))}},qa=`.wui-onboarding-card`,Ja=`.wui-onboarding-steps`,Ya=`.wui-onboarding-toggle`,Xa=`.wui-onboarding-dismiss`,Za=`.wui-onboarding-restore`,Qa=`wui-onboarding:`,$a=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},eo=class extends s{constructor(){super(),this._onClick=e=>{let t=e.target instanceof Element?e.target:null;t&&(t.closest(Xa)?this.dismiss():t.closest(Za)?this.restore():t.closest(Ya)&&this.toggle())}}connectedCallback(){this.addEventListener(`click`,this._onClick),this._stored()===`dismissed`&&this._setDismissed(!0)}disconnectedCallback(){this.removeEventListener(`click`,this._onClick)}get dismissed(){return $a(this,qa)?.hidden===!0}get collapsed(){return $a(this,Ja)?.hidden===!0}dismiss(){this.dismissed||(this._setDismissed(!0),this._store(`dismissed`),$a(this,Za)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:dismiss`,{bubbles:!0})))}restore(){this.dismissed&&(this._setDismissed(!1),this._store(null),$a(this,Ya)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:restore`,{bubbles:!0})))}toggle(){let e=$a(this,Ja);if(!e)return;let t=!e.hidden;e.hidden=t,this.querySelector(Ya)?.setAttribute(`aria-expanded`,String(!t)),this.dispatchEvent(new CustomEvent(`wui:onboarding:collapse`,{bubbles:!0,detail:{collapsed:t}}))}_setDismissed(e){let t=$a(this,qa),n=$a(this,Za);t&&(t.hidden=e),n&&(n.hidden=!e)}_key(){let e=this.getAttribute(`storage-key`);return e?Qa+e:null}_stored(){let e=this._key();if(!e)return null;try{return window.localStorage.getItem(e)}catch{return null}}_store(e){let t=this._key();if(t)try{e?window.localStorage.setItem(t,e):window.localStorage.removeItem(t)}catch(e){if(!(e instanceof DOMException))throw e}}},to=n({BUSY_CLASS:()=>no,isInert:()=>io,isReadOnly:()=>ro,syncFieldState:()=>ao}),no=`wui-field-busy`,ro=e=>e.hasAttribute(`readonly`),io=e=>e.hasAttribute(`disabled`)||e.hasAttribute(`readonly`)||e.hasAttribute(`loading`);function ao(e,t){let n=e.hasAttribute(`loading`);n?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`),t&&(t.classList.toggle(no,n),ro(e)?t.setAttribute(`aria-readonly`,`true`):t.removeAttribute(`aria-readonly`))}var oo=n({syncFormMirror:()=>uo,syncFormMirrors:()=>fo}),so=`data-wui-mirror`;function co(e,t,n,r){t.name=n,t.value=r==null?``:String(r);for(let n of[...t.attributes])n.name.startsWith(`data-val`)&&!e.hasAttribute(n.name)&&t.removeAttribute(n.name);for(let n of e.attributes)n.name.startsWith(`data-val`)&&t.setAttribute(n.name,n.value);t.disabled=e.hasAttribute(`disabled`)}function lo(e){let t=document.createElement(`input`);return t.type=`hidden`,t.setAttribute(so,``),e.appendChild(t),t}function uo(e,t){let n=e.getAttribute(`name`)??``,r=e.querySelector(`:scope > input[${so}]`),i=r instanceof HTMLInputElement?r:null;n?(i||=lo(e),co(e,i,n,t)):i?.remove()}function fo(e,t){let n=e.getAttribute(`name`)??``,r=[...e.querySelectorAll(`:scope > input[${so}]`)].filter(e=>e instanceof HTMLInputElement),i=[...e.attributes].some(e=>e.name.startsWith(`data-val`)),a=n?t.length>0?t:i?[``]:[]:[];for(let e of r.splice(a.length))e.remove();a.forEach((t,i)=>{co(e,r[i]??lo(e),n,t)})}var po=/[^0-9]/g,mo=/[^0-9a-zA-Z]/g,ho=class extends s{static formAssociated=!0;static get observedAttributes(){return[`value`,`length`,`mode`,`disabled`,`readonly`,`loading`,`size`,`aria-label`]}get length(){let e=Number.parseInt(this.getAttribute(`length`)??`6`,10);return Number.isFinite(e)&&e>0?e:6}set length(e){this.setAttribute(`length`,String(e))}get mode(){return this.getAttribute(`mode`)===`alphanumeric`?`alphanumeric`:`numeric`}set mode(e){this.setAttribute(`mode`,String(e??`numeric`))}get value(){return this._value??``}set value(e){this._value=this._clean(e),uo(this,this._value),this._paint()}_clean(e){return(e==null?``:String(e)).replace(this.mode===`alphanumeric`?mo:po,``).slice(0,this.length)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}}connectedCallback(){this._rendered?this._onSelectionChange&&document.addEventListener(`selectionchange`,this._onSelectionChange):(this._defaultCaptured||=(this._defaultValue=this._value,!0),this.render())}formResetCallback(){this._value=this._defaultValue||``,uo(this,this._value),this._paint()}attributeChangedCallback(e,t,n){this._rendered&&(e===`value`?(this._value=this._clean(n),uo(this,this._value),this._paint()):this.render())}render(){this._value=this._clean(this.getAttribute(`value`)??this._value);let e=this.length,t=this.mode===`numeric`,n=this.hasAttribute(`disabled`),r=ro(this)||this.hasAttribute(`loading`),i=this.getAttribute(`size`),a=i===`sm`||i===`lg`?` otp-${i}`:``,o=Array.from({length:e},()=>I(`span`,{class:`otp-slot`,"aria-hidden":`true`})),s=this.getAttribute(`aria-label`);this.replaceChildren(I(`div`,{class:`otp${a}`},I(`input`,{class:`otp-field`,type:`text`,autocomplete:`one-time-code`,inputmode:t?`numeric`:`text`,pattern:t?`[0-9]*`:void 0,"aria-label":s||void 0,autocapitalize:`off`,autocorrect:`off`,spellcheck:`false`,disabled:n,readonly:r}),I(`div`,{class:`otp-slots`,"aria-hidden":`true`},...o))),this._rendered=!0,uo(this,this._value),ao(this,this.querySelector(`.otp`)),this._wire(),this._paint()}_refs(){let e=this.querySelector(`.otp-field`);return{input:e instanceof HTMLInputElement?e:null,slots:[...this.querySelectorAll(`.otp-slot`)].filter(e=>e instanceof HTMLElement)}}_paint(){let{input:e,slots:t}=this._refs();if(!e||!t.length)return;e.value!==this._value&&(e.value=this._value);let n=e.selectionStart??this._value.length,r=Math.min(n,t.length-1),i=document.activeElement===e;t.forEach((e,t)=>{e.textContent=this._value[t]??``,e.classList.toggle(`filled`,!!this._value[t]),e.classList.toggle(`active`,i&&t===r)})}_wire(){let{input:e}=this._refs();if(!e)return;let t=e=>{let t=this._clean(e),n=t!==this._value;this._value=t,uo(this,this._value),this._paint(),n&&this.dispatchEvent(new Event(`change`,{bubbles:!0})),n&&t.length===this.length&&this.dispatchEvent(new CustomEvent(`complete`,{bubbles:!0,detail:t}))};e.addEventListener(`input`,()=>{let n=e.value;if(this._value.length===this.length&&n.length>this._value.length&&n.startsWith(this._value)){let e=this._clean(n.slice(this._value.length));if(e){t(e);return}}t(n)}),e.addEventListener(`paste`,e=>{if(io(this))return;let n=e.clipboardData?.getData(`text`);n!=null&&(e.preventDefault(),t(n))});for(let t of[`keyup`,`click`,`blur`,`select`])e.addEventListener(t,()=>this._paint());e.addEventListener(`focus`,()=>{this._value.length===this.length&&e.select(),this._paint()}),this._onSelectionChange&&document.removeEventListener(`selectionchange`,this._onSelectionChange),this._onSelectionChange=()=>{document.activeElement===e&&this._paint()},document.addEventListener(`selectionchange`,this._onSelectionChange)}disconnectedCallback(){this._onSelectionChange&&document.removeEventListener(`selectionchange`,this._onSelectionChange)}},go={label:`More`},_o=`data-wui-overflow-hidden`,vo=`[aria-selected="true"], .active`,yo=`.chip-body, input, a[href], button:not(.chip-remove)`,bo=()=>L(`overflow`,go),xo=1,So=`data-wui-overflow-menu`,Co=`[aria-haspopup], [data-wui-dropdown-trigger]`,wo=0,To=e=>Number.parseFloat(e)||0,Eo=e=>e.nodeType===1,Do=e=>{let t=e.getAttribute(`data-overflow-label`);if(t)return t;let n=[],r=e=>{for(let t of e.childNodes)if(t.nodeType===3){let e=t.textContent?.trim();e&&n.push(e)}else Eo(t)&&!t.matches(`svg, img, [aria-hidden='true'], [data-wui-dropdown-menu]`)&&r(t)};if(r(e),n.length)return n.join(` `);let i=Oo(e)??e;return i.getAttribute(`aria-label`)||e.getAttribute(`aria-label`)||i.title||e.title},Oo=e=>{if(e.matches(`button, a[href], label, input`))return e;let t=e.querySelector(yo);return t instanceof HTMLElement?t:null},ko=e=>{let t=Oo(e);return t?.matches(Co)?t:null},Ao=class extends s{constructor(){super(),this._hiddenKey=``,this._ro=null,this._mo=null,this._observedList=null,this._doc=null,this._onDocDown=e=>{!this._menu.hidden&&!e.composedPath().includes(this)&&this._close(!1)}}connectedCallback(){this.classList.add(`wui-overflow`),this._build(),this._doc=this.ownerDocument,this._doc.addEventListener(`pointerdown`,this._onDocDown,!0),typeof ResizeObserver<`u`&&(this._ro=new ResizeObserver(()=>this.layout()),this._ro.observe(this)),typeof MutationObserver<`u`&&(this._mo=new MutationObserver(()=>this.layout()),this._watch()),this.layout()}disconnectedCallback(){this._ro?.disconnect(),this._mo?.disconnect(),this._ro=null,this._mo=null,this._observedList=null,this._doc?.removeEventListener(`pointerdown`,this._onDocDown,!0),this._doc=null,D(this)}static get observedAttributes(){return[`label`]}attributeChangedCallback(){let e=this._more?.firstChild;e&&(e.textContent=this._label())}_label(){return this.getAttribute(`label`)||bo().label}_list(){let e=this.querySelector(`[data-wui-overflow-list]`);return e instanceof HTMLElement?e:null}_items(e){return[...e.children].filter(e=>!e.hasAttribute(`data-wui-overflow-skip`))}_build(){if(this._more)return;let e=`wui-overflow-menu-${++wo}`,t=this.ownerDocument.createElement(`button`);t.type=`button`,t.className=`wui-overflow-more`,t.hidden=!0,t.setAttribute(`aria-haspopup`,`menu`),t.setAttribute(`aria-expanded`,`false`),t.setAttribute(`aria-controls`,e),t.append(this._label());let n=this.ownerDocument.createElement(`div`);n.className=`wui-overflow-menu`,n.id=e,n.setAttribute(`role`,`menu`),n.hidden=!0,this.append(t,n),this._more=t,this._menu=n,t.addEventListener(`click`,()=>this._menu.hidden?this._open(!1):this._close(!0)),t.addEventListener(`keydown`,e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),this._open(!0))}),n.addEventListener(`keydown`,e=>this._onMenuKey(e))}_watch(){let e=this._list();this._mo&&e!==this._observedList&&(this._mo.disconnect(),this._observedList=e,e&&this._mo.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`class`,`aria-selected`,`disabled`,`aria-disabled`,`data-overflow-label`]}))}layout(){let e=this._list();if(this._watch(),!e||!this._more)return;let t=this._items(e);for(let e of t)e.removeAttribute(_o),e.removeAttribute(So);this._more.hidden=!0;let n=this.clientWidth,r=[];if(t.length&&n<=0&&this.getClientRects().length>0)r=t;else if(n>0&&t.length){let i=getComputedStyle(e),a=To(i.columnGap),o=To(i.paddingLeft)+To(i.paddingRight)+To(i.borderLeftWidth)+To(i.borderRightWidth),s=t.map(e=>e.offsetWidth);if(s.reduce((e,t)=>e+t,0)+a*(t.length-1)>n-o+xo){this._more.hidden=!1;let e=n-o-this._more.offsetWidth-To(getComputedStyle(this).columnGap),i=this.hasAttribute(`keep`)?this.getAttribute(`keep`):vo,c=new Set,l=0,u=0,d=i?t.filter(e=>e.matches(i)):[];for(let n of d){let r=l+(s[t.indexOf(n)]??0)+(u?a:0);r>e||(c.add(n),l=r,u+=1)}for(let n=0;n<t.length;n+=1){let r=t[n];if(!r||c.has(r))continue;let i=l+(s[n]??0)+(u?a:0);if(i>e)break;c.add(r),l=i,u+=1}r=t.filter(e=>!c.has(e))}}for(let e of r)e.setAttribute(_o,``),ko(e)&&e.setAttribute(So,``);this._more.hidden=r.length===0,r.length?this._menu.hidden||this._fill(r):this._close(!1);let i=r.map(e=>t.indexOf(e)).join(`,`);i!==this._hiddenKey&&(this._hiddenKey=i,this.dispatchEvent(new CustomEvent(`wui-overflow-change`,{bubbles:!0,detail:{hidden:r.length}})))}_hiddenItems(){let e=this._list();return e?this._items(e).filter(e=>e.hasAttribute(_o)):[]}_fill(e){this._menu.replaceChildren();for(let t of e){let e=this.ownerDocument.createElement(`button`);e.type=`button`,e.className=`wui-overflow-item`,e.tabIndex=-1;let n=t.querySelector(`input[type=checkbox], input[type=radio]`);n instanceof HTMLInputElement?(e.setAttribute(`role`,n.type===`radio`?`menuitemradio`:`menuitemcheckbox`),e.setAttribute(`aria-checked`,String(n.checked))):e.setAttribute(`role`,`menuitem`);let r=Oo(t),i=!r||`disabled`in r&&r.disabled||r.getAttribute(`aria-disabled`)===`true`||t.matches(`.disabled, [aria-disabled='true']`);i&&e.setAttribute(`aria-disabled`,`true`),e.textContent=Do(t),e.addEventListener(`click`,()=>{i||r&&this._choose(t,r)}),this._menu.append(e)}}_choose(e,t){this._close(!1),t.click(),this.layout();let n=ko(e)?.isConnected?e.querySelector(`.dropdown-item:not([aria-disabled='true'])`):null;if(n){n.focus();return}let r=!e.hasAttribute(_o)&&e.matches(`button, a[href]`)?e:this._more;r.hidden||r.focus()}_open(e){let t=this._hiddenItems();if(!t.length)return;this._fill(t),this._menu.hidden=!1,this._more.setAttribute(`aria-expanded`,`true`);let n=()=>T(this._more,this._menu);if(n(),E(this,n),e){let e=this._menu.firstElementChild;e instanceof HTMLElement&&e.focus()}}_close(e){this._menu&&!this._menu.hidden&&(this._menu.hidden=!0,this._more.setAttribute(`aria-expanded`,`false`),D(this),e&&this._more.focus())}_onMenuKey(e){let t=[...this._menu.children].filter(e=>e instanceof HTMLElement),n=this.ownerDocument.activeElement,r=n instanceof HTMLElement?t.indexOf(n):-1,i=null;if(e.key===`ArrowDown`)i=t[(r+1)%t.length];else if(e.key===`ArrowUp`)i=t[(r-1+t.length)%t.length];else if(e.key===`Home`)i=t[0];else if(e.key===`End`)i=t[t.length-1];else if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this._close(!0);return}else if(e.key===`Tab`){this._close(!1);return}else return;e.preventDefault(),i?.focus()}},jo=`.wui-rating-star`,Mo=`wui-rating-star-preview`,No=`wui-rating-previewing`,Po=`wui-rating-star-full`,Fo=`wui-rating-star-empty`,Io=[Po,`wui-rating-star-half`,Fo],Lo=e=>[...e.querySelectorAll(jo)].filter(e=>e instanceof HTMLElement),Ro=class extends s{_onChange;_onOver;_onLeave;constructor(){super(),this._onChange=e=>{let t=e.target;t instanceof HTMLInputElement&&t.type===`radio`&&this._fill(Number(t.value))},this._onOver=e=>{if(this.hasAttribute(`disabled`))return;let t=F(e.target,jo);t instanceof HTMLElement&&this._preview(Number(t.dataset.value))},this._onLeave=()=>this._preview(0)}connectedCallback(){this.addEventListener(`change`,this._onChange),this.addEventListener(`mouseover`,this._onOver),this.addEventListener(`mouseleave`,this._onLeave)}disconnectedCallback(){this.removeEventListener(`change`,this._onChange),this.removeEventListener(`mouseover`,this._onOver),this.removeEventListener(`mouseleave`,this._onLeave)}_fill(e){for(let t of Lo(this))t.classList.remove(...Io),t.classList.add(Number(t.dataset.value)<=e?Po:Fo)}_preview(e){this.classList.toggle(No,e>0);for(let t of Lo(this))t.classList.toggle(Mo,e>0&&Number(t.dataset.value)<=e)}},zo=class extends s{_doc;_onKeyDown;constructor(){super(),this._doc=null,this._onKeyDown=e=>{this.hasAttribute(`keys`)&>(e,{j:()=>this._press(`.wui-record-pager-next`),k:()=>this._press(`.wui-record-pager-prev`)},this.closest(`[${tt}]`))}}connectedCallback(){this._doc=this.ownerDocument,P(this._doc,`wui-record-pager has no owner document`).addEventListener(`keydown`,this._onKeyDown)}disconnectedCallback(){this._doc?.removeEventListener(`keydown`,this._onKeyDown),this._doc=null}_press(e){let t=this.querySelector(e);!(t instanceof HTMLElement)||t instanceof HTMLButtonElement&&t.disabled||t.getAttribute(`aria-disabled`)===`true`||t.click()}},Bo={daysAgoTextOne:`{count} day ago`,daysAgoTextOther:`{count} days ago`,hoursAgoTextOne:`{count} hour ago`,hoursAgoTextOther:`{count} hours ago`,inDaysTextOne:`in {count} day`,inDaysTextOther:`in {count} days`,inHoursTextOne:`in {count} hour`,inHoursTextOther:`in {count} hours`,inMinutesTextOne:`in {count} minute`,inMinutesTextOther:`in {count} minutes`,justNowText:`just now`,minutesAgoTextOne:`{count} minute ago`,minutesAgoTextOther:`{count} minutes ago`},Vo=6e4,Ho=60*Vo,Uo=24*Ho,Wo=()=>L(`relativeTime`,Bo),Go={minute:`minutesAgoText`,hour:`hoursAgoText`,day:`daysAgoText`},Ko={minute:`inMinutesText`,hour:`inHoursText`,day:`inDaysText`};function qo(e,t=Date.now()){let n=Nn(e);if(!Number.isFinite(n))return B();let r=t-n,i=Math.abs(r);if(i>=7*Uo)return Fn(n);if(i<Vo)return Wo().justNowText;let[a,o]=i<Ho?[Math.floor(i/Vo),`minute`]:i<Uo?[Math.floor(i/Ho),`hour`]:[Math.floor(i/Uo),`day`];return Je(Wo(),(r>0?Go:Ko)[o],a)}function Jo(e){let t=Nn(e);return Number.isFinite(t)?`${Fn(t,{pattern:`datetime`})} IST`:B()}var Yo=3e4,Xo=new Set,Zo=null,Qo=()=>{if(!(typeof document<`u`&&document.hidden))for(let e of Xo)e.refresh()},$o=e=>{Xo.add(e),Xo.size===1&&(Zo=setInterval(Qo,Yo),document.addEventListener(`visibilitychange`,Qo))},es=e=>{Xo.delete(e),Xo.size===0&&(clearInterval(Zo??void 0),Zo=null,document.removeEventListener(`visibilitychange`,Qo))},ts=class extends s{_observer;constructor(){super(),this._observer=null}connectedCallback(){this.refresh(),$o(this),this._observer=new MutationObserver(()=>this.refresh()),this._observer.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`datetime`]})}disconnectedCallback(){es(this),this._observer?.disconnect(),this._observer=null}refresh(){let e=this.querySelector(`time[datetime]`);if(!(e instanceof HTMLTimeElement))return;let t=e.getAttribute(`datetime`),n=qo(t);e.textContent!==n&&(e.textContent=n);let r=Jo(t);this.getAttribute(`data-wui-tooltip`)!==r&&this.setAttribute(`data-wui-tooltip`,r)}},ns=n({avatarNode:()=>is,safeImageUrl:()=>rs}),rs=e=>{let t=String(e??``).trim();return/^(https?:)?\/\//i.test(t)||/^\/(?!\/)/.test(t)||/^data:image\/(png|jpe?g|gif|webp|avif);/i.test(t)?t:``};function is(e,t=`wui-opt-avatar`){let n=rs(e.avatar);return!n&&!e.initials?null:I(`span`,{class:`avatar ${t}`,"aria-hidden":`true`},I(`span`,{class:`avatar-face`},e.initials??``),n?I(`img`,{class:`avatar-img`,src:n,alt:``}):null)}var as={add:[[`path`,{d:`M6 12h12M12 18V6`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"alert-circle":[[`path`,{d:`M12 7.75V13M21.08 8.58v6.84c0 1.12-.6 2.16-1.57 2.73l-5.94 3.43c-.97.56-2.17.56-3.15 0l-5.94-3.43a3.15 3.15 0 0 1-1.57-2.73V8.58c0-1.12.6-2.16 1.57-2.73l5.94-3.43c.97-.56 2.17-.56 3.15 0l5.94 3.43c.97.57 1.57 1.6 1.57 2.73Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M12 16.2v.1`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"alert-triangle":[[`path`,{d:`M12 9v5M12 21.41H5.94c-3.47 0-4.92-2.48-3.24-5.51l3.12-5.62L8.76 5c1.78-3.21 4.7-3.21 6.48 0l2.94 5.29 3.12 5.62c1.68 3.03.22 5.51-3.24 5.51H12v-.01Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M11.995 17h.009`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"arrow-left":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M9.57 5.93L3.5 12l6.07 6.07M20.5 12H3.67`}]],"arrow-right":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M14.43 5.93L20.5 12l-6.07 6.07M3.5 12h16.83`}]],at:[[`path`,{d:`M16 12a4 4 0 1 1-8 0 4 4 0 1 1 8 0M16 12v1.5a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-3.5 7.13`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],calendar:[[`path`,{d:`M8 2v3M16 2v3M3.5 9.09h17M21 8.5V17c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V8.5c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M15.695 13.7h.009M15.695 16.7h.009M11.995 13.7h.01M11.995 16.7h.01M8.294 13.7h.01M8.294 16.7h.01`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"calendar-dots":[[`path`,{d:`M8 2v3M16 2v3M16 3.5c3.33.18 5 1.45 5 6.15v6.18c0 4.12-1 6.18-6 6.18H9c-5 0-6-2.06-6-6.18V9.65c0-4.7 1.67-5.96 5-6.15h8ZM20.75 17.6H3.25`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M12 8.25c-1.23 0-2.27.67-2.27 1.97 0 .62.29 1.09.73 1.39-.61.36-.96.94-.96 1.62 0 1.24.95 2.01 2.5 2.01 1.54 0 2.5-.77 2.5-2.01 0-.68-.35-1.27-.97-1.62.45-.31.73-.77.73-1.39 0-1.3-1.03-1.97-2.26-1.97Zm0 2.84c-.52 0-.9-.31-.9-.8 0-.5.38-.79.9-.79s.9.29.9.79c0 .49-.38.8-.9.8ZM12 14c-.66 0-1.14-.33-1.14-.93 0-.6.48-.92 1.14-.92.66 0 1.14.33 1.14.92 0 .6-.48.93-1.14.93Z`,fill:`currentColor`}]],chart:[[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M15.5 18.5c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2s-2 .9-2 2v9a2 2 0 0 0 2 2ZM8.5 18.5c1.1 0 2-.9 2-2V13c0-1.1-.9-2-2-2s-2 .9-2 2v3.5a2 2 0 0 0 2 2Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],check:[[`path`,{d:`m5 12.75 4.5 4.5L19 7.5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"check-circle":[[`path`,{d:`M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`m7.75 12 2.83 2.83 5.67-5.66`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"chevron-down":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M19.92 8.95l-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95`}]],"chevron-left":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M15 19.92L8.48 13.4c-.77-.77-.77-2.03 0-2.8L15 4.08`}]],"chevron-right":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M8.91 19.92l6.52-6.52c.77-.77.77-2.03 0-2.8L8.91 4.08`}]],"chevron-up":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M19.92 15.05L13.4 8.53c-.77-.77-2.03-.77-2.8 0l-6.52 6.52`}]],"chevrons-up-down":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M9.01 20.5l-5.02-5.01M9.01 3.5v17M14.99 3.5l5.02 5.01M14.99 20.5v-17`}]],circle:[[`path`,{d:`M11.97 22c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M12 16.23a4.23 4.23 0 1 0 0-8.46 4.23 4.23 0 0 0 0 8.46Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],clock:[[`path`,{d:`M22 12c0 5.52-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2s10 4.48 10 10Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`m15.71 15.18-3.1-1.85c-.54-.32-.98-1.09-.98-1.72v-4.1`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],code:[[`path`,{d:`M9 13c-.66.33-1.21.82-1.62 1.43-.23.35-.23.79 0 1.14.41.61.96 1.1 1.62 1.43M15.21 13c.66.33 1.21.82 1.62 1.43.23.35.23.79 0 1.14-.41.61-.96 1.1-1.62 1.43`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7ZM2.23 8.01 21.45 8`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],comment:[[`path`,{d:`M8.5 19H8c-4 0-6-1-6-6V8c0-4 2-6 6-6h8c4 0 6 2 6 6v5c0 4-2 6-6 6h-.5c-.31 0-.61.15-.8.4l-1.5 2c-.66.88-1.74.88-2.4 0l-1.5-2c-.16-.22-.53-.4-.8-.4Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M15.996 11h.01M11.995 11h.01M7.995 11h.008`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],copy:[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M16 12.9v4.2c0 3.5-1.4 4.9-4.9 4.9H6.9C3.4 22 2 20.6 2 17.1v-4.2C2 9.4 3.4 8 6.9 8h4.2c3.5 0 4.9 1.4 4.9 4.9z`}],[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M22 6.9v4.2c0 3.5-1.4 4.9-4.9 4.9H16v-3.1C16 9.4 14.6 8 11.1 8H8V6.9C8 3.4 9.4 2 12.9 2h4.2C20.6 2 22 3.4 22 6.9z`}]],danger:[[`path`,{d:`M12 9v5M12 21.41H5.94c-3.47 0-4.92-2.48-3.24-5.51l3.12-5.62L8.76 5c1.78-3.21 4.7-3.21 6.48 0l2.94 5.29 3.12 5.62c1.68 3.03.22 5.51-3.24 5.51H12v-.01Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M11.995 17h.009`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],database:[[`path`,{d:`M18.5 12.65v3.7c0 3.12-2.91 5.65-6.5 5.65s-6.5-2.53-6.5-5.65v-3.7C5.5 15.77 8.41 18 12 18s6.5-2.23 6.5-5.35Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M18.5 7.65c0 .91-.25 1.75-.69 2.47C16.74 11.88 14.54 13 12 13c-2.54 0-4.74-1.12-5.81-2.88-.44-.72-.69-1.56-.69-2.47 0-1.56.73-2.97 1.9-3.99C8.58 2.63 10.2 2 12 2c1.8 0 3.42.63 4.6 1.65 1.17 1.03 1.9 2.44 1.9 4Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M18.5 7.65v5c0 3.12-2.91 5.35-6.5 5.35s-6.5-2.23-6.5-5.35v-5C5.5 4.53 8.41 2 12 2c1.8 0 3.42.63 4.6 1.65 1.17 1.03 1.9 2.44 1.9 4Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],display:[[`path`,{d:`M6.44 2h11.11C21.11 2 22 2.89 22 6.44v6.33c0 3.56-.89 4.44-4.44 4.44H6.44C2.89 17.22 2 16.33 2 12.78V6.44C2 2.89 2.89 2 6.44 2ZM12 17.22V22M2 13h20M7.5 22h9`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],document:[[`path`,{d:`M22 10v5c0 5-2 7-7 7H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M22 10h-4c-3 0-4-1-4-4V2l8 8Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],download:[[`path`,{d:`M9 11v6l2-2M9 17l-2-2`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M22 10v5c0 5-2 7-7 7H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M22 10h-4c-3 0-4-1-4-4V2l8 8Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],edit:[[`path`,{d:`m13.26 3.6-8.21 8.69c-.31.33-.61.98-.67 1.43l-.37 3.24c-.13 1.17.71 1.97 1.87 1.77l3.22-.55c.45-.08 1.08-.41 1.39-.75l8.21-8.69c1.42-1.5 2.06-3.21-.15-5.3-2.2-2.07-3.87-1.34-5.29.16Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M11.89 5.05a6.126 6.126 0 0 0 5.45 5.15M3 22h18`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],ellipsis:[[`path`,{d:`M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM19 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Z`,stroke:`currentColor`,"stroke-width":`1.5`}]],export:[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M9.32 6.5l2.56-2.56 2.56 2.56M11.88 14.18V4.01M4 12c0 4.42 3 8 8 8s8-3.58 8-8`}]],"file-text":[[`path`,{d:`M21 7v10c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V7c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M14.5 4.5v2c0 1.1.9 2 2 2h2M8 13h4M8 17h8`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],files:[[`path`,{d:`M17 13.4v3c0 4-1.6 5.6-5.6 5.6H7.6c-4 0-5.6-1.6-5.6-5.6v-3.8C2 8.6 3.6 7 7.6 7h3`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M17 13.4h-3.2c-2.4 0-3.2-.8-3.2-3.2V7l6.4 6.4ZM11.6 2h4M7 5c0-1.66 1.34-3 3-3h2.62M22 8v6.19c0 1.55-1.26 2.81-2.81 2.81M22 8h-3c-2.25 0-3-.75-3-3V2l6 6Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],filter:[[`path`,{d:`M5.4 2.1h13.2c1.1 0 2 .9 2 2v2.2c0 .8-.5 1.8-1 2.3l-4.3 3.8c-.6.5-1 1.5-1 2.3V19c0 .6-.4 1.4-.9 1.7l-1.4.9c-1.3.8-3.1-.1-3.1-1.7v-5.3c0-.7-.4-1.6-.8-2.1l-3.8-4c-.5-.5-.9-1.4-.9-2V4.2c0-1.2.9-2.1 2-2.1ZM10.93 2.1 6 10`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],flag:[[`path`,{d:`M5.15 2v20M5.15 4h11.2c2.7 0 3.3 1.5 1.4 3.4l-1.2 1.2c-.8.8-.8 2.1 0 2.8l1.2 1.2c1.9 1.9 1.2 3.4-1.4 3.4H5.15`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],funnel:[[`path`,{d:`M5.4 2.1h13.2c1.1 0 2 .9 2 2v2.2c0 .8-.5 1.8-1 2.3l-4.3 3.8c-.6.5-1 1.5-1 2.3V19c0 .6-.4 1.4-.9 1.7l-1.4.9c-1.3.8-3.1-.1-3.1-1.7v-5.3c0-.7-.4-1.6-.8-2.1l-3.8-4c-.5-.5-.9-1.4-.9-2V4.2c0-1.2.9-2.1 2-2.1ZM10.93 2.1 6 10`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],gauge:[[`path`,{d:`M19.14 19.5a9.964 9.964 0 0 0 2.86-7c0-5.52-4.48-10-10-10S2 6.98 2 12.5c0 2.72 1.08 5.18 2.84 6.99`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M12 21.5a3.38 3.38 0 1 0 0-6.76 3.38 3.38 0 0 0 0 6.76ZM15.25 12H16c.82 0 1.5-.67 1.5-1.5 0-.82-.68-1.5-1.5-1.5s-1.5.67-1.5 1.5v.75c0 .41.34.75.75.75Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],grid:[[`path`,{d:`M22 8.52V3.98C22 2.57 21.36 2 19.77 2h-4.04c-1.59 0-2.23.57-2.23 1.98v4.53c0 1.42.64 1.98 2.23 1.98h4.04c1.59.01 2.23-.56 2.23-1.97ZM22 19.77v-4.04c0-1.59-.64-2.23-2.23-2.23h-4.04c-1.59 0-2.23.64-2.23 2.23v4.04c0 1.59.64 2.23 2.23 2.23h4.04c1.59 0 2.23-.64 2.23-2.23ZM10.5 8.52V3.98C10.5 2.57 9.86 2 8.27 2H4.23C2.64 2 2 2.57 2 3.98v4.53c0 1.42.64 1.98 2.23 1.98h4.04c1.59.01 2.23-.56 2.23-1.97ZM10.5 19.77v-4.04c0-1.59-.64-2.23-2.23-2.23H4.23c-1.59 0-2.23.64-2.23 2.23v4.04C2 21.36 2.64 22 4.23 22h4.04c1.59 0 2.23-.64 2.23-2.23Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],image:[[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M9 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM2.67 18.95l4.93-3.31c.79-.53 1.93-.47 2.64.14l.33.29c.78.67 2.04.67 2.82 0l4.16-3.57c.78-.67 2.04-.67 2.82 0L22 13.9`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],info:[[`g`,{transform:`rotate(180 12 12)`},[[`path`,{d:`M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M11.995 16h.009`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]]]],key:[[`path`,{d:`M19.79 14.93a7.575 7.575 0 0 1-7.6 1.87l-4.71 4.7c-.34.35-1.01.56-1.49.49l-2.18-.3c-.72-.1-1.39-.78-1.5-1.5l-.3-2.18c-.07-.48.16-1.15.49-1.49l4.7-4.7c-.8-2.6-.18-5.55 1.88-7.6 2.95-2.95 7.74-2.95 10.7 0 2.96 2.95 2.96 7.76.01 10.71ZM6.89 17.49l2.3 2.3`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M14.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],list:[[`path`,{d:`M3 4.5h18M3 9.5h9.47M3 14.5h18M3 19.5h9.47`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],lock:[[`path`,{d:`M6 10V8c0-3.31 1-6 6-6s6 2.69 6 6v2M12 18.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M17 22H7c-4 0-5-1-5-5v-2c0-4 1-5 5-5h10c4 0 5 1 5 5v2c0 4-1 5-5 5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"maximize-4":[[`path`,{d:`M21 9V3h-6M3 15v6h6M21 3l-7.5 7.5M10.5 13.5 3 21`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],menu:[[`path`,{d:`M3 7h18M3 12h18M3 17h18`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`}]],minus:[[`path`,{d:`M6 12h12`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],monitor:[[`path`,{d:`M6.44 2h11.11C21.11 2 22 2.89 22 6.44v6.33c0 3.56-.89 4.44-4.44 4.44H6.44C2.89 17.22 2 16.33 2 12.78V6.44C2 2.89 2.89 2 6.44 2ZM12 17.22V22M2 13h20M7.5 22h9`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],moon:[[`path`,{d:`M2.03 12.42c.36 5.15 4.73 9.34 9.96 9.57 3.69.16 6.99-1.56 8.97-4.27.82-1.11.38-1.85-.99-1.6-.67.12-1.36.17-2.08.14C13 16.06 9 11.97 8.98 7.14c-.01-1.3.26-2.53.75-3.65.54-1.24-.11-1.83-1.36-1.3C4.41 3.86 1.7 7.85 2.03 12.42Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],music:[[`path`,{d:`M6.28 22a3.12 3.12 0 1 0 0-6.24 3.12 3.12 0 0 0 0 6.24Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M20.84 16.8V4.6c0-2.6-1.63-2.96-3.28-2.51l-6.24 1.7C10.18 4.1 9.4 5 9.4 6.3v12.57`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M17.72 19.92a3.12 3.12 0 1 0 0-6.24 3.12 3.12 0 0 0 0 6.24ZM9.4 9.52 20.84 6.4`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],pause:[[`path`,{d:`M10.65 19.11V4.89c0-1.35-.57-1.89-2.01-1.89H5.01C3.57 3 3 3.54 3 4.89v14.22C3 20.46 3.57 21 5.01 21h3.63c1.44 0 2.01-.54 2.01-1.89ZM21 19.11V4.89C21 3.54 20.43 3 18.99 3h-3.63c-1.43 0-2.01.54-2.01 1.89v14.22c0 1.35.57 1.89 2.01 1.89h3.63c1.44 0 2.01-.54 2.01-1.89Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],people:[[`path`,{d:`M18 7.16a.605.605 0 0 0-.19 0 2.573 2.573 0 0 1-2.48-2.58c0-1.43 1.15-2.58 2.58-2.58a2.58 2.58 0 0 1 2.58 2.58A2.589 2.589 0 0 1 18 7.16ZM16.97 14.44c1.37.23 2.88-.01 3.94-.72 1.41-.94 1.41-2.48 0-3.42-1.07-.71-2.6-.95-3.97-.71M5.97 7.16c.06-.01.13-.01.19 0a2.573 2.573 0 0 0 2.48-2.58C8.64 3.15 7.49 2 6.06 2a2.58 2.58 0 0 0-2.58 2.58c.01 1.4 1.11 2.53 2.49 2.58ZM7 14.44c-1.37.23-2.88-.01-3.94-.72-1.41-.94-1.41-2.48 0-3.42 1.07-.71 2.6-.95 3.97-.71M12 14.63a.605.605 0 0 0-.19 0 2.573 2.573 0 0 1-2.48-2.58c0-1.43 1.15-2.58 2.58-2.58a2.58 2.58 0 0 1 2.58 2.58c-.01 1.4-1.11 2.54-2.49 2.58ZM9.09 17.78c-1.41.94-1.41 2.48 0 3.42 1.6 1.07 4.22 1.07 5.82 0 1.41-.94 1.41-2.48 0-3.42-1.59-1.06-4.22-1.06-5.82 0Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],phone:[[`path`,{d:`M21.97 18.33c0 .36-.08.73-.25 1.09-.17.36-.39.7-.68 1.02-.49.54-1.03.93-1.64 1.18-.6.25-1.25.38-1.95.38-1.02 0-2.11-.24-3.26-.73s-2.3-1.15-3.44-1.98a28.75 28.75 0 0 1-3.28-2.8 28.414 28.414 0 0 1-2.79-3.27c-.82-1.14-1.48-2.28-1.96-3.41C2.24 8.67 2 7.58 2 6.54c0-.68.12-1.33.36-1.93.24-.61.62-1.17 1.15-1.67C4.15 2.31 4.85 2 5.59 2c.28 0 .56.06.81.18.26.12.49.3.67.56l2.32 3.27c.18.25.31.48.4.7.09.21.14.42.14.61 0 .24-.07.48-.21.71-.13.23-.32.47-.56.71l-.76.79c-.11.11-.16.24-.16.4 0 .08.01.15.03.23.03.08.06.14.08.2.18.33.49.76.93 1.28.45.52.93 1.05 1.45 1.58.54.53 1.06 1.02 1.59 1.47.52.44.95.74 1.29.92.05.02.11.05.18.08.08.03.16.04.25.04.17 0 .3-.06.41-.17l.76-.75c.25-.25.49-.44.72-.56.23-.14.46-.21.71-.21.19 0 .39.04.61.13.22.09.45.22.7.39l3.31 2.35c.26.18.44.39.55.64.1.25.16.5.16.78Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`}]],play:[[`path`,{d:`M4 12V8.44c0-4.42 3.13-6.23 6.96-4.02l3.09 1.78 3.09 1.78c3.83 2.21 3.83 5.83 0 8.04l-3.09 1.78-3.09 1.78C7.13 21.79 4 19.98 4 15.56V12Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],printer:[[`path`,{d:`M7.25 7h9.5V5c0-2-.75-3-3-3h-3.5c-2.25 0-3 1-3 3v2ZM16 15v4c0 2-1 3-3 3h-2c-2 0-3-1-3-3v-4h8Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M21 10v5c0 2-1 3-3 3h-2v-3H8v3H6c-2 0-3-1-3-3v-5c0-2 1-3 3-3h12c2 0 3 1 3 3ZM17 15H7M7 11h3`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],refresh:[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M22 12c0 5.52-4.48 10-10 10s-8.89-5.56-8.89-5.56m0 0h4.52m-4.52 0v5M2 12C2 6.48 6.44 2 12 2c6.67 0 10 5.56 10 5.56m0 0v-5m0 5h-4.44`}]],"rotate-ccw":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M9.11 5.08c.87-.26 1.83-.43 2.89-.43 4.79 0 8.67 3.88 8.67 8.67s-3.88 8.67-8.67 8.67-8.67-3.88-8.67-8.67c0-1.78.54-3.44 1.46-4.82M7.87 5.32L10.76 2M7.87 5.32l3.37 2.46`}]],"rotate-cw":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M14.89 5.08c-.87-.26-1.83-.43-2.89-.43-4.79 0-8.67 3.88-8.67 8.67C3.33 18.12 7.21 22 12 22s8.67-3.88 8.67-8.67c0-1.78-.54-3.44-1.46-4.82M16.13 5.32L13.24 2M16.13 5.32l-3.37 2.46`}]],search:[[`path`,{d:`M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],send:[[`path`,{d:`m7.4 6.32 8.49-2.83c3.81-1.27 5.88.81 4.62 4.62l-2.83 8.49c-1.9 5.71-5.02 5.71-6.92 0l-.84-2.52-2.52-.84c-5.71-1.9-5.71-5.01 0-6.92ZM10.11 13.65l3.58-3.59`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],server:[[`path`,{d:`M19.32 10H4.69c-1.48 0-2.68-1.21-2.68-2.68V4.69c0-1.48 1.21-2.68 2.68-2.68h14.63C20.8 2.01 22 3.22 22 4.69v2.63C22 8.79 20.79 10 19.32 10ZM19.32 22H4.69c-1.48 0-2.68-1.21-2.68-2.68v-2.63c0-1.48 1.21-2.68 2.68-2.68h14.63c1.48 0 2.68 1.21 2.68 2.68v2.63c0 1.47-1.21 2.68-2.68 2.68ZM6 5v2M10 5v2M6 17v2M10 17v2M14 6h4M14 18h4`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],sort:[[`path`,{d:`M3 7h18M6 12h12M10 17h4`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`}]],stop:[[`path`,{d:`M9.3 21h5.4c4.5 0 6.3-1.8 6.3-6.3V9.3C21 4.8 19.2 3 14.7 3H9.3C4.8 3 3 4.8 3 9.3v5.4C3 19.2 4.8 21 9.3 21Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],subtitle:[[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7ZM17.5 17.08h-1.85M12.97 17.08H6.5M17.5 13.32h-5.53M9.27 13.32H6.5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],sun:[[`path`,{d:`M12 18.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`m19.14 19.14-.13-.13m0-14.02.13-.13-.13.13ZM4.86 19.14l.13-.13-.13.13ZM12 2.08V2v.08ZM12 22v-.08.08ZM2.08 12H2h.08ZM22 12h-.08.08ZM4.99 4.99l-.13-.13.13.13Z`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],tag:[[`path`,{d:`m4.405 15.526 4.53 4.53a4.78 4.78 0 0 0 6.75 0l4.39-4.39a4.78 4.78 0 0 0 0-6.75l-4.54-4.52a4.75 4.75 0 0 0-3.6-1.39l-5 .24c-2 .09-3.59 1.68-3.69 3.67l-.24 5c-.06 1.35.45 2.66 1.4 3.61Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M9.735 12.226a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`}],[`path`,{d:`m13.235 17.226 4-4`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],text:[[`path`,{d:`M2.67 7.17V5.35c0-1.15.93-2.07 2.07-2.07h14.52c1.15 0 2.07.93 2.07 2.07v1.82M12 20.72V4.11M8.06 20.72h7.88`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"two-page":[[`path`,{d:`M22 16.74V4.67c0-1.2-.98-2.09-2.17-1.99h-.06c-2.1.18-5.29 1.25-7.07 2.37l-.17.11c-.29.18-.77.18-1.06 0l-.25-.15C9.44 3.9 6.26 2.84 4.16 2.67 2.97 2.57 2 3.47 2 4.66v12.08c0 .96.78 1.86 1.74 1.98l.29.04c2.17.29 5.52 1.39 7.44 2.44l.04.02c.27.15.7.15.96 0 1.92-1.06 5.28-2.17 7.46-2.46l.33-.04c.96-.12 1.74-1.02 1.74-1.98ZM12 5.49v15M7.75 8.49H5.5M8.5 11.49h-3`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],user:[[`path`,{d:`M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10ZM20.59 22c0-3.87-3.85-7-8.59-7s-8.59 3.13-8.59 7`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"volume-high":[[`path`,{d:`M2 10v4c0 2 1 3 3 3h1.43c.37 0 .74.11 1.06.3l2.92 1.83c2.52 1.58 4.59.43 4.59-2.54V7.41c0-2.98-2.07-4.12-4.59-2.54L7.49 6.7c-.32.19-.69.3-1.06.3H5c-2 0-3 1-3 3Z`,stroke:`currentColor`,"stroke-width":`1.5`}],[`path`,{d:`M18 8a6.66 6.66 0 0 1 0 8M19.83 5.5a10.83 10.83 0 0 1 0 13`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"volume-mute":[[`path`,{d:`M15 8.37v-.96c0-2.98-2.07-4.12-4.59-2.54L7.49 6.7c-.32.19-.69.3-1.06.3H5c-2 0-3 1-3 3v4c0 2 1 3 3 3h2M10.41 19.13c2.52 1.58 4.59.43 4.59-2.54v-3.64M18.81 9.42c.9 2.15.63 4.66-.81 6.58M21.15 7.8a10.82 10.82 0 0 1-1.32 10.7M22 2 2 22`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],x:[[`path`,{d:`M6.4 6.4l11.2 11.2M17.6 6.4 6.4 17.6`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"zoom-in":[[`path`,{d:`M11 20a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM8.5 11h5M11 13.5v-5M18.93 20.69c.53 1.6 1.74 1.76 2.67.36.85-1.28.29-2.33-1.25-2.33-1.14-.01-1.78.88-1.42 1.97Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"zoom-out":[[`path`,{d:`M9 11.7h5M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]]},os=n({GLYPH_CHUNK:()=>ss,GLYPH_PENDING_ATTRIBUTE:()=>cs,glyphNode:()=>_s,registerGlyphs:()=>ys}),ss=`glyphs`,cs=`data-wui-glyph-pending`,ls=`svg[${cs}]`,us=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,ds={...as},fs=new Map,ps=!1,ms=null;function hs(e){return Object.hasOwn(ds,e)?ds[e]:void 0}function gs(e,t,n,r){return{class:n?`wui-icon ${n}`:`wui-icon`,"data-icon":e,[cs]:r?!0:void 0,width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`}}function _s(e,{size:t=16,className:n=``}={}){let r=hs(e);if(r!==void 0){let i=`${e}|${t}|${n}`,a=fs.get(i);return a===void 0&&(a=Rr(gs(e,t,n,!1),r),fs.set(i,a)),Ie(a.cloneNode(!0),SVGSVGElement,`glyphNode: ${e} did not clone to an svg`)}return ps||!us.test(e)?null:(Promise.allSettled([ui(ss)]),Rr(gs(e,t,n,!0),[]))}function vs(e){let t=e instanceof Element&&e.matches(ls)?[e]:[];for(let n of[...t,...e.querySelectorAll(ls)]){let e=hs(n.getAttribute(`data-icon`)??``);e===void 0?n.remove():(n.removeAttribute(cs),n.replaceChildren(...Lr(e)))}}function ys(e){Object.assign(ds,e),ps=!0,vs(document),ms===null&&(ms=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&vs(e)}),ms.observe(document.documentElement,{childList:!0,subtree:!0}))}var bs=n({createListboxKeyNav:()=>Ss,moveActiveRow:()=>Cs}),xs=e=>e.target instanceof Element?e.target.tagName:void 0;function Ss(e){let{getVisibleOptions:t,getActive:n,setActive:r,onEnter:i,onEscape:a,onTypeahead:o,typeaheadMs:s=500,getCount:c,getOptionAt:l,findByPrefix:u}=e,d=``,f=null,p=()=>{clearTimeout(f??void 0),f=null,d=``};return{handler:e=>{let m=c?[]:t(),h=c?c():m.length,g=()=>c?t():m,_=n(),v=xs(e)===`INPUT`||xs(e)===`TEXTAREA`;if(e.key===`ArrowDown`)e.preventDefault(),r(Math.min(_+1,h-1));else if(e.key===`ArrowUp`)e.preventDefault(),r(Math.max(_-1,0));else if(e.key===`Home`&&!v)e.preventDefault(),h&&r(0);else if(e.key===`End`&&!v)e.preventDefault(),h&&r(h-1);else if(e.key===`PageDown`&&!v){if(e.preventDefault(),!h)return;r(Math.min(Math.max(0,_)+8,h-1))}else if(e.key===`PageUp`&&!v){if(e.preventDefault(),!h)return;r(Math.max(Math.max(0,_)-8,0))}else if(Pr(e))i&&(e.preventDefault(),i(l?l(_):m[_],g()));else if(e.key===`Escape`)a&&a(e);else if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&xs(e)!==`INPUT`&&xs(e)!==`TEXTAREA`){e.preventDefault(),clearTimeout(f??void 0),d+=e.key.toLowerCase(),f=setTimeout(p,s);let t=u?u(d,Math.max(0,_)):m.findIndex(e=>e.textContent.trim().toLowerCase().startsWith(d));t>=0&&(r(t),o&&o(e.key,t,g()))}},clearTypeahead:p,teardown:p}}function Cs(e,t){let n=e.querySelector(`.is-active`);n!==t&&(n?.classList.remove(`is-active`),t?.classList.add(`is-active`))}var ws=n({TRUSTED_LABEL:()=>Ts,optionLabelNodes:()=>js,optionText:()=>Ms,stripTags:()=>Os,withTrustedLabel:()=>Es}),Ts=Symbol(`wui.trustedLabel`),Es=(e,t)=>{let n=document.createDocumentFragment();return n.append(t.cloneNode(!0)),{...e,[Ts]:n}},Ds=e=>`wui-flag wui-flag-${e}`,Os=e=>String(e??``).replace(/<[^>]*>/g,``),ks=e=>{if(!e)return null;let t=String(e).toLowerCase().replace(/[^a-z0-9-]/g,``);return t?_s(t):null},As=e=>{let t=String(e??``).toLowerCase();return/^[a-z]{2}$/.test(t)?I(`span`,{class:Ds(t),"aria-hidden":`true`}):null};function js(e){if(e==null)return[];let t=As(e.flag),n=ks(e.icon),r=e[Ts],i=r?[...r.cloneNode(!0).childNodes]:[document.createTextNode(String(e.label??``))];return!t&&!n?i:[I(`span`,{class:`wui-opt-label`},t,n,...i)]}var Ms=e=>{if(e==null)return``;let t=e[Ts];return t?t.textContent??``:Os(e.label)},Ns=n({SELECT_TEXT:()=>Ps}),Ps={addLabel:`Add '{query}'`,addTagsLabel:`Add tags`,allCountriesLabel:`All countries`,clearAllLabel:`Clear all`,clearSelectionLabel:`Clear selection`,countryPlaceholder:`Select country`,countrySearchPlaceholder:`Search countries…`,createLabel:`Create '{text}'`,defaultSearchPlaceholder:`Search {labelText}…`,emptyText:`No matches`,fallbackName:`Select`,helpLabel:`More information`,hintText:`Type to search…`,invalidMessage:`That option is not available.`,optionalLabel:`(optional)`,partLoadMessage:`This control could not load. Reload the page.`,placeholder:`Select…`,recentsLabel:`Recent`,removeText:`Remove {text}`,searchingText:`Searching…`,selectedText:`{count} selected`,suggestedLabel:`Suggested`,tagPlaceholder:`Add…`},Fs=n({clearOptions:()=>Us,drawn:()=>Rs,filterOptions:()=>Ls,nodesSignature:()=>Bs,optionRow:()=>Zs,posAttrMap:()=>zs,refreshWindow:()=>qs,registerWindowImpl:()=>Hs,renderOptions:()=>Ws,revealRow:()=>Js,rowId:()=>Gs,rowIndexByPrefix:()=>Xs,rowIndexOfValue:()=>Ys}),Is=()=>L(`select`,Ps);function Ls(e,t){let n=String(t??``).trim().toLowerCase();return n?e.filter(e=>[Ms(e),e.description,e.meta].some(e=>String(e??``).toLowerCase().includes(n))):e}var Rs=new WeakMap,zs=e=>e?{"data-index":String(e.index),"aria-setsize":String(e.size),"aria-posinset":String(e.index+1)}:{},Bs=e=>e.map(e=>e instanceof Element?e.outerHTML:e.textContent??``).join(``),Vs;function Hs(e){Vs=e}function Us(e){Vs?.clear(e),Rs.delete(e),e.replaceChildren()}function Ws(e,t,n={}){let{selected:r=[],query:i=``,status:a=`idle`,emptyText:o=Is().emptyText,searchingText:s=Is().searchingText,hintText:c=Is().hintText,actionRow:l=[],recents:u=null}=n,d=new Set(r.map(String)),f=Ls(t,i),p=e.id,m=l.filter(e=>e.position===`top`),h=l.filter(e=>e.position===`bottom`),g=u?.options.length?u.options:[],_=m.length+g.length+f.length+h.length,v=f.length>300,y=Vs,b=v&&y!==void 0,x=e=>b?{index:e,size:_}:void 0,S=0,C=e=>{let t=S++;return I(`button`,{type:`button`,role:`option`,id:Gs(p,t),class:`wui-select-option wui-select-add`,"data-value":String(e.value??``),"data-custom":`true`,"aria-selected":`false`,...zs(x(t))},e.label)},w=e=>{let t=S++;return Zs(e,Gs(p,t),d.has(String(e.value)),x(t))},T=m.map(C),E=g.length&&u?[I(`div`,{class:`wui-select-group`},u.label),...g.map(w),I(`div`,{class:`wui-select-sep`,"aria-hidden":`true`})]:[],D=S,O=[];if(b)S+=f.length;else{let e=``;for(let t of f)t.group&&t.group!==e&&O.push(I(`div`,{class:`wui-select-group`},t.group)),e=t.group??``,O.push(w(t))}let k=h.map(C),A=[];if(a===`loading`?A=[I(`div`,{class:`wui-select-loading`},I(`span`,{class:`wui-select-spinner spinner-border spinner-border-sm`,role:`status`,"aria-hidden":`true`}),s)]:a===`hint`?A=[I(`div`,{class:`wui-select-hint`},c)]:(a===`empty`||f.length===0&&l.length===0)&&(A=[I(`div`,{class:`wui-select-empty`},o)]),b&&y){let n=[...T,...E],r=[...k,...A];return y.render(e,{options:t,query:i,rows:f,pre:n,post:r,preSig:Bs(n),postSig:Bs(r),picked:d,top:m,recent:g,bottom:h,bodyBase:D,total:_}),{rows:_,windowed:!0,long:v}}y?.clear(e);let ee=[...T,...E,...O,...k,...A],te=Bs(ee);return Rs.get(e)===te||(Rs.set(e,te),e.replaceChildren(...ee)),{rows:S,windowed:!1,long:v}}var Gs=(e,t)=>`${e}-opt-${t}`,Ks=e=>[...e.querySelectorAll(`.wui-select-option`)];function qs(e){return Vs?Vs.refresh(e):!1}function Js(e,t){return Vs?Vs.reveal(e,t):Ks(e)[t]??null}function Ys(e,t){if(Vs)return Vs.indexOfValue(e,t);let n=new Set(t.map(String));return Ks(e).findIndex(e=>n.has(e.dataset.value??``))}function Xs(e,t){return Vs?Vs.indexByPrefix(e,t):Ks(e).findIndex(e=>(e.textContent??``).trim().toLowerCase().startsWith(t))}function Zs(e,t,n,r){let i=!!e.disabled,a={id:t,role:`option`,"data-value":String(e.value??``),"aria-selected":String(n),"aria-disabled":i?`true`:void 0,title:i&&e.disabledHint?e.disabledHint:void 0,...zs(r)},o=I(`span`,{class:`wui-select-check`,"aria-hidden":`true`},_s(`check`));if(!e.description&&!e.meta)return I(`button`,{type:`button`,class:`wui-select-option${n?` selected`:``}`,...a},is(e),I(`span`,{class:`wui-select-opt-name`},...js(e)),o);let s=e.description?I(`span`,{class:`wui-select-opt-desc`},e.description):null,c=e.meta?I(`span`,{class:`wui-select-opt-meta`},e.meta):null;return I(`div`,{class:`wui-select-option wui-select-option-rich${n?` selected`:``}`,...a},is(e),I(`span`,{class:`wui-select-option-text`},I(`span`,{class:`wui-opt-label`},...js(e)),s),c,o)}var Qs=Object.freeze([`single`,`multiple`,`search`,`tag`,`country`]),$s=e=>e===`multiple`||e===`tag`,ec=n({registerSelectPart:()=>nc,selectPart:()=>rc}),tc=new Map;function nc(e,t){tc.set(e,t)}function rc(e){return tc.get(e)}var ic={chips:`select-chips`,search:`select-search`,country:`phone`,recents:`select-recents`};function ac(e){let t=Object.hasOwn(ic,e)?ic[e]:void 0;if(!t)return Promise.reject(Error(`Unknown <wui-select> part: ${e}.`));let n=rc(e);return n?Promise.resolve(n):ui(t).then(()=>P(rc(e),`The ${e} part of <wui-select> did not register.`))}var oc=n({searchesRemotely:()=>sc}),sc=e=>typeof e.loadOptions==`function`||!!e.getAttribute(`source`)||e.hasAttribute(`remote`),cc=()=>ui(`select-window`),lc={requiredFieldMessage:`Please fill in this field.`},uc={clearLabel:`Clear search`,placeholder:`Search…`,searchLabel:`Search`},dc=n({WuiSelect:()=>hc}),fc=()=>L(`select`,Ps),pc=()=>L(`search`,uc),mc=()=>L(`field`,lc),hc=class extends s{static formAssociated=!0;_internals;_value;_optionsProp;_partOptions;_known;_loadOptionsFn;_validateFn;_declared;_query;_ownsFilter;_active;_rows;_windowed;_windowLoad;_windowFailed;_scrollFrame;_status;_error;_nav;_parts;_partSig;_partsMounted;_partToken;_rendered;_searchShown;_defaultValue;_warnedMode;_warnedDensity;_hoverTimer;_hoverOpened;_onHoverOver;_onHoverOut;_panelShown;_pressOpen;static get observedAttributes(){return`mode.value.placeholder.search-placeholder.empty-text.searchable.clearable.disabled.readonly.loading.required.size.density.icon.prefix.open.open-on-hover.lazy-options.aria-label.aria-describedby.aria-invalid.min-chars.debounce.source.remote.allow-custom.add-label.searching-text.hint-text.value-label.value-avatar.value-initials.max-tags.allow-duplicates.separators.pattern.invalid-message.create-label.collapse-chips.selected-text.clear-all-label.countries.suggested.suggested-label.all-countries-label.recents-key.recents-limit.recents-label`.split(`.`)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=``,this._optionsProp=null,this._partOptions=null,this._known=new Map,this._loadOptionsFn=null,this._validateFn=null,this._declared=void 0,this._query=``,this._ownsFilter=!1,this._active=-1,this._rows=0,this._windowed=!1,this._windowLoad=null,this._windowFailed=!1,this._scrollFrame=null,this._status=`idle`,this._error=``,this._nav=null,this._parts=null,this._partSig=``,this._partsMounted=!1,this._partToken=0,this._rendered=!1,this._searchShown=!1,this._defaultValue=void 0,this._warnedMode=null,this._hoverTimer=null,this._hoverOpened=!1,this._panelShown=!1,this._pressOpen=null,this._onHoverOver=e=>{e.pointerType===`mouse`&&this._hoverZone(e.target)&&(this._clearHover(),!this._menuOpen()&&this._hoverEligible()&&(this._hoverTimer=setTimeout(()=>{this._hoverTimer=null,!this._menuOpen()&&this._hoverEligible()&&(this._open({focus:!1}),this._hoverOpened=!0)},yc)))},this._onHoverOut=e=>{e.pointerType===`mouse`&&this._hoverZone(e.target)&&!this._hoverZone(e.relatedTarget)&&(this._clearHover(),this._menuOpen()&&this.hasAttribute(`open-on-hover`)&&(this._hoverTimer=setTimeout(()=>{this._hoverTimer=null,this._close()},bc)))}}connectedCallback(){this.addEventListener(`pointerover`,this._onHoverOver),this.addEventListener(`pointerout`,this._onHoverOut),this._rendered||this.render(),this._ensureParts(),this._mountParts()}disconnectedCallback(){this.removeEventListener(`pointerover`,this._onHoverOver),this.removeEventListener(`pointerout`,this._onHoverOut),this._clearHover(),this._dropMenu(),this._teardown(),this._teardownParts()}attributeChangedCallback(e,t,n){e===`value`?(this._value=Ec(n,$s(this.mode)),this._applyValue()):e===`aria-invalid`?this._syncInvalid():e===`open`?this._rendered&&(this.hasAttribute(`open`)?this._open({focus:!1}):this._close({force:!0})):e===`open-on-hover`?this.hasAttribute(`open-on-hover`)||this._clearHover():e!==`lazy-options`&&(e===`mode`&&(this._value=Ec(this._value,$s(this.mode)),this._partOptions=null,this._known.clear(),this._ensureParts()),(e===`source`||e===`remote`||e===`recents-key`)&&this._ensureParts(),wc.has(e)?this._rendered&&(this._drawValue(),this.renderList()):Cc.has(e)?this._remountParts():this._rendered&&this.render())}formResetCallback(){if(this.value=this._defaultValue??``,!this._rendered)return;let e=this._refs();e.input&&(e.input.value=``,e.input.removeAttribute(`aria-invalid`)),e.search&&(e.search.value=``),this.setError(``),this._query!==``&&this._onQueryChange(``)}get mode(){let e=this.getAttribute(`mode`);return e===null?`single`:_c(e)?e:(e!==this._warnedMode&&(this._warnedMode=e,Hr(`<wui-select> mode "${e}" is not one of ${Qs.join(`, `)}; it is treated as "single".`)),`single`)}_checkDensity(){let e=this.getAttribute(`density`);e===null||vc.includes(e)||e===this._warnedDensity||(this._warnedDensity=e,Hr(`<wui-select> density "${e}" is not one of ${vc.join(`, `)}; it is treated as "comfortable".`))}set mode(e){this.setAttribute(`mode`,String(e))}get value(){return Array.isArray(this._value)?this._value.slice():this._value}set value(e){this._value=Ec(e,$s(this.mode)),this._applyValue()}get options(){return this._readOptions()}set options(e){this._optionsProp=Array.isArray(e)?e:null,this.mode!==`country`&&(this._partOptions=null);for(let e of this._activePartsList())e.onOptions?.();if(this._rendered){if(this.mode===`single`&&this.getAttribute(`searchable`)===null&&this._autoSearch()!==this._searchShown){this.render();return}this._drawValue(),this.renderList()}}get loadOptions(){return this._loadOptionsFn}set loadOptions(e){this._loadOptionsFn=typeof e==`function`?e:null,this._ensureParts()}get validate(){return this._validateFn}set validate(e){this._validateFn=typeof e==`function`?e:null}commit(e,t={}){this.value=e,this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,detail:{isCustom:!!t.isCustom}}))}setPartOptions(e){this._partOptions=Array.isArray(e)?e:null,this._drawValue(),this.renderList()}setStatus(e){this._status=e,this.renderList()}setError(e){this._error=e?String(e):``,this._syncError()}openMenu(){io(this)||this._open({focus:!1})}closeMenu({focusControl:e=!1}={}){this._close(),e&&this._refs().control?.focus()}renderList(){let e=this._refs();if(!e.list)return;let t=this._ownsFilter?``:this._query,n=this._actionRows(),r=this._recents();if(this.hasAttribute(`lazy-options`)&&!this._menuOpen()){this._rows=Ls(this._listOptions(),t).length+n.length+(r?.options.length??0),this._windowed=!1,Us(e.list),this._anchorMenu();return}let i=Ws(e.list,this._listOptions(),{selected:this._selectedValues(),query:t,status:this._status,emptyText:this.getAttribute(`empty-text`)||fc().emptyText,searchingText:this.getAttribute(`searching-text`)||fc().searchingText,hintText:this.getAttribute(`hint-text`)||void 0,actionRow:n,recents:r});this._rows=i.rows,this._windowed=i.windowed,i.long&&!i.windowed&&!this._windowFailed&&this._loadWindow(),this._active>=this._rowCount()&&(this._active=-1),this._active>=0&&this._setActive(this._active,{reveal:!1}),this._anchorMenu()}render(){this._dropMenu();let e=this._carry();this._teardownParts(),this._snapshotDeclared();let t=this.mode;this._checkDensity();let n=$s(t),r=t===`tag`,i=n&&(r||this.hasAttribute(`allow-custom`));this._value=Ec(this._value,n),this._defaultValue===void 0&&n&&this._value.length===0&&(this._value=this._declaredSelected()),n||this._preselect(),this._defaultValue===void 0&&(this._defaultValue=Ec(this._value,n));let a=this.getAttribute(`size`),o=a===`sm`?` wui-select-sm`:a===`lg`?` wui-select-lg`:a===`xl`?` wui-select-xl`:``,s=this.getAttribute(`icon`),c=this.getAttribute(`prefix`),l=this.hasAttribute(`clearable`),u=this.hasAttribute(`disabled`);this.id||=`wui-select-${Math.random().toString(36).slice(2,9)}`;let d=`${this.id}-listbox`,f=`${this.id}-entry-error`,p=this.getAttribute(`aria-describedby`)?.trim(),m=p?`${p} ${f}`:f,h=this.hasAttribute(`aria-invalid`)||!!this._error,g=this.hasAttribute(`required`)&&!i,_=this._accessibleName(),v=i?{}:{role:`combobox`,"aria-haspopup":`listbox`,"aria-expanded":`false`,"aria-controls":d},y={"aria-label":_,"aria-describedby":m,"aria-invalid":h?`true`:void 0,"aria-required":g?`true`:void 0},b=n?I(`div`,{class:`input wui-select-control wui-select-multi`,...v,...y,"aria-disabled":u?`true`:void 0,tabindex:!u&&!r?`0`:void 0}):I(`button`,{type:`button`,class:`input wui-select-control`,...v,...y,disabled:u||void 0}),x=[s?_s(s,{className:`wui-select-icon`}):null,c?I(`span`,{class:`wui-select-prefix`},c):null,I(`span`,{class:`wui-select-value`,"data-label":!0}),l?I(`span`,{class:`wui-select-reset`,role:`button`,"aria-label":fc().clearSelectionLabel,hidden:!0},_s(`x`)):null,_s(`chevron-down`,{className:`wui-select-caret`})];b.append(...x.filter(e=>e!==null));let S=this.getAttribute(`searchable`),C=S===null?t===`multiple`||t===`country`||this._autoSearch():S!==`false`,w=t===`search`||C&&!i;this._searchShown=w;let T=this.getAttribute(`search-placeholder`)||(t===`country`?fc().countrySearchPlaceholder:pc().placeholder),E=I(`div`,{class:`wui-select-menu wui-select-menu-fixed`,popover:`auto`},w?I(`div`,{class:`wui-select-search`},_s(`search`),I(`input`,{class:`wui-select-input`,placeholder:T,"aria-label":T,"aria-autocomplete":`list`}),I(`button`,{type:`button`,class:`wui-select-clear`,"aria-label":pc().clearLabel,hidden:!0},_s(`x`))):null,I(`div`,{class:`wui-select-options`,role:`listbox`,id:d,tabindex:`-1`,"aria-multiselectable":n?`true`:void 0})),D=I(`div`,{class:`field-error wui-select-error`,id:f,"aria-live":`polite`,hidden:!this._error||void 0},this._error||null);this.replaceChildren(I(`div`,{class:`wui-select${o}`},b,E),D),this._rendered=!0,this._syncMirror(),this._syncValidity(),this._drawValue(),this._syncReset(),this.renderList(),this._wire(),ao(this,this.querySelector(`.wui-select-control`)),this._mountParts(e)}_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||fc().fallbackName}_snapshotDeclared(){if(this._declared)return;let e=[...this.querySelectorAll(`:scope > wui-option`)];e.length&&(this._declared=e.map(e=>{let t=document.createDocumentFragment();for(let n of e.childNodes)t.append(n.cloneNode(!0));let n={value:e.getAttribute(`value`)??Mc(e).trim(),label:t.textContent??``,selected:e.hasAttribute(`selected`)};for(let[t,r]of Tc){let i=e.getAttribute(t);i&&(n[r]=i)}return e.hasAttribute(`disabled`)&&(n.disabled=!0),Es(n,t)}))}_readOptions(){return this.mode===`country`?this._partOptions||[]:this._partOptions?this._partOptions:this._optionsProp?this._optionsProp:(this._snapshotDeclared(),this._declared||[])}_listOptions(){let e=this._readOptions(),t=this.getAttribute(`value-label`);if(this.mode!==`search`||!t||this._value===``)return e;let n=String(this._value);return e.some(e=>String(e.value)===n)?e:[...e,{value:n,label:t}]}_declaredSelected(){return this._optionsProp?[]:(this._declared??[]).filter(e=>e.selected).map(e=>String(e.value))}_preselect(){let e=this._readOptions(),t=this._value!==``&&e.find(e=>String(e.value)===this._value)||e.find(e=>`selected`in e&&!!e.selected);t&&(this._value=String(t.value))}_optionFor(e){let t=String(e),n=this._readOptions().find(e=>String(e.value)===t);return n?(this._known.set(t,n),n):this._known.get(t)}_placeholder(){return this.getAttribute(`placeholder`)||Sc()[this.mode]}_hasValue(){return Array.isArray(this._value)?this._value.length>0:this._value!==``}_selectedValues(){return Array.isArray(this._value)?this._value:this._value===``?this._listOptions().some(e=>String(e.value)===``)?[``]:[]:[this._value]}_applyValue(){this._syncMirror(),this._syncValidity(),this._rendered&&(this._drawValue(),this._syncReset(),this.renderList())}_syncMirror(){$s(this.mode)?fo(this,this._selectedValues()):uo(this,this._value)}_drawValue(){let e=this._refs();if(!e.value)return;let t=$s(this.mode),n=t?void 0:this._optionFor(this._value);if(this._syncTitle(n),this._syncValueAvatar(),this._activePartsList().some(e=>e.renderValue?.()===!0))return;if(t){e.value.classList.remove(`wui-select-placeholder`),e.value.textContent=``;return}e.value.classList.toggle(`wui-select-placeholder`,!n);let r=this._placeholder();e.value.replaceChildren(...n?js(n):r?[r]:[])}_syncTitle(e){let t=this.querySelector(`.wui-select-control`);if(!t)return;let n=e&&!this.hasAttribute(`title`)?Ms(e).trim():``;n?t.setAttribute(`title`,n):t.removeAttribute(`title`)}_syncValueAvatar(){let e=this.querySelector(`.wui-select-control`);if(!e)return;e.querySelector(`:scope > .wui-select-value-avatar`)?.remove();let t=!$s(this.mode)&&this._hasValue()?is({avatar:this.getAttribute(`value-avatar`),initials:this.getAttribute(`value-initials`)},`avatar-xs`):null;e.classList.toggle(`wui-has-value-avatar`,!!t),t&&e.prepend(I(`span`,{class:`wui-select-value-avatar`,"aria-hidden":`true`},t))}_syncValidity(){let e=this._internals;if(typeof e?.setValidity==`function`){if(this.hasAttribute(`required`)&&!this._hasValue()){let t=this.querySelector(`.wui-select-control`);e.setValidity({valueMissing:!0},mc().requiredFieldMessage,t instanceof HTMLElement?t:void 0)}else e.setValidity({})}}_syncReset(){let e=K(this,`.wui-select-reset`,HTMLElement);e&&(e.hidden=!(this.hasAttribute(`clearable`)&&this._hasValue()&&!io(this)))}_syncInvalid(){let e=this.querySelector(`.wui-select-control`);e&&(this.hasAttribute(`aria-invalid`)||this._error?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}_syncError(){let e=K(this,`.wui-select-error`,HTMLElement);e&&(e.textContent=this._error,e.hidden=!this._error),this._syncInvalid()}_refs(){return{control:K(this,`.wui-select-control`,HTMLElement),value:K(this,`.wui-select-value`,HTMLElement),menu:K(this,`.wui-select-menu`,HTMLElement),list:K(this,`.wui-select-options`,HTMLElement),search:K(this,`.wui-select-search input`,HTMLInputElement),input:K(this,`.wui-select-draft`,HTMLInputElement)}}_menuOpen(){let e=K(this,`.wui-select-menu`,HTMLElement);return e!==null&&N(e)}_hoverZone(e){if(!(e instanceof Element))return!1;let t=e.closest(`.wui-select-control, .wui-select-menu`);return t!==null&&this.contains(t)}_hoverEligible(){if(!this.hasAttribute(`open-on-hover`)||io(this)||this.mode===`tag`)return!1;let e=this._refs();return e.search===null&&e.input===null}_clearHover(){this._hoverTimer!==null&&clearTimeout(this._hoverTimer),this._hoverTimer=null}_autoSearch(){return this.mode===`single`&&this.getAttribute(`searchable`)===null&&this._readOptions().length>xc}_visible(){let e=this._refs();return e.list?jc(e.list,`.wui-select-option`):[]}_rowCount(){return this._windowed?this._rows:this._visible().length}_rowEl(e){if(!this._windowed)return this._visible()[e];let t=this._refs().list?.querySelector(`[data-index="${e}"]`);return t instanceof HTMLElement?t:void 0}_setActive(e,{reveal:t=!0}={}){let n=this._refs();if(!n.list||!n.control)return;this._active=e;let r=null;e>=0&&e<this._rowCount()&&(r=this._rowEl(e)??(this._windowed&&t?Js(n.list,e):null)),Cs(n.list,r),r?(t&&r.scrollIntoView({block:`nearest`}),n.control.setAttribute(`aria-activedescendant`,r.id)):n.control.removeAttribute(`aria-activedescendant`)}_onListScroll(){this._scrollFrame=null;let e=this._refs().list;e&&qs(e)&&this._active>=0&&this._setActive(this._active,{reveal:!1})}_actionRows(){let e=[];for(let t of this._activePartsList()){let n=t.actionRow?.(this._query);n&&e.push(n)}return e}_recents(){if(this._query.trim()!==``)return null;for(let e of this._activePartsList()){let t=e.recents?.(this._listOptions());if(t)return t}return null}_menuPlacement(e,t){let n=this.hasAttribute(`open`)?{below:!0}:{};if(this.getAttribute(`density`)!==`compact`)return{matchWidth:!0,...n};let r=e.getBoundingClientRect();return t.style.width=`max-content`,t.style.minWidth=`${r.width}px`,t.style.maxWidth=`280px`,n}_anchorMenu(){let e=this._refs();e.control&&e.menu&&this._menuOpen()&&T(e.control,e.menu,this._menuPlacement(e.control,e.menu))}_showMenu(e,t){Oe(e,t,{...this._menuPlacement(e,t),mode:`auto`,keepOffscreen:this.hasAttribute(`open`),onClosed:()=>this._onPanelClosed()}),this._panelShown=!0}_onPanelClosed(){if(!this._panelShown)return;this._panelShown=!1;let e=this._refs();e.control&&(e.control.setAttribute(`aria-expanded`,`false`),this._setActive(-1),this._nav?.clearTypeahead(),this.dispatchEvent(new CustomEvent(`wui-select:close`,{bubbles:!0})))}_open({focus:e=!0}={}){let t=this._refs();if(!t.menu||!t.control)return;let n=this._menuOpen();this._hoverOpened=!1,t.control.setAttribute(`aria-expanded`,`true`),this._query=t.input?t.input.value:``,this._ownsFilter=this._ownsFilter&&this._query!==``;let r=K(this,`.wui-select-search .wui-select-clear`,HTMLElement);if(r&&(r.hidden=!0),t.search&&(t.search.value=``),n||this._showMenu(t.control,t.menu),this.renderList(),e&&(t.search?.focus(),this._setActive(this._windowed&&t.list?Ys(t.list,this._selectedValues()):this._visible().findIndex(e=>e.classList.contains(`selected`)))),!n){this.dispatchEvent(new CustomEvent(`wui-select:open`,{bubbles:!0}));for(let e of this._activePartsList())e.onOpen?.()}}_close({force:e=!1}={}){if(!e&&this.hasAttribute(`open`))return;let t=this._refs();if(!t.menu||!t.control)return;this._hoverOpened=!1;let n=t.menu.contains(document.activeElement);N(t.menu)&&M(t.menu),this._onPanelClosed(),n&&t.control.focus()}_onQueryChange(e){this._query=e,this._setActive(-1);let t=K(this,`.wui-select-search .wui-select-clear`,HTMLElement);t&&(t.hidden=!e);let n=!1;for(let t of this._activePartsList())t.onQuery?.(e)===!0&&(n=!0);this._ownsFilter=n,this.renderList()}_pick(e){if(e.getAttribute(`aria-disabled`)===`true`)return;let t=e.dataset.custom===`true`,n=e.dataset.value??``,r=t?{value:n,label:Mc(e).trim()}:this._listOptions().find(e=>String(e.value)===n)??{value:n,label:n},i=this._activePartsList().some(e=>e.onPick?.(r,{isCustom:t})===!0);$s(this.mode)||(i||this.commit(n,{isCustom:t}),this._close(),this._refs().control?.focus())}_draftOpens(){return this.mode===`multiple`?this.hasAttribute(`allow-custom`):this.mode===`tag`&&sc(this)}_onKeyDown(e){if(!io(this)){for(let t of this._activePartsList())if(t.onKey?.(e)===!0)return;if(!this._menuOpen()){if(e.target instanceof HTMLInputElement){if(e.key!==`ArrowDown`||!this._draftOpens())return;this._open({focus:!1})}else{(e.key===`ArrowDown`||Pr(e)||e.key===` `)&&(e.preventDefault(),this._open({focus:!0}));return}}P(this._nav,`Listbox keys are not wired.`).handler(e)}}_wire(){this._teardown();let e=this._refs(),t=e.control,n=e.list;if(!t||!e.menu||!n)return;let r=P(K(this,`.wui-select`,HTMLElement),`The select wrapper is missing.`),i=K(this,`.wui-select-search .wui-select-clear`,HTMLElement),a=K(this,`.wui-select-reset`,HTMLElement);this._nav=Ss({getVisibleOptions:()=>this._visible(),getActive:()=>this._active,setActive:e=>this._setActive(e),getCount:()=>this._rowCount(),getOptionAt:e=>this._rowEl(e),findByPrefix:e=>this._windowed?Xs(n,e):this._visible().findIndex(t=>t.textContent.trim().toLowerCase().startsWith(e)),onEnter:(e,t)=>{if(e)this._pick(e);else if(this._query.trim()!==``){let e=t.find(e=>e.dataset.custom===`true`);if(e)this._pick(e);else if(t.length===1){let e=t[0];e&&this._pick(e)}}},onEscape:e=>{e.preventDefault(),this._nav?.clearTypeahead(),this._close(),t.focus()}}),r.addEventListener(`keydown`,e=>this._onKeyDown(e)),r.addEventListener(`input`,e=>{let t=e.target;if(!(t instanceof HTMLInputElement)||!t.matches(`.wui-select-input, .wui-select-draft`))return;this._onQueryChange(t.value);let n=t.matches(`.wui-select-draft`),r=this._rows>0||this._actionRows().length>0;n&&r&&!this._menuOpen()&&!io(this)&&this._draftOpens()&&this._open({focus:!1})}),r.addEventListener(`focusout`,e=>{let t=e.relatedTarget;t instanceof Node&&this.contains(t)||!this._activePartsList().some(e=>e.onBlur?.()===!0)&&t&&this._close()}),i?.addEventListener(`click`,()=>{let t=P(e.search,`The search input is missing.`);t.value=``,this._onQueryChange(``),t.focus()}),t.addEventListener(`pointerdown`,()=>{this._pressOpen=this._menuOpen()}),t.addEventListener(`click`,e=>{if(e.target instanceof Element&&e.target.closest(`[data-remove]`))return;if(this.mode===`tag`){if(io(this))return;this._refs().input?.focus(),!this._menuOpen()&&this._draftOpens()&&this._open({focus:!1});return}if(e.target instanceof HTMLInputElement){!this._menuOpen()&&!io(this)&&this._open({focus:!1});return}let t=e.detail>0&&this._pressOpen!==null?this._pressOpen:this._menuOpen();this._pressOpen=null,this._clearHover(),this._hoverOpened&&t?(this._hoverOpened=!1,this._open({focus:!0})):t?this._close():io(this)||this._open({focus:!0})}),a?.addEventListener(`click`,e=>{e.stopPropagation(),this.commit($s(this.mode)?[]:``),this._close(),t.focus()}),n.addEventListener(`click`,n=>{let r=Ac(n).closest(`.wui-select-option`);if(r instanceof HTMLElement&&(this._pick(r),$s(this.mode))){let n=this.querySelector(`.wui-select-draft`);(e.search??(n instanceof HTMLElement?n:t)).focus()}}),n.addEventListener(`mousedown`,e=>{$s(this.mode)&&e.target instanceof Element&&e.target.closest(`.wui-select-option`)&&e.preventDefault()}),n.addEventListener(`mousemove`,e=>{let t=Ac(e).closest(`.wui-select-option`);t instanceof HTMLElement&&!t.classList.contains(`is-active`)&&this._setActive(this._windowed?Number(t.dataset.index):this._visible().indexOf(t),{reveal:!1})}),n.addEventListener(`scroll`,()=>{this._windowed&&this._scrollFrame===null&&(this._scrollFrame=requestAnimationFrame(()=>this._onListScroll()))},{passive:!0}),n.addEventListener(`mouseleave`,()=>this._setActive(-1)),n.addEventListener(`error`,e=>{let t=e.target;t instanceof Element&&t.classList.contains(`avatar-img`)&&t.remove()},!0),this.hasAttribute(`open`)&&this._open({focus:!1})}_teardown(){this._nav?.teardown(),this._scrollFrame!==null&&cancelAnimationFrame(this._scrollFrame),this._scrollFrame=null}_dropMenu(){let e=K(this,`.wui-select-menu`,HTMLElement);e&&M(e)}_activePartsList(){return this._partsMounted?P(this._parts,`The mounted parts are missing.`):[]}_ensureParts(){if(!this.isConnected)return;(this.hasAttribute(`source`)||this.hasAttribute(`remote`)||this.hasAttribute(`recents-key`)||this._loadOptionsFn!==null)&&this._loadWindow();let e=Oc(this,this.mode),t=e.join(`,`);if(t===this._partSig)return;this._teardownParts(),this._parts=null,this._partSig=t;let n=++this._partToken;Promise.all(e.map(e=>Nc(this,e))).then(e=>{n===this._partToken&&(this._parts=e.filter(e=>e!==null),this._mountParts())})}_loadWindow(){this._windowLoad===null&&(this._windowLoad=cc().then(()=>this.renderList(),()=>{this._windowFailed=!0,document.dispatchEvent(new CustomEvent(Yr,{bubbles:!0,composed:!0,detail:{chunk:`select-window`}})),this.setError(fc().partLoadMessage)}))}_mountParts(e={draft:``,query:``}){if(!this._parts||this._partsMounted||!this._rendered||!this.isConnected)return;this._partsMounted=!0;let t=gc(this._refs());for(let n of this._parts)n.mount(this,t,{carry:e});this._drawValue(),this.renderList()}_teardownParts(){let e=this._activePartsList();this._partsMounted=!1;for(let t of e)t.teardown()}_remountParts(){if(!this._partsMounted)return;let e=this._carry();this._teardownParts(),this._mountParts(e)}_carry(){let e=this._refs();return{draft:e.input?.value??``,query:e.search?.value??``}}},gc=e=>{let{control:t,value:n,menu:r,list:i}=e;return{control:P(t,`control missing`),value:P(n,`value missing`),menu:P(r,`menu missing`),list:P(i,`list missing`),search:e.search,input:e.input}},_c=e=>Qs.includes(e),vc=[`comfortable`,`compact`],yc=150,bc=250,xc=10,Sc=()=>{let e=fc();return{single:e.placeholder,search:e.placeholder,multiple:e.placeholder,tag:e.tagPlaceholder,country:e.countryPlaceholder}},Cc=new Set([`countries`,`suggested`,`suggested-label`,`all-countries-label`,`max-tags`,`pattern`,`collapse-chips`,`source`,`remote`,`min-chars`]),wc=new Set([`separators`,`allow-duplicates`,`invalid-message`,`create-label`,`add-label`,`selected-text`,`clear-all-label`,`value-label`,`value-avatar`,`value-initials`,`hint-text`,`recents-key`,`recents-limit`,`recents-label`]),Tc=[[`icon`,`icon`],[`description`,`description`],[`meta`,`meta`],[`group`,`group`],[`avatar`,`avatar`],[`initials`,`initials`],[`disabled-hint`,`disabledHint`]],Ec=(e,t)=>t?Array.isArray(e)?e.map(String):e==null||e===``?[]:String(e).split(`,`).map(e=>e.trim()).filter(Boolean):Array.isArray(e)?e.length?String(e[0]):``:e==null?``:String(e),Dc=(e,t)=>t===`multiple`?sc(e)?[`chips`,`search`]:[`chips`]:t===`search`?[`search`]:t===`country`?[`country`]:t===`tag`?sc(e)?[`chips`,`search`]:[`chips`]:[],Oc=(e,t)=>e.hasAttribute(`recents-key`)?[`recents`,...Dc(e,t)]:Dc(e,t),kc=e=>typeof e==`object`&&!!e&&`default`in e&&typeof e.default==`function`,Ac=e=>{if(e.target instanceof Element)return e.target;throw Error(`The event target is not an element.`)},K=(e,t,n)=>{let r=e.querySelector(t);return r instanceof n?r:null},jc=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Mc=e=>{let t=e.textContent;if(t===null)throw Error(`The element has no text.`);return t},Nc=(e,t)=>ac(t).then(e=>{if(!kc(e))throw Error(`The part ${t} has no default export.`);return e.default()}).catch(()=>(document.dispatchEvent(new CustomEvent(Yr,{bubbles:!0,composed:!0,detail:{chunk:t}})),e.setError(fc().partLoadMessage),null)),Pc=`wui-shortcuts-open-change`;function Fc(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}function Ic(e,t){return[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement)}var Lc=class extends s{_doc;_onKeyDown;_onClick;_onDocClick;_onPointerDown;_onPressEnd;_pressedOpen;_pinned;_mirroring;static get observedAttributes(){return[`open`,`no-trigger`]}constructor(){super(),this._doc=null,this._pressedOpen=!1,this._pinned=!1,this._mirroring=!1,this._onKeyDown=e=>this._keydown(e),this._onClick=e=>this._click(e),this._onDocClick=e=>{let t=F(e.target,`[data-wui-shortcuts-open]`)?.getAttribute(`data-wui-shortcuts-open`);t&&this.matches(t)&&this.setOpen(!0)},this._onPointerDown=e=>{F(e.target,`.wui-shortcut-toggle`)&&(this._pressedOpen=this.open)},this._onPressEnd=e=>{e.type===`pointerup`&&F(e.target,`.wui-shortcut-toggle`)||(this._pressedOpen=!1)}}connectedCallback(){this._doc=this.ownerDocument,this._doc.addEventListener(`keydown`,this._onKeyDown),this._doc.addEventListener(`click`,this._onDocClick),this._doc.addEventListener(`pointerup`,this._onPressEnd,!0),this._doc.addEventListener(`pointercancel`,this._onPressEnd,!0),this.addEventListener(`click`,this._onClick),this.addEventListener(`pointerdown`,this._onPointerDown,!0),this.hasAttribute(`open`)&&!this.open&&(this._pinned=!0,this.setOpen(!0,{focus:!1})),this._syncTrigger()}attributeChangedCallback(e,t,n){e===`no-trigger`?this._syncTrigger():(this._mirroring||(this._pinned=n!==null),this._sheet()&&n!==null!==this.open&&this.setOpen(n!==null))}disconnectedCallback(){let e=this._sheet();e&&M(e),this._doc?.removeEventListener(`keydown`,this._onKeyDown),this._doc?.removeEventListener(`click`,this._onDocClick),this._doc?.removeEventListener(`pointerup`,this._onPressEnd,!0),this._doc?.removeEventListener(`pointercancel`,this._onPressEnd,!0),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`pointerdown`,this._onPointerDown,!0),this._doc=null}get open(){let e=this._sheet();return!!(e&&N(e))}set open(e){let t=e===!0||e===``||e===`true`;this._pinned=t,this._sheet()?t!==this.open&&this.setOpen(t):this.toggleAttribute(`open`,t)}setOpen(e,{focus:t=!0}={}){let n=this._sheet();if(!n)return;let r=Fc(this,`.wui-shortcut-toggle`);e||(this._pinned=!1),e?(n.removeAttribute(`hidden`),Oe(this.hasAttribute(`no-trigger`)?r??this:P(r,`<wui-shortcuts> needs its toggle to anchor the sheet.`),n,{mode:`auto`,side:`top`,align:`end`,flipAlign:!0,gap:8,keepOffscreen:this._pinned,onClosed:()=>{this._pinned=!1,this._mirror(!1)}})):M(n),this._mirror(e),t&&(e?queueMicrotask(()=>{N(n)&&Fc(n,`.wui-shortcut-close`)?.focus()}):r?.focus())}_mirror(e){let t=this._sheet();t&&(t.hidden=!e),Fc(this,`.wui-shortcut-toggle`)?.setAttribute(`aria-expanded`,String(e)),this.hasAttribute(`open`)!==e&&(this._mirroring=!0,this.toggleAttribute(`open`,e),this._mirroring=!1,this.dispatchEvent(new CustomEvent(Pc,{bubbles:!0,detail:{open:e}})))}_sheet(){return Fc(this,`.wui-shortcut-sheet`)}_syncTrigger(){let e=Fc(this,`.wui-shortcut-toggle`);e&&(e.hidden=this.hasAttribute(`no-trigger`))}_scope(){let e=this.closest(`[${tt}]`);return e instanceof HTMLElement?e:null}_items(){let e=this.getAttribute(`items`);return e?Ic(P(this._scope()??this._doc,`WuiShortcuts used before it was connected`),e):[]}_click(e){let t=e.target;if(t instanceof Element){if(t.closest(`.wui-shortcut-toggle`)){let e=this._pressedOpen;this._pressedOpen=!1,this.setOpen(!e&&!this.open)}else t.closest(`.wui-shortcut-close`)&&this.setOpen(!1)}}_tickFocused(){let e=this._items(),t=P(this._doc,`WuiShortcuts used before it was connected`).activeElement,n=t?.closest?.(`li, tr`),r=e.find(e=>e===t||e.contains(t)||n?.contains(e)),i=(r?.closest(`li, tr`)??r)?.querySelector(`input[type="checkbox"]`);i instanceof HTMLInputElement&&i.click()}_focusSearch(){let e=this.getAttribute(`search`);if(!e)return;let t=P(this._doc,`WuiShortcuts used before it was connected`);(Fc(this._scope()??t,e)??Fc(t,e))?.focus()}_keydown(e){if(e.defaultPrevented)return;let t=lt(e);if(!t)return;if(t===`esc`&&this.open){e.preventDefault(),this.setOpen(!1);return}let n=this._scope(),r={help:()=>this.setOpen(!this.open)};if(this.getAttribute(`items`)&&(r.j=()=>_t(this._items(),1),r.k=()=>_t(this._items(),-1),r.x=()=>this._tickFocused()),this.getAttribute(`search`)&&(r.slash=()=>this._focusSearch()),r[t]){gt(e,r,n);return}if(t===`enter`)return;let i=P(this._doc,`WuiShortcuts used before it was connected`),a=e.target instanceof Node?e.target:null;if(mt(i)||!ht(a,n)||ft(a))return;let o=ut(t),s=Ic(this,`.wui-shortcut-keys [data-shortcut]`).find(e=>e.dataset.shortcut===o);if(!s)return;let c=(n??i).querySelector(`[aria-current="true"]`)?.closest(`[data-key]`),l=c instanceof HTMLElement?c.dataset.key??null:null;if(!this.dispatchEvent(new CustomEvent(`wui:shortcut`,{bubbles:!0,cancelable:!0,detail:{key:o,itemKey:l}}))){e.preventDefault();return}let u=s.dataset.target,d=u?Fc(i,u):null;d&&(e.preventDefault(),d.click())}},Rc={lessLabel:`Show less`,moreLabel:`Show more`},zc=3,Bc=()=>L(`showMore`,Rc),Vc=class extends s{_width;_observer;_toggle;_onClick;constructor(){super(),this._width=-1,this._observer=null,this._toggle=null,this._onClick=()=>this.toggle()}connectedCallback(){let e=this.querySelector(`.wui-show-more-toggle`);if(this._toggle=e instanceof HTMLButtonElement?e:null,!this._toggle)return;let t=Number.parseInt(this.getAttribute(`lines`)??``,10);this.style.setProperty(`--wui-show-more-lines`,String(t>=1?t:zc)),this._toggle.addEventListener(`click`,this._onClick),this._sync(),this._check(),typeof ResizeObserver<`u`&&(this._observer=new ResizeObserver(()=>{this.clientWidth!==this._width&&this._check()}),this._observer.observe(this))}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,this._toggle?.removeEventListener(`click`,this._onClick),this._toggle=null}get expanded(){return this.hasAttribute(`expanded`)}toggle(e=!this.expanded){this.toggleAttribute(`expanded`,!!e),this._sync(),this.dispatchEvent(new CustomEvent(`wui:show-more:toggle`,{bubbles:!0,detail:{expanded:this.expanded}}))}_sync(){let e=P(this._toggle,`WuiShowMore used before it was connected`),t=this.expanded;e.setAttribute(`aria-expanded`,String(t)),e.textContent=t?this.getAttribute(`less-label`)||Bc().lessLabel:this.getAttribute(`more-label`)||Bc().moreLabel}_check(){let e=this.querySelector(`.wui-show-more-body`);if(!(e instanceof HTMLElement))return;this._width=this.clientWidth;let t=this.expanded;t&&this.removeAttribute(`expanded`);let n=e.scrollHeight>e.clientHeight+1;t&&this.setAttribute(`expanded`,``);let r=P(this._toggle,`WuiShowMore used before it was connected`);r.hidden=!n}},Hc=class extends s{_measure;_resize;_mutation;_ownTabindex;constructor(){super(),this._measure=()=>this.measure(),this._resize=null,this._mutation=null,this._ownTabindex=!1}connectedCallback(){this.measure(),this.addEventListener(`mouseover`,this._measure),typeof ResizeObserver<`u`&&(this._resize=new ResizeObserver(this._measure),this._resize.observe(this)),this._mutation=new MutationObserver(this._measure),this._mutation.observe(this,{childList:!0,subtree:!0,characterData:!0})}disconnectedCallback(){this.removeEventListener(`mouseover`,this._measure),this._resize?.disconnect(),this._mutation?.disconnect(),this._resize=null,this._mutation=null}measure(){let e=this.querySelector(`.wui-truncate-text`);e&&(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight?(this.setAttribute(`data-wui-tooltip`,(e.textContent??``).replace(/\s+/g,` `).trim()),this.hasAttribute(`tabindex`)||(this.setAttribute(`tabindex`,`0`),this._ownTabindex=!0)):(this.removeAttribute(`data-wui-tooltip`),this._ownTabindex&&=(this.removeAttribute(`tabindex`),!1)))}},Uc=`wui-whats-new-read`,Wc=`wui-whats-new:`,Gc=`data-wui-unread`,Kc=0,qc=e=>{let t=Date.parse(e);return Number.isNaN(t)?-1/0:t},Jc=(e,t)=>qc(t)>qc(e)?t:e,Yc=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Xc=class extends s{_doc;_stored;_observer;_onTriggerClick;_closeFocus;static get observedAttributes(){return[`storage-key`,`read-through`,`indicator`]}constructor(){super(),this._doc=null,this._stored=``,this._closeFocus=null,this._observer=null,this._onTriggerClick=()=>this.isOpen?this.close(!0):this.open()}get isOpen(){let e=this._panel;return e!==null&&N(e)}get _trigger(){return Yc(this,`.wui-whats-new-trigger`)}get _panel(){return Yc(this,`.wui-whats-new-panel`)}get _dot(){return Yc(this,`.wui-whats-new-dot`)}connectedCallback(){this._doc=this.ownerDocument;let e=this._panel,t=this._trigger;e&&t&&(e.id||=`wui-whats-new-${++Kc}`,t.setAttribute(`aria-controls`,e.id),t.setAttribute(`aria-expanded`,`false`),t.addEventListener(`click`,this._onTriggerClick),this._stored=this._load(),this._refresh(),typeof MutationObserver<`u`&&(this._observer=new MutationObserver(()=>this._refresh()),this._observer.observe(e,{childList:!0,subtree:!0})))}disconnectedCallback(){let e=this._panel;e&&(this._closeFocus=!1,M(e),this._closeFocus=null),this._observer?.disconnect(),this._observer=null,this._trigger?.removeEventListener(`click`,this._onTriggerClick),this._doc=null}attributeChangedCallback(e,t,n){t!==n&&this._doc&&(e===`storage-key`&&(this._stored=this._load()),this._refresh())}open(){let e=P(this._trigger,`<wui-whats-new> needs its trigger to open.`),t=P(this._panel,`<wui-whats-new> needs its panel to open.`);this.isOpen||(Oe(e,t,{mode:`auto`,clampHeight:!0,onClosed:()=>this._closed()}),e.setAttribute(`aria-expanded`,`true`),t.focus({preventScroll:!0}),this._markRead())}close(e){let t=this._panel;t&&this.isOpen&&(this._closeFocus=e,M(t))}_closed(){let e=this._closeFocus??this._panel?.contains(this.ownerDocument.activeElement)??!1;this._closeFocus=null,this._settle(e)}_settle(e){this._trigger?.setAttribute(`aria-expanded`,`false`),this._refresh(),e&&this._trigger?.focus()}_entries(){let e=[];for(let t of this.querySelectorAll(`.wui-whats-new-entry`))t instanceof HTMLElement&&e.push({entry:t,date:t.querySelector(`time[datetime]`)?.getAttribute(`datetime`)??``});return e}_newest(){return this._entries().reduce((e,{date:t})=>Jc(e,t),``)}_seenPoint(){return Jc(this._stored,this.getAttribute(`read-through`)??``)}_refresh(){let e=this._seenPoint(),t=this._entries(),n=0;for(let{entry:r,date:i}of t){let t=qc(i)>qc(e);t&&n++,this.isOpen&&r.hasAttribute(Gc)||r.toggleAttribute(Gc,t)}this.toggleAttribute(Gc,n>0);let r=this._dot;r&&(r.textContent=this.getAttribute(`indicator`)===`count`&&n>0?String(n):``)}_markRead(){let e=this._newest();!e||qc(e)<=qc(this._seenPoint())||(this._stored=Jc(this._stored,e),this._save(this._stored),this._refresh(),this.dispatchEvent(new CustomEvent(Uc,{bubbles:!0,detail:{through:e}})))}_storage(){let e=this.getAttribute(`storage-key`);if(!e)return null;try{let t=this.ownerDocument.defaultView;return t?{store:t.localStorage,key:Wc+e}:null}catch{return null}}_load(){let e=this._storage();return e?e.store.getItem(e.key)??``:this._stored}_save(e){let t=this._storage();t&&t.store.setItem(t.key,e)}},Zc=n({APP_BUTTON_MARKER:()=>Qc,buttonClass:()=>nl}),Qc=`AppButton`,$c=new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),el={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 tl(e){return Object.hasOwn(el,e)}function nl(e=`primary`,t=`solid`,n=`md`){if(!$c.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!tl(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=el[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}var rl=n({DISPLAY_FORMAT:()=>ll,MONTH_DISPLAY_FORMAT:()=>pl,YEAR_DISPLAY_FORMAT:()=>_l,clampMonth:()=>bl,daysIn:()=>yl,firstWeekday:()=>al,fmt:()=>ul,fmtMonth:()=>ml,fmtYear:()=>vl,pad:()=>ol,parseIso:()=>cl,parseIsoMonth:()=>dl,parseIsoYear:()=>hl,toIso:()=>sl,toIsoMonth:()=>fl,toIsoYear:()=>gl}),il=e=>{let t=String(e??``).trim();return/^[0-6]$/.test(t)?Number(t):null},al=e=>il(e.getAttribute(`first-day`))??il(getComputedStyle(e).getPropertyValue(`--wui-first-day`))??1,ol=e=>String(e).padStart(2,`0`),sl=(e,t,n)=>`${e}-${ol(t+1)}-${ol(n)}`,cl=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e||``);if(!t)return null;let[,n,r,i]=t;if(n===void 0||r===void 0||i===void 0)throw Error(`ISO date parts missing`);let a=+n,o=+r,s=+i;return o<1||o>12||s<1||s>yl(a,o-1)?null:{y:a,m:o-1,d:s}},ll=`dd-MMM-yyyy`,ul=(e,t=ll)=>{let n=cl(e);if(!n)return``;let r={yyyy:n.y,MMMM:ln(n.m),MMM:cn(n.m),MM:ol(n.m+1),dd:ol(n.d),d:n.d};return(t||`dd-MMM-yyyy`).replace(/yyyy|MMMM|MMM|MM|dd|d/g,e=>String(r[e]))},dl=e=>{let t=/^(\d{4})-(\d{2})$/.exec(e||``);if(!t)return null;let[,n,r]=t;if(n===void 0||r===void 0)throw Error(`ISO month parts missing`);let i=+r;return i<1||i>12?null:{y:+n,m:i-1}},fl=(e,t)=>`${e}-${ol(t+1)}`,pl=`MMM yyyy`,ml=(e,t=pl)=>{let n=dl(e);if(!n)return``;let r={yyyy:n.y,MMMM:ln(n.m),MMM:cn(n.m),MM:ol(n.m+1)};return(t||`MMM yyyy`).replace(/yyyy|MMMM|MMM|MM/g,e=>String(r[e]))},hl=e=>{let t=/^(\d{4})$/.exec(e||``);if(!t)return null;let[,n]=t;if(n===void 0)throw Error(`ISO year part missing`);return{y:+n}},gl=e=>String(e).padStart(4,`0`),_l=`yyyy`,vl=(e,t=_l)=>{let n=hl(e);return n?(t||`yyyy`).replace(/yyyy/g,String(n.y)):``},yl=(e,t)=>{let n=new Date(0);return n.setFullYear(e,t+1,0),n.getDate()},bl=(e,t)=>{for(;t<0;)t+=12,--e;for(;t>11;)t-=12,e+=1;return{y:e,m:t}},xl=n({COPY_FEEDBACK_MS:()=>Sl,copyTextToClipboard:()=>Cl}),Sl=2e3;async function Cl(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch(e){if(!(e instanceof DOMException))throw e}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.top=`0`,t.style.left=`0`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),!!n}catch(e){if(!(e instanceof DOMException))throw e;return!1}}var wl=n({MENTION_ID_PATTERN:()=>Tl,mentionLabel:()=>Ol,mentionTextFromValue:()=>jl,mentionValueFromText:()=>Ml,mentionedIds:()=>Nl,parseMentionValue:()=>Al}),Tl=/^[A-Za-z0-9_.:-]{1,64}$/,El=/@(\\+)\[|@\[([^[\]\n]{1,100})\]\(([A-Za-z0-9_.:-]{1,64})\)/g,Dl=/@(\\*)\[/g;function Ol(e){return String(e??``).replace(/[[\]\r\n]+/g,` `).replace(/\s+/g,` `).trim().slice(0,100)}var kl=e=>e.replace(Dl,(e,t)=>`@\\${t}[`);function Al(e){let t=String(e??``),n=[],r=e=>{if(!e)return;let t=n[n.length-1];t&&`text`in t?t.text+=e:n.push({text:e})},i=0;for(let e of t.matchAll(El))r(t.slice(i,e.index)),e[1]===void 0?n.push({id:e[3]??``,label:e[2]??``}):r(`@${e[1].slice(1)}[`),i=e.index+e[0].length;return r(t.slice(i)),n}function jl(e){let t=``,n=[];for(let r of Al(e)){if(`text`in r){t+=r.text;continue}let e=`@${r.label}`;n.push({start:t.length,end:t.length+e.length,id:r.id,label:r.label}),t+=e}return{text:t,mentions:n}}function Ml(e,t=[]){let n=String(e??``),r=[...t].sort((e,t)=>e.start-t.start),i=``,a=0;for(let e of r)e.start<a||n.slice(e.start,e.end)!==`@${e.label}`||!Tl.test(e.id)||(i+=kl(n.slice(a,e.start)),i+=`@[${e.label}](${e.id})`,a=e.end);return i+kl(n.slice(a))}function Nl(e){let t=[];for(let n of Al(e))`id`in n&&!t.includes(n.id)&&t.push(n.id);return t}var Pl=n({bindMenuKeys:()=>zl}),Fl=500,Il=10,Ll=new Set([`INPUT`,`TEXTAREA`,`SELECT`]);function Rl(e){return e instanceof HTMLElement?Ll.has(e.tagName)||e.isContentEditable:!1}function zl(e,t){let{items:n,typeahead:r=!0}=t,i=``,a=null,o=()=>{a!==null&&clearTimeout(a),a=null,i=``},s=e=>{let t=n().filter(Xi),s=t.length;if(s===0)return;let c=e.target,l=t.findIndex(e=>c instanceof Node&&e.contains(c)),u=n=>{e.preventDefault(),e.stopPropagation(),t[n]?.focus()},d=Rl(c);if(e.key===`ArrowDown`){u(l<0?0:(l+1)%s);return}if(e.key===`ArrowUp`){u(l<0?s-1:(l-1+s)%s);return}if(e.key===`Home`&&!d){u(0);return}if(e.key===`End`&&!d){u(s-1);return}if(e.key===`PageDown`){u(Math.min((l<0?-1:l)+Il,s-1));return}if(e.key===`PageUp`){u(Math.max((l<0?s:l)-Il,0));return}if(!r||!/^\S$/.test(e.key)||e.ctrlKey||e.metaKey||e.altKey||d)return;e.preventDefault(),e.stopPropagation(),a!==null&&clearTimeout(a),i+=e.key.toLowerCase(),a=setTimeout(o,Fl);let f=i.length>1&&i.split(``).every(e=>e===i[0]),p=f?i[0]??``:i,m=i.length===1||f?l+1:Math.max(l,0);for(let e=0;e<s;e++){let n=(m+e)%s;if((t[n]?.textContent??``).trim().toLowerCase().startsWith(p)){t[n]?.focus();return}}};return e.addEventListener(`keydown`,s),()=>{e.removeEventListener(`keydown`,s),o()}}var Bl=n({FALLBACK_ROW_HEIGHT:()=>36,SELECT_WINDOW_OVERSCAN:()=>8,createHeightIndex:()=>Hl,scrollTopToReveal:()=>Wl,windowRange:()=>Ul}),Vl=.5;function Hl(e,t=36){let n=Math.max(0,Math.floor(e)),r=new Float64Array(n),i=null,a=e=>{let t=e>=0&&e<n?r[e]??0:0;return t>0?t:s.estimate},o=()=>{if(i)return i;let e=new Float64Array(n+1);for(let t=0;t<n;t++)e[t+1]=(e[t]??0)+a(t);return i=e,e},s={count:n,estimate:t,setEstimate(e){!(e>0)||Math.abs(e-s.estimate)<=Vl||(s.estimate=e,i=null)},set(e,t){if(e<0||e>=n||!(t>0))return!1;let o=a(e);return r[e]=t,Math.abs(o-t)<=Vl?!1:(i=null,!0)},heightOf:a,offsetOf(e){return o()[Math.min(Math.max(0,Math.floor(e)),n)]??0},total(){return o()[n]??0},indexAt(e){if(n===0)return 0;let t=o(),r=0,i=n-1;for(;r<i;){let n=r+i+1>>1;(t[n]??0)<=e?r=n:i=n-1}return r}};return s}function Ul(e,t){if(e.count===0)return{start:0,end:0,before:0,after:0};let{overscan:n=8}=t,r=Math.max(0,t.scrollTop),i=e.indexAt(r),a=e.indexAt(r+Math.max(0,t.viewport)),o=Math.max(0,i-n),s=Math.min(e.count,a+1+n);return{start:o,end:s,before:e.offsetOf(o),after:e.total()-e.offsetOf(s)}}function Wl(e,t,n){let r=e.offsetOf(t),i=r+e.heightOf(t);return r<n.scrollTop?r:i>n.scrollTop+n.viewport?i-n.viewport:n.scrollTop}var Gl=n({parseServerHtml:()=>Kl});function Kl(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content}var ql=n({deriveStepStatus:()=>Jl,stepperHeaderItems:()=>Yl});function Jl(e,t){return typeof t==`number`?e<t?`done`:e===t?`active`:`pending`:`pending`}function Yl(e,t){let{statusOf:n,journey:r,connectors:i}=t;return e.map((t,a)=>{let o=n(a),s;return s=o===`done`?{icon:`check`}:o===`error`?{icon:`alert-triangle`}:o===`skipped`?{icon:`minus`}:t.icon?{icon:t.icon}:{number:a+1},{index:a,status:o,className:o===`pending`?`step`:`step ${o}`,glyph:s,current:o===`active`,line:r&&i&&a<e.length-1?{done:o===`done`}:null}})}var Xl={selectAllLabel:`Select all rows`,selectRowLabel:`Select row`},Zl=n({SELECT_CELL_CLASS:()=>q,addRowSelectCells:()=>ou,addSelectColumn:()=>su,attachShiftRange:()=>uu,createSelectHeaderCell:()=>eu,createSelectRowCell:()=>tu,createSelectSpacerCell:()=>nu,syncSelectAll:()=>cu}),Ql=()=>L(`tableSelect`,Xl),q=`wui-select-cell`,$l=(e,t)=>{let n=e.createElement(`input`);return n.type=`checkbox`,n.className=`wui-check`,n.setAttribute(`aria-label`,t),n};function eu(e=document){let t=e.createElement(`th`);return t.className=q,t.appendChild($l(e,Ql().selectAllLabel)),t}function tu(e=document,{disabled:t=!1}={}){let n=e.createElement(`td`);n.className=q;let r=$l(e,Ql().selectRowLabel);return r.disabled=t,n.appendChild(r),n}function nu(e=document){let t=e.createElement(`td`);return t.className=q,t}var ru=e=>e.firstElementChild?.classList.contains(q),iu=e=>e.matches(`.wui-group-row, .wui-virtual-spacer, .wui-row-expanded`),au=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n);function ou(e){for(let t of e){if(ru(t)||iu(t))continue;let e=t.getAttribute(`data-row-selectable`)===`false`;t.insertBefore(tu(t.ownerDocument,{disabled:e}),t.firstChild)}}function su(e){let t=e.querySelector(`thead tr`);if(!(t instanceof HTMLTableRowElement))return null;ru(t)||t.insertBefore(eu(e.ownerDocument),t.firstChild),ou(au(e,`tbody tr`,HTMLTableRowElement));for(let t of au(e,`tfoot tr`,HTMLTableRowElement))ru(t)||t.insertBefore(nu(e.ownerDocument),t.firstChild);let n=t.querySelector(`.${q} .wui-check`);return n instanceof HTMLInputElement?n:null}function cu(e){let t=e.querySelector(`thead .${q} .wui-check`),n=au(e,`tbody tr .wui-check:not(:disabled)`,HTMLInputElement),r=n.length,i=n.filter(e=>e.checked).length;t instanceof HTMLInputElement&&(t.checked=r>0&&i===r,t.indeterminate=i>0&&i<r);for(let t of au(e,`tbody tr`,HTMLTableRowElement)){let e=t.querySelector(`.wui-check`);t.classList.toggle(`is-selected`,e instanceof HTMLInputElement&&e.checked)}return{selected:i,total:r}}var lu=`tbody .${q} .wui-check:not(:disabled)`;function uu(e,t){let n=null,r=e=>e instanceof Element&&e.matches(`.wui-select-cell .wui-check:not(:disabled)`)&&!!e.closest(`tbody`);e.addEventListener(`mousedown`,e=>{e.shiftKey&&r(e.target)&&e.preventDefault()}),e.addEventListener(`click`,i=>{let a=i.target;if(r(a)){if(i.shiftKey&&n?.isConnected&&n!==a){let r=au(e,lu,HTMLInputElement),i=r.indexOf(n),o=r.indexOf(a);if(i>=0&&o>=0){let e=[];for(let t of r.slice(Math.min(i,o),Math.max(i,o)+1))t!==a&&t.checked!==a.checked&&(t.checked=a.checked,e.push(t));e.length&&t?.(e,a.checked)}}n=a}})}var du=n({DATE_PICKER_TEXT:()=>fu}),fu={chooseMonthYearLabel:`Choose month and year`,chooseYearLabel:`Choose year`,clearLabel:`Clear`,dateTimeLabel:`Time`,helpLabel:`More information`,monthPlaceholder:`Choose a month`,nextDecadeLabel:`Next decade`,nextMonth:`Next month`,nextYearLabel:`Next year`,optionalLabel:`(optional)`,placeholder:`Choose a date`,previousDecadeLabel:`Previous decade`,previousMonth:`Previous month`,previousYearLabel:`Previous year`,todayLabel:`Today`,yearPlaceholder:`Choose a year`,zoneNote:`Times are shown in {zone}.`},pu=n({DRAWER_TEXT:()=>mu}),mu={closeLabel:`Close`,confirmDiscard:`Discard your changes?`,discardLabel:`Discard`,keepLabel:`Keep editing`,screenText:`{now}% of the screen`,sheetHeightLabel:`Sheet height`},hu=n({matchSegments:()=>gu});function gu(e,t){let n=String(e??``),r=String(t??``).trim();if(!r||!n)return[{text:n,match:!1}];let i=n.toLowerCase(),a=r.toLowerCase();if(i.length!==n.length)return[{text:n,match:!1}];let o=[],s=0,c=i.indexOf(a,s);for(;c!==-1;)c>s&&o.push({text:n.slice(s,c),match:!1}),o.push({text:n.slice(c,c+a.length),match:!0}),s=c+a.length,c=i.indexOf(a,s);return s<n.length&&o.push({text:n.slice(s),match:!1}),o}var _u=n({TOOLTIP_ATTRIBUTE:()=>vu,TOOLTIP_CLASS_ATTRIBUTE:()=>bu,TOOLTIP_ID_ATTRIBUTE:()=>xu,TOOLTIP_OPEN_ATTRIBUTE:()=>Su,TOOLTIP_PLACEMENT_ATTRIBUTE:()=>yu,TOOLTIP_SHORTCUT_ATTRIBUTE:()=>Cu,showPinnedTooltips:()=>Tu,wireTooltips:()=>wu}),vu=`data-wui-tooltip`,yu=`data-wui-tooltip-placement`,bu=`data-wui-tooltip-class`,xu=`data-wui-tooltip-id`,Su=`data-wui-tooltip-open`,Cu=`data-wui-tooltip-shortcut`;function wu(e){ku.has(e)||(ku.add(e),e.addEventListener(`pointerover`,t=>{let n=Pu(t.target);n&&!Iu(e,n)&&zu(e,n,!1)}),e.addEventListener(`pointerout`,t=>{let n=ju(e).transient;n&&Pu(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||Bu(e,n))}),e.addEventListener(`focusin`,t=>{let n=t.target;if(!(n instanceof Element)||!n.matches(`:focus-visible`))return;let r=Pu(n);r&&!Iu(e,r)&&zu(e,r,!1)}),e.addEventListener(`focusout`,t=>{let n=ju(e).transient;n&&Pu(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||Bu(e,n))}),e.addEventListener(`click`,t=>{let n=ju(e).transient;n&&Pu(t.target)===n.trigger&&Bu(e,n)}))}function Tu(e){let t=e instanceof Document?e:e.ownerDocument;for(let n of e.querySelectorAll(`[${Su}]`))zu(t,n,!0)}var Eu=[`top`,`bottom`,`start`,`end`],Du=`wui-tooltip`,Ou=`[${vu}], [${xu}]`,ku=new WeakSet,Au=new WeakMap;function ju(e){let t=Au.get(e);return t||(t={bubble:null,transient:null,pinned:new Map,pinnedCount:0,onEscape:t=>{t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),Vu(e))}},Au.set(e,t)),t}function Mu(e){return Eu.includes(e)}function Nu(e){return e===`auto`||Mu(e)}function Pu(e){if(!(e instanceof Element))return null;let t=e.closest(Ou);return t instanceof HTMLElement?t:null}function Fu(e,t){return e.transient?.trigger===t?e.transient:e.pinned.get(t)}function Iu(e,t){return Fu(ju(e),t)!==void 0}function Lu(e,t){let n=e.createElement(`div`);n.id=t,n.setAttribute(`role`,`tooltip`),n.setAttribute(`popover`,`manual`);let r=e.createElement(`div`);r.className=`tooltip-arrow`;let i=e.createElement(`div`);return i.className=`tooltip-inner`,n.append(r,i),{el:n,arrow:r,inner:i}}function Ru(e,t){return t.bubble||=Lu(e,Du),t.bubble}function zu(e,t,n){let r=t.getAttribute(vu),i=t.getAttribute(xu);if(r===null&&i===null)throw Error(`a tooltip trigger carries ${vu} or ${xu}`);if(r!==null&&i!==null)throw Error(`a tooltip trigger carries ${vu} or ${xu}, not both`);let a=t.getAttribute(`data-wui-tooltip-placement`)??`top`;if(!Nu(a))throw Error(`${yu} "${a}" is not auto, top, bottom, start or end`);let o=ju(e);Bu(e,n?o.pinned.get(t):o.transient);let s,c=null,l=null,u=!1;if(i!==null){let t=e.getElementById(i);if(!(t instanceof HTMLElement))throw Error(`no element with id "${i}" for a tooltip`);s=t,c=e.createComment(`wui-tooltip`),s.replaceWith(c),l=s.getAttribute(`popover`),s.setAttribute(`popover`,`manual`)}else{let i=n?Lu(e,`${Du}-pinned-${++o.pinnedCount}`):Ru(e,o);u=n;let c=t.getAttribute(`data-wui-tooltip-class`)??``;i.el.className=`tooltip wui-tooltip bs-tooltip-${a} ${c}`.trim();let l=t.getAttribute(Cu);i.inner.replaceChildren(r??``,...l?[I(`span`,{class:`wui-kbd`},l)]:[]),s=i.el}let d=t.getAttribute(`aria-describedby`);t.setAttribute(`aria-describedby`,s.id);let f=()=>T(t,s,{side:a,align:`center`,gap:6,arrow:s.querySelector(`.tooltip-arrow`)});Me(e).append(s),s.showPopover(),f();let p=Ne(e=>{s.parentElement!==e&&e.append(s),Ae(s),f()},e),m=new MutationObserver(()=>{t.isConnected||Bu(e,Fu(ju(e),t))});m.observe(e,{childList:!0,subtree:!0});let h={el:s,trigger:t,pinned:n,own:u,home:c,popover:l,describedBy:d,watch:m,unroot:p};n?o.pinned.set(t,h):o.transient=h,e.addEventListener(`keydown`,o.onEscape,!0)}function Bu(e,t){if(!t)return;let n=ju(e);t.pinned?n.pinned.delete(t.trigger):n.transient=null,!n.transient&&n.pinned.size===0&&e.removeEventListener(`keydown`,n.onEscape,!0),t.watch.disconnect(),t.unroot(),t.el.hidePopover(),t.home?(t.popover===null?t.el.removeAttribute(`popover`):t.el.setAttribute(`popover`,t.popover),t.home.replaceWith(t.el)):t.own&&t.el.remove(),t.describedBy===null?t.trigger.removeAttribute(`aria-describedby`):t.trigger.setAttribute(`aria-describedby`,t.describedBy)}function Vu(e){let t=ju(e);Bu(e,t.transient);for(let n of[...t.pinned.values()])Bu(e,n)}var Hu=Object.freeze({anchorOverlay:d,avatarNode:ns,buttonClass:Zc,calendarMath:rl,copyText:xl,dataTable:Wn,datePickerText:du,defineElement:r,devWarn:Vr,dom:Fe,drawerText:pu,elementBase:a,fieldState:to,formatters:Jt,formMirror:oo,glyphs:os,iconGlyphs:os,imeSafeEnter:Nr,isDrawn:Yi,listboxKeyNav:bs,loader:qr,mentionText:wl,menuKeyNav:Pl,nativeOverlay:O,notificationDays:Qi,optionLabel:ws,partRegistry:ec,rtl:c,selectList:Fs,selectRemote:oc,selectText:Ns,selectWindow:Bl,serverHtml:Gl,stepperHeader:ql,svgNodes:Fr,tableExport:hi,tableSelect:Zl,textMatch:hu,textStore:Le,tooltips:_u,wuiHttp:fa,WuiSelect:dc,zone:It}),Uu={avatarCropFailed:`That photo could not be saved. Try again, or choose another one.`,avatarDialogSubtitle:`Drag to position the photo, then zoom or rotate it.`,avatarDialogTitle:`Edit photo`,avatarSave:`Save photo`,cameraLabel:`Take photo`,cancel:`Cancel`,changeLabel:`Change photo`,closeLabel:`Close`,cropFailed:`That image could not be cropped. Choose another one.`,dialogSubtitle:`Drag the frame and zoom to choose what to keep.`,dialogTitle:`Crop photo`,heicUnreadableMessage:`This browser cannot open HEIC photos. Choose a JPG, PNG or WebP image instead.`,optionalLabel:`(optional)`,overlayLabel:`Update photo`,photoUnreadableMessage:`That photo could not be opened. Choose a JPG, PNG or WebP image.`,removeLabel:`Remove photo`,save:`Apply`,unreadable:`That image could not be opened. Choose another one.`,uploadLabel:`Upload photo`},Wu=`image/jpeg,image/png,image/webp,image/heic,image/heif,.heic,.heif`,Gu=10,Ku=512,qu=`image/webp`,Ju=[96,48];function Yu(e){if(!e)return!1;let t=String(e.type||``).toLowerCase();return t===`image/heic`||t===`image/heif`||/\.hei[cf]$/i.test(String(e.name||``))}function Xu(e){let t=L(`imagePicker`,Uu);return Yu(e)?t.heicUnreadableMessage:t.photoUnreadableMessage}function Zu(e,t){let n=Number(t);return{name:e?.name||`photo`,type:qu,size:Number.isInteger(n)&&n>0?n:512}}var Qu=`/`,$u=`.search-wrap.wui-search-collapsible`,ed=`.wui-topsearch-panel`,td=`.modal, wui-drawer[open]`,nd=new WeakSet,rd=e=>{let t=e.querySelector(`.wui-search-toggle`);return t instanceof HTMLElement?t:null},id=e=>{let t=e.querySelector(`.search-input`);return t instanceof HTMLInputElement?t:null},ad=e=>[...e.querySelectorAll($u)].filter(e=>e instanceof HTMLElement);function od(e){e.classList.remove(`is-collapsed`),rd(e)?.setAttribute(`aria-expanded`,`true`),id(e)?.focus()}function sd(e){id(e)?.value||(e.classList.add(`is-collapsed`),rd(e)?.setAttribute(`aria-expanded`,`false`))}function cd(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=rd(e),n=id(e);t?.addEventListener(`click`,()=>od(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n?.value||(r.preventDefault(),sd(e),t?.focus())}),e.addEventListener(`focusout`,t=>{let n=t.relatedTarget;n instanceof Node&&e.contains(n)||sd(e)})}function ld(e){nd.has(e)||(nd.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||ft(t.target instanceof Node?t.target:null)||t.target instanceof Element&&t.target.closest(td)||e.querySelector(ed))return;let n=ad(e).find(e=>e.offsetParent!==null);n&&(t.preventDefault(),od(n))}))}function ud(e=document){let t=e;for(let e of ad(t))cd(e);ld(e instanceof Element?e.ownerDocument:e)}var dd=`data-wui-command-shortcut`,fd=`k`,pd=new WeakSet;function md(e,t){return!(e.ctrlKey||e.metaKey)||e.altKey||e.shiftKey||e.repeat?!1:String(e.key).toLowerCase()===String(t).toLowerCase()}function hd(e){return e.nodeType===Node.DOCUMENT_NODE}function gd(e){e.closest(`wui-modal`)?.show()}function _d(e){let t=hd(e)?e:e.ownerDocument;!pd.has(t)&&e.querySelector(`[data-wui-command-shortcut]`)&&(pd.add(t),t.addEventListener(`keydown`,e=>{for(let n of t.querySelectorAll(`[${dd}]`))if(md(e,n.getAttribute(`data-wui-command-shortcut`)||fd)){e.preventDefault(),n.localName===`wui-command-palette`||n.localName===`wui-modal`?gd(n):(n.focus(),`select`in n&&typeof n.select==`function`&&n.select());return}}))}var vd={audioLabel:`audio`,byteLabel:`B`,chooseText:`Choose {label}.`,gigabyteLabel:`GB`,imagesLabel:`images`,keepFileUnderMbText:`Keep the file under {maxSizeMb} MB.`,kilobyteLabel:`KB`,megabyteLabel:`MB`,orText:`{names} or {last}`,supportedLabel:`supported`,textFileLabel:`text file`,videosLabel:`videos`},yd=()=>L(`fileValidation`,vd),bd=`image/png,image/jpeg,image/webp`,xd=5,Sd={"image/png":[`.png`],"image/jpeg":[`.jpg`,`.jpeg`],"image/webp":[`.webp`],"image/gif":[`.gif`],"image/svg+xml":[`.svg`],"image/heic":[`.heic`],"image/heif":[`.heif`],"application/pdf":[`.pdf`],"text/plain":[`.txt`]},Cd={"image/png":`PNG`,"image/jpeg":`JPG`,"image/webp":`WEBP`,"image/gif":`GIF`,"image/svg+xml":`SVG`,"image/heic":`HEIC`,"image/heif":`HEIC`,"application/pdf":`PDF`,".png":`PNG`,".jpg":`JPG`,".jpeg":`JPG`,".webp":`WEBP`,".gif":`GIF`,".svg":`SVG`,".heic":`HEIC`,".heif":`HEIC`,".pdf":`PDF`},wd={"text/plain":`textFileLabel`,".txt":`textFileLabel`,"image/*":`imagesLabel`,"video/*":`videosLabel`,"audio/*":`audioLabel`},Td=new Set([`image/*`,`video/*`,`audio/*`]),Ed=e=>{let t=wd[e];return t?yd()[t]:Cd[e]},Dd=e=>String(e||``).split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean),Od=[`.png`,`.jpg`,`.jpeg`,`.webp`,`.gif`,`.svg`,`.bmp`,`.avif`,`.heic`,`.heif`];function kd(e){if(!e)return!1;let t=typeof e==`object`&&e.type?String(e.type).toLowerCase():``;if(t)return t.startsWith(`image/`);let n=typeof e==`string`?e:e.name||e.url||``,r=String(n).toLowerCase();return Od.some(e=>r.endsWith(e))}var Ad=[`kilobyteLabel`,`megabyteLabel`,`gigabyteLabel`];function jd(e){if(e<1024)return`${e} ${yd().byteLabel}`;let t=e/1024,n=0;for(;t>=1024&&n<Ad.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${yd()[Ad[n]??`gigabyteLabel`]}`}function Md(e){if(!e)return!1;let t=typeof e==`object`&&e.type?String(e.type).toLowerCase():``;if(t)return t===`application/pdf`;let n=typeof e==`string`?e:e.name||e.url||``;return String(n).toLowerCase().replace(/[?#][\s\S]*$/,``).endsWith(`.pdf`)}function Nd(e){let t=Dd(e);return t.length?t.every(e=>e.startsWith(`.`)?Od.includes(e):e===`image/*`||e.startsWith(`image/`)):!1}function Pd(e){let t=[];for(let n of Dd(e)){let e=Ed(n)||(n.startsWith(`.`)?n.slice(1).toUpperCase():n.toUpperCase());t.includes(e)||t.push(e)}return t.length<=1?t[0]||yd().supportedLabel:R(yd().orText,{names:t.slice(0,-1).join(`, `),last:t.slice(-1).join(``)})}function Fd(e,t){let n=Dd(t);if(!n.length)return!0;let r=(e.type||``).toLowerCase(),i=(e.name||``).toLowerCase();return n.some(e=>e.startsWith(`.`)?i.endsWith(e):e.endsWith(`/*`)?r.startsWith(e.slice(0,-1)):r&&r===e?!0:!r&&(Sd[e]||[]).some(e=>i.endsWith(e)))}function Id(e,t={}){if(!e)return null;let n=t.accept===void 0?bd:t.accept,r=t.maxSizeMb===void 0?5:t.maxSizeMb;if(!Fd(e,n)){let e=Pd(n),t=Dd(n).map(e=>Td.has(e));return t.every(Boolean)?R(yd().chooseText,{label:e}):t.some(Boolean)?R(yd().chooseText,{label:e.endsWith(` file`)?`${e}s`:`${e} files`}):R(yd().chooseText,{label:`a ${e.endsWith(` file`)?e:`${e} file`}`})}return r!==null&&r>0&&e.size>r*1024*1024?R(yd().keepFileUnderMbText,{maxSizeMb:r}):null}function Ld(e,t){let n=Array.from(e||[]),r=t.multiple?n:n.slice(0,1),i=[],a=[];for(let e of r){let n=Id(e,{accept:t.accept,maxSizeMb:t.maxSizeMb});n?a.push({file:e,message:n}):i.push(e)}return{files:i,rejections:a}}function Rd(e,t){let{overClass:n,isDisabled:r=()=>!1,onFiles:i,onReject:a,...o}=t,s=0,c=t=>e.classList.toggle(n,t),l=e=>{e.preventDefault(),r()||(s+=1,c(!0))},u=e=>{e.preventDefault(),r()||c(!0)},d=e=>{e.preventDefault(),r()||(s=Math.max(0,s-1),s===0&&c(!1))},f=e=>{if(e.preventDefault(),s=0,c(!1),r())return;let{files:t,rejections:n}=Ld(e.dataTransfer?.files,o);t.length&&i(t);let l=n[0];l&&a(l)};return e.addEventListener(`dragenter`,l),e.addEventListener(`dragover`,u),e.addEventListener(`dragleave`,d),e.addEventListener(`drop`,f),()=>{e.removeEventListener(`dragenter`,l),e.removeEventListener(`dragover`,u),e.removeEventListener(`dragleave`,d),e.removeEventListener(`drop`,f)}}var zd={aadhaarMessage:`Enter a valid 12-digit Aadhaar number`,amountMessage:`Enter a valid amount`,dateMessage:`Enter a valid date as DD-MM-YYYY`,gstinMessage:`Enter a valid GSTIN`,ifscMessage:`Enter a valid IFSC`,incompleteMessage:`Enter the full value`,panMessage:`Enter a valid PAN`,phoneInMessage:`Enter a 10-digit mobile number`,pinCodeMessage:`Enter a valid 6-digit PIN code`},Bd=/[0-9]/,Vd={9:Bd,A:/[A-Za-z]/,"*":/[0-9A-Za-z]/},Hd=/[9A*]/,Ud=new Set([`text`,`tel`,`search`,`url`,`password`]),Wd=e=>{let t=e.replace(/\D/g,``);return t.length===12&&t.startsWith(`91`)?t.slice(2):t.length===11&&t.startsWith(`0`)?t.slice(1):e},Gd=e=>{let t=Number(e.slice(0,2)),n=Number(e.slice(2,4)),r=Number(e.slice(4,8));if(r<1)return!1;let i=new Date(Date.UTC(r,n-1,t));return i.getUTCFullYear()===r&&i.getUTCMonth()===n-1&&i.getUTCDate()===t},Kd=e=>e.length<=3?e:`${e.slice(0,-3).replace(/\B(?=(\d{2})+(?!\d))/g,`,`)},${e.slice(-3)}`,qd=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());return t?`${t[3]}-${t[2]}-${t[1]}`:e},Jd=()=>L(`inputMask`,zd);function Yd(e,{upper:t=!1,normalize:n,valid:r,post:i=e=>e,message:a=Jd().incompleteMessage}={}){let o=[...e].map(e=>{let t=Vd[e];return t?{re:t}:{lit:e}}),s=o.filter(e=>e.re).length;return{inputMode:o.every(e=>!e.re||e.re===Bd)?`numeric`:`text`,normalize:n,post:i,message:a,extract(e){let n=``,r=0;for(let i of e){for(;r<o.length&&o[r]?.lit!==void 0&&o[r]?.lit!==i;)r++;if(r>=o.length)break;let e=o[r];e?.lit===void 0?e?.re.test(i)&&(n+=t?i.toUpperCase():i,r++):r++}return n},layout(e){let t=``,n=[],r=0;for(let i=0;i<o.length&&r<e.length;i++){let a=o[i];a?.lit===void 0?(t+=e.charAt(r++),n.push(!0)):(t+=a.lit,n.push(!1))}return{text:t,isRaw:n}},isValid:e=>e.length===s&&(!r||r(e))}}function Xd(){return{inputMode:`decimal`,post:e=>e,message:Jd().amountMessage,extract(e){let t=``,n=!1,r=0;for(let i of e)Bd.test(i)?n?r<2&&(t+=i,r++):t+=i:i===`.`&&!n&&(n=!0,t+=i);return t.startsWith(`.`)&&(t=`0${t}`),t.replace(/^0+(?=\d)/,``)},layout(e){let[t=``,n]=e.split(`.`),r=Kd(t)+(e.includes(`.`)?`.${n}`:``);return{text:r,isRaw:[...r].map(e=>e!==`,`)}},isValid:e=>/^\d+(\.\d{1,2})?$/.test(e)}}var Zd={"phone-in":()=>Yd(`99999 99999`,{normalize:Wd,valid:e=>/^[6-9]/.test(e),message:Jd().phoneInMessage}),pan:()=>Yd(`AAAAA9999A`,{upper:!0,valid:e=>/^[A-Z]{5}\d{4}[A-Z]$/.test(e),message:Jd().panMessage}),gstin:()=>Yd(`99AAAAA9999A***`,{upper:!0,valid:e=>/^\d{2}[A-Z]{5}\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/.test(e),message:Jd().gstinMessage}),aadhaar:()=>Yd(`9999 9999 9999`,{valid:e=>/^[2-9]/.test(e),message:Jd().aadhaarMessage}),ifsc:()=>Yd(`AAAA*******`,{upper:!0,valid:e=>/^[A-Z]{4}0[A-Z0-9]{6}$/.test(e),message:Jd().ifscMessage}),"pin-code":()=>Yd(`999999`,{valid:e=>/^[1-9]/.test(e),message:Jd().pinCodeMessage}),date:()=>Yd(`99-99-9999`,{normalize:qd,valid:Gd,post:(e,t)=>e.length===8&&Gd(e)?`${e.slice(4)}-${e.slice(2,4)}-${e.slice(0,2)}`:t,message:Jd().dateMessage}),amount:Xd},Qd=Object.keys(Zd),$d=e=>{let t=String(e).toLowerCase();return Object.hasOwn(Zd,t)?t:void 0},ef=e=>Hd.test(String(e))&&$d(e)===void 0,tf=new Map;Ke(()=>tf.clear());function nf(e){if(e==null||e===``)return null;let t=String(e),n=tf.get(t);return n===void 0&&(n=ef(t)?Yd(t):Object.hasOwn(Zd,t)?Zd[t]?.()??null:null,tf.set(t,n)),n}var rf=(e,t)=>e.normalize?e.normalize(t):t;function af(e,t){let n=nf(e);return n?n.extract(rf(n,String(t??``))):String(t??``)}function of(e,t){let n=nf(e);if(!n)return String(t??``);let r=n.extract(rf(n,String(t??``)));return n.post(r,n.layout(r).text)}function sf(e,t){let n=nf(e);return n?n.layout(n.extract(rf(n,String(t??``)))).text:String(t??``)}var cf=(e,t)=>{if(t<=0)return 0;let n=0;for(let r=0;r<e.length;r++)if(e[r]&&++n===t)return r+1;return e.length},lf=new WeakMap,uf=e=>lf.get(e)?.(),df=new WeakMap;function ff(e,t,n,r){let i=e.getAll(t),a=df.get(e)??new Set;df.set(e,a);let o=i.findIndex((e,r)=>e===n&&!a.has(`${t}\u0000${r}`));if(!(o<0)){if(a.add(`${t}\u0000${o}`),i[o]=r,i.length===1)e.set(t,r);else{e.delete(t);for(let n of i)e.append(t,n)}}}function pf(e){let t=null,n=null,r=!1,i=(t,n)=>{n===null?e.removeAttribute(t):n!==void 0&&e.setAttribute(t,n)},a,o,s=()=>{t?.remove(),t=null,n&&(n.hidden=!1),n=null,r&&e.classList.remove(`error`),r=!1,i(`aria-invalid`,a),i(`aria-describedby`,o),a=void 0,o=void 0};return i=>{if(!i){s();return}let c=e.closest(`.field`),l=c instanceof HTMLElement?c:null,u=l?.querySelector(`.field-error`);if(!(u&&u!==t&&u.textContent?.trim())){if(!t){if(r=!e.classList.contains(`error`),e.classList.add(`error`),a=e.getAttribute(`aria-invalid`),o=e.getAttribute(`aria-describedby`),l){t=document.createElement(`div`),t.className=`field-error`,e.id&&(t.id=`${e.id}-error`);let r=l.querySelector(`.field-hint`);n=r instanceof HTMLElement?r:null,n&&(n.hidden=!0),l.insertBefore(t,[...l.children].find(e=>e.classList.contains(`field-count`))??null),t.id&&e.setAttribute(`aria-describedby`,t.id)}e.setAttribute(`aria-invalid`,`true`)}t&&(t.textContent=i)}}}function mf(e,{mask:t,postFormatted:n=!1,onChange:r,onInvalidChange:i}={}){let a=nf(t);if(!a||!Ud.has(e.type))return()=>{};let o=Object.getPrototypeOf(e),s=Object.getOwnPropertyDescriptor(o,`value`);if(!s?.set)throw Error(`input value setter missing`);let c=s.set,l=!e.hasAttribute(`inputmode`);l&&e.setAttribute(`inputmode`,a.inputMode);let u=i??pf(e),d=null,f=!1,p=!1,m=!1,h=``,g=``,_,v=()=>{let e=m?h:``;e!==g&&(g=e,u(g))},y=(t,n,i)=>{let o=a.extract(t.slice(0,n)).length,s=a.extract(t),{text:l,isRaw:u}=a.layout(s);if(e.value!==l&&(c.call(e,l),document.activeElement===e&&Ud.has(e.type))){let t=cf(u,o);e.setSelectionRange(t,t)}e.dataset.maskRaw=s,h=s&&!a.isValid(s)?a.message:``,e.setCustomValidity(h),v(),i&&s!==d&&r?.(s,l),d=s},b=Object.getOwnPropertyDescriptor(e,`value`),x=b??s;Object.defineProperty(e,"value",{configurable:!0,...x.enumerable===void 0?{}:{enumerable:x.enumerable},get:()=>P(x.get,`input value getter missing`).call(e),set:t=>{if(P(x.set,`input value setter missing`).call(e,t),p)return;let n=rf(a,e.value);y(n,n.length,!0)}});let S=()=>{f=!0,e.dispatchEvent(new Event(`input`,{bubbles:!0})),f=!1},C=t=>{let n=t instanceof InputEvent?t:null;if(f||p||n?.isComposing)return;let r=n?.inputType===`insertText`&&(n.data?.length??0)<=1||n?.inputType?.startsWith(`delete`)?e.value:rf(a,e.value);y(r,e.selectionStart??r.length,!0)},w=()=>{p=!0},T=()=>{p=!1;let t=rf(a,e.value);y(t,e.selectionStart??t.length,!0),S()},E=t=>{let n=t.inputType===`deleteContentBackward`;if(!n&&t.inputType!==`deleteContentForward`||t.isComposing)return;let r=e.selectionStart;if(r==null||r!==e.selectionEnd)return;let{isRaw:i}=a.layout(a.extract(e.value)),o=n?r-1:r;for(;o>=0&&o<i.length&&!i[o];)o+=n?-1:1;o!==(n?r-1:r)&&(t.preventDefault(),o<0||o>=i.length||(y(e.value.slice(0,o)+e.value.slice(o+1),n?o:r,!0),S()))},D=t=>{if(e.readOnly||e.disabled)return;let n=t.clipboardData?.getData(`text`);if(n==null)return;t.preventDefault();let r=rf(a,n),i=e.selectionStart??e.value.length,o=e.selectionEnd??i;y(e.value.slice(0,i)+r+e.value.slice(o),i+r.length,!0),S()},O=()=>{let t=a.extract(e.value);return a.post(t,a.layout(t).text)},k=()=>{m=!0,v()};e.addEventListener(`input`,C),e.addEventListener(`beforeinput`,E),e.addEventListener(`paste`,D),e.addEventListener(`compositionstart`,w),e.addEventListener(`compositionend`,T),e.addEventListener(`blur`,k),e.addEventListener(`invalid`,k);let A=e.form,ee=t=>{e.name&&!e.disabled&&ff(t.formData,e.name,e.value,O())},te=()=>{clearTimeout(_),_=setTimeout(()=>{m=!1,y(rf(a,e.value),e.value.length,!0)},0)};n||(A?.addEventListener(`formdata`,ee),lf.set(e,O)),A?.addEventListener(`reset`,te),A?.addEventListener(`submit`,k);let ne=rf(a,e.value);return y(ne,ne.length,!1),()=>{clearTimeout(_),e.removeEventListener(`input`,C),e.removeEventListener(`beforeinput`,E),e.removeEventListener(`paste`,D),e.removeEventListener(`compositionstart`,w),e.removeEventListener(`compositionend`,T),e.removeEventListener(`blur`,k),e.removeEventListener(`invalid`,k),A?.removeEventListener(`formdata`,ee),A?.removeEventListener(`reset`,te),A?.removeEventListener(`submit`,k),lf.delete(e),b?Object.defineProperty(e,"value",b):Reflect.deleteProperty(e,`value`),m=!1,h=``,v(),e.setCustomValidity(``),delete e.dataset.maskRaw,l&&e.removeAttribute(`inputmode`)}}function hf(){let e=typeof window>`u`?void 0:window.jQuery?.validator?.prototype;if(!e||e.wuiMaskHook)return;let t=e.elementValue;e.elementValue=function(e){let n=uf(e);return n===void 0?t.call(this,e):n},e.wuiMaskHook=!0}var gf=new WeakMap,_f,vf=e=>{gf.has(e)||gf.set(e,mf(e,{mask:e.dataset.appMask,postFormatted:e.hasAttribute(`data-mask-post-formatted`)}))},yf=e=>[...e.querySelectorAll(`input[data-app-mask]`)].filter(e=>e instanceof HTMLInputElement),bf=e=>e instanceof Element?[...e instanceof HTMLInputElement&&e.matches(`input[data-app-mask]`)?[e]:[],...yf(e)]:[];function xf(){_f||typeof MutationObserver>`u`||(_f=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of bf(e))gf.get(t)?.(),gf.delete(t);for(let e of t.addedNodes)for(let t of bf(e))vf(t)}}),_f.observe(document.documentElement,{childList:!0,subtree:!0}))}function Sf(e=document){hf();for(let t of yf(e))vf(t);e===document&&xf()}var Cf=`data-wui-bulk-in-bar`,wf=`[data-wui-page-header-bar][data-wui-bulk-for]`,Tf=new WeakSet;function Ef(e){return`${En(e,{decimals:0})} selected`}function Df(e){let t=e.dataset.wuiBulkFor;return t===void 0?null:document.getElementById(t)}function Of(e){return typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`}function kf(e,t){return[...e.querySelectorAll(t)].flatMap(e=>e instanceof HTMLElement?[e]:[])}function Af(e,t){for(let n of kf(e,`[data-wui-bar-swap]`))n.hidden=t>0;let n=e.querySelector(`[data-wui-bar-bulk]`);if(!n)return;if(!(n instanceof HTMLElement))throw Error(`The bulk slot is not an HTML element.`);n.hidden=t===0;let r=n.querySelector(`.page-header-bar-bulk-count`);if(!(r instanceof HTMLElement))throw Error(`The bulk slot has no count element.`);r.textContent=t>0?Ef(t):``}function jf(e=document){for(let t of kf(e,wf))Df(t)?.setAttribute(Cf,``);Tf.has(document)||(Tf.add(document),document.addEventListener(`selectionchange`,e=>{if(!(e instanceof CustomEvent)||!Of(e.detail))return;let t=e.target;if(t!==null&&!(t instanceof Node))throw Error(`The selection changed on a target that is not a node.`);for(let n of kf(document,wf))Df(n)?.contains(t)&&Af(n,e.detail.selected)}))}var Mf={digitText:`At least one digit`,lengthText:`At least {minLength} characters long`,lowercaseText:`At least one lowercase letter`,requirementsTitle:`Password requirements`,specialText:`At least one special character`,uniqueCharsTextOne:`At least {n} unique character`,uniqueCharsTextOther:`At least {n} unique characters`,uppercaseText:`At least one uppercase letter`},Nf={minLength:10,uppercase:!0,lowercase:!0,digit:!0,special:!0,uniqueChars:0,customRules:[]},Pf=()=>L(`passwordRules`,Mf);function Ff(e){return e===!0||e==null?{...Nf}:{...Nf,...e}}function If(e){let t=Ff(e),n=[];if(t.minLength>0&&n.push({key:`length`,label:R(Pf().lengthText,{minLength:t.minLength}),test:e=>e.length>=t.minLength}),t.uppercase&&n.push({key:`uppercase`,label:Pf().uppercaseText,test:e=>/[A-Z]/.test(e)}),t.lowercase&&n.push({key:`lowercase`,label:Pf().lowercaseText,test:e=>/[a-z]/.test(e)}),t.digit&&n.push({key:`digit`,label:Pf().digitText,test:e=>/[0-9]/.test(e)}),t.special&&n.push({key:`special`,label:Pf().specialText,test:e=>/[^A-Za-z0-9]/.test(e)}),t.uniqueChars>0){let e=t.uniqueChars;n.push({key:`unique`,label:Je(Pf(),`uniqueCharsText`,e,{n:e}),test:t=>new Set(t).size>=e})}for(let[e,r]of(t.customRules??[]).entries()){let t=new RegExp(r.pattern);n.push({key:`custom-${e}`,label:r.label,test:e=>t.test(e)})}return n}function Lf(e,t){let n=e==null?``:String(e);return If(t).map(e=>({key:e.key,label:e.label,met:e.test(n)}))}function Rf(e,t){return Lf(e,t).every(e=>e.met)}var zf={moveLabel:`Move to`,moveText:`Move to {label}`},Bf=`wui:row-drop`,Vf=`is-drop-over`,Hf=`application/x-wui-rows`,Uf=`wui-row-dragging`,Wf=`[data-wui-drop-target]`,Gf=`tbody tr[data-row-key]`,Kf=`input, button, a, select, textarea, label`,qf=`.wui-select-cell .wui-check`,Jf=new WeakMap,Yf=new WeakSet,Xf=null,Zf=null;function Qf(e){let t=e.querySelector(qf);return t instanceof HTMLInputElement&&t.checked}function $f(e){let t=[];for(let n of e.querySelectorAll(`tbody tr`))n instanceof HTMLElement&&Qf(n)&&t.push(n.dataset.rowKey);return t}function ep(e,t){return F(e,t)}function tp(e,t){let n=ep(e,t);return n instanceof HTMLElement?n:null}function np(e){let t=e.textContent;if(t===null)throw Error(`A drop target has no text content.`);return t.trim()}var rp=e=>typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`;function ip(){Xf=null,document.body.classList.remove(Uf);for(let e of document.querySelectorAll(`${Wf}.${Vf}`))e.classList.remove(Vf)}function ap(e,t,n){e.dispatchEvent(new CustomEvent(Bf,{bubbles:!0,detail:{keys:t,target:n.dataset.wuiDropTarget}}))}function op(e){let t=tp(e.target,Wf);if(!t||!Xf)return;e.preventDefault();let n=P(e.dataTransfer,`A drag event arrived without its DataTransfer.`);n.dropEffect=`move`,t.classList.add(Vf)}function sp(e){let t=tp(e.target,Wf);!t||e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||t.classList.remove(Vf)}function cp(e){let t=tp(e.target,Wf);if(!t||!Xf)return;e.preventDefault(),t.classList.remove(Vf);let{root:n,keys:r}=Xf;ap(n,r,t),ip()}function lp(e){let t=tp(e.target,Wf);t&&Zf?.keys.length&&(e.preventDefault(),ap(Zf.root,Zf.keys,t))}function up(e){(Pr(e)||e.key===` `)&&lp(e)}function dp(e){Yf.has(e)||(Yf.add(e),e.addEventListener(`dragover`,op),e.addEventListener(`dragenter`,op),e.addEventListener(`dragleave`,sp),e.addEventListener(`drop`,cp),e.addEventListener(`click`,lp),e.addEventListener(`keydown`,up))}function fp(e){let t=Jf.get(e);if(t)return t;dp(e.ownerDocument||e);let n=t=>{let n=tp(t.target,Gf);if(!n||!e.contains(n))return;let r=ep(t.target,Kf);r&&n.contains(r)||(n.draggable=!0)},r=t=>{let n=tp(t.target,Gf);if(!n||!e.contains(n))return;let r=Qf(n)?$f(e):[n.dataset.rowKey],i=P(t.dataTransfer,`A drag event arrived without its DataTransfer.`);i.setData(Hf,JSON.stringify(r)),i.setData(`text/plain`,r.join(`,`)),i.effectAllowed=`move`,Xf={root:e,keys:r},document.body.classList.add(Uf)},i=t=>{let n=t instanceof CustomEvent?t.detail:void 0;if(rp(n)){let{keys:t}=n;n.selected>0?Zf={root:e,keys:Array.isArray(t)?t:$f(e)}:n.selected===0&&(Zf=null)}mp(document)};e.addEventListener(`pointerdown`,n),e.addEventListener(`dragstart`,r),e.addEventListener(`dragend`,ip),e.addEventListener(`selectionchange`,i);let a=()=>{e.removeEventListener(`pointerdown`,n),e.removeEventListener(`dragstart`,r),e.removeEventListener(`dragend`,ip),e.removeEventListener(`selectionchange`,i),Jf.delete(e)};return Jf.set(e,a),a}var pp=()=>L(`rowDrop`,zf);function mp(e=document){let t=e.querySelector(`[data-wui-row-drag] tbody tr ${qf}:checked`)!==null;for(let n of e.querySelectorAll(Wf)){n.tagName!==`BUTTON`&&(n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`)),t?n.removeAttribute(`aria-disabled`):n.setAttribute(`aria-disabled`,`true`);let e=n.getAttribute(`data-wui-drop-label`)||np(n);n.setAttribute(`aria-label`,R(pp().moveText,{label:e}))}for(let t of e.querySelectorAll(`.wui-drop-tray`))t.hasAttribute(`role`)||(t.setAttribute(`role`,`toolbar`),t.setAttribute(`aria-label`,pp().moveLabel))}function hp(e=document){for(let t of e.querySelectorAll(`[data-wui-row-drag]`))t instanceof HTMLElement&&fp(t);mp(e.ownerDocument||e)}var gp=`.table-wrap, .table-responsive, [class*="table-responsive-"]`,_p=1;function vp(e){let t=()=>{let t=e.scrollWidth-e.clientWidth,n=Math.abs(e.scrollLeft);e.toggleAttribute(`data-wui-overflow-start`,t>_p&&n>_p),e.toggleAttribute(`data-wui-overflow-end`,t>_p&&n<t-_p),e.toggleAttribute(`data-wui-overflow-top`,e.scrollTop>_p)},n=()=>{if(e.scrollWidth-e.clientWidth>_p){let t=getComputedStyle(e);e.style.setProperty(`--wui-scroll-pad-start`,t.paddingInlineStart),e.style.setProperty(`--wui-scroll-pad-end`,t.paddingInlineEnd)}else e.style.getPropertyValue(`--wui-scroll-pad-end`)&&(e.style.removeProperty(`--wui-scroll-pad-start`),e.style.removeProperty(`--wui-scroll-pad-end`))},r=()=>{n(),t()};e.addEventListener(`scroll`,t,{passive:!0});let i=null;if(typeof ResizeObserver<`u`){i=new ResizeObserver(r),i.observe(e);for(let t of e.children)i.observe(t)}return r(),()=>{e.removeEventListener(`scroll`,t),i?.disconnect(),e.removeAttribute(`data-wui-overflow-start`),e.removeAttribute(`data-wui-overflow-end`),e.removeAttribute(`data-wui-overflow-top`),e.style.getPropertyValue(`--wui-scroll-pad-end`)&&(e.style.removeProperty(`--wui-scroll-pad-start`),e.style.removeProperty(`--wui-scroll-pad-end`))}}var yp=new WeakMap,bp,xp=e=>{yp.has(e)||yp.set(e,vp(e))},Sp=e=>{if(!(e instanceof HTMLElement))return[];let t=e.matches(`.table-wrap, .table-responsive, [class*="table-responsive-"]`)?[e]:[];if(e.firstElementChild===null)return t;let n=[...e.querySelectorAll(gp)].filter(e=>e instanceof HTMLElement);return[...t,...n]};function Cp(){bp||typeof MutationObserver>`u`||(bp=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Sp(e))yp.get(t)?.(),yp.delete(t);for(let e of t.addedNodes)for(let t of Sp(e))xp(t)}}),bp.observe(document.documentElement,{childList:!0,subtree:!0}))}function wp(e=document){for(let t of e.querySelectorAll(gp))t instanceof HTMLElement&&xp(t);e===document&&Cp()}var Tp={leaveLabel:`Leave`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,title:`Leave without saving?`},Ep={cancelLabel:`Cancel`,confirmLabel:`Confirm`,confirmTitle:`Are you sure?`,failedMessage:`That did not work. Try again.`,forbiddenMessage:`You do not have permission to do that.`,networkMessage:`Could not reach the server. Check your connection and try again.`,timeoutMessage:`The server did not answer in time. Check your connection and try again.`,typePhraseLabel:`Type {phrase} to confirm`},Dp={backLabel:`Back`,clientMessage:`It may have been moved or deleted.`,closeLabel:`Close`,errorTitle:`This could not be loaded`,forbiddenMessage:`You do not have access to this.`,invalidMessage:`Some fields need attention.`,loadingLabel:`Loading`,networkMessage:`Could not reach the server. Check your connection and try again.`,retryLabel:`Try again`,serverMessage:`Something went wrong on our side. Try again in a moment.`,submitFailedMessage:`Your changes were not saved.`,timeoutMessage:`The server did not answer in time. Check your connection and try again.`},Op={closeLabel:`Close`,error:`Error`,failedText:`That did not work. Try again.`,loading:`Loading...`,moreText:`more`,success:`Done`},kp=Object.freeze([`page`,`pageSize`,`sortBy`,`sortOrder`,`search`]),Ap=`search`,J=()=>L(`dataTable`,Un),jp=5,Mp=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,Np=e=>e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled,Pp=e=>Mp(e)&&`type`in e&&e.type===`hidden`,Y=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n),X=(e,t,n)=>{let r=e.querySelector(t);return r instanceof n?r:null},Fp=(e,t,n)=>{let r=e.closest(t);return r instanceof n?r:null},Ip=e=>e.localName===`wui-select`,Lp=new WeakMap,Rp=(e,t)=>{let n=Number(e);return Number.isInteger(n)?n:t},zp=e=>({total:Rp(e.dataset.total,0),totalCapped:e.dataset.totalCapped===`true`,page:Rp(e.dataset.page,1),pageSize:Rp(e.dataset.pageSize,0),sortBy:e.dataset.sortBy||``,sortOrder:e.dataset.sortOrder===`desc`?`desc`:`asc`,pending:e.dataset.totalPending===`true`,rowCount:Rp(e.dataset.rowCount,0)}),Bp=(e,t)=>{e&&$p().toast(e,{variant:t})},Vp=(e,t)=>{if(!e)return;let n=new Set([...e.elements].filter(e=>!Pp(e)||e.hasAttribute(`data-range-mirror`)).map(e=>e.getAttribute(`name`)).filter(e=>e&&!kp.includes(e))),r=[...t].some(([e,t])=>t!==``&&n.has(e));for(let t of Y(e,`[data-wui-filter-clear]`,HTMLElement))t.hidden=!r},Hp=new Intl.NumberFormat(`en-IN`),Up=(e,t)=>t?`${Hp.format(e)}+`:Hp.format(e),Wp=(e,t,n)=>{let r=e.closest(`.wui-list-card`),i=r?X(r,`.wui-list-card-count`,HTMLElement):null;i&&(i.textContent=Up(t,n))};function Gp(e=document){let t=Y(e,`[data-wui-server]`,HTMLElement);e instanceof HTMLElement&&e.matches(`[data-wui-server]`)&&t.unshift(e);for(let e of t){if(Lp.has(e))continue;let t=qp(e);Lp.set(e,t),e.hasAttribute(`data-load-first-page`)&&t.reload()}}function Kp(e){let t=e instanceof Element?Fp(e,`[data-wui-server]`,HTMLElement):null;return t&&Lp.get(t)||null}function qp(e){let t=X(e,`.table-wrap`,HTMLElement),n=t?X(t,`:scope > table`,HTMLTableElement):null,r=e.dataset.src;if(!t||!n||!r)throw Error(`A server-paged table needs data-src and a .table-wrap > table: render it with <app-data-table src>.`);let i=X(t,`:scope > [data-wui-table-state]`,HTMLElement),a=X(e,`[data-wui-table-pager]`,HTMLElement),o=X(e,`[data-wui-table-status]`,HTMLElement),s={urlState:e.dataset.urlState!==`false`,refreshOnSuccess:e.dataset.refreshOnSuccess!==`false`,filtersForm:e.dataset.filtersForm||null,filtersRegion:e.dataset.filtersRegion||null,searchInput:e.dataset.searchInput||null,loadingText:e.dataset.loadingText||J().loadingText,errorText:e.dataset.errorText||J().errorText,timeoutMs:Ta(e.getAttribute(`data-wui-timeout`))??3e4},c=new URL(r,window.location.href),l=e.dataset.totalSrc||null,u=l===null?null:new URL(l,window.location.href),d=new Set([...c.searchParams.keys(),...u?.searchParams.keys()??[]]),f=n.hasAttribute(`data-app-datatable-selectable`),p=new Set,m=!1,h=Da(),g=new AbortController,_={signal:g.signal},v=P(X(n,`:scope > tbody[data-wui-rows]`,HTMLTableSectionElement),`A server-paged table needs its rows in <app-table-rows> (tbody[data-wui-rows]).`),y=zp(v),b=null,x=null,S=e=>{let t=new URLSearchParams;for(let[n,r]of new URLSearchParams(e))d.has(n)||t.append(n,r);return t},C=e=>S(new URL(e,window.location.href).search),w=e=>{let t=e.toString();return`${window.location.pathname}${t?`?${t}`:``}${window.location.hash}`},T=(e,t)=>{let n=new URL(e.href);for(let[e,r]of t)d.has(e)||n.searchParams.append(e,r);return n.origin===window.location.origin?`${n.pathname}${n.search}`:n.href},E=e=>T(c,e),D=(e,t)=>{let n=new URLSearchParams(e);return n.has(`page`)&&n.set(`page`,String(t.page)),n.has(`pageSize`)&&n.set(`pageSize`,String(t.pageSize)),n.has(`sortBy`)?t.sortBy?(n.set(`sortBy`,t.sortBy),n.set(`sortOrder`,t.sortOrder)):(n.delete(`sortBy`),n.delete(`sortOrder`)):n.delete(`sortOrder`),n},O=D(s.urlState?S(window.location.search):new URLSearchParams,y);s.urlState&&w(O)!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&window.history.replaceState(window.history.state,``,w(O));let k=(e,n)=>t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:n})),A=e=>{o&&(o.textContent=e)},ee=e=>{if(e.pending)return e.rowCount===0?J().emptyLabel:R(J().pageTextPending,{page:e.page});if(e.total===0)return J().emptyLabel;let t=e.pageSize>0?Math.max(1,Math.ceil(e.total/e.pageSize)):1,n=e.totalCapped?Up(e.total,!0):`${e.total}`;return R(e.total===1?J().pageTextOne:J().pageTextOther,{page:e.page,pages:t,total:n})},te=()=>Y(n,`:scope > thead > tr:first-child > th`,HTMLTableCellElement),ne=e=>{if(f&&Y(e,`:scope > tr:not(.wui-group-row, .wui-virtual-spacer)`,HTMLTableRowElement).some(e=>!e.dataset.rowKey))throw Error(`A selectable server-paged table needs data-row-key on every row, so a selection can span pages.`)},re=t=>{let n=e.dataset.activeRowKey;if(n!==void 0)for(let e of t){let t=e.classList.contains(`wui-row-active`),r=n!==``&&e.dataset.rowKey===n;e.classList.toggle(`wui-row-active`,r),r?e.setAttribute(`aria-current`,`true`):t&&e.removeAttribute(`aria-current`)}},ie=e=>{if(f){ou(e);for(let t of e){let e=X(t,`.${q} .wui-check:not(:disabled)`,HTMLInputElement);e&&(m&&p.add(t.dataset.rowKey),e.checked=p.has(t.dataset.rowKey))}cu(n)}re(e);let t=te();if(n.classList.contains(`wui-table-stack`))for(let n of e)[...n.cells].forEach((e,n)=>{let r=t[n]?.textContent?.trim();r&&!e.hasAttribute(`data-label`)&&e.setAttribute(`data-label`,r)});t.forEach((t,n)=>{if(t.classList.contains(`wui-col-hidden`))for(let t of e)t.cells[n]?.classList.add(`wui-col-hidden`)})},ae=e=>ie(Y(e,`:scope > tr`,HTMLTableRowElement)),oe=e=>{for(let t of e.querySelectorAll(`:scope > template[data-wui-pager], :scope > template[data-wui-empty], :scope > template[data-wui-filters]`))t.remove()},se=e=>e?.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0})),ce=(e,t)=>{if(!i)return;let n=X(e,`:scope > template[data-wui-empty]`,HTMLTemplateElement);se(i),(t.pending?t.rowCount:t.total)===0&&n?(i.replaceChildren(n.content.cloneNode(!0)),i.hidden=!1):(i.replaceChildren(),i.hidden=!0)},le=e=>{a&&(se(a),a.replaceChildren(...e?[e.content.cloneNode(!0)]:[]),a.hidden=!1)},ue=e=>{let t=s.filtersRegion&&e?X(document,s.filtersRegion,HTMLElement):null;return t&&e&&(se(t),t.replaceChildren(e.content.cloneNode(!0))),t},de=0,fe=e=>{let r=zp(e);r.pending&&Object.assign(r,{total:y.total,totalCapped:y.totalCapped});let i=r.sortBy!==y.sortBy||r.sortOrder!==y.sortOrder?Sr(v.rows):null;le(X(e,`:scope > template[data-wui-pager]`,HTMLTemplateElement)),ce(e,r);let a=ue(X(e,`:scope > template[data-wui-filters]`,HTMLTemplateElement));oe(e),se(v),n.replaceChild(e,v),v=e,de+=1;let o=m&&r.total!==y.total;return y=r,o&&(m=!1),t.removeAttribute(`data-wui-table-error`),ae(e),Ce(),Cr(e.rows,i),o&&Te(),a},pe=e=>{let t=X(Kl(`<table>${e}</table>`),`tbody[data-wui-rows]`,HTMLTableSectionElement);return t&&ne(t),t?document.importNode(t,!0):null},me=(e,t=te())=>{let n=document.createElement(`tr`);for(let r=0;r<e;r++){let e=t[r],i=e?.classList.contains(`text-center`),a=!i&&(e?.classList.contains(`num`)||e?.classList.contains(`text-end`)||e?.classList.contains(`wui-cell-end`)),o=document.createElement(`td`);i?o.classList.add(`text-center`):a&&o.classList.add(e?.classList.contains(`num`)?`num`:`wui-cell-end`);let s=document.createElement(`span`);s.className=`skeleton`,s.setAttribute(`aria-hidden`,`true`);let c=i?44:a?56:60;s.style.cssText=`display:block;width:${c}%;height:12px;border-radius:6px`,o.append(s),n.append(o)}return n},he=()=>{if(v.querySelector(`:scope > tr:not([data-wui-skeleton])`))return;let e=Math.max(1,te().length);v.replaceChildren(...Array.from({length:jp},()=>{let t=me(e);return t.setAttribute(`data-wui-skeleton`,``),t})),t.removeAttribute(`data-wui-table-error`),i&&(i.hidden=!0)},ge=e=>{e?(t.setAttribute(`aria-busy`,`true`),he()):t.removeAttribute(`aria-busy`)},_e=e=>e===`forbidden`?J().forbiddenMessage:e===`network`?J().networkMessage:e===`timeout`?J().timeoutMessage:s.errorText,ve=e=>{let n=_e(e);if(t.setAttribute(`data-wui-table-error`,e),a&&(a.hidden=!0),i){let t=document.createElement(`div`);t.className=`empty-state wui-empty-state-table wui-table-error`,t.setAttribute(`role`,`alert`);let r=document.createElement(`span`);r.className=`empty-state-icon`;let a=_s(e===`forbidden`?`lock`:`alert-circle`,{size:24});a&&r.replaceChildren(a);let o=document.createElement(`div`);o.className=`empty-state-title`,o.textContent=n;let s=document.createElement(`div`);s.className=`empty-state-action`;let c=document.createElement(`button`);c.type=`button`,c.className=nl(`primary`,`outline`,`sm`),c.dataset.wui=Qc,c.setAttribute(`data-wui-table-retry`,``),c.textContent=J().retryLabel,s.append(c),t.append(r,o,s),se(i),i.replaceChildren(t),i.hidden=!1}A(n)},ye=()=>s.filtersForm?X(document,s.filtersForm,HTMLFormElement):null,j=async(n,r=`none`,{quiet:i=!1}={})=>{let a=new URLSearchParams(n);i||(b={query:a,mode:r},ge(!0),A(s.loadingText)),k(`wui:table:loading`,{query:a.toString()});let o=await h.run(E(a),{timeoutMs:s.timeoutMs});if(o.kind===`aborted`||o.kind===`stale`||o.kind===`session`)return o;i||ge(!1);let c=null;if(o.ok)try{c=pe(o.html)}catch(e){V(e)}if(!o.ok||!c){let e=o.ok?`server`:o.kind;return i?Hr(`A quiet server table refresh failed; the rows on screen are kept.`,e):ve(e),k(`wui:table:error`,{status:o.status,kind:e,message:_e(e)}),o}let l=fe(c);return O=D(a,y),Vp(ye(),O),s.urlState&&r===`push`?window.history.pushState(window.history.state,``,w(O)):s.urlState&&r===`replace`&&window.history.replaceState(window.history.state,``,w(O)),i||A(ee(y)),$p().refresh(t),l&&$p().refresh(l),y.pending?xe():Wp(e,y.total,y.totalCapped),k(`wui:table:loaded`,{...y,query:O.toString()}),o},be=e=>(e.delete(`page`),e),xe=()=>{if(!u||!y.pending)return;let t=de;W(T(u,O),{timeoutMs:s.timeoutMs}).then(n=>{if(t!==de)return;if(!n.ok){Hr(`[@webority/ui-elements] A server table's total did not load; its pager keeps Previous and Next.`,n.kind);return}let r=X(Kl(n.html),`div[data-wui-total]`,HTMLElement);if(!r){Hr(`[@webority/ui-elements] A server table's count answer has no div[data-wui-total]; its pager keeps Previous and Next.`);return}if(Rp(r.dataset.page,-1)!==y.page||Rp(r.dataset.pageSize,-1)!==y.pageSize)return;let i=Rp(r.dataset.total,-1);if(i<0){Hr(`[@webority/ui-elements] A server table's count answer has no whole data-total; its pager keeps Previous and Next.`);return}let a=r.dataset.totalCapped===`true`,o=m&&i!==y.total;y={...y,total:i,totalCapped:a,pending:!1},o&&(m=!1);let s=X(r,`:scope > template[data-wui-pager]`,HTMLTemplateElement);s&&le(s);let c=ue(X(r,`:scope > template[data-wui-filters]`,HTMLTemplateElement));c&&$p().refresh(c),Wp(e,y.total,y.totalCapped),A(ee(y)),o&&Te(),k(`wui:table:total`,{total:i,totalCapped:a})})},Se=()=>Y(n,`:scope > thead th[data-sort-key]`,HTMLTableCellElement),Ce=()=>{for(let e of Se()){let t=e.dataset.sortKey===y.sortBy;e.setAttribute(`aria-sort`,t?y.sortOrder===`desc`?`descending`:`ascending`:`none`)}};for(let e of Se())if(e.classList.add(`sortable`),e.tabIndex=0,!e.querySelector(`.sort-icon`)){let t=e.classList.contains(`num`)||e.classList.contains(`text-end`),n=document.createElement(`span`);n.className=t?`sort-icon wui-sort-lead`:`sort-icon`;let r=_s(`chevrons-up-down`,{size:14});r&&n.replaceChildren(r),t?e.prepend(n):e.append(n)}let we=e=>{let t=be(new URLSearchParams(O)),n=y.sortBy===e&&y.sortOrder===`asc`?`desc`:`asc`;return t.set(`sortBy`,e),t.set(`sortOrder`,n),j(t,`push`)};n.addEventListener(`click`,e=>{let t=e.target instanceof Element?Fp(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&we(t.dataset.sortKey??``)}),n.addEventListener(`keydown`,e=>{if(e.key!==`Enter`&&e.key!==` `)return;let t=e.target instanceof Element?Fp(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&(e.preventDefault(),we(t.dataset.sortKey??``))});let Te=()=>{cu(n);let e=m?{selected:y.total,total:y.total,allMatching:m}:{selected:p.size,total:y.total};n.dispatchEvent(new CustomEvent(`selectionchange`,{bubbles:!0,detail:e}))};f&&(uu(n,(e,t)=>{for(let n of e){let e=Fp(n,`tr`,HTMLTableRowElement)?.dataset.rowKey;e&&(t?p.add(e):p.delete(e))}t||(m=!1)}),n.addEventListener(`change`,e=>{let t=e.target;if(t instanceof HTMLInputElement&&t.matches(`.wui-select-cell .wui-check:not(:disabled)`)){if(t.checked||(m=!1),n.tHead?.contains(t))for(let e of Y(v,`:scope > tr`,HTMLTableRowElement)){let n=X(e,`.${q} .wui-check:not(:disabled)`,HTMLInputElement);n&&(n.checked=t.checked,t.checked?p.add(e.dataset.rowKey):p.delete(e.dataset.rowKey))}else{let e=Fp(t,`tr`,HTMLTableRowElement)?.dataset.rowKey;if(!e)return;t.checked?p.add(e):p.delete(e)}Te()}})),a&&(a.addEventListener(`click`,e=>{let t=e.target instanceof Element?Fp(e.target,`a[href]`,HTMLAnchorElement):null;!t||e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(e.preventDefault(),j(C(t.getAttribute(`href`)??``),`push`))}),a.addEventListener(`change`,e=>{let t=e.target;t instanceof HTMLSelectElement&&t.classList.contains(`tpg-select`)&&t.value&&(e.stopPropagation(),j(C(t.value),`push`))}));let Ee=()=>{if(!s.searchInput)return null;let e=X(document,s.searchInput,HTMLElement);return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e:e?X(e,`input`,HTMLInputElement):null},De=()=>e.isConnected?!0:(g.abort(),clearTimeout(x??void 0),!1),Oe=(e,t)=>{let n=[...e.elements].filter(Mp),r=new Set;for(let e of n)e.name&&!Pp(e)&&r.add(e.name);let i=[];for(let e of n)if(e.name&&!Np(e)){if(e instanceof HTMLInputElement&&e.matches(`input[type="hidden"][data-wui-carried]`))r.has(e.name)||i.push([e.name,e.value]);else if(e instanceof HTMLInputElement&&e.matches(`input[type=checkbox], input[type=radio]`))e.checked&&i.push([e.name,e.value]);else if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)e.matches(`[type=submit], [type=button], [type=reset], [type=image], [type=file]`)||i.push([e.name,e.value]);else if(e instanceof HTMLSelectElement)for(let t of e.selectedOptions)i.push([e.name,t.value])}return(t instanceof HTMLButtonElement||t instanceof HTMLInputElement)&&t.name&&!t.disabled&&i.push([t.name,t.value]),i},M=(e,t)=>{let n=new Set([...e.elements].filter(Mp).map(e=>e.name).filter(Boolean)),r=new URLSearchParams,i=e=>e!==`search`&&kp.includes(e);for(let[e,t]of O)e!==`page`&&(i(e)||!n.has(e))&&r.append(e,t);for(let[n,a]of Oe(e,t))a===``||i(n)||d.has(n)||r.append(n,a);let a=Ee();if(a){r.delete(Ap);let e=a.value.trim();e&&r.set(Ap,e)}return j(r,`push`)},N=e=>s.filtersForm&&e.closest?.(s.filtersForm)||s.filtersRegion&&e.closest?.(s.filtersRegion)||null;document.addEventListener(`submit`,e=>{De()&&s.filtersForm&&e.target instanceof HTMLFormElement&&e.target.matches(s.filtersForm)&&(e.preventDefault(),M(e.target,e.submitter))},_),document.addEventListener(`change`,e=>{if(!De()||!s.filtersForm||!(e.target instanceof Element))return;let t=Fp(e.target,s.filtersForm,HTMLFormElement);!t||e.target===Ee()||t.hasAttribute(`data-wui-apply-on-change`)||e.target.closest(`wui-filter-popover`)||M(t)},_);let ke=(e,t)=>{if(!e)return;let n=e=>t.get(e)??``;for(let r of Y(e,`input[name]:not([type=hidden])`,HTMLInputElement))if(r.type===`checkbox`)r.checked=t.getAll(r.name).includes(r.value);else if(r.type===`radio`){let e=n(r.name)===r.value;if(r.checked===e)continue;r.checked=e,e&&r.dispatchEvent(new Event(`change`))}else r.value!==n(r.name)&&(r.value=n(r.name),r.dispatchEvent(new Event(`input`,{bubbles:!0})));for(let r of Y(e,`select[name]`,HTMLSelectElement))if(!r.multiple)r.value=n(r.name);else for(let e of r.options)e.selected=t.getAll(r.name).includes(e.value);for(let r of[...e.querySelectorAll(`wui-select[name]`)].filter(Ip)){let e=r.getAttribute(`name`)??``;r.value=r.mode===`multiple`||r.mode===`tag`?t.getAll(e):n(e)}for(let t of e.querySelectorAll(`wui-date-range`)){let e=t.getAttribute(`start-name`)||t.getAttribute(`name`),r=t.getAttribute(`end-name`);t.value={start:e?n(e):``,end:r?n(r):``}}};document.addEventListener(`click`,e=>{if(!De())return;let t=e.target instanceof Element?Fp(e.target,`a[href]`,HTMLAnchorElement):null;if(!t||!N(t)||e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return;let n=new URL(t.getAttribute(`href`)??``,window.location.href);if(n.origin!==window.location.origin||n.pathname!==window.location.pathname)return;e.preventDefault();let r=be(C(n.href));ke(t.closest(`form`),r),Vp(t.closest(`form`),r),j(r,`push`)},_),document.addEventListener(`input`,e=>{if(!De())return;let t=Ee();t&&e.target===t&&(clearTimeout(x??void 0),x=setTimeout(()=>{if(!De())return;let e=be(new URLSearchParams(O)),n=t.value.trim();n?e.set(Ap,n):e.delete(Ap),e.toString()!==O.toString()&&j(e,`replace`)},300))},_),s.urlState&&window.addEventListener(`popstate`,()=>{if(!De())return;let e=S(window.location.search),t=Ee();t&&(t.value=e.get(`search`)??``),Vp(ye(),e),j(e,`none`)},_),document.addEventListener(`wui:modal:success`,()=>{De()&&s.refreshOnSuccess&&j(O,`none`)},_),i?.addEventListener(`click`,e=>{e.target instanceof Element&&e.target.closest(`[data-wui-table-retry]`)&&b&&j(b.query,b.mode)});let Ae=e=>[...v.rows].find(t=>t.dataset.rowKey===e)??null,je=e=>{if(!e?.trim())return null;let t=Kl(`<table><tbody>${e}</tbody></table>`);if(t.querySelector(`tbody[data-wui-rows]`))return null;let n=Y(t,`table > tbody > tr[data-row-key]`,HTMLTableRowElement);return n.length?n.map(e=>document.importNode(e,!0)):null},Me=(e,n,r)=>{let i=r?e[0]:e.find(e=>e.dataset.rowKey===n.dataset.rowKey);if(!i)return null;let a=[];for(let t of e){let e=t===i?n:Ae(t.dataset.rowKey);e&&(se(e),e.replaceWith(t),a.push(t))}return ie(a),$p().refresh(t),i},Ne=e=>e.message||(e.kind===`forbidden`?J().actionForbiddenMessage:J().actionFailedMessage),Pe=e=>{e?.isConnected&&e.getAttribute(`data-wui-save-state`)===`saving`&&Ar(e,null)},Fe=async({url:e,method:n=`POST`,body:r,key:a,row:o}={})=>{if(!e)throw Error("saveRow needs `url`: the handler that saves the row.");let s=a==null,c=s?null:Ae(String(a));if(!s&&!c)throw Error(`saveRow found no row with data-row-key="${a}" on this page.`);let l=te().filter(e=>!e.classList.contains(q)),u=o===void 0?c??me(Math.max(1,l.length),l):Ie(o,HTMLTableRowElement,"saveRow's `row` is required to be a row element: the <tr> as it will read, not its HTML.");c&&u!==c?c.replaceWith(u):c||v.insertBefore(u,v.firstChild),u!==c&&ie([u]),i&&!t.hasAttribute(`data-wui-table-error`)&&(i.hidden=!0),Ar(u,`saving`);let d=kr(u),f=await W(e,{method:n.toUpperCase(),body:r});if(f.kind===`session`)return!1;if(f.ok){let e=je(f.html),t=e&&u.isConnected?Me(e,u,s):null;return t?A(nr(kr(t)||d)):(await j(O,`none`),Pe(u)),em(f,f.toastVariant||`success`),k(`wui:table:saved`,{key:t?.dataset.rowKey??(s?null:String(a)),added:s,status:f.status}),!0}let p=Ne(f),m=u;return c&&u!==c&&u.isConnected?(u.replaceWith(c),m=c):s&&!o&&(u.remove(),m=null,i?.childElementCount&&!v.querySelector(`:scope > tr`)&&(i.hidden=!1)),m?.isConnected&&Ar(m,`error`,p),f.kind!==`aborted`&&Bp(p,`danger`),A(ir(d,p)),k(`wui:table:failed`,{key:s?null:String(a),added:s,status:f.status,kind:f.kind,message:p}),!1},F=async e=>{let t=e.dataset.url;if(!t)throw Error(`A data-wui-row-action button needs data-url: the handler the action posts to.`);let n=Fp(e,`tr`,HTMLTableRowElement),r=n?.dataset.rowKey??null,i=e.dataset.wuiRowAction||``,a=n?kr(n):``;e.disabled=!0,e.setAttribute(`aria-busy`,`true`),n&&Ar(n,`saving`);let o=await W(t,{method:(e.dataset.method||`post`).toUpperCase()});if(e.disabled=!1,e.removeAttribute(`aria-busy`),o.kind===`session`||o.kind===`aborted`)Pe(n);else{if(o.ok){em(o,o.toastVariant||`success`);let e=n?.isConnected?je(o.html):null,t=e&&n?Me(e,n,!1):null;t?A(nr(kr(t)||a)):(await j(O,`none`),Pe(n))}else{let e=Ne(o);Bp(e,`danger`),n?.isConnected&&Ar(n,`error`,e),A(ir(a,e))}k(`wui:table:action`,{action:i,key:r,ok:o.ok,status:o.status})}};return n.addEventListener(`click`,e=>{let t=e.target instanceof Element?Fp(e.target,`[data-wui-row-action]`,HTMLButtonElement):null;t&&v.contains(t)&&!t.disabled&&(e.preventDefault(),F(t))}),ne(v),oe(v),f&&su(n),ae(v),Ce(),y.pending&&(A(ee(y)),xe()),{el:e,reload:async e=>{let n=e?.quiet===!0;return n&&t.getAttribute(`aria-busy`)===`true`?null:j(O,`none`,{quiet:n})},query:()=>new URLSearchParams(O),setQuery:e=>{let t=new URLSearchParams(O);for(let[n,r]of Object.entries(e??{})){t.delete(n);for(let e of Array.isArray(r)?r:[r])e!=null&&e!==``&&t.append(n,String(e))}return e&&`page`in e||t.delete(`page`),j(t,`push`)},saveRow:Fe,setActiveRow:t=>{e.dataset.activeRowKey=t==null?``:String(t),re(Y(v,`:scope > tr`,HTMLTableRowElement))},selection:{keys:()=>[...p],count:()=>m?y.total:p.size,allMatching:()=>m,selectAllMatching:()=>{if(y.pending)Hr(`[@webority/ui-elements] select all matching needs the total; the table is still waiting for its count.`);else{m=!0;for(let e of Y(v,`:scope > tr`,HTMLTableRowElement)){let t=X(e,`.${q} .wui-check`,HTMLInputElement);t?.disabled||(t&&(t.checked=!0),e.dataset.rowKey&&p.add(e.dataset.rowKey))}Te()}},clear:()=>{m=!1,p.clear();for(let e of Y(v,`:scope > tr > .${q} .wui-check:not(:disabled)`,HTMLInputElement))e.checked=!1;Te()}}}}var Jp=8e3,Yp=()=>L(`toast`,Op),Xp=[`success`,`info`,`warning`,`danger`],Zp=e=>Xp.some(t=>t===e);function Qp(e){if(!Zp(e))throw RangeError(`Unknown toast variant "${e}".`);return e}function $p(){return P(window.WUI,`window.WUI is not defined: the Razor behaviour script did not load on this page.`)}function em(e,t=`success`){if(!e?.message)return;let n=e.toastAction;n?$p().toast(e.message,{variant:Qp(t),duration:Jp,action:{label:n.label,onClick:()=>tm(n)}}):$p().toast(e.message,{variant:Qp(t)})}async function tm(e){let t=await W(e.url,{method:e.method});if(t.kind!==`session`&&t.kind!==`aborted`){if(t.ok){em(t,t.toastVariant||`success`);for(let e of document.querySelectorAll(`[data-wui-server]`))e instanceof HTMLElement&&e.dataset.refreshOnSuccess!==`false`&&Kp(e)?.reload()}else $p().toast(t.message||Yp().failedText,{variant:`danger`})}}var nm=`wui-remote-modal`,rm=`wui-remote-drawer`,im=Object.freeze({sm:360,md:480,lg:640,xl:720}),am=`wui-modal-fullscreen`,om=`wui-modal-wide`,sm=Object.freeze({sm:380,md:440,lg:640,xl:880,wide:1080}),Z=()=>L(`modal`,Dp),cm=e=>Ta(e?.getAttribute(`data-wui-timeout`)??null)??3e4,lm=`a[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,um=`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled]),[contenteditable="true"]`,dm=`[aria-invalid="true"], .is-invalid, .input-validation-error`,fm=`invalid`,pm=`.wui-error-summary, [data-wui-form-errors], .validation-summary-errors, [data-valmsg-summary]`,mm=`[data-wui-modal-content]`,hm=`[data-wui-pane-close], [data-wui-dismiss]`,gm=()=>I(`button`,{type:`button`,class:`wui-modal-close`,"data-wui-dismiss":!0,"aria-label":Z().closeLabel},Rr({width:18,height:18,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[[`path`,{d:`M18 6 6 18M6 6l12 12`}]])),_m=new WeakMap,vm=new WeakSet;function ym(e,t){if(e==null)throw TypeError(`The remote modal needs ${t}, and the page does not have it.`);return e}var bm=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},xm=(e,t,n)=>ym(bm(e,t),n),Sm=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Cm=()=>Object.assign(Error(`The remote modal load was aborted.`),{name:`AbortError`}),wm=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,Tm=(e,t)=>{let n=e instanceof Element?e.closest(t):null;return n instanceof HTMLElement?n:null},Em=e=>Object.hasOwn(sm,e),Dm=e=>Object.hasOwn(im,e);function Om(e){if(e==null||e===``)return null;if(e===`fullscreen`)return{fullscreen:!0};if(Em(e))return e===`wide`?{px:sm.wide,wide:!0}:{px:sm[e]};let t=typeof e==`number`?e:/^\d+$/.test(String(e))?Number(e):NaN;if(Number.isInteger(t)&&t>0)return{px:t};throw TypeError(`Unsupported modal size "${String(e)}". Use sm, md, lg, xl, wide, fullscreen or a px number.`)}var km=e=>{if(e.classList.contains(`wui-modal-fullscreen`))return{fullscreen:!0};if(e.classList.contains(`wui-modal-wide`))return{px:sm.wide,wide:!0};let t=Number.parseInt(e.style.getPropertyValue(`--wui-modal-max-width`),10);return{px:t>0?t:sm.md}},Am=(e,t)=>{e.classList.toggle(am,!!t.fullscreen),e.classList.toggle(om,!t.fullscreen&&!!t.wide),t.fullscreen?e.style.removeProperty(`--wui-modal-max-width`):e.style.setProperty(`--wui-modal-max-width`,`${t.px}px`)},jm=[`center`,`top`];function Mm(e){if(e==null||e===``)return null;if(Dm(e))return{px:im[e]};let t=typeof e==`number`?e:/^\d+$/.test(String(e))?Number(e):NaN;if(Number.isInteger(t)&&t>0)return{px:t};throw TypeError(`Unsupported drawer size "${String(e)}". Use sm, md, lg, xl or a px number.`)}var Nm=e=>e.container===`drawer`,Pm=e=>e.container===`pane`,Fm=e=>e.container!==`modal`,Im=(e,t)=>Nm(e)?Mm(t):Om(t),Lm=e=>{let t=typeof e==`string`?document.querySelector(e):e,n=t instanceof HTMLElement?t:null;return n?.matches(`[data-wui-pane-host]`)?n:null},Rm=e=>Pm(e)?e.shell:xm(e.shell,`.modal-dialog`,`a dialog frame`);function zm(e=`modal`){let t=e===`drawer`,n=t?rm:nm,r=document.getElementById(n);if(r)return r;let i=document.createElement(`wui-modal`);i.id=n,i.setAttribute(`data-wui`,`AppModal`);let a=document.createElement(`dialog`);return a.className=t?`modal wui-modal-shell wui-remote-drawer`:`modal wui-modal-shell`,a.style.setProperty(`--wui-modal-max-width`,`${t?im.md:sm.md}px`),a.replaceChildren(I(`div`,{class:t?`modal-dialog wui-remote-drawer-dialog`:`modal-dialog modal-dialog-centered wui-rb-dialog`},I(`div`,{class:`modal-content wui-modal`}))),i.append(a),document.body.appendChild(i),i}var Bm=e=>I(`div`,{class:`wui-modal-header`},I(`div`,{class:`wui-modal-heading`},I(`div`,{class:`wui-modal-headtext`},I(`div`,{class:`wui-modal-title`},e))),gm()),Vm=e=>I(`div`,{class:`modal-content wui-modal`,"aria-busy":`true`},Bm(e),I(`div`,{class:`wui-modal-body`},I(`div`,{class:`wui-modal-loading`,role:`status`},I(`span`,{class:`visually-hidden`},Z().loadingLabel),I(`div`,{class:`skeleton wui-modal-skeleton`}),I(`div`,{class:`skeleton wui-modal-skeleton`}),I(`div`,{class:`skeleton wui-modal-skeleton wui-modal-skeleton--short`})))),Hm=(e,t)=>{let n={forbidden:Z().forbiddenMessage,client:Z().clientMessage,server:Z().serverMessage,network:Z().networkMessage,timeout:Z().timeoutMessage};return I(`div`,{class:`modal-content wui-modal`,"data-wui-modal-error":t},Bm(e),I(`div`,{class:`wui-modal-body`},I(`div`,{class:`wui-modal-state`,role:`alert`},I(`p`,{class:`wui-modal-state-title`},Z().errorTitle),I(`p`,{class:`wui-modal-state-text`},n[t]||Z().serverMessage),I(`div`,{class:`wui-modal-state-actions`},I(`button`,{type:`button`,class:nl(`primary`,`soft`,`md`),"data-wui-dismiss":!0,"data-wui":Qc},Z().closeLabel),I(`button`,{type:`button`,class:nl(`primary`,`solid`,`md`),"data-wui-modal-retry":!0,"data-wui":Qc},Z().retryLabel)))))},Um=e=>bm(e.shell,`.modal-content`),Wm=e=>Ie(e.cloneNode(!0),HTMLElement,`a card copy is not an element`);function Gm(e){e&&e.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0}))}function Km(e,t){let n=Um(e),r=n?Jm(n):new Map;Gm(n),n?n.replaceWith(t):Rm(e).appendChild(t),Ym(t,r),$p().refresh()}var qm=`input[type="file"][name]`;function Jm(e){let t=new Map;for(let n of e.querySelectorAll(qm)){if(!(n instanceof HTMLInputElement))continue;let e=n.files;e&&e.length>0&&t.set(n.name,[...e])}return t}function Ym(e,t){if(t.size!==0&&typeof DataTransfer<`u`)for(let n of e.querySelectorAll(qm)){if(!(n instanceof HTMLInputElement))continue;let e=t.get(n.name);if(!e)continue;let r=new DataTransfer;for(let t of e)r.items.add(t);n.files=r.files,n.dispatchEvent(new Event(`change`,{bubbles:!0}))}}var Xm=e=>Pm(e)?!e.shell.hidden:e.host.hasAttribute(`open`);function Zm(e,t,n=!1){let r=t?bm(e,dm):null,i=r?r.matches(lm)?r:bm(r,lm)||r:null;if(!i&&n)i=bm(e,`[data-autofocus]`)||bm(e,um)||bm(e,`.wui-modal-close`);else if(!i){let t=Sm(e,lm);i=bm(e,`[data-autofocus]`)||t.find(e=>!e.classList.contains(`wui-modal-close`))||t[0]||e}r?i?.focus?.():i?.focus?.({preventScroll:!0})}function Qm(e,t){let n=bm(e.shell,`[data-wui-modal-live]`);n||(n=document.createElement(`div`),n.className=`visually-hidden`,n.setAttribute(`aria-live`,`assertive`),n.setAttribute(`data-wui-modal-live`,``),Rm(e).appendChild(n)),n.textContent=``,n.textContent=t}var $m=e=>{let t=bm(e.shell,`[data-wui-modal-live]`);t&&(t.textContent=``)},eh=(e,t,n)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))};function th(e,t,n,r){let i={...r,container:e.container};eh(t,`wui:modal:${n}`,i),Nm(e)&&eh(t,`wui:drawer:${n}`,i),Pm(e)&&eh(t,`wui:pane:${n}`,i)}var nh=e=>e.matches(`[data-wui-pane-host]`)?`pane`:xm(e,`dialog`,`a dialog`).classList.contains(`wui-remote-drawer`)?`drawer`:`modal`,rh=e=>ym(e.host.closest(`wui-modal`),`a wui-modal host`);function ih(e){let t=_m.get(e);if(t)return t;let n=nh(e),r=n===`pane`?e:xm(e,`dialog`,`a dialog`),i=Um({shell:r}),a={host:e,shell:r,container:n,queue:Da(),defaultSize:km(r),defaultLabel:r.getAttribute(`aria-label`),placeholder:i?Wm(i):I(`div`,{class:`modal-content wui-modal`}),remoteUrl:e.getAttribute(`data-wui-remote-url`),cache:e.getAttribute(`data-wui-remote-cache`)===`true`,loadedUrl:null,session:null};return _m.set(e,a),e.addEventListener(`submit`,e=>Eh(a,e)),e.addEventListener(`click`,e=>{Tm(e.target,`[data-wui-modal-retry]`)&&a.session&&(e.preventDefault(),fh(a,a.session))}),Pm(a)&&e.addEventListener(`click`,t=>{let n=Tm(t.target,hm);n&&e.contains(n)&&a.session&&oh(a,a.session,`dismissed`,null)}),e.addEventListener(`wui-modal-close`,t=>{t.target===e&&t instanceof CustomEvent&&Sh(t.detail,`reason`)===`escape`&&e.querySelector(`form[data-wui-submitting]`)&&t.preventDefault()}),e.addEventListener(`wui-modal-closed`,t=>{t.target===e&&lh(a)}),e.addEventListener(`wui-modal-opened`,t=>{if(t.target!==e)return;let n=Um(a);a.session&&n?.matches(mm)&&!n.contains(document.activeElement)&&Zm(n,!1,Fm(a))}),a.remoteUrl&&e.addEventListener(`wui-modal-open`,t=>{t.target===e&&uh(a,t)}),a}function ah(e,t,n){e.session&&(e.queue.abort(),e.session.resolveClosed({status:`dismissed`,detail:{replaced:!0}}));let r=()=>void 0,i=new Promise(e=>{r=e}),a={url:t,method:(n.method||`GET`).toUpperCase(),body:n.body,options:n,trigger:n.trigger||null,explicitSize:null,closing:null,resolveClosed:r,handle:{el:e.shell,closed:i,close:()=>oh(e,a,`dismissed`,null),reload:()=>fh(e,a)}};return e.session=a,a}function oh(e,t,n,r){e.session===t&&(t.closing={status:n,detail:r},Pm(e)?ch(e,t):sh(e))}function sh(e){let t=rh(e);t.dispatchEvent(new CustomEvent(`wui-modal-close`,{bubbles:!0,cancelable:!0,detail:{reason:`dismiss`}}))&&t.hide()}function ch(e,t){let n=e.shell,{status:r,detail:i}=ym(t.closing,`the closing state`),a=n.contains(document.activeElement);e.queue.abort(),e.session=null,Gm(Um(e)),n.replaceChildren(),n.hidden=!0,n.removeAttribute(`data-open`),t.resolveClosed({status:r,detail:i}),th(e,n,`closed`,{status:r,url:t.url}),a&&t.trigger?.isConnected&&t.trigger.focus?.()}function lh(e){let t=e.session;if(e.queue.abort(),e.session=null,$m(e),t){let n=t.closing||{status:`dismissed`,detail:null};t.resolveClosed({status:n.status,detail:n.detail}),th(e,e.shell,`closed`,{status:n.status,url:t.url});let r=document.activeElement;t.trigger?.isConnected&&(!r||r===document.body||e.shell.contains(r))&&t.trigger.focus?.()}e.cache||(Km(e,Wm(e.placeholder)),e.loadedUrl=null,Am(e.shell,e.defaultSize),e.defaultLabel?e.shell.setAttribute(`aria-label`,e.defaultLabel):e.shell.removeAttribute(`aria-label`))}function uh(e,t){let n=Sh(t instanceof CustomEvent?t.detail:null,`trigger`),r=n instanceof HTMLElement?n:null,i=r?.getAttribute(`data-wui-url`)||e.remoteUrl||``,a=ah(e,i,{trigger:r});a.explicitSize=dh(e,r?.getAttribute(`data-wui-size`)),a.explicitSize&&Am(e.shell,a.explicitSize),e.cache&&e.loadedUrl===i||(e.loadedUrl&&Km(e,Wm(e.placeholder)),fh(e,a,{keepPlaceholder:!0}))}function dh(e,t){try{return Im(e,t)}catch(e){return V(e),null}}async function fh(e,t,{keepPlaceholder:n=!1}={}){n||Km(e,Vm(t.options.title||ph(e)));let r=await e.queue.run(t.url,{method:t.method,body:t.body,navigate:t.options.navigate,timeoutMs:cm(t.trigger)});if(e.session!==t||r.kind===`aborted`||r.kind===`stale`)return`aborted`;if(r.kind===`session`)return`session`;if(r.kind===`ok`&&_h(e,t,r.html,!1))return e.loadedUrl=t.url,th(e,e.shell,`loaded`,{url:t.url,handle:t.handle}),`loaded`;let i=r.kind===`ok`||r.kind===`validation`?`server`:r.kind;return Km(e,Hm(t.options.title||ph(e),i)),Xm(e)&&Zm(ym(Um(e),`a card`),!1,Fm(e)),th(e,e.shell,`error`,{url:t.url,kind:i,status:r.status}),`error`}var ph=e=>Um(e)?.querySelector(`.wui-modal-title`)?.textContent||e.shell.getAttribute(`aria-label`)||``,mh=`/_content/Webority.Ui.Razor/js/`,hh=e=>new URL(e,window.location.href).pathname.includes(mh);function gh(e){if([...document.scripts].some(t=>t.getAttribute(`src`)===e))return;let t=document.createElement(`script`);t.src=e,document.head.appendChild(t)}function _h(e,t,n,r){let i=Kl(n),a=!1;for(let e of i.querySelectorAll(`script`)){if(e.getAttribute(`type`)===`application/json`)continue;let t=e.getAttribute(`src`);e.remove(),t&&hh(t)?gh(t):a=!0}a&&Hr(`WUI.modal: ${t.url} returned a fragment with script; it was removed. Keep page behaviour in the page.`);let o=bm(i,mm);if(!o)return V(`WUI.modal: ${t.url} did not answer with an <app-modal-content> fragment.`),!1;if(Km(e,o),r||$m(e),!Pm(e)){Am(e.shell,t.explicitSize||dh(e,o.getAttribute(`data-wui-size`))||e.defaultSize);let n=o.getAttribute(`data-wui-title`);n&&e.shell.setAttribute(`aria-label`,n)}return Xm(e)&&Zm(o,r,Fm(e)),!0}var vh=`button[type="submit"], button:not([type]), input[type="submit"], input[type="image"]`;function yh(e,t,n){let r=[...e.elements].filter(e=>e.matches(vh));if(n){e.setAttribute(`data-wui-submitting`,``);let n=t&&r.includes(t)?t:r[0];for(let e of r)e.toggleAttribute(`data-wui-was-disabled`,e.disabled),e.disabled=!0;n&&(n.classList.add(`is-loading`),n.setAttribute(`aria-busy`,`true`),n.tagName===`BUTTON`&&n.prepend(I(`span`,{class:`spinner-border spinner-border-sm me-2`,"aria-hidden":`true`,"data-wui-submit-spinner":!0})))}else{e.removeAttribute(`data-wui-submitting`);for(let e of r)e.disabled=e.hasAttribute(`data-wui-was-disabled`),e.removeAttribute(`data-wui-was-disabled`),e.classList.remove(`is-loading`),e.removeAttribute(`aria-busy`),e.querySelector(`[data-wui-submit-spinner]`)?.remove()}}function bh(e){for(let t of e.querySelectorAll(pm))t.remove();for(let t of e.querySelectorAll(dm))t.removeAttribute(`aria-invalid`),t.classList.remove(`is-invalid`,`input-validation-error`);for(let t of e.querySelectorAll(`.field-error`))t.textContent=``}var xh=new Set(`bad request.unauthorized.payment required.forbidden.not found.method not allowed.not acceptable.proxy authentication required.request timeout.conflict.gone.length required.precondition failed.payload too large.uri too long.unsupported media type.range not satisfiable.expectation failed.misdirected request.unprocessable content.unprocessable entity.locked.failed dependency.too early.upgrade required.precondition required.too many requests.request header fields too large.unavailable for legal reasons`.split(`.`)),Sh=(e,t)=>{if(typeof e==`object`&&e&&t in e)return Reflect.get(e,t)};async function Ch(e){if(!e||e.status<400||e.status>499||!e.headers.get(`content-type`)?.toLowerCase().includes(`json`))return null;let t;try{t=JSON.parse(await e.text())}catch{return null}let n=e=>typeof e==`string`?e.trim():``,r=n(Sh(t,`title`)),i=(e.statusText||``).trim().toLowerCase(),a=xh.has(r.toLowerCase())||r.toLowerCase()===i;return n(Sh(t,`message`))||n(Sh(t,`detail`))||(r&&!a?r:null)}function wh(e,t,n,r){let i={forbidden:Z().forbiddenMessage,client:Z().clientMessage,server:Z().serverMessage,network:Z().networkMessage,timeout:Z().timeoutMessage},a=t.closest(`.wui-modal-body`)||t;a.querySelector(`[data-wui-modal-submit-error]`)?.remove(),bh(a);let o=document.createElement(`div`);o.className=`alert alert-danger wui-modal-submit-error`,o.setAttribute(`role`,`alert`),o.setAttribute(`data-wui-modal-submit-error`,``),o.textContent=`${Z().submitFailedMessage} ${r||i[n]||Z().serverMessage}`,a.prepend(o),Qm(e,o.textContent)}var Th=(e,t)=>{let n=new URL(e,window.location.href);for(let[e,r]of t)typeof r==`string`&&n.searchParams.append(e,r);return n.origin===window.location.origin?n.pathname+n.search:n.href};async function Eh(e,t){let n=t.target,r=e.session;if(!(n instanceof HTMLFormElement)||!r||n.hasAttribute(`data-wui-native`)||!n.closest(mm)||(t.preventDefault(),n.hasAttribute(`data-wui-submitting`)))return;let i=`submitter`in t&&(t.submitter instanceof HTMLButtonElement||t.submitter instanceof HTMLInputElement)?t.submitter:null,a=i?.getAttribute(`formaction`)||n.getAttribute(`action`)||r.url,o=(i?.getAttribute(`formmethod`)||n.getAttribute(`method`)||`GET`).toUpperCase(),s=new FormData(n);i?.name&&!s.has(i.name)&&s.append(i.name,i.value);let c=o===`GET`;yh(n,i,!0);let l;try{l=await e.queue.run(c?Th(a,s):a,{method:o,body:c?void 0:s,navigate:r.options.navigate,timeoutMs:cm(r.trigger)})}catch(t){V(t),e.session===r&&n.isConnected&&(yh(n,i,!1),wh(e,n,`server`,null));return}if(e.session!==r)return;if(n.isConnected&&yh(n,i,!1),l.kind===`ok`&&l.result===`success`){Dh(e,r,l);return}if(l.kind===`aborted`||l.kind===`stale`||l.kind===`session`)return;if(l.kind===`ok`&&l.html){let t=l.result===fm;if(_h(e,r,l.html,t)){if(t){let t=ym(Um(e),`a card`).querySelector(pm)?.textContent?.replace(/\s+/g,` `).trim();Qm(e,t||Z().invalidMessage)}return}}let u=l.kind===`ok`||l.kind===`validation`?`server`:l.kind,d=await Ch(l.response);e.session===r&&wh(e,n,u,d)}function Dh(e,t,n){let r=n.message,i=n.redirect||null,a=n.toastVariant||`success`;if(!Bh(a))throw TypeError(`Unknown toast variant "${a}". Use ${zh.join(`, `)}.`);let o={url:t.url,trigger:t.trigger,handle:t.handle,message:r,redirect:i,data:n.data??null,container:e.container};i&&!t.options.navigate?cg(r,a):r&&$p().toast(r,{variant:a}),th(e,t.trigger?.isConnected?t.trigger:document,`success`,o),t.options.onSuccess?.(o,t.handle),i&&(t.options.navigate||(e=>window.location.assign(e)))(i);let s=n.next;s&&!i?(t.url=s,t.method=`GET`,t.body=void 0,fh(e,t)):n.keepOpen?n.html&&_h(e,t,n.html,!1):oh(e,t,`success`,o)}function Oh(e){let t=Tm(e.target,`[data-wui-modal], [data-wui-drawer], [data-wui-pane]`);t&&(t.matches(`a[href]`)&&(e.ctrlKey||e.metaKey||e.shiftKey||e.button!==0)||(e.preventDefault(),t.hasAttribute(`data-wui-pane`)?Fh(t.getAttribute(`data-wui-pane`)??``,{target:t.getAttribute(`data-wui-pane-target`),trigger:t}).catch(e=>{wm(e)||V(e)}):t.hasAttribute(`data-wui-modal`)?jh(t.getAttribute(`data-wui-modal`)??``,{size:t.getAttribute(`data-wui-size`)||void 0,title:t.getAttribute(`data-wui-title`)||void 0,trigger:t}).catch(e=>{wm(e)||V(e)}):Nh(t.getAttribute(`data-wui-drawer`)??``,{size:t.getAttribute(`data-wui-drawer-size`)||void 0,title:t.getAttribute(`data-wui-title`)||void 0,trigger:t}).catch(e=>{wm(e)||V(e)})))}function kh(e){if(e.key!==`Escape`||e.defaultPrevented)return;let t=Tm(e.target,Ph);if(!t)return;let n=_m.get(t),r=e.currentTarget;n?.session&&r instanceof Document&&!r.querySelector(`wui-modal[open]`)&&(t.querySelector(`form[data-wui-submitting]`)||(e.preventDefault(),oh(n,n.session,`dismissed`,null)))}function Ah(e=document){let t=e instanceof Document?e:ym(e.ownerDocument,`an owner document`);vm.has(t)||(vm.add(t),t.addEventListener(`click`,Oh),t.addEventListener(`keydown`,kh));let n=Sm(e,`wui-modal[data-wui-remote-url]`);e instanceof HTMLElement&&e.matches(`wui-modal[data-wui-remote-url]`)&&n.unshift(e);for(let e of n)ih(e)}function jh(e,t={}){try{if(!e)throw TypeError(`WUI.modal.load: a fragment url is required.`);let n=t.container===`drawer`,r=n?Mm(t.size):Om(t.size),i=t.placement||`center`;if(!jm.includes(i))throw TypeError(`WUI.modal.load: unsupported placement "${i}". Use center or top.`);if(t.signal?.aborted)return Promise.reject(Cm());let a=zm(n?`drawer`:`modal`);Ah(document);let o=ih(a),s=Xm(o),c=ah(o,e,t);c.explicitSize=r,Am(o.shell,r||o.defaultSize),n||xm(o.shell,`.modal-dialog`,`a dialog frame`).classList.toggle(`modal-dialog-centered`,i===`center`),t.title&&o.shell.setAttribute(`aria-label`,t.title),s||(a.toggleAttribute(`static`,t.staticBackdrop!==!1),a.toggleAttribute(`no-escape`,t.closeOnEscape===!1));let l=s?Promise.resolve():new Promise(e=>a.addEventListener(`wui-modal-opened`,()=>e(),{once:!0})),u=fh(o,c);return s||rh(o).show(),Mh(o,c,t,l,u,`WUI.modal.load`)}catch(e){return Promise.reject(e)}}function Mh(e,t,n,r,i,a){let o=new Promise((r,i)=>{n.signal?.addEventListener(`abort`,()=>{e.session===t&&(e.queue.abort(),oh(e,t,`dismissed`,{aborted:!0})),i(Cm())},{once:!0})}),s=Promise.all([r,i]).then(([,e])=>{if(e===`aborted`)throw Cm();if(e===`session`)throw Error(`${a}(${t.url}): the session expired; the browser is signing in again.`);return t.handle});return Promise.race([s,o])}function Nh(e,t={}){return jh(e,{...t,container:`drawer`,placement:void 0})}var Ph=`[data-wui-pane-host]`;function Fh(e,t={}){try{if(!e)throw TypeError(`WUI.pane.load: a fragment url is required.`);let n=Lm(t.target);if(!n)throw TypeError(`WUI.pane.load: the target is not an <app-detail-pane>.`);if(t.signal?.aborted)return Promise.reject(Cm());Ah(document);let r=ih(n),i=ah(r,e,t);n.hidden=!1,n.setAttribute(`data-open`,``);let a=fh(r,i);return Mh(r,i,t,Promise.resolve(),a,`WUI.pane.load`)}catch(e){return Promise.reject(e)}}function Ih(e){let t=Lm(e);if(!t)throw TypeError(`WUI.pane.close: the target is not an <app-detail-pane>.`);let n=_m.get(t);n?.session&&oh(n,n.session,`dismissed`,null)}var Lh=`wuiConfirm`,Rh=Object.freeze([`danger`]),zh=Object.freeze([`success`,`info`,`warning`,`danger`]),Bh=e=>zh.some(t=>t===e),Vh=`wui.flash`,Hh=()=>L(`confirmDialog`,Ep),Uh=new WeakSet,Wh=new WeakSet,Gh=null,Kh=null,qh=!1,Jh=(e,t)=>{e&&$p().toast(e,{variant:t})};function Yh(){let e=document.getElementById(Lh);if(e)return P(e.closest(`wui-modal`),`#${Lh} must be a wui-modal.`);let t=document.createElement(`wui-modal`);t.id=Lh;let n=document.createElement(`dialog`);return n.className=`modal wui-modal-shell`,n.style.setProperty(`--wui-modal-max-width`,`${sm.md}px`),n.replaceChildren(I(`div`,{class:`modal-dialog modal-dialog-centered wui-rb-dialog`},I(`div`,{class:`modal-content wui-modal wui-confirm`},I(`div`,{class:`wui-modal-body`},I(`div`,{class:`wui-confirm-content`},I(`span`,{class:`wui-confirm-icon`},I(`wui-status-icon`,{tone:`info`,size:120})),I(`h3`,{class:`wui-confirm-title`,tabindex:-1,"data-autofocus":``}),I(`p`,{class:`wui-confirm-msg`}))),I(`div`,{class:`wui-modal-footer`},I(`div`,{class:`wui-confirm-actions`},I(`button`,{type:`button`,class:nl(`primary`,`soft`,`md`),"data-wui-dismiss":``,"data-wui":Qc},Hh().cancelLabel),I(`button`,{type:`button`,class:nl(`primary`,`solid`,`md`),"data-app-confirm":``,"data-wui":Qc})))))),t.append(n),document.body.appendChild(t),t}function Xh(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!Rh.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);Zh({title:e.getAttribute(`data-wui-confirm-title`),message:e.getAttribute(`data-wui-confirm`),label:e.getAttribute(`data-wui-confirm-label`),danger:n===`danger`},t)}function Zh({title:e,message:t,label:n,danger:r},i){let a=Yh(),o=a.querySelector(`.wui-confirm-title`),s=a.querySelector(`[data-app-confirm]`);if(!o||!s)throw Error(`#${Lh} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${Lh}"> without confirm-href, or leave the dialog to the library.`);let c=a.querySelector(`.wui-confirm-msg`);c||(c=document.createElement(`p`),c.className=`wui-confirm-msg`,o.after(c));let l=e||Hh().confirmTitle;o.textContent=l,c.textContent=t,s.textContent=n||Hh().confirmLabel,s.classList.toggle(`btn-danger`,r),s.classList.toggle(`btn-primary`,!r),a.querySelector(`wui-status-icon`)?.setAttribute(`tone`,r?`delete`:`info`),P(a.querySelector(`dialog`),`#${Lh} has no <dialog>.`).setAttribute(`aria-label`,l),Kh=i,qh=!1,a.show()}var Qh=(e,t)=>{Gh=e;try{t()}finally{Gh=null}},$h=(e,t)=>{let n=Reflect.get(e,t);if(n===void 0||typeof n==`string`)return n;throw TypeError(`confirmAction: ${t} must be text.`)},eg=e=>{if(typeof e!=`object`||!e)throw TypeError(`confirmAction: options must be an object with a message.`);let t=`message`in e?e.message:void 0;if(typeof t!=`string`)throw TypeError(`confirmAction: message must be text.`);return{title:$h(e,`title`),message:t,label:$h(e,`label`),tone:$h(e,`tone`)}};function tg(e,t,n){let{title:r,message:i,label:a,tone:o}=eg(t);if(o!=null&&!Rh.includes(o))throw TypeError(`confirmAction: tone "${o}" is not supported. Use danger, or leave it off.`);wg(e.ownerDocument),Zh({title:r,message:i,label:a,danger:o===`danger`},()=>Qh(e,n))}var ng=e=>`disabled`in e&&e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`,rg=e=>{Ie(e,HTMLElement,`data-wui-confirm needs an HTML element to click.`).click()};function ig(e){let t=F(e.target,`[data-wui-confirm]:not(form)`);t&&t!==Gh&&!ng(t)&&(e.preventDefault(),e.stopImmediatePropagation(),Xh(t,()=>Qh(t,()=>rg(t))))}function ag(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===Gh||e.submitter&&e.submitter===Gh||t.querySelector(`input[data-app-repeater-hidden]`))return;e.preventDefault(),e.stopImmediatePropagation();let n=e.submitter instanceof HTMLButtonElement||e.submitter instanceof HTMLInputElement?e.submitter:null,r=n?.form===t?n:void 0;Xh(t,()=>Qh(t,()=>t.requestSubmit(r)))}function og(e){let t=F(e.target,`#${Lh} [data-app-confirm]`);t&&!t.hasAttribute(`disabled`)&&Kh&&(qh=!0,P(t.closest(`wui-modal`),`#${Lh} is missing around its confirm button.`).hide())}function sg(e){if(!(e.target instanceof Element)||e.target.id!==`wuiConfirm`)return;let t=qh?Kh:null;Kh=null,qh=!1,t?.()}function cg(e,t){e&&window.sessionStorage.setItem(Vh,JSON.stringify({message:e,variant:t}))}var lg=e=>e===`forbidden`?Hh().forbiddenMessage:e===`network`?Hh().networkMessage:e===`timeout`?Hh().timeoutMessage:Hh().failedMessage;function ug(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.getAttribute(`data-refresh-on-success`)!==`false`&&Kp(e)?.reload()}var dg=(e,t)=>{`disabled`in e&&(e.disabled=t)};async function fg(e){let t=e.getAttribute(`data-wui-post`);if(!t)throw Error(`A data-wui-post button needs the URL the action posts to.`);return pg(t,e)}async function pg(e,t,n){let r=t.getAttribute(`data-wui-post-reload`);if(r!==null&&r!==`page`)throw TypeError(`data-wui-post-reload="${r}" is not supported. Use page, or leave it off to reload the server tables.`);dg(t,!0),t.setAttribute(`aria-busy`,`true`);let i=await W(e,{method:`POST`,body:n,timeoutMs:Ta(t.getAttribute(`data-wui-timeout`))??3e4});if(i.kind===`session`||i.kind===`aborted`)return;let a=i.toastVariant||`success`;i.ok&&(i.redirect||r===`page`)?(cg(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload()):(dg(t,!1),t.removeAttribute(`aria-busy`),i.ok?(em(i,a),ug()):Jh(i.message||lg(i.kind),`danger`))}function mg(e,t){dg(e,!1),e.removeAttribute(`aria-busy`),V(t),Jh(Hh().failedMessage,`danger`)}function hg(e){let t=F(e.target,`[data-wui-post]`);t&&(e.preventDefault(),ng(t)||t.getAttribute(`aria-busy`)===`true`||fg(t).catch(e=>mg(t,e)))}function gg(e){let t=F(e.target,`form[data-wui-post-form]`);if(!(t instanceof HTMLFormElement)||e.defaultPrevented)return;e.preventDefault();let n=P(e.submitter||t.querySelector(`button:not(.repeater-add):not(.repeater-remove)`),`A data-wui-post-form needs a submit button to report its result on.`);if(n.getAttribute(`aria-busy`)===`true`)return;let r=new URL(P(t.getAttribute(`action`),`A data-wui-post-form needs an action attribute to post to.`),document.baseURI).href;pg(r,n,new FormData(t)).catch(e=>mg(n,e)),t.closest(`wui-dropdown`)?.hide()}var _g=(e,t)=>{e.disabled=!1,e.removeAttribute(`aria-busy`),t&&Ar(t,null)};async function vg(e,t){let n=e.dataset.url;if(!n)throw Error(`A data-wui-row-action button needs data-url: the handler the action posts to.`);e.disabled=!0,e.setAttribute(`aria-busy`,`true`),t&&Ar(t,`saving`);let r=Ta(e.getAttribute(`data-wui-timeout`))??3e4,i=await W(n,{method:(e.dataset.method||`post`).toUpperCase(),timeoutMs:r});if(i.kind===`session`)return;if(i.kind===`aborted`){_g(e,t);return}if(i.ok){cg(i.message,i.toastVariant||`success`),i.redirect?window.location.assign(i.redirect):window.location.reload();return}let a=i.message||lg(i.kind);e.disabled=!1,e.removeAttribute(`aria-busy`),t&&Ar(t,`error`,a),Jh(a,`danger`)}function yg(e){let t=F(e.target,`[data-wui-row-action]`);if(!(t instanceof HTMLButtonElement)||t.closest(`[data-wui-server]`)||(e.preventDefault(),t.disabled||t.getAttribute(`aria-busy`)===`true`))return;let n=t.closest(`tr`);vg(t,n).catch(e=>{_g(t,n),V(e),Jh(Hh().failedMessage,`danger`)})}function bg(){let e=window.sessionStorage.getItem(Vh);if(!e)return;window.sessionStorage.removeItem(Vh);let t=JSON.parse(e);if(typeof t!=`object`||!t)throw TypeError(`stored flash is not an object.`);let n=`message`in t?t.message:void 0,r=`variant`in t?t.variant:void 0;if(typeof r!=`string`||!Bh(r))throw TypeError(`stored flash variant "${String(r)}" is not supported.`);if(typeof n!=`string`)throw TypeError(`stored flash message is not text.`);Jh(n,r)}function xg(e){let t=e.querySelectorAll?[...e.querySelectorAll(`[data-wui-flash]`)]:[];e instanceof Element&&e.matches(`[data-wui-flash]`)&&t.unshift(e);for(let e of t){let t=e.getAttribute(`data-wui-flash-variant`)||`success`;if(!Bh(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${zh.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||(e.textContent??``).trim();e.remove(),Jh(n,t)}}var Sg=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.form:null;function Cg(e){if(!(e.target instanceof Element))return;let t=e.target.closest(`[data-wui-auto-submit]`);if(!t)return;let n=Sg(e.target)||t.closest(`form`);n instanceof HTMLFormElement&&n.requestSubmit()}function wg(e){Wh.has(e)||(Wh.add(e),e.addEventListener(`click`,og),e.addEventListener(`wui-modal-closed`,sg))}function Tg(e=document){let t=e instanceof Element?e.ownerDocument:e;Uh.has(t)||(Uh.add(t),t.addEventListener(`click`,ig,!0),t.addEventListener(`submit`,ag,!0),wg(t),t.addEventListener(`click`,hg),t.addEventListener(`click`,yg),t.addEventListener(`submit`,gg),t.addEventListener(`change`,Cg),bg()),xg(e)}var Eg=()=>L(`unsavedChanges`,Tp),Dg=`form[data-wui-unsaved]`,Og=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,kg=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,Ag=new Set([`submit`,`button`,`reset`,`image`]),jg=new Set([`hidden`,`checkbox`,`radio`,`file`,`submit`,`button`,`reset`,`image`,`range`,`color`]),Mg=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,Ng=e=>Mg(e)?e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled:`disabled`in e&&!!e.disabled,Pg=e=>`name`in e&&typeof e.name==`string`&&e.name!==``,Fg=e=>typeof e==`object`&&!!e,Ig=e=>Array.isArray(e)&&e.every(e=>Array.isArray(e)&&typeof e[0]==`string`);function Lg(e){let t=JSON.parse(e);if(!Ig(t))throw Error(`unsaved-changes snapshot is malformed`);return t}var Rg=new WeakMap,zg=new WeakSet,Bg=e=>`${e.name}:${e.size}:${e.lastModified}`,Vg=e=>[...e.querySelectorAll(Dg)].filter(e=>e instanceof HTMLFormElement);function Hg(e){let t=[];for(let n of e.elements)Pg(n)&&!Ng(n)&&(Mg(n)&&Ag.has(n.type)||(n instanceof HTMLInputElement&&(n.type===`checkbox`||n.type===`radio`)?t.push([n.name,n.value,n.checked]):n instanceof HTMLInputElement&&n.type===`file`?t.push([n.name,[...n.files||[]].map(Bg)]):n instanceof HTMLSelectElement&&n.type===`select-multiple`?t.push([n.name,[...n.selectedOptions].map(e=>e.value)]):n instanceof HTMLFieldSetElement||n instanceof HTMLObjectElement?t.push([n.name,null]):t.push([n.name,`value`in n?n.value:null])));return JSON.stringify(t)}function Ug(e){return Hg(e)}function Wg(e,t){let n=new Map,r=Lg(t);for(let e of r){let t=n.get(e[0]);t?t.push(e):n.set(e[0],[e])}let i=Lg(Hg(e)).map(e=>n.get(e[0])?.shift()??e);for(let e of n.values())i.push(...e);return JSON.stringify(i)}function Gg(e){for(let t of e.elements)if(Mg(t)&&t.name&&!Ng(t)){if(t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!jg.has(t.type)){if(t.value.trim()!==``)return!0}else if(t instanceof HTMLInputElement&&t.type===`file`&&(t.files?.length??0)>0)return!0}return!1}var Kg=e=>({saved:e.querySelector(Og)&&Gg(e)?null:Hg(e),engaged:!1,discarded:!1});function qg(e){let t=Rg.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&Hg(e)!==t.saved}var Jg=(e,t)=>Vg(e).filter(e=>e!==t&&qg(e));function Yg(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||Eg().message;tg(e,{title:Eg().title,message:r,label:Eg().leaveLabel,tone:`danger`},()=>{for(let e of t){let t=Rg.get(e);t&&(t.discarded=!0)}n()})}function Xg(e){if(e.matches(kg))return!1;let t=e.getAttribute(`target`);if(t&&t.toLowerCase()!==`_self`)return!1;let n=e.getAttribute(`href`);if(n===null)return!1;let r=new URL(n,window.location.href);if(r.protocol!==`http:`&&r.protocol!==`https:`)return!1;let i=window.location;return!(r.hash&&r.origin===i.origin&&r.pathname===i.pathname&&r.search===i.search)}function Zg(e,t){if((t?.getAttribute(`formmethod`)||e.getAttribute(`method`)||`get`).toLowerCase()===`dialog`)return!1;let n=t?.getAttribute(`formtarget`)||e.getAttribute(`target`);return!n||n.toLowerCase()===`_self`}function Qg(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target,n=F(t,`a[href]`);if(!(n instanceof HTMLAnchorElement)||!Xg(n))return;let r=Jg(n.ownerDocument,null);r.length&&(e.preventDefault(),Yg(n,r,()=>n.click()))}function $g(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!Zg(t,e.submitter))return;let n=Jg(t.ownerDocument,t);if(n.length){e.preventDefault();let r=e.submitter,i=(r instanceof HTMLButtonElement||r instanceof HTMLInputElement)&&r.form===t?r:void 0;Yg(t,n,()=>t.requestSubmit(i));return}let r=Rg.get(t);r&&(r.saved=Hg(t),r.discarded=!1)}function e_(e){Jg(document,null).length&&(e.preventDefault(),e.returnValue=``)}function t_(e){let t=e.target,n=F(t,Dg);return n instanceof HTMLFormElement?n:null}function n_(e){let t=t_(e);if(!t)return;let n=Rg.get(t);n&&!n.engaged&&(n.saved!==null&&(n.saved=Hg(t)),n.engaged=!0)}function r_(e){let t=t_(e),n=t&&Rg.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function i_(e){for(let t of Vg(e)){let e=Rg.get(t);e?.saved&&(e.saved=Wg(t,e.saved))}}function a_(e){let t=Fg(e)?e.handle:void 0;return Fg(t)?t.el:void 0}function o_(e){if(!(e instanceof CustomEvent))return;let t=a_(e.detail);if(t instanceof Element)for(let e of Vg(t))c_(e)}function s_(e=document){let t=e instanceof Document?e:e.ownerDocument;if(!zg.has(t)){zg.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,n_,!0);for(let e of[`input`,`change`])t.addEventListener(e,r_,!0);t.addEventListener(`click`,Qg),t.addEventListener(`submit`,$g),t.addEventListener(`wui:modal:success`,o_),t.addEventListener(Jr,()=>i_(t)),P(t.defaultView,`unsaved-changes guard needs a document with a window`).addEventListener(`beforeunload`,e_)}let n=Vg(e);e instanceof HTMLFormElement&&e.matches(Dg)&&n.unshift(e);for(let e of n)Rg.has(e)||Rg.set(e,Kg(e))}function c_(e){if(!(e instanceof HTMLFormElement)||!e.matches(Dg))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);Rg.set(e,{saved:Hg(e),engaged:!1,discarded:!1})}var l_=()=>L(`drawer`,mu),u_=`wui:drawer:discard`,d_=`wui-drawer[confirm-discard]`,f_=`wui-modal`,p_=`data-wui-no-discard`,m_=`.wui-drawer-discard`,h_=`input, select, textarea`,g_=e=>typeof e==`object`&&!!e||typeof e==`function`;function __(e){let t=e.currentTarget;if(!(t instanceof Document))throw Error(`The discard guard is not wired on a document.`);return t}function v_(e,t){return F(e,t)}var y_=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement,b_=new WeakMap,x_=new WeakSet,S_=new WeakSet;function C_(e,t,n,r,i){let a=e.createElement(`button`);return a.type=`button`,a.className=nl(t,n,`sm`),a.dataset.wui=Qc,a.setAttribute(r,``),a.textContent=i,a}function w_(e,t){let n=e.createElement(`div`);n.className=`wui-drawer-discard`,n.setAttribute(`role`,`alert`);let r=e.createElement(`span`);return r.className=`wui-drawer-discard-text`,r.textContent=t,n.append(r,C_(e,`danger`,`solid`,`data-wui-discard-confirm`,l_().discardLabel),C_(e,`primary`,`soft`,`data-wui-discard-keep`,l_().keepLabel)),n}function T_(e){if(!(e instanceof Element))return null;let t=e.closest(d_);if(t)return t;let n=e.closest(f_);return n&&O_(n).length?n:null}function E_(e){return e.closest(d_)??e.closest(f_)}function D_(e,t){return t.hasAttribute(p_)||e.hasAttribute(p_)?!1:t.hasAttribute(`confirm-discard`)||e.hasAttribute(`data-wui-confirm-discard`)?!0:(e.getAttribute(`method`)||`get`).toLowerCase()!==`get`}function O_(e){return e.matches(d_)?e.querySelectorAll(`form`):[...e.querySelectorAll(`form`)].filter(t=>D_(t,e))}function k_(e){let t=b_.get(e);return t!=null&&Ug(e)!==t}function A_(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,P(e.querySelector(`.wui-drawer-panel`),`The drawer has no panel to hold its footer.`).append(t),S_.add(t),t}function j_(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-modal-footer`,(e.querySelector(`.wui-modal-body`)?.parentElement??e.querySelector(`.modal-content`)??e).append(t),S_.add(t),t}function M_(e){let t=e.querySelector(`[data-wui-discard-confirm]`);if(!(t instanceof HTMLElement))throw Error(`The discard prompt has no confirm button.`);t.focus()}function N_(e,t,n){let r=e.querySelector(m_);if(r){M_(r);return}let i=w_(e.ownerDocument,t),a;if(e.matches(d_))a=e.querySelector(`.wui-drawer-footer`)??A_(e),a.prepend(i);else if(e.hasAttribute(`confirm-discard`))a=e.querySelector(`.wui-modal-footer`)??j_(e),a.prepend(i);else{if(!n)throw Error(`A discard prompt needs the form that is dirty.`);a=n.querySelector(`.modal-footer`)??e.querySelector(`.wui-modal-footer`)??j_(e),a.prepend(i)}a.classList.add(`wui-drawer-discarding`),M_(i)}function P_(e){let t=e.parentElement;if(e.remove(),!t)throw Error(`The discard prompt has no footer.`);t.classList.remove(`wui-drawer-discarding`),S_.has(t)&&t.remove()}function F_(e){for(let t of O_(e))for(let e of t.querySelectorAll(h_))if(y_(e)&&e.type!==`hidden`&&!e.disabled){e.focus({preventScroll:!0});return}}function I_(e){let t=T_(e.target);if(t)for(let e of O_(t))b_.get(e)??b_.set(e,Ug(e))}function L_(e){for(let t of __(e).querySelectorAll(`form`)){let e=b_.get(t);e!=null&&b_.set(t,Wg(t,e))}}function R_(e){let t=e.target;t instanceof HTMLFormElement&&T_(t)&&b_.set(t,Ug(t))}function z_(e){if(!g_(e))return;let t=`handle`in e?e.handle:void 0;if(g_(t))return`el`in t?t.el:void 0}function B_(e){if(!(e instanceof CustomEvent))return;let t=e.detail,n=z_(t);if(n instanceof Element)for(let e of n.querySelectorAll(`form`))b_.delete(e)}function V_(e){let t=e.target;t instanceof Element&&t.matches(d_)&&[...O_(t)].some(k_)&&(e.preventDefault(),N_(t,t.getAttribute(`confirm-discard`),null))}function H_(e){let t=e.target;if(!(t instanceof Element)||!t.matches(f_))return;let n=[...O_(t)].find(k_);n&&(e.preventDefault(),N_(t,n.getAttribute(`data-wui-confirm-discard`)??t.getAttribute(`confirm-discard`)??l_().confirmDiscard,n))}function U_(e){let t=P(e.closest(m_),`The discard button is outside its prompt.`),n=E_(t);if(P_(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);for(let e of O_(n))b_.set(e,Ug(e));n.dispatchEvent(new CustomEvent(u_,{bubbles:!0})),n.matches(d_)?P(n.closest(`wui-drawer`),`The confirm-discard drawer is not a wui-drawer.`).hide():P(n.closest(`wui-modal`),`The discarded dialog is not a wui-modal.`).hide()}function W_(e){let t=P(e.closest(m_),`The keep button is outside its prompt.`),n=E_(t);if(P_(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);F_(n)}function G_(e){let t=v_(e.target,`[data-wui-discard-confirm]`);if(t){U_(t);return}let n=v_(e.target,`[data-wui-discard-keep]`);n&&W_(n)}function K_(e=document){let t=e instanceof Document?e:e.ownerDocument;x_.has(t)||(x_.add(t),t.addEventListener(`focusin`,I_),t.addEventListener(`pointerdown`,I_),t.addEventListener(`submit`,R_),t.addEventListener(Jr,L_),t.addEventListener(`wui:modal:success`,B_),t.addEventListener(`wui:modal:loaded`,B_),t.addEventListener(`wui-drawer-close`,V_,!0),t.addEventListener(`wui-modal-close`,H_),t.addEventListener(`click`,G_))}var q_={accountMenuLabel:`Account menu for {name}`,collapseNavLabel:`Collapse navigation`,emptyText:`You are all caught up.`,expandNavLabel:`Expand navigation`,label:`Notifications`,loadingNotificationsText:`Loading…`,logoutLabel:`Sign out`,markAllReadLabel:`Mark all read`,moreLabel:`More`,navLabel:`Main navigation`,newLabel:`New`,noResultsForText:`No results for “{value}”`,noResultsText:`No results`,noUnreadText:`No unread notifications`,notificationsLoadErrorMessage:`Could not load notifications.`,openNavLabel:`Open navigation`,placeholder:`Search`,profileLabel:`My profile`,resultCountText:`{count} result`,resultsCountText:`{count} results`,retryLabel:`Retry`,roleLabel:`Role:`,rolesLabel:`Roles:`,searchResultsLabel:`Search results`,searchUnavailableMessage:`Search is unavailable right now.`,seeAllResultsForText:`See all results for “{query}”`,skipLabel:`Skip to content`,tabBarLabel:`Quick navigation`,togglePagesLabel:`Show or hide {name} pages`,unreadBellLabel:`{label}, {count} unread`,unreadLabel:`Unread`,unreadNotificationsText:`{count} unread notifications`,viewAllLabel:`View all`},Q=()=>L(`shell`,q_),J_=31536e3,Y_=new WeakMap,X_=e=>e>99?`99+`:String(e),Z_=(e,t)=>Object.entries(t).reduce((e,[t,n])=>e.replaceAll(`{${t}}`,()=>String(n)),e);function Q_(e,t,n=document){try{n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${J_}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}function $_(e,t,n,r=document){try{let i=`${e}=`,a=r.cookie.split(`;`).map(e=>e.trim()).find(e=>e.startsWith(i)),o=new Set(a?a.slice(i.length).split(`.`).filter(Boolean):[]);n?o.add(t):o.delete(t),r.cookie=`${e}=${[...o].join(`.`)}; Path=/; Max-Age=${J_}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}var $=(e,t,n)=>{let r=e?.querySelector(t);return r instanceof n?r:null},ev=(e,t,n)=>{let r=e?.closest(t);return r instanceof n?r:null},tv=(e,t,n)=>e?[...e.querySelectorAll(t)].filter(e=>e instanceof n):[],nv=e=>{if(!(e.target instanceof Element))throw Error(`event target is not an element`);return e.target},rv=e=>{let t=e.getAttribute(`href`);if(t===null)throw Error(`search hit has no href`);return t},iv=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function av(e,t){let n=$(e,`.wui-bell-trigger`,HTMLElement),r=$(e,`.wui-bell-count`,HTMLElement),i=$(e,`[data-wui-bell-live]`,HTMLElement),a=$(e,`[data-wui-bell-list]`,HTMLElement),o=()=>P(a,`bell list missing`),s=$(e,`.wui-bell-menu`,HTMLElement),{src:c,readAction:l}=e.dataset,u=e.dataset.label||Q().label,d=e.dataset.emptyText||Q().emptyText,f=e.dataset.loadingText??Q().loadingNotificationsText,p=e.dataset.noUnreadText??Q().noUnreadText,m=e.dataset.unreadText??Q().unreadNotificationsText,h=e.dataset.bellLabel??Q().unreadBellLabel,g=Number(e.dataset.pollSeconds??60),_=Da(),v=Number(e.dataset.unread)||0,y=(t,a=!0)=>{let o=Math.max(0,Number(t)||0),s=o!==v;v=o,e.dataset.unread=String(o),r&&(r.textContent=X_(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?u:Z_(h,{label:u,count:X_(o)})),a&&s&&i&&(i.textContent=o===0?p:Z_(m,{count:X_(o)}))},b=()=>s?N(s):!1,x=()=>{let e=iv(`wui-bell-state`,`${Q().notificationsLoadErrorMessage} `),t=document.createElement(`button`);t.type=`button`,t.className=`btn btn-link btn-sm`,t.dataset.wuiBellRetry=``,t.textContent=Q().retryLabel,e.append(t),o().replaceChildren(e)},S=async t=>{if(t&&(o().setAttribute(`aria-busy`,`true`),o().querySelector(`.wui-bell-item`)||o().replaceChildren(iv(`wui-bell-state`,f))),c===void 0)throw Error(`bell has no data-src`);let n=await _.run(c);if(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)return;if(o().removeAttribute(`aria-busy`),!n.ok){t&&x();return}let r=Kl(n.html),i=$(r,`[data-wui-unread]`,HTMLElement),a=i?Number(i.getAttribute(`data-wui-unread`)):v;y(a),(t||b())&&(r.querySelector(`.wui-bell-item`)?o().replaceChildren(r):o().replaceChildren(iv(`wui-bell-state`,d))),e.dispatchEvent(new CustomEvent(`wui:notifications:loaded`,{bubbles:!0,detail:{unread:a}}))};s?.addEventListener(`beforetoggle`,e=>{`newState`in e&&e.newState===`open`&&S(!0)}),e.addEventListener(`click`,async e=>{let t=nv(e);if(t.closest(`[data-wui-bell-retry]`)){await S(!0);return}let n=ev(t,`[data-wui-bell-read]`,HTMLButtonElement);if(!n||!l)return;n.disabled=!0;let r=await W(l,{method:`POST`});n.disabled=!1,r.ok&&(y(0),await S(!0))});let C=null,w=()=>{g>0&&C===null&&(C=setInterval(()=>S(b()),g*1e3))},T=()=>{C!==null&&clearInterval(C),C=null},E=()=>{document.hidden?T():(S(b()),w())};return g>0&&(document.addEventListener(`visibilitychange`,E),document.hidden||w()),t.push(()=>{T(),_.abort(),document.removeEventListener(`visibilitychange`,E)}),{setUnread:e=>y(e),refresh:()=>S(b())}}var ov=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),sv=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function cv(e,t){let n=P($(e,`input.search-input`,HTMLInputElement),`search input missing`),r=$(e,`.wui-topsearch-results`,HTMLElement),i=()=>P(r,`search results missing`),a=$(e,`.wui-topsearch-open`,HTMLElement),o=$(e,`[data-wui-topsearch-live]`,HTMLElement),{src:s,param:c=`q`,resultsHref:l}=e.dataset,u=Number(e.dataset.minChars??2),d=Number(e.dataset.debounceMs??250),f=e.dataset.noResultsText??Q().noResultsText,p=e.dataset.resultsCountText??Q().resultsCountText,m=e.dataset.resultCountText??Q().resultCountText,h=Da(),g,_=-1,v=()=>tv(i(),`.wui-topsearch-hit`,HTMLElement),y=e=>{let t=v();_=t.length===0?-1:(e+t.length)%t.length,t.forEach((e,t)=>{let n=t===_;e.classList.toggle(`is-active`,n),e.setAttribute(`aria-selected`,n?`true`:`false`)});let r=_>=0?t[_]:void 0;r?(n.setAttribute(`aria-activedescendant`,r.id),r.scrollIntoView?.({block:`nearest`})):n.removeAttribute(`aria-activedescendant`)},b=()=>{i().hidden=!0,n.setAttribute(`aria-expanded`,`false`),n.removeAttribute(`aria-activedescendant`),_=-1},x=()=>{i().hidden=!1,n.setAttribute(`aria-expanded`,`true`)},S=t=>{e.classList.toggle(`is-open`,t),a?.setAttribute(`aria-expanded`,t?`true`:`false`)},C=t=>{let n=new CustomEvent(`wui:search:select`,{bubbles:!0,cancelable:!0,detail:{href:t}});e.dispatchEvent(n)&&window.location.assign(t)},w=async t=>{if(e.classList.add(`is-loading`),s===void 0)throw Error(`search has no data-src`);let n=await h.run(sv(s,c,t));if(n.kind!==`aborted`&&n.kind!==`stale`&&n.kind!==`session`){if(e.classList.remove(`is-loading`),n.ok){let e=Kl(n.html),t=$(e,`[data-wui-count]`,HTMLElement);i().replaceChildren(e),v().forEach((e,t)=>{e.id=`${i().id}-opt-${t}`});let r=t?Number(t.getAttribute(`data-wui-count`)):v().length;o&&(o.textContent=r===0?f:Z_(r===1?m:p,{count:r}))}else i().replaceChildren(iv(`wui-topsearch-empty`,Q().searchUnavailableMessage));_=-1,x()}};n.addEventListener(`input`,()=>{clearTimeout(g);let t=n.value.trim();t.length<u?(h.abort(),e.classList.remove(`is-loading`),i().replaceChildren(),b()):g=setTimeout(()=>w(t),d)}),n.addEventListener(`keydown`,t=>{if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(i().hidden||v().length===0)return;t.preventDefault(),y(_+(t.key===`ArrowDown`?1:-1))}else if(Pr(t)){let e=v(),r=_>=0?e[_]:void 0;!i().hidden&&r?(t.preventDefault(),C(rv(r))):l&&n.value.trim()!==``&&(t.preventDefault(),C(sv(l,c,n.value.trim())))}else t.key===`Escape`&&(i().hidden?e.classList.contains(`is-open`)&&(t.preventDefault(),t.stopPropagation(),S(!1),a?.focus()):(t.preventDefault(),t.stopPropagation(),b()))}),i().addEventListener(`click`,e=>{let t=ev(nv(e),`.wui-topsearch-hit`,HTMLElement);!t||e.ctrlKey||e.metaKey||e.shiftKey||e.button===1||(e.preventDefault(),C(rv(t)))}),a?.addEventListener(`click`,()=>{let t=!e.classList.contains(`is-open`);S(t),t&&n.focus()});let T=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||ov(e.target)||(e.preventDefault(),S(!0),n.focus())},E=t=>{t.target instanceof Node&&e.contains(t.target)||(b(),e.classList.contains(`is-open`)&&S(!1))};document.addEventListener(`keydown`,T),document.addEventListener(`pointerdown`,E),t.push(()=>{clearTimeout(g),h.abort(),document.removeEventListener(`keydown`,T),document.removeEventListener(`pointerdown`,E)})}function lv(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>{Q_(n,!!e.detail?.collapsed)});let r=e.dataset.wuiFoldedCookie;r&&e.addEventListener(`wui:shell:nav-fold`,e=>{$_(r,e.detail?.key,!!e.detail?.folded)}),e.addEventListener(`click`,t=>{nv(t).closest(`[data-wui-tabbar-more]`)&&$(e,`[data-app-shell-menu]`,HTMLElement)?.click()});let i=$(e,`[data-wui-bell]`,HTMLElement),a=i?av(i,t):null,o=$(e,`[data-wui-topsearch]`,HTMLElement);o&&cv(o,t);let s={el:e,setUnread(e){P(a,`WUI.shell: this <app-shell> has no <app-shell-notifications>.`).setUnread(e)},refreshNotifications(){return P(a,`WUI.shell: this <app-shell> has no <app-shell-notifications>.`).refresh()},get collapsed(){return e.classList.contains(`collapsed`)},set collapsed(t){if(!!t===e.classList.contains(`collapsed`))return;let n=$(e,`[data-app-shell-collapse]`,HTMLElement);n?n.click():e.classList.toggle(`collapsed`,!!t)}};Y_.set(e,s);let c=n=>{if(n.target===e||n.target instanceof Node&&n.target.contains(e)){for(let e of t)e();Y_.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,c)}};return document.addEventListener(`wui:teardown`,c),s}function uv(e=document){let t=[];e instanceof HTMLElement&&e.matches(`[data-app-shell]`)&&t.push(e),t.push(...tv(e,`[data-app-shell]`,HTMLElement));for(let e of t)e.dataset.wuiPartsWired||(e.dataset.wuiPartsWired=`1`,lv(e))}function dv(e){let t=ev(e,`[data-app-shell]`,HTMLElement);return t?(Y_.has(t)||uv(t),Y_.get(t)??null):null}var fv=`data-wui-submit-once`,pv=`data-wui-submit-pending`,mv=`wui-submit-spinner`,hv=new WeakSet,gv=new WeakMap;function _v(e){return e instanceof HTMLButtonElement||e instanceof HTMLInputElement?e:null}function vv(e){if(e.setAttribute(`aria-busy`,`true`),e.tagName===`INPUT`||e.querySelector(`.${mv}`))return;let t=e.ownerDocument.createElement(`span`);t.className=`spinner-border spinner-border-sm me-2 ${mv}`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t)}function yv(e){e.removeAttribute(`aria-busy`),e.querySelector(`.${mv}`)?.remove()}function bv(e){return e.method===`post`&&e.target!==`_blank`&&e.getAttribute(`data-wui-submit-once`)!==`off`}function xv(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!bv(t))return;if(t.hasAttribute(pv)){e.preventDefault();return}t.setAttribute(pv,``);let n=_v(e.submitter);setTimeout(()=>{t.hasAttribute(pv)&&(e.defaultPrevented?t.removeAttribute(pv):n&&(n.disabled=!0,vv(n),gv.set(t,n)))},0)}var Sv=e=>[...e.querySelectorAll(`form[${pv}]`)].filter(e=>e instanceof HTMLFormElement);function Cv(e){for(let t of Sv(e)){t.removeAttribute(pv);let e=gv.get(t);e&&(e.disabled=!1,yv(e),gv.delete(t))}}function wv(e){let t=e.ownerDocument===null?e:e.ownerDocument;hv.has(t)||(hv.add(t),t.addEventListener(`submit`,xv,!0),t.defaultView?.addEventListener(`pageshow`,()=>Cv(t)))}var Tv=[`light`,`dark`,`auto`],Ev=[`wave`,`circle`,`slide`,`blinds`,`fade`,`none`],Dv=`fade`,Ov=`theme`,kv={wave:1100,circle:700,slide:600,blinds:900,fade:350,none:0},Av=`wui-theme-switching`,jv=`wui:theme:change`,Mv=`(prefers-color-scheme: dark)`,Nv=e=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(e).matches,Pv=e=>Tv.some(t=>t===e);function Fv(e){return e===`dark`||e===`auto`&&Nv(Mv)?`dark`:`light`}function Iv(e=Ov){let t=null;try{t=window.localStorage.getItem(e)}catch(e){if(!(e instanceof DOMException))throw e}return Pv(t)?t:`auto`}function Lv(e,t=Ov){try{window.localStorage.setItem(t,e)}catch(e){if(!(e instanceof DOMException))throw e}}function Rv(e){let t=document.documentElement,n=Fv(e);t.setAttribute(`data-theme`,e),t.setAttribute(`data-bs-theme`,n),document.dispatchEvent(new CustomEvent(jv,{detail:{mode:n,preference:e}}))}var zv=`((k)=>{var m;try{m=localStorage.getItem(k)}catch{m=null}if(m!=='light'&&m!=='dark')m='auto';var r=document.documentElement,q=window.matchMedia?window.matchMedia('(prefers-color-scheme: dark)'):null;function s(){var t=r.getAttribute('data-theme');r.setAttribute('data-bs-theme',t==='auto'?(q?.matches?'dark':'light'):t)}r.setAttribute('data-theme',m);s();if(q?.addEventListener)q.addEventListener('change',()=>{if(r.getAttribute('data-theme')==='auto')s()})})(`;function Bv(e=Ov){return`${zv}${JSON.stringify(String(e)).replace(/</g,`\\u003c`)})`}function Vv(e,{includeAuto:t=!1}={}){return e===`light`?`dark`:e===`dark`&&t?`auto`:`light`}function Hv(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(Mv),n=()=>e(t.matches?`dark`:`light`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var Uv=60,Wv=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,Gv=e=>e.toFixed(1),Kv=(e,t)=>`${Gv(e)}px ${Gv(t)}px`,qv={amplitude:22,segments:36,cycles:1.5,ripples:2},Jv=6,Yv=(e,t,n,r,i)=>{let{amplitude:a,segments:o,cycles:s}=qv,c=n*(t+2*a),l=i?t+a-c:c-a,u=i?t+2*a:-2*a,d=[Kv(0,u)];for(let t=0;t<=o;t++){let n=e*t/o,i=l+a*Math.sin(2*Math.PI*s*t/o+r);d.push(Kv(n,i))}return d.push(Kv(e,u)),`polygon(${d.join(`, `)})`},Xv=(e,t,n,r)=>{let i=t/Jv,a=[];for(let t=0;t<Jv;t++){let o=t*i,s=i*n,c=r?o+i-s:o,l=r?o+i:o+s;a.push(Kv(0,c),Kv(e,c),Kv(e,l),Kv(0,l))}return`polygon(${a.join(`, `)})`};function Zv(e,{width:t,height:n,to:r=`dark`,origin:i}){let a=r===`dark`,o=[];for(let r=0;r<=Uv;r++){let s=r/Uv,c=Wv(s);switch(e){case`circle`:{let e=i?.x??t/2,r=i?.y??n/2,a=Math.hypot(Math.max(e,t-e),Math.max(r,n-r));o.push({clipPath:`circle(${Gv(a*c)}px at ${Gv(e)}px ${Gv(r)}px)`});break}case`slide`:{let e=n*(1-c);o.push({clipPath:a?`inset(${Gv(e)}px 0px 0px 0px)`:`inset(0px 0px ${Gv(e)}px 0px)`});break}case`blinds`:o.push({clipPath:Xv(t,n,c,a)});break;case`fade`:o.push({clipPath:`none`,opacity:c});break;case`none`:return[];default:o.push({clipPath:Yv(t,n,c,s*qv.ripples*2*Math.PI,a)})}}return o}var Qv=e=>{e instanceof DOMException&&(e.name===`AbortError`||e.name===`InvalidStateError`)||V(`[@webority/ui-elements] The theme view transition failed:`,e)};function $v(e,{effect:t=Dv,to:n,origin:r,duration:i}={}){let a=document.documentElement,o=n!==void 0&&a.getAttribute(`data-bs-theme`)===n;if(t===`none`||o||Nv(`(prefers-reduced-motion: reduce)`)||typeof document.startViewTransition!=`function`||typeof a.animate!=`function`)return e(),Promise.resolve(!1);a.classList.add(Av);let s=document.startViewTransition(e),c=i??kv[t]??kv.fade;return s.ready.then(()=>{let e=Zv(t,{width:window.innerWidth,height:window.innerHeight,to:n,origin:r});a.animate(e,{duration:c,easing:`linear`,fill:`both`,pseudoElement:`::view-transition-new(root)`})}).catch(Qv),s.finished.catch(Qv).finally(()=>a.classList.remove(Av)).then(()=>!0)}function ey(){At(),i(`wui-select`,hc),i(`wui-dock`,Oi),i(`wui-otp`,ho),i(`wui-shortcuts`,Lc),i(`wui-record-pager`,zo),i(`wui-data-table`,Di),i(`wui-hover-card`,Ri),i(`wui-modal`,zi),i(`wui-navigation-menu`,Ji),i(`wui-notification-center`,Ka),i(`wui-onboarding-checklist`,eo),i(`wui-overflow`,Ao),i(`wui-rating`,Ro),i(`wui-relative-time`,ts),i(`wui-show-more`,Vc),i(`wui-truncate`,Hc),i(`wui-whats-new`,Xc)}return globalThis.WeborityUiElementsInternal||(globalThis.WeborityUiElementsInternal={version:`0.173.1`,modules:Hu}),oi(),ey(),e.AVATAR_ACCEPT=Wu,e.AVATAR_MAX_SIZE_MB=Gu,e.AVATAR_OUTPUT_SIZE=Ku,e.AVATAR_OUTPUT_TYPE=qu,e.AVATAR_PREVIEW_SIZES=Ju,e.BAR_BULK_IN_BAR_ATTRIBUTE=Cf,e.COLUMN_MAX_WIDTH=Kn,e.COLUMN_MIN_WIDTH=Gn,e.COMMAND_SHORTCUT_ATTRIBUTE=dd,e.CONFIRM_DIALOG_ID=Lh,e.CONFIRM_TONES=Rh,e.COPY_FEEDBACK_MS=Sl,e.CSRF_META_NAME=pa,e.CURRENCIES=Xt,e.CURRENCY_SYMBOLS=Mt,e.DATE_PATTERNS=$t,e.DEFAULT_CSRF_HEADER=ma,e.DEFAULT_CURRENCY=jt,e.DEFAULT_IMAGE_ACCEPT=bd,e.DEFAULT_MAX_SIZE_MB=xd,e.DEFAULT_PASSWORD_RULES=Nf,e.DEFAULT_THEME_EFFECT=Dv,e.DEFAULT_THEME_STORAGE_KEY=Ov,e.DISCARD_EVENT=u_,e.DROP_OVER_CLASS=Vf,e.DURATION_UNITS=Qt,e.FILTER_POPOVER_MAX_CHIPS=vt,e.FLASH_STORAGE_KEY=Vh,e.FLASH_VARIANTS=zh,e.FORMAT_STYLES=Yt,e.HTTP_KINDS=va,e.IST_TIME_ZONE=z,e.MASK_INPUT_TYPES=Ud,e.MASK_NAMES=Qd,e.MENTION_ID_PATTERN=Tl,e.MONEY_UNITS=Zt,e.NOTIFICATION_COUNT_CAP=$i,e.PIN_AT_VAR=pr,e.PIN_SIDES=Yn,e.RESIZE_STEP=qn,e.RESIZE_STEP_LARGE=Jn,e.ROW_DRAG_TYPE=Hf,e.ROW_DROP_EVENT=Bf,e.ROW_HEIGHTS=Zn,e.ROW_MOVE_LIMIT=_r,e.ROW_MOVE_MS=vr,e.ROW_SAVE_ATTR=Er,e.ROW_SAVE_ERROR_CLASS=Dr,e.ROW_SAVE_STATES=Tr,e.SCROLL_EDGE_SELECTOR=gp,e.SEARCH_OPEN_KEY=Qu,e.SELECT_CELL_CLASS=q,e.SHORTCUTS_OFF_ATTRIBUTE=et,e.SHORTCUT_EVENT=nt,e.SHORTCUT_SCOPE_ATTRIBUTE=tt,e.SUBMIT_ONCE_ATTRIBUTE=fv,e.THEME_BOOT_SCRIPT_BODY=zv,e.THEME_CHANGE_EVENT=jv,e.THEME_EFFECTS=Ev,e.THEME_EFFECT_DURATION=kv,e.THEME_MODES=Tv,e.THEME_SWITCHING_CLASS=Av,e.TOAST_ACTION_METHODS=ca,e.TOAST_ACTION_MS=Jp,e.VIRTUAL_OVERSCAN=Xn,e.WHATS_NEW_READ_EVENT=Uc,e.WUI_HEADERS=U,e.WuiDataTable=Di,e.WuiDock=Oi,e.WuiHoverCard=Ri,e.WuiNavigationMenu=Ji,e.WuiNotificationCenter=Ka,e.WuiOnboardingChecklist=eo,e.WuiOtp=ho,e.WuiOverflow=Ao,e.WuiRating=Ro,e.WuiRecordPager=zo,e.WuiRelativeTime=ts,e.WuiSelect=hc,e.WuiShortcuts=Lc,e.WuiShowMore=Vc,e.WuiTruncate=Hc,e.WuiWhatsNew=Xc,e.acceptDroppedFiles=Ld,e.acceptLabel=Pd,e.addRowSelectCells=ou,e.addSelectColumn=su,e.applyBarBulk=Af,e.applyTheme=Rv,e.ariaKeyShortcuts=dt,e.attachFileDrop=Rd,e.attachInputMask=mf,e.attachRowDrag=fp,e.attachScrollEdges=vp,e.attachShiftRange=uu,e.avatarCropOptions=Zu,e.avatarUnreadableMessage=Xu,e.barBulkCountText=Ef,e.buildPasswordRules=If,e.clampColumnWidth=or,e.classifyStatus=Sa,e.closeRemotePane=Ih,e.collapseSearch=sd,e.configureCsrf=ga,e.confirmAction=tg,e.copyTextToClipboard=Cl,e.createDiscardPrompt=w_,e.createRequestQueue=Da,e.createSelectHeaderCell=eu,e.createSelectRowCell=tu,e.createSelectSpacerCell=nu,e.currencyPrefix=Pt,e.deriveStepStatus=Jl,e.emptyValueLabel=B,e.evaluatePassword=Lf,e.fillText=R,e.formValues=Ug,e.formatCompact=kn,e.formatCurrency=Dn,e.formatDate=Fn,e.formatDateTime=zn,e.formatDuration=Mn,e.formatFileSize=jd,e.formatMasked=sf,e.formatNumber=En,e.formatPercent=An,e.formatRelativeTime=qo,e.formatValue=Ln,e.getServerTable=Kp,e.getShell=dv,e.glyphNode=_s,e.groupCount=ar,e.groupItems=sr,e.groupNotificationsByDay=sa,e.identityCell=Or,e.inShortcutScope=ht,e.initCollapsibleSearch=ud,e.initCommandShortcuts=_d,e.initDrawerDiscard=K_,e.initInputMasks=Sf,e.initPageBarBulk=jf,e.initRemoteModals=Ah,e.initRowDrag=hp,e.initScrollEdges=wp,e.initServerActions=Tg,e.initServerTables=Gp,e.initShellParts=uv,e.initSubmitOnce=wv,e.initUnsavedChanges=s_,e.isCommandChord=md,e.isCurrencyCode=Nt,e.isHeicFile=Yu,e.isImageFile=kd,e.isImageOnlyAccept=Nd,e.isMaskPattern=ef,e.isPdfFile=Md,e.isTimeZone=Bt,e.isTypingTarget=ft,e.loadRemoteDrawer=Nh,e.loadRemoteModal=jh,e.loadRemotePane=Fh,e.maskedPostValue=uf,e.matchSegments=gu,e.matchesAccept=Fd,e.measureRows=Sr,e.mentionLabel=Ol,e.mentionTextFromValue=jl,e.mentionValueFromText=Ml,e.mentionedIds=Nl,e.moveFocus=_t,e.nextTheme=Vv,e.notificationCountText=na,e.notificationDayHeading=oa,e.notificationTime=aa,e.notificationTriggerLabel=ra,e.notificationUnreadAnnouncement=ia,e.openSearch=od,e.parseMentionValue=Al,e.parseServerHtml=Kl,e.parseToastAction=da,e.passwordSatisfies=Rf,e.pinAtValue=mr,e.pinClasses=gr,e.pinOffsetVar=fr,e.planPins=hr,e.playRowMoves=Cr,e.pluralText=Je,e.postedMasked=of,e.rawMasked=af,e.readColumnWidths=ur,e.readCsrf=ba,e.readStoredTheme=Iv,e.readText=L,e.relativeTimeTitle=Jo,e.resetUnsavedChanges=c_,e.resolveMask=nf,e.resolveTheme=Fv,e.rowLabel=kr,e.rowOrderChanged=wr,e.runShortcut=gt,e.runToastAction=tm,e.saveOutcomeText=Mr,e.setRowSaveState=Ar,e.setText=Ge,e.settledRows=jr,e.shortcutKey=ut,e.shortcutName=lt,e.shortcutsOff=mt,e.showResultToast=em,e.stepperHeaderItems=Yl,e.storeTheme=Lv,e.syncSelectAll=cu,e.syncTargets=mp,e.themeBootScript=Bv,e.themeKeyframes=Zv,e.tickedKeys=$f,e.timeZoneLabel=Hn,e.timeoutFromAttribute=Ta,e.toInstant=Nn,e.todayIn=Kt,e.transitionTheme=$v,e.validateFile=Id,e.virtualRange=cr,e.wallClockOf=Gt,e.watchSystemTheme=Hv,e.whenElementsReady=ci,e.withTrustedLabel=Es,e.writeColumnWidths=dr,e.wuiFetch=W,e.zoneOffsetMs=Ht,e.zoneParts=Vt,e})({});
|
|
1
|
+
var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},r=n({defineElement:()=>i});function i(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 a=n({ElementBase:()=>s,NO_DOM_MESSAGE:()=>o}),o=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(o);var s=HTMLElement,c=n({isRtl:()=>l,mirrorKey:()=>u});function l(e){return getComputedStyle(e).direction===`rtl`}function u(e,t){return t?e===`ArrowRight`?`ArrowLeft`:e===`ArrowLeft`?`ArrowRight`:e:e}var d=n({anchorOverlay:()=>T,bindReanchor:()=>E,unbindReanchor:()=>ee}),f=4,p=8,m=300,h=400;function g(e,t,n){let r=t.offsetWidth,i=t.offsetHeight,a=n?e.left-f-r<f:e.right+f+r>window.innerWidth-f,o=n?!a:a,s=o?e.left-f-r:e.right+f;t.style.left=`${Math.max(f,s)}px`,t.style.top=`${Math.max(f,Math.min(e.top,window.innerHeight-i-f))}px`,t.dataset.side=o?`start`:`end`}function _(e,t){return t?e===`start`?`end`:e===`end`?`start`:e:e}var v=8,y={top:`bottom`,bottom:`top`,start:`end`,end:`start`},b=[`bottom`,`top`,`end`,`start`];function x(e,t){return e===`bottom`?window.innerHeight-t.bottom:e===`top`?t.top:e===`end`?window.innerWidth-t.right:t.left}function S(e,t,n,r){return e===`start`?t:e===`end`?n-r:t+(n-t-r)/2}function C(e,t,n){return Math.max(v,Math.min(e,t-n-v))}function w(e,t,n,r){let i=r.gap??f,a=r.align??`start`,o=t.offsetWidth,s=t.offsetHeight,c=n===`auto`?b.reduce((t,n)=>x(n,e)>x(t,e)?n:t):n,l=c===`top`||c===`bottom`,u=(l?s:o)+i,d=x(c,e)<u&&x(y[c],e)>x(c,e)?y[c]:c,p=s;if(r.clampHeight){let n=d===`bottom`?window.innerHeight-e.bottom-i-f:d===`top`?e.top-i-f:window.innerHeight-8;n<s&&(p=Math.max(n,0),t.style.maxHeight=`${p}px`)}let m,h;if(l){h=d===`bottom`?e.bottom+i:Math.max(f,e.top-p-i);let t=S(a,e.left,e.right,o);r.flipAlign&&a===`start`&&t+o>window.innerWidth-f&&e.right-o>=f?t=e.right-o:r.flipAlign&&a===`end`&&t<f&&e.left+o<=window.innerWidth-f&&(t=e.left),m=Math.max(f,Math.min(t,window.innerWidth-o-f))}else m=Math.max(f,d===`end`?e.right+i:e.left-o-i),h=Math.max(f,Math.min(S(a,e.top,e.bottom,p),window.innerHeight-p-f));t.style.left=`${m}px`,t.style.top=`${h}px`,t.dataset.side=d;let g=r.arrow;if(g){if(l){let t=(e.left+e.right)/2-m-g.offsetWidth/2;g.style.left=`${C(t,o,g.offsetWidth)}px`}else{let t=(e.top+e.bottom)/2-h-g.offsetHeight/2;g.style.top=`${C(t,p,g.offsetHeight)}px`}}}function T(e,t,n={}){if(!e)throw Error(`anchorOverlay: missing trigger`);if(!t)throw Error(`anchorOverlay: missing panel`);t.style.position=`fixed`;let r=e.getBoundingClientRect(),i=e instanceof Element&&l(e);if(n.beside){g(r,t,i);return}if(n.side!==void 0){let e=n.clampHeight?Array.from(t.children,e=>[e,e.scrollTop]):[];t.classList.remove(`drop-up`),t.style.maxHeight=``,w(r,t,n.side===`auto`?`auto`:_(n.side,i),n);for(let[t,n]of e)t.scrollTop=n;return}let a=n.clampHeight?t.scrollTop:0;n.clampHeight&&(t.style.maxHeight=``);let o=t.offsetHeight,s=window.innerHeight-r.bottom,c=!n.below&&s<o+f&&r.top>s;if(t.classList.toggle(`drop-up`,c),t.style.top=c?`${Math.max(f,r.top-o-f)}px`:`${r.bottom+f}px`,n.clampHeight){let e=c?r.top-8:window.innerHeight-r.bottom-8;e<o&&(t.style.maxHeight=`${Math.max(e,0)}px`),t.scrollTop=a}n.matchWidth&&(r.width>=m?(t.style.minWidth=`${r.width}px`,t.style.width=`${r.width}px`,t.style.maxWidth=`${r.width}px`):(t.style.minWidth=`${r.width}px`,t.style.width=`max-content`,t.style.maxWidth=`${Math.min(h,window.innerWidth-8)}px`));let u=t.offsetWidth;if(n.alignEnd){let e=r.right-u,n=e>=p?e:r.left,i=Math.max(p,Math.min(n,window.innerWidth-u-p));t.style.left=`${i}px`}else{let e=n.flipAlign&&r.left+u>window.innerWidth-f&&r.right-u>=f,i=Math.min(e?r.right-u:r.left,window.innerWidth-u-f);t.style.left=`${Math.max(f,i)}px`}}function E(e,t){ee(e),e._reanchor=t,e._reanchorScroll=n=>{n.composedPath().includes(e)||t()},window.addEventListener(`resize`,e._reanchor),window.addEventListener(`scroll`,e._reanchorScroll,!0)}function ee(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 D=n({CLOSE_MOTION_LIMIT_MS:()=>400,CLOSING_ATTRIBUTE:()=>te,DISMISS_ATTRIBUTE:()=>k,OPEN_ATTRIBUTE:()=>O,closeAnchoredPopover:()=>j,closeModalDialog:()=>Oe,isPopoverOpen:()=>M,onOverlayRootChange:()=>Pe,openAnchoredPopover:()=>ke,openModalDialog:()=>De,overlayRoot:()=>Ne,raisePopover:()=>je,returnFocus:()=>we,setPopoverOpen:()=>Ae,wireOpenTriggers:()=>Fe}),O=`data-wui-open`,k=`data-wui-dismiss`,te=`data-wui-closing`,ne=`[${k}]`,re=`[${O}]`,ie=`(prefers-reduced-motion: reduce)`,ae=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,oe=400,se=new WeakSet,ce=new WeakSet,le=new WeakSet,ue=Symbol.for(`webority.ui.modal-stack`),de=Symbol.for(`webority.ui.root-watches`);function fe(e){let t=e;return t[de]??=new Set,t[de]}var pe=new WeakMap,me=new WeakMap,he=new WeakMap;function ge(e){let t=e.querySelector(`[data-autofocus]`);if(t)return t;let n=null;for(let t of e.querySelectorAll(ae))if(!t.closest(`[hidden],[inert]`)){if(!t.closest(`${ne},.wui-modal-back`))return t;n??=t}return n}function _e(e){let t=[],n=new Map;for(let r of e.querySelectorAll(ae))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 ve(e){return e.localName.includes(`-`)&&`show`in e&&typeof e.show==`function`}function ye(e){return e.localName.includes(`-`)&&customElements.get(e.localName)===void 0}function be(e){let t=e;return t[ue]??=[],t[ue]}function A(e){xe(e),be(e.ownerDocument).push(e)}function xe(e){let t=be(e.ownerDocument),n=t.indexOf(e);n>=0&&t.splice(n,1)}function Se(e){for(let t of fe(e)){let n=Ne(e);t.last!==n&&(t.last=n,t.listener(n))}}function Ce(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 we(e,t){if(!e?.isConnected)return;let n=e.ownerDocument.activeElement;(!n||n===e.ownerDocument.body||t.contains(n))&&e.focus()}function Te(e){let t=e.getBoundingClientRect();return t.bottom<0||t.right<0||t.top>window.innerHeight||t.left>window.innerWidth}function Ee(e,t){he.get(e)?.();let n=t.ownerDocument,r=0,i=()=>{window.clearTimeout(o),window.clearTimeout(r),n.removeEventListener(`pointerdown`,i,!0),n.removeEventListener(`keydown`,i,!0),t.removeEventListener(`click`,a,!0),he.delete(e)},a=()=>{t.removeEventListener(`click`,a,!0),r=window.setTimeout(i,0)},o=window.setTimeout(i,oe);n.addEventListener(`pointerdown`,i,!0),n.addEventListener(`keydown`,i,!0),t.addEventListener(`click`,a,!0),he.set(e,i)}function De(e,t){let n=t.focus===`first-control`?ge(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`),se.add(e);let o=()=>{if(A(e),!e.hasAttribute(`open`)){let t=n!==null&&!e.querySelector(`[autofocus]`);t&&n.setAttribute(`autofocus`,``);try{e.showModal()}catch(t){throw xe(e),t}finally{t&&n.removeAttribute(`autofocus`)}}r.focus(),Se(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;Ne(r)===e&&(e.querySelector(`:popover-open`)||r.querySelector(`[popover=""]:popover-open, [popover="auto"]:popover-open`)||(s=!0,window.setTimeout(()=>{s&&se.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(Ne(n)!==e||e.querySelector(`:popover-open`))return;t.preventDefault();let r=_e(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(ne);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,xe(e),se.has(e)?(o(),n&&t.onRequestClose(`escape`)):Se(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),se.delete(e),i&&e.removeAttribute(`tabindex`),a&&e.removeAttribute(`closedby`),xe(e),Se(e.ownerDocument)}}async function Oe(e){se.delete(e),e.setAttribute(te,``),!window.matchMedia(ie).matches&&typeof e.getAnimations==`function`&&e.getAnimations().length>0&&await Ce(e),e.close(),xe(e),Se(e.ownerDocument),e.removeAttribute(te)}function ke(e,t,n){let r=he.get(t);if(r){r();return}pe.get(t)?.(),t.setAttribute(`popover`,n.mode),t.showPopover();let i=()=>T(e,t,n);try{i()}catch(e){throw j(t),e}E(t,()=>{!M(t)||!t.isConnected?me.get(t)?.():e.isConnected&&n.scrollSettling?.()?i():!e.isConnected||!n.keepOffscreen&&Te(e)?j(t):i()});let a=new ResizeObserver(()=>{M(t)&&t.isConnected&&e.isConnected&&i()});a.observe(t);let o=e=>{`newState`in e&&e.newState===`closed`&&me.get(t)?.()},s=()=>{n.mode===`auto`&&M(t)&&Ee(t,e)};t.addEventListener(`toggle`,o),e.addEventListener(`pointerdown`,s,!0),pe.set(t,()=>{t.removeEventListener(`toggle`,o),e.removeEventListener(`pointerdown`,s,!0),ee(t),a.disconnect(),pe.delete(t),me.delete(t)}),me.set(t,()=>{pe.get(t)?.(),n.onClosed?.()})}function j(e){M(e)&&e.hidePopover(),me.get(e)?.()}function M(e){return e.matches(`:popover-open`)}function Ae(e,t){Me(e),M(e)!==t&&(t?e.showPopover():e.hidePopover())}function je(e){if(Me(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 Me(e){if(!e.hasAttribute(`popover`))throw Error(`nativeOverlay: the panel has no popover attribute`)}function Ne(e=document){let t=be(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}function Pe(e,t=document){ce.has(t)||(ce.add(t),t.addEventListener(`toggle`,()=>Se(t),!0),t.addEventListener(`close`,()=>Se(t),!0));let n={last:Ne(t),listener:e};return fe(t).add(n),()=>{fe(t).delete(n)}}function Fe(e){le.has(e)||(le.add(e),e.addEventListener(`click`,t=>{let n=t.target,r=n instanceof Element?n.closest(re):null;if(!(r instanceof HTMLElement))return;let i=(r.getAttribute(`data-wui-open`)??``).replace(/^#/,``),a=e.getElementById(i);if(!a)throw Error(`[data-wui-open] names #${i}, which is not on the page.`);ve(a)?(t.preventDefault(),a.show(r)):ye(a)&&(t.preventDefault(),customElements.whenDefined(a.localName).then(()=>{a.isConnected&&ve(a)&&a.show(r)}))}))}var Ie=n({closestOf:()=>P,elementOf:()=>Le,make:()=>F,must:()=>N});function N(e,t){if(e==null)throw Error(t);return e}function Le(e,t,n){if(!(e instanceof t))throw TypeError(n);return e}function P(e,t){return e instanceof Element?e.closest(t):null}function F(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 Re=n({fillText:()=>L,pluralText:()=>Xe,readText:()=>I,setText:()=>qe,subscribeText:()=>Je,textLocale:()=>Ye}),ze=`en-IN`,Be=/\{([A-Za-z0-9_]+)\}/g,Ve=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0,He,Ue=new Map,We=0,Ge=new Set,Ke=new Map;function qe(e){let t=new Map,n,r=Object.entries(e);for(let[e,i]of r)if(i!==void 0){if(e===`locale`){if(typeof i!=`string`)throw RangeError(`Text locale must be a BCP 47 tag string.`);n=i}else{if(!Ze(i))throw RangeError(`Text ${e} must be an object of string keys.`);t.set(e,Qe(e,i))}}He=n,Ue=t,We+=1;for(let e of Array.from(Ge))e()}function I(e,t){let n=Ue.get(e);if(n===void 0)return t;let r=Ke.get(e);if(r!==void 0&&r.version===We&&r.english===t&&et(r.merged,t))return r.merged;let i=$e(e,n,t);return Ke.set(e,{version:We,english:t,merged:i}),i}function Je(e){return Ge.add(e),()=>{Ge.delete(e)}}function Ye(){return He??ze}function L(e,t){return e.replace(Be,(e,n)=>Ve(t,n)?String(t[n]):e)}function Xe(e,t,n,r){let i=`${t}Other`;if(!Ve(e,i))throw RangeError(`Plural text ${t} has no ${i} key; every plural needs its Other form.`);let a=new Intl.PluralRules(Ye()).select(n),o=`${t}${a.charAt(0).toUpperCase()}${a.slice(1)}`,s=e[Ve(e,o)?o:i];if(s===void 0)throw RangeError(`Plural text ${t} has no ${o} key.`);return L(s,{count:n,...r})}function Ze(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Qe(e,t){let n={};for(let[r,i]of Object.entries(t)){if(typeof i!=`string`)throw RangeError(`Text ${e}.${r} must be a string.`);n[r]=i}return n}function $e(e,t,n){let r={};for(let[i,a]of Object.entries(t)){let t=Ve(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=tt(t);for(let t of tt(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 et(e,t){let n=Object.keys(t);return Object.keys(e).length===n.length&&n.every(t=>Ve(e,t))}function tt(e){return Array.from(e.matchAll(Be),e=>e[1]??``)}var nt=`data-wui-shortcuts`,rt=`data-shortcut-scope`,it=`wui:shortcut`,at={"/":`slash`,"?":`help`,Escape:`esc`,Esc:`esc`,Enter:`enter`},ot={esc:`Esc`,escape:`Esc`,enter:`Enter`,slash:`/`,help:`?`},st={esc:`Escape`,ctrl:`Control`,cmd:`Meta`,option:`Alt`,opt:`Alt`},ct=new Set([`checkbox`,`radio`,`button`,`submit`,`reset`,`range`,`color`,`file`,`image`]),lt=new Set([`textbox`,`searchbox`,`combobox`]),ut=`a[href], button, summary, input, select, textarea, [role="button"], [role="link"], [role="menuitem"], [role="option"], [role="tab"], [role="checkbox"], [role="switch"]`;function dt(e){if(!e||e.ctrlKey||e.metaKey||e.altKey)return null;let t=e.key;return typeof t!=`string`||!t?null:at[t]?at[t]:t.length===1&&t.trim()?t.toLowerCase():null}function ft(e){let t=String(e??``).trim();return t.length===1?t.toUpperCase():ot[t.toLowerCase()]??t}function pt(e){return String(e??``).trim().split(/\s+/).filter(Boolean).map(e=>st[e.toLowerCase()]??(e.length===1?e.toUpperCase():e)).join(`+`)}function mt(e){if(!e||!ht(e))return!1;if(e instanceof HTMLElement&&e.isContentEditable||e.closest?.(`[contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]`)||e.tagName===`TEXTAREA`||e.tagName===`SELECT`)return!0;if(e.tagName===`INPUT`){let t=e instanceof HTMLInputElement&&e.type?e.type:`text`;return!ct.has(t.toLowerCase())}return lt.has(e.getAttribute?.(`role`))}function ht(e){return e.nodeType===1}function gt(e=typeof document>`u`?null:document){return e?.documentElement?.getAttribute(nt)===`off`}function _t(e,t){if(!t||e&&t.contains(e))return!0;let n=t.ownerDocument;return(!e||e===n.body||e===n.documentElement)&&n.querySelector(`[data-shortcut-scope]`)===t}function vt(e,t,n=null){let r=e.target instanceof Node?e.target:null;if(!t||e.defaultPrevented||gt(r?.ownerDocument??void 0))return!1;let i=dt(e);if(!i||!_t(r,n)||mt(r))return!1;let a=t[i]??(i.length===1?t[i.toUpperCase()]:void 0);return typeof a!=`function`||i===`enter`&&r instanceof Element&&r.closest(ut)?!1:(e.preventDefault(),a(e),!0)}function yt(e,t){let n=e[0]?.ownerDocument;if(!n)return null;let r=n.activeElement,i=e.findIndex(e=>e===r||e.contains(r));if(i<0&&r&&r!==n.body){let t=r.closest?.(`li, tr`);t&&(i=e.findIndex(e=>t.contains(e)))}i<0&&(i=e.findIndex(e=>e.getAttribute(`aria-current`)===`true`));let a=N(e[i<0?t>0?0:e.length-1:Math.min(e.length-1,Math.max(0,i+t))],`moveFocus: no item at the clamped index`);return a.focus(),a.scrollIntoView?.({block:`nearest`}),a}var bt=2,xt=`wui-filter-popover-pinned`,St=`.wui-filter-popover-trigger`,Ct=`.wui-filter-popover-panel`,wt=`.wui-filter-popover-head`,Tt=`input:not([type]),input[type="text"],input[type="search"]`,Et=`a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1'])`;function Dt(){try{return sessionStorage.getItem(xt)===`1`}catch{return!1}}function Ot(e){try{e?sessionStorage.setItem(xt,`1`):sessionStorage.removeItem(xt)}catch(e){if(!(e instanceof DOMException))throw e}}function kt(e){if(e===null||e instanceof Node)return e;throw TypeError(`event target is not a node`)}function At(e,t){let n=e?.querySelector(t)??null;return n instanceof HTMLElement?n:null}var jt=class extends s{_doc;_timer;_sticky;_closingByCode;_inside;_pendingSubmit;_onEnter;_onLeave;_onClick;_onChange;_onListClose;_onFocusOut;_onKeyDown;_onShortcut;constructor(){super(),this._doc=null,this._timer=null,this._sticky=!1,this._closingByCode=!1,this._inside=!1,this._pendingSubmit=!1,this._onEnter=e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`&&(this._inside=!0,this._schedule(!0))},this._onLeave=e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`&&(this._inside=!1,this._schedule(!1))},this._onClick=e=>{this._trigger?.contains(kt(e.target))&&(this._clear(),this.isOpen&&this._sticky?this._close(!0):this._open(!0,e.detail===0))},this._onChange=e=>{let t=this._pin;if(t&&e.target===t){Ot(t.checked),t.checked?this._clear():this._schedule(!1);return}let n=e.target;if(n instanceof Element&&n.closest(`wui-select[mode="multiple"], wui-select[mode="tag"]`)?.querySelector(`[aria-expanded="true"]`)){this._pendingSubmit=!0;return}let r=this.closest(`form.wui-filter-form`);r instanceof HTMLFormElement&&r.requestSubmit()},this._onListClose=()=>{if(!this._pendingSubmit)return;this._pendingSubmit=!1;let e=this.closest(`form.wui-filter-form`);e instanceof HTMLFormElement&&e.requestSubmit()},this._onFocusOut=e=>{this.contains(kt(e.relatedTarget))||this._schedule(!1)},this._onKeyDown=e=>{let t=e.target;if(e.key!==`Enter`||!(t instanceof Element)||!this._panel?.contains(t)||!t.matches(Tt))return;e.preventDefault();let n=this.closest(`form.wui-filter-form`);n instanceof HTMLFormElement&&n.requestSubmit()},this._onShortcut=e=>{this.ownerDocument.querySelector(`wui-filter-popover`)===this&&vt(e,{f:()=>this._open(!0,!0)})}}get isOpen(){let e=this._panel;return e?M(e):!1}connectedCallback(){this._doc=this.ownerDocument,this.addEventListener(`pointerenter`,this._onEnter),this.addEventListener(`pointerleave`,this._onLeave),this.addEventListener(`click`,this._onClick),this.addEventListener(`change`,this._onChange),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`wui-select:close`,this._onListClose),this._doc.addEventListener(`keydown`,this._onShortcut),Dt()&&this._pin&&(this._pin.checked=!0,this._open(!1,!1))}disconnectedCallback(){this._clear();let e=this._panel;e&&this._closeByCode(e),this.removeEventListener(`pointerenter`,this._onEnter),this.removeEventListener(`pointerleave`,this._onLeave),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`change`,this._onChange),this.removeEventListener(`focusout`,this._onFocusOut),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`wui-select:close`,this._onListClose),this._doc?.removeEventListener(`keydown`,this._onShortcut),this._doc=null}get _trigger(){return At(this,St)}get _panel(){return At(this,Ct)}get _pin(){let e=this.querySelector(`${wt} input[type="checkbox"]`);return e instanceof HTMLInputElement?e:null}get _pinned(){return this._pin?.checked===!0}_clear(){this._timer!==null&&clearTimeout(this._timer),this._timer=null}_schedule(e){if(this._clear(),e){if(this.isOpen)return;this._timer=setTimeout(()=>{this._timer=null,this._open(!1,!1)},150)}else this.isOpen&&!this._stayOpen()&&(this._timer=setTimeout(()=>{this._timer=null,this._stayOpen()||this._close(!1)},400))}_stayOpen(){let e=this._panel;return e?this._pinned||this._inside||e.contains(this.ownerDocument.activeElement)||e.querySelector(`[aria-expanded="true"]`)!==null:!1}_open(e,t){this._clear();let n=this._panel,r=this._trigger;n&&r&&(this.isOpen?e&&(this._sticky=!0):(r.setAttribute(`aria-expanded`,`true`),this._sticky=e,ke(r,n,{mode:`auto`,clampHeight:!0,alignEnd:!0,onClosed:()=>this._closed()})),t&&(At(n.querySelector(`.wui-filter-popover-grid`),Et)??At(n,Et))?.focus())}_close(e){this._clear();let t=this._panel;if(!t||!this.isOpen)return;let n=t.contains(this.ownerDocument.activeElement);this._closeByCode(t),e&&n&&this._trigger?.focus()}_closeByCode(e){this._closingByCode=!0;try{j(e)}finally{this._closingByCode=!1}}_closed(){if(this._trigger?.setAttribute(`aria-expanded`,`false`),this._sticky=!1,this._closingByCode)return;let e=this._trigger,t=this._panel,n=this.ownerDocument.activeElement;e&&(n===this.ownerDocument.body||t?.contains(n))&&e.focus()}};function Mt(){i(`wui-filter-popover`,jt)}var Nt=`INR`,Pt=Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`,JPY:`¥`}),Ft=e=>typeof e==`string`&&/^[A-Z]{3}$/.test(e),It=(e=`INR`)=>Pt[e]??`${e} `,Lt={aprShortLabel:`Apr`,aprilLabel:`April`,augShortLabel:`Aug`,augustLabel:`August`,decShortLabel:`Dec`,decemberLabel:`December`,emptyValueLabel:`-`,febShortLabel:`Feb`,februaryLabel:`February`,friMinLabel:`Fr`,friShortLabel:`Fri`,fridayLabel:`Friday`,janShortLabel:`Jan`,januaryLabel:`January`,julShortLabel:`Jul`,julyLabel:`July`,junShortLabel:`Jun`,juneLabel:`June`,marShortLabel:`Mar`,marchLabel:`March`,mayLabel:`May`,mayShortLabel:`May`,monMinLabel:`Mo`,monShortLabel:`Mon`,mondayLabel:`Monday`,novShortLabel:`Nov`,novemberLabel:`November`,octShortLabel:`Oct`,octoberLabel:`October`,satMinLabel:`Sa`,satShortLabel:`Sat`,saturdayLabel:`Saturday`,sepShortLabel:`Sep`,septemberLabel:`September`,sunMinLabel:`Su`,sunShortLabel:`Sun`,sundayLabel:`Sunday`,thuMinLabel:`Th`,thuShortLabel:`Thu`,thursdayLabel:`Thursday`,tueMinLabel:`Tu`,tueShortLabel:`Tue`,tuesdayLabel:`Tuesday`,wedMinLabel:`We`,wedShortLabel:`Wed`,wednesdayLabel:`Wednesday`},Rt=n({IST_OFFSET_MS:()=>zt,IST_TIME_ZONE:()=>R,isTimeZone:()=>Ht,nowIn:()=>Yt,todayIn:()=>Jt,wallClockOf:()=>qt,wallToInstant:()=>Gt,zoneOffsetMs:()=>Wt,zoneParts:()=>Ut}),R=`Asia/Kolkata`,zt=198e5,Bt=new Map;function Vt(e){let t=Bt.get(e);return t||(t=new Intl.DateTimeFormat(`en-US`,{timeZone:e,hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),Bt.set(e,t)),t}function Ht(e){if(typeof e!=`string`||e===``)return!1;try{return Vt(e),!0}catch{return!1}}function Ut(e,t=R){if(t===`Asia/Kolkata`){let t=new Date(e+zt);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}let n=Object.fromEntries(Vt(t).formatToParts(e).map(e=>[e.type,Number(e.value)]));return{year:Number(n.year),month:Number(n.month)-1,day:Number(n.day),hour:Number(n.hour)%24,minute:Number(n.minute),second:Number(n.second)}}function Wt(e,t=R){if(t===`Asia/Kolkata`)return zt;let n=Ut(e,t),r=new Date(0);return r.setUTCFullYear(n.year,n.month,n.day),r.setUTCHours(n.hour,n.minute,n.second,0),r.getTime()-Math.floor(e/1e3)*1e3}function Gt(e,t=R){let n=e-Wt(e,t);return n=e-Wt(n,t),n}var Kt=e=>e instanceof Date?e.getTime():e;function qt(e,t=R){return new Date(e+Wt(e,t)).toISOString().slice(0,19)}function Jt(e=R,t=Date.now()){return qt(Kt(t),e).slice(0,10)}function Yt(e=R,t=Date.now()){let n=Kt(t);return new Date(n+Wt(n,e))}var Xt=n({CURRENCIES:()=>Qt,DATE_PATTERNS:()=>tn,DURATION_UNITS:()=>en,FORMAT_STYLES:()=>Zt,IST_OFFSET_MS:()=>zt,IST_TIME_ZONE:()=>R,MAX_DECIMALS:()=>20,MONEY_UNITS:()=>$t,compactFormatOf:()=>Bn,emptyValueLabel:()=>z,formatCompact:()=>jn,formatCurrency:()=>kn,formatDate:()=>Ln,formatDateTime:()=>Vn,formatDayShort:()=>Rn,formatDuration:()=>Pn,formatNumber:()=>On,formatPercent:()=>Mn,formatValue:()=>zn,isMoneyUnit:()=>nn,istParts:()=>In,monthLabel:()=>un,monthLongLabel:()=>dn,paiseToRupeeText:()=>wn,timeZoneLabel:()=>Wn,toInstant:()=>Fn,weekdayLabel:()=>fn}),Zt=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],Qt=[`INR`,`USD`,`EUR`,`GBP`],$t=[`rupees`,`paise`],en=[`ms`,`s`,`min`,`h`],tn=[`day`,`month`,`year`,`datetime`,`time`];function nn(e){return $t.some(t=>t===e)}var rn=()=>I(`formatters`,Lt),z=()=>rn().emptyValueLabel,an=`−`,on=[`janShortLabel`,`febShortLabel`,`marShortLabel`,`aprShortLabel`,`mayShortLabel`,`junShortLabel`,`julShortLabel`,`augShortLabel`,`sepShortLabel`,`octShortLabel`,`novShortLabel`,`decShortLabel`],sn=[`januaryLabel`,`februaryLabel`,`marchLabel`,`aprilLabel`,`mayLabel`,`juneLabel`,`julyLabel`,`augustLabel`,`septemberLabel`,`octoberLabel`,`novemberLabel`,`decemberLabel`],cn={short:[`sunShortLabel`,`monShortLabel`,`tueShortLabel`,`wedShortLabel`,`thuShortLabel`,`friShortLabel`,`satShortLabel`],long:[`sundayLabel`,`mondayLabel`,`tuesdayLabel`,`wednesdayLabel`,`thursdayLabel`,`fridayLabel`,`saturdayLabel`],min:[`sunMinLabel`,`monMinLabel`,`tueMinLabel`,`wedMinLabel`,`thuMinLabel`,`friMinLabel`,`satMinLabel`]},ln=(e,t)=>rn()[N(e[t],`no date name at index ${t}`)],un=e=>ln(on,e),dn=e=>ln(sn,e);function fn(e,t){return ln(cn[t],e)}var pn=(e,t)=>N(e[t],`no compact unit at index ${t}`),mn=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],hn=[[1e9,`B`],[1e6,`M`],[1e3,`K`]],gn=e=>!e||e===`INR`?`en-IN`:`en-US`,_n=(e,t)=>typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=20?e:t,vn=new Map,yn=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=vn.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:e}),vn.set(n,r)),r},bn=new Map,xn=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=bn.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:e,maximumFractionDigits:e}),bn.set(n,r)),r},Sn=e=>typeof e==`number`&&Number.isFinite(e),Cn=e=>e<0&&!Object.is(Math.abs(e),0)?an:``;function wn(e){if(!Number.isInteger(e))throw Error(`A paise amount must be a whole number, got ${e}`);let t=BigInt(Math.abs(e)).toString().padStart(3,`0`);return`${e<0?`-`:``}${t.slice(0,-2)}.${t.slice(-2)}`}var Tn=(e,t)=>t===`paise`?Number(wn(e)):e,En=2,Dn=(e,t,n)=>{let r=Math.min(t,En),i=10n**BigInt(En-r),a=(BigInt(wn(e).replace(`.`,``))+i/2n)/i,o=10n**BigInt(r),s=xn(0,n).format(a/o);return t===0?s:`${s}.${(a%o).toString().padStart(r,`0`)}${`0`.repeat(t-r)}`};function On(e,{decimals:t}={}){if(!Sn(e))return z();let n=yn(_n(t,2)).format(Math.abs(e));return n===`0`?`0`:Cn(e)+n}function kn(e,t){if(!t?.currency)throw TypeError(`[@webority/ui-elements] formatCurrency needs options.currency, an ISO 4217 code such as "INR".`);if(!Sn(e))return z();let{unit:n=`rupees`,decimals:r,currency:i}=t,a=_n(r,0),o=gn(i),s=n===`paise`?Dn(Math.abs(e),a,o):xn(a,o).format(Math.abs(e));return(Number(s.replace(/,/g,``))===0?``:Cn(e))+It(i)+s}var An=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function jn(e,{currency:t,unit:n=`rupees`}={}){if(!Sn(e))return z();let r=t?Tn(e,n):e,i=t?It(t):``,a=t?gn(t):`en-IN`,o=a===`en-IN`?mn:hn,s=Math.abs(r),c=o.findIndex(([e])=>s>=e);if(c===-1){let e=yn(An(s),a).format(s);if(e!==`1,000`)return(e===`0`?``:Cn(r))+i+e;c=o.length-1}let[l,u]=pn(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f));return p>=100&&c>0&&(--c,[l,u]=pn(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f))),`${Cn(r)}${i}${yn(f,a).format(p)} ${u}`}function Mn(e,{decimals:t}={}){return Sn(e)?`${On(e*100,{decimals:_n(t,1)})}%`:z()}var Nn={ms:1,s:1e3,min:6e4,h:36e5};function Pn(e,{unit:t=`s`}={}){if(!Sn(e))return z();let n=Nn[t]??1e3,r=Math.abs(e*n),i=Cn(e);if(Math.round(r)<1e3)return`${i}${yn(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${yn(1).format(a)}s`;let o=Math.round(a);if(o<60)return`${i}${o}s`;let s=e=>String(e).padStart(2,`0`),c=Math.floor(o/60);if(c<60)return`${i}${c}m ${s(o%60)}s`;let l=Math.floor(c/60);return`${i}${yn(0).format(l)}h ${s(c%60)}m`}function Fn(e,t=R){if(e instanceof Date)return e.getTime();if(Sn(e))return e;if(typeof e!=`string`)return NaN;let n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(n){let[e,r,i]=[Number(n[1]),Number(n[2]),Number(n[3])],a=new Date(Date.UTC(2e3,r-1,i));return a.setUTCFullYear(e),a.getUTCFullYear()===e&&a.getUTCMonth()===r-1&&a.getUTCDate()===i?Gt(a.getTime(),t):NaN}return Date.parse(e)}function In(e,t=R){let{year:n,month:r,day:i,hour:a,minute:o}=Ut(e,t);return{year:n,month:r,day:i,hour:a,minute:o}}function Ln(e,{pattern:t=`day`,timeZone:n=R}={}){let r=Fn(e,n);if(!Number.isFinite(r))return z();let i=In(r,n),a=e=>String(e).padStart(2,`0`),o=`${a(i.day)}-${un(i.month)}-${i.year}`,s=`${a(i.hour)}:${a(i.minute)}`;switch(t){case`month`:return`${un(i.month)}-${i.year}`;case`year`:return String(i.year);case`datetime`:return`${o} ${s}`;case`time`:return s;default:return o}}function Rn(e,{timeZone:t=R}={}){let n=Fn(e,t);if(!Number.isFinite(n))return z();let r=In(n,t);return`${String(r.day).padStart(2,`0`)}-${un(r.month)}`}function zn(e,t){if(e==null||e===``)return z();let n=t?.style;if(n===`date`)return Ln(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return kn(e,{...t,currency:t?.currency??``});case`percent`:return Mn(e,t);case`compact`:return jn(e,t);case`duration`:return Pn(e,t);default:return On(e,t)}}function Bn(e){let t=e?.style;if(t===`currency`){if(!e?.currency)throw TypeError(`[@webority/ui-elements] a currency format needs a currency, an ISO 4217 code such as "INR".`);return{style:`compact`,currency:e.currency,unit:e.unit}}return!t||t===`number`?{style:`compact`}:e??{}}function Vn(e,{timeZone:t=R}={}){let n=Fn(e);if(!Number.isFinite(n))return z();let r=Object.fromEntries(Un(t).formatToParts(n).map(e=>[e.type,e.value])),i=r.dayPeriod;if(i===void 0)throw Error(`Intl returned no day period for a 12-hour clock`);return`${r.day}-${un(Number(r.month)-1)}-${r.year}, ${r.hour}:${r.minute} ${i.toUpperCase()}`}var Hn=new Map;function Un(e){let t=Hn.get(e);return t||(t=new Intl.DateTimeFormat(`en-IN`,{day:`2-digit`,month:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0,timeZone:e}),Hn.set(e,t)),t}function Wn(e=R){return new Intl.DateTimeFormat(`en-IN`,{timeZone:e,timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??e}var Gn={actionFailedMessage:`That did not work. Try again.`,actionForbiddenMessage:`You do not have permission to do that.`,collapseRowLabel:`Collapse row`,densityComfortableLabel:`Comfortable rows`,densityCompactLabel:`Compact rows`,densityLabel:`Row density`,empty:`No records found.`,emptyLabel:`No rows`,errorText:`These rows did not load. Try again.`,expandLabel:`Expand`,expandRowLabel:`Expand row`,exportCsvLabel:`Download CSV`,exportExcelLabel:`Download Excel`,forbiddenMessage:`You do not have access to these rows.`,groupRowsOne:`1 row`,groupRowsOther:`{count} rows`,loadingText:`Loading rows`,moreActionsForText:`More actions for {firstValue}`,networkMessage:`The connection dropped before the rows loaded. Check it and try again.`,pageTextOne:`Page {page} of {pages}, {total} row`,pageTextOther:`Page {page} of {pages}, {total} rows`,pageTextPending:`Page {page}`,resizeColumnLabel:`Resize column`,resizeColumnText:`Resize {label} column`,resizeText:`{px} pixels`,retryLabel:`Retry`,rowActionsLabel:`Actions`,rowSavedText:`Row saved.`,rowWasNotSavedText:`Row was not saved.`,rowsSavedText:`{n} rows saved.`,savedText:`{label} saved.`,selectAllRowsLabel:`Select all rows`,selectRowLabel:`Select row`,timeoutMessage:`The server did not answer in time. Check your connection and try again.`,wasNotSavedText:`{label} was not saved.`},Kn=n({COLUMN_MAX_WIDTH:()=>Jn,COLUMN_MIN_WIDTH:()=>48,PIN_AT_VAR:()=>hr,PIN_SIDES:()=>Zn,RESIZE_STEP:()=>10,RESIZE_STEP_LARGE:()=>50,ROW_HEIGHTS:()=>$n,ROW_MOVE_LIMIT:()=>200,ROW_MOVE_MS:()=>220,ROW_SAVE_ATTR:()=>Or,ROW_SAVE_ERROR_CLASS:()=>kr,ROW_SAVE_STATES:()=>Dr,VIRTUAL_OVERSCAN:()=>8,clampColumnWidth:()=>cr,groupCount:()=>sr,groupItems:()=>lr,groupRowsText:()=>rr,identityCell:()=>Ar,measureRows:()=>wr,notSavedText:()=>or,pinAtValue:()=>gr,pinClasses:()=>vr,pinOffsetVar:()=>mr,planPins:()=>_r,playRowMoves:()=>Tr,readColumnWidths:()=>fr,resizeName:()=>tr,rowLabel:()=>jr,rowOrderChanged:()=>Er,saveOutcomeText:()=>Pr,savedManyText:()=>ar,savedText:()=>ir,setRowSaveState:()=>Mr,settledRows:()=>Nr,virtualRange:()=>ur,widthText:()=>nr,writeColumnWidths:()=>pr}),qn=48,Jn=1200,Yn=10,Xn=50,Zn=[`start`,`end`],Qn=8,$n={comfortable:72,cozy:48,compact:40},er=()=>I(`dataTable`,Gn),tr=e=>e?L(er().resizeColumnText,{label:e}):er().resizeColumnLabel,nr=e=>L(er().resizeText,{px:e}),rr=e=>Xe(er(),`groupRows`,e,{count:On(e,{decimals:0})}),ir=e=>e?L(er().savedText,{label:e}):er().rowSavedText,ar=e=>L(er().rowsSavedText,{n:On(e,{decimals:0})}),or=(e,t)=>`${e?L(er().wasNotSavedText,{label:e}):er().rowWasNotSavedText}${t?` ${t}`:``}`,sr=e=>On(e,{decimals:0}),cr=e=>Math.min(Jn,Math.max(48,Math.round(Number(e)||0)));function lr(e,t,n=[]){let r=new Map(n.map(e=>[e,[]]));return e.forEach((e,n)=>{let i=t(e,n),a=r.get(i);a||(a=[],r.set(i,a)),a.push(e)}),[...r].filter(([,e])=>e.length>0).map(([e,t])=>({key:e,items:t}))}function ur({scrollTop:e,viewport:t,rowHeight:n,count:r,overscan:i=8}){let a=n>0?n:$n.cozy,o=Math.floor(Math.max(0,e)/a),s=Math.max(0,o-i);s-=s%2;let c=Math.min(r,o+Math.ceil(Math.max(0,t)/a)+i),l=Math.min(s,c);return{start:l,end:c,before:l*a,after:Math.max(0,r-c)*a}}var dr=e=>`wui-widths:${e}`;function fr(e){if(!e)return{};try{let t=JSON.parse(window.localStorage.getItem(dr(e))||`{}`),n={};if(t&&typeof t==`object`)for(let[e,r]of Object.entries(t))Number.isFinite(r)&&(n[e]=cr(r));return n}catch{return{}}}function pr(e,t){if(e)try{Object.keys(t).length?window.localStorage.setItem(dr(e),JSON.stringify(t)):window.localStorage.removeItem(dr(e))}catch(e){if(!(e instanceof DOMException))throw e}}var mr=(e,t)=>`--wui-pin-${e}-${t}`,hr=`--wui-pin-at`,gr=(e,t)=>`var(${mr(e,t)}, 0px)`;function _r(e){let t=e.map(()=>null),n=-1;e.forEach((e,t)=>{e===`start`&&(n=t)});let r=0;for(let i=0;i<=n;i++)(e[i]===`start`||e[i]===`lead`)&&(t[i]={side:`start`,ordinal:r++,edge:!1});let i=t[n];i&&(i.edge=!0);let a=-1;r=0;for(let n=e.length-1;n>=0;n--)e[n]===`end`&&(t[n]={side:`end`,ordinal:r++,edge:!1},a=n);let o=t[a];return o&&(o.edge=!0),t}var vr=e=>e?`wui-pin-${e.side}${e.edge?` wui-pin-${e.side}-edge`:``}`:``,yr=200,br=220,xr=`cubic-bezier(0.22, 1, 0.36, 1)`,Sr=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,Cr=e=>e.getAttribute(`data-row-key`)??e;function wr(e){let t=[...e];if(t.length>200)return null;let n=new Map;for(let e of t)e.hidden||n.set(Cr(e),e.offsetTop);return n}function Tr(e,t){let n=[...e];if(!t||n.length>200||Sr())return 0;let r=0;for(let e of n){if(e.hidden||typeof e.animate!=`function`)continue;let n=t.get(Cr(e));if(n===void 0)continue;let i=n-e.offsetTop;Math.abs(i)<1||(e.animate([{transform:`translateY(${i}px)`},{transform:`translateY(0)`}],{duration:220,easing:xr}),r++)}return r}function Er(e,t){if(!e||!t)return!1;let n=new Set(t),r=new Set(e),i=e.filter(e=>n.has(e)),a=t.filter(e=>r.has(e));return i.some((e,t)=>e!==a[t])}var Dr=[`saving`,`error`],Or=`data-wui-save-state`,kr=`wui-row-save-error`,Ar=e=>{let t=e.querySelector(`:scope > .wui-name-cell`);return t instanceof HTMLTableCellElement?t:[...e.cells].find(e=>!e.matches(`.wui-select-cell, .wui-expand-cell`))??null};function jr(e){let t=Ar(e);if(!t)return``;let n=t.querySelector(`.u-name`);if(n)return(n.textContent??``).trim();let r=``;for(let e of t.childNodes)e instanceof Element&&e.classList.contains(`wui-row-save-error`)||(r+=e.textContent??``);return r.replace(/\s+/g,` `).trim()}function Mr(e,t,n=``){if(t!==null&&!Dr.includes(t))throw Error(`A row's save state is ${Dr.join(` or `)} (or null to clear it), not "${t}".`);e.querySelector(`:scope > * > .${kr}`)?.remove(),t===null?e.removeAttribute(Or):e.setAttribute(Or,t),t===`saving`?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`);let r=t===`error`&&n?Ar(e):null;if(r){let t=e.ownerDocument.createElement(`span`);t.className=kr,t.textContent=n,r.append(t)}}function Nr(e,t){let n=[];if(!e)return n;for(let[r,i]of e){let e=t.get(r);i.state===`saving`&&e&&e.state!==`saving`&&n.push({label:e.label,ok:e.state!==`error`,message:e.message||``})}return n}function Pr(e){let t=e.filter(e=>e.ok),n=[],[r]=t;t.length===1&&r?n.push(ir(r.label)):t.length>1&&n.push(ar(t.length));for(let t of e)t.ok||n.push(or(t.label,t.message));return n.join(` `)}var Fr=n({isImeSafeEnter:()=>Ir});function Ir(e){return e.key===`Enter`&&e.isComposing!==!0&&e.keyCode!==229}var Lr=n({svgNodes:()=>zr,svgRoot:()=>Br}),Rr=`http://www.w3.org/2000/svg`;function zr(e){return e.map(Vr)}function Br(e,t){let n=document.createElementNS(Rr,`svg`);return Hr(n,e),n.append(...zr(t)),n}function Vr(e){let[t,n,r]=e,i=document.createElementNS(Rr,t);return Hr(i,n),typeof r==`string`?i.append(document.createTextNode(r)):r&&i.append(...zr(r)),i}function Hr(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 Ur=n({devError:()=>B,devWarn:()=>Wr});function Wr(e,...t){console.warn(e,...t)}function B(e,...t){console.error(e,...t)}var Gr=n({hasOwn:()=>Kr}),Kr=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0,qr=Object.freeze({carousel:{entries:[`elements/carousel.ts`],tags:[`wui-carousel`]},"code-block":{entries:[`elements/code-block.ts`],tags:[`wui-code-block`]},"command-palette":{entries:[`elements/command-palette.ts`],tags:[`wui-command-palette`]},"comment-thread":{entries:[`elements/comment-thread.ts`],tags:[`wui-mention-input`,`wui-comment-thread`]},"consent-banner":{entries:[`elements/consent-banner.ts`],tags:[`wui-consent-banner`]},"context-menu":{entries:[`elements/context-menu.ts`],tags:[`wui-context-menu`]},"date-range":{entries:[`elements/date-range.ts`],tags:[`wui-date-range`]},"date-time":{entries:[`elements/date-time.ts`],tags:[`wui-date-time`]},datepicker:{entries:[`elements/datepicker.ts`],tags:[`wui-datepicker`]},drawer:{entries:[`elements/drawer.ts`],tags:[`wui-drawer`]},dropdown:{entries:[`elements/dropdown.ts`],tags:[`wui-dropdown`]},"entry-grid":{entries:[`elements/entry-grid.ts`],tags:[`wui-entry-grid`]},gantt:{entries:[`elements/gantt.ts`],tags:[`wui-gantt`]},"image-crop":{entries:[`elements/image-crop.ts`],tags:[`wui-image-crop`]},"inline-edit":{entries:[`elements/inline-edit.ts`],tags:[`wui-inline-edit`]},kanban:{entries:[`elements/kanban.ts`],tags:[`wui-kanban`]},"lead-popup":{entries:[`elements/lead-popup.ts`],tags:[`wui-lead-popup`]},lightbox:{entries:[`elements/lightbox.ts`],tags:[`wui-lightbox`]},"org-tree":{entries:[`elements/org-tree.ts`],tags:[`wui-org-tree`]},markdown:{entries:[`elements/markdown.ts`],tags:[`wui-markdown`]},phone:{entries:[`elements/phone.ts`,`global/parts/select-country.ts`],tags:[`wui-phone`]},popover:{entries:[`elements/popover.ts`],tags:[`wui-popover`]},"saved-views":{entries:[`elements/saved-views.ts`],tags:[`wui-saved-views`]},glyphs:{entries:[`global/parts/glyphs.ts`],tags:[]},"select-chips":{entries:[`global/parts/select-chips.ts`],tags:[]},"select-recents":{entries:[`global/parts/select-recents.ts`],tags:[]},"select-search":{entries:[`global/parts/select-search.ts`],tags:[]},"select-window":{entries:[`global/parts/select-window.ts`],tags:[]},"table-export":{entries:[`global/parts/table-export.ts`],tags:[]},slider:{entries:[`elements/slider.ts`],tags:[`wui-slider`]},sortable:{entries:[`elements/sortable.ts`],tags:[`wui-sortable`]},"status-icon":{entries:[`elements/status-icon.ts`],tags:[`wui-status-icon`]},timepicker:{entries:[`elements/timepicker.ts`],tags:[`wui-timepicker`]},tour:{entries:[`elements/tour.ts`],tags:[`wui-tour`]},tree:{entries:[`elements/tree.ts`],tags:[`wui-tree`]},"tree-picker":{entries:[`elements/tree-picker.ts`],tags:[`wui-tree-picker`]},wizard:{entries:[`elements/wizard.ts`],tags:[`wui-wizard-step`,`wui-wizard`]},chart:{file:`ui-chart.global.js`,tags:[`wui-chart`],selfContained:!0},calendar:{file:`ui-calendar.global.js`,tags:[`wui-calendar`],selfContained:!0},"rich-text":{file:`ui-rich-text.global.js`,tags:[`wui-rich-text`],selfContained:!0},"file-viewer":{file:`ui-file-viewer.global.js`,tags:[`wui-file-viewer`],selfContained:!0}});Object.freeze({anchorOverlay:`anchorOverlay.ts`,avatarNode:`avatarNode.ts`,buttonClass:`buttonClass.ts`,calendarMath:`calendarMath.ts`,copyText:`copyText.ts`,dataTable:`dataTable.ts`,datePickerText:`text/web/datePicker.g.ts`,defineElement:`defineElement.ts`,devWarn:`devWarn.ts`,dom:`dom.ts`,drawerText:`text/web/drawer.g.ts`,elementBase:`elementBase.ts`,fieldState:`fieldState.ts`,formatters:`formatters.ts`,formMirror:`formMirror.ts`,glyphs:`global/glyphs.ts`,hasOwn:`hasOwn.ts`,iconGlyphs:`iconGlyphs.g.ts`,imeSafeEnter:`imeSafeEnter.ts`,isDrawn:`isDrawn.ts`,listboxKeyNav:`listboxKeyNav.ts`,loader:`global/loader.ts`,mentionText:`mentionText.ts`,menuKeyNav:`menuKeyNav.ts`,nativeOverlay:`nativeOverlay.ts`,notificationDays:`notificationDays.ts`,optionLabel:`optionLabel.ts`,partRegistry:`select/partRegistry.ts`,rtl:`rtl.ts`,selectList:`select/list.ts`,selectRemote:`select/remote.ts`,selectText:`text/web/select.g.ts`,selectWindow:`select/window.ts`,serverHtml:`server/serverHtml.ts`,stepperHeader:`stepperHeader.ts`,svgNodes:`svgNodes.ts`,tableExport:`global/tableExport.ts`,tableSelect:`tableSelect.ts`,textMatch:`textMatch.ts`,textStore:`text/textStore.ts`,tooltips:`tooltips.ts`,wuiHttp:`server/wuiHttp.ts`,WuiSelect:`WuiSelect.ts`,zone:`zone.ts`});var Jr=`ui-elements/`;function Yr(e){let t=qr[e];if(t===void 0)throw Error(`[webority-ui] No on-demand element chunk is named ${e}.`);return t}function Xr(e){let t=Yr(e);if(!t.selfContained)return`${Jr+e}.global.js`;if(t.file===void 0)throw Error(`[webority-ui] The self-contained element chunk ${e} names no file.`);return t.file}var Zr=n({CHUNK_DIR:()=>Jr,CHUNK_RETRY_MS:()=>ei,ELEMENTS_DEFINED_EVENT:()=>Qr,ELEMENTS_LOAD_ERROR_EVENT:()=>$r,assetUrl:()=>pi,loadChunk:()=>mi,startElementLoader:()=>ui,stopElementLoader:()=>di,whenElementsReady:()=>fi}),Qr=`wui-elements:defined`,$r=`wui-elements:load-error`,ei=1e3,ti={"ui-elements/carousel.global.js":`7708231d9a12`,"ui-elements/code-block.global.js":`e13802c3c29f`,"ui-elements/command-palette.global.js":`b61f81045fef`,"ui-elements/comment-thread.global.js":`da367f428783`,"ui-elements/consent-banner.global.js":`385e65bca7d8`,"ui-elements/context-menu.global.js":`9d1d367eb774`,"ui-elements/date-range.global.js":`cfe6caf0c393`,"ui-elements/date-time.global.js":`5c50ca5fe565`,"ui-elements/datepicker.global.js":`9b337d54cd97`,"ui-elements/drawer.global.js":`fe734e70fac3`,"ui-elements/dropdown.global.js":`5588a3f9c3b6`,"ui-elements/entry-grid.global.js":`719c06585906`,"ui-elements/gantt.global.js":`1b9453d3b7cf`,"ui-elements/image-crop.global.js":`901ae40cb960`,"ui-elements/inline-edit.global.js":`4b3df29ab12b`,"ui-elements/kanban.global.js":`ea1436acdc20`,"ui-elements/lead-popup.global.js":`8a15a05d0cb7`,"ui-elements/lightbox.global.js":`155d5e8c657b`,"ui-elements/org-tree.global.js":`db371baf540e`,"ui-elements/markdown.global.js":`639f5b4332c0`,"ui-elements/phone.global.js":`da0fc3e6c9df`,"ui-elements/popover.global.js":`c7927ba5ea1c`,"ui-elements/saved-views.global.js":`5fec7f40c6ee`,"ui-elements/glyphs.global.js":`93d01769c333`,"ui-elements/select-chips.global.js":`5a1f1da9413e`,"ui-elements/select-recents.global.js":`23d1b05e92a4`,"ui-elements/select-search.global.js":`844962603547`,"ui-elements/select-window.global.js":`fcd2eb0414bb`,"ui-elements/table-export.global.js":`dfd22de5f108`,"ui-elements/slider.global.js":`65429698ff2f`,"ui-elements/sortable.global.js":`76edea6a9ac5`,"ui-elements/status-icon.global.js":`c76f5c97fa14`,"ui-elements/timepicker.global.js":`1e7aec9e6d6a`,"ui-elements/tour.global.js":`01c76246158b`,"ui-elements/tree.global.js":`046c884f6c30`,"ui-elements/tree-picker.global.js":`cdd9abe5948f`,"ui-elements/wizard.global.js":`9a532703eb0b`,"ui-chart.global.js":`4a647de2144a`,"ui-calendar.global.js":`5d34a1c62f53`,"ui-rich-text.global.js":`b304cc38968c`,"ui-file-viewer.global.js":`19e133f0b1b2`,"ui-phone.global.js":`c646775bc1d1`},ni=new Map;for(let[e,t]of Object.entries(qr))for(let n of t.tags)ni.set(n,e);var ri=[...ni.keys()].join(`,`),ii=null,ai=``,oi=!1,si=null,ci=new Map;function li(){let e=document.currentScript;return e instanceof HTMLScriptElement?e:null}function ui(e=li()){oi||(oi=!0,ii=e?.src?e.src:null,ai=e?.nonce||``,vi(document),si=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&vi(e)}),si.observe(document.documentElement,{childList:!0,subtree:!0}))}function di(){si?.disconnect(),si=null,oi=!1,ii=null,ai=``,ci.clear()}function fi(e=document){return Promise.all([..._i(e)].map(e=>mi(e))).then(()=>void 0)}function pi(e){if(ii===null)throw Error(`The on-demand element files have no address to load from.`);let t=new URL(e,ii);return t.search=Kr(ti,e)?`?v=${ti[e]}`:``,t.href}function mi(e){let t=ci.get(e)?.promise??null;if(t!==null)return t;let n=Yr(e),{tags:r}=n,i=Xr(e),a=()=>Promise.all(r.map(e=>customElements.whenDefined(e))),o={status:`loading`,promise:null},s=new Promise((t,s)=>{let c=``,l=()=>{si&&Object.keys(qr).every(e=>ci.get(e)?.status===`loaded`||ci.get(e)?.status===`failed`)&&si.disconnect()},u=()=>{o.status=`loaded`,l(),document.dispatchEvent(new CustomEvent(Qr,{detail:{chunk:e,tags:r}})),t()},d=t=>{o.status=`failed`,l(),B(`[webority-ui] Could not load ${c} for ${r.length?r.join(`, `):e}.${t?` ${t.message}`:``}`),document.dispatchEvent(new CustomEvent($r,{detail:{chunk:e,url:c,tags:r}})),s(Error(`[webority-ui] The ${e} elements failed to load.`))},f=(e,t)=>{let i=document.createElement(`script`);i.src=e,i.async=!1,ai&&(i.nonce=ai),i.addEventListener(`load`,()=>{!n.selfContained&&!r.every(e=>customElements.get(e))?d(Error(`The file ran but did not define its elements; see the error above.`)):a().then(u)}),i.addEventListener(`error`,()=>{i.remove(),t?d():setTimeout(()=>f(e,!0),ei)}),document.head.append(i)};if([...document.scripts].some(e=>new URL(e.src,location.href).pathname.endsWith(`/${i}`)))a().then(u);else{try{c=pi(i)}catch(e){d(e instanceof Error?e:void 0);return}f(c,!1)}});return o.promise=s,ci.set(e,o),s}function hi(e){return ni.has(e.localName)&&!customElements.get(e.localName)}function gi(e,t){let n=ni.get(t.localName);n!==void 0&&hi(t)&&e.add(n)}function _i(e){let t=new Set;e instanceof Element&&gi(t,e);for(let n of e.querySelectorAll(ri))gi(t,n);return t}function vi(e){for(let t of _i(e))Promise.allSettled([mi(t)])}var yi=n({TABLE_EXPORT_CHUNK:()=>bi,loadTableExport:()=>Si,registerTableExport:()=>Ci}),bi=`table-export`,xi=null;function Si(){return xi===null?mi(bi).then(()=>{if(xi===null)throw Error(`[webority-ui] The table-export chunk ran without handing over its writers.`);return xi}):Promise.resolve(xi)}function Ci(e){xi=e}var wi=`.wui-col-resize`,Ti=`.wui-group-row, .wui-virtual-spacer`,Ei=`.wui-select-cell, .wui-expand-cell`;function Di(){return Br({class:`wui-icon`,"data-icon":`chevron-down`,"data-wui":`AppIcon`,width:16,height:16,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`},[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M19.92 8.95l-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95`}]])}function V(e){if(e==null)throw TypeError(`Missing DOM node`);return e}function Oi(e,t){if(e instanceof t)return e;throw TypeError(`Missing DOM node`)}var ki=e=>{let t=P(e,wi);return t instanceof HTMLElement?t:null},Ai=e=>e.hasAttribute(`data-wui-skeleton`)||!!e.querySelector(`:scope > td > .skeleton`),ji=class extends s{_frame;_headDirty;_rowsDirty;_frozenSig;_natural;_widths;_collapsed;_groupOrder;_items;_range;_drag;_userSized;_swallowClick;_mo;_ro;_fonts;_onPointerDown;_onKeyDown;_onClick;_onDblClick;_onScroll;_onFonts;_top=null;_bottom=null;_rowHeight=0;constructor(){super(),this._frame=0,this._headDirty=!0,this._rowsDirty=!0,this._frozenSig=null,this._natural=[],this._widths={},this._collapsed=new Set,this._groupOrder=[],this._items=[],this._range=null,this._drag=null,this._userSized=!1,this._swallowClick=!1,this._mo=null,this._ro=null,this._fonts=null,this._onPointerDown=e=>this._startDrag(e),this._onKeyDown=e=>this._key(e),this._onClick=e=>this._click(e),this._onDblClick=e=>{let t=ki(e.target);t&&this.contains(t)&&this._reset(t.closest(`th`))},this._onScroll=()=>{this.hasAttribute(`virtual`)&&this._schedule()},this._onFonts=()=>{this._userSized||this._drag||this._frozenSig===null||!this.hasAttribute(`resizable`)||(this._frozenSig=null,this._schedule())}}connectedCallback(){this._widths=fr(this.getAttribute(`view-key`)),this.addEventListener(`pointerdown`,this._onPointerDown,!0),this.addEventListener(`keydown`,this._onKeyDown,!0),this.addEventListener(`click`,this._onClick,!0),this.addEventListener(`dblclick`,this._onDblClick),this.addEventListener(`scroll`,this._onScroll,{passive:!0}),this._fonts=this.ownerDocument.fonts??null,this._fonts?.addEventListener(`loadingdone`,this._onFonts),typeof MutationObserver<`u`&&(this._mo=new MutationObserver(e=>this._mutated(e)),this._mo.observe(this,{childList:!0,subtree:!0})),typeof ResizeObserver<`u`&&(this._ro=new ResizeObserver(()=>this._schedule()),this._ro.observe(this)),this._headDirty=!0,this._rowsDirty=!0,this._schedule()}disconnectedCallback(){this.removeEventListener(`pointerdown`,this._onPointerDown,!0),this.removeEventListener(`keydown`,this._onKeyDown,!0),this.removeEventListener(`click`,this._onClick,!0),this.removeEventListener(`dblclick`,this._onDblClick),this.removeEventListener(`scroll`,this._onScroll),this._fonts?.removeEventListener(`loadingdone`,this._onFonts),this._fonts=null,this._mo?.disconnect(),this._ro?.disconnect(),this._mo=null,this._ro=null,this._frame&&cancelAnimationFrame(this._frame),this._frame=0,this._drag=null}refresh(){this._headDirty=!0,this._rowsDirty=!0,this._run()}get _table(){let e=this.querySelector(`:scope > table`);return e instanceof HTMLTableElement?e:null}_headCells(e){let t=e.tHead?.rows[0];return t?[...t.cells]:[]}_schedule(){this._frame||=requestAnimationFrame(()=>{this._frame=0,this._run()})}_mutated(e){for(let t of e){let e=t.target instanceof Element?t.target:t.target.parentElement;e&&((e.closest(`thead`)||e===this._table||e===this)&&(this._headDirty=!0),(e.closest(`tbody, tfoot`)||e===this._table||e===this)&&(this._rowsDirty=!0))}this._schedule()}_run(){let e=this._table;if(!e)return;let t=this._headDirty,n=this._rowsDirty;this._headDirty=!1,this._rowsDirty=!1,n&&this.hasAttribute(`group-by`)&&this._group(e),this._pins(e,t||n),this.hasAttribute(`resizable`)&&(t&&this._handles(e),this._layout(e)),this.hasAttribute(`virtual`)&&this._virtual(e,t||n),this._mo?.takeRecords()}_pins(e,t){let n=this._headCells(e),r=n.map(e=>{let t=e.dataset.pin;return t===`start`||t===`end`?t:e.matches(Ei)?`lead`:null});if(!r.some(e=>e===`start`||e===`end`))return;let i=_r(r);i.forEach((e,t)=>{e&&this._ro?.observe(V(n[t]))});let a=e=>V(n[e]).getBoundingClientRect().width,o=0;i.forEach((t,n)=>{t?.side===`start`&&(this._setVar(e,mr(`start`,t.ordinal),o),o+=a(n))}),o=0;for(let t=i.length-1;t>=0;t--){let n=i[t];n?.side===`end`&&(this._setVar(e,mr(`end`,n.ordinal),o),o+=a(t))}if(t)for(let t of e.rows)t.matches(`${Ti}, .wui-row-expanded`)||t.cells.length!==n.length||i.forEach((e,n)=>{if(!e)return;let r=V(t.cells[n]);r.classList.contains(`wui-pin-${e.side}`)||r.classList.add(`wui-pin-${e.side}`),e.edge&&!r.classList.contains(`wui-pin-${e.side}-edge`)&&r.classList.add(`wui-pin-${e.side}-edge`);let i=gr(e.side,e.ordinal);r.style.getPropertyValue(`--wui-pin-at`)!==i&&r.style.setProperty(hr,i)})}_setVar(e,t,n){let r=`${Math.round(n*100)/100}px`;e.style.getPropertyValue(t)!==r&&e.style.setProperty(t,r)}_resizable(e){return e.map((t,n)=>n<e.length-1&&!t.matches(Ei))}_handles(e){let t=this._headCells(e),n=this._resizable(t);t.forEach((e,t)=>{if(!n[t]||e.querySelector(wi))return;let r=e.ownerDocument.createElement(`span`);r.className=`wui-col-resize`,r.setAttribute(`role`,`separator`),r.setAttribute(`aria-orientation`,`vertical`),r.setAttribute(`aria-valuemin`,`48`),r.setAttribute(`aria-valuemax`,String(Jn)),r.setAttribute(`tabindex`,`0`);let i=(e.textContent??``).trim();r.setAttribute(`aria-label`,tr(i)),i&&!e.hasAttribute(`aria-label`)&&e.setAttribute(`aria-label`,i),e.classList.add(`wui-col-resizable`),e.appendChild(r)})}_hasRows(e){for(let t of e.tBodies)for(let e of t.rows)if(!e.matches(Ti)&&!Ai(e))return!0;return!1}_signature(e){return e.map(e=>e.dataset.key||(e.textContent??``).trim()).join(``)}_layout(e){let t=this._headCells(e),n=this._signature(t);t.length&&n!==this._frozenSig&&(this._hasRows(e)?this._freeze(e,t,n):this._applyRemembered(t))}_applyRemembered(e){for(let t of e){let e=t.dataset.key&&this._widths[t.dataset.key];e&&(t.style.width=`${e}px`);let n=t.querySelector(wi);n&&this._handleValue(n,cr(e||t.getBoundingClientRect().width))}}_freeze(e,t,n){e.style.tableLayout=``,e.style.width=``,e.removeAttribute(`data-wui-fixed`);for(let e of t)e.hasAttribute(`data-wui-width`)&&(e.style.width=``,e.removeAttribute(`data-wui-width`));this._natural=t.map(e=>e.getBoundingClientRect().width),t.forEach((e,n)=>{if(n===t.length-1||e.matches(Ei))return;let r=e.dataset.key&&this._widths[e.dataset.key];this._setWidth(e,r||this._natural[n])}),e.style.tableLayout=`fixed`,e.setAttribute(`data-wui-fixed`,``),this._frozenSig=n,this._fitTable(e,t)}_setWidth(e,t){let n=cr(t);e.style.width=`${n}px`,e.setAttribute(`data-wui-width`,``);let r=e.querySelector(wi);return r&&this._handleValue(r,n),n}_handleValue(e,t){e.setAttribute(`aria-valuenow`,String(t)),e.setAttribute(`aria-valuetext`,nr(t))}_fitTable(e,t){let n=t.length-1,r=this._natural[n]||0;for(let e=0;e<n;e++)r+=Number.parseFloat(V(t[e]).style.width)||this._natural[e]||0;e.style.width=`max(100%, ${Math.round(r)}px)`}_ensureFrozen(e){let t=this._headCells(e),n=this._signature(t);return n!==this._frozenSig&&this._freeze(e,t,n),t}_resizeTo(e,t,n){let r=this._table;if(!r)return;let i=this._ensureFrozen(r);this._userSized=!0,this._setWidth(e,t),this._fitTable(r,i),n&&this._remember(e),this._pins(r,!1)}_remember(e){let t=e.dataset.key;t&&(this._widths={...this._widths,[t]:Number.parseFloat(e.style.width)},pr(this.getAttribute(`view-key`),this._widths))}_reset(e){let t=this._table;if(!e||!t)return;let n=this._ensureFrozen(t);this._userSized=!0;let r=e.dataset.key;if(r&&r in this._widths){let{[r]:e,...t}=this._widths;this._widths=t,pr(this.getAttribute(`view-key`),this._widths)}this._setWidth(e,this._natural[n.indexOf(e)]||0),this._fitTable(t,n),this._pins(t,!1)}_rtl(){return getComputedStyle(this).direction===`rtl`}_startDrag(e){let t=ki(e.target);if(!t||!this.contains(t)||e.button!==0)return;e.preventDefault(),e.stopPropagation();let n=t.closest(`th`),r=this._table;if(!n||!r)return;this._ensureFrozen(r);let i={th:n,x:e.clientX,from:n.getBoundingClientRect().width,dir:this._rtl()?-1:1,moved:!1};this._drag=i,t.setPointerCapture?.(e.pointerId),t.classList.add(`is-dragging`);let a=e=>{let t=(e.clientX-i.x)*i.dir;Math.abs(t)>1&&(i.moved=!0),this._resizeTo(n,i.from+t,!1)},o=e=>{t.removeEventListener(`pointermove`,a),t.removeEventListener(`pointerup`,o),t.removeEventListener(`pointercancel`,o),t.classList.remove(`is-dragging`),this._drag=null,e.type===`pointercancel`?this._resizeTo(n,i.from,!1):i.moved&&this._remember(n),this._swallowClick=!0,setTimeout(()=>{this._swallowClick=!1},0)};t.addEventListener(`pointermove`,a),t.addEventListener(`pointerup`,o),t.addEventListener(`pointercancel`,o)}_key(e){let t=ki(e.target);if(!t||!this.contains(t))return;let n=t.closest(`th`);if(Ir(e)||e.key===` `){e.preventDefault(),e.stopPropagation();return}if(e.key===`Home`){e.preventDefault(),e.stopPropagation(),this._reset(n);return}if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault(),e.stopPropagation();let r=this._table;if(!r)return;this._ensureFrozen(r);let i=V(n),a=e.shiftKey?50:10,o=e.key===`ArrowRight`!==this._rtl(),s=Number.parseFloat(i.style.width)||i.getBoundingClientRect().width;this._resizeTo(i,s+(o?a:-a),!0)}_click(e){let t=e.target instanceof Element&&e.target.closest(wi)!==null;if(this._swallowClick||t){e.stopPropagation(),(t||this._swallowClick)&&e.preventDefault(),this._swallowClick=!1;return}let n=P(e.target,`[data-wui-table-export], [data-wui-density]`);if(n&&this.contains(n)){e.preventDefault(),n.hasAttribute(`data-wui-density`)?this._setDensity(n.getAttribute(`data-wui-density`)??``):this._export(n.getAttribute(`data-wui-table-export`)??``);return}if(!this.hasAttribute(`group-by`))return;let r=P(e.target,`.wui-group-toggle`)?.closest(`.wui-group-row`);if(!(r instanceof HTMLTableRowElement)||!this.contains(r))return;let i=r.dataset.groupKey;this._collapsed.has(i)?this._collapsed.delete(i):this._collapsed.add(i),this._showGroup(r,!this._collapsed.has(i));let a=this._table;a&&this.hasAttribute(`virtual`)&&(this._virtual(a,!0),this._mo?.takeRecords())}async _export(e){if(e!==`csv`&&e!==`xlsx`)return;let t=this.querySelector(`:scope > table`);if(!(t instanceof HTMLTableElement))return;let n=Array.from(t.tBodies[0]?.rows??[]).filter(e=>!e.hidden&&!e.matches(`.wui-group-row, .wui-virtual-spacer, .wui-row-expanded`)&&!Ai(e)),r=new Set;for(let e of n)for(let[t,n]of Array.from(e.cells).entries())(n.matches(Ei)||n.querySelector(`.u-row-actions`))&&r.add(t);let i=e=>Array.from(e).filter((e,t)=>!r.has(t)).map(e=>{let t=e.cloneNode(!0);if(!(t instanceof Element))return``;for(let e of t.querySelectorAll(`.visually-hidden, .wui-col-resize, .infotip`))e.remove();return(t.textContent??``).replace(/\s+/g,` `).trim()}),a=i(t.tHead?.rows[0]?.cells??[]),o=n.map(e=>i(e.cells)),s=this.getAttribute(`export-name`)??`table`,{downloadTable:c,tableCsv:l,tableXlsx:u}=await Si();e===`csv`?c([l(a,o)],`text/csv;charset=utf-8`,`${s}.csv`):c([u(a,o)],`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,`${s}.xlsx`)}_setDensity(e){let t=this.querySelector(`:scope > table`);if(t instanceof HTMLTableElement){t.classList.remove(`wui-table-cozy`,`wui-table-compact`),(e===`cozy`||e===`compact`)&&t.classList.add(`wui-table-${e}`);for(let t of this.querySelectorAll(`[data-wui-density]`))t.setAttribute(`aria-pressed`,String(t.getAttribute(`data-wui-density`)===e))}}_group(e){let t=this.getAttribute(`group-by`),n=this._headCells(e),r=n.findIndex(e=>e.dataset.key===t);if(r<0)throw Error(`<wui-data-table group-by="${t}"> needs a header cell with data-key="${t}".`);let i=e.tBodies[0];if(!i)return;let a=[...i.rows].filter(e=>!e.matches(Ti));if(a.some(Ai))return;let o=this.ownerDocument,s=new Map;for(let e of i.querySelectorAll(`:scope > tr.wui-group-row`))e instanceof HTMLTableRowElement&&s.set(e.dataset.groupKey,e);let c=lr(a,e=>e.dataset.group??e.cells[r]?.textContent?.trim()??``,this.closest(`[data-wui-server]`)?[]:this._groupOrder);this._groupOrder=c.map(e=>e.key);let l=o.createDocumentFragment(),u=c.map(e=>{let t=s.get(e.key)??this._groupRow(o,e.key);return s.delete(e.key),Oi(t.querySelector(`.wui-group-cell`),HTMLTableCellElement).colSpan=n.length,Oi(t.querySelector(`.wui-group-count`),HTMLElement).textContent=sr(e.items.length),Oi(t.querySelector(`.wui-group-rows`),HTMLElement).textContent=`, ${rr(e.items.length)}`,l.append(t,...e.items),[t,e.key]});for(let e of s.values())e.remove();i.insertBefore(l,this._bottom?.parentNode===i?this._bottom:null);for(let[e,t]of u)this._showGroup(e,!this._collapsed.has(t))}_groupRow(e,t){let n=e.createElement(`tr`);n.className=`wui-group-row`,n.dataset.groupKey=t;let r=e.createElement(`th`);r.className=`wui-group-cell`,r.scope=`rowgroup`;let i=e.createElement(`button`);i.type=`button`,i.className=`wui-group-toggle`,i.replaceChildren(Di());let a=e.createElement(`span`);a.className=`wui-group-label`,a.textContent=t;let o=e.createElement(`span`);o.className=`wui-group-count`,o.setAttribute(`aria-hidden`,`true`);let s=e.createElement(`span`);return s.className=`visually-hidden wui-group-rows`,i.append(a,o,s),r.append(i),n.append(r),n}_showGroup(e,t){if(e){e.querySelector(`.wui-group-toggle`)?.setAttribute(`aria-expanded`,String(t));for(let n=e.nextElementSibling;n&&!n.matches(Ti);n=n.nextElementSibling)n instanceof HTMLElement&&(n.hidden=!t)}}_spacer(e,t){if(t?.parentNode===e)return t;let n=e.ownerDocument,r=n.createElement(`tr`);return r.className=`wui-virtual-spacer`,r.setAttribute(`aria-hidden`,`true`),r.append(n.createElement(`td`)),r}_virtual(e,t){let n=e.tBodies[0];if(!n)return;if(t){this._top=this._spacer(n,this._top),this._bottom=this._spacer(n,this._bottom),n.firstElementChild!==this._top&&n.insertBefore(this._top,n.firstChild),n.lastElementChild!==this._bottom&&n.append(this._bottom);let t=Math.max(1,this._headCells(e).length);V(this._top.cells[0]).colSpan=t,V(this._bottom.cells[0]).colSpan=t,this._items=[...n.rows].filter(e=>!e.classList.contains(`wui-virtual-spacer`)&&!e.hidden),this._range=null,e.setAttribute(`aria-rowcount`,String(this._items.length+1)),e.tHead?.rows[0]?.setAttribute(`aria-rowindex`,`1`),this._items.forEach((e,t)=>{e.setAttribute(`aria-rowindex`,String(t+2))}),this._rowHeight>0||(this._rowHeight=this._measureRow(e))}let r=e.tHead?.getBoundingClientRect().height||0,i=ur({scrollTop:this.scrollTop-r,viewport:this.clientHeight,rowHeight:this._rowHeight,count:this._items.length}),a=this._range;if(a&&a.start===i.start&&a.end===i.end)return;let o=a?Math.min(a.start,i.start):0,s=a?Math.max(a.end,i.end):this._items.length;for(let e=o;e<s;e++){let t=e<i.start||e>=i.end,n=V(this._items[e]);n.classList.contains(`wui-virtual-off`)!==t&&n.classList.toggle(`wui-virtual-off`,t)}this._range=i;let c=V(this._top),l=V(this._bottom);c.hidden=i.before===0,l.hidden=i.after===0,V(c.cells[0]).style.height=`${i.before}px`,V(l.cells[0]).style.height=`${i.after}px`}_measureRow(e){let t=this._items.find(e=>!e.classList.contains(`wui-group-row`)&&!e.classList.contains(`wui-virtual-off`))?.getBoundingClientRect().height??0;return t>0?t:e.classList.contains(`wui-table-compact`)?$n.compact:e.classList.contains(`wui-table-cozy`)?$n.cozy:$n.comfortable}},Mi=class extends s{_pointerMoveListener;_pointerLeaveListener;_frame;_pointerX;static get observedAttributes(){return[`static`,`max-scale`,`radius`]}constructor(){super(),this._pointerMoveListener=null,this._pointerLeaveListener=null,this._frame=0,this._pointerX=0}connectedCallback(){this._wire()}disconnectedCallback(){this._teardown()}attributeChangedCallback(e,t,n){e===`static`&&this.isConnected&&this._wire()}_maxScale(){return Pi(this.getAttribute(`max-scale`),1.6)}_radius(){return Pi(this.getAttribute(`radius`),100)}_magnifyEnabled(){return!(this.hasAttribute(`static`)||typeof matchMedia==`function`&&(matchMedia(`(pointer: coarse)`).matches||matchMedia(`(prefers-reduced-motion: reduce)`).matches))}_applyMagnification(){this._frame=0;let e=this._maxScale(),t=this._radius();for(let n of this.querySelectorAll(`.dock-item`)){let r=Ni(n),i=r.getBoundingClientRect(),a=Math.abs(this._pointerX-(i.left+i.width/2)),o=Math.max(0,1-a/t),s=1+(e-1)*o;r.style.setProperty(`--wui-dock-mag`,s.toFixed(3))}}_resetMagnification(){this._frame&&=(cancelAnimationFrame(this._frame),0);for(let e of this.querySelectorAll(`.dock-item`))Ni(e).style.removeProperty(`--wui-dock-mag`)}_wire(){this._teardown(),this._magnifyEnabled()&&(this._pointerMoveListener=e=>{this._pointerX=e.clientX,this._frame||=requestAnimationFrame(()=>this._applyMagnification())},this._pointerLeaveListener=()=>this._resetMagnification(),this.addEventListener(`pointermove`,this._pointerMoveListener),this.addEventListener(`pointerleave`,this._pointerLeaveListener))}_teardown(){this._pointerMoveListener&&=(this.removeEventListener(`pointermove`,this._pointerMoveListener),null),this._pointerLeaveListener&&=(this.removeEventListener(`pointerleave`,this._pointerLeaveListener),null),this._resetMagnification()}},Ni=e=>Le(e,HTMLElement,`wui-dock item must be an HTML element`),Pi=(e,t)=>{let n=Number.parseFloat(e??``);return Number.isFinite(n)?n:t},Fi=300,Ii=150,Li=`.wui-hover-card-trigger`,Ri=`.wui-hover-card-panel`,zi=`a[href],button,input,select,textarea,[tabindex]`,Bi=0;function Vi(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}var Hi=class extends s{_doc;_timer;_described;_refocusing;_onOver;_onOut;_onFocusIn;_onFocusOut;_onKeyDown;static get observedAttributes(){return[`open`]}constructor(){super(),this._doc=null,this._timer=null,this._described=null,this._refocusing=!1,this._onOver=e=>{if(e.pointerType===`touch`||e.pointerType===`pen`)return;let t=this._zone(e.target);t===`panel`?this._clear():t===`trigger`&&this._schedule(!0)},this._onOut=e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`&&this._zone(e.target)&&!this._zone(e.relatedTarget)&&this._schedule(!1)},this._onFocusIn=e=>{this._refocusing||(this._zone(e.target)===`trigger`?this._schedule(!0):this._zone(e.target)===`panel`&&this._clear())},this._onFocusOut=e=>{this._zone(e.target)&&!this._zone(e.relatedTarget)&&this._schedule(!1)},this._onKeyDown=e=>{if(e.key!==`Escape`||!this.isOpen||this.hasAttribute(`open`))return;e.preventDefault();let t=this._zone(this.ownerDocument.activeElement)===`panel`;this._clear(),this._setOpen(!1),t&&(this._refocusing=!0,this._anchor?.focus(),this._refocusing=!1)}}get isOpen(){let e=this._panel;return e!==null&&M(e)}connectedCallback(){this._doc=this.ownerDocument,this.addEventListener(`pointerover`,this._onOver),this.addEventListener(`pointerout`,this._onOut),this.addEventListener(`focusin`,this._onFocusIn),this.addEventListener(`focusout`,this._onFocusOut),this._syncOpen()}attributeChangedCallback(){this.isConnected&&this._syncOpen()}disconnectedCallback(){this._clear();let e=this._panel;e&&j(e),this.removeEventListener(`pointerover`,this._onOver),this.removeEventListener(`pointerout`,this._onOut),this.removeEventListener(`focusin`,this._onFocusIn),this.removeEventListener(`focusout`,this._onFocusOut),this._doc=null}get _trigger(){return Vi(this,Li)}get _panel(){return Vi(this,Ri)}get _anchor(){let e=this._trigger;return e?Vi(e,zi)??e:null}_zone(e){if(!(e instanceof Node)||!this.contains(e))return null;let t=e instanceof Element?e:e.parentElement;return this._panel?.contains(t)?`panel`:this._trigger?.contains(t)?`trigger`:null}_delay(e,t){let n=Number(this.getAttribute(e));return this.hasAttribute(e)&&Number.isFinite(n)&&n>=0?n:t}_clear(){this._timer!==null&&clearTimeout(this._timer),this._timer=null}_syncOpen(){this._clear(),this._setOpen(this.hasAttribute(`open`))}_schedule(e){if(!e&&this.hasAttribute(`open`)||(this._clear(),this.isOpen===e))return;let t=e?this._delay(`open-delay`,Fi):this._delay(`close-delay`,Ii);this._timer=setTimeout(()=>{this._timer=null,this._setOpen(e)},t)}_setOpen(e){let t=this._panel;if(!t||this.isOpen===e)return;if(!e){j(t);return}let n=this._trigger;if(!n)throw Error(`wui-hover-card: panel without a trigger`);ke(n,t,{mode:`manual`,clampHeight:!0,keepOffscreen:this.hasAttribute(`open`),onClosed:()=>this._closed()}),this._doc?.addEventListener(`keydown`,this._onKeyDown,!0),this._describe(t),this.dispatchEvent(new CustomEvent(`wui:hover-card:open`,{bubbles:!0}))}_closed(){this._doc?.removeEventListener(`keydown`,this._onKeyDown,!0),this._described?.removeAttribute(`aria-describedby`),this._described=null,this.dispatchEvent(new CustomEvent(`wui:hover-card:close`,{bubbles:!0}))}_describe(e){let t=this._anchor;t&&(e.id||=`wui-hover-card-${++Bi}`,t.setAttribute(`aria-describedby`,e.id),this._described=t)}},Ui=class extends s{_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,Fe(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=De(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();Oe(t).then(()=>{e===this._session&&(this._closing=!1,this._releaseDialog(),we(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}},Wi=`.wui-nav-menu-link`,Gi=`(max-width: 767.98px)`,Ki=`data-open`,qi=e=>e instanceof Element?e:e instanceof Node?e.parentElement:null,Ji=e=>[...e].filter(e=>e instanceof HTMLElement),Yi=e=>{let t=e.children[0];if(!(t instanceof HTMLElement))throw Error(`Navigation entry has no control.`);return t},Xi=e=>{let t=e.children[1];return t instanceof HTMLElement?t:null},Zi=(e,t,n)=>{let r=e[t];if(r===void 0)throw Error(n);return r},Qi=class extends s{constructor(){super(),this._onClick=e=>this._handleClick(e),this._onKeyDown=e=>this._handleKeyDown(e),this._onFocusOut=e=>{let t=this._openItem(),n=e.relatedTarget;t&&n instanceof Node&&!t.contains(n)&&this._set(t,!1)},this._onPointerDown=()=>{this._pressedOpen=this._openItem()},this._onModeChange=()=>{let e=this._openItem();e&&this._set(e,!1)},this._onOutsidePress=e=>{let t=this._openItem();t&&!e.composedPath().includes(t)&&this._set(t,!1)},this._pressedOpen=null,this._media=null}connectedCallback(){this._teardown(),this.addEventListener(`click`,this._onClick),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`pointerdown`,this._onPointerDown,!0),this._media=window.matchMedia(Gi),this._media.addEventListener(`change`,this._onModeChange)}disconnectedCallback(){this._teardown()}open(e){let t=this._items().find(t=>{let n=t.children[0];return n instanceof HTMLElement&&this._isTrigger(n)&&n.dataset.key===e});t&&this._set(t,!0)}close(e=!1){let t=this._openItem();t&&(this._set(t,!1),e&&Yi(t).focus({preventScroll:!0}))}_items(){return Ji(this.querySelectorAll(`.wui-nav-menu-item`))}_openItem(){return this._items().find(e=>{let t=Xi(e);return t!==null&&this._isOpen(t)})??null}_isOpen(e){return e.hasAttribute(Ki)||M(e)}_isTrigger(e){return!!e?.classList.contains(`wui-nav-menu-trigger`)}_entries(){return this._items().map(Yi)}_links(e){let t=Xi(e);return t?Ji(t.querySelectorAll(Wi)):[]}_set(e,t){let n=Xi(e);if(!n)return;let r=Yi(e);if(t){let t=this._openItem();if(t&&t!==e&&this._set(t,!1),this._isOpen(n))return;r.setAttribute(`aria-expanded`,`true`),window.matchMedia(Gi).matches?(n.setAttribute(Ki,``),document.addEventListener(`pointerdown`,this._onOutsidePress,!0)):ke(r,n,{mode:`auto`,below:!0,flipAlign:!0,onClosed:()=>this._settle(e)}),this._emit(r,!0)}else n.removeAttribute(Ki),document.removeEventListener(`pointerdown`,this._onOutsidePress,!0),M(n)&&j(n),this._settle(e)}_settle(e){let t=Yi(e);t.getAttribute(`aria-expanded`)!==`false`&&(t.setAttribute(`aria-expanded`,`false`),this._emit(t,!1))}_emit(e,t){this.dispatchEvent(new CustomEvent(`wui-navigation-menu:toggle`,{bubbles:!0,detail:{key:e.dataset.key??null,open:t}}))}_handleClick(e){let t=this._pressedOpen;this._pressedOpen=null;let n=qi(e.target),r=n?.closest(`.wui-nav-menu-trigger`);if(r&&this.contains(r)){let e=N(r.parentElement,`Navigation trigger has no entry.`),n=N(Xi(e),`Navigation entry has no panel.`),i=t===e||this._isOpen(n);this._set(e,!i);return}let i=n?.closest(Wi);i&&this.contains(i)&&this.close()}_handleKeyDown(e){if(this._pressedOpen=null,e.altKey||e.ctrlKey||e.metaKey)return;let t=qi(e.target)?.closest(`.wui-nav-menu-trigger, .wui-nav-menu-toplink, .wui-nav-menu-link`);if(!(t instanceof HTMLElement)||!this.contains(t))return;let n=this._openItem();if(e.key===`Escape`){if(!n||!Xi(n)?.hasAttribute(Ki))return;e.preventDefault(),e.stopPropagation();let r=n.contains(t);this._set(n,!1),r&&Yi(n).focus({preventScroll:!0});return}if(t.matches(Wi)){this._linkKey(e,t);return}let r=this._entries(),i=r.indexOf(t),a=u(e.key,l(this));if(a===`ArrowRight`||a===`ArrowLeft`||a===`Home`||a===`End`){e.preventDefault();let t=a===`Home`?0:a===`End`?r.length-1:(i+(a===`ArrowRight`?1:-1)+r.length)%r.length;n&&this._set(n,!1),Zi(r,t,`Navigation has no entry to focus.`).focus({preventScroll:!0})}else if(e.key===`ArrowDown`&&this._isTrigger(t)){e.preventDefault();let n=N(t.parentElement,`Navigation trigger has no entry.`);this._set(n,!0),Zi(this._links(n),0,`Navigation panel has no link to focus.`).focus({preventScroll:!0})}}_linkKey(e,t){let n=N(t.closest(`.wui-nav-menu-item`),`Navigation link has no entry.`),r=this._links(n),i=r.indexOf(t);e.key===`ArrowDown`||e.key===`ArrowUp`?(e.preventDefault(),Zi(r,(i+(e.key===`ArrowDown`?1:-1)+r.length)%r.length,`Navigation panel has no link to focus.`).focus({preventScroll:!0})):e.key===`Home`?(e.preventDefault(),Zi(r,0,`Navigation panel has no link to focus.`).focus({preventScroll:!0})):e.key===`End`&&(e.preventDefault(),Zi(r,r.length-1,`Navigation panel has no link to focus.`).focus({preventScroll:!0}))}_teardown(){for(let e of this._items()){let t=Xi(e);if(!t)continue;let n=t.hasAttribute(Ki);t.removeAttribute(Ki),j(t),n&&this._settle(e)}this._media?.removeEventListener(`change`,this._onModeChange),this._media=null,document.removeEventListener(`pointerdown`,this._onOutsidePress,!0),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`focusout`,this._onFocusOut),this.removeEventListener(`pointerdown`,this._onPointerDown,!0)}},$i=n({isDrawn:()=>ea});function ea(e){return typeof e.checkVisibility==`function`?e.checkVisibility():e.closest(`[hidden]`)===null&&getComputedStyle(e).display!==`none`}var ta={allLabel:`All`,allReadText:`All notifications marked as read.`,archivedLabel:`Archived`,clientMessage:`These could not be marked as read. Refresh the page and try again.`,emptyText:`You are all caught up.`,forbiddenMessage:`You do not have permission to mark these as read.`,label:`Notifications`,markAllLabel:`Mark all read`,networkMessage:`Could not reach the server, so these were not marked as read. Check your connection and try again.`,noneUnreadText:`No unread notifications`,scrollTabsBackwardLabel:`Scroll tabs backward`,scrollTabsForwardLabel:`Scroll tabs forward`,serverMessage:`Something went wrong on our side, so these were not marked as read. Try again in a moment.`,todayLabel:`Today`,unreadAnnouncementTextOne:`{unread} unread notification`,unreadAnnouncementTextOther:`{unread} unread notifications`,unreadLabel:`Unread`,unreadPrefixText:`Unread:`,unreadWordLabel:`unread`,viewAllLabel:`View all`,yesterdayLabel:`Yesterday`},na=n({NOTIFICATION_COUNT_CAP:()=>99,groupNotificationsByDay:()=>da,notificationCountText:()=>oa,notificationDayHeading:()=>ua,notificationTime:()=>la,notificationTriggerLabel:()=>sa,notificationUnreadAnnouncement:()=>ca}),ra=99,ia=864e5,aa=()=>I(`notificationCentre`,ta);function oa(e){return e>99?`99+`:String(e)}function sa(e,t){return t===0?e:`${e}, ${oa(t)} ${aa().unreadWordLabel}`}function ca(e){return e===0?aa().noneUnreadText:Xe(aa(),`unreadAnnouncementText`,e,{unread:oa(e)})}function la(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?``:Ln(e,{pattern:`time`})}function ua(e,t=Date.now()){let n=Ln(e);return n===Ln(t)?aa().todayLabel:n===Ln(Fn(t)-ia)?aa().yesterdayLabel:n}function da(e,t=Date.now()){let n=new Map;for(let r of e){if(!Number.isFinite(Fn(r.at)))throw Error(`<AppNotificationCenter> item "${r.id}": at must be an ISO date-time with its zone (or a YYYY-MM-DD day), got ${String(r.at)}.`);let e=Ln(r.at),i=n.get(e);i||(i={key:e,heading:ua(r.at,t),items:[]},n.set(e,i)),i.items.push(r)}return[...n.values()]}var fa=Object.freeze([`POST`,`PUT`,`PATCH`,`DELETE`]),pa=e=>(Wr(`[@webority/ui-elements] Wui-Toast-Action: ${e}; the toast shows no action.`),null),ma=e=>typeof e==`object`&&!!e;function ha(e){if(e==null||e===``)return null;let t;try{t=JSON.parse(e)}catch{return pa(`the value is not JSON`)}let n=ma(t)?t:{},r=n.label,i=n.url,a=String(n.method??`POST`).toUpperCase();return typeof r!=`string`||r===``||typeof i!=`string`||i===``?pa(`label and url must be non-empty strings`):fa.includes(a)?{label:r,url:i,method:a}:pa(`method must be one of ${fa.join(`, `)}`)}var ga=n({CSRF_META_NAME:()=>_a,DEFAULT_CSRF_HEADER:()=>va,DEFAULT_TIMEOUT_MS:()=>Oa,HTTP_KINDS:()=>Sa,WUI_HEADERS:()=>H,WUI_REQUEST_HEADER:()=>xa,classifyStatus:()=>Ea,configureCsrf:()=>ba,createRequestQueue:()=>Ma,readCsrf:()=>wa,timeoutFromAttribute:()=>ka,wuiFetch:()=>ja}),_a=`wui-csrf`,va=`RequestVerificationToken`,ya={metaName:_a,header:va};function ba({metaName:e=_a,header:t=va}={}){ya={metaName:e,header:t}}var xa=`Wui-Request`,H=Object.freeze({fragment:`Wui-Fragment`,message:`Wui-Message`,redirect:`Wui-Redirect`,result:`Wui-Result`,keepOpen:`Wui-Keep-Open`,toastVariant:`Wui-Toast-Variant`,toastAction:`Wui-Toast-Action`,data:`Wui-Data`,next:`Wui-Next`}),Sa=Object.freeze([`ok`,`validation`,`forbidden`,`client`,`server`,`network`,`timeout`,`aborted`,`stale`,`session`]),Ca=new Set([`GET`,`HEAD`]);function wa(e=document){let t=[...e.querySelectorAll(`meta`)].find(e=>e.getAttribute(`name`)===ya.metaName),n=t?.getAttribute(`content`);return!t||!n?null:{header:t.getAttribute(`data-header`)||ya.header,token:n}}var Ta=e=>{try{return new URL(e,window.location.href).origin===window.location.origin}catch{return!1}};function Ea(e){return e>=200&&e<300?`ok`:e===401?`session`:e===403?`forbidden`:e===422?`validation`:e>=400&&e<500?`client`:`server`}var Da=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,Oa=3e4;function ka(e){let t=e?.trim()??``;return/^\d+$/.test(t)?Number(t):void 0}var Aa=e=>{if(e==null||e===``)return null;try{return JSON.parse(e)}catch(e){throw TypeError(`The ${H.data} response header is not JSON: ${e instanceof Error?e.message:String(e)}`,{cause:e})}};async function ja(e,t={}){let n=(t.method||`GET`).toUpperCase(),r=t.navigate||(e=>window.location.assign(e)),i={Accept:`text/html`,"X-Requested-With":`XMLHttpRequest`,[xa]:`1`,...t.headers};if(!Ca.has(n)&&Ta(e)){let e=wa();e&&(i[e.header]=e.token)}let a=e=>{if(e==null)return null;try{return decodeURIComponent(e)}catch{return e}},o=(e,t=null,n=``)=>{let r=e=>t?.headers.get(e)??null;return{kind:e,ok:e===`ok`,status:t?.status??0,html:n,response:t,message:a(r(H.message)),redirect:r(H.redirect),result:r(H.result),keepOpen:r(H.keepOpen)===`1`,toastVariant:r(H.toastVariant),toastAction:ha(r(H.toastAction)),fragment:r(H.fragment)===`1`,data:Aa(a(r(H.data))),next:r(H.next)}},s=new AbortController,c=()=>s.abort(),l=t.signal;l?.aborted&&s.abort(),l?.addEventListener(`abort`,c,{once:!0});let u=t.timeoutMs??0,d=!1,f=u>0?setTimeout(()=>{d=!0,s.abort()},u):void 0,p=e=>l?.aborted?`aborted`:d?`timeout`:Da(e)?`aborted`:`network`;try{let a;try{a=await fetch(e,{method:n,...t.body===void 0?{}:{body:t.body},headers:i,signal:s.signal,credentials:`same-origin`})}catch(e){return o(p(e))}let c=Ea(a.status);if(c===`ok`&&a.redirected&&a.headers.get(H.fragment)!==`1`&&(c=`session`),c===`session`)return r(a.status===401?a.headers.get(`Location`)||window.location.href:a.url),o(c,a);let l=``;if(c===`ok`||c===`validation`)try{l=await a.text()}catch(e){return o(p(e),a)}return o(c,a,l)}finally{clearTimeout(f),l?.removeEventListener(`abort`,c)}}function Ma(){let e=null,t=0;return{async run(n,r={}){e?.abort();let i=new AbortController;e=i;let a=++t,o=r.signal;o&&(o.aborted?i.abort():o.addEventListener(`abort`,()=>i.abort(),{once:!0}));let s;try{s=await ja(n,{...r,signal:i.signal})}finally{e===i&&(e=null)}return a!==t&&s.kind!==`aborted`?{...s,kind:`stale`,ok:!1}:s},abort(){e?.abort(),e=null}}}var Na=()=>I(`notificationCentre`,ta),Pa=`.wui-notification-center-trigger`,Fa=`.wui-notification-center-panel`,Ia=`.wui-notification-center-count`,La=`.wui-notification-center-live`,Ra=`.wui-notification-center-markall`,za=`.wui-notification-center-item`,Ba=`wui-notification-center-item-read`,Va=`.wui-notification-center-unread-label`,Ha=`.app-tabs`,Ua=`.wui-notification-center-tabs [role='tablist']`,Wa=`.wui-notification-center-tabs [role='tab']`,Ga=`.wui-notification-center-empty`,Ka=`(max-width: 767.98px)`,qa={ArrowDown:1,ArrowUp:-1,Home:`first`,End:`last`},Ja=e=>!!e,Ya=()=>({forbidden:Na().forbiddenMessage,client:Na().clientMessage,validation:Na().clientMessage,server:Na().serverMessage,network:Na().networkMessage}),U=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Xa=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Za=class extends s{constructor(){super(),this._unread=0,this._busy=!1,this._sheet=!1,this._awaitChildren=null,this._onClick=e=>this._click(e),this._onKeyDown=e=>this._key(e),this._onToggle=e=>{e.type===`toggle`&&`newState`in e&&e.newState===`closed`&&this._closedByBrowser()},this._onFocusOut=e=>{let t=e.relatedTarget;t instanceof Node&&!this.contains(t)&&this.close()}}static get observedAttributes(){return[`open`]}connectedCallback(){this._unread=this._initialUnread(),this.addEventListener(`click`,this._onClick),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`toggle`,this._onToggle,!0),this.isOpen&&(U(this,Fa)===null||U(this,Pa)===null)?(this._awaitChildren=new MutationObserver(()=>this._finishAwaitedOpen()),this._awaitChildren.observe(this,{childList:!0})):(this._syncOpen(),this.isOpen&&this._showPanel())}disconnectedCallback(){this._disarmAwait(),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`focusout`,this._onFocusOut),this.removeEventListener(`toggle`,this._onToggle,!0);let e=U(this,Fa);e&&j(e)}attributeChangedCallback(e,t,n){e===`open`&&t!==n&&(this._awaitChildren?n===null&&this._disarmAwait():this.isConnected&&(n===null?this._hidePanel():this._showPanel()))}_finishAwaitedOpen(){U(this,Fa)!==null&&U(this,Pa)!==null&&(this._disarmAwait(),this._syncOpen(),this._showPanel())}_disarmAwait(){this._awaitChildren?.disconnect(),this._awaitChildren=null}_showPanel(){let e=N(U(this,Fa),`<wui-notification-center> needs its panel to open.`),t=N(U(this,Pa),`<wui-notification-center> needs its trigger to open.`);M(e)||(this._sheet=window.matchMedia(Ka).matches,this._sheet?Ae(e,!0):ke(t,e,{mode:`auto`,onClosed:()=>this._closedByBrowser()}),M(e)&&this._layoutTabs())}_hidePanel(){let e=U(this,Fa);e&&M(e)&&(this._sheet?Ae(e,!1):j(e))}_closedByBrowser(){if(!this.isConnected||!this.hasAttribute(`open`))return;let e=U(this,Fa);this.close({restoreFocus:e?.contains(this.ownerDocument.activeElement)??!1})}get isOpen(){return this.hasAttribute(`open`)}open(){this.isOpen||(N(U(this,Fa),`<wui-notification-center> needs its panel to open.`),N(U(this,Pa),`<wui-notification-center> needs its trigger to open.`),this.setAttribute(`open`,``),this._syncOpen(),U(this,Fa)?.focus(),this._announceToggle())}close({restoreFocus:e=!1}={}){this.isOpen&&(this.removeAttribute(`open`),this._syncOpen(),e&&U(this,Pa)?.focus(),this._announceToggle())}toggle(){this.isOpen?this.close():this.open()}_announceToggle(){this.dispatchEvent(new CustomEvent(`wui:notification-center:toggle`,{bubbles:!0,detail:{open:this.isOpen}}))}_syncOpen(){this.querySelector(Pa)?.setAttribute(`aria-expanded`,this.isOpen?`true`:`false`)}_initialUnread(){let e=Number.parseInt(this.getAttribute(`unread`)??``,10);return Number.isInteger(e)&&e>=0?e:this.querySelectorAll(`${za}:not(.${Ba}):not([data-archived="true"])`).length}_click(e){let t=e.target;if(!(t instanceof Element))return;let n=t.closest(Wa);if(n instanceof HTMLElement&&this.contains(n)){if(this.hasAttribute(`controlled`))return;this._pickTab(n);return}let r=t.closest(`${Pa}, ${Ra}, ${za}`);r instanceof HTMLElement&&this.contains(r)&&(r.matches(Pa)?this.toggle():this.hasAttribute(`controlled`)||(r.matches(Ra)?this._markAll():this._markItem(r)))}_key(e){if(!this.isOpen)return;let t=e.target;if(!(t instanceof Element))throw Error(`Keyboard event target is not an element.`);if(!this.querySelector(Fa)?.contains(t)||t.closest(Ha))return;let n=qa[e.key];if(n===void 0)return;let r=Xa(this,za).filter(ea);if(r.length===0)return;let i=t.closest(za),a=i instanceof HTMLElement?r.indexOf(i):-1,o;o=n===`first`?0:n===`last`?r.length-1:a===-1?n===1?0:r.length-1:Math.min(r.length-1,Math.max(0,a+n)),e.preventDefault(),r[o]?.focus()}_markItem(e){e.classList.contains(Ba)||(this._applyRead(e),e.dataset.archived!==`true`&&(this._unread=Math.max(0,this._unread-1)),this._render(),this._say(ca(this._unread)),this._emitRead([e.dataset.id].filter(Ja),!1))}async _markAll(){if(this._busy)return;let e=Xa(this,`${za}:not(.${Ba})`);if(e.length===0&&this._unread===0)return;let t=e.map(e=>e.dataset.id).filter(Ja),n=this.getAttribute(`read-action`);if(n){this._setBusy(!0);let e=new URLSearchParams;for(let n of t)e.append(`ids`,n);let r=await ja(n,{method:`POST`,body:e});if(this._setBusy(!1),!r.ok){if(r.kind===`session`||r.kind===`aborted`)return;let e=r.kind,t=r.message||Ya()[e]||Na().serverMessage;this._say(t),this.dispatchEvent(new CustomEvent(`wui:notification-center:failed`,{bubbles:!0,detail:{kind:e,message:t}}));return}}for(let t of e)this._applyRead(t);this._unread=0,this._render(),this._say(Na().allReadText),this._emitRead(t,!0)}_pickTab(e){let t=e.closest(Ua);if(t instanceof HTMLElement){for(let n of Xa(t,Wa)){let t=n===e;n.classList.toggle(`active`,t),n.setAttribute(`aria-selected`,t?`true`:`false`),n.setAttribute(`tabindex`,t?`0`:`-1`)}this._layoutTabs(),this._filterItems(e.dataset.key)}}_layoutTabs(){for(let e of Xa(this,Ua)){let t=U(e,`.app-tab.active`);t&&(e.style.setProperty(`--wui-tab-x`,`${t.offsetLeft}px`),e.style.setProperty(`--wui-tab-w`,`${t.offsetWidth}px`)),e.setAttribute(`data-wui-tabs`,``)}}_filterItems(e){let t=!1;for(let n of Xa(this,za)){let r=n.dataset.archived===`true`,i=n.classList.contains(Ba),a=e===`archived`?r:!r&&(e!==`unread`||!i);a&&(t=!0);let o=n.closest(`li`);o&&(o.hidden=!a)}for(let e of Xa(this,`.wui-notification-center-list section`))e.hidden=[...e.querySelectorAll(`li`)].every(e=>e.hidden);let n=U(this,Ga);n&&(n.hidden=t)}_applyRead(e){e.classList.add(Ba),e.querySelector(Va)?.remove()}_setBusy(e){this._busy=e;let t=this.querySelector(Ra);t instanceof HTMLButtonElement&&(t.disabled=e||this._unread===0,e?t.setAttribute(`aria-busy`,`true`):t.removeAttribute(`aria-busy`))}_render(){let e=U(this,Ia);e&&(e.textContent=oa(this._unread),e.hidden=this._unread===0),this.querySelector(Pa)?.setAttribute(`aria-label`,sa(this.getAttribute(`label`)||Na().label,this._unread));let t=this.querySelector(Ra);t instanceof HTMLButtonElement&&(t.disabled=this._unread===0)}_say(e){let t=this.querySelector(La);t&&(t.textContent=e)}_emitRead(e,t){this.dispatchEvent(new CustomEvent(`wui:notification-center:read`,{bubbles:!0,detail:{ids:e,all:t}}))}},Qa=`.wui-onboarding-card`,$a=`.wui-onboarding-steps`,eo=`.wui-onboarding-toggle`,to=`.wui-onboarding-dismiss`,no=`.wui-onboarding-restore`,ro=`wui-onboarding:`,io=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},ao=class extends s{constructor(){super(),this._onClick=e=>{let t=e.target instanceof Element?e.target:null;t&&(t.closest(to)?this.dismiss():t.closest(no)?this.restore():t.closest(eo)&&this.toggle())}}connectedCallback(){this.addEventListener(`click`,this._onClick),this._stored()===`dismissed`&&this._setDismissed(!0)}disconnectedCallback(){this.removeEventListener(`click`,this._onClick)}get dismissed(){return io(this,Qa)?.hidden===!0}get collapsed(){return io(this,$a)?.hidden===!0}dismiss(){this.dismissed||(this._setDismissed(!0),this._store(`dismissed`),io(this,no)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:dismiss`,{bubbles:!0})))}restore(){this.dismissed&&(this._setDismissed(!1),this._store(null),io(this,eo)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:restore`,{bubbles:!0})))}toggle(){let e=io(this,$a);if(!e)return;let t=!e.hidden;e.hidden=t,this.querySelector(eo)?.setAttribute(`aria-expanded`,String(!t)),this.dispatchEvent(new CustomEvent(`wui:onboarding:collapse`,{bubbles:!0,detail:{collapsed:t}}))}_setDismissed(e){let t=io(this,Qa),n=io(this,no);t&&(t.hidden=e),n&&(n.hidden=!e)}_key(){let e=this.getAttribute(`storage-key`);return e?ro+e:null}_stored(){let e=this._key();if(!e)return null;try{return window.localStorage.getItem(e)}catch{return null}}_store(e){let t=this._key();if(t)try{e?window.localStorage.setItem(t,e):window.localStorage.removeItem(t)}catch(e){if(!(e instanceof DOMException))throw e}}},oo=n({BUSY_CLASS:()=>so,isInert:()=>lo,isReadOnly:()=>co,syncFieldState:()=>uo}),so=`wui-field-busy`,co=e=>e.hasAttribute(`readonly`),lo=e=>e.hasAttribute(`disabled`)||e.hasAttribute(`readonly`)||e.hasAttribute(`loading`);function uo(e,t){let n=e.hasAttribute(`loading`);n?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`),t&&(t.classList.toggle(so,n),co(e)?t.setAttribute(`aria-readonly`,`true`):t.removeAttribute(`aria-readonly`))}var fo=n({syncFormMirror:()=>go,syncFormMirrors:()=>_o}),po=`data-wui-mirror`;function mo(e,t,n,r){t.name=n,t.value=r==null?``:String(r);for(let n of[...t.attributes])n.name.startsWith(`data-val`)&&!e.hasAttribute(n.name)&&t.removeAttribute(n.name);for(let n of e.attributes)n.name.startsWith(`data-val`)&&t.setAttribute(n.name,n.value);t.disabled=e.hasAttribute(`disabled`)}function ho(e){let t=document.createElement(`input`);return t.type=`hidden`,t.setAttribute(po,``),e.appendChild(t),t}function go(e,t){let n=e.getAttribute(`name`)??``,r=e.querySelector(`:scope > input[${po}]`),i=r instanceof HTMLInputElement?r:null;n?(i||=ho(e),mo(e,i,n,t)):i?.remove()}function _o(e,t){let n=e.getAttribute(`name`)??``,r=[...e.querySelectorAll(`:scope > input[${po}]`)].filter(e=>e instanceof HTMLInputElement),i=[...e.attributes].some(e=>e.name.startsWith(`data-val`)),a=n?t.length>0?t:i?[``]:[]:[];for(let e of r.splice(a.length))e.remove();a.forEach((t,i)=>{mo(e,r[i]??ho(e),n,t)})}var vo=/[^0-9]/g,yo=/[^0-9a-zA-Z]/g,bo=class extends s{static formAssociated=!0;static get observedAttributes(){return[`value`,`length`,`mode`,`disabled`,`readonly`,`loading`,`size`,`aria-label`]}get length(){let e=Number.parseInt(this.getAttribute(`length`)??`6`,10);return Number.isFinite(e)&&e>0?e:6}set length(e){this.setAttribute(`length`,String(e))}get mode(){return this.getAttribute(`mode`)===`alphanumeric`?`alphanumeric`:`numeric`}set mode(e){this.setAttribute(`mode`,String(e??`numeric`))}get value(){return this._value??``}set value(e){this._value=this._clean(e),go(this,this._value),this._paint()}_clean(e){return(e==null?``:String(e)).replace(this.mode===`alphanumeric`?yo:vo,``).slice(0,this.length)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}}connectedCallback(){this._rendered?this._onSelectionChange&&document.addEventListener(`selectionchange`,this._onSelectionChange):(this._defaultCaptured||=(this._defaultValue=this._value,!0),this.render())}formResetCallback(){this._value=this._defaultValue||``,go(this,this._value),this._paint()}attributeChangedCallback(e,t,n){this._rendered&&(e===`value`?(this._value=this._clean(n),go(this,this._value),this._paint()):this.render())}render(){this._value=this._clean(this.getAttribute(`value`)??this._value);let e=this.length,t=this.mode===`numeric`,n=this.hasAttribute(`disabled`),r=co(this)||this.hasAttribute(`loading`),i=this.getAttribute(`size`),a=i===`sm`||i===`lg`?` otp-${i}`:``,o=Array.from({length:e},()=>F(`span`,{class:`otp-slot`,"aria-hidden":`true`})),s=this.getAttribute(`aria-label`);this.replaceChildren(F(`div`,{class:`otp${a}`},F(`input`,{class:`otp-field`,type:`text`,autocomplete:`one-time-code`,inputmode:t?`numeric`:`text`,pattern:t?`[0-9]*`:void 0,"aria-label":s||void 0,autocapitalize:`off`,autocorrect:`off`,spellcheck:`false`,disabled:n,readonly:r}),F(`div`,{class:`otp-slots`,"aria-hidden":`true`},...o))),this._rendered=!0,go(this,this._value),uo(this,this.querySelector(`.otp`)),this._wire(),this._paint()}_refs(){let e=this.querySelector(`.otp-field`);return{input:e instanceof HTMLInputElement?e:null,slots:[...this.querySelectorAll(`.otp-slot`)].filter(e=>e instanceof HTMLElement)}}_paint(){let{input:e,slots:t}=this._refs();if(!e||!t.length)return;e.value!==this._value&&(e.value=this._value);let n=e.selectionStart??this._value.length,r=Math.min(n,t.length-1),i=document.activeElement===e;t.forEach((e,t)=>{e.textContent=this._value[t]??``,e.classList.toggle(`filled`,!!this._value[t]),e.classList.toggle(`active`,i&&t===r)})}_wire(){let{input:e}=this._refs();if(!e)return;let t=e=>{let t=this._clean(e),n=t!==this._value;this._value=t,go(this,this._value),this._paint(),n&&this.dispatchEvent(new Event(`change`,{bubbles:!0})),n&&t.length===this.length&&this.dispatchEvent(new CustomEvent(`complete`,{bubbles:!0,detail:t}))};e.addEventListener(`input`,()=>{let n=e.value;if(this._value.length===this.length&&n.length>this._value.length&&n.startsWith(this._value)){let e=this._clean(n.slice(this._value.length));if(e){t(e);return}}t(n)}),e.addEventListener(`paste`,e=>{if(lo(this))return;let n=e.clipboardData?.getData(`text`);n!=null&&(e.preventDefault(),t(n))});for(let t of[`keyup`,`click`,`blur`,`select`])e.addEventListener(t,()=>this._paint());e.addEventListener(`focus`,()=>{this._value.length===this.length&&e.select(),this._paint()}),this._onSelectionChange&&document.removeEventListener(`selectionchange`,this._onSelectionChange),this._onSelectionChange=()=>{document.activeElement===e&&this._paint()},document.addEventListener(`selectionchange`,this._onSelectionChange)}disconnectedCallback(){this._onSelectionChange&&document.removeEventListener(`selectionchange`,this._onSelectionChange)}},xo={label:`More`},So=`data-wui-overflow-hidden`,Co=`[aria-selected="true"], .active`,wo=`.chip-body, input, a[href], button:not(.chip-remove)`,To=()=>I(`overflow`,xo),Eo=1,Do=`data-wui-overflow-menu`,Oo=`[aria-haspopup], [data-wui-dropdown-trigger]`,ko=0,Ao=e=>Number.parseFloat(e)||0,jo=e=>e.nodeType===1,Mo=e=>{let t=e.getAttribute(`data-overflow-label`);if(t)return t;let n=[],r=e=>{for(let t of e.childNodes)if(t.nodeType===3){let e=t.textContent?.trim();e&&n.push(e)}else jo(t)&&!t.matches(`svg, img, [aria-hidden='true'], [data-wui-dropdown-menu]`)&&r(t)};if(r(e),n.length)return n.join(` `);let i=No(e)??e;return i.getAttribute(`aria-label`)||e.getAttribute(`aria-label`)||i.title||e.title},No=e=>{if(e.matches(`button, a[href], label, input`))return e;let t=e.querySelector(wo);return t instanceof HTMLElement?t:null},Po=e=>{let t=No(e);return t?.matches(Oo)?t:null},Fo=class extends s{constructor(){super(),this._hiddenKey=``,this._ro=null,this._mo=null,this._observedList=null,this._doc=null,this._onDocDown=e=>{!this._menu.hidden&&!e.composedPath().includes(this)&&this._close(!1)}}connectedCallback(){this.classList.add(`wui-overflow`),this._build(),this._doc=this.ownerDocument,this._doc.addEventListener(`pointerdown`,this._onDocDown,!0),typeof ResizeObserver<`u`&&(this._ro=new ResizeObserver(()=>this.layout()),this._ro.observe(this)),typeof MutationObserver<`u`&&(this._mo=new MutationObserver(()=>this.layout()),this._watch()),this.layout()}disconnectedCallback(){this._ro?.disconnect(),this._mo?.disconnect(),this._ro=null,this._mo=null,this._observedList=null,this._doc?.removeEventListener(`pointerdown`,this._onDocDown,!0),this._doc=null,ee(this)}static get observedAttributes(){return[`label`]}attributeChangedCallback(){let e=this._more?.firstChild;e&&(e.textContent=this._label())}_label(){return this.getAttribute(`label`)||To().label}_list(){let e=this.querySelector(`[data-wui-overflow-list]`);return e instanceof HTMLElement?e:null}_items(e){return[...e.children].filter(e=>!e.hasAttribute(`data-wui-overflow-skip`))}_build(){if(this._more)return;let e=`wui-overflow-menu-${++ko}`,t=this.ownerDocument.createElement(`button`);t.type=`button`,t.className=`wui-overflow-more`,t.hidden=!0,t.setAttribute(`aria-haspopup`,`menu`),t.setAttribute(`aria-expanded`,`false`),t.setAttribute(`aria-controls`,e),t.append(this._label());let n=this.ownerDocument.createElement(`div`);n.className=`wui-overflow-menu`,n.id=e,n.setAttribute(`role`,`menu`),n.hidden=!0,this.append(t,n),this._more=t,this._menu=n,t.addEventListener(`click`,()=>this._menu.hidden?this._open(!1):this._close(!0)),t.addEventListener(`keydown`,e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),this._open(!0))}),n.addEventListener(`keydown`,e=>this._onMenuKey(e))}_watch(){let e=this._list();this._mo&&e!==this._observedList&&(this._mo.disconnect(),this._observedList=e,e&&this._mo.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`class`,`aria-selected`,`disabled`,`aria-disabled`,`data-overflow-label`]}))}layout(){let e=this._list();if(this._watch(),!e||!this._more)return;let t=this._items(e);for(let e of t)e.removeAttribute(So),e.removeAttribute(Do);this._more.hidden=!0;let n=this.clientWidth,r=[];if(t.length&&n<=0&&this.getClientRects().length>0)r=t;else if(n>0&&t.length){let i=getComputedStyle(e),a=Ao(i.columnGap),o=Ao(i.paddingLeft)+Ao(i.paddingRight)+Ao(i.borderLeftWidth)+Ao(i.borderRightWidth),s=t.map(e=>e.offsetWidth);if(s.reduce((e,t)=>e+t,0)+a*(t.length-1)>n-o+Eo){this._more.hidden=!1;let e=n-o-this._more.offsetWidth-Ao(getComputedStyle(this).columnGap),i=this.hasAttribute(`keep`)?this.getAttribute(`keep`):Co,c=new Set,l=0,u=0,d=i?t.filter(e=>e.matches(i)):[];for(let n of d){let r=l+(s[t.indexOf(n)]??0)+(u?a:0);r>e||(c.add(n),l=r,u+=1)}for(let n=0;n<t.length;n+=1){let r=t[n];if(!r||c.has(r))continue;let i=l+(s[n]??0)+(u?a:0);if(i>e)break;c.add(r),l=i,u+=1}r=t.filter(e=>!c.has(e))}}for(let e of r)e.setAttribute(So,``),Po(e)&&e.setAttribute(Do,``);this._more.hidden=r.length===0,r.length?this._menu.hidden||this._fill(r):this._close(!1);let i=r.map(e=>t.indexOf(e)).join(`,`);i!==this._hiddenKey&&(this._hiddenKey=i,this.dispatchEvent(new CustomEvent(`wui-overflow-change`,{bubbles:!0,detail:{hidden:r.length}})))}_hiddenItems(){let e=this._list();return e?this._items(e).filter(e=>e.hasAttribute(So)):[]}_fill(e){this._menu.replaceChildren();for(let t of e){let e=this.ownerDocument.createElement(`button`);e.type=`button`,e.className=`wui-overflow-item`,e.tabIndex=-1;let n=t.querySelector(`input[type=checkbox], input[type=radio]`);n instanceof HTMLInputElement?(e.setAttribute(`role`,n.type===`radio`?`menuitemradio`:`menuitemcheckbox`),e.setAttribute(`aria-checked`,String(n.checked))):e.setAttribute(`role`,`menuitem`);let r=No(t),i=!r||`disabled`in r&&r.disabled||r.getAttribute(`aria-disabled`)===`true`||t.matches(`.disabled, [aria-disabled='true']`);i&&e.setAttribute(`aria-disabled`,`true`),e.textContent=Mo(t),e.addEventListener(`click`,()=>{i||r&&this._choose(t,r)}),this._menu.append(e)}}_choose(e,t){this._close(!1),t.click(),this.layout();let n=Po(e)?.isConnected?e.querySelector(`.dropdown-item:not([aria-disabled='true'])`):null;if(n){n.focus();return}let r=!e.hasAttribute(So)&&e.matches(`button, a[href]`)?e:this._more;r.hidden||r.focus()}_open(e){let t=this._hiddenItems();if(!t.length)return;this._fill(t),this._menu.hidden=!1,this._more.setAttribute(`aria-expanded`,`true`);let n=()=>T(this._more,this._menu);if(n(),E(this,n),e){let e=this._menu.firstElementChild;e instanceof HTMLElement&&e.focus()}}_close(e){this._menu&&!this._menu.hidden&&(this._menu.hidden=!0,this._more.setAttribute(`aria-expanded`,`false`),ee(this),e&&this._more.focus())}_onMenuKey(e){let t=[...this._menu.children].filter(e=>e instanceof HTMLElement),n=this.ownerDocument.activeElement,r=n instanceof HTMLElement?t.indexOf(n):-1,i=null;if(e.key===`ArrowDown`)i=t[(r+1)%t.length];else if(e.key===`ArrowUp`)i=t[(r-1+t.length)%t.length];else if(e.key===`Home`)i=t[0];else if(e.key===`End`)i=t[t.length-1];else if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this._close(!0);return}else if(e.key===`Tab`){this._close(!1);return}else return;e.preventDefault(),i?.focus()}},Io=`.wui-rating-star`,Lo=`wui-rating-star-preview`,Ro=`wui-rating-previewing`,zo=`wui-rating-star-full`,Bo=`wui-rating-star-empty`,Vo=[zo,`wui-rating-star-half`,Bo],Ho=e=>[...e.querySelectorAll(Io)].filter(e=>e instanceof HTMLElement),Uo=class extends s{_onChange;_onOver;_onLeave;constructor(){super(),this._onChange=e=>{let t=e.target;t instanceof HTMLInputElement&&t.type===`radio`&&this._fill(Number(t.value))},this._onOver=e=>{if(this.hasAttribute(`disabled`))return;let t=P(e.target,Io);t instanceof HTMLElement&&this._preview(Number(t.dataset.value))},this._onLeave=()=>this._preview(0)}connectedCallback(){this.addEventListener(`change`,this._onChange),this.addEventListener(`mouseover`,this._onOver),this.addEventListener(`mouseleave`,this._onLeave)}disconnectedCallback(){this.removeEventListener(`change`,this._onChange),this.removeEventListener(`mouseover`,this._onOver),this.removeEventListener(`mouseleave`,this._onLeave)}_fill(e){for(let t of Ho(this))t.classList.remove(...Vo),t.classList.add(Number(t.dataset.value)<=e?zo:Bo)}_preview(e){this.classList.toggle(Ro,e>0);for(let t of Ho(this))t.classList.toggle(Lo,e>0&&Number(t.dataset.value)<=e)}},Wo=class extends s{_doc;_onKeyDown;constructor(){super(),this._doc=null,this._onKeyDown=e=>{this.hasAttribute(`keys`)&&vt(e,{j:()=>this._press(`.wui-record-pager-next`),k:()=>this._press(`.wui-record-pager-prev`)},this.closest(`[${rt}]`))}}connectedCallback(){this._doc=this.ownerDocument,N(this._doc,`wui-record-pager has no owner document`).addEventListener(`keydown`,this._onKeyDown)}disconnectedCallback(){this._doc?.removeEventListener(`keydown`,this._onKeyDown),this._doc=null}_press(e){let t=this.querySelector(e);!(t instanceof HTMLElement)||t instanceof HTMLButtonElement&&t.disabled||t.getAttribute(`aria-disabled`)===`true`||t.click()}},Go={daysAgoTextOne:`{count} day ago`,daysAgoTextOther:`{count} days ago`,hoursAgoTextOne:`{count} hour ago`,hoursAgoTextOther:`{count} hours ago`,inDaysTextOne:`in {count} day`,inDaysTextOther:`in {count} days`,inHoursTextOne:`in {count} hour`,inHoursTextOther:`in {count} hours`,inMinutesTextOne:`in {count} minute`,inMinutesTextOther:`in {count} minutes`,justNowText:`just now`,minutesAgoTextOne:`{count} minute ago`,minutesAgoTextOther:`{count} minutes ago`},Ko=6e4,qo=60*Ko,Jo=24*qo,Yo=()=>I(`relativeTime`,Go),Xo={minute:`minutesAgoText`,hour:`hoursAgoText`,day:`daysAgoText`},Zo={minute:`inMinutesText`,hour:`inHoursText`,day:`inDaysText`};function Qo(e,t=Date.now()){let n=Fn(e);if(!Number.isFinite(n))return z();let r=t-n,i=Math.abs(r);if(i>=7*Jo)return Ln(n);if(i<Ko)return Yo().justNowText;let[a,o]=i<qo?[Math.floor(i/Ko),`minute`]:i<Jo?[Math.floor(i/qo),`hour`]:[Math.floor(i/Jo),`day`];return Xe(Yo(),(r>0?Xo:Zo)[o],a)}function $o(e){let t=Fn(e);return Number.isFinite(t)?`${Ln(t,{pattern:`datetime`})} IST`:z()}var es=3e4,ts=new Set,ns=null,rs=()=>{if(!(typeof document<`u`&&document.hidden))for(let e of ts)e.refresh()},is=e=>{ts.add(e),ts.size===1&&(ns=setInterval(rs,es),document.addEventListener(`visibilitychange`,rs))},as=e=>{ts.delete(e),ts.size===0&&(clearInterval(ns??void 0),ns=null,document.removeEventListener(`visibilitychange`,rs))},os=class extends s{_observer;constructor(){super(),this._observer=null}connectedCallback(){this.refresh(),is(this),this._observer=new MutationObserver(()=>this.refresh()),this._observer.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`datetime`]})}disconnectedCallback(){as(this),this._observer?.disconnect(),this._observer=null}refresh(){let e=this.querySelector(`time[datetime]`);if(!(e instanceof HTMLTimeElement))return;let t=e.getAttribute(`datetime`),n=Qo(t);e.textContent!==n&&(e.textContent=n);let r=$o(t);this.getAttribute(`data-wui-tooltip`)!==r&&this.setAttribute(`data-wui-tooltip`,r)}},ss=n({avatarNode:()=>ls,safeImageUrl:()=>cs}),cs=e=>{let t=String(e??``).trim();return/^(https?:)?\/\//i.test(t)||/^\/(?!\/)/.test(t)||/^data:image\/(png|jpe?g|gif|webp|avif);/i.test(t)?t:``};function ls(e,t=`wui-opt-avatar`){let n=cs(e.avatar);return!n&&!e.initials?null:F(`span`,{class:`avatar ${t}`,"aria-hidden":`true`},F(`span`,{class:`avatar-face`},e.initials??``),n?F(`img`,{class:`avatar-img`,src:n,alt:``}):null)}var us={add:[[`path`,{d:`M6 12h12M12 18V6`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"alert-circle":[[`path`,{d:`M12 7.75V13M21.08 8.58v6.84c0 1.12-.6 2.16-1.57 2.73l-5.94 3.43c-.97.56-2.17.56-3.15 0l-5.94-3.43a3.15 3.15 0 0 1-1.57-2.73V8.58c0-1.12.6-2.16 1.57-2.73l5.94-3.43c.97-.56 2.17-.56 3.15 0l5.94 3.43c.97.57 1.57 1.6 1.57 2.73Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M12 16.2v.1`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"alert-triangle":[[`path`,{d:`M12 9v5M12 21.41H5.94c-3.47 0-4.92-2.48-3.24-5.51l3.12-5.62L8.76 5c1.78-3.21 4.7-3.21 6.48 0l2.94 5.29 3.12 5.62c1.68 3.03.22 5.51-3.24 5.51H12v-.01Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M11.995 17h.009`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"arrow-left":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M9.57 5.93L3.5 12l6.07 6.07M20.5 12H3.67`}]],"arrow-right":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M14.43 5.93L20.5 12l-6.07 6.07M3.5 12h16.83`}]],at:[[`path`,{d:`M16 12a4 4 0 1 1-8 0 4 4 0 1 1 8 0M16 12v1.5a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-3.5 7.13`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],calendar:[[`path`,{d:`M8 2v3M16 2v3M3.5 9.09h17M21 8.5V17c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V8.5c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M15.695 13.7h.009M15.695 16.7h.009M11.995 13.7h.01M11.995 16.7h.01M8.294 13.7h.01M8.294 16.7h.01`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"calendar-dots":[[`path`,{d:`M8 2v3M16 2v3M16 3.5c3.33.18 5 1.45 5 6.15v6.18c0 4.12-1 6.18-6 6.18H9c-5 0-6-2.06-6-6.18V9.65c0-4.7 1.67-5.96 5-6.15h8ZM20.75 17.6H3.25`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M12 8.25c-1.23 0-2.27.67-2.27 1.97 0 .62.29 1.09.73 1.39-.61.36-.96.94-.96 1.62 0 1.24.95 2.01 2.5 2.01 1.54 0 2.5-.77 2.5-2.01 0-.68-.35-1.27-.97-1.62.45-.31.73-.77.73-1.39 0-1.3-1.03-1.97-2.26-1.97Zm0 2.84c-.52 0-.9-.31-.9-.8 0-.5.38-.79.9-.79s.9.29.9.79c0 .49-.38.8-.9.8ZM12 14c-.66 0-1.14-.33-1.14-.93 0-.6.48-.92 1.14-.92.66 0 1.14.33 1.14.92 0 .6-.48.93-1.14.93Z`,fill:`currentColor`}]],chart:[[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M15.5 18.5c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2s-2 .9-2 2v9a2 2 0 0 0 2 2ZM8.5 18.5c1.1 0 2-.9 2-2V13c0-1.1-.9-2-2-2s-2 .9-2 2v3.5a2 2 0 0 0 2 2Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],check:[[`path`,{d:`m5 12.75 4.5 4.5L19 7.5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"check-circle":[[`path`,{d:`M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`m7.75 12 2.83 2.83 5.67-5.66`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"chevron-down":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M19.92 8.95l-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95`}]],"chevron-left":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M15 19.92L8.48 13.4c-.77-.77-.77-2.03 0-2.8L15 4.08`}]],"chevron-right":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M8.91 19.92l6.52-6.52c.77-.77.77-2.03 0-2.8L8.91 4.08`}]],"chevron-up":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M19.92 15.05L13.4 8.53c-.77-.77-2.03-.77-2.8 0l-6.52 6.52`}]],"chevrons-up-down":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M9.01 20.5l-5.02-5.01M9.01 3.5v17M14.99 3.5l5.02 5.01M14.99 20.5v-17`}]],circle:[[`path`,{d:`M11.97 22c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M12 16.23a4.23 4.23 0 1 0 0-8.46 4.23 4.23 0 0 0 0 8.46Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],clock:[[`path`,{d:`M22 12c0 5.52-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2s10 4.48 10 10Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`m15.71 15.18-3.1-1.85c-.54-.32-.98-1.09-.98-1.72v-4.1`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],code:[[`path`,{d:`M9 13c-.66.33-1.21.82-1.62 1.43-.23.35-.23.79 0 1.14.41.61.96 1.1 1.62 1.43M15.21 13c.66.33 1.21.82 1.62 1.43.23.35.23.79 0 1.14-.41.61-.96 1.1-1.62 1.43`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7ZM2.23 8.01 21.45 8`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],comment:[[`path`,{d:`M8.5 19H8c-4 0-6-1-6-6V8c0-4 2-6 6-6h8c4 0 6 2 6 6v5c0 4-2 6-6 6h-.5c-.31 0-.61.15-.8.4l-1.5 2c-.66.88-1.74.88-2.4 0l-1.5-2c-.16-.22-.53-.4-.8-.4Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M15.996 11h.01M11.995 11h.01M7.995 11h.008`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],copy:[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M16 12.9v4.2c0 3.5-1.4 4.9-4.9 4.9H6.9C3.4 22 2 20.6 2 17.1v-4.2C2 9.4 3.4 8 6.9 8h4.2c3.5 0 4.9 1.4 4.9 4.9z`}],[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M22 6.9v4.2c0 3.5-1.4 4.9-4.9 4.9H16v-3.1C16 9.4 14.6 8 11.1 8H8V6.9C8 3.4 9.4 2 12.9 2h4.2C20.6 2 22 3.4 22 6.9z`}]],danger:[[`path`,{d:`M12 9v5M12 21.41H5.94c-3.47 0-4.92-2.48-3.24-5.51l3.12-5.62L8.76 5c1.78-3.21 4.7-3.21 6.48 0l2.94 5.29 3.12 5.62c1.68 3.03.22 5.51-3.24 5.51H12v-.01Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M11.995 17h.009`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],database:[[`path`,{d:`M18.5 12.65v3.7c0 3.12-2.91 5.65-6.5 5.65s-6.5-2.53-6.5-5.65v-3.7C5.5 15.77 8.41 18 12 18s6.5-2.23 6.5-5.35Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M18.5 7.65c0 .91-.25 1.75-.69 2.47C16.74 11.88 14.54 13 12 13c-2.54 0-4.74-1.12-5.81-2.88-.44-.72-.69-1.56-.69-2.47 0-1.56.73-2.97 1.9-3.99C8.58 2.63 10.2 2 12 2c1.8 0 3.42.63 4.6 1.65 1.17 1.03 1.9 2.44 1.9 4Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M18.5 7.65v5c0 3.12-2.91 5.35-6.5 5.35s-6.5-2.23-6.5-5.35v-5C5.5 4.53 8.41 2 12 2c1.8 0 3.42.63 4.6 1.65 1.17 1.03 1.9 2.44 1.9 4Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],display:[[`path`,{d:`M6.44 2h11.11C21.11 2 22 2.89 22 6.44v6.33c0 3.56-.89 4.44-4.44 4.44H6.44C2.89 17.22 2 16.33 2 12.78V6.44C2 2.89 2.89 2 6.44 2ZM12 17.22V22M2 13h20M7.5 22h9`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],document:[[`path`,{d:`M22 10v5c0 5-2 7-7 7H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M22 10h-4c-3 0-4-1-4-4V2l8 8Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],download:[[`path`,{d:`M9 11v6l2-2M9 17l-2-2`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M22 10v5c0 5-2 7-7 7H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M22 10h-4c-3 0-4-1-4-4V2l8 8Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],edit:[[`path`,{d:`m13.26 3.6-8.21 8.69c-.31.33-.61.98-.67 1.43l-.37 3.24c-.13 1.17.71 1.97 1.87 1.77l3.22-.55c.45-.08 1.08-.41 1.39-.75l8.21-8.69c1.42-1.5 2.06-3.21-.15-5.3-2.2-2.07-3.87-1.34-5.29.16Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M11.89 5.05a6.126 6.126 0 0 0 5.45 5.15M3 22h18`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],ellipsis:[[`path`,{d:`M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM19 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Z`,stroke:`currentColor`,"stroke-width":`1.5`}]],export:[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`1.5`,d:`M9.32 6.5l2.56-2.56 2.56 2.56M11.88 14.18V4.01M4 12c0 4.42 3 8 8 8s8-3.58 8-8`}]],"file-text":[[`path`,{d:`M21 7v10c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V7c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M14.5 4.5v2c0 1.1.9 2 2 2h2M8 13h4M8 17h8`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],files:[[`path`,{d:`M17 13.4v3c0 4-1.6 5.6-5.6 5.6H7.6c-4 0-5.6-1.6-5.6-5.6v-3.8C2 8.6 3.6 7 7.6 7h3`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M17 13.4h-3.2c-2.4 0-3.2-.8-3.2-3.2V7l6.4 6.4ZM11.6 2h4M7 5c0-1.66 1.34-3 3-3h2.62M22 8v6.19c0 1.55-1.26 2.81-2.81 2.81M22 8h-3c-2.25 0-3-.75-3-3V2l6 6Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],filter:[[`path`,{d:`M5.4 2.1h13.2c1.1 0 2 .9 2 2v2.2c0 .8-.5 1.8-1 2.3l-4.3 3.8c-.6.5-1 1.5-1 2.3V19c0 .6-.4 1.4-.9 1.7l-1.4.9c-1.3.8-3.1-.1-3.1-1.7v-5.3c0-.7-.4-1.6-.8-2.1l-3.8-4c-.5-.5-.9-1.4-.9-2V4.2c0-1.2.9-2.1 2-2.1ZM10.93 2.1 6 10`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],flag:[[`path`,{d:`M5.15 2v20M5.15 4h11.2c2.7 0 3.3 1.5 1.4 3.4l-1.2 1.2c-.8.8-.8 2.1 0 2.8l1.2 1.2c1.9 1.9 1.2 3.4-1.4 3.4H5.15`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],funnel:[[`path`,{d:`M5.4 2.1h13.2c1.1 0 2 .9 2 2v2.2c0 .8-.5 1.8-1 2.3l-4.3 3.8c-.6.5-1 1.5-1 2.3V19c0 .6-.4 1.4-.9 1.7l-1.4.9c-1.3.8-3.1-.1-3.1-1.7v-5.3c0-.7-.4-1.6-.8-2.1l-3.8-4c-.5-.5-.9-1.4-.9-2V4.2c0-1.2.9-2.1 2-2.1ZM10.93 2.1 6 10`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],gauge:[[`path`,{d:`M19.14 19.5a9.964 9.964 0 0 0 2.86-7c0-5.52-4.48-10-10-10S2 6.98 2 12.5c0 2.72 1.08 5.18 2.84 6.99`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M12 21.5a3.38 3.38 0 1 0 0-6.76 3.38 3.38 0 0 0 0 6.76ZM15.25 12H16c.82 0 1.5-.67 1.5-1.5 0-.82-.68-1.5-1.5-1.5s-1.5.67-1.5 1.5v.75c0 .41.34.75.75.75Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],grid:[[`path`,{d:`M22 8.52V3.98C22 2.57 21.36 2 19.77 2h-4.04c-1.59 0-2.23.57-2.23 1.98v4.53c0 1.42.64 1.98 2.23 1.98h4.04c1.59.01 2.23-.56 2.23-1.97ZM22 19.77v-4.04c0-1.59-.64-2.23-2.23-2.23h-4.04c-1.59 0-2.23.64-2.23 2.23v4.04c0 1.59.64 2.23 2.23 2.23h4.04c1.59 0 2.23-.64 2.23-2.23ZM10.5 8.52V3.98C10.5 2.57 9.86 2 8.27 2H4.23C2.64 2 2 2.57 2 3.98v4.53c0 1.42.64 1.98 2.23 1.98h4.04c1.59.01 2.23-.56 2.23-1.97ZM10.5 19.77v-4.04c0-1.59-.64-2.23-2.23-2.23H4.23c-1.59 0-2.23.64-2.23 2.23v4.04C2 21.36 2.64 22 4.23 22h4.04c1.59 0 2.23-.64 2.23-2.23Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],image:[[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M9 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM2.67 18.95l4.93-3.31c.79-.53 1.93-.47 2.64.14l.33.29c.78.67 2.04.67 2.82 0l4.16-3.57c.78-.67 2.04-.67 2.82 0L22 13.9`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],info:[[`g`,{transform:`rotate(180 12 12)`},[[`path`,{d:`M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M11.995 16h.009`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]]]],key:[[`path`,{d:`M19.79 14.93a7.575 7.575 0 0 1-7.6 1.87l-4.71 4.7c-.34.35-1.01.56-1.49.49l-2.18-.3c-.72-.1-1.39-.78-1.5-1.5l-.3-2.18c-.07-.48.16-1.15.49-1.49l4.7-4.7c-.8-2.6-.18-5.55 1.88-7.6 2.95-2.95 7.74-2.95 10.7 0 2.96 2.95 2.96 7.76.01 10.71ZM6.89 17.49l2.3 2.3`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M14.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],list:[[`path`,{d:`M3 4.5h18M3 9.5h9.47M3 14.5h18M3 19.5h9.47`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],lock:[[`path`,{d:`M6 10V8c0-3.31 1-6 6-6s6 2.69 6 6v2M12 18.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M17 22H7c-4 0-5-1-5-5v-2c0-4 1-5 5-5h10c4 0 5 1 5 5v2c0 4-1 5-5 5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"maximize-4":[[`path`,{d:`M21 9V3h-6M3 15v6h6M21 3l-7.5 7.5M10.5 13.5 3 21`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],menu:[[`path`,{d:`M3 7h18M3 12h18M3 17h18`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`}]],minus:[[`path`,{d:`M6 12h12`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],monitor:[[`path`,{d:`M6.44 2h11.11C21.11 2 22 2.89 22 6.44v6.33c0 3.56-.89 4.44-4.44 4.44H6.44C2.89 17.22 2 16.33 2 12.78V6.44C2 2.89 2.89 2 6.44 2ZM12 17.22V22M2 13h20M7.5 22h9`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],moon:[[`path`,{d:`M2.03 12.42c.36 5.15 4.73 9.34 9.96 9.57 3.69.16 6.99-1.56 8.97-4.27.82-1.11.38-1.85-.99-1.6-.67.12-1.36.17-2.08.14C13 16.06 9 11.97 8.98 7.14c-.01-1.3.26-2.53.75-3.65.54-1.24-.11-1.83-1.36-1.3C4.41 3.86 1.7 7.85 2.03 12.42Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],music:[[`path`,{d:`M6.28 22a3.12 3.12 0 1 0 0-6.24 3.12 3.12 0 0 0 0 6.24Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M20.84 16.8V4.6c0-2.6-1.63-2.96-3.28-2.51l-6.24 1.7C10.18 4.1 9.4 5 9.4 6.3v12.57`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M17.72 19.92a3.12 3.12 0 1 0 0-6.24 3.12 3.12 0 0 0 0 6.24ZM9.4 9.52 20.84 6.4`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],pause:[[`path`,{d:`M10.65 19.11V4.89c0-1.35-.57-1.89-2.01-1.89H5.01C3.57 3 3 3.54 3 4.89v14.22C3 20.46 3.57 21 5.01 21h3.63c1.44 0 2.01-.54 2.01-1.89ZM21 19.11V4.89C21 3.54 20.43 3 18.99 3h-3.63c-1.43 0-2.01.54-2.01 1.89v14.22c0 1.35.57 1.89 2.01 1.89h3.63c1.44 0 2.01-.54 2.01-1.89Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],people:[[`path`,{d:`M18 7.16a.605.605 0 0 0-.19 0 2.573 2.573 0 0 1-2.48-2.58c0-1.43 1.15-2.58 2.58-2.58a2.58 2.58 0 0 1 2.58 2.58A2.589 2.589 0 0 1 18 7.16ZM16.97 14.44c1.37.23 2.88-.01 3.94-.72 1.41-.94 1.41-2.48 0-3.42-1.07-.71-2.6-.95-3.97-.71M5.97 7.16c.06-.01.13-.01.19 0a2.573 2.573 0 0 0 2.48-2.58C8.64 3.15 7.49 2 6.06 2a2.58 2.58 0 0 0-2.58 2.58c.01 1.4 1.11 2.53 2.49 2.58ZM7 14.44c-1.37.23-2.88-.01-3.94-.72-1.41-.94-1.41-2.48 0-3.42 1.07-.71 2.6-.95 3.97-.71M12 14.63a.605.605 0 0 0-.19 0 2.573 2.573 0 0 1-2.48-2.58c0-1.43 1.15-2.58 2.58-2.58a2.58 2.58 0 0 1 2.58 2.58c-.01 1.4-1.11 2.54-2.49 2.58ZM9.09 17.78c-1.41.94-1.41 2.48 0 3.42 1.6 1.07 4.22 1.07 5.82 0 1.41-.94 1.41-2.48 0-3.42-1.59-1.06-4.22-1.06-5.82 0Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],phone:[[`path`,{d:`M21.97 18.33c0 .36-.08.73-.25 1.09-.17.36-.39.7-.68 1.02-.49.54-1.03.93-1.64 1.18-.6.25-1.25.38-1.95.38-1.02 0-2.11-.24-3.26-.73s-2.3-1.15-3.44-1.98a28.75 28.75 0 0 1-3.28-2.8 28.414 28.414 0 0 1-2.79-3.27c-.82-1.14-1.48-2.28-1.96-3.41C2.24 8.67 2 7.58 2 6.54c0-.68.12-1.33.36-1.93.24-.61.62-1.17 1.15-1.67C4.15 2.31 4.85 2 5.59 2c.28 0 .56.06.81.18.26.12.49.3.67.56l2.32 3.27c.18.25.31.48.4.7.09.21.14.42.14.61 0 .24-.07.48-.21.71-.13.23-.32.47-.56.71l-.76.79c-.11.11-.16.24-.16.4 0 .08.01.15.03.23.03.08.06.14.08.2.18.33.49.76.93 1.28.45.52.93 1.05 1.45 1.58.54.53 1.06 1.02 1.59 1.47.52.44.95.74 1.29.92.05.02.11.05.18.08.08.03.16.04.25.04.17 0 .3-.06.41-.17l.76-.75c.25-.25.49-.44.72-.56.23-.14.46-.21.71-.21.19 0 .39.04.61.13.22.09.45.22.7.39l3.31 2.35c.26.18.44.39.55.64.1.25.16.5.16.78Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`}]],play:[[`path`,{d:`M4 12V8.44c0-4.42 3.13-6.23 6.96-4.02l3.09 1.78 3.09 1.78c3.83 2.21 3.83 5.83 0 8.04l-3.09 1.78-3.09 1.78C7.13 21.79 4 19.98 4 15.56V12Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],printer:[[`path`,{d:`M7.25 7h9.5V5c0-2-.75-3-3-3h-3.5c-2.25 0-3 1-3 3v2ZM16 15v4c0 2-1 3-3 3h-2c-2 0-3-1-3-3v-4h8Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M21 10v5c0 2-1 3-3 3h-2v-3H8v3H6c-2 0-3-1-3-3v-5c0-2 1-3 3-3h12c2 0 3 1 3 3ZM17 15H7M7 11h3`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],refresh:[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M22 12c0 5.52-4.48 10-10 10s-8.89-5.56-8.89-5.56m0 0h4.52m-4.52 0v5M2 12C2 6.48 6.44 2 12 2c6.67 0 10 5.56 10 5.56m0 0v-5m0 5h-4.44`}]],"rotate-ccw":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M9.11 5.08c.87-.26 1.83-.43 2.89-.43 4.79 0 8.67 3.88 8.67 8.67s-3.88 8.67-8.67 8.67-8.67-3.88-8.67-8.67c0-1.78.54-3.44 1.46-4.82M7.87 5.32L10.76 2M7.87 5.32l3.37 2.46`}]],"rotate-cw":[[`path`,{stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M14.89 5.08c-.87-.26-1.83-.43-2.89-.43-4.79 0-8.67 3.88-8.67 8.67C3.33 18.12 7.21 22 12 22s8.67-3.88 8.67-8.67c0-1.78-.54-3.44-1.46-4.82M16.13 5.32L13.24 2M16.13 5.32l-3.37 2.46`}]],search:[[`path`,{d:`M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],send:[[`path`,{d:`m7.4 6.32 8.49-2.83c3.81-1.27 5.88.81 4.62 4.62l-2.83 8.49c-1.9 5.71-5.02 5.71-6.92 0l-.84-2.52-2.52-.84c-5.71-1.9-5.71-5.01 0-6.92ZM10.11 13.65l3.58-3.59`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],server:[[`path`,{d:`M19.32 10H4.69c-1.48 0-2.68-1.21-2.68-2.68V4.69c0-1.48 1.21-2.68 2.68-2.68h14.63C20.8 2.01 22 3.22 22 4.69v2.63C22 8.79 20.79 10 19.32 10ZM19.32 22H4.69c-1.48 0-2.68-1.21-2.68-2.68v-2.63c0-1.48 1.21-2.68 2.68-2.68h14.63c1.48 0 2.68 1.21 2.68 2.68v2.63c0 1.47-1.21 2.68-2.68 2.68ZM6 5v2M10 5v2M6 17v2M10 17v2M14 6h4M14 18h4`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],sort:[[`path`,{d:`M3 7h18M6 12h12M10 17h4`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`}]],stop:[[`path`,{d:`M9.3 21h5.4c4.5 0 6.3-1.8 6.3-6.3V9.3C21 4.8 19.2 3 14.7 3H9.3C4.8 3 3 4.8 3 9.3v5.4C3 19.2 4.8 21 9.3 21Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],subtitle:[[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7ZM17.5 17.08h-1.85M12.97 17.08H6.5M17.5 13.32h-5.53M9.27 13.32H6.5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],sun:[[`path`,{d:`M12 18.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`m19.14 19.14-.13-.13m0-14.02.13-.13-.13.13ZM4.86 19.14l.13-.13-.13.13ZM12 2.08V2v.08ZM12 22v-.08.08ZM2.08 12H2h.08ZM22 12h-.08.08ZM4.99 4.99l-.13-.13.13.13Z`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],tag:[[`path`,{d:`m4.405 15.526 4.53 4.53a4.78 4.78 0 0 0 6.75 0l4.39-4.39a4.78 4.78 0 0 0 0-6.75l-4.54-4.52a4.75 4.75 0 0 0-3.6-1.39l-5 .24c-2 .09-3.59 1.68-3.69 3.67l-.24 5c-.06 1.35.45 2.66 1.4 3.61Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M9.735 12.226a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`}],[`path`,{d:`m13.235 17.226 4-4`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],text:[[`path`,{d:`M2.67 7.17V5.35c0-1.15.93-2.07 2.07-2.07h14.52c1.15 0 2.07.93 2.07 2.07v1.82M12 20.72V4.11M8.06 20.72h7.88`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"two-page":[[`path`,{d:`M22 16.74V4.67c0-1.2-.98-2.09-2.17-1.99h-.06c-2.1.18-5.29 1.25-7.07 2.37l-.17.11c-.29.18-.77.18-1.06 0l-.25-.15C9.44 3.9 6.26 2.84 4.16 2.67 2.97 2.57 2 3.47 2 4.66v12.08c0 .96.78 1.86 1.74 1.98l.29.04c2.17.29 5.52 1.39 7.44 2.44l.04.02c.27.15.7.15.96 0 1.92-1.06 5.28-2.17 7.46-2.46l.33-.04c.96-.12 1.74-1.02 1.74-1.98ZM12 5.49v15M7.75 8.49H5.5M8.5 11.49h-3`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],user:[[`path`,{d:`M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10ZM20.59 22c0-3.87-3.85-7-8.59-7s-8.59 3.13-8.59 7`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"volume-high":[[`path`,{d:`M2 10v4c0 2 1 3 3 3h1.43c.37 0 .74.11 1.06.3l2.92 1.83c2.52 1.58 4.59.43 4.59-2.54V7.41c0-2.98-2.07-4.12-4.59-2.54L7.49 6.7c-.32.19-.69.3-1.06.3H5c-2 0-3 1-3 3Z`,stroke:`currentColor`,"stroke-width":`1.5`}],[`path`,{d:`M18 8a6.66 6.66 0 0 1 0 8M19.83 5.5a10.83 10.83 0 0 1 0 13`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"volume-mute":[[`path`,{d:`M15 8.37v-.96c0-2.98-2.07-4.12-4.59-2.54L7.49 6.7c-.32.19-.69.3-1.06.3H5c-2 0-3 1-3 3v4c0 2 1 3 3 3h2M10.41 19.13c2.52 1.58 4.59.43 4.59-2.54v-3.64M18.81 9.42c.9 2.15.63 4.66-.81 6.58M21.15 7.8a10.82 10.82 0 0 1-1.32 10.7M22 2 2 22`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],x:[[`path`,{d:`M6.4 6.4l11.2 11.2M17.6 6.4 6.4 17.6`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"zoom-in":[[`path`,{d:`M11 20a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM8.5 11h5M11 13.5v-5M18.93 20.69c.53 1.6 1.74 1.76 2.67.36.85-1.28.29-2.33-1.25-2.33-1.14-.01-1.78.88-1.42 1.97Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"zoom-out":[[`path`,{d:`M9 11.7h5M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]]},ds=n({GLYPH_CHUNK:()=>fs,GLYPH_PENDING_ATTRIBUTE:()=>ps,glyphNode:()=>W,registerGlyphs:()=>Cs}),fs=`glyphs`,ps=`data-wui-glyph-pending`,ms=`svg[${ps}]`,hs=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,gs={...us},_s=new Map,vs=!1,ys=null;function bs(e){return Kr(gs,e)?gs[e]:void 0}function xs(e,t,n,r){return{class:n?`wui-icon ${n}`:`wui-icon`,"data-icon":e,[ps]:r?!0:void 0,width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`}}function W(e,{size:t=16,className:n=``}={}){let r=bs(e);if(r!==void 0){let i=`${e}|${t}|${n}`,a=_s.get(i);return a===void 0&&(a=Br(xs(e,t,n,!1),r),_s.set(i,a)),Le(a.cloneNode(!0),SVGSVGElement,`glyphNode: ${e} did not clone to an svg`)}return vs||!hs.test(e)?null:(Promise.allSettled([mi(fs)]),Br(xs(e,t,n,!0),[]))}function Ss(e){let t=e instanceof Element&&e.matches(ms)?[e]:[];for(let n of[...t,...e.querySelectorAll(ms)]){let e=bs(n.getAttribute(`data-icon`)??``);e===void 0?n.remove():(n.removeAttribute(ps),n.replaceChildren(...zr(e)))}}function Cs(e){Object.assign(gs,e),vs=!0,Ss(document),ys===null&&(ys=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&Ss(e)}),ys.observe(document.documentElement,{childList:!0,subtree:!0}))}var ws=n({createListboxKeyNav:()=>Es,moveActiveRow:()=>Ds}),Ts=e=>e.target instanceof Element?e.target.tagName:void 0;function Es(e){let{getVisibleOptions:t,getActive:n,setActive:r,onEnter:i,onEscape:a,onTypeahead:o,typeaheadMs:s=500,getCount:c,getOptionAt:l,findByPrefix:u}=e,d=``,f=null,p=()=>{clearTimeout(f??void 0),f=null,d=``};return{handler:e=>{let m=c?[]:t(),h=c?c():m.length,g=()=>c?t():m,_=n(),v=Ts(e)===`INPUT`||Ts(e)===`TEXTAREA`;if(e.key===`ArrowDown`)e.preventDefault(),r(Math.min(_+1,h-1));else if(e.key===`ArrowUp`)e.preventDefault(),r(Math.max(_-1,0));else if(e.key===`Home`&&!v)e.preventDefault(),h&&r(0);else if(e.key===`End`&&!v)e.preventDefault(),h&&r(h-1);else if(e.key===`PageDown`&&!v){if(e.preventDefault(),!h)return;r(Math.min(Math.max(0,_)+8,h-1))}else if(e.key===`PageUp`&&!v){if(e.preventDefault(),!h)return;r(Math.max(Math.max(0,_)-8,0))}else if(Ir(e))i&&(e.preventDefault(),i(l?l(_):m[_],g()));else if(e.key===`Escape`)a&&a(e);else if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&Ts(e)!==`INPUT`&&Ts(e)!==`TEXTAREA`){e.preventDefault(),clearTimeout(f??void 0),d+=e.key.toLowerCase(),f=setTimeout(p,s);let t=u?u(d,Math.max(0,_)):m.findIndex(e=>e.textContent.trim().toLowerCase().startsWith(d));t>=0&&(r(t),o&&o(e.key,t,g()))}},clearTypeahead:p,teardown:p}}function Ds(e,t){let n=e.querySelector(`.is-active`);n!==t&&(n?.classList.remove(`is-active`),t?.classList.add(`is-active`))}var Os=n({TRUSTED_LABEL:()=>ks,optionLabelNodes:()=>Fs,optionText:()=>Is,stripTags:()=>Ms,withTrustedLabel:()=>As}),ks=Symbol(`wui.trustedLabel`),As=(e,t)=>{let n=document.createDocumentFragment();return n.append(t.cloneNode(!0)),{...e,[ks]:n}},js=e=>`wui-flag wui-flag-${e}`,Ms=e=>String(e??``).replace(/<[^>]*>/g,``),Ns=e=>{if(!e)return null;let t=String(e).toLowerCase().replace(/[^a-z0-9-]/g,``);return t?W(t):null},Ps=e=>{let t=String(e??``).toLowerCase();return/^[a-z]{2}$/.test(t)?F(`span`,{class:js(t),"aria-hidden":`true`}):null};function Fs(e){if(e==null)return[];let t=Ps(e.flag),n=Ns(e.icon),r=e[ks],i=r?[...r.cloneNode(!0).childNodes]:[document.createTextNode(String(e.label??``))];return!t&&!n?i:[F(`span`,{class:`wui-opt-label`},t,n,...i)]}var Is=e=>{if(e==null)return``;let t=e[ks];return t?t.textContent??``:Ms(e.label)},Ls=n({SELECT_TEXT:()=>Rs}),Rs={addLabel:`Add '{query}'`,addTagsLabel:`Add tags`,allCountriesLabel:`All countries`,clearAllLabel:`Clear all`,clearSelectionLabel:`Clear selection`,countryPlaceholder:`Select country`,countrySearchPlaceholder:`Search countries…`,createLabel:`Create '{text}'`,defaultSearchPlaceholder:`Search {labelText}…`,emptyText:`No matches`,fallbackName:`Select`,helpLabel:`More information`,hintText:`Type to search…`,invalidMessage:`That option is not available.`,optionalLabel:`(optional)`,partLoadMessage:`This control could not load. Reload the page.`,placeholder:`Select…`,recentsLabel:`Recent`,removeText:`Remove {text}`,searchingText:`Searching…`,selectedText:`{count} selected`,suggestedLabel:`Suggested`,tagPlaceholder:`Add…`},zs=n({clearOptions:()=>qs,drawn:()=>Hs,filterOptions:()=>Vs,nodesSignature:()=>Ws,optionRow:()=>tc,posAttrMap:()=>Us,refreshWindow:()=>Zs,registerWindowImpl:()=>Ks,renderOptions:()=>Js,revealRow:()=>Qs,rowId:()=>Ys,rowIndexByPrefix:()=>ec,rowIndexOfValue:()=>$s}),Bs=()=>I(`select`,Rs);function Vs(e,t){let n=String(t??``).trim().toLowerCase();return n?e.filter(e=>[Is(e),e.description,e.meta].some(e=>String(e??``).toLowerCase().includes(n))):e}var Hs=new WeakMap,Us=e=>e?{"data-index":String(e.index),"aria-setsize":String(e.size),"aria-posinset":String(e.index+1)}:{},Ws=e=>e.map(e=>e instanceof Element?e.outerHTML:e.textContent??``).join(``),Gs;function Ks(e){Gs=e}function qs(e){Gs?.clear(e),Hs.delete(e),e.replaceChildren()}function Js(e,t,n={}){let{selected:r=[],query:i=``,status:a=`idle`,emptyText:o=Bs().emptyText,searchingText:s=Bs().searchingText,hintText:c=Bs().hintText,actionRow:l=[],recents:u=null}=n,d=new Set(r.map(String)),f=Vs(t,i),p=e.id,m=l.filter(e=>e.position===`top`),h=l.filter(e=>e.position===`bottom`),g=u?.options.length?u.options:[],_=m.length+g.length+f.length+h.length,v=f.length>300,y=Gs,b=v&&y!==void 0,x=e=>b?{index:e,size:_}:void 0,S=0,C=e=>{let t=S++;return F(`button`,{type:`button`,role:`option`,id:Ys(p,t),class:`wui-select-option wui-select-add`,"data-value":String(e.value??``),"data-custom":`true`,"aria-selected":`false`,...Us(x(t))},e.label)},w=e=>{let t=S++;return tc(e,Ys(p,t),d.has(String(e.value)),x(t))},T=m.map(C),E=g.length&&u?[F(`div`,{class:`wui-select-group`},u.label),...g.map(w),F(`div`,{class:`wui-select-sep`,"aria-hidden":`true`})]:[],ee=S,D=[];if(b)S+=f.length;else{let e=``;for(let t of f)t.group&&t.group!==e&&D.push(F(`div`,{class:`wui-select-group`},t.group)),e=t.group??``,D.push(w(t))}let O=h.map(C),k=[];if(a===`loading`?k=[F(`div`,{class:`wui-select-loading`},F(`span`,{class:`wui-select-spinner spinner-border spinner-border-sm`,role:`status`,"aria-hidden":`true`}),s)]:a===`hint`?k=[F(`div`,{class:`wui-select-hint`},c)]:(a===`empty`||f.length===0&&l.length===0)&&(k=[F(`div`,{class:`wui-select-empty`},o)]),b&&y){let n=[...T,...E],r=[...O,...k];return y.render(e,{options:t,query:i,rows:f,pre:n,post:r,preSig:Ws(n),postSig:Ws(r),picked:d,top:m,recent:g,bottom:h,bodyBase:ee,total:_}),{rows:_,windowed:!0,long:v}}y?.clear(e);let te=[...T,...E,...D,...O,...k],ne=Ws(te);return Hs.get(e)===ne||(Hs.set(e,ne),e.replaceChildren(...te)),{rows:S,windowed:!1,long:v}}var Ys=(e,t)=>`${e}-opt-${t}`,Xs=e=>[...e.querySelectorAll(`.wui-select-option`)];function Zs(e){return Gs?Gs.refresh(e):!1}function Qs(e,t){return Gs?Gs.reveal(e,t):Xs(e)[t]??null}function $s(e,t){if(Gs)return Gs.indexOfValue(e,t);let n=new Set(t.map(String));return Xs(e).findIndex(e=>n.has(e.dataset.value??``))}function ec(e,t){return Gs?Gs.indexByPrefix(e,t):Xs(e).findIndex(e=>(e.textContent??``).trim().toLowerCase().startsWith(t))}function tc(e,t,n,r){let i=!!e.disabled,a={id:t,role:`option`,"data-value":String(e.value??``),"aria-selected":String(n),"aria-disabled":i?`true`:void 0,title:i&&e.disabledHint?e.disabledHint:void 0,...Us(r)},o=F(`span`,{class:`wui-select-check`,"aria-hidden":`true`},W(`check`));if(!e.description&&!e.meta)return F(`button`,{type:`button`,class:`wui-select-option${n?` selected`:``}`,...a},ls(e),F(`span`,{class:`wui-select-opt-name`},...Fs(e)),o);let s=e.description?F(`span`,{class:`wui-select-opt-desc`},e.description):null,c=e.meta?F(`span`,{class:`wui-select-opt-meta`},e.meta):null;return F(`div`,{class:`wui-select-option wui-select-option-rich${n?` selected`:``}`,...a},ls(e),F(`span`,{class:`wui-select-option-text`},F(`span`,{class:`wui-opt-label`},...Fs(e)),s),c,o)}var nc=Object.freeze([`single`,`multiple`,`search`,`tag`,`country`]),rc=e=>e===`multiple`||e===`tag`,ic=n({registerSelectPart:()=>oc,selectPart:()=>sc}),ac=new Map;function oc(e,t){ac.set(e,t)}function sc(e){return ac.get(e)}var cc={chips:`select-chips`,search:`select-search`,country:`phone`,recents:`select-recents`};function lc(e){let t=Kr(cc,e)?cc[e]:void 0;if(!t)return Promise.reject(Error(`Unknown <wui-select> part: ${e}.`));let n=sc(e);return n?Promise.resolve(n):mi(t).then(()=>N(sc(e),`The ${e} part of <wui-select> did not register.`))}var uc=n({searchesRemotely:()=>dc}),dc=e=>typeof e.loadOptions==`function`||!!e.getAttribute(`source`)||e.hasAttribute(`remote`),fc=()=>mi(`select-window`),pc={requiredFieldMessage:`Please fill in this field.`},mc={clearLabel:`Clear search`,placeholder:`Search…`,searchLabel:`Search`},hc=n({WuiSelect:()=>yc}),gc=()=>I(`select`,Rs),_c=()=>I(`search`,mc),vc=()=>I(`field`,pc),yc=class extends s{static formAssociated=!0;_internals;_value;_optionsProp;_partOptions;_known;_loadOptionsFn;_validateFn;_declared;_query;_ownsFilter;_active;_rows;_windowed;_windowLoad;_windowFailed;_scrollFrame;_status;_error;_nav;_parts;_partSig;_partsMounted;_partToken;_rendered;_searchShown;_defaultValue;_warnedMode;_warnedDensity;_hoverTimer;_hoverOpened;_onHoverOver;_onHoverOut;_panelShown;_pressOpen;static get observedAttributes(){return`mode.value.placeholder.search-placeholder.empty-text.searchable.clearable.disabled.readonly.loading.required.size.density.icon.prefix.open.open-on-hover.lazy-options.aria-label.aria-describedby.aria-invalid.min-chars.debounce.source.remote.allow-custom.add-label.searching-text.hint-text.value-label.value-avatar.value-initials.max-tags.allow-duplicates.separators.pattern.invalid-message.create-label.collapse-chips.selected-text.clear-all-label.countries.suggested.suggested-label.all-countries-label.recents-key.recents-limit.recents-label`.split(`.`)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=``,this._optionsProp=null,this._partOptions=null,this._known=new Map,this._loadOptionsFn=null,this._validateFn=null,this._declared=void 0,this._query=``,this._ownsFilter=!1,this._active=-1,this._rows=0,this._windowed=!1,this._windowLoad=null,this._windowFailed=!1,this._scrollFrame=null,this._status=`idle`,this._error=``,this._nav=null,this._parts=null,this._partSig=``,this._partsMounted=!1,this._partToken=0,this._rendered=!1,this._searchShown=!1,this._defaultValue=void 0,this._warnedMode=null,this._hoverTimer=null,this._hoverOpened=!1,this._panelShown=!1,this._pressOpen=null,this._onHoverOver=e=>{e.pointerType===`mouse`&&this._hoverZone(e.target)&&(this._clearHover(),!this._menuOpen()&&this._hoverEligible()&&(this._hoverTimer=setTimeout(()=>{this._hoverTimer=null,!this._menuOpen()&&this._hoverEligible()&&(this._open({focus:!1}),this._hoverOpened=!0)},Cc)))},this._onHoverOut=e=>{e.pointerType===`mouse`&&this._hoverZone(e.target)&&!this._hoverZone(e.relatedTarget)&&(this._clearHover(),this._menuOpen()&&this.hasAttribute(`open-on-hover`)&&(this._hoverTimer=setTimeout(()=>{this._hoverTimer=null,this._close()},wc)))}}connectedCallback(){this.addEventListener(`pointerover`,this._onHoverOver),this.addEventListener(`pointerout`,this._onHoverOut),this._rendered||this.render(),this._ensureParts(),this._mountParts()}disconnectedCallback(){this.removeEventListener(`pointerover`,this._onHoverOver),this.removeEventListener(`pointerout`,this._onHoverOut),this._clearHover(),this._dropMenu(),this._teardown(),this._teardownParts()}attributeChangedCallback(e,t,n){e===`value`?(this._value=Ac(n,rc(this.mode)),this._applyValue()):e===`aria-invalid`?this._syncInvalid():e===`open`?this._rendered&&(this.hasAttribute(`open`)?this._open({focus:!1}):this._close({force:!0})):e===`open-on-hover`?this.hasAttribute(`open-on-hover`)||this._clearHover():e!==`lazy-options`&&(e===`mode`&&(this._value=Ac(this._value,rc(this.mode)),this._partOptions=null,this._known.clear(),this._ensureParts()),(e===`source`||e===`remote`||e===`recents-key`)&&this._ensureParts(),Oc.has(e)?this._rendered&&(this._drawValue(),this.renderList()):Dc.has(e)?this._remountParts():this._rendered&&this.render())}formResetCallback(){if(this.value=this._defaultValue??``,!this._rendered)return;let e=this._refs();e.input&&(e.input.value=``,e.input.removeAttribute(`aria-invalid`)),e.search&&(e.search.value=``),this.setError(``),this._query!==``&&this._onQueryChange(``)}get mode(){let e=this.getAttribute(`mode`);return e===null?`single`:xc(e)?e:(e!==this._warnedMode&&(this._warnedMode=e,Wr(`<wui-select> mode "${e}" is not one of ${nc.join(`, `)}; it is treated as "single".`)),`single`)}_checkDensity(){let e=this.getAttribute(`density`);e===null||Sc.includes(e)||e===this._warnedDensity||(this._warnedDensity=e,Wr(`<wui-select> density "${e}" is not one of ${Sc.join(`, `)}; it is treated as "comfortable".`))}set mode(e){this.setAttribute(`mode`,String(e))}get value(){return Array.isArray(this._value)?this._value.slice():this._value}set value(e){this._value=Ac(e,rc(this.mode)),this._applyValue()}get options(){return this._readOptions()}set options(e){this._optionsProp=Array.isArray(e)?e:null,this.mode!==`country`&&(this._partOptions=null);for(let e of this._activePartsList())e.onOptions?.();if(this._rendered){if(this.mode===`single`&&this.getAttribute(`searchable`)===null&&this._autoSearch()!==this._searchShown){this.render();return}this._drawValue(),this.renderList()}}get loadOptions(){return this._loadOptionsFn}set loadOptions(e){this._loadOptionsFn=typeof e==`function`?e:null,this._ensureParts()}get validate(){return this._validateFn}set validate(e){this._validateFn=typeof e==`function`?e:null}commit(e,t={}){this.value=e,this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,detail:{isCustom:!!t.isCustom}}))}setPartOptions(e){this._partOptions=Array.isArray(e)?e:null,this._drawValue(),this.renderList()}setStatus(e){this._status=e,this.renderList()}setError(e){this._error=e?String(e):``,this._syncError()}openMenu(){lo(this)||this._open({focus:!1})}closeMenu({focusControl:e=!1}={}){this._close(),e&&this._refs().control?.focus()}renderList(){let e=this._refs();if(!e.list)return;let t=this._ownsFilter?``:this._query,n=this._actionRows(),r=this._recents();if(this.hasAttribute(`lazy-options`)&&!this._menuOpen()){this._rows=Vs(this._listOptions(),t).length+n.length+(r?.options.length??0),this._windowed=!1,qs(e.list),this._anchorMenu();return}let i=Js(e.list,this._listOptions(),{selected:this._selectedValues(),query:t,status:this._status,emptyText:this.getAttribute(`empty-text`)||gc().emptyText,searchingText:this.getAttribute(`searching-text`)||gc().searchingText,hintText:this.getAttribute(`hint-text`)||void 0,actionRow:n,recents:r});this._rows=i.rows,this._windowed=i.windowed,i.long&&!i.windowed&&!this._windowFailed&&this._loadWindow(),this._active>=this._rowCount()&&(this._active=-1),this._active>=0&&this._setActive(this._active,{reveal:!1}),this._anchorMenu()}render(){this._dropMenu();let e=this._carry();this._teardownParts(),this._snapshotDeclared();let t=this.mode;this._checkDensity();let n=rc(t),r=t===`tag`,i=n&&(r||this.hasAttribute(`allow-custom`));this._value=Ac(this._value,n),this._defaultValue===void 0&&n&&this._value.length===0&&(this._value=this._declaredSelected()),n||this._preselect(),this._defaultValue===void 0&&(this._defaultValue=Ac(this._value,n));let a=this.getAttribute(`size`),o=a===`sm`?` wui-select-sm`:a===`lg`?` wui-select-lg`:a===`xl`?` wui-select-xl`:``,s=this.getAttribute(`icon`),c=this.getAttribute(`prefix`),l=this.hasAttribute(`clearable`),u=this.hasAttribute(`disabled`);this.id||=`wui-select-${Math.random().toString(36).slice(2,9)}`;let d=`${this.id}-listbox`,f=`${this.id}-entry-error`,p=this.getAttribute(`aria-describedby`)?.trim(),m=p?`${p} ${f}`:f,h=this.hasAttribute(`aria-invalid`)||!!this._error,g=this.hasAttribute(`required`)&&!i,_=this._accessibleName(),v=i?{}:{role:`combobox`,"aria-haspopup":`listbox`,"aria-expanded":`false`,"aria-controls":d},y={"aria-label":_,"aria-describedby":m,"aria-invalid":h?`true`:void 0,"aria-required":g?`true`:void 0},b=n?F(`div`,{class:`input wui-select-control wui-select-multi`,...v,...y,"aria-disabled":u?`true`:void 0,tabindex:!u&&!r?`0`:void 0}):F(`button`,{type:`button`,class:`input wui-select-control`,...v,...y,disabled:u||void 0}),x=[s?W(s,{className:`wui-select-icon`}):null,c?F(`span`,{class:`wui-select-prefix`},c):null,F(`span`,{class:`wui-select-value`,"data-label":!0}),l?F(`span`,{class:`wui-select-reset`,role:`button`,"aria-label":gc().clearSelectionLabel,hidden:!0},W(`x`)):null,W(`chevron-down`,{className:`wui-select-caret`})];b.append(...x.filter(e=>e!==null));let S=this.getAttribute(`searchable`),C=S===null?t===`multiple`||t===`country`||this._autoSearch():S!==`false`,w=t===`search`||C&&!i;this._searchShown=w;let T=this.getAttribute(`search-placeholder`)||(t===`country`?gc().countrySearchPlaceholder:_c().placeholder),E=F(`div`,{class:`wui-select-menu wui-select-menu-fixed`,popover:`auto`},w?F(`div`,{class:`wui-select-search`},W(`search`),F(`input`,{class:`wui-select-input`,placeholder:T,"aria-label":T,"aria-autocomplete":`list`}),F(`button`,{type:`button`,class:`wui-select-clear`,"aria-label":_c().clearLabel,hidden:!0},W(`x`))):null,F(`div`,{class:`wui-select-options`,role:`listbox`,id:d,tabindex:`-1`,"aria-multiselectable":n?`true`:void 0})),ee=F(`div`,{class:`field-error wui-select-error`,id:f,"aria-live":`polite`,hidden:!this._error||void 0},this._error||null);this.replaceChildren(F(`div`,{class:`wui-select${o}`},b,E),ee),this._rendered=!0,this._syncMirror(),this._syncValidity(),this._drawValue(),this._syncReset(),this.renderList(),this._wire(),uo(this,this.querySelector(`.wui-select-control`)),this._mountParts(e)}_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||gc().fallbackName}_snapshotDeclared(){if(this._declared)return;let e=[...this.querySelectorAll(`:scope > wui-option`)];e.length&&(this._declared=e.map(e=>{let t=document.createDocumentFragment();for(let n of e.childNodes)t.append(n.cloneNode(!0));let n={value:e.getAttribute(`value`)??Ic(e).trim(),label:t.textContent??``,selected:e.hasAttribute(`selected`)};for(let[t,r]of kc){let i=e.getAttribute(t);i&&(n[r]=i)}return e.hasAttribute(`disabled`)&&(n.disabled=!0),As(n,t)}))}_readOptions(){return this.mode===`country`?this._partOptions||[]:this._partOptions?this._partOptions:this._optionsProp?this._optionsProp:(this._snapshotDeclared(),this._declared||[])}_listOptions(){let e=this._readOptions(),t=this.getAttribute(`value-label`);if(this.mode!==`search`||!t||this._value===``)return e;let n=String(this._value);return e.some(e=>String(e.value)===n)?e:[...e,{value:n,label:t}]}_declaredSelected(){return this._optionsProp?[]:(this._declared??[]).filter(e=>e.selected).map(e=>String(e.value))}_preselect(){let e=this._readOptions(),t=this._value!==``&&e.find(e=>String(e.value)===this._value)||e.find(e=>`selected`in e&&!!e.selected);t&&(this._value=String(t.value))}_optionFor(e){let t=String(e),n=this._readOptions().find(e=>String(e.value)===t);return n?(this._known.set(t,n),n):this._known.get(t)}_placeholder(){return this.getAttribute(`placeholder`)||Ec()[this.mode]}_hasValue(){return Array.isArray(this._value)?this._value.length>0:this._value!==``}_selectedValues(){return Array.isArray(this._value)?this._value:this._value===``?this._listOptions().some(e=>String(e.value)===``)?[``]:[]:[this._value]}_applyValue(){this._syncMirror(),this._syncValidity(),this._rendered&&(this._drawValue(),this._syncReset(),this.renderList())}_syncMirror(){rc(this.mode)?_o(this,this._selectedValues()):go(this,this._value)}_drawValue(){let e=this._refs();if(!e.value)return;let t=rc(this.mode),n=t?void 0:this._optionFor(this._value);if(this._syncTitle(n),this._syncValueAvatar(),this._activePartsList().some(e=>e.renderValue?.()===!0))return;if(t){e.value.classList.remove(`wui-select-placeholder`),e.value.textContent=``;return}e.value.classList.toggle(`wui-select-placeholder`,!n);let r=this._placeholder();e.value.replaceChildren(...n?Fs(n):r?[r]:[])}_syncTitle(e){let t=this.querySelector(`.wui-select-control`);if(!t)return;let n=e&&!this.hasAttribute(`title`)?Is(e).trim():``;n?t.setAttribute(`title`,n):t.removeAttribute(`title`)}_syncValueAvatar(){let e=this.querySelector(`.wui-select-control`);if(!e)return;e.querySelector(`:scope > .wui-select-value-avatar`)?.remove();let t=!rc(this.mode)&&this._hasValue()?ls({avatar:this.getAttribute(`value-avatar`),initials:this.getAttribute(`value-initials`)},`avatar-xs`):null;e.classList.toggle(`wui-has-value-avatar`,!!t),t&&e.prepend(F(`span`,{class:`wui-select-value-avatar`,"aria-hidden":`true`},t))}_syncValidity(){let e=this._internals;if(typeof e?.setValidity==`function`){if(this.hasAttribute(`required`)&&!this._hasValue()){let t=this.querySelector(`.wui-select-control`);e.setValidity({valueMissing:!0},vc().requiredFieldMessage,t instanceof HTMLElement?t:void 0)}else e.setValidity({})}}_syncReset(){let e=G(this,`.wui-select-reset`,HTMLElement);e&&(e.hidden=!(this.hasAttribute(`clearable`)&&this._hasValue()&&!lo(this)))}_syncInvalid(){let e=this.querySelector(`.wui-select-control`);e&&(this.hasAttribute(`aria-invalid`)||this._error?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}_syncError(){let e=G(this,`.wui-select-error`,HTMLElement);e&&(e.textContent=this._error,e.hidden=!this._error),this._syncInvalid()}_refs(){return{control:G(this,`.wui-select-control`,HTMLElement),value:G(this,`.wui-select-value`,HTMLElement),menu:G(this,`.wui-select-menu`,HTMLElement),list:G(this,`.wui-select-options`,HTMLElement),search:G(this,`.wui-select-search input`,HTMLInputElement),input:G(this,`.wui-select-draft`,HTMLInputElement)}}_menuOpen(){let e=G(this,`.wui-select-menu`,HTMLElement);return e!==null&&M(e)}_hoverZone(e){if(!(e instanceof Element))return!1;let t=e.closest(`.wui-select-control, .wui-select-menu`);return t!==null&&this.contains(t)}_hoverEligible(){if(!this.hasAttribute(`open-on-hover`)||lo(this)||this.mode===`tag`)return!1;let e=this._refs();return e.search===null&&e.input===null}_clearHover(){this._hoverTimer!==null&&clearTimeout(this._hoverTimer),this._hoverTimer=null}_autoSearch(){return this.mode===`single`&&this.getAttribute(`searchable`)===null&&this._readOptions().length>Tc}_visible(){let e=this._refs();return e.list?Fc(e.list,`.wui-select-option`):[]}_rowCount(){return this._windowed?this._rows:this._visible().length}_rowEl(e){if(!this._windowed)return this._visible()[e];let t=this._refs().list?.querySelector(`[data-index="${e}"]`);return t instanceof HTMLElement?t:void 0}_setActive(e,{reveal:t=!0}={}){let n=this._refs();if(!n.list||!n.control)return;this._active=e;let r=null;e>=0&&e<this._rowCount()&&(r=this._rowEl(e)??(this._windowed&&t?Qs(n.list,e):null)),Ds(n.list,r),r?(t&&r.scrollIntoView({block:`nearest`}),n.control.setAttribute(`aria-activedescendant`,r.id)):n.control.removeAttribute(`aria-activedescendant`)}_onListScroll(){this._scrollFrame=null;let e=this._refs().list;e&&Zs(e)&&this._active>=0&&this._setActive(this._active,{reveal:!1})}_actionRows(){let e=[];for(let t of this._activePartsList()){let n=t.actionRow?.(this._query);n&&e.push(n)}return e}_recents(){if(this._query.trim()!==``)return null;for(let e of this._activePartsList()){let t=e.recents?.(this._listOptions());if(t)return t}return null}_menuPlacement(e,t){let n=this.hasAttribute(`open`)?{below:!0}:{};if(this.getAttribute(`density`)!==`compact`)return{matchWidth:!0,...n};let r=e.getBoundingClientRect();return t.style.width=`max-content`,t.style.minWidth=`${r.width}px`,t.style.maxWidth=`280px`,n}_anchorMenu(){let e=this._refs();e.control&&e.menu&&this._menuOpen()&&T(e.control,e.menu,this._menuPlacement(e.control,e.menu))}_showMenu(e,t){ke(e,t,{...this._menuPlacement(e,t),mode:`auto`,keepOffscreen:this.hasAttribute(`open`),onClosed:()=>this._onPanelClosed()}),this._panelShown=!0}_onPanelClosed(){if(!this._panelShown)return;this._panelShown=!1;let e=this._refs();e.control&&(e.control.setAttribute(`aria-expanded`,`false`),this._setActive(-1),this._nav?.clearTypeahead(),this.dispatchEvent(new CustomEvent(`wui-select:close`,{bubbles:!0})))}_open({focus:e=!0}={}){let t=this._refs();if(!t.menu||!t.control)return;let n=this._menuOpen();this._hoverOpened=!1,t.control.setAttribute(`aria-expanded`,`true`),this._query=t.input?t.input.value:``,this._ownsFilter=this._ownsFilter&&this._query!==``;let r=G(this,`.wui-select-search .wui-select-clear`,HTMLElement);if(r&&(r.hidden=!0),t.search&&(t.search.value=``),n||this._showMenu(t.control,t.menu),this.renderList(),e&&(t.search?.focus(),this._setActive(this._windowed&&t.list?$s(t.list,this._selectedValues()):this._visible().findIndex(e=>e.classList.contains(`selected`)))),!n){this.dispatchEvent(new CustomEvent(`wui-select:open`,{bubbles:!0}));for(let e of this._activePartsList())e.onOpen?.()}}_close({force:e=!1}={}){if(!e&&this.hasAttribute(`open`))return;let t=this._refs();if(!t.menu||!t.control)return;this._hoverOpened=!1;let n=t.menu.contains(document.activeElement);M(t.menu)&&j(t.menu),this._onPanelClosed(),n&&t.control.focus()}_onQueryChange(e){this._query=e,this._setActive(-1);let t=G(this,`.wui-select-search .wui-select-clear`,HTMLElement);t&&(t.hidden=!e);let n=!1;for(let t of this._activePartsList())t.onQuery?.(e)===!0&&(n=!0);this._ownsFilter=n,this.renderList()}_pick(e){if(e.getAttribute(`aria-disabled`)===`true`)return;let t=e.dataset.custom===`true`,n=e.dataset.value??``,r=t?{value:n,label:Ic(e).trim()}:this._listOptions().find(e=>String(e.value)===n)??{value:n,label:n},i=this._activePartsList().some(e=>e.onPick?.(r,{isCustom:t})===!0);rc(this.mode)||(i||this.commit(n,{isCustom:t}),this._close(),this._refs().control?.focus())}_draftOpens(){return this.mode===`multiple`?this.hasAttribute(`allow-custom`):this.mode===`tag`&&dc(this)}_onKeyDown(e){if(!lo(this)){for(let t of this._activePartsList())if(t.onKey?.(e)===!0)return;if(!this._menuOpen()){if(e.target instanceof HTMLInputElement){if(e.key!==`ArrowDown`||!this._draftOpens())return;this._open({focus:!1})}else{(e.key===`ArrowDown`||Ir(e)||e.key===` `)&&(e.preventDefault(),this._open({focus:!0}));return}}N(this._nav,`Listbox keys are not wired.`).handler(e)}}_wire(){this._teardown();let e=this._refs(),t=e.control,n=e.list;if(!t||!e.menu||!n)return;let r=N(G(this,`.wui-select`,HTMLElement),`The select wrapper is missing.`),i=G(this,`.wui-select-search .wui-select-clear`,HTMLElement),a=G(this,`.wui-select-reset`,HTMLElement);this._nav=Es({getVisibleOptions:()=>this._visible(),getActive:()=>this._active,setActive:e=>this._setActive(e),getCount:()=>this._rowCount(),getOptionAt:e=>this._rowEl(e),findByPrefix:e=>this._windowed?ec(n,e):this._visible().findIndex(t=>t.textContent.trim().toLowerCase().startsWith(e)),onEnter:(e,t)=>{if(e)this._pick(e);else if(this._query.trim()!==``){let e=t.find(e=>e.dataset.custom===`true`);if(e)this._pick(e);else if(t.length===1){let e=t[0];e&&this._pick(e)}}},onEscape:e=>{e.preventDefault(),this._nav?.clearTypeahead(),this._close(),t.focus()}}),r.addEventListener(`keydown`,e=>this._onKeyDown(e)),r.addEventListener(`input`,e=>{let t=e.target;if(!(t instanceof HTMLInputElement)||!t.matches(`.wui-select-input, .wui-select-draft`))return;this._onQueryChange(t.value);let n=t.matches(`.wui-select-draft`),r=this._rows>0||this._actionRows().length>0;n&&r&&!this._menuOpen()&&!lo(this)&&this._draftOpens()&&this._open({focus:!1})}),r.addEventListener(`focusout`,e=>{let t=e.relatedTarget;t instanceof Node&&this.contains(t)||!this._activePartsList().some(e=>e.onBlur?.()===!0)&&t&&this._close()}),i?.addEventListener(`click`,()=>{let t=N(e.search,`The search input is missing.`);t.value=``,this._onQueryChange(``),t.focus()}),t.addEventListener(`pointerdown`,()=>{this._pressOpen=this._menuOpen()}),t.addEventListener(`click`,e=>{if(e.target instanceof Element&&e.target.closest(`[data-remove]`))return;if(this.mode===`tag`){if(lo(this))return;this._refs().input?.focus(),!this._menuOpen()&&this._draftOpens()&&this._open({focus:!1});return}if(e.target instanceof HTMLInputElement){!this._menuOpen()&&!lo(this)&&this._open({focus:!1});return}let t=e.detail>0&&this._pressOpen!==null?this._pressOpen:this._menuOpen();this._pressOpen=null,this._clearHover(),this._hoverOpened&&t?(this._hoverOpened=!1,this._open({focus:!0})):t?this._close():lo(this)||this._open({focus:!0})}),a?.addEventListener(`click`,e=>{e.stopPropagation(),this.commit(rc(this.mode)?[]:``),this._close(),t.focus()}),n.addEventListener(`click`,n=>{let r=Pc(n).closest(`.wui-select-option`);if(r instanceof HTMLElement&&(this._pick(r),rc(this.mode))){let n=this.querySelector(`.wui-select-draft`);(e.search??(n instanceof HTMLElement?n:t)).focus()}}),n.addEventListener(`mousedown`,e=>{rc(this.mode)&&e.target instanceof Element&&e.target.closest(`.wui-select-option`)&&e.preventDefault()}),n.addEventListener(`mousemove`,e=>{let t=Pc(e).closest(`.wui-select-option`);t instanceof HTMLElement&&!t.classList.contains(`is-active`)&&this._setActive(this._windowed?Number(t.dataset.index):this._visible().indexOf(t),{reveal:!1})}),n.addEventListener(`scroll`,()=>{this._windowed&&this._scrollFrame===null&&(this._scrollFrame=requestAnimationFrame(()=>this._onListScroll()))},{passive:!0}),n.addEventListener(`mouseleave`,()=>this._setActive(-1)),n.addEventListener(`error`,e=>{let t=e.target;t instanceof Element&&t.classList.contains(`avatar-img`)&&t.remove()},!0),this.hasAttribute(`open`)&&this._open({focus:!1})}_teardown(){this._nav?.teardown(),this._scrollFrame!==null&&cancelAnimationFrame(this._scrollFrame),this._scrollFrame=null}_dropMenu(){let e=G(this,`.wui-select-menu`,HTMLElement);e&&j(e)}_activePartsList(){return this._partsMounted?N(this._parts,`The mounted parts are missing.`):[]}_ensureParts(){if(!this.isConnected)return;(this.hasAttribute(`source`)||this.hasAttribute(`remote`)||this.hasAttribute(`recents-key`)||this._loadOptionsFn!==null)&&this._loadWindow();let e=Mc(this,this.mode),t=e.join(`,`);if(t===this._partSig)return;this._teardownParts(),this._parts=null,this._partSig=t;let n=++this._partToken;Promise.all(e.map(e=>Lc(this,e))).then(e=>{n===this._partToken&&(this._parts=e.filter(e=>e!==null),this._mountParts())})}_loadWindow(){this._windowLoad===null&&(this._windowLoad=fc().then(()=>this.renderList(),()=>{this._windowFailed=!0,document.dispatchEvent(new CustomEvent($r,{bubbles:!0,composed:!0,detail:{chunk:`select-window`}})),this.setError(gc().partLoadMessage)}))}_mountParts(e={draft:``,query:``}){if(!this._parts||this._partsMounted||!this._rendered||!this.isConnected)return;this._partsMounted=!0;let t=bc(this._refs());for(let n of this._parts)n.mount(this,t,{carry:e});this._drawValue(),this.renderList()}_teardownParts(){let e=this._activePartsList();this._partsMounted=!1;for(let t of e)t.teardown()}_remountParts(){if(!this._partsMounted)return;let e=this._carry();this._teardownParts(),this._mountParts(e)}_carry(){let e=this._refs();return{draft:e.input?.value??``,query:e.search?.value??``}}},bc=e=>{let{control:t,value:n,menu:r,list:i}=e;return{control:N(t,`control missing`),value:N(n,`value missing`),menu:N(r,`menu missing`),list:N(i,`list missing`),search:e.search,input:e.input}},xc=e=>nc.includes(e),Sc=[`comfortable`,`compact`],Cc=150,wc=250,Tc=10,Ec=()=>{let e=gc();return{single:e.placeholder,search:e.placeholder,multiple:e.placeholder,tag:e.tagPlaceholder,country:e.countryPlaceholder}},Dc=new Set([`countries`,`suggested`,`suggested-label`,`all-countries-label`,`max-tags`,`pattern`,`collapse-chips`,`source`,`remote`,`min-chars`]),Oc=new Set([`separators`,`allow-duplicates`,`invalid-message`,`create-label`,`add-label`,`selected-text`,`clear-all-label`,`value-label`,`value-avatar`,`value-initials`,`hint-text`,`recents-key`,`recents-limit`,`recents-label`]),kc=[[`icon`,`icon`],[`description`,`description`],[`meta`,`meta`],[`group`,`group`],[`avatar`,`avatar`],[`initials`,`initials`],[`disabled-hint`,`disabledHint`]],Ac=(e,t)=>t?Array.isArray(e)?e.map(String):e==null||e===``?[]:String(e).split(`,`).map(e=>e.trim()).filter(Boolean):Array.isArray(e)?e.length?String(e[0]):``:e==null?``:String(e),jc=(e,t)=>t===`multiple`?dc(e)?[`chips`,`search`]:[`chips`]:t===`search`?[`search`]:t===`country`?[`country`]:t===`tag`?dc(e)?[`chips`,`search`]:[`chips`]:[],Mc=(e,t)=>e.hasAttribute(`recents-key`)?[`recents`,...jc(e,t)]:jc(e,t),Nc=e=>typeof e==`object`&&!!e&&`default`in e&&typeof e.default==`function`,Pc=e=>{if(e.target instanceof Element)return e.target;throw Error(`The event target is not an element.`)},G=(e,t,n)=>{let r=e.querySelector(t);return r instanceof n?r:null},Fc=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Ic=e=>{let t=e.textContent;if(t===null)throw Error(`The element has no text.`);return t},Lc=(e,t)=>lc(t).then(e=>{if(!Nc(e))throw Error(`The part ${t} has no default export.`);return e.default()}).catch(()=>(document.dispatchEvent(new CustomEvent($r,{bubbles:!0,composed:!0,detail:{chunk:t}})),e.setError(gc().partLoadMessage),null)),Rc=`wui-shortcuts-open-change`;function zc(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}function Bc(e,t){return[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement)}var Vc=class extends s{_doc;_onKeyDown;_onClick;_onDocClick;_onPointerDown;_onPressEnd;_pressedOpen;_pinned;_mirroring;static get observedAttributes(){return[`open`,`no-trigger`]}constructor(){super(),this._doc=null,this._pressedOpen=!1,this._pinned=!1,this._mirroring=!1,this._onKeyDown=e=>this._keydown(e),this._onClick=e=>this._click(e),this._onDocClick=e=>{let t=P(e.target,`[data-wui-shortcuts-open]`)?.getAttribute(`data-wui-shortcuts-open`);t&&this.matches(t)&&this.setOpen(!0)},this._onPointerDown=e=>{P(e.target,`.wui-shortcut-toggle`)&&(this._pressedOpen=this.open)},this._onPressEnd=e=>{e.type===`pointerup`&&P(e.target,`.wui-shortcut-toggle`)||(this._pressedOpen=!1)}}connectedCallback(){this._doc=this.ownerDocument,this._doc.addEventListener(`keydown`,this._onKeyDown),this._doc.addEventListener(`click`,this._onDocClick),this._doc.addEventListener(`pointerup`,this._onPressEnd,!0),this._doc.addEventListener(`pointercancel`,this._onPressEnd,!0),this.addEventListener(`click`,this._onClick),this.addEventListener(`pointerdown`,this._onPointerDown,!0),this.hasAttribute(`open`)&&!this.open&&(this._pinned=!0,this.setOpen(!0,{focus:!1})),this._syncTrigger()}attributeChangedCallback(e,t,n){e===`no-trigger`?this._syncTrigger():(this._mirroring||(this._pinned=n!==null),this._sheet()&&n!==null!==this.open&&this.setOpen(n!==null))}disconnectedCallback(){let e=this._sheet();e&&j(e),this._doc?.removeEventListener(`keydown`,this._onKeyDown),this._doc?.removeEventListener(`click`,this._onDocClick),this._doc?.removeEventListener(`pointerup`,this._onPressEnd,!0),this._doc?.removeEventListener(`pointercancel`,this._onPressEnd,!0),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`pointerdown`,this._onPointerDown,!0),this._doc=null}get open(){let e=this._sheet();return!!(e&&M(e))}set open(e){let t=e===!0||e===``||e===`true`;this._pinned=t,this._sheet()?t!==this.open&&this.setOpen(t):this.toggleAttribute(`open`,t)}setOpen(e,{focus:t=!0}={}){let n=this._sheet();if(!n)return;let r=zc(this,`.wui-shortcut-toggle`);e||(this._pinned=!1),e?(n.removeAttribute(`hidden`),ke(this.hasAttribute(`no-trigger`)?r??this:N(r,`<wui-shortcuts> needs its toggle to anchor the sheet.`),n,{mode:`auto`,side:`top`,align:`end`,flipAlign:!0,gap:8,keepOffscreen:this._pinned,onClosed:()=>{this._pinned=!1,this._mirror(!1)}})):j(n),this._mirror(e),t&&(e?queueMicrotask(()=>{M(n)&&zc(n,`.wui-shortcut-close`)?.focus()}):r?.focus())}_mirror(e){let t=this._sheet();t&&(t.hidden=!e),zc(this,`.wui-shortcut-toggle`)?.setAttribute(`aria-expanded`,String(e)),this.hasAttribute(`open`)!==e&&(this._mirroring=!0,this.toggleAttribute(`open`,e),this._mirroring=!1,this.dispatchEvent(new CustomEvent(Rc,{bubbles:!0,detail:{open:e}})))}_sheet(){return zc(this,`.wui-shortcut-sheet`)}_syncTrigger(){let e=zc(this,`.wui-shortcut-toggle`);e&&(e.hidden=this.hasAttribute(`no-trigger`))}_scope(){let e=this.closest(`[${rt}]`);return e instanceof HTMLElement?e:null}_items(){let e=this.getAttribute(`items`);return e?Bc(N(this._scope()??this._doc,`WuiShortcuts used before it was connected`),e):[]}_click(e){let t=e.target;if(t instanceof Element){if(t.closest(`.wui-shortcut-toggle`)){let e=this._pressedOpen;this._pressedOpen=!1,this.setOpen(!e&&!this.open)}else t.closest(`.wui-shortcut-close`)&&this.setOpen(!1)}}_tickFocused(){let e=this._items(),t=N(this._doc,`WuiShortcuts used before it was connected`).activeElement,n=t?.closest?.(`li, tr`),r=e.find(e=>e===t||e.contains(t)||n?.contains(e)),i=(r?.closest(`li, tr`)??r)?.querySelector(`input[type="checkbox"]`);i instanceof HTMLInputElement&&i.click()}_focusSearch(){let e=this.getAttribute(`search`);if(!e)return;let t=N(this._doc,`WuiShortcuts used before it was connected`);(zc(this._scope()??t,e)??zc(t,e))?.focus()}_keydown(e){if(e.defaultPrevented)return;let t=dt(e);if(!t)return;if(t===`esc`&&this.open){e.preventDefault(),this.setOpen(!1);return}let n=this._scope(),r={help:()=>this.setOpen(!this.open)};if(this.getAttribute(`items`)&&(r.j=()=>yt(this._items(),1),r.k=()=>yt(this._items(),-1),r.x=()=>this._tickFocused()),this.getAttribute(`search`)&&(r.slash=()=>this._focusSearch()),r[t]){vt(e,r,n);return}if(t===`enter`)return;let i=N(this._doc,`WuiShortcuts used before it was connected`),a=e.target instanceof Node?e.target:null;if(gt(i)||!_t(a,n)||mt(a))return;let o=ft(t),s=Bc(this,`.wui-shortcut-keys [data-shortcut]`).find(e=>e.dataset.shortcut===o);if(!s)return;let c=(n??i).querySelector(`[aria-current="true"]`)?.closest(`[data-key]`),l=c instanceof HTMLElement?c.dataset.key??null:null;if(!this.dispatchEvent(new CustomEvent(`wui:shortcut`,{bubbles:!0,cancelable:!0,detail:{key:o,itemKey:l}}))){e.preventDefault();return}let u=s.dataset.target,d=u?zc(i,u):null;d&&(e.preventDefault(),d.click())}},Hc={lessLabel:`Show less`,moreLabel:`Show more`},Uc=3,Wc=()=>I(`showMore`,Hc),Gc=class extends s{_width;_observer;_toggle;_onClick;constructor(){super(),this._width=-1,this._observer=null,this._toggle=null,this._onClick=()=>this.toggle()}connectedCallback(){let e=this.querySelector(`.wui-show-more-toggle`);if(this._toggle=e instanceof HTMLButtonElement?e:null,!this._toggle)return;let t=Number.parseInt(this.getAttribute(`lines`)??``,10);this.style.setProperty(`--wui-show-more-lines`,String(t>=1?t:Uc)),this._toggle.addEventListener(`click`,this._onClick),this._sync(),this._check(),typeof ResizeObserver<`u`&&(this._observer=new ResizeObserver(()=>{this.clientWidth!==this._width&&this._check()}),this._observer.observe(this))}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,this._toggle?.removeEventListener(`click`,this._onClick),this._toggle=null}get expanded(){return this.hasAttribute(`expanded`)}toggle(e=!this.expanded){this.toggleAttribute(`expanded`,!!e),this._sync(),this.dispatchEvent(new CustomEvent(`wui:show-more:toggle`,{bubbles:!0,detail:{expanded:this.expanded}}))}_sync(){let e=N(this._toggle,`WuiShowMore used before it was connected`),t=this.expanded;e.setAttribute(`aria-expanded`,String(t)),e.textContent=t?this.getAttribute(`less-label`)||Wc().lessLabel:this.getAttribute(`more-label`)||Wc().moreLabel}_check(){let e=this.querySelector(`.wui-show-more-body`);if(!(e instanceof HTMLElement))return;this._width=this.clientWidth;let t=this.expanded;t&&this.removeAttribute(`expanded`);let n=e.scrollHeight>e.clientHeight+1;t&&this.setAttribute(`expanded`,``);let r=N(this._toggle,`WuiShowMore used before it was connected`);r.hidden=!n}},Kc=class extends s{_measure;_resize;_mutation;_ownTabindex;constructor(){super(),this._measure=()=>this.measure(),this._resize=null,this._mutation=null,this._ownTabindex=!1}connectedCallback(){this.measure(),this.addEventListener(`mouseover`,this._measure),typeof ResizeObserver<`u`&&(this._resize=new ResizeObserver(this._measure),this._resize.observe(this)),this._mutation=new MutationObserver(this._measure),this._mutation.observe(this,{childList:!0,subtree:!0,characterData:!0})}disconnectedCallback(){this.removeEventListener(`mouseover`,this._measure),this._resize?.disconnect(),this._mutation?.disconnect(),this._resize=null,this._mutation=null}measure(){let e=this.querySelector(`.wui-truncate-text`);e&&(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight?(this.setAttribute(`data-wui-tooltip`,(e.textContent??``).replace(/\s+/g,` `).trim()),this.hasAttribute(`tabindex`)||(this.setAttribute(`tabindex`,`0`),this._ownTabindex=!0)):(this.removeAttribute(`data-wui-tooltip`),this._ownTabindex&&=(this.removeAttribute(`tabindex`),!1)))}},qc=`wui-whats-new-read`,Jc=`wui-whats-new:`,Yc=`data-wui-unread`,Xc=0,Zc=e=>{let t=Date.parse(e);return Number.isNaN(t)?-1/0:t},Qc=(e,t)=>Zc(t)>Zc(e)?t:e,$c=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},el=class extends s{_doc;_stored;_observer;_onTriggerClick;_closeFocus;static get observedAttributes(){return[`storage-key`,`read-through`,`indicator`]}constructor(){super(),this._doc=null,this._stored=``,this._closeFocus=null,this._observer=null,this._onTriggerClick=()=>this.isOpen?this.close(!0):this.open()}get isOpen(){let e=this._panel;return e!==null&&M(e)}get _trigger(){return $c(this,`.wui-whats-new-trigger`)}get _panel(){return $c(this,`.wui-whats-new-panel`)}get _dot(){return $c(this,`.wui-whats-new-dot`)}connectedCallback(){this._doc=this.ownerDocument;let e=this._panel,t=this._trigger;e&&t&&(e.id||=`wui-whats-new-${++Xc}`,t.setAttribute(`aria-controls`,e.id),t.setAttribute(`aria-expanded`,`false`),t.addEventListener(`click`,this._onTriggerClick),this._stored=this._load(),this._refresh(),typeof MutationObserver<`u`&&(this._observer=new MutationObserver(()=>this._refresh()),this._observer.observe(e,{childList:!0,subtree:!0})))}disconnectedCallback(){let e=this._panel;e&&(this._closeFocus=!1,j(e),this._closeFocus=null),this._observer?.disconnect(),this._observer=null,this._trigger?.removeEventListener(`click`,this._onTriggerClick),this._doc=null}attributeChangedCallback(e,t,n){t!==n&&this._doc&&(e===`storage-key`&&(this._stored=this._load()),this._refresh())}open(){let e=N(this._trigger,`<wui-whats-new> needs its trigger to open.`),t=N(this._panel,`<wui-whats-new> needs its panel to open.`);this.isOpen||(ke(e,t,{mode:`auto`,clampHeight:!0,onClosed:()=>this._closed()}),e.setAttribute(`aria-expanded`,`true`),t.focus({preventScroll:!0}),this._markRead())}close(e){let t=this._panel;t&&this.isOpen&&(this._closeFocus=e,j(t))}_closed(){let e=this._closeFocus??this._panel?.contains(this.ownerDocument.activeElement)??!1;this._closeFocus=null,this._settle(e)}_settle(e){this._trigger?.setAttribute(`aria-expanded`,`false`),this._refresh(),e&&this._trigger?.focus()}_entries(){let e=[];for(let t of this.querySelectorAll(`.wui-whats-new-entry`))t instanceof HTMLElement&&e.push({entry:t,date:t.querySelector(`time[datetime]`)?.getAttribute(`datetime`)??``});return e}_newest(){return this._entries().reduce((e,{date:t})=>Qc(e,t),``)}_seenPoint(){return Qc(this._stored,this.getAttribute(`read-through`)??``)}_refresh(){let e=this._seenPoint(),t=this._entries(),n=0;for(let{entry:r,date:i}of t){let t=Zc(i)>Zc(e);t&&n++,this.isOpen&&r.hasAttribute(Yc)||r.toggleAttribute(Yc,t)}this.toggleAttribute(Yc,n>0);let r=this._dot;r&&(r.textContent=this.getAttribute(`indicator`)===`count`&&n>0?String(n):``)}_markRead(){let e=this._newest();!e||Zc(e)<=Zc(this._seenPoint())||(this._stored=Qc(this._stored,e),this._save(this._stored),this._refresh(),this.dispatchEvent(new CustomEvent(qc,{bubbles:!0,detail:{through:e}})))}_storage(){let e=this.getAttribute(`storage-key`);if(!e)return null;try{let t=this.ownerDocument.defaultView;return t?{store:t.localStorage,key:Jc+e}:null}catch{return null}}_load(){let e=this._storage();return e?e.store.getItem(e.key)??``:this._stored}_save(e){let t=this._storage();t&&t.store.setItem(t.key,e)}},tl=n({APP_BUTTON_MARKER:()=>nl,buttonClass:()=>ol}),nl=`AppButton`,rl=new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),il={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 al(e){return Kr(il,e)}function ol(e=`primary`,t=`solid`,n=`md`){if(!rl.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!al(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=il[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}var sl=n({DISPLAY_FORMAT:()=>pl,MONTH_DISPLAY_FORMAT:()=>_l,YEAR_DISPLAY_FORMAT:()=>xl,clampMonth:()=>wl,daysIn:()=>Cl,firstWeekday:()=>ll,fmt:()=>ml,fmtMonth:()=>vl,fmtYear:()=>Sl,pad:()=>ul,parseIso:()=>fl,parseIsoMonth:()=>hl,parseIsoYear:()=>yl,toIso:()=>dl,toIsoMonth:()=>gl,toIsoYear:()=>bl}),cl=e=>{let t=String(e??``).trim();return/^[0-6]$/.test(t)?Number(t):null},ll=e=>cl(e.getAttribute(`first-day`))??cl(getComputedStyle(e).getPropertyValue(`--wui-first-day`))??1,ul=e=>String(e).padStart(2,`0`),dl=(e,t,n)=>`${e}-${ul(t+1)}-${ul(n)}`,fl=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e||``);if(!t)return null;let[,n,r,i]=t;if(n===void 0||r===void 0||i===void 0)throw Error(`ISO date parts missing`);let a=+n,o=+r,s=+i;return o<1||o>12||s<1||s>Cl(a,o-1)?null:{y:a,m:o-1,d:s}},pl=`dd-MMM-yyyy`,ml=(e,t=pl)=>{let n=fl(e);if(!n)return``;let r={yyyy:n.y,MMMM:dn(n.m),MMM:un(n.m),MM:ul(n.m+1),dd:ul(n.d),d:n.d};return(t||`dd-MMM-yyyy`).replace(/yyyy|MMMM|MMM|MM|dd|d/g,e=>String(r[e]))},hl=e=>{let t=/^(\d{4})-(\d{2})$/.exec(e||``);if(!t)return null;let[,n,r]=t;if(n===void 0||r===void 0)throw Error(`ISO month parts missing`);let i=+r;return i<1||i>12?null:{y:+n,m:i-1}},gl=(e,t)=>`${e}-${ul(t+1)}`,_l=`MMM yyyy`,vl=(e,t=_l)=>{let n=hl(e);if(!n)return``;let r={yyyy:n.y,MMMM:dn(n.m),MMM:un(n.m),MM:ul(n.m+1)};return(t||`MMM yyyy`).replace(/yyyy|MMMM|MMM|MM/g,e=>String(r[e]))},yl=e=>{let t=/^(\d{4})$/.exec(e||``);if(!t)return null;let[,n]=t;if(n===void 0)throw Error(`ISO year part missing`);return{y:+n}},bl=e=>String(e).padStart(4,`0`),xl=`yyyy`,Sl=(e,t=xl)=>{let n=yl(e);return n?(t||`yyyy`).replace(/yyyy/g,String(n.y)):``},Cl=(e,t)=>{let n=new Date(0);return n.setFullYear(e,t+1,0),n.getDate()},wl=(e,t)=>{for(;t<0;)t+=12,--e;for(;t>11;)t-=12,e+=1;return{y:e,m:t}},Tl=n({COPY_FEEDBACK_MS:()=>El,copyTextToClipboard:()=>Dl}),El=2e3;async function Dl(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch(e){if(!(e instanceof DOMException))throw e}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.top=`0`,t.style.left=`0`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),!!n}catch(e){if(!(e instanceof DOMException))throw e;return!1}}var Ol=n({MENTION_ID_PATTERN:()=>kl,mentionLabel:()=>Ml,mentionTextFromValue:()=>Fl,mentionValueFromText:()=>Il,mentionedIds:()=>Ll,parseMentionValue:()=>Pl}),kl=/^[A-Za-z0-9_.:-]{1,64}$/,Al=/@(\\+)\[|@\[([^[\]\n]{1,100})\]\(([A-Za-z0-9_.:-]{1,64})\)/g,jl=/@(\\*)\[/g;function Ml(e){return String(e??``).replace(/[[\]\r\n]+/g,` `).replace(/\s+/g,` `).trim().slice(0,100)}var Nl=e=>e.replace(jl,(e,t)=>`@\\${t}[`);function Pl(e){let t=String(e??``),n=[],r=e=>{if(!e)return;let t=n[n.length-1];t&&`text`in t?t.text+=e:n.push({text:e})},i=0;for(let e of t.matchAll(Al))r(t.slice(i,e.index)),e[1]===void 0?n.push({id:e[3]??``,label:e[2]??``}):r(`@${e[1].slice(1)}[`),i=e.index+e[0].length;return r(t.slice(i)),n}function Fl(e){let t=``,n=[];for(let r of Pl(e)){if(`text`in r){t+=r.text;continue}let e=`@${r.label}`;n.push({start:t.length,end:t.length+e.length,id:r.id,label:r.label}),t+=e}return{text:t,mentions:n}}function Il(e,t=[]){let n=String(e??``),r=[...t].sort((e,t)=>e.start-t.start),i=``,a=0;for(let e of r)e.start<a||n.slice(e.start,e.end)!==`@${e.label}`||!kl.test(e.id)||(i+=Nl(n.slice(a,e.start)),i+=`@[${e.label}](${e.id})`,a=e.end);return i+Nl(n.slice(a))}function Ll(e){let t=[];for(let n of Pl(e))`id`in n&&!t.includes(n.id)&&t.push(n.id);return t}var Rl=n({bindMenuKeys:()=>Ul}),zl=500,Bl=10,Vl=new Set([`INPUT`,`TEXTAREA`,`SELECT`]);function Hl(e){return e instanceof HTMLElement?Vl.has(e.tagName)||e.isContentEditable:!1}function Ul(e,t){let{items:n,typeahead:r=!0}=t,i=``,a=null,o=()=>{a!==null&&clearTimeout(a),a=null,i=``},s=e=>{let t=n().filter(ea),s=t.length;if(s===0)return;let c=e.target,l=t.findIndex(e=>c instanceof Node&&e.contains(c)),u=n=>{e.preventDefault(),e.stopPropagation(),t[n]?.focus()},d=Hl(c);if(e.key===`ArrowDown`){u(l<0?0:(l+1)%s);return}if(e.key===`ArrowUp`){u(l<0?s-1:(l-1+s)%s);return}if(e.key===`Home`&&!d){u(0);return}if(e.key===`End`&&!d){u(s-1);return}if(e.key===`PageDown`){u(Math.min((l<0?-1:l)+Bl,s-1));return}if(e.key===`PageUp`){u(Math.max((l<0?s:l)-Bl,0));return}if(!r||!/^\S$/.test(e.key)||e.ctrlKey||e.metaKey||e.altKey||d)return;e.preventDefault(),e.stopPropagation(),a!==null&&clearTimeout(a),i+=e.key.toLowerCase(),a=setTimeout(o,zl);let f=i.length>1&&i.split(``).every(e=>e===i[0]),p=f?i[0]??``:i,m=i.length===1||f?l+1:Math.max(l,0);for(let e=0;e<s;e++){let n=(m+e)%s;if((t[n]?.textContent??``).trim().toLowerCase().startsWith(p)){t[n]?.focus();return}}};return e.addEventListener(`keydown`,s),()=>{e.removeEventListener(`keydown`,s),o()}}var Wl=n({FALLBACK_ROW_HEIGHT:()=>36,SELECT_WINDOW_OVERSCAN:()=>8,createHeightIndex:()=>Kl,scrollTopToReveal:()=>Jl,windowRange:()=>ql}),Gl=.5;function Kl(e,t=36){let n=Math.max(0,Math.floor(e)),r=new Float64Array(n),i=null,a=e=>{let t=e>=0&&e<n?r[e]??0:0;return t>0?t:s.estimate},o=()=>{if(i)return i;let e=new Float64Array(n+1);for(let t=0;t<n;t++)e[t+1]=(e[t]??0)+a(t);return i=e,e},s={count:n,estimate:t,setEstimate(e){!(e>0)||Math.abs(e-s.estimate)<=Gl||(s.estimate=e,i=null)},set(e,t){if(e<0||e>=n||!(t>0))return!1;let o=a(e);return r[e]=t,Math.abs(o-t)<=Gl?!1:(i=null,!0)},heightOf:a,offsetOf(e){return o()[Math.min(Math.max(0,Math.floor(e)),n)]??0},total(){return o()[n]??0},indexAt(e){if(n===0)return 0;let t=o(),r=0,i=n-1;for(;r<i;){let n=r+i+1>>1;(t[n]??0)<=e?r=n:i=n-1}return r}};return s}function ql(e,t){if(e.count===0)return{start:0,end:0,before:0,after:0};let{overscan:n=8}=t,r=Math.max(0,t.scrollTop),i=e.indexAt(r),a=e.indexAt(r+Math.max(0,t.viewport)),o=Math.max(0,i-n),s=Math.min(e.count,a+1+n);return{start:o,end:s,before:e.offsetOf(o),after:e.total()-e.offsetOf(s)}}function Jl(e,t,n){let r=e.offsetOf(t),i=r+e.heightOf(t);return r<n.scrollTop?r:i>n.scrollTop+n.viewport?i-n.viewport:n.scrollTop}var Yl=n({parseServerHtml:()=>Xl});function Xl(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content}var Zl=n({deriveStepStatus:()=>Ql,stepperHeaderItems:()=>$l});function Ql(e,t){return typeof t==`number`?e<t?`done`:e===t?`active`:`pending`:`pending`}function $l(e,t){let{statusOf:n,journey:r,connectors:i}=t;return e.map((t,a)=>{let o=n(a),s;return s=o===`done`?{icon:`check`}:o===`error`?{icon:`alert-triangle`}:o===`skipped`?{icon:`minus`}:t.icon?{icon:t.icon}:{number:a+1},{index:a,status:o,className:o===`pending`?`step`:`step ${o}`,glyph:s,current:o===`active`,line:r&&i&&a<e.length-1?{done:o===`done`}:null}})}var eu={selectAllLabel:`Select all rows`,selectRowLabel:`Select row`},tu=n({SELECT_CELL_CLASS:()=>K,addRowSelectCells:()=>uu,addSelectColumn:()=>du,attachShiftRange:()=>mu,createSelectHeaderCell:()=>iu,createSelectRowCell:()=>au,createSelectSpacerCell:()=>ou,syncSelectAll:()=>fu}),nu=()=>I(`tableSelect`,eu),K=`wui-select-cell`,ru=(e,t)=>{let n=e.createElement(`input`);return n.type=`checkbox`,n.className=`wui-check`,n.setAttribute(`aria-label`,t),n};function iu(e=document){let t=e.createElement(`th`);return t.className=K,t.appendChild(ru(e,nu().selectAllLabel)),t}function au(e=document,{disabled:t=!1}={}){let n=e.createElement(`td`);n.className=K;let r=ru(e,nu().selectRowLabel);return r.disabled=t,n.appendChild(r),n}function ou(e=document){let t=e.createElement(`td`);return t.className=K,t}var su=e=>e.firstElementChild?.classList.contains(K),cu=e=>e.matches(`.wui-group-row, .wui-virtual-spacer, .wui-row-expanded`),lu=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n);function uu(e){for(let t of e){if(su(t)||cu(t))continue;let e=t.getAttribute(`data-row-selectable`)===`false`;t.insertBefore(au(t.ownerDocument,{disabled:e}),t.firstChild)}}function du(e){let t=e.querySelector(`thead tr`);if(!(t instanceof HTMLTableRowElement))return null;su(t)||t.insertBefore(iu(e.ownerDocument),t.firstChild),uu(lu(e,`tbody tr`,HTMLTableRowElement));for(let t of lu(e,`tfoot tr`,HTMLTableRowElement))su(t)||t.insertBefore(ou(e.ownerDocument),t.firstChild);let n=t.querySelector(`.${K} .wui-check`);return n instanceof HTMLInputElement?n:null}function fu(e){let t=e.querySelector(`thead .${K} .wui-check`),n=lu(e,`tbody tr .wui-check:not(:disabled)`,HTMLInputElement),r=n.length,i=n.filter(e=>e.checked).length;t instanceof HTMLInputElement&&(t.checked=r>0&&i===r,t.indeterminate=i>0&&i<r);for(let t of lu(e,`tbody tr`,HTMLTableRowElement)){let e=t.querySelector(`.wui-check`);t.classList.toggle(`is-selected`,e instanceof HTMLInputElement&&e.checked)}return{selected:i,total:r}}var pu=`tbody .${K} .wui-check:not(:disabled)`;function mu(e,t){let n=null,r=e=>e instanceof Element&&e.matches(`.wui-select-cell .wui-check:not(:disabled)`)&&!!e.closest(`tbody`);e.addEventListener(`mousedown`,e=>{e.shiftKey&&r(e.target)&&e.preventDefault()}),e.addEventListener(`click`,i=>{let a=i.target;if(r(a)){if(i.shiftKey&&n?.isConnected&&n!==a){let r=lu(e,pu,HTMLInputElement),i=r.indexOf(n),o=r.indexOf(a);if(i>=0&&o>=0){let e=[];for(let t of r.slice(Math.min(i,o),Math.max(i,o)+1))t!==a&&t.checked!==a.checked&&(t.checked=a.checked,e.push(t));e.length&&t?.(e,a.checked)}}n=a}})}var hu=n({DATE_PICKER_TEXT:()=>gu}),gu={chooseMonthYearLabel:`Choose month and year`,chooseYearLabel:`Choose year`,clearLabel:`Clear`,dateTimeLabel:`Time`,helpLabel:`More information`,monthPlaceholder:`Choose a month`,nextDecadeLabel:`Next decade`,nextMonth:`Next month`,nextYearLabel:`Next year`,optionalLabel:`(optional)`,placeholder:`Choose a date`,previousDecadeLabel:`Previous decade`,previousMonth:`Previous month`,previousYearLabel:`Previous year`,todayLabel:`Today`,yearPlaceholder:`Choose a year`,zoneNote:`Times are shown in {zone}.`},_u=n({DRAWER_TEXT:()=>vu}),vu={closeLabel:`Close`,confirmDiscard:`Discard your changes?`,discardLabel:`Discard`,keepLabel:`Keep editing`,screenText:`{now}% of the screen`,sheetHeightLabel:`Sheet height`},yu=n({matchSegments:()=>bu});function bu(e,t){let n=String(e??``),r=String(t??``).trim();if(!r||!n)return[{text:n,match:!1}];let i=n.toLowerCase(),a=r.toLowerCase();if(i.length!==n.length)return[{text:n,match:!1}];let o=[],s=0,c=i.indexOf(a,s);for(;c!==-1;)c>s&&o.push({text:n.slice(s,c),match:!1}),o.push({text:n.slice(c,c+a.length),match:!0}),s=c+a.length,c=i.indexOf(a,s);return s<n.length&&o.push({text:n.slice(s),match:!1}),o}var xu=n({TOOLTIP_ATTRIBUTE:()=>Su,TOOLTIP_CLASS_ATTRIBUTE:()=>wu,TOOLTIP_ID_ATTRIBUTE:()=>Tu,TOOLTIP_OPEN_ATTRIBUTE:()=>Eu,TOOLTIP_PLACEMENT_ATTRIBUTE:()=>Cu,TOOLTIP_SHORTCUT_ATTRIBUTE:()=>Du,showPinnedTooltips:()=>ku,wireTooltips:()=>Ou}),Su=`data-wui-tooltip`,Cu=`data-wui-tooltip-placement`,wu=`data-wui-tooltip-class`,Tu=`data-wui-tooltip-id`,Eu=`data-wui-tooltip-open`,Du=`data-wui-tooltip-shortcut`;function Ou(e){Nu.has(e)||(Nu.add(e),e.addEventListener(`pointerover`,t=>{let n=Ru(t.target);n&&!Bu(e,n)&&Uu(e,n,!1)}),e.addEventListener(`pointerout`,t=>{let n=Fu(e).transient;n&&Ru(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||Wu(e,n))}),e.addEventListener(`focusin`,t=>{let n=t.target;if(!(n instanceof Element)||!n.matches(`:focus-visible`))return;let r=Ru(n);r&&!Bu(e,r)&&Uu(e,r,!1)}),e.addEventListener(`focusout`,t=>{let n=Fu(e).transient;n&&Ru(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||Wu(e,n))}),e.addEventListener(`click`,t=>{let n=Fu(e).transient;n&&Ru(t.target)===n.trigger&&Wu(e,n)}))}function ku(e){let t=e instanceof Document?e:e.ownerDocument;for(let n of e.querySelectorAll(`[${Eu}]`))Uu(t,n,!0)}var Au=[`top`,`bottom`,`start`,`end`],ju=`wui-tooltip`,Mu=`[${Su}], [${Tu}]`,Nu=new WeakSet,Pu=new WeakMap;function Fu(e){let t=Pu.get(e);return t||(t={bubble:null,transient:null,pinned:new Map,pinnedCount:0,onEscape:t=>{t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),Gu(e))}},Pu.set(e,t)),t}function Iu(e){return Au.includes(e)}function Lu(e){return e===`auto`||Iu(e)}function Ru(e){if(!(e instanceof Element))return null;let t=e.closest(Mu);return t instanceof HTMLElement?t:null}function zu(e,t){return e.transient?.trigger===t?e.transient:e.pinned.get(t)}function Bu(e,t){return zu(Fu(e),t)!==void 0}function Vu(e,t){let n=e.createElement(`div`);n.id=t,n.setAttribute(`role`,`tooltip`),n.setAttribute(`popover`,`manual`);let r=e.createElement(`div`);r.className=`tooltip-arrow`;let i=e.createElement(`div`);return i.className=`tooltip-inner`,n.append(r,i),{el:n,arrow:r,inner:i}}function Hu(e,t){return t.bubble||=Vu(e,ju),t.bubble}function Uu(e,t,n){let r=t.getAttribute(Su),i=t.getAttribute(Tu);if(r===null&&i===null)throw Error(`a tooltip trigger carries ${Su} or ${Tu}`);if(r!==null&&i!==null)throw Error(`a tooltip trigger carries ${Su} or ${Tu}, not both`);let a=t.getAttribute(`data-wui-tooltip-placement`)??`top`;if(!Lu(a))throw Error(`${Cu} "${a}" is not auto, top, bottom, start or end`);let o=Fu(e);Wu(e,n?o.pinned.get(t):o.transient);let s,c=null,l=null,u=!1;if(i!==null){let t=e.getElementById(i);if(!(t instanceof HTMLElement))throw Error(`no element with id "${i}" for a tooltip`);s=t,c=e.createComment(`wui-tooltip`),s.replaceWith(c),l=s.getAttribute(`popover`),s.setAttribute(`popover`,`manual`)}else{let i=n?Vu(e,`${ju}-pinned-${++o.pinnedCount}`):Hu(e,o);u=n;let c=t.getAttribute(`data-wui-tooltip-class`)??``;i.el.className=`tooltip wui-tooltip bs-tooltip-${a} ${c}`.trim();let l=t.getAttribute(Du);i.inner.replaceChildren(r??``,...l?[F(`span`,{class:`wui-kbd`},l)]:[]),s=i.el}let d=t.getAttribute(`aria-describedby`);t.setAttribute(`aria-describedby`,s.id);let f=()=>T(t,s,{side:a,align:`center`,gap:6,arrow:s.querySelector(`.tooltip-arrow`)});Ne(e).append(s),s.showPopover(),f();let p=Pe(e=>{s.parentElement!==e&&e.append(s),je(s),f()},e),m=new MutationObserver(()=>{t.isConnected||Wu(e,zu(Fu(e),t))});m.observe(e,{childList:!0,subtree:!0});let h={el:s,trigger:t,pinned:n,own:u,home:c,popover:l,describedBy:d,watch:m,unroot:p};n?o.pinned.set(t,h):o.transient=h,e.addEventListener(`keydown`,o.onEscape,!0)}function Wu(e,t){if(!t)return;let n=Fu(e);t.pinned?n.pinned.delete(t.trigger):n.transient=null,!n.transient&&n.pinned.size===0&&e.removeEventListener(`keydown`,n.onEscape,!0),t.watch.disconnect(),t.unroot(),t.el.hidePopover(),t.home?(t.popover===null?t.el.removeAttribute(`popover`):t.el.setAttribute(`popover`,t.popover),t.home.replaceWith(t.el)):t.own&&t.el.remove(),t.describedBy===null?t.trigger.removeAttribute(`aria-describedby`):t.trigger.setAttribute(`aria-describedby`,t.describedBy)}function Gu(e){let t=Fu(e);Wu(e,t.transient);for(let n of[...t.pinned.values()])Wu(e,n)}var Ku=Object.freeze({anchorOverlay:d,avatarNode:ss,buttonClass:tl,calendarMath:sl,copyText:Tl,dataTable:Kn,datePickerText:hu,defineElement:r,devWarn:Ur,dom:Ie,drawerText:_u,elementBase:a,fieldState:oo,formatters:Xt,formMirror:fo,glyphs:ds,hasOwn:Gr,iconGlyphs:ds,imeSafeEnter:Fr,isDrawn:$i,listboxKeyNav:ws,loader:Zr,mentionText:Ol,menuKeyNav:Rl,nativeOverlay:D,notificationDays:na,optionLabel:Os,partRegistry:ic,rtl:c,selectList:zs,selectRemote:uc,selectText:Ls,selectWindow:Wl,serverHtml:Yl,stepperHeader:Zl,svgNodes:Lr,tableExport:yi,tableSelect:tu,textMatch:yu,textStore:Re,tooltips:xu,wuiHttp:ga,WuiSelect:hc,zone:Rt}),qu={avatarCropFailed:`That photo could not be saved. Try again, or choose another one.`,avatarDialogSubtitle:`Drag to position the photo, then zoom or rotate it.`,avatarDialogTitle:`Edit photo`,avatarSave:`Save photo`,cameraLabel:`Take photo`,cancel:`Cancel`,changeLabel:`Change photo`,closeLabel:`Close`,cropFailed:`That image could not be cropped. Choose another one.`,dialogSubtitle:`Drag the frame and zoom to choose what to keep.`,dialogTitle:`Crop photo`,heicUnreadableMessage:`This browser cannot open HEIC photos. Choose a JPG, PNG or WebP image instead.`,optionalLabel:`(optional)`,overlayLabel:`Update photo`,photoUnreadableMessage:`That photo could not be opened. Choose a JPG, PNG or WebP image.`,removeLabel:`Remove photo`,save:`Apply`,unreadable:`That image could not be opened. Choose another one.`,uploadLabel:`Upload photo`},Ju=`image/jpeg,image/png,image/webp,image/heic,image/heif,.heic,.heif`,Yu=10,Xu=512,Zu=`image/webp`,Qu=[96,48];function $u(e){if(!e)return!1;let t=String(e.type||``).toLowerCase();return t===`image/heic`||t===`image/heif`||/\.hei[cf]$/i.test(String(e.name||``))}function ed(e){let t=I(`imagePicker`,qu);return $u(e)?t.heicUnreadableMessage:t.photoUnreadableMessage}function td(e,t){let n=Number(t);return{name:e?.name||`photo`,type:Zu,size:Number.isInteger(n)&&n>0?n:512}}var nd=`/`,rd=`.search-wrap.wui-search-collapsible`,id=`.wui-topsearch-panel`,ad=`.modal, wui-drawer[open]`,od=new WeakSet,sd=e=>{let t=e.querySelector(`.wui-search-toggle`);return t instanceof HTMLElement?t:null},cd=e=>{let t=e.querySelector(`.search-input`);return t instanceof HTMLInputElement?t:null},ld=e=>[...e.querySelectorAll(rd)].filter(e=>e instanceof HTMLElement);function ud(e){e.classList.remove(`is-collapsed`),sd(e)?.setAttribute(`aria-expanded`,`true`),cd(e)?.focus()}function dd(e){cd(e)?.value||(e.classList.add(`is-collapsed`),sd(e)?.setAttribute(`aria-expanded`,`false`))}function fd(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=sd(e),n=cd(e);t?.addEventListener(`click`,()=>ud(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n?.value||(r.preventDefault(),dd(e),t?.focus())}),e.addEventListener(`focusout`,t=>{let n=t.relatedTarget;n instanceof Node&&e.contains(n)||dd(e)})}function pd(e){od.has(e)||(od.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||mt(t.target instanceof Node?t.target:null)||t.target instanceof Element&&t.target.closest(ad)||e.querySelector(id))return;let n=ld(e).find(e=>e.offsetParent!==null);n&&(t.preventDefault(),ud(n))}))}function md(e=document){let t=e;for(let e of ld(t))fd(e);pd(e instanceof Element?e.ownerDocument:e)}var hd=`data-wui-command-shortcut`,gd=`k`,_d=new WeakSet;function vd(e,t){return!(e.ctrlKey||e.metaKey)||e.altKey||e.shiftKey||e.repeat?!1:String(e.key).toLowerCase()===String(t).toLowerCase()}function yd(e){return e.nodeType===Node.DOCUMENT_NODE}function bd(e){e.closest(`wui-modal`)?.show()}function xd(e){let t=yd(e)?e:e.ownerDocument;!_d.has(t)&&e.querySelector(`[data-wui-command-shortcut]`)&&(_d.add(t),t.addEventListener(`keydown`,e=>{for(let n of t.querySelectorAll(`[${hd}]`))if(vd(e,n.getAttribute(`data-wui-command-shortcut`)||gd)){e.preventDefault(),n.localName===`wui-command-palette`||n.localName===`wui-modal`?bd(n):(n.focus(),`select`in n&&typeof n.select==`function`&&n.select());return}}))}var Sd={audioLabel:`audio`,byteLabel:`B`,chooseText:`Choose {label}.`,gigabyteLabel:`GB`,imagesLabel:`images`,keepFileUnderMbText:`Keep the file under {maxSizeMb} MB.`,kilobyteLabel:`KB`,megabyteLabel:`MB`,orText:`{names} or {last}`,supportedLabel:`supported`,textFileLabel:`text file`,videosLabel:`videos`},Cd=()=>I(`fileValidation`,Sd),wd=`image/png,image/jpeg,image/webp`,Td=5,Ed={"image/png":[`.png`],"image/jpeg":[`.jpg`,`.jpeg`],"image/webp":[`.webp`],"image/gif":[`.gif`],"image/svg+xml":[`.svg`],"image/heic":[`.heic`],"image/heif":[`.heif`],"application/pdf":[`.pdf`],"text/plain":[`.txt`]},Dd={"image/png":`PNG`,"image/jpeg":`JPG`,"image/webp":`WEBP`,"image/gif":`GIF`,"image/svg+xml":`SVG`,"image/heic":`HEIC`,"image/heif":`HEIC`,"application/pdf":`PDF`,".png":`PNG`,".jpg":`JPG`,".jpeg":`JPG`,".webp":`WEBP`,".gif":`GIF`,".svg":`SVG`,".heic":`HEIC`,".heif":`HEIC`,".pdf":`PDF`},Od={"text/plain":`textFileLabel`,".txt":`textFileLabel`,"image/*":`imagesLabel`,"video/*":`videosLabel`,"audio/*":`audioLabel`},kd=new Set([`image/*`,`video/*`,`audio/*`]),Ad=e=>{let t=Od[e];return t?Cd()[t]:Dd[e]},jd=e=>String(e||``).split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean),Md=[`.png`,`.jpg`,`.jpeg`,`.webp`,`.gif`,`.svg`,`.bmp`,`.avif`,`.heic`,`.heif`];function Nd(e){if(!e)return!1;let t=typeof e==`object`&&e.type?String(e.type).toLowerCase():``;if(t)return t.startsWith(`image/`);let n=typeof e==`string`?e:e.name||e.url||``,r=String(n).toLowerCase();return Md.some(e=>r.endsWith(e))}var Pd=[`kilobyteLabel`,`megabyteLabel`,`gigabyteLabel`];function Fd(e){if(e<1024)return`${e} ${Cd().byteLabel}`;let t=e/1024,n=0;for(;t>=1024&&n<Pd.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${Cd()[Pd[n]??`gigabyteLabel`]}`}function Id(e){if(!e)return!1;let t=typeof e==`object`&&e.type?String(e.type).toLowerCase():``;if(t)return t===`application/pdf`;let n=typeof e==`string`?e:e.name||e.url||``;return String(n).toLowerCase().replace(/[?#][\s\S]*$/,``).endsWith(`.pdf`)}function Ld(e){let t=jd(e);return t.length?t.every(e=>e.startsWith(`.`)?Md.includes(e):e===`image/*`||e.startsWith(`image/`)):!1}function Rd(e){let t=[];for(let n of jd(e)){let e=Ad(n)||(n.startsWith(`.`)?n.slice(1).toUpperCase():n.toUpperCase());t.includes(e)||t.push(e)}return t.length<=1?t[0]||Cd().supportedLabel:L(Cd().orText,{names:t.slice(0,-1).join(`, `),last:t.slice(-1).join(``)})}function zd(e,t){let n=jd(t);if(!n.length)return!0;let r=(e.type||``).toLowerCase(),i=(e.name||``).toLowerCase();return n.some(e=>e.startsWith(`.`)?i.endsWith(e):e.endsWith(`/*`)?r.startsWith(e.slice(0,-1)):r&&r===e?!0:!r&&(Ed[e]||[]).some(e=>i.endsWith(e)))}function Bd(e,t={}){if(!e)return null;let n=t.accept===void 0?wd:t.accept,r=t.maxSizeMb===void 0?5:t.maxSizeMb;if(!zd(e,n)){let e=Rd(n),t=jd(n).map(e=>kd.has(e));return t.every(Boolean)?L(Cd().chooseText,{label:e}):t.some(Boolean)?L(Cd().chooseText,{label:e.endsWith(` file`)?`${e}s`:`${e} files`}):L(Cd().chooseText,{label:`a ${e.endsWith(` file`)?e:`${e} file`}`})}return r!==null&&r>0&&e.size>r*1024*1024?L(Cd().keepFileUnderMbText,{maxSizeMb:r}):null}function Vd(e,t){let n=Array.from(e||[]),r=t.multiple?n:n.slice(0,1),i=[],a=[];for(let e of r){let n=Bd(e,{accept:t.accept,maxSizeMb:t.maxSizeMb});n?a.push({file:e,message:n}):i.push(e)}return{files:i,rejections:a}}function Hd(e,t){let{overClass:n,isDisabled:r=()=>!1,onFiles:i,onReject:a,...o}=t,s=0,c=t=>e.classList.toggle(n,t),l=e=>{e.preventDefault(),r()||(s+=1,c(!0))},u=e=>{e.preventDefault(),r()||c(!0)},d=e=>{e.preventDefault(),r()||(s=Math.max(0,s-1),s===0&&c(!1))},f=e=>{if(e.preventDefault(),s=0,c(!1),r())return;let{files:t,rejections:n}=Vd(e.dataTransfer?.files,o);t.length&&i(t);let l=n[0];l&&a(l)};return e.addEventListener(`dragenter`,l),e.addEventListener(`dragover`,u),e.addEventListener(`dragleave`,d),e.addEventListener(`drop`,f),()=>{e.removeEventListener(`dragenter`,l),e.removeEventListener(`dragover`,u),e.removeEventListener(`dragleave`,d),e.removeEventListener(`drop`,f)}}var Ud={aadhaarMessage:`Enter a valid 12-digit Aadhaar number`,amountMessage:`Enter a valid amount`,dateMessage:`Enter a valid date as DD-MM-YYYY`,gstinMessage:`Enter a valid GSTIN`,ifscMessage:`Enter a valid IFSC`,incompleteMessage:`Enter the full value`,panMessage:`Enter a valid PAN`,phoneInMessage:`Enter a 10-digit mobile number`,pinCodeMessage:`Enter a valid 6-digit PIN code`},Wd=/[0-9]/,Gd={9:Wd,A:/[A-Za-z]/,"*":/[0-9A-Za-z]/},Kd=/[9A*]/,qd=new Set([`text`,`tel`,`search`,`url`,`password`]),Jd=e=>{let t=e.replace(/\D/g,``);return t.length===12&&t.startsWith(`91`)?t.slice(2):t.length===11&&t.startsWith(`0`)?t.slice(1):e},Yd=e=>{let t=Number(e.slice(0,2)),n=Number(e.slice(2,4)),r=Number(e.slice(4,8));if(r<1)return!1;let i=new Date(Date.UTC(r,n-1,t));return i.getUTCFullYear()===r&&i.getUTCMonth()===n-1&&i.getUTCDate()===t},Xd=e=>e.length<=3?e:`${e.slice(0,-3).replace(/\B(?=(\d{2})+(?!\d))/g,`,`)},${e.slice(-3)}`,Zd=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());return t?`${t[3]}-${t[2]}-${t[1]}`:e},Qd=()=>I(`inputMask`,Ud);function $d(e,{upper:t=!1,normalize:n,valid:r,post:i=e=>e,message:a=Qd().incompleteMessage}={}){let o=[...e].map(e=>{let t=Gd[e];return t?{re:t}:{lit:e}}),s=o.filter(e=>e.re).length;return{inputMode:o.every(e=>!e.re||e.re===Wd)?`numeric`:`text`,normalize:n,post:i,message:a,extract(e){let n=``,r=0;for(let i of e){for(;r<o.length&&o[r]?.lit!==void 0&&o[r]?.lit!==i;)r++;if(r>=o.length)break;let e=o[r];e?.lit===void 0?e?.re.test(i)&&(n+=t?i.toUpperCase():i,r++):r++}return n},layout(e){let t=``,n=[],r=0;for(let i=0;i<o.length&&r<e.length;i++){let a=o[i];a?.lit===void 0?(t+=e.charAt(r++),n.push(!0)):(t+=a.lit,n.push(!1))}return{text:t,isRaw:n}},isValid:e=>e.length===s&&(!r||r(e))}}function ef(){return{inputMode:`decimal`,post:e=>e,message:Qd().amountMessage,extract(e){let t=``,n=!1,r=0;for(let i of e)Wd.test(i)?n?r<2&&(t+=i,r++):t+=i:i===`.`&&!n&&(n=!0,t+=i);return t.startsWith(`.`)&&(t=`0${t}`),t.replace(/^0+(?=\d)/,``)},layout(e){let[t=``,n]=e.split(`.`),r=Xd(t)+(e.includes(`.`)?`.${n}`:``);return{text:r,isRaw:[...r].map(e=>e!==`,`)}},isValid:e=>/^\d+(\.\d{1,2})?$/.test(e)}}var tf={"phone-in":()=>$d(`99999 99999`,{normalize:Jd,valid:e=>/^[6-9]/.test(e),message:Qd().phoneInMessage}),pan:()=>$d(`AAAAA9999A`,{upper:!0,valid:e=>/^[A-Z]{5}\d{4}[A-Z]$/.test(e),message:Qd().panMessage}),gstin:()=>$d(`99AAAAA9999A***`,{upper:!0,valid:e=>/^\d{2}[A-Z]{5}\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/.test(e),message:Qd().gstinMessage}),aadhaar:()=>$d(`9999 9999 9999`,{valid:e=>/^[2-9]/.test(e),message:Qd().aadhaarMessage}),ifsc:()=>$d(`AAAA*******`,{upper:!0,valid:e=>/^[A-Z]{4}0[A-Z0-9]{6}$/.test(e),message:Qd().ifscMessage}),"pin-code":()=>$d(`999999`,{valid:e=>/^[1-9]/.test(e),message:Qd().pinCodeMessage}),date:()=>$d(`99-99-9999`,{normalize:Zd,valid:Yd,post:(e,t)=>e.length===8&&Yd(e)?`${e.slice(4)}-${e.slice(2,4)}-${e.slice(0,2)}`:t,message:Qd().dateMessage}),amount:ef},nf=Object.keys(tf),rf=e=>{let t=String(e).toLowerCase();return Kr(tf,t)?t:void 0},af=e=>Kd.test(String(e))&&rf(e)===void 0,of=new Map;Je(()=>of.clear());function sf(e){if(e==null||e===``)return null;let t=String(e),n=of.get(t);return n===void 0&&(n=af(t)?$d(t):Kr(tf,t)?tf[t]?.()??null:null,of.set(t,n)),n}var cf=(e,t)=>e.normalize?e.normalize(t):t;function lf(e,t){let n=sf(e);return n?n.extract(cf(n,String(t??``))):String(t??``)}function uf(e,t){let n=sf(e);if(!n)return String(t??``);let r=n.extract(cf(n,String(t??``)));return n.post(r,n.layout(r).text)}function df(e,t){let n=sf(e);return n?n.layout(n.extract(cf(n,String(t??``)))).text:String(t??``)}var ff=(e,t)=>{if(t<=0)return 0;let n=0;for(let r=0;r<e.length;r++)if(e[r]&&++n===t)return r+1;return e.length},pf=new WeakMap,mf=e=>pf.get(e)?.(),hf=new WeakMap;function gf(e,t,n,r){let i=e.getAll(t),a=hf.get(e)??new Set;hf.set(e,a);let o=i.findIndex((e,r)=>e===n&&!a.has(`${t}\u0000${r}`));if(!(o<0)){if(a.add(`${t}\u0000${o}`),i[o]=r,i.length===1)e.set(t,r);else{e.delete(t);for(let n of i)e.append(t,n)}}}function _f(e){let t=null,n=null,r=!1,i=(t,n)=>{n===null?e.removeAttribute(t):n!==void 0&&e.setAttribute(t,n)},a,o,s=()=>{t?.remove(),t=null,n&&(n.hidden=!1),n=null,r&&e.classList.remove(`error`),r=!1,i(`aria-invalid`,a),i(`aria-describedby`,o),a=void 0,o=void 0};return i=>{if(!i){s();return}let c=e.closest(`.field`),l=c instanceof HTMLElement?c:null,u=l?.querySelector(`.field-error`);if(!(u&&u!==t&&u.textContent?.trim())){if(!t){if(r=!e.classList.contains(`error`),e.classList.add(`error`),a=e.getAttribute(`aria-invalid`),o=e.getAttribute(`aria-describedby`),l){t=document.createElement(`div`),t.className=`field-error`,e.id&&(t.id=`${e.id}-error`);let r=l.querySelector(`.field-hint`);n=r instanceof HTMLElement?r:null,n&&(n.hidden=!0),l.insertBefore(t,[...l.children].find(e=>e.classList.contains(`field-count`))??null),t.id&&e.setAttribute(`aria-describedby`,t.id)}e.setAttribute(`aria-invalid`,`true`)}t&&(t.textContent=i)}}}function vf(e,{mask:t,postFormatted:n=!1,onChange:r,onInvalidChange:i}={}){let a=sf(t);if(!a||!qd.has(e.type))return()=>{};let o=Object.getPrototypeOf(e),s=Object.getOwnPropertyDescriptor(o,`value`);if(!s?.set)throw Error(`input value setter missing`);let c=s.set,l=!e.hasAttribute(`inputmode`);l&&e.setAttribute(`inputmode`,a.inputMode);let u=i??_f(e),d=null,f=!1,p=!1,m=!1,h=``,g=``,_,v=()=>{let e=m?h:``;e!==g&&(g=e,u(g))},y=(t,n,i)=>{let o=a.extract(t.slice(0,n)).length,s=a.extract(t),{text:l,isRaw:u}=a.layout(s);if(e.value!==l&&(c.call(e,l),document.activeElement===e&&qd.has(e.type))){let t=ff(u,o);e.setSelectionRange(t,t)}e.dataset.maskRaw=s,h=s&&!a.isValid(s)?a.message:``,e.setCustomValidity(h),v(),i&&s!==d&&r?.(s,l),d=s},b=Object.getOwnPropertyDescriptor(e,`value`),x=b??s;Object.defineProperty(e,"value",{configurable:!0,...x.enumerable===void 0?{}:{enumerable:x.enumerable},get:()=>N(x.get,`input value getter missing`).call(e),set:t=>{if(N(x.set,`input value setter missing`).call(e,t),p)return;let n=cf(a,e.value);y(n,n.length,!0)}});let S=()=>{f=!0,e.dispatchEvent(new Event(`input`,{bubbles:!0})),f=!1},C=t=>{let n=t instanceof InputEvent?t:null;if(f||p||n?.isComposing)return;let r=n?.inputType===`insertText`&&(n.data?.length??0)<=1||n?.inputType?.startsWith(`delete`)?e.value:cf(a,e.value);y(r,e.selectionStart??r.length,!0)},w=()=>{p=!0},T=()=>{p=!1;let t=cf(a,e.value);y(t,e.selectionStart??t.length,!0),S()},E=t=>{let n=t.inputType===`deleteContentBackward`;if(!n&&t.inputType!==`deleteContentForward`||t.isComposing)return;let r=e.selectionStart;if(r==null||r!==e.selectionEnd)return;let{isRaw:i}=a.layout(a.extract(e.value)),o=n?r-1:r;for(;o>=0&&o<i.length&&!i[o];)o+=n?-1:1;o!==(n?r-1:r)&&(t.preventDefault(),o<0||o>=i.length||(y(e.value.slice(0,o)+e.value.slice(o+1),n?o:r,!0),S()))},ee=t=>{if(e.readOnly||e.disabled)return;let n=t.clipboardData?.getData(`text`);if(n==null)return;t.preventDefault();let r=cf(a,n),i=e.selectionStart??e.value.length,o=e.selectionEnd??i;y(e.value.slice(0,i)+r+e.value.slice(o),i+r.length,!0),S()},D=()=>{let t=a.extract(e.value);return a.post(t,a.layout(t).text)},O=()=>{m=!0,v()};e.addEventListener(`input`,C),e.addEventListener(`beforeinput`,E),e.addEventListener(`paste`,ee),e.addEventListener(`compositionstart`,w),e.addEventListener(`compositionend`,T),e.addEventListener(`blur`,O),e.addEventListener(`invalid`,O);let k=e.form,te=t=>{e.name&&!e.disabled&&gf(t.formData,e.name,e.value,D())},ne=()=>{clearTimeout(_),_=setTimeout(()=>{m=!1,y(cf(a,e.value),e.value.length,!0)},0)};n||(k?.addEventListener(`formdata`,te),pf.set(e,D)),k?.addEventListener(`reset`,ne),k?.addEventListener(`submit`,O);let re=cf(a,e.value);return y(re,re.length,!1),()=>{clearTimeout(_),e.removeEventListener(`input`,C),e.removeEventListener(`beforeinput`,E),e.removeEventListener(`paste`,ee),e.removeEventListener(`compositionstart`,w),e.removeEventListener(`compositionend`,T),e.removeEventListener(`blur`,O),e.removeEventListener(`invalid`,O),k?.removeEventListener(`formdata`,te),k?.removeEventListener(`reset`,ne),k?.removeEventListener(`submit`,O),pf.delete(e),b?Object.defineProperty(e,"value",b):Reflect.deleteProperty(e,`value`),m=!1,h=``,v(),e.setCustomValidity(``),delete e.dataset.maskRaw,l&&e.removeAttribute(`inputmode`)}}function yf(){let e=typeof window>`u`?void 0:window.jQuery?.validator?.prototype;if(!e||e.wuiMaskHook)return;let t=e.elementValue;e.elementValue=function(e){let n=mf(e);return n===void 0?t.call(this,e):n},e.wuiMaskHook=!0}var bf=new WeakMap,xf,Sf=e=>{bf.has(e)||bf.set(e,vf(e,{mask:e.dataset.appMask,postFormatted:e.hasAttribute(`data-mask-post-formatted`)}))},Cf=e=>[...e.querySelectorAll(`input[data-app-mask]`)].filter(e=>e instanceof HTMLInputElement),wf=e=>e instanceof Element?[...e instanceof HTMLInputElement&&e.matches(`input[data-app-mask]`)?[e]:[],...Cf(e)]:[];function Tf(){xf||typeof MutationObserver>`u`||(xf=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of wf(e))bf.get(t)?.(),bf.delete(t);for(let e of t.addedNodes)for(let t of wf(e))Sf(t)}}),xf.observe(document.documentElement,{childList:!0,subtree:!0}))}function Ef(e=document){yf();for(let t of Cf(e))Sf(t);e===document&&Tf()}var Df=`data-wui-bulk-in-bar`,Of=`[data-wui-page-header-bar][data-wui-bulk-for]`,kf=new WeakSet;function Af(e){return`${On(e,{decimals:0})} selected`}function jf(e){let t=e.dataset.wuiBulkFor;return t===void 0?null:document.getElementById(t)}function Mf(e){return typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`}function Nf(e,t){return[...e.querySelectorAll(t)].flatMap(e=>e instanceof HTMLElement?[e]:[])}function Pf(e,t){for(let n of Nf(e,`[data-wui-bar-swap]`))n.hidden=t>0;let n=e.querySelector(`[data-wui-bar-bulk]`);if(!n)return;if(!(n instanceof HTMLElement))throw Error(`The bulk slot is not an HTML element.`);n.hidden=t===0;let r=n.querySelector(`.page-header-bar-bulk-count`);if(!(r instanceof HTMLElement))throw Error(`The bulk slot has no count element.`);r.textContent=t>0?Af(t):``}function Ff(e=document){for(let t of Nf(e,Of))jf(t)?.setAttribute(Df,``);kf.has(document)||(kf.add(document),document.addEventListener(`selectionchange`,e=>{if(!(e instanceof CustomEvent)||!Mf(e.detail))return;let t=e.target;if(t!==null&&!(t instanceof Node))throw Error(`The selection changed on a target that is not a node.`);for(let n of Nf(document,Of))jf(n)?.contains(t)&&Pf(n,e.detail.selected)}))}var If={digitText:`At least one digit`,lengthText:`At least {minLength} characters long`,lowercaseText:`At least one lowercase letter`,requirementsTitle:`Password requirements`,specialText:`At least one special character`,uniqueCharsTextOne:`At least {n} unique character`,uniqueCharsTextOther:`At least {n} unique characters`,uppercaseText:`At least one uppercase letter`},Lf={minLength:10,uppercase:!0,lowercase:!0,digit:!0,special:!0,uniqueChars:0,customRules:[]},Rf=()=>I(`passwordRules`,If);function zf(e){return e===!0||e==null?{...Lf}:{...Lf,...e}}function Bf(e){let t=zf(e),n=[];if(t.minLength>0&&n.push({key:`length`,label:L(Rf().lengthText,{minLength:t.minLength}),test:e=>e.length>=t.minLength}),t.uppercase&&n.push({key:`uppercase`,label:Rf().uppercaseText,test:e=>/[A-Z]/.test(e)}),t.lowercase&&n.push({key:`lowercase`,label:Rf().lowercaseText,test:e=>/[a-z]/.test(e)}),t.digit&&n.push({key:`digit`,label:Rf().digitText,test:e=>/[0-9]/.test(e)}),t.special&&n.push({key:`special`,label:Rf().specialText,test:e=>/[^A-Za-z0-9]/.test(e)}),t.uniqueChars>0){let e=t.uniqueChars;n.push({key:`unique`,label:Xe(Rf(),`uniqueCharsText`,e,{n:e}),test:t=>new Set(t).size>=e})}for(let[e,r]of(t.customRules??[]).entries()){let t=new RegExp(r.pattern);n.push({key:`custom-${e}`,label:r.label,test:e=>t.test(e)})}return n}function Vf(e,t){let n=e==null?``:String(e);return Bf(t).map(e=>({key:e.key,label:e.label,met:e.test(n)}))}function Hf(e,t){return Vf(e,t).every(e=>e.met)}var Uf={moveLabel:`Move to`,moveText:`Move to {label}`},Wf=`wui:row-drop`,Gf=`is-drop-over`,Kf=`application/x-wui-rows`,qf=`wui-row-dragging`,Jf=`[data-wui-drop-target]`,Yf=`tbody tr[data-row-key]`,Xf=`input, button, a, select, textarea, label`,Zf=`.wui-select-cell .wui-check`,Qf=new WeakMap,$f=new WeakSet,ep=null,tp=null;function np(e){let t=e.querySelector(Zf);return t instanceof HTMLInputElement&&t.checked}function rp(e){let t=[];for(let n of e.querySelectorAll(`tbody tr`))n instanceof HTMLElement&&np(n)&&t.push(n.dataset.rowKey);return t}function ip(e,t){return P(e,t)}function ap(e,t){let n=ip(e,t);return n instanceof HTMLElement?n:null}function op(e){let t=e.textContent;if(t===null)throw Error(`A drop target has no text content.`);return t.trim()}var sp=e=>typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`;function cp(){ep=null,document.body.classList.remove(qf);for(let e of document.querySelectorAll(`${Jf}.${Gf}`))e.classList.remove(Gf)}function lp(e,t,n){e.dispatchEvent(new CustomEvent(Wf,{bubbles:!0,detail:{keys:t,target:n.dataset.wuiDropTarget}}))}function up(e){let t=ap(e.target,Jf);if(!t||!ep)return;e.preventDefault();let n=N(e.dataTransfer,`A drag event arrived without its DataTransfer.`);n.dropEffect=`move`,t.classList.add(Gf)}function dp(e){let t=ap(e.target,Jf);!t||e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||t.classList.remove(Gf)}function fp(e){let t=ap(e.target,Jf);if(!t||!ep)return;e.preventDefault(),t.classList.remove(Gf);let{root:n,keys:r}=ep;lp(n,r,t),cp()}function pp(e){let t=ap(e.target,Jf);t&&tp?.keys.length&&(e.preventDefault(),lp(tp.root,tp.keys,t))}function mp(e){(Ir(e)||e.key===` `)&&pp(e)}function hp(e){$f.has(e)||($f.add(e),e.addEventListener(`dragover`,up),e.addEventListener(`dragenter`,up),e.addEventListener(`dragleave`,dp),e.addEventListener(`drop`,fp),e.addEventListener(`click`,pp),e.addEventListener(`keydown`,mp))}function gp(e){let t=Qf.get(e);if(t)return t;hp(e.ownerDocument||e);let n=t=>{let n=ap(t.target,Yf);if(!n||!e.contains(n))return;let r=ip(t.target,Xf);r&&n.contains(r)||(n.draggable=!0)},r=t=>{let n=ap(t.target,Yf);if(!n||!e.contains(n))return;let r=np(n)?rp(e):[n.dataset.rowKey],i=N(t.dataTransfer,`A drag event arrived without its DataTransfer.`);i.setData(Kf,JSON.stringify(r)),i.setData(`text/plain`,r.join(`,`)),i.effectAllowed=`move`,ep={root:e,keys:r},document.body.classList.add(qf)},i=t=>{let n=t instanceof CustomEvent?t.detail:void 0;if(sp(n)){let{keys:t}=n;n.selected>0?tp={root:e,keys:Array.isArray(t)?t:rp(e)}:n.selected===0&&(tp=null)}vp(document)};e.addEventListener(`pointerdown`,n),e.addEventListener(`dragstart`,r),e.addEventListener(`dragend`,cp),e.addEventListener(`selectionchange`,i);let a=()=>{e.removeEventListener(`pointerdown`,n),e.removeEventListener(`dragstart`,r),e.removeEventListener(`dragend`,cp),e.removeEventListener(`selectionchange`,i),Qf.delete(e)};return Qf.set(e,a),a}var _p=()=>I(`rowDrop`,Uf);function vp(e=document){let t=e.querySelector(`[data-wui-row-drag] tbody tr ${Zf}:checked`)!==null;for(let n of e.querySelectorAll(Jf)){n.tagName!==`BUTTON`&&(n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`)),t?n.removeAttribute(`aria-disabled`):n.setAttribute(`aria-disabled`,`true`);let e=n.getAttribute(`data-wui-drop-label`)||op(n);n.setAttribute(`aria-label`,L(_p().moveText,{label:e}))}for(let t of e.querySelectorAll(`.wui-drop-tray`))t.hasAttribute(`role`)||(t.setAttribute(`role`,`toolbar`),t.setAttribute(`aria-label`,_p().moveLabel))}function yp(e=document){for(let t of e.querySelectorAll(`[data-wui-row-drag]`))t instanceof HTMLElement&&gp(t);vp(e.ownerDocument||e)}var bp=`.table-wrap, .table-responsive, [class*="table-responsive-"]`,xp=1;function Sp(e){let t=()=>{let t=e.scrollWidth-e.clientWidth,n=Math.abs(e.scrollLeft);e.toggleAttribute(`data-wui-overflow-start`,t>xp&&n>xp),e.toggleAttribute(`data-wui-overflow-end`,t>xp&&n<t-xp),e.toggleAttribute(`data-wui-overflow-top`,e.scrollTop>xp)},n=()=>{if(e.scrollWidth-e.clientWidth>xp){let t=getComputedStyle(e);e.style.setProperty(`--wui-scroll-pad-start`,t.paddingInlineStart),e.style.setProperty(`--wui-scroll-pad-end`,t.paddingInlineEnd)}else e.style.getPropertyValue(`--wui-scroll-pad-end`)&&(e.style.removeProperty(`--wui-scroll-pad-start`),e.style.removeProperty(`--wui-scroll-pad-end`))},r=()=>{n(),t()};e.addEventListener(`scroll`,t,{passive:!0});let i=null;if(typeof ResizeObserver<`u`){i=new ResizeObserver(r),i.observe(e);for(let t of e.children)i.observe(t)}return r(),()=>{e.removeEventListener(`scroll`,t),i?.disconnect(),e.removeAttribute(`data-wui-overflow-start`),e.removeAttribute(`data-wui-overflow-end`),e.removeAttribute(`data-wui-overflow-top`),e.style.getPropertyValue(`--wui-scroll-pad-end`)&&(e.style.removeProperty(`--wui-scroll-pad-start`),e.style.removeProperty(`--wui-scroll-pad-end`))}}var Cp=new WeakMap,wp,Tp=e=>{Cp.has(e)||Cp.set(e,Sp(e))},Ep=e=>{if(!(e instanceof HTMLElement))return[];let t=e.matches(`.table-wrap, .table-responsive, [class*="table-responsive-"]`)?[e]:[];if(e.firstElementChild===null)return t;let n=[...e.querySelectorAll(bp)].filter(e=>e instanceof HTMLElement);return[...t,...n]};function Dp(){wp||typeof MutationObserver>`u`||(wp=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Ep(e))Cp.get(t)?.(),Cp.delete(t);for(let e of t.addedNodes)for(let t of Ep(e))Tp(t)}}),wp.observe(document.documentElement,{childList:!0,subtree:!0}))}function Op(e=document){for(let t of e.querySelectorAll(bp))t instanceof HTMLElement&&Tp(t);e===document&&Dp()}var kp={leaveLabel:`Leave`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,title:`Leave without saving?`},Ap={cancelLabel:`Cancel`,confirmLabel:`Confirm`,confirmTitle:`Are you sure?`,failedMessage:`That did not work. Try again.`,forbiddenMessage:`You do not have permission to do that.`,networkMessage:`Could not reach the server. Check your connection and try again.`,timeoutMessage:`The server did not answer in time. Check your connection and try again.`,typePhraseLabel:`Type {phrase} to confirm`},jp={backLabel:`Back`,clientMessage:`It may have been moved or deleted.`,closeLabel:`Close`,errorTitle:`This could not be loaded`,forbiddenMessage:`You do not have access to this.`,invalidMessage:`Some fields need attention.`,loadingLabel:`Loading`,networkMessage:`Could not reach the server. Check your connection and try again.`,retryLabel:`Try again`,serverMessage:`Something went wrong on our side. Try again in a moment.`,submitFailedMessage:`Your changes were not saved.`,timeoutMessage:`The server did not answer in time. Check your connection and try again.`},Mp={closeLabel:`Close`,error:`Error`,failedText:`That did not work. Try again.`,loading:`Loading...`,moreText:`more`,success:`Done`},Np=Object.freeze([`page`,`pageSize`,`sortBy`,`sortOrder`,`search`]),Pp=`search`,q=()=>I(`dataTable`,Gn),Fp=5,Ip=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,Lp=e=>e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled,Rp=e=>Ip(e)&&`type`in e&&e.type===`hidden`,J=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n),Y=(e,t,n)=>{let r=e.querySelector(t);return r instanceof n?r:null},zp=(e,t,n)=>{let r=e.closest(t);return r instanceof n?r:null},Bp=e=>e.localName===`wui-select`,Vp=new WeakMap,Hp=(e,t)=>{let n=Number(e);return Number.isInteger(n)?n:t},Up=e=>({total:Hp(e.dataset.total,0),totalCapped:e.dataset.totalCapped===`true`,page:Hp(e.dataset.page,1),pageSize:Hp(e.dataset.pageSize,0),sortBy:e.dataset.sortBy||``,sortOrder:e.dataset.sortOrder===`desc`?`desc`:`asc`,pending:e.dataset.totalPending===`true`,rowCount:Hp(e.dataset.rowCount,0)}),Wp=(e,t)=>{e&&rm().toast(e,{variant:t})},Gp=(e,t)=>{if(!e)return;let n=new Set([...e.elements].filter(e=>!Rp(e)||e.hasAttribute(`data-range-mirror`)).map(e=>e.getAttribute(`name`)).filter(e=>e&&!Np.includes(e))),r=[...t].some(([e,t])=>t!==``&&n.has(e));for(let t of J(e,`[data-wui-filter-clear]`,HTMLElement))t.hidden=!r},Kp=new Intl.NumberFormat(`en-IN`),qp=(e,t)=>t?`${Kp.format(e)}+`:Kp.format(e),Jp=(e,t,n)=>{let r=e.closest(`.wui-list-card`),i=r?Y(r,`.wui-list-card-count`,HTMLElement):null;i&&(i.textContent=qp(t,n))};function Yp(e=document){let t=J(e,`[data-wui-server]`,HTMLElement);e instanceof HTMLElement&&e.matches(`[data-wui-server]`)&&t.unshift(e);for(let e of t){if(Vp.has(e))continue;let t=Zp(e);Vp.set(e,t),e.hasAttribute(`data-load-first-page`)&&t.reload()}}function Xp(e){let t=e instanceof Element?zp(e,`[data-wui-server]`,HTMLElement):null;return t&&Vp.get(t)||null}function Zp(e){let t=Y(e,`.table-wrap`,HTMLElement),n=t?Y(t,`:scope > table`,HTMLTableElement):null,r=e.dataset.src;if(!t||!n||!r)throw Error(`A server-paged table needs data-src and a .table-wrap > table: render it with <app-data-table src>.`);let i=Y(t,`:scope > [data-wui-table-state]`,HTMLElement),a=Y(e,`[data-wui-table-pager]`,HTMLElement),o=Y(e,`[data-wui-table-status]`,HTMLElement),s={urlState:e.dataset.urlState!==`false`,refreshOnSuccess:e.dataset.refreshOnSuccess!==`false`,filtersForm:e.dataset.filtersForm||null,filtersRegion:e.dataset.filtersRegion||null,searchInput:e.dataset.searchInput||null,loadingText:e.dataset.loadingText||q().loadingText,errorText:e.dataset.errorText||q().errorText,timeoutMs:ka(e.getAttribute(`data-wui-timeout`))??3e4},c=new URL(r,window.location.href),l=e.dataset.totalSrc||null,u=l===null?null:new URL(l,window.location.href),d=new Set([...c.searchParams.keys(),...u?.searchParams.keys()??[]]),f=n.hasAttribute(`data-app-datatable-selectable`),p=new Set,m=!1,h=Ma(),g=new AbortController,_={signal:g.signal},v=N(Y(n,`:scope > tbody[data-wui-rows]`,HTMLTableSectionElement),`A server-paged table needs its rows in <app-table-rows> (tbody[data-wui-rows]).`),y=Up(v),b=null,x=null,S=e=>{let t=new URLSearchParams;for(let[n,r]of new URLSearchParams(e))d.has(n)||t.append(n,r);return t},C=e=>S(new URL(e,window.location.href).search),w=e=>{let t=e.toString();return`${window.location.pathname}${t?`?${t}`:``}${window.location.hash}`},T=(e,t)=>{let n=new URL(e.href);for(let[e,r]of t)d.has(e)||n.searchParams.append(e,r);return n.origin===window.location.origin?`${n.pathname}${n.search}`:n.href},E=e=>T(c,e),ee=(e,t)=>{let n=new URLSearchParams(e);return n.has(`page`)&&n.set(`page`,String(t.page)),n.has(`pageSize`)&&n.set(`pageSize`,String(t.pageSize)),n.has(`sortBy`)?t.sortBy?(n.set(`sortBy`,t.sortBy),n.set(`sortOrder`,t.sortOrder)):(n.delete(`sortBy`),n.delete(`sortOrder`)):n.delete(`sortOrder`),n},D=ee(s.urlState?S(window.location.search):new URLSearchParams,y);s.urlState&&w(D)!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&window.history.replaceState(window.history.state,``,w(D));let O=(e,n)=>t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:n})),k=e=>{o&&(o.textContent=e)},te=e=>{if(e.pending)return e.rowCount===0?q().emptyLabel:L(q().pageTextPending,{page:e.page});if(e.total===0)return q().emptyLabel;let t=e.pageSize>0?Math.max(1,Math.ceil(e.total/e.pageSize)):1,n=e.totalCapped?qp(e.total,!0):`${e.total}`;return L(e.total===1?q().pageTextOne:q().pageTextOther,{page:e.page,pages:t,total:n})},ne=()=>J(n,`:scope > thead > tr:first-child > th`,HTMLTableCellElement),re=e=>{if(f&&J(e,`:scope > tr:not(.wui-group-row, .wui-virtual-spacer)`,HTMLTableRowElement).some(e=>!e.dataset.rowKey))throw Error(`A selectable server-paged table needs data-row-key on every row, so a selection can span pages.`)},ie=t=>{let n=e.dataset.activeRowKey;if(n!==void 0)for(let e of t){let t=e.classList.contains(`wui-row-active`),r=n!==``&&e.dataset.rowKey===n;e.classList.toggle(`wui-row-active`,r),r?e.setAttribute(`aria-current`,`true`):t&&e.removeAttribute(`aria-current`)}},ae=e=>{if(f){uu(e);for(let t of e){let e=Y(t,`.${K} .wui-check:not(:disabled)`,HTMLInputElement);e&&(m&&p.add(t.dataset.rowKey),e.checked=p.has(t.dataset.rowKey))}fu(n)}ie(e);let t=ne();if(n.classList.contains(`wui-table-stack`))for(let n of e)[...n.cells].forEach((e,n)=>{let r=t[n]?.textContent?.trim();r&&!e.hasAttribute(`data-label`)&&e.setAttribute(`data-label`,r)});t.forEach((t,n)=>{if(t.classList.contains(`wui-col-hidden`))for(let t of e)t.cells[n]?.classList.add(`wui-col-hidden`)})},oe=e=>ae(J(e,`:scope > tr`,HTMLTableRowElement)),se=e=>{for(let t of e.querySelectorAll(`:scope > template[data-wui-pager], :scope > template[data-wui-empty], :scope > template[data-wui-filters]`))t.remove()},ce=e=>e?.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0})),le=(e,t)=>{if(!i)return;let n=Y(e,`:scope > template[data-wui-empty]`,HTMLTemplateElement);ce(i),(t.pending?t.rowCount:t.total)===0&&n?(i.replaceChildren(n.content.cloneNode(!0)),i.hidden=!1):(i.replaceChildren(),i.hidden=!0)},ue=e=>{a&&(ce(a),a.replaceChildren(...e?[e.content.cloneNode(!0)]:[]),a.hidden=!1)},de=e=>{let t=s.filtersRegion&&e?Y(document,s.filtersRegion,HTMLElement):null;return t&&e&&(ce(t),t.replaceChildren(e.content.cloneNode(!0))),t},fe=0,pe=e=>{let r=Up(e);r.pending&&Object.assign(r,{total:y.total,totalCapped:y.totalCapped});let i=r.sortBy!==y.sortBy||r.sortOrder!==y.sortOrder?wr(v.rows):null;ue(Y(e,`:scope > template[data-wui-pager]`,HTMLTemplateElement)),le(e,r);let a=de(Y(e,`:scope > template[data-wui-filters]`,HTMLTemplateElement));se(e),ce(v),n.replaceChild(e,v),v=e,fe+=1;let o=m&&r.total!==y.total;return y=r,o&&(m=!1),t.removeAttribute(`data-wui-table-error`),oe(e),we(),Tr(e.rows,i),o&&Ee(),a},me=e=>{let t=Y(Xl(`<table>${e}</table>`),`tbody[data-wui-rows]`,HTMLTableSectionElement);return t&&re(t),t?document.importNode(t,!0):null},he=(e,t=ne())=>{let n=document.createElement(`tr`);for(let r=0;r<e;r++){let e=t[r],i=e?.classList.contains(`text-center`),a=!i&&(e?.classList.contains(`num`)||e?.classList.contains(`text-end`)||e?.classList.contains(`wui-cell-end`)),o=document.createElement(`td`);i?o.classList.add(`text-center`):a&&o.classList.add(e?.classList.contains(`num`)?`num`:`wui-cell-end`);let s=document.createElement(`span`);s.className=`skeleton`,s.setAttribute(`aria-hidden`,`true`);let c=i?44:a?56:60;s.style.cssText=`display:block;width:${c}%;height:12px;border-radius:6px`,o.append(s),n.append(o)}return n},ge=()=>{if(v.querySelector(`:scope > tr:not([data-wui-skeleton])`))return;let e=Math.max(1,ne().length);v.replaceChildren(...Array.from({length:Fp},()=>{let t=he(e);return t.setAttribute(`data-wui-skeleton`,``),t})),t.removeAttribute(`data-wui-table-error`),i&&(i.hidden=!0)},_e=e=>{e?(t.setAttribute(`aria-busy`,`true`),ge()):t.removeAttribute(`aria-busy`)},ve=e=>e===`forbidden`?q().forbiddenMessage:e===`network`?q().networkMessage:e===`timeout`?q().timeoutMessage:s.errorText,ye=e=>{let n=ve(e);if(t.setAttribute(`data-wui-table-error`,e),a&&(a.hidden=!0),i){let t=document.createElement(`div`);t.className=`empty-state wui-empty-state-table wui-table-error`,t.setAttribute(`role`,`alert`);let r=document.createElement(`span`);r.className=`empty-state-icon`;let a=W(e===`forbidden`?`lock`:`alert-circle`,{size:24});a&&r.replaceChildren(a);let o=document.createElement(`div`);o.className=`empty-state-title`,o.textContent=n;let s=document.createElement(`div`);s.className=`empty-state-action`;let c=document.createElement(`button`);c.type=`button`,c.className=ol(`primary`,`outline`,`sm`),c.dataset.wui=nl,c.setAttribute(`data-wui-table-retry`,``),c.textContent=q().retryLabel,s.append(c),t.append(r,o,s),ce(i),i.replaceChildren(t),i.hidden=!1}k(n)},be=()=>s.filtersForm?Y(document,s.filtersForm,HTMLFormElement):null,A=async(n,r=`none`,{quiet:i=!1}={})=>{let a=new URLSearchParams(n);i||(b={query:a,mode:r},_e(!0),k(s.loadingText)),O(`wui:table:loading`,{query:a.toString()});let o=await h.run(E(a),{timeoutMs:s.timeoutMs});if(o.kind===`aborted`||o.kind===`stale`||o.kind===`session`)return o;i||_e(!1);let c=null;if(o.ok)try{c=me(o.html)}catch(e){B(e)}if(!o.ok||!c){let e=o.ok?`server`:o.kind;return i?Wr(`A quiet server table refresh failed; the rows on screen are kept.`,e):ye(e),O(`wui:table:error`,{status:o.status,kind:e,message:ve(e)}),o}let l=pe(c);return D=ee(a,y),Gp(be(),D),s.urlState&&r===`push`?window.history.pushState(window.history.state,``,w(D)):s.urlState&&r===`replace`&&window.history.replaceState(window.history.state,``,w(D)),i||k(te(y)),rm().refresh(t),l&&rm().refresh(l),y.pending?Se():Jp(e,y.total,y.totalCapped),O(`wui:table:loaded`,{...y,query:D.toString()}),o},xe=e=>(e.delete(`page`),e),Se=()=>{if(!u||!y.pending)return;let t=fe;ja(T(u,D),{timeoutMs:s.timeoutMs}).then(n=>{if(t!==fe)return;if(!n.ok){Wr(`[@webority/ui-elements] A server table's total did not load; its pager keeps Previous and Next.`,n.kind);return}let r=Y(Xl(n.html),`div[data-wui-total]`,HTMLElement);if(!r){Wr(`[@webority/ui-elements] A server table's count answer has no div[data-wui-total]; its pager keeps Previous and Next.`);return}if(Hp(r.dataset.page,-1)!==y.page||Hp(r.dataset.pageSize,-1)!==y.pageSize)return;let i=Hp(r.dataset.total,-1);if(i<0){Wr(`[@webority/ui-elements] A server table's count answer has no whole data-total; its pager keeps Previous and Next.`);return}let a=r.dataset.totalCapped===`true`,o=m&&i!==y.total;y={...y,total:i,totalCapped:a,pending:!1},o&&(m=!1);let s=Y(r,`:scope > template[data-wui-pager]`,HTMLTemplateElement);s&&ue(s);let c=de(Y(r,`:scope > template[data-wui-filters]`,HTMLTemplateElement));c&&rm().refresh(c),Jp(e,y.total,y.totalCapped),k(te(y)),o&&Ee(),O(`wui:table:total`,{total:i,totalCapped:a})})},Ce=()=>J(n,`:scope > thead th[data-sort-key]`,HTMLTableCellElement),we=()=>{for(let e of Ce()){let t=e.dataset.sortKey===y.sortBy;e.setAttribute(`aria-sort`,t?y.sortOrder===`desc`?`descending`:`ascending`:`none`)}};for(let e of Ce())if(e.classList.add(`sortable`),e.tabIndex=0,!e.querySelector(`.sort-icon`)){let t=e.classList.contains(`num`)||e.classList.contains(`text-end`),n=document.createElement(`span`);n.className=t?`sort-icon wui-sort-lead`:`sort-icon`;let r=W(`chevrons-up-down`,{size:14});r&&n.replaceChildren(r),t?e.prepend(n):e.append(n)}let Te=e=>{let t=xe(new URLSearchParams(D)),n=y.sortBy===e&&y.sortOrder===`asc`?`desc`:`asc`;return t.set(`sortBy`,e),t.set(`sortOrder`,n),A(t,`push`)};n.addEventListener(`click`,e=>{let t=e.target instanceof Element?zp(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&Te(t.dataset.sortKey??``)}),n.addEventListener(`keydown`,e=>{if(e.key!==`Enter`&&e.key!==` `)return;let t=e.target instanceof Element?zp(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&(e.preventDefault(),Te(t.dataset.sortKey??``))});let Ee=()=>{fu(n);let e=m?{selected:y.total,total:y.total,allMatching:m}:{selected:p.size,total:y.total};n.dispatchEvent(new CustomEvent(`selectionchange`,{bubbles:!0,detail:e}))};f&&(mu(n,(e,t)=>{for(let n of e){let e=zp(n,`tr`,HTMLTableRowElement)?.dataset.rowKey;e&&(t?p.add(e):p.delete(e))}t||(m=!1)}),n.addEventListener(`change`,e=>{let t=e.target;if(t instanceof HTMLInputElement&&t.matches(`.wui-select-cell .wui-check:not(:disabled)`)){if(t.checked||(m=!1),n.tHead?.contains(t))for(let e of J(v,`:scope > tr`,HTMLTableRowElement)){let n=Y(e,`.${K} .wui-check:not(:disabled)`,HTMLInputElement);n&&(n.checked=t.checked,t.checked?p.add(e.dataset.rowKey):p.delete(e.dataset.rowKey))}else{let e=zp(t,`tr`,HTMLTableRowElement)?.dataset.rowKey;if(!e)return;t.checked?p.add(e):p.delete(e)}Ee()}})),a&&(a.addEventListener(`click`,e=>{let t=e.target instanceof Element?zp(e.target,`a[href]`,HTMLAnchorElement):null;!t||e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(e.preventDefault(),A(C(t.getAttribute(`href`)??``),`push`))}),a.addEventListener(`change`,e=>{let t=e.target;t instanceof HTMLSelectElement&&t.classList.contains(`tpg-select`)&&t.value&&(e.stopPropagation(),A(C(t.value),`push`))}));let De=()=>{if(!s.searchInput)return null;let e=Y(document,s.searchInput,HTMLElement);return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e:e?Y(e,`input`,HTMLInputElement):null},Oe=()=>e.isConnected?!0:(g.abort(),clearTimeout(x??void 0),!1),ke=(e,t)=>{let n=[...e.elements].filter(Ip),r=new Set;for(let e of n)e.name&&!Rp(e)&&r.add(e.name);let i=[];for(let e of n)if(e.name&&!Lp(e)){if(e instanceof HTMLInputElement&&e.matches(`input[type="hidden"][data-wui-carried]`))r.has(e.name)||i.push([e.name,e.value]);else if(e instanceof HTMLInputElement&&e.matches(`input[type=checkbox], input[type=radio]`))e.checked&&i.push([e.name,e.value]);else if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)e.matches(`[type=submit], [type=button], [type=reset], [type=image], [type=file]`)||i.push([e.name,e.value]);else if(e instanceof HTMLSelectElement)for(let t of e.selectedOptions)i.push([e.name,t.value])}return(t instanceof HTMLButtonElement||t instanceof HTMLInputElement)&&t.name&&!t.disabled&&i.push([t.name,t.value]),i},j=(e,t)=>{let n=new Set([...e.elements].filter(Ip).map(e=>e.name).filter(Boolean)),r=new URLSearchParams,i=e=>e!==`search`&&Np.includes(e);for(let[e,t]of D)e!==`page`&&(i(e)||!n.has(e))&&r.append(e,t);for(let[n,a]of ke(e,t))a===``||i(n)||d.has(n)||r.append(n,a);let a=De();if(a){r.delete(Pp);let e=a.value.trim();e&&r.set(Pp,e)}return A(r,`push`)},M=e=>s.filtersForm&&e.closest?.(s.filtersForm)||s.filtersRegion&&e.closest?.(s.filtersRegion)||null;document.addEventListener(`submit`,e=>{Oe()&&s.filtersForm&&e.target instanceof HTMLFormElement&&e.target.matches(s.filtersForm)&&(e.preventDefault(),j(e.target,e.submitter))},_),document.addEventListener(`change`,e=>{if(!Oe()||!s.filtersForm||!(e.target instanceof Element))return;let t=zp(e.target,s.filtersForm,HTMLFormElement);!t||e.target===De()||t.hasAttribute(`data-wui-apply-on-change`)||e.target.closest(`wui-filter-popover`)||j(t)},_);let Ae=(e,t)=>{if(!e)return;let n=e=>t.get(e)??``;for(let r of J(e,`input[name]:not([type=hidden])`,HTMLInputElement))if(r.type===`checkbox`)r.checked=t.getAll(r.name).includes(r.value);else if(r.type===`radio`){let e=n(r.name)===r.value;if(r.checked===e)continue;r.checked=e,e&&r.dispatchEvent(new Event(`change`))}else r.value!==n(r.name)&&(r.value=n(r.name),r.dispatchEvent(new Event(`input`,{bubbles:!0})));for(let r of J(e,`select[name]`,HTMLSelectElement))if(!r.multiple)r.value=n(r.name);else for(let e of r.options)e.selected=t.getAll(r.name).includes(e.value);for(let r of[...e.querySelectorAll(`wui-select[name]`)].filter(Bp)){let e=r.getAttribute(`name`)??``;r.value=r.mode===`multiple`||r.mode===`tag`?t.getAll(e):n(e)}for(let t of e.querySelectorAll(`wui-date-range`)){let e=t.getAttribute(`start-name`)||t.getAttribute(`name`),r=t.getAttribute(`end-name`);t.value={start:e?n(e):``,end:r?n(r):``}}};document.addEventListener(`click`,e=>{if(!Oe())return;let t=e.target instanceof Element?zp(e.target,`a[href]`,HTMLAnchorElement):null;if(!t||!M(t)||e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return;let n=new URL(t.getAttribute(`href`)??``,window.location.href);if(n.origin!==window.location.origin||n.pathname!==window.location.pathname)return;e.preventDefault();let r=xe(C(n.href));Ae(t.closest(`form`),r),Gp(t.closest(`form`),r),A(r,`push`)},_),document.addEventListener(`input`,e=>{if(!Oe())return;let t=De();t&&e.target===t&&(clearTimeout(x??void 0),x=setTimeout(()=>{if(!Oe())return;let e=xe(new URLSearchParams(D)),n=t.value.trim();n?e.set(Pp,n):e.delete(Pp),e.toString()!==D.toString()&&A(e,`replace`)},300))},_),s.urlState&&window.addEventListener(`popstate`,()=>{if(!Oe())return;let e=S(window.location.search),t=De();t&&(t.value=e.get(`search`)??``),Gp(be(),e),A(e,`none`)},_),document.addEventListener(`wui:modal:success`,()=>{Oe()&&s.refreshOnSuccess&&A(D,`none`)},_),i?.addEventListener(`click`,e=>{e.target instanceof Element&&e.target.closest(`[data-wui-table-retry]`)&&b&&A(b.query,b.mode)});let je=e=>[...v.rows].find(t=>t.dataset.rowKey===e)??null,Me=e=>{if(!e?.trim())return null;let t=Xl(`<table><tbody>${e}</tbody></table>`);if(t.querySelector(`tbody[data-wui-rows]`))return null;let n=J(t,`table > tbody > tr[data-row-key]`,HTMLTableRowElement);return n.length?n.map(e=>document.importNode(e,!0)):null},Ne=(e,n,r)=>{let i=r?e[0]:e.find(e=>e.dataset.rowKey===n.dataset.rowKey);if(!i)return null;let a=[];for(let t of e){let e=t===i?n:je(t.dataset.rowKey);e&&(ce(e),e.replaceWith(t),a.push(t))}return ae(a),rm().refresh(t),i},Pe=e=>e.message||(e.kind===`forbidden`?q().actionForbiddenMessage:q().actionFailedMessage),Fe=e=>{e?.isConnected&&e.getAttribute(`data-wui-save-state`)===`saving`&&Mr(e,null)},Ie=async({url:e,method:n=`POST`,body:r,key:a,row:o}={})=>{if(!e)throw Error("saveRow needs `url`: the handler that saves the row.");let s=a==null,c=s?null:je(String(a));if(!s&&!c)throw Error(`saveRow found no row with data-row-key="${a}" on this page.`);let l=ne().filter(e=>!e.classList.contains(K)),u=o===void 0?c??he(Math.max(1,l.length),l):Le(o,HTMLTableRowElement,"saveRow's `row` is required to be a row element: the <tr> as it will read, not its HTML.");c&&u!==c?c.replaceWith(u):c||v.insertBefore(u,v.firstChild),u!==c&&ae([u]),i&&!t.hasAttribute(`data-wui-table-error`)&&(i.hidden=!0),Mr(u,`saving`);let d=jr(u),f=await ja(e,{method:n.toUpperCase(),body:r});if(f.kind===`session`)return!1;if(f.ok){let e=Me(f.html),t=e&&u.isConnected?Ne(e,u,s):null;return t?k(ir(jr(t)||d)):(await A(D,`none`),Fe(u)),im(f,f.toastVariant||`success`),O(`wui:table:saved`,{key:t?.dataset.rowKey??(s?null:String(a)),added:s,status:f.status}),!0}let p=Pe(f),m=u;return c&&u!==c&&u.isConnected?(u.replaceWith(c),m=c):s&&!o&&(u.remove(),m=null,i?.childElementCount&&!v.querySelector(`:scope > tr`)&&(i.hidden=!1)),m?.isConnected&&Mr(m,`error`,p),f.kind!==`aborted`&&Wp(p,`danger`),k(or(d,p)),O(`wui:table:failed`,{key:s?null:String(a),added:s,status:f.status,kind:f.kind,message:p}),!1},P=async e=>{let t=e.dataset.url;if(!t)throw Error(`A data-wui-row-action button needs data-url: the handler the action posts to.`);let n=zp(e,`tr`,HTMLTableRowElement),r=n?.dataset.rowKey??null,i=e.dataset.wuiRowAction||``,a=n?jr(n):``;e.disabled=!0,e.setAttribute(`aria-busy`,`true`),n&&Mr(n,`saving`);let o=await ja(t,{method:(e.dataset.method||`post`).toUpperCase()});if(e.disabled=!1,e.removeAttribute(`aria-busy`),o.kind===`session`||o.kind===`aborted`)Fe(n);else{if(o.ok){im(o,o.toastVariant||`success`);let e=n?.isConnected?Me(o.html):null,t=e&&n?Ne(e,n,!1):null;t?k(ir(jr(t)||a)):(await A(D,`none`),Fe(n))}else{let e=Pe(o);Wp(e,`danger`),n?.isConnected&&Mr(n,`error`,e),k(or(a,e))}O(`wui:table:action`,{action:i,key:r,ok:o.ok,status:o.status})}};return n.addEventListener(`click`,e=>{let t=e.target instanceof Element?zp(e.target,`[data-wui-row-action]`,HTMLButtonElement):null;t&&v.contains(t)&&!t.disabled&&(e.preventDefault(),P(t))}),re(v),se(v),f&&du(n),oe(v),we(),y.pending&&(k(te(y)),Se()),{el:e,reload:async e=>{let n=e?.quiet===!0;return n&&t.getAttribute(`aria-busy`)===`true`?null:A(D,`none`,{quiet:n})},query:()=>new URLSearchParams(D),setQuery:e=>{let t=new URLSearchParams(D);for(let[n,r]of Object.entries(e??{})){t.delete(n);for(let e of Array.isArray(r)?r:[r])e!=null&&e!==``&&t.append(n,String(e))}return e&&`page`in e||t.delete(`page`),A(t,`push`)},saveRow:Ie,setActiveRow:t=>{e.dataset.activeRowKey=t==null?``:String(t),ie(J(v,`:scope > tr`,HTMLTableRowElement))},selection:{keys:()=>[...p],count:()=>m?y.total:p.size,allMatching:()=>m,selectAllMatching:()=>{if(y.pending)Wr(`[@webority/ui-elements] select all matching needs the total; the table is still waiting for its count.`);else{m=!0;for(let e of J(v,`:scope > tr`,HTMLTableRowElement)){let t=Y(e,`.${K} .wui-check`,HTMLInputElement);t?.disabled||(t&&(t.checked=!0),e.dataset.rowKey&&p.add(e.dataset.rowKey))}Ee()}},clear:()=>{m=!1,p.clear();for(let e of J(v,`:scope > tr > .${K} .wui-check:not(:disabled)`,HTMLInputElement))e.checked=!1;Ee()}}}}var Qp=8e3,$p=()=>I(`toast`,Mp),em=[`success`,`info`,`warning`,`danger`],tm=e=>em.some(t=>t===e);function nm(e){if(!tm(e))throw RangeError(`Unknown toast variant "${e}".`);return e}function rm(){return N(window.WUI,`window.WUI is not defined: the Razor behaviour script did not load on this page.`)}function im(e,t=`success`){if(!e?.message)return;let n=e.toastAction;n?rm().toast(e.message,{variant:nm(t),duration:Qp,action:{label:n.label,onClick:()=>am(n)}}):rm().toast(e.message,{variant:nm(t)})}async function am(e){let t=await ja(e.url,{method:e.method});if(t.kind!==`session`&&t.kind!==`aborted`){if(t.ok){im(t,t.toastVariant||`success`);for(let e of document.querySelectorAll(`[data-wui-server]`))e instanceof HTMLElement&&e.dataset.refreshOnSuccess!==`false`&&Xp(e)?.reload()}else rm().toast(t.message||$p().failedText,{variant:`danger`})}}var om=`wui-remote-modal`,sm=`wui-remote-drawer`,cm=Object.freeze({sm:360,md:480,lg:640,xl:720}),lm=`wui-modal-fullscreen`,um=`wui-modal-wide`,dm=Object.freeze({sm:380,md:440,lg:640,xl:880,wide:1080}),X=()=>I(`modal`,jp),fm=e=>ka(e?.getAttribute(`data-wui-timeout`)??null)??3e4,pm=`a[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,mm=`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled]),[contenteditable="true"]`,hm=`[aria-invalid="true"], .is-invalid, .input-validation-error`,gm=`invalid`,_m=`.wui-error-summary, [data-wui-form-errors], .validation-summary-errors, [data-valmsg-summary]`,vm=`[data-wui-modal-content]`,ym=`[data-wui-pane-close], [data-wui-dismiss]`,bm=()=>F(`button`,{type:`button`,class:`wui-modal-close`,"data-wui-dismiss":!0,"aria-label":X().closeLabel},Br({width:18,height:18,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[[`path`,{d:`M18 6 6 18M6 6l12 12`}]])),xm=new WeakMap,Sm=new WeakSet;function Cm(e,t){if(e==null)throw TypeError(`The remote modal needs ${t}, and the page does not have it.`);return e}var Z=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},wm=(e,t,n)=>Cm(Z(e,t),n),Tm=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Em=()=>Object.assign(Error(`The remote modal load was aborted.`),{name:`AbortError`}),Dm=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,Om=(e,t)=>{let n=e instanceof Element?e.closest(t):null;return n instanceof HTMLElement?n:null},km=e=>Kr(dm,e),Am=e=>Kr(cm,e);function jm(e){if(e==null||e===``)return null;if(e===`fullscreen`)return{fullscreen:!0};if(km(e))return e===`wide`?{px:dm.wide,wide:!0}:{px:dm[e]};let t=typeof e==`number`?e:/^\d+$/.test(String(e))?Number(e):NaN;if(Number.isInteger(t)&&t>0)return{px:t};throw TypeError(`Unsupported modal size "${String(e)}". Use sm, md, lg, xl, wide, fullscreen or a px number.`)}var Mm=e=>{if(e.classList.contains(`wui-modal-fullscreen`))return{fullscreen:!0};if(e.classList.contains(`wui-modal-wide`))return{px:dm.wide,wide:!0};let t=Number.parseInt(e.style.getPropertyValue(`--wui-modal-max-width`),10);return{px:t>0?t:dm.md}},Nm=(e,t)=>{e.classList.toggle(lm,!!t.fullscreen),e.classList.toggle(um,!t.fullscreen&&!!t.wide),t.fullscreen?e.style.removeProperty(`--wui-modal-max-width`):e.style.setProperty(`--wui-modal-max-width`,`${t.px}px`)},Pm=[`center`,`top`];function Fm(e){if(e==null||e===``)return null;if(Am(e))return{px:cm[e]};let t=typeof e==`number`?e:/^\d+$/.test(String(e))?Number(e):NaN;if(Number.isInteger(t)&&t>0)return{px:t};throw TypeError(`Unsupported drawer size "${String(e)}". Use sm, md, lg, xl or a px number.`)}var Im=e=>e.container===`drawer`,Lm=e=>e.container===`pane`,Rm=e=>e.container!==`modal`,zm=(e,t)=>Im(e)?Fm(t):jm(t),Bm=e=>{let t=typeof e==`string`?document.querySelector(e):e,n=t instanceof HTMLElement?t:null;return n?.matches(`[data-wui-pane-host]`)?n:null},Vm=e=>Lm(e)?e.shell:wm(e.shell,`.modal-dialog`,`a dialog frame`);function Hm(e=`modal`){let t=e===`drawer`,n=t?sm:om,r=document.getElementById(n);if(r)return r;let i=document.createElement(`wui-modal`);i.id=n,i.setAttribute(`data-wui`,`AppModal`);let a=document.createElement(`dialog`);return a.className=t?`modal wui-modal-shell wui-remote-drawer`:`modal wui-modal-shell`,a.style.setProperty(`--wui-modal-max-width`,`${t?cm.md:dm.md}px`),a.replaceChildren(F(`div`,{class:t?`modal-dialog wui-remote-drawer-dialog`:`modal-dialog modal-dialog-centered wui-rb-dialog`},F(`div`,{class:`modal-content wui-modal`}))),i.append(a),document.body.appendChild(i),i}var Um=e=>F(`div`,{class:`wui-modal-header`},F(`div`,{class:`wui-modal-heading`},F(`div`,{class:`wui-modal-headtext`},F(`div`,{class:`wui-modal-title`},e))),bm()),Wm=e=>F(`div`,{class:`modal-content wui-modal`,"aria-busy":`true`},Um(e),F(`div`,{class:`wui-modal-body`},F(`div`,{class:`wui-modal-loading`,role:`status`},F(`span`,{class:`visually-hidden`},X().loadingLabel),F(`div`,{class:`skeleton wui-modal-skeleton`}),F(`div`,{class:`skeleton wui-modal-skeleton`}),F(`div`,{class:`skeleton wui-modal-skeleton wui-modal-skeleton--short`})))),Gm=(e,t)=>{let n={forbidden:X().forbiddenMessage,client:X().clientMessage,server:X().serverMessage,network:X().networkMessage,timeout:X().timeoutMessage};return F(`div`,{class:`modal-content wui-modal`,"data-wui-modal-error":t},Um(e),F(`div`,{class:`wui-modal-body`},F(`div`,{class:`wui-modal-state`,role:`alert`},F(`p`,{class:`wui-modal-state-title`},X().errorTitle),F(`p`,{class:`wui-modal-state-text`},n[t]||X().serverMessage),F(`div`,{class:`wui-modal-state-actions`},F(`button`,{type:`button`,class:ol(`primary`,`soft`,`md`),"data-wui-dismiss":!0,"data-wui":nl},X().closeLabel),F(`button`,{type:`button`,class:ol(`primary`,`solid`,`md`),"data-wui-modal-retry":!0,"data-wui":nl},X().retryLabel)))))},Km=e=>Z(e.shell,`.modal-content`),qm=e=>Le(e.cloneNode(!0),HTMLElement,`a card copy is not an element`);function Jm(e){e&&e.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0}))}function Ym(e,t){let n=Km(e),r=n?Zm(n):new Map;Jm(n),n?n.replaceWith(t):Vm(e).appendChild(t),Qm(t,r),rm().refresh()}var Xm=`input[type="file"][name]`;function Zm(e){let t=new Map;for(let n of e.querySelectorAll(Xm)){if(!(n instanceof HTMLInputElement))continue;let e=n.files;e&&e.length>0&&t.set(n.name,[...e])}return t}function Qm(e,t){if(t.size!==0&&typeof DataTransfer<`u`)for(let n of e.querySelectorAll(Xm)){if(!(n instanceof HTMLInputElement))continue;let e=t.get(n.name);if(!e)continue;let r=new DataTransfer;for(let t of e)r.items.add(t);n.files=r.files,n.dispatchEvent(new Event(`change`,{bubbles:!0}))}}var $m=e=>Lm(e)?!e.shell.hidden:e.host.hasAttribute(`open`);function eh(e,t,n=!1){let r=t?Z(e,hm):null,i=r?r.matches(pm)?r:Z(r,pm)||r:null;if(!i&&n)i=Z(e,`[data-autofocus]`)||Z(e,mm)||Z(e,`.wui-modal-close`);else if(!i){let t=Tm(e,pm);i=Z(e,`[data-autofocus]`)||t.find(e=>!e.classList.contains(`wui-modal-close`))||t[0]||e}r?i?.focus?.():i?.focus?.({preventScroll:!0})}function th(e,t){let n=Z(e.shell,`[data-wui-modal-live]`);n||(n=document.createElement(`div`),n.className=`visually-hidden`,n.setAttribute(`aria-live`,`assertive`),n.setAttribute(`data-wui-modal-live`,``),Vm(e).appendChild(n)),n.textContent=``,n.textContent=t}var nh=e=>{let t=Z(e.shell,`[data-wui-modal-live]`);t&&(t.textContent=``)},rh=(e,t,n)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))};function ih(e,t,n,r){let i={...r,container:e.container};rh(t,`wui:modal:${n}`,i),Im(e)&&rh(t,`wui:drawer:${n}`,i),Lm(e)&&rh(t,`wui:pane:${n}`,i)}var ah=e=>e.matches(`[data-wui-pane-host]`)?`pane`:wm(e,`dialog`,`a dialog`).classList.contains(`wui-remote-drawer`)?`drawer`:`modal`,oh=e=>Cm(e.host.closest(`wui-modal`),`a wui-modal host`);function sh(e){let t=xm.get(e);if(t)return t;let n=ah(e),r=n===`pane`?e:wm(e,`dialog`,`a dialog`),i=Km({shell:r}),a={host:e,shell:r,container:n,queue:Ma(),defaultSize:Mm(r),defaultLabel:r.getAttribute(`aria-label`),placeholder:i?qm(i):F(`div`,{class:`modal-content wui-modal`}),remoteUrl:e.getAttribute(`data-wui-remote-url`),cache:e.getAttribute(`data-wui-remote-cache`)===`true`,loadedUrl:null,session:null};return xm.set(e,a),e.addEventListener(`submit`,e=>kh(a,e)),e.addEventListener(`click`,e=>{Om(e.target,`[data-wui-modal-retry]`)&&a.session&&(e.preventDefault(),hh(a,a.session))}),Lm(a)&&e.addEventListener(`click`,t=>{let n=Om(t.target,ym);n&&e.contains(n)&&a.session&&lh(a,a.session,`dismissed`,null)}),e.addEventListener(`wui-modal-close`,t=>{t.target===e&&t instanceof CustomEvent&&Th(t.detail,`reason`)===`escape`&&e.querySelector(`form[data-wui-submitting]`)&&t.preventDefault()}),e.addEventListener(`wui-modal-closed`,t=>{t.target===e&&fh(a)}),e.addEventListener(`wui-modal-opened`,t=>{if(t.target!==e)return;let n=Km(a);a.session&&n?.matches(vm)&&!n.contains(document.activeElement)&&eh(n,!1,Rm(a))}),a.remoteUrl&&e.addEventListener(`wui-modal-open`,t=>{t.target===e&&ph(a,t)}),a}function ch(e,t,n){e.session&&(e.queue.abort(),e.session.resolveClosed({status:`dismissed`,detail:{replaced:!0}}));let r=()=>void 0,i=new Promise(e=>{r=e}),a={url:t,method:(n.method||`GET`).toUpperCase(),body:n.body,options:n,trigger:n.trigger||null,explicitSize:null,closing:null,resolveClosed:r,handle:{el:e.shell,closed:i,close:()=>lh(e,a,`dismissed`,null),reload:()=>hh(e,a)}};return e.session=a,a}function lh(e,t,n,r){e.session===t&&(t.closing={status:n,detail:r},Lm(e)?dh(e,t):uh(e))}function uh(e){let t=oh(e);t.dispatchEvent(new CustomEvent(`wui-modal-close`,{bubbles:!0,cancelable:!0,detail:{reason:`dismiss`}}))&&t.hide()}function dh(e,t){let n=e.shell,{status:r,detail:i}=Cm(t.closing,`the closing state`),a=n.contains(document.activeElement);e.queue.abort(),e.session=null,Jm(Km(e)),n.replaceChildren(),n.hidden=!0,n.removeAttribute(`data-open`),t.resolveClosed({status:r,detail:i}),ih(e,n,`closed`,{status:r,url:t.url}),a&&t.trigger?.isConnected&&t.trigger.focus?.()}function fh(e){let t=e.session;if(e.queue.abort(),e.session=null,nh(e),t){let n=t.closing||{status:`dismissed`,detail:null};t.resolveClosed({status:n.status,detail:n.detail}),ih(e,e.shell,`closed`,{status:n.status,url:t.url});let r=document.activeElement;t.trigger?.isConnected&&(!r||r===document.body||e.shell.contains(r))&&t.trigger.focus?.()}e.cache||(Ym(e,qm(e.placeholder)),e.loadedUrl=null,Nm(e.shell,e.defaultSize),e.defaultLabel?e.shell.setAttribute(`aria-label`,e.defaultLabel):e.shell.removeAttribute(`aria-label`))}function ph(e,t){let n=Th(t instanceof CustomEvent?t.detail:null,`trigger`),r=n instanceof HTMLElement?n:null,i=r?.getAttribute(`data-wui-url`)||e.remoteUrl||``,a=ch(e,i,{trigger:r});a.explicitSize=mh(e,r?.getAttribute(`data-wui-size`)),a.explicitSize&&Nm(e.shell,a.explicitSize),e.cache&&e.loadedUrl===i||(e.loadedUrl&&Ym(e,qm(e.placeholder)),hh(e,a,{keepPlaceholder:!0}))}function mh(e,t){try{return zm(e,t)}catch(e){return B(e),null}}async function hh(e,t,{keepPlaceholder:n=!1}={}){n||Ym(e,Wm(t.options.title||gh(e)));let r=await e.queue.run(t.url,{method:t.method,body:t.body,navigate:t.options.navigate,timeoutMs:fm(t.trigger)});if(e.session!==t||r.kind===`aborted`||r.kind===`stale`)return`aborted`;if(r.kind===`session`)return`session`;if(r.kind===`ok`&&bh(e,t,r.html,!1))return e.loadedUrl=t.url,ih(e,e.shell,`loaded`,{url:t.url,handle:t.handle}),`loaded`;let i=r.kind===`ok`||r.kind===`validation`?`server`:r.kind;return Ym(e,Gm(t.options.title||gh(e),i)),$m(e)&&eh(Cm(Km(e),`a card`),!1,Rm(e)),ih(e,e.shell,`error`,{url:t.url,kind:i,status:r.status}),`error`}var gh=e=>Km(e)?.querySelector(`.wui-modal-title`)?.textContent||e.shell.getAttribute(`aria-label`)||``,_h=`/_content/Webority.Ui.Razor/js/`,vh=e=>new URL(e,window.location.href).pathname.includes(_h);function yh(e){if([...document.scripts].some(t=>t.getAttribute(`src`)===e))return;let t=document.createElement(`script`);t.src=e,document.head.appendChild(t)}function bh(e,t,n,r){let i=Xl(n),a=!1;for(let e of i.querySelectorAll(`script`)){if(e.getAttribute(`type`)===`application/json`)continue;let t=e.getAttribute(`src`);e.remove(),t&&vh(t)?yh(t):a=!0}a&&Wr(`WUI.modal: ${t.url} returned a fragment with script; it was removed. Keep page behaviour in the page.`);let o=Z(i,vm);if(!o)return B(`WUI.modal: ${t.url} did not answer with an <app-modal-content> fragment.`),!1;if(Ym(e,o),r||nh(e),!Lm(e)){Nm(e.shell,t.explicitSize||mh(e,o.getAttribute(`data-wui-size`))||e.defaultSize);let n=o.getAttribute(`data-wui-title`);n&&e.shell.setAttribute(`aria-label`,n)}return $m(e)&&eh(o,r,Rm(e)),!0}var xh=`button[type="submit"], button:not([type]), input[type="submit"], input[type="image"]`;function Sh(e,t,n){let r=[...e.elements].filter(e=>e.matches(xh));if(n){e.setAttribute(`data-wui-submitting`,``);let n=t&&r.includes(t)?t:r[0];for(let e of r)e.toggleAttribute(`data-wui-was-disabled`,e.disabled),e.disabled=!0;n&&(n.classList.add(`is-loading`),n.setAttribute(`aria-busy`,`true`),n.tagName===`BUTTON`&&n.prepend(F(`span`,{class:`spinner-border spinner-border-sm me-2`,"aria-hidden":`true`,"data-wui-submit-spinner":!0})))}else{e.removeAttribute(`data-wui-submitting`);for(let e of r)e.disabled=e.hasAttribute(`data-wui-was-disabled`),e.removeAttribute(`data-wui-was-disabled`),e.classList.remove(`is-loading`),e.removeAttribute(`aria-busy`),e.querySelector(`[data-wui-submit-spinner]`)?.remove()}}function Ch(e){for(let t of e.querySelectorAll(_m))t.remove();for(let t of e.querySelectorAll(hm))t.removeAttribute(`aria-invalid`),t.classList.remove(`is-invalid`,`input-validation-error`);for(let t of e.querySelectorAll(`.field-error`))t.textContent=``}var wh=new Set(`bad request.unauthorized.payment required.forbidden.not found.method not allowed.not acceptable.proxy authentication required.request timeout.conflict.gone.length required.precondition failed.payload too large.uri too long.unsupported media type.range not satisfiable.expectation failed.misdirected request.unprocessable content.unprocessable entity.locked.failed dependency.too early.upgrade required.precondition required.too many requests.request header fields too large.unavailable for legal reasons`.split(`.`)),Th=(e,t)=>{if(typeof e==`object`&&e&&t in e)return Reflect.get(e,t)};async function Eh(e){if(!e||e.status<400||e.status>499||!e.headers.get(`content-type`)?.toLowerCase().includes(`json`))return null;let t;try{t=JSON.parse(await e.text())}catch{return null}let n=e=>typeof e==`string`?e.trim():``,r=n(Th(t,`title`)),i=(e.statusText||``).trim().toLowerCase(),a=wh.has(r.toLowerCase())||r.toLowerCase()===i;return n(Th(t,`message`))||n(Th(t,`detail`))||(r&&!a?r:null)}function Dh(e,t,n,r){let i={forbidden:X().forbiddenMessage,client:X().clientMessage,server:X().serverMessage,network:X().networkMessage,timeout:X().timeoutMessage},a=t.closest(`.wui-modal-body`)||t;a.querySelector(`[data-wui-modal-submit-error]`)?.remove(),Ch(a);let o=document.createElement(`div`);o.className=`alert alert-danger wui-modal-submit-error`,o.setAttribute(`role`,`alert`),o.setAttribute(`data-wui-modal-submit-error`,``),o.textContent=`${X().submitFailedMessage} ${r||i[n]||X().serverMessage}`,a.prepend(o),th(e,o.textContent)}var Oh=(e,t)=>{let n=new URL(e,window.location.href);for(let[e,r]of t)typeof r==`string`&&n.searchParams.append(e,r);return n.origin===window.location.origin?n.pathname+n.search:n.href};async function kh(e,t){let n=t.target,r=e.session;if(!(n instanceof HTMLFormElement)||!r||n.hasAttribute(`data-wui-native`)||!n.closest(vm)||(t.preventDefault(),n.hasAttribute(`data-wui-submitting`)))return;let i=`submitter`in t&&(t.submitter instanceof HTMLButtonElement||t.submitter instanceof HTMLInputElement)?t.submitter:null,a=i?.getAttribute(`formaction`)||n.getAttribute(`action`)||r.url,o=(i?.getAttribute(`formmethod`)||n.getAttribute(`method`)||`GET`).toUpperCase(),s=new FormData(n);i?.name&&!s.has(i.name)&&s.append(i.name,i.value);let c=o===`GET`;Sh(n,i,!0);let l;try{l=await e.queue.run(c?Oh(a,s):a,{method:o,body:c?void 0:s,navigate:r.options.navigate,timeoutMs:fm(r.trigger)})}catch(t){B(t),e.session===r&&n.isConnected&&(Sh(n,i,!1),Dh(e,n,`server`,null));return}if(e.session!==r)return;if(n.isConnected&&Sh(n,i,!1),l.kind===`ok`&&l.result===`success`){Ah(e,r,l);return}if(l.kind===`aborted`||l.kind===`stale`||l.kind===`session`)return;if(l.kind===`ok`&&l.html){let t=l.result===gm;if(bh(e,r,l.html,t)){if(t){let t=Cm(Km(e),`a card`).querySelector(_m)?.textContent?.replace(/\s+/g,` `).trim();th(e,t||X().invalidMessage)}return}}let u=l.kind===`ok`||l.kind===`validation`?`server`:l.kind,d=await Eh(l.response);e.session===r&&Dh(e,n,u,d)}function Ah(e,t,n){let r=n.message,i=n.redirect||null,a=n.toastVariant||`success`;if(!Uh(a))throw TypeError(`Unknown toast variant "${a}". Use ${Hh.join(`, `)}.`);let o={url:t.url,trigger:t.trigger,handle:t.handle,message:r,redirect:i,data:n.data??null,container:e.container};i&&!t.options.navigate?dg(r,a):r&&rm().toast(r,{variant:a}),ih(e,t.trigger?.isConnected?t.trigger:document,`success`,o),t.options.onSuccess?.(o,t.handle),i&&(t.options.navigate||(e=>window.location.assign(e)))(i);let s=n.next;s&&!i?(t.url=s,t.method=`GET`,t.body=void 0,hh(e,t)):n.keepOpen?n.html&&bh(e,t,n.html,!1):lh(e,t,`success`,o)}function jh(e){let t=Om(e.target,`[data-wui-modal], [data-wui-drawer], [data-wui-pane]`);t&&(t.matches(`a[href]`)&&(e.ctrlKey||e.metaKey||e.shiftKey||e.button!==0)||(e.preventDefault(),t.hasAttribute(`data-wui-pane`)?Rh(t.getAttribute(`data-wui-pane`)??``,{target:t.getAttribute(`data-wui-pane-target`),trigger:t}).catch(e=>{Dm(e)||B(e)}):t.hasAttribute(`data-wui-modal`)?Ph(t.getAttribute(`data-wui-modal`)??``,{size:t.getAttribute(`data-wui-size`)||void 0,title:t.getAttribute(`data-wui-title`)||void 0,trigger:t}).catch(e=>{Dm(e)||B(e)}):Ih(t.getAttribute(`data-wui-drawer`)??``,{size:t.getAttribute(`data-wui-drawer-size`)||void 0,title:t.getAttribute(`data-wui-title`)||void 0,trigger:t}).catch(e=>{Dm(e)||B(e)})))}function Mh(e){if(e.key!==`Escape`||e.defaultPrevented)return;let t=Om(e.target,Lh);if(!t)return;let n=xm.get(t),r=e.currentTarget;n?.session&&r instanceof Document&&!r.querySelector(`wui-modal[open]`)&&(t.querySelector(`form[data-wui-submitting]`)||(e.preventDefault(),lh(n,n.session,`dismissed`,null)))}function Nh(e=document){let t=e instanceof Document?e:Cm(e.ownerDocument,`an owner document`);Sm.has(t)||(Sm.add(t),t.addEventListener(`click`,jh),t.addEventListener(`keydown`,Mh));let n=Tm(e,`wui-modal[data-wui-remote-url]`);e instanceof HTMLElement&&e.matches(`wui-modal[data-wui-remote-url]`)&&n.unshift(e);for(let e of n)sh(e)}function Ph(e,t={}){try{if(!e)throw TypeError(`WUI.modal.load: a fragment url is required.`);let n=t.container===`drawer`,r=n?Fm(t.size):jm(t.size),i=t.placement||`center`;if(!Pm.includes(i))throw TypeError(`WUI.modal.load: unsupported placement "${i}". Use center or top.`);if(t.signal?.aborted)return Promise.reject(Em());let a=Hm(n?`drawer`:`modal`);Nh(document);let o=sh(a),s=$m(o),c=ch(o,e,t);c.explicitSize=r,Nm(o.shell,r||o.defaultSize),n||wm(o.shell,`.modal-dialog`,`a dialog frame`).classList.toggle(`modal-dialog-centered`,i===`center`),t.title&&o.shell.setAttribute(`aria-label`,t.title),s||(a.toggleAttribute(`static`,t.staticBackdrop!==!1),a.toggleAttribute(`no-escape`,t.closeOnEscape===!1));let l=s?Promise.resolve():new Promise(e=>a.addEventListener(`wui-modal-opened`,()=>e(),{once:!0})),u=hh(o,c);return s||oh(o).show(),Fh(o,c,t,l,u,`WUI.modal.load`)}catch(e){return Promise.reject(e)}}function Fh(e,t,n,r,i,a){let o=new Promise((r,i)=>{n.signal?.addEventListener(`abort`,()=>{e.session===t&&(e.queue.abort(),lh(e,t,`dismissed`,{aborted:!0})),i(Em())},{once:!0})}),s=Promise.all([r,i]).then(([,e])=>{if(e===`aborted`)throw Em();if(e===`session`)throw Error(`${a}(${t.url}): the session expired; the browser is signing in again.`);return t.handle});return Promise.race([s,o])}function Ih(e,t={}){return Ph(e,{...t,container:`drawer`,placement:void 0})}var Lh=`[data-wui-pane-host]`;function Rh(e,t={}){try{if(!e)throw TypeError(`WUI.pane.load: a fragment url is required.`);let n=Bm(t.target);if(!n)throw TypeError(`WUI.pane.load: the target is not an <app-detail-pane>.`);if(t.signal?.aborted)return Promise.reject(Em());Nh(document);let r=sh(n),i=ch(r,e,t);n.hidden=!1,n.setAttribute(`data-open`,``);let a=hh(r,i);return Fh(r,i,t,Promise.resolve(),a,`WUI.pane.load`)}catch(e){return Promise.reject(e)}}function zh(e){let t=Bm(e);if(!t)throw TypeError(`WUI.pane.close: the target is not an <app-detail-pane>.`);let n=xm.get(t);n?.session&&lh(n,n.session,`dismissed`,null)}var Bh=`wuiConfirm`,Vh=Object.freeze([`danger`]),Hh=Object.freeze([`success`,`info`,`warning`,`danger`]),Uh=e=>Hh.some(t=>t===e),Wh=`wui.flash`,Gh=()=>I(`confirmDialog`,Ap),Kh=new WeakSet,qh=new WeakSet,Jh=null,Yh=null,Xh=!1,Zh=(e,t)=>{e&&rm().toast(e,{variant:t})};function Qh(){let e=document.getElementById(Bh);if(e)return N(e.closest(`wui-modal`),`#${Bh} must be a wui-modal.`);let t=document.createElement(`wui-modal`);t.id=Bh;let n=document.createElement(`dialog`);return n.className=`modal wui-modal-shell`,n.style.setProperty(`--wui-modal-max-width`,`${dm.md}px`),n.replaceChildren(F(`div`,{class:`modal-dialog modal-dialog-centered wui-rb-dialog`},F(`div`,{class:`modal-content wui-modal wui-confirm`},F(`div`,{class:`wui-modal-body`},F(`div`,{class:`wui-confirm-content`},F(`span`,{class:`wui-confirm-icon`},F(`wui-status-icon`,{tone:`info`,size:120})),F(`h3`,{class:`wui-confirm-title`,tabindex:-1,"data-autofocus":``}),F(`p`,{class:`wui-confirm-msg`}))),F(`div`,{class:`wui-modal-footer`},F(`div`,{class:`wui-confirm-actions`},F(`button`,{type:`button`,class:ol(`primary`,`soft`,`md`),"data-wui-dismiss":``,"data-wui":nl},Gh().cancelLabel),F(`button`,{type:`button`,class:ol(`primary`,`solid`,`md`),"data-app-confirm":``,"data-wui":nl})))))),t.append(n),document.body.appendChild(t),t}function $h(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!Vh.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);eg({title:e.getAttribute(`data-wui-confirm-title`),message:e.getAttribute(`data-wui-confirm`),label:e.getAttribute(`data-wui-confirm-label`),danger:n===`danger`},t)}function eg({title:e,message:t,label:n,danger:r},i){let a=Qh(),o=a.querySelector(`.wui-confirm-title`),s=a.querySelector(`[data-app-confirm]`);if(!o||!s)throw Error(`#${Bh} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${Bh}"> without confirm-href, or leave the dialog to the library.`);let c=a.querySelector(`.wui-confirm-msg`);c||(c=document.createElement(`p`),c.className=`wui-confirm-msg`,o.after(c));let l=e||Gh().confirmTitle;o.textContent=l,c.textContent=t,s.textContent=n||Gh().confirmLabel,s.classList.toggle(`btn-danger`,r),s.classList.toggle(`btn-primary`,!r),a.querySelector(`wui-status-icon`)?.setAttribute(`tone`,r?`delete`:`info`),N(a.querySelector(`dialog`),`#${Bh} has no <dialog>.`).setAttribute(`aria-label`,l),Yh=i,Xh=!1,a.show()}var tg=(e,t)=>{Jh=e;try{t()}finally{Jh=null}},ng=(e,t)=>{let n=Reflect.get(e,t);if(n===void 0||typeof n==`string`)return n;throw TypeError(`confirmAction: ${t} must be text.`)},rg=e=>{if(typeof e!=`object`||!e)throw TypeError(`confirmAction: options must be an object with a message.`);let t=`message`in e?e.message:void 0;if(typeof t!=`string`)throw TypeError(`confirmAction: message must be text.`);return{title:ng(e,`title`),message:t,label:ng(e,`label`),tone:ng(e,`tone`)}};function ig(e,t,n){let{title:r,message:i,label:a,tone:o}=rg(t);if(o!=null&&!Vh.includes(o))throw TypeError(`confirmAction: tone "${o}" is not supported. Use danger, or leave it off.`);Dg(e.ownerDocument),eg({title:r,message:i,label:a,danger:o===`danger`},()=>tg(e,n))}var ag=e=>`disabled`in e&&e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`,og=e=>{Le(e,HTMLElement,`data-wui-confirm needs an HTML element to click.`).click()};function sg(e){let t=P(e.target,`[data-wui-confirm]:not(form)`);t&&t!==Jh&&!ag(t)&&(e.preventDefault(),e.stopImmediatePropagation(),$h(t,()=>tg(t,()=>og(t))))}function cg(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===Jh||e.submitter&&e.submitter===Jh||t.querySelector(`input[data-app-repeater-hidden]`))return;e.preventDefault(),e.stopImmediatePropagation();let n=e.submitter instanceof HTMLButtonElement||e.submitter instanceof HTMLInputElement?e.submitter:null,r=n?.form===t?n:void 0;$h(t,()=>tg(t,()=>t.requestSubmit(r)))}function lg(e){let t=P(e.target,`#${Bh} [data-app-confirm]`);t&&!t.hasAttribute(`disabled`)&&Yh&&(Xh=!0,N(t.closest(`wui-modal`),`#${Bh} is missing around its confirm button.`).hide())}function ug(e){if(!(e.target instanceof Element)||e.target.id!==`wuiConfirm`)return;let t=Xh?Yh:null;Yh=null,Xh=!1,t?.()}function dg(e,t){e&&window.sessionStorage.setItem(Wh,JSON.stringify({message:e,variant:t}))}var fg=e=>e===`forbidden`?Gh().forbiddenMessage:e===`network`?Gh().networkMessage:e===`timeout`?Gh().timeoutMessage:Gh().failedMessage;function pg(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.getAttribute(`data-refresh-on-success`)!==`false`&&Xp(e)?.reload()}var mg=(e,t)=>{`disabled`in e&&(e.disabled=t)};async function hg(e){let t=e.getAttribute(`data-wui-post`);if(!t)throw Error(`A data-wui-post button needs the URL the action posts to.`);return gg(t,e)}async function gg(e,t,n){let r=t.getAttribute(`data-wui-post-reload`);if(r!==null&&r!==`page`)throw TypeError(`data-wui-post-reload="${r}" is not supported. Use page, or leave it off to reload the server tables.`);mg(t,!0),t.setAttribute(`aria-busy`,`true`);let i=await ja(e,{method:`POST`,body:n,timeoutMs:ka(t.getAttribute(`data-wui-timeout`))??3e4});if(i.kind===`session`||i.kind===`aborted`)return;let a=i.toastVariant||`success`;i.ok&&(i.redirect||r===`page`)?(dg(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload()):(mg(t,!1),t.removeAttribute(`aria-busy`),i.ok?(im(i,a),pg()):Zh(i.message||fg(i.kind),`danger`))}function _g(e,t){mg(e,!1),e.removeAttribute(`aria-busy`),B(t),Zh(Gh().failedMessage,`danger`)}function vg(e){let t=P(e.target,`[data-wui-post]`);t&&(e.preventDefault(),ag(t)||t.getAttribute(`aria-busy`)===`true`||hg(t).catch(e=>_g(t,e)))}function yg(e){let t=P(e.target,`form[data-wui-post-form]`);if(!(t instanceof HTMLFormElement)||e.defaultPrevented)return;e.preventDefault();let n=N(e.submitter||t.querySelector(`button:not(.repeater-add):not(.repeater-remove)`),`A data-wui-post-form needs a submit button to report its result on.`);if(n.getAttribute(`aria-busy`)===`true`)return;let r=new URL(N(t.getAttribute(`action`),`A data-wui-post-form needs an action attribute to post to.`),document.baseURI).href;gg(r,n,new FormData(t)).catch(e=>_g(n,e)),t.closest(`wui-dropdown`)?.hide()}var bg=(e,t)=>{e.disabled=!1,e.removeAttribute(`aria-busy`),t&&Mr(t,null)};async function xg(e,t){let n=e.dataset.url;if(!n)throw Error(`A data-wui-row-action button needs data-url: the handler the action posts to.`);e.disabled=!0,e.setAttribute(`aria-busy`,`true`),t&&Mr(t,`saving`);let r=ka(e.getAttribute(`data-wui-timeout`))??3e4,i=await ja(n,{method:(e.dataset.method||`post`).toUpperCase(),timeoutMs:r});if(i.kind===`session`)return;if(i.kind===`aborted`){bg(e,t);return}if(i.ok){dg(i.message,i.toastVariant||`success`),i.redirect?window.location.assign(i.redirect):window.location.reload();return}let a=i.message||fg(i.kind);e.disabled=!1,e.removeAttribute(`aria-busy`),t&&Mr(t,`error`,a),Zh(a,`danger`)}function Sg(e){let t=P(e.target,`[data-wui-row-action]`);if(!(t instanceof HTMLButtonElement)||t.closest(`[data-wui-server]`)||(e.preventDefault(),t.disabled||t.getAttribute(`aria-busy`)===`true`))return;let n=t.closest(`tr`);xg(t,n).catch(e=>{bg(t,n),B(e),Zh(Gh().failedMessage,`danger`)})}function Cg(){let e=window.sessionStorage.getItem(Wh);if(!e)return;window.sessionStorage.removeItem(Wh);let t=JSON.parse(e);if(typeof t!=`object`||!t)throw TypeError(`stored flash is not an object.`);let n=`message`in t?t.message:void 0,r=`variant`in t?t.variant:void 0;if(typeof r!=`string`||!Uh(r))throw TypeError(`stored flash variant "${String(r)}" is not supported.`);if(typeof n!=`string`)throw TypeError(`stored flash message is not text.`);Zh(n,r)}function wg(e){let t=e.querySelectorAll?[...e.querySelectorAll(`[data-wui-flash]`)]:[];e instanceof Element&&e.matches(`[data-wui-flash]`)&&t.unshift(e);for(let e of t){let t=e.getAttribute(`data-wui-flash-variant`)||`success`;if(!Uh(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${Hh.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||(e.textContent??``).trim();e.remove(),Zh(n,t)}}var Tg=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.form:null;function Eg(e){if(!(e.target instanceof Element))return;let t=e.target.closest(`[data-wui-auto-submit]`);if(!t)return;let n=Tg(e.target)||t.closest(`form`);n instanceof HTMLFormElement&&n.requestSubmit()}function Dg(e){qh.has(e)||(qh.add(e),e.addEventListener(`click`,lg),e.addEventListener(`wui-modal-closed`,ug))}function Og(e=document){let t=e instanceof Element?e.ownerDocument:e;Kh.has(t)||(Kh.add(t),t.addEventListener(`click`,sg,!0),t.addEventListener(`submit`,cg,!0),Dg(t),t.addEventListener(`click`,vg),t.addEventListener(`click`,Sg),t.addEventListener(`submit`,yg),t.addEventListener(`change`,Eg),Cg()),wg(e)}var kg=()=>I(`unsavedChanges`,kp),Ag=`form[data-wui-unsaved]`,jg=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,Mg=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,Ng=new Set([`submit`,`button`,`reset`,`image`]),Pg=new Set([`hidden`,`checkbox`,`radio`,`file`,`submit`,`button`,`reset`,`image`,`range`,`color`]),Fg=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,Ig=e=>Fg(e)?e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled:`disabled`in e&&!!e.disabled,Lg=e=>`name`in e&&typeof e.name==`string`&&e.name!==``,Rg=e=>typeof e==`object`&&!!e,zg=e=>Array.isArray(e)&&e.every(e=>Array.isArray(e)&&typeof e[0]==`string`);function Bg(e){let t=JSON.parse(e);if(!zg(t))throw Error(`unsaved-changes snapshot is malformed`);return t}var Vg=new WeakMap,Hg=new WeakSet,Ug=e=>`${e.name}:${e.size}:${e.lastModified}`,Wg=e=>[...e.querySelectorAll(Ag)].filter(e=>e instanceof HTMLFormElement);function Gg(e){let t=[];for(let n of e.elements)Lg(n)&&!Ig(n)&&(Fg(n)&&Ng.has(n.type)||(n instanceof HTMLInputElement&&(n.type===`checkbox`||n.type===`radio`)?t.push([n.name,n.value,n.checked]):n instanceof HTMLInputElement&&n.type===`file`?t.push([n.name,[...n.files||[]].map(Ug)]):n instanceof HTMLSelectElement&&n.type===`select-multiple`?t.push([n.name,[...n.selectedOptions].map(e=>e.value)]):n instanceof HTMLFieldSetElement||n instanceof HTMLObjectElement?t.push([n.name,null]):t.push([n.name,`value`in n?n.value:null])));return JSON.stringify(t)}function Kg(e){return Gg(e)}function qg(e,t){let n=new Map,r=Bg(t);for(let e of r){let t=n.get(e[0]);t?t.push(e):n.set(e[0],[e])}let i=Bg(Gg(e)).map(e=>n.get(e[0])?.shift()??e);for(let e of n.values())i.push(...e);return JSON.stringify(i)}function Jg(e){for(let t of e.elements)if(Fg(t)&&t.name&&!Ig(t)){if(t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!Pg.has(t.type)){if(t.value.trim()!==``)return!0}else if(t instanceof HTMLInputElement&&t.type===`file`&&(t.files?.length??0)>0)return!0}return!1}var Yg=e=>({saved:e.querySelector(jg)&&Jg(e)?null:Gg(e),engaged:!1,discarded:!1});function Xg(e){let t=Vg.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&Gg(e)!==t.saved}var Zg=(e,t)=>Wg(e).filter(e=>e!==t&&Xg(e));function Qg(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||kg().message;ig(e,{title:kg().title,message:r,label:kg().leaveLabel,tone:`danger`},()=>{for(let e of t){let t=Vg.get(e);t&&(t.discarded=!0)}n()})}function $g(e){if(e.matches(Mg))return!1;let t=e.getAttribute(`target`);if(t&&t.toLowerCase()!==`_self`)return!1;let n=e.getAttribute(`href`);if(n===null)return!1;let r=new URL(n,window.location.href);if(r.protocol!==`http:`&&r.protocol!==`https:`)return!1;let i=window.location;return!(r.hash&&r.origin===i.origin&&r.pathname===i.pathname&&r.search===i.search)}function e_(e,t){if((t?.getAttribute(`formmethod`)||e.getAttribute(`method`)||`get`).toLowerCase()===`dialog`)return!1;let n=t?.getAttribute(`formtarget`)||e.getAttribute(`target`);return!n||n.toLowerCase()===`_self`}function t_(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target,n=P(t,`a[href]`);if(!(n instanceof HTMLAnchorElement)||!$g(n))return;let r=Zg(n.ownerDocument,null);r.length&&(e.preventDefault(),Qg(n,r,()=>n.click()))}function n_(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!e_(t,e.submitter))return;let n=Zg(t.ownerDocument,t);if(n.length){e.preventDefault();let r=e.submitter,i=(r instanceof HTMLButtonElement||r instanceof HTMLInputElement)&&r.form===t?r:void 0;Qg(t,n,()=>t.requestSubmit(i));return}let r=Vg.get(t);r&&(r.saved=Gg(t),r.discarded=!1)}function r_(e){Zg(document,null).length&&(e.preventDefault(),e.returnValue=``)}function i_(e){let t=e.target,n=P(t,Ag);return n instanceof HTMLFormElement?n:null}function a_(e){let t=i_(e);if(!t)return;let n=Vg.get(t);n&&!n.engaged&&(n.saved!==null&&(n.saved=Gg(t)),n.engaged=!0)}function o_(e){let t=i_(e),n=t&&Vg.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function s_(e){for(let t of Wg(e)){let e=Vg.get(t);e?.saved&&(e.saved=qg(t,e.saved))}}function c_(e){let t=Rg(e)?e.handle:void 0;return Rg(t)?t.el:void 0}function l_(e){if(!(e instanceof CustomEvent))return;let t=c_(e.detail);if(t instanceof Element)for(let e of Wg(t))d_(e)}function u_(e=document){let t=e instanceof Document?e:e.ownerDocument;if(!Hg.has(t)){Hg.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,a_,!0);for(let e of[`input`,`change`])t.addEventListener(e,o_,!0);t.addEventListener(`click`,t_),t.addEventListener(`submit`,n_),t.addEventListener(`wui:modal:success`,l_),t.addEventListener(Qr,()=>s_(t)),N(t.defaultView,`unsaved-changes guard needs a document with a window`).addEventListener(`beforeunload`,r_)}let n=Wg(e);e instanceof HTMLFormElement&&e.matches(Ag)&&n.unshift(e);for(let e of n)Vg.has(e)||Vg.set(e,Yg(e))}function d_(e){if(!(e instanceof HTMLFormElement)||!e.matches(Ag))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);Vg.set(e,{saved:Gg(e),engaged:!1,discarded:!1})}var f_=()=>I(`drawer`,vu),p_=`wui:drawer:discard`,m_=`wui-drawer[confirm-discard]`,h_=`wui-modal`,g_=`data-wui-no-discard`,__=`.wui-drawer-discard`,v_=`input, select, textarea`,y_=e=>typeof e==`object`&&!!e||typeof e==`function`;function b_(e){let t=e.currentTarget;if(!(t instanceof Document))throw Error(`The discard guard is not wired on a document.`);return t}function x_(e,t){return P(e,t)}var S_=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement,C_=new WeakMap,w_=new WeakSet,T_=new WeakSet;function E_(e,t,n,r,i){let a=e.createElement(`button`);return a.type=`button`,a.className=ol(t,n,`sm`),a.dataset.wui=nl,a.setAttribute(r,``),a.textContent=i,a}function D_(e,t){let n=e.createElement(`div`);n.className=`wui-drawer-discard`,n.setAttribute(`role`,`alert`);let r=e.createElement(`span`);return r.className=`wui-drawer-discard-text`,r.textContent=t,n.append(r,E_(e,`danger`,`solid`,`data-wui-discard-confirm`,f_().discardLabel),E_(e,`primary`,`soft`,`data-wui-discard-keep`,f_().keepLabel)),n}function O_(e){if(!(e instanceof Element))return null;let t=e.closest(m_);if(t)return t;let n=e.closest(h_);return n&&j_(n).length?n:null}function k_(e){return e.closest(m_)??e.closest(h_)}function A_(e,t){return t.hasAttribute(g_)||e.hasAttribute(g_)?!1:t.hasAttribute(`confirm-discard`)||e.hasAttribute(`data-wui-confirm-discard`)?!0:(e.getAttribute(`method`)||`get`).toLowerCase()!==`get`}function j_(e){return e.matches(m_)?e.querySelectorAll(`form`):[...e.querySelectorAll(`form`)].filter(t=>A_(t,e))}function M_(e){let t=C_.get(e);return t!=null&&Kg(e)!==t}function N_(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,N(e.querySelector(`.wui-drawer-panel`),`The drawer has no panel to hold its footer.`).append(t),T_.add(t),t}function P_(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-modal-footer`,(e.querySelector(`.wui-modal-body`)?.parentElement??e.querySelector(`.modal-content`)??e).append(t),T_.add(t),t}function F_(e){let t=e.querySelector(`[data-wui-discard-confirm]`);if(!(t instanceof HTMLElement))throw Error(`The discard prompt has no confirm button.`);t.focus()}function I_(e,t,n){let r=e.querySelector(__);if(r){F_(r);return}let i=D_(e.ownerDocument,t),a;if(e.matches(m_))a=e.querySelector(`.wui-drawer-footer`)??N_(e),a.prepend(i);else if(e.hasAttribute(`confirm-discard`))a=e.querySelector(`.wui-modal-footer`)??P_(e),a.prepend(i);else{if(!n)throw Error(`A discard prompt needs the form that is dirty.`);a=n.querySelector(`.modal-footer`)??e.querySelector(`.wui-modal-footer`)??P_(e),a.prepend(i)}a.classList.add(`wui-drawer-discarding`),F_(i)}function L_(e){let t=e.parentElement;if(e.remove(),!t)throw Error(`The discard prompt has no footer.`);t.classList.remove(`wui-drawer-discarding`),T_.has(t)&&t.remove()}function R_(e){for(let t of j_(e))for(let e of t.querySelectorAll(v_))if(S_(e)&&e.type!==`hidden`&&!e.disabled){e.focus({preventScroll:!0});return}}function z_(e){let t=O_(e.target);if(t)for(let e of j_(t))C_.get(e)??C_.set(e,Kg(e))}function B_(e){for(let t of b_(e).querySelectorAll(`form`)){let e=C_.get(t);e!=null&&C_.set(t,qg(t,e))}}function V_(e){let t=e.target;t instanceof HTMLFormElement&&O_(t)&&C_.set(t,Kg(t))}function H_(e){if(!y_(e))return;let t=`handle`in e?e.handle:void 0;if(y_(t))return`el`in t?t.el:void 0}function U_(e){if(!(e instanceof CustomEvent))return;let t=e.detail,n=H_(t);if(n instanceof Element)for(let e of n.querySelectorAll(`form`))C_.delete(e)}function W_(e){let t=e.target;t instanceof Element&&t.matches(m_)&&[...j_(t)].some(M_)&&(e.preventDefault(),I_(t,t.getAttribute(`confirm-discard`),null))}function G_(e){let t=e.target;if(!(t instanceof Element)||!t.matches(h_))return;let n=[...j_(t)].find(M_);n&&(e.preventDefault(),I_(t,n.getAttribute(`data-wui-confirm-discard`)??t.getAttribute(`confirm-discard`)??f_().confirmDiscard,n))}function K_(e){let t=N(e.closest(__),`The discard button is outside its prompt.`),n=k_(t);if(L_(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);for(let e of j_(n))C_.set(e,Kg(e));n.dispatchEvent(new CustomEvent(p_,{bubbles:!0})),n.matches(m_)?N(n.closest(`wui-drawer`),`The confirm-discard drawer is not a wui-drawer.`).hide():N(n.closest(`wui-modal`),`The discarded dialog is not a wui-modal.`).hide()}function q_(e){let t=N(e.closest(__),`The keep button is outside its prompt.`),n=k_(t);if(L_(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);R_(n)}function J_(e){let t=x_(e.target,`[data-wui-discard-confirm]`);if(t){K_(t);return}let n=x_(e.target,`[data-wui-discard-keep]`);n&&q_(n)}function Y_(e=document){let t=e instanceof Document?e:e.ownerDocument;w_.has(t)||(w_.add(t),t.addEventListener(`focusin`,z_),t.addEventListener(`pointerdown`,z_),t.addEventListener(`submit`,V_),t.addEventListener(Qr,B_),t.addEventListener(`wui:modal:success`,U_),t.addEventListener(`wui:modal:loaded`,U_),t.addEventListener(`wui-drawer-close`,W_,!0),t.addEventListener(`wui-modal-close`,G_),t.addEventListener(`click`,J_))}var X_={accountMenuLabel:`Account menu for {name}`,collapseNavLabel:`Collapse navigation`,emptyText:`You are all caught up.`,expandNavLabel:`Expand navigation`,label:`Notifications`,loadingNotificationsText:`Loading…`,logoutLabel:`Sign out`,markAllReadLabel:`Mark all read`,moreLabel:`More`,navLabel:`Main navigation`,newLabel:`New`,noResultsForText:`No results for “{value}”`,noResultsText:`No results`,noUnreadText:`No unread notifications`,notificationsLoadErrorMessage:`Could not load notifications.`,openNavLabel:`Open navigation`,placeholder:`Search`,profileLabel:`My profile`,resultCountText:`{count} result`,resultsCountText:`{count} results`,retryLabel:`Retry`,roleLabel:`Role:`,rolesLabel:`Roles:`,searchResultsLabel:`Search results`,searchUnavailableMessage:`Search is unavailable right now.`,seeAllResultsForText:`See all results for “{query}”`,skipLabel:`Skip to content`,tabBarLabel:`Quick navigation`,togglePagesLabel:`Show or hide {name} pages`,unreadBellLabel:`{label}, {count} unread`,unreadLabel:`Unread`,unreadNotificationsText:`{count} unread notifications`,viewAllLabel:`View all`},Q=()=>I(`shell`,X_),Z_=31536e3,Q_=new WeakMap,$_=e=>e>99?`99+`:String(e),ev=(e,t)=>Object.entries(t).reduce((e,[t,n])=>e.replaceAll(`{${t}}`,()=>String(n)),e);function tv(e,t,n=document){try{n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${Z_}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}function nv(e,t,n,r=document){try{let i=`${e}=`,a=r.cookie.split(`;`).map(e=>e.trim()).find(e=>e.startsWith(i)),o=new Set(a?a.slice(i.length).split(`.`).filter(Boolean):[]);n?o.add(t):o.delete(t),r.cookie=`${e}=${[...o].join(`.`)}; Path=/; Max-Age=${Z_}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}var $=(e,t,n)=>{let r=e?.querySelector(t);return r instanceof n?r:null},rv=(e,t,n)=>{let r=e?.closest(t);return r instanceof n?r:null},iv=(e,t,n)=>e?[...e.querySelectorAll(t)].filter(e=>e instanceof n):[],av=e=>{if(!(e.target instanceof Element))throw Error(`event target is not an element`);return e.target},ov=e=>{let t=e.getAttribute(`href`);if(t===null)throw Error(`search hit has no href`);return t},sv=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function cv(e,t){let n=$(e,`.wui-bell-trigger`,HTMLElement),r=$(e,`.wui-bell-count`,HTMLElement),i=$(e,`[data-wui-bell-live]`,HTMLElement),a=$(e,`[data-wui-bell-list]`,HTMLElement),o=()=>N(a,`bell list missing`),s=$(e,`.wui-bell-menu`,HTMLElement),{src:c,readAction:l}=e.dataset,u=e.dataset.label||Q().label,d=e.dataset.emptyText||Q().emptyText,f=e.dataset.loadingText??Q().loadingNotificationsText,p=e.dataset.noUnreadText??Q().noUnreadText,m=e.dataset.unreadText??Q().unreadNotificationsText,h=e.dataset.bellLabel??Q().unreadBellLabel,g=Number(e.dataset.pollSeconds??60),_=Ma(),v=Number(e.dataset.unread)||0,y=(t,a=!0)=>{let o=Math.max(0,Number(t)||0),s=o!==v;v=o,e.dataset.unread=String(o),r&&(r.textContent=$_(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?u:ev(h,{label:u,count:$_(o)})),a&&s&&i&&(i.textContent=o===0?p:ev(m,{count:$_(o)}))},b=()=>s?M(s):!1,x=()=>{let e=sv(`wui-bell-state`,`${Q().notificationsLoadErrorMessage} `),t=document.createElement(`button`);t.type=`button`,t.className=`btn btn-link btn-sm`,t.dataset.wuiBellRetry=``,t.textContent=Q().retryLabel,e.append(t),o().replaceChildren(e)},S=async t=>{if(t&&(o().setAttribute(`aria-busy`,`true`),o().querySelector(`.wui-bell-item`)||o().replaceChildren(sv(`wui-bell-state`,f))),c===void 0)throw Error(`bell has no data-src`);let n=await _.run(c);if(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)return;if(o().removeAttribute(`aria-busy`),!n.ok){t&&x();return}let r=Xl(n.html),i=$(r,`[data-wui-unread]`,HTMLElement),a=i?Number(i.getAttribute(`data-wui-unread`)):v;y(a),(t||b())&&(r.querySelector(`.wui-bell-item`)?o().replaceChildren(r):o().replaceChildren(sv(`wui-bell-state`,d))),e.dispatchEvent(new CustomEvent(`wui:notifications:loaded`,{bubbles:!0,detail:{unread:a}}))};s?.addEventListener(`beforetoggle`,e=>{`newState`in e&&e.newState===`open`&&S(!0)}),e.addEventListener(`click`,async e=>{let t=av(e);if(t.closest(`[data-wui-bell-retry]`)){await S(!0);return}let n=rv(t,`[data-wui-bell-read]`,HTMLButtonElement);if(!n||!l)return;n.disabled=!0;let r=await ja(l,{method:`POST`});n.disabled=!1,r.ok&&(y(0),await S(!0))});let C=null,w=()=>{g>0&&C===null&&(C=setInterval(()=>S(b()),g*1e3))},T=()=>{C!==null&&clearInterval(C),C=null},E=()=>{document.hidden?T():(S(b()),w())};return g>0&&(document.addEventListener(`visibilitychange`,E),document.hidden||w()),t.push(()=>{T(),_.abort(),document.removeEventListener(`visibilitychange`,E)}),{setUnread:e=>y(e),refresh:()=>S(b())}}var lv=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),uv=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function dv(e,t){let n=N($(e,`input.search-input`,HTMLInputElement),`search input missing`),r=$(e,`.wui-topsearch-results`,HTMLElement),i=()=>N(r,`search results missing`),a=$(e,`.wui-topsearch-open`,HTMLElement),o=$(e,`[data-wui-topsearch-live]`,HTMLElement),{src:s,param:c=`q`,resultsHref:l}=e.dataset,u=Number(e.dataset.minChars??2),d=Number(e.dataset.debounceMs??250),f=e.dataset.noResultsText??Q().noResultsText,p=e.dataset.resultsCountText??Q().resultsCountText,m=e.dataset.resultCountText??Q().resultCountText,h=Ma(),g,_=-1,v=()=>iv(i(),`.wui-topsearch-hit`,HTMLElement),y=e=>{let t=v();_=t.length===0?-1:(e+t.length)%t.length,t.forEach((e,t)=>{let n=t===_;e.classList.toggle(`is-active`,n),e.setAttribute(`aria-selected`,n?`true`:`false`)});let r=_>=0?t[_]:void 0;r?(n.setAttribute(`aria-activedescendant`,r.id),r.scrollIntoView?.({block:`nearest`})):n.removeAttribute(`aria-activedescendant`)},b=()=>{i().hidden=!0,n.setAttribute(`aria-expanded`,`false`),n.removeAttribute(`aria-activedescendant`),_=-1},x=()=>{i().hidden=!1,n.setAttribute(`aria-expanded`,`true`)},S=t=>{e.classList.toggle(`is-open`,t),a?.setAttribute(`aria-expanded`,t?`true`:`false`)},C=t=>{let n=new CustomEvent(`wui:search:select`,{bubbles:!0,cancelable:!0,detail:{href:t}});e.dispatchEvent(n)&&window.location.assign(t)},w=async t=>{if(e.classList.add(`is-loading`),s===void 0)throw Error(`search has no data-src`);let n=await h.run(uv(s,c,t));if(n.kind!==`aborted`&&n.kind!==`stale`&&n.kind!==`session`){if(e.classList.remove(`is-loading`),n.ok){let e=Xl(n.html),t=$(e,`[data-wui-count]`,HTMLElement);i().replaceChildren(e),v().forEach((e,t)=>{e.id=`${i().id}-opt-${t}`});let r=t?Number(t.getAttribute(`data-wui-count`)):v().length;o&&(o.textContent=r===0?f:ev(r===1?m:p,{count:r}))}else i().replaceChildren(sv(`wui-topsearch-empty`,Q().searchUnavailableMessage));_=-1,x()}};n.addEventListener(`input`,()=>{clearTimeout(g);let t=n.value.trim();t.length<u?(h.abort(),e.classList.remove(`is-loading`),i().replaceChildren(),b()):g=setTimeout(()=>w(t),d)}),n.addEventListener(`keydown`,t=>{if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(i().hidden||v().length===0)return;t.preventDefault(),y(_+(t.key===`ArrowDown`?1:-1))}else if(Ir(t)){let e=v(),r=_>=0?e[_]:void 0;!i().hidden&&r?(t.preventDefault(),C(ov(r))):l&&n.value.trim()!==``&&(t.preventDefault(),C(uv(l,c,n.value.trim())))}else t.key===`Escape`&&(i().hidden?e.classList.contains(`is-open`)&&(t.preventDefault(),t.stopPropagation(),S(!1),a?.focus()):(t.preventDefault(),t.stopPropagation(),b()))}),i().addEventListener(`click`,e=>{let t=rv(av(e),`.wui-topsearch-hit`,HTMLElement);!t||e.ctrlKey||e.metaKey||e.shiftKey||e.button===1||(e.preventDefault(),C(ov(t)))}),a?.addEventListener(`click`,()=>{let t=!e.classList.contains(`is-open`);S(t),t&&n.focus()});let T=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||lv(e.target)||(e.preventDefault(),S(!0),n.focus())},E=t=>{t.target instanceof Node&&e.contains(t.target)||(b(),e.classList.contains(`is-open`)&&S(!1))};document.addEventListener(`keydown`,T),document.addEventListener(`pointerdown`,E),t.push(()=>{clearTimeout(g),h.abort(),document.removeEventListener(`keydown`,T),document.removeEventListener(`pointerdown`,E)})}function fv(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>{tv(n,!!e.detail?.collapsed)});let r=e.dataset.wuiFoldedCookie;r&&e.addEventListener(`wui:shell:nav-fold`,e=>{nv(r,e.detail?.key,!!e.detail?.folded)}),e.addEventListener(`click`,t=>{av(t).closest(`[data-wui-tabbar-more]`)&&$(e,`[data-app-shell-menu]`,HTMLElement)?.click()});let i=$(e,`[data-wui-bell]`,HTMLElement),a=i?cv(i,t):null,o=$(e,`[data-wui-topsearch]`,HTMLElement);o&&dv(o,t);let s={el:e,setUnread(e){N(a,`WUI.shell: this <app-shell> has no <app-shell-notifications>.`).setUnread(e)},refreshNotifications(){return N(a,`WUI.shell: this <app-shell> has no <app-shell-notifications>.`).refresh()},get collapsed(){return e.classList.contains(`collapsed`)},set collapsed(t){if(!!t===e.classList.contains(`collapsed`))return;let n=$(e,`[data-app-shell-collapse]`,HTMLElement);n?n.click():e.classList.toggle(`collapsed`,!!t)}};Q_.set(e,s);let c=n=>{if(n.target===e||n.target instanceof Node&&n.target.contains(e)){for(let e of t)e();Q_.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,c)}};return document.addEventListener(`wui:teardown`,c),s}function pv(e=document){let t=[];e instanceof HTMLElement&&e.matches(`[data-app-shell]`)&&t.push(e),t.push(...iv(e,`[data-app-shell]`,HTMLElement));for(let e of t)e.dataset.wuiPartsWired||(e.dataset.wuiPartsWired=`1`,fv(e))}function mv(e){let t=rv(e,`[data-app-shell]`,HTMLElement);return t?(Q_.has(t)||pv(t),Q_.get(t)??null):null}var hv=`data-wui-submit-once`,gv=`data-wui-submit-pending`,_v=`wui-submit-spinner`,vv=new WeakSet,yv=new WeakMap;function bv(e){return e instanceof HTMLButtonElement||e instanceof HTMLInputElement?e:null}function xv(e){if(e.setAttribute(`aria-busy`,`true`),e.tagName===`INPUT`||e.querySelector(`.${_v}`))return;let t=e.ownerDocument.createElement(`span`);t.className=`spinner-border spinner-border-sm me-2 ${_v}`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t)}function Sv(e){e.removeAttribute(`aria-busy`),e.querySelector(`.${_v}`)?.remove()}function Cv(e){return e.method===`post`&&e.target!==`_blank`&&e.getAttribute(`data-wui-submit-once`)!==`off`}function wv(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!Cv(t))return;if(t.hasAttribute(gv)){e.preventDefault();return}t.setAttribute(gv,``);let n=bv(e.submitter);setTimeout(()=>{t.hasAttribute(gv)&&(e.defaultPrevented?t.removeAttribute(gv):n&&(n.disabled=!0,xv(n),yv.set(t,n)))},0)}var Tv=e=>[...e.querySelectorAll(`form[${gv}]`)].filter(e=>e instanceof HTMLFormElement);function Ev(e){for(let t of Tv(e)){t.removeAttribute(gv);let e=yv.get(t);e&&(e.disabled=!1,Sv(e),yv.delete(t))}}function Dv(e){let t=e.ownerDocument===null?e:e.ownerDocument;vv.has(t)||(vv.add(t),t.addEventListener(`submit`,wv,!0),t.defaultView?.addEventListener(`pageshow`,()=>Ev(t)))}var Ov=[`light`,`dark`,`auto`],kv=[`wave`,`circle`,`slide`,`blinds`,`fade`,`none`],Av=`fade`,jv=`theme`,Mv={wave:1100,circle:700,slide:600,blinds:900,fade:350,none:0},Nv=`wui-theme-switching`,Pv=`wui:theme:change`,Fv=`(prefers-color-scheme: dark)`,Iv=e=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(e).matches,Lv=e=>Ov.some(t=>t===e);function Rv(e){return e===`dark`||e===`auto`&&Iv(Fv)?`dark`:`light`}function zv(e=jv){let t=null;try{t=window.localStorage.getItem(e)}catch(e){if(!(e instanceof DOMException))throw e}return Lv(t)?t:`auto`}function Bv(e,t=jv){try{window.localStorage.setItem(t,e)}catch(e){if(!(e instanceof DOMException))throw e}}function Vv(e){let t=document.documentElement,n=Rv(e);t.setAttribute(`data-theme`,e),t.setAttribute(`data-bs-theme`,n),document.dispatchEvent(new CustomEvent(Pv,{detail:{mode:n,preference:e}}))}var Hv=`((k)=>{var m;try{m=localStorage.getItem(k)}catch{m=null}if(m!=='light'&&m!=='dark')m='auto';var r=document.documentElement,q=window.matchMedia?window.matchMedia('(prefers-color-scheme: dark)'):null;function s(){var t=r.getAttribute('data-theme');r.setAttribute('data-bs-theme',t==='auto'?(q?.matches?'dark':'light'):t)}r.setAttribute('data-theme',m);s();if(q?.addEventListener)q.addEventListener('change',()=>{if(r.getAttribute('data-theme')==='auto')s()})})(`;function Uv(e=jv){return`${Hv}${JSON.stringify(String(e)).replace(/</g,`\\u003c`)})`}function Wv(e,{includeAuto:t=!1}={}){return e===`light`?`dark`:e===`dark`&&t?`auto`:`light`}function Gv(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(Fv),n=()=>e(t.matches?`dark`:`light`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var Kv=60,qv=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,Jv=e=>e.toFixed(1),Yv=(e,t)=>`${Jv(e)}px ${Jv(t)}px`,Xv={amplitude:22,segments:36,cycles:1.5,ripples:2},Zv=6,Qv=(e,t,n,r,i)=>{let{amplitude:a,segments:o,cycles:s}=Xv,c=n*(t+2*a),l=i?t+a-c:c-a,u=i?t+2*a:-2*a,d=[Yv(0,u)];for(let t=0;t<=o;t++){let n=e*t/o,i=l+a*Math.sin(2*Math.PI*s*t/o+r);d.push(Yv(n,i))}return d.push(Yv(e,u)),`polygon(${d.join(`, `)})`},$v=(e,t,n,r)=>{let i=t/Zv,a=[];for(let t=0;t<Zv;t++){let o=t*i,s=i*n,c=r?o+i-s:o,l=r?o+i:o+s;a.push(Yv(0,c),Yv(e,c),Yv(e,l),Yv(0,l))}return`polygon(${a.join(`, `)})`};function ey(e,{width:t,height:n,to:r=`dark`,origin:i}){let a=r===`dark`,o=[];for(let r=0;r<=Kv;r++){let s=r/Kv,c=qv(s);switch(e){case`circle`:{let e=i?.x??t/2,r=i?.y??n/2,a=Math.hypot(Math.max(e,t-e),Math.max(r,n-r));o.push({clipPath:`circle(${Jv(a*c)}px at ${Jv(e)}px ${Jv(r)}px)`});break}case`slide`:{let e=n*(1-c);o.push({clipPath:a?`inset(${Jv(e)}px 0px 0px 0px)`:`inset(0px 0px ${Jv(e)}px 0px)`});break}case`blinds`:o.push({clipPath:$v(t,n,c,a)});break;case`fade`:o.push({clipPath:`none`,opacity:c});break;case`none`:return[];default:o.push({clipPath:Qv(t,n,c,s*Xv.ripples*2*Math.PI,a)})}}return o}var ty=e=>{e instanceof DOMException&&(e.name===`AbortError`||e.name===`InvalidStateError`)||B(`[@webority/ui-elements] The theme view transition failed:`,e)};function ny(e,{effect:t=Av,to:n,origin:r,duration:i}={}){let a=document.documentElement,o=n!==void 0&&a.getAttribute(`data-bs-theme`)===n;if(t===`none`||o||Iv(`(prefers-reduced-motion: reduce)`)||typeof document.startViewTransition!=`function`||typeof a.animate!=`function`)return e(),Promise.resolve(!1);a.classList.add(Nv);let s=document.startViewTransition(e),c=i??Mv[t]??Mv.fade;return s.ready.then(()=>{let e=ey(t,{width:window.innerWidth,height:window.innerHeight,to:n,origin:r});a.animate(e,{duration:c,easing:`linear`,fill:`both`,pseudoElement:`::view-transition-new(root)`})}).catch(ty),s.finished.catch(ty).finally(()=>a.classList.remove(Nv)).then(()=>!0)}function ry(){Mt(),i(`wui-select`,yc),i(`wui-dock`,Mi),i(`wui-otp`,bo),i(`wui-shortcuts`,Vc),i(`wui-record-pager`,Wo),i(`wui-data-table`,ji),i(`wui-hover-card`,Hi),i(`wui-modal`,Ui),i(`wui-navigation-menu`,Qi),i(`wui-notification-center`,Za),i(`wui-onboarding-checklist`,ao),i(`wui-overflow`,Fo),i(`wui-rating`,Uo),i(`wui-relative-time`,os),i(`wui-show-more`,Gc),i(`wui-truncate`,Kc),i(`wui-whats-new`,el)}return globalThis.WeborityUiElementsInternal||(globalThis.WeborityUiElementsInternal={version:`0.174.1`,modules:Ku}),ui(),ry(),e.AVATAR_ACCEPT=Ju,e.AVATAR_MAX_SIZE_MB=Yu,e.AVATAR_OUTPUT_SIZE=Xu,e.AVATAR_OUTPUT_TYPE=Zu,e.AVATAR_PREVIEW_SIZES=Qu,e.BAR_BULK_IN_BAR_ATTRIBUTE=Df,e.COLUMN_MAX_WIDTH=Jn,e.COLUMN_MIN_WIDTH=qn,e.COMMAND_SHORTCUT_ATTRIBUTE=hd,e.CONFIRM_DIALOG_ID=Bh,e.CONFIRM_TONES=Vh,e.COPY_FEEDBACK_MS=El,e.CSRF_META_NAME=_a,e.CURRENCIES=Qt,e.CURRENCY_SYMBOLS=Pt,e.DATE_PATTERNS=tn,e.DEFAULT_CSRF_HEADER=va,e.DEFAULT_CURRENCY=Nt,e.DEFAULT_IMAGE_ACCEPT=wd,e.DEFAULT_MAX_SIZE_MB=Td,e.DEFAULT_PASSWORD_RULES=Lf,e.DEFAULT_THEME_EFFECT=Av,e.DEFAULT_THEME_STORAGE_KEY=jv,e.DISCARD_EVENT=p_,e.DROP_OVER_CLASS=Gf,e.DURATION_UNITS=en,e.FILTER_POPOVER_MAX_CHIPS=bt,e.FLASH_STORAGE_KEY=Wh,e.FLASH_VARIANTS=Hh,e.FORMAT_STYLES=Zt,e.HTTP_KINDS=Sa,e.IST_TIME_ZONE=R,e.MASK_INPUT_TYPES=qd,e.MASK_NAMES=nf,e.MENTION_ID_PATTERN=kl,e.MONEY_UNITS=$t,e.NOTIFICATION_COUNT_CAP=ra,e.PIN_AT_VAR=hr,e.PIN_SIDES=Zn,e.RESIZE_STEP=Yn,e.RESIZE_STEP_LARGE=Xn,e.ROW_DRAG_TYPE=Kf,e.ROW_DROP_EVENT=Wf,e.ROW_HEIGHTS=$n,e.ROW_MOVE_LIMIT=yr,e.ROW_MOVE_MS=br,e.ROW_SAVE_ATTR=Or,e.ROW_SAVE_ERROR_CLASS=kr,e.ROW_SAVE_STATES=Dr,e.SCROLL_EDGE_SELECTOR=bp,e.SEARCH_OPEN_KEY=nd,e.SELECT_CELL_CLASS=K,e.SHORTCUTS_OFF_ATTRIBUTE=nt,e.SHORTCUT_EVENT=it,e.SHORTCUT_SCOPE_ATTRIBUTE=rt,e.SUBMIT_ONCE_ATTRIBUTE=hv,e.THEME_BOOT_SCRIPT_BODY=Hv,e.THEME_CHANGE_EVENT=Pv,e.THEME_EFFECTS=kv,e.THEME_EFFECT_DURATION=Mv,e.THEME_MODES=Ov,e.THEME_SWITCHING_CLASS=Nv,e.TOAST_ACTION_METHODS=fa,e.TOAST_ACTION_MS=Qp,e.VIRTUAL_OVERSCAN=Qn,e.WHATS_NEW_READ_EVENT=qc,e.WUI_HEADERS=H,e.WuiDataTable=ji,e.WuiDock=Mi,e.WuiHoverCard=Hi,e.WuiNavigationMenu=Qi,e.WuiNotificationCenter=Za,e.WuiOnboardingChecklist=ao,e.WuiOtp=bo,e.WuiOverflow=Fo,e.WuiRating=Uo,e.WuiRecordPager=Wo,e.WuiRelativeTime=os,e.WuiSelect=yc,e.WuiShortcuts=Vc,e.WuiShowMore=Gc,e.WuiTruncate=Kc,e.WuiWhatsNew=el,e.acceptDroppedFiles=Vd,e.acceptLabel=Rd,e.addRowSelectCells=uu,e.addSelectColumn=du,e.applyBarBulk=Pf,e.applyTheme=Vv,e.ariaKeyShortcuts=pt,e.attachFileDrop=Hd,e.attachInputMask=vf,e.attachRowDrag=gp,e.attachScrollEdges=Sp,e.attachShiftRange=mu,e.avatarCropOptions=td,e.avatarUnreadableMessage=ed,e.barBulkCountText=Af,e.buildPasswordRules=Bf,e.clampColumnWidth=cr,e.classifyStatus=Ea,e.closeRemotePane=zh,e.collapseSearch=dd,e.configureCsrf=ba,e.confirmAction=ig,e.copyTextToClipboard=Dl,e.createDiscardPrompt=D_,e.createRequestQueue=Ma,e.createSelectHeaderCell=iu,e.createSelectRowCell=au,e.createSelectSpacerCell=ou,e.currencyPrefix=It,e.deriveStepStatus=Ql,e.emptyValueLabel=z,e.evaluatePassword=Vf,e.fillText=L,e.formValues=Kg,e.formatCompact=jn,e.formatCurrency=kn,e.formatDate=Ln,e.formatDateTime=Vn,e.formatDuration=Pn,e.formatFileSize=Fd,e.formatMasked=df,e.formatNumber=On,e.formatPercent=Mn,e.formatRelativeTime=Qo,e.formatValue=zn,e.getServerTable=Xp,e.getShell=mv,e.glyphNode=W,e.groupCount=sr,e.groupItems=lr,e.groupNotificationsByDay=da,e.identityCell=Ar,e.inShortcutScope=_t,e.initCollapsibleSearch=md,e.initCommandShortcuts=xd,e.initDrawerDiscard=Y_,e.initInputMasks=Ef,e.initPageBarBulk=Ff,e.initRemoteModals=Nh,e.initRowDrag=yp,e.initScrollEdges=Op,e.initServerActions=Og,e.initServerTables=Yp,e.initShellParts=pv,e.initSubmitOnce=Dv,e.initUnsavedChanges=u_,e.isCommandChord=vd,e.isCurrencyCode=Ft,e.isHeicFile=$u,e.isImageFile=Nd,e.isImageOnlyAccept=Ld,e.isMaskPattern=af,e.isPdfFile=Id,e.isTimeZone=Ht,e.isTypingTarget=mt,e.loadRemoteDrawer=Ih,e.loadRemoteModal=Ph,e.loadRemotePane=Rh,e.maskedPostValue=mf,e.matchSegments=bu,e.matchesAccept=zd,e.measureRows=wr,e.mentionLabel=Ml,e.mentionTextFromValue=Fl,e.mentionValueFromText=Il,e.mentionedIds=Ll,e.moveFocus=yt,e.nextTheme=Wv,e.notificationCountText=oa,e.notificationDayHeading=ua,e.notificationTime=la,e.notificationTriggerLabel=sa,e.notificationUnreadAnnouncement=ca,e.openSearch=ud,e.parseMentionValue=Pl,e.parseServerHtml=Xl,e.parseToastAction=ha,e.passwordSatisfies=Hf,e.pinAtValue=gr,e.pinClasses=vr,e.pinOffsetVar=mr,e.planPins=_r,e.playRowMoves=Tr,e.pluralText=Xe,e.postedMasked=uf,e.rawMasked=lf,e.readColumnWidths=fr,e.readCsrf=wa,e.readStoredTheme=zv,e.readText=I,e.relativeTimeTitle=$o,e.resetUnsavedChanges=d_,e.resolveMask=sf,e.resolveTheme=Rv,e.rowLabel=jr,e.rowOrderChanged=Er,e.runShortcut=vt,e.runToastAction=am,e.saveOutcomeText=Pr,e.setRowSaveState=Mr,e.setText=qe,e.settledRows=Nr,e.shortcutKey=ft,e.shortcutName=dt,e.shortcutsOff=gt,e.showResultToast=im,e.stepperHeaderItems=$l,e.storeTheme=Bv,e.syncSelectAll=fu,e.syncTargets=vp,e.themeBootScript=Uv,e.themeKeyframes=ey,e.tickedKeys=rp,e.timeZoneLabel=Wn,e.timeoutFromAttribute=ka,e.toInstant=Fn,e.todayIn=Jt,e.transitionTheme=ny,e.validateFile=Bd,e.virtualRange=ur,e.wallClockOf=qt,e.watchSystemTheme=Gv,e.whenElementsReady=fi,e.withTrustedLabel=As,e.writeColumnWidths=pr,e.wuiFetch=ja,e.zoneOffsetMs=Wt,e.zoneParts=Ut,e})({});
|