@webority/ui-elements 0.176.0 → 0.177.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/WuiCommentThread-e5t7HceL.js +1 -0
- package/dist/WuiDateRange-BnEJ2WpL.js +1 -0
- package/dist/{WuiInlineEdit-B7VCQXeG.js → WuiInlineEdit-p0cm_i90.js} +1 -1
- package/dist/{WuiMarkdown-DsN4YbiZ.js → WuiMarkdown-DRtGPxQX.js} +1 -1
- package/dist/WuiMentionInput-DPpEVL2s.js +1 -0
- package/dist/{WuiNotificationCenter-BIxUJ0tJ.js → WuiNotificationCenter-DuvGrqwr.js} +1 -1
- package/dist/{WuiPhone-CBge7oVA.js → WuiPhone--w-taM5Q.js} +1 -1
- package/dist/{WuiSavedViews-BmJmnkHu.js → WuiSavedViews-BKpnSd-Y.js} +1 -1
- package/dist/{WuiSelect-CBcfLzOF.js → WuiSelect-iUXaHKw5.js} +1 -1
- package/dist/{WuiSlider-R_mTula0.js → WuiSlider-CK7_l_R5.js} +1 -1
- package/dist/WuiTour-BgpMa8J5.js +1 -0
- package/dist/WuiTree-BjtuCasB.js +1 -0
- package/dist/{chips-DpD0EbS0.js → chips-xXgAvIFy.js} +1 -1
- package/dist/drawerDiscard-z1PsI4cx.js +1 -0
- package/dist/elements/comment-thread.js +1 -1
- package/dist/elements/date-range.js +1 -1
- package/dist/elements/inline-edit.js +1 -1
- package/dist/elements/kanban.js +1 -1
- package/dist/elements/markdown.js +1 -1
- package/dist/elements/mention-input.js +1 -1
- package/dist/elements/notification-center.js +1 -1
- package/dist/elements/phone.js +1 -1
- package/dist/elements/saved-views.js +1 -1
- package/dist/elements/select.js +1 -1
- package/dist/elements/slider.js +1 -1
- package/dist/elements/tour.js +1 -1
- package/dist/elements/tree.js +1 -1
- package/dist/helpers.js +1 -1
- package/dist/httpFailure.g-DjZzGxPj.js +1 -0
- package/dist/{kanban-BCOQDfvj.js → kanban-jQCTLG3Q.js} +1 -1
- package/dist/{listboxKeyNav-DNtuh6Ob.js → listboxKeyNav-CNso9shL.js} +1 -1
- package/dist/{search-BTNIAZY3.js → search-Bhn-bjLL.js} +1 -1
- package/dist/server.js +1 -1
- package/dist/text/en.json +1 -1
- package/dist/text.js +1 -1
- package/dist/themeTransition-TF0BqM20.js +1 -0
- package/dist/ui-calendar.global.js +1 -1
- package/dist/ui-calendar.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 +1 -1
- 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 +2 -2
- 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 +1 -1
- 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-tour.global.js +1 -1
- package/dist/{wuiHttp-BiwgFpmq.js → wuiHttp-Cw7V8u2w.js} +1 -1
- package/package.json +6 -6
- package/types/calendarAdapter.d.ts +8 -21
- package/types/calendarEngine.d.ts +22 -0
- package/types/commandShortcut.d.ts +12 -0
- package/types/globals.d.ts +0 -4
- package/types/helpers.d.ts +1 -1
- package/types/listboxKeyNav.d.ts +2 -3
- package/types/razor-js/modules/api.d.ts +0 -5
- package/types/server/index.d.ts +1 -0
- package/types/server/shellParts.d.ts +6 -0
- package/types/server/wuiHttp.d.ts +2 -0
- package/types/server/wuiUpload.d.ts +15 -0
- package/dist/WuiCommentThread-D8Cv8y8v.js +0 -1
- package/dist/WuiDateRange-qTncGobM.js +0 -1
- package/dist/WuiMentionInput-DAPLGewp.js +0 -1
- package/dist/WuiTour-BU00-6Lf.js +0 -1
- package/dist/WuiTree-C3yMSmC2.js +0 -1
- package/dist/drawerDiscard-Dl33Ytd2.js +0 -1
- package/dist/httpFailure.g-SkEFc60Y.js +0 -1
- package/dist/themeTransition-DBv2olsl.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:()=>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}function bt(e){"@babel/helpers - typeof";return bt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},bt(e)}function xt(e,t){if(bt(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(bt(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function St(e){var t=xt(e,`string`);return bt(t)==`symbol`?t:t+``}function R(e,t,n){return(t=St(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ct=2,wt=`wui-filter-popover-pinned`,Tt=`.wui-filter-popover-trigger`,Et=`.wui-filter-popover-panel`,Dt=`.wui-filter-popover-head`,Ot=`input:not([type]),input[type="text"],input[type="search"]`,kt=`a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1'])`;function At(){try{return sessionStorage.getItem(wt)===`1`}catch{return!1}}function jt(e){try{e?sessionStorage.setItem(wt,`1`):sessionStorage.removeItem(wt)}catch(e){if(!(e instanceof DOMException))throw e}}function Mt(e){if(e===null||e instanceof Node)return e;throw TypeError(`event target is not a node`)}function Nt(e,t){let n=e?.querySelector(t)??null;return n instanceof HTMLElement?n:null}var Pt=class extends s{constructor(){super(),R(this,`_doc`,void 0),R(this,`_timer`,void 0),R(this,`_sticky`,void 0),R(this,`_closingByCode`,void 0),R(this,`_inside`,void 0),R(this,`_pendingSubmit`,void 0),R(this,`_onEnter`,void 0),R(this,`_onLeave`,void 0),R(this,`_onClick`,void 0),R(this,`_onChange`,void 0),R(this,`_onListClose`,void 0),R(this,`_onFocusOut`,void 0),R(this,`_onKeyDown`,void 0),R(this,`_onShortcut`,void 0),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(Mt(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){jt(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(Mt(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(Ot))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),At()&&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 Nt(this,Tt)}get _panel(){return Nt(this,Et)}get _pin(){let e=this.querySelector(`${Dt} 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&&(Nt(n.querySelector(`.wui-filter-popover-grid`),kt)??Nt(n,kt))?.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 Ft(){i(`wui-filter-popover`,Pt)}var It=`INR`,Lt=Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`,JPY:`¥`}),Rt=e=>typeof e==`string`&&/^[A-Z]{3}$/.test(e),zt=(e=`INR`)=>Lt[e]??`${e} `,Bt={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`},Vt=n({IST_OFFSET_MS:()=>Ht,IST_TIME_ZONE:()=>z,isTimeZone:()=>Gt,nowIn:()=>Qt,todayIn:()=>Zt,wallClockOf:()=>Xt,wallToInstant:()=>Jt,zoneOffsetMs:()=>qt,zoneParts:()=>Kt}),z=`Asia/Kolkata`,Ht=198e5,Ut=new Map;function Wt(e){let t=Ut.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`}),Ut.set(e,t)),t}function Gt(e){if(typeof e!=`string`||e===``)return!1;try{return Wt(e),!0}catch{return!1}}function Kt(e,t=z){if(t===`Asia/Kolkata`){let t=new Date(e+Ht);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}let n=Object.fromEntries(Wt(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 qt(e,t=z){if(t===`Asia/Kolkata`)return Ht;let n=Kt(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 Jt(e,t=z){let n=e-qt(e,t);return n=e-qt(n,t),n}var Yt=e=>e instanceof Date?e.getTime():e;function Xt(e,t=z){return new Date(e+qt(e,t)).toISOString().slice(0,19)}function Zt(e=z,t=Date.now()){return Xt(Yt(t),e).slice(0,10)}function Qt(e=z,t=Date.now()){let n=Yt(t);return new Date(n+qt(n,e))}var $t=n({CURRENCIES:()=>tn,DATE_PATTERNS:()=>an,DURATION_UNITS:()=>rn,FORMAT_STYLES:()=>en,IST_OFFSET_MS:()=>Ht,IST_TIME_ZONE:()=>z,MAX_DECIMALS:()=>20,MONEY_UNITS:()=>nn,compactFormatOf:()=>Un,emptyValueLabel:()=>B,formatCompact:()=>Pn,formatCurrency:()=>Mn,formatDate:()=>Bn,formatDateTime:()=>Wn,formatDayShort:()=>Vn,formatDuration:()=>Ln,formatNumber:()=>jn,formatPercent:()=>Fn,formatValue:()=>Hn,isMoneyUnit:()=>on,istParts:()=>zn,monthLabel:()=>pn,monthLongLabel:()=>mn,paiseToRupeeText:()=>Dn,timeZoneLabel:()=>qn,toInstant:()=>Rn,weekdayLabel:()=>hn}),en=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],tn=[`INR`,`USD`,`EUR`,`GBP`],nn=[`rupees`,`paise`],rn=[`ms`,`s`,`min`,`h`],an=[`day`,`month`,`year`,`datetime`,`time`];function on(e){return nn.some(t=>t===e)}var sn=()=>I(`formatters`,Bt),B=()=>sn().emptyValueLabel,cn=`−`,ln=[`janShortLabel`,`febShortLabel`,`marShortLabel`,`aprShortLabel`,`mayShortLabel`,`junShortLabel`,`julShortLabel`,`augShortLabel`,`sepShortLabel`,`octShortLabel`,`novShortLabel`,`decShortLabel`],un=[`januaryLabel`,`februaryLabel`,`marchLabel`,`aprilLabel`,`mayLabel`,`juneLabel`,`julyLabel`,`augustLabel`,`septemberLabel`,`octoberLabel`,`novemberLabel`,`decemberLabel`],dn={short:[`sunShortLabel`,`monShortLabel`,`tueShortLabel`,`wedShortLabel`,`thuShortLabel`,`friShortLabel`,`satShortLabel`],long:[`sundayLabel`,`mondayLabel`,`tuesdayLabel`,`wednesdayLabel`,`thursdayLabel`,`fridayLabel`,`saturdayLabel`],min:[`sunMinLabel`,`monMinLabel`,`tueMinLabel`,`wedMinLabel`,`thuMinLabel`,`friMinLabel`,`satMinLabel`]},fn=(e,t)=>sn()[N(e[t],`no date name at index ${t}`)],pn=e=>fn(ln,e),mn=e=>fn(un,e);function hn(e,t){return fn(dn[t],e)}var gn=(e,t)=>N(e[t],`no compact unit at index ${t}`),_n=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],vn=[[1e9,`B`],[1e6,`M`],[1e3,`K`]],yn=e=>!e||e===`INR`?`en-IN`:`en-US`,bn=(e,t)=>typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=20?e:t,xn=new Map,Sn=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=xn.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:e}),xn.set(n,r)),r},Cn=new Map,wn=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=Cn.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:e,maximumFractionDigits:e}),Cn.set(n,r)),r},Tn=e=>typeof e==`number`&&Number.isFinite(e),En=e=>e<0&&!Object.is(Math.abs(e),0)?cn:``;function Dn(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 On=(e,t)=>t===`paise`?Number(Dn(e)):e,kn=2,An=(e,t,n)=>{let r=Math.min(t,kn),i=10n**BigInt(kn-r),a=(BigInt(Dn(e).replace(`.`,``))+i/2n)/i,o=10n**BigInt(r),s=wn(0,n).format(a/o);return t===0?s:`${s}.${(a%o).toString().padStart(r,`0`)}${`0`.repeat(t-r)}`};function jn(e,{decimals:t}={}){if(!Tn(e))return B();let n=Sn(bn(t,2)).format(Math.abs(e));return n===`0`?`0`:En(e)+n}function Mn(e,t){if(!t?.currency)throw TypeError(`[@webority/ui-elements] formatCurrency needs options.currency, an ISO 4217 code such as "INR".`);if(!Tn(e))return B();let{unit:n=`rupees`,decimals:r,currency:i}=t,a=bn(r,0),o=yn(i),s=n===`paise`?An(Math.abs(e),a,o):wn(a,o).format(Math.abs(e));return(Number(s.replace(/,/g,``))===0?``:En(e))+zt(i)+s}var Nn=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function Pn(e,{currency:t,unit:n=`rupees`}={}){if(!Tn(e))return B();let r=t?On(e,n):e,i=t?zt(t):``,a=t?yn(t):`en-IN`,o=a===`en-IN`?_n:vn,s=Math.abs(r),c=o.findIndex(([e])=>s>=e);if(c===-1){let e=Sn(Nn(s),a).format(s);if(e!==`1,000`)return(e===`0`?``:En(r))+i+e;c=o.length-1}let[l,u]=gn(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]=gn(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f))),`${En(r)}${i}${Sn(f,a).format(p)} ${u}`}function Fn(e,{decimals:t}={}){return Tn(e)?`${jn(e*100,{decimals:bn(t,1)})}%`:B()}var In={ms:1,s:1e3,min:6e4,h:36e5};function Ln(e,{unit:t=`s`}={}){if(!Tn(e))return B();let n=In[t]??1e3,r=Math.abs(e*n),i=En(e);if(Math.round(r)<1e3)return`${i}${Sn(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${Sn(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}${Sn(0).format(l)}h ${s(c%60)}m`}function Rn(e,t=z){if(e instanceof Date)return e.getTime();if(Tn(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?Jt(a.getTime(),t):NaN}return Date.parse(e)}function zn(e,t=z){let{year:n,month:r,day:i,hour:a,minute:o}=Kt(e,t);return{year:n,month:r,day:i,hour:a,minute:o}}function Bn(e,{pattern:t=`day`,timeZone:n=z}={}){let r=Rn(e,n);if(!Number.isFinite(r))return B();let i=zn(r,n),a=e=>String(e).padStart(2,`0`),o=`${a(i.day)}-${pn(i.month)}-${i.year}`,s=`${a(i.hour)}:${a(i.minute)}`;switch(t){case`month`:return`${pn(i.month)}-${i.year}`;case`year`:return String(i.year);case`datetime`:return`${o} ${s}`;case`time`:return s;default:return o}}function Vn(e,{timeZone:t=z}={}){let n=Rn(e,t);if(!Number.isFinite(n))return B();let r=zn(n,t);return`${String(r.day).padStart(2,`0`)}-${pn(r.month)}`}function Hn(e,t){if(e==null||e===``)return B();let n=t?.style;if(n===`date`)return Bn(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return Mn(e,{...t,currency:t?.currency??``});case`percent`:return Fn(e,t);case`compact`:return Pn(e,t);case`duration`:return Ln(e,t);default:return jn(e,t)}}function Un(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 Wn(e,{timeZone:t=z}={}){let n=Rn(e);if(!Number.isFinite(n))return B();let r=Object.fromEntries(Kn(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}-${pn(Number(r.month)-1)}-${r.year}, ${r.hour}:${r.minute} ${i.toUpperCase()}`}var Gn=new Map;function Kn(e){let t=Gn.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}),Gn.set(e,t)),t}function qn(e=z){return new Intl.DateTimeFormat(`en-IN`,{timeZone:e,timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??e}var Jn={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.`},Yn=n({COLUMN_MAX_WIDTH:()=>Zn,COLUMN_MIN_WIDTH:()=>48,PIN_AT_VAR:()=>vr,PIN_SIDES:()=>er,RESIZE_STEP:()=>10,RESIZE_STEP_LARGE:()=>50,ROW_HEIGHTS:()=>nr,ROW_MOVE_LIMIT:()=>200,ROW_MOVE_MS:()=>220,ROW_SAVE_ATTR:()=>jr,ROW_SAVE_ERROR_CLASS:()=>Mr,ROW_SAVE_STATES:()=>Ar,VIRTUAL_OVERSCAN:()=>8,clampColumnWidth:()=>dr,groupCount:()=>ur,groupItems:()=>fr,groupRowsText:()=>or,identityCell:()=>Nr,measureRows:()=>Dr,notSavedText:()=>lr,pinAtValue:()=>yr,pinClasses:()=>xr,pinOffsetVar:()=>_r,planPins:()=>br,playRowMoves:()=>Or,readColumnWidths:()=>hr,resizeName:()=>ir,rowLabel:()=>Pr,rowOrderChanged:()=>kr,saveOutcomeText:()=>Lr,savedManyText:()=>cr,savedText:()=>sr,setRowSaveState:()=>Fr,settledRows:()=>Ir,virtualRange:()=>pr,widthText:()=>ar,writeColumnWidths:()=>gr}),Xn=48,Zn=1200,Qn=10,$n=50,er=[`start`,`end`],tr=8,nr={comfortable:72,cozy:48,compact:40},rr=()=>I(`dataTable`,Jn),ir=e=>e?L(rr().resizeColumnText,{label:e}):rr().resizeColumnLabel,ar=e=>L(rr().resizeText,{px:e}),or=e=>Xe(rr(),`groupRows`,e,{count:jn(e,{decimals:0})}),sr=e=>e?L(rr().savedText,{label:e}):rr().rowSavedText,cr=e=>L(rr().rowsSavedText,{n:jn(e,{decimals:0})}),lr=(e,t)=>`${e?L(rr().wasNotSavedText,{label:e}):rr().rowWasNotSavedText}${t?` ${t}`:``}`,ur=e=>jn(e,{decimals:0}),dr=e=>Math.min(Zn,Math.max(48,Math.round(Number(e)||0)));function fr(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 pr({scrollTop:e,viewport:t,rowHeight:n,count:r,overscan:i=8}){let a=n>0?n:nr.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 mr=e=>`wui-widths:${e}`;function hr(e){if(!e)return{};try{let t=JSON.parse(window.localStorage.getItem(mr(e))||`{}`),n={};if(t&&typeof t==`object`)for(let[e,r]of Object.entries(t))Number.isFinite(r)&&(n[e]=dr(r));return n}catch{return{}}}function gr(e,t){if(e)try{Object.keys(t).length?window.localStorage.setItem(mr(e),JSON.stringify(t)):window.localStorage.removeItem(mr(e))}catch(e){if(!(e instanceof DOMException))throw e}}var _r=(e,t)=>`--wui-pin-${e}-${t}`,vr=`--wui-pin-at`,yr=(e,t)=>`var(${_r(e,t)}, 0px)`;function br(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 xr=e=>e?`wui-pin-${e.side}${e.edge?` wui-pin-${e.side}-edge`:``}`:``,Sr=200,Cr=220,wr=`cubic-bezier(0.22, 1, 0.36, 1)`,Tr=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,Er=e=>e.getAttribute(`data-row-key`)??e;function Dr(e){let t=[...e];if(t.length>200)return null;let n=new Map;for(let e of t)e.hidden||n.set(Er(e),e.offsetTop);return n}function Or(e,t){let n=[...e];if(!t||n.length>200||Tr())return 0;let r=0;for(let e of n){if(e.hidden||typeof e.animate!=`function`)continue;let n=t.get(Er(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:wr}),r++)}return r}function kr(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 Ar=[`saving`,`error`],jr=`data-wui-save-state`,Mr=`wui-row-save-error`,Nr=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 Pr(e){let t=Nr(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 Fr(e,t,n=``){if(t!==null&&!Ar.includes(t))throw Error(`A row's save state is ${Ar.join(` or `)} (or null to clear it), not "${t}".`);e.querySelector(`:scope > * > .${Mr}`)?.remove(),t===null?e.removeAttribute(jr):e.setAttribute(jr,t),t===`saving`?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`);let r=t===`error`&&n?Nr(e):null;if(r){let t=e.ownerDocument.createElement(`span`);t.className=Mr,t.textContent=n,r.append(t)}}function Ir(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 Lr(e){let t=e.filter(e=>e.ok),n=[],[r]=t;t.length===1&&r?n.push(sr(r.label)):t.length>1&&n.push(cr(t.length));for(let t of e)t.ok||n.push(lr(t.label,t.message));return n.join(` `)}var Rr=n({isImeComposing:()=>zr,isImeSafeEnter:()=>Br});function zr(e){return e.isComposing||e.keyCode===229}function Br(e){return e.key===`Enter`&&!zr(e)}var Vr=n({svgNodes:()=>Ur,svgRoot:()=>Wr}),Hr=`http://www.w3.org/2000/svg`;function Ur(e){return e.map(Gr)}function Wr(e,t){let n=document.createElementNS(Hr,`svg`);return Kr(n,e),n.append(...Ur(t)),n}function Gr(e){let[t,n,r]=e,i=document.createElementNS(Hr,t);return Kr(i,n),typeof r==`string`?i.append(document.createTextNode(r)):r&&i.append(...Ur(r)),i}function Kr(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 qr=n({devError:()=>V,devWarn:()=>Jr});function Jr(e,...t){console.warn(e,...t)}function V(e,...t){console.error(e,...t)}var Yr=n({hasOwn:()=>Xr}),Xr=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0,Zr=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`,httpFailureText:`text/web/httpFailure.g.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 Qr=`ui-elements/`;function $r(e){let t=Zr[e];if(t===void 0)throw Error(`[webority-ui] No on-demand element chunk is named ${e}.`);return t}function ei(e){let t=$r(e);if(!t.selfContained)return`${Qr+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 ti=n({CHUNK_DIR:()=>Qr,CHUNK_RETRY_MS:()=>ii,ELEMENTS_DEFINED_EVENT:()=>ni,ELEMENTS_LOAD_ERROR_EVENT:()=>ri,assetUrl:()=>_i,loadChunk:()=>vi,startElementLoader:()=>mi,stopElementLoader:()=>hi,whenElementsReady:()=>gi}),ni=`wui-elements:defined`,ri=`wui-elements:load-error`,ii=1e3,ai={"ui-elements/carousel.global.js":`9a9350cb39f0`,"ui-elements/code-block.global.js":`7136bac12425`,"ui-elements/command-palette.global.js":`0233e4269559`,"ui-elements/comment-thread.global.js":`f4179ea24961`,"ui-elements/consent-banner.global.js":`6c414b3996c4`,"ui-elements/context-menu.global.js":`1fc0934b7c38`,"ui-elements/date-range.global.js":`4daae19bad6e`,"ui-elements/date-time.global.js":`8c9565710b14`,"ui-elements/datepicker.global.js":`28681c11ac6d`,"ui-elements/drawer.global.js":`cde32cdaf55a`,"ui-elements/dropdown.global.js":`b68e93d9e9b8`,"ui-elements/entry-grid.global.js":`199bf9c9ca9d`,"ui-elements/gantt.global.js":`d8bffa8c8552`,"ui-elements/image-crop.global.js":`4862a5161130`,"ui-elements/inline-edit.global.js":`457927e189e8`,"ui-elements/kanban.global.js":`9f87b6bf7d6b`,"ui-elements/lead-popup.global.js":`055485f2f4cb`,"ui-elements/lightbox.global.js":`970fb9fe450a`,"ui-elements/org-tree.global.js":`deb966c11987`,"ui-elements/markdown.global.js":`f21c0eead4ec`,"ui-elements/phone.global.js":`3bed9a74aaec`,"ui-elements/popover.global.js":`73a153fbc03c`,"ui-elements/saved-views.global.js":`02164c350262`,"ui-elements/glyphs.global.js":`648f03d421a2`,"ui-elements/select-chips.global.js":`ac1e82c9ead8`,"ui-elements/select-recents.global.js":`8f30e30a72cc`,"ui-elements/select-search.global.js":`ea3392b6558e`,"ui-elements/select-window.global.js":`f0c75c9ac366`,"ui-elements/table-export.global.js":`f90481b01871`,"ui-elements/slider.global.js":`e9d344763d63`,"ui-elements/sortable.global.js":`c70c4d61c1a0`,"ui-elements/status-icon.global.js":`5f1739cba9e6`,"ui-elements/timepicker.global.js":`b86aaa87a727`,"ui-elements/tour.global.js":`06b4c3263424`,"ui-elements/tree.global.js":`47a0ca85e253`,"ui-elements/tree-picker.global.js":`3a8eadee8a3e`,"ui-elements/wizard.global.js":`62cd3a167406`,"ui-chart.global.js":`ae075db49126`,"ui-calendar.global.js":`2aa3861637e0`,"ui-rich-text.global.js":`64dcebd2efc3`,"ui-file-viewer.global.js":`916b45e8cc72`,"ui-phone.global.js":`c646775bc1d1`},oi=new Map;for(let[e,t]of Object.entries(Zr))for(let n of t.tags)oi.set(n,e);var si=[...oi.keys()].join(`,`),ci=null,li=``,ui=!1,di=null,fi=new Map;function pi(){let e=document.currentScript;return e instanceof HTMLScriptElement?e:null}function mi(e=pi()){ui||(ui=!0,ci=e?.src?e.src:null,li=e?.nonce||``,Si(document),di=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&Si(e)}),di.observe(document.documentElement,{childList:!0,subtree:!0}))}function hi(){di?.disconnect(),di=null,ui=!1,ci=null,li=``,fi.clear()}function gi(e=document){return Promise.all([...xi(e)].map(e=>vi(e))).then(()=>void 0)}function _i(e){if(ci===null)throw Error(`The on-demand element files have no address to load from.`);let t=new URL(e,ci);return t.search=Xr(ai,e)?`?v=${ai[e]}`:``,t.href}function vi(e){let t=fi.get(e)?.promise??null;if(t!==null)return t;let n=$r(e),{tags:r}=n,i=ei(e),a=()=>Promise.all(r.map(e=>customElements.whenDefined(e))),o={status:`loading`,promise:null},s=new Promise((t,s)=>{let c=``,l=()=>{di&&Object.keys(Zr).every(e=>fi.get(e)?.status===`loaded`||fi.get(e)?.status===`failed`)&&di.disconnect()},u=()=>{o.status=`loaded`,l(),document.dispatchEvent(new CustomEvent(ni,{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(ri,{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,li&&(i.nonce=li),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),ii)}),document.head.append(i)};if([...document.scripts].some(e=>new URL(e.src,location.href).pathname.endsWith(`/${i}`)))a().then(u);else{try{c=_i(i)}catch(e){d(e instanceof Error?e:void 0);return}f(c,!1)}});return o.promise=s,fi.set(e,o),s}function yi(e){return oi.has(e.localName)&&!customElements.get(e.localName)}function bi(e,t){let n=oi.get(t.localName);n!==void 0&&yi(t)&&e.add(n)}function xi(e){let t=new Set;e instanceof Element&&bi(t,e);for(let n of e.querySelectorAll(si))bi(t,n);return t}function Si(e){for(let t of xi(e))Promise.allSettled([vi(t)])}var Ci=n({TABLE_EXPORT_CHUNK:()=>wi,loadTableExport:()=>Ei,registerTableExport:()=>Di}),wi=`table-export`,Ti=null;function Ei(){return Ti===null?vi(wi).then(()=>{if(Ti===null)throw Error(`[webority-ui] The table-export chunk ran without handing over its writers.`);return Ti}):Promise.resolve(Ti)}function Di(e){Ti=e}var Oi=`.wui-col-resize`,ki=`.wui-group-row, .wui-virtual-spacer`,Ai=`.wui-select-cell, .wui-expand-cell`;function ji(){return Wr({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 Mi(e,t){if(e instanceof t)return e;throw TypeError(`Missing DOM node`)}var Ni=e=>{let t=P(e,Oi);return t instanceof HTMLElement?t:null},Pi=e=>e.hasAttribute(`data-wui-skeleton`)||!!e.querySelector(`:scope > td > .skeleton`),Fi=class extends s{constructor(){super(),R(this,`_frame`,void 0),R(this,`_headDirty`,void 0),R(this,`_rowsDirty`,void 0),R(this,`_frozenSig`,void 0),R(this,`_natural`,void 0),R(this,`_widths`,void 0),R(this,`_collapsed`,void 0),R(this,`_groupOrder`,void 0),R(this,`_items`,void 0),R(this,`_range`,void 0),R(this,`_drag`,void 0),R(this,`_userSized`,void 0),R(this,`_swallowClick`,void 0),R(this,`_mo`,void 0),R(this,`_ro`,void 0),R(this,`_fonts`,void 0),R(this,`_onPointerDown`,void 0),R(this,`_onKeyDown`,void 0),R(this,`_onClick`,void 0),R(this,`_onDblClick`,void 0),R(this,`_onScroll`,void 0),R(this,`_onFonts`,void 0),R(this,`_top`,null),R(this,`_bottom`,null),R(this,`_rowHeight`,0),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=Ni(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=hr(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(Ai)?`lead`:null});if(!r.some(e=>e===`start`||e===`end`))return;let i=br(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,_r(`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,_r(`end`,n.ordinal),o),o+=a(t))}if(t)for(let t of e.rows)t.matches(`${ki}, .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=yr(e.side,e.ordinal);r.style.getPropertyValue(`--wui-pin-at`)!==i&&r.style.setProperty(vr,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(Ai))}_handles(e){let t=this._headCells(e),n=this._resizable(t);t.forEach((e,t)=>{if(!n[t]||e.querySelector(Oi))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(Zn)),r.setAttribute(`tabindex`,`0`);let i=(e.textContent??``).trim();r.setAttribute(`aria-label`,ir(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(ki)&&!Pi(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(Oi);n&&this._handleValue(n,dr(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(Ai))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=dr(t);e.style.width=`${n}px`,e.setAttribute(`data-wui-width`,``);let r=e.querySelector(Oi);return r&&this._handleValue(r,n),n}_handleValue(e,t){e.setAttribute(`aria-valuenow`,String(t)),e.setAttribute(`aria-valuetext`,ar(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)},gr(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,gr(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=Ni(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=Ni(e.target);if(!t||!this.contains(t))return;let n=t.closest(`th`);if(Br(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(Oi)!==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`)&&!Pi(e)),r=new Set;for(let e of n)for(let[t,n]of Array.from(e.cells).entries())(n.matches(Ai)||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 Ei();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(ki));if(a.some(Pi))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=fr(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),Mi(t.querySelector(`.wui-group-cell`),HTMLTableCellElement).colSpan=n.length,Mi(t.querySelector(`.wui-group-count`),HTMLElement).textContent=ur(e.items.length),Mi(t.querySelector(`.wui-group-rows`),HTMLElement).textContent=`, ${or(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(ji());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(ki);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=pr({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`)?nr.compact:e.classList.contains(`wui-table-cozy`)?nr.cozy:nr.comfortable}},Ii=class extends s{static get observedAttributes(){return[`static`,`max-scale`,`radius`]}constructor(){super(),R(this,`_pointerMoveListener`,void 0),R(this,`_pointerLeaveListener`,void 0),R(this,`_frame`,void 0),R(this,`_pointerX`,void 0),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 Ri(this.getAttribute(`max-scale`),1.6)}_radius(){return Ri(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=Li(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`))Li(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()}},Li=e=>Le(e,HTMLElement,`wui-dock item must be an HTML element`),Ri=(e,t)=>{let n=Number.parseFloat(e??``);return Number.isFinite(n)?n:t},zi=300,Bi=150,Vi=`.wui-hover-card-trigger`,Hi=`.wui-hover-card-panel`,Ui=`a[href],button,input,select,textarea,[tabindex]`,Wi=0;function Gi(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}var Ki=class extends s{static get observedAttributes(){return[`open`]}constructor(){super(),R(this,`_doc`,void 0),R(this,`_timer`,void 0),R(this,`_described`,void 0),R(this,`_refocusing`,void 0),R(this,`_onOver`,void 0),R(this,`_onOut`,void 0),R(this,`_onFocusIn`,void 0),R(this,`_onFocusOut`,void 0),R(this,`_onKeyDown`,void 0),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 Gi(this,Vi)}get _panel(){return Gi(this,Hi)}get _anchor(){let e=this._trigger;return e?Gi(e,Ui)??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`,zi):this._delay(`close-delay`,Bi);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-${++Wi}`,t.setAttribute(`aria-describedby`,e.id),this._described=t)}},qi=class extends s{static get observedAttributes(){return[`open`,`static`,`no-escape`]}constructor(){super(),R(this,`_doc`,void 0),R(this,`_release`,void 0),R(this,`_opener`,void 0),R(this,`_returnTo`,void 0),R(this,`_session`,void 0),R(this,`_closing`,void 0),R(this,`_reopen`,void 0),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}},Ji=`.wui-nav-menu-link`,Yi=`(max-width: 767.98px)`,Xi=`data-open`,Zi=e=>e instanceof Element?e:e instanceof Node?e.parentElement:null,Qi=e=>[...e].filter(e=>e instanceof HTMLElement),$i=e=>{let t=e.children[0];if(!(t instanceof HTMLElement))throw Error(`Navigation entry has no control.`);return t},ea=e=>{let t=e.children[1];return t instanceof HTMLElement?t:null},ta=(e,t,n)=>{let r=e[t];if(r===void 0)throw Error(n);return r},na=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(Yi),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&&$i(t).focus({preventScroll:!0}))}_items(){return Qi(this.querySelectorAll(`.wui-nav-menu-item`))}_openItem(){return this._items().find(e=>{let t=ea(e);return t!==null&&this._isOpen(t)})??null}_isOpen(e){return e.hasAttribute(Xi)||M(e)}_isTrigger(e){return!!e?.classList.contains(`wui-nav-menu-trigger`)}_entries(){return this._items().map($i)}_links(e){let t=ea(e);return t?Qi(t.querySelectorAll(Ji)):[]}_set(e,t){let n=ea(e);if(!n)return;let r=$i(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(Yi).matches?(n.setAttribute(Xi,``),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(Xi),document.removeEventListener(`pointerdown`,this._onOutsidePress,!0),M(n)&&j(n),this._settle(e)}_settle(e){let t=$i(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=Zi(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(ea(e),`Navigation entry has no panel.`),i=t===e||this._isOpen(n);this._set(e,!i);return}let i=n?.closest(Ji);i&&this.contains(i)&&this.close()}_handleKeyDown(e){if(this._pressedOpen=null,e.altKey||e.ctrlKey||e.metaKey)return;let t=Zi(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||!ea(n)?.hasAttribute(Xi))return;e.preventDefault(),e.stopPropagation();let r=n.contains(t);this._set(n,!1),r&&$i(n).focus({preventScroll:!0});return}if(t.matches(Ji)){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),ta(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),ta(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(),ta(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(),ta(r,0,`Navigation panel has no link to focus.`).focus({preventScroll:!0})):e.key===`End`&&(e.preventDefault(),ta(r,r.length-1,`Navigation panel has no link to focus.`).focus({preventScroll:!0}))}_teardown(){for(let e of this._items()){let t=ea(e);if(!t)continue;let n=t.hasAttribute(Xi);t.removeAttribute(Xi),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)}},ra=n({isDrawn:()=>ia});function ia(e){return typeof e.checkVisibility==`function`?e.checkVisibility():e.closest(`[hidden]`)===null&&getComputedStyle(e).display!==`none`}var aa={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`},oa=n({NOTIFICATION_COUNT_CAP:()=>99,groupNotificationsByDay:()=>ha,notificationCountText:()=>ua,notificationDayHeading:()=>ma,notificationTime:()=>pa,notificationTriggerLabel:()=>da,notificationUnreadAnnouncement:()=>fa}),sa=99,ca=864e5,la=()=>I(`notificationCentre`,aa);function ua(e){return e>99?`99+`:String(e)}function da(e,t){return t===0?e:`${e}, ${ua(t)} ${la().unreadWordLabel}`}function fa(e){return e===0?la().noneUnreadText:Xe(la(),`unreadAnnouncementText`,e,{unread:ua(e)})}function pa(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?``:Bn(e,{pattern:`time`})}function ma(e,t=Date.now()){let n=Bn(e);return n===Bn(t)?la().todayLabel:n===Bn(Rn(t)-ca)?la().yesterdayLabel:n}function ha(e,t=Date.now()){let n=new Map;for(let r of e){if(!Number.isFinite(Rn(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=Bn(r.at),i=n.get(e);i||(i={key:e,heading:ma(r.at,t),items:[]},n.set(e,i)),i.items.push(r)}return[...n.values()]}var ga=Object.freeze([`POST`,`PUT`,`PATCH`,`DELETE`]),_a=e=>(Jr(`[@webority/ui-elements] Wui-Toast-Action: ${e}; the toast shows no action.`),null),va=e=>typeof e==`object`&&!!e;function ya(e){if(e==null||e===``)return null;let t;try{t=JSON.parse(e)}catch{return _a(`the value is not JSON`)}let n=va(t)?t:{},r=n.label,i=n.url,a=String(n.method??`POST`).toUpperCase();return typeof r!=`string`||r===``||typeof i!=`string`||i===``?_a(`label and url must be non-empty strings`):ga.includes(a)?{label:r,url:i,method:a}:_a(`method must be one of ${ga.join(`, `)}`)}var ba=n({CSRF_META_NAME:()=>xa,DEFAULT_CSRF_HEADER:()=>Sa,DEFAULT_TIMEOUT_MS:()=>Ma,HTTP_KINDS:()=>Ea,WUI_HEADERS:()=>U,WUI_REQUEST_HEADER:()=>Ta,classifyStatus:()=>Aa,configureCsrf:()=>wa,createRequestQueue:()=>Fa,readCsrf:()=>Oa,timeoutFromAttribute:()=>Na,wuiFetch:()=>W}),xa=`wui-csrf`,Sa=`RequestVerificationToken`,Ca={metaName:xa,header:Sa};function wa({metaName:e=xa,header:t=Sa}={}){Ca={metaName:e,header:t}}var Ta=`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`}),Ea=Object.freeze([`ok`,`validation`,`forbidden`,`networkCheck`,`client`,`server`,`network`,`timeout`,`aborted`,`stale`,`session`]),Da=new Set([`GET`,`HEAD`]);function Oa(e=document){let t=[...e.querySelectorAll(`meta`)].find(e=>e.getAttribute(`name`)===Ca.metaName),n=t?.getAttribute(`content`);return!t||!n?null:{header:t.getAttribute(`data-header`)||Ca.header,token:n}}var ka=e=>{try{return new URL(e,window.location.href).origin===window.location.origin}catch{return!1}};function Aa(e,t=null){return e>=200&&e<300?`ok`:e===401?`session`:e===403?t?.get(`cf-mitigated`)===`challenge`?`networkCheck`:`forbidden`:e===422?`validation`:e>=400&&e<500?`client`:`server`}var ja=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,Ma=3e4;function Na(e){let t=e?.trim()??``;return/^\d+$/.test(t)?Number(t):void 0}var Pa=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`,[Ta]:`1`,...t.headers};if(!Da.has(n)&&ka(e)){let e=Oa();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:ya(r(U.toastAction)),fragment:r(U.fragment)===`1`,data:Pa(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`:ja(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=Aa(a.status,a.headers);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 Fa(){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 Ia=n({HTTP_FAILURE_TEXT:()=>La}),La={networkCheckText:`A network check stopped this request. Try again, or report it if it keeps happening.`,networkText:`Could not reach the server. Check your connection and try again.`},Ra=()=>I(`notificationCentre`,aa),za=`.wui-notification-center-trigger`,Ba=`.wui-notification-center-panel`,Va=`.wui-notification-center-count`,Ha=`.wui-notification-center-live`,Ua=`.wui-notification-center-markall`,Wa=`.wui-notification-center-item`,Ga=`wui-notification-center-item-read`,Ka=`.wui-notification-center-unread-label`,qa=`.app-tabs`,Ja=`.wui-notification-center-tabs [role='tablist']`,Ya=`.wui-notification-center-tabs [role='tab']`,Xa=`.wui-notification-center-empty`,Za=`(max-width: 767.98px)`,Qa={ArrowDown:1,ArrowUp:-1,Home:`first`,End:`last`},$a=e=>!!e,eo=()=>({forbidden:Ra().forbiddenMessage,networkCheck:I(`httpFailure`,La).networkCheckText,client:Ra().clientMessage,validation:Ra().clientMessage,server:Ra().serverMessage,network:Ra().networkMessage}),G=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},to=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),no=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,Ba)===null||G(this,za)===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,Ba);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(){G(this,Ba)!==null&&G(this,za)!==null&&(this._disarmAwait(),this._syncOpen(),this._showPanel())}_disarmAwait(){this._awaitChildren?.disconnect(),this._awaitChildren=null}_showPanel(){let e=N(G(this,Ba),`<wui-notification-center> needs its panel to open.`),t=N(G(this,za),`<wui-notification-center> needs its trigger to open.`);M(e)||(this._sheet=window.matchMedia(Za).matches,this._sheet?Ae(e,!0):ke(t,e,{mode:`auto`,onClosed:()=>this._closedByBrowser()}),M(e)&&this._layoutTabs())}_hidePanel(){let e=G(this,Ba);e&&M(e)&&(this._sheet?Ae(e,!1):j(e))}_closedByBrowser(){if(!this.isConnected||!this.hasAttribute(`open`))return;let e=G(this,Ba);this.close({restoreFocus:e?.contains(this.ownerDocument.activeElement)??!1})}get isOpen(){return this.hasAttribute(`open`)}open(){this.isOpen||(N(G(this,Ba),`<wui-notification-center> needs its panel to open.`),N(G(this,za),`<wui-notification-center> needs its trigger to open.`),this.setAttribute(`open`,``),this._syncOpen(),G(this,Ba)?.focus(),this._announceToggle())}close({restoreFocus:e=!1}={}){this.isOpen&&(this.removeAttribute(`open`),this._syncOpen(),e&&G(this,za)?.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(za)?.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(`${Wa}:not(.${Ga}):not([data-archived="true"])`).length}_click(e){let t=e.target;if(!(t instanceof Element))return;let n=t.closest(Ya);if(n instanceof HTMLElement&&this.contains(n)){if(this.hasAttribute(`controlled`))return;this._pickTab(n);return}let r=t.closest(`${za}, ${Ua}, ${Wa}`);r instanceof HTMLElement&&this.contains(r)&&(r.matches(za)?this.toggle():this.hasAttribute(`controlled`)||(r.matches(Ua)?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(Ba)?.contains(t)||t.closest(qa))return;let n=Qa[e.key];if(n===void 0)return;let r=to(this,Wa).filter(ia);if(r.length===0)return;let i=t.closest(Wa),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(Ga)||(this._applyRead(e),e.dataset.archived!==`true`&&(this._unread=Math.max(0,this._unread-1)),this._render(),this._say(fa(this._unread)),this._emitRead([e.dataset.id].filter($a),!1))}async _markAll(){if(this._busy)return;let e=to(this,`${Wa}:not(.${Ga})`);if(e.length===0&&this._unread===0)return;let t=e.map(e=>e.dataset.id).filter($a),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||eo()[e]||Ra().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(Ra().allReadText),this._emitRead(t,!0)}_pickTab(e){let t=e.closest(Ja);if(t instanceof HTMLElement){for(let n of to(t,Ya)){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 to(this,Ja)){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 to(this,Wa)){let r=n.dataset.archived===`true`,i=n.classList.contains(Ga),a=e===`archived`?r:!r&&(e!==`unread`||!i);a&&(t=!0);let o=n.closest(`li`);o&&(o.hidden=!a)}for(let e of to(this,`.wui-notification-center-list section`))e.hidden=[...e.querySelectorAll(`li`)].every(e=>e.hidden);let n=G(this,Xa);n&&(n.hidden=t)}_applyRead(e){e.classList.add(Ga),e.querySelector(Ka)?.remove()}_setBusy(e){this._busy=e;let t=this.querySelector(Ua);t instanceof HTMLButtonElement&&(t.disabled=e||this._unread===0,e?t.setAttribute(`aria-busy`,`true`):t.removeAttribute(`aria-busy`))}_render(){let e=G(this,Va);e&&(e.textContent=ua(this._unread),e.hidden=this._unread===0),this.querySelector(za)?.setAttribute(`aria-label`,da(this.getAttribute(`label`)||Ra().label,this._unread));let t=this.querySelector(Ua);t instanceof HTMLButtonElement&&(t.disabled=this._unread===0)}_say(e){let t=this.querySelector(Ha);t&&(t.textContent=e)}_emitRead(e,t){this.dispatchEvent(new CustomEvent(`wui:notification-center:read`,{bubbles:!0,detail:{ids:e,all:t}}))}},ro=`.wui-onboarding-card`,io=`.wui-onboarding-steps`,ao=`.wui-onboarding-toggle`,oo=`.wui-onboarding-dismiss`,so=`.wui-onboarding-restore`,co=`wui-onboarding:`,lo=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},uo=class extends s{constructor(){super(),this._onClick=e=>{let t=e.target instanceof Element?e.target:null;t&&(t.closest(oo)?this.dismiss():t.closest(so)?this.restore():t.closest(ao)&&this.toggle())}}connectedCallback(){this.addEventListener(`click`,this._onClick),this._stored()===`dismissed`&&this._setDismissed(!0)}disconnectedCallback(){this.removeEventListener(`click`,this._onClick)}get dismissed(){return lo(this,ro)?.hidden===!0}get collapsed(){return lo(this,io)?.hidden===!0}dismiss(){this.dismissed||(this._setDismissed(!0),this._store(`dismissed`),lo(this,so)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:dismiss`,{bubbles:!0})))}restore(){this.dismissed&&(this._setDismissed(!1),this._store(null),lo(this,ao)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:restore`,{bubbles:!0})))}toggle(){let e=lo(this,io);if(!e)return;let t=!e.hidden;e.hidden=t,this.querySelector(ao)?.setAttribute(`aria-expanded`,String(!t)),this.dispatchEvent(new CustomEvent(`wui:onboarding:collapse`,{bubbles:!0,detail:{collapsed:t}}))}_setDismissed(e){let t=lo(this,ro),n=lo(this,so);t&&(t.hidden=e),n&&(n.hidden=!e)}_key(){let e=this.getAttribute(`storage-key`);return e?co+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}}},fo=n({BUSY_CLASS:()=>po,isInert:()=>ho,isReadOnly:()=>mo,syncFieldState:()=>go}),po=`wui-field-busy`,mo=e=>e.hasAttribute(`readonly`),ho=e=>e.hasAttribute(`disabled`)||e.hasAttribute(`readonly`)||e.hasAttribute(`loading`);function go(e,t){let n=e.hasAttribute(`loading`);n?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`),t&&(t.classList.toggle(po,n),mo(e)?t.setAttribute(`aria-readonly`,`true`):t.removeAttribute(`aria-readonly`))}var _o=n({syncFormMirror:()=>xo,syncFormMirrors:()=>So}),vo=`data-wui-mirror`;function yo(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 bo(e){let t=document.createElement(`input`);return t.type=`hidden`,t.setAttribute(vo,``),e.appendChild(t),t}function xo(e,t){let n=e.getAttribute(`name`)??``,r=e.querySelector(`:scope > input[${vo}]`),i=r instanceof HTMLInputElement?r:null;n?(i||=bo(e),yo(e,i,n,t)):i?.remove()}function So(e,t){let n=e.getAttribute(`name`)??``,r=[...e.querySelectorAll(`:scope > input[${vo}]`)].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)=>{yo(e,r[i]??bo(e),n,t)})}var Co=/[^0-9]/g,wo=/[^0-9a-zA-Z]/g,To=class extends s{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),xo(this,this._value),this._paint()}_clean(e){return(e==null?``:String(e)).replace(this.mode===`alphanumeric`?wo:Co,``).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||``,xo(this,this._value),this._paint()}attributeChangedCallback(e,t,n){this._rendered&&(e===`value`?(this._value=this._clean(n),xo(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=mo(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,xo(this,this._value),go(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,xo(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(ho(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)}};R(To,`formAssociated`,!0);var Eo={label:`More`},Do=`data-wui-overflow-hidden`,Oo=`[aria-selected="true"], .active`,ko=`.chip-body, input, a[href], button:not(.chip-remove)`,Ao=()=>I(`overflow`,Eo),jo=1,Mo=`data-wui-overflow-menu`,No=`[aria-haspopup], [data-wui-dropdown-trigger]`,Po=0,Fo=e=>Number.parseFloat(e)||0,Io=e=>e.nodeType===1,Lo=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 Io(t)&&!t.matches(`svg, img, [aria-hidden='true'], [data-wui-dropdown-menu]`)&&r(t)};if(r(e),n.length)return n.join(` `);let i=Ro(e)??e;return i.getAttribute(`aria-label`)||e.getAttribute(`aria-label`)||i.title||e.title},Ro=e=>{if(e.matches(`button, a[href], label, input`))return e;let t=e.querySelector(ko);return t instanceof HTMLElement?t:null},zo=e=>{let t=Ro(e);return t?.matches(No)?t:null},Bo=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`)||Ao().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-${++Po}`,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(Do),e.removeAttribute(Mo);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=Fo(i.columnGap),o=Fo(i.paddingLeft)+Fo(i.paddingRight)+Fo(i.borderLeftWidth)+Fo(i.borderRightWidth),s=t.map(e=>e.offsetWidth);if(s.reduce((e,t)=>e+t,0)+a*(t.length-1)>n-o+jo){this._more.hidden=!1;let e=n-o-this._more.offsetWidth-Fo(getComputedStyle(this).columnGap),i=this.hasAttribute(`keep`)?this.getAttribute(`keep`):Oo,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(Do,``),zo(e)&&e.setAttribute(Mo,``);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(Do)):[]}_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=Ro(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=Lo(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=zo(e)?.isConnected?e.querySelector(`.dropdown-item:not([aria-disabled='true'])`):null;if(n){n.focus();return}let r=!e.hasAttribute(Do)&&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()}},Vo=`.wui-rating-star`,Ho=`wui-rating-star-preview`,Uo=`wui-rating-previewing`,Wo=`wui-rating-star-full`,Go=`wui-rating-star-empty`,Ko=[Wo,`wui-rating-star-half`,Go],qo=e=>[...e.querySelectorAll(Vo)].filter(e=>e instanceof HTMLElement),Jo=class extends s{constructor(){super(),R(this,`_onChange`,void 0),R(this,`_onOver`,void 0),R(this,`_onLeave`,void 0),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,Vo);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 qo(this))t.classList.remove(...Ko),t.classList.add(Number(t.dataset.value)<=e?Wo:Go)}_preview(e){this.classList.toggle(Uo,e>0);for(let t of qo(this))t.classList.toggle(Ho,e>0&&Number(t.dataset.value)<=e)}},Yo=class extends s{constructor(){super(),R(this,`_doc`,void 0),R(this,`_onKeyDown`,void 0),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()}},Xo={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`},Zo=6e4,Qo=60*Zo,$o=24*Qo,es=()=>I(`relativeTime`,Xo),ts={minute:`minutesAgoText`,hour:`hoursAgoText`,day:`daysAgoText`},ns={minute:`inMinutesText`,hour:`inHoursText`,day:`inDaysText`};function rs(e,t=Date.now()){let n=Rn(e);if(!Number.isFinite(n))return B();let r=t-n,i=Math.abs(r);if(i>=7*$o)return Bn(n);if(i<Zo)return es().justNowText;let[a,o]=i<Qo?[Math.floor(i/Zo),`minute`]:i<$o?[Math.floor(i/Qo),`hour`]:[Math.floor(i/$o),`day`];return Xe(es(),(r>0?ts:ns)[o],a)}function is(e){let t=Rn(e);return Number.isFinite(t)?`${Bn(t,{pattern:`datetime`})} IST`:B()}var as=3e4,os=new Set,ss=null,cs=()=>{if(!(typeof document<`u`&&document.hidden))for(let e of os)e.refresh()},ls=e=>{os.add(e),os.size===1&&(ss=setInterval(cs,as),document.addEventListener(`visibilitychange`,cs))},us=e=>{os.delete(e),os.size===0&&(clearInterval(ss??void 0),ss=null,document.removeEventListener(`visibilitychange`,cs))},ds=class extends s{constructor(){super(),R(this,`_observer`,void 0),this._observer=null}connectedCallback(){this.refresh(),ls(this),this._observer=new MutationObserver(()=>this.refresh()),this._observer.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`datetime`]})}disconnectedCallback(){us(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=rs(t);e.textContent!==n&&(e.textContent=n);let r=is(t);this.getAttribute(`data-wui-tooltip`)!==r&&this.setAttribute(`data-wui-tooltip`,r)}},fs=n({avatarNode:()=>ms,safeImageUrl:()=>ps}),ps=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 ms(e,t=`wui-opt-avatar`){let n=ps(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 hs={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`}]],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`}]]},gs=n({GLYPH_CHUNK:()=>_s,GLYPH_PENDING_ATTRIBUTE:()=>vs,glyphNode:()=>Ds,registerGlyphs:()=>ks}),_s=`glyphs`,vs=`data-wui-glyph-pending`,ys=`svg[${vs}]`,bs=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,xs={...hs},Ss=new Map,Cs=!1,ws=null;function Ts(e){return Xr(xs,e)?xs[e]:void 0}function Es(e,t,n,r){return{class:n?`wui-icon ${n}`:`wui-icon`,"data-icon":e,[vs]:r?!0:void 0,width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`}}function Ds(e,{size:t=16,className:n=``}={}){let r=Ts(e);if(r!==void 0){let i=`${e}|${t}|${n}`,a=Ss.get(i);return a===void 0&&(a=Wr(Es(e,t,n,!1),r),Ss.set(i,a)),Le(a.cloneNode(!0),SVGSVGElement,`glyphNode: ${e} did not clone to an svg`)}return Cs||!bs.test(e)?null:(Promise.allSettled([vi(_s)]),Wr(Es(e,t,n,!0),[]))}function Os(e){let t=e instanceof Element&&e.matches(ys)?[e]:[];for(let n of[...t,...e.querySelectorAll(ys)]){let e=Ts(n.getAttribute(`data-icon`)??``);e===void 0?n.remove():(n.removeAttribute(vs),n.replaceChildren(...Ur(e)))}}function ks(e){Object.assign(xs,e),Cs=!0,Os(document),ws===null&&(ws=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&Os(e)}),ws.observe(document.documentElement,{childList:!0,subtree:!0}))}var As=n({createListboxKeyNav:()=>Ms,moveActiveRow:()=>Ns}),js=e=>e.target instanceof Element?e.target.tagName:void 0;function Ms(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=js(e)===`INPUT`||js(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(Br(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&&js(e)!==`INPUT`&&js(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 Ns(e,t){let n=e.querySelector(`.is-active`);n!==t&&(n?.classList.remove(`is-active`),t?.classList.add(`is-active`))}var Ps=n({TRUSTED_LABEL:()=>Fs,optionLabelNodes:()=>Vs,optionText:()=>Hs,stripTags:()=>Rs,withTrustedLabel:()=>Is}),Fs=Symbol(`wui.trustedLabel`),Is=(e,t)=>{let n=document.createDocumentFragment();return n.append(t.cloneNode(!0)),{...e,[Fs]:n}},Ls=e=>`wui-flag wui-flag-${e}`,Rs=e=>String(e??``).replace(/<[^>]*>/g,``),zs=e=>{if(!e)return null;let t=String(e).toLowerCase().replace(/[^a-z0-9-]/g,``);return t?Ds(t):null},Bs=e=>{let t=String(e??``).toLowerCase();return/^[a-z]{2}$/.test(t)?F(`span`,{class:Ls(t),"aria-hidden":`true`}):null};function Vs(e){if(e==null)return[];let t=Bs(e.flag),n=zs(e.icon),r=e[Fs],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 Hs=e=>{if(e==null)return``;let t=e[Fs];return t?t.textContent??``:Rs(e.label)},Us=n({SELECT_TEXT:()=>Ws}),Ws={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…`},Gs=n({clearOptions:()=>$s,drawn:()=>Js,filterOptions:()=>qs,nodesSignature:()=>Xs,optionRow:()=>sc,posAttrMap:()=>Ys,refreshWindow:()=>rc,registerWindowImpl:()=>Qs,renderOptions:()=>ec,revealRow:()=>ic,rowId:()=>tc,rowIndexByPrefix:()=>oc,rowIndexOfValue:()=>ac}),Ks=()=>I(`select`,Ws);function qs(e,t){let n=String(t??``).trim().toLowerCase();return n?e.filter(e=>[Hs(e),e.description,e.meta].some(e=>String(e??``).toLowerCase().includes(n))):e}var Js=new WeakMap,Ys=e=>e?{"data-index":String(e.index),"aria-setsize":String(e.size),"aria-posinset":String(e.index+1)}:{},Xs=e=>e.map(e=>e instanceof Element?e.outerHTML:e.textContent??``).join(``),Zs;function Qs(e){Zs=e}function $s(e){Zs?.clear(e),Js.delete(e),e.replaceChildren()}function ec(e,t,n={}){let{selected:r=[],query:i=``,status:a=`idle`,emptyText:o=Ks().emptyText,searchingText:s=Ks().searchingText,hintText:c=Ks().hintText,actionRow:l=[],recents:u=null}=n,d=new Set(r.map(String)),f=qs(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=Zs,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:tc(p,t),class:`wui-select-option wui-select-add`,"data-value":String(e.value??``),"data-custom":`true`,"aria-selected":`false`,...Ys(x(t))},e.label)},w=e=>{let t=S++;return sc(e,tc(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:Xs(n),postSig:Xs(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=Xs(te);return Js.get(e)===ne||(Js.set(e,ne),e.replaceChildren(...te)),{rows:S,windowed:!1,long:v}}var tc=(e,t)=>`${e}-opt-${t}`,nc=e=>[...e.querySelectorAll(`.wui-select-option`)];function rc(e){return Zs?Zs.refresh(e):!1}function ic(e,t){return Zs?Zs.reveal(e,t):nc(e)[t]??null}function ac(e,t){if(Zs)return Zs.indexOfValue(e,t);let n=new Set(t.map(String));return nc(e).findIndex(e=>n.has(e.dataset.value??``))}function oc(e,t){return Zs?Zs.indexByPrefix(e,t):nc(e).findIndex(e=>(e.textContent??``).trim().toLowerCase().startsWith(t))}function sc(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,...Ys(r)},o=F(`span`,{class:`wui-select-check`,"aria-hidden":`true`},Ds(`check`));if(!e.description&&!e.meta)return F(`button`,{type:`button`,class:`wui-select-option${n?` selected`:``}`,...a},ms(e),F(`span`,{class:`wui-select-opt-name`},...Vs(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},ms(e),F(`span`,{class:`wui-select-option-text`},F(`span`,{class:`wui-opt-label`},...Vs(e)),s),c,o)}var cc=Object.freeze([`single`,`multiple`,`search`,`tag`,`country`]),lc=e=>e===`multiple`||e===`tag`,uc=n({registerSelectPart:()=>fc,selectPart:()=>pc}),dc=new Map;function fc(e,t){dc.set(e,t)}function pc(e){return dc.get(e)}var mc={chips:`select-chips`,search:`select-search`,country:`phone`,recents:`select-recents`};function hc(e){let t=Xr(mc,e)?mc[e]:void 0;if(!t)return Promise.reject(Error(`Unknown <wui-select> part: ${e}.`));let n=pc(e);return n?Promise.resolve(n):vi(t).then(()=>N(pc(e),`The ${e} part of <wui-select> did not register.`))}var gc=n({searchesRemotely:()=>_c}),_c=e=>typeof e.loadOptions==`function`||!!e.getAttribute(`source`)||e.hasAttribute(`remote`),vc=()=>vi(`select-window`),yc={requiredFieldMessage:`Please fill in this field.`},bc={clearLabel:`Clear search`,placeholder:`Search…`,searchLabel:`Search`},xc=n({WuiSelect:()=>Tc}),Sc=()=>I(`select`,Ws),Cc=()=>I(`search`,bc),wc=()=>I(`field`,yc),Tc=class extends s{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(),R(this,`_internals`,void 0),R(this,`_value`,void 0),R(this,`_optionsProp`,void 0),R(this,`_partOptions`,void 0),R(this,`_known`,void 0),R(this,`_loadOptionsFn`,void 0),R(this,`_validateFn`,void 0),R(this,`_declared`,void 0),R(this,`_query`,void 0),R(this,`_ownsFilter`,void 0),R(this,`_active`,void 0),R(this,`_rows`,void 0),R(this,`_windowed`,void 0),R(this,`_windowLoad`,void 0),R(this,`_windowFailed`,void 0),R(this,`_scrollFrame`,void 0),R(this,`_status`,void 0),R(this,`_error`,void 0),R(this,`_nav`,void 0),R(this,`_parts`,void 0),R(this,`_partSig`,void 0),R(this,`_partsMounted`,void 0),R(this,`_partToken`,void 0),R(this,`_rendered`,void 0),R(this,`_searchShown`,void 0),R(this,`_defaultValue`,void 0),R(this,`_warnedMode`,void 0),R(this,`_warnedDensity`,void 0),R(this,`_hoverTimer`,void 0),R(this,`_hoverOpened`,void 0),R(this,`_onHoverOver`,void 0),R(this,`_onHoverOut`,void 0),R(this,`_panelShown`,void 0),R(this,`_pressOpen`,void 0);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)},kc)))},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()},Ac)))}}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=Ic(n,lc(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=Ic(this._value,lc(this.mode)),this._partOptions=null,this._known.clear(),this._ensureParts()),(e===`source`||e===`remote`||e===`recents-key`)&&this._ensureParts(),Pc.has(e)?this._rendered&&(this._drawValue(),this.renderList()):Nc.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`:Dc(e)?e:(e!==this._warnedMode&&(this._warnedMode=e,Jr(`<wui-select> mode "${e}" is not one of ${cc.join(`, `)}; it is treated as "single".`)),`single`)}_checkDensity(){let e=this.getAttribute(`density`);e===null||Oc.includes(e)||e===this._warnedDensity||(this._warnedDensity=e,Jr(`<wui-select> density "${e}" is not one of ${Oc.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=Ic(e,lc(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(){ho(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=qs(this._listOptions(),t).length+n.length+(r?.options.length??0),this._windowed=!1,$s(e.list),this._anchorMenu();return}let i=ec(e.list,this._listOptions(),{selected:this._selectedValues(),query:t,status:this._status,emptyText:this.getAttribute(`empty-text`)||Sc().emptyText,searchingText:this.getAttribute(`searching-text`)||Sc().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=lc(t),r=t===`tag`,i=n&&(r||this.hasAttribute(`allow-custom`));this._value=Ic(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=Ic(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`);if(!this.id){let e=crypto.getRandomValues(new Uint8Array(8));this.id=`wui-select-${Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``)}`}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?Ds(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":Sc().clearSelectionLabel,hidden:!0},Ds(`x`)):null,Ds(`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`?Sc().countrySearchPlaceholder:Cc().placeholder),E=F(`div`,{class:`wui-select-menu wui-select-menu-fixed`,popover:`auto`},w?F(`div`,{class:`wui-select-search`},Ds(`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":Cc().clearLabel,hidden:!0},Ds(`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(),go(this,this.querySelector(`.wui-select-control`)),this._mountParts(e)}_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||Sc().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`)??Hc(e).trim(),label:t.textContent??``,selected:e.hasAttribute(`selected`)};for(let[t,r]of Fc){let i=e.getAttribute(t);i&&(n[r]=i)}return e.hasAttribute(`disabled`)&&(n.disabled=!0),Is(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`)||Mc()[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(){lc(this.mode)?So(this,this._selectedValues()):xo(this,this._value)}_drawValue(){let e=this._refs();if(!e.value)return;let t=lc(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?Vs(n):r?[r]:[])}_syncTitle(e){let t=this.querySelector(`.wui-select-control`);if(!t)return;let n=e&&!this.hasAttribute(`title`)?Hs(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=!lc(this.mode)&&this._hasValue()?ms({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},wc().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()&&!ho(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&&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`)||ho(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>jc}_visible(){let e=this._refs();return e.list?Vc(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?ic(n.list,e):null)),Ns(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&&rc(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=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?ac(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=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:Hc(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);lc(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`&&_c(this)}_onKeyDown(e){if(!ho(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`||Br(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(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=Ms({getVisibleOptions:()=>this._visible(),getActive:()=>this._active,setActive:e=>this._setActive(e),getCount:()=>this._rowCount(),getOptionAt:e=>this._rowEl(e),findByPrefix:e=>this._windowed?oc(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()&&!ho(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(ho(this))return;this._refs().input?.focus(),!this._menuOpen()&&this._draftOpens()&&this._open({focus:!1});return}if(e.target instanceof HTMLInputElement){!this._menuOpen()&&!ho(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():ho(this)||this._open({focus:!0})}),a?.addEventListener(`click`,e=>{e.stopPropagation(),this.commit(lc(this.mode)?[]:``),this._close(),t.focus()}),n.addEventListener(`click`,n=>{let r=Bc(n).closest(`.wui-select-option`);if(r instanceof HTMLElement&&(this._pick(r),lc(this.mode))){let n=this.querySelector(`.wui-select-draft`);(e.search??(n instanceof HTMLElement?n:t)).focus()}}),n.addEventListener(`mousedown`,e=>{lc(this.mode)&&e.target instanceof Element&&e.target.closest(`.wui-select-option`)&&e.preventDefault()}),n.addEventListener(`mousemove`,e=>{let t=Bc(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&&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=Rc(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=>Uc(this,e))).then(e=>{n===this._partToken&&(this._parts=e.filter(e=>e!==null),this._mountParts())})}_loadWindow(){this._windowLoad===null&&(this._windowLoad=vc().then(()=>this.renderList(),()=>{this._windowFailed=!0,document.dispatchEvent(new CustomEvent(ri,{bubbles:!0,composed:!0,detail:{chunk:`select-window`}})),this.setError(Sc().partLoadMessage)}))}_mountParts(e={draft:``,query:``}){if(!this._parts||this._partsMounted||!this._rendered||!this.isConnected)return;this._partsMounted=!0;let t=Ec(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??``}}};R(Tc,`formAssociated`,!0);var Ec=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}},Dc=e=>cc.includes(e),Oc=[`comfortable`,`compact`],kc=150,Ac=250,jc=10,Mc=()=>{let e=Sc();return{single:e.placeholder,search:e.placeholder,multiple:e.placeholder,tag:e.tagPlaceholder,country:e.countryPlaceholder}},Nc=new Set([`countries`,`suggested`,`suggested-label`,`all-countries-label`,`max-tags`,`pattern`,`collapse-chips`,`source`,`remote`,`min-chars`]),Pc=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`]),Fc=[[`icon`,`icon`],[`description`,`description`],[`meta`,`meta`],[`group`,`group`],[`avatar`,`avatar`],[`initials`,`initials`],[`disabled-hint`,`disabledHint`]],Ic=(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),Lc=(e,t)=>t===`multiple`?_c(e)?[`chips`,`search`]:[`chips`]:t===`search`?[`search`]:t===`country`?[`country`]:t===`tag`?_c(e)?[`chips`,`search`]:[`chips`]:[],Rc=(e,t)=>e.hasAttribute(`recents-key`)?[`recents`,...Lc(e,t)]:Lc(e,t),zc=e=>typeof e==`object`&&!!e&&`default`in e&&typeof e.default==`function`,Bc=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},Vc=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Hc=e=>{let t=e.textContent;if(t===null)throw Error(`The element has no text.`);return t},Uc=(e,t)=>hc(t).then(e=>{if(!zc(e))throw Error(`The part ${t} has no default export.`);return e.default()}).catch(()=>(document.dispatchEvent(new CustomEvent(ri,{bubbles:!0,composed:!0,detail:{chunk:t}})),e.setError(Sc().partLoadMessage),null)),Wc=`wui-shortcuts-open-change`;function Gc(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}function Kc(e,t){return[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement)}var qc=class extends s{static get observedAttributes(){return[`open`,`no-trigger`]}constructor(){super(),R(this,`_doc`,void 0),R(this,`_onKeyDown`,void 0),R(this,`_onClick`,void 0),R(this,`_onDocClick`,void 0),R(this,`_onPointerDown`,void 0),R(this,`_onPressEnd`,void 0),R(this,`_pressedOpen`,void 0),R(this,`_pinned`,void 0),R(this,`_mirroring`,void 0),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=Gc(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)&&Gc(n,`.wui-shortcut-close`)?.focus()}):r?.focus())}_mirror(e){let t=this._sheet();t&&(t.hidden=!e),Gc(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(Wc,{bubbles:!0,detail:{open:e}})))}_sheet(){return Gc(this,`.wui-shortcut-sheet`)}_syncTrigger(){let e=Gc(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?Kc(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`);(Gc(this._scope()??t,e)??Gc(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=Kc(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?Gc(i,u):null;d&&(e.preventDefault(),d.click())}},Jc={lessLabel:`Show less`,moreLabel:`Show more`},Yc=3,Xc=()=>I(`showMore`,Jc),Zc=class extends s{constructor(){super(),R(this,`_width`,void 0),R(this,`_observer`,void 0),R(this,`_toggle`,void 0),R(this,`_onClick`,void 0),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:Yc)),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`)||Xc().lessLabel:this.getAttribute(`more-label`)||Xc().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}},Qc=class extends s{constructor(){super(),R(this,`_measure`,void 0),R(this,`_resize`,void 0),R(this,`_mutation`,void 0),R(this,`_ownTabindex`,void 0),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)))}},$c=`wui-whats-new-read`,el=`wui-whats-new:`,tl=`data-wui-unread`,nl=0,rl=e=>{let t=Date.parse(e);return Number.isNaN(t)?-1/0:t},il=(e,t)=>rl(t)>rl(e)?t:e,al=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},ol=class extends s{static get observedAttributes(){return[`storage-key`,`read-through`,`indicator`]}constructor(){super(),R(this,`_doc`,void 0),R(this,`_stored`,void 0),R(this,`_observer`,void 0),R(this,`_onTriggerClick`,void 0),R(this,`_closeFocus`,void 0),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 al(this,`.wui-whats-new-trigger`)}get _panel(){return al(this,`.wui-whats-new-panel`)}get _dot(){return al(this,`.wui-whats-new-dot`)}connectedCallback(){this._doc=this.ownerDocument;let e=this._panel,t=this._trigger;e&&t&&(e.id||=`wui-whats-new-${++nl}`,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})=>il(e,t),``)}_seenPoint(){return il(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=rl(i)>rl(e);t&&n++,this.isOpen&&r.hasAttribute(tl)||r.toggleAttribute(tl,t)}this.toggleAttribute(tl,n>0);let r=this._dot;r&&(r.textContent=this.getAttribute(`indicator`)===`count`&&n>0?String(n):``)}_markRead(){let e=this._newest();!e||rl(e)<=rl(this._seenPoint())||(this._stored=il(this._stored,e),this._save(this._stored),this._refresh(),this.dispatchEvent(new CustomEvent($c,{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:el+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)}},sl=n({APP_BUTTON_MARKER:()=>cl,buttonClass:()=>fl}),cl=`AppButton`,ll=new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),ul={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 dl(e){return Xr(ul,e)}function fl(e=`primary`,t=`solid`,n=`md`){if(!ll.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!dl(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=ul[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}var pl=n({DISPLAY_FORMAT:()=>yl,MONTH_DISPLAY_FORMAT:()=>Cl,YEAR_DISPLAY_FORMAT:()=>Dl,clampMonth:()=>Al,daysIn:()=>kl,firstWeekday:()=>hl,fmt:()=>bl,fmtMonth:()=>wl,fmtYear:()=>Ol,pad:()=>gl,parseIso:()=>vl,parseIsoMonth:()=>xl,parseIsoYear:()=>Tl,toIso:()=>_l,toIsoMonth:()=>Sl,toIsoYear:()=>El}),ml=e=>{let t=String(e??``).trim();return/^[0-6]$/.test(t)?Number(t):null},hl=e=>ml(e.getAttribute(`first-day`))??ml(getComputedStyle(e).getPropertyValue(`--wui-first-day`))??1,gl=e=>String(e).padStart(2,`0`),_l=(e,t,n)=>`${e}-${gl(t+1)}-${gl(n)}`,vl=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>kl(a,o-1)?null:{y:a,m:o-1,d:s}},yl=`dd-MMM-yyyy`,bl=(e,t=yl)=>{let n=vl(e);if(!n)return``;let r={yyyy:n.y,MMMM:mn(n.m),MMM:pn(n.m),MM:gl(n.m+1),dd:gl(n.d),d:n.d};return(t||`dd-MMM-yyyy`).replace(/yyyy|MMMM|MMM|MM|dd|d/g,e=>String(r[e]))},xl=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}},Sl=(e,t)=>`${e}-${gl(t+1)}`,Cl=`MMM yyyy`,wl=(e,t=Cl)=>{let n=xl(e);if(!n)return``;let r={yyyy:n.y,MMMM:mn(n.m),MMM:pn(n.m),MM:gl(n.m+1)};return(t||`MMM yyyy`).replace(/yyyy|MMMM|MMM|MM/g,e=>String(r[e]))},Tl=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}},El=e=>String(e).padStart(4,`0`),Dl=`yyyy`,Ol=(e,t=Dl)=>{let n=Tl(e);return n?(t||`yyyy`).replace(/yyyy/g,String(n.y)):``},kl=(e,t)=>{let n=new Date(0);return n.setFullYear(e,t+1,0),n.getDate()},Al=(e,t)=>{for(;t<0;)t+=12,--e;for(;t>11;)t-=12,e+=1;return{y:e,m:t}},jl=n({COPY_FEEDBACK_MS:()=>Ml,copyTextToClipboard:()=>Nl}),Ml=2e3;async function Nl(e){if(!navigator.clipboard?.writeText)return!1;try{return await navigator.clipboard.writeText(e),!0}catch(e){if(!(e instanceof DOMException))throw e;return!1}}var Pl=n({MENTION_ID_PATTERN:()=>Fl,mentionLabel:()=>Rl,mentionTextFromValue:()=>Vl,mentionValueFromText:()=>Hl,mentionedIds:()=>Ul,parseMentionValue:()=>Bl}),Fl=/^[A-Za-z0-9_.:-]{1,64}$/,Il=/@(\\+)\[|@\[([^[\]\n]{1,100})\]\(([A-Za-z0-9_.:-]{1,64})\)/g,Ll=/@(\\*)\[/g;function Rl(e){return String(e??``).replace(/[[\]\r\n]+/g,` `).replace(/\s+/g,` `).trim().slice(0,100)}var zl=e=>e.replace(Ll,(e,t)=>`@\\${t}[`);function Bl(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(Il))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 Vl(e){let t=``,n=[];for(let r of Bl(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 Hl(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}`||!Fl.test(e.id)||(i+=zl(n.slice(a,e.start)),i+=`@[${e.label}](${e.id})`,a=e.end);return i+zl(n.slice(a))}function Ul(e){let t=[];for(let n of Bl(e))`id`in n&&!t.includes(n.id)&&t.push(n.id);return t}var Wl=n({bindMenuKeys:()=>Yl}),Gl=500,Kl=10,ql=new Set([`INPUT`,`TEXTAREA`,`SELECT`]);function Jl(e){return e instanceof HTMLElement?ql.has(e.tagName)||e.isContentEditable:!1}function Yl(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(ia),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=Jl(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)+Kl,s-1));return}if(e.key===`PageUp`){u(Math.max((l<0?s:l)-Kl,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,Gl);let f=i.length>1&&Array.from(i).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 Xl=n({FALLBACK_ROW_HEIGHT:()=>36,SELECT_WINDOW_OVERSCAN:()=>8,createHeightIndex:()=>Ql,scrollTopToReveal:()=>eu,windowRange:()=>$l}),Zl=.5;function Ql(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)<=Zl||(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)<=Zl?!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 $l(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 eu(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 tu=n({parseServerHtml:()=>nu});function nu(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content}var ru=n({deriveStepStatus:()=>iu,stepperHeaderItems:()=>au});function iu(e,t){return typeof t==`number`?e<t?`done`:e===t?`active`:`pending`:`pending`}function au(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 ou={selectAllLabel:`Select all rows`,selectRowLabel:`Select row`},su=n({SELECT_CELL_CLASS:()=>q,addRowSelectCells:()=>gu,addSelectColumn:()=>_u,attachShiftRange:()=>bu,createSelectHeaderCell:()=>uu,createSelectRowCell:()=>du,createSelectSpacerCell:()=>fu,syncSelectAll:()=>vu}),cu=()=>I(`tableSelect`,ou),q=`wui-select-cell`,lu=(e,t)=>{let n=e.createElement(`input`);return n.type=`checkbox`,n.className=`wui-check`,n.setAttribute(`aria-label`,t),n};function uu(e=document){let t=e.createElement(`th`);return t.className=q,t.appendChild(lu(e,cu().selectAllLabel)),t}function du(e=document,{disabled:t=!1}={}){let n=e.createElement(`td`);n.className=q;let r=lu(e,cu().selectRowLabel);return r.disabled=t,n.appendChild(r),n}function fu(e=document){let t=e.createElement(`td`);return t.className=q,t}var pu=e=>e.firstElementChild?.classList.contains(q),mu=e=>e.matches(`.wui-group-row, .wui-virtual-spacer, .wui-row-expanded`),hu=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n);function gu(e){for(let t of e){if(pu(t)||mu(t))continue;let e=t.getAttribute(`data-row-selectable`)===`false`;t.insertBefore(du(t.ownerDocument,{disabled:e}),t.firstChild)}}function _u(e){let t=e.querySelector(`thead tr`);if(!(t instanceof HTMLTableRowElement))return null;pu(t)||t.insertBefore(uu(e.ownerDocument),t.firstChild),gu(hu(e,`tbody tr`,HTMLTableRowElement));for(let t of hu(e,`tfoot tr`,HTMLTableRowElement))pu(t)||t.insertBefore(fu(e.ownerDocument),t.firstChild);let n=t.querySelector(`.${q} .wui-check`);return n instanceof HTMLInputElement?n:null}function vu(e){let t=e.querySelector(`thead .${q} .wui-check`),n=hu(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 hu(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 yu=`tbody .${q} .wui-check:not(:disabled)`;function bu(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=hu(e,yu,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 xu=n({DATE_PICKER_TEXT:()=>Su}),Su={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}.`},Cu=n({DRAWER_TEXT:()=>wu}),wu={closeLabel:`Close`,confirmDiscard:`Discard your changes?`,discardLabel:`Discard`,keepLabel:`Keep editing`,screenText:`{now}% of the screen`,sheetHeightLabel:`Sheet height`},Tu=n({matchSegments:()=>Eu});function Eu(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 Du=n({TOOLTIP_ATTRIBUTE:()=>Ou,TOOLTIP_CLASS_ATTRIBUTE:()=>Au,TOOLTIP_ID_ATTRIBUTE:()=>ju,TOOLTIP_OPEN_ATTRIBUTE:()=>Mu,TOOLTIP_PLACEMENT_ATTRIBUTE:()=>ku,TOOLTIP_SHORTCUT_ATTRIBUTE:()=>Nu,showPinnedTooltips:()=>Fu,wireTooltips:()=>Pu}),Ou=`data-wui-tooltip`,ku=`data-wui-tooltip-placement`,Au=`data-wui-tooltip-class`,ju=`data-wui-tooltip-id`,Mu=`data-wui-tooltip-open`,Nu=`data-wui-tooltip-shortcut`;function Pu(e){zu.has(e)||(zu.add(e),e.addEventListener(`pointerover`,t=>{let n=Wu(t.target);n&&!Ku(e,n)&&Yu(e,n,!1)}),e.addEventListener(`pointerout`,t=>{let n=Vu(e).transient;n&&Wu(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||Xu(e,n))}),e.addEventListener(`focusin`,t=>{let n=t.target;if(!(n instanceof Element)||!n.matches(`:focus-visible`))return;let r=Wu(n);r&&!Ku(e,r)&&Yu(e,r,!1)}),e.addEventListener(`focusout`,t=>{let n=Vu(e).transient;n&&Wu(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||Xu(e,n))}),e.addEventListener(`click`,t=>{let n=Vu(e).transient;n&&Wu(t.target)===n.trigger&&Xu(e,n)}))}function Fu(e){let t=e instanceof Document?e:e.ownerDocument;for(let n of e.querySelectorAll(`[${Mu}]`))Yu(t,n,!0)}var Iu=[`top`,`bottom`,`start`,`end`],Lu=`wui-tooltip`,Ru=`[${Ou}], [${ju}]`,zu=new WeakSet,Bu=new WeakMap;function Vu(e){let t=Bu.get(e);return t||(t={bubble:null,transient:null,pinned:new Map,pinnedCount:0,onEscape:t=>{t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),Zu(e))}},Bu.set(e,t)),t}function Hu(e){return Iu.includes(e)}function Uu(e){return e===`auto`||Hu(e)}function Wu(e){if(!(e instanceof Element))return null;let t=e.closest(Ru);return t instanceof HTMLElement?t:null}function Gu(e,t){return e.transient?.trigger===t?e.transient:e.pinned.get(t)}function Ku(e,t){return Gu(Vu(e),t)!==void 0}function qu(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 Ju(e,t){return t.bubble||=qu(e,Lu),t.bubble}function Yu(e,t,n){let r=t.getAttribute(Ou),i=t.getAttribute(ju);if(r===null&&i===null)throw Error(`a tooltip trigger carries ${Ou} or ${ju}`);if(r!==null&&i!==null)throw Error(`a tooltip trigger carries ${Ou} or ${ju}, not both`);let a=t.getAttribute(`data-wui-tooltip-placement`)??`top`;if(!Uu(a))throw Error(`${ku} "${a}" is not auto, top, bottom, start or end`);let o=Vu(e);Xu(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?qu(e,`${Lu}-pinned-${++o.pinnedCount}`):Ju(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(Nu);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||Xu(e,Gu(Vu(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 Xu(e,t){if(!t)return;let n=Vu(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 Zu(e){let t=Vu(e);Xu(e,t.transient);for(let n of[...t.pinned.values()])Xu(e,n)}var Qu=Object.freeze({anchorOverlay:d,avatarNode:fs,buttonClass:sl,calendarMath:pl,copyText:jl,dataTable:Yn,datePickerText:xu,defineElement:r,devWarn:qr,dom:Ie,drawerText:Cu,elementBase:a,fieldState:fo,formatters:$t,formMirror:_o,glyphs:gs,hasOwn:Yr,httpFailureText:Ia,iconGlyphs:gs,imeSafeEnter:Rr,isDrawn:ra,listboxKeyNav:As,loader:ti,mentionText:Pl,menuKeyNav:Wl,nativeOverlay:D,notificationDays:oa,optionLabel:Ps,partRegistry:uc,rtl:c,selectList:Gs,selectRemote:gc,selectText:Us,selectWindow:Xl,serverHtml:tu,stepperHeader:ru,svgNodes:Vr,tableExport:Ci,tableSelect:su,textMatch:Tu,textStore:Re,tooltips:Du,wuiHttp:ba,WuiSelect:xc,zone:Vt}),$u={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`},ed=`image/jpeg,image/png,image/webp,image/heic,image/heif,.heic,.heif`,td=10,nd=512,rd=`image/webp`,id=[96,48];function ad(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 od(e){let t=I(`imagePicker`,$u);return ad(e)?t.heicUnreadableMessage:t.photoUnreadableMessage}function sd(e,t){let n=Number(t);return{name:e?.name||`photo`,type:rd,size:Number.isInteger(n)&&n>0?n:512}}var cd=`/`,ld=`.search-wrap.wui-search-collapsible`,ud=`.wui-topsearch-panel`,dd=`.modal, wui-drawer[open]`,fd=new WeakSet,pd=e=>{let t=e.querySelector(`.wui-search-toggle`);return t instanceof HTMLElement?t:null},md=e=>{let t=e.querySelector(`.search-input`);return t instanceof HTMLInputElement?t:null},hd=e=>[...e.querySelectorAll(ld)].filter(e=>e instanceof HTMLElement);function gd(e){e.classList.remove(`is-collapsed`),pd(e)?.setAttribute(`aria-expanded`,`true`),md(e)?.focus()}function _d(e){md(e)?.value||(e.classList.add(`is-collapsed`),pd(e)?.setAttribute(`aria-expanded`,`false`))}function vd(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=pd(e),n=md(e);t?.addEventListener(`click`,()=>gd(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n?.value||(r.preventDefault(),_d(e),t?.focus())}),e.addEventListener(`focusout`,t=>{let n=t.relatedTarget;n instanceof Node&&e.contains(n)||_d(e)})}function yd(e){fd.has(e)||(fd.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(dd)||e.querySelector(ud))return;let n=hd(e).find(e=>e.offsetParent!==null);n&&(t.preventDefault(),gd(n))}))}function bd(e=document){let t=e;for(let e of hd(t))vd(e);yd(e instanceof Element?e.ownerDocument:e)}var xd=`data-wui-command-shortcut`,Sd=`k`,Cd=new WeakSet;function wd(e,t){return!(e.ctrlKey||e.metaKey)||e.altKey||e.shiftKey||e.repeat?!1:String(e.key).toLowerCase()===String(t).toLowerCase()}function Td(e){return e.nodeType===Node.DOCUMENT_NODE}function Ed(e){e.closest(`wui-modal`)?.show()}function Dd(e){let t=Td(e)?e:e.ownerDocument;!Cd.has(t)&&e.querySelector(`[data-wui-command-shortcut]`)&&(Cd.add(t),t.addEventListener(`keydown`,e=>{for(let n of t.querySelectorAll(`[${xd}]`))if(wd(e,n.getAttribute(`data-wui-command-shortcut`)||Sd)){e.preventDefault(),n.localName===`wui-command-palette`||n.localName===`wui-modal`?Ed(n):(n.focus(),`select`in n&&typeof n.select==`function`&&n.select());return}}))}var Od={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`},kd=()=>I(`fileValidation`,Od),Ad=`image/png,image/jpeg,image/webp`,jd=5,Md={"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`]},Nd={"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`},Pd={"text/plain":`textFileLabel`,".txt":`textFileLabel`,"image/*":`imagesLabel`,"video/*":`videosLabel`,"audio/*":`audioLabel`},Fd=new Set([`image/*`,`video/*`,`audio/*`]),Id=e=>{let t=Pd[e];return t?kd()[t]:Nd[e]},Ld=e=>String(e||``).split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean),Rd=[`.png`,`.jpg`,`.jpeg`,`.webp`,`.gif`,`.svg`,`.bmp`,`.avif`,`.heic`,`.heif`];function zd(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 Rd.some(e=>r.endsWith(e))}var Bd=[`kilobyteLabel`,`megabyteLabel`,`gigabyteLabel`];function Vd(e){if(e<1024)return`${e} ${kd().byteLabel}`;let t=e/1024,n=0;for(;t>=1024&&n<Bd.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${kd()[Bd[n]??`gigabyteLabel`]}`}function Hd(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 Ud(e){let t=Ld(e);return t.length?t.every(e=>e.startsWith(`.`)?Rd.includes(e):e===`image/*`||e.startsWith(`image/`)):!1}function Wd(e){let t=[];for(let n of Ld(e)){let e=Id(n)||(n.startsWith(`.`)?n.slice(1).toUpperCase():n.toUpperCase());t.includes(e)||t.push(e)}return t.length<=1?t[0]||kd().supportedLabel:L(kd().orText,{names:t.slice(0,-1).join(`, `),last:t.slice(-1).join(``)})}function Gd(e,t){let n=Ld(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&&(Md[e]||[]).some(e=>i.endsWith(e)))}function Kd(e,t={}){if(!e)return null;let n=t.accept===void 0?Ad:t.accept,r=t.maxSizeMb===void 0?5:t.maxSizeMb;if(!Gd(e,n)){let e=Wd(n),t=Ld(n).map(e=>Fd.has(e));return t.every(Boolean)?L(kd().chooseText,{label:e}):t.some(Boolean)?L(kd().chooseText,{label:e.endsWith(` file`)?`${e}s`:`${e} files`}):L(kd().chooseText,{label:`a ${e.endsWith(` file`)?e:`${e} file`}`})}return r!==null&&r>0&&e.size>r*1024*1024?L(kd().keepFileUnderMbText,{maxSizeMb:r}):null}function qd(e,t){let n=Array.from(e||[]),r=t.multiple?n:n.slice(0,1),i=[],a=[];for(let e of r){let n=Kd(e,{accept:t.accept,maxSizeMb:t.maxSizeMb});n?a.push({file:e,message:n}):i.push(e)}return{files:i,rejections:a}}function Jd(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}=qd(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 Yd={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`},Xd=/[0-9]/,Zd={9:Xd,A:/[A-Za-z]/,"*":/[0-9A-Za-z]/},Qd=/[9A*]/,$d=new Set([`text`,`tel`,`search`,`url`,`password`]),ef=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},tf=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},nf=e=>e.length<=3?e:`${e.slice(0,-3).replace(/\B(?=(\d{2})+(?!\d))/g,`,`)},${e.slice(-3)}`,rf=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());return t?`${t[3]}-${t[2]}-${t[1]}`:e},af=()=>I(`inputMask`,Yd);function of(e,{upper:t=!1,normalize:n,valid:r,post:i=e=>e,message:a=af().incompleteMessage}={}){let o=[...e].map(e=>{let t=Zd[e];return t?{re:t}:{lit:e}}),s=o.filter(e=>e.re).length;return{inputMode:o.every(e=>!e.re||e.re===Xd)?`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 sf(){return{inputMode:`decimal`,post:e=>e,message:af().amountMessage,extract(e){let t=``,n=!1,r=0;for(let i of e)Xd.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=nf(t)+(e.includes(`.`)?`.${n}`:``);return{text:r,isRaw:[...r].map(e=>e!==`,`)}},isValid:e=>/^\d+(\.\d{1,2})?$/.test(e)}}var cf={"phone-in":()=>of(`99999 99999`,{normalize:ef,valid:e=>/^[6-9]/.test(e),message:af().phoneInMessage}),pan:()=>of(`AAAAA9999A`,{upper:!0,valid:e=>/^[A-Z]{5}\d{4}[A-Z]$/.test(e),message:af().panMessage}),gstin:()=>of(`99AAAAA9999A***`,{upper:!0,valid:e=>/^\d{2}[A-Z]{5}\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/.test(e),message:af().gstinMessage}),aadhaar:()=>of(`9999 9999 9999`,{valid:e=>/^[2-9]/.test(e),message:af().aadhaarMessage}),ifsc:()=>of(`AAAA*******`,{upper:!0,valid:e=>/^[A-Z]{4}0[A-Z0-9]{6}$/.test(e),message:af().ifscMessage}),"pin-code":()=>of(`999999`,{valid:e=>/^[1-9]/.test(e),message:af().pinCodeMessage}),date:()=>of(`99-99-9999`,{normalize:rf,valid:tf,post:(e,t)=>e.length===8&&tf(e)?`${e.slice(4)}-${e.slice(2,4)}-${e.slice(0,2)}`:t,message:af().dateMessage}),amount:sf},lf=Object.keys(cf),uf=e=>{let t=String(e).toLowerCase();return Xr(cf,t)?t:void 0},df=e=>Qd.test(String(e))&&uf(e)===void 0,ff=new Map;Je(()=>ff.clear());function pf(e){if(e==null||e===``)return null;let t=String(e),n=ff.get(t);return n===void 0&&(n=df(t)?of(t):Xr(cf,t)?cf[t]?.()??null:null,ff.set(t,n)),n}var mf=(e,t)=>e.normalize?e.normalize(t):t;function hf(e,t){let n=pf(e);return n?n.extract(mf(n,String(t??``))):String(t??``)}function gf(e,t){let n=pf(e);if(!n)return String(t??``);let r=n.extract(mf(n,String(t??``)));return n.post(r,n.layout(r).text)}function _f(e,t){let n=pf(e);return n?n.layout(n.extract(mf(n,String(t??``)))).text:String(t??``)}var vf=(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},yf=new WeakMap,bf=e=>yf.get(e)?.(),xf=new WeakMap;function Sf(e,t,n,r){let i=e.getAll(t),a=xf.get(e)??new Set;xf.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 Cf(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 wf(e,{mask:t,postFormatted:n=!1,onChange:r,onInvalidChange:i}={}){let a=pf(t);if(!a||!$d.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??Cf(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&&$d.has(e.type))){let t=vf(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=mf(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:mf(a,e.value);y(r,e.selectionStart??r.length,!0)},w=()=>{p=!0},T=()=>{p=!1;let t=mf(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=mf(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&&Sf(t.formData,e.name,e.value,D())},ne=()=>{clearTimeout(_),_=setTimeout(()=>{m=!1,y(mf(a,e.value),e.value.length,!0)},0)};n||(k?.addEventListener(`formdata`,te),yf.set(e,D)),k?.addEventListener(`reset`,ne),k?.addEventListener(`submit`,O);let re=mf(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),yf.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 Tf(){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=bf(e);return n===void 0?t.call(this,e):n},e.wuiMaskHook=!0}var Ef=new WeakMap,Df,Of=e=>{Ef.has(e)||Ef.set(e,wf(e,{mask:e.dataset.appMask,postFormatted:e.hasAttribute(`data-mask-post-formatted`)}))},kf=e=>[...e.querySelectorAll(`input[data-app-mask]`)].filter(e=>e instanceof HTMLInputElement),Af=e=>e instanceof Element?[...e instanceof HTMLInputElement&&e.matches(`input[data-app-mask]`)?[e]:[],...kf(e)]:[];function jf(){Df||typeof MutationObserver>`u`||(Df=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Af(e))Ef.get(t)?.(),Ef.delete(t);for(let e of t.addedNodes)for(let t of Af(e))Of(t)}}),Df.observe(document.documentElement,{childList:!0,subtree:!0}))}function Mf(e=document){Tf();for(let t of kf(e))Of(t);e===document&&jf()}var Nf=`data-wui-bulk-in-bar`,Pf=`[data-wui-page-header-bar][data-wui-bulk-for]`,Ff=new WeakSet;function If(e){return`${jn(e,{decimals:0})} selected`}function Lf(e){let t=e.dataset.wuiBulkFor;return t===void 0?null:document.getElementById(t)}function Rf(e){return typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`}function zf(e,t){return[...e.querySelectorAll(t)].flatMap(e=>e instanceof HTMLElement?[e]:[])}function Bf(e,t){for(let n of zf(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?If(t):``}function Vf(e=document){for(let t of zf(e,Pf))Lf(t)?.setAttribute(Nf,``);Ff.has(document)||(Ff.add(document),document.addEventListener(`selectionchange`,e=>{if(!(e instanceof CustomEvent)||!Rf(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 zf(document,Pf))Lf(n)?.contains(t)&&Bf(n,e.detail.selected)}))}var Hf={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`},Uf={minLength:10,uppercase:!0,lowercase:!0,digit:!0,special:!0,uniqueChars:0,customRules:[]},Wf=()=>I(`passwordRules`,Hf);function Gf(e){return e===!0||e==null?{...Uf}:{...Uf,...e}}function Kf(e){let t=Gf(e),n=[];if(t.minLength>0&&n.push({key:`length`,label:L(Wf().lengthText,{minLength:t.minLength}),test:e=>e.length>=t.minLength}),t.uppercase&&n.push({key:`uppercase`,label:Wf().uppercaseText,test:e=>/[A-Z]/.test(e)}),t.lowercase&&n.push({key:`lowercase`,label:Wf().lowercaseText,test:e=>/[a-z]/.test(e)}),t.digit&&n.push({key:`digit`,label:Wf().digitText,test:e=>/[0-9]/.test(e)}),t.special&&n.push({key:`special`,label:Wf().specialText,test:e=>/[^A-Za-z0-9]/.test(e)}),t.uniqueChars>0){let e=t.uniqueChars;n.push({key:`unique`,label:Xe(Wf(),`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 qf(e,t){let n=e==null?``:String(e);return Kf(t).map(e=>({key:e.key,label:e.label,met:e.test(n)}))}function Jf(e,t){return qf(e,t).every(e=>e.met)}var Yf={moveLabel:`Move to`,moveText:`Move to {label}`},Xf=`wui:row-drop`,Zf=`is-drop-over`,Qf=`application/x-wui-rows`,$f=`wui-row-dragging`,ep=`[data-wui-drop-target]`,tp=`tbody tr[data-row-key]`,np=`input, button, a, select, textarea, label`,rp=`.wui-select-cell .wui-check`,ip=new WeakMap,ap=new WeakSet,op=null,sp=null;function cp(e){let t=e.querySelector(rp);return t instanceof HTMLInputElement&&t.checked}function lp(e){let t=[];for(let n of e.querySelectorAll(`tbody tr`))n instanceof HTMLElement&&cp(n)&&t.push(n.dataset.rowKey);return t}function up(e,t){return P(e,t)}function dp(e,t){let n=up(e,t);return n instanceof HTMLElement?n:null}function fp(e){let t=e.textContent;if(t===null)throw Error(`A drop target has no text content.`);return t.trim()}var pp=e=>typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`;function mp(){op=null,document.body.classList.remove($f);for(let e of document.querySelectorAll(`${ep}.${Zf}`))e.classList.remove(Zf)}function hp(e,t,n){e.dispatchEvent(new CustomEvent(Xf,{bubbles:!0,detail:{keys:t,target:n.dataset.wuiDropTarget}}))}function gp(e){let t=dp(e.target,ep);if(!t||!op)return;e.preventDefault();let n=N(e.dataTransfer,`A drag event arrived without its DataTransfer.`);n.dropEffect=`move`,t.classList.add(Zf)}function _p(e){let t=dp(e.target,ep);!t||e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||t.classList.remove(Zf)}function vp(e){let t=dp(e.target,ep);if(!t||!op)return;e.preventDefault(),t.classList.remove(Zf);let{root:n,keys:r}=op;hp(n,r,t),mp()}function yp(e){let t=dp(e.target,ep);t&&sp?.keys.length&&(e.preventDefault(),hp(sp.root,sp.keys,t))}function bp(e){(Br(e)||e.key===` `)&&yp(e)}function xp(e){ap.has(e)||(ap.add(e),e.addEventListener(`dragover`,gp),e.addEventListener(`dragenter`,gp),e.addEventListener(`dragleave`,_p),e.addEventListener(`drop`,vp),e.addEventListener(`click`,yp),e.addEventListener(`keydown`,bp))}function Sp(e){let t=ip.get(e);if(t)return t;xp(e.ownerDocument||e);let n=t=>{let n=dp(t.target,tp);if(!n||!e.contains(n))return;let r=up(t.target,np);r&&n.contains(r)||(n.draggable=!0)},r=t=>{let n=dp(t.target,tp);if(!n||!e.contains(n))return;let r=cp(n)?lp(e):[n.dataset.rowKey],i=N(t.dataTransfer,`A drag event arrived without its DataTransfer.`);i.setData(Qf,JSON.stringify(r)),i.setData(`text/plain`,r.join(`,`)),i.effectAllowed=`move`,op={root:e,keys:r},document.body.classList.add($f)},i=t=>{let n=t instanceof CustomEvent?t.detail:void 0;if(pp(n)){let{keys:t}=n;n.selected>0?sp={root:e,keys:Array.isArray(t)?t:lp(e)}:n.selected===0&&(sp=null)}wp(document)};e.addEventListener(`pointerdown`,n),e.addEventListener(`dragstart`,r),e.addEventListener(`dragend`,mp),e.addEventListener(`selectionchange`,i);let a=()=>{e.removeEventListener(`pointerdown`,n),e.removeEventListener(`dragstart`,r),e.removeEventListener(`dragend`,mp),e.removeEventListener(`selectionchange`,i),ip.delete(e)};return ip.set(e,a),a}var Cp=()=>I(`rowDrop`,Yf);function wp(e=document){let t=e.querySelector(`[data-wui-row-drag] tbody tr ${rp}:checked`)!==null;for(let n of e.querySelectorAll(ep)){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`)||fp(n);n.setAttribute(`aria-label`,L(Cp().moveText,{label:e}))}for(let t of e.querySelectorAll(`.wui-drop-tray`))t.hasAttribute(`role`)||(t.setAttribute(`role`,`toolbar`),t.setAttribute(`aria-label`,Cp().moveLabel))}function Tp(e=document){for(let t of e.querySelectorAll(`[data-wui-row-drag]`))t instanceof HTMLElement&&Sp(t);wp(e.ownerDocument||e)}var Ep=`.table-wrap, .table-responsive, [class*="table-responsive-"]`,Dp=1;function Op(e){let t=()=>{let t=e.scrollWidth-e.clientWidth,n=Math.abs(e.scrollLeft);e.toggleAttribute(`data-wui-overflow-start`,t>Dp&&n>Dp),e.toggleAttribute(`data-wui-overflow-end`,t>Dp&&n<t-Dp),e.toggleAttribute(`data-wui-overflow-top`,e.scrollTop>Dp)},n=()=>{if(e.scrollWidth-e.clientWidth>Dp){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 kp=new WeakMap,Ap,jp=e=>{kp.has(e)||kp.set(e,Op(e))},Mp=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(Ep)].filter(e=>e instanceof HTMLElement);return[...t,...n]};function Np(){Ap||typeof MutationObserver>`u`||(Ap=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Mp(e))kp.get(t)?.(),kp.delete(t);for(let e of t.addedNodes)for(let t of Mp(e))jp(t)}}),Ap.observe(document.documentElement,{childList:!0,subtree:!0}))}function Pp(e=document){for(let t of e.querySelectorAll(Ep))t instanceof HTMLElement&&jp(t);e===document&&Np()}var Fp={leaveLabel:`Leave`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,title:`Leave without saving?`},Ip={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`},Lp={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.`},Rp={closeLabel:`Close`,error:`Error`,failedText:`That did not work. Try again.`,loading:`Loading...`,moreText:`more`,success:`Done`},zp=Object.freeze([`page`,`pageSize`,`sortBy`,`sortOrder`,`search`]),Bp=`search`,J=()=>I(`dataTable`,Jn),Vp=5,Hp=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,Up=e=>e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled,Wp=e=>Hp(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},Gp=(e,t,n)=>{let r=e.closest(t);return r instanceof n?r:null},Kp=e=>e.localName===`wui-select`,qp=new WeakMap,Jp=(e,t)=>{let n=Number(e);return Number.isInteger(n)?n:t},Yp=e=>({total:Jp(e.dataset.total,0),totalCapped:e.dataset.totalCapped===`true`,page:Jp(e.dataset.page,1),pageSize:Jp(e.dataset.pageSize,0),sortBy:e.dataset.sortBy||``,sortOrder:e.dataset.sortOrder===`desc`?`desc`:`asc`,pending:e.dataset.totalPending===`true`,rowCount:Jp(e.dataset.rowCount,0)}),Xp=(e,t)=>{e&&lm().toast(e,{variant:t})},Zp=(e,t)=>{if(!e)return;let n=new Set([...e.elements].filter(e=>!Wp(e)||e.hasAttribute(`data-range-mirror`)).map(e=>e.getAttribute(`name`)).filter(e=>e&&!zp.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},Qp=new Intl.NumberFormat(`en-IN`),$p=(e,t)=>t?`${Qp.format(e)}+`:Qp.format(e),em=(e,t,n)=>{let r=e.closest(`.wui-list-card`),i=r?X(r,`.wui-list-card-count`,HTMLElement):null;i&&(i.textContent=$p(t,n))};function tm(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(qp.has(e))continue;let t=rm(e);qp.set(e,t),e.hasAttribute(`data-load-first-page`)&&t.reload()}}function nm(e){let t=e instanceof Element?Gp(e,`[data-wui-server]`,HTMLElement):null;return t&&qp.get(t)||null}function rm(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:Na(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=Fa(),g=new AbortController,_={signal:g.signal},v=N(X(n,`:scope > tbody[data-wui-rows]`,HTMLTableSectionElement),`A server-paged table needs its rows in <app-table-rows> (tbody[data-wui-rows]).`),y=Yp(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?J().emptyLabel:L(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?$p(e.total,!0):`${e.total}`;return L(e.total===1?J().pageTextOne:J().pageTextOther,{page:e.page,pages:t,total:n})},ne=()=>Y(n,`:scope > thead > tr:first-child > th`,HTMLTableCellElement),re=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.`)},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){gu(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))}vu(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(Y(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=X(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?X(document,s.filtersRegion,HTMLElement):null;return t&&e&&(ce(t),t.replaceChildren(e.content.cloneNode(!0))),t},fe=0,pe=e=>{let r=Yp(e);r.pending&&Object.assign(r,{total:y.total,totalCapped:y.totalCapped});let i=r.sortBy!==y.sortBy||r.sortOrder!==y.sortOrder?Dr(v.rows):null;ue(X(e,`:scope > template[data-wui-pager]`,HTMLTemplateElement)),le(e,r);let a=de(X(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(),Or(e.rows,i),o&&Ee(),a},me=e=>{let t=X(nu(`<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:Vp},()=>{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`?J().forbiddenMessage:e===`networkCheck`?I(`httpFailure`,La).networkCheckText:e===`network`?J().networkMessage:e===`timeout`?J().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=Ds(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=fl(`primary`,`outline`,`sm`),c.dataset.wui=cl,c.setAttribute(`data-wui-table-retry`,``),c.textContent=J().retryLabel,s.append(c),t.append(r,o,s),ce(i),i.replaceChildren(t),i.hidden=!1}k(n)},be=()=>s.filtersForm?X(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){V(e)}if(!o.ok||!c){let e=o.ok?`server`:o.kind;return i?Jr(`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),Zp(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)),lm().refresh(t),l&&lm().refresh(l),y.pending?Se():em(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;W(T(u,D),{timeoutMs:s.timeoutMs}).then(n=>{if(t!==fe)return;if(!n.ok){Jr(`[@webority/ui-elements] A server table's total did not load; its pager keeps Previous and Next.`,n.kind);return}let r=X(nu(n.html),`div[data-wui-total]`,HTMLElement);if(!r){Jr(`[@webority/ui-elements] A server table's count answer has no div[data-wui-total]; its pager keeps Previous and Next.`);return}if(Jp(r.dataset.page,-1)!==y.page||Jp(r.dataset.pageSize,-1)!==y.pageSize)return;let i=Jp(r.dataset.total,-1);if(i<0){Jr(`[@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&&ue(s);let c=de(X(r,`:scope > template[data-wui-filters]`,HTMLTemplateElement));c&&lm().refresh(c),em(e,y.total,y.totalCapped),k(te(y)),o&&Ee(),O(`wui:table:total`,{total:i,totalCapped:a})})},Ce=()=>Y(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=Ds(`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?Gp(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?Gp(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&(e.preventDefault(),Te(t.dataset.sortKey??``))});let Ee=()=>{vu(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&&(bu(n,(e,t)=>{for(let n of e){let e=Gp(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=Gp(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?Gp(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=X(document,s.searchInput,HTMLElement);return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e:e?X(e,`input`,HTMLInputElement):null},Oe=()=>e.isConnected?!0:(g.abort(),clearTimeout(x??void 0),!1),ke=(e,t)=>{let n=[...e.elements].filter(Hp),r=new Set;for(let e of n)e.name&&!Wp(e)&&r.add(e.name);let i=[];for(let e of n)if(e.name&&!Up(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(Hp).map(e=>e.name).filter(Boolean)),r=new URLSearchParams,i=e=>e!==`search`&&zp.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(Bp);let e=a.value.trim();e&&r.set(Bp,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=Gp(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 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(Kp)){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?Gp(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),Zp(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(Bp,n):e.delete(Bp),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`)??``),Zp(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=nu(`<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},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),lm().refresh(t),i},Pe=e=>e.message||(e.kind===`forbidden`?J().actionForbiddenMessage:J().actionFailedMessage),Fe=e=>{e?.isConnected&&e.getAttribute(`data-wui-save-state`)===`saving`&&Fr(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(q)),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),Fr(u,`saving`);let d=Pr(u),f=await W(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(sr(Pr(t)||d)):(await A(D,`none`),Fe(u)),um(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&&Fr(m,`error`,p),f.kind!==`aborted`&&Xp(p,`danger`),k(lr(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=Gp(e,`tr`,HTMLTableRowElement),r=n?.dataset.rowKey??null,i=e.dataset.wuiRowAction||``,a=n?Pr(n):``;e.disabled=!0,e.setAttribute(`aria-busy`,`true`),n&&Fr(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`)Fe(n);else{if(o.ok){um(o,o.toastVariant||`success`);let e=n?.isConnected?Me(o.html):null,t=e&&n?Ne(e,n,!1):null;t?k(sr(Pr(t)||a)):(await A(D,`none`),Fe(n))}else{let e=Pe(o);Xp(e,`danger`),n?.isConnected&&Fr(n,`error`,e),k(lr(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?Gp(e.target,`[data-wui-row-action]`,HTMLButtonElement):null;t&&v.contains(t)&&!t.disabled&&(e.preventDefault(),P(t))}),re(v),se(v),f&&_u(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(Y(v,`:scope > tr`,HTMLTableRowElement))},selection:{keys:()=>[...p],count:()=>m?y.total:p.size,allMatching:()=>m,selectAllMatching:()=>{if(y.pending)Jr(`[@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))}Ee()}},clear:()=>{m=!1,p.clear();for(let e of Y(v,`:scope > tr > .${q} .wui-check:not(:disabled)`,HTMLInputElement))e.checked=!1;Ee()}}}}var im=8e3,am=()=>I(`toast`,Rp),om=[`success`,`info`,`warning`,`danger`],sm=e=>om.some(t=>t===e);function cm(e){if(!sm(e))throw RangeError(`Unknown toast variant "${e}".`);return e}function lm(){return N(window.WUI,`window.WUI is not defined: the Razor behaviour script did not load on this page.`)}function um(e,t=`success`){if(!e?.message)return;let n=e.toastAction;n?lm().toast(e.message,{variant:cm(t),duration:im,action:{label:n.label,onClick:()=>dm(n)}}):lm().toast(e.message,{variant:cm(t)})}async function dm(e){let t=await W(e.url,{method:e.method});if(t.kind!==`session`&&t.kind!==`aborted`){if(t.ok){um(t,t.toastVariant||`success`);for(let e of document.querySelectorAll(`[data-wui-server]`))e instanceof HTMLElement&&e.dataset.refreshOnSuccess!==`false`&&nm(e)?.reload()}else lm().toast(t.message||am().failedText,{variant:`danger`})}}var fm=`wui-remote-modal`,pm=`wui-remote-drawer`,mm=Object.freeze({sm:360,md:480,lg:640,xl:720}),hm=`wui-modal-fullscreen`,gm=`wui-modal-wide`,_m=Object.freeze({sm:380,md:440,lg:640,xl:880,wide:1080}),Z=()=>I(`modal`,Lp),vm=e=>Na(e?.getAttribute(`data-wui-timeout`)??null)??3e4,ym=`a[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,bm=`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled]),[contenteditable="true"]`,xm=`[aria-invalid="true"], .is-invalid, .input-validation-error`,Sm=`invalid`,Cm=`.wui-error-summary, [data-wui-form-errors], .validation-summary-errors, [data-valmsg-summary]`,wm=`[data-wui-modal-content]`,Tm=`[data-wui-pane-close], [data-wui-dismiss]`,Em=()=>F(`button`,{type:`button`,class:`wui-modal-close`,"data-wui-dismiss":!0,"aria-label":Z().closeLabel},Wr({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`}]])),Dm=new WeakMap,Om=new WeakSet;function km(e,t){if(e==null)throw TypeError(`The remote modal needs ${t}, and the page does not have it.`);return e}var Am=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},jm=(e,t,n)=>km(Am(e,t),n),Mm=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Nm=()=>Object.assign(Error(`The remote modal load was aborted.`),{name:`AbortError`}),Pm=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,Fm=(e,t)=>{let n=e instanceof Element?e.closest(t):null;return n instanceof HTMLElement?n:null},Im=e=>Xr(_m,e),Lm=e=>Xr(mm,e);function Rm(e){if(e==null||e===``)return null;if(e===`fullscreen`)return{fullscreen:!0};if(Im(e))return e===`wide`?{px:_m.wide,wide:!0}:{px:_m[e]};let t=typeof e==`number`?e:/^\d+$/.test(String(e))?Number(e):NaN;if(Number.isInteger(t)&&t>0)return{px:t};throw TypeError(`Unsupported modal size "${String(e)}". Use sm, md, lg, xl, wide, fullscreen or a px number.`)}var zm=e=>{if(e.classList.contains(`wui-modal-fullscreen`))return{fullscreen:!0};if(e.classList.contains(`wui-modal-wide`))return{px:_m.wide,wide:!0};let t=Number.parseInt(e.style.getPropertyValue(`--wui-modal-max-width`),10);return{px:t>0?t:_m.md}},Bm=(e,t)=>{e.classList.toggle(hm,!!t.fullscreen),e.classList.toggle(gm,!t.fullscreen&&!!t.wide),t.fullscreen?e.style.removeProperty(`--wui-modal-max-width`):e.style.setProperty(`--wui-modal-max-width`,`${t.px}px`)},Vm=[`center`,`top`];function Hm(e){if(e==null||e===``)return null;if(Lm(e))return{px:mm[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 Um=e=>e.container===`drawer`,Wm=e=>e.container===`pane`,Gm=e=>e.container!==`modal`,Km=(e,t)=>Um(e)?Hm(t):Rm(t),qm=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},Jm=e=>Wm(e)?e.shell:jm(e.shell,`.modal-dialog`,`a dialog frame`);function Ym(e=`modal`){let t=e===`drawer`,n=t?pm:fm,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?mm.md:_m.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 Xm=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))),Em()),Zm=e=>F(`div`,{class:`modal-content wui-modal`,"aria-busy":`true`},Xm(e),F(`div`,{class:`wui-modal-body`},F(`div`,{class:`wui-modal-loading`,role:`status`},F(`span`,{class:`visually-hidden`},Z().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`})))),Qm=(e,t)=>{let n={forbidden:Z().forbiddenMessage,networkCheck:I(`httpFailure`,La).networkCheckText,client:Z().clientMessage,server:Z().serverMessage,network:Z().networkMessage,timeout:Z().timeoutMessage};return F(`div`,{class:`modal-content wui-modal`,"data-wui-modal-error":t},Xm(e),F(`div`,{class:`wui-modal-body`},F(`div`,{class:`wui-modal-state`,role:`alert`},F(`p`,{class:`wui-modal-state-title`},Z().errorTitle),F(`p`,{class:`wui-modal-state-text`},n[t]||Z().serverMessage),F(`div`,{class:`wui-modal-state-actions`},F(`button`,{type:`button`,class:fl(`primary`,`soft`,`md`),"data-wui-dismiss":!0,"data-wui":cl},Z().closeLabel),F(`button`,{type:`button`,class:fl(`primary`,`solid`,`md`),"data-wui-modal-retry":!0,"data-wui":cl},Z().retryLabel)))))},$m=e=>Am(e.shell,`.modal-content`),eh=e=>Le(e.cloneNode(!0),HTMLElement,`a card copy is not an element`);function th(e){e&&e.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0}))}function nh(e,t){let n=$m(e),r=n?ih(n):new Map;th(n),n?n.replaceWith(t):Jm(e).appendChild(t),ah(t,r),lm().refresh()}var rh=`input[type="file"][name]`;function ih(e){let t=new Map;for(let n of e.querySelectorAll(rh)){if(!(n instanceof HTMLInputElement))continue;let e=n.files;e&&e.length>0&&t.set(n.name,[...e])}return t}function ah(e,t){if(t.size!==0&&typeof DataTransfer<`u`)for(let n of e.querySelectorAll(rh)){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 oh=e=>Wm(e)?!e.shell.hidden:e.host.hasAttribute(`open`);function sh(e,t,n=!1){let r=t?Am(e,xm):null,i=r?r.matches(ym)?r:Am(r,ym)||r:null;if(!i&&n)i=Am(e,`[data-autofocus]`)||Am(e,bm)||Am(e,`.wui-modal-close`);else if(!i){let t=Mm(e,ym);i=Am(e,`[data-autofocus]`)||t.find(e=>!e.classList.contains(`wui-modal-close`))||t[0]||e}r?i?.focus?.():i?.focus?.({preventScroll:!0})}function ch(e,t){let n=Am(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`,``),Jm(e).appendChild(n)),n.textContent=``,n.textContent=t}var lh=e=>{let t=Am(e.shell,`[data-wui-modal-live]`);t&&(t.textContent=``)},uh=(e,t,n)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))};function dh(e,t,n,r){let i={...r,container:e.container};uh(t,`wui:modal:${n}`,i),Um(e)&&uh(t,`wui:drawer:${n}`,i),Wm(e)&&uh(t,`wui:pane:${n}`,i)}var fh=e=>e.matches(`[data-wui-pane-host]`)?`pane`:jm(e,`dialog`,`a dialog`).classList.contains(`wui-remote-drawer`)?`drawer`:`modal`,ph=e=>km(e.host.closest(`wui-modal`),`a wui-modal host`);function mh(e){let t=Dm.get(e);if(t)return t;let n=fh(e),r=n===`pane`?e:jm(e,`dialog`,`a dialog`),i=$m({shell:r}),a={host:e,shell:r,container:n,queue:Fa(),defaultSize:zm(r),defaultLabel:r.getAttribute(`aria-label`),placeholder:i?eh(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 Dm.set(e,a),e.addEventListener(`submit`,e=>Ih(a,e)),e.addEventListener(`click`,e=>{Fm(e.target,`[data-wui-modal-retry]`)&&a.session&&(e.preventDefault(),Sh(a,a.session))}),Wm(a)&&e.addEventListener(`click`,t=>{let n=Fm(t.target,Tm);n&&e.contains(n)&&a.session&&gh(a,a.session,`dismissed`,null)}),e.addEventListener(`wui-modal-close`,t=>{t.target===e&&t instanceof CustomEvent&&Mh(t.detail,`reason`)===`escape`&&e.querySelector(`form[data-wui-submitting]`)&&t.preventDefault()}),e.addEventListener(`wui-modal-closed`,t=>{t.target===e&&yh(a)}),e.addEventListener(`wui-modal-opened`,t=>{if(t.target!==e)return;let n=$m(a);a.session&&n?.matches(wm)&&!n.contains(document.activeElement)&&sh(n,!1,Gm(a))}),a.remoteUrl&&e.addEventListener(`wui-modal-open`,t=>{t.target===e&&bh(a,t)}),a}function hh(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:()=>gh(e,a,`dismissed`,null),reload:()=>Sh(e,a)}};return e.session=a,a}function gh(e,t,n,r){e.session===t&&(t.closing={status:n,detail:r},Wm(e)?vh(e,t):_h(e))}function _h(e){let t=ph(e);t.dispatchEvent(new CustomEvent(`wui-modal-close`,{bubbles:!0,cancelable:!0,detail:{reason:`dismiss`}}))&&t.hide()}function vh(e,t){let n=e.shell,{status:r,detail:i}=km(t.closing,`the closing state`),a=n.contains(document.activeElement);e.queue.abort(),e.session=null,th($m(e)),n.replaceChildren(),n.hidden=!0,n.removeAttribute(`data-open`),t.resolveClosed({status:r,detail:i}),dh(e,n,`closed`,{status:r,url:t.url}),a&&t.trigger?.isConnected&&t.trigger.focus?.()}function yh(e){let t=e.session;if(e.queue.abort(),e.session=null,lh(e),t){let n=t.closing||{status:`dismissed`,detail:null};t.resolveClosed({status:n.status,detail:n.detail}),dh(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||(nh(e,eh(e.placeholder)),e.loadedUrl=null,Bm(e.shell,e.defaultSize),e.defaultLabel?e.shell.setAttribute(`aria-label`,e.defaultLabel):e.shell.removeAttribute(`aria-label`))}function bh(e,t){let n=Mh(t instanceof CustomEvent?t.detail:null,`trigger`),r=n instanceof HTMLElement?n:null,i=r?.getAttribute(`data-wui-url`)||e.remoteUrl||``,a=hh(e,i,{trigger:r});a.explicitSize=xh(e,r?.getAttribute(`data-wui-size`)),a.explicitSize&&Bm(e.shell,a.explicitSize),e.cache&&e.loadedUrl===i||(e.loadedUrl&&nh(e,eh(e.placeholder)),Sh(e,a,{keepPlaceholder:!0}))}function xh(e,t){try{return Km(e,t)}catch(e){return V(e),null}}async function Sh(e,t,{keepPlaceholder:n=!1}={}){n||nh(e,Zm(t.options.title||Ch(e)));let r=await e.queue.run(t.url,{method:t.method,body:t.body,navigate:t.options.navigate,timeoutMs:vm(t.trigger)});if(e.session!==t||r.kind===`aborted`||r.kind===`stale`)return`aborted`;if(r.kind===`session`)return`session`;if(r.kind===`ok`&&Dh(e,t,r.html,!1))return e.loadedUrl=t.url,dh(e,e.shell,`loaded`,{url:t.url,handle:t.handle}),`loaded`;let i=r.kind===`ok`||r.kind===`validation`?`server`:r.kind;return nh(e,Qm(t.options.title||Ch(e),i)),oh(e)&&sh(km($m(e),`a card`),!1,Gm(e)),dh(e,e.shell,`error`,{url:t.url,kind:i,status:r.status}),`error`}var Ch=e=>$m(e)?.querySelector(`.wui-modal-title`)?.textContent||e.shell.getAttribute(`aria-label`)||``,wh=`/_content/Webority.Ui.Razor/js/`,Th=e=>new URL(e,window.location.href).pathname.includes(wh);function Eh(e){if([...document.scripts].some(t=>t.getAttribute(`src`)===e))return;let t=document.createElement(`script`);t.src=e,document.head.appendChild(t)}function Dh(e,t,n,r){let i=nu(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&&Th(t)?Eh(t):a=!0}a&&Jr(`WUI.modal: ${t.url} returned a fragment with script; it was removed. Keep page behaviour in the page.`);let o=Am(i,wm);if(!o)return V(`WUI.modal: ${t.url} did not answer with an <app-modal-content> fragment.`),!1;if(nh(e,o),r||lh(e),!Wm(e)){Bm(e.shell,t.explicitSize||xh(e,o.getAttribute(`data-wui-size`))||e.defaultSize);let n=o.getAttribute(`data-wui-title`);n&&e.shell.setAttribute(`aria-label`,n)}return oh(e)&&sh(o,r,Gm(e)),!0}var Oh=`button[type="submit"], button:not([type]), input[type="submit"], input[type="image"]`;function kh(e,t,n){let r=[...e.elements].filter(e=>e.matches(Oh));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 Ah(e){for(let t of e.querySelectorAll(Cm))t.remove();for(let t of e.querySelectorAll(xm))t.removeAttribute(`aria-invalid`),t.classList.remove(`is-invalid`,`input-validation-error`);for(let t of e.querySelectorAll(`.field-error`))t.textContent=``}var jh=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(`.`)),Mh=(e,t)=>{if(typeof e==`object`&&e&&t in e)return Reflect.get(e,t)};async function Nh(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(Mh(t,`title`)),i=(e.statusText||``).trim().toLowerCase(),a=jh.has(r.toLowerCase())||r.toLowerCase()===i;return n(Mh(t,`message`))||n(Mh(t,`detail`))||(r&&!a?r:null)}function Ph(e,t,n,r){let i={forbidden:Z().forbiddenMessage,networkCheck:I(`httpFailure`,La).networkCheckText,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(),Ah(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),ch(e,o.textContent)}var Fh=(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 Ih(e,t){let n=t.target,r=e.session;if(!(n instanceof HTMLFormElement)||!r||n.hasAttribute(`data-wui-native`)||!n.closest(wm)||(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`;kh(n,i,!0);let l;try{l=await e.queue.run(c?Fh(a,s):a,{method:o,body:c?void 0:s,navigate:r.options.navigate,timeoutMs:vm(r.trigger)})}catch(t){V(t),e.session===r&&n.isConnected&&(kh(n,i,!1),Ph(e,n,`server`,null));return}if(e.session!==r)return;if(n.isConnected&&kh(n,i,!1),l.kind===`ok`&&l.result===`success`){Lh(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===Sm;if(Dh(e,r,l.html,t)){if(t){let t=km($m(e),`a card`).querySelector(Cm)?.textContent?.replace(/\s+/g,` `).trim();ch(e,t||Z().invalidMessage)}return}}let u=l.kind===`ok`||l.kind===`validation`?`server`:l.kind,d=await Nh(l.response);e.session===r&&Ph(e,n,u,d)}function Lh(e,t,n){let r=n.message,i=n.redirect||null,a=n.toastVariant||`success`;if(!Xh(a))throw TypeError(`Unknown toast variant "${a}". Use ${Yh.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?vg(r,a):r&&lm().toast(r,{variant:a}),dh(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,Sh(e,t)):n.keepOpen?n.html&&Dh(e,t,n.html,!1):gh(e,t,`success`,o)}function Rh(e){let t=Fm(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`)?Gh(t.getAttribute(`data-wui-pane`)??``,{target:t.getAttribute(`data-wui-pane-target`),trigger:t}).catch(e=>{Pm(e)||V(e)}):t.hasAttribute(`data-wui-modal`)?Vh(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=>{Pm(e)||V(e)}):Uh(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=>{Pm(e)||V(e)})))}function zh(e){if(e.key!==`Escape`||e.defaultPrevented)return;let t=Fm(e.target,Wh);if(!t)return;let n=Dm.get(t),r=e.currentTarget;n?.session&&r instanceof Document&&!r.querySelector(`wui-modal[open]`)&&(t.querySelector(`form[data-wui-submitting]`)||(e.preventDefault(),gh(n,n.session,`dismissed`,null)))}function Bh(e=document){let t=e instanceof Document?e:km(e.ownerDocument,`an owner document`);Om.has(t)||(Om.add(t),t.addEventListener(`click`,Rh),t.addEventListener(`keydown`,zh));let n=Mm(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)mh(e)}function Vh(e,t={}){try{if(!e)throw TypeError(`WUI.modal.load: a fragment url is required.`);let n=t.container===`drawer`,r=n?Hm(t.size):Rm(t.size),i=t.placement||`center`;if(!Vm.includes(i))throw TypeError(`WUI.modal.load: unsupported placement "${i}". Use center or top.`);if(t.signal?.aborted)return Promise.reject(Nm());let a=Ym(n?`drawer`:`modal`);Bh(document);let o=mh(a),s=oh(o),c=hh(o,e,t);c.explicitSize=r,Bm(o.shell,r||o.defaultSize),n||jm(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=Sh(o,c);return s||ph(o).show(),Hh(o,c,t,l,u,`WUI.modal.load`)}catch(e){return Promise.reject(e)}}function Hh(e,t,n,r,i,a){let o=new Promise((r,i)=>{n.signal?.addEventListener(`abort`,()=>{e.session===t&&(e.queue.abort(),gh(e,t,`dismissed`,{aborted:!0})),i(Nm())},{once:!0})}),s=Promise.all([r,i]).then(([,e])=>{if(e===`aborted`)throw Nm();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 Uh(e,t={}){return Vh(e,{...t,container:`drawer`,placement:void 0})}var Wh=`[data-wui-pane-host]`;function Gh(e,t={}){try{if(!e)throw TypeError(`WUI.pane.load: a fragment url is required.`);let n=qm(t.target);if(!n)throw TypeError(`WUI.pane.load: the target is not an <app-detail-pane>.`);if(t.signal?.aborted)return Promise.reject(Nm());Bh(document);let r=mh(n),i=hh(r,e,t);n.hidden=!1,n.setAttribute(`data-open`,``);let a=Sh(r,i);return Hh(r,i,t,Promise.resolve(),a,`WUI.pane.load`)}catch(e){return Promise.reject(e)}}function Kh(e){let t=qm(e);if(!t)throw TypeError(`WUI.pane.close: the target is not an <app-detail-pane>.`);let n=Dm.get(t);n?.session&&gh(n,n.session,`dismissed`,null)}var qh=`wuiConfirm`,Jh=Object.freeze([`danger`]),Yh=Object.freeze([`success`,`info`,`warning`,`danger`]),Xh=e=>Yh.some(t=>t===e),Zh=`wui.flash`,Qh=()=>I(`confirmDialog`,Ip),$h=new WeakSet,eg=new WeakSet,tg=null,ng=null,rg=!1,ig=(e,t)=>{e&&lm().toast(e,{variant:t})};function ag(){let e=document.getElementById(qh);if(e)return N(e.closest(`wui-modal`),`#${qh} must be a wui-modal.`);let t=document.createElement(`wui-modal`);t.id=qh;let n=document.createElement(`dialog`);return n.className=`modal wui-modal-shell`,n.style.setProperty(`--wui-modal-max-width`,`${_m.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:fl(`primary`,`soft`,`md`),"data-wui-dismiss":``,"data-wui":cl},Qh().cancelLabel),F(`button`,{type:`button`,class:fl(`primary`,`solid`,`md`),"data-app-confirm":``,"data-wui":cl})))))),t.append(n),document.body.appendChild(t),t}function og(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!Jh.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);sg({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 sg({title:e,message:t,label:n,danger:r},i){let a=ag(),o=a.querySelector(`.wui-confirm-title`),s=a.querySelector(`[data-app-confirm]`);if(!o||!s)throw Error(`#${qh} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${qh}"> 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||Qh().confirmTitle;o.textContent=l,c.textContent=t,s.textContent=n||Qh().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`),`#${qh} has no <dialog>.`).setAttribute(`aria-label`,l),ng=i,rg=!1,a.show()}var cg=(e,t)=>{tg=e;try{t()}finally{tg=null}},lg=(e,t)=>{let n=Reflect.get(e,t);if(n===void 0||typeof n==`string`)return n;throw TypeError(`confirmAction: ${t} must be text.`)},ug=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:lg(e,`title`),message:t,label:lg(e,`label`),tone:lg(e,`tone`)}};function dg(e,t,n){let{title:r,message:i,label:a,tone:o}=ug(t);if(o!=null&&!Jh.includes(o))throw TypeError(`confirmAction: tone "${o}" is not supported. Use danger, or leave it off.`);Pg(e.ownerDocument),sg({title:r,message:i,label:a,danger:o===`danger`},()=>cg(e,n))}var fg=e=>`disabled`in e&&e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`,pg=e=>{Le(e,HTMLElement,`data-wui-confirm needs an HTML element to click.`).click()};function mg(e){let t=P(e.target,`[data-wui-confirm]:not(form)`);t&&t!==tg&&!fg(t)&&(e.preventDefault(),e.stopImmediatePropagation(),og(t,()=>cg(t,()=>pg(t))))}function hg(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===tg||e.submitter&&e.submitter===tg||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;og(t,()=>cg(t,()=>t.requestSubmit(r)))}function gg(e){let t=P(e.target,`#${qh} [data-app-confirm]`);t&&!t.hasAttribute(`disabled`)&&ng&&(rg=!0,N(t.closest(`wui-modal`),`#${qh} is missing around its confirm button.`).hide())}function _g(e){if(!(e.target instanceof Element)||e.target.id!==`wuiConfirm`)return;let t=rg?ng:null;ng=null,rg=!1,t?.()}function vg(e,t){e&&window.sessionStorage.setItem(Zh,JSON.stringify({message:e,variant:t}))}var yg=e=>e===`forbidden`?Qh().forbiddenMessage:e===`networkCheck`?I(`httpFailure`,La).networkCheckText:e===`network`?Qh().networkMessage:e===`timeout`?Qh().timeoutMessage:Qh().failedMessage;function bg(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.getAttribute(`data-refresh-on-success`)!==`false`&&nm(e)?.reload()}var xg=(e,t)=>{`disabled`in e&&(e.disabled=t)};async function Sg(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 Cg(t,e)}async function Cg(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.`);xg(t,!0),t.setAttribute(`aria-busy`,`true`);let i=await W(e,{method:`POST`,body:n,timeoutMs:Na(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`)?(vg(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload()):(xg(t,!1),t.removeAttribute(`aria-busy`),i.ok?(um(i,a),bg()):ig(i.message||yg(i.kind),`danger`))}function wg(e,t){xg(e,!1),e.removeAttribute(`aria-busy`),V(t),ig(Qh().failedMessage,`danger`)}function Tg(e){let t=P(e.target,`[data-wui-post]`);t&&(e.preventDefault(),fg(t)||t.getAttribute(`aria-busy`)===`true`||Sg(t).catch(e=>wg(t,e)))}function Eg(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;Cg(r,n,new FormData(t)).catch(e=>wg(n,e)),t.closest(`wui-dropdown`)?.hide()}var Dg=(e,t)=>{e.disabled=!1,e.removeAttribute(`aria-busy`),t&&Fr(t,null)};async function Og(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&&Fr(t,`saving`);let r=Na(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`){Dg(e,t);return}if(i.ok){vg(i.message,i.toastVariant||`success`),i.redirect?window.location.assign(i.redirect):window.location.reload();return}let a=i.message||yg(i.kind);e.disabled=!1,e.removeAttribute(`aria-busy`),t&&Fr(t,`error`,a),ig(a,`danger`)}function kg(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`);Og(t,n).catch(e=>{Dg(t,n),V(e),ig(Qh().failedMessage,`danger`)})}function Ag(){let e=window.sessionStorage.getItem(Zh);if(!e)return;window.sessionStorage.removeItem(Zh);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`||!Xh(r))throw TypeError(`stored flash variant "${String(r)}" is not supported.`);if(typeof n!=`string`)throw TypeError(`stored flash message is not text.`);ig(n,r)}function jg(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(!Xh(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${Yh.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||(e.textContent??``).trim();e.remove(),ig(n,t)}}var Mg=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.form:null;function Ng(e){if(!(e.target instanceof Element))return;let t=e.target.closest(`[data-wui-auto-submit]`);if(!t)return;let n=Mg(e.target)||t.closest(`form`);n instanceof HTMLFormElement&&n.requestSubmit()}function Pg(e){eg.has(e)||(eg.add(e),e.addEventListener(`click`,gg),e.addEventListener(`wui-modal-closed`,_g))}function Fg(e=document){let t=e instanceof Element?e.ownerDocument:e;$h.has(t)||($h.add(t),t.addEventListener(`click`,mg,!0),t.addEventListener(`submit`,hg,!0),Pg(t),t.addEventListener(`click`,Tg),t.addEventListener(`click`,kg),t.addEventListener(`submit`,Eg),t.addEventListener(`change`,Ng),Ag()),jg(e)}var Ig=()=>I(`unsavedChanges`,Fp),Lg=`form[data-wui-unsaved]`,Rg=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,zg=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,Bg=new Set([`submit`,`button`,`reset`,`image`]),Vg=new Set([`hidden`,`checkbox`,`radio`,`file`,`submit`,`button`,`reset`,`image`,`range`,`color`]),Hg=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,Ug=e=>Hg(e)?e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled:`disabled`in e&&!!e.disabled,Wg=e=>`name`in e&&typeof e.name==`string`&&e.name!==``,Gg=e=>typeof e==`object`&&!!e,Kg=e=>Array.isArray(e)&&e.every(e=>Array.isArray(e)&&typeof e[0]==`string`);function qg(e){let t=JSON.parse(e);if(!Kg(t))throw Error(`unsaved-changes snapshot is malformed`);return t}var Jg=new WeakMap,Yg=new WeakSet,Xg=e=>`${e.name}:${e.size}:${e.lastModified}`,Zg=e=>[...e.querySelectorAll(Lg)].filter(e=>e instanceof HTMLFormElement);function Qg(e){let t=[];for(let n of e.elements)Wg(n)&&!Ug(n)&&(Hg(n)&&Bg.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(Xg)]):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 $g(e){return Qg(e)}function e_(e,t){let n=new Map,r=qg(t);for(let e of r){let t=n.get(e[0]);t?t.push(e):n.set(e[0],[e])}let i=qg(Qg(e)).map(e=>n.get(e[0])?.shift()??e);for(let e of n.values())i.push(...e);return JSON.stringify(i)}function t_(e){for(let t of e.elements)if(Hg(t)&&t.name&&!Ug(t)){if(t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!Vg.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 n_=e=>({saved:e.querySelector(Rg)&&t_(e)?null:Qg(e),engaged:!1,discarded:!1});function r_(e){let t=Jg.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&Qg(e)!==t.saved}var i_=(e,t)=>Zg(e).filter(e=>e!==t&&r_(e));function a_(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||Ig().message;dg(e,{title:Ig().title,message:r,label:Ig().leaveLabel,tone:`danger`},()=>{for(let e of t){let t=Jg.get(e);t&&(t.discarded=!0)}n()})}function o_(e){if(e.matches(zg))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 s_(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 c_(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)||!o_(n))return;let r=i_(n.ownerDocument,null);r.length&&(e.preventDefault(),a_(n,r,()=>n.click()))}function l_(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!s_(t,e.submitter))return;let n=i_(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;a_(t,n,()=>t.requestSubmit(i));return}let r=Jg.get(t);r&&(r.saved=Qg(t),r.discarded=!1)}function u_(e){i_(document,null).length&&e.preventDefault()}function d_(e){let t=e.target,n=P(t,Lg);return n instanceof HTMLFormElement?n:null}function f_(e){let t=d_(e);if(!t)return;let n=Jg.get(t);n&&!n.engaged&&(n.saved!==null&&(n.saved=Qg(t)),n.engaged=!0)}function p_(e){let t=d_(e),n=t&&Jg.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function m_(e){for(let t of Zg(e)){let e=Jg.get(t);e?.saved&&(e.saved=e_(t,e.saved))}}function h_(e){let t=Gg(e)?e.handle:void 0;return Gg(t)?t.el:void 0}function g_(e){if(!(e instanceof CustomEvent))return;let t=h_(e.detail);if(t instanceof Element)for(let e of Zg(t))v_(e)}function __(e=document){let t=e instanceof Document?e:e.ownerDocument;if(!Yg.has(t)){Yg.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,f_,!0);for(let e of[`input`,`change`])t.addEventListener(e,p_,!0);t.addEventListener(`click`,c_),t.addEventListener(`submit`,l_),t.addEventListener(`wui:modal:success`,g_),t.addEventListener(ni,()=>m_(t)),N(t.defaultView,`unsaved-changes guard needs a document with a window`).addEventListener(`beforeunload`,u_)}let n=Zg(e);e instanceof HTMLFormElement&&e.matches(Lg)&&n.unshift(e);for(let e of n)Jg.has(e)||Jg.set(e,n_(e))}function v_(e){if(!(e instanceof HTMLFormElement)||!e.matches(Lg))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);Jg.set(e,{saved:Qg(e),engaged:!1,discarded:!1})}var y_=()=>I(`drawer`,wu),b_=`wui:drawer:discard`,x_=`wui-drawer[confirm-discard]`,S_=`wui-modal`,C_=`data-wui-no-discard`,w_=`.wui-drawer-discard`,T_=`input, select, textarea`,E_=e=>typeof e==`object`&&!!e||typeof e==`function`;function D_(e){let t=e.currentTarget;if(!(t instanceof Document))throw Error(`The discard guard is not wired on a document.`);return t}function O_(e,t){return P(e,t)}var k_=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement,A_=new WeakMap,j_=new WeakSet,M_=new WeakSet;function N_(e,t,n,r,i){let a=e.createElement(`button`);return a.type=`button`,a.className=fl(t,n,`sm`),a.dataset.wui=cl,a.setAttribute(r,``),a.textContent=i,a}function P_(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,N_(e,`danger`,`solid`,`data-wui-discard-confirm`,y_().discardLabel),N_(e,`primary`,`soft`,`data-wui-discard-keep`,y_().keepLabel)),n}function F_(e){if(!(e instanceof Element))return null;let t=e.closest(x_);if(t)return t;let n=e.closest(S_);return n&&R_(n).length?n:null}function I_(e){return e.closest(x_)??e.closest(S_)}function L_(e,t){return t.hasAttribute(C_)||e.hasAttribute(C_)?!1:t.hasAttribute(`confirm-discard`)||e.hasAttribute(`data-wui-confirm-discard`)?!0:(e.getAttribute(`method`)||`get`).toLowerCase()!==`get`}function R_(e){return e.matches(x_)?e.querySelectorAll(`form`):[...e.querySelectorAll(`form`)].filter(t=>L_(t,e))}function z_(e){let t=A_.get(e);return t!=null&&$g(e)!==t}function B_(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),M_.add(t),t}function V_(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),M_.add(t),t}function H_(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 U_(e,t,n){let r=e.querySelector(w_);if(r){H_(r);return}let i=P_(e.ownerDocument,t),a;if(e.matches(x_))a=e.querySelector(`.wui-drawer-footer`)??B_(e),a.prepend(i);else if(e.hasAttribute(`confirm-discard`))a=e.querySelector(`.wui-modal-footer`)??V_(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`)??V_(e),a.prepend(i)}a.classList.add(`wui-drawer-discarding`),H_(i)}function W_(e){let t=e.parentElement;if(e.remove(),!t)throw Error(`The discard prompt has no footer.`);t.classList.remove(`wui-drawer-discarding`),M_.has(t)&&t.remove()}function G_(e){for(let t of R_(e))for(let e of t.querySelectorAll(T_))if(k_(e)&&e.type!==`hidden`&&!e.disabled){e.focus({preventScroll:!0});return}}function K_(e){let t=F_(e.target);if(t)for(let e of R_(t))A_.get(e)??A_.set(e,$g(e))}function q_(e){for(let t of D_(e).querySelectorAll(`form`)){let e=A_.get(t);e!=null&&A_.set(t,e_(t,e))}}function J_(e){let t=e.target;t instanceof HTMLFormElement&&F_(t)&&A_.set(t,$g(t))}function Y_(e){if(!E_(e))return;let t=`handle`in e?e.handle:void 0;if(E_(t))return`el`in t?t.el:void 0}function X_(e){if(!(e instanceof CustomEvent))return;let t=e.detail,n=Y_(t);if(n instanceof Element)for(let e of n.querySelectorAll(`form`))A_.delete(e)}function Z_(e){let t=e.target;t instanceof Element&&t.matches(x_)&&[...R_(t)].some(z_)&&(e.preventDefault(),U_(t,t.getAttribute(`confirm-discard`),null))}function Q_(e){let t=e.target;if(!(t instanceof Element)||!t.matches(S_))return;let n=[...R_(t)].find(z_);n&&(e.preventDefault(),U_(t,n.getAttribute(`data-wui-confirm-discard`)??t.getAttribute(`confirm-discard`)??y_().confirmDiscard,n))}function $_(e){let t=N(e.closest(w_),`The discard button is outside its prompt.`),n=I_(t);if(W_(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);for(let e of R_(n))A_.set(e,$g(e));n.dispatchEvent(new CustomEvent(b_,{bubbles:!0})),n.matches(x_)?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 ev(e){let t=N(e.closest(w_),`The keep button is outside its prompt.`),n=I_(t);if(W_(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);G_(n)}function tv(e){let t=O_(e.target,`[data-wui-discard-confirm]`);if(t){$_(t);return}let n=O_(e.target,`[data-wui-discard-keep]`);n&&ev(n)}function nv(e=document){let t=e instanceof Document?e:e.ownerDocument;j_.has(t)||(j_.add(t),t.addEventListener(`focusin`,K_),t.addEventListener(`pointerdown`,K_),t.addEventListener(`submit`,J_),t.addEventListener(ni,q_),t.addEventListener(`wui:modal:success`,X_),t.addEventListener(`wui:modal:loaded`,X_),t.addEventListener(`wui-drawer-close`,Z_,!0),t.addEventListener(`wui-modal-close`,Q_),t.addEventListener(`click`,tv))}var rv={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`,rv),iv=31536e3,av=new WeakMap,ov=e=>e>99?`99+`:String(e),sv=(e,t)=>Object.entries(t).reduce((e,[t,n])=>e.replaceAll(`{${t}}`,()=>String(n)),e);function cv(e,t,n=document){try{n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${iv}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}function lv(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=${iv}; 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},uv=(e,t,n)=>{let r=e?.closest(t);return r instanceof n?r:null},dv=(e,t,n)=>e?[...e.querySelectorAll(t)].filter(e=>e instanceof n):[],fv=e=>{if(!(e.target instanceof Element))throw Error(`event target is not an element`);return e.target},pv=e=>{let t=e.getAttribute(`href`);if(t===null)throw Error(`search hit has no href`);return t},mv=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function hv(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),_=Fa(),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=ov(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?u:sv(h,{label:u,count:ov(o)})),a&&s&&i&&(i.textContent=o===0?p:sv(m,{count:ov(o)}))},b=()=>s?M(s):!1,x=()=>{let e=mv(`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(mv(`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=nu(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(mv(`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=fv(e);if(t.closest(`[data-wui-bell-retry]`)){await S(!0);return}let n=uv(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 gv=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),_v=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function vv(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=Fa(),g,_=-1,v=()=>dv(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(_v(s,c,t));if(n.kind!==`aborted`&&n.kind!==`stale`&&n.kind!==`session`){if(e.classList.remove(`is-loading`),n.ok){let e=nu(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:sv(r===1?m:p,{count:r}))}else i().replaceChildren(mv(`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(Br(t)){let e=v(),r=_>=0?e[_]:void 0;!i().hidden&&r?(t.preventDefault(),C(pv(r))):l&&n.value.trim()!==``&&(t.preventDefault(),C(_v(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=uv(fv(e),`.wui-topsearch-hit`,HTMLElement);!t||e.ctrlKey||e.metaKey||e.shiftKey||e.button===1||(e.preventDefault(),C(pv(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||gv(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 yv(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>{cv(n,!!e.detail?.collapsed)});let r=e.dataset.wuiFoldedCookie;r&&e.addEventListener(`wui:shell:nav-fold`,e=>{lv(r,e.detail?.key,!!e.detail?.folded)}),e.addEventListener(`click`,t=>{fv(t).closest(`[data-wui-tabbar-more]`)&&$(e,`[data-app-shell-menu]`,HTMLElement)?.click()});let i=$(e,`[data-wui-bell]`,HTMLElement),a=i?hv(i,t):null,o=$(e,`[data-wui-topsearch]`,HTMLElement);o&&vv(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)}};av.set(e,s);let c=n=>{if(n.target===e||n.target instanceof Node&&n.target.contains(e)){for(let e of t)e();av.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,c)}};return document.addEventListener(`wui:teardown`,c),s}function bv(e=document){let t=[];e instanceof HTMLElement&&e.matches(`[data-app-shell]`)&&t.push(e),t.push(...dv(e,`[data-app-shell]`,HTMLElement));for(let e of t)e.dataset.wuiPartsWired||(e.dataset.wuiPartsWired=`1`,yv(e))}function xv(e){let t=uv(e,`[data-app-shell]`,HTMLElement);return t?(av.has(t)||bv(t),av.get(t)??null):null}var Sv=`data-wui-submit-once`,Cv=`data-wui-submit-pending`,wv=`wui-submit-spinner`,Tv=new WeakSet,Ev=new WeakMap;function Dv(e){return e instanceof HTMLButtonElement||e instanceof HTMLInputElement?e:null}function Ov(e){if(e.setAttribute(`aria-busy`,`true`),e.tagName===`INPUT`||e.querySelector(`.${wv}`))return;let t=e.ownerDocument.createElement(`span`);t.className=`spinner-border spinner-border-sm me-2 ${wv}`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t)}function kv(e){e.removeAttribute(`aria-busy`),e.querySelector(`.${wv}`)?.remove()}function Av(e){return e.method===`post`&&e.target!==`_blank`&&e.getAttribute(`data-wui-submit-once`)!==`off`}function jv(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!Av(t))return;if(t.hasAttribute(Cv)){e.preventDefault();return}t.setAttribute(Cv,``);let n=Dv(e.submitter);setTimeout(()=>{t.hasAttribute(Cv)&&(e.defaultPrevented?t.removeAttribute(Cv):n&&(n.disabled=!0,Ov(n),Ev.set(t,n)))},0)}var Mv=e=>[...e.querySelectorAll(`form[${Cv}]`)].filter(e=>e instanceof HTMLFormElement);function Nv(e){for(let t of Mv(e)){t.removeAttribute(Cv);let e=Ev.get(t);e&&(e.disabled=!1,kv(e),Ev.delete(t))}}function Pv(e){let t=e.ownerDocument===null?e:e.ownerDocument;Tv.has(t)||(Tv.add(t),t.addEventListener(`submit`,jv,!0),t.defaultView?.addEventListener(`pageshow`,()=>Nv(t)))}var Fv=[`light`,`dark`,`auto`],Iv=[`wave`,`circle`,`slide`,`blinds`,`fade`,`none`],Lv=`fade`,Rv=`theme`,zv={wave:1100,circle:700,slide:600,blinds:900,fade:350,none:0},Bv=`wui-theme-switching`,Vv=`wui:theme:change`,Hv=`(prefers-color-scheme: dark)`,Uv=e=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(e).matches,Wv=e=>Fv.some(t=>t===e);function Gv(e){return e===`dark`||e===`auto`&&Uv(Hv)?`dark`:`light`}function Kv(e=Rv){let t=null;try{t=window.localStorage.getItem(e)}catch(e){if(!(e instanceof DOMException))throw e}return Wv(t)?t:`auto`}function qv(e,t=Rv){try{window.localStorage.setItem(t,e)}catch(e){if(!(e instanceof DOMException))throw e}}function Jv(e){let t=document.documentElement,n=Gv(e);t.setAttribute(`data-theme`,e),t.setAttribute(`data-bs-theme`,n),document.dispatchEvent(new CustomEvent(Vv,{detail:{mode:n,preference:e}}))}var Yv=`((k)=>{let m;try{m=localStorage.getItem(k)}catch{m=null}if(m!=='light'&&m!=='dark')m='auto';const r=document.documentElement,q=window.matchMedia?window.matchMedia('(prefers-color-scheme: dark)'):null;function s(){const 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 Xv(e=Rv){return`${Yv}${JSON.stringify(String(e)).replace(/</g,`\\u003c`)})`}function Zv(e,{includeAuto:t=!1}={}){return e===`light`?`dark`:e===`dark`&&t?`auto`:`light`}function Qv(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(Hv),n=()=>e(t.matches?`dark`:`light`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var $v=60,ey=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,ty=e=>e.toFixed(1),ny=(e,t)=>`${ty(e)}px ${ty(t)}px`,ry={amplitude:22,segments:36,cycles:1.5,ripples:2},iy=6,ay=(e,t,n,r,i)=>{let{amplitude:a,segments:o,cycles:s}=ry,c=n*(t+2*a),l=i?t+a-c:c-a,u=i?t+2*a:-2*a,d=[ny(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(ny(n,i))}return d.push(ny(e,u)),`polygon(${d.join(`, `)})`},oy=(e,t,n,r)=>{let i=t/iy,a=[];for(let t=0;t<iy;t++){let o=t*i,s=i*n,c=r?o+i-s:o,l=r?o+i:o+s;a.push(ny(0,c),ny(e,c),ny(e,l),ny(0,l))}return`polygon(${a.join(`, `)})`};function sy(e,{width:t,height:n,to:r=`dark`,origin:i}){let a=r===`dark`,o=[];for(let r=0;r<=$v;r++){let s=r/$v,c=ey(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(${ty(a*c)}px at ${ty(e)}px ${ty(r)}px)`});break}case`slide`:{let e=n*(1-c);o.push({clipPath:a?`inset(${ty(e)}px 0px 0px 0px)`:`inset(0px 0px ${ty(e)}px 0px)`});break}case`blinds`:o.push({clipPath:oy(t,n,c,a)});break;case`fade`:o.push({clipPath:`none`,opacity:c});break;case`none`:return[];default:o.push({clipPath:ay(t,n,c,s*ry.ripples*2*Math.PI,a)})}}return o}var cy=e=>{e instanceof DOMException&&(e.name===`AbortError`||e.name===`InvalidStateError`)||V(`[@webority/ui-elements] The theme view transition failed:`,e)};function ly(e,{effect:t=Lv,to:n,origin:r,duration:i}={}){let a=document.documentElement,o=n!==void 0&&a.getAttribute(`data-bs-theme`)===n;if(t===`none`||o||Uv(`(prefers-reduced-motion: reduce)`)||typeof document.startViewTransition!=`function`||typeof a.animate!=`function`)return e(),Promise.resolve(!1);a.classList.add(Bv);let s=document.startViewTransition(e),c=i??zv[t]??zv.fade;return s.ready.then(()=>{let e=sy(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(cy),s.finished.catch(cy).finally(()=>a.classList.remove(Bv)).then(()=>!0)}function uy(){Ft(),i(`wui-select`,Tc),i(`wui-dock`,Ii),i(`wui-otp`,To),i(`wui-shortcuts`,qc),i(`wui-record-pager`,Yo),i(`wui-data-table`,Fi),i(`wui-hover-card`,Ki),i(`wui-modal`,qi),i(`wui-navigation-menu`,na),i(`wui-notification-center`,no),i(`wui-onboarding-checklist`,uo),i(`wui-overflow`,Bo),i(`wui-rating`,Jo),i(`wui-relative-time`,ds),i(`wui-show-more`,Zc),i(`wui-truncate`,Qc),i(`wui-whats-new`,ol)}return globalThis.WeborityUiElementsInternal||(globalThis.WeborityUiElementsInternal={version:`0.176.0`,modules:Qu}),mi(),uy(),e.AVATAR_ACCEPT=ed,e.AVATAR_MAX_SIZE_MB=td,e.AVATAR_OUTPUT_SIZE=nd,e.AVATAR_OUTPUT_TYPE=rd,e.AVATAR_PREVIEW_SIZES=id,e.BAR_BULK_IN_BAR_ATTRIBUTE=Nf,e.COLUMN_MAX_WIDTH=Zn,e.COLUMN_MIN_WIDTH=Xn,e.COMMAND_SHORTCUT_ATTRIBUTE=xd,e.CONFIRM_DIALOG_ID=qh,e.CONFIRM_TONES=Jh,e.COPY_FEEDBACK_MS=Ml,e.CSRF_META_NAME=xa,e.CURRENCIES=tn,e.CURRENCY_SYMBOLS=Lt,e.DATE_PATTERNS=an,e.DEFAULT_CSRF_HEADER=Sa,e.DEFAULT_CURRENCY=It,e.DEFAULT_IMAGE_ACCEPT=Ad,e.DEFAULT_MAX_SIZE_MB=jd,e.DEFAULT_PASSWORD_RULES=Uf,e.DEFAULT_THEME_EFFECT=Lv,e.DEFAULT_THEME_STORAGE_KEY=Rv,e.DISCARD_EVENT=b_,e.DROP_OVER_CLASS=Zf,e.DURATION_UNITS=rn,e.FILTER_POPOVER_MAX_CHIPS=Ct,e.FLASH_STORAGE_KEY=Zh,e.FLASH_VARIANTS=Yh,e.FORMAT_STYLES=en,e.HTTP_KINDS=Ea,e.IST_TIME_ZONE=z,e.MASK_INPUT_TYPES=$d,e.MASK_NAMES=lf,e.MENTION_ID_PATTERN=Fl,e.MONEY_UNITS=nn,e.NOTIFICATION_COUNT_CAP=sa,e.PIN_AT_VAR=vr,e.PIN_SIDES=er,e.RESIZE_STEP=Qn,e.RESIZE_STEP_LARGE=$n,e.ROW_DRAG_TYPE=Qf,e.ROW_DROP_EVENT=Xf,e.ROW_HEIGHTS=nr,e.ROW_MOVE_LIMIT=Sr,e.ROW_MOVE_MS=Cr,e.ROW_SAVE_ATTR=jr,e.ROW_SAVE_ERROR_CLASS=Mr,e.ROW_SAVE_STATES=Ar,e.SCROLL_EDGE_SELECTOR=Ep,e.SEARCH_OPEN_KEY=cd,e.SELECT_CELL_CLASS=q,e.SHORTCUTS_OFF_ATTRIBUTE=nt,e.SHORTCUT_EVENT=it,e.SHORTCUT_SCOPE_ATTRIBUTE=rt,e.SUBMIT_ONCE_ATTRIBUTE=Sv,e.THEME_BOOT_SCRIPT_BODY=Yv,e.THEME_CHANGE_EVENT=Vv,e.THEME_EFFECTS=Iv,e.THEME_EFFECT_DURATION=zv,e.THEME_MODES=Fv,e.THEME_SWITCHING_CLASS=Bv,e.TOAST_ACTION_METHODS=ga,e.TOAST_ACTION_MS=im,e.VIRTUAL_OVERSCAN=tr,e.WHATS_NEW_READ_EVENT=$c,e.WUI_HEADERS=U,e.WuiDataTable=Fi,e.WuiDock=Ii,e.WuiHoverCard=Ki,e.WuiNavigationMenu=na,e.WuiNotificationCenter=no,e.WuiOnboardingChecklist=uo,e.WuiOtp=To,e.WuiOverflow=Bo,e.WuiRating=Jo,e.WuiRecordPager=Yo,e.WuiRelativeTime=ds,e.WuiSelect=Tc,e.WuiShortcuts=qc,e.WuiShowMore=Zc,e.WuiTruncate=Qc,e.WuiWhatsNew=ol,e.acceptDroppedFiles=qd,e.acceptLabel=Wd,e.addRowSelectCells=gu,e.addSelectColumn=_u,e.applyBarBulk=Bf,e.applyTheme=Jv,e.ariaKeyShortcuts=pt,e.attachFileDrop=Jd,e.attachInputMask=wf,e.attachRowDrag=Sp,e.attachScrollEdges=Op,e.attachShiftRange=bu,e.avatarCropOptions=sd,e.avatarUnreadableMessage=od,e.barBulkCountText=If,e.buildPasswordRules=Kf,e.clampColumnWidth=dr,e.classifyStatus=Aa,e.closeRemotePane=Kh,e.collapseSearch=_d,e.configureCsrf=wa,e.confirmAction=dg,e.copyTextToClipboard=Nl,e.createDiscardPrompt=P_,e.createRequestQueue=Fa,e.createSelectHeaderCell=uu,e.createSelectRowCell=du,e.createSelectSpacerCell=fu,e.currencyPrefix=zt,e.deriveStepStatus=iu,e.emptyValueLabel=B,e.evaluatePassword=qf,e.fillText=L,e.formValues=$g,e.formatCompact=Pn,e.formatCurrency=Mn,e.formatDate=Bn,e.formatDateTime=Wn,e.formatDuration=Ln,e.formatFileSize=Vd,e.formatMasked=_f,e.formatNumber=jn,e.formatPercent=Fn,e.formatRelativeTime=rs,e.formatValue=Hn,e.getServerTable=nm,e.getShell=xv,e.glyphNode=Ds,e.groupCount=ur,e.groupItems=fr,e.groupNotificationsByDay=ha,e.identityCell=Nr,e.inShortcutScope=_t,e.initCollapsibleSearch=bd,e.initCommandShortcuts=Dd,e.initDrawerDiscard=nv,e.initInputMasks=Mf,e.initPageBarBulk=Vf,e.initRemoteModals=Bh,e.initRowDrag=Tp,e.initScrollEdges=Pp,e.initServerActions=Fg,e.initServerTables=tm,e.initShellParts=bv,e.initSubmitOnce=Pv,e.initUnsavedChanges=__,e.isCommandChord=wd,e.isCurrencyCode=Rt,e.isHeicFile=ad,e.isImageFile=zd,e.isImageOnlyAccept=Ud,e.isMaskPattern=df,e.isPdfFile=Hd,e.isTimeZone=Gt,e.isTypingTarget=mt,e.loadRemoteDrawer=Uh,e.loadRemoteModal=Vh,e.loadRemotePane=Gh,e.maskedPostValue=bf,e.matchSegments=Eu,e.matchesAccept=Gd,e.measureRows=Dr,e.mentionLabel=Rl,e.mentionTextFromValue=Vl,e.mentionValueFromText=Hl,e.mentionedIds=Ul,e.moveFocus=yt,e.nextTheme=Zv,e.notificationCountText=ua,e.notificationDayHeading=ma,e.notificationTime=pa,e.notificationTriggerLabel=da,e.notificationUnreadAnnouncement=fa,e.openSearch=gd,e.parseMentionValue=Bl,e.parseServerHtml=nu,e.parseToastAction=ya,e.passwordSatisfies=Jf,e.pinAtValue=yr,e.pinClasses=xr,e.pinOffsetVar=_r,e.planPins=br,e.playRowMoves=Or,e.pluralText=Xe,e.postedMasked=gf,e.rawMasked=hf,e.readColumnWidths=hr,e.readCsrf=Oa,e.readStoredTheme=Kv,e.readText=I,e.relativeTimeTitle=is,e.resetUnsavedChanges=v_,e.resolveMask=pf,e.resolveTheme=Gv,e.rowLabel=Pr,e.rowOrderChanged=kr,e.runShortcut=vt,e.runToastAction=dm,e.saveOutcomeText=Lr,e.setRowSaveState=Fr,e.setText=qe,e.settledRows=Ir,e.shortcutKey=ft,e.shortcutName=dt,e.shortcutsOff=gt,e.showResultToast=um,e.stepperHeaderItems=au,e.storeTheme=qv,e.syncSelectAll=vu,e.syncTargets=wp,e.themeBootScript=Xv,e.themeKeyframes=sy,e.tickedKeys=lp,e.timeZoneLabel=qn,e.timeoutFromAttribute=Na,e.toInstant=Rn,e.todayIn=Zt,e.transitionTheme=ly,e.validateFile=Kd,e.virtualRange=pr,e.wallClockOf=Xt,e.watchSystemTheme=Qv,e.whenElementsReady=gi,e.withTrustedLabel=Is,e.writeColumnWidths=gr,e.wuiFetch=W,e.zoneOffsetMs=qt,e.zoneParts=Kt,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:()=>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:()=>Ye,readText:()=>L,setText:()=>Ke,subscribeText:()=>qe,textLocale:()=>Je}),Re=`en-IN`,ze=/\{([A-Za-z0-9_]+)\}/g,Be=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0,Ve,He=new Map,Ue=0,We=new Set,Ge=new Map;function Ke(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(!Xe(i))throw RangeError(`Text ${e} must be an object of string keys.`);t.set(e,Ze(e,i))}}Ve=n,He=t,Ue+=1;for(let e of Array.from(We))e()}function L(e,t){let n=He.get(e);if(n===void 0)return t;let r=Ge.get(e);if(r!==void 0&&r.version===Ue&&r.english===t&&$e(r.merged,t))return r.merged;let i=Qe(e,n,t);return Ge.set(e,{version:Ue,english:t,merged:i}),i}function qe(e){return We.add(e),()=>{We.delete(e)}}function Je(){return Ve??Re}function R(e,t){return e.replace(ze,(e,n)=>Be(t,n)?String(t[n]):e)}function Ye(e,t,n,r){let i=`${t}Other`;if(!Be(e,i))throw RangeError(`Plural text ${t} has no ${i} key; every plural needs its Other form.`);let a=new Intl.PluralRules(Je()).select(n),o=`${t}${a.charAt(0).toUpperCase()}${a.slice(1)}`,s=e[Be(e,o)?o:i];if(s===void 0)throw RangeError(`Plural text ${t} has no ${o} key.`);return R(s,{count:n,...r})}function Xe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ze(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 Qe(e,t,n){let r={};for(let[i,a]of Object.entries(t)){let t=Be(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=et(t);for(let t of et(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 $e(e,t){let n=Object.keys(t);return Object.keys(e).length===n.length&&n.every(t=>Be(e,t))}function et(e){return Array.from(e.matchAll(ze),e=>e[1]??``)}var tt=`data-wui-shortcuts`,nt=`data-shortcut-scope`,rt=`wui:shortcut`,it={"/":`slash`,"?":`help`,Escape:`esc`,Esc:`esc`,Enter:`enter`},at={esc:`Esc`,escape:`Esc`,enter:`Enter`,slash:`/`,help:`?`},ot={esc:`Escape`,ctrl:`Control`,cmd:`Meta`,option:`Alt`,opt:`Alt`},st=new Set([`checkbox`,`radio`,`button`,`submit`,`reset`,`range`,`color`,`file`,`image`]),ct=new Set([`textbox`,`searchbox`,`combobox`]),lt=`a[href], button, summary, input, select, textarea, [role="button"], [role="link"], [role="menuitem"], [role="option"], [role="tab"], [role="checkbox"], [role="switch"]`;function ut(e){if(!e||e.ctrlKey||e.metaKey||e.altKey)return null;let t=e.key;return typeof t!=`string`||!t?null:it[t]?it[t]:t.length===1&&t.trim()?t.toLowerCase():null}function dt(e){let t=String(e??``).trim();return t.length===1?t.toUpperCase():at[t.toLowerCase()]??t}function ft(e){return String(e??``).trim().split(/\s+/).filter(Boolean).map(e=>ot[e.toLowerCase()]??(e.length===1?e.toUpperCase():e)).join(`+`)}function pt(e){if(!e||!mt(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!st.has(t.toLowerCase())}return ct.has(e.getAttribute?.(`role`))}function mt(e){return e.nodeType===1}function ht(e=typeof document>`u`?null:document){return e?.documentElement?.getAttribute(tt)===`off`}function gt(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 _t(e,t,n=null){let r=e.target instanceof Node?e.target:null;if(!t||e.defaultPrevented||ht(r?.ownerDocument??void 0))return!1;let i=ut(e);if(!i||!gt(r,n)||pt(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(lt)?!1:(e.preventDefault(),a(e),!0)}function vt(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}function yt(e){"@babel/helpers - typeof";return yt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},yt(e)}function bt(e,t){if(yt(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(yt(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function xt(e){var t=bt(e,`string`);return yt(t)==`symbol`?t:t+``}function z(e,t,n){return(t=xt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var St=2,Ct=`wui-filter-popover-pinned`,wt=`.wui-filter-popover-trigger`,Tt=`.wui-filter-popover-panel`,Et=`.wui-filter-popover-head`,Dt=`input:not([type]),input[type="text"],input[type="search"]`,Ot=`a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1'])`;function kt(){try{return sessionStorage.getItem(Ct)===`1`}catch{return!1}}function At(e){try{e?sessionStorage.setItem(Ct,`1`):sessionStorage.removeItem(Ct)}catch(e){if(!(e instanceof DOMException))throw e}}function jt(e){if(e===null||e instanceof Node)return e;throw TypeError(`event target is not a node`)}function Mt(e,t){let n=e?.querySelector(t)??null;return n instanceof HTMLElement?n:null}var Nt=class extends s{constructor(){super(),z(this,`_doc`,void 0),z(this,`_timer`,void 0),z(this,`_sticky`,void 0),z(this,`_closingByCode`,void 0),z(this,`_inside`,void 0),z(this,`_pendingSubmit`,void 0),z(this,`_onEnter`,void 0),z(this,`_onLeave`,void 0),z(this,`_onClick`,void 0),z(this,`_onChange`,void 0),z(this,`_onListClose`,void 0),z(this,`_onFocusOut`,void 0),z(this,`_onKeyDown`,void 0),z(this,`_onShortcut`,void 0),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(jt(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){At(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(jt(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(Dt))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&&_t(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),kt()&&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 Mt(this,wt)}get _panel(){return Mt(this,Tt)}get _pin(){let e=this.querySelector(`${Et} 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&&(Mt(n.querySelector(`.wui-filter-popover-grid`),Ot)??Mt(n,Ot))?.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 Pt(){i(`wui-filter-popover`,Nt)}var Ft=`INR`,It=Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`,JPY:`¥`}),Lt=e=>typeof e==`string`&&/^[A-Z]{3}$/.test(e),Rt=(e=`INR`)=>It[e]??`${e} `,zt={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`},Bt=n({IST_OFFSET_MS:()=>Vt,IST_TIME_ZONE:()=>B,isTimeZone:()=>Wt,nowIn:()=>Zt,todayIn:()=>Xt,wallClockOf:()=>Yt,wallToInstant:()=>qt,zoneOffsetMs:()=>Kt,zoneParts:()=>Gt}),B=`Asia/Kolkata`,Vt=198e5,Ht=new Map;function Ut(e){let t=Ht.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`}),Ht.set(e,t)),t}function Wt(e){if(typeof e!=`string`||e===``)return!1;try{return Ut(e),!0}catch{return!1}}function Gt(e,t=B){if(t===`Asia/Kolkata`){let t=new Date(e+Vt);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}let n=Object.fromEntries(Ut(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 Kt(e,t=B){if(t===`Asia/Kolkata`)return Vt;let n=Gt(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 qt(e,t=B){let n=e-Kt(e,t);return n=e-Kt(n,t),n}var Jt=e=>e instanceof Date?e.getTime():e;function Yt(e,t=B){return new Date(e+Kt(e,t)).toISOString().slice(0,19)}function Xt(e=B,t=Date.now()){return Yt(Jt(t),e).slice(0,10)}function Zt(e=B,t=Date.now()){let n=Jt(t);return new Date(n+Kt(n,e))}var Qt=n({CURRENCIES:()=>en,DATE_PATTERNS:()=>rn,DURATION_UNITS:()=>nn,FORMAT_STYLES:()=>$t,IST_OFFSET_MS:()=>Vt,IST_TIME_ZONE:()=>B,MAX_DECIMALS:()=>20,MONEY_UNITS:()=>tn,compactFormatOf:()=>Hn,emptyValueLabel:()=>V,formatCompact:()=>Nn,formatCurrency:()=>jn,formatDate:()=>zn,formatDateTime:()=>Un,formatDayShort:()=>Bn,formatDuration:()=>In,formatNumber:()=>An,formatPercent:()=>Pn,formatValue:()=>Vn,isMoneyUnit:()=>an,istParts:()=>Rn,monthLabel:()=>fn,monthLongLabel:()=>pn,paiseToRupeeText:()=>En,timeZoneLabel:()=>Kn,toInstant:()=>Ln,weekdayLabel:()=>mn}),$t=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],en=[`INR`,`USD`,`EUR`,`GBP`],tn=[`rupees`,`paise`],nn=[`ms`,`s`,`min`,`h`],rn=[`day`,`month`,`year`,`datetime`,`time`];function an(e){return tn.some(t=>t===e)}var on=()=>L(`formatters`,zt),V=()=>on().emptyValueLabel,sn=`−`,cn=[`janShortLabel`,`febShortLabel`,`marShortLabel`,`aprShortLabel`,`mayShortLabel`,`junShortLabel`,`julShortLabel`,`augShortLabel`,`sepShortLabel`,`octShortLabel`,`novShortLabel`,`decShortLabel`],ln=[`januaryLabel`,`februaryLabel`,`marchLabel`,`aprilLabel`,`mayLabel`,`juneLabel`,`julyLabel`,`augustLabel`,`septemberLabel`,`octoberLabel`,`novemberLabel`,`decemberLabel`],un={short:[`sunShortLabel`,`monShortLabel`,`tueShortLabel`,`wedShortLabel`,`thuShortLabel`,`friShortLabel`,`satShortLabel`],long:[`sundayLabel`,`mondayLabel`,`tuesdayLabel`,`wednesdayLabel`,`thursdayLabel`,`fridayLabel`,`saturdayLabel`],min:[`sunMinLabel`,`monMinLabel`,`tueMinLabel`,`wedMinLabel`,`thuMinLabel`,`friMinLabel`,`satMinLabel`]},dn=(e,t)=>on()[P(e[t],`no date name at index ${t}`)],fn=e=>dn(cn,e),pn=e=>dn(ln,e);function mn(e,t){return dn(un[t],e)}var hn=(e,t)=>P(e[t],`no compact unit at index ${t}`),gn=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],_n=[[1e9,`B`],[1e6,`M`],[1e3,`K`]],vn=e=>!e||e===`INR`?`en-IN`:`en-US`,yn=(e,t)=>typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=20?e:t,bn=new Map,xn=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=bn.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:e}),bn.set(n,r)),r},Sn=new Map,Cn=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=Sn.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:e,maximumFractionDigits:e}),Sn.set(n,r)),r},wn=e=>typeof e==`number`&&Number.isFinite(e),Tn=e=>e<0&&!Object.is(Math.abs(e),0)?sn:``;function En(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 Dn=(e,t)=>t===`paise`?Number(En(e)):e,On=2,kn=(e,t,n)=>{let r=Math.min(t,On),i=10n**BigInt(On-r),a=(BigInt(En(e).replace(`.`,``))+i/2n)/i,o=10n**BigInt(r),s=Cn(0,n).format(a/o);return t===0?s:`${s}.${(a%o).toString().padStart(r,`0`)}${`0`.repeat(t-r)}`};function An(e,{decimals:t}={}){if(!wn(e))return V();let n=xn(yn(t,2)).format(Math.abs(e));return n===`0`?`0`:Tn(e)+n}function jn(e,t){if(!t?.currency)throw TypeError(`[@webority/ui-elements] formatCurrency needs options.currency, an ISO 4217 code such as "INR".`);if(!wn(e))return V();let{unit:n=`rupees`,decimals:r,currency:i}=t,a=yn(r,0),o=vn(i),s=n===`paise`?kn(Math.abs(e),a,o):Cn(a,o).format(Math.abs(e));return(Number(s.replace(/,/g,``))===0?``:Tn(e))+Rt(i)+s}var Mn=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function Nn(e,{currency:t,unit:n=`rupees`}={}){if(!wn(e))return V();let r=t?Dn(e,n):e,i=t?Rt(t):``,a=t?vn(t):`en-IN`,o=a===`en-IN`?gn:_n,s=Math.abs(r),c=o.findIndex(([e])=>s>=e);if(c===-1){let e=xn(Mn(s),a).format(s);if(e!==`1,000`)return(e===`0`?``:Tn(r))+i+e;c=o.length-1}let[l,u]=hn(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]=hn(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f))),`${Tn(r)}${i}${xn(f,a).format(p)} ${u}`}function Pn(e,{decimals:t}={}){return wn(e)?`${An(e*100,{decimals:yn(t,1)})}%`:V()}var Fn={ms:1,s:1e3,min:6e4,h:36e5};function In(e,{unit:t=`s`}={}){if(!wn(e))return V();let n=Fn[t]??1e3,r=Math.abs(e*n),i=Tn(e);if(Math.round(r)<1e3)return`${i}${xn(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${xn(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}${xn(0).format(l)}h ${s(c%60)}m`}function Ln(e,t=B){if(e instanceof Date)return e.getTime();if(wn(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?qt(a.getTime(),t):NaN}return Date.parse(e)}function Rn(e,t=B){let{year:n,month:r,day:i,hour:a,minute:o}=Gt(e,t);return{year:n,month:r,day:i,hour:a,minute:o}}function zn(e,{pattern:t=`day`,timeZone:n=B}={}){let r=Ln(e,n);if(!Number.isFinite(r))return V();let i=Rn(r,n),a=e=>String(e).padStart(2,`0`),o=`${a(i.day)}-${fn(i.month)}-${i.year}`,s=`${a(i.hour)}:${a(i.minute)}`;switch(t){case`month`:return`${fn(i.month)}-${i.year}`;case`year`:return String(i.year);case`datetime`:return`${o} ${s}`;case`time`:return s;default:return o}}function Bn(e,{timeZone:t=B}={}){let n=Ln(e,t);if(!Number.isFinite(n))return V();let r=Rn(n,t);return`${String(r.day).padStart(2,`0`)}-${fn(r.month)}`}function Vn(e,t){if(e==null||e===``)return V();let n=t?.style;if(n===`date`)return zn(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return jn(e,{...t,currency:t?.currency??``});case`percent`:return Pn(e,t);case`compact`:return Nn(e,t);case`duration`:return In(e,t);default:return An(e,t)}}function Hn(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 Un(e,{timeZone:t=B}={}){let n=Ln(e);if(!Number.isFinite(n))return V();let r=Object.fromEntries(Gn(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}-${fn(Number(r.month)-1)}-${r.year}, ${r.hour}:${r.minute} ${i.toUpperCase()}`}var Wn=new Map;function Gn(e){let t=Wn.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}),Wn.set(e,t)),t}function Kn(e=B){return new Intl.DateTimeFormat(`en-IN`,{timeZone:e,timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??e}var qn={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.`},Jn=n({COLUMN_MAX_WIDTH:()=>Xn,COLUMN_MIN_WIDTH:()=>48,PIN_AT_VAR:()=>_r,PIN_SIDES:()=>$n,RESIZE_STEP:()=>10,RESIZE_STEP_LARGE:()=>50,ROW_HEIGHTS:()=>tr,ROW_MOVE_LIMIT:()=>200,ROW_MOVE_MS:()=>220,ROW_SAVE_ATTR:()=>Ar,ROW_SAVE_ERROR_CLASS:()=>jr,ROW_SAVE_STATES:()=>kr,VIRTUAL_OVERSCAN:()=>8,clampColumnWidth:()=>ur,groupCount:()=>lr,groupItems:()=>dr,groupRowsText:()=>ar,identityCell:()=>Mr,measureRows:()=>Er,notSavedText:()=>cr,pinAtValue:()=>vr,pinClasses:()=>br,pinOffsetVar:()=>gr,planPins:()=>yr,playRowMoves:()=>Dr,readColumnWidths:()=>mr,resizeName:()=>rr,rowLabel:()=>Nr,rowOrderChanged:()=>Or,saveOutcomeText:()=>Ir,savedManyText:()=>sr,savedText:()=>or,setRowSaveState:()=>Pr,settledRows:()=>Fr,virtualRange:()=>fr,widthText:()=>ir,writeColumnWidths:()=>hr}),Yn=48,Xn=1200,Zn=10,Qn=50,$n=[`start`,`end`],er=8,tr={comfortable:72,cozy:48,compact:40},nr=()=>L(`dataTable`,qn),rr=e=>e?R(nr().resizeColumnText,{label:e}):nr().resizeColumnLabel,ir=e=>R(nr().resizeText,{px:e}),ar=e=>Ye(nr(),`groupRows`,e,{count:An(e,{decimals:0})}),or=e=>e?R(nr().savedText,{label:e}):nr().rowSavedText,sr=e=>R(nr().rowsSavedText,{n:An(e,{decimals:0})}),cr=(e,t)=>`${e?R(nr().wasNotSavedText,{label:e}):nr().rowWasNotSavedText}${t?` ${t}`:``}`,lr=e=>An(e,{decimals:0}),ur=e=>Math.min(Xn,Math.max(48,Math.round(Number(e)||0)));function dr(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 fr({scrollTop:e,viewport:t,rowHeight:n,count:r,overscan:i=8}){let a=n>0?n:tr.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 pr=e=>`wui-widths:${e}`;function mr(e){if(!e)return{};try{let t=JSON.parse(window.localStorage.getItem(pr(e))||`{}`),n={};if(t&&typeof t==`object`)for(let[e,r]of Object.entries(t))Number.isFinite(r)&&(n[e]=ur(r));return n}catch{return{}}}function hr(e,t){if(e)try{Object.keys(t).length?window.localStorage.setItem(pr(e),JSON.stringify(t)):window.localStorage.removeItem(pr(e))}catch(e){if(!(e instanceof DOMException))throw e}}var gr=(e,t)=>`--wui-pin-${e}-${t}`,_r=`--wui-pin-at`,vr=(e,t)=>`var(${gr(e,t)}, 0px)`;function yr(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 br=e=>e?`wui-pin-${e.side}${e.edge?` wui-pin-${e.side}-edge`:``}`:``,xr=200,Sr=220,Cr=`cubic-bezier(0.22, 1, 0.36, 1)`,wr=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,Tr=e=>e.getAttribute(`data-row-key`)??e;function Er(e){let t=[...e];if(t.length>200)return null;let n=new Map;for(let e of t)e.hidden||n.set(Tr(e),e.offsetTop);return n}function Dr(e,t){let n=[...e];if(!t||n.length>200||wr())return 0;let r=0;for(let e of n){if(e.hidden||typeof e.animate!=`function`)continue;let n=t.get(Tr(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:Cr}),r++)}return r}function Or(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 kr=[`saving`,`error`],Ar=`data-wui-save-state`,jr=`wui-row-save-error`,Mr=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 Nr(e){let t=Mr(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 Pr(e,t,n=``){if(t!==null&&!kr.includes(t))throw Error(`A row's save state is ${kr.join(` or `)} (or null to clear it), not "${t}".`);e.querySelector(`:scope > * > .${jr}`)?.remove(),t===null?e.removeAttribute(Ar):e.setAttribute(Ar,t),t===`saving`?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`);let r=t===`error`&&n?Mr(e):null;if(r){let t=e.ownerDocument.createElement(`span`);t.className=jr,t.textContent=n,r.append(t)}}function Fr(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 Ir(e){let t=e.filter(e=>e.ok),n=[],[r]=t;t.length===1&&r?n.push(or(r.label)):t.length>1&&n.push(sr(t.length));for(let t of e)t.ok||n.push(cr(t.label,t.message));return n.join(` `)}var Lr=n({isImeComposing:()=>Rr,isImeSafeEnter:()=>zr});function Rr(e){return e.isComposing||e.keyCode===229}function zr(e){return e.key===`Enter`&&!Rr(e)}var Br=n({svgNodes:()=>Hr,svgRoot:()=>Ur}),Vr=`http://www.w3.org/2000/svg`;function Hr(e){return e.map(Wr)}function Ur(e,t){let n=document.createElementNS(Vr,`svg`);return Gr(n,e),n.append(...Hr(t)),n}function Wr(e){let[t,n,r]=e,i=document.createElementNS(Vr,t);return Gr(i,n),typeof r==`string`?i.append(document.createTextNode(r)):r&&i.append(...Hr(r)),i}function Gr(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 Kr=n({devError:()=>H,devWarn:()=>qr});function qr(e,...t){console.warn(e,...t)}function H(e,...t){console.error(e,...t)}var Jr=n({hasOwn:()=>Yr}),Yr=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0,Xr=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`,httpFailureText:`text/web/httpFailure.g.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 Zr=`ui-elements/`;function Qr(e){let t=Xr[e];if(t===void 0)throw Error(`[webority-ui] No on-demand element chunk is named ${e}.`);return t}function $r(e){let t=Qr(e);if(!t.selfContained)return`${Zr+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 ei=n({CHUNK_DIR:()=>Zr,CHUNK_RETRY_MS:()=>ri,ELEMENTS_DEFINED_EVENT:()=>ti,ELEMENTS_LOAD_ERROR_EVENT:()=>ni,assetUrl:()=>gi,loadChunk:()=>_i,startElementLoader:()=>pi,stopElementLoader:()=>mi,whenElementsReady:()=>hi}),ti=`wui-elements:defined`,ni=`wui-elements:load-error`,ri=1e3,ii={"ui-elements/carousel.global.js":`d6b040ce7f2f`,"ui-elements/code-block.global.js":`f839a756dcb1`,"ui-elements/command-palette.global.js":`2e9478294fb8`,"ui-elements/comment-thread.global.js":`5722a84ecb15`,"ui-elements/consent-banner.global.js":`be6e7fa6e507`,"ui-elements/context-menu.global.js":`9841305f348c`,"ui-elements/date-range.global.js":`e4c3331b4e6e`,"ui-elements/date-time.global.js":`634a8a4fbb57`,"ui-elements/datepicker.global.js":`55d3a5f2379a`,"ui-elements/drawer.global.js":`07de86d317b1`,"ui-elements/dropdown.global.js":`6eaf95ad3219`,"ui-elements/entry-grid.global.js":`430530fa8c92`,"ui-elements/gantt.global.js":`e2094f2f35bb`,"ui-elements/image-crop.global.js":`74a36683bb1f`,"ui-elements/inline-edit.global.js":`43497afb491b`,"ui-elements/kanban.global.js":`a38ed934a6aa`,"ui-elements/lead-popup.global.js":`d9d43ee3b5c3`,"ui-elements/lightbox.global.js":`33c11ca0afd5`,"ui-elements/org-tree.global.js":`ed208c39ea30`,"ui-elements/markdown.global.js":`9610c74a4a5e`,"ui-elements/phone.global.js":`fc43d571a652`,"ui-elements/popover.global.js":`2d5563605aba`,"ui-elements/saved-views.global.js":`87b2b0be9128`,"ui-elements/glyphs.global.js":`ea794c3df8db`,"ui-elements/select-chips.global.js":`8eb697dc6367`,"ui-elements/select-recents.global.js":`f689c4fb9612`,"ui-elements/select-search.global.js":`ae2db77d45fd`,"ui-elements/select-window.global.js":`62d7bed9c123`,"ui-elements/table-export.global.js":`95ed64dd7822`,"ui-elements/slider.global.js":`e541c51574d0`,"ui-elements/sortable.global.js":`bb9123c1ae66`,"ui-elements/status-icon.global.js":`5310ef6097b9`,"ui-elements/timepicker.global.js":`12ec4171de92`,"ui-elements/tour.global.js":`8348a24e7b00`,"ui-elements/tree.global.js":`02e189abc5fd`,"ui-elements/tree-picker.global.js":`a61347235fa0`,"ui-elements/wizard.global.js":`ae51af19f0da`,"ui-chart.global.js":`ae075db49126`,"ui-calendar.global.js":`edf120b16ad1`,"ui-rich-text.global.js":`64dcebd2efc3`,"ui-file-viewer.global.js":`916b45e8cc72`,"ui-phone.global.js":`c646775bc1d1`},ai=new Map;for(let[e,t]of Object.entries(Xr))for(let n of t.tags)ai.set(n,e);var oi=[...ai.keys()].join(`,`),si=null,ci=``,li=!1,ui=null,di=new Map;function fi(){let e=document.currentScript;return e instanceof HTMLScriptElement?e:null}function pi(e=fi()){li||(li=!0,si=e?.src?e.src:null,ci=e?.nonce||``,xi(document),ui=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&xi(e)}),ui.observe(document.documentElement,{childList:!0,subtree:!0}))}function mi(){ui?.disconnect(),ui=null,li=!1,si=null,ci=``,di.clear()}function hi(e=document){return Promise.all([...bi(e)].map(e=>_i(e))).then(()=>void 0)}function gi(e){if(si===null)throw Error(`The on-demand element files have no address to load from.`);let t=new URL(e,si);return t.search=Yr(ii,e)?`?v=${ii[e]}`:``,t.href}function _i(e){let t=di.get(e)?.promise??null;if(t!==null)return t;let n=Qr(e),{tags:r}=n,i=$r(e),a=()=>Promise.all(r.map(e=>customElements.whenDefined(e))),o={status:`loading`,promise:null},s=new Promise((t,s)=>{let c=``,l=()=>{ui&&Object.keys(Xr).every(e=>di.get(e)?.status===`loaded`||di.get(e)?.status===`failed`)&&ui.disconnect()},u=()=>{o.status=`loaded`,l(),document.dispatchEvent(new CustomEvent(ti,{detail:{chunk:e,tags:r}})),t()},d=t=>{o.status=`failed`,l(),H(`[webority-ui] Could not load ${c} for ${r.length?r.join(`, `):e}.${t?` ${t.message}`:``}`),document.dispatchEvent(new CustomEvent(ni,{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,ci&&(i.nonce=ci),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),ri)}),document.head.append(i)};if([...document.scripts].some(e=>new URL(e.src,location.href).pathname.endsWith(`/${i}`)))a().then(u);else{try{c=gi(i)}catch(e){d(e instanceof Error?e:void 0);return}f(c,!1)}});return o.promise=s,di.set(e,o),s}function vi(e){return ai.has(e.localName)&&!customElements.get(e.localName)}function yi(e,t){let n=ai.get(t.localName);n!==void 0&&vi(t)&&e.add(n)}function bi(e){let t=new Set;e instanceof Element&&yi(t,e);for(let n of e.querySelectorAll(oi))yi(t,n);return t}function xi(e){for(let t of bi(e))Promise.allSettled([_i(t)])}var Si=n({TABLE_EXPORT_CHUNK:()=>Ci,loadTableExport:()=>Ti,registerTableExport:()=>Ei}),Ci=`table-export`,wi=null;function Ti(){return wi===null?_i(Ci).then(()=>{if(wi===null)throw Error(`[webority-ui] The table-export chunk ran without handing over its writers.`);return wi}):Promise.resolve(wi)}function Ei(e){wi=e}var Di=`.wui-col-resize`,Oi=`.wui-group-row, .wui-virtual-spacer`,ki=`.wui-select-cell, .wui-expand-cell`;function Ai(){return Ur({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 U(e){if(e==null)throw TypeError(`Missing DOM node`);return e}function ji(e,t){if(e instanceof t)return e;throw TypeError(`Missing DOM node`)}var Mi=e=>{let t=F(e,Di);return t instanceof HTMLElement?t:null},Ni=e=>e.hasAttribute(`data-wui-skeleton`)||!!e.querySelector(`:scope > td > .skeleton`),Pi=class extends s{constructor(){super(),z(this,`_frame`,void 0),z(this,`_headDirty`,void 0),z(this,`_rowsDirty`,void 0),z(this,`_frozenSig`,void 0),z(this,`_natural`,void 0),z(this,`_widths`,void 0),z(this,`_collapsed`,void 0),z(this,`_groupOrder`,void 0),z(this,`_items`,void 0),z(this,`_range`,void 0),z(this,`_drag`,void 0),z(this,`_userSized`,void 0),z(this,`_swallowClick`,void 0),z(this,`_mo`,void 0),z(this,`_ro`,void 0),z(this,`_fonts`,void 0),z(this,`_onPointerDown`,void 0),z(this,`_onKeyDown`,void 0),z(this,`_onClick`,void 0),z(this,`_onDblClick`,void 0),z(this,`_onScroll`,void 0),z(this,`_onFonts`,void 0),z(this,`_top`,null),z(this,`_bottom`,null),z(this,`_rowHeight`,0),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=Mi(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=mr(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(ki)?`lead`:null});if(!r.some(e=>e===`start`||e===`end`))return;let i=yr(r);i.forEach((e,t)=>{e&&this._ro?.observe(U(n[t]))});let a=e=>U(n[e]).getBoundingClientRect().width,o=0;i.forEach((t,n)=>{t?.side===`start`&&(this._setVar(e,gr(`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,gr(`end`,n.ordinal),o),o+=a(t))}if(t)for(let t of e.rows)t.matches(`${Oi}, .wui-row-expanded`)||t.cells.length!==n.length||i.forEach((e,n)=>{if(!e)return;let r=U(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=vr(e.side,e.ordinal);r.style.getPropertyValue(`--wui-pin-at`)!==i&&r.style.setProperty(_r,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(ki))}_handles(e){let t=this._headCells(e),n=this._resizable(t);t.forEach((e,t)=>{if(!n[t]||e.querySelector(Di))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(Xn)),r.setAttribute(`tabindex`,`0`);let i=(e.textContent??``).trim();r.setAttribute(`aria-label`,rr(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(Oi)&&!Ni(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(Di);n&&this._handleValue(n,ur(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(ki))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=ur(t);e.style.width=`${n}px`,e.setAttribute(`data-wui-width`,``);let r=e.querySelector(Di);return r&&this._handleValue(r,n),n}_handleValue(e,t){e.setAttribute(`aria-valuenow`,String(t)),e.setAttribute(`aria-valuetext`,ir(t))}_fitTable(e,t){let n=t.length-1,r=this._natural[n]||0;for(let e=0;e<n;e++)r+=Number.parseFloat(U(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)},hr(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,hr(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=Mi(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=Mi(e.target);if(!t||!this.contains(t))return;let n=t.closest(`th`);if(zr(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=U(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(Di)!==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`)&&!Ni(e)),r=new Set;for(let e of n)for(let[t,n]of Array.from(e.cells).entries())(n.matches(ki)||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 Ti();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(Oi));if(a.some(Ni))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=dr(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),ji(t.querySelector(`.wui-group-cell`),HTMLTableCellElement).colSpan=n.length,ji(t.querySelector(`.wui-group-count`),HTMLElement).textContent=lr(e.items.length),ji(t.querySelector(`.wui-group-rows`),HTMLElement).textContent=`, ${ar(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(Ai());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(Oi);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);U(this._top.cells[0]).colSpan=t,U(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=fr({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=U(this._items[e]);n.classList.contains(`wui-virtual-off`)!==t&&n.classList.toggle(`wui-virtual-off`,t)}this._range=i;let c=U(this._top),l=U(this._bottom);c.hidden=i.before===0,l.hidden=i.after===0,U(c.cells[0]).style.height=`${i.before}px`,U(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`)?tr.compact:e.classList.contains(`wui-table-cozy`)?tr.cozy:tr.comfortable}},Fi=class extends s{static get observedAttributes(){return[`static`,`max-scale`,`radius`]}constructor(){super(),z(this,`_pointerMoveListener`,void 0),z(this,`_pointerLeaveListener`,void 0),z(this,`_frame`,void 0),z(this,`_pointerX`,void 0),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 Li(this.getAttribute(`max-scale`),1.6)}_radius(){return Li(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=Ii(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`))Ii(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()}},Ii=e=>Ie(e,HTMLElement,`wui-dock item must be an HTML element`),Li=(e,t)=>{let n=Number.parseFloat(e??``);return Number.isFinite(n)?n:t},Ri=300,zi=150,Bi=`.wui-hover-card-trigger`,Vi=`.wui-hover-card-panel`,Hi=`a[href],button,input,select,textarea,[tabindex]`,Ui=0;function Wi(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}var Gi=class extends s{static get observedAttributes(){return[`open`]}constructor(){super(),z(this,`_doc`,void 0),z(this,`_timer`,void 0),z(this,`_described`,void 0),z(this,`_refocusing`,void 0),z(this,`_onOver`,void 0),z(this,`_onOut`,void 0),z(this,`_onFocusIn`,void 0),z(this,`_onFocusOut`,void 0),z(this,`_onKeyDown`,void 0),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 Wi(this,Bi)}get _panel(){return Wi(this,Vi)}get _anchor(){let e=this._trigger;return e?Wi(e,Hi)??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`,Ri):this._delay(`close-delay`,zi);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-${++Ui}`,t.setAttribute(`aria-describedby`,e.id),this._described=t)}},Ki=class extends s{static get observedAttributes(){return[`open`,`static`,`no-escape`]}constructor(){super(),z(this,`_doc`,void 0),z(this,`_release`,void 0),z(this,`_opener`,void 0),z(this,`_returnTo`,void 0),z(this,`_session`,void 0),z(this,`_closing`,void 0),z(this,`_reopen`,void 0),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}},qi=`.wui-nav-menu-link`,Ji=`(max-width: 767.98px)`,Yi=`data-open`,Xi=e=>e instanceof Element?e:e instanceof Node?e.parentElement:null,Zi=e=>[...e].filter(e=>e instanceof HTMLElement),Qi=e=>{let t=e.children[0];if(!(t instanceof HTMLElement))throw Error(`Navigation entry has no control.`);return t},$i=e=>{let t=e.children[1];return t instanceof HTMLElement?t:null},ea=(e,t,n)=>{let r=e[t];if(r===void 0)throw Error(n);return r},ta=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(Ji),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&&Qi(t).focus({preventScroll:!0}))}_items(){return Zi(this.querySelectorAll(`.wui-nav-menu-item`))}_openItem(){return this._items().find(e=>{let t=$i(e);return t!==null&&this._isOpen(t)})??null}_isOpen(e){return e.hasAttribute(Yi)||N(e)}_isTrigger(e){return!!e?.classList.contains(`wui-nav-menu-trigger`)}_entries(){return this._items().map(Qi)}_links(e){let t=$i(e);return t?Zi(t.querySelectorAll(qi)):[]}_set(e,t){let n=$i(e);if(!n)return;let r=Qi(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(Ji).matches?(n.setAttribute(Yi,``),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(Yi),document.removeEventListener(`pointerdown`,this._onOutsidePress,!0),N(n)&&M(n),this._settle(e)}_settle(e){let t=Qi(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=Xi(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($i(e),`Navigation entry has no panel.`),i=t===e||this._isOpen(n);this._set(e,!i);return}let i=n?.closest(qi);i&&this.contains(i)&&this.close()}_handleKeyDown(e){if(this._pressedOpen=null,e.altKey||e.ctrlKey||e.metaKey)return;let t=Xi(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||!$i(n)?.hasAttribute(Yi))return;e.preventDefault(),e.stopPropagation();let r=n.contains(t);this._set(n,!1),r&&Qi(n).focus({preventScroll:!0});return}if(t.matches(qi)){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),ea(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),ea(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(),ea(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(),ea(r,0,`Navigation panel has no link to focus.`).focus({preventScroll:!0})):e.key===`End`&&(e.preventDefault(),ea(r,r.length-1,`Navigation panel has no link to focus.`).focus({preventScroll:!0}))}_teardown(){for(let e of this._items()){let t=$i(e);if(!t)continue;let n=t.hasAttribute(Yi);t.removeAttribute(Yi),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)}},na=n({isDrawn:()=>ra});function ra(e){return typeof e.checkVisibility==`function`?e.checkVisibility():e.closest(`[hidden]`)===null&&getComputedStyle(e).display!==`none`}var ia={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`},aa=n({NOTIFICATION_COUNT_CAP:()=>99,groupNotificationsByDay:()=>ma,notificationCountText:()=>la,notificationDayHeading:()=>pa,notificationTime:()=>fa,notificationTriggerLabel:()=>ua,notificationUnreadAnnouncement:()=>da}),oa=99,sa=864e5,ca=()=>L(`notificationCentre`,ia);function la(e){return e>99?`99+`:String(e)}function ua(e,t){return t===0?e:`${e}, ${la(t)} ${ca().unreadWordLabel}`}function da(e){return e===0?ca().noneUnreadText:Ye(ca(),`unreadAnnouncementText`,e,{unread:la(e)})}function fa(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?``:zn(e,{pattern:`time`})}function pa(e,t=Date.now()){let n=zn(e);return n===zn(t)?ca().todayLabel:n===zn(Ln(t)-sa)?ca().yesterdayLabel:n}function ma(e,t=Date.now()){let n=new Map;for(let r of e){if(!Number.isFinite(Ln(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=zn(r.at),i=n.get(e);i||(i={key:e,heading:pa(r.at,t),items:[]},n.set(e,i)),i.items.push(r)}return[...n.values()]}var ha=Object.freeze([`POST`,`PUT`,`PATCH`,`DELETE`]),ga=e=>(qr(`[@webority/ui-elements] Wui-Toast-Action: ${e}; the toast shows no action.`),null),_a=e=>typeof e==`object`&&!!e;function va(e){if(e==null||e===``)return null;let t;try{t=JSON.parse(e)}catch{return ga(`the value is not JSON`)}let n=_a(t)?t:{},r=n.label,i=n.url,a=String(n.method??`POST`).toUpperCase();return typeof r!=`string`||r===``||typeof i!=`string`||i===``?ga(`label and url must be non-empty strings`):ha.includes(a)?{label:r,url:i,method:a}:ga(`method must be one of ${ha.join(`, `)}`)}var ya=n({CSRF_META_NAME:()=>ba,DEFAULT_CSRF_HEADER:()=>xa,DEFAULT_TIMEOUT_MS:()=>ja,HTTP_KINDS:()=>Ta,WUI_HEADERS:()=>W,WUI_REQUEST_HEADER:()=>wa,classifyStatus:()=>ka,configureCsrf:()=>Ca,createRequestQueue:()=>La,isSameOrigin:()=>Oa,readCsrf:()=>Da,settleResponse:()=>Fa,timeoutFromAttribute:()=>Ma,wuiFetch:()=>Ia}),ba=`wui-csrf`,xa=`RequestVerificationToken`,Sa={metaName:ba,header:xa};function Ca({metaName:e=ba,header:t=xa}={}){Sa={metaName:e,header:t}}var wa=`Wui-Request`,W=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`}),Ta=Object.freeze([`ok`,`validation`,`forbidden`,`networkCheck`,`client`,`server`,`network`,`timeout`,`aborted`,`stale`,`session`]),Ea=new Set([`GET`,`HEAD`]);function Da(e=document){let t=[...e.querySelectorAll(`meta`)].find(e=>e.getAttribute(`name`)===Sa.metaName),n=t?.getAttribute(`content`);return!t||!n?null:{header:t.getAttribute(`data-header`)||Sa.header,token:n}}var Oa=e=>{try{return new URL(e,window.location.href).origin===window.location.origin}catch{return!1}};function ka(e,t=null){return e>=200&&e<300?`ok`:e===401?`session`:e===403?t?.get(`cf-mitigated`)===`challenge`?`networkCheck`:`forbidden`:e===422?`validation`:e>=400&&e<500?`client`:`server`}var Aa=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,ja=3e4;function Ma(e){let t=e?.trim()??``;return/^\d+$/.test(t)?Number(t):void 0}var Na=e=>{if(e==null||e===``)return null;try{return JSON.parse(e)}catch(e){throw TypeError(`The ${W.data} response header is not JSON: ${e instanceof Error?e.message:String(e)}`,{cause:e})}},Pa=e=>{if(e==null)return null;try{return decodeURIComponent(e)}catch{return e}};function Fa(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:Pa(r(W.message)),redirect:r(W.redirect),result:r(W.result),keepOpen:r(W.keepOpen)===`1`,toastVariant:r(W.toastVariant),toastAction:va(r(W.toastAction)),fragment:r(W.fragment)===`1`,data:Na(Pa(r(W.data))),next:r(W.next)}}async function Ia(e,t={}){let n=(t.method||`GET`).toUpperCase(),r=t.navigate||(e=>window.location.assign(e)),i={Accept:`text/html`,"X-Requested-With":`XMLHttpRequest`,[wa]:`1`,...t.headers};if(!Ea.has(n)&&Oa(e)){let e=Da();e&&(i[e.header]=e.token)}let a=new AbortController,o=()=>a.abort(),s=t.signal;s?.aborted&&a.abort(),s?.addEventListener(`abort`,o,{once:!0});let c=t.timeoutMs??0,l=!1,u=c>0?setTimeout(()=>{l=!0,a.abort()},c):void 0,d=e=>s?.aborted?`aborted`:l?`timeout`:Aa(e)?`aborted`:`network`;try{let o;try{o=await fetch(e,{method:n,...t.body===void 0?{}:{body:t.body},headers:i,signal:a.signal,credentials:`same-origin`})}catch(e){return Fa(d(e))}let s=ka(o.status,o.headers);if(s===`ok`&&o.redirected&&o.headers.get(W.fragment)!==`1`&&(s=`session`),s===`session`)return r(o.status===401?o.headers.get(`Location`)||window.location.href:o.url),Fa(s,o);let c=``;if(s===`ok`||s===`validation`)try{c=await o.text()}catch(e){return Fa(d(e),o)}return Fa(s,o,c)}finally{clearTimeout(u),s?.removeEventListener(`abort`,o)}}function La(){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 Ia(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 Ra=n({HTTP_FAILURE_TEXT:()=>za}),za={networkCheckText:`A network check stopped this request. Try again, or report it if it keeps happening.`,networkText:`We could not reach the server. Check your network or firewall and try again.`},Ba=()=>L(`notificationCentre`,ia),Va=`.wui-notification-center-trigger`,Ha=`.wui-notification-center-panel`,Ua=`.wui-notification-center-count`,Wa=`.wui-notification-center-live`,Ga=`.wui-notification-center-markall`,Ka=`.wui-notification-center-item`,qa=`wui-notification-center-item-read`,Ja=`.wui-notification-center-unread-label`,Ya=`.app-tabs`,Xa=`.wui-notification-center-tabs [role='tablist']`,Za=`.wui-notification-center-tabs [role='tab']`,Qa=`.wui-notification-center-empty`,$a=`(max-width: 767.98px)`,eo={ArrowDown:1,ArrowUp:-1,Home:`first`,End:`last`},to=e=>!!e,no=()=>({forbidden:Ba().forbiddenMessage,networkCheck:L(`httpFailure`,za).networkCheckText,client:Ba().clientMessage,validation:Ba().clientMessage,server:Ba().serverMessage,network:Ba().networkMessage}),G=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},ro=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),io=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,Ha)===null||G(this,Va)===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,Ha);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,Ha)!==null&&G(this,Va)!==null&&(this._disarmAwait(),this._syncOpen(),this._showPanel())}_disarmAwait(){this._awaitChildren?.disconnect(),this._awaitChildren=null}_showPanel(){let e=P(G(this,Ha),`<wui-notification-center> needs its panel to open.`),t=P(G(this,Va),`<wui-notification-center> needs its trigger to open.`);N(e)||(this._sheet=window.matchMedia($a).matches,this._sheet?ke(e,!0):Oe(t,e,{mode:`auto`,onClosed:()=>this._closedByBrowser()}),N(e)&&this._layoutTabs())}_hidePanel(){let e=G(this,Ha);e&&N(e)&&(this._sheet?ke(e,!1):M(e))}_closedByBrowser(){if(!this.isConnected||!this.hasAttribute(`open`))return;let e=G(this,Ha);this.close({restoreFocus:e?.contains(this.ownerDocument.activeElement)??!1})}get isOpen(){return this.hasAttribute(`open`)}open(){this.isOpen||(P(G(this,Ha),`<wui-notification-center> needs its panel to open.`),P(G(this,Va),`<wui-notification-center> needs its trigger to open.`),this.setAttribute(`open`,``),this._syncOpen(),G(this,Ha)?.focus(),this._announceToggle())}close({restoreFocus:e=!1}={}){this.isOpen&&(this.removeAttribute(`open`),this._syncOpen(),e&&G(this,Va)?.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(Va)?.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(`${Ka}:not(.${qa}):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(`${Va}, ${Ga}, ${Ka}`);r instanceof HTMLElement&&this.contains(r)&&(r.matches(Va)?this.toggle():this.hasAttribute(`controlled`)||(r.matches(Ga)?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(Ha)?.contains(t)||t.closest(Ya))return;let n=eo[e.key];if(n===void 0)return;let r=ro(this,Ka).filter(ra);if(r.length===0)return;let i=t.closest(Ka),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(qa)||(this._applyRead(e),e.dataset.archived!==`true`&&(this._unread=Math.max(0,this._unread-1)),this._render(),this._say(da(this._unread)),this._emitRead([e.dataset.id].filter(to),!1))}async _markAll(){if(this._busy)return;let e=ro(this,`${Ka}:not(.${qa})`);if(e.length===0&&this._unread===0)return;let t=e.map(e=>e.dataset.id).filter(to),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 Ia(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||no()[e]||Ba().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(Ba().allReadText),this._emitRead(t,!0)}_pickTab(e){let t=e.closest(Xa);if(t instanceof HTMLElement){for(let n of ro(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 ro(this,Xa)){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 ro(this,Ka)){let r=n.dataset.archived===`true`,i=n.classList.contains(qa),a=e===`archived`?r:!r&&(e!==`unread`||!i);a&&(t=!0);let o=n.closest(`li`);o&&(o.hidden=!a)}for(let e of ro(this,`.wui-notification-center-list section`))e.hidden=[...e.querySelectorAll(`li`)].every(e=>e.hidden);let n=G(this,Qa);n&&(n.hidden=t)}_applyRead(e){e.classList.add(qa),e.querySelector(Ja)?.remove()}_setBusy(e){this._busy=e;let t=this.querySelector(Ga);t instanceof HTMLButtonElement&&(t.disabled=e||this._unread===0,e?t.setAttribute(`aria-busy`,`true`):t.removeAttribute(`aria-busy`))}_render(){let e=G(this,Ua);e&&(e.textContent=la(this._unread),e.hidden=this._unread===0),this.querySelector(Va)?.setAttribute(`aria-label`,ua(this.getAttribute(`label`)||Ba().label,this._unread));let t=this.querySelector(Ga);t instanceof HTMLButtonElement&&(t.disabled=this._unread===0)}_say(e){let t=this.querySelector(Wa);t&&(t.textContent=e)}_emitRead(e,t){this.dispatchEvent(new CustomEvent(`wui:notification-center:read`,{bubbles:!0,detail:{ids:e,all:t}}))}},ao=`.wui-onboarding-card`,oo=`.wui-onboarding-steps`,so=`.wui-onboarding-toggle`,co=`.wui-onboarding-dismiss`,lo=`.wui-onboarding-restore`,uo=`wui-onboarding:`,fo=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},po=class extends s{constructor(){super(),this._onClick=e=>{let t=e.target instanceof Element?e.target:null;t&&(t.closest(co)?this.dismiss():t.closest(lo)?this.restore():t.closest(so)&&this.toggle())}}connectedCallback(){this.addEventListener(`click`,this._onClick),this._stored()===`dismissed`&&this._setDismissed(!0)}disconnectedCallback(){this.removeEventListener(`click`,this._onClick)}get dismissed(){return fo(this,ao)?.hidden===!0}get collapsed(){return fo(this,oo)?.hidden===!0}dismiss(){this.dismissed||(this._setDismissed(!0),this._store(`dismissed`),fo(this,lo)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:dismiss`,{bubbles:!0})))}restore(){this.dismissed&&(this._setDismissed(!1),this._store(null),fo(this,so)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:restore`,{bubbles:!0})))}toggle(){let e=fo(this,oo);if(!e)return;let t=!e.hidden;e.hidden=t,this.querySelector(so)?.setAttribute(`aria-expanded`,String(!t)),this.dispatchEvent(new CustomEvent(`wui:onboarding:collapse`,{bubbles:!0,detail:{collapsed:t}}))}_setDismissed(e){let t=fo(this,ao),n=fo(this,lo);t&&(t.hidden=e),n&&(n.hidden=!e)}_key(){let e=this.getAttribute(`storage-key`);return e?uo+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}}},mo=n({BUSY_CLASS:()=>ho,isInert:()=>_o,isReadOnly:()=>go,syncFieldState:()=>vo}),ho=`wui-field-busy`,go=e=>e.hasAttribute(`readonly`),_o=e=>e.hasAttribute(`disabled`)||e.hasAttribute(`readonly`)||e.hasAttribute(`loading`);function vo(e,t){let n=e.hasAttribute(`loading`);n?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`),t&&(t.classList.toggle(ho,n),go(e)?t.setAttribute(`aria-readonly`,`true`):t.removeAttribute(`aria-readonly`))}var yo=n({syncFormMirror:()=>Co,syncFormMirrors:()=>wo}),bo=`data-wui-mirror`;function xo(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 So(e){let t=document.createElement(`input`);return t.type=`hidden`,t.setAttribute(bo,``),e.appendChild(t),t}function Co(e,t){let n=e.getAttribute(`name`)??``,r=e.querySelector(`:scope > input[${bo}]`),i=r instanceof HTMLInputElement?r:null;n?(i||=So(e),xo(e,i,n,t)):i?.remove()}function wo(e,t){let n=e.getAttribute(`name`)??``,r=[...e.querySelectorAll(`:scope > input[${bo}]`)].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)=>{xo(e,r[i]??So(e),n,t)})}var To=/[^0-9]/g,Eo=/[^0-9a-zA-Z]/g,Do=class extends s{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),Co(this,this._value),this._paint()}_clean(e){return(e==null?``:String(e)).replace(this.mode===`alphanumeric`?Eo:To,``).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||``,Co(this,this._value),this._paint()}attributeChangedCallback(e,t,n){this._rendered&&(e===`value`?(this._value=this._clean(n),Co(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=go(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,Co(this,this._value),vo(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,Co(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(_o(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)}};z(Do,`formAssociated`,!0);var Oo={label:`More`},ko=`data-wui-overflow-hidden`,Ao=`[aria-selected="true"], .active`,jo=`.chip-body, input, a[href], button:not(.chip-remove)`,Mo=()=>L(`overflow`,Oo),No=1,Po=`data-wui-overflow-menu`,Fo=`[aria-haspopup], [data-wui-dropdown-trigger]`,Io=0,Lo=e=>Number.parseFloat(e)||0,Ro=e=>e.nodeType===1,zo=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 Ro(t)&&!t.matches(`svg, img, [aria-hidden='true'], [data-wui-dropdown-menu]`)&&r(t)};if(r(e),n.length)return n.join(` `);let i=Bo(e)??e;return i.getAttribute(`aria-label`)||e.getAttribute(`aria-label`)||i.title||e.title},Bo=e=>{if(e.matches(`button, a[href], label, input`))return e;let t=e.querySelector(jo);return t instanceof HTMLElement?t:null},Vo=e=>{let t=Bo(e);return t?.matches(Fo)?t:null},Ho=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`)||Mo().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-${++Io}`,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(ko),e.removeAttribute(Po);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=Lo(i.columnGap),o=Lo(i.paddingLeft)+Lo(i.paddingRight)+Lo(i.borderLeftWidth)+Lo(i.borderRightWidth),s=t.map(e=>e.offsetWidth);if(s.reduce((e,t)=>e+t,0)+a*(t.length-1)>n-o+No){this._more.hidden=!1;let e=n-o-this._more.offsetWidth-Lo(getComputedStyle(this).columnGap),i=this.hasAttribute(`keep`)?this.getAttribute(`keep`):Ao,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(ko,``),Vo(e)&&e.setAttribute(Po,``);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(ko)):[]}_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=Bo(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=zo(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=Vo(e)?.isConnected?e.querySelector(`.dropdown-item:not([aria-disabled='true'])`):null;if(n){n.focus();return}let r=!e.hasAttribute(ko)&&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()}},Uo=`.wui-rating-star`,Wo=`wui-rating-star-preview`,Go=`wui-rating-previewing`,Ko=`wui-rating-star-full`,qo=`wui-rating-star-empty`,Jo=[Ko,`wui-rating-star-half`,qo],Yo=e=>[...e.querySelectorAll(Uo)].filter(e=>e instanceof HTMLElement),Xo=class extends s{constructor(){super(),z(this,`_onChange`,void 0),z(this,`_onOver`,void 0),z(this,`_onLeave`,void 0),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,Uo);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 Yo(this))t.classList.remove(...Jo),t.classList.add(Number(t.dataset.value)<=e?Ko:qo)}_preview(e){this.classList.toggle(Go,e>0);for(let t of Yo(this))t.classList.toggle(Wo,e>0&&Number(t.dataset.value)<=e)}},Zo=class extends s{constructor(){super(),z(this,`_doc`,void 0),z(this,`_onKeyDown`,void 0),this._doc=null,this._onKeyDown=e=>{this.hasAttribute(`keys`)&&_t(e,{j:()=>this._press(`.wui-record-pager-next`),k:()=>this._press(`.wui-record-pager-prev`)},this.closest(`[${nt}]`))}}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()}},Qo={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`},$o=6e4,es=60*$o,ts=24*es,ns=()=>L(`relativeTime`,Qo),rs={minute:`minutesAgoText`,hour:`hoursAgoText`,day:`daysAgoText`},is={minute:`inMinutesText`,hour:`inHoursText`,day:`inDaysText`};function as(e,t=Date.now()){let n=Ln(e);if(!Number.isFinite(n))return V();let r=t-n,i=Math.abs(r);if(i>=7*ts)return zn(n);if(i<$o)return ns().justNowText;let[a,o]=i<es?[Math.floor(i/$o),`minute`]:i<ts?[Math.floor(i/es),`hour`]:[Math.floor(i/ts),`day`];return Ye(ns(),(r>0?rs:is)[o],a)}function os(e){let t=Ln(e);return Number.isFinite(t)?`${zn(t,{pattern:`datetime`})} IST`:V()}var ss=3e4,cs=new Set,ls=null,us=()=>{if(!(typeof document<`u`&&document.hidden))for(let e of cs)e.refresh()},ds=e=>{cs.add(e),cs.size===1&&(ls=setInterval(us,ss),document.addEventListener(`visibilitychange`,us))},fs=e=>{cs.delete(e),cs.size===0&&(clearInterval(ls??void 0),ls=null,document.removeEventListener(`visibilitychange`,us))},ps=class extends s{constructor(){super(),z(this,`_observer`,void 0),this._observer=null}connectedCallback(){this.refresh(),ds(this),this._observer=new MutationObserver(()=>this.refresh()),this._observer.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`datetime`]})}disconnectedCallback(){fs(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=as(t);e.textContent!==n&&(e.textContent=n);let r=os(t);this.getAttribute(`data-wui-tooltip`)!==r&&this.setAttribute(`data-wui-tooltip`,r)}},ms=n({avatarNode:()=>gs,safeImageUrl:()=>hs}),hs=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 gs(e,t=`wui-opt-avatar`){let n=hs(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 _s={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`}]],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`}]]},vs=n({GLYPH_CHUNK:()=>ys,GLYPH_PENDING_ATTRIBUTE:()=>bs,glyphNode:()=>ks,registerGlyphs:()=>js}),ys=`glyphs`,bs=`data-wui-glyph-pending`,xs=`svg[${bs}]`,Ss=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,Cs={..._s},ws=new Map,Ts=!1,Es=null;function Ds(e){return Yr(Cs,e)?Cs[e]:void 0}function Os(e,t,n,r){return{class:n?`wui-icon ${n}`:`wui-icon`,"data-icon":e,[bs]:r?!0:void 0,width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`}}function ks(e,{size:t=16,className:n=``}={}){let r=Ds(e);if(r!==void 0){let i=`${e}|${t}|${n}`,a=ws.get(i);return a===void 0&&(a=Ur(Os(e,t,n,!1),r),ws.set(i,a)),Ie(a.cloneNode(!0),SVGSVGElement,`glyphNode: ${e} did not clone to an svg`)}return Ts||!Ss.test(e)?null:(Promise.allSettled([_i(ys)]),Ur(Os(e,t,n,!0),[]))}function As(e){let t=e instanceof Element&&e.matches(xs)?[e]:[];for(let n of[...t,...e.querySelectorAll(xs)]){let e=Ds(n.getAttribute(`data-icon`)??``);e===void 0?n.remove():(n.removeAttribute(bs),n.replaceChildren(...Hr(e)))}}function js(e){Object.assign(Cs,e),Ts=!0,As(document),Es===null&&(Es=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&As(e)}),Es.observe(document.documentElement,{childList:!0,subtree:!0}))}var Ms=n({createListboxKeyNav:()=>Ps,moveActiveRow:()=>Fs}),Ns=e=>e.target instanceof Element?e.target.tagName:void 0;function Ps(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=Ns(e)===`INPUT`||Ns(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(zr(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&&Ns(e)!==`INPUT`&&Ns(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}}function Fs(e,t){let n=e.querySelector(`.is-active`);n!==t&&(n?.classList.remove(`is-active`),t?.classList.add(`is-active`))}var Is=n({TRUSTED_LABEL:()=>Ls,optionLabelNodes:()=>Us,optionText:()=>Ws,stripTags:()=>Bs,withTrustedLabel:()=>Rs}),Ls=Symbol(`wui.trustedLabel`),Rs=(e,t)=>{let n=document.createDocumentFragment();return n.append(t.cloneNode(!0)),{...e,[Ls]:n}},zs=e=>`wui-flag wui-flag-${e}`,Bs=e=>String(e??``).replace(/<[^>]*>/g,``),Vs=e=>{if(!e)return null;let t=String(e).toLowerCase().replace(/[^a-z0-9-]/g,``);return t?ks(t):null},Hs=e=>{let t=String(e??``).toLowerCase();return/^[a-z]{2}$/.test(t)?I(`span`,{class:zs(t),"aria-hidden":`true`}):null};function Us(e){if(e==null)return[];let t=Hs(e.flag),n=Vs(e.icon),r=e[Ls],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 Ws=e=>{if(e==null)return``;let t=e[Ls];return t?t.textContent??``:Bs(e.label)},Gs=n({SELECT_TEXT:()=>Ks}),Ks={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…`},qs=n({clearOptions:()=>tc,drawn:()=>Xs,filterOptions:()=>Ys,nodesSignature:()=>Qs,optionRow:()=>lc,posAttrMap:()=>Zs,refreshWindow:()=>ac,registerWindowImpl:()=>ec,renderOptions:()=>nc,revealRow:()=>oc,rowId:()=>rc,rowIndexByPrefix:()=>cc,rowIndexOfValue:()=>sc}),Js=()=>L(`select`,Ks);function Ys(e,t){let n=String(t??``).trim().toLowerCase();return n?e.filter(e=>[Ws(e),e.description,e.meta].some(e=>String(e??``).toLowerCase().includes(n))):e}var Xs=new WeakMap,Zs=e=>e?{"data-index":String(e.index),"aria-setsize":String(e.size),"aria-posinset":String(e.index+1)}:{},Qs=e=>e.map(e=>e instanceof Element?e.outerHTML:e.textContent??``).join(``),$s;function ec(e){$s=e}function tc(e){$s?.clear(e),Xs.delete(e),e.replaceChildren()}function nc(e,t,n={}){let{selected:r=[],query:i=``,status:a=`idle`,emptyText:o=Js().emptyText,searchingText:s=Js().searchingText,hintText:c=Js().hintText,actionRow:l=[],recents:u=null}=n,d=new Set(r.map(String)),f=Ys(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=$s,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:rc(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 lc(e,rc(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:Qs(n),postSig:Qs(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=Qs(ee);return Xs.get(e)===te||(Xs.set(e,te),e.replaceChildren(...ee)),{rows:S,windowed:!1,long:v}}var rc=(e,t)=>`${e}-opt-${t}`,ic=e=>[...e.querySelectorAll(`.wui-select-option`)];function ac(e){return $s?$s.refresh(e):!1}function oc(e,t){return $s?$s.reveal(e,t):ic(e)[t]??null}function sc(e,t){if($s)return $s.indexOfValue(e,t);let n=new Set(t.map(String));return ic(e).findIndex(e=>n.has(e.dataset.value??``))}function cc(e,t){return $s?$s.indexByPrefix(e,t):ic(e).findIndex(e=>(e.textContent??``).trim().toLowerCase().startsWith(t))}function lc(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`},ks(`check`));if(!e.description&&!e.meta)return I(`button`,{type:`button`,class:`wui-select-option${n?` selected`:``}`,...a},gs(e),I(`span`,{class:`wui-select-opt-name`},...Us(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},gs(e),I(`span`,{class:`wui-select-option-text`},I(`span`,{class:`wui-opt-label`},...Us(e)),s),c,o)}var uc=Object.freeze([`single`,`multiple`,`search`,`tag`,`country`]),dc=e=>e===`multiple`||e===`tag`,fc=n({registerSelectPart:()=>mc,selectPart:()=>hc}),pc=new Map;function mc(e,t){pc.set(e,t)}function hc(e){return pc.get(e)}var gc={chips:`select-chips`,search:`select-search`,country:`phone`,recents:`select-recents`};function _c(e){let t=Yr(gc,e)?gc[e]:void 0;if(!t)return Promise.reject(Error(`Unknown <wui-select> part: ${e}.`));let n=hc(e);return n?Promise.resolve(n):_i(t).then(()=>P(hc(e),`The ${e} part of <wui-select> did not register.`))}var vc=n({searchesRemotely:()=>yc}),yc=e=>typeof e.loadOptions==`function`||!!e.getAttribute(`source`)||e.hasAttribute(`remote`),bc=()=>_i(`select-window`),xc={requiredFieldMessage:`Please fill in this field.`},Sc={clearLabel:`Clear search`,placeholder:`Search…`,searchLabel:`Search`},Cc=n({WuiSelect:()=>Dc}),wc=()=>L(`select`,Ks),Tc=()=>L(`search`,Sc),Ec=()=>L(`field`,xc),Dc=class extends s{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(),z(this,`_internals`,void 0),z(this,`_value`,void 0),z(this,`_optionsProp`,void 0),z(this,`_partOptions`,void 0),z(this,`_known`,void 0),z(this,`_loadOptionsFn`,void 0),z(this,`_validateFn`,void 0),z(this,`_declared`,void 0),z(this,`_query`,void 0),z(this,`_ownsFilter`,void 0),z(this,`_active`,void 0),z(this,`_rows`,void 0),z(this,`_windowed`,void 0),z(this,`_windowLoad`,void 0),z(this,`_windowFailed`,void 0),z(this,`_scrollFrame`,void 0),z(this,`_status`,void 0),z(this,`_error`,void 0),z(this,`_nav`,void 0),z(this,`_parts`,void 0),z(this,`_partSig`,void 0),z(this,`_partsMounted`,void 0),z(this,`_partToken`,void 0),z(this,`_rendered`,void 0),z(this,`_searchShown`,void 0),z(this,`_defaultValue`,void 0),z(this,`_warnedMode`,void 0),z(this,`_warnedDensity`,void 0),z(this,`_hoverTimer`,void 0),z(this,`_hoverOpened`,void 0),z(this,`_onHoverOver`,void 0),z(this,`_onHoverOut`,void 0),z(this,`_panelShown`,void 0),z(this,`_pressOpen`,void 0);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)},jc)))},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()},Mc)))}}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=Rc(n,dc(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=Rc(this._value,dc(this.mode)),this._partOptions=null,this._known.clear(),this._ensureParts()),(e===`source`||e===`remote`||e===`recents-key`)&&this._ensureParts(),Ic.has(e)?this._rendered&&(this._drawValue(),this.renderList()):Fc.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`:kc(e)?e:(e!==this._warnedMode&&(this._warnedMode=e,qr(`<wui-select> mode "${e}" is not one of ${uc.join(`, `)}; it is treated as "single".`)),`single`)}_checkDensity(){let e=this.getAttribute(`density`);e===null||Ac.includes(e)||e===this._warnedDensity||(this._warnedDensity=e,qr(`<wui-select> density "${e}" is not one of ${Ac.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=Rc(e,dc(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(){_o(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=Ys(this._listOptions(),t).length+n.length+(r?.options.length??0),this._windowed=!1,tc(e.list),this._anchorMenu();return}let i=nc(e.list,this._listOptions(),{selected:this._selectedValues(),query:t,status:this._status,emptyText:this.getAttribute(`empty-text`)||wc().emptyText,searchingText:this.getAttribute(`searching-text`)||wc().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=dc(t),r=t===`tag`,i=n&&(r||this.hasAttribute(`allow-custom`));this._value=Rc(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=Rc(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`);if(!this.id){let e=crypto.getRandomValues(new Uint8Array(8));this.id=`wui-select-${Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``)}`}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?ks(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":wc().clearSelectionLabel,hidden:!0},ks(`x`)):null,ks(`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`?wc().countrySearchPlaceholder:Tc().placeholder),E=I(`div`,{class:`wui-select-menu wui-select-menu-fixed`,popover:`auto`},w?I(`div`,{class:`wui-select-search`},ks(`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":Tc().clearLabel,hidden:!0},ks(`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(),vo(this,this.querySelector(`.wui-select-control`)),this._mountParts(e)}_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||wc().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`)??Wc(e).trim(),label:t.textContent??``,selected:e.hasAttribute(`selected`)};for(let[t,r]of Lc){let i=e.getAttribute(t);i&&(n[r]=i)}return e.hasAttribute(`disabled`)&&(n.disabled=!0),Rs(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`)||Pc()[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(){dc(this.mode)?wo(this,this._selectedValues()):Co(this,this._value)}_drawValue(){let e=this._refs();if(!e.value)return;let t=dc(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?Us(n):r?[r]:[])}_syncTitle(e){let t=this.querySelector(`.wui-select-control`);if(!t)return;let n=e&&!this.hasAttribute(`title`)?Ws(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=!dc(this.mode)&&this._hasValue()?gs({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},Ec().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()&&!_o(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`)||_o(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>Nc}_visible(){let e=this._refs();return e.list?Uc(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?oc(n.list,e):null)),Fs(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&&ac(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?sc(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:Wc(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);dc(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`&&yc(this)}_onKeyDown(e){if(!_o(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`||zr(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=Ps({getVisibleOptions:()=>this._visible(),getActive:()=>this._active,setActive:e=>this._setActive(e),getCount:()=>this._rowCount(),getOptionAt:e=>this._rowEl(e),findByPrefix:e=>this._windowed?cc(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()&&!_o(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(_o(this))return;this._refs().input?.focus(),!this._menuOpen()&&this._draftOpens()&&this._open({focus:!1});return}if(e.target instanceof HTMLInputElement){!this._menuOpen()&&!_o(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():_o(this)||this._open({focus:!0})}),a?.addEventListener(`click`,e=>{e.stopPropagation(),this.commit(dc(this.mode)?[]:``),this._close(),t.focus()}),n.addEventListener(`click`,n=>{let r=Hc(n).closest(`.wui-select-option`);if(r instanceof HTMLElement&&(this._pick(r),dc(this.mode))){let n=this.querySelector(`.wui-select-draft`);(e.search??(n instanceof HTMLElement?n:t)).focus()}}),n.addEventListener(`mousedown`,e=>{dc(this.mode)&&e.target instanceof Element&&e.target.closest(`.wui-select-option`)&&e.preventDefault()}),n.addEventListener(`mousemove`,e=>{let t=Hc(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?.clearTypeahead(),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=Bc(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=>Gc(this,e))).then(e=>{n===this._partToken&&(this._parts=e.filter(e=>e!==null),this._mountParts())})}_loadWindow(){this._windowLoad===null&&(this._windowLoad=bc().then(()=>this.renderList(),()=>{this._windowFailed=!0,document.dispatchEvent(new CustomEvent(ni,{bubbles:!0,composed:!0,detail:{chunk:`select-window`}})),this.setError(wc().partLoadMessage)}))}_mountParts(e={draft:``,query:``}){if(!this._parts||this._partsMounted||!this._rendered||!this.isConnected)return;this._partsMounted=!0;let t=Oc(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??``}}};z(Dc,`formAssociated`,!0);var Oc=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}},kc=e=>uc.includes(e),Ac=[`comfortable`,`compact`],jc=150,Mc=250,Nc=10,Pc=()=>{let e=wc();return{single:e.placeholder,search:e.placeholder,multiple:e.placeholder,tag:e.tagPlaceholder,country:e.countryPlaceholder}},Fc=new Set([`countries`,`suggested`,`suggested-label`,`all-countries-label`,`max-tags`,`pattern`,`collapse-chips`,`source`,`remote`,`min-chars`]),Ic=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`]),Lc=[[`icon`,`icon`],[`description`,`description`],[`meta`,`meta`],[`group`,`group`],[`avatar`,`avatar`],[`initials`,`initials`],[`disabled-hint`,`disabledHint`]],Rc=(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),zc=(e,t)=>t===`multiple`?yc(e)?[`chips`,`search`]:[`chips`]:t===`search`?[`search`]:t===`country`?[`country`]:t===`tag`?yc(e)?[`chips`,`search`]:[`chips`]:[],Bc=(e,t)=>e.hasAttribute(`recents-key`)?[`recents`,...zc(e,t)]:zc(e,t),Vc=e=>typeof e==`object`&&!!e&&`default`in e&&typeof e.default==`function`,Hc=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},Uc=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Wc=e=>{let t=e.textContent;if(t===null)throw Error(`The element has no text.`);return t},Gc=(e,t)=>_c(t).then(e=>{if(!Vc(e))throw Error(`The part ${t} has no default export.`);return e.default()}).catch(()=>(document.dispatchEvent(new CustomEvent(ni,{bubbles:!0,composed:!0,detail:{chunk:t}})),e.setError(wc().partLoadMessage),null)),Kc=`wui-shortcuts-open-change`;function qc(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}function Jc(e,t){return[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement)}var Yc=class extends s{static get observedAttributes(){return[`open`,`no-trigger`]}constructor(){super(),z(this,`_doc`,void 0),z(this,`_onKeyDown`,void 0),z(this,`_onClick`,void 0),z(this,`_onDocClick`,void 0),z(this,`_onPointerDown`,void 0),z(this,`_onPressEnd`,void 0),z(this,`_pressedOpen`,void 0),z(this,`_pinned`,void 0),z(this,`_mirroring`,void 0),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=qc(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)&&qc(n,`.wui-shortcut-close`)?.focus()}):r?.focus())}_mirror(e){let t=this._sheet();t&&(t.hidden=!e),qc(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(Kc,{bubbles:!0,detail:{open:e}})))}_sheet(){return qc(this,`.wui-shortcut-sheet`)}_syncTrigger(){let e=qc(this,`.wui-shortcut-toggle`);e&&(e.hidden=this.hasAttribute(`no-trigger`))}_scope(){let e=this.closest(`[${nt}]`);return e instanceof HTMLElement?e:null}_items(){let e=this.getAttribute(`items`);return e?Jc(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`);(qc(this._scope()??t,e)??qc(t,e))?.focus()}_keydown(e){if(e.defaultPrevented)return;let t=ut(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=()=>vt(this._items(),1),r.k=()=>vt(this._items(),-1),r.x=()=>this._tickFocused()),this.getAttribute(`search`)&&(r.slash=()=>this._focusSearch()),r[t]){_t(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(ht(i)||!gt(a,n)||pt(a))return;let o=dt(t),s=Jc(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?qc(i,u):null;d&&(e.preventDefault(),d.click())}},Xc={lessLabel:`Show less`,moreLabel:`Show more`},Zc=3,Qc=()=>L(`showMore`,Xc),$c=class extends s{constructor(){super(),z(this,`_width`,void 0),z(this,`_observer`,void 0),z(this,`_toggle`,void 0),z(this,`_onClick`,void 0),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`)||Qc().lessLabel:this.getAttribute(`more-label`)||Qc().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}},el=class extends s{constructor(){super(),z(this,`_measure`,void 0),z(this,`_resize`,void 0),z(this,`_mutation`,void 0),z(this,`_ownTabindex`,void 0),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)))}},tl=`wui-whats-new-read`,nl=`wui-whats-new:`,rl=`data-wui-unread`,il=0,al=e=>{let t=Date.parse(e);return Number.isNaN(t)?-1/0:t},ol=(e,t)=>al(t)>al(e)?t:e,sl=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},cl=class extends s{static get observedAttributes(){return[`storage-key`,`read-through`,`indicator`]}constructor(){super(),z(this,`_doc`,void 0),z(this,`_stored`,void 0),z(this,`_observer`,void 0),z(this,`_onTriggerClick`,void 0),z(this,`_closeFocus`,void 0),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 sl(this,`.wui-whats-new-trigger`)}get _panel(){return sl(this,`.wui-whats-new-panel`)}get _dot(){return sl(this,`.wui-whats-new-dot`)}connectedCallback(){this._doc=this.ownerDocument;let e=this._panel,t=this._trigger;e&&t&&(e.id||=`wui-whats-new-${++il}`,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})=>ol(e,t),``)}_seenPoint(){return ol(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=al(i)>al(e);t&&n++,this.isOpen&&r.hasAttribute(rl)||r.toggleAttribute(rl,t)}this.toggleAttribute(rl,n>0);let r=this._dot;r&&(r.textContent=this.getAttribute(`indicator`)===`count`&&n>0?String(n):``)}_markRead(){let e=this._newest();!e||al(e)<=al(this._seenPoint())||(this._stored=ol(this._stored,e),this._save(this._stored),this._refresh(),this.dispatchEvent(new CustomEvent(tl,{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:nl+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)}},ll=n({APP_BUTTON_MARKER:()=>ul,buttonClass:()=>ml}),ul=`AppButton`,dl=new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),fl={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 pl(e){return Yr(fl,e)}function ml(e=`primary`,t=`solid`,n=`md`){if(!dl.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!pl(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=fl[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}var hl=n({DISPLAY_FORMAT:()=>xl,MONTH_DISPLAY_FORMAT:()=>Tl,YEAR_DISPLAY_FORMAT:()=>kl,clampMonth:()=>Ml,daysIn:()=>jl,firstWeekday:()=>_l,fmt:()=>Sl,fmtMonth:()=>El,fmtYear:()=>Al,pad:()=>vl,parseIso:()=>bl,parseIsoMonth:()=>Cl,parseIsoYear:()=>Dl,toIso:()=>yl,toIsoMonth:()=>wl,toIsoYear:()=>Ol}),gl=e=>{let t=String(e??``).trim();return/^[0-6]$/.test(t)?Number(t):null},_l=e=>gl(e.getAttribute(`first-day`))??gl(getComputedStyle(e).getPropertyValue(`--wui-first-day`))??1,vl=e=>String(e).padStart(2,`0`),yl=(e,t,n)=>`${e}-${vl(t+1)}-${vl(n)}`,bl=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>jl(a,o-1)?null:{y:a,m:o-1,d:s}},xl=`dd-MMM-yyyy`,Sl=(e,t=xl)=>{let n=bl(e);if(!n)return``;let r={yyyy:n.y,MMMM:pn(n.m),MMM:fn(n.m),MM:vl(n.m+1),dd:vl(n.d),d:n.d};return(t||`dd-MMM-yyyy`).replace(/yyyy|MMMM|MMM|MM|dd|d/g,e=>String(r[e]))},Cl=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}},wl=(e,t)=>`${e}-${vl(t+1)}`,Tl=`MMM yyyy`,El=(e,t=Tl)=>{let n=Cl(e);if(!n)return``;let r={yyyy:n.y,MMMM:pn(n.m),MMM:fn(n.m),MM:vl(n.m+1)};return(t||`MMM yyyy`).replace(/yyyy|MMMM|MMM|MM/g,e=>String(r[e]))},Dl=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}},Ol=e=>String(e).padStart(4,`0`),kl=`yyyy`,Al=(e,t=kl)=>{let n=Dl(e);return n?(t||`yyyy`).replace(/yyyy/g,String(n.y)):``},jl=(e,t)=>{let n=new Date(0);return n.setFullYear(e,t+1,0),n.getDate()},Ml=(e,t)=>{for(;t<0;)t+=12,--e;for(;t>11;)t-=12,e+=1;return{y:e,m:t}},Nl=n({COPY_FEEDBACK_MS:()=>Pl,copyTextToClipboard:()=>Fl}),Pl=2e3;async function Fl(e){if(!navigator.clipboard?.writeText)return!1;try{return await navigator.clipboard.writeText(e),!0}catch(e){if(!(e instanceof DOMException))throw e;return!1}}var Il=n({MENTION_ID_PATTERN:()=>Ll,mentionLabel:()=>Bl,mentionTextFromValue:()=>Ul,mentionValueFromText:()=>Wl,mentionedIds:()=>Gl,parseMentionValue:()=>Hl}),Ll=/^[A-Za-z0-9_.:-]{1,64}$/,Rl=/@(\\+)\[|@\[([^[\]\n]{1,100})\]\(([A-Za-z0-9_.:-]{1,64})\)/g,zl=/@(\\*)\[/g;function Bl(e){return String(e??``).replace(/[[\]\r\n]+/g,` `).replace(/\s+/g,` `).trim().slice(0,100)}var Vl=e=>e.replace(zl,(e,t)=>`@\\${t}[`);function Hl(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(Rl))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 Ul(e){let t=``,n=[];for(let r of Hl(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 Wl(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}`||!Ll.test(e.id)||(i+=Vl(n.slice(a,e.start)),i+=`@[${e.label}](${e.id})`,a=e.end);return i+Vl(n.slice(a))}function Gl(e){let t=[];for(let n of Hl(e))`id`in n&&!t.includes(n.id)&&t.push(n.id);return t}var Kl=n({bindMenuKeys:()=>Zl}),ql=500,Jl=10,Yl=new Set([`INPUT`,`TEXTAREA`,`SELECT`]);function Xl(e){return e instanceof HTMLElement?Yl.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(ra),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=Xl(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)+Jl,s-1));return}if(e.key===`PageUp`){u(Math.max((l<0?s:l)-Jl,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,ql);let f=i.length>1&&Array.from(i).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 Ql=n({FALLBACK_ROW_HEIGHT:()=>36,SELECT_WINDOW_OVERSCAN:()=>8,createHeightIndex:()=>eu,scrollTopToReveal:()=>nu,windowRange:()=>tu}),$l=.5;function eu(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)<=$l||(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)<=$l?!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 tu(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 nu(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 ru=n({parseServerHtml:()=>iu});function iu(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content}var au=n({deriveStepStatus:()=>ou,stepperHeaderItems:()=>su});function ou(e,t){return typeof t==`number`?e<t?`done`:e===t?`active`:`pending`:`pending`}function su(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 cu={selectAllLabel:`Select all rows`,selectRowLabel:`Select row`},lu=n({SELECT_CELL_CLASS:()=>q,addRowSelectCells:()=>vu,addSelectColumn:()=>yu,attachShiftRange:()=>Su,createSelectHeaderCell:()=>fu,createSelectRowCell:()=>pu,createSelectSpacerCell:()=>mu,syncSelectAll:()=>bu}),uu=()=>L(`tableSelect`,cu),q=`wui-select-cell`,du=(e,t)=>{let n=e.createElement(`input`);return n.type=`checkbox`,n.className=`form-check-input`,n.setAttribute(`aria-label`,t),n};function fu(e=document){let t=e.createElement(`th`);return t.className=q,t.appendChild(du(e,uu().selectAllLabel)),t}function pu(e=document,{disabled:t=!1}={}){let n=e.createElement(`td`);n.className=q;let r=du(e,uu().selectRowLabel);return r.disabled=t,n.appendChild(r),n}function mu(e=document){let t=e.createElement(`td`);return t.className=q,t}var hu=e=>e.firstElementChild?.classList.contains(q),gu=e=>e.matches(`.wui-group-row, .wui-virtual-spacer, .wui-row-expanded`),_u=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n);function vu(e){for(let t of e){if(hu(t)||gu(t))continue;let e=t.getAttribute(`data-row-selectable`)===`false`;t.insertBefore(pu(t.ownerDocument,{disabled:e}),t.firstChild)}}function yu(e){let t=e.querySelector(`thead tr`);if(!(t instanceof HTMLTableRowElement))return null;hu(t)||t.insertBefore(fu(e.ownerDocument),t.firstChild),vu(_u(e,`tbody tr`,HTMLTableRowElement));for(let t of _u(e,`tfoot tr`,HTMLTableRowElement))hu(t)||t.insertBefore(mu(e.ownerDocument),t.firstChild);let n=t.querySelector(`.${q} .form-check-input`);return n instanceof HTMLInputElement?n:null}function bu(e){let t=e.querySelector(`thead .${q} .form-check-input`),n=_u(e,`tbody tr .form-check-input: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 _u(e,`tbody tr`,HTMLTableRowElement)){let e=t.querySelector(`.form-check-input`);t.classList.toggle(`is-selected`,e instanceof HTMLInputElement&&e.checked)}return{selected:i,total:r}}var xu=`tbody .${q} .form-check-input:not(:disabled)`;function Su(e,t){let n=null,r=e=>e instanceof Element&&e.matches(`.wui-select-cell .form-check-input: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=_u(e,xu,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 Cu=n({DATE_PICKER_TEXT:()=>wu}),wu={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}.`},Tu=n({DRAWER_TEXT:()=>Eu}),Eu={closeLabel:`Close`,confirmDiscard:`Discard your changes?`,discardLabel:`Discard`,keepLabel:`Keep editing`,screenText:`{now}% of the screen`,sheetHeightLabel:`Sheet height`},Du=n({matchSegments:()=>Ou});function Ou(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 ku=n({TOOLTIP_ATTRIBUTE:()=>Au,TOOLTIP_CLASS_ATTRIBUTE:()=>Mu,TOOLTIP_ID_ATTRIBUTE:()=>Nu,TOOLTIP_OPEN_ATTRIBUTE:()=>Pu,TOOLTIP_PLACEMENT_ATTRIBUTE:()=>ju,TOOLTIP_SHORTCUT_ATTRIBUTE:()=>Fu,showPinnedTooltips:()=>Lu,wireTooltips:()=>Iu}),Au=`data-wui-tooltip`,ju=`data-wui-tooltip-placement`,Mu=`data-wui-tooltip-class`,Nu=`data-wui-tooltip-id`,Pu=`data-wui-tooltip-open`,Fu=`data-wui-tooltip-shortcut`;function Iu(e){Vu.has(e)||(Vu.add(e),e.addEventListener(`pointerover`,t=>{let n=Ku(t.target);n&&!Ju(e,n)&&Zu(e,n,!1)}),e.addEventListener(`pointerout`,t=>{let n=Uu(e).transient;n&&Ku(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||Qu(e,n))}),e.addEventListener(`focusin`,t=>{let n=t.target;if(!(n instanceof Element)||!n.matches(`:focus-visible`))return;let r=Ku(n);r&&!Ju(e,r)&&Zu(e,r,!1)}),e.addEventListener(`focusout`,t=>{let n=Uu(e).transient;n&&Ku(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||Qu(e,n))}),e.addEventListener(`click`,t=>{let n=Uu(e).transient;n&&Ku(t.target)===n.trigger&&Qu(e,n)}))}function Lu(e){let t=e instanceof Document?e:e.ownerDocument;for(let n of e.querySelectorAll(`[${Pu}]`))Zu(t,n,!0)}var Ru=[`top`,`bottom`,`start`,`end`],zu=`wui-tooltip`,Bu=`[${Au}], [${Nu}]`,Vu=new WeakSet,Hu=new WeakMap;function Uu(e){let t=Hu.get(e);return t||(t={bubble:null,transient:null,pinned:new Map,pinnedCount:0,onEscape:t=>{t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),$u(e))}},Hu.set(e,t)),t}function Wu(e){return Ru.includes(e)}function Gu(e){return e===`auto`||Wu(e)}function Ku(e){if(!(e instanceof Element))return null;let t=e.closest(Bu);return t instanceof HTMLElement?t:null}function qu(e,t){return e.transient?.trigger===t?e.transient:e.pinned.get(t)}function Ju(e,t){return qu(Uu(e),t)!==void 0}function Yu(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 Xu(e,t){return t.bubble||=Yu(e,zu),t.bubble}function Zu(e,t,n){let r=t.getAttribute(Au),i=t.getAttribute(Nu);if(r===null&&i===null)throw Error(`a tooltip trigger carries ${Au} or ${Nu}`);if(r!==null&&i!==null)throw Error(`a tooltip trigger carries ${Au} or ${Nu}, not both`);let a=t.getAttribute(`data-wui-tooltip-placement`)??`top`;if(!Gu(a))throw Error(`${ju} "${a}" is not auto, top, bottom, start or end`);let o=Uu(e);Qu(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?Yu(e,`${zu}-pinned-${++o.pinnedCount}`):Xu(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(Fu);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||Qu(e,qu(Uu(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 Qu(e,t){if(!t)return;let n=Uu(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 $u(e){let t=Uu(e);Qu(e,t.transient);for(let n of[...t.pinned.values()])Qu(e,n)}var ed=Object.freeze({anchorOverlay:d,avatarNode:ms,buttonClass:ll,calendarMath:hl,copyText:Nl,dataTable:Jn,datePickerText:Cu,defineElement:r,devWarn:Kr,dom:Fe,drawerText:Tu,elementBase:a,fieldState:mo,formatters:Qt,formMirror:yo,glyphs:vs,hasOwn:Jr,httpFailureText:Ra,iconGlyphs:vs,imeSafeEnter:Lr,isDrawn:na,listboxKeyNav:Ms,loader:ei,mentionText:Il,menuKeyNav:Kl,nativeOverlay:O,notificationDays:aa,optionLabel:Is,partRegistry:fc,rtl:c,selectList:qs,selectRemote:vc,selectText:Gs,selectWindow:Ql,serverHtml:ru,stepperHeader:au,svgNodes:Br,tableExport:Si,tableSelect:lu,textMatch:Du,textStore:Le,tooltips:ku,wuiHttp:ya,WuiSelect:Cc,zone:Bt}),td={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`},nd=`image/jpeg,image/png,image/webp,image/heic,image/heif,.heic,.heif`,rd=10,id=512,ad=`image/webp`,od=[96,48];function sd(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 cd(e){let t=L(`imagePicker`,td);return sd(e)?t.heicUnreadableMessage:t.photoUnreadableMessage}function ld(e,t){let n=Number(t);return{name:e?.name||`photo`,type:ad,size:Number.isInteger(n)&&n>0?n:512}}var ud=`/`,dd=`.search-wrap.wui-search-collapsible`,fd=`.wui-topsearch-panel`,pd=`.modal, wui-drawer[open]`,md=new WeakSet,hd=e=>{let t=e.querySelector(`.wui-search-toggle`);return t instanceof HTMLElement?t:null},gd=e=>{let t=e.querySelector(`.search-input`);return t instanceof HTMLInputElement?t:null},_d=e=>[...e.querySelectorAll(dd)].filter(e=>e instanceof HTMLElement);function vd(e){e.classList.remove(`is-collapsed`),hd(e)?.setAttribute(`aria-expanded`,`true`),gd(e)?.focus()}function yd(e){gd(e)?.value||(e.classList.add(`is-collapsed`),hd(e)?.setAttribute(`aria-expanded`,`false`))}function bd(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=hd(e),n=gd(e);t?.addEventListener(`click`,()=>vd(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n?.value||(r.preventDefault(),yd(e),t?.focus())}),e.addEventListener(`focusout`,t=>{let n=t.relatedTarget;n instanceof Node&&e.contains(n)||yd(e)})}function xd(e){md.has(e)||(md.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||pt(t.target instanceof Node?t.target:null)||t.target instanceof Element&&t.target.closest(pd)||e.querySelector(fd))return;let n=_d(e).find(e=>e.offsetParent!==null);n&&(t.preventDefault(),vd(n))}))}function Sd(e=document){let t=e;for(let e of _d(t))bd(e);xd(e instanceof Element?e.ownerDocument:e)}var Cd=`data-wui-command-shortcut`,wd=`k`,Td=new WeakSet,Ed=/ \(Ctrl\+([^)]+)\)$/;function Dd(e=navigator){return/mac|iphone|ipad/i.test(e.userAgentData?.platform??e.platform)}function Od(e,t){return!(e.ctrlKey||e.metaKey)||e.altKey||e.shiftKey||e.repeat?!1:String(e.key).toLowerCase()===String(t).toLowerCase()}function kd(e){return e.nodeType===Node.DOCUMENT_NODE}function Ad(e){e.closest(`wui-modal`)?.show()}function jd(e){if(Dd())for(let t of e.querySelectorAll(`[${Cd}]`)){let e=t.getAttribute(`placeholder`);e!==null&&t.setAttribute(`placeholder`,e.replace(Ed,(e,t)=>` (⌘${t})`))}}function Md(e){let t=kd(e)?e:e.ownerDocument;e.querySelector(`[data-wui-command-shortcut]`)&&(jd(t),Td.has(t)||(Td.add(t),t.addEventListener(`keydown`,e=>{for(let n of t.querySelectorAll(`[${Cd}]`))if(Od(e,n.getAttribute(`data-wui-command-shortcut`)||wd)){e.preventDefault(),n.localName===`wui-command-palette`||n.localName===`wui-modal`?Ad(n):(n.focus(),`select`in n&&typeof n.select==`function`&&n.select());return}})))}var Nd={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`},Pd=()=>L(`fileValidation`,Nd),Fd=`image/png,image/jpeg,image/webp`,Id=5,Ld={"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`]},Rd={"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`},zd={"text/plain":`textFileLabel`,".txt":`textFileLabel`,"image/*":`imagesLabel`,"video/*":`videosLabel`,"audio/*":`audioLabel`},Bd=new Set([`image/*`,`video/*`,`audio/*`]),Vd=e=>{let t=zd[e];return t?Pd()[t]:Rd[e]},Hd=e=>String(e||``).split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean),Ud=[`.png`,`.jpg`,`.jpeg`,`.webp`,`.gif`,`.svg`,`.bmp`,`.avif`,`.heic`,`.heif`];function Wd(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 Ud.some(e=>r.endsWith(e))}var Gd=[`kilobyteLabel`,`megabyteLabel`,`gigabyteLabel`];function Kd(e){if(e<1024)return`${e} ${Pd().byteLabel}`;let t=e/1024,n=0;for(;t>=1024&&n<Gd.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${Pd()[Gd[n]??`gigabyteLabel`]}`}function qd(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 Jd(e){let t=Hd(e);return t.length?t.every(e=>e.startsWith(`.`)?Ud.includes(e):e===`image/*`||e.startsWith(`image/`)):!1}function Yd(e){let t=[];for(let n of Hd(e)){let e=Vd(n)||(n.startsWith(`.`)?n.slice(1).toUpperCase():n.toUpperCase());t.includes(e)||t.push(e)}return t.length<=1?t[0]||Pd().supportedLabel:R(Pd().orText,{names:t.slice(0,-1).join(`, `),last:t.slice(-1).join(``)})}function Xd(e,t){let n=Hd(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&&(Ld[e]||[]).some(e=>i.endsWith(e)))}function Zd(e,t={}){if(!e)return null;let n=t.accept===void 0?Fd:t.accept,r=t.maxSizeMb===void 0?5:t.maxSizeMb;if(!Xd(e,n)){let e=Yd(n),t=Hd(n).map(e=>Bd.has(e));return t.every(Boolean)?R(Pd().chooseText,{label:e}):t.some(Boolean)?R(Pd().chooseText,{label:e.endsWith(` file`)?`${e}s`:`${e} files`}):R(Pd().chooseText,{label:`a ${e.endsWith(` file`)?e:`${e} file`}`})}return r!==null&&r>0&&e.size>r*1024*1024?R(Pd().keepFileUnderMbText,{maxSizeMb:r}):null}function Qd(e,t){let n=Array.from(e||[]),r=t.multiple?n:n.slice(0,1),i=[],a=[];for(let e of r){let n=Zd(e,{accept:t.accept,maxSizeMb:t.maxSizeMb});n?a.push({file:e,message:n}):i.push(e)}return{files:i,rejections:a}}function $d(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}=Qd(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 ef={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`},tf=/[0-9]/,nf={9:tf,A:/[A-Za-z]/,"*":/[0-9A-Za-z]/},rf=/[9A*]/,af=new Set([`text`,`tel`,`search`,`url`,`password`]),of=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},sf=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},cf=e=>e.length<=3?e:`${e.slice(0,-3).replace(/\B(?=(\d{2})+(?!\d))/g,`,`)},${e.slice(-3)}`,lf=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());return t?`${t[3]}-${t[2]}-${t[1]}`:e},uf=()=>L(`inputMask`,ef);function df(e,{upper:t=!1,normalize:n,valid:r,post:i=e=>e,message:a=uf().incompleteMessage}={}){let o=[...e].map(e=>{let t=nf[e];return t?{re:t}:{lit:e}}),s=o.filter(e=>e.re).length;return{inputMode:o.every(e=>!e.re||e.re===tf)?`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 ff(){return{inputMode:`decimal`,post:e=>e,message:uf().amountMessage,extract(e){let t=``,n=!1,r=0;for(let i of e)tf.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=cf(t)+(e.includes(`.`)?`.${n}`:``);return{text:r,isRaw:[...r].map(e=>e!==`,`)}},isValid:e=>/^\d+(\.\d{1,2})?$/.test(e)}}var pf={"phone-in":()=>df(`99999 99999`,{normalize:of,valid:e=>/^[6-9]/.test(e),message:uf().phoneInMessage}),pan:()=>df(`AAAAA9999A`,{upper:!0,valid:e=>/^[A-Z]{5}\d{4}[A-Z]$/.test(e),message:uf().panMessage}),gstin:()=>df(`99AAAAA9999A***`,{upper:!0,valid:e=>/^\d{2}[A-Z]{5}\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/.test(e),message:uf().gstinMessage}),aadhaar:()=>df(`9999 9999 9999`,{valid:e=>/^[2-9]/.test(e),message:uf().aadhaarMessage}),ifsc:()=>df(`AAAA*******`,{upper:!0,valid:e=>/^[A-Z]{4}0[A-Z0-9]{6}$/.test(e),message:uf().ifscMessage}),"pin-code":()=>df(`999999`,{valid:e=>/^[1-9]/.test(e),message:uf().pinCodeMessage}),date:()=>df(`99-99-9999`,{normalize:lf,valid:sf,post:(e,t)=>e.length===8&&sf(e)?`${e.slice(4)}-${e.slice(2,4)}-${e.slice(0,2)}`:t,message:uf().dateMessage}),amount:ff},mf=Object.keys(pf),hf=e=>{let t=String(e).toLowerCase();return Yr(pf,t)?t:void 0},gf=e=>rf.test(String(e))&&hf(e)===void 0,_f=new Map;qe(()=>_f.clear());function vf(e){if(e==null||e===``)return null;let t=String(e),n=_f.get(t);return n===void 0&&(n=gf(t)?df(t):Yr(pf,t)?pf[t]?.()??null:null,_f.set(t,n)),n}var yf=(e,t)=>e.normalize?e.normalize(t):t;function bf(e,t){let n=vf(e);return n?n.extract(yf(n,String(t??``))):String(t??``)}function xf(e,t){let n=vf(e);if(!n)return String(t??``);let r=n.extract(yf(n,String(t??``)));return n.post(r,n.layout(r).text)}function Sf(e,t){let n=vf(e);return n?n.layout(n.extract(yf(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},wf=new WeakMap,Tf=e=>wf.get(e)?.(),Ef=new WeakMap;function Df(e,t,n,r){let i=e.getAll(t),a=Ef.get(e)??new Set;Ef.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 Of(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 kf(e,{mask:t,postFormatted:n=!1,onChange:r,onInvalidChange:i}={}){let a=vf(t);if(!a||!af.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??Of(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&&af.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=yf(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:yf(a,e.value);y(r,e.selectionStart??r.length,!0)},w=()=>{p=!0},T=()=>{p=!1;let t=yf(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=yf(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&&Df(t.formData,e.name,e.value,O())},te=()=>{clearTimeout(_),_=setTimeout(()=>{m=!1,y(yf(a,e.value),e.value.length,!0)},0)};n||(A?.addEventListener(`formdata`,ee),wf.set(e,O)),A?.addEventListener(`reset`,te),A?.addEventListener(`submit`,k);let ne=yf(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),wf.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 Af(){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=Tf(e);return n===void 0?t.call(this,e):n},e.wuiMaskHook=!0}var jf=new WeakMap,Mf,Nf=e=>{jf.has(e)||jf.set(e,kf(e,{mask:e.dataset.appMask,postFormatted:e.hasAttribute(`data-mask-post-formatted`)}))},Pf=e=>[...e.querySelectorAll(`input[data-app-mask]`)].filter(e=>e instanceof HTMLInputElement),Ff=e=>e instanceof Element?[...e instanceof HTMLInputElement&&e.matches(`input[data-app-mask]`)?[e]:[],...Pf(e)]:[];function If(){Mf||typeof MutationObserver>`u`||(Mf=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Ff(e))jf.get(t)?.(),jf.delete(t);for(let e of t.addedNodes)for(let t of Ff(e))Nf(t)}}),Mf.observe(document.documentElement,{childList:!0,subtree:!0}))}function Lf(e=document){Af();for(let t of Pf(e))Nf(t);e===document&&If()}var Rf=`data-wui-bulk-in-bar`,zf=`[data-wui-page-header-bar][data-wui-bulk-for]`,Bf=new WeakSet;function Vf(e){return`${An(e,{decimals:0})} selected`}function Hf(e){let t=e.dataset.wuiBulkFor;return t===void 0?null:document.getElementById(t)}function Uf(e){return typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`}function Wf(e,t){return[...e.querySelectorAll(t)].flatMap(e=>e instanceof HTMLElement?[e]:[])}function Gf(e,t){for(let n of Wf(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?Vf(t):``}function Kf(e=document){for(let t of Wf(e,zf))Hf(t)?.setAttribute(Rf,``);Bf.has(document)||(Bf.add(document),document.addEventListener(`selectionchange`,e=>{if(!(e instanceof CustomEvent)||!Uf(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 Wf(document,zf))Hf(n)?.contains(t)&&Gf(n,e.detail.selected)}))}var qf={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`},Jf={minLength:10,uppercase:!0,lowercase:!0,digit:!0,special:!0,uniqueChars:0,customRules:[]},Yf=()=>L(`passwordRules`,qf);function Xf(e){return e===!0||e==null?{...Jf}:{...Jf,...e}}function Zf(e){let t=Xf(e),n=[];if(t.minLength>0&&n.push({key:`length`,label:R(Yf().lengthText,{minLength:t.minLength}),test:e=>e.length>=t.minLength}),t.uppercase&&n.push({key:`uppercase`,label:Yf().uppercaseText,test:e=>/[A-Z]/.test(e)}),t.lowercase&&n.push({key:`lowercase`,label:Yf().lowercaseText,test:e=>/[a-z]/.test(e)}),t.digit&&n.push({key:`digit`,label:Yf().digitText,test:e=>/[0-9]/.test(e)}),t.special&&n.push({key:`special`,label:Yf().specialText,test:e=>/[^A-Za-z0-9]/.test(e)}),t.uniqueChars>0){let e=t.uniqueChars;n.push({key:`unique`,label:Ye(Yf(),`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 Qf(e,t){let n=e==null?``:String(e);return Zf(t).map(e=>({key:e.key,label:e.label,met:e.test(n)}))}function $f(e,t){return Qf(e,t).every(e=>e.met)}var ep={moveLabel:`Move to`,moveText:`Move to {label}`},tp=`wui:row-drop`,np=`is-drop-over`,rp=`application/x-wui-rows`,ip=`wui-row-dragging`,ap=`[data-wui-drop-target]`,op=`tbody tr[data-row-key]`,sp=`input, button, a, select, textarea, label`,cp=`.wui-select-cell .form-check-input`,lp=new WeakMap,up=new WeakSet,dp=null,fp=null;function pp(e){let t=e.querySelector(cp);return t instanceof HTMLInputElement&&t.checked}function mp(e){let t=[];for(let n of e.querySelectorAll(`tbody tr`))n instanceof HTMLElement&&pp(n)&&t.push(n.dataset.rowKey);return t}function hp(e,t){return F(e,t)}function gp(e,t){let n=hp(e,t);return n instanceof HTMLElement?n:null}function _p(e){let t=e.textContent;if(t===null)throw Error(`A drop target has no text content.`);return t.trim()}var vp=e=>typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`;function yp(){dp=null,document.body.classList.remove(ip);for(let e of document.querySelectorAll(`${ap}.${np}`))e.classList.remove(np)}function bp(e,t,n){e.dispatchEvent(new CustomEvent(tp,{bubbles:!0,detail:{keys:t,target:n.dataset.wuiDropTarget}}))}function xp(e){let t=gp(e.target,ap);if(!t||!dp)return;e.preventDefault();let n=P(e.dataTransfer,`A drag event arrived without its DataTransfer.`);n.dropEffect=`move`,t.classList.add(np)}function Sp(e){let t=gp(e.target,ap);!t||e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||t.classList.remove(np)}function Cp(e){let t=gp(e.target,ap);if(!t||!dp)return;e.preventDefault(),t.classList.remove(np);let{root:n,keys:r}=dp;bp(n,r,t),yp()}function wp(e){let t=gp(e.target,ap);t&&fp?.keys.length&&(e.preventDefault(),bp(fp.root,fp.keys,t))}function Tp(e){(zr(e)||e.key===` `)&&wp(e)}function Ep(e){up.has(e)||(up.add(e),e.addEventListener(`dragover`,xp),e.addEventListener(`dragenter`,xp),e.addEventListener(`dragleave`,Sp),e.addEventListener(`drop`,Cp),e.addEventListener(`click`,wp),e.addEventListener(`keydown`,Tp))}function Dp(e){let t=lp.get(e);if(t)return t;Ep(e.ownerDocument||e);let n=t=>{let n=gp(t.target,op);if(!n||!e.contains(n))return;let r=hp(t.target,sp);r&&n.contains(r)||(n.draggable=!0)},r=t=>{let n=gp(t.target,op);if(!n||!e.contains(n))return;let r=pp(n)?mp(e):[n.dataset.rowKey],i=P(t.dataTransfer,`A drag event arrived without its DataTransfer.`);i.setData(rp,JSON.stringify(r)),i.setData(`text/plain`,r.join(`,`)),i.effectAllowed=`move`,dp={root:e,keys:r},document.body.classList.add(ip)},i=t=>{let n=t instanceof CustomEvent?t.detail:void 0;if(vp(n)){let{keys:t}=n;n.selected>0?fp={root:e,keys:Array.isArray(t)?t:mp(e)}:n.selected===0&&(fp=null)}kp(document)};e.addEventListener(`pointerdown`,n),e.addEventListener(`dragstart`,r),e.addEventListener(`dragend`,yp),e.addEventListener(`selectionchange`,i);let a=()=>{e.removeEventListener(`pointerdown`,n),e.removeEventListener(`dragstart`,r),e.removeEventListener(`dragend`,yp),e.removeEventListener(`selectionchange`,i),lp.delete(e)};return lp.set(e,a),a}var Op=()=>L(`rowDrop`,ep);function kp(e=document){let t=e.querySelector(`[data-wui-row-drag] tbody tr ${cp}:checked`)!==null;for(let n of e.querySelectorAll(ap)){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`)||_p(n);n.setAttribute(`aria-label`,R(Op().moveText,{label:e}))}for(let t of e.querySelectorAll(`.wui-drop-tray`))t.hasAttribute(`role`)||(t.setAttribute(`role`,`toolbar`),t.setAttribute(`aria-label`,Op().moveLabel))}function Ap(e=document){for(let t of e.querySelectorAll(`[data-wui-row-drag]`))t instanceof HTMLElement&&Dp(t);kp(e.ownerDocument||e)}var jp=`.table-wrap, .table-responsive, [class*="table-responsive-"]`,Mp=1;function Np(e){let t=()=>{let t=e.scrollWidth-e.clientWidth,n=Math.abs(e.scrollLeft);e.toggleAttribute(`data-wui-overflow-start`,t>Mp&&n>Mp),e.toggleAttribute(`data-wui-overflow-end`,t>Mp&&n<t-Mp),e.toggleAttribute(`data-wui-overflow-top`,e.scrollTop>Mp)},n=()=>{if(e.scrollWidth-e.clientWidth>Mp){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 Pp=new WeakMap,Fp,Ip=e=>{Pp.has(e)||Pp.set(e,Np(e))},Lp=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(jp)].filter(e=>e instanceof HTMLElement);return[...t,...n]};function Rp(){Fp||typeof MutationObserver>`u`||(Fp=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Lp(e))Pp.get(t)?.(),Pp.delete(t);for(let e of t.addedNodes)for(let t of Lp(e))Ip(t)}}),Fp.observe(document.documentElement,{childList:!0,subtree:!0}))}function zp(e=document){for(let t of e.querySelectorAll(jp))t instanceof HTMLElement&&Ip(t);e===document&&Rp()}var Bp={leaveLabel:`Leave`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,title:`Leave without saving?`},Vp={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`},Hp={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.`},Up={closeLabel:`Close`,error:`Error`,failedText:`That did not work. Try again.`,loading:`Loading...`,moreText:`more`,success:`Done`},Wp=Object.freeze([`page`,`pageSize`,`sortBy`,`sortOrder`,`search`]),Gp=`search`,J=()=>L(`dataTable`,qn),Kp=5,qp=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,Jp=e=>e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled,Yp=e=>qp(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},Xp=(e,t,n)=>{let r=e.closest(t);return r instanceof n?r:null},Zp=e=>e.localName===`wui-select`,Qp=new WeakMap,$p=(e,t)=>{let n=Number(e);return Number.isInteger(n)?n:t},em=e=>({total:$p(e.dataset.total,0),totalCapped:e.dataset.totalCapped===`true`,page:$p(e.dataset.page,1),pageSize:$p(e.dataset.pageSize,0),sortBy:e.dataset.sortBy||``,sortOrder:e.dataset.sortOrder===`desc`?`desc`:`asc`,pending:e.dataset.totalPending===`true`,rowCount:$p(e.dataset.rowCount,0)}),tm=(e,t)=>{e&&mm().toast(e,{variant:t})},nm=(e,t)=>{if(!e)return;let n=new Set([...e.elements].filter(e=>!Yp(e)||e.hasAttribute(`data-range-mirror`)).map(e=>e.getAttribute(`name`)).filter(e=>e&&!Wp.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},rm=new Intl.NumberFormat(`en-IN`),im=(e,t)=>t?`${rm.format(e)}+`:rm.format(e),am=(e,t,n)=>{let r=e.closest(`.wui-list-card`),i=r?X(r,`.wui-list-card-count`,HTMLElement):null;i&&(i.textContent=im(t,n))};function om(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(Qp.has(e))continue;let t=cm(e);Qp.set(e,t),e.hasAttribute(`data-load-first-page`)&&t.reload()}}function sm(e){let t=e instanceof Element?Xp(e,`[data-wui-server]`,HTMLElement):null;return t&&Qp.get(t)||null}function cm(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:Ma(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=La(),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=em(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?im(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){vu(e);for(let t of e){let e=X(t,`.${q} .form-check-input:not(:disabled)`,HTMLInputElement);e&&(m&&p.add(t.dataset.rowKey),e.checked=p.has(t.dataset.rowKey))}bu(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=em(e);r.pending&&Object.assign(r,{total:y.total,totalCapped:y.totalCapped});let i=r.sortBy!==y.sortBy||r.sortOrder!==y.sortOrder?Er(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(),Dr(e.rows,i),o&&Te(),a},pe=e=>{let t=X(iu(`<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:Kp},()=>{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===`networkCheck`?L(`httpFailure`,za).networkCheckText: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=ks(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=ml(`primary`,`outline`,`sm`),c.dataset.wui=ul,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){H(e)}if(!o.ok||!c){let e=o.ok?`server`:o.kind;return i?qr(`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),nm(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)),mm().refresh(t),l&&mm().refresh(l),y.pending?xe():am(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;Ia(T(u,O),{timeoutMs:s.timeoutMs}).then(n=>{if(t!==de)return;if(!n.ok){qr(`[@webority/ui-elements] A server table's total did not load; its pager keeps Previous and Next.`,n.kind);return}let r=X(iu(n.html),`div[data-wui-total]`,HTMLElement);if(!r){qr(`[@webority/ui-elements] A server table's count answer has no div[data-wui-total]; its pager keeps Previous and Next.`);return}if($p(r.dataset.page,-1)!==y.page||$p(r.dataset.pageSize,-1)!==y.pageSize)return;let i=$p(r.dataset.total,-1);if(i<0){qr(`[@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&&mm().refresh(c),am(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=ks(`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?Xp(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?Xp(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&(e.preventDefault(),we(t.dataset.sortKey??``))});let Te=()=>{bu(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&&(Su(n,(e,t)=>{for(let n of e){let e=Xp(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 .form-check-input: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} .form-check-input:not(:disabled)`,HTMLInputElement);n&&(n.checked=t.checked,t.checked?p.add(e.dataset.rowKey):p.delete(e.dataset.rowKey))}else{let e=Xp(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?Xp(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(qp),r=new Set;for(let e of n)e.name&&!Yp(e)&&r.add(e.name);let i=[];for(let e of n)if(e.name&&!Jp(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(qp).map(e=>e.name).filter(Boolean)),r=new URLSearchParams,i=e=>e!==`search`&&Wp.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(Gp);let e=a.value.trim();e&&r.set(Gp,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=Xp(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(Zp)){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`),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?Xp(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),nm(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(Gp,n):e.delete(Gp),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`)??``),nm(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=iu(`<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),mm().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`&&Pr(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),Pr(u,`saving`);let d=Nr(u),f=await Ia(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(or(Nr(t)||d)):(await j(O,`none`),Pe(u)),hm(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&&Pr(m,`error`,p),f.kind!==`aborted`&&tm(p,`danger`),A(cr(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=Xp(e,`tr`,HTMLTableRowElement),r=n?.dataset.rowKey??null,i=e.dataset.wuiRowAction||``,a=n?Nr(n):``;e.disabled=!0,e.setAttribute(`aria-busy`,`true`),n&&Pr(n,`saving`);let o=await Ia(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){hm(o,o.toastVariant||`success`);let e=n?.isConnected?je(o.html):null,t=e&&n?Me(e,n,!1):null;t?A(or(Nr(t)||a)):(await j(O,`none`),Pe(n))}else{let e=Ne(o);tm(e,`danger`),n?.isConnected&&Pr(n,`error`,e),A(cr(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?Xp(e.target,`[data-wui-row-action]`,HTMLButtonElement):null;t&&v.contains(t)&&!t.disabled&&(e.preventDefault(),F(t))}),ne(v),oe(v),f&&yu(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)qr(`[@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} .form-check-input`,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} .form-check-input:not(:disabled)`,HTMLInputElement))e.checked=!1;Te()}}}}var lm=8e3,um=()=>L(`toast`,Up),dm=[`success`,`info`,`warning`,`danger`],fm=e=>dm.some(t=>t===e);function pm(e){if(!fm(e))throw RangeError(`Unknown toast variant "${e}".`);return e}function mm(){return P(window.WUI,`window.WUI is not defined: the Razor behaviour script did not load on this page.`)}function hm(e,t=`success`){if(!e?.message)return;let n=e.toastAction;n?mm().toast(e.message,{variant:pm(t),duration:lm,action:{label:n.label,onClick:()=>gm(n)}}):mm().toast(e.message,{variant:pm(t)})}async function gm(e){let t=await Ia(e.url,{method:e.method});if(t.kind!==`session`&&t.kind!==`aborted`){if(t.ok){hm(t,t.toastVariant||`success`);for(let e of document.querySelectorAll(`[data-wui-server]`))e instanceof HTMLElement&&e.dataset.refreshOnSuccess!==`false`&&sm(e)?.reload()}else mm().toast(t.message||um().failedText,{variant:`danger`})}}var _m=`wui-remote-modal`,vm=`wui-remote-drawer`,ym=Object.freeze({sm:360,md:480,lg:640,xl:720}),bm=`wui-modal-fullscreen`,xm=`wui-modal-wide`,Sm=Object.freeze({sm:380,md:440,lg:640,xl:880,wide:1080}),Z=()=>L(`modal`,Hp),Cm=e=>Ma(e?.getAttribute(`data-wui-timeout`)??null)??3e4,wm=`a[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,Tm=`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled]),[contenteditable="true"]`,Em=`[aria-invalid="true"], .is-invalid, .input-validation-error`,Dm=`invalid`,Om=`.wui-error-summary, [data-wui-form-errors], .validation-summary-errors, [data-valmsg-summary]`,km=`[data-wui-modal-content]`,Am=`[data-wui-pane-close], [data-wui-dismiss]`,jm=()=>I(`button`,{type:`button`,class:`wui-modal-close`,"data-wui-dismiss":!0,"aria-label":Z().closeLabel},Ur({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`}]])),Mm=new WeakMap,Nm=new WeakSet;function Pm(e,t){if(e==null)throw TypeError(`The remote modal needs ${t}, and the page does not have it.`);return e}var Fm=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Im=(e,t,n)=>Pm(Fm(e,t),n),Lm=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Rm=()=>Object.assign(Error(`The remote modal load was aborted.`),{name:`AbortError`}),zm=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,Bm=(e,t)=>{let n=e instanceof Element?e.closest(t):null;return n instanceof HTMLElement?n:null},Vm=e=>Yr(Sm,e),Hm=e=>Yr(ym,e);function Um(e){if(e==null||e===``)return null;if(e===`fullscreen`)return{fullscreen:!0};if(Vm(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 Wm=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}},Gm=(e,t)=>{e.classList.toggle(bm,!!t.fullscreen),e.classList.toggle(xm,!t.fullscreen&&!!t.wide),t.fullscreen?e.style.removeProperty(`--wui-modal-max-width`):e.style.setProperty(`--wui-modal-max-width`,`${t.px}px`)},Km=[`center`,`top`];function qm(e){if(e==null||e===``)return null;if(Hm(e))return{px:ym[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 Jm=e=>e.container===`drawer`,Ym=e=>e.container===`pane`,Xm=e=>e.container!==`modal`,Zm=(e,t)=>Jm(e)?qm(t):Um(t),Qm=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},$m=e=>Ym(e)?e.shell:Im(e.shell,`.modal-dialog`,`a dialog frame`);function eh(e=`modal`){let t=e===`drawer`,n=t?vm:_m,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?ym.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 th=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))),jm()),nh=e=>I(`div`,{class:`modal-content wui-modal`,"aria-busy":`true`},th(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`})))),rh=(e,t)=>{let n={forbidden:Z().forbiddenMessage,networkCheck:L(`httpFailure`,za).networkCheckText,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},th(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:ml(`primary`,`soft`,`md`),"data-wui-dismiss":!0,"data-wui":ul},Z().closeLabel),I(`button`,{type:`button`,class:ml(`primary`,`solid`,`md`),"data-wui-modal-retry":!0,"data-wui":ul},Z().retryLabel)))))},ih=e=>Fm(e.shell,`.modal-content`),ah=e=>Ie(e.cloneNode(!0),HTMLElement,`a card copy is not an element`);function oh(e){e&&e.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0}))}function sh(e,t){let n=ih(e),r=n?lh(n):new Map;oh(n),n?n.replaceWith(t):$m(e).appendChild(t),uh(t,r),mm().refresh()}var ch=`input[type="file"][name]`;function lh(e){let t=new Map;for(let n of e.querySelectorAll(ch)){if(!(n instanceof HTMLInputElement))continue;let e=n.files;e&&e.length>0&&t.set(n.name,[...e])}return t}function uh(e,t){if(t.size!==0&&typeof DataTransfer<`u`)for(let n of e.querySelectorAll(ch)){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 dh=e=>Ym(e)?!e.shell.hidden:e.host.hasAttribute(`open`);function fh(e,t,n=!1){let r=t?Fm(e,Em):null,i=r?r.matches(wm)?r:Fm(r,wm)||r:null;if(!i&&n)i=Fm(e,`[data-autofocus]`)||Fm(e,Tm)||Fm(e,`.wui-modal-close`);else if(!i){let t=Lm(e,wm);i=Fm(e,`[data-autofocus]`)||t.find(e=>!e.classList.contains(`wui-modal-close`))||t[0]||e}r?i?.focus?.():i?.focus?.({preventScroll:!0})}function ph(e,t){let n=Fm(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`,``),$m(e).appendChild(n)),n.textContent=``,n.textContent=t}var mh=e=>{let t=Fm(e.shell,`[data-wui-modal-live]`);t&&(t.textContent=``)},hh=(e,t,n)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))};function gh(e,t,n,r){let i={...r,container:e.container};hh(t,`wui:modal:${n}`,i),Jm(e)&&hh(t,`wui:drawer:${n}`,i),Ym(e)&&hh(t,`wui:pane:${n}`,i)}var _h=e=>e.matches(`[data-wui-pane-host]`)?`pane`:Im(e,`dialog`,`a dialog`).classList.contains(`wui-remote-drawer`)?`drawer`:`modal`,vh=e=>Pm(e.host.closest(`wui-modal`),`a wui-modal host`);function yh(e){let t=Mm.get(e);if(t)return t;let n=_h(e),r=n===`pane`?e:Im(e,`dialog`,`a dialog`),i=ih({shell:r}),a={host:e,shell:r,container:n,queue:La(),defaultSize:Wm(r),defaultLabel:r.getAttribute(`aria-label`),placeholder:i?ah(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 Mm.set(e,a),e.addEventListener(`submit`,e=>Vh(a,e)),e.addEventListener(`click`,e=>{Bm(e.target,`[data-wui-modal-retry]`)&&a.session&&(e.preventDefault(),Dh(a,a.session))}),Ym(a)&&e.addEventListener(`click`,t=>{let n=Bm(t.target,Am);n&&e.contains(n)&&a.session&&xh(a,a.session,`dismissed`,null)}),e.addEventListener(`wui-modal-close`,t=>{t.target===e&&t instanceof CustomEvent&&Lh(t.detail,`reason`)===`escape`&&e.querySelector(`form[data-wui-submitting]`)&&t.preventDefault()}),e.addEventListener(`wui-modal-closed`,t=>{t.target===e&&wh(a)}),e.addEventListener(`wui-modal-opened`,t=>{if(t.target!==e)return;let n=ih(a);a.session&&n?.matches(km)&&!n.contains(document.activeElement)&&fh(n,!1,Xm(a))}),a.remoteUrl&&e.addEventListener(`wui-modal-open`,t=>{t.target===e&&Th(a,t)}),a}function bh(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:()=>xh(e,a,`dismissed`,null),reload:()=>Dh(e,a)}};return e.session=a,a}function xh(e,t,n,r){e.session===t&&(t.closing={status:n,detail:r},Ym(e)?Ch(e,t):Sh(e))}function Sh(e){let t=vh(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}=Pm(t.closing,`the closing state`),a=n.contains(document.activeElement);e.queue.abort(),e.session=null,oh(ih(e)),n.replaceChildren(),n.hidden=!0,n.removeAttribute(`data-open`),t.resolveClosed({status:r,detail:i}),gh(e,n,`closed`,{status:r,url:t.url}),a&&t.trigger?.isConnected&&t.trigger.focus?.()}function wh(e){let t=e.session;if(e.queue.abort(),e.session=null,mh(e),t){let n=t.closing||{status:`dismissed`,detail:null};t.resolveClosed({status:n.status,detail:n.detail}),gh(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||(sh(e,ah(e.placeholder)),e.loadedUrl=null,Gm(e.shell,e.defaultSize),e.defaultLabel?e.shell.setAttribute(`aria-label`,e.defaultLabel):e.shell.removeAttribute(`aria-label`))}function Th(e,t){let n=Lh(t instanceof CustomEvent?t.detail:null,`trigger`),r=n instanceof HTMLElement?n:null,i=r?.getAttribute(`data-wui-url`)||e.remoteUrl||``,a=bh(e,i,{trigger:r});a.explicitSize=Eh(e,r?.getAttribute(`data-wui-size`)),a.explicitSize&&Gm(e.shell,a.explicitSize),e.cache&&e.loadedUrl===i||(e.loadedUrl&&sh(e,ah(e.placeholder)),Dh(e,a,{keepPlaceholder:!0}))}function Eh(e,t){try{return Zm(e,t)}catch(e){return H(e),null}}async function Dh(e,t,{keepPlaceholder:n=!1}={}){n||sh(e,nh(t.options.title||Oh(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`&&Mh(e,t,r.html,!1))return e.loadedUrl=t.url,gh(e,e.shell,`loaded`,{url:t.url,handle:t.handle}),`loaded`;let i=r.kind===`ok`||r.kind===`validation`?`server`:r.kind;return sh(e,rh(t.options.title||Oh(e),i)),dh(e)&&fh(Pm(ih(e),`a card`),!1,Xm(e)),gh(e,e.shell,`error`,{url:t.url,kind:i,status:r.status}),`error`}var Oh=e=>ih(e)?.querySelector(`.wui-modal-title`)?.textContent||e.shell.getAttribute(`aria-label`)||``,kh=`/_content/Webority.Ui.Razor/js/`,Ah=e=>new URL(e,window.location.href).pathname.includes(kh);function jh(e){if([...document.scripts].some(t=>t.getAttribute(`src`)===e))return;let t=document.createElement(`script`);t.src=e,document.head.appendChild(t)}function Mh(e,t,n,r){let i=iu(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&&Ah(t)?jh(t):a=!0}a&&qr(`WUI.modal: ${t.url} returned a fragment with script; it was removed. Keep page behaviour in the page.`);let o=Fm(i,km);if(!o)return H(`WUI.modal: ${t.url} did not answer with an <app-modal-content> fragment.`),!1;if(sh(e,o),r||mh(e),!Ym(e)){Gm(e.shell,t.explicitSize||Eh(e,o.getAttribute(`data-wui-size`))||e.defaultSize);let n=o.getAttribute(`data-wui-title`);n&&e.shell.setAttribute(`aria-label`,n)}return dh(e)&&fh(o,r,Xm(e)),!0}var Nh=`button[type="submit"], button:not([type]), input[type="submit"], input[type="image"]`;function Ph(e,t,n){let r=[...e.elements].filter(e=>e.matches(Nh));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 Fh(e){for(let t of e.querySelectorAll(Om))t.remove();for(let t of e.querySelectorAll(Em))t.removeAttribute(`aria-invalid`),t.classList.remove(`is-invalid`,`input-validation-error`);for(let t of e.querySelectorAll(`.field-error`))t.textContent=``}var Ih=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(`.`)),Lh=(e,t)=>{if(typeof e==`object`&&e&&t in e)return Reflect.get(e,t)};async function Rh(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(Lh(t,`title`)),i=(e.statusText||``).trim().toLowerCase(),a=Ih.has(r.toLowerCase())||r.toLowerCase()===i;return n(Lh(t,`message`))||n(Lh(t,`detail`))||(r&&!a?r:null)}function zh(e,t,n,r){let i={forbidden:Z().forbiddenMessage,networkCheck:L(`httpFailure`,za).networkCheckText,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(),Fh(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),ph(e,o.textContent)}var Bh=(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 Vh(e,t){let n=t.target,r=e.session;if(!(n instanceof HTMLFormElement)||!r||n.hasAttribute(`data-wui-native`)||!n.closest(km)||(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`;Ph(n,i,!0);let l;try{l=await e.queue.run(c?Bh(a,s):a,{method:o,body:c?void 0:s,navigate:r.options.navigate,timeoutMs:Cm(r.trigger)})}catch(t){H(t),e.session===r&&n.isConnected&&(Ph(n,i,!1),zh(e,n,`server`,null));return}if(e.session!==r)return;if(n.isConnected&&Ph(n,i,!1),l.kind===`ok`&&l.result===`success`){Hh(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===Dm;if(Mh(e,r,l.html,t)){if(t){let t=Pm(ih(e),`a card`).querySelector(Om)?.textContent?.replace(/\s+/g,` `).trim();ph(e,t||Z().invalidMessage)}return}}let u=l.kind===`ok`||l.kind===`validation`?`server`:l.kind,d=await Rh(l.response);e.session===r&&zh(e,n,u,d)}function Hh(e,t,n){let r=n.message,i=n.redirect||null,a=n.toastVariant||`success`;if(!tg(a))throw TypeError(`Unknown toast variant "${a}". Use ${eg.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&&mm().toast(r,{variant:a}),gh(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,Dh(e,t)):n.keepOpen?n.html&&Mh(e,t,n.html,!1):xh(e,t,`success`,o)}function Uh(e){let t=Bm(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`)?Xh(t.getAttribute(`data-wui-pane`)??``,{target:t.getAttribute(`data-wui-pane-target`),trigger:t}).catch(e=>{zm(e)||H(e)}):t.hasAttribute(`data-wui-modal`)?Kh(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=>{zm(e)||H(e)}):Jh(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=>{zm(e)||H(e)})))}function Wh(e){if(e.key!==`Escape`||e.defaultPrevented)return;let t=Bm(e.target,Yh);if(!t)return;let n=Mm.get(t),r=e.currentTarget;n?.session&&r instanceof Document&&!r.querySelector(`wui-modal[open]`)&&(t.querySelector(`form[data-wui-submitting]`)||(e.preventDefault(),xh(n,n.session,`dismissed`,null)))}function Gh(e=document){let t=e instanceof Document?e:Pm(e.ownerDocument,`an owner document`);Nm.has(t)||(Nm.add(t),t.addEventListener(`click`,Uh),t.addEventListener(`keydown`,Wh));let n=Lm(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)yh(e)}function Kh(e,t={}){try{if(!e)throw TypeError(`WUI.modal.load: a fragment url is required.`);let n=t.container===`drawer`,r=n?qm(t.size):Um(t.size),i=t.placement||`center`;if(!Km.includes(i))throw TypeError(`WUI.modal.load: unsupported placement "${i}". Use center or top.`);if(t.signal?.aborted)return Promise.reject(Rm());let a=eh(n?`drawer`:`modal`);Gh(document);let o=yh(a),s=dh(o),c=bh(o,e,t);c.explicitSize=r,Gm(o.shell,r||o.defaultSize),n||Im(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=Dh(o,c);return s||vh(o).show(),qh(o,c,t,l,u,`WUI.modal.load`)}catch(e){return Promise.reject(e)}}function qh(e,t,n,r,i,a){let o=new Promise((r,i)=>{n.signal?.addEventListener(`abort`,()=>{e.session===t&&(e.queue.abort(),xh(e,t,`dismissed`,{aborted:!0})),i(Rm())},{once:!0})}),s=Promise.all([r,i]).then(([,e])=>{if(e===`aborted`)throw Rm();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 Jh(e,t={}){return Kh(e,{...t,container:`drawer`,placement:void 0})}var Yh=`[data-wui-pane-host]`;function Xh(e,t={}){try{if(!e)throw TypeError(`WUI.pane.load: a fragment url is required.`);let n=Qm(t.target);if(!n)throw TypeError(`WUI.pane.load: the target is not an <app-detail-pane>.`);if(t.signal?.aborted)return Promise.reject(Rm());Gh(document);let r=yh(n),i=bh(r,e,t);n.hidden=!1,n.setAttribute(`data-open`,``);let a=Dh(r,i);return qh(r,i,t,Promise.resolve(),a,`WUI.pane.load`)}catch(e){return Promise.reject(e)}}function Zh(e){let t=Qm(e);if(!t)throw TypeError(`WUI.pane.close: the target is not an <app-detail-pane>.`);let n=Mm.get(t);n?.session&&xh(n,n.session,`dismissed`,null)}var Qh=`wuiConfirm`,$h=Object.freeze([`danger`]),eg=Object.freeze([`success`,`info`,`warning`,`danger`]),tg=e=>eg.some(t=>t===e),ng=`wui.flash`,rg=()=>L(`confirmDialog`,Vp),ig=new WeakSet,ag=new WeakSet,og=null,sg=null,cg=!1,lg=(e,t)=>{e&&mm().toast(e,{variant:t})};function ug(){let e=document.getElementById(Qh);if(e)return P(e.closest(`wui-modal`),`#${Qh} must be a wui-modal.`);let t=document.createElement(`wui-modal`);t.id=Qh;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:ml(`primary`,`soft`,`md`),"data-wui-dismiss":``,"data-wui":ul},rg().cancelLabel),I(`button`,{type:`button`,class:ml(`primary`,`solid`,`md`),"data-app-confirm":``,"data-wui":ul})))))),t.append(n),document.body.appendChild(t),t}function dg(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!$h.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);fg({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 fg({title:e,message:t,label:n,danger:r},i){let a=ug(),o=a.querySelector(`.wui-confirm-title`),s=a.querySelector(`[data-app-confirm]`);if(!o||!s)throw Error(`#${Qh} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${Qh}"> 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||rg().confirmTitle;o.textContent=l,c.textContent=t,s.textContent=n||rg().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`),`#${Qh} has no <dialog>.`).setAttribute(`aria-label`,l),sg=i,cg=!1,a.show()}var pg=(e,t)=>{og=e;try{t()}finally{og=null}},mg=(e,t)=>{let n=Reflect.get(e,t);if(n===void 0||typeof n==`string`)return n;throw TypeError(`confirmAction: ${t} must be text.`)},hg=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:mg(e,`title`),message:t,label:mg(e,`label`),tone:mg(e,`tone`)}};function gg(e,t,n){let{title:r,message:i,label:a,tone:o}=hg(t);if(o!=null&&!$h.includes(o))throw TypeError(`confirmAction: tone "${o}" is not supported. Use danger, or leave it off.`);zg(e.ownerDocument),fg({title:r,message:i,label:a,danger:o===`danger`},()=>pg(e,n))}var _g=e=>`disabled`in e&&e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`,vg=e=>{Ie(e,HTMLElement,`data-wui-confirm needs an HTML element to click.`).click()};function yg(e){let t=F(e.target,`[data-wui-confirm]:not(form)`);t&&t!==og&&!_g(t)&&(e.preventDefault(),e.stopImmediatePropagation(),dg(t,()=>pg(t,()=>vg(t))))}function bg(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===og||e.submitter&&e.submitter===og||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;dg(t,()=>pg(t,()=>t.requestSubmit(r)))}function xg(e){let t=F(e.target,`#${Qh} [data-app-confirm]`);t&&!t.hasAttribute(`disabled`)&&sg&&(cg=!0,P(t.closest(`wui-modal`),`#${Qh} is missing around its confirm button.`).hide())}function Sg(e){if(!(e.target instanceof Element)||e.target.id!==`wuiConfirm`)return;let t=cg?sg:null;sg=null,cg=!1,t?.()}function Cg(e,t){e&&window.sessionStorage.setItem(ng,JSON.stringify({message:e,variant:t}))}var wg=e=>e===`forbidden`?rg().forbiddenMessage:e===`networkCheck`?L(`httpFailure`,za).networkCheckText:e===`network`?rg().networkMessage:e===`timeout`?rg().timeoutMessage:rg().failedMessage;function Tg(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.getAttribute(`data-refresh-on-success`)!==`false`&&sm(e)?.reload()}var Eg=(e,t)=>{`disabled`in e&&(e.disabled=t)};async function Dg(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 Og(t,e)}async function Og(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.`);Eg(t,!0),t.setAttribute(`aria-busy`,`true`);let i=await Ia(e,{method:`POST`,body:n,timeoutMs:Ma(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()):(Eg(t,!1),t.removeAttribute(`aria-busy`),i.ok?(hm(i,a),Tg()):lg(i.message||wg(i.kind),`danger`))}function kg(e,t){Eg(e,!1),e.removeAttribute(`aria-busy`),H(t),lg(rg().failedMessage,`danger`)}function Ag(e){let t=F(e.target,`[data-wui-post]`);t&&(e.preventDefault(),_g(t)||t.getAttribute(`aria-busy`)===`true`||Dg(t).catch(e=>kg(t,e)))}function jg(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;Og(r,n,new FormData(t)).catch(e=>kg(n,e)),t.closest(`wui-dropdown`)?.hide()}var Mg=(e,t)=>{e.disabled=!1,e.removeAttribute(`aria-busy`),t&&Pr(t,null)};async function Ng(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&&Pr(t,`saving`);let r=Ma(e.getAttribute(`data-wui-timeout`))??3e4,i=await Ia(n,{method:(e.dataset.method||`post`).toUpperCase(),timeoutMs:r});if(i.kind===`session`)return;if(i.kind===`aborted`){Mg(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||wg(i.kind);e.disabled=!1,e.removeAttribute(`aria-busy`),t&&Pr(t,`error`,a),lg(a,`danger`)}function Pg(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`);Ng(t,n).catch(e=>{Mg(t,n),H(e),lg(rg().failedMessage,`danger`)})}function Fg(){let e=window.sessionStorage.getItem(ng);if(!e)return;window.sessionStorage.removeItem(ng);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`||!tg(r))throw TypeError(`stored flash variant "${String(r)}" is not supported.`);if(typeof n!=`string`)throw TypeError(`stored flash message is not text.`);lg(n,r)}function Ig(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(!tg(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${eg.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||(e.textContent??``).trim();e.remove(),lg(n,t)}}var Lg=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.form:null;function Rg(e){if(!(e.target instanceof Element))return;let t=e.target.closest(`[data-wui-auto-submit]`);if(!t)return;let n=Lg(e.target)||t.closest(`form`);n instanceof HTMLFormElement&&n.requestSubmit()}function zg(e){ag.has(e)||(ag.add(e),e.addEventListener(`click`,xg),e.addEventListener(`wui-modal-closed`,Sg))}function Bg(e=document){let t=e instanceof Element?e.ownerDocument:e;ig.has(t)||(ig.add(t),t.addEventListener(`click`,yg,!0),t.addEventListener(`submit`,bg,!0),zg(t),t.addEventListener(`click`,Ag),t.addEventListener(`click`,Pg),t.addEventListener(`submit`,jg),t.addEventListener(`change`,Rg),Fg()),Ig(e)}var Vg=()=>L(`unsavedChanges`,Bp),Hg=`form[data-wui-unsaved]`,Ug=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,Wg=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,Gg=new Set([`submit`,`button`,`reset`,`image`]),Kg=new Set([`hidden`,`checkbox`,`radio`,`file`,`submit`,`button`,`reset`,`image`,`range`,`color`]),qg=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,Jg=e=>qg(e)?e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled:`disabled`in e&&!!e.disabled,Yg=e=>`name`in e&&typeof e.name==`string`&&e.name!==``,Xg=e=>typeof e==`object`&&!!e,Zg=e=>Array.isArray(e)&&e.every(e=>Array.isArray(e)&&typeof e[0]==`string`);function Qg(e){let t=JSON.parse(e);if(!Zg(t))throw Error(`unsaved-changes snapshot is malformed`);return t}var $g=new WeakMap,e_=new WeakSet,t_=e=>`${e.name}:${e.size}:${e.lastModified}`,n_=e=>[...e.querySelectorAll(Hg)].filter(e=>e instanceof HTMLFormElement);function r_(e){let t=[];for(let n of e.elements)Yg(n)&&!Jg(n)&&(qg(n)&&Gg.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(t_)]):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 i_(e){return r_(e)}function a_(e,t){let n=new Map,r=Qg(t);for(let e of r){let t=n.get(e[0]);t?t.push(e):n.set(e[0],[e])}let i=Qg(r_(e)).map(e=>n.get(e[0])?.shift()??e);for(let e of n.values())i.push(...e);return JSON.stringify(i)}function o_(e){for(let t of e.elements)if(qg(t)&&t.name&&!Jg(t)){if(t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!Kg.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 s_=e=>({saved:e.querySelector(Ug)&&o_(e)?null:r_(e),engaged:!1,discarded:!1});function c_(e){let t=$g.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&r_(e)!==t.saved}var l_=(e,t)=>n_(e).filter(e=>e!==t&&c_(e));function u_(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||Vg().message;gg(e,{title:Vg().title,message:r,label:Vg().leaveLabel,tone:`danger`},()=>{for(let e of t){let t=$g.get(e);t&&(t.discarded=!0)}n()})}function d_(e){if(e.matches(Wg))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 f_(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 p_(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)||!d_(n))return;let r=l_(n.ownerDocument,null);r.length&&(e.preventDefault(),u_(n,r,()=>n.click()))}function m_(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!f_(t,e.submitter))return;let n=l_(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;u_(t,n,()=>t.requestSubmit(i));return}let r=$g.get(t);r&&(r.saved=r_(t),r.discarded=!1)}function h_(e){l_(document,null).length&&e.preventDefault()}function g_(e){let t=e.target,n=F(t,Hg);return n instanceof HTMLFormElement?n:null}function __(e){let t=g_(e);if(!t)return;let n=$g.get(t);n&&!n.engaged&&(n.saved!==null&&(n.saved=r_(t)),n.engaged=!0)}function v_(e){let t=g_(e),n=t&&$g.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function y_(e){for(let t of n_(e)){let e=$g.get(t);e?.saved&&(e.saved=a_(t,e.saved))}}function b_(e){let t=Xg(e)?e.handle:void 0;return Xg(t)?t.el:void 0}function x_(e){if(!(e instanceof CustomEvent))return;let t=b_(e.detail);if(t instanceof Element)for(let e of n_(t))C_(e)}function S_(e=document){let t=e instanceof Document?e:e.ownerDocument;if(!e_.has(t)){e_.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,__,!0);for(let e of[`input`,`change`])t.addEventListener(e,v_,!0);t.addEventListener(`click`,p_),t.addEventListener(`submit`,m_),t.addEventListener(`wui:modal:success`,x_),t.addEventListener(ti,()=>y_(t)),P(t.defaultView,`unsaved-changes guard needs a document with a window`).addEventListener(`beforeunload`,h_)}let n=n_(e);e instanceof HTMLFormElement&&e.matches(Hg)&&n.unshift(e);for(let e of n)$g.has(e)||$g.set(e,s_(e))}function C_(e){if(!(e instanceof HTMLFormElement)||!e.matches(Hg))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);$g.set(e,{saved:r_(e),engaged:!1,discarded:!1})}var w_=()=>L(`drawer`,Eu),T_=`wui:drawer:discard`,E_=`wui-drawer[confirm-discard]`,D_=`wui-modal`,O_=`data-wui-no-discard`,k_=`.wui-drawer-discard`,A_=`input, select, textarea`,j_=e=>typeof e==`object`&&!!e||typeof e==`function`;function M_(e){let t=e.currentTarget;if(!(t instanceof Document))throw Error(`The discard guard is not wired on a document.`);return t}function N_(e,t){return F(e,t)}var P_=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement,F_=new WeakMap,I_=new WeakSet,L_=new WeakSet;function R_(e,t,n,r,i){let a=e.createElement(`button`);return a.type=`button`,a.className=ml(t,n,`sm`),a.dataset.wui=ul,a.setAttribute(r,``),a.textContent=i,a}function z_(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,R_(e,`danger`,`solid`,`data-wui-discard-confirm`,w_().discardLabel),R_(e,`primary`,`soft`,`data-wui-discard-keep`,w_().keepLabel)),n}function B_(e){if(!(e instanceof Element))return null;let t=e.closest(E_);if(t)return t;let n=e.closest(D_);return n&&U_(n).length?n:null}function V_(e){return e.closest(E_)??e.closest(D_)}function H_(e,t){return t.hasAttribute(O_)||e.hasAttribute(O_)?!1:t.hasAttribute(`confirm-discard`)||e.hasAttribute(`data-wui-confirm-discard`)?!0:(e.getAttribute(`method`)||`get`).toLowerCase()!==`get`}function U_(e){return e.matches(E_)?e.querySelectorAll(`form`):[...e.querySelectorAll(`form`)].filter(t=>H_(t,e))}function W_(e){let t=F_.get(e);return t!=null&&i_(e)!==t}function G_(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),L_.add(t),t}function K_(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),L_.add(t),t}function q_(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 J_(e,t,n){let r=e.querySelector(k_);if(r){q_(r);return}let i=z_(e.ownerDocument,t),a;if(e.matches(E_))a=e.querySelector(`.wui-drawer-footer`)??G_(e),a.prepend(i);else if(e.hasAttribute(`confirm-discard`))a=e.querySelector(`.wui-modal-footer`)??K_(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`)??K_(e),a.prepend(i)}a.classList.add(`wui-drawer-discarding`),q_(i)}function Y_(e){let t=e.parentElement;if(e.remove(),!t)throw Error(`The discard prompt has no footer.`);t.classList.remove(`wui-drawer-discarding`),L_.has(t)&&t.remove()}function X_(e){for(let t of U_(e))for(let e of t.querySelectorAll(A_))if(P_(e)&&e.type!==`hidden`&&!e.disabled){e.focus({preventScroll:!0});return}}function Z_(e){let t=B_(e.target);if(t)for(let e of U_(t))F_.get(e)??F_.set(e,i_(e))}function Q_(e){for(let t of M_(e).querySelectorAll(`form`)){let e=F_.get(t);e!=null&&F_.set(t,a_(t,e))}}function $_(e){let t=e.target;t instanceof HTMLFormElement&&B_(t)&&F_.set(t,i_(t))}function ev(e){if(!j_(e))return;let t=`handle`in e?e.handle:void 0;if(j_(t))return`el`in t?t.el:void 0}function tv(e){if(!(e instanceof CustomEvent))return;let t=e.detail,n=ev(t);if(n instanceof Element)for(let e of n.querySelectorAll(`form`))F_.delete(e)}function nv(e){let t=e.target;t instanceof Element&&t.matches(E_)&&[...U_(t)].some(W_)&&(e.preventDefault(),J_(t,t.getAttribute(`confirm-discard`),null))}function rv(e){let t=e.target;if(!(t instanceof Element)||!t.matches(D_))return;let n=[...U_(t)].find(W_);n&&(e.preventDefault(),J_(t,n.getAttribute(`data-wui-confirm-discard`)??t.getAttribute(`confirm-discard`)??w_().confirmDiscard,n))}function iv(e){let t=P(e.closest(k_),`The discard button is outside its prompt.`),n=V_(t);if(Y_(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);for(let e of U_(n))F_.set(e,i_(e));n.dispatchEvent(new CustomEvent(T_,{bubbles:!0})),n.matches(E_)?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 av(e){let t=P(e.closest(k_),`The keep button is outside its prompt.`),n=V_(t);if(Y_(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);X_(n)}function ov(e){let t=N_(e.target,`[data-wui-discard-confirm]`);if(t){iv(t);return}let n=N_(e.target,`[data-wui-discard-keep]`);n&&av(n)}function sv(e=document){let t=e instanceof Document?e:e.ownerDocument;I_.has(t)||(I_.add(t),t.addEventListener(`focusin`,Z_),t.addEventListener(`pointerdown`,Z_),t.addEventListener(`submit`,$_),t.addEventListener(ti,Q_),t.addEventListener(`wui:modal:success`,tv),t.addEventListener(`wui:modal:loaded`,tv),t.addEventListener(`wui-drawer-close`,nv,!0),t.addEventListener(`wui-modal-close`,rv),t.addEventListener(`click`,ov))}var cv={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`,cv),lv=31536e3,uv=new WeakMap;function dv(e,t,n,r){let i=[...e.querySelectorAll(`nav.wui-tabbar a.wui-tabbar-item`)].find(e=>e.getAttribute(`href`)===t);if(!i)throw Error(`setTabCount: no tab bar item links to ${t}.`);let a=i.querySelector(`:scope > .wui-tabbar-badge`);if(n===null||n===0){a?.remove();return}a||(a=document.createElement(`span`),i.append(a)),a.className=`wui-tabbar-badge${r?` tone-${r}`:``}`;let o=e.querySelector(`nav.wui-tabbar`)?.hasAttribute(`data-wui-cap-badges`)===!0;a.textContent=o?fv(n):String(n)}var fv=e=>e>99?`99+`:String(e),pv=(e,t)=>Object.entries(t).reduce((e,[t,n])=>e.replaceAll(`{${t}}`,()=>String(n)),e);function mv(e,t,n=document){try{n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${lv}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}function hv(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=${lv}; 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},gv=(e,t,n)=>{let r=e?.closest(t);return r instanceof n?r:null},_v=(e,t,n)=>e?[...e.querySelectorAll(t)].filter(e=>e instanceof n):[],vv=e=>{if(!(e.target instanceof Element))throw Error(`event target is not an element`);return e.target},yv=e=>{let t=e.getAttribute(`href`);if(t===null)throw Error(`search hit has no href`);return t},bv=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function xv(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),_=La(),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=fv(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?u:pv(h,{label:u,count:fv(o)})),a&&s&&i&&(i.textContent=o===0?p:pv(m,{count:fv(o)}))},b=()=>s?N(s):!1,x=()=>{let e=bv(`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(bv(`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=iu(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(bv(`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=vv(e);if(t.closest(`[data-wui-bell-retry]`)){await S(!0);return}let n=gv(t,`[data-wui-bell-read]`,HTMLButtonElement);if(!n||!l)return;n.disabled=!0;let r=await Ia(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 Sv=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),Cv=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function wv(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=La(),g,_=-1,v=()=>_v(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(Cv(s,c,t));if(n.kind!==`aborted`&&n.kind!==`stale`&&n.kind!==`session`){if(e.classList.remove(`is-loading`),n.ok){let e=iu(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:pv(r===1?m:p,{count:r}))}else i().replaceChildren(bv(`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(zr(t)){let e=v(),r=_>=0?e[_]:void 0;!i().hidden&&r?(t.preventDefault(),C(yv(r))):l&&n.value.trim()!==``&&(t.preventDefault(),C(Cv(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=gv(vv(e),`.wui-topsearch-hit`,HTMLElement);!t||e.ctrlKey||e.metaKey||e.shiftKey||e.button===1||(e.preventDefault(),C(yv(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||Sv(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 Tv(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>{mv(n,!!e.detail?.collapsed)});let r=e.dataset.wuiFoldedCookie;r&&e.addEventListener(`wui:shell:nav-fold`,e=>{hv(r,e.detail?.key,!!e.detail?.folded)}),e.addEventListener(`click`,t=>{vv(t).closest(`[data-wui-tabbar-more]`)&&$(e,`[data-app-shell-menu]`,HTMLElement)?.click()});let i=$(e,`[data-wui-bell]`,HTMLElement),a=i?xv(i,t):null,o=$(e,`[data-wui-topsearch]`,HTMLElement);o&&wv(o,t);let s={el:e,setUnread(e){P(a,`WUI.shell: this <app-shell> has no <app-shell-notifications>.`).setUnread(e)},setTabCount(t,n,r){dv(e,t,n,r)},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)}};uv.set(e,s);let c=n=>{if(n.target===e||n.target instanceof Node&&n.target.contains(e)){for(let e of t)e();uv.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,c)}};return document.addEventListener(`wui:teardown`,c),s}function Ev(e=document){let t=[];e instanceof HTMLElement&&e.matches(`[data-app-shell]`)&&t.push(e),t.push(..._v(e,`[data-app-shell]`,HTMLElement));for(let e of t)e.dataset.wuiPartsWired||(e.dataset.wuiPartsWired=`1`,Tv(e))}function Dv(e){let t=gv(e,`[data-app-shell]`,HTMLElement);return t?(uv.has(t)||Ev(t),uv.get(t)??null):null}var Ov=new Set([204,205,304]),kv=e=>{let t=new Headers;for(let n of e.split(/\r?\n/)){let e=n.indexOf(`:`);e>0&&t.append(n.slice(0,e).trim(),n.slice(e+1).trim())}return t};async function Av(e,t,n={}){if(!(t instanceof FormData))throw TypeError(`wuiUpload: body must be FormData`);let r=n.timeoutMs;if(r!==void 0&&!(Number.isFinite(r)&&r>0))throw TypeError(`wuiUpload: timeoutMs must be a positive number`);let i={Accept:`text/html`,"X-Requested-With":`XMLHttpRequest`,[wa]:`1`,...n.headers};if(Oa(e)){let e=Da();e&&(i[e.header]=e.token)}let a=n.signal;return a?.aborted?Fa(`aborted`):new Promise(o=>{let s=new XMLHttpRequest,c=!1,l,u=()=>s.abort(),d=(e,t=null,n=``)=>{l!==void 0&&clearTimeout(l),a?.removeEventListener(`abort`,u),o(Fa(e,t,n))};s.upload.onprogress=e=>{n.onProgress?.(e.loaded,e.lengthComputable?e.total:0)},s.onload=()=>{let e=s.status;if(e===0){d(`network`);return}let t=kv(s.getAllResponseHeaders()),n=ka(e,t),r=s.responseText,i=n===`ok`||n===`validation`?r:``;if(e<200||e>599){d(n,null,i);return}let a=new Response(Ov.has(e)?null:r,{status:e,headers:t});d(n,a,i)},s.onerror=()=>d(`network`),s.onabort=()=>{d(a?.aborted?`aborted`:c?`timeout`:`aborted`)},r!==void 0&&(l=setTimeout(()=>{c=!0,s.abort()},r)),a?.addEventListener(`abort`,u,{once:!0}),s.open(`POST`,e,!0);for(let[e,t]of Object.entries(i))s.setRequestHeader(e,t);s.send(t)})}var jv=`data-wui-submit-once`,Mv=`data-wui-submit-pending`,Nv=`wui-submit-spinner`,Pv=new WeakSet,Fv=new WeakMap;function Iv(e){return e instanceof HTMLButtonElement||e instanceof HTMLInputElement?e:null}function Lv(e){if(e.setAttribute(`aria-busy`,`true`),e.tagName===`INPUT`||e.querySelector(`.${Nv}`))return;let t=e.ownerDocument.createElement(`span`);t.className=`spinner-border spinner-border-sm me-2 ${Nv}`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t)}function Rv(e){e.removeAttribute(`aria-busy`),e.querySelector(`.${Nv}`)?.remove()}function zv(e){return e.method===`post`&&e.target!==`_blank`&&e.getAttribute(`data-wui-submit-once`)!==`off`}function Bv(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!zv(t))return;if(t.hasAttribute(Mv)){e.preventDefault();return}t.setAttribute(Mv,``);let n=Iv(e.submitter);setTimeout(()=>{t.hasAttribute(Mv)&&(e.defaultPrevented?t.removeAttribute(Mv):n&&(n.disabled=!0,Lv(n),Fv.set(t,n)))},0)}var Vv=e=>[...e.querySelectorAll(`form[${Mv}]`)].filter(e=>e instanceof HTMLFormElement);function Hv(e){for(let t of Vv(e)){t.removeAttribute(Mv);let e=Fv.get(t);e&&(e.disabled=!1,Rv(e),Fv.delete(t))}}function Uv(e){let t=e.ownerDocument===null?e:e.ownerDocument;Pv.has(t)||(Pv.add(t),t.addEventListener(`submit`,Bv,!0),t.defaultView?.addEventListener(`pageshow`,()=>Hv(t)))}var Wv=[`light`,`dark`,`auto`],Gv=[`wave`,`circle`,`slide`,`blinds`,`fade`,`none`],Kv=`fade`,qv=`theme`,Jv={wave:1100,circle:700,slide:600,blinds:900,fade:350,none:0},Yv=`wui-theme-switching`,Xv=`wui:theme:change`,Zv=`(prefers-color-scheme: dark)`,Qv=e=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(e).matches,$v=e=>Wv.some(t=>t===e);function ey(e){return e===`dark`||e===`auto`&&Qv(Zv)?`dark`:`light`}function ty(e=qv){let t=null;try{t=window.localStorage.getItem(e)}catch(e){if(!(e instanceof DOMException))throw e}return $v(t)?t:`auto`}function ny(e,t=qv){try{window.localStorage.setItem(t,e)}catch(e){if(!(e instanceof DOMException))throw e}}function ry(e){let t=document.documentElement,n=ey(e);t.setAttribute(`data-theme`,e),t.setAttribute(`data-bs-theme`,n),document.dispatchEvent(new CustomEvent(Xv,{detail:{mode:n,preference:e}}))}var iy=`((k)=>{let m;try{m=localStorage.getItem(k)}catch{m=null}if(m!=='light'&&m!=='dark')m='auto';const r=document.documentElement,q=window.matchMedia?window.matchMedia('(prefers-color-scheme: dark)'):null;function s(){const 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 ay(e=qv){return`${iy}${JSON.stringify(String(e)).replace(/</g,`\\u003c`)})`}function oy(e,{includeAuto:t=!1}={}){return e===`light`?`dark`:e===`dark`&&t?`auto`:`light`}function sy(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(Zv),n=()=>e(t.matches?`dark`:`light`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var cy=60,ly=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,uy=e=>e.toFixed(1),dy=(e,t)=>`${uy(e)}px ${uy(t)}px`,fy={amplitude:22,segments:36,cycles:1.5,ripples:2},py=6,my=(e,t,n,r,i)=>{let{amplitude:a,segments:o,cycles:s}=fy,c=n*(t+2*a),l=i?t+a-c:c-a,u=i?t+2*a:-2*a,d=[dy(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(dy(n,i))}return d.push(dy(e,u)),`polygon(${d.join(`, `)})`},hy=(e,t,n,r)=>{let i=t/py,a=[];for(let t=0;t<py;t++){let o=t*i,s=i*n,c=r?o+i-s:o,l=r?o+i:o+s;a.push(dy(0,c),dy(e,c),dy(e,l),dy(0,l))}return`polygon(${a.join(`, `)})`};function gy(e,{width:t,height:n,to:r=`dark`,origin:i}){let a=r===`dark`,o=[];for(let r=0;r<=cy;r++){let s=r/cy,c=ly(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(${uy(a*c)}px at ${uy(e)}px ${uy(r)}px)`});break}case`slide`:{let e=n*(1-c);o.push({clipPath:a?`inset(${uy(e)}px 0px 0px 0px)`:`inset(0px 0px ${uy(e)}px 0px)`});break}case`blinds`:o.push({clipPath:hy(t,n,c,a)});break;case`fade`:o.push({clipPath:`none`,opacity:c});break;case`none`:return[];default:o.push({clipPath:my(t,n,c,s*fy.ripples*2*Math.PI,a)})}}return o}var _y=e=>{e instanceof DOMException&&(e.name===`AbortError`||e.name===`InvalidStateError`)||H(`[@webority/ui-elements] The theme view transition failed:`,e)};function vy(e,{effect:t=Kv,to:n,origin:r,duration:i}={}){let a=document.documentElement,o=n!==void 0&&a.getAttribute(`data-bs-theme`)===n;if(t===`none`||o||Qv(`(prefers-reduced-motion: reduce)`)||typeof document.startViewTransition!=`function`||typeof a.animate!=`function`)return e(),Promise.resolve(!1);a.classList.add(Yv);let s=document.startViewTransition(e),c=i??Jv[t]??Jv.fade;return s.ready.then(()=>{let e=gy(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(_y),s.finished.catch(_y).finally(()=>a.classList.remove(Yv)).then(()=>!0)}function yy(){Pt(),i(`wui-select`,Dc),i(`wui-dock`,Fi),i(`wui-otp`,Do),i(`wui-shortcuts`,Yc),i(`wui-record-pager`,Zo),i(`wui-data-table`,Pi),i(`wui-hover-card`,Gi),i(`wui-modal`,Ki),i(`wui-navigation-menu`,ta),i(`wui-notification-center`,io),i(`wui-onboarding-checklist`,po),i(`wui-overflow`,Ho),i(`wui-rating`,Xo),i(`wui-relative-time`,ps),i(`wui-show-more`,$c),i(`wui-truncate`,el),i(`wui-whats-new`,cl)}return globalThis.WeborityUiElementsInternal||(globalThis.WeborityUiElementsInternal={version:`0.177.0`,modules:ed}),pi(),yy(),e.AVATAR_ACCEPT=nd,e.AVATAR_MAX_SIZE_MB=rd,e.AVATAR_OUTPUT_SIZE=id,e.AVATAR_OUTPUT_TYPE=ad,e.AVATAR_PREVIEW_SIZES=od,e.BAR_BULK_IN_BAR_ATTRIBUTE=Rf,e.COLUMN_MAX_WIDTH=Xn,e.COLUMN_MIN_WIDTH=Yn,e.COMMAND_SHORTCUT_ATTRIBUTE=Cd,e.CONFIRM_DIALOG_ID=Qh,e.CONFIRM_TONES=$h,e.COPY_FEEDBACK_MS=Pl,e.CSRF_META_NAME=ba,e.CURRENCIES=en,e.CURRENCY_SYMBOLS=It,e.DATE_PATTERNS=rn,e.DEFAULT_CSRF_HEADER=xa,e.DEFAULT_CURRENCY=Ft,e.DEFAULT_IMAGE_ACCEPT=Fd,e.DEFAULT_MAX_SIZE_MB=Id,e.DEFAULT_PASSWORD_RULES=Jf,e.DEFAULT_THEME_EFFECT=Kv,e.DEFAULT_THEME_STORAGE_KEY=qv,e.DISCARD_EVENT=T_,e.DROP_OVER_CLASS=np,e.DURATION_UNITS=nn,e.FILTER_POPOVER_MAX_CHIPS=St,e.FLASH_STORAGE_KEY=ng,e.FLASH_VARIANTS=eg,e.FORMAT_STYLES=$t,e.HTTP_KINDS=Ta,e.IST_TIME_ZONE=B,e.MASK_INPUT_TYPES=af,e.MASK_NAMES=mf,e.MENTION_ID_PATTERN=Ll,e.MONEY_UNITS=tn,e.NOTIFICATION_COUNT_CAP=oa,e.PIN_AT_VAR=_r,e.PIN_SIDES=$n,e.RESIZE_STEP=Zn,e.RESIZE_STEP_LARGE=Qn,e.ROW_DRAG_TYPE=rp,e.ROW_DROP_EVENT=tp,e.ROW_HEIGHTS=tr,e.ROW_MOVE_LIMIT=xr,e.ROW_MOVE_MS=Sr,e.ROW_SAVE_ATTR=Ar,e.ROW_SAVE_ERROR_CLASS=jr,e.ROW_SAVE_STATES=kr,e.SCROLL_EDGE_SELECTOR=jp,e.SEARCH_OPEN_KEY=ud,e.SELECT_CELL_CLASS=q,e.SHORTCUTS_OFF_ATTRIBUTE=tt,e.SHORTCUT_EVENT=rt,e.SHORTCUT_SCOPE_ATTRIBUTE=nt,e.SUBMIT_ONCE_ATTRIBUTE=jv,e.THEME_BOOT_SCRIPT_BODY=iy,e.THEME_CHANGE_EVENT=Xv,e.THEME_EFFECTS=Gv,e.THEME_EFFECT_DURATION=Jv,e.THEME_MODES=Wv,e.THEME_SWITCHING_CLASS=Yv,e.TOAST_ACTION_METHODS=ha,e.TOAST_ACTION_MS=lm,e.VIRTUAL_OVERSCAN=er,e.WHATS_NEW_READ_EVENT=tl,e.WUI_HEADERS=W,e.WuiDataTable=Pi,e.WuiDock=Fi,e.WuiHoverCard=Gi,e.WuiNavigationMenu=ta,e.WuiNotificationCenter=io,e.WuiOnboardingChecklist=po,e.WuiOtp=Do,e.WuiOverflow=Ho,e.WuiRating=Xo,e.WuiRecordPager=Zo,e.WuiRelativeTime=ps,e.WuiSelect=Dc,e.WuiShortcuts=Yc,e.WuiShowMore=$c,e.WuiTruncate=el,e.WuiWhatsNew=cl,e.acceptDroppedFiles=Qd,e.acceptLabel=Yd,e.addRowSelectCells=vu,e.addSelectColumn=yu,e.applyBarBulk=Gf,e.applyTheme=ry,e.ariaKeyShortcuts=ft,e.attachFileDrop=$d,e.attachInputMask=kf,e.attachRowDrag=Dp,e.attachScrollEdges=Np,e.attachShiftRange=Su,e.avatarCropOptions=ld,e.avatarUnreadableMessage=cd,e.barBulkCountText=Vf,e.buildPasswordRules=Zf,e.clampColumnWidth=ur,e.classifyStatus=ka,e.closeRemotePane=Zh,e.collapseSearch=yd,e.configureCsrf=Ca,e.confirmAction=gg,e.copyTextToClipboard=Fl,e.createDiscardPrompt=z_,e.createRequestQueue=La,e.createSelectHeaderCell=fu,e.createSelectRowCell=pu,e.createSelectSpacerCell=mu,e.currencyPrefix=Rt,e.deriveStepStatus=ou,e.emptyValueLabel=V,e.evaluatePassword=Qf,e.fillText=R,e.formValues=i_,e.formatCompact=Nn,e.formatCurrency=jn,e.formatDate=zn,e.formatDateTime=Un,e.formatDuration=In,e.formatFileSize=Kd,e.formatMasked=Sf,e.formatNumber=An,e.formatPercent=Pn,e.formatRelativeTime=as,e.formatValue=Vn,e.getServerTable=sm,e.getShell=Dv,e.glyphNode=ks,e.groupCount=lr,e.groupItems=dr,e.groupNotificationsByDay=ma,e.identityCell=Mr,e.inShortcutScope=gt,e.initCollapsibleSearch=Sd,e.initCommandShortcuts=Md,e.initDrawerDiscard=sv,e.initInputMasks=Lf,e.initPageBarBulk=Kf,e.initRemoteModals=Gh,e.initRowDrag=Ap,e.initScrollEdges=zp,e.initServerActions=Bg,e.initServerTables=om,e.initShellParts=Ev,e.initSubmitOnce=Uv,e.initUnsavedChanges=S_,e.isCommandChord=Od,e.isCurrencyCode=Lt,e.isHeicFile=sd,e.isImageFile=Wd,e.isImageOnlyAccept=Jd,e.isMaskPattern=gf,e.isPdfFile=qd,e.isTimeZone=Wt,e.isTypingTarget=pt,e.loadRemoteDrawer=Jh,e.loadRemoteModal=Kh,e.loadRemotePane=Xh,e.maskedPostValue=Tf,e.matchSegments=Ou,e.matchesAccept=Xd,e.measureRows=Er,e.mentionLabel=Bl,e.mentionTextFromValue=Ul,e.mentionValueFromText=Wl,e.mentionedIds=Gl,e.moveFocus=vt,e.nextTheme=oy,e.notificationCountText=la,e.notificationDayHeading=pa,e.notificationTime=fa,e.notificationTriggerLabel=ua,e.notificationUnreadAnnouncement=da,e.openSearch=vd,e.parseMentionValue=Hl,e.parseServerHtml=iu,e.parseToastAction=va,e.passwordSatisfies=$f,e.pinAtValue=vr,e.pinClasses=br,e.pinOffsetVar=gr,e.planPins=yr,e.playRowMoves=Dr,e.pluralText=Ye,e.postedMasked=xf,e.rawMasked=bf,e.readColumnWidths=mr,e.readCsrf=Da,e.readStoredTheme=ty,e.readText=L,e.relativeTimeTitle=os,e.resetUnsavedChanges=C_,e.resolveMask=vf,e.resolveTheme=ey,e.rowLabel=Nr,e.rowOrderChanged=Or,e.runShortcut=_t,e.runToastAction=gm,e.saveOutcomeText=Ir,e.setRowSaveState=Pr,e.setText=Ke,e.settledRows=Fr,e.shortcutKey=dt,e.shortcutName=ut,e.shortcutsOff=ht,e.showResultToast=hm,e.stepperHeaderItems=su,e.storeTheme=ny,e.syncSelectAll=bu,e.syncTargets=kp,e.themeBootScript=ay,e.themeKeyframes=gy,e.tickedKeys=mp,e.timeZoneLabel=Kn,e.timeoutFromAttribute=Ma,e.toInstant=Ln,e.todayIn=Xt,e.transitionTheme=vy,e.validateFile=Zd,e.virtualRange=fr,e.wallClockOf=Yt,e.watchSystemTheme=sy,e.whenElementsReady=hi,e.withTrustedLabel=Rs,e.writeColumnWidths=hr,e.wuiFetch=Ia,e.wuiUpload=Av,e.zoneOffsetMs=Kt,e.zoneParts=Gt,e})({});
|