@webority/ui-elements 0.178.3 → 0.179.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/text/en.json +1 -0
  2. package/dist/text.js +1 -1
  3. package/dist/ui-elements/carousel.global.js +1 -1
  4. package/dist/ui-elements/code-block.global.js +1 -1
  5. package/dist/ui-elements/command-palette.global.js +1 -1
  6. package/dist/ui-elements/comment-thread.global.js +1 -1
  7. package/dist/ui-elements/consent-banner.global.js +1 -1
  8. package/dist/ui-elements/context-menu.global.js +1 -1
  9. package/dist/ui-elements/data-table.global.js +1 -1
  10. package/dist/ui-elements/date-range.global.js +1 -1
  11. package/dist/ui-elements/date-time.global.js +1 -1
  12. package/dist/ui-elements/datepicker.global.js +1 -1
  13. package/dist/ui-elements/dock.global.js +1 -1
  14. package/dist/ui-elements/drawer.global.js +1 -1
  15. package/dist/ui-elements/dropdown.global.js +1 -1
  16. package/dist/ui-elements/entry-grid.global.js +1 -1
  17. package/dist/ui-elements/gantt.global.js +1 -1
  18. package/dist/ui-elements/glyphs.global.js +1 -1
  19. package/dist/ui-elements/hover-card.global.js +1 -1
  20. package/dist/ui-elements/image-crop.global.js +1 -1
  21. package/dist/ui-elements/inline-edit.global.js +1 -1
  22. package/dist/ui-elements/kanban.global.js +1 -1
  23. package/dist/ui-elements/lead-popup.global.js +1 -1
  24. package/dist/ui-elements/lightbox.global.js +1 -1
  25. package/dist/ui-elements/markdown.global.js +1 -1
  26. package/dist/ui-elements/navigation-menu.global.js +1 -1
  27. package/dist/ui-elements/notification-center.global.js +1 -1
  28. package/dist/ui-elements/onboarding-checklist.global.js +1 -1
  29. package/dist/ui-elements/org-tree.global.js +1 -1
  30. package/dist/ui-elements/otp.global.js +1 -1
  31. package/dist/ui-elements/overflow.global.js +1 -1
  32. package/dist/ui-elements/phone.global.js +1 -1
  33. package/dist/ui-elements/popover.global.js +1 -1
  34. package/dist/ui-elements/rating.global.js +1 -1
  35. package/dist/ui-elements/record-pager.global.js +1 -1
  36. package/dist/ui-elements/relative-time.global.js +1 -1
  37. package/dist/ui-elements/saved-views.global.js +1 -1
  38. package/dist/ui-elements/select-chips.global.js +1 -1
  39. package/dist/ui-elements/select-recents.global.js +1 -1
  40. package/dist/ui-elements/select-search.global.js +1 -1
  41. package/dist/ui-elements/select-window.global.js +1 -1
  42. package/dist/ui-elements/shortcuts.global.js +1 -1
  43. package/dist/ui-elements/show-more.global.js +1 -1
  44. package/dist/ui-elements/slider.global.js +1 -1
  45. package/dist/ui-elements/sortable.global.js +1 -1
  46. package/dist/ui-elements/status-icon.global.js +1 -1
  47. package/dist/ui-elements/table-export.global.js +1 -1
  48. package/dist/ui-elements/timepicker.global.js +1 -1
  49. package/dist/ui-elements/tour.global.js +1 -1
  50. package/dist/ui-elements/tree-picker.global.js +1 -1
  51. package/dist/ui-elements/tree.global.js +1 -1
  52. package/dist/ui-elements/truncate.global.js +1 -1
  53. package/dist/ui-elements/whats-new.global.js +1 -1
  54. package/dist/ui-elements/wizard.global.js +1 -1
  55. package/dist/ui-elements.global.js +1 -1
  56. package/package.json +5 -5
  57. package/types/text/web/textarea.g.d.ts +1 -0
@@ -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:()=>Ae,closeModalDialog:()=>Oe,isPopoverOpen:()=>je,onOverlayRootChange:()=>Ie,openAnchoredPopover:()=>ke,openModalDialog:()=>De,overlayRoot:()=>Fe,raisePopover:()=>Ne,returnFocus:()=>we,setPopoverOpen:()=>Me,wireOpenTriggers:()=>Le}),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=Fe(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;Fe(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(Fe(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 Ae(t),e}E(t,()=>{!je(t)||!t.isConnected?me.get(t)?.():e.isConnected&&n.scrollSettling?.()?i():!e.isConnected||!n.keepOffscreen&&Te(e)?Ae(t):i()});let a=new ResizeObserver(()=>{je(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`&&je(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 Ae(e){je(e)&&e.hidePopover(),me.get(e)?.()}function je(e){return e.matches(`:popover-open`)}function Me(e,t){Pe(e),je(e)!==t&&(t?e.showPopover():e.hidePopover())}function Ne(e){if(Pe(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 Pe(e){if(!e.hasAttribute(`popover`))throw Error(`nativeOverlay: the panel has no popover attribute`)}function Fe(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 Ie(e,t=document){ce.has(t)||(ce.add(t),t.addEventListener(`toggle`,()=>Se(t),!0),t.addEventListener(`close`,()=>Se(t),!0));let n={last:Fe(t),listener:e};return fe(t).add(n),()=>{fe(t).delete(n)}}function Le(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 Re=n({closestOf:()=>M,elementOf:()=>ze,make:()=>N,must:()=>j});function j(e,t){if(e==null)throw Error(t);return e}function ze(e,t,n){if(!(e instanceof t))throw TypeError(n);return e}function M(e,t){return e instanceof Element?e.closest(t):null}function N(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 Be=n({fillText:()=>F,pluralText:()=>Qe,readText:()=>P,setText:()=>Ye,subscribeText:()=>Xe,textLocale:()=>Ze}),Ve=`en-IN`,He=/\{([A-Za-z0-9_]+)\}/g,Ue=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0,We,Ge=new Map,Ke=0,qe=new Set,Je=new Map;function Ye(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(!$e(i))throw RangeError(`Text ${e} must be an object of string keys.`);t.set(e,et(e,i))}}We=n,Ge=t,Ke+=1;for(let e of Array.from(qe))e()}function P(e,t){let n=Ge.get(e);if(n===void 0)return t;let r=Je.get(e);if(r!==void 0&&r.version===Ke&&r.english===t&&nt(r.merged,t))return r.merged;let i=tt(e,n,t);return Je.set(e,{version:Ke,english:t,merged:i}),i}function Xe(e){return qe.add(e),()=>{qe.delete(e)}}function Ze(){return We??Ve}function F(e,t){return e.replace(He,(e,n)=>Ue(t,n)?String(t[n]):e)}function Qe(e,t,n,r){let i=`${t}Other`;if(!Ue(e,i))throw RangeError(`Plural text ${t} has no ${i} key; every plural needs its Other form.`);let a=new Intl.PluralRules(Ze()).select(n),o=`${t}${a.charAt(0).toUpperCase()}${a.slice(1)}`,s=e[Ue(e,o)?o:i];if(s===void 0)throw RangeError(`Plural text ${t} has no ${o} key.`);return F(s,{count:n,...r})}function $e(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function et(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 tt(e,t,n){let r={};for(let[i,a]of Object.entries(t)){let t=Ue(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=rt(t);for(let t of rt(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 nt(e,t){let n=Object.keys(t);return Object.keys(e).length===n.length&&n.every(t=>Ue(e,t))}function rt(e){return Array.from(e.matchAll(He),e=>e[1]??``)}var it={closeLabel:`Close`,helpLabel:`Show these shortcuts`,nextItemLabel:`Next item`,openItemLabel:`Open the item`,previousItemLabel:`Previous item`,selectItemLabel:`Select the item`,sheetTitle:`Keyboard shortcuts`},at=n({SHORTCUTS_OFF_ATTRIBUTE:()=>st,SHORTCUT_EVENT:()=>lt,SHORTCUT_SCOPE_ATTRIBUTE:()=>ct,ariaKeyShortcuts:()=>xt,inShortcutScope:()=>Tt,isTypingTarget:()=>St,listKeys:()=>dt,moveFocus:()=>Dt,runShortcut:()=>Et,selectKey:()=>ft,shortcutKey:()=>bt,shortcutName:()=>yt,shortcutText:()=>ut,shortcutsOff:()=>wt}),ot=()=>P(`shortcutKeys`,it),st=`data-wui-shortcuts`,ct=`data-shortcut-scope`,lt=`wui:shortcut`,ut=()=>({title:ot().sheetTitle,close:ot().closeLabel,help:ot().helpLabel}),dt=()=>[{key:`J`,label:ot().nextItemLabel},{key:`K`,label:ot().previousItemLabel},{key:`Enter`,label:ot().openItemLabel}],ft=()=>({key:`X`,label:ot().selectItemLabel}),pt={"/":`slash`,"?":`help`,Escape:`esc`,Esc:`esc`,Enter:`enter`},mt={esc:`Esc`,escape:`Esc`,enter:`Enter`,slash:`/`,help:`?`},ht={esc:`Escape`,ctrl:`Control`,cmd:`Meta`,option:`Alt`,opt:`Alt`},gt=new Set([`checkbox`,`radio`,`button`,`submit`,`reset`,`range`,`color`,`file`,`image`]),_t=new Set([`textbox`,`searchbox`,`combobox`]),vt=`a[href], button, summary, input, select, textarea, [role="button"], [role="link"], [role="menuitem"], [role="option"], [role="tab"], [role="checkbox"], [role="switch"]`;function yt(e){if(!e||e.ctrlKey||e.metaKey||e.altKey)return null;let t=e.key;return typeof t!=`string`||!t?null:pt[t]?pt[t]:t.length===1&&t.trim()?t.toLowerCase():null}function bt(e){let t=String(e??``).trim();return t.length===1?t.toUpperCase():mt[t.toLowerCase()]??t}function xt(e){return String(e??``).trim().split(/\s+/).filter(Boolean).map(e=>ht[e.toLowerCase()]??(e.length===1?e.toUpperCase():e)).join(`+`)}function St(e){if(!e||!Ct(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!gt.has(t.toLowerCase())}return _t.has(e.getAttribute?.(`role`))}function Ct(e){return e.nodeType===1}function wt(e=typeof document>`u`?null:document){return e?.documentElement?.getAttribute(st)===`off`}function Tt(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 Et(e,t,n=null){let r=e.target instanceof Node?e.target:null;if(!t||e.defaultPrevented||wt(r?.ownerDocument??void 0))return!1;let i=yt(e);if(!i||!Tt(r,n)||St(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(vt)?!1:(e.preventDefault(),a(e),!0)}function Dt(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=j(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 Ot(e){"@babel/helpers - typeof";return Ot=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},Ot(e)}function kt(e,t){if(Ot(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Ot(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function At(e){var t=kt(e,`string`);return Ot(t)==`symbol`?t:t+``}function I(e,t,n){return(t=At(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jt=2,Mt=`wui-filter-popover-pinned`,Nt=`.wui-filter-popover-trigger`,Pt=`.wui-filter-popover-panel`,Ft=`.wui-filter-popover-head`,It=`input:not([type]),input[type="text"],input[type="search"]`,Lt=`a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1'])`;function Rt(){try{return sessionStorage.getItem(Mt)===`1`}catch{return!1}}function zt(e){try{e?sessionStorage.setItem(Mt,`1`):sessionStorage.removeItem(Mt)}catch(e){if(!(e instanceof DOMException))throw e}}function Bt(e){if(e===null||e instanceof Node)return e;throw TypeError(`event target is not a node`)}function Vt(e,t){let n=e?.querySelector(t)??null;return n instanceof HTMLElement?n:null}var Ht=class extends s{constructor(){super(),I(this,`_doc`,void 0),I(this,`_timer`,void 0),I(this,`_sticky`,void 0),I(this,`_closingByCode`,void 0),I(this,`_inside`,void 0),I(this,`_pendingSubmit`,void 0),I(this,`_onEnter`,void 0),I(this,`_onLeave`,void 0),I(this,`_onClick`,void 0),I(this,`_onChange`,void 0),I(this,`_onListClose`,void 0),I(this,`_onFocusOut`,void 0),I(this,`_onKeyDown`,void 0),I(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(Bt(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){zt(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(Bt(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(It))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&&Et(e,{f:()=>this._open(!0,!0)})}}get isOpen(){let e=this._panel;return e?je(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),Rt()&&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 Vt(this,Nt)}get _panel(){return Vt(this,Pt)}get _pin(){let e=this.querySelector(`${Ft} 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&&(Vt(n.querySelector(`.wui-filter-popover-grid`),Lt)??Vt(n,Lt))?.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{Ae(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 Ut(){i(`wui-filter-popover`,Ht)}var Wt=class extends s{static get observedAttributes(){return[`open`,`static`,`no-escape`]}constructor(){super(),I(this,`_doc`,void 0),I(this,`_release`,void 0),I(this,`_opener`,void 0),I(this,`_returnTo`,void 0),I(this,`_session`,void 0),I(this,`_closing`,void 0),I(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,Le(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}},Gt=n({avatarNode:()=>qt,safeImageUrl:()=>Kt}),Kt=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 qt(e,t=`wui-opt-avatar`){let n=Kt(e.avatar);return!n&&!e.initials?null:N(`span`,{class:`avatar ${t}`,"aria-hidden":`true`},N(`span`,{class:`avatar-face`},e.initials??``),n?N(`img`,{class:`avatar-img`,src:n,alt:``}):null)}var Jt=n({devError:()=>L,devWarn:()=>Yt});function Yt(e,...t){console.warn(e,...t)}function L(e,...t){console.error(e,...t)}var Xt=n({BUSY_CLASS:()=>Zt,isInert:()=>$t,isReadOnly:()=>Qt,syncFieldState:()=>en}),Zt=`wui-field-busy`,Qt=e=>e.hasAttribute(`readonly`),$t=e=>e.hasAttribute(`disabled`)||e.hasAttribute(`readonly`)||e.hasAttribute(`loading`);function en(e,t){let n=e.hasAttribute(`loading`);n?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`),t&&(t.classList.toggle(Zt,n),Qt(e)?t.setAttribute(`aria-readonly`,`true`):t.removeAttribute(`aria-readonly`))}var tn=n({syncFormMirror:()=>on,syncFormMirrors:()=>sn}),nn=`data-wui-mirror`;function rn(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 an(e){let t=document.createElement(`input`);return t.type=`hidden`,t.setAttribute(nn,``),e.appendChild(t),t}function on(e,t){let n=e.getAttribute(`name`)??``,r=e.querySelector(`:scope > input[${nn}]`),i=r instanceof HTMLInputElement?r:null;n?(i||=an(e),rn(e,i,n,t)):i?.remove()}function sn(e,t){let n=e.getAttribute(`name`)??``,r=[...e.querySelectorAll(`:scope > input[${nn}]`)].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)=>{rn(e,r[i]??an(e),n,t)})}var cn=n({hasOwn:()=>ln}),ln=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0,un=Object.freeze({carousel:{entries:[`elements/carousel.ts`],tags:[`wui-carousel`]},"data-table":{entries:[`elements/data-table.ts`],tags:[`wui-data-table`]},dock:{entries:[`elements/dock.ts`],tags:[`wui-dock`]},"hover-card":{entries:[`elements/hover-card.ts`],tags:[`wui-hover-card`]},"navigation-menu":{entries:[`elements/navigation-menu.ts`],tags:[`wui-navigation-menu`]},"notification-center":{entries:[`elements/notification-center.ts`],tags:[`wui-notification-center`]},"onboarding-checklist":{entries:[`elements/onboarding-checklist.ts`],tags:[`wui-onboarding-checklist`]},otp:{entries:[`elements/otp.ts`],tags:[`wui-otp`]},overflow:{entries:[`elements/overflow.ts`],tags:[`wui-overflow`]},rating:{entries:[`elements/rating.ts`],tags:[`wui-rating`]},"record-pager":{entries:[`elements/record-pager.ts`],tags:[`wui-record-pager`]},"relative-time":{entries:[`elements/relative-time.ts`],tags:[`wui-relative-time`]},shortcuts:{entries:[`elements/shortcuts.ts`],tags:[`wui-shortcuts`]},"show-more":{entries:[`elements/show-more.ts`],tags:[`wui-show-more`]},truncate:{entries:[`elements/truncate.ts`],tags:[`wui-truncate`]},"whats-new":{entries:[`elements/whats-new.ts`],tags:[`wui-whats-new`]},"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`,notificationCentreText:`text/web/notificationCentre.g.ts`,notificationDays:`notificationDays.ts`,optionLabel:`optionLabel.ts`,partRegistry:`select/partRegistry.ts`,relativeTime:`relativeTime.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`,shortcutKeys:`shortcutKeys.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 dn=`ui-elements/`;function fn(e){let t=un[e];if(t===void 0)throw Error(`[webority-ui] No on-demand element chunk is named ${e}.`);return t}function pn(e){let t=fn(e);if(!t.selfContained)return`${dn+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 mn=n({CHUNK_DIR:()=>dn,CHUNK_RETRY_MS:()=>_n,ELEMENTS_DEFINED_EVENT:()=>hn,ELEMENTS_LOAD_ERROR_EVENT:()=>gn,assetUrl:()=>An,loadChunk:()=>jn,startElementLoader:()=>Dn,stopElementLoader:()=>On,whenElementsReady:()=>kn}),hn=`wui-elements:defined`,gn=`wui-elements:load-error`,_n=1e3,vn={"ui-elements/carousel.global.js":`b468567dac5c`,"ui-elements/data-table.global.js":`744a24853d32`,"ui-elements/dock.global.js":`abf046fe2f9c`,"ui-elements/hover-card.global.js":`1d0170f1d649`,"ui-elements/navigation-menu.global.js":`646387262df3`,"ui-elements/notification-center.global.js":`92dc54c27dbf`,"ui-elements/onboarding-checklist.global.js":`e08749cced9c`,"ui-elements/otp.global.js":`246c737bdd7c`,"ui-elements/overflow.global.js":`af78630aeee7`,"ui-elements/rating.global.js":`328ea2c49742`,"ui-elements/record-pager.global.js":`8a68a34711a9`,"ui-elements/relative-time.global.js":`cc51b7abdbdb`,"ui-elements/shortcuts.global.js":`ff0b461e0106`,"ui-elements/show-more.global.js":`04161fb519f7`,"ui-elements/truncate.global.js":`584edd53f5f1`,"ui-elements/whats-new.global.js":`d25f93d2b074`,"ui-elements/code-block.global.js":`0ebe3e6a46f4`,"ui-elements/command-palette.global.js":`311c4b8b68b1`,"ui-elements/comment-thread.global.js":`8332b21a51a1`,"ui-elements/consent-banner.global.js":`791a3ac74ab4`,"ui-elements/context-menu.global.js":`6cab2123c9f6`,"ui-elements/date-range.global.js":`77d47771dd1a`,"ui-elements/date-time.global.js":`53598cbd113a`,"ui-elements/datepicker.global.js":`527d6d0f51f8`,"ui-elements/drawer.global.js":`0f634fcdc53c`,"ui-elements/dropdown.global.js":`70270e83c693`,"ui-elements/entry-grid.global.js":`a1012250b78b`,"ui-elements/gantt.global.js":`8b8a08d9b391`,"ui-elements/image-crop.global.js":`0e028e2eae97`,"ui-elements/inline-edit.global.js":`509458b2fa4c`,"ui-elements/kanban.global.js":`ee0267afb01f`,"ui-elements/lead-popup.global.js":`8dd9b52b3b6a`,"ui-elements/lightbox.global.js":`bfb2353d96f6`,"ui-elements/org-tree.global.js":`18072b7fc80b`,"ui-elements/markdown.global.js":`92b36687d506`,"ui-elements/phone.global.js":`c77847bbd891`,"ui-elements/popover.global.js":`501a80f86757`,"ui-elements/saved-views.global.js":`e4d4bde98f1c`,"ui-elements/glyphs.global.js":`543b79d3f2ca`,"ui-elements/select-chips.global.js":`0f4e87def55c`,"ui-elements/select-recents.global.js":`f5a227882b3b`,"ui-elements/select-search.global.js":`2e634fbe36e2`,"ui-elements/select-window.global.js":`271aa6660175`,"ui-elements/table-export.global.js":`9b3fc2ed7acc`,"ui-elements/slider.global.js":`59c61b758b8f`,"ui-elements/sortable.global.js":`ebf8dfdb513b`,"ui-elements/status-icon.global.js":`76e65587bffc`,"ui-elements/timepicker.global.js":`a17e3bfe3cd9`,"ui-elements/tour.global.js":`ba7d9b40acaa`,"ui-elements/tree.global.js":`1f9ca595d457`,"ui-elements/tree-picker.global.js":`071cfcc090a3`,"ui-elements/wizard.global.js":`d1d2f45d175d`,"ui-chart.global.js":`ae075db49126`,"ui-calendar.global.js":`edf120b16ad1`,"ui-rich-text.global.js":`64dcebd2efc3`,"ui-file-viewer.global.js":`b149510952e6`,"ui-phone.global.js":`c646775bc1d1`},yn=new Map;for(let[e,t]of Object.entries(un))for(let n of t.tags)yn.set(n,e);var bn=[...yn.keys()].join(`,`),xn=null,Sn=``,Cn=!1,wn=null,Tn=new Map;function En(){let e=document.currentScript;return e instanceof HTMLScriptElement?e:null}function Dn(e=En()){Cn||(Cn=!0,xn=e?.src?e.src:null,Sn=e?.nonce||``,Fn(document),wn=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&Fn(e)}),wn.observe(document.documentElement,{childList:!0,subtree:!0}))}function On(){wn?.disconnect(),wn=null,Cn=!1,xn=null,Sn=``,Tn.clear()}function kn(e=document){return Promise.all([...Pn(e)].map(e=>jn(e))).then(()=>void 0)}function An(e){if(xn===null)throw Error(`The on-demand element files have no address to load from.`);let t=new URL(e,xn);return t.search=ln(vn,e)?`?v=${vn[e]}`:``,t.href}function jn(e){let t=Tn.get(e)?.promise??null;if(t!==null)return t;let n=fn(e),{tags:r}=n,i=pn(e),a=()=>Promise.all(r.map(e=>customElements.whenDefined(e))),o={status:`loading`,promise:null},s=new Promise((t,s)=>{let c=``,l=()=>{wn&&Object.keys(un).every(e=>Tn.get(e)?.status===`loaded`||Tn.get(e)?.status===`failed`)&&wn.disconnect()},u=()=>{o.status=`loaded`,l(),document.dispatchEvent(new CustomEvent(hn,{detail:{chunk:e,tags:r}})),t()},d=t=>{o.status=`failed`,l(),L(`[webority-ui] Could not load ${c} for ${r.length?r.join(`, `):e}.${t?` ${t.message}`:``}`),document.dispatchEvent(new CustomEvent(gn,{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,Sn&&(i.nonce=Sn),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),_n)}),document.head.append(i)};if([...document.scripts].some(e=>new URL(e.src,location.href).pathname.endsWith(`/${i}`)))a().then(u);else{try{c=An(i)}catch(e){d(e instanceof Error?e:void 0);return}f(c,!1)}});return o.promise=s,Tn.set(e,o),s}function Mn(e){return yn.has(e.localName)&&!customElements.get(e.localName)}function Nn(e,t){let n=yn.get(t.localName);n!==void 0&&Mn(t)&&e.add(n)}function Pn(e){let t=new Set;e instanceof Element&&Nn(t,e);for(let n of e.querySelectorAll(bn))Nn(t,n);return t}function Fn(e){for(let t of Pn(e))Promise.allSettled([jn(t)])}var In={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`}]]},Ln=n({svgNodes:()=>zn,svgRoot:()=>Bn}),Rn=`http://www.w3.org/2000/svg`;function zn(e){return e.map(Vn)}function Bn(e,t){let n=document.createElementNS(Rn,`svg`);return Hn(n,e),n.append(...zn(t)),n}function Vn(e){let[t,n,r]=e,i=document.createElementNS(Rn,t);return Hn(i,n),typeof r==`string`?i.append(document.createTextNode(r)):r&&i.append(...zn(r)),i}function Hn(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 Un=n({GLYPH_CHUNK:()=>Wn,GLYPH_PENDING_ATTRIBUTE:()=>Gn,glyphNode:()=>R,registerGlyphs:()=>tr}),Wn=`glyphs`,Gn=`data-wui-glyph-pending`,Kn=`svg[${Gn}]`,qn=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,Jn={...In},Yn=new Map,Xn=!1,Zn=null;function Qn(e){return ln(Jn,e)?Jn[e]:void 0}function $n(e,t,n,r){return{class:n?`wui-icon ${n}`:`wui-icon`,"data-icon":e,[Gn]:r?!0:void 0,width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`}}function R(e,{size:t=16,className:n=``}={}){let r=Qn(e);if(r!==void 0){let i=`${e}|${t}|${n}`,a=Yn.get(i);return a===void 0&&(a=Bn($n(e,t,n,!1),r),Yn.set(i,a)),ze(a.cloneNode(!0),SVGSVGElement,`glyphNode: ${e} did not clone to an svg`)}return Xn||!qn.test(e)?null:(Promise.allSettled([jn(Wn)]),Bn($n(e,t,n,!0),[]))}function er(e){let t=e instanceof Element&&e.matches(Kn)?[e]:[];for(let n of[...t,...e.querySelectorAll(Kn)]){let e=Qn(n.getAttribute(`data-icon`)??``);e===void 0?n.remove():(n.removeAttribute(Gn),n.replaceChildren(...zn(e)))}}function tr(e){Object.assign(Jn,e),Xn=!0,er(document),Zn===null&&(Zn=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&er(e)}),Zn.observe(document.documentElement,{childList:!0,subtree:!0}))}var nr=n({isImeComposing:()=>rr,isImeSafeEnter:()=>ir});function rr(e){return e.isComposing||e.keyCode===229}function ir(e){return e.key===`Enter`&&!rr(e)}var ar=n({createListboxKeyNav:()=>sr,moveActiveRow:()=>cr}),or=e=>e.target instanceof Element?e.target.tagName:void 0;function sr(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=or(e)===`INPUT`||or(e)===`TEXTAREA`;if(e.key===`ArrowDown`)e.preventDefault(),r(Math.min(_+1,h-1));else if(e.key===`ArrowUp`)e.preventDefault(),r(Math.max(_-1,0));else if(e.key===`Home`&&!v)e.preventDefault(),h&&r(0);else if(e.key===`End`&&!v)e.preventDefault(),h&&r(h-1);else if(e.key===`PageDown`&&!v){if(e.preventDefault(),!h)return;r(Math.min(Math.max(0,_)+8,h-1))}else if(e.key===`PageUp`&&!v){if(e.preventDefault(),!h)return;r(Math.max(Math.max(0,_)-8,0))}else if(ir(e))i&&(e.preventDefault(),i(l?l(_):m[_],g()));else if(e.key===`Escape`)a&&a(e);else if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&or(e)!==`INPUT`&&or(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 cr(e,t){let n=e.querySelector(`.is-active`);n!==t&&(n?.classList.remove(`is-active`),t?.classList.add(`is-active`))}var lr=n({TRUSTED_LABEL:()=>ur,optionLabelNodes:()=>gr,optionText:()=>_r,stripTags:()=>pr,withTrustedLabel:()=>dr}),ur=Symbol(`wui.trustedLabel`),dr=(e,t)=>{let n=document.createDocumentFragment();return n.append(t.cloneNode(!0)),{...e,[ur]:n}},fr=e=>`wui-flag wui-flag-${e}`,pr=e=>String(e??``).replace(/<[^>]*>/g,``),mr=e=>{if(!e)return null;let t=String(e).toLowerCase().replace(/[^a-z0-9-]/g,``);return t?R(t):null},hr=e=>{let t=String(e??``).toLowerCase();return/^[a-z]{2}$/.test(t)?N(`span`,{class:fr(t),"aria-hidden":`true`}):null};function gr(e){if(e==null)return[];let t=hr(e.flag),n=mr(e.icon),r=e[ur],i=r?[...r.cloneNode(!0).childNodes]:[document.createTextNode(String(e.label??``))];return!t&&!n?i:[N(`span`,{class:`wui-opt-label`},t,n,...i)]}var _r=e=>{if(e==null)return``;let t=e[ur];return t?t.textContent??``:pr(e.label)},vr=n({SELECT_TEXT:()=>yr}),yr={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…`},br=n({clearOptions:()=>Dr,drawn:()=>Cr,filterOptions:()=>Sr,nodesSignature:()=>Tr,optionRow:()=>Fr,posAttrMap:()=>wr,refreshWindow:()=>jr,registerWindowImpl:()=>Er,renderOptions:()=>Or,revealRow:()=>Mr,rowId:()=>kr,rowIndexByPrefix:()=>Pr,rowIndexOfValue:()=>Nr}),xr=()=>P(`select`,yr);function Sr(e,t){let n=String(t??``).trim().toLowerCase();return n?e.filter(e=>[_r(e),e.description,e.meta].some(e=>String(e??``).toLowerCase().includes(n))):e}var Cr=new WeakMap,wr=e=>e?{"data-index":String(e.index),"aria-setsize":String(e.size),"aria-posinset":String(e.index+1)}:{},Tr=e=>e.map(e=>e instanceof Element?e.outerHTML:e.textContent??``).join(``),z;function Er(e){z=e}function Dr(e){z?.clear(e),Cr.delete(e),e.replaceChildren()}function Or(e,t,n={}){let{selected:r=[],query:i=``,status:a=`idle`,emptyText:o=xr().emptyText,searchingText:s=xr().searchingText,hintText:c=xr().hintText,actionRow:l=[],recents:u=null}=n,d=new Set(r.map(String)),f=Sr(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=z,b=v&&y!==void 0,x=e=>b?{index:e,size:_}:void 0,S=0,C=e=>{let t=S++;return N(`button`,{type:`button`,role:`option`,id:kr(p,t),class:`wui-select-option wui-select-add`,"data-value":String(e.value??``),"data-custom":`true`,"aria-selected":`false`,...wr(x(t))},e.label)},w=e=>{let t=S++;return Fr(e,kr(p,t),d.has(String(e.value)),x(t))},T=m.map(C),E=g.length&&u?[N(`div`,{class:`wui-select-group`},u.label),...g.map(w),N(`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(N(`div`,{class:`wui-select-group`},t.group)),e=t.group??``,D.push(w(t))}let O=h.map(C),k=[];if(a===`loading`?k=[N(`div`,{class:`wui-select-loading`},N(`span`,{class:`wui-select-spinner spinner-border spinner-border-sm`,role:`status`,"aria-hidden":`true`}),s)]:a===`hint`?k=[N(`div`,{class:`wui-select-hint`},c)]:(a===`empty`||f.length===0&&l.length===0)&&(k=[N(`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:Tr(n),postSig:Tr(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=Tr(te);return Cr.get(e)===ne||(Cr.set(e,ne),e.replaceChildren(...te)),{rows:S,windowed:!1,long:v}}var kr=(e,t)=>`${e}-opt-${t}`,Ar=e=>[...e.querySelectorAll(`.wui-select-option`)];function jr(e){return z?z.refresh(e):!1}function Mr(e,t){return z?z.reveal(e,t):Ar(e)[t]??null}function Nr(e,t){if(z)return z.indexOfValue(e,t);let n=new Set(t.map(String));return Ar(e).findIndex(e=>n.has(e.dataset.value??``))}function Pr(e,t){return z?z.indexByPrefix(e,t):Ar(e).findIndex(e=>(e.textContent??``).trim().toLowerCase().startsWith(t))}function Fr(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,...wr(r)},o=N(`span`,{class:`wui-select-check`,"aria-hidden":`true`},R(`check`));if(!e.description&&!e.meta)return N(`button`,{type:`button`,class:`wui-select-option${n?` selected`:``}`,...a},qt(e),N(`span`,{class:`wui-select-opt-name`},...gr(e)),o);let s=e.description?N(`span`,{class:`wui-select-opt-desc`},e.description):null,c=e.meta?N(`span`,{class:`wui-select-opt-meta`},e.meta):null;return N(`div`,{class:`wui-select-option wui-select-option-rich${n?` selected`:``}`,...a},qt(e),N(`span`,{class:`wui-select-option-text`},N(`span`,{class:`wui-opt-label`},...gr(e)),s),c,o)}var Ir=Object.freeze([`single`,`multiple`,`search`,`tag`,`country`]),B=e=>e===`multiple`||e===`tag`,Lr=n({registerSelectPart:()=>zr,selectPart:()=>Br}),Rr=new Map;function zr(e,t){Rr.set(e,t)}function Br(e){return Rr.get(e)}var Vr={chips:`select-chips`,search:`select-search`,country:`phone`,recents:`select-recents`};function Hr(e){let t=ln(Vr,e)?Vr[e]:void 0;if(!t)return Promise.reject(Error(`Unknown <wui-select> part: ${e}.`));let n=Br(e);return n?Promise.resolve(n):jn(t).then(()=>j(Br(e),`The ${e} part of <wui-select> did not register.`))}var Ur=n({searchesRemotely:()=>Wr}),Wr=e=>typeof e.loadOptions==`function`||!!e.getAttribute(`source`)||e.hasAttribute(`remote`),Gr=()=>jn(`select-window`),Kr={requiredFieldMessage:`Please fill in this field.`},qr={clearLabel:`Clear search`,placeholder:`Search…`,searchLabel:`Search`},Jr=n({WuiSelect:()=>Qr}),Yr=()=>P(`select`,yr),Xr=()=>P(`search`,qr),Zr=()=>P(`field`,Kr),Qr=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(),I(this,`_internals`,void 0),I(this,`_value`,void 0),I(this,`_optionsProp`,void 0),I(this,`_partOptions`,void 0),I(this,`_known`,void 0),I(this,`_loadOptionsFn`,void 0),I(this,`_validateFn`,void 0),I(this,`_declared`,void 0),I(this,`_query`,void 0),I(this,`_ownsFilter`,void 0),I(this,`_active`,void 0),I(this,`_rows`,void 0),I(this,`_windowed`,void 0),I(this,`_windowLoad`,void 0),I(this,`_windowFailed`,void 0),I(this,`_scrollFrame`,void 0),I(this,`_status`,void 0),I(this,`_error`,void 0),I(this,`_nav`,void 0),I(this,`_parts`,void 0),I(this,`_partSig`,void 0),I(this,`_partsMounted`,void 0),I(this,`_partToken`,void 0),I(this,`_rendered`,void 0),I(this,`_searchShown`,void 0),I(this,`_defaultValue`,void 0),I(this,`_warnedMode`,void 0),I(this,`_warnedDensity`,void 0),I(this,`_hoverTimer`,void 0),I(this,`_hoverOpened`,void 0),I(this,`_onHoverOver`,void 0),I(this,`_onHoverOut`,void 0),I(this,`_panelShown`,void 0),I(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)},ni)))},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()},ri)))}}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=li(n,B(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=li(this._value,B(this.mode)),this._partOptions=null,this._known.clear(),this._ensureParts()),(e===`source`||e===`remote`||e===`recents-key`)&&this._ensureParts(),si.has(e)?this._rendered&&(this._drawValue(),this.renderList()):oi.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`:ei(e)?e:(e!==this._warnedMode&&(this._warnedMode=e,Yt(`<wui-select> mode "${e}" is not one of ${Ir.join(`, `)}; it is treated as "single".`)),`single`)}_checkDensity(){let e=this.getAttribute(`density`);e===null||ti.includes(e)||e===this._warnedDensity||(this._warnedDensity=e,Yt(`<wui-select> density "${e}" is not one of ${ti.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=li(e,B(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(){$t(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=Sr(this._listOptions(),t).length+n.length+(r?.options.length??0),this._windowed=!1,Dr(e.list),this._anchorMenu();return}let i=Or(e.list,this._listOptions(),{selected:this._selectedValues(),query:t,status:this._status,emptyText:this.getAttribute(`empty-text`)||Yr().emptyText,searchingText:this.getAttribute(`searching-text`)||Yr().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=B(t),r=t===`tag`,i=n&&(r||this.hasAttribute(`allow-custom`));this._value=li(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=li(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?N(`div`,{class:`input wui-select-control wui-select-multi`,...v,...y,"aria-disabled":u?`true`:void 0,tabindex:!u&&!r?`0`:void 0}):N(`button`,{type:`button`,class:`input wui-select-control`,...v,...y,disabled:u||void 0}),x=[s?R(s,{className:`wui-select-icon`}):null,c?N(`span`,{class:`wui-select-prefix`},c):null,N(`span`,{class:`wui-select-value`,"data-label":!0}),l?N(`span`,{class:`wui-select-reset`,role:`button`,"aria-label":Yr().clearSelectionLabel,hidden:!0},R(`x`)):null,R(`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`?Yr().countrySearchPlaceholder:Xr().placeholder),E=N(`div`,{class:`wui-select-menu wui-select-menu-fixed`,popover:`auto`},w?N(`div`,{class:`wui-select-search`},R(`search`),N(`input`,{class:`wui-select-input`,placeholder:T,"aria-label":T,"aria-autocomplete":`list`}),N(`button`,{type:`button`,class:`wui-select-clear`,"aria-label":Xr().clearLabel,hidden:!0},R(`x`))):null,N(`div`,{class:`wui-select-options`,role:`listbox`,id:d,tabindex:`-1`,"aria-multiselectable":n?`true`:void 0})),ee=N(`div`,{class:`field-error wui-select-error`,id:f,"aria-live":`polite`,hidden:!this._error||void 0},this._error||null);this.replaceChildren(N(`div`,{class:`wui-select${o}`},b,E),ee),this._rendered=!0,this._syncMirror(),this._syncValidity(),this._drawValue(),this._syncReset(),this.renderList(),this._wire(),en(this,this.querySelector(`.wui-select-control`)),this._mountParts(e)}_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||Yr().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`)??hi(e).trim(),label:t.textContent??``,selected:e.hasAttribute(`selected`)};for(let[t,r]of ci){let i=e.getAttribute(t);i&&(n[r]=i)}return e.hasAttribute(`disabled`)&&(n.disabled=!0),dr(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`)||ai()[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(){B(this.mode)?sn(this,this._selectedValues()):on(this,this._value)}_drawValue(){let e=this._refs();if(!e.value)return;let t=B(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?gr(n):r?[r]:[])}_syncTitle(e){let t=this.querySelector(`.wui-select-control`);if(!t)return;let n=e&&!this.hasAttribute(`title`)?_r(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=!B(this.mode)&&this._hasValue()?qt({avatar:this.getAttribute(`value-avatar`),initials:this.getAttribute(`value-initials`)},`avatar-xs`):null;e.classList.toggle(`wui-has-value-avatar`,!!t),t&&e.prepend(N(`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},Zr().requiredFieldMessage,t instanceof HTMLElement?t:void 0)}else e.setValidity({})}}_syncReset(){let e=V(this,`.wui-select-reset`,HTMLElement);e&&(e.hidden=!(this.hasAttribute(`clearable`)&&this._hasValue()&&!$t(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=V(this,`.wui-select-error`,HTMLElement);e&&(e.textContent=this._error,e.hidden=!this._error),this._syncInvalid()}_refs(){return{control:V(this,`.wui-select-control`,HTMLElement),value:V(this,`.wui-select-value`,HTMLElement),menu:V(this,`.wui-select-menu`,HTMLElement),list:V(this,`.wui-select-options`,HTMLElement),search:V(this,`.wui-select-search input`,HTMLInputElement),input:V(this,`.wui-select-draft`,HTMLInputElement)}}_menuOpen(){let e=V(this,`.wui-select-menu`,HTMLElement);return e!==null&&je(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`)||$t(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>ii}_visible(){let e=this._refs();return e.list?mi(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?Mr(n.list,e):null)),cr(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&&jr(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=V(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?Nr(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);je(t.menu)&&Ae(t.menu),this._onPanelClosed(),n&&t.control.focus()}_onQueryChange(e){this._query=e,this._setActive(-1);let t=V(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:hi(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);B(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`&&Wr(this)}_onKeyDown(e){if(!$t(this)){for(let t of this._activePartsList())if(t.onKey?.(e)===!0)return;if(!this._menuOpen()){if(e.target instanceof HTMLInputElement){if(e.key!==`ArrowDown`||!this._draftOpens())return;this._open({focus:!1})}else{(e.key===`ArrowDown`||ir(e)||e.key===` `)&&(e.preventDefault(),this._open({focus:!0}));return}}j(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=j(V(this,`.wui-select`,HTMLElement),`The select wrapper is missing.`),i=V(this,`.wui-select-search .wui-select-clear`,HTMLElement),a=V(this,`.wui-select-reset`,HTMLElement);this._nav=sr({getVisibleOptions:()=>this._visible(),getActive:()=>this._active,setActive:e=>this._setActive(e),getCount:()=>this._rowCount(),getOptionAt:e=>this._rowEl(e),findByPrefix:e=>this._windowed?Pr(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()&&!$t(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=j(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($t(this))return;this._refs().input?.focus(),!this._menuOpen()&&this._draftOpens()&&this._open({focus:!1});return}if(e.target instanceof HTMLInputElement){!this._menuOpen()&&!$t(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():$t(this)||this._open({focus:!0})}),a?.addEventListener(`click`,e=>{e.stopPropagation(),this.commit(B(this.mode)?[]:``),this._close(),t.focus()}),n.addEventListener(`click`,n=>{let r=pi(n).closest(`.wui-select-option`);if(r instanceof HTMLElement&&(this._pick(r),B(this.mode))){let n=this.querySelector(`.wui-select-draft`);(e.search??(n instanceof HTMLElement?n:t)).focus()}}),n.addEventListener(`mousedown`,e=>{B(this.mode)&&e.target instanceof Element&&e.target.closest(`.wui-select-option`)&&e.preventDefault()}),n.addEventListener(`mousemove`,e=>{let t=pi(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=V(this,`.wui-select-menu`,HTMLElement);e&&Ae(e)}_activePartsList(){return this._partsMounted?j(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=di(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=>gi(this,e))).then(e=>{n===this._partToken&&(this._parts=e.filter(e=>e!==null),this._mountParts())})}_loadWindow(){this._windowLoad===null&&(this._windowLoad=Gr().then(()=>this.renderList(),()=>{this._windowFailed=!0,document.dispatchEvent(new CustomEvent(gn,{bubbles:!0,composed:!0,detail:{chunk:`select-window`}})),this.setError(Yr().partLoadMessage)}))}_mountParts(e={draft:``,query:``}){if(!this._parts||this._partsMounted||!this._rendered||!this.isConnected)return;this._partsMounted=!0;let t=$r(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??``}}};I(Qr,`formAssociated`,!0);var $r=e=>{let{control:t,value:n,menu:r,list:i}=e;return{control:j(t,`control missing`),value:j(n,`value missing`),menu:j(r,`menu missing`),list:j(i,`list missing`),search:e.search,input:e.input}},ei=e=>Ir.includes(e),ti=[`comfortable`,`compact`],ni=150,ri=250,ii=10,ai=()=>{let e=Yr();return{single:e.placeholder,search:e.placeholder,multiple:e.placeholder,tag:e.tagPlaceholder,country:e.countryPlaceholder}},oi=new Set([`countries`,`suggested`,`suggested-label`,`all-countries-label`,`max-tags`,`pattern`,`collapse-chips`,`source`,`remote`,`min-chars`]),si=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`]),ci=[[`icon`,`icon`],[`description`,`description`],[`meta`,`meta`],[`group`,`group`],[`avatar`,`avatar`],[`initials`,`initials`],[`disabled-hint`,`disabledHint`]],li=(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),ui=(e,t)=>t===`multiple`?Wr(e)?[`chips`,`search`]:[`chips`]:t===`search`?[`search`]:t===`country`?[`country`]:t===`tag`?Wr(e)?[`chips`,`search`]:[`chips`]:[],di=(e,t)=>e.hasAttribute(`recents-key`)?[`recents`,...ui(e,t)]:ui(e,t),fi=e=>typeof e==`object`&&!!e&&`default`in e&&typeof e.default==`function`,pi=e=>{if(e.target instanceof Element)return e.target;throw Error(`The event target is not an element.`)},V=(e,t,n)=>{let r=e.querySelector(t);return r instanceof n?r:null},mi=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),hi=e=>{let t=e.textContent;if(t===null)throw Error(`The element has no text.`);return t},gi=(e,t)=>Hr(t).then(e=>{if(!fi(e))throw Error(`The part ${t} has no default export.`);return e.default()}).catch(()=>(document.dispatchEvent(new CustomEvent(gn,{bubbles:!0,composed:!0,detail:{chunk:t}})),e.setError(Yr().partLoadMessage),null)),_i=n({APP_BUTTON_MARKER:()=>vi,buttonClass:()=>Si}),vi=`AppButton`,yi=new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),bi={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 xi(e){return ln(bi,e)}function Si(e=`primary`,t=`solid`,n=`md`){if(!yi.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!xi(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=bi[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}var Ci=`INR`,wi=Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`,JPY:`¥`}),Ti=e=>typeof e==`string`&&/^[A-Z]{3}$/.test(e),Ei=(e=`INR`)=>wi[e]??`${e} `,Di={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`},Oi=n({IST_OFFSET_MS:()=>ki,IST_TIME_ZONE:()=>H,isTimeZone:()=>Mi,nowIn:()=>zi,todayIn:()=>Ri,wallClockOf:()=>Li,wallToInstant:()=>Fi,zoneOffsetMs:()=>Pi,zoneParts:()=>Ni}),H=`Asia/Kolkata`,ki=198e5,Ai=new Map;function ji(e){let t=Ai.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`}),Ai.set(e,t)),t}function Mi(e){if(typeof e!=`string`||e===``)return!1;try{return ji(e),!0}catch{return!1}}function Ni(e,t=H){if(t===`Asia/Kolkata`){let t=new Date(e+ki);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}let n=Object.fromEntries(ji(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 Pi(e,t=H){if(t===`Asia/Kolkata`)return ki;let n=Ni(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 Fi(e,t=H){let n=e-Pi(e,t);return n=e-Pi(n,t),n}var Ii=e=>e instanceof Date?e.getTime():e;function Li(e,t=H){return new Date(e+Pi(e,t)).toISOString().slice(0,19)}function Ri(e=H,t=Date.now()){return Li(Ii(t),e).slice(0,10)}function zi(e=H,t=Date.now()){let n=Ii(t);return new Date(n+Pi(n,e))}var Bi=n({CURRENCIES:()=>Hi,DATE_PATTERNS:()=>Gi,DURATION_UNITS:()=>Wi,FORMAT_STYLES:()=>Vi,IST_OFFSET_MS:()=>ki,IST_TIME_ZONE:()=>H,MAX_DECIMALS:()=>20,MONEY_UNITS:()=>Ui,compactFormatOf:()=>ka,emptyValueLabel:()=>U,formatCompact:()=>ba,formatCurrency:()=>va,formatDate:()=>Ea,formatDateTime:()=>Aa,formatDayShort:()=>Da,formatDuration:()=>Ca,formatNumber:()=>_a,formatPercent:()=>xa,formatValue:()=>Oa,isMoneyUnit:()=>Ki,istParts:()=>Ta,monthLabel:()=>$i,monthLongLabel:()=>ea,paiseToRupeeText:()=>pa,timeZoneLabel:()=>Na,toInstant:()=>wa,weekdayLabel:()=>ta}),Vi=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],Hi=[`INR`,`USD`,`EUR`,`GBP`],Ui=[`rupees`,`paise`],Wi=[`ms`,`s`,`min`,`h`],Gi=[`day`,`month`,`year`,`datetime`,`time`];function Ki(e){return Ui.some(t=>t===e)}var qi=()=>P(`formatters`,Di),U=()=>qi().emptyValueLabel,Ji=`−`,Yi=[`janShortLabel`,`febShortLabel`,`marShortLabel`,`aprShortLabel`,`mayShortLabel`,`junShortLabel`,`julShortLabel`,`augShortLabel`,`sepShortLabel`,`octShortLabel`,`novShortLabel`,`decShortLabel`],Xi=[`januaryLabel`,`februaryLabel`,`marchLabel`,`aprilLabel`,`mayLabel`,`juneLabel`,`julyLabel`,`augustLabel`,`septemberLabel`,`octoberLabel`,`novemberLabel`,`decemberLabel`],Zi={short:[`sunShortLabel`,`monShortLabel`,`tueShortLabel`,`wedShortLabel`,`thuShortLabel`,`friShortLabel`,`satShortLabel`],long:[`sundayLabel`,`mondayLabel`,`tuesdayLabel`,`wednesdayLabel`,`thursdayLabel`,`fridayLabel`,`saturdayLabel`],min:[`sunMinLabel`,`monMinLabel`,`tueMinLabel`,`wedMinLabel`,`thuMinLabel`,`friMinLabel`,`satMinLabel`]},Qi=(e,t)=>qi()[j(e[t],`no date name at index ${t}`)],$i=e=>Qi(Yi,e),ea=e=>Qi(Xi,e);function ta(e,t){return Qi(Zi[t],e)}var na=(e,t)=>j(e[t],`no compact unit at index ${t}`),ra=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],ia=[[1e9,`B`],[1e6,`M`],[1e3,`K`]],aa=e=>!e||e===`INR`?`en-IN`:`en-US`,oa=(e,t)=>typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=20?e:t,sa=new Map,ca=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=sa.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:e}),sa.set(n,r)),r},la=new Map,ua=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=la.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:e,maximumFractionDigits:e}),la.set(n,r)),r},da=e=>typeof e==`number`&&Number.isFinite(e),fa=e=>e<0&&!Object.is(Math.abs(e),0)?Ji:``;function pa(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 ma=(e,t)=>t===`paise`?Number(pa(e)):e,ha=2,ga=(e,t,n)=>{let r=Math.min(t,ha),i=10n**BigInt(ha-r),a=(BigInt(pa(e).replace(`.`,``))+i/2n)/i,o=10n**BigInt(r),s=ua(0,n).format(a/o);return t===0?s:`${s}.${(a%o).toString().padStart(r,`0`)}${`0`.repeat(t-r)}`};function _a(e,{decimals:t}={}){if(!da(e))return U();let n=ca(oa(t,2)).format(Math.abs(e));return n===`0`?`0`:fa(e)+n}function va(e,t){if(!t?.currency)throw TypeError(`[@webority/ui-elements] formatCurrency needs options.currency, an ISO 4217 code such as "INR".`);if(!da(e))return U();let{unit:n=`rupees`,decimals:r,currency:i}=t,a=oa(r,0),o=aa(i),s=n===`paise`?ga(Math.abs(e),a,o):ua(a,o).format(Math.abs(e));return(Number(s.replace(/,/g,``))===0?``:fa(e))+Ei(i)+s}var ya=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function ba(e,{currency:t,unit:n=`rupees`}={}){if(!da(e))return U();let r=t?ma(e,n):e,i=t?Ei(t):``,a=t?aa(t):`en-IN`,o=a===`en-IN`?ra:ia,s=Math.abs(r),c=o.findIndex(([e])=>s>=e);if(c===-1){let e=ca(ya(s),a).format(s);if(e!==`1,000`)return(e===`0`?``:fa(r))+i+e;c=o.length-1}let[l,u]=na(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]=na(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f))),`${fa(r)}${i}${ca(f,a).format(p)} ${u}`}function xa(e,{decimals:t}={}){return da(e)?`${_a(e*100,{decimals:oa(t,1)})}%`:U()}var Sa={ms:1,s:1e3,min:6e4,h:36e5};function Ca(e,{unit:t=`s`}={}){if(!da(e))return U();let n=Sa[t]??1e3,r=Math.abs(e*n),i=fa(e);if(Math.round(r)<1e3)return`${i}${ca(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${ca(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}${ca(0).format(l)}h ${s(c%60)}m`}function wa(e,t=H){if(e instanceof Date)return e.getTime();if(da(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?Fi(a.getTime(),t):NaN}return Date.parse(e)}function Ta(e,t=H){let{year:n,month:r,day:i,hour:a,minute:o}=Ni(e,t);return{year:n,month:r,day:i,hour:a,minute:o}}function Ea(e,{pattern:t=`day`,timeZone:n=H}={}){let r=wa(e,n);if(!Number.isFinite(r))return U();let i=Ta(r,n),a=e=>String(e).padStart(2,`0`),o=`${a(i.day)}-${$i(i.month)}-${i.year}`,s=`${a(i.hour)}:${a(i.minute)}`;switch(t){case`month`:return`${$i(i.month)}-${i.year}`;case`year`:return String(i.year);case`datetime`:return`${o} ${s}`;case`time`:return s;default:return o}}function Da(e,{timeZone:t=H}={}){let n=wa(e,t);if(!Number.isFinite(n))return U();let r=Ta(n,t);return`${String(r.day).padStart(2,`0`)}-${$i(r.month)}`}function Oa(e,t){if(e==null||e===``)return U();let n=t?.style;if(n===`date`)return Ea(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return va(e,{...t,currency:t?.currency??``});case`percent`:return xa(e,t);case`compact`:return ba(e,t);case`duration`:return Ca(e,t);default:return _a(e,t)}}function ka(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 Aa(e,{timeZone:t=H}={}){let n=wa(e);if(!Number.isFinite(n))return U();let r=Object.fromEntries(Ma(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}-${$i(Number(r.month)-1)}-${r.year}, ${r.hour}:${r.minute} ${i.toUpperCase()}`}var ja=new Map;function Ma(e){let t=ja.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}),ja.set(e,t)),t}function Na(e=H){return new Intl.DateTimeFormat(`en-IN`,{timeZone:e,timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??e}var Pa=n({DISPLAY_FORMAT:()=>Ba,MONTH_DISPLAY_FORMAT:()=>Wa,YEAR_DISPLAY_FORMAT:()=>Ja,clampMonth:()=>Za,daysIn:()=>Xa,firstWeekday:()=>Ia,fmt:()=>Va,fmtMonth:()=>Ga,fmtYear:()=>Ya,pad:()=>La,parseIso:()=>za,parseIsoMonth:()=>Ha,parseIsoYear:()=>Ka,toIso:()=>Ra,toIsoMonth:()=>Ua,toIsoYear:()=>qa}),Fa=e=>{let t=String(e??``).trim();return/^[0-6]$/.test(t)?Number(t):null},Ia=e=>Fa(e.getAttribute(`first-day`))??Fa(getComputedStyle(e).getPropertyValue(`--wui-first-day`))??1,La=e=>String(e).padStart(2,`0`),Ra=(e,t,n)=>`${e}-${La(t+1)}-${La(n)}`,za=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>Xa(a,o-1)?null:{y:a,m:o-1,d:s}},Ba=`dd-MMM-yyyy`,Va=(e,t=Ba)=>{let n=za(e);if(!n)return``;let r={yyyy:n.y,MMMM:ea(n.m),MMM:$i(n.m),MM:La(n.m+1),dd:La(n.d),d:n.d};return(t||`dd-MMM-yyyy`).replace(/yyyy|MMMM|MMM|MM|dd|d/g,e=>String(r[e]))},Ha=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}},Ua=(e,t)=>`${e}-${La(t+1)}`,Wa=`MMM yyyy`,Ga=(e,t=Wa)=>{let n=Ha(e);if(!n)return``;let r={yyyy:n.y,MMMM:ea(n.m),MMM:$i(n.m),MM:La(n.m+1)};return(t||`MMM yyyy`).replace(/yyyy|MMMM|MMM|MM/g,e=>String(r[e]))},Ka=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}},qa=e=>String(e).padStart(4,`0`),Ja=`yyyy`,Ya=(e,t=Ja)=>{let n=Ka(e);return n?(t||`yyyy`).replace(/yyyy/g,String(n.y)):``},Xa=(e,t)=>{let n=new Date(0);return n.setFullYear(e,t+1,0),n.getDate()},Za=(e,t)=>{for(;t<0;)t+=12,--e;for(;t>11;)t-=12,e+=1;return{y:e,m:t}},Qa=n({COPY_FEEDBACK_MS:()=>$a,copyTextToClipboard:()=>eo}),$a=2e3;async function eo(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 to={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.`},no=n({COLUMN_MAX_WIDTH:()=>io,COLUMN_MIN_WIDTH:()=>48,PIN_AT_VAR:()=>Eo,PIN_SIDES:()=>so,RESIZE_STEP:()=>10,RESIZE_STEP_LARGE:()=>50,ROW_HEIGHTS:()=>lo,ROW_MOVE_LIMIT:()=>200,ROW_MOVE_MS:()=>220,ROW_SAVE_ATTR:()=>zo,ROW_SAVE_ERROR_CLASS:()=>Bo,ROW_SAVE_STATES:()=>Ro,VIRTUAL_OVERSCAN:()=>8,clampColumnWidth:()=>yo,groupCount:()=>vo,groupItems:()=>bo,groupRowsText:()=>mo,identityCell:()=>Vo,measureRows:()=>Fo,notSavedText:()=>_o,pinAtValue:()=>Do,pinClasses:()=>ko,pinOffsetVar:()=>To,planPins:()=>Oo,playRowMoves:()=>Io,readColumnWidths:()=>Co,resizeName:()=>fo,rowLabel:()=>Ho,rowOrderChanged:()=>Lo,saveOutcomeText:()=>Go,savedManyText:()=>go,savedText:()=>ho,setRowSaveState:()=>Uo,settledRows:()=>Wo,virtualRange:()=>xo,widthText:()=>po,writeColumnWidths:()=>wo}),ro=48,io=1200,ao=10,oo=50,so=[`start`,`end`],co=8,lo={comfortable:72,cozy:48,compact:40},uo=()=>P(`dataTable`,to),fo=e=>e?F(uo().resizeColumnText,{label:e}):uo().resizeColumnLabel,po=e=>F(uo().resizeText,{px:e}),mo=e=>Qe(uo(),`groupRows`,e,{count:_a(e,{decimals:0})}),ho=e=>e?F(uo().savedText,{label:e}):uo().rowSavedText,go=e=>F(uo().rowsSavedText,{n:_a(e,{decimals:0})}),_o=(e,t)=>`${e?F(uo().wasNotSavedText,{label:e}):uo().rowWasNotSavedText}${t?` ${t}`:``}`,vo=e=>_a(e,{decimals:0}),yo=e=>Math.min(io,Math.max(48,Math.round(Number(e)||0)));function bo(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 xo({scrollTop:e,viewport:t,rowHeight:n,count:r,overscan:i=8}){let a=n>0?n:lo.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 So=e=>`wui-widths:${e}`;function Co(e){if(!e)return{};try{let t=JSON.parse(window.localStorage.getItem(So(e))||`{}`),n={};if(t&&typeof t==`object`)for(let[e,r]of Object.entries(t))Number.isFinite(r)&&(n[e]=yo(r));return n}catch{return{}}}function wo(e,t){if(e)try{Object.keys(t).length?window.localStorage.setItem(So(e),JSON.stringify(t)):window.localStorage.removeItem(So(e))}catch(e){if(!(e instanceof DOMException))throw e}}var To=(e,t)=>`--wui-pin-${e}-${t}`,Eo=`--wui-pin-at`,Do=(e,t)=>`var(${To(e,t)}, 0px)`;function Oo(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 ko=e=>e?`wui-pin-${e.side}${e.edge?` wui-pin-${e.side}-edge`:``}`:``,Ao=200,jo=220,Mo=`cubic-bezier(0.22, 1, 0.36, 1)`,No=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,Po=e=>e.getAttribute(`data-row-key`)??e;function Fo(e){let t=[...e];if(t.length>200)return null;let n=new Map;for(let e of t)e.hidden||n.set(Po(e),e.offsetTop);return n}function Io(e,t){let n=[...e];if(!t||n.length>200||No())return 0;let r=0;for(let e of n){if(e.hidden||typeof e.animate!=`function`)continue;let n=t.get(Po(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:Mo}),r++)}return r}function Lo(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 Ro=[`saving`,`error`],zo=`data-wui-save-state`,Bo=`wui-row-save-error`,Vo=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 Ho(e){let t=Vo(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 Uo(e,t,n=``){if(t!==null&&!Ro.includes(t))throw Error(`A row's save state is ${Ro.join(` or `)} (or null to clear it), not "${t}".`);e.querySelector(`:scope > * > .${Bo}`)?.remove(),t===null?e.removeAttribute(zo):e.setAttribute(zo,t),t===`saving`?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`);let r=t===`error`&&n?Vo(e):null;if(r){let t=e.ownerDocument.createElement(`span`);t.className=Bo,t.textContent=n,r.append(t)}}function Wo(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 Go(e){let t=e.filter(e=>e.ok),n=[],[r]=t;t.length===1&&r?n.push(ho(r.label)):t.length>1&&n.push(go(t.length));for(let t of e)t.ok||n.push(_o(t.label,t.message));return n.join(` `)}var Ko=n({isDrawn:()=>qo});function qo(e){return typeof e.checkVisibility==`function`?e.checkVisibility():e.closest(`[hidden]`)===null&&getComputedStyle(e).display!==`none`}var Jo=n({MENTION_ID_PATTERN:()=>Yo,mentionLabel:()=>Qo,mentionTextFromValue:()=>ts,mentionValueFromText:()=>ns,mentionedIds:()=>rs,parseMentionValue:()=>es}),Yo=/^[A-Za-z0-9_.:-]{1,64}$/,Xo=/@(\\+)\[|@\[([^[\]\n]{1,100})\]\(([A-Za-z0-9_.:-]{1,64})\)/g,Zo=/@(\\*)\[/g;function Qo(e){return String(e??``).replace(/[[\]\r\n]+/g,` `).replace(/\s+/g,` `).trim().slice(0,100)}var $o=e=>e.replace(Zo,(e,t)=>`@\\${t}[`);function es(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(Xo))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 ts(e){let t=``,n=[];for(let r of es(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 ns(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}`||!Yo.test(e.id)||(i+=$o(n.slice(a,e.start)),i+=`@[${e.label}](${e.id})`,a=e.end);return i+$o(n.slice(a))}function rs(e){let t=[];for(let n of es(e))`id`in n&&!t.includes(n.id)&&t.push(n.id);return t}var is=n({bindMenuKeys:()=>ls}),as=500,os=10,ss=new Set([`INPUT`,`TEXTAREA`,`SELECT`]);function cs(e){return e instanceof HTMLElement?ss.has(e.tagName)||e.isContentEditable:!1}function ls(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(qo),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=cs(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)+os,s-1));return}if(e.key===`PageUp`){u(Math.max((l<0?s:l)-os,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,as);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 us=n({NOTIFICATION_CENTRE_TEXT:()=>ds}),ds={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`},fs=n({NOTIFICATION_COUNT_CAP:()=>99,groupNotificationsByDay:()=>xs,notificationCountText:()=>gs,notificationDayHeading:()=>bs,notificationTime:()=>ys,notificationTriggerLabel:()=>_s,notificationUnreadAnnouncement:()=>vs}),ps=99,ms=864e5,hs=()=>P(`notificationCentre`,ds);function gs(e){return e>99?`99+`:String(e)}function _s(e,t){return t===0?e:`${e}, ${gs(t)} ${hs().unreadWordLabel}`}function vs(e){return e===0?hs().noneUnreadText:Qe(hs(),`unreadAnnouncementText`,e,{unread:gs(e)})}function ys(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?``:Ea(e,{pattern:`time`})}function bs(e,t=Date.now()){let n=Ea(e);return n===Ea(t)?hs().todayLabel:n===Ea(wa(t)-ms)?hs().yesterdayLabel:n}function xs(e,t=Date.now()){let n=new Map;for(let r of e){if(!Number.isFinite(wa(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=Ea(r.at),i=n.get(e);i||(i={key:e,heading:bs(r.at,t),items:[]},n.set(e,i)),i.items.push(r)}return[...n.values()]}var Ss={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`},Cs=n({RELATIVE_LIMIT_DAYS:()=>7,formatRelativeTime:()=>As,relativeTimeTitle:()=>js}),ws=6e4,Ts=60*ws,Es=24*Ts,Ds=()=>P(`relativeTime`,Ss),Os={minute:`minutesAgoText`,hour:`hoursAgoText`,day:`daysAgoText`},ks={minute:`inMinutesText`,hour:`inHoursText`,day:`inDaysText`};function As(e,t=Date.now()){let n=wa(e);if(!Number.isFinite(n))return U();let r=t-n,i=Math.abs(r);if(i>=7*Es)return Ea(n);if(i<ws)return Ds().justNowText;let[a,o]=i<Ts?[Math.floor(i/ws),`minute`]:i<Es?[Math.floor(i/Ts),`hour`]:[Math.floor(i/Es),`day`];return Qe(Ds(),(r>0?Os:ks)[o],a)}function js(e){let t=wa(e);return Number.isFinite(t)?`${Ea(t,{pattern:`datetime`})} IST`:U()}var Ms=n({FALLBACK_ROW_HEIGHT:()=>36,SELECT_WINDOW_OVERSCAN:()=>8,createHeightIndex:()=>Ps,scrollTopToReveal:()=>Is,windowRange:()=>Fs}),Ns=.5;function Ps(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)<=Ns||(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)<=Ns?!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 Fs(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 Is(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 Ls=n({parseServerHtml:()=>Rs});function Rs(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content}var zs=Object.freeze([`POST`,`PUT`,`PATCH`,`DELETE`]),Bs=e=>(Yt(`[@webority/ui-elements] Wui-Toast-Action: ${e}; the toast shows no action.`),null),Vs=e=>typeof e==`object`&&!!e;function Hs(e){if(e==null||e===``)return null;let t;try{t=JSON.parse(e)}catch{return Bs(`the value is not JSON`)}let n=Vs(t)?t:{},r=n.label,i=n.url,a=String(n.method??`POST`).toUpperCase();return typeof r!=`string`||r===``||typeof i!=`string`||i===``?Bs(`label and url must be non-empty strings`):zs.includes(a)?{label:r,url:i,method:a}:Bs(`method must be one of ${zs.join(`, `)}`)}var Us=n({CSRF_META_NAME:()=>Ws,DEFAULT_CSRF_HEADER:()=>Gs,DEFAULT_TIMEOUT_MS:()=>tc,HTTP_KINDS:()=>Ys,WUI_HEADERS:()=>W,WUI_REQUEST_HEADER:()=>Js,classifyStatus:()=>$s,configureCsrf:()=>qs,createRequestQueue:()=>sc,isSameOrigin:()=>Qs,readCsrf:()=>Zs,settleResponse:()=>ac,timeoutFromAttribute:()=>nc,wuiFetch:()=>oc}),Ws=`wui-csrf`,Gs=`RequestVerificationToken`,Ks={metaName:Ws,header:Gs};function qs({metaName:e=Ws,header:t=Gs}={}){Ks={metaName:e,header:t}}var Js=`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`}),Ys=Object.freeze([`ok`,`validation`,`forbidden`,`networkCheck`,`client`,`server`,`network`,`timeout`,`aborted`,`stale`,`session`]),Xs=new Set([`GET`,`HEAD`]);function Zs(e=document){let t=[...e.querySelectorAll(`meta`)].find(e=>e.getAttribute(`name`)===Ks.metaName),n=t?.getAttribute(`content`);return!t||!n?null:{header:t.getAttribute(`data-header`)||Ks.header,token:n}}var Qs=e=>{try{return new URL(e,window.location.href).origin===window.location.origin}catch{return!1}};function $s(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 ec=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,tc=3e4;function nc(e){let t=e?.trim()??``;return/^\d+$/.test(t)?Number(t):void 0}var rc=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})}},ic=e=>{if(e==null)return null;try{return decodeURIComponent(e)}catch{return e}};function ac(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:ic(r(W.message)),redirect:r(W.redirect),result:r(W.result),keepOpen:r(W.keepOpen)===`1`,toastVariant:r(W.toastVariant),toastAction:Hs(r(W.toastAction)),fragment:r(W.fragment)===`1`,data:rc(ic(r(W.data))),next:r(W.next)}}async function oc(e,t={}){let n=(t.method||`GET`).toUpperCase(),r=t.navigate||(e=>window.location.assign(e)),i={Accept:`text/html`,"X-Requested-With":`XMLHttpRequest`,[Js]:`1`,...t.headers};if(!Xs.has(n)&&Qs(e)){let e=Zs();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`:ec(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 ac(d(e))}let s=$s(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),ac(s,o);let c=``;if(s===`ok`||s===`validation`)try{c=await o.text()}catch(e){return ac(d(e),o)}return ac(s,o,c)}finally{clearTimeout(u),s?.removeEventListener(`abort`,o)}}function sc(){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 oc(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 cc=n({deriveStepStatus:()=>lc,stepperHeaderItems:()=>uc});function lc(e,t){return typeof t==`number`?e<t?`done`:e===t?`active`:`pending`:`pending`}function uc(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 dc={selectAllLabel:`Select all rows`,selectRowLabel:`Select row`},fc=n({SELECT_CELL_CLASS:()=>G,addRowSelectCells:()=>xc,addSelectColumn:()=>Sc,attachShiftRange:()=>Tc,createSelectHeaderCell:()=>hc,createSelectRowCell:()=>gc,createSelectSpacerCell:()=>_c,syncSelectAll:()=>Cc}),pc=()=>P(`tableSelect`,dc),G=`wui-select-cell`,mc=(e,t)=>{let n=e.createElement(`input`);return n.type=`checkbox`,n.className=`form-check-input`,n.setAttribute(`aria-label`,t),n};function hc(e=document){let t=e.createElement(`th`);return t.className=G,t.appendChild(mc(e,pc().selectAllLabel)),t}function gc(e=document,{disabled:t=!1}={}){let n=e.createElement(`td`);n.className=G;let r=mc(e,pc().selectRowLabel);return r.disabled=t,n.appendChild(r),n}function _c(e=document){let t=e.createElement(`td`);return t.className=G,t}var vc=e=>e.firstElementChild?.classList.contains(G),yc=e=>e.matches(`.wui-group-row, .wui-virtual-spacer, .wui-row-expanded`),bc=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n);function xc(e){for(let t of e){if(vc(t)||yc(t))continue;let e=t.getAttribute(`data-row-selectable`)===`false`;t.insertBefore(gc(t.ownerDocument,{disabled:e}),t.firstChild)}}function Sc(e){let t=e.querySelector(`thead tr`);if(!(t instanceof HTMLTableRowElement))return null;vc(t)||t.insertBefore(hc(e.ownerDocument),t.firstChild),xc(bc(e,`tbody tr`,HTMLTableRowElement));for(let t of bc(e,`tfoot tr`,HTMLTableRowElement))vc(t)||t.insertBefore(_c(e.ownerDocument),t.firstChild);let n=t.querySelector(`.${G} .form-check-input`);return n instanceof HTMLInputElement?n:null}function Cc(e){let t=e.querySelector(`thead .${G} .form-check-input`),n=bc(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 bc(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 wc=`tbody .${G} .form-check-input:not(:disabled)`;function Tc(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=bc(e,wc,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 Ec=n({DATE_PICKER_TEXT:()=>Dc}),Dc={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}.`},Oc=n({DRAWER_TEXT:()=>kc}),kc={closeLabel:`Close`,confirmDiscard:`Discard your changes?`,discardLabel:`Discard`,keepLabel:`Keep editing`,screenText:`{now}% of the screen`,sheetHeightLabel:`Sheet height`},Ac=n({HTTP_FAILURE_TEXT:()=>jc}),jc={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.`},Mc=n({matchSegments:()=>Nc});function Nc(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 Pc=n({TOOLTIP_ATTRIBUTE:()=>Fc,TOOLTIP_CLASS_ATTRIBUTE:()=>Lc,TOOLTIP_ID_ATTRIBUTE:()=>Rc,TOOLTIP_OPEN_ATTRIBUTE:()=>zc,TOOLTIP_PLACEMENT_ATTRIBUTE:()=>Ic,TOOLTIP_SHORTCUT_ATTRIBUTE:()=>Bc,showPinnedTooltips:()=>Hc,wireTooltips:()=>Vc}),Fc=`data-wui-tooltip`,Ic=`data-wui-tooltip-placement`,Lc=`data-wui-tooltip-class`,Rc=`data-wui-tooltip-id`,zc=`data-wui-tooltip-open`,Bc=`data-wui-tooltip-shortcut`;function Vc(e){Kc.has(e)||(Kc.add(e),e.addEventListener(`pointerover`,t=>{let n=Zc(t.target);n&&!$c(e,n)&&nl(e,n,!1)}),e.addEventListener(`pointerout`,t=>{let n=Jc(e).transient;n&&Zc(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||rl(e,n))}),e.addEventListener(`focusin`,t=>{let n=t.target;if(!(n instanceof Element)||!n.matches(`:focus-visible`))return;let r=Zc(n);r&&!$c(e,r)&&nl(e,r,!1)}),e.addEventListener(`focusout`,t=>{let n=Jc(e).transient;n&&Zc(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||rl(e,n))}),e.addEventListener(`click`,t=>{let n=Jc(e).transient;n&&Zc(t.target)===n.trigger&&rl(e,n)}))}function Hc(e){let t=e instanceof Document?e:e.ownerDocument;for(let n of e.querySelectorAll(`[${zc}]`))nl(t,n,!0)}var Uc=[`top`,`bottom`,`start`,`end`],Wc=`wui-tooltip`,Gc=`[${Fc}], [${Rc}]`,Kc=new WeakSet,qc=new WeakMap;function Jc(e){let t=qc.get(e);return t||(t={bubble:null,transient:null,pinned:new Map,pinnedCount:0,onEscape:t=>{t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),il(e))}},qc.set(e,t)),t}function Yc(e){return Uc.includes(e)}function Xc(e){return e===`auto`||Yc(e)}function Zc(e){if(!(e instanceof Element))return null;let t=e.closest(Gc);return t instanceof HTMLElement?t:null}function Qc(e,t){return e.transient?.trigger===t?e.transient:e.pinned.get(t)}function $c(e,t){return Qc(Jc(e),t)!==void 0}function el(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 tl(e,t){return t.bubble||=el(e,Wc),t.bubble}function nl(e,t,n){let r=t.getAttribute(Fc),i=t.getAttribute(Rc);if(r===null&&i===null)throw Error(`a tooltip trigger carries ${Fc} or ${Rc}`);if(r!==null&&i!==null)throw Error(`a tooltip trigger carries ${Fc} or ${Rc}, not both`);let a=t.getAttribute(`data-wui-tooltip-placement`)??`top`;if(!Xc(a))throw Error(`${Ic} "${a}" is not auto, top, bottom, start or end`);let o=Jc(e);rl(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?el(e,`${Wc}-pinned-${++o.pinnedCount}`):tl(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(Bc);i.inner.replaceChildren(r??``,...l?[N(`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`)});Fe(e).append(s),s.showPopover(),f();let p=Ie(e=>{s.parentElement!==e&&e.append(s),Ne(s),f()},e),m=new MutationObserver(()=>{t.isConnected||rl(e,Qc(Jc(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 rl(e,t){if(!t)return;let n=Jc(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 il(e){let t=Jc(e);rl(e,t.transient);for(let n of[...t.pinned.values()])rl(e,n)}var al=n({TABLE_EXPORT_CHUNK:()=>ol,loadTableExport:()=>cl,registerTableExport:()=>ll}),ol=`table-export`,sl=null;function cl(){return sl===null?jn(ol).then(()=>{if(sl===null)throw Error(`[webority-ui] The table-export chunk ran without handing over its writers.`);return sl}):Promise.resolve(sl)}function ll(e){sl=e}var ul=Object.freeze({anchorOverlay:d,avatarNode:Gt,buttonClass:_i,calendarMath:Pa,copyText:Qa,dataTable:no,datePickerText:Ec,defineElement:r,devWarn:Jt,dom:Re,drawerText:Oc,elementBase:a,fieldState:Xt,formatters:Bi,formMirror:tn,glyphs:Un,hasOwn:cn,httpFailureText:Ac,iconGlyphs:Un,imeSafeEnter:nr,isDrawn:Ko,listboxKeyNav:ar,loader:mn,mentionText:Jo,menuKeyNav:is,nativeOverlay:D,notificationCentreText:us,notificationDays:fs,optionLabel:lr,partRegistry:Lr,relativeTime:Cs,rtl:c,selectList:br,selectRemote:Ur,selectText:vr,selectWindow:Ms,serverHtml:Ls,shortcutKeys:at,stepperHeader:cc,svgNodes:Ln,tableExport:al,tableSelect:fc,textMatch:Mc,textStore:Be,tooltips:Pc,wuiHttp:Us,WuiSelect:Jr,zone:Oi}),dl={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`},fl=`image/jpeg,image/png,image/webp,image/heic,image/heif,.heic,.heif`,pl=10,ml=512,hl=`image/webp`,gl=[96,48];function _l(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 vl(e){let t=P(`imagePicker`,dl);return _l(e)?t.heicUnreadableMessage:t.photoUnreadableMessage}function yl(e,t){let n=Number(t);return{name:e?.name||`photo`,type:hl,size:Number.isInteger(n)&&n>0?n:512}}var bl=`/`,xl=`.search-wrap.wui-search-collapsible`,Sl=`.wui-topsearch-panel`,Cl=`.modal, wui-drawer[open]`,wl=new WeakSet,Tl=e=>{let t=e.querySelector(`.wui-search-toggle`);return t instanceof HTMLElement?t:null},El=e=>{let t=e.querySelector(`.search-input`);return t instanceof HTMLInputElement?t:null},Dl=e=>[...e.querySelectorAll(xl)].filter(e=>e instanceof HTMLElement);function Ol(e){e.classList.remove(`is-collapsed`),Tl(e)?.setAttribute(`aria-expanded`,`true`),El(e)?.focus()}function kl(e){El(e)?.value||(e.classList.add(`is-collapsed`),Tl(e)?.setAttribute(`aria-expanded`,`false`))}function Al(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=Tl(e),n=El(e);t?.addEventListener(`click`,()=>Ol(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n?.value||(r.preventDefault(),kl(e),t?.focus())}),e.addEventListener(`focusout`,t=>{let n=t.relatedTarget;n instanceof Node&&e.contains(n)||kl(e)})}function jl(e){wl.has(e)||(wl.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||St(t.target instanceof Node?t.target:null)||t.target instanceof Element&&t.target.closest(Cl)||e.querySelector(Sl))return;let n=Dl(e).find(e=>e.offsetParent!==null);n&&(t.preventDefault(),Ol(n))}))}function Ml(e=document){let t=e;for(let e of Dl(t))Al(e);jl(e instanceof Element?e.ownerDocument:e)}var Nl=`data-wui-command-shortcut`,Pl=`k`,Fl=new WeakSet,Il=/ \(Ctrl\+([^)]+)\)$/;function Ll(e=navigator){return/mac|iphone|ipad/i.test(e.userAgentData?.platform??e.platform)}function Rl(e,t){return!(e.ctrlKey||e.metaKey)||e.altKey||e.shiftKey||e.repeat?!1:String(e.key).toLowerCase()===String(t).toLowerCase()}function zl(e){return e.nodeType===Node.DOCUMENT_NODE}function Bl(e){e.closest(`wui-modal`)?.show()}function Vl(e){if(Ll())for(let t of e.querySelectorAll(`[${Nl}]`)){let e=t.getAttribute(`placeholder`);e!==null&&t.setAttribute(`placeholder`,e.replace(Il,(e,t)=>` (⌘${t})`))}}function Hl(e){let t=zl(e)?e:e.ownerDocument;e.querySelector(`[data-wui-command-shortcut]`)&&(Vl(t),Fl.has(t)||(Fl.add(t),t.addEventListener(`keydown`,e=>{for(let n of t.querySelectorAll(`[${Nl}]`))if(Rl(e,n.getAttribute(`data-wui-command-shortcut`)||Pl)){e.preventDefault(),n.localName===`wui-command-palette`||n.localName===`wui-modal`?Bl(n):(n.focus(),`select`in n&&typeof n.select==`function`&&n.select());return}})))}var Ul={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`},Wl=()=>P(`fileValidation`,Ul),Gl=`image/png,image/jpeg,image/webp`,Kl=5,ql={"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`]},Jl={"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`},Yl={"text/plain":`textFileLabel`,".txt":`textFileLabel`,"image/*":`imagesLabel`,"video/*":`videosLabel`,"audio/*":`audioLabel`},Xl=new Set([`image/*`,`video/*`,`audio/*`]),Zl=e=>{let t=Yl[e];return t?Wl()[t]:Jl[e]},Ql=e=>String(e||``).split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean),$l=[`.png`,`.jpg`,`.jpeg`,`.webp`,`.gif`,`.svg`,`.bmp`,`.avif`,`.heic`,`.heif`];function eu(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 $l.some(e=>r.endsWith(e))}var tu=[`kilobyteLabel`,`megabyteLabel`,`gigabyteLabel`];function nu(e){if(e<1024)return`${e} ${Wl().byteLabel}`;let t=e/1024,n=0;for(;t>=1024&&n<tu.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${Wl()[tu[n]??`gigabyteLabel`]}`}function ru(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 iu(e){let t=Ql(e);return t.length?t.every(e=>e.startsWith(`.`)?$l.includes(e):e===`image/*`||e.startsWith(`image/`)):!1}function au(e){let t=[];for(let n of Ql(e)){let e=Zl(n)||(n.startsWith(`.`)?n.slice(1).toUpperCase():n.toUpperCase());t.includes(e)||t.push(e)}return t.length<=1?t[0]||Wl().supportedLabel:F(Wl().orText,{names:t.slice(0,-1).join(`, `),last:t.slice(-1).join(``)})}function ou(e,t){let n=Ql(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&&(ql[e]||[]).some(e=>i.endsWith(e)))}function su(e,t={}){if(!e)return null;let n=t.accept===void 0?Gl:t.accept,r=t.maxSizeMb===void 0?5:t.maxSizeMb;if(!ou(e,n)){let e=au(n),t=Ql(n).map(e=>Xl.has(e));return t.every(Boolean)?F(Wl().chooseText,{label:e}):t.some(Boolean)?F(Wl().chooseText,{label:e.endsWith(` file`)?`${e}s`:`${e} files`}):F(Wl().chooseText,{label:`a ${e.endsWith(` file`)?e:`${e} file`}`})}return r!==null&&r>0&&e.size>r*1024*1024?F(Wl().keepFileUnderMbText,{maxSizeMb:r}):null}function cu(e,t){let n=Array.from(e||[]),r=t.multiple?n:n.slice(0,1),i=[],a=[];for(let e of r){let n=su(e,{accept:t.accept,maxSizeMb:t.maxSizeMb});n?a.push({file:e,message:n}):i.push(e)}return{files:i,rejections:a}}function lu(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}=cu(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 uu={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`},du=/[0-9]/,fu={9:du,A:/[A-Za-z]/,"*":/[0-9A-Za-z]/},pu=/[9A*]/,mu=new Set([`text`,`tel`,`search`,`url`,`password`]),hu=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},gu=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},_u=e=>e.length<=3?e:`${e.slice(0,-3).replace(/\B(?=(\d{2})+(?!\d))/g,`,`)},${e.slice(-3)}`,vu=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());return t?`${t[3]}-${t[2]}-${t[1]}`:e},yu=()=>P(`inputMask`,uu);function bu(e,{upper:t=!1,normalize:n,valid:r,post:i=e=>e,message:a=yu().incompleteMessage}={}){let o=[...e].map(e=>{let t=fu[e];return t?{re:t}:{lit:e}}),s=o.filter(e=>e.re).length;return{inputMode:o.every(e=>!e.re||e.re===du)?`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 xu(){return{inputMode:`decimal`,post:e=>e,message:yu().amountMessage,extract(e){let t=``,n=!1,r=0;for(let i of e)du.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=_u(t)+(e.includes(`.`)?`.${n}`:``);return{text:r,isRaw:[...r].map(e=>e!==`,`)}},isValid:e=>/^\d+(\.\d{1,2})?$/.test(e)}}var Su={"phone-in":()=>bu(`99999 99999`,{normalize:hu,valid:e=>/^[6-9]/.test(e),message:yu().phoneInMessage}),pan:()=>bu(`AAAAA9999A`,{upper:!0,valid:e=>/^[A-Z]{5}\d{4}[A-Z]$/.test(e),message:yu().panMessage}),gstin:()=>bu(`99AAAAA9999A***`,{upper:!0,valid:e=>/^\d{2}[A-Z]{5}\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/.test(e),message:yu().gstinMessage}),aadhaar:()=>bu(`9999 9999 9999`,{valid:e=>/^[2-9]/.test(e),message:yu().aadhaarMessage}),ifsc:()=>bu(`AAAA*******`,{upper:!0,valid:e=>/^[A-Z]{4}0[A-Z0-9]{6}$/.test(e),message:yu().ifscMessage}),"pin-code":()=>bu(`999999`,{valid:e=>/^[1-9]/.test(e),message:yu().pinCodeMessage}),date:()=>bu(`99-99-9999`,{normalize:vu,valid:gu,post:(e,t)=>e.length===8&&gu(e)?`${e.slice(4)}-${e.slice(2,4)}-${e.slice(0,2)}`:t,message:yu().dateMessage}),amount:xu},Cu=Object.keys(Su),wu=e=>{let t=String(e).toLowerCase();return ln(Su,t)?t:void 0},Tu=e=>pu.test(String(e))&&wu(e)===void 0,Eu=new Map;Xe(()=>Eu.clear());function Du(e){if(e==null||e===``)return null;let t=String(e),n=Eu.get(t);return n===void 0&&(n=Tu(t)?bu(t):ln(Su,t)?Su[t]?.()??null:null,Eu.set(t,n)),n}var Ou=(e,t)=>e.normalize?e.normalize(t):t;function ku(e,t){let n=Du(e);return n?n.extract(Ou(n,String(t??``))):String(t??``)}function Au(e,t){let n=Du(e);if(!n)return String(t??``);let r=n.extract(Ou(n,String(t??``)));return n.post(r,n.layout(r).text)}function ju(e,t){let n=Du(e);return n?n.layout(n.extract(Ou(n,String(t??``)))).text:String(t??``)}var Mu=(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},Nu=new WeakMap,Pu=e=>Nu.get(e)?.(),Fu=new WeakMap;function Iu(e,t,n,r){let i=e.getAll(t),a=Fu.get(e)??new Set;Fu.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 Lu(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 Ru(e,{mask:t,postFormatted:n=!1,onChange:r,onInvalidChange:i}={}){let a=Du(t);if(!a||!mu.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??Lu(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&&mu.has(e.type))){let t=Mu(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:()=>j(x.get,`input value getter missing`).call(e),set:t=>{if(j(x.set,`input value setter missing`).call(e,t),p)return;let n=Ou(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:Ou(a,e.value);y(r,e.selectionStart??r.length,!0)},w=()=>{p=!0},T=()=>{p=!1;let t=Ou(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=Ou(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&&Iu(t.formData,e.name,e.value,D())},ne=()=>{clearTimeout(_),_=setTimeout(()=>{m=!1,y(Ou(a,e.value),e.value.length,!0)},0)};n||(k?.addEventListener(`formdata`,te),Nu.set(e,D)),k?.addEventListener(`reset`,ne),k?.addEventListener(`submit`,O);let re=Ou(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),Nu.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 zu(){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=Pu(e);return n===void 0?t.call(this,e):n},e.wuiMaskHook=!0}var Bu=new WeakMap,Vu,Hu=e=>{Bu.has(e)||Bu.set(e,Ru(e,{mask:e.dataset.appMask,postFormatted:e.hasAttribute(`data-mask-post-formatted`)}))},Uu=e=>[...e.querySelectorAll(`input[data-app-mask]`)].filter(e=>e instanceof HTMLInputElement),Wu=e=>e instanceof Element?[...e instanceof HTMLInputElement&&e.matches(`input[data-app-mask]`)?[e]:[],...Uu(e)]:[];function Gu(){Vu||typeof MutationObserver>`u`||(Vu=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Wu(e))Bu.get(t)?.(),Bu.delete(t);for(let e of t.addedNodes)for(let t of Wu(e))Hu(t)}}),Vu.observe(document.documentElement,{childList:!0,subtree:!0}))}function Ku(e=document){zu();for(let t of Uu(e))Hu(t);e===document&&Gu()}var qu=`data-wui-bulk-in-bar`,Ju=`[data-wui-page-header-bar][data-wui-bulk-for]`,Yu=new WeakSet;function Xu(e){return`${_a(e,{decimals:0})} selected`}function Zu(e){let t=e.dataset.wuiBulkFor;return t===void 0?null:document.getElementById(t)}function Qu(e){return typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`}function $u(e,t){return[...e.querySelectorAll(t)].flatMap(e=>e instanceof HTMLElement?[e]:[])}function ed(e,t){for(let n of $u(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?Xu(t):``}function td(e=document){for(let t of $u(e,Ju))Zu(t)?.setAttribute(qu,``);Yu.has(document)||(Yu.add(document),document.addEventListener(`selectionchange`,e=>{if(!(e instanceof CustomEvent)||!Qu(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 $u(document,Ju))Zu(n)?.contains(t)&&ed(n,e.detail.selected)}))}var nd={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`},rd={minLength:10,uppercase:!0,lowercase:!0,digit:!0,special:!0,uniqueChars:0,customRules:[]},id=()=>P(`passwordRules`,nd);function ad(e){return e===!0||e==null?{...rd}:{...rd,...e}}function od(e){let t=ad(e),n=[];if(t.minLength>0&&n.push({key:`length`,label:F(id().lengthText,{minLength:t.minLength}),test:e=>e.length>=t.minLength}),t.uppercase&&n.push({key:`uppercase`,label:id().uppercaseText,test:e=>/[A-Z]/.test(e)}),t.lowercase&&n.push({key:`lowercase`,label:id().lowercaseText,test:e=>/[a-z]/.test(e)}),t.digit&&n.push({key:`digit`,label:id().digitText,test:e=>/[0-9]/.test(e)}),t.special&&n.push({key:`special`,label:id().specialText,test:e=>/[^A-Za-z0-9]/.test(e)}),t.uniqueChars>0){let e=t.uniqueChars;n.push({key:`unique`,label:Qe(id(),`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 sd(e,t){let n=e==null?``:String(e);return od(t).map(e=>({key:e.key,label:e.label,met:e.test(n)}))}function cd(e,t){return sd(e,t).every(e=>e.met)}var ld={moveLabel:`Move to`,moveText:`Move to {label}`},ud=`wui:row-drop`,dd=`is-drop-over`,fd=`application/x-wui-rows`,pd=`wui-row-dragging`,md=`[data-wui-drop-target]`,hd=`tbody tr[data-row-key]`,gd=`input, button, a, select, textarea, label`,_d=`.wui-select-cell .form-check-input`,vd=new WeakMap,yd=new WeakSet,bd=null,xd=null;function Sd(e){let t=e.querySelector(_d);return t instanceof HTMLInputElement&&t.checked}function Cd(e){let t=[];for(let n of e.querySelectorAll(`tbody tr`))n instanceof HTMLElement&&Sd(n)&&t.push(n.dataset.rowKey);return t}function wd(e,t){return M(e,t)}function Td(e,t){let n=wd(e,t);return n instanceof HTMLElement?n:null}function Ed(e){let t=e.textContent;if(t===null)throw Error(`A drop target has no text content.`);return t.trim()}var Dd=e=>typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`;function Od(){bd=null,document.body.classList.remove(pd);for(let e of document.querySelectorAll(`${md}.${dd}`))e.classList.remove(dd)}function kd(e,t,n){e.dispatchEvent(new CustomEvent(ud,{bubbles:!0,detail:{keys:t,target:n.dataset.wuiDropTarget}}))}function Ad(e){let t=Td(e.target,md);if(!t||!bd)return;e.preventDefault();let n=j(e.dataTransfer,`A drag event arrived without its DataTransfer.`);n.dropEffect=`move`,t.classList.add(dd)}function jd(e){let t=Td(e.target,md);!t||e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||t.classList.remove(dd)}function Md(e){let t=Td(e.target,md);if(!t||!bd)return;e.preventDefault(),t.classList.remove(dd);let{root:n,keys:r}=bd;kd(n,r,t),Od()}function Nd(e){let t=Td(e.target,md);t&&xd?.keys.length&&(e.preventDefault(),kd(xd.root,xd.keys,t))}function Pd(e){(ir(e)||e.key===` `)&&Nd(e)}function Fd(e){yd.has(e)||(yd.add(e),e.addEventListener(`dragover`,Ad),e.addEventListener(`dragenter`,Ad),e.addEventListener(`dragleave`,jd),e.addEventListener(`drop`,Md),e.addEventListener(`click`,Nd),e.addEventListener(`keydown`,Pd))}function Id(e){let t=vd.get(e);if(t)return t;Fd(e.ownerDocument||e);let n=t=>{let n=Td(t.target,hd);if(!n||!e.contains(n))return;let r=wd(t.target,gd);r&&n.contains(r)||(n.draggable=!0)},r=t=>{let n=Td(t.target,hd);if(!n||!e.contains(n))return;let r=Sd(n)?Cd(e):[n.dataset.rowKey],i=j(t.dataTransfer,`A drag event arrived without its DataTransfer.`);i.setData(fd,JSON.stringify(r)),i.setData(`text/plain`,r.join(`,`)),i.effectAllowed=`move`,bd={root:e,keys:r},document.body.classList.add(pd)},i=t=>{let n=t instanceof CustomEvent?t.detail:void 0;if(Dd(n)){let{keys:t}=n;n.selected>0?xd={root:e,keys:Array.isArray(t)?t:Cd(e)}:n.selected===0&&(xd=null)}Rd(document)};e.addEventListener(`pointerdown`,n),e.addEventListener(`dragstart`,r),e.addEventListener(`dragend`,Od),e.addEventListener(`selectionchange`,i);let a=()=>{e.removeEventListener(`pointerdown`,n),e.removeEventListener(`dragstart`,r),e.removeEventListener(`dragend`,Od),e.removeEventListener(`selectionchange`,i),vd.delete(e)};return vd.set(e,a),a}var Ld=()=>P(`rowDrop`,ld);function Rd(e=document){let t=e.querySelector(`[data-wui-row-drag] tbody tr ${_d}:checked`)!==null;for(let n of e.querySelectorAll(md)){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`)||Ed(n);n.setAttribute(`aria-label`,F(Ld().moveText,{label:e}))}for(let t of e.querySelectorAll(`.wui-drop-tray`))t.hasAttribute(`role`)||(t.setAttribute(`role`,`toolbar`),t.setAttribute(`aria-label`,Ld().moveLabel))}function zd(e=document){for(let t of e.querySelectorAll(`[data-wui-row-drag]`))t instanceof HTMLElement&&Id(t);Rd(e.ownerDocument||e)}var Bd=`.table-wrap, .table-responsive, [class*="table-responsive-"]`,Vd=1;function Hd(e){let t=()=>{let t=e.scrollWidth-e.clientWidth,n=Math.abs(e.scrollLeft);e.toggleAttribute(`data-wui-overflow-start`,t>Vd&&n>Vd),e.toggleAttribute(`data-wui-overflow-end`,t>Vd&&n<t-Vd),e.toggleAttribute(`data-wui-overflow-top`,e.scrollTop>Vd)},n=()=>{if(e.scrollWidth-e.clientWidth>Vd){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 Ud=new WeakMap,Wd,Gd=e=>{Ud.has(e)||Ud.set(e,Hd(e))},Kd=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(Bd)].filter(e=>e instanceof HTMLElement);return[...t,...n]};function qd(){Wd||typeof MutationObserver>`u`||(Wd=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Kd(e))Ud.get(t)?.(),Ud.delete(t);for(let e of t.addedNodes)for(let t of Kd(e))Gd(t)}}),Wd.observe(document.documentElement,{childList:!0,subtree:!0}))}function Jd(e=document){for(let t of e.querySelectorAll(Bd))t instanceof HTMLElement&&Gd(t);e===document&&qd()}var Yd={leaveLabel:`Leave`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,title:`Leave without saving?`},Xd={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`},Zd={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.`},Qd={closeLabel:`Close`,error:`Error`,failedText:`That did not work. Try again.`,loading:`Loading...`,moreText:`more`,success:`Done`},$d=Object.freeze([`page`,`pageSize`,`sortBy`,`sortOrder`,`search`]),ef=`search`,K=()=>P(`dataTable`,to),tf=5,nf=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,rf=e=>e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled,af=e=>nf(e)&&`type`in e&&e.type===`hidden`,q=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n),J=(e,t,n)=>{let r=e.querySelector(t);return r instanceof n?r:null},of=(e,t,n)=>{let r=e.closest(t);return r instanceof n?r:null},sf=e=>e.localName===`wui-select`,cf=new WeakMap,lf=(e,t)=>{let n=Number(e);return Number.isInteger(n)?n:t},uf=e=>({total:lf(e.dataset.total,0),totalCapped:e.dataset.totalCapped===`true`,page:lf(e.dataset.page,1),pageSize:lf(e.dataset.pageSize,0),sortBy:e.dataset.sortBy||``,sortOrder:e.dataset.sortOrder===`desc`?`desc`:`asc`,pending:e.dataset.totalPending===`true`,rowCount:lf(e.dataset.rowCount,0)}),df=(e,t)=>{e&&Y().toast(e,{variant:t})},ff=(e,t)=>{if(!e)return;let n=new Set([...e.elements].filter(e=>!af(e)||e.hasAttribute(`data-range-mirror`)).map(e=>e.getAttribute(`name`)).filter(e=>e&&!$d.includes(e))),r=[...t].some(([e,t])=>t!==``&&n.has(e));for(let t of q(e,`[data-wui-filter-clear]`,HTMLElement))t.hidden=!r},pf=new Intl.NumberFormat(`en-IN`),mf=(e,t)=>t?`${pf.format(e)}+`:pf.format(e),hf=(e,t,n)=>{let r=e.closest(`.wui-list-card`),i=r?J(r,`.wui-list-card-count`,HTMLElement):null;i&&(i.textContent=mf(t,n))};function gf(e=document){let t=q(e,`[data-wui-server]`,HTMLElement);e instanceof HTMLElement&&e.matches(`[data-wui-server]`)&&t.unshift(e);for(let e of t){if(cf.has(e))continue;let t=vf(e);cf.set(e,t),e.hasAttribute(`data-load-first-page`)&&t.reload()}}function _f(e){let t=e instanceof Element?of(e,`[data-wui-server]`,HTMLElement):null;return t&&cf.get(t)||null}function vf(e){let t=J(e,`.table-wrap`,HTMLElement),n=t?J(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=J(t,`:scope > [data-wui-table-state]`,HTMLElement),a=J(e,`[data-wui-table-pager]`,HTMLElement),o=J(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||K().loadingText,errorText:e.dataset.errorText||K().errorText,timeoutMs:nc(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=sc(),g=new AbortController,_={signal:g.signal},v=j(J(n,`:scope > tbody[data-wui-rows]`,HTMLTableSectionElement),`A server-paged table needs its rows in <app-table-rows> (tbody[data-wui-rows]).`),y=uf(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?K().emptyLabel:F(K().pageTextPending,{page:e.page});if(e.total===0)return K().emptyLabel;let t=e.pageSize>0?Math.max(1,Math.ceil(e.total/e.pageSize)):1,n=e.totalCapped?mf(e.total,!0):`${e.total}`;return F(e.total===1?K().pageTextOne:K().pageTextOther,{page:e.page,pages:t,total:n})},ne=()=>q(n,`:scope > thead > tr:first-child > th`,HTMLTableCellElement),re=e=>{if(f&&q(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){xc(e);for(let t of e){let e=J(t,`.${G} .form-check-input:not(:disabled)`,HTMLInputElement);e&&(m&&p.add(t.dataset.rowKey),e.checked=p.has(t.dataset.rowKey))}Cc(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(q(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=J(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?J(document,s.filtersRegion,HTMLElement):null;return t&&e&&(ce(t),t.replaceChildren(e.content.cloneNode(!0))),t},fe=0,pe=e=>{let r=uf(e);r.pending&&Object.assign(r,{total:y.total,totalCapped:y.totalCapped});let i=r.sortBy!==y.sortBy||r.sortOrder!==y.sortOrder?Fo(v.rows):null;ue(J(e,`:scope > template[data-wui-pager]`,HTMLTemplateElement)),le(e,r);let a=de(J(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(),Io(e.rows,i),o&&Ee(),a},me=e=>{let t=J(Rs(`<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:tf},()=>{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`?K().forbiddenMessage:e===`networkCheck`?P(`httpFailure`,jc).networkCheckText:e===`network`?K().networkMessage:e===`timeout`?K().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=R(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=Si(`primary`,`outline`,`sm`),c.dataset.wui=vi,c.setAttribute(`data-wui-table-retry`,``),c.textContent=K().retryLabel,s.append(c),t.append(r,o,s),ce(i),i.replaceChildren(t),i.hidden=!1}k(n)},be=()=>s.filtersForm?J(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){L(e)}if(!o.ok||!c){let e=o.ok?`server`:o.kind;return i?Yt(`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),ff(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)),Y().refresh(t),l&&Y().refresh(l),y.pending?Se():hf(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;oc(T(u,D),{timeoutMs:s.timeoutMs}).then(n=>{if(t!==fe)return;if(!n.ok){Yt(`[@webority/ui-elements] A server table's total did not load; its pager keeps Previous and Next.`,n.kind);return}let r=J(Rs(n.html),`div[data-wui-total]`,HTMLElement);if(!r){Yt(`[@webority/ui-elements] A server table's count answer has no div[data-wui-total]; its pager keeps Previous and Next.`);return}if(lf(r.dataset.page,-1)!==y.page||lf(r.dataset.pageSize,-1)!==y.pageSize)return;let i=lf(r.dataset.total,-1);if(i<0){Yt(`[@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=J(r,`:scope > template[data-wui-pager]`,HTMLTemplateElement);s&&ue(s);let c=de(J(r,`:scope > template[data-wui-filters]`,HTMLTemplateElement));c&&Y().refresh(c),hf(e,y.total,y.totalCapped),k(te(y)),o&&Ee(),O(`wui:table:total`,{total:i,totalCapped:a})})},Ce=()=>q(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=R(`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?of(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?of(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&(e.preventDefault(),Te(t.dataset.sortKey??``))});let Ee=()=>{Cc(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&&(Tc(n,(e,t)=>{for(let n of e){let e=of(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 q(v,`:scope > tr`,HTMLTableRowElement)){let n=J(e,`.${G} .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=of(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?of(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=J(document,s.searchInput,HTMLElement);return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e:e?J(e,`input`,HTMLInputElement):null},Oe=()=>e.isConnected?!0:(g.abort(),clearTimeout(x??void 0),!1),ke=(e,t)=>{let n=[...e.elements].filter(nf),r=new Set;for(let e of n)e.name&&!af(e)&&r.add(e.name);let i=[];for(let e of n)if(e.name&&!rf(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},Ae=(e,t)=>{let n=new Set([...e.elements].filter(nf).map(e=>e.name).filter(Boolean)),r=new URLSearchParams,i=e=>e!==`search`&&$d.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(ef);let e=a.value.trim();e&&r.set(ef,e)}return A(r,`push`)},je=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(),Ae(e.target,e.submitter))},_),document.addEventListener(`change`,e=>{if(!Oe()||!s.filtersForm||!(e.target instanceof Element))return;let t=of(e.target,s.filtersForm,HTMLFormElement);!t||e.target===De()||t.hasAttribute(`data-wui-apply-on-change`)||e.target.closest(`wui-filter-popover`)||Ae(t)},_);let Me=(e,t)=>{if(!e)return;let n=e=>t.get(e)??``;for(let r of q(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 q(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(sf)){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(!Oe())return;let t=e.target instanceof Element?of(e.target,`a[href]`,HTMLAnchorElement):null;if(!t||!je(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));Me(t.closest(`form`),r),ff(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(ef,n):e.delete(ef),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`)??``),ff(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 Ne=e=>[...v.rows].find(t=>t.dataset.rowKey===e)??null,Pe=e=>{if(!e?.trim())return null;let t=Rs(`<table><tbody>${e}</tbody></table>`);if(t.querySelector(`tbody[data-wui-rows]`))return null;let n=q(t,`table > tbody > tr[data-row-key]`,HTMLTableRowElement);return n.length?n.map(e=>document.importNode(e,!0)):null},Fe=(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:Ne(t.dataset.rowKey);e&&(ce(e),e.replaceWith(t),a.push(t))}return ae(a),Y().refresh(t),i},Ie=e=>e.message||(e.kind===`forbidden`?K().actionForbiddenMessage:K().actionFailedMessage),Le=e=>{e?.isConnected&&e.getAttribute(`data-wui-save-state`)===`saving`&&Uo(e,null)},Re=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:Ne(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(G)),u=o===void 0?c??he(Math.max(1,l.length),l):ze(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),Uo(u,`saving`);let d=Ho(u),f=await oc(e,{method:n.toUpperCase(),body:r});if(f.kind===`session`)return!1;if(f.ok){let e=Pe(f.html),t=e&&u.isConnected?Fe(e,u,s):null;return t?k(ho(Ho(t)||d)):(await A(D,`none`),Le(u)),wf(f,f.toastVariant||`success`),O(`wui:table:saved`,{key:t?.dataset.rowKey??(s?null:String(a)),added:s,status:f.status}),!0}let p=Ie(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&&Uo(m,`error`,p),f.kind!==`aborted`&&df(p,`danger`),k(_o(d,p)),O(`wui:table:failed`,{key:s?null:String(a),added:s,status:f.status,kind:f.kind,message:p}),!1},M=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=of(e,`tr`,HTMLTableRowElement),r=n?.dataset.rowKey??null,i=e.dataset.wuiRowAction||``,a=n?Ho(n):``;e.disabled=!0,e.setAttribute(`aria-busy`,`true`),n&&Uo(n,`saving`);let o=await oc(t,{method:(e.dataset.method||`post`).toUpperCase()});if(e.disabled=!1,e.removeAttribute(`aria-busy`),o.kind===`session`||o.kind===`aborted`)Le(n);else{if(o.ok){wf(o,o.toastVariant||`success`);let e=n?.isConnected?Pe(o.html):null,t=e&&n?Fe(e,n,!1):null;t?k(ho(Ho(t)||a)):(await A(D,`none`),Le(n))}else{let e=Ie(o);df(e,`danger`),n?.isConnected&&Uo(n,`error`,e),k(_o(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?of(e.target,`[data-wui-row-action]`,HTMLButtonElement):null;t&&v.contains(t)&&!t.disabled&&(e.preventDefault(),M(t))}),re(v),se(v),f&&Sc(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:Re,setActiveRow:t=>{e.dataset.activeRowKey=t==null?``:String(t),ie(q(v,`:scope > tr`,HTMLTableRowElement))},selection:{keys:()=>[...p],count:()=>m?y.total:p.size,allMatching:()=>m,selectAllMatching:()=>{if(y.pending)Yt(`[@webority/ui-elements] select all matching needs the total; the table is still waiting for its count.`);else{m=!0;for(let e of q(v,`:scope > tr`,HTMLTableRowElement)){let t=J(e,`.${G} .form-check-input`,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 q(v,`:scope > tr > .${G} .form-check-input:not(:disabled)`,HTMLInputElement))e.checked=!1;Ee()}}}}var yf=8e3,bf=()=>P(`toast`,Qd),xf=[`success`,`info`,`warning`,`danger`],Sf=e=>xf.some(t=>t===e);function Cf(e){if(!Sf(e))throw RangeError(`Unknown toast variant "${e}".`);return e}function Y(){return j(window.WUI,`window.WUI is not defined: the Razor behaviour script did not load on this page.`)}function wf(e,t=`success`){if(!e?.message)return;let n=e.toastAction;n?Y().toast(e.message,{variant:Cf(t),duration:yf,action:{label:n.label,onClick:()=>Tf(n)}}):Y().toast(e.message,{variant:Cf(t)})}async function Tf(e){let t=await oc(e.url,{method:e.method});if(t.kind!==`session`&&t.kind!==`aborted`){if(t.ok){wf(t,t.toastVariant||`success`);for(let e of document.querySelectorAll(`[data-wui-server]`))e instanceof HTMLElement&&e.dataset.refreshOnSuccess!==`false`&&_f(e)?.reload()}else Y().toast(t.message||bf().failedText,{variant:`danger`})}}var Ef=`wui-remote-modal`,Df=`wui-remote-drawer`,Of=Object.freeze({sm:360,md:480,lg:640,xl:720}),kf=`wui-modal-fullscreen`,Af=`wui-modal-wide`,jf=Object.freeze({sm:380,md:440,lg:640,xl:880,wide:1080}),X=()=>P(`modal`,Zd),Mf=e=>nc(e?.getAttribute(`data-wui-timeout`)??null)??3e4,Nf=`a[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,Pf=`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled]),[contenteditable="true"]`,Ff=`[aria-invalid="true"], .is-invalid, .input-validation-error`,If=`invalid`,Lf=`.wui-error-summary, [data-wui-form-errors], .validation-summary-errors, [data-valmsg-summary]`,Rf=`[data-wui-modal-content]`,zf=`[data-wui-pane-close], [data-wui-dismiss]`,Bf=()=>N(`button`,{type:`button`,class:`wui-modal-close`,"data-wui-dismiss":!0,"aria-label":X().closeLabel},Bn({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`}]])),Vf=new WeakMap,Hf=new WeakSet;function Uf(e,t){if(e==null)throw TypeError(`The remote modal needs ${t}, and the page does not have it.`);return e}var Z=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Wf=(e,t,n)=>Uf(Z(e,t),n),Gf=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Kf=()=>Object.assign(Error(`The remote modal load was aborted.`),{name:`AbortError`}),qf=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,Jf=(e,t)=>{let n=e instanceof Element?e.closest(t):null;return n instanceof HTMLElement?n:null},Yf=e=>ln(jf,e),Xf=e=>ln(Of,e);function Zf(e){if(e==null||e===``)return null;if(e===`fullscreen`)return{fullscreen:!0};if(Yf(e))return e===`wide`?{px:jf.wide,wide:!0}:{px:jf[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 Qf=e=>{if(e.classList.contains(`wui-modal-fullscreen`))return{fullscreen:!0};if(e.classList.contains(`wui-modal-wide`))return{px:jf.wide,wide:!0};let t=Number.parseInt(e.style.getPropertyValue(`--wui-modal-max-width`),10);return{px:t>0?t:jf.md}},$f=(e,t)=>{e.classList.toggle(kf,!!t.fullscreen),e.classList.toggle(Af,!t.fullscreen&&!!t.wide),t.fullscreen?e.style.removeProperty(`--wui-modal-max-width`):e.style.setProperty(`--wui-modal-max-width`,`${t.px}px`)},ep=[`center`,`top`];function tp(e){if(e==null||e===``)return null;if(Xf(e))return{px:Of[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 np=e=>e.container===`drawer`,rp=e=>e.container===`pane`,ip=e=>e.container!==`modal`,ap=(e,t)=>np(e)?tp(t):Zf(t),op=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},sp=e=>rp(e)?e.shell:Wf(e.shell,`.modal-dialog`,`a dialog frame`);function cp(e=`modal`){let t=e===`drawer`,n=t?Df:Ef,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?Of.md:jf.md}px`),a.replaceChildren(N(`div`,{class:t?`modal-dialog wui-remote-drawer-dialog`:`modal-dialog modal-dialog-centered wui-rb-dialog`},N(`div`,{class:`modal-content wui-modal`}))),i.append(a),document.body.appendChild(i),i}var lp=e=>N(`div`,{class:`wui-modal-header`},N(`div`,{class:`wui-modal-heading`},N(`div`,{class:`wui-modal-headtext`},N(`div`,{class:`wui-modal-title`},e))),Bf()),up=e=>N(`div`,{class:`modal-content wui-modal`,"aria-busy":`true`},lp(e),N(`div`,{class:`wui-modal-body`},N(`div`,{class:`wui-modal-loading`,role:`status`},N(`span`,{class:`visually-hidden`},X().loadingLabel),N(`div`,{class:`skeleton wui-modal-skeleton`}),N(`div`,{class:`skeleton wui-modal-skeleton`}),N(`div`,{class:`skeleton wui-modal-skeleton wui-modal-skeleton--short`})))),dp=(e,t)=>{let n={forbidden:X().forbiddenMessage,networkCheck:P(`httpFailure`,jc).networkCheckText,client:X().clientMessage,server:X().serverMessage,network:X().networkMessage,timeout:X().timeoutMessage};return N(`div`,{class:`modal-content wui-modal`,"data-wui-modal-error":t},lp(e),N(`div`,{class:`wui-modal-body`},N(`div`,{class:`wui-modal-state`,role:`alert`},N(`p`,{class:`wui-modal-state-title`},X().errorTitle),N(`p`,{class:`wui-modal-state-text`},n[t]||X().serverMessage),N(`div`,{class:`wui-modal-state-actions`},N(`button`,{type:`button`,class:Si(`primary`,`soft`,`md`),"data-wui-dismiss":!0,"data-wui":vi},X().closeLabel),N(`button`,{type:`button`,class:Si(`primary`,`solid`,`md`),"data-wui-modal-retry":!0,"data-wui":vi},X().retryLabel)))))},fp=e=>Z(e.shell,`.modal-content`),pp=e=>ze(e.cloneNode(!0),HTMLElement,`a card copy is not an element`);function mp(e){e&&e.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0}))}function hp(e,t){let n=fp(e),r=n?_p(n):new Map;mp(n),n?n.replaceWith(t):sp(e).appendChild(t),vp(t,r),Y().refresh()}var gp=`input[type="file"][name]`;function _p(e){let t=new Map;for(let n of e.querySelectorAll(gp)){if(!(n instanceof HTMLInputElement))continue;let e=n.files;e&&e.length>0&&t.set(n.name,[...e])}return t}function vp(e,t){if(t.size!==0&&typeof DataTransfer<`u`)for(let n of e.querySelectorAll(gp)){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 yp=e=>rp(e)?!e.shell.hidden:e.host.hasAttribute(`open`);function bp(e,t,n=!1){let r=t?Z(e,Ff):null,i=r?r.matches(Nf)?r:Z(r,Nf)||r:null;if(!i&&n)i=Z(e,`[data-autofocus]`)||Z(e,Pf)||Z(e,`.wui-modal-close`);else if(!i){let t=Gf(e,Nf);i=Z(e,`[data-autofocus]`)||t.find(e=>!e.classList.contains(`wui-modal-close`))||t[0]||e}r?i?.focus?.():i?.focus?.({preventScroll:!0})}function xp(e,t){let n=Z(e.shell,`[data-wui-modal-live]`);n||(n=document.createElement(`div`),n.className=`visually-hidden`,n.setAttribute(`aria-live`,`assertive`),n.setAttribute(`data-wui-modal-live`,``),sp(e).appendChild(n)),n.textContent=``,n.textContent=t}var Sp=e=>{let t=Z(e.shell,`[data-wui-modal-live]`);t&&(t.textContent=``)},Cp=(e,t,n)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))};function wp(e,t,n,r){let i={...r,container:e.container};Cp(t,`wui:modal:${n}`,i),np(e)&&Cp(t,`wui:drawer:${n}`,i),rp(e)&&Cp(t,`wui:pane:${n}`,i)}var Tp=e=>e.matches(`[data-wui-pane-host]`)?`pane`:Wf(e,`dialog`,`a dialog`).classList.contains(`wui-remote-drawer`)?`drawer`:`modal`,Ep=e=>Uf(e.host.closest(`wui-modal`),`a wui-modal host`);function Dp(e){let t=Vf.get(e);if(t)return t;let n=Tp(e),r=n===`pane`?e:Wf(e,`dialog`,`a dialog`),i=fp({shell:r}),a={host:e,shell:r,container:n,queue:sc(),defaultSize:Qf(r),defaultLabel:r.getAttribute(`aria-label`),placeholder:i?pp(i):N(`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 Vf.set(e,a),e.addEventListener(`submit`,e=>Yp(a,e)),e.addEventListener(`click`,e=>{Jf(e.target,`[data-wui-modal-retry]`)&&a.session&&(e.preventDefault(),Fp(a,a.session))}),rp(a)&&e.addEventListener(`click`,t=>{let n=Jf(t.target,zf);n&&e.contains(n)&&a.session&&kp(a,a.session,`dismissed`,null)}),e.addEventListener(`wui-modal-close`,t=>{t.target===e&&t instanceof CustomEvent&&Gp(t.detail,`reason`)===`escape`&&e.querySelector(`form[data-wui-submitting]`)&&t.preventDefault()}),e.addEventListener(`wui-modal-closed`,t=>{t.target===e&&Mp(a)}),e.addEventListener(`wui-modal-opened`,t=>{if(t.target!==e)return;let n=fp(a);a.session&&n?.matches(Rf)&&!n.contains(document.activeElement)&&bp(n,!1,ip(a))}),a.remoteUrl&&e.addEventListener(`wui-modal-open`,t=>{t.target===e&&Np(a,t)}),a}function Op(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:()=>kp(e,a,`dismissed`,null),reload:()=>Fp(e,a)}};return e.session=a,a}function kp(e,t,n,r){e.session===t&&(t.closing={status:n,detail:r},rp(e)?jp(e,t):Ap(e))}function Ap(e){let t=Ep(e);t.dispatchEvent(new CustomEvent(`wui-modal-close`,{bubbles:!0,cancelable:!0,detail:{reason:`dismiss`}}))&&t.hide()}function jp(e,t){let n=e.shell,{status:r,detail:i}=Uf(t.closing,`the closing state`),a=n.contains(document.activeElement);e.queue.abort(),e.session=null,mp(fp(e)),n.replaceChildren(),n.hidden=!0,n.removeAttribute(`data-open`),t.resolveClosed({status:r,detail:i}),wp(e,n,`closed`,{status:r,url:t.url}),a&&t.trigger?.isConnected&&t.trigger.focus?.()}function Mp(e){let t=e.session;if(e.queue.abort(),e.session=null,Sp(e),t){let n=t.closing||{status:`dismissed`,detail:null};t.resolveClosed({status:n.status,detail:n.detail}),wp(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||(hp(e,pp(e.placeholder)),e.loadedUrl=null,$f(e.shell,e.defaultSize),e.defaultLabel?e.shell.setAttribute(`aria-label`,e.defaultLabel):e.shell.removeAttribute(`aria-label`))}function Np(e,t){let n=Gp(t instanceof CustomEvent?t.detail:null,`trigger`),r=n instanceof HTMLElement?n:null,i=r?.getAttribute(`data-wui-url`)||e.remoteUrl||``,a=Op(e,i,{trigger:r});a.explicitSize=Pp(e,r?.getAttribute(`data-wui-size`)),a.explicitSize&&$f(e.shell,a.explicitSize),e.cache&&e.loadedUrl===i||(e.loadedUrl&&hp(e,pp(e.placeholder)),Fp(e,a,{keepPlaceholder:!0}))}function Pp(e,t){try{return ap(e,t)}catch(e){return L(e),null}}async function Fp(e,t,{keepPlaceholder:n=!1}={}){n||hp(e,up(t.options.title||Ip(e)));let r=await e.queue.run(t.url,{method:t.method,body:t.body,navigate:t.options.navigate,timeoutMs:Mf(t.trigger)});if(e.session!==t||r.kind===`aborted`||r.kind===`stale`)return`aborted`;if(r.kind===`session`)return`session`;if(r.kind===`ok`&&Bp(e,t,r.html,!1))return e.loadedUrl=t.url,wp(e,e.shell,`loaded`,{url:t.url,handle:t.handle}),`loaded`;let i=r.kind===`ok`||r.kind===`validation`?`server`:r.kind;return hp(e,dp(t.options.title||Ip(e),i)),yp(e)&&bp(Uf(fp(e),`a card`),!1,ip(e)),wp(e,e.shell,`error`,{url:t.url,kind:i,status:r.status}),`error`}var Ip=e=>fp(e)?.querySelector(`.wui-modal-title`)?.textContent||e.shell.getAttribute(`aria-label`)||``,Lp=`/_content/Webority.Ui.Razor/js/`,Rp=e=>new URL(e,window.location.href).pathname.includes(Lp);function zp(e){if([...document.scripts].some(t=>t.getAttribute(`src`)===e))return;let t=document.createElement(`script`);t.src=e,document.head.appendChild(t)}function Bp(e,t,n,r){let i=Rs(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&&Rp(t)?zp(t):a=!0}a&&Yt(`WUI.modal: ${t.url} returned a fragment with script; it was removed. Keep page behaviour in the page.`);let o=Z(i,Rf);if(!o)return L(`WUI.modal: ${t.url} did not answer with an <app-modal-content> fragment.`),!1;if(hp(e,o),r||Sp(e),!rp(e)){$f(e.shell,t.explicitSize||Pp(e,o.getAttribute(`data-wui-size`))||e.defaultSize);let n=o.getAttribute(`data-wui-title`);n&&e.shell.setAttribute(`aria-label`,n)}return yp(e)&&bp(o,r,ip(e)),!0}var Vp=`button[type="submit"], button:not([type]), input[type="submit"], input[type="image"]`;function Hp(e,t,n){let r=[...e.elements].filter(e=>e.matches(Vp));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(N(`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 Up(e){for(let t of e.querySelectorAll(Lf))t.remove();for(let t of e.querySelectorAll(Ff))t.removeAttribute(`aria-invalid`),t.classList.remove(`is-invalid`,`input-validation-error`);for(let t of e.querySelectorAll(`.field-error`))t.textContent=``}var Wp=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(`.`)),Gp=(e,t)=>{if(typeof e==`object`&&e&&t in e)return Reflect.get(e,t)};async function Kp(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(Gp(t,`title`)),i=(e.statusText||``).trim().toLowerCase(),a=Wp.has(r.toLowerCase())||r.toLowerCase()===i;return n(Gp(t,`message`))||n(Gp(t,`detail`))||(r&&!a?r:null)}function qp(e,t,n,r){let i={forbidden:X().forbiddenMessage,networkCheck:P(`httpFailure`,jc).networkCheckText,client:X().clientMessage,server:X().serverMessage,network:X().networkMessage,timeout:X().timeoutMessage},a=t.closest(`.wui-modal-body`)||t;a.querySelector(`[data-wui-modal-submit-error]`)?.remove(),Up(a);let o=document.createElement(`div`);o.className=`alert alert-danger wui-modal-submit-error`,o.setAttribute(`role`,`alert`),o.setAttribute(`data-wui-modal-submit-error`,``),o.textContent=`${X().submitFailedMessage} ${r||i[n]||X().serverMessage}`,a.prepend(o),xp(e,o.textContent)}var Jp=(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 Yp(e,t){let n=t.target,r=e.session;if(!(n instanceof HTMLFormElement)||!r||n.hasAttribute(`data-wui-native`)||!n.closest(Rf)||(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`;Hp(n,i,!0);let l;try{l=await e.queue.run(c?Jp(a,s):a,{method:o,body:c?void 0:s,navigate:r.options.navigate,timeoutMs:Mf(r.trigger)})}catch(t){L(t),e.session===r&&n.isConnected&&(Hp(n,i,!1),qp(e,n,`server`,null));return}if(e.session!==r)return;if(n.isConnected&&Hp(n,i,!1),l.kind===`ok`&&l.result===`success`){Xp(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===If;if(Bp(e,r,l.html,t)){if(t){let t=Uf(fp(e),`a card`).querySelector(Lf)?.textContent?.replace(/\s+/g,` `).trim();xp(e,t||X().invalidMessage)}return}}let u=l.kind===`ok`||l.kind===`validation`?`server`:l.kind,d=await Kp(l.response);e.session===r&&qp(e,n,u,d)}function Xp(e,t,n){let r=n.message,i=n.redirect||null,a=n.toastVariant||`success`;if(!lm(a))throw TypeError(`Unknown toast variant "${a}". Use ${cm.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?jm(r,a):r&&Y().toast(r,{variant:a}),wp(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,Fp(e,t)):n.keepOpen?n.html&&Bp(e,t,n.html,!1):kp(e,t,`success`,o)}function Zp(e){let t=Jf(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`)?im(t.getAttribute(`data-wui-pane`)??``,{target:t.getAttribute(`data-wui-pane-target`),trigger:t}).catch(e=>{qf(e)||L(e)}):t.hasAttribute(`data-wui-modal`)?em(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=>{qf(e)||L(e)}):nm(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=>{qf(e)||L(e)})))}function Qp(e){if(e.key!==`Escape`||e.defaultPrevented)return;let t=Jf(e.target,rm);if(!t)return;let n=Vf.get(t),r=e.currentTarget;n?.session&&r instanceof Document&&!r.querySelector(`wui-modal[open]`)&&(t.querySelector(`form[data-wui-submitting]`)||(e.preventDefault(),kp(n,n.session,`dismissed`,null)))}function $p(e=document){let t=e instanceof Document?e:Uf(e.ownerDocument,`an owner document`);Hf.has(t)||(Hf.add(t),t.addEventListener(`click`,Zp),t.addEventListener(`keydown`,Qp));let n=Gf(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)Dp(e)}function em(e,t={}){try{if(!e)throw TypeError(`WUI.modal.load: a fragment url is required.`);let n=t.container===`drawer`,r=n?tp(t.size):Zf(t.size),i=t.placement||`center`;if(!ep.includes(i))throw TypeError(`WUI.modal.load: unsupported placement "${i}". Use center or top.`);if(t.signal?.aborted)return Promise.reject(Kf());let a=cp(n?`drawer`:`modal`);$p(document);let o=Dp(a),s=yp(o),c=Op(o,e,t);c.explicitSize=r,$f(o.shell,r||o.defaultSize),n||Wf(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=Fp(o,c);return s||Ep(o).show(),tm(o,c,t,l,u,`WUI.modal.load`)}catch(e){return Promise.reject(e)}}function tm(e,t,n,r,i,a){let o=new Promise((r,i)=>{n.signal?.addEventListener(`abort`,()=>{e.session===t&&(e.queue.abort(),kp(e,t,`dismissed`,{aborted:!0})),i(Kf())},{once:!0})}),s=Promise.all([r,i]).then(([,e])=>{if(e===`aborted`)throw Kf();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 nm(e,t={}){return em(e,{...t,container:`drawer`,placement:void 0})}var rm=`[data-wui-pane-host]`;function im(e,t={}){try{if(!e)throw TypeError(`WUI.pane.load: a fragment url is required.`);let n=op(t.target);if(!n)throw TypeError(`WUI.pane.load: the target is not an <app-detail-pane>.`);if(t.signal?.aborted)return Promise.reject(Kf());$p(document);let r=Dp(n),i=Op(r,e,t);n.hidden=!1,n.setAttribute(`data-open`,``);let a=Fp(r,i);return tm(r,i,t,Promise.resolve(),a,`WUI.pane.load`)}catch(e){return Promise.reject(e)}}function am(e){let t=op(e);if(!t)throw TypeError(`WUI.pane.close: the target is not an <app-detail-pane>.`);let n=Vf.get(t);n?.session&&kp(n,n.session,`dismissed`,null)}var om=`wuiConfirm`,sm=Object.freeze([`danger`]),cm=Object.freeze([`success`,`info`,`warning`,`danger`]),lm=e=>cm.some(t=>t===e),um=`wui.flash`,dm=()=>P(`confirmDialog`,Xd),fm=new WeakSet,pm=new WeakSet,mm=null,hm=null,gm=!1,_m=(e,t)=>{e&&Y().toast(e,{variant:t})};function vm(){let e=document.getElementById(om);if(e)return j(e.closest(`wui-modal`),`#${om} must be a wui-modal.`);let t=document.createElement(`wui-modal`);t.id=om;let n=document.createElement(`dialog`);return n.className=`modal wui-modal-shell`,n.style.setProperty(`--wui-modal-max-width`,`${jf.md}px`),n.replaceChildren(N(`div`,{class:`modal-dialog modal-dialog-centered wui-rb-dialog`},N(`div`,{class:`modal-content wui-modal wui-confirm`},N(`div`,{class:`wui-modal-body`},N(`div`,{class:`wui-confirm-content`},N(`span`,{class:`wui-confirm-icon`},N(`wui-status-icon`,{tone:`info`,size:120})),N(`h3`,{class:`wui-confirm-title`,tabindex:-1,"data-autofocus":``}),N(`p`,{class:`wui-confirm-msg`}))),N(`div`,{class:`wui-modal-footer`},N(`div`,{class:`wui-confirm-actions`},N(`button`,{type:`button`,class:Si(`primary`,`soft`,`md`),"data-wui-dismiss":``,"data-wui":vi},dm().cancelLabel),N(`button`,{type:`button`,class:Si(`primary`,`solid`,`md`),"data-app-confirm":``,"data-wui":vi})))))),t.append(n),document.body.appendChild(t),t}function ym(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!sm.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);bm({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 bm({title:e,message:t,label:n,danger:r},i){let a=vm(),o=a.querySelector(`.wui-confirm-title`),s=a.querySelector(`[data-app-confirm]`);if(!o||!s)throw Error(`#${om} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${om}"> 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||dm().confirmTitle;o.textContent=l,c.textContent=t,s.textContent=n||dm().confirmLabel,s.classList.toggle(`btn-danger`,r),s.classList.toggle(`btn-primary`,!r),a.querySelector(`wui-status-icon`)?.setAttribute(`tone`,r?`delete`:`info`),j(a.querySelector(`dialog`),`#${om} has no <dialog>.`).setAttribute(`aria-label`,l),hm=i,gm=!1,a.show()}var xm=(e,t)=>{mm=e;try{t()}finally{mm=null}},Sm=(e,t)=>{let n=Reflect.get(e,t);if(n===void 0||typeof n==`string`)return n;throw TypeError(`confirmAction: ${t} must be text.`)},Cm=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:Sm(e,`title`),message:t,label:Sm(e,`label`),tone:Sm(e,`tone`)}};function wm(e,t,n){let{title:r,message:i,label:a,tone:o}=Cm(t);if(o!=null&&!sm.includes(o))throw TypeError(`confirmAction: tone "${o}" is not supported. Use danger, or leave it off.`);qm(e.ownerDocument),bm({title:r,message:i,label:a,danger:o===`danger`},()=>xm(e,n))}var Tm=e=>`disabled`in e&&e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`,Em=e=>{ze(e,HTMLElement,`data-wui-confirm needs an HTML element to click.`).click()};function Dm(e){let t=M(e.target,`[data-wui-confirm]:not(form)`);t&&t!==mm&&!Tm(t)&&(e.preventDefault(),e.stopImmediatePropagation(),ym(t,()=>xm(t,()=>Em(t))))}function Om(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===mm||e.submitter&&e.submitter===mm||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;ym(t,()=>xm(t,()=>t.requestSubmit(r)))}function km(e){let t=M(e.target,`#${om} [data-app-confirm]`);t&&!t.hasAttribute(`disabled`)&&hm&&(gm=!0,j(t.closest(`wui-modal`),`#${om} is missing around its confirm button.`).hide())}function Am(e){if(!(e.target instanceof Element)||e.target.id!==`wuiConfirm`)return;let t=gm?hm:null;hm=null,gm=!1,t?.()}function jm(e,t){e&&window.sessionStorage.setItem(um,JSON.stringify({message:e,variant:t}))}var Mm=e=>e===`forbidden`?dm().forbiddenMessage:e===`networkCheck`?P(`httpFailure`,jc).networkCheckText:e===`network`?dm().networkMessage:e===`timeout`?dm().timeoutMessage:dm().failedMessage;function Nm(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.getAttribute(`data-refresh-on-success`)!==`false`&&_f(e)?.reload()}var Pm=(e,t)=>{`disabled`in e&&(e.disabled=t)};async function Fm(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 Im(t,e)}async function Im(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.`);Pm(t,!0),t.setAttribute(`aria-busy`,`true`);let i=await oc(e,{method:`POST`,body:n,timeoutMs:nc(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`)?(jm(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload()):(Pm(t,!1),t.removeAttribute(`aria-busy`),i.ok?(wf(i,a),Nm()):_m(i.message||Mm(i.kind),`danger`))}function Lm(e,t){Pm(e,!1),e.removeAttribute(`aria-busy`),L(t),_m(dm().failedMessage,`danger`)}function Rm(e){let t=M(e.target,`[data-wui-post]`);t&&(e.preventDefault(),Tm(t)||t.getAttribute(`aria-busy`)===`true`||Fm(t).catch(e=>Lm(t,e)))}function zm(e){let t=M(e.target,`form[data-wui-post-form]`);if(!(t instanceof HTMLFormElement)||e.defaultPrevented)return;e.preventDefault();let n=j(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(j(t.getAttribute(`action`),`A data-wui-post-form needs an action attribute to post to.`),document.baseURI).href;Im(r,n,new FormData(t)).catch(e=>Lm(n,e)),t.closest(`wui-dropdown`)?.hide()}var Bm=(e,t)=>{e.disabled=!1,e.removeAttribute(`aria-busy`),t&&Uo(t,null)};async function Vm(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&&Uo(t,`saving`);let r=nc(e.getAttribute(`data-wui-timeout`))??3e4,i=await oc(n,{method:(e.dataset.method||`post`).toUpperCase(),timeoutMs:r});if(i.kind===`session`)return;if(i.kind===`aborted`){Bm(e,t);return}if(i.ok){jm(i.message,i.toastVariant||`success`),i.redirect?window.location.assign(i.redirect):window.location.reload();return}let a=i.message||Mm(i.kind);e.disabled=!1,e.removeAttribute(`aria-busy`),t&&Uo(t,`error`,a),_m(a,`danger`)}function Hm(e){let t=M(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`);Vm(t,n).catch(e=>{Bm(t,n),L(e),_m(dm().failedMessage,`danger`)})}function Um(){let e=window.sessionStorage.getItem(um);if(!e)return;window.sessionStorage.removeItem(um);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`||!lm(r))throw TypeError(`stored flash variant "${String(r)}" is not supported.`);if(typeof n!=`string`)throw TypeError(`stored flash message is not text.`);_m(n,r)}function Wm(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(!lm(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${cm.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||(e.textContent??``).trim();e.remove(),_m(n,t)}}var Gm=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.form:null;function Km(e){if(!(e.target instanceof Element))return;let t=e.target.closest(`[data-wui-auto-submit]`);if(!t)return;let n=Gm(e.target)||t.closest(`form`);n instanceof HTMLFormElement&&n.requestSubmit()}function qm(e){pm.has(e)||(pm.add(e),e.addEventListener(`click`,km),e.addEventListener(`wui-modal-closed`,Am))}function Jm(e=document){let t=e instanceof Element?e.ownerDocument:e;fm.has(t)||(fm.add(t),t.addEventListener(`click`,Dm,!0),t.addEventListener(`submit`,Om,!0),qm(t),t.addEventListener(`click`,Rm),t.addEventListener(`click`,Hm),t.addEventListener(`submit`,zm),t.addEventListener(`change`,Km),Um()),Wm(e)}var Ym=()=>P(`unsavedChanges`,Yd),Xm=`form[data-wui-unsaved]`,Zm=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,Qm=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,$m=new Set([`submit`,`button`,`reset`,`image`]),eh=new Set([`hidden`,`checkbox`,`radio`,`file`,`submit`,`button`,`reset`,`image`,`range`,`color`]),th=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,nh=e=>th(e)?e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled:`disabled`in e&&!!e.disabled,rh=e=>`name`in e&&typeof e.name==`string`&&e.name!==``,ih=e=>typeof e==`object`&&!!e,ah=e=>Array.isArray(e)&&e.every(e=>Array.isArray(e)&&typeof e[0]==`string`);function oh(e){let t=JSON.parse(e);if(!ah(t))throw Error(`unsaved-changes snapshot is malformed`);return t}var sh=new WeakMap,ch=new WeakSet,lh=e=>`${e.name}:${e.size}:${e.lastModified}`,uh=e=>[...e.querySelectorAll(Xm)].filter(e=>e instanceof HTMLFormElement);function dh(e){let t=[];for(let n of e.elements)rh(n)&&!nh(n)&&(th(n)&&$m.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(lh)]):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 fh(e){return dh(e)}function ph(e,t){let n=new Map,r=oh(t);for(let e of r){let t=n.get(e[0]);t?t.push(e):n.set(e[0],[e])}let i=oh(dh(e)).map(e=>n.get(e[0])?.shift()??e);for(let e of n.values())i.push(...e);return JSON.stringify(i)}function mh(e){for(let t of e.elements)if(th(t)&&t.name&&!nh(t)){if(t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!eh.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 hh=e=>({saved:e.querySelector(Zm)&&mh(e)?null:dh(e),engaged:!1,discarded:!1});function gh(e){let t=sh.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&dh(e)!==t.saved}var _h=(e,t)=>uh(e).filter(e=>e!==t&&gh(e));function vh(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||Ym().message;wm(e,{title:Ym().title,message:r,label:Ym().leaveLabel,tone:`danger`},()=>{for(let e of t){let t=sh.get(e);t&&(t.discarded=!0)}n()})}function yh(e){if(e.matches(Qm))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 bh(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 xh(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target,n=M(t,`a[href]`);if(!(n instanceof HTMLAnchorElement)||!yh(n))return;let r=_h(n.ownerDocument,null);r.length&&(e.preventDefault(),vh(n,r,()=>n.click()))}function Sh(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!bh(t,e.submitter))return;let n=_h(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;vh(t,n,()=>t.requestSubmit(i));return}let r=sh.get(t);r&&(r.saved=dh(t),r.discarded=!1)}function Ch(e){_h(document,null).length&&e.preventDefault()}function wh(e){let t=e.target,n=M(t,Xm);return n instanceof HTMLFormElement?n:null}function Th(e){let t=wh(e);if(!t)return;let n=sh.get(t);n&&!n.engaged&&(n.saved!==null&&(n.saved=dh(t)),n.engaged=!0)}function Eh(e){let t=wh(e),n=t&&sh.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function Dh(e){for(let t of uh(e)){let e=sh.get(t);e?.saved&&(e.saved=ph(t,e.saved))}}function Oh(e){let t=ih(e)?e.handle:void 0;return ih(t)?t.el:void 0}function kh(e){if(!(e instanceof CustomEvent))return;let t=Oh(e.detail);if(t instanceof Element)for(let e of uh(t))jh(e)}function Ah(e=document){let t=e instanceof Document?e:e.ownerDocument;if(!ch.has(t)){ch.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,Th,!0);for(let e of[`input`,`change`])t.addEventListener(e,Eh,!0);t.addEventListener(`click`,xh),t.addEventListener(`submit`,Sh),t.addEventListener(`wui:modal:success`,kh),t.addEventListener(hn,()=>Dh(t)),j(t.defaultView,`unsaved-changes guard needs a document with a window`).addEventListener(`beforeunload`,Ch)}let n=uh(e);e instanceof HTMLFormElement&&e.matches(Xm)&&n.unshift(e);for(let e of n)sh.has(e)||sh.set(e,hh(e))}function jh(e){if(!(e instanceof HTMLFormElement)||!e.matches(Xm))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);sh.set(e,{saved:dh(e),engaged:!1,discarded:!1})}var Mh=()=>P(`drawer`,kc),Nh=`wui:drawer:discard`,Ph=`wui-drawer[confirm-discard]`,Fh=`wui-modal`,Ih=`data-wui-no-discard`,Lh=`.wui-drawer-discard`,Rh=`input, select, textarea`,zh=e=>typeof e==`object`&&!!e||typeof e==`function`;function Bh(e){let t=e.currentTarget;if(!(t instanceof Document))throw Error(`The discard guard is not wired on a document.`);return t}function Vh(e,t){return M(e,t)}var Hh=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement,Uh=new WeakMap,Wh=new WeakSet,Gh=new WeakSet;function Kh(e,t,n,r,i){let a=e.createElement(`button`);return a.type=`button`,a.className=Si(t,n,`sm`),a.dataset.wui=vi,a.setAttribute(r,``),a.textContent=i,a}function qh(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,Kh(e,`danger`,`solid`,`data-wui-discard-confirm`,Mh().discardLabel),Kh(e,`primary`,`soft`,`data-wui-discard-keep`,Mh().keepLabel)),n}function Jh(e){if(!(e instanceof Element))return null;let t=e.closest(Ph);if(t)return t;let n=e.closest(Fh);return n&&Zh(n).length?n:null}function Yh(e){return e.closest(Ph)??e.closest(Fh)}function Xh(e,t){return t.hasAttribute(Ih)||e.hasAttribute(Ih)?!1:t.hasAttribute(`confirm-discard`)||e.hasAttribute(`data-wui-confirm-discard`)?!0:(e.getAttribute(`method`)||`get`).toLowerCase()!==`get`}function Zh(e){return e.matches(Ph)?e.querySelectorAll(`form`):[...e.querySelectorAll(`form`)].filter(t=>Xh(t,e))}function Qh(e){let t=Uh.get(e);return t!=null&&fh(e)!==t}function $h(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,j(e.querySelector(`.wui-drawer-panel`),`The drawer has no panel to hold its footer.`).append(t),Gh.add(t),t}function eg(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),Gh.add(t),t}function tg(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 ng(e,t,n){let r=e.querySelector(Lh);if(r){tg(r);return}let i=qh(e.ownerDocument,t),a;if(e.matches(Ph))a=e.querySelector(`.wui-drawer-footer`)??$h(e),a.prepend(i);else if(e.hasAttribute(`confirm-discard`))a=e.querySelector(`.wui-modal-footer`)??eg(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`)??eg(e),a.prepend(i)}a.classList.add(`wui-drawer-discarding`),tg(i)}function rg(e){let t=e.parentElement;if(e.remove(),!t)throw Error(`The discard prompt has no footer.`);t.classList.remove(`wui-drawer-discarding`),Gh.has(t)&&t.remove()}function ig(e){for(let t of Zh(e))for(let e of t.querySelectorAll(Rh))if(Hh(e)&&e.type!==`hidden`&&!e.disabled){e.focus({preventScroll:!0});return}}function ag(e){let t=Jh(e.target);if(t)for(let e of Zh(t))Uh.get(e)??Uh.set(e,fh(e))}function og(e){for(let t of Bh(e).querySelectorAll(`form`)){let e=Uh.get(t);e!=null&&Uh.set(t,ph(t,e))}}function sg(e){let t=e.target;t instanceof HTMLFormElement&&Jh(t)&&Uh.set(t,fh(t))}function cg(e){if(!zh(e))return;let t=`handle`in e?e.handle:void 0;if(zh(t))return`el`in t?t.el:void 0}function lg(e){if(!(e instanceof CustomEvent))return;let t=e.detail,n=cg(t);if(n instanceof Element)for(let e of n.querySelectorAll(`form`))Uh.delete(e)}function ug(e){let t=e.target;t instanceof Element&&t.matches(Ph)&&[...Zh(t)].some(Qh)&&(e.preventDefault(),ng(t,t.getAttribute(`confirm-discard`),null))}function dg(e){let t=e.target;if(!(t instanceof Element)||!t.matches(Fh))return;let n=[...Zh(t)].find(Qh);n&&(e.preventDefault(),ng(t,n.getAttribute(`data-wui-confirm-discard`)??t.getAttribute(`confirm-discard`)??Mh().confirmDiscard,n))}function fg(e){let t=j(e.closest(Lh),`The discard button is outside its prompt.`),n=Yh(t);if(rg(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);for(let e of Zh(n))Uh.set(e,fh(e));n.dispatchEvent(new CustomEvent(Nh,{bubbles:!0})),n.matches(Ph)?j(n.closest(`wui-drawer`),`The confirm-discard drawer is not a wui-drawer.`).hide():j(n.closest(`wui-modal`),`The discarded dialog is not a wui-modal.`).hide()}function pg(e){let t=j(e.closest(Lh),`The keep button is outside its prompt.`),n=Yh(t);if(rg(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);ig(n)}function mg(e){let t=Vh(e.target,`[data-wui-discard-confirm]`);if(t){fg(t);return}let n=Vh(e.target,`[data-wui-discard-keep]`);n&&pg(n)}function hg(e=document){let t=e instanceof Document?e:e.ownerDocument;Wh.has(t)||(Wh.add(t),t.addEventListener(`focusin`,ag),t.addEventListener(`pointerdown`,ag),t.addEventListener(`submit`,sg),t.addEventListener(hn,og),t.addEventListener(`wui:modal:success`,lg),t.addEventListener(`wui:modal:loaded`,lg),t.addEventListener(`wui-drawer-close`,ug,!0),t.addEventListener(`wui-modal-close`,dg),t.addEventListener(`click`,mg))}var gg={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=()=>P(`shell`,gg),_g=31536e3,vg=new WeakMap;function yg(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?bg(n):String(n)}var bg=e=>e>99?`99+`:String(e),xg=(e,t)=>Object.entries(t).reduce((e,[t,n])=>e.replaceAll(`{${t}}`,()=>String(n)),e);function Sg(e,t,n=document){try{n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${_g}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}function Cg(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=${_g}; 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},wg=(e,t,n)=>{let r=e?.closest(t);return r instanceof n?r:null},Tg=(e,t,n)=>e?[...e.querySelectorAll(t)].filter(e=>e instanceof n):[],Eg=e=>{if(!(e.target instanceof Element))throw Error(`event target is not an element`);return e.target},Dg=e=>{let t=e.getAttribute(`href`);if(t===null)throw Error(`search hit has no href`);return t},Og=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function kg(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=()=>j(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),_=sc(),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=bg(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?u:xg(h,{label:u,count:bg(o)})),a&&s&&i&&(i.textContent=o===0?p:xg(m,{count:bg(o)}))},b=()=>s?je(s):!1,x=()=>{let e=Og(`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(Og(`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=Rs(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(Og(`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=Eg(e);if(t.closest(`[data-wui-bell-retry]`)){await S(!0);return}let n=wg(t,`[data-wui-bell-read]`,HTMLButtonElement);if(!n||!l)return;n.disabled=!0;let r=await oc(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 Ag=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),jg=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function Mg(e,t){let n=j($(e,`input.search-input`,HTMLInputElement),`search input missing`),r=$(e,`.wui-topsearch-results`,HTMLElement),i=()=>j(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=sc(),g,_=-1,v=()=>Tg(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(jg(s,c,t));if(n.kind!==`aborted`&&n.kind!==`stale`&&n.kind!==`session`){if(e.classList.remove(`is-loading`),n.ok){let e=Rs(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:xg(r===1?m:p,{count:r}))}else i().replaceChildren(Og(`wui-topsearch-empty`,Q().searchUnavailableMessage));_=-1,x()}};n.addEventListener(`input`,()=>{clearTimeout(g);let t=n.value.trim();t.length<u?(h.abort(),e.classList.remove(`is-loading`),i().replaceChildren(),b()):g=setTimeout(()=>w(t),d)}),n.addEventListener(`keydown`,t=>{if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(i().hidden||v().length===0)return;t.preventDefault(),y(_+(t.key===`ArrowDown`?1:-1))}else if(ir(t)){let e=v(),r=_>=0?e[_]:void 0;!i().hidden&&r?(t.preventDefault(),C(Dg(r))):l&&n.value.trim()!==``&&(t.preventDefault(),C(jg(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=wg(Eg(e),`.wui-topsearch-hit`,HTMLElement);!t||e.ctrlKey||e.metaKey||e.shiftKey||e.button===1||(e.preventDefault(),C(Dg(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||Ag(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 Ng(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>{Sg(n,!!e.detail?.collapsed)});let r=e.dataset.wuiFoldedCookie;r&&e.addEventListener(`wui:shell:nav-fold`,e=>{Cg(r,e.detail?.key,!!e.detail?.folded)}),e.addEventListener(`click`,t=>{Eg(t).closest(`[data-wui-tabbar-more]`)&&$(e,`[data-app-shell-menu]`,HTMLElement)?.click()});let i=$(e,`[data-wui-bell]`,HTMLElement),a=i?kg(i,t):null,o=$(e,`[data-wui-topsearch]`,HTMLElement);o&&Mg(o,t);let s={el:e,setUnread(e){j(a,`WUI.shell: this <app-shell> has no <app-shell-notifications>.`).setUnread(e)},setTabCount(t,n,r){yg(e,t,n,r)},refreshNotifications(){return j(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)}};vg.set(e,s);let c=n=>{if(n.target===e||n.target instanceof Node&&n.target.contains(e)){for(let e of t)e();vg.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,c)}};return document.addEventListener(`wui:teardown`,c),s}function Pg(e=document){let t=[];e instanceof HTMLElement&&e.matches(`[data-app-shell]`)&&t.push(e),t.push(...Tg(e,`[data-app-shell]`,HTMLElement));for(let e of t)e.dataset.wuiPartsWired||(e.dataset.wuiPartsWired=`1`,Ng(e))}function Fg(e){let t=wg(e,`[data-app-shell]`,HTMLElement);return t?(vg.has(t)||Pg(t),vg.get(t)??null):null}var Ig=new Set([204,205,304]),Lg=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 Rg(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`,[Js]:`1`,...n.headers};if(Qs(e)){let e=Zs();e&&(i[e.header]=e.token)}let a=n.signal;return a?.aborted?ac(`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(ac(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=Lg(s.getAllResponseHeaders()),n=$s(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(Ig.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 zg=`data-wui-submit-once`,Bg=`data-wui-submit-pending`,Vg=`wui-submit-spinner`,Hg=new WeakSet,Ug=new WeakMap;function Wg(e){return e instanceof HTMLButtonElement||e instanceof HTMLInputElement?e:null}function Gg(e){if(e.setAttribute(`aria-busy`,`true`),e.tagName===`INPUT`||e.querySelector(`.${Vg}`))return;let t=e.ownerDocument.createElement(`span`);t.className=`spinner-border spinner-border-sm me-2 ${Vg}`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t)}function Kg(e){e.removeAttribute(`aria-busy`),e.querySelector(`.${Vg}`)?.remove()}function qg(e){return e.method===`post`&&e.target!==`_blank`&&e.getAttribute(`data-wui-submit-once`)!==`off`}function Jg(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!qg(t))return;if(t.hasAttribute(Bg)){e.preventDefault();return}t.setAttribute(Bg,``);let n=Wg(e.submitter);setTimeout(()=>{t.hasAttribute(Bg)&&(e.defaultPrevented?t.removeAttribute(Bg):n&&(n.disabled=!0,Gg(n),Ug.set(t,n)))},0)}var Yg=e=>[...e.querySelectorAll(`form[${Bg}]`)].filter(e=>e instanceof HTMLFormElement);function Xg(e){for(let t of Yg(e)){t.removeAttribute(Bg);let e=Ug.get(t);e&&(e.disabled=!1,Kg(e),Ug.delete(t))}}function Zg(e){let t=e.ownerDocument===null?e:e.ownerDocument;Hg.has(t)||(Hg.add(t),t.addEventListener(`submit`,Jg,!0),t.defaultView?.addEventListener(`pageshow`,()=>Xg(t)))}var Qg=[`light`,`dark`,`auto`],$g=[`wave`,`circle`,`slide`,`blinds`,`fade`,`none`],e_=`fade`,t_=`theme`,n_={wave:1100,circle:700,slide:600,blinds:900,fade:350,none:0},r_=`wui-theme-switching`,i_=`wui:theme:change`,a_=`(prefers-color-scheme: dark)`,o_=e=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(e).matches,s_=e=>Qg.some(t=>t===e);function c_(e){return e===`dark`||e===`auto`&&o_(a_)?`dark`:`light`}function l_(e=t_){let t=null;try{t=window.localStorage.getItem(e)}catch(e){if(!(e instanceof DOMException))throw e}return s_(t)?t:`auto`}function u_(e,t=t_){try{window.localStorage.setItem(t,e)}catch(e){if(!(e instanceof DOMException))throw e}}function d_(e){let t=document.documentElement,n=c_(e);t.setAttribute(`data-theme`,e),t.setAttribute(`data-bs-theme`,n),document.dispatchEvent(new CustomEvent(i_,{detail:{mode:n,preference:e}}))}var f_=`((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 p_(e=t_){return`${f_}${JSON.stringify(String(e)).replace(/</g,`\\u003c`)})`}function m_(e,{includeAuto:t=!1}={}){return e===`light`?`dark`:e===`dark`&&t?`auto`:`light`}function h_(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(a_),n=()=>e(t.matches?`dark`:`light`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var g_=60,__=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,v_=e=>e.toFixed(1),y_=(e,t)=>`${v_(e)}px ${v_(t)}px`,b_={amplitude:22,segments:36,cycles:1.5,ripples:2},x_=6,S_=(e,t,n,r,i)=>{let{amplitude:a,segments:o,cycles:s}=b_,c=n*(t+2*a),l=i?t+a-c:c-a,u=i?t+2*a:-2*a,d=[y_(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(y_(n,i))}return d.push(y_(e,u)),`polygon(${d.join(`, `)})`},C_=(e,t,n,r)=>{let i=t/x_,a=[];for(let t=0;t<x_;t++){let o=t*i,s=i*n,c=r?o+i-s:o,l=r?o+i:o+s;a.push(y_(0,c),y_(e,c),y_(e,l),y_(0,l))}return`polygon(${a.join(`, `)})`};function w_(e,{width:t,height:n,to:r=`dark`,origin:i}){let a=r===`dark`,o=[];for(let r=0;r<=g_;r++){let s=r/g_,c=__(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(${v_(a*c)}px at ${v_(e)}px ${v_(r)}px)`});break}case`slide`:{let e=n*(1-c);o.push({clipPath:a?`inset(${v_(e)}px 0px 0px 0px)`:`inset(0px 0px ${v_(e)}px 0px)`});break}case`blinds`:o.push({clipPath:C_(t,n,c,a)});break;case`fade`:o.push({clipPath:`none`,opacity:c});break;case`none`:return[];default:o.push({clipPath:S_(t,n,c,s*b_.ripples*2*Math.PI,a)})}}return o}var T_=e=>{e instanceof DOMException&&(e.name===`AbortError`||e.name===`InvalidStateError`)||L(`[@webority/ui-elements] The theme view transition failed:`,e)};function E_(e,{effect:t=e_,to:n,origin:r,duration:i}={}){let a=document.documentElement,o=n!==void 0&&a.getAttribute(`data-bs-theme`)===n;if(t===`none`||o||o_(`(prefers-reduced-motion: reduce)`)||typeof document.startViewTransition!=`function`||typeof a.animate!=`function`)return e(),Promise.resolve(!1);a.classList.add(r_);let s=document.startViewTransition(e),c=i??n_[t]??n_.fade;return s.ready.then(()=>{let e=w_(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(T_),s.finished.catch(T_).finally(()=>a.classList.remove(r_)).then(()=>!0)}function D_(){Ut(),i(`wui-select`,Qr),i(`wui-modal`,Wt)}return globalThis.WeborityUiElementsInternal||(globalThis.WeborityUiElementsInternal={version:`0.178.3`,modules:ul}),Dn(),D_(),e.AVATAR_ACCEPT=fl,e.AVATAR_MAX_SIZE_MB=pl,e.AVATAR_OUTPUT_SIZE=ml,e.AVATAR_OUTPUT_TYPE=hl,e.AVATAR_PREVIEW_SIZES=gl,e.BAR_BULK_IN_BAR_ATTRIBUTE=qu,e.COLUMN_MAX_WIDTH=io,e.COLUMN_MIN_WIDTH=ro,e.COMMAND_SHORTCUT_ATTRIBUTE=Nl,e.CONFIRM_DIALOG_ID=om,e.CONFIRM_TONES=sm,e.COPY_FEEDBACK_MS=$a,e.CSRF_META_NAME=Ws,e.CURRENCIES=Hi,e.CURRENCY_SYMBOLS=wi,e.DATE_PATTERNS=Gi,e.DEFAULT_CSRF_HEADER=Gs,e.DEFAULT_CURRENCY=Ci,e.DEFAULT_IMAGE_ACCEPT=Gl,e.DEFAULT_MAX_SIZE_MB=Kl,e.DEFAULT_PASSWORD_RULES=rd,e.DEFAULT_THEME_EFFECT=e_,e.DEFAULT_THEME_STORAGE_KEY=t_,e.DISCARD_EVENT=Nh,e.DROP_OVER_CLASS=dd,e.DURATION_UNITS=Wi,e.FILTER_POPOVER_MAX_CHIPS=jt,e.FLASH_STORAGE_KEY=um,e.FLASH_VARIANTS=cm,e.FORMAT_STYLES=Vi,e.HTTP_KINDS=Ys,e.IST_TIME_ZONE=H,e.MASK_INPUT_TYPES=mu,e.MASK_NAMES=Cu,e.MENTION_ID_PATTERN=Yo,e.MONEY_UNITS=Ui,e.NOTIFICATION_COUNT_CAP=ps,e.PIN_AT_VAR=Eo,e.PIN_SIDES=so,e.RESIZE_STEP=ao,e.RESIZE_STEP_LARGE=oo,e.ROW_DRAG_TYPE=fd,e.ROW_DROP_EVENT=ud,e.ROW_HEIGHTS=lo,e.ROW_MOVE_LIMIT=Ao,e.ROW_MOVE_MS=jo,e.ROW_SAVE_ATTR=zo,e.ROW_SAVE_ERROR_CLASS=Bo,e.ROW_SAVE_STATES=Ro,e.SCROLL_EDGE_SELECTOR=Bd,e.SEARCH_OPEN_KEY=bl,e.SELECT_CELL_CLASS=G,e.SHORTCUTS_OFF_ATTRIBUTE=st,e.SHORTCUT_EVENT=lt,e.SHORTCUT_SCOPE_ATTRIBUTE=ct,e.SUBMIT_ONCE_ATTRIBUTE=zg,e.THEME_BOOT_SCRIPT_BODY=f_,e.THEME_CHANGE_EVENT=i_,e.THEME_EFFECTS=$g,e.THEME_EFFECT_DURATION=n_,e.THEME_MODES=Qg,e.THEME_SWITCHING_CLASS=r_,e.TOAST_ACTION_METHODS=zs,e.TOAST_ACTION_MS=yf,e.VIRTUAL_OVERSCAN=co,e.WUI_HEADERS=W,e.WuiSelect=Qr,e.acceptDroppedFiles=cu,e.acceptLabel=au,e.addRowSelectCells=xc,e.addSelectColumn=Sc,e.applyBarBulk=ed,e.applyTheme=d_,e.ariaKeyShortcuts=xt,e.attachFileDrop=lu,e.attachInputMask=Ru,e.attachRowDrag=Id,e.attachScrollEdges=Hd,e.attachShiftRange=Tc,e.avatarCropOptions=yl,e.avatarUnreadableMessage=vl,e.barBulkCountText=Xu,e.buildPasswordRules=od,e.clampColumnWidth=yo,e.classifyStatus=$s,e.closeRemotePane=am,e.collapseSearch=kl,e.configureCsrf=qs,e.confirmAction=wm,e.copyTextToClipboard=eo,e.createDiscardPrompt=qh,e.createRequestQueue=sc,e.createSelectHeaderCell=hc,e.createSelectRowCell=gc,e.createSelectSpacerCell=_c,e.currencyPrefix=Ei,e.deriveStepStatus=lc,e.emptyValueLabel=U,e.evaluatePassword=sd,e.fillText=F,e.formValues=fh,e.formatCompact=ba,e.formatCurrency=va,e.formatDate=Ea,e.formatDateTime=Aa,e.formatDuration=Ca,e.formatFileSize=nu,e.formatMasked=ju,e.formatNumber=_a,e.formatPercent=xa,e.formatRelativeTime=As,e.formatValue=Oa,e.getServerTable=_f,e.getShell=Fg,e.glyphNode=R,e.groupCount=vo,e.groupItems=bo,e.groupNotificationsByDay=xs,e.identityCell=Vo,e.inShortcutScope=Tt,e.initCollapsibleSearch=Ml,e.initCommandShortcuts=Hl,e.initDrawerDiscard=hg,e.initInputMasks=Ku,e.initPageBarBulk=td,e.initRemoteModals=$p,e.initRowDrag=zd,e.initScrollEdges=Jd,e.initServerActions=Jm,e.initServerTables=gf,e.initShellParts=Pg,e.initSubmitOnce=Zg,e.initUnsavedChanges=Ah,e.isCommandChord=Rl,e.isCurrencyCode=Ti,e.isHeicFile=_l,e.isImageFile=eu,e.isImageOnlyAccept=iu,e.isMaskPattern=Tu,e.isPdfFile=ru,e.isTimeZone=Mi,e.isTypingTarget=St,e.loadRemoteDrawer=nm,e.loadRemoteModal=em,e.loadRemotePane=im,e.maskedPostValue=Pu,e.matchSegments=Nc,e.matchesAccept=ou,e.measureRows=Fo,e.mentionLabel=Qo,e.mentionTextFromValue=ts,e.mentionValueFromText=ns,e.mentionedIds=rs,e.moveFocus=Dt,e.nextTheme=m_,e.notificationCountText=gs,e.notificationDayHeading=bs,e.notificationTime=ys,e.notificationTriggerLabel=_s,e.notificationUnreadAnnouncement=vs,e.openSearch=Ol,e.parseMentionValue=es,e.parseServerHtml=Rs,e.parseToastAction=Hs,e.passwordSatisfies=cd,e.pinAtValue=Do,e.pinClasses=ko,e.pinOffsetVar=To,e.planPins=Oo,e.playRowMoves=Io,e.pluralText=Qe,e.postedMasked=Au,e.rawMasked=ku,e.readColumnWidths=Co,e.readCsrf=Zs,e.readStoredTheme=l_,e.readText=P,e.relativeTimeTitle=js,e.resetUnsavedChanges=jh,e.resolveMask=Du,e.resolveTheme=c_,e.rowLabel=Ho,e.rowOrderChanged=Lo,e.runShortcut=Et,e.runToastAction=Tf,e.saveOutcomeText=Go,e.setRowSaveState=Uo,e.setText=Ye,e.settledRows=Wo,e.shortcutKey=bt,e.shortcutName=yt,e.shortcutsOff=wt,e.showResultToast=wf,e.stepperHeaderItems=uc,e.storeTheme=u_,e.syncSelectAll=Cc,e.syncTargets=Rd,e.themeBootScript=p_,e.themeKeyframes=w_,e.tickedKeys=Cd,e.timeZoneLabel=Na,e.timeoutFromAttribute=nc,e.toInstant=wa,e.todayIn=Ri,e.transitionTheme=E_,e.validateFile=su,e.virtualRange=xo,e.wallClockOf=Li,e.watchSystemTheme=h_,e.whenElementsReady=kn,e.withTrustedLabel=dr,e.writeColumnWidths=wo,e.wuiFetch=oc,e.wuiUpload=Rg,e.zoneOffsetMs=Pi,e.zoneParts=Ni,e})({});
1
+ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},r=n({defineElement:()=>i});function i(e,t){if(typeof customElements>`u`||customElements.get(e))return;let n=[];if(typeof document<`u`)for(let r of document.querySelectorAll(e))for(let i of Object.keys(r)){let a=Object.getOwnPropertyDescriptor(t.prototype,i);if(a&&(a.set||a.get)&&(n.push([r,i,Reflect.get(r,i)]),!Reflect.deleteProperty(r,i)))throw Error(`defineElement: could not clear the early "${i}" property on <${e}>.`)}customElements.define(e,t);for(let[t,r,i]of n)if(!Reflect.set(t,r,i))throw Error(`defineElement: could not restore the "${r}" property on <${e}>.`)}var a=n({ElementBase:()=>s,NO_DOM_MESSAGE:()=>o}),o=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(o);var s=HTMLElement,c=n({isRtl:()=>l,mirrorKey:()=>u});function l(e){return getComputedStyle(e).direction===`rtl`}function u(e,t){return t?e===`ArrowRight`?`ArrowLeft`:e===`ArrowLeft`?`ArrowRight`:e:e}var d=n({anchorOverlay:()=>T,bindReanchor:()=>E,unbindReanchor:()=>ee}),f=4,p=8,m=300,h=400;function g(e,t,n){let r=t.offsetWidth,i=t.offsetHeight,a=n?e.left-f-r<f:e.right+f+r>window.innerWidth-f,o=n?!a:a,s=o?e.left-f-r:e.right+f;t.style.left=`${Math.max(f,s)}px`,t.style.top=`${Math.max(f,Math.min(e.top,window.innerHeight-i-f))}px`,t.dataset.side=o?`start`:`end`}function _(e,t){return t?e===`start`?`end`:e===`end`?`start`:e:e}var v=8,y={top:`bottom`,bottom:`top`,start:`end`,end:`start`},b=[`bottom`,`top`,`end`,`start`];function x(e,t){return e===`bottom`?window.innerHeight-t.bottom:e===`top`?t.top:e===`end`?window.innerWidth-t.right:t.left}function S(e,t,n,r){return e===`start`?t:e===`end`?n-r:t+(n-t-r)/2}function C(e,t,n){return Math.max(v,Math.min(e,t-n-v))}function w(e,t,n,r){let i=r.gap??f,a=r.align??`start`,o=t.offsetWidth,s=t.offsetHeight,c=n===`auto`?b.reduce((t,n)=>x(n,e)>x(t,e)?n:t):n,l=c===`top`||c===`bottom`,u=(l?s:o)+i,d=x(c,e)<u&&x(y[c],e)>x(c,e)?y[c]:c,p=s;if(r.clampHeight){let n=d===`bottom`?window.innerHeight-e.bottom-i-f:d===`top`?e.top-i-f:window.innerHeight-8;n<s&&(p=Math.max(n,0),t.style.maxHeight=`${p}px`)}let m,h;if(l){h=d===`bottom`?e.bottom+i:Math.max(f,e.top-p-i);let t=S(a,e.left,e.right,o);r.flipAlign&&a===`start`&&t+o>window.innerWidth-f&&e.right-o>=f?t=e.right-o:r.flipAlign&&a===`end`&&t<f&&e.left+o<=window.innerWidth-f&&(t=e.left),m=Math.max(f,Math.min(t,window.innerWidth-o-f))}else m=Math.max(f,d===`end`?e.right+i:e.left-o-i),h=Math.max(f,Math.min(S(a,e.top,e.bottom,p),window.innerHeight-p-f));t.style.left=`${m}px`,t.style.top=`${h}px`,t.dataset.side=d;let g=r.arrow;if(g){if(l){let t=(e.left+e.right)/2-m-g.offsetWidth/2;g.style.left=`${C(t,o,g.offsetWidth)}px`}else{let t=(e.top+e.bottom)/2-h-g.offsetHeight/2;g.style.top=`${C(t,p,g.offsetHeight)}px`}}}function T(e,t,n={}){if(!e)throw Error(`anchorOverlay: missing trigger`);if(!t)throw Error(`anchorOverlay: missing panel`);t.style.position=`fixed`;let r=e.getBoundingClientRect(),i=e instanceof Element&&l(e);if(n.beside){g(r,t,i);return}if(n.side!==void 0){let e=n.clampHeight?Array.from(t.children,e=>[e,e.scrollTop]):[];t.classList.remove(`drop-up`),t.style.maxHeight=``,w(r,t,n.side===`auto`?`auto`:_(n.side,i),n);for(let[t,n]of e)t.scrollTop=n;return}let a=n.clampHeight?t.scrollTop:0;n.clampHeight&&(t.style.maxHeight=``);let o=t.offsetHeight,s=window.innerHeight-r.bottom,c=!n.below&&s<o+f&&r.top>s;if(t.classList.toggle(`drop-up`,c),t.style.top=c?`${Math.max(f,r.top-o-f)}px`:`${r.bottom+f}px`,n.clampHeight){let e=c?r.top-8:window.innerHeight-r.bottom-8;e<o&&(t.style.maxHeight=`${Math.max(e,0)}px`),t.scrollTop=a}n.matchWidth&&(r.width>=m?(t.style.minWidth=`${r.width}px`,t.style.width=`${r.width}px`,t.style.maxWidth=`${r.width}px`):(t.style.minWidth=`${r.width}px`,t.style.width=`max-content`,t.style.maxWidth=`${Math.min(h,window.innerWidth-8)}px`));let u=t.offsetWidth;if(n.alignEnd){let e=r.right-u,n=e>=p?e:r.left,i=Math.max(p,Math.min(n,window.innerWidth-u-p));t.style.left=`${i}px`}else{let e=n.flipAlign&&r.left+u>window.innerWidth-f&&r.right-u>=f,i=Math.min(e?r.right-u:r.left,window.innerWidth-u-f);t.style.left=`${Math.max(f,i)}px`}}function E(e,t){ee(e),e._reanchor=t,e._reanchorScroll=n=>{n.composedPath().includes(e)||t()},window.addEventListener(`resize`,e._reanchor),window.addEventListener(`scroll`,e._reanchorScroll,!0)}function ee(e){if(!e?._reanchor)return;window.removeEventListener(`resize`,e._reanchor);let t=e._reanchorScroll;t&&window.removeEventListener(`scroll`,t,!0),e._reanchor=null,e._reanchorScroll=null}var D=n({CLOSE_MOTION_LIMIT_MS:()=>400,CLOSING_ATTRIBUTE:()=>te,DISMISS_ATTRIBUTE:()=>k,OPEN_ATTRIBUTE:()=>O,closeAnchoredPopover:()=>Ae,closeModalDialog:()=>Oe,isPopoverOpen:()=>je,onOverlayRootChange:()=>Ie,openAnchoredPopover:()=>ke,openModalDialog:()=>De,overlayRoot:()=>Fe,raisePopover:()=>Ne,returnFocus:()=>we,setPopoverOpen:()=>Me,wireOpenTriggers:()=>Le}),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=Fe(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;Fe(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(Fe(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 Ae(t),e}E(t,()=>{!je(t)||!t.isConnected?me.get(t)?.():e.isConnected&&n.scrollSettling?.()?i():!e.isConnected||!n.keepOffscreen&&Te(e)?Ae(t):i()});let a=new ResizeObserver(()=>{je(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`&&je(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 Ae(e){je(e)&&e.hidePopover(),me.get(e)?.()}function je(e){return e.matches(`:popover-open`)}function Me(e,t){Pe(e),je(e)!==t&&(t?e.showPopover():e.hidePopover())}function Ne(e){if(Pe(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 Pe(e){if(!e.hasAttribute(`popover`))throw Error(`nativeOverlay: the panel has no popover attribute`)}function Fe(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 Ie(e,t=document){ce.has(t)||(ce.add(t),t.addEventListener(`toggle`,()=>Se(t),!0),t.addEventListener(`close`,()=>Se(t),!0));let n={last:Fe(t),listener:e};return fe(t).add(n),()=>{fe(t).delete(n)}}function Le(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 Re=n({closestOf:()=>M,elementOf:()=>ze,make:()=>N,must:()=>j});function j(e,t){if(e==null)throw Error(t);return e}function ze(e,t,n){if(!(e instanceof t))throw TypeError(n);return e}function M(e,t){return e instanceof Element?e.closest(t):null}function N(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 Be=n({fillText:()=>F,pluralText:()=>Qe,readText:()=>P,setText:()=>Ye,subscribeText:()=>Xe,textLocale:()=>Ze}),Ve=`en-IN`,He=/\{([A-Za-z0-9_]+)\}/g,Ue=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0,We,Ge=new Map,Ke=0,qe=new Set,Je=new Map;function Ye(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(!$e(i))throw RangeError(`Text ${e} must be an object of string keys.`);t.set(e,et(e,i))}}We=n,Ge=t,Ke+=1;for(let e of Array.from(qe))e()}function P(e,t){let n=Ge.get(e);if(n===void 0)return t;let r=Je.get(e);if(r!==void 0&&r.version===Ke&&r.english===t&&nt(r.merged,t))return r.merged;let i=tt(e,n,t);return Je.set(e,{version:Ke,english:t,merged:i}),i}function Xe(e){return qe.add(e),()=>{qe.delete(e)}}function Ze(){return We??Ve}function F(e,t){return e.replace(He,(e,n)=>Ue(t,n)?String(t[n]):e)}function Qe(e,t,n,r){let i=`${t}Other`;if(!Ue(e,i))throw RangeError(`Plural text ${t} has no ${i} key; every plural needs its Other form.`);let a=new Intl.PluralRules(Ze()).select(n),o=`${t}${a.charAt(0).toUpperCase()}${a.slice(1)}`,s=e[Ue(e,o)?o:i];if(s===void 0)throw RangeError(`Plural text ${t} has no ${o} key.`);return F(s,{count:n,...r})}function $e(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function et(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 tt(e,t,n){let r={};for(let[i,a]of Object.entries(t)){let t=Ue(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=rt(t);for(let t of rt(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 nt(e,t){let n=Object.keys(t);return Object.keys(e).length===n.length&&n.every(t=>Ue(e,t))}function rt(e){return Array.from(e.matchAll(He),e=>e[1]??``)}var it={closeLabel:`Close`,helpLabel:`Show these shortcuts`,nextItemLabel:`Next item`,openItemLabel:`Open the item`,previousItemLabel:`Previous item`,selectItemLabel:`Select the item`,sheetTitle:`Keyboard shortcuts`},at=n({SHORTCUTS_OFF_ATTRIBUTE:()=>st,SHORTCUT_EVENT:()=>lt,SHORTCUT_SCOPE_ATTRIBUTE:()=>ct,ariaKeyShortcuts:()=>xt,inShortcutScope:()=>Tt,isTypingTarget:()=>St,listKeys:()=>dt,moveFocus:()=>Dt,runShortcut:()=>Et,selectKey:()=>ft,shortcutKey:()=>bt,shortcutName:()=>yt,shortcutText:()=>ut,shortcutsOff:()=>wt}),ot=()=>P(`shortcutKeys`,it),st=`data-wui-shortcuts`,ct=`data-shortcut-scope`,lt=`wui:shortcut`,ut=()=>({title:ot().sheetTitle,close:ot().closeLabel,help:ot().helpLabel}),dt=()=>[{key:`J`,label:ot().nextItemLabel},{key:`K`,label:ot().previousItemLabel},{key:`Enter`,label:ot().openItemLabel}],ft=()=>({key:`X`,label:ot().selectItemLabel}),pt={"/":`slash`,"?":`help`,Escape:`esc`,Esc:`esc`,Enter:`enter`},mt={esc:`Esc`,escape:`Esc`,enter:`Enter`,slash:`/`,help:`?`},ht={esc:`Escape`,ctrl:`Control`,cmd:`Meta`,option:`Alt`,opt:`Alt`},gt=new Set([`checkbox`,`radio`,`button`,`submit`,`reset`,`range`,`color`,`file`,`image`]),_t=new Set([`textbox`,`searchbox`,`combobox`]),vt=`a[href], button, summary, input, select, textarea, [role="button"], [role="link"], [role="menuitem"], [role="option"], [role="tab"], [role="checkbox"], [role="switch"]`;function yt(e){if(!e||e.ctrlKey||e.metaKey||e.altKey)return null;let t=e.key;return typeof t!=`string`||!t?null:pt[t]?pt[t]:t.length===1&&t.trim()?t.toLowerCase():null}function bt(e){let t=String(e??``).trim();return t.length===1?t.toUpperCase():mt[t.toLowerCase()]??t}function xt(e){return String(e??``).trim().split(/\s+/).filter(Boolean).map(e=>ht[e.toLowerCase()]??(e.length===1?e.toUpperCase():e)).join(`+`)}function St(e){if(!e||!Ct(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!gt.has(t.toLowerCase())}return _t.has(e.getAttribute?.(`role`))}function Ct(e){return e.nodeType===1}function wt(e=typeof document>`u`?null:document){return e?.documentElement?.getAttribute(st)===`off`}function Tt(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 Et(e,t,n=null){let r=e.target instanceof Node?e.target:null;if(!t||e.defaultPrevented||wt(r?.ownerDocument??void 0))return!1;let i=yt(e);if(!i||!Tt(r,n)||St(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(vt)?!1:(e.preventDefault(),a(e),!0)}function Dt(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=j(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 Ot(e){"@babel/helpers - typeof";return Ot=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},Ot(e)}function kt(e,t){if(Ot(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Ot(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function At(e){var t=kt(e,`string`);return Ot(t)==`symbol`?t:t+``}function I(e,t,n){return(t=At(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jt=2,Mt=`wui-filter-popover-pinned`,Nt=`.wui-filter-popover-trigger`,Pt=`.wui-filter-popover-panel`,Ft=`.wui-filter-popover-head`,It=`input:not([type]),input[type="text"],input[type="search"]`,Lt=`a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1'])`;function Rt(){try{return sessionStorage.getItem(Mt)===`1`}catch{return!1}}function zt(e){try{e?sessionStorage.setItem(Mt,`1`):sessionStorage.removeItem(Mt)}catch(e){if(!(e instanceof DOMException))throw e}}function Bt(e){if(e===null||e instanceof Node)return e;throw TypeError(`event target is not a node`)}function Vt(e,t){let n=e?.querySelector(t)??null;return n instanceof HTMLElement?n:null}var Ht=class extends s{constructor(){super(),I(this,`_doc`,void 0),I(this,`_timer`,void 0),I(this,`_sticky`,void 0),I(this,`_closingByCode`,void 0),I(this,`_inside`,void 0),I(this,`_pendingSubmit`,void 0),I(this,`_onEnter`,void 0),I(this,`_onLeave`,void 0),I(this,`_onClick`,void 0),I(this,`_onChange`,void 0),I(this,`_onListClose`,void 0),I(this,`_onFocusOut`,void 0),I(this,`_onKeyDown`,void 0),I(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(Bt(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){zt(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(Bt(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(It))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&&Et(e,{f:()=>this._open(!0,!0)})}}get isOpen(){let e=this._panel;return e?je(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),Rt()&&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 Vt(this,Nt)}get _panel(){return Vt(this,Pt)}get _pin(){let e=this.querySelector(`${Ft} 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&&(Vt(n.querySelector(`.wui-filter-popover-grid`),Lt)??Vt(n,Lt))?.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{Ae(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 Ut(){i(`wui-filter-popover`,Ht)}var Wt=class extends s{static get observedAttributes(){return[`open`,`static`,`no-escape`]}constructor(){super(),I(this,`_doc`,void 0),I(this,`_release`,void 0),I(this,`_opener`,void 0),I(this,`_returnTo`,void 0),I(this,`_session`,void 0),I(this,`_closing`,void 0),I(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,Le(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}},Gt=n({avatarNode:()=>qt,safeImageUrl:()=>Kt}),Kt=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 qt(e,t=`wui-opt-avatar`){let n=Kt(e.avatar);return!n&&!e.initials?null:N(`span`,{class:`avatar ${t}`,"aria-hidden":`true`},N(`span`,{class:`avatar-face`},e.initials??``),n?N(`img`,{class:`avatar-img`,src:n,alt:``}):null)}var Jt=n({devError:()=>L,devWarn:()=>Yt});function Yt(e,...t){console.warn(e,...t)}function L(e,...t){console.error(e,...t)}var Xt=n({BUSY_CLASS:()=>Zt,isInert:()=>$t,isReadOnly:()=>Qt,syncFieldState:()=>en}),Zt=`wui-field-busy`,Qt=e=>e.hasAttribute(`readonly`),$t=e=>e.hasAttribute(`disabled`)||e.hasAttribute(`readonly`)||e.hasAttribute(`loading`);function en(e,t){let n=e.hasAttribute(`loading`);n?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`),t&&(t.classList.toggle(Zt,n),Qt(e)?t.setAttribute(`aria-readonly`,`true`):t.removeAttribute(`aria-readonly`))}var tn=n({syncFormMirror:()=>on,syncFormMirrors:()=>sn}),nn=`data-wui-mirror`;function rn(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 an(e){let t=document.createElement(`input`);return t.type=`hidden`,t.setAttribute(nn,``),e.appendChild(t),t}function on(e,t){let n=e.getAttribute(`name`)??``,r=e.querySelector(`:scope > input[${nn}]`),i=r instanceof HTMLInputElement?r:null;n?(i||=an(e),rn(e,i,n,t)):i?.remove()}function sn(e,t){let n=e.getAttribute(`name`)??``,r=[...e.querySelectorAll(`:scope > input[${nn}]`)].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)=>{rn(e,r[i]??an(e),n,t)})}var cn=n({hasOwn:()=>ln}),ln=(e,t)=>Object.getOwnPropertyDescriptor(e,t)!==void 0,un=Object.freeze({carousel:{entries:[`elements/carousel.ts`],tags:[`wui-carousel`]},"data-table":{entries:[`elements/data-table.ts`],tags:[`wui-data-table`]},dock:{entries:[`elements/dock.ts`],tags:[`wui-dock`]},"hover-card":{entries:[`elements/hover-card.ts`],tags:[`wui-hover-card`]},"navigation-menu":{entries:[`elements/navigation-menu.ts`],tags:[`wui-navigation-menu`]},"notification-center":{entries:[`elements/notification-center.ts`],tags:[`wui-notification-center`]},"onboarding-checklist":{entries:[`elements/onboarding-checklist.ts`],tags:[`wui-onboarding-checklist`]},otp:{entries:[`elements/otp.ts`],tags:[`wui-otp`]},overflow:{entries:[`elements/overflow.ts`],tags:[`wui-overflow`]},rating:{entries:[`elements/rating.ts`],tags:[`wui-rating`]},"record-pager":{entries:[`elements/record-pager.ts`],tags:[`wui-record-pager`]},"relative-time":{entries:[`elements/relative-time.ts`],tags:[`wui-relative-time`]},shortcuts:{entries:[`elements/shortcuts.ts`],tags:[`wui-shortcuts`]},"show-more":{entries:[`elements/show-more.ts`],tags:[`wui-show-more`]},truncate:{entries:[`elements/truncate.ts`],tags:[`wui-truncate`]},"whats-new":{entries:[`elements/whats-new.ts`],tags:[`wui-whats-new`]},"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`,notificationCentreText:`text/web/notificationCentre.g.ts`,notificationDays:`notificationDays.ts`,optionLabel:`optionLabel.ts`,partRegistry:`select/partRegistry.ts`,relativeTime:`relativeTime.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`,shortcutKeys:`shortcutKeys.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 dn=`ui-elements/`;function fn(e){let t=un[e];if(t===void 0)throw Error(`[webority-ui] No on-demand element chunk is named ${e}.`);return t}function pn(e){let t=fn(e);if(!t.selfContained)return`${dn+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 mn=n({CHUNK_DIR:()=>dn,CHUNK_RETRY_MS:()=>_n,ELEMENTS_DEFINED_EVENT:()=>hn,ELEMENTS_LOAD_ERROR_EVENT:()=>gn,assetUrl:()=>An,loadChunk:()=>jn,startElementLoader:()=>Dn,stopElementLoader:()=>On,whenElementsReady:()=>kn}),hn=`wui-elements:defined`,gn=`wui-elements:load-error`,_n=1e3,vn={"ui-elements/carousel.global.js":`5ef364ef9e8e`,"ui-elements/data-table.global.js":`3cc44040c008`,"ui-elements/dock.global.js":`50ee48200113`,"ui-elements/hover-card.global.js":`519c4c58ffaa`,"ui-elements/navigation-menu.global.js":`2ff881e8eb02`,"ui-elements/notification-center.global.js":`21081ffda2bc`,"ui-elements/onboarding-checklist.global.js":`60fa3ff31101`,"ui-elements/otp.global.js":`4d91498dd38f`,"ui-elements/overflow.global.js":`c732821b9c57`,"ui-elements/rating.global.js":`3c400d31eade`,"ui-elements/record-pager.global.js":`f9f81d2fdb4b`,"ui-elements/relative-time.global.js":`b3b44587cbc6`,"ui-elements/shortcuts.global.js":`178e6fc086a7`,"ui-elements/show-more.global.js":`31e5d9165101`,"ui-elements/truncate.global.js":`f8449c028730`,"ui-elements/whats-new.global.js":`9c13e3755c85`,"ui-elements/code-block.global.js":`42ae7547f83a`,"ui-elements/command-palette.global.js":`36c02fb84a88`,"ui-elements/comment-thread.global.js":`7bdc03e68e16`,"ui-elements/consent-banner.global.js":`cc9d03cabc99`,"ui-elements/context-menu.global.js":`ea125a0176ec`,"ui-elements/date-range.global.js":`7babddfd4203`,"ui-elements/date-time.global.js":`e0ee3a3429ab`,"ui-elements/datepicker.global.js":`43015d035cce`,"ui-elements/drawer.global.js":`08692637b1a5`,"ui-elements/dropdown.global.js":`c31539bff713`,"ui-elements/entry-grid.global.js":`e8e9610bc8b7`,"ui-elements/gantt.global.js":`e07ebdfe3007`,"ui-elements/image-crop.global.js":`1c981fbbe934`,"ui-elements/inline-edit.global.js":`6fc1405cf536`,"ui-elements/kanban.global.js":`9c86e40d2d84`,"ui-elements/lead-popup.global.js":`0aefae8f153a`,"ui-elements/lightbox.global.js":`491fff61daf2`,"ui-elements/org-tree.global.js":`3c827d29c924`,"ui-elements/markdown.global.js":`6b1f7136f2c3`,"ui-elements/phone.global.js":`3cbfc6900170`,"ui-elements/popover.global.js":`02421bef3f57`,"ui-elements/saved-views.global.js":`8b373b79ea6d`,"ui-elements/glyphs.global.js":`9794dcd38ec1`,"ui-elements/select-chips.global.js":`98fe4f18484b`,"ui-elements/select-recents.global.js":`1aafacfe79bd`,"ui-elements/select-search.global.js":`a6998bdaedb1`,"ui-elements/select-window.global.js":`adfb94048c49`,"ui-elements/table-export.global.js":`e59dbc91b22a`,"ui-elements/slider.global.js":`71946521cf92`,"ui-elements/sortable.global.js":`cdb5b6a6705a`,"ui-elements/status-icon.global.js":`ab79517ca749`,"ui-elements/timepicker.global.js":`5ca630dc7b13`,"ui-elements/tour.global.js":`ed15290f829c`,"ui-elements/tree.global.js":`5817128b5941`,"ui-elements/tree-picker.global.js":`65eba492cf4b`,"ui-elements/wizard.global.js":`db544720eaf5`,"ui-chart.global.js":`ae075db49126`,"ui-calendar.global.js":`edf120b16ad1`,"ui-rich-text.global.js":`64dcebd2efc3`,"ui-file-viewer.global.js":`b149510952e6`,"ui-phone.global.js":`c646775bc1d1`},yn=new Map;for(let[e,t]of Object.entries(un))for(let n of t.tags)yn.set(n,e);var bn=[...yn.keys()].join(`,`),xn=null,Sn=``,Cn=!1,wn=null,Tn=new Map;function En(){let e=document.currentScript;return e instanceof HTMLScriptElement?e:null}function Dn(e=En()){Cn||(Cn=!0,xn=e?.src?e.src:null,Sn=e?.nonce||``,Fn(document),wn=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&Fn(e)}),wn.observe(document.documentElement,{childList:!0,subtree:!0}))}function On(){wn?.disconnect(),wn=null,Cn=!1,xn=null,Sn=``,Tn.clear()}function kn(e=document){return Promise.all([...Pn(e)].map(e=>jn(e))).then(()=>void 0)}function An(e){if(xn===null)throw Error(`The on-demand element files have no address to load from.`);let t=new URL(e,xn);return t.search=ln(vn,e)?`?v=${vn[e]}`:``,t.href}function jn(e){let t=Tn.get(e)?.promise??null;if(t!==null)return t;let n=fn(e),{tags:r}=n,i=pn(e),a=()=>Promise.all(r.map(e=>customElements.whenDefined(e))),o={status:`loading`,promise:null},s=new Promise((t,s)=>{let c=``,l=()=>{wn&&Object.keys(un).every(e=>Tn.get(e)?.status===`loaded`||Tn.get(e)?.status===`failed`)&&wn.disconnect()},u=()=>{o.status=`loaded`,l(),document.dispatchEvent(new CustomEvent(hn,{detail:{chunk:e,tags:r}})),t()},d=t=>{o.status=`failed`,l(),L(`[webority-ui] Could not load ${c} for ${r.length?r.join(`, `):e}.${t?` ${t.message}`:``}`),document.dispatchEvent(new CustomEvent(gn,{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,Sn&&(i.nonce=Sn),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),_n)}),document.head.append(i)};if([...document.scripts].some(e=>new URL(e.src,location.href).pathname.endsWith(`/${i}`)))a().then(u);else{try{c=An(i)}catch(e){d(e instanceof Error?e:void 0);return}f(c,!1)}});return o.promise=s,Tn.set(e,o),s}function Mn(e){return yn.has(e.localName)&&!customElements.get(e.localName)}function Nn(e,t){let n=yn.get(t.localName);n!==void 0&&Mn(t)&&e.add(n)}function Pn(e){let t=new Set;e instanceof Element&&Nn(t,e);for(let n of e.querySelectorAll(bn))Nn(t,n);return t}function Fn(e){for(let t of Pn(e))Promise.allSettled([jn(t)])}var In={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`}]]},Ln=n({svgNodes:()=>zn,svgRoot:()=>Bn}),Rn=`http://www.w3.org/2000/svg`;function zn(e){return e.map(Vn)}function Bn(e,t){let n=document.createElementNS(Rn,`svg`);return Hn(n,e),n.append(...zn(t)),n}function Vn(e){let[t,n,r]=e,i=document.createElementNS(Rn,t);return Hn(i,n),typeof r==`string`?i.append(document.createTextNode(r)):r&&i.append(...zn(r)),i}function Hn(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 Un=n({GLYPH_CHUNK:()=>Wn,GLYPH_PENDING_ATTRIBUTE:()=>Gn,glyphNode:()=>R,registerGlyphs:()=>tr}),Wn=`glyphs`,Gn=`data-wui-glyph-pending`,Kn=`svg[${Gn}]`,qn=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,Jn={...In},Yn=new Map,Xn=!1,Zn=null;function Qn(e){return ln(Jn,e)?Jn[e]:void 0}function $n(e,t,n,r){return{class:n?`wui-icon ${n}`:`wui-icon`,"data-icon":e,[Gn]:r?!0:void 0,width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`}}function R(e,{size:t=16,className:n=``}={}){let r=Qn(e);if(r!==void 0){let i=`${e}|${t}|${n}`,a=Yn.get(i);return a===void 0&&(a=Bn($n(e,t,n,!1),r),Yn.set(i,a)),ze(a.cloneNode(!0),SVGSVGElement,`glyphNode: ${e} did not clone to an svg`)}return Xn||!qn.test(e)?null:(Promise.allSettled([jn(Wn)]),Bn($n(e,t,n,!0),[]))}function er(e){let t=e instanceof Element&&e.matches(Kn)?[e]:[];for(let n of[...t,...e.querySelectorAll(Kn)]){let e=Qn(n.getAttribute(`data-icon`)??``);e===void 0?n.remove():(n.removeAttribute(Gn),n.replaceChildren(...zn(e)))}}function tr(e){Object.assign(Jn,e),Xn=!0,er(document),Zn===null&&(Zn=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&er(e)}),Zn.observe(document.documentElement,{childList:!0,subtree:!0}))}var nr=n({isImeComposing:()=>rr,isImeSafeEnter:()=>ir});function rr(e){return e.isComposing||e.keyCode===229}function ir(e){return e.key===`Enter`&&!rr(e)}var ar=n({createListboxKeyNav:()=>sr,moveActiveRow:()=>cr}),or=e=>e.target instanceof Element?e.target.tagName:void 0;function sr(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=or(e)===`INPUT`||or(e)===`TEXTAREA`;if(e.key===`ArrowDown`)e.preventDefault(),r(Math.min(_+1,h-1));else if(e.key===`ArrowUp`)e.preventDefault(),r(Math.max(_-1,0));else if(e.key===`Home`&&!v)e.preventDefault(),h&&r(0);else if(e.key===`End`&&!v)e.preventDefault(),h&&r(h-1);else if(e.key===`PageDown`&&!v){if(e.preventDefault(),!h)return;r(Math.min(Math.max(0,_)+8,h-1))}else if(e.key===`PageUp`&&!v){if(e.preventDefault(),!h)return;r(Math.max(Math.max(0,_)-8,0))}else if(ir(e))i&&(e.preventDefault(),i(l?l(_):m[_],g()));else if(e.key===`Escape`)a&&a(e);else if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&or(e)!==`INPUT`&&or(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 cr(e,t){let n=e.querySelector(`.is-active`);n!==t&&(n?.classList.remove(`is-active`),t?.classList.add(`is-active`))}var lr=n({TRUSTED_LABEL:()=>ur,optionLabelNodes:()=>gr,optionText:()=>_r,stripTags:()=>pr,withTrustedLabel:()=>dr}),ur=Symbol(`wui.trustedLabel`),dr=(e,t)=>{let n=document.createDocumentFragment();return n.append(t.cloneNode(!0)),{...e,[ur]:n}},fr=e=>`wui-flag wui-flag-${e}`,pr=e=>String(e??``).replace(/<[^>]*>/g,``),mr=e=>{if(!e)return null;let t=String(e).toLowerCase().replace(/[^a-z0-9-]/g,``);return t?R(t):null},hr=e=>{let t=String(e??``).toLowerCase();return/^[a-z]{2}$/.test(t)?N(`span`,{class:fr(t),"aria-hidden":`true`}):null};function gr(e){if(e==null)return[];let t=hr(e.flag),n=mr(e.icon),r=e[ur],i=r?[...r.cloneNode(!0).childNodes]:[document.createTextNode(String(e.label??``))];return!t&&!n?i:[N(`span`,{class:`wui-opt-label`},t,n,...i)]}var _r=e=>{if(e==null)return``;let t=e[ur];return t?t.textContent??``:pr(e.label)},vr=n({SELECT_TEXT:()=>yr}),yr={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…`},br=n({clearOptions:()=>Dr,drawn:()=>Cr,filterOptions:()=>Sr,nodesSignature:()=>Tr,optionRow:()=>Fr,posAttrMap:()=>wr,refreshWindow:()=>jr,registerWindowImpl:()=>Er,renderOptions:()=>Or,revealRow:()=>Mr,rowId:()=>kr,rowIndexByPrefix:()=>Pr,rowIndexOfValue:()=>Nr}),xr=()=>P(`select`,yr);function Sr(e,t){let n=String(t??``).trim().toLowerCase();return n?e.filter(e=>[_r(e),e.description,e.meta].some(e=>String(e??``).toLowerCase().includes(n))):e}var Cr=new WeakMap,wr=e=>e?{"data-index":String(e.index),"aria-setsize":String(e.size),"aria-posinset":String(e.index+1)}:{},Tr=e=>e.map(e=>e instanceof Element?e.outerHTML:e.textContent??``).join(``),z;function Er(e){z=e}function Dr(e){z?.clear(e),Cr.delete(e),e.replaceChildren()}function Or(e,t,n={}){let{selected:r=[],query:i=``,status:a=`idle`,emptyText:o=xr().emptyText,searchingText:s=xr().searchingText,hintText:c=xr().hintText,actionRow:l=[],recents:u=null}=n,d=new Set(r.map(String)),f=Sr(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=z,b=v&&y!==void 0,x=e=>b?{index:e,size:_}:void 0,S=0,C=e=>{let t=S++;return N(`button`,{type:`button`,role:`option`,id:kr(p,t),class:`wui-select-option wui-select-add`,"data-value":String(e.value??``),"data-custom":`true`,"aria-selected":`false`,...wr(x(t))},e.label)},w=e=>{let t=S++;return Fr(e,kr(p,t),d.has(String(e.value)),x(t))},T=m.map(C),E=g.length&&u?[N(`div`,{class:`wui-select-group`},u.label),...g.map(w),N(`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(N(`div`,{class:`wui-select-group`},t.group)),e=t.group??``,D.push(w(t))}let O=h.map(C),k=[];if(a===`loading`?k=[N(`div`,{class:`wui-select-loading`},N(`span`,{class:`wui-select-spinner spinner-border spinner-border-sm`,role:`status`,"aria-hidden":`true`}),s)]:a===`hint`?k=[N(`div`,{class:`wui-select-hint`},c)]:(a===`empty`||f.length===0&&l.length===0)&&(k=[N(`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:Tr(n),postSig:Tr(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=Tr(te);return Cr.get(e)===ne||(Cr.set(e,ne),e.replaceChildren(...te)),{rows:S,windowed:!1,long:v}}var kr=(e,t)=>`${e}-opt-${t}`,Ar=e=>[...e.querySelectorAll(`.wui-select-option`)];function jr(e){return z?z.refresh(e):!1}function Mr(e,t){return z?z.reveal(e,t):Ar(e)[t]??null}function Nr(e,t){if(z)return z.indexOfValue(e,t);let n=new Set(t.map(String));return Ar(e).findIndex(e=>n.has(e.dataset.value??``))}function Pr(e,t){return z?z.indexByPrefix(e,t):Ar(e).findIndex(e=>(e.textContent??``).trim().toLowerCase().startsWith(t))}function Fr(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,...wr(r)},o=N(`span`,{class:`wui-select-check`,"aria-hidden":`true`},R(`check`));if(!e.description&&!e.meta)return N(`button`,{type:`button`,class:`wui-select-option${n?` selected`:``}`,...a},qt(e),N(`span`,{class:`wui-select-opt-name`},...gr(e)),o);let s=e.description?N(`span`,{class:`wui-select-opt-desc`},e.description):null,c=e.meta?N(`span`,{class:`wui-select-opt-meta`},e.meta):null;return N(`div`,{class:`wui-select-option wui-select-option-rich${n?` selected`:``}`,...a},qt(e),N(`span`,{class:`wui-select-option-text`},N(`span`,{class:`wui-opt-label`},...gr(e)),s),c,o)}var Ir=Object.freeze([`single`,`multiple`,`search`,`tag`,`country`]),B=e=>e===`multiple`||e===`tag`,Lr=n({registerSelectPart:()=>zr,selectPart:()=>Br}),Rr=new Map;function zr(e,t){Rr.set(e,t)}function Br(e){return Rr.get(e)}var Vr={chips:`select-chips`,search:`select-search`,country:`phone`,recents:`select-recents`};function Hr(e){let t=ln(Vr,e)?Vr[e]:void 0;if(!t)return Promise.reject(Error(`Unknown <wui-select> part: ${e}.`));let n=Br(e);return n?Promise.resolve(n):jn(t).then(()=>j(Br(e),`The ${e} part of <wui-select> did not register.`))}var Ur=n({searchesRemotely:()=>Wr}),Wr=e=>typeof e.loadOptions==`function`||!!e.getAttribute(`source`)||e.hasAttribute(`remote`),Gr=()=>jn(`select-window`),Kr={requiredFieldMessage:`Please fill in this field.`},qr={clearLabel:`Clear search`,placeholder:`Search…`,searchLabel:`Search`},Jr=n({WuiSelect:()=>Qr}),Yr=()=>P(`select`,yr),Xr=()=>P(`search`,qr),Zr=()=>P(`field`,Kr),Qr=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(),I(this,`_internals`,void 0),I(this,`_value`,void 0),I(this,`_optionsProp`,void 0),I(this,`_partOptions`,void 0),I(this,`_known`,void 0),I(this,`_loadOptionsFn`,void 0),I(this,`_validateFn`,void 0),I(this,`_declared`,void 0),I(this,`_query`,void 0),I(this,`_ownsFilter`,void 0),I(this,`_active`,void 0),I(this,`_rows`,void 0),I(this,`_windowed`,void 0),I(this,`_windowLoad`,void 0),I(this,`_windowFailed`,void 0),I(this,`_scrollFrame`,void 0),I(this,`_status`,void 0),I(this,`_error`,void 0),I(this,`_nav`,void 0),I(this,`_parts`,void 0),I(this,`_partSig`,void 0),I(this,`_partsMounted`,void 0),I(this,`_partToken`,void 0),I(this,`_rendered`,void 0),I(this,`_searchShown`,void 0),I(this,`_defaultValue`,void 0),I(this,`_warnedMode`,void 0),I(this,`_warnedDensity`,void 0),I(this,`_hoverTimer`,void 0),I(this,`_hoverOpened`,void 0),I(this,`_onHoverOver`,void 0),I(this,`_onHoverOut`,void 0),I(this,`_panelShown`,void 0),I(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)},ni)))},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()},ri)))}}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=li(n,B(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=li(this._value,B(this.mode)),this._partOptions=null,this._known.clear(),this._ensureParts()),(e===`source`||e===`remote`||e===`recents-key`)&&this._ensureParts(),si.has(e)?this._rendered&&(this._drawValue(),this.renderList()):oi.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`:ei(e)?e:(e!==this._warnedMode&&(this._warnedMode=e,Yt(`<wui-select> mode "${e}" is not one of ${Ir.join(`, `)}; it is treated as "single".`)),`single`)}_checkDensity(){let e=this.getAttribute(`density`);e===null||ti.includes(e)||e===this._warnedDensity||(this._warnedDensity=e,Yt(`<wui-select> density "${e}" is not one of ${ti.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=li(e,B(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(){$t(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=Sr(this._listOptions(),t).length+n.length+(r?.options.length??0),this._windowed=!1,Dr(e.list),this._anchorMenu();return}let i=Or(e.list,this._listOptions(),{selected:this._selectedValues(),query:t,status:this._status,emptyText:this.getAttribute(`empty-text`)||Yr().emptyText,searchingText:this.getAttribute(`searching-text`)||Yr().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=B(t),r=t===`tag`,i=n&&(r||this.hasAttribute(`allow-custom`));this._value=li(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=li(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?N(`div`,{class:`input wui-select-control wui-select-multi`,...v,...y,"aria-disabled":u?`true`:void 0,tabindex:!u&&!r?`0`:void 0}):N(`button`,{type:`button`,class:`input wui-select-control`,...v,...y,disabled:u||void 0}),x=[s?R(s,{className:`wui-select-icon`}):null,c?N(`span`,{class:`wui-select-prefix`},c):null,N(`span`,{class:`wui-select-value`,"data-label":!0}),l?N(`span`,{class:`wui-select-reset`,role:`button`,"aria-label":Yr().clearSelectionLabel,hidden:!0},R(`x`)):null,R(`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`?Yr().countrySearchPlaceholder:Xr().placeholder),E=N(`div`,{class:`wui-select-menu wui-select-menu-fixed`,popover:`auto`},w?N(`div`,{class:`wui-select-search`},R(`search`),N(`input`,{class:`wui-select-input`,placeholder:T,"aria-label":T,"aria-autocomplete":`list`}),N(`button`,{type:`button`,class:`wui-select-clear`,"aria-label":Xr().clearLabel,hidden:!0},R(`x`))):null,N(`div`,{class:`wui-select-options`,role:`listbox`,id:d,tabindex:`-1`,"aria-multiselectable":n?`true`:void 0})),ee=N(`div`,{class:`field-error wui-select-error`,id:f,"aria-live":`polite`,hidden:!this._error||void 0},this._error||null);this.replaceChildren(N(`div`,{class:`wui-select${o}`},b,E),ee),this._rendered=!0,this._syncMirror(),this._syncValidity(),this._drawValue(),this._syncReset(),this.renderList(),this._wire(),en(this,this.querySelector(`.wui-select-control`)),this._mountParts(e)}_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||Yr().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`)??hi(e).trim(),label:t.textContent??``,selected:e.hasAttribute(`selected`)};for(let[t,r]of ci){let i=e.getAttribute(t);i&&(n[r]=i)}return e.hasAttribute(`disabled`)&&(n.disabled=!0),dr(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`)||ai()[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(){B(this.mode)?sn(this,this._selectedValues()):on(this,this._value)}_drawValue(){let e=this._refs();if(!e.value)return;let t=B(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?gr(n):r?[r]:[])}_syncTitle(e){let t=this.querySelector(`.wui-select-control`);if(!t)return;let n=e&&!this.hasAttribute(`title`)?_r(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=!B(this.mode)&&this._hasValue()?qt({avatar:this.getAttribute(`value-avatar`),initials:this.getAttribute(`value-initials`)},`avatar-xs`):null;e.classList.toggle(`wui-has-value-avatar`,!!t),t&&e.prepend(N(`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},Zr().requiredFieldMessage,t instanceof HTMLElement?t:void 0)}else e.setValidity({})}}_syncReset(){let e=V(this,`.wui-select-reset`,HTMLElement);e&&(e.hidden=!(this.hasAttribute(`clearable`)&&this._hasValue()&&!$t(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=V(this,`.wui-select-error`,HTMLElement);e&&(e.textContent=this._error,e.hidden=!this._error),this._syncInvalid()}_refs(){return{control:V(this,`.wui-select-control`,HTMLElement),value:V(this,`.wui-select-value`,HTMLElement),menu:V(this,`.wui-select-menu`,HTMLElement),list:V(this,`.wui-select-options`,HTMLElement),search:V(this,`.wui-select-search input`,HTMLInputElement),input:V(this,`.wui-select-draft`,HTMLInputElement)}}_menuOpen(){let e=V(this,`.wui-select-menu`,HTMLElement);return e!==null&&je(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`)||$t(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>ii}_visible(){let e=this._refs();return e.list?mi(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?Mr(n.list,e):null)),cr(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&&jr(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=V(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?Nr(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);je(t.menu)&&Ae(t.menu),this._onPanelClosed(),n&&t.control.focus()}_onQueryChange(e){this._query=e,this._setActive(-1);let t=V(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:hi(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);B(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`&&Wr(this)}_onKeyDown(e){if(!$t(this)){for(let t of this._activePartsList())if(t.onKey?.(e)===!0)return;if(!this._menuOpen()){if(e.target instanceof HTMLInputElement){if(e.key!==`ArrowDown`||!this._draftOpens())return;this._open({focus:!1})}else{(e.key===`ArrowDown`||ir(e)||e.key===` `)&&(e.preventDefault(),this._open({focus:!0}));return}}j(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=j(V(this,`.wui-select`,HTMLElement),`The select wrapper is missing.`),i=V(this,`.wui-select-search .wui-select-clear`,HTMLElement),a=V(this,`.wui-select-reset`,HTMLElement);this._nav=sr({getVisibleOptions:()=>this._visible(),getActive:()=>this._active,setActive:e=>this._setActive(e),getCount:()=>this._rowCount(),getOptionAt:e=>this._rowEl(e),findByPrefix:e=>this._windowed?Pr(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()&&!$t(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=j(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($t(this))return;this._refs().input?.focus(),!this._menuOpen()&&this._draftOpens()&&this._open({focus:!1});return}if(e.target instanceof HTMLInputElement){!this._menuOpen()&&!$t(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():$t(this)||this._open({focus:!0})}),a?.addEventListener(`click`,e=>{e.stopPropagation(),this.commit(B(this.mode)?[]:``),this._close(),t.focus()}),n.addEventListener(`click`,n=>{let r=pi(n).closest(`.wui-select-option`);if(r instanceof HTMLElement&&(this._pick(r),B(this.mode))){let n=this.querySelector(`.wui-select-draft`);(e.search??(n instanceof HTMLElement?n:t)).focus()}}),n.addEventListener(`mousedown`,e=>{B(this.mode)&&e.target instanceof Element&&e.target.closest(`.wui-select-option`)&&e.preventDefault()}),n.addEventListener(`mousemove`,e=>{let t=pi(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=V(this,`.wui-select-menu`,HTMLElement);e&&Ae(e)}_activePartsList(){return this._partsMounted?j(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=di(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=>gi(this,e))).then(e=>{n===this._partToken&&(this._parts=e.filter(e=>e!==null),this._mountParts())})}_loadWindow(){this._windowLoad===null&&(this._windowLoad=Gr().then(()=>this.renderList(),()=>{this._windowFailed=!0,document.dispatchEvent(new CustomEvent(gn,{bubbles:!0,composed:!0,detail:{chunk:`select-window`}})),this.setError(Yr().partLoadMessage)}))}_mountParts(e={draft:``,query:``}){if(!this._parts||this._partsMounted||!this._rendered||!this.isConnected)return;this._partsMounted=!0;let t=$r(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??``}}};I(Qr,`formAssociated`,!0);var $r=e=>{let{control:t,value:n,menu:r,list:i}=e;return{control:j(t,`control missing`),value:j(n,`value missing`),menu:j(r,`menu missing`),list:j(i,`list missing`),search:e.search,input:e.input}},ei=e=>Ir.includes(e),ti=[`comfortable`,`compact`],ni=150,ri=250,ii=10,ai=()=>{let e=Yr();return{single:e.placeholder,search:e.placeholder,multiple:e.placeholder,tag:e.tagPlaceholder,country:e.countryPlaceholder}},oi=new Set([`countries`,`suggested`,`suggested-label`,`all-countries-label`,`max-tags`,`pattern`,`collapse-chips`,`source`,`remote`,`min-chars`]),si=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`]),ci=[[`icon`,`icon`],[`description`,`description`],[`meta`,`meta`],[`group`,`group`],[`avatar`,`avatar`],[`initials`,`initials`],[`disabled-hint`,`disabledHint`]],li=(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),ui=(e,t)=>t===`multiple`?Wr(e)?[`chips`,`search`]:[`chips`]:t===`search`?[`search`]:t===`country`?[`country`]:t===`tag`?Wr(e)?[`chips`,`search`]:[`chips`]:[],di=(e,t)=>e.hasAttribute(`recents-key`)?[`recents`,...ui(e,t)]:ui(e,t),fi=e=>typeof e==`object`&&!!e&&`default`in e&&typeof e.default==`function`,pi=e=>{if(e.target instanceof Element)return e.target;throw Error(`The event target is not an element.`)},V=(e,t,n)=>{let r=e.querySelector(t);return r instanceof n?r:null},mi=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),hi=e=>{let t=e.textContent;if(t===null)throw Error(`The element has no text.`);return t},gi=(e,t)=>Hr(t).then(e=>{if(!fi(e))throw Error(`The part ${t} has no default export.`);return e.default()}).catch(()=>(document.dispatchEvent(new CustomEvent(gn,{bubbles:!0,composed:!0,detail:{chunk:t}})),e.setError(Yr().partLoadMessage),null)),_i=n({APP_BUTTON_MARKER:()=>vi,buttonClass:()=>Si}),vi=`AppButton`,yi=new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),bi={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 xi(e){return ln(bi,e)}function Si(e=`primary`,t=`solid`,n=`md`){if(!yi.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!xi(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=bi[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}var Ci=`INR`,wi=Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`,JPY:`¥`}),Ti=e=>typeof e==`string`&&/^[A-Z]{3}$/.test(e),Ei=(e=`INR`)=>wi[e]??`${e} `,Di={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`},Oi=n({IST_OFFSET_MS:()=>ki,IST_TIME_ZONE:()=>H,isTimeZone:()=>Mi,nowIn:()=>zi,todayIn:()=>Ri,wallClockOf:()=>Li,wallToInstant:()=>Fi,zoneOffsetMs:()=>Pi,zoneParts:()=>Ni}),H=`Asia/Kolkata`,ki=198e5,Ai=new Map;function ji(e){let t=Ai.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`}),Ai.set(e,t)),t}function Mi(e){if(typeof e!=`string`||e===``)return!1;try{return ji(e),!0}catch{return!1}}function Ni(e,t=H){if(t===`Asia/Kolkata`){let t=new Date(e+ki);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}let n=Object.fromEntries(ji(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 Pi(e,t=H){if(t===`Asia/Kolkata`)return ki;let n=Ni(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 Fi(e,t=H){let n=e-Pi(e,t);return n=e-Pi(n,t),n}var Ii=e=>e instanceof Date?e.getTime():e;function Li(e,t=H){return new Date(e+Pi(e,t)).toISOString().slice(0,19)}function Ri(e=H,t=Date.now()){return Li(Ii(t),e).slice(0,10)}function zi(e=H,t=Date.now()){let n=Ii(t);return new Date(n+Pi(n,e))}var Bi=n({CURRENCIES:()=>Hi,DATE_PATTERNS:()=>Gi,DURATION_UNITS:()=>Wi,FORMAT_STYLES:()=>Vi,IST_OFFSET_MS:()=>ki,IST_TIME_ZONE:()=>H,MAX_DECIMALS:()=>20,MONEY_UNITS:()=>Ui,compactFormatOf:()=>ka,emptyValueLabel:()=>U,formatCompact:()=>ba,formatCurrency:()=>va,formatDate:()=>Ea,formatDateTime:()=>Aa,formatDayShort:()=>Da,formatDuration:()=>Ca,formatNumber:()=>_a,formatPercent:()=>xa,formatValue:()=>Oa,isMoneyUnit:()=>Ki,istParts:()=>Ta,monthLabel:()=>$i,monthLongLabel:()=>ea,paiseToRupeeText:()=>pa,timeZoneLabel:()=>Na,toInstant:()=>wa,weekdayLabel:()=>ta}),Vi=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],Hi=[`INR`,`USD`,`EUR`,`GBP`],Ui=[`rupees`,`paise`],Wi=[`ms`,`s`,`min`,`h`],Gi=[`day`,`month`,`year`,`datetime`,`time`];function Ki(e){return Ui.some(t=>t===e)}var qi=()=>P(`formatters`,Di),U=()=>qi().emptyValueLabel,Ji=`−`,Yi=[`janShortLabel`,`febShortLabel`,`marShortLabel`,`aprShortLabel`,`mayShortLabel`,`junShortLabel`,`julShortLabel`,`augShortLabel`,`sepShortLabel`,`octShortLabel`,`novShortLabel`,`decShortLabel`],Xi=[`januaryLabel`,`februaryLabel`,`marchLabel`,`aprilLabel`,`mayLabel`,`juneLabel`,`julyLabel`,`augustLabel`,`septemberLabel`,`octoberLabel`,`novemberLabel`,`decemberLabel`],Zi={short:[`sunShortLabel`,`monShortLabel`,`tueShortLabel`,`wedShortLabel`,`thuShortLabel`,`friShortLabel`,`satShortLabel`],long:[`sundayLabel`,`mondayLabel`,`tuesdayLabel`,`wednesdayLabel`,`thursdayLabel`,`fridayLabel`,`saturdayLabel`],min:[`sunMinLabel`,`monMinLabel`,`tueMinLabel`,`wedMinLabel`,`thuMinLabel`,`friMinLabel`,`satMinLabel`]},Qi=(e,t)=>qi()[j(e[t],`no date name at index ${t}`)],$i=e=>Qi(Yi,e),ea=e=>Qi(Xi,e);function ta(e,t){return Qi(Zi[t],e)}var na=(e,t)=>j(e[t],`no compact unit at index ${t}`),ra=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],ia=[[1e9,`B`],[1e6,`M`],[1e3,`K`]],aa=e=>!e||e===`INR`?`en-IN`:`en-US`,oa=(e,t)=>typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=20?e:t,sa=new Map,ca=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=sa.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:e}),sa.set(n,r)),r},la=new Map,ua=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=la.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:e,maximumFractionDigits:e}),la.set(n,r)),r},da=e=>typeof e==`number`&&Number.isFinite(e),fa=e=>e<0&&!Object.is(Math.abs(e),0)?Ji:``;function pa(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 ma=(e,t)=>t===`paise`?Number(pa(e)):e,ha=2,ga=(e,t,n)=>{let r=Math.min(t,ha),i=10n**BigInt(ha-r),a=(BigInt(pa(e).replace(`.`,``))+i/2n)/i,o=10n**BigInt(r),s=ua(0,n).format(a/o);return t===0?s:`${s}.${(a%o).toString().padStart(r,`0`)}${`0`.repeat(t-r)}`};function _a(e,{decimals:t}={}){if(!da(e))return U();let n=ca(oa(t,2)).format(Math.abs(e));return n===`0`?`0`:fa(e)+n}function va(e,t){if(!t?.currency)throw TypeError(`[@webority/ui-elements] formatCurrency needs options.currency, an ISO 4217 code such as "INR".`);if(!da(e))return U();let{unit:n=`rupees`,decimals:r,currency:i}=t,a=oa(r,0),o=aa(i),s=n===`paise`?ga(Math.abs(e),a,o):ua(a,o).format(Math.abs(e));return(Number(s.replace(/,/g,``))===0?``:fa(e))+Ei(i)+s}var ya=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function ba(e,{currency:t,unit:n=`rupees`}={}){if(!da(e))return U();let r=t?ma(e,n):e,i=t?Ei(t):``,a=t?aa(t):`en-IN`,o=a===`en-IN`?ra:ia,s=Math.abs(r),c=o.findIndex(([e])=>s>=e);if(c===-1){let e=ca(ya(s),a).format(s);if(e!==`1,000`)return(e===`0`?``:fa(r))+i+e;c=o.length-1}let[l,u]=na(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]=na(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f))),`${fa(r)}${i}${ca(f,a).format(p)} ${u}`}function xa(e,{decimals:t}={}){return da(e)?`${_a(e*100,{decimals:oa(t,1)})}%`:U()}var Sa={ms:1,s:1e3,min:6e4,h:36e5};function Ca(e,{unit:t=`s`}={}){if(!da(e))return U();let n=Sa[t]??1e3,r=Math.abs(e*n),i=fa(e);if(Math.round(r)<1e3)return`${i}${ca(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${ca(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}${ca(0).format(l)}h ${s(c%60)}m`}function wa(e,t=H){if(e instanceof Date)return e.getTime();if(da(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?Fi(a.getTime(),t):NaN}return Date.parse(e)}function Ta(e,t=H){let{year:n,month:r,day:i,hour:a,minute:o}=Ni(e,t);return{year:n,month:r,day:i,hour:a,minute:o}}function Ea(e,{pattern:t=`day`,timeZone:n=H}={}){let r=wa(e,n);if(!Number.isFinite(r))return U();let i=Ta(r,n),a=e=>String(e).padStart(2,`0`),o=`${a(i.day)}-${$i(i.month)}-${i.year}`,s=`${a(i.hour)}:${a(i.minute)}`;switch(t){case`month`:return`${$i(i.month)}-${i.year}`;case`year`:return String(i.year);case`datetime`:return`${o} ${s}`;case`time`:return s;default:return o}}function Da(e,{timeZone:t=H}={}){let n=wa(e,t);if(!Number.isFinite(n))return U();let r=Ta(n,t);return`${String(r.day).padStart(2,`0`)}-${$i(r.month)}`}function Oa(e,t){if(e==null||e===``)return U();let n=t?.style;if(n===`date`)return Ea(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return va(e,{...t,currency:t?.currency??``});case`percent`:return xa(e,t);case`compact`:return ba(e,t);case`duration`:return Ca(e,t);default:return _a(e,t)}}function ka(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 Aa(e,{timeZone:t=H}={}){let n=wa(e);if(!Number.isFinite(n))return U();let r=Object.fromEntries(Ma(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}-${$i(Number(r.month)-1)}-${r.year}, ${r.hour}:${r.minute} ${i.toUpperCase()}`}var ja=new Map;function Ma(e){let t=ja.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}),ja.set(e,t)),t}function Na(e=H){return new Intl.DateTimeFormat(`en-IN`,{timeZone:e,timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??e}var Pa=n({DISPLAY_FORMAT:()=>Ba,MONTH_DISPLAY_FORMAT:()=>Wa,YEAR_DISPLAY_FORMAT:()=>Ja,clampMonth:()=>Za,daysIn:()=>Xa,firstWeekday:()=>Ia,fmt:()=>Va,fmtMonth:()=>Ga,fmtYear:()=>Ya,pad:()=>La,parseIso:()=>za,parseIsoMonth:()=>Ha,parseIsoYear:()=>Ka,toIso:()=>Ra,toIsoMonth:()=>Ua,toIsoYear:()=>qa}),Fa=e=>{let t=String(e??``).trim();return/^[0-6]$/.test(t)?Number(t):null},Ia=e=>Fa(e.getAttribute(`first-day`))??Fa(getComputedStyle(e).getPropertyValue(`--wui-first-day`))??1,La=e=>String(e).padStart(2,`0`),Ra=(e,t,n)=>`${e}-${La(t+1)}-${La(n)}`,za=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>Xa(a,o-1)?null:{y:a,m:o-1,d:s}},Ba=`dd-MMM-yyyy`,Va=(e,t=Ba)=>{let n=za(e);if(!n)return``;let r={yyyy:n.y,MMMM:ea(n.m),MMM:$i(n.m),MM:La(n.m+1),dd:La(n.d),d:n.d};return(t||`dd-MMM-yyyy`).replace(/yyyy|MMMM|MMM|MM|dd|d/g,e=>String(r[e]))},Ha=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}},Ua=(e,t)=>`${e}-${La(t+1)}`,Wa=`MMM yyyy`,Ga=(e,t=Wa)=>{let n=Ha(e);if(!n)return``;let r={yyyy:n.y,MMMM:ea(n.m),MMM:$i(n.m),MM:La(n.m+1)};return(t||`MMM yyyy`).replace(/yyyy|MMMM|MMM|MM/g,e=>String(r[e]))},Ka=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}},qa=e=>String(e).padStart(4,`0`),Ja=`yyyy`,Ya=(e,t=Ja)=>{let n=Ka(e);return n?(t||`yyyy`).replace(/yyyy/g,String(n.y)):``},Xa=(e,t)=>{let n=new Date(0);return n.setFullYear(e,t+1,0),n.getDate()},Za=(e,t)=>{for(;t<0;)t+=12,--e;for(;t>11;)t-=12,e+=1;return{y:e,m:t}},Qa=n({COPY_FEEDBACK_MS:()=>$a,copyTextToClipboard:()=>eo}),$a=2e3;async function eo(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 to={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.`},no=n({COLUMN_MAX_WIDTH:()=>io,COLUMN_MIN_WIDTH:()=>48,PIN_AT_VAR:()=>Eo,PIN_SIDES:()=>so,RESIZE_STEP:()=>10,RESIZE_STEP_LARGE:()=>50,ROW_HEIGHTS:()=>lo,ROW_MOVE_LIMIT:()=>200,ROW_MOVE_MS:()=>220,ROW_SAVE_ATTR:()=>zo,ROW_SAVE_ERROR_CLASS:()=>Bo,ROW_SAVE_STATES:()=>Ro,VIRTUAL_OVERSCAN:()=>8,clampColumnWidth:()=>yo,groupCount:()=>vo,groupItems:()=>bo,groupRowsText:()=>mo,identityCell:()=>Vo,measureRows:()=>Fo,notSavedText:()=>_o,pinAtValue:()=>Do,pinClasses:()=>ko,pinOffsetVar:()=>To,planPins:()=>Oo,playRowMoves:()=>Io,readColumnWidths:()=>Co,resizeName:()=>fo,rowLabel:()=>Ho,rowOrderChanged:()=>Lo,saveOutcomeText:()=>Go,savedManyText:()=>go,savedText:()=>ho,setRowSaveState:()=>Uo,settledRows:()=>Wo,virtualRange:()=>xo,widthText:()=>po,writeColumnWidths:()=>wo}),ro=48,io=1200,ao=10,oo=50,so=[`start`,`end`],co=8,lo={comfortable:72,cozy:48,compact:40},uo=()=>P(`dataTable`,to),fo=e=>e?F(uo().resizeColumnText,{label:e}):uo().resizeColumnLabel,po=e=>F(uo().resizeText,{px:e}),mo=e=>Qe(uo(),`groupRows`,e,{count:_a(e,{decimals:0})}),ho=e=>e?F(uo().savedText,{label:e}):uo().rowSavedText,go=e=>F(uo().rowsSavedText,{n:_a(e,{decimals:0})}),_o=(e,t)=>`${e?F(uo().wasNotSavedText,{label:e}):uo().rowWasNotSavedText}${t?` ${t}`:``}`,vo=e=>_a(e,{decimals:0}),yo=e=>Math.min(io,Math.max(48,Math.round(Number(e)||0)));function bo(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 xo({scrollTop:e,viewport:t,rowHeight:n,count:r,overscan:i=8}){let a=n>0?n:lo.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 So=e=>`wui-widths:${e}`;function Co(e){if(!e)return{};try{let t=JSON.parse(window.localStorage.getItem(So(e))||`{}`),n={};if(t&&typeof t==`object`)for(let[e,r]of Object.entries(t))Number.isFinite(r)&&(n[e]=yo(r));return n}catch{return{}}}function wo(e,t){if(e)try{Object.keys(t).length?window.localStorage.setItem(So(e),JSON.stringify(t)):window.localStorage.removeItem(So(e))}catch(e){if(!(e instanceof DOMException))throw e}}var To=(e,t)=>`--wui-pin-${e}-${t}`,Eo=`--wui-pin-at`,Do=(e,t)=>`var(${To(e,t)}, 0px)`;function Oo(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 ko=e=>e?`wui-pin-${e.side}${e.edge?` wui-pin-${e.side}-edge`:``}`:``,Ao=200,jo=220,Mo=`cubic-bezier(0.22, 1, 0.36, 1)`,No=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,Po=e=>e.getAttribute(`data-row-key`)??e;function Fo(e){let t=[...e];if(t.length>200)return null;let n=new Map;for(let e of t)e.hidden||n.set(Po(e),e.offsetTop);return n}function Io(e,t){let n=[...e];if(!t||n.length>200||No())return 0;let r=0;for(let e of n){if(e.hidden||typeof e.animate!=`function`)continue;let n=t.get(Po(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:Mo}),r++)}return r}function Lo(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 Ro=[`saving`,`error`],zo=`data-wui-save-state`,Bo=`wui-row-save-error`,Vo=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 Ho(e){let t=Vo(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 Uo(e,t,n=``){if(t!==null&&!Ro.includes(t))throw Error(`A row's save state is ${Ro.join(` or `)} (or null to clear it), not "${t}".`);e.querySelector(`:scope > * > .${Bo}`)?.remove(),t===null?e.removeAttribute(zo):e.setAttribute(zo,t),t===`saving`?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`);let r=t===`error`&&n?Vo(e):null;if(r){let t=e.ownerDocument.createElement(`span`);t.className=Bo,t.textContent=n,r.append(t)}}function Wo(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 Go(e){let t=e.filter(e=>e.ok),n=[],[r]=t;t.length===1&&r?n.push(ho(r.label)):t.length>1&&n.push(go(t.length));for(let t of e)t.ok||n.push(_o(t.label,t.message));return n.join(` `)}var Ko=n({isDrawn:()=>qo});function qo(e){return typeof e.checkVisibility==`function`?e.checkVisibility():e.closest(`[hidden]`)===null&&getComputedStyle(e).display!==`none`}var Jo=n({MENTION_ID_PATTERN:()=>Yo,mentionLabel:()=>Qo,mentionTextFromValue:()=>ts,mentionValueFromText:()=>ns,mentionedIds:()=>rs,parseMentionValue:()=>es}),Yo=/^[A-Za-z0-9_.:-]{1,64}$/,Xo=/@(\\+)\[|@\[([^[\]\n]{1,100})\]\(([A-Za-z0-9_.:-]{1,64})\)/g,Zo=/@(\\*)\[/g;function Qo(e){return String(e??``).replace(/[[\]\r\n]+/g,` `).replace(/\s+/g,` `).trim().slice(0,100)}var $o=e=>e.replace(Zo,(e,t)=>`@\\${t}[`);function es(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(Xo))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 ts(e){let t=``,n=[];for(let r of es(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 ns(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}`||!Yo.test(e.id)||(i+=$o(n.slice(a,e.start)),i+=`@[${e.label}](${e.id})`,a=e.end);return i+$o(n.slice(a))}function rs(e){let t=[];for(let n of es(e))`id`in n&&!t.includes(n.id)&&t.push(n.id);return t}var is=n({bindMenuKeys:()=>ls}),as=500,os=10,ss=new Set([`INPUT`,`TEXTAREA`,`SELECT`]);function cs(e){return e instanceof HTMLElement?ss.has(e.tagName)||e.isContentEditable:!1}function ls(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(qo),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=cs(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)+os,s-1));return}if(e.key===`PageUp`){u(Math.max((l<0?s:l)-os,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,as);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 us=n({NOTIFICATION_CENTRE_TEXT:()=>ds}),ds={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`},fs=n({NOTIFICATION_COUNT_CAP:()=>99,groupNotificationsByDay:()=>xs,notificationCountText:()=>gs,notificationDayHeading:()=>bs,notificationTime:()=>ys,notificationTriggerLabel:()=>_s,notificationUnreadAnnouncement:()=>vs}),ps=99,ms=864e5,hs=()=>P(`notificationCentre`,ds);function gs(e){return e>99?`99+`:String(e)}function _s(e,t){return t===0?e:`${e}, ${gs(t)} ${hs().unreadWordLabel}`}function vs(e){return e===0?hs().noneUnreadText:Qe(hs(),`unreadAnnouncementText`,e,{unread:gs(e)})}function ys(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?``:Ea(e,{pattern:`time`})}function bs(e,t=Date.now()){let n=Ea(e);return n===Ea(t)?hs().todayLabel:n===Ea(wa(t)-ms)?hs().yesterdayLabel:n}function xs(e,t=Date.now()){let n=new Map;for(let r of e){if(!Number.isFinite(wa(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=Ea(r.at),i=n.get(e);i||(i={key:e,heading:bs(r.at,t),items:[]},n.set(e,i)),i.items.push(r)}return[...n.values()]}var Ss={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`},Cs=n({RELATIVE_LIMIT_DAYS:()=>7,formatRelativeTime:()=>As,relativeTimeTitle:()=>js}),ws=6e4,Ts=60*ws,Es=24*Ts,Ds=()=>P(`relativeTime`,Ss),Os={minute:`minutesAgoText`,hour:`hoursAgoText`,day:`daysAgoText`},ks={minute:`inMinutesText`,hour:`inHoursText`,day:`inDaysText`};function As(e,t=Date.now()){let n=wa(e);if(!Number.isFinite(n))return U();let r=t-n,i=Math.abs(r);if(i>=7*Es)return Ea(n);if(i<ws)return Ds().justNowText;let[a,o]=i<Ts?[Math.floor(i/ws),`minute`]:i<Es?[Math.floor(i/Ts),`hour`]:[Math.floor(i/Es),`day`];return Qe(Ds(),(r>0?Os:ks)[o],a)}function js(e){let t=wa(e);return Number.isFinite(t)?`${Ea(t,{pattern:`datetime`})} IST`:U()}var Ms=n({FALLBACK_ROW_HEIGHT:()=>36,SELECT_WINDOW_OVERSCAN:()=>8,createHeightIndex:()=>Ps,scrollTopToReveal:()=>Is,windowRange:()=>Fs}),Ns=.5;function Ps(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)<=Ns||(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)<=Ns?!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 Fs(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 Is(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 Ls=n({parseServerHtml:()=>Rs});function Rs(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content}var zs=Object.freeze([`POST`,`PUT`,`PATCH`,`DELETE`]),Bs=e=>(Yt(`[@webority/ui-elements] Wui-Toast-Action: ${e}; the toast shows no action.`),null),Vs=e=>typeof e==`object`&&!!e;function Hs(e){if(e==null||e===``)return null;let t;try{t=JSON.parse(e)}catch{return Bs(`the value is not JSON`)}let n=Vs(t)?t:{},r=n.label,i=n.url,a=String(n.method??`POST`).toUpperCase();return typeof r!=`string`||r===``||typeof i!=`string`||i===``?Bs(`label and url must be non-empty strings`):zs.includes(a)?{label:r,url:i,method:a}:Bs(`method must be one of ${zs.join(`, `)}`)}var Us=n({CSRF_META_NAME:()=>Ws,DEFAULT_CSRF_HEADER:()=>Gs,DEFAULT_TIMEOUT_MS:()=>tc,HTTP_KINDS:()=>Ys,WUI_HEADERS:()=>W,WUI_REQUEST_HEADER:()=>Js,classifyStatus:()=>$s,configureCsrf:()=>qs,createRequestQueue:()=>sc,isSameOrigin:()=>Qs,readCsrf:()=>Zs,settleResponse:()=>ac,timeoutFromAttribute:()=>nc,wuiFetch:()=>oc}),Ws=`wui-csrf`,Gs=`RequestVerificationToken`,Ks={metaName:Ws,header:Gs};function qs({metaName:e=Ws,header:t=Gs}={}){Ks={metaName:e,header:t}}var Js=`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`}),Ys=Object.freeze([`ok`,`validation`,`forbidden`,`networkCheck`,`client`,`server`,`network`,`timeout`,`aborted`,`stale`,`session`]),Xs=new Set([`GET`,`HEAD`]);function Zs(e=document){let t=[...e.querySelectorAll(`meta`)].find(e=>e.getAttribute(`name`)===Ks.metaName),n=t?.getAttribute(`content`);return!t||!n?null:{header:t.getAttribute(`data-header`)||Ks.header,token:n}}var Qs=e=>{try{return new URL(e,window.location.href).origin===window.location.origin}catch{return!1}};function $s(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 ec=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,tc=3e4;function nc(e){let t=e?.trim()??``;return/^\d+$/.test(t)?Number(t):void 0}var rc=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})}},ic=e=>{if(e==null)return null;try{return decodeURIComponent(e)}catch{return e}};function ac(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:ic(r(W.message)),redirect:r(W.redirect),result:r(W.result),keepOpen:r(W.keepOpen)===`1`,toastVariant:r(W.toastVariant),toastAction:Hs(r(W.toastAction)),fragment:r(W.fragment)===`1`,data:rc(ic(r(W.data))),next:r(W.next)}}async function oc(e,t={}){let n=(t.method||`GET`).toUpperCase(),r=t.navigate||(e=>window.location.assign(e)),i={Accept:`text/html`,"X-Requested-With":`XMLHttpRequest`,[Js]:`1`,...t.headers};if(!Xs.has(n)&&Qs(e)){let e=Zs();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`:ec(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 ac(d(e))}let s=$s(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),ac(s,o);let c=``;if(s===`ok`||s===`validation`)try{c=await o.text()}catch(e){return ac(d(e),o)}return ac(s,o,c)}finally{clearTimeout(u),s?.removeEventListener(`abort`,o)}}function sc(){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 oc(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 cc=n({deriveStepStatus:()=>lc,stepperHeaderItems:()=>uc});function lc(e,t){return typeof t==`number`?e<t?`done`:e===t?`active`:`pending`:`pending`}function uc(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 dc={selectAllLabel:`Select all rows`,selectRowLabel:`Select row`},fc=n({SELECT_CELL_CLASS:()=>G,addRowSelectCells:()=>xc,addSelectColumn:()=>Sc,attachShiftRange:()=>Tc,createSelectHeaderCell:()=>hc,createSelectRowCell:()=>gc,createSelectSpacerCell:()=>_c,syncSelectAll:()=>Cc}),pc=()=>P(`tableSelect`,dc),G=`wui-select-cell`,mc=(e,t)=>{let n=e.createElement(`input`);return n.type=`checkbox`,n.className=`form-check-input`,n.setAttribute(`aria-label`,t),n};function hc(e=document){let t=e.createElement(`th`);return t.className=G,t.appendChild(mc(e,pc().selectAllLabel)),t}function gc(e=document,{disabled:t=!1}={}){let n=e.createElement(`td`);n.className=G;let r=mc(e,pc().selectRowLabel);return r.disabled=t,n.appendChild(r),n}function _c(e=document){let t=e.createElement(`td`);return t.className=G,t}var vc=e=>e.firstElementChild?.classList.contains(G),yc=e=>e.matches(`.wui-group-row, .wui-virtual-spacer, .wui-row-expanded`),bc=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n);function xc(e){for(let t of e){if(vc(t)||yc(t))continue;let e=t.getAttribute(`data-row-selectable`)===`false`;t.insertBefore(gc(t.ownerDocument,{disabled:e}),t.firstChild)}}function Sc(e){let t=e.querySelector(`thead tr`);if(!(t instanceof HTMLTableRowElement))return null;vc(t)||t.insertBefore(hc(e.ownerDocument),t.firstChild),xc(bc(e,`tbody tr`,HTMLTableRowElement));for(let t of bc(e,`tfoot tr`,HTMLTableRowElement))vc(t)||t.insertBefore(_c(e.ownerDocument),t.firstChild);let n=t.querySelector(`.${G} .form-check-input`);return n instanceof HTMLInputElement?n:null}function Cc(e){let t=e.querySelector(`thead .${G} .form-check-input`),n=bc(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 bc(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 wc=`tbody .${G} .form-check-input:not(:disabled)`;function Tc(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=bc(e,wc,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 Ec=n({DATE_PICKER_TEXT:()=>Dc}),Dc={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}.`},Oc=n({DRAWER_TEXT:()=>kc}),kc={closeLabel:`Close`,confirmDiscard:`Discard your changes?`,discardLabel:`Discard`,keepLabel:`Keep editing`,screenText:`{now}% of the screen`,sheetHeightLabel:`Sheet height`},Ac=n({HTTP_FAILURE_TEXT:()=>jc}),jc={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.`},Mc=n({matchSegments:()=>Nc});function Nc(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 Pc=n({TOOLTIP_ATTRIBUTE:()=>Fc,TOOLTIP_CLASS_ATTRIBUTE:()=>Lc,TOOLTIP_ID_ATTRIBUTE:()=>Rc,TOOLTIP_OPEN_ATTRIBUTE:()=>zc,TOOLTIP_PLACEMENT_ATTRIBUTE:()=>Ic,TOOLTIP_SHORTCUT_ATTRIBUTE:()=>Bc,showPinnedTooltips:()=>Hc,wireTooltips:()=>Vc}),Fc=`data-wui-tooltip`,Ic=`data-wui-tooltip-placement`,Lc=`data-wui-tooltip-class`,Rc=`data-wui-tooltip-id`,zc=`data-wui-tooltip-open`,Bc=`data-wui-tooltip-shortcut`;function Vc(e){Kc.has(e)||(Kc.add(e),e.addEventListener(`pointerover`,t=>{let n=Zc(t.target);n&&!$c(e,n)&&nl(e,n,!1)}),e.addEventListener(`pointerout`,t=>{let n=Jc(e).transient;n&&Zc(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||rl(e,n))}),e.addEventListener(`focusin`,t=>{let n=t.target;if(!(n instanceof Element)||!n.matches(`:focus-visible`))return;let r=Zc(n);r&&!$c(e,r)&&nl(e,r,!1)}),e.addEventListener(`focusout`,t=>{let n=Jc(e).transient;n&&Zc(t.target)===n.trigger&&(t.relatedTarget instanceof Node&&n.trigger.contains(t.relatedTarget)||rl(e,n))}),e.addEventListener(`click`,t=>{let n=Jc(e).transient;n&&Zc(t.target)===n.trigger&&rl(e,n)}))}function Hc(e){let t=e instanceof Document?e:e.ownerDocument;for(let n of e.querySelectorAll(`[${zc}]`))nl(t,n,!0)}var Uc=[`top`,`bottom`,`start`,`end`],Wc=`wui-tooltip`,Gc=`[${Fc}], [${Rc}]`,Kc=new WeakSet,qc=new WeakMap;function Jc(e){let t=qc.get(e);return t||(t={bubble:null,transient:null,pinned:new Map,pinnedCount:0,onEscape:t=>{t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),il(e))}},qc.set(e,t)),t}function Yc(e){return Uc.includes(e)}function Xc(e){return e===`auto`||Yc(e)}function Zc(e){if(!(e instanceof Element))return null;let t=e.closest(Gc);return t instanceof HTMLElement?t:null}function Qc(e,t){return e.transient?.trigger===t?e.transient:e.pinned.get(t)}function $c(e,t){return Qc(Jc(e),t)!==void 0}function el(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 tl(e,t){return t.bubble||=el(e,Wc),t.bubble}function nl(e,t,n){let r=t.getAttribute(Fc),i=t.getAttribute(Rc);if(r===null&&i===null)throw Error(`a tooltip trigger carries ${Fc} or ${Rc}`);if(r!==null&&i!==null)throw Error(`a tooltip trigger carries ${Fc} or ${Rc}, not both`);let a=t.getAttribute(`data-wui-tooltip-placement`)??`top`;if(!Xc(a))throw Error(`${Ic} "${a}" is not auto, top, bottom, start or end`);let o=Jc(e);rl(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?el(e,`${Wc}-pinned-${++o.pinnedCount}`):tl(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(Bc);i.inner.replaceChildren(r??``,...l?[N(`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`)});Fe(e).append(s),s.showPopover(),f();let p=Ie(e=>{s.parentElement!==e&&e.append(s),Ne(s),f()},e),m=new MutationObserver(()=>{t.isConnected||rl(e,Qc(Jc(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 rl(e,t){if(!t)return;let n=Jc(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 il(e){let t=Jc(e);rl(e,t.transient);for(let n of[...t.pinned.values()])rl(e,n)}var al=n({TABLE_EXPORT_CHUNK:()=>ol,loadTableExport:()=>cl,registerTableExport:()=>ll}),ol=`table-export`,sl=null;function cl(){return sl===null?jn(ol).then(()=>{if(sl===null)throw Error(`[webority-ui] The table-export chunk ran without handing over its writers.`);return sl}):Promise.resolve(sl)}function ll(e){sl=e}var ul=Object.freeze({anchorOverlay:d,avatarNode:Gt,buttonClass:_i,calendarMath:Pa,copyText:Qa,dataTable:no,datePickerText:Ec,defineElement:r,devWarn:Jt,dom:Re,drawerText:Oc,elementBase:a,fieldState:Xt,formatters:Bi,formMirror:tn,glyphs:Un,hasOwn:cn,httpFailureText:Ac,iconGlyphs:Un,imeSafeEnter:nr,isDrawn:Ko,listboxKeyNav:ar,loader:mn,mentionText:Jo,menuKeyNav:is,nativeOverlay:D,notificationCentreText:us,notificationDays:fs,optionLabel:lr,partRegistry:Lr,relativeTime:Cs,rtl:c,selectList:br,selectRemote:Ur,selectText:vr,selectWindow:Ms,serverHtml:Ls,shortcutKeys:at,stepperHeader:cc,svgNodes:Ln,tableExport:al,tableSelect:fc,textMatch:Mc,textStore:Be,tooltips:Pc,wuiHttp:Us,WuiSelect:Jr,zone:Oi}),dl={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`},fl=`image/jpeg,image/png,image/webp,image/heic,image/heif,.heic,.heif`,pl=10,ml=512,hl=`image/webp`,gl=[96,48];function _l(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 vl(e){let t=P(`imagePicker`,dl);return _l(e)?t.heicUnreadableMessage:t.photoUnreadableMessage}function yl(e,t){let n=Number(t);return{name:e?.name||`photo`,type:hl,size:Number.isInteger(n)&&n>0?n:512}}var bl=`/`,xl=`.search-wrap.wui-search-collapsible`,Sl=`.wui-topsearch-panel`,Cl=`.modal, wui-drawer[open]`,wl=new WeakSet,Tl=e=>{let t=e.querySelector(`.wui-search-toggle`);return t instanceof HTMLElement?t:null},El=e=>{let t=e.querySelector(`.search-input`);return t instanceof HTMLInputElement?t:null},Dl=e=>[...e.querySelectorAll(xl)].filter(e=>e instanceof HTMLElement);function Ol(e){e.classList.remove(`is-collapsed`),Tl(e)?.setAttribute(`aria-expanded`,`true`),El(e)?.focus()}function kl(e){El(e)?.value||(e.classList.add(`is-collapsed`),Tl(e)?.setAttribute(`aria-expanded`,`false`))}function Al(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=Tl(e),n=El(e);t?.addEventListener(`click`,()=>Ol(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n?.value||(r.preventDefault(),kl(e),t?.focus())}),e.addEventListener(`focusout`,t=>{let n=t.relatedTarget;n instanceof Node&&e.contains(n)||kl(e)})}function jl(e){wl.has(e)||(wl.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||St(t.target instanceof Node?t.target:null)||t.target instanceof Element&&t.target.closest(Cl)||e.querySelector(Sl))return;let n=Dl(e).find(e=>e.offsetParent!==null);n&&(t.preventDefault(),Ol(n))}))}function Ml(e=document){let t=e;for(let e of Dl(t))Al(e);jl(e instanceof Element?e.ownerDocument:e)}var Nl=`data-wui-command-shortcut`,Pl=`k`,Fl=new WeakSet,Il=/ \(Ctrl\+([^)]+)\)$/;function Ll(e=navigator){return/mac|iphone|ipad/i.test(e.userAgentData?.platform??e.platform)}function Rl(e,t){return!(e.ctrlKey||e.metaKey)||e.altKey||e.shiftKey||e.repeat?!1:String(e.key).toLowerCase()===String(t).toLowerCase()}function zl(e){return e.nodeType===Node.DOCUMENT_NODE}function Bl(e){e.closest(`wui-modal`)?.show()}function Vl(e){if(Ll())for(let t of e.querySelectorAll(`[${Nl}]`)){let e=t.getAttribute(`placeholder`);e!==null&&t.setAttribute(`placeholder`,e.replace(Il,(e,t)=>` (⌘${t})`))}}function Hl(e){let t=zl(e)?e:e.ownerDocument;e.querySelector(`[data-wui-command-shortcut]`)&&(Vl(t),Fl.has(t)||(Fl.add(t),t.addEventListener(`keydown`,e=>{for(let n of t.querySelectorAll(`[${Nl}]`))if(Rl(e,n.getAttribute(`data-wui-command-shortcut`)||Pl)){e.preventDefault(),n.localName===`wui-command-palette`||n.localName===`wui-modal`?Bl(n):(n.focus(),`select`in n&&typeof n.select==`function`&&n.select());return}})))}var Ul={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`},Wl=()=>P(`fileValidation`,Ul),Gl=`image/png,image/jpeg,image/webp`,Kl=5,ql={"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`]},Jl={"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`},Yl={"text/plain":`textFileLabel`,".txt":`textFileLabel`,"image/*":`imagesLabel`,"video/*":`videosLabel`,"audio/*":`audioLabel`},Xl=new Set([`image/*`,`video/*`,`audio/*`]),Zl=e=>{let t=Yl[e];return t?Wl()[t]:Jl[e]},Ql=e=>String(e||``).split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean),$l=[`.png`,`.jpg`,`.jpeg`,`.webp`,`.gif`,`.svg`,`.bmp`,`.avif`,`.heic`,`.heif`];function eu(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 $l.some(e=>r.endsWith(e))}var tu=[`kilobyteLabel`,`megabyteLabel`,`gigabyteLabel`];function nu(e){if(e<1024)return`${e} ${Wl().byteLabel}`;let t=e/1024,n=0;for(;t>=1024&&n<tu.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${Wl()[tu[n]??`gigabyteLabel`]}`}function ru(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 iu(e){let t=Ql(e);return t.length?t.every(e=>e.startsWith(`.`)?$l.includes(e):e===`image/*`||e.startsWith(`image/`)):!1}function au(e){let t=[];for(let n of Ql(e)){let e=Zl(n)||(n.startsWith(`.`)?n.slice(1).toUpperCase():n.toUpperCase());t.includes(e)||t.push(e)}return t.length<=1?t[0]||Wl().supportedLabel:F(Wl().orText,{names:t.slice(0,-1).join(`, `),last:t.slice(-1).join(``)})}function ou(e,t){let n=Ql(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&&(ql[e]||[]).some(e=>i.endsWith(e)))}function su(e,t={}){if(!e)return null;let n=t.accept===void 0?Gl:t.accept,r=t.maxSizeMb===void 0?5:t.maxSizeMb;if(!ou(e,n)){let e=au(n),t=Ql(n).map(e=>Xl.has(e));return t.every(Boolean)?F(Wl().chooseText,{label:e}):t.some(Boolean)?F(Wl().chooseText,{label:e.endsWith(` file`)?`${e}s`:`${e} files`}):F(Wl().chooseText,{label:`a ${e.endsWith(` file`)?e:`${e} file`}`})}return r!==null&&r>0&&e.size>r*1024*1024?F(Wl().keepFileUnderMbText,{maxSizeMb:r}):null}function cu(e,t){let n=Array.from(e||[]),r=t.multiple?n:n.slice(0,1),i=[],a=[];for(let e of r){let n=su(e,{accept:t.accept,maxSizeMb:t.maxSizeMb});n?a.push({file:e,message:n}):i.push(e)}return{files:i,rejections:a}}function lu(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}=cu(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 uu={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`},du=/[0-9]/,fu={9:du,A:/[A-Za-z]/,"*":/[0-9A-Za-z]/},pu=/[9A*]/,mu=new Set([`text`,`tel`,`search`,`url`,`password`]),hu=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},gu=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},_u=e=>e.length<=3?e:`${e.slice(0,-3).replace(/\B(?=(\d{2})+(?!\d))/g,`,`)},${e.slice(-3)}`,vu=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());return t?`${t[3]}-${t[2]}-${t[1]}`:e},yu=()=>P(`inputMask`,uu);function bu(e,{upper:t=!1,normalize:n,valid:r,post:i=e=>e,message:a=yu().incompleteMessage}={}){let o=[...e].map(e=>{let t=fu[e];return t?{re:t}:{lit:e}}),s=o.filter(e=>e.re).length;return{inputMode:o.every(e=>!e.re||e.re===du)?`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 xu(){return{inputMode:`decimal`,post:e=>e,message:yu().amountMessage,extract(e){let t=``,n=!1,r=0;for(let i of e)du.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=_u(t)+(e.includes(`.`)?`.${n}`:``);return{text:r,isRaw:[...r].map(e=>e!==`,`)}},isValid:e=>/^\d+(\.\d{1,2})?$/.test(e)}}var Su={"phone-in":()=>bu(`99999 99999`,{normalize:hu,valid:e=>/^[6-9]/.test(e),message:yu().phoneInMessage}),pan:()=>bu(`AAAAA9999A`,{upper:!0,valid:e=>/^[A-Z]{5}\d{4}[A-Z]$/.test(e),message:yu().panMessage}),gstin:()=>bu(`99AAAAA9999A***`,{upper:!0,valid:e=>/^\d{2}[A-Z]{5}\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/.test(e),message:yu().gstinMessage}),aadhaar:()=>bu(`9999 9999 9999`,{valid:e=>/^[2-9]/.test(e),message:yu().aadhaarMessage}),ifsc:()=>bu(`AAAA*******`,{upper:!0,valid:e=>/^[A-Z]{4}0[A-Z0-9]{6}$/.test(e),message:yu().ifscMessage}),"pin-code":()=>bu(`999999`,{valid:e=>/^[1-9]/.test(e),message:yu().pinCodeMessage}),date:()=>bu(`99-99-9999`,{normalize:vu,valid:gu,post:(e,t)=>e.length===8&&gu(e)?`${e.slice(4)}-${e.slice(2,4)}-${e.slice(0,2)}`:t,message:yu().dateMessage}),amount:xu},Cu=Object.keys(Su),wu=e=>{let t=String(e).toLowerCase();return ln(Su,t)?t:void 0},Tu=e=>pu.test(String(e))&&wu(e)===void 0,Eu=new Map;Xe(()=>Eu.clear());function Du(e){if(e==null||e===``)return null;let t=String(e),n=Eu.get(t);return n===void 0&&(n=Tu(t)?bu(t):ln(Su,t)?Su[t]?.()??null:null,Eu.set(t,n)),n}var Ou=(e,t)=>e.normalize?e.normalize(t):t;function ku(e,t){let n=Du(e);return n?n.extract(Ou(n,String(t??``))):String(t??``)}function Au(e,t){let n=Du(e);if(!n)return String(t??``);let r=n.extract(Ou(n,String(t??``)));return n.post(r,n.layout(r).text)}function ju(e,t){let n=Du(e);return n?n.layout(n.extract(Ou(n,String(t??``)))).text:String(t??``)}var Mu=(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},Nu=new WeakMap,Pu=e=>Nu.get(e)?.(),Fu=new WeakMap;function Iu(e,t,n,r){let i=e.getAll(t),a=Fu.get(e)??new Set;Fu.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 Lu(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 Ru(e,{mask:t,postFormatted:n=!1,onChange:r,onInvalidChange:i}={}){let a=Du(t);if(!a||!mu.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??Lu(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&&mu.has(e.type))){let t=Mu(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:()=>j(x.get,`input value getter missing`).call(e),set:t=>{if(j(x.set,`input value setter missing`).call(e,t),p)return;let n=Ou(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:Ou(a,e.value);y(r,e.selectionStart??r.length,!0)},w=()=>{p=!0},T=()=>{p=!1;let t=Ou(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=Ou(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&&Iu(t.formData,e.name,e.value,D())},ne=()=>{clearTimeout(_),_=setTimeout(()=>{m=!1,y(Ou(a,e.value),e.value.length,!0)},0)};n||(k?.addEventListener(`formdata`,te),Nu.set(e,D)),k?.addEventListener(`reset`,ne),k?.addEventListener(`submit`,O);let re=Ou(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),Nu.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 zu(){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=Pu(e);return n===void 0?t.call(this,e):n},e.wuiMaskHook=!0}var Bu=new WeakMap,Vu,Hu=e=>{Bu.has(e)||Bu.set(e,Ru(e,{mask:e.dataset.appMask,postFormatted:e.hasAttribute(`data-mask-post-formatted`)}))},Uu=e=>[...e.querySelectorAll(`input[data-app-mask]`)].filter(e=>e instanceof HTMLInputElement),Wu=e=>e instanceof Element?[...e instanceof HTMLInputElement&&e.matches(`input[data-app-mask]`)?[e]:[],...Uu(e)]:[];function Gu(){Vu||typeof MutationObserver>`u`||(Vu=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Wu(e))Bu.get(t)?.(),Bu.delete(t);for(let e of t.addedNodes)for(let t of Wu(e))Hu(t)}}),Vu.observe(document.documentElement,{childList:!0,subtree:!0}))}function Ku(e=document){zu();for(let t of Uu(e))Hu(t);e===document&&Gu()}var qu=`data-wui-bulk-in-bar`,Ju=`[data-wui-page-header-bar][data-wui-bulk-for]`,Yu=new WeakSet;function Xu(e){return`${_a(e,{decimals:0})} selected`}function Zu(e){let t=e.dataset.wuiBulkFor;return t===void 0?null:document.getElementById(t)}function Qu(e){return typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`}function $u(e,t){return[...e.querySelectorAll(t)].flatMap(e=>e instanceof HTMLElement?[e]:[])}function ed(e,t){for(let n of $u(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?Xu(t):``}function td(e=document){for(let t of $u(e,Ju))Zu(t)?.setAttribute(qu,``);Yu.has(document)||(Yu.add(document),document.addEventListener(`selectionchange`,e=>{if(!(e instanceof CustomEvent)||!Qu(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 $u(document,Ju))Zu(n)?.contains(t)&&ed(n,e.detail.selected)}))}var nd={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`},rd={minLength:10,uppercase:!0,lowercase:!0,digit:!0,special:!0,uniqueChars:0,customRules:[]},id=()=>P(`passwordRules`,nd);function ad(e){return e===!0||e==null?{...rd}:{...rd,...e}}function od(e){let t=ad(e),n=[];if(t.minLength>0&&n.push({key:`length`,label:F(id().lengthText,{minLength:t.minLength}),test:e=>e.length>=t.minLength}),t.uppercase&&n.push({key:`uppercase`,label:id().uppercaseText,test:e=>/[A-Z]/.test(e)}),t.lowercase&&n.push({key:`lowercase`,label:id().lowercaseText,test:e=>/[a-z]/.test(e)}),t.digit&&n.push({key:`digit`,label:id().digitText,test:e=>/[0-9]/.test(e)}),t.special&&n.push({key:`special`,label:id().specialText,test:e=>/[^A-Za-z0-9]/.test(e)}),t.uniqueChars>0){let e=t.uniqueChars;n.push({key:`unique`,label:Qe(id(),`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 sd(e,t){let n=e==null?``:String(e);return od(t).map(e=>({key:e.key,label:e.label,met:e.test(n)}))}function cd(e,t){return sd(e,t).every(e=>e.met)}var ld={moveLabel:`Move to`,moveText:`Move to {label}`},ud=`wui:row-drop`,dd=`is-drop-over`,fd=`application/x-wui-rows`,pd=`wui-row-dragging`,md=`[data-wui-drop-target]`,hd=`tbody tr[data-row-key]`,gd=`input, button, a, select, textarea, label`,_d=`.wui-select-cell .form-check-input`,vd=new WeakMap,yd=new WeakSet,bd=null,xd=null;function Sd(e){let t=e.querySelector(_d);return t instanceof HTMLInputElement&&t.checked}function Cd(e){let t=[];for(let n of e.querySelectorAll(`tbody tr`))n instanceof HTMLElement&&Sd(n)&&t.push(n.dataset.rowKey);return t}function wd(e,t){return M(e,t)}function Td(e,t){let n=wd(e,t);return n instanceof HTMLElement?n:null}function Ed(e){let t=e.textContent;if(t===null)throw Error(`A drop target has no text content.`);return t.trim()}var Dd=e=>typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`;function Od(){bd=null,document.body.classList.remove(pd);for(let e of document.querySelectorAll(`${md}.${dd}`))e.classList.remove(dd)}function kd(e,t,n){e.dispatchEvent(new CustomEvent(ud,{bubbles:!0,detail:{keys:t,target:n.dataset.wuiDropTarget}}))}function Ad(e){let t=Td(e.target,md);if(!t||!bd)return;e.preventDefault();let n=j(e.dataTransfer,`A drag event arrived without its DataTransfer.`);n.dropEffect=`move`,t.classList.add(dd)}function jd(e){let t=Td(e.target,md);!t||e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||t.classList.remove(dd)}function Md(e){let t=Td(e.target,md);if(!t||!bd)return;e.preventDefault(),t.classList.remove(dd);let{root:n,keys:r}=bd;kd(n,r,t),Od()}function Nd(e){let t=Td(e.target,md);t&&xd?.keys.length&&(e.preventDefault(),kd(xd.root,xd.keys,t))}function Pd(e){(ir(e)||e.key===` `)&&Nd(e)}function Fd(e){yd.has(e)||(yd.add(e),e.addEventListener(`dragover`,Ad),e.addEventListener(`dragenter`,Ad),e.addEventListener(`dragleave`,jd),e.addEventListener(`drop`,Md),e.addEventListener(`click`,Nd),e.addEventListener(`keydown`,Pd))}function Id(e){let t=vd.get(e);if(t)return t;Fd(e.ownerDocument||e);let n=t=>{let n=Td(t.target,hd);if(!n||!e.contains(n))return;let r=wd(t.target,gd);r&&n.contains(r)||(n.draggable=!0)},r=t=>{let n=Td(t.target,hd);if(!n||!e.contains(n))return;let r=Sd(n)?Cd(e):[n.dataset.rowKey],i=j(t.dataTransfer,`A drag event arrived without its DataTransfer.`);i.setData(fd,JSON.stringify(r)),i.setData(`text/plain`,r.join(`,`)),i.effectAllowed=`move`,bd={root:e,keys:r},document.body.classList.add(pd)},i=t=>{let n=t instanceof CustomEvent?t.detail:void 0;if(Dd(n)){let{keys:t}=n;n.selected>0?xd={root:e,keys:Array.isArray(t)?t:Cd(e)}:n.selected===0&&(xd=null)}Rd(document)};e.addEventListener(`pointerdown`,n),e.addEventListener(`dragstart`,r),e.addEventListener(`dragend`,Od),e.addEventListener(`selectionchange`,i);let a=()=>{e.removeEventListener(`pointerdown`,n),e.removeEventListener(`dragstart`,r),e.removeEventListener(`dragend`,Od),e.removeEventListener(`selectionchange`,i),vd.delete(e)};return vd.set(e,a),a}var Ld=()=>P(`rowDrop`,ld);function Rd(e=document){let t=e.querySelector(`[data-wui-row-drag] tbody tr ${_d}:checked`)!==null;for(let n of e.querySelectorAll(md)){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`)||Ed(n);n.setAttribute(`aria-label`,F(Ld().moveText,{label:e}))}for(let t of e.querySelectorAll(`.wui-drop-tray`))t.hasAttribute(`role`)||(t.setAttribute(`role`,`toolbar`),t.setAttribute(`aria-label`,Ld().moveLabel))}function zd(e=document){for(let t of e.querySelectorAll(`[data-wui-row-drag]`))t instanceof HTMLElement&&Id(t);Rd(e.ownerDocument||e)}var Bd=`.table-wrap, .table-responsive, [class*="table-responsive-"]`,Vd=1;function Hd(e){let t=()=>{let t=e.scrollWidth-e.clientWidth,n=Math.abs(e.scrollLeft);e.toggleAttribute(`data-wui-overflow-start`,t>Vd&&n>Vd),e.toggleAttribute(`data-wui-overflow-end`,t>Vd&&n<t-Vd),e.toggleAttribute(`data-wui-overflow-top`,e.scrollTop>Vd)},n=()=>{if(e.scrollWidth-e.clientWidth>Vd){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 Ud=new WeakMap,Wd,Gd=e=>{Ud.has(e)||Ud.set(e,Hd(e))},Kd=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(Bd)].filter(e=>e instanceof HTMLElement);return[...t,...n]};function qd(){Wd||typeof MutationObserver>`u`||(Wd=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Kd(e))Ud.get(t)?.(),Ud.delete(t);for(let e of t.addedNodes)for(let t of Kd(e))Gd(t)}}),Wd.observe(document.documentElement,{childList:!0,subtree:!0}))}function Jd(e=document){for(let t of e.querySelectorAll(Bd))t instanceof HTMLElement&&Gd(t);e===document&&qd()}var Yd={leaveLabel:`Leave`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,title:`Leave without saving?`},Xd={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`},Zd={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.`},Qd={closeLabel:`Close`,error:`Error`,failedText:`That did not work. Try again.`,loading:`Loading...`,moreText:`more`,success:`Done`},$d=Object.freeze([`page`,`pageSize`,`sortBy`,`sortOrder`,`search`]),ef=`search`,K=()=>P(`dataTable`,to),tf=5,nf=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,rf=e=>e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled,af=e=>nf(e)&&`type`in e&&e.type===`hidden`,q=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n),J=(e,t,n)=>{let r=e.querySelector(t);return r instanceof n?r:null},of=(e,t,n)=>{let r=e.closest(t);return r instanceof n?r:null},sf=e=>e.localName===`wui-select`,cf=new WeakMap,lf=(e,t)=>{let n=Number(e);return Number.isInteger(n)?n:t},uf=e=>({total:lf(e.dataset.total,0),totalCapped:e.dataset.totalCapped===`true`,page:lf(e.dataset.page,1),pageSize:lf(e.dataset.pageSize,0),sortBy:e.dataset.sortBy||``,sortOrder:e.dataset.sortOrder===`desc`?`desc`:`asc`,pending:e.dataset.totalPending===`true`,rowCount:lf(e.dataset.rowCount,0)}),df=(e,t)=>{e&&Y().toast(e,{variant:t})},ff=(e,t)=>{if(!e)return;let n=new Set([...e.elements].filter(e=>!af(e)||e.hasAttribute(`data-range-mirror`)).map(e=>e.getAttribute(`name`)).filter(e=>e&&!$d.includes(e))),r=[...t].some(([e,t])=>t!==``&&n.has(e));for(let t of q(e,`[data-wui-filter-clear]`,HTMLElement))t.hidden=!r},pf=new Intl.NumberFormat(`en-IN`),mf=(e,t)=>t?`${pf.format(e)}+`:pf.format(e),hf=(e,t,n)=>{let r=e.closest(`.wui-list-card`),i=r?J(r,`.wui-list-card-count`,HTMLElement):null;i&&(i.textContent=mf(t,n))};function gf(e=document){let t=q(e,`[data-wui-server]`,HTMLElement);e instanceof HTMLElement&&e.matches(`[data-wui-server]`)&&t.unshift(e);for(let e of t){if(cf.has(e))continue;let t=vf(e);cf.set(e,t),e.hasAttribute(`data-load-first-page`)&&t.reload()}}function _f(e){let t=e instanceof Element?of(e,`[data-wui-server]`,HTMLElement):null;return t&&cf.get(t)||null}function vf(e){let t=J(e,`.table-wrap`,HTMLElement),n=t?J(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=J(t,`:scope > [data-wui-table-state]`,HTMLElement),a=J(e,`[data-wui-table-pager]`,HTMLElement),o=J(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||K().loadingText,errorText:e.dataset.errorText||K().errorText,timeoutMs:nc(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=sc(),g=new AbortController,_={signal:g.signal},v=j(J(n,`:scope > tbody[data-wui-rows]`,HTMLTableSectionElement),`A server-paged table needs its rows in <app-table-rows> (tbody[data-wui-rows]).`),y=uf(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?K().emptyLabel:F(K().pageTextPending,{page:e.page});if(e.total===0)return K().emptyLabel;let t=e.pageSize>0?Math.max(1,Math.ceil(e.total/e.pageSize)):1,n=e.totalCapped?mf(e.total,!0):`${e.total}`;return F(e.total===1?K().pageTextOne:K().pageTextOther,{page:e.page,pages:t,total:n})},ne=()=>q(n,`:scope > thead > tr:first-child > th`,HTMLTableCellElement),re=e=>{if(f&&q(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){xc(e);for(let t of e){let e=J(t,`.${G} .form-check-input:not(:disabled)`,HTMLInputElement);e&&(m&&p.add(t.dataset.rowKey),e.checked=p.has(t.dataset.rowKey))}Cc(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(q(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=J(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?J(document,s.filtersRegion,HTMLElement):null;return t&&e&&(ce(t),t.replaceChildren(e.content.cloneNode(!0))),t},fe=0,pe=e=>{let r=uf(e);r.pending&&Object.assign(r,{total:y.total,totalCapped:y.totalCapped});let i=r.sortBy!==y.sortBy||r.sortOrder!==y.sortOrder?Fo(v.rows):null;ue(J(e,`:scope > template[data-wui-pager]`,HTMLTemplateElement)),le(e,r);let a=de(J(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(),Io(e.rows,i),o&&Ee(),a},me=e=>{let t=J(Rs(`<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:tf},()=>{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`?K().forbiddenMessage:e===`networkCheck`?P(`httpFailure`,jc).networkCheckText:e===`network`?K().networkMessage:e===`timeout`?K().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=R(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=Si(`primary`,`outline`,`sm`),c.dataset.wui=vi,c.setAttribute(`data-wui-table-retry`,``),c.textContent=K().retryLabel,s.append(c),t.append(r,o,s),ce(i),i.replaceChildren(t),i.hidden=!1}k(n)},be=()=>s.filtersForm?J(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){L(e)}if(!o.ok||!c){let e=o.ok?`server`:o.kind;return i?Yt(`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),ff(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)),Y().refresh(t),l&&Y().refresh(l),y.pending?Se():hf(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;oc(T(u,D),{timeoutMs:s.timeoutMs}).then(n=>{if(t!==fe)return;if(!n.ok){Yt(`[@webority/ui-elements] A server table's total did not load; its pager keeps Previous and Next.`,n.kind);return}let r=J(Rs(n.html),`div[data-wui-total]`,HTMLElement);if(!r){Yt(`[@webority/ui-elements] A server table's count answer has no div[data-wui-total]; its pager keeps Previous and Next.`);return}if(lf(r.dataset.page,-1)!==y.page||lf(r.dataset.pageSize,-1)!==y.pageSize)return;let i=lf(r.dataset.total,-1);if(i<0){Yt(`[@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=J(r,`:scope > template[data-wui-pager]`,HTMLTemplateElement);s&&ue(s);let c=de(J(r,`:scope > template[data-wui-filters]`,HTMLTemplateElement));c&&Y().refresh(c),hf(e,y.total,y.totalCapped),k(te(y)),o&&Ee(),O(`wui:table:total`,{total:i,totalCapped:a})})},Ce=()=>q(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=R(`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?of(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?of(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&(e.preventDefault(),Te(t.dataset.sortKey??``))});let Ee=()=>{Cc(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&&(Tc(n,(e,t)=>{for(let n of e){let e=of(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 q(v,`:scope > tr`,HTMLTableRowElement)){let n=J(e,`.${G} .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=of(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?of(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=J(document,s.searchInput,HTMLElement);return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e:e?J(e,`input`,HTMLInputElement):null},Oe=()=>e.isConnected?!0:(g.abort(),clearTimeout(x??void 0),!1),ke=(e,t)=>{let n=[...e.elements].filter(nf),r=new Set;for(let e of n)e.name&&!af(e)&&r.add(e.name);let i=[];for(let e of n)if(e.name&&!rf(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},Ae=(e,t)=>{let n=new Set([...e.elements].filter(nf).map(e=>e.name).filter(Boolean)),r=new URLSearchParams,i=e=>e!==`search`&&$d.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(ef);let e=a.value.trim();e&&r.set(ef,e)}return A(r,`push`)},je=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(),Ae(e.target,e.submitter))},_),document.addEventListener(`change`,e=>{if(!Oe()||!s.filtersForm||!(e.target instanceof Element))return;let t=of(e.target,s.filtersForm,HTMLFormElement);!t||e.target===De()||t.hasAttribute(`data-wui-apply-on-change`)||e.target.closest(`wui-filter-popover`)||Ae(t)},_);let Me=(e,t)=>{if(!e)return;let n=e=>t.get(e)??``;for(let r of q(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 q(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(sf)){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(!Oe())return;let t=e.target instanceof Element?of(e.target,`a[href]`,HTMLAnchorElement):null;if(!t||!je(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));Me(t.closest(`form`),r),ff(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(ef,n):e.delete(ef),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`)??``),ff(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 Ne=e=>[...v.rows].find(t=>t.dataset.rowKey===e)??null,Pe=e=>{if(!e?.trim())return null;let t=Rs(`<table><tbody>${e}</tbody></table>`);if(t.querySelector(`tbody[data-wui-rows]`))return null;let n=q(t,`table > tbody > tr[data-row-key]`,HTMLTableRowElement);return n.length?n.map(e=>document.importNode(e,!0)):null},Fe=(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:Ne(t.dataset.rowKey);e&&(ce(e),e.replaceWith(t),a.push(t))}return ae(a),Y().refresh(t),i},Ie=e=>e.message||(e.kind===`forbidden`?K().actionForbiddenMessage:K().actionFailedMessage),Le=e=>{e?.isConnected&&e.getAttribute(`data-wui-save-state`)===`saving`&&Uo(e,null)},Re=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:Ne(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(G)),u=o===void 0?c??he(Math.max(1,l.length),l):ze(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),Uo(u,`saving`);let d=Ho(u),f=await oc(e,{method:n.toUpperCase(),body:r});if(f.kind===`session`)return!1;if(f.ok){let e=Pe(f.html),t=e&&u.isConnected?Fe(e,u,s):null;return t?k(ho(Ho(t)||d)):(await A(D,`none`),Le(u)),wf(f,f.toastVariant||`success`),O(`wui:table:saved`,{key:t?.dataset.rowKey??(s?null:String(a)),added:s,status:f.status}),!0}let p=Ie(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&&Uo(m,`error`,p),f.kind!==`aborted`&&df(p,`danger`),k(_o(d,p)),O(`wui:table:failed`,{key:s?null:String(a),added:s,status:f.status,kind:f.kind,message:p}),!1},M=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=of(e,`tr`,HTMLTableRowElement),r=n?.dataset.rowKey??null,i=e.dataset.wuiRowAction||``,a=n?Ho(n):``;e.disabled=!0,e.setAttribute(`aria-busy`,`true`),n&&Uo(n,`saving`);let o=await oc(t,{method:(e.dataset.method||`post`).toUpperCase()});if(e.disabled=!1,e.removeAttribute(`aria-busy`),o.kind===`session`||o.kind===`aborted`)Le(n);else{if(o.ok){wf(o,o.toastVariant||`success`);let e=n?.isConnected?Pe(o.html):null,t=e&&n?Fe(e,n,!1):null;t?k(ho(Ho(t)||a)):(await A(D,`none`),Le(n))}else{let e=Ie(o);df(e,`danger`),n?.isConnected&&Uo(n,`error`,e),k(_o(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?of(e.target,`[data-wui-row-action]`,HTMLButtonElement):null;t&&v.contains(t)&&!t.disabled&&(e.preventDefault(),M(t))}),re(v),se(v),f&&Sc(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:Re,setActiveRow:t=>{e.dataset.activeRowKey=t==null?``:String(t),ie(q(v,`:scope > tr`,HTMLTableRowElement))},selection:{keys:()=>[...p],count:()=>m?y.total:p.size,allMatching:()=>m,selectAllMatching:()=>{if(y.pending)Yt(`[@webority/ui-elements] select all matching needs the total; the table is still waiting for its count.`);else{m=!0;for(let e of q(v,`:scope > tr`,HTMLTableRowElement)){let t=J(e,`.${G} .form-check-input`,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 q(v,`:scope > tr > .${G} .form-check-input:not(:disabled)`,HTMLInputElement))e.checked=!1;Ee()}}}}var yf=8e3,bf=()=>P(`toast`,Qd),xf=[`success`,`info`,`warning`,`danger`],Sf=e=>xf.some(t=>t===e);function Cf(e){if(!Sf(e))throw RangeError(`Unknown toast variant "${e}".`);return e}function Y(){return j(window.WUI,`window.WUI is not defined: the Razor behaviour script did not load on this page.`)}function wf(e,t=`success`){if(!e?.message)return;let n=e.toastAction;n?Y().toast(e.message,{variant:Cf(t),duration:yf,action:{label:n.label,onClick:()=>Tf(n)}}):Y().toast(e.message,{variant:Cf(t)})}async function Tf(e){let t=await oc(e.url,{method:e.method});if(t.kind!==`session`&&t.kind!==`aborted`){if(t.ok){wf(t,t.toastVariant||`success`);for(let e of document.querySelectorAll(`[data-wui-server]`))e instanceof HTMLElement&&e.dataset.refreshOnSuccess!==`false`&&_f(e)?.reload()}else Y().toast(t.message||bf().failedText,{variant:`danger`})}}var Ef=`wui-remote-modal`,Df=`wui-remote-drawer`,Of=Object.freeze({sm:360,md:480,lg:640,xl:720}),kf=`wui-modal-fullscreen`,Af=`wui-modal-wide`,jf=Object.freeze({sm:380,md:440,lg:640,xl:880,wide:1080}),X=()=>P(`modal`,Zd),Mf=e=>nc(e?.getAttribute(`data-wui-timeout`)??null)??3e4,Nf=`a[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,Pf=`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled]),[contenteditable="true"]`,Ff=`[aria-invalid="true"], .is-invalid, .input-validation-error`,If=`invalid`,Lf=`.wui-error-summary, [data-wui-form-errors], .validation-summary-errors, [data-valmsg-summary]`,Rf=`[data-wui-modal-content]`,zf=`[data-wui-pane-close], [data-wui-dismiss]`,Bf=()=>N(`button`,{type:`button`,class:`wui-modal-close`,"data-wui-dismiss":!0,"aria-label":X().closeLabel},Bn({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`}]])),Vf=new WeakMap,Hf=new WeakSet;function Uf(e,t){if(e==null)throw TypeError(`The remote modal needs ${t}, and the page does not have it.`);return e}var Z=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Wf=(e,t,n)=>Uf(Z(e,t),n),Gf=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Kf=()=>Object.assign(Error(`The remote modal load was aborted.`),{name:`AbortError`}),qf=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,Jf=(e,t)=>{let n=e instanceof Element?e.closest(t):null;return n instanceof HTMLElement?n:null},Yf=e=>ln(jf,e),Xf=e=>ln(Of,e);function Zf(e){if(e==null||e===``)return null;if(e===`fullscreen`)return{fullscreen:!0};if(Yf(e))return e===`wide`?{px:jf.wide,wide:!0}:{px:jf[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 Qf=e=>{if(e.classList.contains(`wui-modal-fullscreen`))return{fullscreen:!0};if(e.classList.contains(`wui-modal-wide`))return{px:jf.wide,wide:!0};let t=Number.parseInt(e.style.getPropertyValue(`--wui-modal-max-width`),10);return{px:t>0?t:jf.md}},$f=(e,t)=>{e.classList.toggle(kf,!!t.fullscreen),e.classList.toggle(Af,!t.fullscreen&&!!t.wide),t.fullscreen?e.style.removeProperty(`--wui-modal-max-width`):e.style.setProperty(`--wui-modal-max-width`,`${t.px}px`)},ep=[`center`,`top`];function tp(e){if(e==null||e===``)return null;if(Xf(e))return{px:Of[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 np=e=>e.container===`drawer`,rp=e=>e.container===`pane`,ip=e=>e.container!==`modal`,ap=(e,t)=>np(e)?tp(t):Zf(t),op=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},sp=e=>rp(e)?e.shell:Wf(e.shell,`.modal-dialog`,`a dialog frame`);function cp(e=`modal`){let t=e===`drawer`,n=t?Df:Ef,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?Of.md:jf.md}px`),a.replaceChildren(N(`div`,{class:t?`modal-dialog wui-remote-drawer-dialog`:`modal-dialog modal-dialog-centered wui-rb-dialog`},N(`div`,{class:`modal-content wui-modal`}))),i.append(a),document.body.appendChild(i),i}var lp=e=>N(`div`,{class:`wui-modal-header`},N(`div`,{class:`wui-modal-heading`},N(`div`,{class:`wui-modal-headtext`},N(`div`,{class:`wui-modal-title`},e))),Bf()),up=e=>N(`div`,{class:`modal-content wui-modal`,"aria-busy":`true`},lp(e),N(`div`,{class:`wui-modal-body`},N(`div`,{class:`wui-modal-loading`,role:`status`},N(`span`,{class:`visually-hidden`},X().loadingLabel),N(`div`,{class:`skeleton wui-modal-skeleton`}),N(`div`,{class:`skeleton wui-modal-skeleton`}),N(`div`,{class:`skeleton wui-modal-skeleton wui-modal-skeleton--short`})))),dp=(e,t)=>{let n={forbidden:X().forbiddenMessage,networkCheck:P(`httpFailure`,jc).networkCheckText,client:X().clientMessage,server:X().serverMessage,network:X().networkMessage,timeout:X().timeoutMessage};return N(`div`,{class:`modal-content wui-modal`,"data-wui-modal-error":t},lp(e),N(`div`,{class:`wui-modal-body`},N(`div`,{class:`wui-modal-state`,role:`alert`},N(`p`,{class:`wui-modal-state-title`},X().errorTitle),N(`p`,{class:`wui-modal-state-text`},n[t]||X().serverMessage),N(`div`,{class:`wui-modal-state-actions`},N(`button`,{type:`button`,class:Si(`primary`,`soft`,`md`),"data-wui-dismiss":!0,"data-wui":vi},X().closeLabel),N(`button`,{type:`button`,class:Si(`primary`,`solid`,`md`),"data-wui-modal-retry":!0,"data-wui":vi},X().retryLabel)))))},fp=e=>Z(e.shell,`.modal-content`),pp=e=>ze(e.cloneNode(!0),HTMLElement,`a card copy is not an element`);function mp(e){e&&e.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0}))}function hp(e,t){let n=fp(e),r=n?_p(n):new Map;mp(n),n?n.replaceWith(t):sp(e).appendChild(t),vp(t,r),Y().refresh()}var gp=`input[type="file"][name]`;function _p(e){let t=new Map;for(let n of e.querySelectorAll(gp)){if(!(n instanceof HTMLInputElement))continue;let e=n.files;e&&e.length>0&&t.set(n.name,[...e])}return t}function vp(e,t){if(t.size!==0&&typeof DataTransfer<`u`)for(let n of e.querySelectorAll(gp)){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 yp=e=>rp(e)?!e.shell.hidden:e.host.hasAttribute(`open`);function bp(e,t,n=!1){let r=t?Z(e,Ff):null,i=r?r.matches(Nf)?r:Z(r,Nf)||r:null;if(!i&&n)i=Z(e,`[data-autofocus]`)||Z(e,Pf)||Z(e,`.wui-modal-close`);else if(!i){let t=Gf(e,Nf);i=Z(e,`[data-autofocus]`)||t.find(e=>!e.classList.contains(`wui-modal-close`))||t[0]||e}r?i?.focus?.():i?.focus?.({preventScroll:!0})}function xp(e,t){let n=Z(e.shell,`[data-wui-modal-live]`);n||(n=document.createElement(`div`),n.className=`visually-hidden`,n.setAttribute(`aria-live`,`assertive`),n.setAttribute(`data-wui-modal-live`,``),sp(e).appendChild(n)),n.textContent=``,n.textContent=t}var Sp=e=>{let t=Z(e.shell,`[data-wui-modal-live]`);t&&(t.textContent=``)},Cp=(e,t,n)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))};function wp(e,t,n,r){let i={...r,container:e.container};Cp(t,`wui:modal:${n}`,i),np(e)&&Cp(t,`wui:drawer:${n}`,i),rp(e)&&Cp(t,`wui:pane:${n}`,i)}var Tp=e=>e.matches(`[data-wui-pane-host]`)?`pane`:Wf(e,`dialog`,`a dialog`).classList.contains(`wui-remote-drawer`)?`drawer`:`modal`,Ep=e=>Uf(e.host.closest(`wui-modal`),`a wui-modal host`);function Dp(e){let t=Vf.get(e);if(t)return t;let n=Tp(e),r=n===`pane`?e:Wf(e,`dialog`,`a dialog`),i=fp({shell:r}),a={host:e,shell:r,container:n,queue:sc(),defaultSize:Qf(r),defaultLabel:r.getAttribute(`aria-label`),placeholder:i?pp(i):N(`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 Vf.set(e,a),e.addEventListener(`submit`,e=>Yp(a,e)),e.addEventListener(`click`,e=>{Jf(e.target,`[data-wui-modal-retry]`)&&a.session&&(e.preventDefault(),Fp(a,a.session))}),rp(a)&&e.addEventListener(`click`,t=>{let n=Jf(t.target,zf);n&&e.contains(n)&&a.session&&kp(a,a.session,`dismissed`,null)}),e.addEventListener(`wui-modal-close`,t=>{t.target===e&&t instanceof CustomEvent&&Gp(t.detail,`reason`)===`escape`&&e.querySelector(`form[data-wui-submitting]`)&&t.preventDefault()}),e.addEventListener(`wui-modal-closed`,t=>{t.target===e&&Mp(a)}),e.addEventListener(`wui-modal-opened`,t=>{if(t.target!==e)return;let n=fp(a);a.session&&n?.matches(Rf)&&!n.contains(document.activeElement)&&bp(n,!1,ip(a))}),a.remoteUrl&&e.addEventListener(`wui-modal-open`,t=>{t.target===e&&Np(a,t)}),a}function Op(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:()=>kp(e,a,`dismissed`,null),reload:()=>Fp(e,a)}};return e.session=a,a}function kp(e,t,n,r){e.session===t&&(t.closing={status:n,detail:r},rp(e)?jp(e,t):Ap(e))}function Ap(e){let t=Ep(e);t.dispatchEvent(new CustomEvent(`wui-modal-close`,{bubbles:!0,cancelable:!0,detail:{reason:`dismiss`}}))&&t.hide()}function jp(e,t){let n=e.shell,{status:r,detail:i}=Uf(t.closing,`the closing state`),a=n.contains(document.activeElement);e.queue.abort(),e.session=null,mp(fp(e)),n.replaceChildren(),n.hidden=!0,n.removeAttribute(`data-open`),t.resolveClosed({status:r,detail:i}),wp(e,n,`closed`,{status:r,url:t.url}),a&&t.trigger?.isConnected&&t.trigger.focus?.()}function Mp(e){let t=e.session;if(e.queue.abort(),e.session=null,Sp(e),t){let n=t.closing||{status:`dismissed`,detail:null};t.resolveClosed({status:n.status,detail:n.detail}),wp(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||(hp(e,pp(e.placeholder)),e.loadedUrl=null,$f(e.shell,e.defaultSize),e.defaultLabel?e.shell.setAttribute(`aria-label`,e.defaultLabel):e.shell.removeAttribute(`aria-label`))}function Np(e,t){let n=Gp(t instanceof CustomEvent?t.detail:null,`trigger`),r=n instanceof HTMLElement?n:null,i=r?.getAttribute(`data-wui-url`)||e.remoteUrl||``,a=Op(e,i,{trigger:r});a.explicitSize=Pp(e,r?.getAttribute(`data-wui-size`)),a.explicitSize&&$f(e.shell,a.explicitSize),e.cache&&e.loadedUrl===i||(e.loadedUrl&&hp(e,pp(e.placeholder)),Fp(e,a,{keepPlaceholder:!0}))}function Pp(e,t){try{return ap(e,t)}catch(e){return L(e),null}}async function Fp(e,t,{keepPlaceholder:n=!1}={}){n||hp(e,up(t.options.title||Ip(e)));let r=await e.queue.run(t.url,{method:t.method,body:t.body,navigate:t.options.navigate,timeoutMs:Mf(t.trigger)});if(e.session!==t||r.kind===`aborted`||r.kind===`stale`)return`aborted`;if(r.kind===`session`)return`session`;if(r.kind===`ok`&&Bp(e,t,r.html,!1))return e.loadedUrl=t.url,wp(e,e.shell,`loaded`,{url:t.url,handle:t.handle}),`loaded`;let i=r.kind===`ok`||r.kind===`validation`?`server`:r.kind;return hp(e,dp(t.options.title||Ip(e),i)),yp(e)&&bp(Uf(fp(e),`a card`),!1,ip(e)),wp(e,e.shell,`error`,{url:t.url,kind:i,status:r.status}),`error`}var Ip=e=>fp(e)?.querySelector(`.wui-modal-title`)?.textContent||e.shell.getAttribute(`aria-label`)||``,Lp=`/_content/Webority.Ui.Razor/js/`,Rp=e=>new URL(e,window.location.href).pathname.includes(Lp);function zp(e){if([...document.scripts].some(t=>t.getAttribute(`src`)===e))return;let t=document.createElement(`script`);t.src=e,document.head.appendChild(t)}function Bp(e,t,n,r){let i=Rs(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&&Rp(t)?zp(t):a=!0}a&&Yt(`WUI.modal: ${t.url} returned a fragment with script; it was removed. Keep page behaviour in the page.`);let o=Z(i,Rf);if(!o)return L(`WUI.modal: ${t.url} did not answer with an <app-modal-content> fragment.`),!1;if(hp(e,o),r||Sp(e),!rp(e)){$f(e.shell,t.explicitSize||Pp(e,o.getAttribute(`data-wui-size`))||e.defaultSize);let n=o.getAttribute(`data-wui-title`);n&&e.shell.setAttribute(`aria-label`,n)}return yp(e)&&bp(o,r,ip(e)),!0}var Vp=`button[type="submit"], button:not([type]), input[type="submit"], input[type="image"]`;function Hp(e,t,n){let r=[...e.elements].filter(e=>e.matches(Vp));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(N(`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 Up(e){for(let t of e.querySelectorAll(Lf))t.remove();for(let t of e.querySelectorAll(Ff))t.removeAttribute(`aria-invalid`),t.classList.remove(`is-invalid`,`input-validation-error`);for(let t of e.querySelectorAll(`.field-error`))t.textContent=``}var Wp=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(`.`)),Gp=(e,t)=>{if(typeof e==`object`&&e&&t in e)return Reflect.get(e,t)};async function Kp(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(Gp(t,`title`)),i=(e.statusText||``).trim().toLowerCase(),a=Wp.has(r.toLowerCase())||r.toLowerCase()===i;return n(Gp(t,`message`))||n(Gp(t,`detail`))||(r&&!a?r:null)}function qp(e,t,n,r){let i={forbidden:X().forbiddenMessage,networkCheck:P(`httpFailure`,jc).networkCheckText,client:X().clientMessage,server:X().serverMessage,network:X().networkMessage,timeout:X().timeoutMessage},a=t.closest(`.wui-modal-body`)||t;a.querySelector(`[data-wui-modal-submit-error]`)?.remove(),Up(a);let o=document.createElement(`div`);o.className=`alert alert-danger wui-modal-submit-error`,o.setAttribute(`role`,`alert`),o.setAttribute(`data-wui-modal-submit-error`,``),o.textContent=`${X().submitFailedMessage} ${r||i[n]||X().serverMessage}`,a.prepend(o),xp(e,o.textContent)}var Jp=(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 Yp(e,t){let n=t.target,r=e.session;if(!(n instanceof HTMLFormElement)||!r||n.hasAttribute(`data-wui-native`)||!n.closest(Rf)||(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`;Hp(n,i,!0);let l;try{l=await e.queue.run(c?Jp(a,s):a,{method:o,body:c?void 0:s,navigate:r.options.navigate,timeoutMs:Mf(r.trigger)})}catch(t){L(t),e.session===r&&n.isConnected&&(Hp(n,i,!1),qp(e,n,`server`,null));return}if(e.session!==r)return;if(n.isConnected&&Hp(n,i,!1),l.kind===`ok`&&l.result===`success`){Xp(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===If;if(Bp(e,r,l.html,t)){if(t){let t=Uf(fp(e),`a card`).querySelector(Lf)?.textContent?.replace(/\s+/g,` `).trim();xp(e,t||X().invalidMessage)}return}}let u=l.kind===`ok`||l.kind===`validation`?`server`:l.kind,d=await Kp(l.response);e.session===r&&qp(e,n,u,d)}function Xp(e,t,n){let r=n.message,i=n.redirect||null,a=n.toastVariant||`success`;if(!lm(a))throw TypeError(`Unknown toast variant "${a}". Use ${cm.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?jm(r,a):r&&Y().toast(r,{variant:a}),wp(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,Fp(e,t)):n.keepOpen?n.html&&Bp(e,t,n.html,!1):kp(e,t,`success`,o)}function Zp(e){let t=Jf(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`)?im(t.getAttribute(`data-wui-pane`)??``,{target:t.getAttribute(`data-wui-pane-target`),trigger:t}).catch(e=>{qf(e)||L(e)}):t.hasAttribute(`data-wui-modal`)?em(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=>{qf(e)||L(e)}):nm(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=>{qf(e)||L(e)})))}function Qp(e){if(e.key!==`Escape`||e.defaultPrevented)return;let t=Jf(e.target,rm);if(!t)return;let n=Vf.get(t),r=e.currentTarget;n?.session&&r instanceof Document&&!r.querySelector(`wui-modal[open]`)&&(t.querySelector(`form[data-wui-submitting]`)||(e.preventDefault(),kp(n,n.session,`dismissed`,null)))}function $p(e=document){let t=e instanceof Document?e:Uf(e.ownerDocument,`an owner document`);Hf.has(t)||(Hf.add(t),t.addEventListener(`click`,Zp),t.addEventListener(`keydown`,Qp));let n=Gf(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)Dp(e)}function em(e,t={}){try{if(!e)throw TypeError(`WUI.modal.load: a fragment url is required.`);let n=t.container===`drawer`,r=n?tp(t.size):Zf(t.size),i=t.placement||`center`;if(!ep.includes(i))throw TypeError(`WUI.modal.load: unsupported placement "${i}". Use center or top.`);if(t.signal?.aborted)return Promise.reject(Kf());let a=cp(n?`drawer`:`modal`);$p(document);let o=Dp(a),s=yp(o),c=Op(o,e,t);c.explicitSize=r,$f(o.shell,r||o.defaultSize),n||Wf(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=Fp(o,c);return s||Ep(o).show(),tm(o,c,t,l,u,`WUI.modal.load`)}catch(e){return Promise.reject(e)}}function tm(e,t,n,r,i,a){let o=new Promise((r,i)=>{n.signal?.addEventListener(`abort`,()=>{e.session===t&&(e.queue.abort(),kp(e,t,`dismissed`,{aborted:!0})),i(Kf())},{once:!0})}),s=Promise.all([r,i]).then(([,e])=>{if(e===`aborted`)throw Kf();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 nm(e,t={}){return em(e,{...t,container:`drawer`,placement:void 0})}var rm=`[data-wui-pane-host]`;function im(e,t={}){try{if(!e)throw TypeError(`WUI.pane.load: a fragment url is required.`);let n=op(t.target);if(!n)throw TypeError(`WUI.pane.load: the target is not an <app-detail-pane>.`);if(t.signal?.aborted)return Promise.reject(Kf());$p(document);let r=Dp(n),i=Op(r,e,t);n.hidden=!1,n.setAttribute(`data-open`,``);let a=Fp(r,i);return tm(r,i,t,Promise.resolve(),a,`WUI.pane.load`)}catch(e){return Promise.reject(e)}}function am(e){let t=op(e);if(!t)throw TypeError(`WUI.pane.close: the target is not an <app-detail-pane>.`);let n=Vf.get(t);n?.session&&kp(n,n.session,`dismissed`,null)}var om=`wuiConfirm`,sm=Object.freeze([`danger`]),cm=Object.freeze([`success`,`info`,`warning`,`danger`]),lm=e=>cm.some(t=>t===e),um=`wui.flash`,dm=()=>P(`confirmDialog`,Xd),fm=new WeakSet,pm=new WeakSet,mm=null,hm=null,gm=!1,_m=(e,t)=>{e&&Y().toast(e,{variant:t})};function vm(){let e=document.getElementById(om);if(e)return j(e.closest(`wui-modal`),`#${om} must be a wui-modal.`);let t=document.createElement(`wui-modal`);t.id=om;let n=document.createElement(`dialog`);return n.className=`modal wui-modal-shell`,n.style.setProperty(`--wui-modal-max-width`,`${jf.md}px`),n.replaceChildren(N(`div`,{class:`modal-dialog modal-dialog-centered wui-rb-dialog`},N(`div`,{class:`modal-content wui-modal wui-confirm`},N(`div`,{class:`wui-modal-body`},N(`div`,{class:`wui-confirm-content`},N(`span`,{class:`wui-confirm-icon`},N(`wui-status-icon`,{tone:`info`,size:120})),N(`h3`,{class:`wui-confirm-title`,tabindex:-1,"data-autofocus":``}),N(`p`,{class:`wui-confirm-msg`}))),N(`div`,{class:`wui-modal-footer`},N(`div`,{class:`wui-confirm-actions`},N(`button`,{type:`button`,class:Si(`primary`,`soft`,`md`),"data-wui-dismiss":``,"data-wui":vi},dm().cancelLabel),N(`button`,{type:`button`,class:Si(`primary`,`solid`,`md`),"data-app-confirm":``,"data-wui":vi})))))),t.append(n),document.body.appendChild(t),t}function ym(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!sm.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);bm({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 bm({title:e,message:t,label:n,danger:r},i){let a=vm(),o=a.querySelector(`.wui-confirm-title`),s=a.querySelector(`[data-app-confirm]`);if(!o||!s)throw Error(`#${om} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${om}"> 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||dm().confirmTitle;o.textContent=l,c.textContent=t,s.textContent=n||dm().confirmLabel,s.classList.toggle(`btn-danger`,r),s.classList.toggle(`btn-primary`,!r),a.querySelector(`wui-status-icon`)?.setAttribute(`tone`,r?`delete`:`info`),j(a.querySelector(`dialog`),`#${om} has no <dialog>.`).setAttribute(`aria-label`,l),hm=i,gm=!1,a.show()}var xm=(e,t)=>{mm=e;try{t()}finally{mm=null}},Sm=(e,t)=>{let n=Reflect.get(e,t);if(n===void 0||typeof n==`string`)return n;throw TypeError(`confirmAction: ${t} must be text.`)},Cm=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:Sm(e,`title`),message:t,label:Sm(e,`label`),tone:Sm(e,`tone`)}};function wm(e,t,n){let{title:r,message:i,label:a,tone:o}=Cm(t);if(o!=null&&!sm.includes(o))throw TypeError(`confirmAction: tone "${o}" is not supported. Use danger, or leave it off.`);qm(e.ownerDocument),bm({title:r,message:i,label:a,danger:o===`danger`},()=>xm(e,n))}var Tm=e=>`disabled`in e&&e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`,Em=e=>{ze(e,HTMLElement,`data-wui-confirm needs an HTML element to click.`).click()};function Dm(e){let t=M(e.target,`[data-wui-confirm]:not(form)`);t&&t!==mm&&!Tm(t)&&(e.preventDefault(),e.stopImmediatePropagation(),ym(t,()=>xm(t,()=>Em(t))))}function Om(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===mm||e.submitter&&e.submitter===mm||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;ym(t,()=>xm(t,()=>t.requestSubmit(r)))}function km(e){let t=M(e.target,`#${om} [data-app-confirm]`);t&&!t.hasAttribute(`disabled`)&&hm&&(gm=!0,j(t.closest(`wui-modal`),`#${om} is missing around its confirm button.`).hide())}function Am(e){if(!(e.target instanceof Element)||e.target.id!==`wuiConfirm`)return;let t=gm?hm:null;hm=null,gm=!1,t?.()}function jm(e,t){e&&window.sessionStorage.setItem(um,JSON.stringify({message:e,variant:t}))}var Mm=e=>e===`forbidden`?dm().forbiddenMessage:e===`networkCheck`?P(`httpFailure`,jc).networkCheckText:e===`network`?dm().networkMessage:e===`timeout`?dm().timeoutMessage:dm().failedMessage;function Nm(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.getAttribute(`data-refresh-on-success`)!==`false`&&_f(e)?.reload()}var Pm=(e,t)=>{`disabled`in e&&(e.disabled=t)};async function Fm(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 Im(t,e)}async function Im(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.`);Pm(t,!0),t.setAttribute(`aria-busy`,`true`);let i=await oc(e,{method:`POST`,body:n,timeoutMs:nc(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`)?(jm(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload()):(Pm(t,!1),t.removeAttribute(`aria-busy`),i.ok?(wf(i,a),Nm()):_m(i.message||Mm(i.kind),`danger`))}function Lm(e,t){Pm(e,!1),e.removeAttribute(`aria-busy`),L(t),_m(dm().failedMessage,`danger`)}function Rm(e){let t=M(e.target,`[data-wui-post]`);t&&(e.preventDefault(),Tm(t)||t.getAttribute(`aria-busy`)===`true`||Fm(t).catch(e=>Lm(t,e)))}function zm(e){let t=M(e.target,`form[data-wui-post-form]`);if(!(t instanceof HTMLFormElement)||e.defaultPrevented)return;e.preventDefault();let n=j(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(j(t.getAttribute(`action`),`A data-wui-post-form needs an action attribute to post to.`),document.baseURI).href;Im(r,n,new FormData(t)).catch(e=>Lm(n,e)),t.closest(`wui-dropdown`)?.hide()}var Bm=(e,t)=>{e.disabled=!1,e.removeAttribute(`aria-busy`),t&&Uo(t,null)};async function Vm(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&&Uo(t,`saving`);let r=nc(e.getAttribute(`data-wui-timeout`))??3e4,i=await oc(n,{method:(e.dataset.method||`post`).toUpperCase(),timeoutMs:r});if(i.kind===`session`)return;if(i.kind===`aborted`){Bm(e,t);return}if(i.ok){jm(i.message,i.toastVariant||`success`),i.redirect?window.location.assign(i.redirect):window.location.reload();return}let a=i.message||Mm(i.kind);e.disabled=!1,e.removeAttribute(`aria-busy`),t&&Uo(t,`error`,a),_m(a,`danger`)}function Hm(e){let t=M(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`);Vm(t,n).catch(e=>{Bm(t,n),L(e),_m(dm().failedMessage,`danger`)})}function Um(){let e=window.sessionStorage.getItem(um);if(!e)return;window.sessionStorage.removeItem(um);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`||!lm(r))throw TypeError(`stored flash variant "${String(r)}" is not supported.`);if(typeof n!=`string`)throw TypeError(`stored flash message is not text.`);_m(n,r)}function Wm(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(!lm(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${cm.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||(e.textContent??``).trim();e.remove(),_m(n,t)}}var Gm=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.form:null;function Km(e){if(!(e.target instanceof Element))return;let t=e.target.closest(`[data-wui-auto-submit]`);if(!t)return;let n=Gm(e.target)||t.closest(`form`);n instanceof HTMLFormElement&&n.requestSubmit()}function qm(e){pm.has(e)||(pm.add(e),e.addEventListener(`click`,km),e.addEventListener(`wui-modal-closed`,Am))}function Jm(e=document){let t=e instanceof Element?e.ownerDocument:e;fm.has(t)||(fm.add(t),t.addEventListener(`click`,Dm,!0),t.addEventListener(`submit`,Om,!0),qm(t),t.addEventListener(`click`,Rm),t.addEventListener(`click`,Hm),t.addEventListener(`submit`,zm),t.addEventListener(`change`,Km),Um()),Wm(e)}var Ym=()=>P(`unsavedChanges`,Yd),Xm=`form[data-wui-unsaved]`,Zm=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,Qm=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,$m=new Set([`submit`,`button`,`reset`,`image`]),eh=new Set([`hidden`,`checkbox`,`radio`,`file`,`submit`,`button`,`reset`,`image`,`range`,`color`]),th=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,nh=e=>th(e)?e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled:`disabled`in e&&!!e.disabled,rh=e=>`name`in e&&typeof e.name==`string`&&e.name!==``,ih=e=>typeof e==`object`&&!!e,ah=e=>Array.isArray(e)&&e.every(e=>Array.isArray(e)&&typeof e[0]==`string`);function oh(e){let t=JSON.parse(e);if(!ah(t))throw Error(`unsaved-changes snapshot is malformed`);return t}var sh=new WeakMap,ch=new WeakSet,lh=e=>`${e.name}:${e.size}:${e.lastModified}`,uh=e=>[...e.querySelectorAll(Xm)].filter(e=>e instanceof HTMLFormElement);function dh(e){let t=[];for(let n of e.elements)rh(n)&&!nh(n)&&(th(n)&&$m.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(lh)]):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 fh(e){return dh(e)}function ph(e,t){let n=new Map,r=oh(t);for(let e of r){let t=n.get(e[0]);t?t.push(e):n.set(e[0],[e])}let i=oh(dh(e)).map(e=>n.get(e[0])?.shift()??e);for(let e of n.values())i.push(...e);return JSON.stringify(i)}function mh(e){for(let t of e.elements)if(th(t)&&t.name&&!nh(t)){if(t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!eh.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 hh=e=>({saved:e.querySelector(Zm)&&mh(e)?null:dh(e),engaged:!1,discarded:!1});function gh(e){let t=sh.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&dh(e)!==t.saved}var _h=(e,t)=>uh(e).filter(e=>e!==t&&gh(e));function vh(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||Ym().message;wm(e,{title:Ym().title,message:r,label:Ym().leaveLabel,tone:`danger`},()=>{for(let e of t){let t=sh.get(e);t&&(t.discarded=!0)}n()})}function yh(e){if(e.matches(Qm))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 bh(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 xh(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target,n=M(t,`a[href]`);if(!(n instanceof HTMLAnchorElement)||!yh(n))return;let r=_h(n.ownerDocument,null);r.length&&(e.preventDefault(),vh(n,r,()=>n.click()))}function Sh(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!bh(t,e.submitter))return;let n=_h(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;vh(t,n,()=>t.requestSubmit(i));return}let r=sh.get(t);r&&(r.saved=dh(t),r.discarded=!1)}function Ch(e){_h(document,null).length&&e.preventDefault()}function wh(e){let t=e.target,n=M(t,Xm);return n instanceof HTMLFormElement?n:null}function Th(e){let t=wh(e);if(!t)return;let n=sh.get(t);n&&!n.engaged&&(n.saved!==null&&(n.saved=dh(t)),n.engaged=!0)}function Eh(e){let t=wh(e),n=t&&sh.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function Dh(e){for(let t of uh(e)){let e=sh.get(t);e?.saved&&(e.saved=ph(t,e.saved))}}function Oh(e){let t=ih(e)?e.handle:void 0;return ih(t)?t.el:void 0}function kh(e){if(!(e instanceof CustomEvent))return;let t=Oh(e.detail);if(t instanceof Element)for(let e of uh(t))jh(e)}function Ah(e=document){let t=e instanceof Document?e:e.ownerDocument;if(!ch.has(t)){ch.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,Th,!0);for(let e of[`input`,`change`])t.addEventListener(e,Eh,!0);t.addEventListener(`click`,xh),t.addEventListener(`submit`,Sh),t.addEventListener(`wui:modal:success`,kh),t.addEventListener(hn,()=>Dh(t)),j(t.defaultView,`unsaved-changes guard needs a document with a window`).addEventListener(`beforeunload`,Ch)}let n=uh(e);e instanceof HTMLFormElement&&e.matches(Xm)&&n.unshift(e);for(let e of n)sh.has(e)||sh.set(e,hh(e))}function jh(e){if(!(e instanceof HTMLFormElement)||!e.matches(Xm))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);sh.set(e,{saved:dh(e),engaged:!1,discarded:!1})}var Mh=()=>P(`drawer`,kc),Nh=`wui:drawer:discard`,Ph=`wui-drawer[confirm-discard]`,Fh=`wui-modal`,Ih=`data-wui-no-discard`,Lh=`.wui-drawer-discard`,Rh=`input, select, textarea`,zh=e=>typeof e==`object`&&!!e||typeof e==`function`;function Bh(e){let t=e.currentTarget;if(!(t instanceof Document))throw Error(`The discard guard is not wired on a document.`);return t}function Vh(e,t){return M(e,t)}var Hh=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement,Uh=new WeakMap,Wh=new WeakSet,Gh=new WeakSet;function Kh(e,t,n,r,i){let a=e.createElement(`button`);return a.type=`button`,a.className=Si(t,n,`sm`),a.dataset.wui=vi,a.setAttribute(r,``),a.textContent=i,a}function qh(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,Kh(e,`danger`,`solid`,`data-wui-discard-confirm`,Mh().discardLabel),Kh(e,`primary`,`soft`,`data-wui-discard-keep`,Mh().keepLabel)),n}function Jh(e){if(!(e instanceof Element))return null;let t=e.closest(Ph);if(t)return t;let n=e.closest(Fh);return n&&Zh(n).length?n:null}function Yh(e){return e.closest(Ph)??e.closest(Fh)}function Xh(e,t){return t.hasAttribute(Ih)||e.hasAttribute(Ih)?!1:t.hasAttribute(`confirm-discard`)||e.hasAttribute(`data-wui-confirm-discard`)?!0:(e.getAttribute(`method`)||`get`).toLowerCase()!==`get`}function Zh(e){return e.matches(Ph)?e.querySelectorAll(`form`):[...e.querySelectorAll(`form`)].filter(t=>Xh(t,e))}function Qh(e){let t=Uh.get(e);return t!=null&&fh(e)!==t}function $h(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,j(e.querySelector(`.wui-drawer-panel`),`The drawer has no panel to hold its footer.`).append(t),Gh.add(t),t}function eg(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),Gh.add(t),t}function tg(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 ng(e,t,n){let r=e.querySelector(Lh);if(r){tg(r);return}let i=qh(e.ownerDocument,t),a;if(e.matches(Ph))a=e.querySelector(`.wui-drawer-footer`)??$h(e),a.prepend(i);else if(e.hasAttribute(`confirm-discard`))a=e.querySelector(`.wui-modal-footer`)??eg(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`)??eg(e),a.prepend(i)}a.classList.add(`wui-drawer-discarding`),tg(i)}function rg(e){let t=e.parentElement;if(e.remove(),!t)throw Error(`The discard prompt has no footer.`);t.classList.remove(`wui-drawer-discarding`),Gh.has(t)&&t.remove()}function ig(e){for(let t of Zh(e))for(let e of t.querySelectorAll(Rh))if(Hh(e)&&e.type!==`hidden`&&!e.disabled){e.focus({preventScroll:!0});return}}function ag(e){let t=Jh(e.target);if(t)for(let e of Zh(t))Uh.get(e)??Uh.set(e,fh(e))}function og(e){for(let t of Bh(e).querySelectorAll(`form`)){let e=Uh.get(t);e!=null&&Uh.set(t,ph(t,e))}}function sg(e){let t=e.target;t instanceof HTMLFormElement&&Jh(t)&&Uh.set(t,fh(t))}function cg(e){if(!zh(e))return;let t=`handle`in e?e.handle:void 0;if(zh(t))return`el`in t?t.el:void 0}function lg(e){if(!(e instanceof CustomEvent))return;let t=e.detail,n=cg(t);if(n instanceof Element)for(let e of n.querySelectorAll(`form`))Uh.delete(e)}function ug(e){let t=e.target;t instanceof Element&&t.matches(Ph)&&[...Zh(t)].some(Qh)&&(e.preventDefault(),ng(t,t.getAttribute(`confirm-discard`),null))}function dg(e){let t=e.target;if(!(t instanceof Element)||!t.matches(Fh))return;let n=[...Zh(t)].find(Qh);n&&(e.preventDefault(),ng(t,n.getAttribute(`data-wui-confirm-discard`)??t.getAttribute(`confirm-discard`)??Mh().confirmDiscard,n))}function fg(e){let t=j(e.closest(Lh),`The discard button is outside its prompt.`),n=Yh(t);if(rg(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);for(let e of Zh(n))Uh.set(e,fh(e));n.dispatchEvent(new CustomEvent(Nh,{bubbles:!0})),n.matches(Ph)?j(n.closest(`wui-drawer`),`The confirm-discard drawer is not a wui-drawer.`).hide():j(n.closest(`wui-modal`),`The discarded dialog is not a wui-modal.`).hide()}function pg(e){let t=j(e.closest(Lh),`The keep button is outside its prompt.`),n=Yh(t);if(rg(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);ig(n)}function mg(e){let t=Vh(e.target,`[data-wui-discard-confirm]`);if(t){fg(t);return}let n=Vh(e.target,`[data-wui-discard-keep]`);n&&pg(n)}function hg(e=document){let t=e instanceof Document?e:e.ownerDocument;Wh.has(t)||(Wh.add(t),t.addEventListener(`focusin`,ag),t.addEventListener(`pointerdown`,ag),t.addEventListener(`submit`,sg),t.addEventListener(hn,og),t.addEventListener(`wui:modal:success`,lg),t.addEventListener(`wui:modal:loaded`,lg),t.addEventListener(`wui-drawer-close`,ug,!0),t.addEventListener(`wui-modal-close`,dg),t.addEventListener(`click`,mg))}var gg={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=()=>P(`shell`,gg),_g=31536e3,vg=new WeakMap;function yg(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?bg(n):String(n)}var bg=e=>e>99?`99+`:String(e),xg=(e,t)=>Object.entries(t).reduce((e,[t,n])=>e.replaceAll(`{${t}}`,()=>String(n)),e);function Sg(e,t,n=document){try{n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${_g}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}function Cg(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=${_g}; 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},wg=(e,t,n)=>{let r=e?.closest(t);return r instanceof n?r:null},Tg=(e,t,n)=>e?[...e.querySelectorAll(t)].filter(e=>e instanceof n):[],Eg=e=>{if(!(e.target instanceof Element))throw Error(`event target is not an element`);return e.target},Dg=e=>{let t=e.getAttribute(`href`);if(t===null)throw Error(`search hit has no href`);return t},Og=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function kg(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=()=>j(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),_=sc(),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=bg(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?u:xg(h,{label:u,count:bg(o)})),a&&s&&i&&(i.textContent=o===0?p:xg(m,{count:bg(o)}))},b=()=>s?je(s):!1,x=()=>{let e=Og(`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(Og(`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=Rs(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(Og(`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=Eg(e);if(t.closest(`[data-wui-bell-retry]`)){await S(!0);return}let n=wg(t,`[data-wui-bell-read]`,HTMLButtonElement);if(!n||!l)return;n.disabled=!0;let r=await oc(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 Ag=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),jg=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function Mg(e,t){let n=j($(e,`input.search-input`,HTMLInputElement),`search input missing`),r=$(e,`.wui-topsearch-results`,HTMLElement),i=()=>j(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=sc(),g,_=-1,v=()=>Tg(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(jg(s,c,t));if(n.kind!==`aborted`&&n.kind!==`stale`&&n.kind!==`session`){if(e.classList.remove(`is-loading`),n.ok){let e=Rs(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:xg(r===1?m:p,{count:r}))}else i().replaceChildren(Og(`wui-topsearch-empty`,Q().searchUnavailableMessage));_=-1,x()}};n.addEventListener(`input`,()=>{clearTimeout(g);let t=n.value.trim();t.length<u?(h.abort(),e.classList.remove(`is-loading`),i().replaceChildren(),b()):g=setTimeout(()=>w(t),d)}),n.addEventListener(`keydown`,t=>{if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(i().hidden||v().length===0)return;t.preventDefault(),y(_+(t.key===`ArrowDown`?1:-1))}else if(ir(t)){let e=v(),r=_>=0?e[_]:void 0;!i().hidden&&r?(t.preventDefault(),C(Dg(r))):l&&n.value.trim()!==``&&(t.preventDefault(),C(jg(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=wg(Eg(e),`.wui-topsearch-hit`,HTMLElement);!t||e.ctrlKey||e.metaKey||e.shiftKey||e.button===1||(e.preventDefault(),C(Dg(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||Ag(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 Ng(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>{Sg(n,!!e.detail?.collapsed)});let r=e.dataset.wuiFoldedCookie;r&&e.addEventListener(`wui:shell:nav-fold`,e=>{Cg(r,e.detail?.key,!!e.detail?.folded)}),e.addEventListener(`click`,t=>{Eg(t).closest(`[data-wui-tabbar-more]`)&&$(e,`[data-app-shell-menu]`,HTMLElement)?.click()});let i=$(e,`[data-wui-bell]`,HTMLElement),a=i?kg(i,t):null,o=$(e,`[data-wui-topsearch]`,HTMLElement);o&&Mg(o,t);let s={el:e,setUnread(e){j(a,`WUI.shell: this <app-shell> has no <app-shell-notifications>.`).setUnread(e)},setTabCount(t,n,r){yg(e,t,n,r)},refreshNotifications(){return j(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)}};vg.set(e,s);let c=n=>{if(n.target===e||n.target instanceof Node&&n.target.contains(e)){for(let e of t)e();vg.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,c)}};return document.addEventListener(`wui:teardown`,c),s}function Pg(e=document){let t=[];e instanceof HTMLElement&&e.matches(`[data-app-shell]`)&&t.push(e),t.push(...Tg(e,`[data-app-shell]`,HTMLElement));for(let e of t)e.dataset.wuiPartsWired||(e.dataset.wuiPartsWired=`1`,Ng(e))}function Fg(e){let t=wg(e,`[data-app-shell]`,HTMLElement);return t?(vg.has(t)||Pg(t),vg.get(t)??null):null}var Ig=new Set([204,205,304]),Lg=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 Rg(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`,[Js]:`1`,...n.headers};if(Qs(e)){let e=Zs();e&&(i[e.header]=e.token)}let a=n.signal;return a?.aborted?ac(`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(ac(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=Lg(s.getAllResponseHeaders()),n=$s(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(Ig.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 zg=`data-wui-submit-once`,Bg=`data-wui-submit-pending`,Vg=`wui-submit-spinner`,Hg=new WeakSet,Ug=new WeakMap;function Wg(e){return e instanceof HTMLButtonElement||e instanceof HTMLInputElement?e:null}function Gg(e){if(e.setAttribute(`aria-busy`,`true`),e.tagName===`INPUT`||e.querySelector(`.${Vg}`))return;let t=e.ownerDocument.createElement(`span`);t.className=`spinner-border spinner-border-sm me-2 ${Vg}`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t)}function Kg(e){e.removeAttribute(`aria-busy`),e.querySelector(`.${Vg}`)?.remove()}function qg(e){return e.method===`post`&&e.target!==`_blank`&&e.getAttribute(`data-wui-submit-once`)!==`off`}function Jg(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!qg(t))return;if(t.hasAttribute(Bg)){e.preventDefault();return}t.setAttribute(Bg,``);let n=Wg(e.submitter);setTimeout(()=>{t.hasAttribute(Bg)&&(e.defaultPrevented?t.removeAttribute(Bg):n&&(n.disabled=!0,Gg(n),Ug.set(t,n)))},0)}var Yg=e=>[...e.querySelectorAll(`form[${Bg}]`)].filter(e=>e instanceof HTMLFormElement);function Xg(e){for(let t of Yg(e)){t.removeAttribute(Bg);let e=Ug.get(t);e&&(e.disabled=!1,Kg(e),Ug.delete(t))}}function Zg(e){let t=e.ownerDocument===null?e:e.ownerDocument;Hg.has(t)||(Hg.add(t),t.addEventListener(`submit`,Jg,!0),t.defaultView?.addEventListener(`pageshow`,()=>Xg(t)))}var Qg=[`light`,`dark`,`auto`],$g=[`wave`,`circle`,`slide`,`blinds`,`fade`,`none`],e_=`fade`,t_=`theme`,n_={wave:1100,circle:700,slide:600,blinds:900,fade:350,none:0},r_=`wui-theme-switching`,i_=`wui:theme:change`,a_=`(prefers-color-scheme: dark)`,o_=e=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(e).matches,s_=e=>Qg.some(t=>t===e);function c_(e){return e===`dark`||e===`auto`&&o_(a_)?`dark`:`light`}function l_(e=t_){let t=null;try{t=window.localStorage.getItem(e)}catch(e){if(!(e instanceof DOMException))throw e}return s_(t)?t:`auto`}function u_(e,t=t_){try{window.localStorage.setItem(t,e)}catch(e){if(!(e instanceof DOMException))throw e}}function d_(e){let t=document.documentElement,n=c_(e);t.setAttribute(`data-theme`,e),t.setAttribute(`data-bs-theme`,n),document.dispatchEvent(new CustomEvent(i_,{detail:{mode:n,preference:e}}))}var f_=`((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 p_(e=t_){return`${f_}${JSON.stringify(String(e)).replace(/</g,`\\u003c`)})`}function m_(e,{includeAuto:t=!1}={}){return e===`light`?`dark`:e===`dark`&&t?`auto`:`light`}function h_(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(a_),n=()=>e(t.matches?`dark`:`light`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var g_=60,__=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,v_=e=>e.toFixed(1),y_=(e,t)=>`${v_(e)}px ${v_(t)}px`,b_={amplitude:22,segments:36,cycles:1.5,ripples:2},x_=6,S_=(e,t,n,r,i)=>{let{amplitude:a,segments:o,cycles:s}=b_,c=n*(t+2*a),l=i?t+a-c:c-a,u=i?t+2*a:-2*a,d=[y_(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(y_(n,i))}return d.push(y_(e,u)),`polygon(${d.join(`, `)})`},C_=(e,t,n,r)=>{let i=t/x_,a=[];for(let t=0;t<x_;t++){let o=t*i,s=i*n,c=r?o+i-s:o,l=r?o+i:o+s;a.push(y_(0,c),y_(e,c),y_(e,l),y_(0,l))}return`polygon(${a.join(`, `)})`};function w_(e,{width:t,height:n,to:r=`dark`,origin:i}){let a=r===`dark`,o=[];for(let r=0;r<=g_;r++){let s=r/g_,c=__(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(${v_(a*c)}px at ${v_(e)}px ${v_(r)}px)`});break}case`slide`:{let e=n*(1-c);o.push({clipPath:a?`inset(${v_(e)}px 0px 0px 0px)`:`inset(0px 0px ${v_(e)}px 0px)`});break}case`blinds`:o.push({clipPath:C_(t,n,c,a)});break;case`fade`:o.push({clipPath:`none`,opacity:c});break;case`none`:return[];default:o.push({clipPath:S_(t,n,c,s*b_.ripples*2*Math.PI,a)})}}return o}var T_=e=>{e instanceof DOMException&&(e.name===`AbortError`||e.name===`InvalidStateError`)||L(`[@webority/ui-elements] The theme view transition failed:`,e)};function E_(e,{effect:t=e_,to:n,origin:r,duration:i}={}){let a=document.documentElement,o=n!==void 0&&a.getAttribute(`data-bs-theme`)===n;if(t===`none`||o||o_(`(prefers-reduced-motion: reduce)`)||typeof document.startViewTransition!=`function`||typeof a.animate!=`function`)return e(),Promise.resolve(!1);a.classList.add(r_);let s=document.startViewTransition(e),c=i??n_[t]??n_.fade;return s.ready.then(()=>{let e=w_(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(T_),s.finished.catch(T_).finally(()=>a.classList.remove(r_)).then(()=>!0)}function D_(){Ut(),i(`wui-select`,Qr),i(`wui-modal`,Wt)}return globalThis.WeborityUiElementsInternal||(globalThis.WeborityUiElementsInternal={version:`0.179.0`,modules:ul}),Dn(),D_(),e.AVATAR_ACCEPT=fl,e.AVATAR_MAX_SIZE_MB=pl,e.AVATAR_OUTPUT_SIZE=ml,e.AVATAR_OUTPUT_TYPE=hl,e.AVATAR_PREVIEW_SIZES=gl,e.BAR_BULK_IN_BAR_ATTRIBUTE=qu,e.COLUMN_MAX_WIDTH=io,e.COLUMN_MIN_WIDTH=ro,e.COMMAND_SHORTCUT_ATTRIBUTE=Nl,e.CONFIRM_DIALOG_ID=om,e.CONFIRM_TONES=sm,e.COPY_FEEDBACK_MS=$a,e.CSRF_META_NAME=Ws,e.CURRENCIES=Hi,e.CURRENCY_SYMBOLS=wi,e.DATE_PATTERNS=Gi,e.DEFAULT_CSRF_HEADER=Gs,e.DEFAULT_CURRENCY=Ci,e.DEFAULT_IMAGE_ACCEPT=Gl,e.DEFAULT_MAX_SIZE_MB=Kl,e.DEFAULT_PASSWORD_RULES=rd,e.DEFAULT_THEME_EFFECT=e_,e.DEFAULT_THEME_STORAGE_KEY=t_,e.DISCARD_EVENT=Nh,e.DROP_OVER_CLASS=dd,e.DURATION_UNITS=Wi,e.FILTER_POPOVER_MAX_CHIPS=jt,e.FLASH_STORAGE_KEY=um,e.FLASH_VARIANTS=cm,e.FORMAT_STYLES=Vi,e.HTTP_KINDS=Ys,e.IST_TIME_ZONE=H,e.MASK_INPUT_TYPES=mu,e.MASK_NAMES=Cu,e.MENTION_ID_PATTERN=Yo,e.MONEY_UNITS=Ui,e.NOTIFICATION_COUNT_CAP=ps,e.PIN_AT_VAR=Eo,e.PIN_SIDES=so,e.RESIZE_STEP=ao,e.RESIZE_STEP_LARGE=oo,e.ROW_DRAG_TYPE=fd,e.ROW_DROP_EVENT=ud,e.ROW_HEIGHTS=lo,e.ROW_MOVE_LIMIT=Ao,e.ROW_MOVE_MS=jo,e.ROW_SAVE_ATTR=zo,e.ROW_SAVE_ERROR_CLASS=Bo,e.ROW_SAVE_STATES=Ro,e.SCROLL_EDGE_SELECTOR=Bd,e.SEARCH_OPEN_KEY=bl,e.SELECT_CELL_CLASS=G,e.SHORTCUTS_OFF_ATTRIBUTE=st,e.SHORTCUT_EVENT=lt,e.SHORTCUT_SCOPE_ATTRIBUTE=ct,e.SUBMIT_ONCE_ATTRIBUTE=zg,e.THEME_BOOT_SCRIPT_BODY=f_,e.THEME_CHANGE_EVENT=i_,e.THEME_EFFECTS=$g,e.THEME_EFFECT_DURATION=n_,e.THEME_MODES=Qg,e.THEME_SWITCHING_CLASS=r_,e.TOAST_ACTION_METHODS=zs,e.TOAST_ACTION_MS=yf,e.VIRTUAL_OVERSCAN=co,e.WUI_HEADERS=W,e.WuiSelect=Qr,e.acceptDroppedFiles=cu,e.acceptLabel=au,e.addRowSelectCells=xc,e.addSelectColumn=Sc,e.applyBarBulk=ed,e.applyTheme=d_,e.ariaKeyShortcuts=xt,e.attachFileDrop=lu,e.attachInputMask=Ru,e.attachRowDrag=Id,e.attachScrollEdges=Hd,e.attachShiftRange=Tc,e.avatarCropOptions=yl,e.avatarUnreadableMessage=vl,e.barBulkCountText=Xu,e.buildPasswordRules=od,e.clampColumnWidth=yo,e.classifyStatus=$s,e.closeRemotePane=am,e.collapseSearch=kl,e.configureCsrf=qs,e.confirmAction=wm,e.copyTextToClipboard=eo,e.createDiscardPrompt=qh,e.createRequestQueue=sc,e.createSelectHeaderCell=hc,e.createSelectRowCell=gc,e.createSelectSpacerCell=_c,e.currencyPrefix=Ei,e.deriveStepStatus=lc,e.emptyValueLabel=U,e.evaluatePassword=sd,e.fillText=F,e.formValues=fh,e.formatCompact=ba,e.formatCurrency=va,e.formatDate=Ea,e.formatDateTime=Aa,e.formatDuration=Ca,e.formatFileSize=nu,e.formatMasked=ju,e.formatNumber=_a,e.formatPercent=xa,e.formatRelativeTime=As,e.formatValue=Oa,e.getServerTable=_f,e.getShell=Fg,e.glyphNode=R,e.groupCount=vo,e.groupItems=bo,e.groupNotificationsByDay=xs,e.identityCell=Vo,e.inShortcutScope=Tt,e.initCollapsibleSearch=Ml,e.initCommandShortcuts=Hl,e.initDrawerDiscard=hg,e.initInputMasks=Ku,e.initPageBarBulk=td,e.initRemoteModals=$p,e.initRowDrag=zd,e.initScrollEdges=Jd,e.initServerActions=Jm,e.initServerTables=gf,e.initShellParts=Pg,e.initSubmitOnce=Zg,e.initUnsavedChanges=Ah,e.isCommandChord=Rl,e.isCurrencyCode=Ti,e.isHeicFile=_l,e.isImageFile=eu,e.isImageOnlyAccept=iu,e.isMaskPattern=Tu,e.isPdfFile=ru,e.isTimeZone=Mi,e.isTypingTarget=St,e.loadRemoteDrawer=nm,e.loadRemoteModal=em,e.loadRemotePane=im,e.maskedPostValue=Pu,e.matchSegments=Nc,e.matchesAccept=ou,e.measureRows=Fo,e.mentionLabel=Qo,e.mentionTextFromValue=ts,e.mentionValueFromText=ns,e.mentionedIds=rs,e.moveFocus=Dt,e.nextTheme=m_,e.notificationCountText=gs,e.notificationDayHeading=bs,e.notificationTime=ys,e.notificationTriggerLabel=_s,e.notificationUnreadAnnouncement=vs,e.openSearch=Ol,e.parseMentionValue=es,e.parseServerHtml=Rs,e.parseToastAction=Hs,e.passwordSatisfies=cd,e.pinAtValue=Do,e.pinClasses=ko,e.pinOffsetVar=To,e.planPins=Oo,e.playRowMoves=Io,e.pluralText=Qe,e.postedMasked=Au,e.rawMasked=ku,e.readColumnWidths=Co,e.readCsrf=Zs,e.readStoredTheme=l_,e.readText=P,e.relativeTimeTitle=js,e.resetUnsavedChanges=jh,e.resolveMask=Du,e.resolveTheme=c_,e.rowLabel=Ho,e.rowOrderChanged=Lo,e.runShortcut=Et,e.runToastAction=Tf,e.saveOutcomeText=Go,e.setRowSaveState=Uo,e.setText=Ye,e.settledRows=Wo,e.shortcutKey=bt,e.shortcutName=yt,e.shortcutsOff=wt,e.showResultToast=wf,e.stepperHeaderItems=uc,e.storeTheme=u_,e.syncSelectAll=Cc,e.syncTargets=Rd,e.themeBootScript=p_,e.themeKeyframes=w_,e.tickedKeys=Cd,e.timeZoneLabel=Na,e.timeoutFromAttribute=nc,e.toInstant=wa,e.todayIn=Ri,e.transitionTheme=E_,e.validateFile=su,e.virtualRange=xo,e.wallClockOf=Li,e.watchSystemTheme=h_,e.whenElementsReady=kn,e.withTrustedLabel=dr,e.writeColumnWidths=wo,e.wuiFetch=oc,e.wuiUpload=Rg,e.zoneOffsetMs=Pi,e.zoneParts=Ni,e})({});