@webority/ui-elements 0.150.0 → 0.153.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 (110) hide show
  1. package/dist/{WuiCommentThread-By-u3c5S.js → WuiCommentThread-BmRsl0K1.js} +1 -1
  2. package/dist/{WuiDataTable-D8UW2DMH.js → WuiDataTable-B4BYCd_s.js} +1 -1
  3. package/dist/WuiInlineEdit-BlBuWkHG.js +1 -0
  4. package/dist/{WuiLightbox-D7Nf1SbH.js → WuiLightbox-C2A14vHx.js} +1 -1
  5. package/dist/{WuiMarkdown-N96OX-To.js → WuiMarkdown-BXY0QKaO.js} +1 -1
  6. package/dist/{WuiMentionInput-BFB57FZI.js → WuiMentionInput-8Xjkzdqg.js} +1 -1
  7. package/dist/{WuiNotificationCenter-C6e13nCh.js → WuiNotificationCenter-ClkCTUnp.js} +1 -1
  8. package/dist/{WuiOverflow-CeLUmJR-.js → WuiOverflow-B0wA6aDe.js} +1 -1
  9. package/dist/{WuiPhone-rtex3VDC.js → WuiPhone-BVNVerap.js} +1 -1
  10. package/dist/{WuiRelativeTime-RdC80Zii.js → WuiRelativeTime-DyeUQOQ8.js} +1 -1
  11. package/dist/{WuiRollingNumber-YRMeRCGW.js → WuiRollingNumber-sfgNzaP0.js} +1 -1
  12. package/dist/WuiSavedViews-UaiP6YNG.js +1 -0
  13. package/dist/WuiSelect-DBPre2oe.js +9 -0
  14. package/dist/WuiTour-Cx61ijsm.js +1 -0
  15. package/dist/{WuiTree-ZD9GGmtg.js → WuiTree-0Yqu199O.js} +1 -1
  16. package/dist/{chips-2yXiMhK4.js → chips-Dony2fgq.js} +1 -1
  17. package/dist/{dataTable-D23oUOhU.js → dataTable-B-7oAeii.js} +1 -1
  18. package/dist/{drawerDiscard-CUN8L47U.js → drawerDiscard-C0yRSl1I.js} +1 -1
  19. package/dist/elements/comment-thread.js +1 -1
  20. package/dist/elements/data-table.js +1 -1
  21. package/dist/elements/inline-edit.js +1 -1
  22. package/dist/elements/kanban.js +1 -1
  23. package/dist/elements/lightbox.js +1 -1
  24. package/dist/elements/markdown.js +1 -1
  25. package/dist/elements/mention-input.js +1 -1
  26. package/dist/elements/notification-center.js +1 -1
  27. package/dist/elements/overflow.js +1 -1
  28. package/dist/elements/phone.js +1 -1
  29. package/dist/elements/relative-time.js +1 -1
  30. package/dist/elements/rolling-number.js +1 -1
  31. package/dist/elements/saved-views.js +1 -1
  32. package/dist/elements/select.js +1 -1
  33. package/dist/elements/tour.js +1 -1
  34. package/dist/elements/tree.js +1 -1
  35. package/dist/{fileViewerImage-tzF4DDq7.js → fileViewerImage-Bt1jeArm.js} +1 -1
  36. package/dist/{fileViewerPdf-BLMhF8NT.js → fileViewerPdf-CdaDuaRJ.js} +1 -1
  37. package/dist/formatters-ljfITOZ3.js +1 -0
  38. package/dist/helpers.js +1 -1
  39. package/dist/{inlineEditText-H7Pr8IU9.js → inlineEditText-CsLCQbcg.js} +1 -1
  40. package/dist/{kanban-CJ587-XT.js → kanban-Dz8m-17x.js} +1 -1
  41. package/dist/{kanbanModel-BdqSa1lJ.js → kanbanModel-C2IOPJ8L.js} +1 -1
  42. package/dist/{notificationDays-BKVW7xYD.js → notificationDays-BIWczft0.js} +1 -1
  43. package/dist/{relativeTime-YTAOONRy.js → relativeTime-BahImc8F.js} +1 -1
  44. package/dist/{search-BXcvm716.js → search-C8xIzt6h.js} +1 -1
  45. package/dist/server.js +1 -1
  46. package/dist/ui-calendar.global.js +1 -1
  47. package/dist/ui-calendar.js +1 -1
  48. package/dist/ui-chart.global.js +2 -2
  49. package/dist/ui-chart.js +2 -2
  50. package/dist/ui-elements/carousel.global.js +1 -1
  51. package/dist/ui-elements/code-block.global.js +1 -1
  52. package/dist/ui-elements/command-palette.global.js +1 -1
  53. package/dist/ui-elements/comment-thread.global.js +1 -1
  54. package/dist/ui-elements/consent-banner.global.js +1 -1
  55. package/dist/ui-elements/context-menu.global.js +1 -1
  56. package/dist/ui-elements/date-range.global.js +1 -1
  57. package/dist/ui-elements/drawer.global.js +1 -1
  58. package/dist/ui-elements/glyphs.global.js +1 -1
  59. package/dist/ui-elements/image-crop.global.js +1 -1
  60. package/dist/ui-elements/inline-edit.global.js +1 -1
  61. package/dist/ui-elements/kanban.global.js +1 -1
  62. package/dist/ui-elements/lead-popup.global.js +1 -1
  63. package/dist/ui-elements/lightbox.global.js +1 -1
  64. package/dist/ui-elements/markdown.global.js +2 -2
  65. package/dist/ui-elements/org-tree.global.js +1 -1
  66. package/dist/ui-elements/phone.global.js +2 -2
  67. package/dist/ui-elements/resizable.global.js +1 -1
  68. package/dist/ui-elements/saved-views.global.js +1 -1
  69. package/dist/ui-elements/select-chips.global.js +1 -1
  70. package/dist/ui-elements/select-recents.global.js +1 -1
  71. package/dist/ui-elements/select-search.global.js +1 -1
  72. package/dist/ui-elements/slider.global.js +1 -1
  73. package/dist/ui-elements/sortable.global.js +1 -1
  74. package/dist/ui-elements/status-icon.global.js +1 -1
  75. package/dist/ui-elements/timepicker.global.js +1 -1
  76. package/dist/ui-elements/tour.global.js +1 -1
  77. package/dist/ui-elements/tree.global.js +1 -1
  78. package/dist/ui-elements/wizard.global.js +1 -1
  79. package/dist/ui-elements.global.js +9 -9
  80. package/dist/ui-elements.js +1 -1
  81. package/dist/ui-file-viewer.global.js +1 -1
  82. package/dist/ui-file-viewer.js +1 -1
  83. package/dist/ui-tour.global.js +1 -1
  84. package/dist/{wuiHttp-523iN_RF.js → wuiHttp-DGbD7Fra.js} +1 -1
  85. package/package.json +4 -3
  86. package/types/WuiCommentThread.d.ts +2 -2
  87. package/types/WuiImageCrop.d.ts +4 -4
  88. package/types/WuiSelect.d.ts +9 -0
  89. package/types/WuiTour.d.ts +1 -1
  90. package/types/chartSpec.d.ts +20 -20
  91. package/types/fileValidation.d.ts +2 -2
  92. package/types/fileViewerPdf.d.ts +3 -3
  93. package/types/formatters.d.ts +19 -14
  94. package/types/inputMask.d.ts +3 -3
  95. package/types/kanban.d.ts +1 -1
  96. package/types/listQuery.d.ts +10 -10
  97. package/types/razor-js/modules/api.d.ts +3 -0
  98. package/types/razor-js/modules/buttons.d.ts +1 -0
  99. package/types/razor-js/modules/widgets.d.ts +1 -0
  100. package/types/razor-js/webority-ui.d.ts +3 -0
  101. package/types/select/list.d.ts +8 -8
  102. package/types/server/remoteModal.d.ts +12 -12
  103. package/types/server/wuiHttp.d.ts +5 -5
  104. package/types/stepperHeader.d.ts +2 -2
  105. package/types/themeTransition.d.ts +2 -2
  106. package/dist/WuiInlineEdit-r55qgh8A.js +0 -1
  107. package/dist/WuiSavedViews-DtyAoZKb.js +0 -1
  108. package/dist/WuiSelect-D9ABfsdZ.js +0 -9
  109. package/dist/WuiTour-CrIFLmSK.js +0 -1
  110. package/dist/formatters-C3V6M5zV.js +0 -1
@@ -1,14 +1,14 @@
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({anchorOverlay:()=>d,bindReanchor:()=>f,unbindReanchor:()=>p}),o=4,s=8,c=300,l=400;function u(e,t){let n=t.offsetWidth,r=t.offsetHeight,i=e.right+o+n>window.innerWidth-o,a=i?e.left-o-n:e.right+o;t.style.left=`${Math.max(o,a)}px`,t.style.top=`${Math.max(o,Math.min(e.top,window.innerHeight-r-o))}px`,t.dataset.side=i?`start`:`end`}function d(e,t,n={}){if(!e||!t)return;t.style.position=`fixed`;let r=e.getBoundingClientRect();if(n.beside){u(r,t);return}let i=n.clampHeight?t.scrollTop:0;n.clampHeight&&(t.style.maxHeight=``);let a=t.offsetHeight,d=window.innerHeight-r.bottom,f=!n.below&&d<a+o&&r.top>d;if(t.classList.toggle(`drop-up`,f),t.style.top=f?`${Math.max(o,r.top-a-o)}px`:`${r.bottom+o}px`,n.clampHeight){let e=f?r.top-8:window.innerHeight-r.bottom-8;e<a&&(t.style.maxHeight=`${Math.max(e,0)}px`),t.scrollTop=i}n.matchWidth&&(r.width>=c?(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(l,window.innerWidth-8)}px`));let p=t.offsetWidth;if(n.alignEnd){let e=r.right-p,n=e>=s?e:r.left,i=Math.max(s,Math.min(n,window.innerWidth-p-s));t.style.left=`${i}px`}else{let e=Math.min(r.left,window.innerWidth-p-o);t.style.left=`${Math.max(o,e)}px`}}function f(e,t){p(e),e._reanchor=t,e._reanchorScroll=n=>{n.composedPath().includes(e)||t()},window.addEventListener(`resize`,e._reanchor),window.addEventListener(`scroll`,e._reanchorScroll,!0)}function p(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 m=n({ElementBase:()=>g,NO_DOM_MESSAGE:()=>h}),h=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(h);var g=HTMLElement;function _(e,t){if(e==null)throw Error(t);return e}function v(e,t,n){if(!(e instanceof t))throw TypeError(n);return e}function y(e,t){return e instanceof Element?e.closest(t):null}var b=`data-wui-shortcuts`,x=`data-shortcut-scope`,S=`wui:shortcut`,C={title:`Keyboard shortcuts`,close:`Close`,help:`Show these shortcuts`},w=[{key:`J`,label:`Next item`},{key:`K`,label:`Previous item`},{key:`Enter`,label:`Open the item`}],ee={key:`X`,label:`Select the item`},T={"/":`slash`,"?":`help`,Escape:`esc`,Esc:`esc`,Enter:`enter`},E={esc:`Esc`,escape:`Esc`,enter:`Enter`,slash:`/`,help:`?`},D={esc:`Escape`,ctrl:`Control`,cmd:`Meta`,option:`Alt`,opt:`Alt`},te=new Set([`checkbox`,`radio`,`button`,`submit`,`reset`,`range`,`color`,`file`,`image`]),O=new Set([`textbox`,`searchbox`,`combobox`]),k=`a[href], button, summary, input, select, textarea, [role="button"], [role="link"], [role="menuitem"], [role="option"], [role="tab"], [role="checkbox"], [role="switch"]`;function ne(e){if(!e||e.ctrlKey||e.metaKey||e.altKey)return null;let t=e.key;return typeof t!=`string`||!t?null:T[t]?T[t]:t.length===1&&t.trim()?t.toLowerCase():null}function re(e){let t=String(e??``).trim();return t.length===1?t.toUpperCase():E[t.toLowerCase()]??t}function ie(e){return String(e??``).trim().split(/\s+/).filter(Boolean).map(e=>D[e.toLowerCase()]??(e.length===1?e.toUpperCase():e)).join(`+`)}function ae(e){if(!e||!oe(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!te.has(t.toLowerCase())}return O.has(e.getAttribute?.(`role`))}function oe(e){return e.nodeType===1}function se(e=typeof document>`u`?null:document){return e?.documentElement?.getAttribute(b)===`off`}function ce(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 le(e,t,n=null){let r=e.target instanceof Node?e.target:null;if(!t||e.defaultPrevented||se(r?.ownerDocument??void 0))return!1;let i=ne(e);if(!i||!ce(r,n)||ae(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(k)?!1:(e.preventDefault(),a(e),!0)}function ue(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=_(e[i<0?t>0?0:e.length-1:Math.min(e.length-1,Math.max(0,i+t))],`moveFocus: no item at the clamped index`);return a.focus(),a.scrollIntoView?.({block:`nearest`}),a}var de=2,fe=`wui-filter-popover-pinned`,pe=`.wui-filter-popover-trigger`,me=`.wui-filter-popover-panel`,he=`.wui-filter-popover-head`,A=`input:not([type]),input[type="text"],input[type="search"]`,ge=`a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1'])`;function _e(){try{return sessionStorage.getItem(fe)===`1`}catch{return!1}}function ve(e){try{e?sessionStorage.setItem(fe,`1`):sessionStorage.removeItem(fe)}catch{}}function ye(e){if(e===null||e instanceof Node)return e;throw TypeError(`event target is not a node`)}function be(e,t){let n=e?.querySelector(t)??null;return n instanceof HTMLElement?n:null}var xe=class extends g{_doc;_timer;_sticky;_inside;_pendingSubmit;_onEnter;_onLeave;_onClick;_onChange;_onListClose;_onFocusOut;_onKeyDown;_onShortcut;_onEscape;_onOutside;constructor(){super(),this._doc=null,this._timer=null,this._sticky=!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(ye(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){ve(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(ye(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(A))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&&le(e,{f:()=>this._open(!0,!0)})},this._onEscape=e=>{e.key===`Escape`&&this.isOpen&&this._close(!0)},this._onOutside=e=>{this.isOpen&&!e.composedPath().includes(this)&&this._close(!1)}}get isOpen(){let e=this._panel;return e?!e.hidden:!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),_e()&&this._pin&&(this._pin.checked=!0,this._open(!1,!1))}disconnectedCallback(){this._clear(),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?.removeEventListener(`keydown`,this._onEscape),this._doc?.removeEventListener(`click`,this._onOutside),p(this),this._doc=null}get _trigger(){return be(this,pe)}get _panel(){return be(this,me)}get _pin(){let e=this.querySelector(`${he} 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):(n.hidden=!1,r.setAttribute(`aria-expanded`,`true`),this._sticky=e,this._reposition(),f(this,()=>{this._triggerOutOfView()?this._close(!1):this._reposition()}),this._doc?.addEventListener(`keydown`,this._onEscape),this._doc?.addEventListener(`click`,this._onOutside)),t&&(be(n.querySelector(`.wui-filter-popover-grid`),ge)??be(n,ge))?.focus())}_close(e){this._clear();let t=this._panel;if(!t||!this.isOpen)return;let n=t.contains(this.ownerDocument.activeElement);t.hidden=!0,this._trigger?.setAttribute(`aria-expanded`,`false`),this._sticky=!1,p(this),this._doc?.removeEventListener(`keydown`,this._onEscape),this._doc?.removeEventListener(`click`,this._onOutside),e&&n&&this._trigger?.focus()}_reposition(){this.isOpen&&this._trigger&&d(this._trigger,this._panel,{clampHeight:!0,alignEnd:!0})}_triggerOutOfView(){let e=this._trigger;if(!e||!this._doc?.elementFromPoint)return!1;let t=e.getBoundingClientRect();if(!t.width&&!t.height)return!1;let n=this._doc.elementFromPoint(t.left+t.width/2,t.top+t.height/2);return!n||!(e.contains(n)||this._panel?.contains(n))}};function Se(){i(`wui-filter-popover`,xe)}var Ce=`INR`,we=Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`}),Te=e=>typeof e==`string`&&/^[A-Z]{3}$/.test(e),Ee=(e=`INR`)=>we[e]??`${e} `,De=n({IST_OFFSET_MS:()=>Oe,IST_TIME_ZONE:()=>j,isTimeZone:()=>je,nowIn:()=>Re,todayIn:()=>Le,wallClockOf:()=>Ie,wallToInstant:()=>Pe,zoneOffsetMs:()=>Ne,zoneParts:()=>Me}),j=`Asia/Kolkata`,Oe=198e5,ke=new Map;function Ae(e){let t=ke.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`}),ke.set(e,t)),t}function je(e){if(typeof e!=`string`||e===``)return!1;try{return Ae(e),!0}catch{return!1}}function Me(e,t=j){if(t===`Asia/Kolkata`){let t=new Date(e+Oe);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}let n=Object.fromEntries(Ae(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 Ne(e,t=j){if(t===`Asia/Kolkata`)return Oe;let n=Me(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 Pe(e,t=j){let n=e-Ne(e,t);return n=e-Ne(n,t),n}var Fe=e=>e instanceof Date?e.getTime():e;function Ie(e,t=j){return new Date(e+Ne(e,t)).toISOString().slice(0,19)}function Le(e=j,t=Date.now()){return Ie(Fe(t),e).slice(0,10)}function Re(e=j,t=Date.now()){let n=Fe(t);return new Date(n+Ne(n,e))}var ze=n({CURRENCIES:()=>Ve,DATE_PATTERNS:()=>We,DURATION_UNITS:()=>Ue,EMPTY_VALUE:()=>`-`,FORMAT_STYLES:()=>Be,IST_OFFSET_MS:()=>Oe,IST_TIME_ZONE:()=>j,MAX_DECIMALS:()=>20,MONEY_UNITS:()=>He,compactFormatOf:()=>vt,formatCompact:()=>ut,formatCurrency:()=>ct,formatDate:()=>M,formatDateTime:()=>yt,formatDayShort:()=>gt,formatDuration:()=>pt,formatNumber:()=>st,formatPercent:()=>dt,formatValue:()=>_t,isMoneyUnit:()=>Ge,istParts:()=>ht,timeZoneLabel:()=>St,toInstant:()=>mt}),Be=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],Ve=[`INR`,`USD`,`EUR`,`GBP`],He=[`rupees`,`paise`],Ue=[`ms`,`s`,`min`,`h`],We=[`day`,`month`,`year`,`datetime`,`time`];function Ge(e){return He.some(t=>t===e)}var Ke=`-`,qe=`−`,Je=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],Ye=(e,t)=>_(e[t],`no compact unit at index ${t}`),Xe=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],Ze=[[1e9,`B`],[1e6,`M`],[1e3,`K`]],Qe=e=>!e||e===`INR`?`en-IN`:`en-US`,$e=(e,t)=>typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=20?e:t,et=new Map,tt=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=et.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:e}),et.set(n,r)),r},nt=new Map,rt=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=nt.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:e,maximumFractionDigits:e}),nt.set(n,r)),r},it=e=>typeof e==`number`&&Number.isFinite(e),at=e=>e<0&&!Object.is(Math.abs(e),0)?qe:``,ot=(e,t)=>t===`paise`?e/100:e;function st(e,{decimals:t}={}){if(!it(e))return`-`;let n=tt($e(t,2)).format(Math.abs(e));return n===`0`?`0`:at(e)+n}function ct(e,{unit:t=`rupees`,decimals:n,currency:r=`INR`}={}){if(!it(e))return`-`;let i=ot(e,t),a=rt($e(n,0),Qe(r)).format(Math.abs(i));return(Number(a.replace(/,/g,``))===0?``:at(i))+Ee(r)+a}var lt=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function ut(e,{currency:t,unit:n=`rupees`}={}){if(!it(e))return`-`;let r=t?ot(e,n):e,i=t?Ee(t):``,a=t?Qe(t):`en-IN`,o=a===`en-IN`?Xe:Ze,s=Math.abs(r),c=o.findIndex(([e])=>s>=e);if(c===-1){let e=tt(lt(s),a).format(s);if(e!==`1,000`)return(e===`0`?``:at(r))+i+e;c=o.length-1}let[l,u]=Ye(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]=Ye(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f))),`${at(r)}${i}${tt(f,a).format(p)} ${u}`}function dt(e,{decimals:t}={}){return it(e)?`${st(e*100,{decimals:$e(t,1)})}%`:`-`}var ft={ms:1,s:1e3,min:6e4,h:36e5};function pt(e,{unit:t=`s`}={}){if(!it(e))return`-`;let n=ft[t]??1e3,r=Math.abs(e*n),i=at(e);if(Math.round(r)<1e3)return`${i}${tt(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${tt(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}${tt(0).format(l)}h ${s(c%60)}m`}function mt(e,t=j){if(e instanceof Date)return e.getTime();if(it(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?Pe(a.getTime(),t):NaN}return Date.parse(e)}function ht(e,t=j){let{year:n,month:r,day:i,hour:a,minute:o}=Me(e,t);return{year:n,month:r,day:i,hour:a,minute:o}}function M(e,{pattern:t=`day`,timeZone:n=j}={}){let r=mt(e,n);if(!Number.isFinite(r))return`-`;let i=ht(r,n),a=e=>String(e).padStart(2,`0`),o=`${a(i.day)}-${Je[i.month]}-${i.year}`,s=`${a(i.hour)}:${a(i.minute)}`;switch(t){case`month`:return`${Je[i.month]}-${i.year}`;case`year`:return String(i.year);case`datetime`:return`${o} ${s}`;case`time`:return s;default:return o}}function gt(e,{timeZone:t=j}={}){let n=mt(e,t);if(!Number.isFinite(n))return`-`;let r=ht(n,t);return`${String(r.day).padStart(2,`0`)}-${Je[r.month]}`}function _t(e,t){if(e==null||e===``)return`-`;let n=t?.style;if(n===`date`)return M(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return ct(e,t);case`percent`:return dt(e,t);case`compact`:return ut(e,t);case`duration`:return pt(e,t);default:return st(e,t)}}function vt(e){let t=e?.style;return t===`currency`?{style:`compact`,currency:e?.currency??`INR`,unit:e?.unit}:!t||t===`number`?{style:`compact`}:e??{}}function yt(e,{timeZone:t=j}={}){let n=mt(e);if(!Number.isFinite(n))return`-`;let r=Object.fromEntries(xt(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}-${Je[Number(r.month)-1]}-${r.year}, ${r.hour}:${r.minute} ${i.toUpperCase()}`}var bt=new Map;function xt(e){let t=bt.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}),bt.set(e,t)),t}function St(e=j){return new Intl.DateTimeFormat(`en-IN`,{timeZone:e,timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??e}var Ct=n({COLUMN_MAX_WIDTH:()=>Tt,COLUMN_MIN_WIDTH:()=>48,DATA_TABLE_TEXT:()=>N,PIN_AT_VAR:()=>zt,PIN_SIDES:()=>Ot,RESIZE_STEP:()=>10,RESIZE_STEP_LARGE:()=>50,ROW_HEIGHTS:()=>At,ROW_MOVE_LIMIT:()=>200,ROW_MOVE_MS:()=>220,ROW_SAVE_ATTR:()=>Qt,ROW_SAVE_ERROR_CLASS:()=>$t,ROW_SAVE_STATES:()=>Zt,VIRTUAL_OVERSCAN:()=>8,clampColumnWidth:()=>Mt,groupCount:()=>jt,groupItems:()=>Nt,identityCell:()=>en,measureRows:()=>Jt,pinAtValue:()=>Bt,pinClasses:()=>Ht,pinOffsetVar:()=>Rt,planPins:()=>Vt,playRowMoves:()=>Yt,readColumnWidths:()=>It,rowLabel:()=>tn,rowOrderChanged:()=>Xt,saveOutcomeText:()=>an,setRowSaveState:()=>nn,settledRows:()=>rn,virtualRange:()=>Pt,writeColumnWidths:()=>Lt}),wt=48,Tt=1200,Et=10,Dt=50,Ot=[`start`,`end`],kt=8,At={comfortable:72,cozy:48,compact:40},N={resize:e=>e?`Resize ${e} column`:`Resize column`,width:e=>`${e} pixels`,rows:e=>`${st(e,{decimals:0})} ${e===1?`row`:`rows`}`,saved:e=>e?`${e} saved.`:`Row saved.`,savedMany:e=>`${st(e,{decimals:0})} rows saved.`,notSaved:(e,t)=>`${e?`${e} was not saved.`:`Row was not saved.`}${t?` ${t}`:``}`},jt=e=>st(e,{decimals:0}),Mt=e=>Math.min(Tt,Math.max(48,Math.round(Number(e)||0)));function Nt(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 Pt({scrollTop:e,viewport:t,rowHeight:n,count:r,overscan:i=8}){let a=n>0?n:At.comfortable,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 Ft=e=>`wui-widths:${e}`;function It(e){if(!e)return{};try{let t=JSON.parse(window.localStorage.getItem(Ft(e))||`{}`),n={};if(t&&typeof t==`object`)for(let[e,r]of Object.entries(t))Number.isFinite(r)&&(n[e]=Mt(r));return n}catch{return{}}}function Lt(e,t){if(e)try{Object.keys(t).length?window.localStorage.setItem(Ft(e),JSON.stringify(t)):window.localStorage.removeItem(Ft(e))}catch{}}var Rt=(e,t)=>`--wui-pin-${e}-${t}`,zt=`--wui-pin-at`,Bt=(e,t)=>`var(${Rt(e,t)}, 0px)`;function Vt(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 Ht=e=>e?`wui-pin-${e.side}${e.edge?` wui-pin-${e.side}-edge`:``}`:``,Ut=200,Wt=220,Gt=`cubic-bezier(0.22, 1, 0.36, 1)`,Kt=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,qt=e=>e.getAttribute(`data-row-key`)??e;function Jt(e){let t=[...e];if(t.length>200)return null;let n=new Map;for(let e of t)e.hidden||n.set(qt(e),e.offsetTop);return n}function Yt(e,t){let n=[...e];if(!t||n.length>200||Kt())return 0;let r=0;for(let e of n){if(e.hidden||typeof e.animate!=`function`)continue;let n=t.get(qt(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:Gt}),r++)}return r}function Xt(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 Zt=[`saving`,`error`],Qt=`data-wui-save-state`,$t=`wui-row-save-error`,en=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 tn(e){let t=en(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 nn(e,t,n=``){if(t!==null&&!Zt.includes(t))throw Error(`A row's save state is ${Zt.join(` or `)} (or null to clear it), not "${t}".`);e.querySelector(`:scope > * > .${$t}`)?.remove(),t===null?e.removeAttribute(Qt):e.setAttribute(Qt,t),t===`saving`?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`);let r=t===`error`&&n?en(e):null;if(r){let t=e.ownerDocument.createElement(`span`);t.className=$t,t.textContent=n,r.append(t)}}function rn(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 an(e){let t=e.filter(e=>e.ok),n=[],[r]=t;t.length===1&&r?n.push(N.saved(r.label)):t.length>1&&n.push(N.savedMany(t.length));for(let t of e)t.ok||n.push(N.notSaved(t.label,t.message));return n.join(` `)}var on=`.wui-col-resize`,sn=`.wui-group-row, .wui-virtual-spacer`,cn=`.wui-select-cell, .wui-expand-cell`,ln=`<svg class="wui-icon" data-icon="chevron-down" data-wui="AppIcon" width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M19.92 8.95l-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95"></path></svg>`;function P(e){if(e==null)throw TypeError(`Missing DOM node`);return e}function un(e,t){if(e instanceof t)return e;throw TypeError(`Missing DOM node`)}var dn=e=>{let t=y(e,on);return t instanceof HTMLElement?t:null},fn=e=>e.hasAttribute(`data-wui-skeleton`)||!!e.querySelector(`:scope > td > .skeleton`),pn=class extends g{_frame;_headDirty;_rowsDirty;_frozenSig;_natural;_widths;_collapsed;_groupOrder;_items;_range;_drag;_userSized;_swallowClick;_mo;_ro;_fonts;_onPointerDown;_onKeyDown;_onClick;_onDblClick;_onScroll;_onFonts;_top=null;_bottom=null;_rowHeight=0;constructor(){super(),this._frame=0,this._headDirty=!0,this._rowsDirty=!0,this._frozenSig=null,this._natural=[],this._widths={},this._collapsed=new Set,this._groupOrder=[],this._items=[],this._range=null,this._drag=null,this._userSized=!1,this._swallowClick=!1,this._mo=null,this._ro=null,this._fonts=null,this._onPointerDown=e=>this._startDrag(e),this._onKeyDown=e=>this._key(e),this._onClick=e=>this._click(e),this._onDblClick=e=>{let t=dn(e.target);t&&this.contains(t)&&this._reset(t.closest(`th`))},this._onScroll=()=>{this.hasAttribute(`virtual`)&&this._schedule()},this._onFonts=()=>{this._userSized||this._drag||this._frozenSig===null||!this.hasAttribute(`resizable`)||(this._frozenSig=null,this._schedule())}}connectedCallback(){this._widths=It(this.getAttribute(`view-key`)),this.addEventListener(`pointerdown`,this._onPointerDown,!0),this.addEventListener(`keydown`,this._onKeyDown,!0),this.addEventListener(`click`,this._onClick,!0),this.addEventListener(`dblclick`,this._onDblClick),this.addEventListener(`scroll`,this._onScroll,{passive:!0}),this._fonts=this.ownerDocument.fonts??null,this._fonts?.addEventListener(`loadingdone`,this._onFonts),typeof MutationObserver<`u`&&(this._mo=new MutationObserver(e=>this._mutated(e)),this._mo.observe(this,{childList:!0,subtree:!0})),typeof ResizeObserver<`u`&&(this._ro=new ResizeObserver(()=>this._schedule()),this._ro.observe(this)),this._headDirty=!0,this._rowsDirty=!0,this._schedule()}disconnectedCallback(){this.removeEventListener(`pointerdown`,this._onPointerDown,!0),this.removeEventListener(`keydown`,this._onKeyDown,!0),this.removeEventListener(`click`,this._onClick,!0),this.removeEventListener(`dblclick`,this._onDblClick),this.removeEventListener(`scroll`,this._onScroll),this._fonts?.removeEventListener(`loadingdone`,this._onFonts),this._fonts=null,this._mo?.disconnect(),this._ro?.disconnect(),this._mo=null,this._ro=null,this._frame&&cancelAnimationFrame(this._frame),this._frame=0,this._drag=null}refresh(){this._headDirty=!0,this._rowsDirty=!0,this._run()}get _table(){let e=this.querySelector(`:scope > table`);return e instanceof HTMLTableElement?e:null}_headCells(e){let t=e.tHead?.rows[0];return t?[...t.cells]:[]}_schedule(){this._frame||=requestAnimationFrame(()=>{this._frame=0,this._run()})}_mutated(e){for(let t of e){let e=t.target instanceof Element?t.target:t.target.parentElement;e&&((e.closest(`thead`)||e===this._table||e===this)&&(this._headDirty=!0),(e.closest(`tbody, tfoot`)||e===this._table||e===this)&&(this._rowsDirty=!0))}this._schedule()}_run(){let e=this._table;if(!e)return;let t=this._headDirty,n=this._rowsDirty;this._headDirty=!1,this._rowsDirty=!1,n&&this.hasAttribute(`group-by`)&&this._group(e),this._pins(e,t||n),this.hasAttribute(`resizable`)&&(t&&this._handles(e),this._layout(e)),this.hasAttribute(`virtual`)&&this._virtual(e,t||n),this._mo?.takeRecords()}_pins(e,t){let n=this._headCells(e),r=n.map(e=>{let t=e.dataset.pin;return t===`start`||t===`end`?t:e.matches(cn)?`lead`:null});if(!r.some(e=>e===`start`||e===`end`))return;let i=Vt(r);i.forEach((e,t)=>{e&&this._ro?.observe(P(n[t]))});let a=e=>P(n[e]).getBoundingClientRect().width,o=0;i.forEach((t,n)=>{t?.side===`start`&&(this._setVar(e,Rt(`start`,t.ordinal),o),o+=a(n))}),o=0;for(let t=i.length-1;t>=0;t--){let n=i[t];n?.side===`end`&&(this._setVar(e,Rt(`end`,n.ordinal),o),o+=a(t))}if(t)for(let t of e.rows)t.matches(`${sn}, .wui-row-expanded`)||t.cells.length!==n.length||i.forEach((e,n)=>{if(!e)return;let r=P(t.cells[n]);r.classList.contains(`wui-pin-${e.side}`)||r.classList.add(`wui-pin-${e.side}`),e.edge&&!r.classList.contains(`wui-pin-${e.side}-edge`)&&r.classList.add(`wui-pin-${e.side}-edge`);let i=Bt(e.side,e.ordinal);r.style.getPropertyValue(`--wui-pin-at`)!==i&&r.style.setProperty(zt,i)})}_setVar(e,t,n){let r=`${Math.round(n*100)/100}px`;e.style.getPropertyValue(t)!==r&&e.style.setProperty(t,r)}_resizable(e){return e.map((t,n)=>n<e.length-1&&!t.matches(cn))}_handles(e){let t=this._headCells(e),n=this._resizable(t);t.forEach((e,t)=>{if(!n[t]||e.querySelector(on))return;let r=e.ownerDocument.createElement(`span`);r.className=`wui-col-resize`,r.setAttribute(`role`,`separator`),r.setAttribute(`aria-orientation`,`vertical`),r.setAttribute(`aria-valuemin`,`48`),r.setAttribute(`aria-valuemax`,String(Tt)),r.setAttribute(`tabindex`,`0`);let i=(e.textContent??``).trim();r.setAttribute(`aria-label`,N.resize(i)),i&&!e.hasAttribute(`aria-label`)&&e.setAttribute(`aria-label`,i),e.classList.add(`wui-col-resizable`),e.appendChild(r)})}_hasRows(e){for(let t of e.tBodies)for(let e of t.rows)if(!e.matches(sn)&&!fn(e))return!0;return!1}_signature(e){return e.map(e=>e.dataset.key||(e.textContent??``).trim()).join(``)}_layout(e){let t=this._headCells(e),n=this._signature(t);t.length&&n!==this._frozenSig&&(this._hasRows(e)?this._freeze(e,t,n):this._applyRemembered(t))}_applyRemembered(e){for(let t of e){let e=t.dataset.key&&this._widths[t.dataset.key];e&&(t.style.width=`${e}px`);let n=t.querySelector(on);n&&this._handleValue(n,Mt(e||t.getBoundingClientRect().width))}}_freeze(e,t,n){e.style.tableLayout=``,e.style.width=``,e.removeAttribute(`data-wui-fixed`);for(let e of t)e.hasAttribute(`data-wui-width`)&&(e.style.width=``,e.removeAttribute(`data-wui-width`));this._natural=t.map(e=>e.getBoundingClientRect().width),t.forEach((e,n)=>{if(n===t.length-1||e.matches(cn))return;let r=e.dataset.key&&this._widths[e.dataset.key];this._setWidth(e,r||this._natural[n])}),e.style.tableLayout=`fixed`,e.setAttribute(`data-wui-fixed`,``),this._frozenSig=n,this._fitTable(e,t)}_setWidth(e,t){let n=Mt(t);e.style.width=`${n}px`,e.setAttribute(`data-wui-width`,``);let r=e.querySelector(on);return r&&this._handleValue(r,n),n}_handleValue(e,t){e.setAttribute(`aria-valuenow`,String(t)),e.setAttribute(`aria-valuetext`,N.width(t))}_fitTable(e,t){let n=t.length-1,r=this._natural[n]||0;for(let e=0;e<n;e++)r+=Number.parseFloat(P(t[e]).style.width)||this._natural[e]||0;e.style.width=`max(100%, ${Math.round(r)}px)`}_ensureFrozen(e){let t=this._headCells(e),n=this._signature(t);return n!==this._frozenSig&&this._freeze(e,t,n),t}_resizeTo(e,t,n){let r=this._table;if(!r)return;let i=this._ensureFrozen(r);this._userSized=!0,this._setWidth(e,t),this._fitTable(r,i),n&&this._remember(e),this._pins(r,!1)}_remember(e){let t=e.dataset.key;t&&(this._widths={...this._widths,[t]:Number.parseFloat(e.style.width)},Lt(this.getAttribute(`view-key`),this._widths))}_reset(e){let t=this._table;if(!e||!t)return;let n=this._ensureFrozen(t);this._userSized=!0;let r=e.dataset.key;if(r&&r in this._widths){let{[r]:e,...t}=this._widths;this._widths=t,Lt(this.getAttribute(`view-key`),this._widths)}this._setWidth(e,this._natural[n.indexOf(e)]||0),this._fitTable(t,n),this._pins(t,!1)}_rtl(){return getComputedStyle(this).direction===`rtl`}_startDrag(e){let t=dn(e.target);if(!t||!this.contains(t)||e.button!==0)return;e.preventDefault(),e.stopPropagation();let n=t.closest(`th`),r=this._table;if(!n||!r)return;this._ensureFrozen(r);let i={th:n,x:e.clientX,from:n.getBoundingClientRect().width,dir:this._rtl()?-1:1,moved:!1};this._drag=i,t.setPointerCapture?.(e.pointerId),t.classList.add(`is-dragging`);let a=e=>{let t=(e.clientX-i.x)*i.dir;Math.abs(t)>1&&(i.moved=!0),this._resizeTo(n,i.from+t,!1)},o=e=>{t.removeEventListener(`pointermove`,a),t.removeEventListener(`pointerup`,o),t.removeEventListener(`pointercancel`,o),t.classList.remove(`is-dragging`),this._drag=null,e.type===`pointercancel`?this._resizeTo(n,i.from,!1):i.moved&&this._remember(n),this._swallowClick=!0,setTimeout(()=>{this._swallowClick=!1},0)};t.addEventListener(`pointermove`,a),t.addEventListener(`pointerup`,o),t.addEventListener(`pointercancel`,o)}_key(e){let t=dn(e.target);if(!t||!this.contains(t))return;let n=t.closest(`th`);if(e.key===`Enter`||e.key===` `){e.preventDefault(),e.stopPropagation();return}if(e.key===`Home`){e.preventDefault(),e.stopPropagation(),this._reset(n);return}if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault(),e.stopPropagation();let r=this._table;if(!r)return;this._ensureFrozen(r);let i=P(n),a=e.shiftKey?50:10,o=e.key===`ArrowRight`!==this._rtl(),s=Number.parseFloat(i.style.width)||i.getBoundingClientRect().width;this._resizeTo(i,s+(o?a:-a),!0)}_click(e){let t=e.target instanceof Element&&e.target.closest(on)!==null;if(this._swallowClick||t){e.stopPropagation(),(t||this._swallowClick)&&e.preventDefault(),this._swallowClick=!1;return}if(!this.hasAttribute(`group-by`))return;let n=y(e.target,`.wui-group-toggle`)?.closest(`.wui-group-row`);if(!(n instanceof HTMLTableRowElement)||!this.contains(n))return;let r=n.dataset.groupKey;this._collapsed.has(r)?this._collapsed.delete(r):this._collapsed.add(r),this._showGroup(n,!this._collapsed.has(r));let i=this._table;i&&this.hasAttribute(`virtual`)&&(this._virtual(i,!0),this._mo?.takeRecords())}_group(e){let t=this.getAttribute(`group-by`),n=this._headCells(e),r=n.findIndex(e=>e.dataset.key===t);if(r<0)throw Error(`<wui-data-table group-by="${t}"> needs a header cell with data-key="${t}".`);let i=e.tBodies[0];if(!i)return;let a=[...i.rows].filter(e=>!e.matches(sn));if(a.some(fn))return;let o=this.ownerDocument,s=new Map;for(let e of i.querySelectorAll(`:scope > tr.wui-group-row`))e instanceof HTMLTableRowElement&&s.set(e.dataset.groupKey,e);let c=Nt(a,e=>e.dataset.group??e.cells[r]?.textContent?.trim()??``,this._groupOrder);this._groupOrder=c.map(e=>e.key);let l=o.createDocumentFragment(),u=c.map(e=>{let t=s.get(e.key)??this._groupRow(o,e.key);return s.delete(e.key),un(t.querySelector(`.wui-group-cell`),HTMLTableCellElement).colSpan=n.length,un(t.querySelector(`.wui-group-count`),HTMLElement).textContent=jt(e.items.length),un(t.querySelector(`.wui-group-rows`),HTMLElement).textContent=`, ${N.rows(e.items.length)}`,l.append(t,...e.items),[t,e.key]});for(let e of s.values())e.remove();i.insertBefore(l,this._bottom?.parentNode===i?this._bottom:null);for(let[e,t]of u)this._showGroup(e,!this._collapsed.has(t))}_groupRow(e,t){let n=e.createElement(`tr`);n.className=`wui-group-row`,n.dataset.groupKey=t;let r=e.createElement(`th`);r.className=`wui-group-cell`,r.scope=`rowgroup`;let i=e.createElement(`button`);i.type=`button`,i.className=`wui-group-toggle`,i.innerHTML=ln;let a=e.createElement(`span`);a.className=`wui-group-label`,a.textContent=t;let o=e.createElement(`span`);o.className=`wui-group-count`,o.setAttribute(`aria-hidden`,`true`);let s=e.createElement(`span`);return s.className=`visually-hidden wui-group-rows`,i.append(a,o,s),r.append(i),n.append(r),n}_showGroup(e,t){if(e){e.querySelector(`.wui-group-toggle`)?.setAttribute(`aria-expanded`,String(t));for(let n=e.nextElementSibling;n&&!n.matches(sn);n=n.nextElementSibling)n instanceof HTMLElement&&(n.hidden=!t)}}_spacer(e,t){if(t?.parentNode===e)return t;let n=e.ownerDocument,r=n.createElement(`tr`);return r.className=`wui-virtual-spacer`,r.setAttribute(`aria-hidden`,`true`),r.append(n.createElement(`td`)),r}_virtual(e,t){let n=e.tBodies[0];if(!n)return;if(t){this._top=this._spacer(n,this._top),this._bottom=this._spacer(n,this._bottom),n.firstElementChild!==this._top&&n.insertBefore(this._top,n.firstChild),n.lastElementChild!==this._bottom&&n.append(this._bottom);let t=Math.max(1,this._headCells(e).length);P(this._top.cells[0]).colSpan=t,P(this._bottom.cells[0]).colSpan=t,this._items=[...n.rows].filter(e=>!e.classList.contains(`wui-virtual-spacer`)&&!e.hidden),this._range=null,e.setAttribute(`aria-rowcount`,String(this._items.length+1)),e.tHead?.rows[0]?.setAttribute(`aria-rowindex`,`1`),this._items.forEach((e,t)=>{e.setAttribute(`aria-rowindex`,String(t+2))}),this._rowHeight>0||(this._rowHeight=this._measureRow(e))}let r=e.tHead?.getBoundingClientRect().height||0,i=Pt({scrollTop:this.scrollTop-r,viewport:this.clientHeight,rowHeight:this._rowHeight,count:this._items.length}),a=this._range;if(a&&a.start===i.start&&a.end===i.end)return;let o=a?Math.min(a.start,i.start):0,s=a?Math.max(a.end,i.end):this._items.length;for(let e=o;e<s;e++){let t=e<i.start||e>=i.end,n=P(this._items[e]);n.classList.contains(`wui-virtual-off`)!==t&&n.classList.toggle(`wui-virtual-off`,t)}this._range=i;let c=P(this._top),l=P(this._bottom);c.hidden=i.before===0,l.hidden=i.after===0,P(c.cells[0]).style.height=`${i.before}px`,P(l.cells[0]).style.height=`${i.after}px`}_measureRow(e){let t=this._items.find(e=>!e.classList.contains(`wui-group-row`)&&!e.classList.contains(`wui-virtual-off`))?.getBoundingClientRect().height??0;return t>0?t:e.classList.contains(`wui-table-compact`)?At.compact:e.classList.contains(`wui-table-cozy`)?At.cozy:At.comfortable}},mn=n({DISPLAY_FORMAT:()=>xn,MONTHS:()=>hn,WEEKDAYS:()=>gn,clampMonth:()=>wn,daysIn:()=>Cn,firstWeekday:()=>vn,fmt:()=>Sn,pad:()=>yn,parseIso:()=>F,toIso:()=>bn}),hn=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],gn=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],_n=e=>{let t=String(e??``).trim();return/^[0-6]$/.test(t)?Number(t):null},vn=e=>_n(e.getAttribute(`first-day`))??_n(getComputedStyle(e).getPropertyValue(`--wui-first-day`))??1,yn=e=>String(e).padStart(2,`0`),bn=(e,t,n)=>`${e}-${yn(t+1)}-${yn(n)}`,F=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>Cn(a,o-1)?null:{y:a,m:o-1,d:s}},xn=`dd-MMM-yyyy`,Sn=(e,t=xn)=>{let n=F(e);if(!n)return``;let r=hn[n.m];if(r===void 0)throw Error(`month out of range`);let i={yyyy:n.y,MMMM:r,MMM:r.slice(0,3),MM:yn(n.m+1),dd:yn(n.d),d:n.d};return(t||`dd-MMM-yyyy`).replace(/yyyy|MMMM|MMM|MM|dd|d/g,e=>String(i[e]))},Cn=(e,t)=>{let n=new Date(0);return n.setFullYear(e,t+1,0),n.getDate()},wn=(e,t)=>{for(;t<0;)t+=12,--e;for(;t>11;)t-=12,e+=1;return{y:e,m:t}},Tn=n({BUSY_CLASS:()=>En,isInert:()=>I,isReadOnly:()=>Dn,syncFieldState:()=>On}),En=`wui-field-busy`,Dn=e=>e.hasAttribute(`readonly`),I=e=>e.hasAttribute(`disabled`)||e.hasAttribute(`readonly`)||e.hasAttribute(`loading`);function On(e,t){let n=e.hasAttribute(`loading`);n?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`),t&&(t.classList.toggle(En,n),Dn(e)?t.setAttribute(`aria-readonly`,`true`):t.removeAttribute(`aria-readonly`))}var kn=n({syncFormMirror:()=>L,syncFormMirrors:()=>Nn}),An=`data-wui-mirror`;function jn(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 Mn(e){let t=document.createElement(`input`);return t.type=`hidden`,t.setAttribute(An,``),e.appendChild(t),t}function L(e,t){let n=e.getAttribute(`name`)??``,r=e.querySelector(`:scope > input[${An}]`),i=r instanceof HTMLInputElement?r:null;n?(i||=Mn(e),jn(e,i,n,t)):i?.remove()}function Nn(e,t){let n=e.getAttribute(`name`)??``,r=[...e.querySelectorAll(`:scope > input[${An}]`)].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)=>{jn(e,r[i]??Mn(e),n,t)})}var Pn={add:`<path d="M6 12h12M12 18V6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"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><path d="M12 16.2v.1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"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><path d="M11.995 17h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"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"></path>`,"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"></path>`,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><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"></path>`,"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><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"></path>`,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><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"></path>`,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><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"></path>`,"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"></path>`,"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"></path>`,"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"></path>`,"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"></path>`,"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"></path>`,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><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"></path>`,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><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"></path>`,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><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"></path>`,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><path d="M15.996 11h.01M11.995 11h.01M7.995 11h.008" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,copy:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16 12.9v4.2c0 3.5-1.4 4.9-4.9 4.9H6.9C3.4 22 2 20.6 2 17.1v-4.2C2 9.4 3.4 8 6.9 8h4.2c3.5 0 4.9 1.4 4.9 4.9z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M22 6.9v4.2c0 3.5-1.4 4.9-4.9 4.9H16v-3.1C16 9.4 14.6 8 11.1 8H8V6.9C8 3.4 9.4 2 12.9 2h4.2C20.6 2 22 3.4 22 6.9z"></path>`,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><path d="M11.995 17h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,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"></path>`,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><path d="M22 10h-4c-3 0-4-1-4-4V2l8 8Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,download:`<path d="M9 11v6l2-2M9 17l-2-2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><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><path d="M22 10h-4c-3 0-4-1-4-4V2l8 8Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,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><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"></path>`,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"></path>`,"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><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"></path>`,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><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"></path>`,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"></path>`,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"></path>`,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><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"></path>`,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"></path>`,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><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"></path>`,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><path d="M11.995 16h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></g>`,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><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"></path>`,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"></path>`,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><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"></path>`,"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"></path>`,menu:`<path d="M3 7h18M3 12h18M3 17h18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>`,minus:`<path d="M6 12h12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,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"></path>`,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"></path>`,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><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><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"></path>`,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"></path>`,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"></path>`,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"></path>`,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"></path>`,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><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"></path>`,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"></path>`,"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"></path>`,"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"></path>`,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"></path>`,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"></path>`,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"></path>`,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"></path>`,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><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"></path>`,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><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><path d="m13.235 17.226 4-4" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,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"></path>`,"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"></path>`,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"></path>`,"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><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"></path>`,"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"></path>`,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"></path>`,"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"></path>`},Fn=n({devError:()=>R,devWarn:()=>In});function In(e,...t){console.warn(e,...t)}function R(e,...t){console.error(e,...t)}var Ln=Object.freeze({carousel:{entries:[`elements/carousel.ts`],tags:[`wui-carousel`]},"code-block":{entries:[`elements/code-block.ts`],tags:[`wui-code-block`]},"command-palette":{entries:[`elements/command-palette.ts`],tags:[`wui-command-palette`]},"comment-thread":{entries:[`elements/comment-thread.ts`],tags:[`wui-mention-input`,`wui-comment-thread`]},"consent-banner":{entries:[`elements/consent-banner.ts`],tags:[`wui-consent-banner`]},"context-menu":{entries:[`elements/context-menu.ts`],tags:[`wui-context-menu`]},"date-range":{entries:[`elements/date-range.ts`],tags:[`wui-date-range`]},drawer:{entries:[`elements/drawer.ts`],tags:[`wui-drawer`]},"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`]},resizable:{entries:[`elements/resizable.ts`],tags:[`wui-resizable`]},"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:[]},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`]},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`,buttonClass:`buttonClass.ts`,calendarMath:`calendarMath.ts`,copyText:`copyText.ts`,dataTable:`dataTable.ts`,defineElement:`defineElement.ts`,devWarn:`devWarn.ts`,elementBase:`elementBase.ts`,fieldState:`fieldState.ts`,formatters:`formatters.ts`,formMirror:`formMirror.ts`,glyphs:`global/glyphs.ts`,iconGlyphs:`iconGlyphs.g.ts`,listboxKeyNav:`listboxKeyNav.ts`,loader:`global/loader.ts`,mentionText:`mentionText.ts`,notificationDays:`notificationDays.ts`,optionLabel:`optionLabel.ts`,partRegistry:`select/partRegistry.ts`,selectList:`select/list.ts`,selectRemote:`select/remote.ts`,stepperHeader:`stepperHeader.ts`,tableSelect:`tableSelect.ts`,textMatch:`textMatch.ts`,wuiHttp:`server/wuiHttp.ts`,WuiSelect:`WuiSelect.ts`,zone:`zone.ts`});var Rn=`ui-elements/`;function zn(e){let t=Ln[e];if(t===void 0)throw Error(`[webority-ui] No on-demand element chunk is named ${e}.`);return t}function Bn(e){let t=zn(e);if(!t.selfContained)return`${Rn+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 Vn=n({CHUNK_DIR:()=>Rn,CHUNK_RETRY_MS:()=>Wn,ELEMENTS_DEFINED_EVENT:()=>Hn,ELEMENTS_LOAD_ERROR_EVENT:()=>Un,assetUrl:()=>rr,loadChunk:()=>ir,startElementLoader:()=>er,stopElementLoader:()=>tr,whenElementsReady:()=>nr}),Hn=`wui-elements:defined`,Un=`wui-elements:load-error`,Wn=1e3,Gn={"ui-elements/carousel.global.js":`6264cbe6442e`,"ui-elements/code-block.global.js":`561bbe0af229`,"ui-elements/command-palette.global.js":`0e165158c8e1`,"ui-elements/comment-thread.global.js":`1d1c9bf691ff`,"ui-elements/consent-banner.global.js":`74859306d02a`,"ui-elements/context-menu.global.js":`437e3fa1a708`,"ui-elements/date-range.global.js":`ab76cae04fe2`,"ui-elements/drawer.global.js":`e063ed83ca54`,"ui-elements/image-crop.global.js":`ca9ab331110a`,"ui-elements/inline-edit.global.js":`63be7b882239`,"ui-elements/kanban.global.js":`eadae07240b2`,"ui-elements/lead-popup.global.js":`b4ffa6c31452`,"ui-elements/lightbox.global.js":`17e0c2140354`,"ui-elements/org-tree.global.js":`b3450ab53544`,"ui-elements/markdown.global.js":`3adbdb173190`,"ui-elements/phone.global.js":`3bf58844b6a5`,"ui-elements/resizable.global.js":`45ea4c62a2dc`,"ui-elements/saved-views.global.js":`cb1976948845`,"ui-elements/glyphs.global.js":`e44193eb79c2`,"ui-elements/select-chips.global.js":`3eec5671dd43`,"ui-elements/select-recents.global.js":`e9c41835055e`,"ui-elements/select-search.global.js":`f2172391c867`,"ui-elements/slider.global.js":`01b340a0f317`,"ui-elements/sortable.global.js":`6ba4912f01e8`,"ui-elements/status-icon.global.js":`561e82c4f98d`,"ui-elements/timepicker.global.js":`0598a8c10a12`,"ui-elements/tour.global.js":`6d5db199b231`,"ui-elements/tree.global.js":`7bdd4b0c116c`,"ui-elements/wizard.global.js":`cc180ef7de19`,"ui-chart.global.js":`186c5c1f0a8a`,"ui-calendar.global.js":`7ac48e6e8ade`,"ui-rich-text.global.js":`5ca9a3b2eaec`,"ui-file-viewer.global.js":`d28e9454e2fe`,"ui-phone.global.js":`c646775bc1d1`},Kn=new Map;for(let[e,t]of Object.entries(Ln))for(let n of t.tags)Kn.set(n,e);var qn=[...Kn.keys()].join(`,`),Jn=null,Yn=``,Xn=!1,Zn=null,Qn=new Map;function $n(){let e=document.currentScript;return e instanceof HTMLScriptElement?e:null}function er(e=$n()){Xn||(Xn=!0,Jn=e?.src?e.src:null,Yn=e?.nonce||``,cr(document),Zn=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&cr(e)}),Zn.observe(document.documentElement,{childList:!0,subtree:!0}))}function tr(){Zn?.disconnect(),Zn=null,Xn=!1,Jn=null,Yn=``,Qn.clear()}function nr(e=document){return Promise.all([...sr(e)].map(e=>ir(e))).then(()=>void 0)}function rr(e){if(Jn===null)throw Error(`The on-demand element files have no address to load from.`);let t=new URL(e,Jn);return t.search=Object.hasOwn(Gn,e)?`?v=${Gn[e]}`:``,t.href}function ir(e){let t=Qn.get(e);if(t?.promise)return t.promise;let n=zn(e),{tags:r}=n,i=Bn(e),a=()=>Promise.all(r.map(e=>customElements.whenDefined(e))),o={status:`loading`,promise:null},s=new Promise((t,s)=>{let c=``,l=()=>{Zn&&Object.keys(Ln).every(e=>Qn.get(e)?.status===`loaded`||Qn.get(e)?.status===`failed`)&&Zn.disconnect()},u=()=>{o.status=`loaded`,l(),document.dispatchEvent(new CustomEvent(Hn,{detail:{chunk:e,tags:r}})),t()},d=t=>{o.status=`failed`,l(),R(`[webority-ui] Could not load ${c} for ${r.length?r.join(`, `):e}.${t?` ${t.message}`:``}`),document.dispatchEvent(new CustomEvent(Un,{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,Yn&&(i.nonce=Yn),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),Wn)}),document.head.append(i)};if([...document.scripts].some(e=>new URL(e.src,location.href).pathname.endsWith(`/${i}`)))a().then(u);else{try{c=rr(i)}catch(e){d(e instanceof Error?e:void 0);return}f(c,!1)}});return o.promise=s,Qn.set(e,o),s}function ar(e){return Kn.has(e.localName)&&!customElements.get(e.localName)}function or(e,t){let n=Kn.get(t.localName);n!==void 0&&ar(t)&&e.add(n)}function sr(e){let t=new Set;e instanceof Element&&or(t,e);for(let n of e.querySelectorAll(qn))or(t,n);return t}function cr(e){for(let t of sr(e))Promise.allSettled([ir(t)])}var lr=n({GLYPH_CHUNK:()=>ur,GLYPH_PENDING_ATTRIBUTE:()=>dr,glyphSvg:()=>z,registerGlyphs:()=>yr}),ur=`glyphs`,dr=`data-wui-glyph-pending`,fr=`svg[${dr}]`,pr=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,mr={...Pn},hr=!1,gr=null;function _r(e,t,n,r,i){return`<svg class="${n?`wui-icon ${n}`:`wui-icon`}" data-icon="${e}"${i?` ${dr}`:``} width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" aria-hidden="true">${r}</svg>`}function z(e,{size:t=16,className:n=``}={}){let r=mr[e];return r===void 0?hr||!pr.test(e)?``:(Promise.allSettled([ir(ur)]),_r(e,t,n,``,!0)):_r(e,t,n,r,!1)}function vr(e){let t=e instanceof Element&&e.matches(fr)?[e]:[];for(let n of[...t,...e.querySelectorAll(fr)]){let e=mr[n.getAttribute(`data-icon`)??``];e===void 0?n.remove():(n.removeAttribute(dr),n.innerHTML=e)}}function yr(e){Object.assign(mr,e),hr=!0,vr(document),gr===null&&(gr=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&vr(e)}),gr.observe(document.documentElement,{childList:!0,subtree:!0}))}var br=n({TRUSTED_HTML:()=>xr,escapeHtml:()=>B,optionLabelHtml:()=>Er,optionText:()=>kr,stripTags:()=>Dr,withTrustedLabel:()=>Sr}),xr=Symbol(`wui.trustedHtml`),Sr=e=>({...e,[xr]:!0}),B=e=>String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`),Cr=e=>{if(!e)return``;let t=String(e).toLowerCase().replace(/[^a-z0-9-]/g,``);return t?z(t):``},wr=e=>`wui-flag wui-flag-${e}`,Tr=e=>{let t=String(e??``).toLowerCase();return/^[a-z]{2}$/.test(t)?`<span class="${wr(t)}" aria-hidden="true"></span>`:``},Er=e=>{if(e==null)return``;let t=e[xr]?String(e.label??``):B(e.label),n=Tr(e.flag)+Cr(e.icon);return n?`<span class="wui-opt-label">${n}${t}</span>`:t},Dr=e=>String(e??``).replace(/<[^>]*>/g,``),Or=new WeakMap,kr=e=>{if(e==null)return``;if(!e[xr])return Dr(e.label);let t=Or.get(e);if(t&&t.label===e.label)return t.text;let n=document.createElement(`template`);n.innerHTML=String(e.label??``);let r=n.content.textContent??``;return Or.set(e,{label:e.label,text:r}),r},Ar=class extends g{static formAssociated=!0;static get observedAttributes(){return[`value`,`min`,`max`,`placeholder`,`disabled`,`readonly`,`loading`,`first-day`,`disabled-weekdays`,`display-format`,`size`,`aria-label`,`aria-describedby`,`aria-invalid`]}_internals;_value;_defaultValue;_rendered;_viewY;_viewM;_mode;_focus;_slide;_viewNavigated;_openFn;_closeFn;_bindGlobal;_onKeyBound;_onDocClick;_onDocKey;_onHostKey;get _open(){return _(this._openFn,`open missing`)}get _close(){return _(this._closeFn,`close missing`)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=``;let e=new Date(2e3,0,1);this._viewY=e.getFullYear(),this._viewM=e.getMonth(),this._mode=`days`,this._focus=null,this._slide=``}connectedCallback(){this._rendered?this._bindGlobal?.():this.render()}attributeChangedCallback(e,t,n){if(e===`aria-invalid`)this._syncInvalid();else if(this._rendered){if(e===`value`)this._value=n||``,this._syncFormValue(),this._syncTrigger();else if(e===`display-format`)this._syncTrigger();else if(e===`first-day`){let e=this.querySelector(`.datepicker-pop`);e instanceof HTMLDivElement&&e.hidden||this._renderView()}else this.render()}}_syncInvalid(){let e=this.querySelector(`.datepicker-trigger`);e instanceof HTMLButtonElement&&(this.hasAttribute(`aria-invalid`)?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}formResetCallback(){this.value=this._defaultValue||``}get value(){return this._value}set value(e){this._value=e||``,L(this,this._value),this._syncTrigger()}_firstDay(){return vn(this)}render(){this._defaultValue===void 0&&(this._defaultValue=this.getAttribute(`value`)||``,this._value=this._defaultValue||this._value);let e=this.getAttribute(`placeholder`)||`Choose a date`,t=F(this._value);t&&(this._viewY=t.y,this._viewM=t.m);let n=this.getAttribute(`size`),r=n===`sm`?` input-sm`:n===`lg`?` input-lg`:``,i=this.getAttribute(`aria-label`),a=this.getAttribute(`aria-describedby`);this.innerHTML=`
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({anchorOverlay:()=>d,bindReanchor:()=>f,unbindReanchor:()=>p}),o=4,s=8,c=300,l=400;function u(e,t){let n=t.offsetWidth,r=t.offsetHeight,i=e.right+o+n>window.innerWidth-o,a=i?e.left-o-n:e.right+o;t.style.left=`${Math.max(o,a)}px`,t.style.top=`${Math.max(o,Math.min(e.top,window.innerHeight-r-o))}px`,t.dataset.side=i?`start`:`end`}function d(e,t,n={}){if(!e||!t)return;t.style.position=`fixed`;let r=e.getBoundingClientRect();if(n.beside){u(r,t);return}let i=n.clampHeight?t.scrollTop:0;n.clampHeight&&(t.style.maxHeight=``);let a=t.offsetHeight,d=window.innerHeight-r.bottom,f=!n.below&&d<a+o&&r.top>d;if(t.classList.toggle(`drop-up`,f),t.style.top=f?`${Math.max(o,r.top-a-o)}px`:`${r.bottom+o}px`,n.clampHeight){let e=f?r.top-8:window.innerHeight-r.bottom-8;e<a&&(t.style.maxHeight=`${Math.max(e,0)}px`),t.scrollTop=i}n.matchWidth&&(r.width>=c?(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(l,window.innerWidth-8)}px`));let p=t.offsetWidth;if(n.alignEnd){let e=r.right-p,n=e>=s?e:r.left,i=Math.max(s,Math.min(n,window.innerWidth-p-s));t.style.left=`${i}px`}else{let e=Math.min(r.left,window.innerWidth-p-o);t.style.left=`${Math.max(o,e)}px`}}function f(e,t){p(e),e._reanchor=t,e._reanchorScroll=n=>{n.composedPath().includes(e)||t()},window.addEventListener(`resize`,e._reanchor),window.addEventListener(`scroll`,e._reanchorScroll,!0)}function p(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 m=n({ElementBase:()=>g,NO_DOM_MESSAGE:()=>h}),h=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(h);var g=HTMLElement;function _(e,t){if(e==null)throw Error(t);return e}function v(e,t,n){if(!(e instanceof t))throw TypeError(n);return e}function y(e,t){return e instanceof Element?e.closest(t):null}var b=`data-wui-shortcuts`,x=`data-shortcut-scope`,S=`wui:shortcut`,C={title:`Keyboard shortcuts`,close:`Close`,help:`Show these shortcuts`},w=[{key:`J`,label:`Next item`},{key:`K`,label:`Previous item`},{key:`Enter`,label:`Open the item`}],T={key:`X`,label:`Select the item`},E={"/":`slash`,"?":`help`,Escape:`esc`,Esc:`esc`,Enter:`enter`},D={esc:`Esc`,escape:`Esc`,enter:`Enter`,slash:`/`,help:`?`},O={esc:`Escape`,ctrl:`Control`,cmd:`Meta`,option:`Alt`,opt:`Alt`},ee=new Set([`checkbox`,`radio`,`button`,`submit`,`reset`,`range`,`color`,`file`,`image`]),k=new Set([`textbox`,`searchbox`,`combobox`]),te=`a[href], button, summary, input, select, textarea, [role="button"], [role="link"], [role="menuitem"], [role="option"], [role="tab"], [role="checkbox"], [role="switch"]`;function ne(e){if(!e||e.ctrlKey||e.metaKey||e.altKey)return null;let t=e.key;return typeof t!=`string`||!t?null:E[t]?E[t]:t.length===1&&t.trim()?t.toLowerCase():null}function re(e){let t=String(e??``).trim();return t.length===1?t.toUpperCase():D[t.toLowerCase()]??t}function ie(e){return String(e??``).trim().split(/\s+/).filter(Boolean).map(e=>O[e.toLowerCase()]??(e.length===1?e.toUpperCase():e)).join(`+`)}function ae(e){if(!e||!oe(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!ee.has(t.toLowerCase())}return k.has(e.getAttribute?.(`role`))}function oe(e){return e.nodeType===1}function se(e=typeof document>`u`?null:document){return e?.documentElement?.getAttribute(b)===`off`}function ce(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 le(e,t,n=null){let r=e.target instanceof Node?e.target:null;if(!t||e.defaultPrevented||se(r?.ownerDocument??void 0))return!1;let i=ne(e);if(!i||!ce(r,n)||ae(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(te)?!1:(e.preventDefault(),a(e),!0)}function ue(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=_(e[i<0?t>0?0:e.length-1:Math.min(e.length-1,Math.max(0,i+t))],`moveFocus: no item at the clamped index`);return a.focus(),a.scrollIntoView?.({block:`nearest`}),a}var de=2,fe=`wui-filter-popover-pinned`,pe=`.wui-filter-popover-trigger`,me=`.wui-filter-popover-panel`,he=`.wui-filter-popover-head`,A=`input:not([type]),input[type="text"],input[type="search"]`,ge=`a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1'])`;function _e(){try{return sessionStorage.getItem(fe)===`1`}catch{return!1}}function ve(e){try{e?sessionStorage.setItem(fe,`1`):sessionStorage.removeItem(fe)}catch{}}function ye(e){if(e===null||e instanceof Node)return e;throw TypeError(`event target is not a node`)}function be(e,t){let n=e?.querySelector(t)??null;return n instanceof HTMLElement?n:null}var xe=class extends g{_doc;_timer;_sticky;_inside;_pendingSubmit;_onEnter;_onLeave;_onClick;_onChange;_onListClose;_onFocusOut;_onKeyDown;_onShortcut;_onEscape;_onOutside;constructor(){super(),this._doc=null,this._timer=null,this._sticky=!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(ye(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){ve(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(ye(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(A))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&&le(e,{f:()=>this._open(!0,!0)})},this._onEscape=e=>{e.key===`Escape`&&this.isOpen&&this._close(!0)},this._onOutside=e=>{this.isOpen&&!e.composedPath().includes(this)&&this._close(!1)}}get isOpen(){let e=this._panel;return e?!e.hidden:!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),_e()&&this._pin&&(this._pin.checked=!0,this._open(!1,!1))}disconnectedCallback(){this._clear(),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?.removeEventListener(`keydown`,this._onEscape),this._doc?.removeEventListener(`click`,this._onOutside),p(this),this._doc=null}get _trigger(){return be(this,pe)}get _panel(){return be(this,me)}get _pin(){let e=this.querySelector(`${he} 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):(n.hidden=!1,r.setAttribute(`aria-expanded`,`true`),this._sticky=e,this._reposition(),f(this,()=>{this._triggerOutOfView()?this._close(!1):this._reposition()}),this._doc?.addEventListener(`keydown`,this._onEscape),this._doc?.addEventListener(`click`,this._onOutside)),t&&(be(n.querySelector(`.wui-filter-popover-grid`),ge)??be(n,ge))?.focus())}_close(e){this._clear();let t=this._panel;if(!t||!this.isOpen)return;let n=t.contains(this.ownerDocument.activeElement);t.hidden=!0,this._trigger?.setAttribute(`aria-expanded`,`false`),this._sticky=!1,p(this),this._doc?.removeEventListener(`keydown`,this._onEscape),this._doc?.removeEventListener(`click`,this._onOutside),e&&n&&this._trigger?.focus()}_reposition(){this.isOpen&&this._trigger&&d(this._trigger,this._panel,{clampHeight:!0,alignEnd:!0})}_triggerOutOfView(){let e=this._trigger;if(!e||!this._doc?.elementFromPoint)return!1;let t=e.getBoundingClientRect();if(!t.width&&!t.height)return!1;let n=this._doc.elementFromPoint(t.left+t.width/2,t.top+t.height/2);return!n||!(e.contains(n)||this._panel?.contains(n))}};function Se(){i(`wui-filter-popover`,xe)}var Ce=`INR`,we=Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`,JPY:`¥`}),Te=e=>typeof e==`string`&&/^[A-Z]{3}$/.test(e),Ee=(e=`INR`)=>we[e]??`${e} `,De=n({IST_OFFSET_MS:()=>Oe,IST_TIME_ZONE:()=>j,isTimeZone:()=>je,nowIn:()=>Re,todayIn:()=>Le,wallClockOf:()=>Ie,wallToInstant:()=>Pe,zoneOffsetMs:()=>Ne,zoneParts:()=>Me}),j=`Asia/Kolkata`,Oe=198e5,ke=new Map;function Ae(e){let t=ke.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`}),ke.set(e,t)),t}function je(e){if(typeof e!=`string`||e===``)return!1;try{return Ae(e),!0}catch{return!1}}function Me(e,t=j){if(t===`Asia/Kolkata`){let t=new Date(e+Oe);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}let n=Object.fromEntries(Ae(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 Ne(e,t=j){if(t===`Asia/Kolkata`)return Oe;let n=Me(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 Pe(e,t=j){let n=e-Ne(e,t);return n=e-Ne(n,t),n}var Fe=e=>e instanceof Date?e.getTime():e;function Ie(e,t=j){return new Date(e+Ne(e,t)).toISOString().slice(0,19)}function Le(e=j,t=Date.now()){return Ie(Fe(t),e).slice(0,10)}function Re(e=j,t=Date.now()){let n=Fe(t);return new Date(n+Ne(n,e))}var ze=n({CURRENCIES:()=>Ve,DATE_PATTERNS:()=>We,DURATION_UNITS:()=>Ue,EMPTY_VALUE:()=>`-`,FORMAT_STYLES:()=>Be,IST_OFFSET_MS:()=>Oe,IST_TIME_ZONE:()=>j,MAX_DECIMALS:()=>20,MONEY_UNITS:()=>He,compactFormatOf:()=>xt,formatCompact:()=>pt,formatCurrency:()=>dt,formatDate:()=>M,formatDateTime:()=>St,formatDayShort:()=>yt,formatDuration:()=>gt,formatNumber:()=>ut,formatPercent:()=>mt,formatValue:()=>bt,isMoneyUnit:()=>Ge,istParts:()=>vt,paiseToRupeeText:()=>ot,timeZoneLabel:()=>Tt,toInstant:()=>_t}),Be=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],Ve=[`INR`,`USD`,`EUR`,`GBP`],He=[`rupees`,`paise`],Ue=[`ms`,`s`,`min`,`h`],We=[`day`,`month`,`year`,`datetime`,`time`];function Ge(e){return He.some(t=>t===e)}var Ke=`-`,qe=`−`,Je=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],Ye=(e,t)=>_(e[t],`no compact unit at index ${t}`),Xe=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],Ze=[[1e9,`B`],[1e6,`M`],[1e3,`K`]],Qe=e=>!e||e===`INR`?`en-IN`:`en-US`,$e=(e,t)=>typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=20?e:t,et=new Map,tt=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=et.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:e}),et.set(n,r)),r},nt=new Map,rt=(e,t=`en-IN`)=>{let n=`${t}:${e}`,r=nt.get(n);return r||(r=new Intl.NumberFormat(t,{minimumFractionDigits:e,maximumFractionDigits:e}),nt.set(n,r)),r},it=e=>typeof e==`number`&&Number.isFinite(e),at=e=>e<0&&!Object.is(Math.abs(e),0)?qe:``;function ot(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 st=(e,t)=>t===`paise`?Number(ot(e)):e,ct=2,lt=(e,t,n)=>{let r=Math.min(t,ct),i=10n**BigInt(ct-r),a=(BigInt(ot(e).replace(`.`,``))+i/2n)/i,o=10n**BigInt(r),s=rt(0,n).format(a/o);return t===0?s:`${s}.${(a%o).toString().padStart(r,`0`)}${`0`.repeat(t-r)}`};function ut(e,{decimals:t}={}){if(!it(e))return`-`;let n=tt($e(t,2)).format(Math.abs(e));return n===`0`?`0`:at(e)+n}function dt(e,{unit:t=`rupees`,decimals:n,currency:r=`INR`}={}){if(!it(e))return`-`;let i=$e(n,0),a=Qe(r),o=t===`paise`?lt(Math.abs(e),i,a):rt(i,a).format(Math.abs(e));return(Number(o.replace(/,/g,``))===0?``:at(e))+Ee(r)+o}var ft=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function pt(e,{currency:t,unit:n=`rupees`}={}){if(!it(e))return`-`;let r=t?st(e,n):e,i=t?Ee(t):``,a=t?Qe(t):`en-IN`,o=a===`en-IN`?Xe:Ze,s=Math.abs(r),c=o.findIndex(([e])=>s>=e);if(c===-1){let e=tt(ft(s),a).format(s);if(e!==`1,000`)return(e===`0`?``:at(r))+i+e;c=o.length-1}let[l,u]=Ye(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]=Ye(o,c),d=s/l,f=d>=100?0:d>=10?1:2,p=Number(d.toFixed(f))),`${at(r)}${i}${tt(f,a).format(p)} ${u}`}function mt(e,{decimals:t}={}){return it(e)?`${ut(e*100,{decimals:$e(t,1)})}%`:`-`}var ht={ms:1,s:1e3,min:6e4,h:36e5};function gt(e,{unit:t=`s`}={}){if(!it(e))return`-`;let n=ht[t]??1e3,r=Math.abs(e*n),i=at(e);if(Math.round(r)<1e3)return`${i}${tt(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${tt(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}${tt(0).format(l)}h ${s(c%60)}m`}function _t(e,t=j){if(e instanceof Date)return e.getTime();if(it(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?Pe(a.getTime(),t):NaN}return Date.parse(e)}function vt(e,t=j){let{year:n,month:r,day:i,hour:a,minute:o}=Me(e,t);return{year:n,month:r,day:i,hour:a,minute:o}}function M(e,{pattern:t=`day`,timeZone:n=j}={}){let r=_t(e,n);if(!Number.isFinite(r))return`-`;let i=vt(r,n),a=e=>String(e).padStart(2,`0`),o=`${a(i.day)}-${Je[i.month]}-${i.year}`,s=`${a(i.hour)}:${a(i.minute)}`;switch(t){case`month`:return`${Je[i.month]}-${i.year}`;case`year`:return String(i.year);case`datetime`:return`${o} ${s}`;case`time`:return s;default:return o}}function yt(e,{timeZone:t=j}={}){let n=_t(e,t);if(!Number.isFinite(n))return`-`;let r=vt(n,t);return`${String(r.day).padStart(2,`0`)}-${Je[r.month]}`}function bt(e,t){if(e==null||e===``)return`-`;let n=t?.style;if(n===`date`)return M(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return dt(e,t);case`percent`:return mt(e,t);case`compact`:return pt(e,t);case`duration`:return gt(e,t);default:return ut(e,t)}}function xt(e){let t=e?.style;return t===`currency`?{style:`compact`,currency:e?.currency??`INR`,unit:e?.unit}:!t||t===`number`?{style:`compact`}:e??{}}function St(e,{timeZone:t=j}={}){let n=_t(e);if(!Number.isFinite(n))return`-`;let r=Object.fromEntries(wt(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}-${Je[Number(r.month)-1]}-${r.year}, ${r.hour}:${r.minute} ${i.toUpperCase()}`}var Ct=new Map;function wt(e){let t=Ct.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}),Ct.set(e,t)),t}function Tt(e=j){return new Intl.DateTimeFormat(`en-IN`,{timeZone:e,timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??e}var Et=n({COLUMN_MAX_WIDTH:()=>Ot,COLUMN_MIN_WIDTH:()=>48,DATA_TABLE_TEXT:()=>N,PIN_AT_VAR:()=>Ht,PIN_SIDES:()=>jt,RESIZE_STEP:()=>10,RESIZE_STEP_LARGE:()=>50,ROW_HEIGHTS:()=>Nt,ROW_MOVE_LIMIT:()=>200,ROW_MOVE_MS:()=>220,ROW_SAVE_ATTR:()=>tn,ROW_SAVE_ERROR_CLASS:()=>nn,ROW_SAVE_STATES:()=>en,VIRTUAL_OVERSCAN:()=>8,clampColumnWidth:()=>Ft,groupCount:()=>Pt,groupItems:()=>It,identityCell:()=>rn,measureRows:()=>Zt,pinAtValue:()=>Ut,pinClasses:()=>Gt,pinOffsetVar:()=>Vt,planPins:()=>Wt,playRowMoves:()=>Qt,readColumnWidths:()=>zt,rowLabel:()=>an,rowOrderChanged:()=>$t,saveOutcomeText:()=>cn,setRowSaveState:()=>on,settledRows:()=>sn,virtualRange:()=>Lt,writeColumnWidths:()=>Bt}),Dt=48,Ot=1200,kt=10,At=50,jt=[`start`,`end`],Mt=8,Nt={comfortable:72,cozy:48,compact:40},N={resize:e=>e?`Resize ${e} column`:`Resize column`,width:e=>`${e} pixels`,rows:e=>`${ut(e,{decimals:0})} ${e===1?`row`:`rows`}`,saved:e=>e?`${e} saved.`:`Row saved.`,savedMany:e=>`${ut(e,{decimals:0})} rows saved.`,notSaved:(e,t)=>`${e?`${e} was not saved.`:`Row was not saved.`}${t?` ${t}`:``}`},Pt=e=>ut(e,{decimals:0}),Ft=e=>Math.min(Ot,Math.max(48,Math.round(Number(e)||0)));function It(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 Lt({scrollTop:e,viewport:t,rowHeight:n,count:r,overscan:i=8}){let a=n>0?n:Nt.comfortable,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 Rt=e=>`wui-widths:${e}`;function zt(e){if(!e)return{};try{let t=JSON.parse(window.localStorage.getItem(Rt(e))||`{}`),n={};if(t&&typeof t==`object`)for(let[e,r]of Object.entries(t))Number.isFinite(r)&&(n[e]=Ft(r));return n}catch{return{}}}function Bt(e,t){if(e)try{Object.keys(t).length?window.localStorage.setItem(Rt(e),JSON.stringify(t)):window.localStorage.removeItem(Rt(e))}catch{}}var Vt=(e,t)=>`--wui-pin-${e}-${t}`,Ht=`--wui-pin-at`,Ut=(e,t)=>`var(${Vt(e,t)}, 0px)`;function Wt(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 Gt=e=>e?`wui-pin-${e.side}${e.edge?` wui-pin-${e.side}-edge`:``}`:``,Kt=200,qt=220,Jt=`cubic-bezier(0.22, 1, 0.36, 1)`,Yt=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,Xt=e=>e.getAttribute(`data-row-key`)??e;function Zt(e){let t=[...e];if(t.length>200)return null;let n=new Map;for(let e of t)e.hidden||n.set(Xt(e),e.offsetTop);return n}function Qt(e,t){let n=[...e];if(!t||n.length>200||Yt())return 0;let r=0;for(let e of n){if(e.hidden||typeof e.animate!=`function`)continue;let n=t.get(Xt(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:Jt}),r++)}return r}function $t(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 en=[`saving`,`error`],tn=`data-wui-save-state`,nn=`wui-row-save-error`,rn=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 an(e){let t=rn(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 on(e,t,n=``){if(t!==null&&!en.includes(t))throw Error(`A row's save state is ${en.join(` or `)} (or null to clear it), not "${t}".`);e.querySelector(`:scope > * > .${nn}`)?.remove(),t===null?e.removeAttribute(tn):e.setAttribute(tn,t),t===`saving`?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`);let r=t===`error`&&n?rn(e):null;if(r){let t=e.ownerDocument.createElement(`span`);t.className=nn,t.textContent=n,r.append(t)}}function sn(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 cn(e){let t=e.filter(e=>e.ok),n=[],[r]=t;t.length===1&&r?n.push(N.saved(r.label)):t.length>1&&n.push(N.savedMany(t.length));for(let t of e)t.ok||n.push(N.notSaved(t.label,t.message));return n.join(` `)}var ln=`.wui-col-resize`,un=`.wui-group-row, .wui-virtual-spacer`,dn=`.wui-select-cell, .wui-expand-cell`,fn=`<svg class="wui-icon" data-icon="chevron-down" data-wui="AppIcon" width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M19.92 8.95l-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95"></path></svg>`;function P(e){if(e==null)throw TypeError(`Missing DOM node`);return e}function pn(e,t){if(e instanceof t)return e;throw TypeError(`Missing DOM node`)}var mn=e=>{let t=y(e,ln);return t instanceof HTMLElement?t:null},hn=e=>e.hasAttribute(`data-wui-skeleton`)||!!e.querySelector(`:scope > td > .skeleton`),gn=class extends g{_frame;_headDirty;_rowsDirty;_frozenSig;_natural;_widths;_collapsed;_groupOrder;_items;_range;_drag;_userSized;_swallowClick;_mo;_ro;_fonts;_onPointerDown;_onKeyDown;_onClick;_onDblClick;_onScroll;_onFonts;_top=null;_bottom=null;_rowHeight=0;constructor(){super(),this._frame=0,this._headDirty=!0,this._rowsDirty=!0,this._frozenSig=null,this._natural=[],this._widths={},this._collapsed=new Set,this._groupOrder=[],this._items=[],this._range=null,this._drag=null,this._userSized=!1,this._swallowClick=!1,this._mo=null,this._ro=null,this._fonts=null,this._onPointerDown=e=>this._startDrag(e),this._onKeyDown=e=>this._key(e),this._onClick=e=>this._click(e),this._onDblClick=e=>{let t=mn(e.target);t&&this.contains(t)&&this._reset(t.closest(`th`))},this._onScroll=()=>{this.hasAttribute(`virtual`)&&this._schedule()},this._onFonts=()=>{this._userSized||this._drag||this._frozenSig===null||!this.hasAttribute(`resizable`)||(this._frozenSig=null,this._schedule())}}connectedCallback(){this._widths=zt(this.getAttribute(`view-key`)),this.addEventListener(`pointerdown`,this._onPointerDown,!0),this.addEventListener(`keydown`,this._onKeyDown,!0),this.addEventListener(`click`,this._onClick,!0),this.addEventListener(`dblclick`,this._onDblClick),this.addEventListener(`scroll`,this._onScroll,{passive:!0}),this._fonts=this.ownerDocument.fonts??null,this._fonts?.addEventListener(`loadingdone`,this._onFonts),typeof MutationObserver<`u`&&(this._mo=new MutationObserver(e=>this._mutated(e)),this._mo.observe(this,{childList:!0,subtree:!0})),typeof ResizeObserver<`u`&&(this._ro=new ResizeObserver(()=>this._schedule()),this._ro.observe(this)),this._headDirty=!0,this._rowsDirty=!0,this._schedule()}disconnectedCallback(){this.removeEventListener(`pointerdown`,this._onPointerDown,!0),this.removeEventListener(`keydown`,this._onKeyDown,!0),this.removeEventListener(`click`,this._onClick,!0),this.removeEventListener(`dblclick`,this._onDblClick),this.removeEventListener(`scroll`,this._onScroll),this._fonts?.removeEventListener(`loadingdone`,this._onFonts),this._fonts=null,this._mo?.disconnect(),this._ro?.disconnect(),this._mo=null,this._ro=null,this._frame&&cancelAnimationFrame(this._frame),this._frame=0,this._drag=null}refresh(){this._headDirty=!0,this._rowsDirty=!0,this._run()}get _table(){let e=this.querySelector(`:scope > table`);return e instanceof HTMLTableElement?e:null}_headCells(e){let t=e.tHead?.rows[0];return t?[...t.cells]:[]}_schedule(){this._frame||=requestAnimationFrame(()=>{this._frame=0,this._run()})}_mutated(e){for(let t of e){let e=t.target instanceof Element?t.target:t.target.parentElement;e&&((e.closest(`thead`)||e===this._table||e===this)&&(this._headDirty=!0),(e.closest(`tbody, tfoot`)||e===this._table||e===this)&&(this._rowsDirty=!0))}this._schedule()}_run(){let e=this._table;if(!e)return;let t=this._headDirty,n=this._rowsDirty;this._headDirty=!1,this._rowsDirty=!1,n&&this.hasAttribute(`group-by`)&&this._group(e),this._pins(e,t||n),this.hasAttribute(`resizable`)&&(t&&this._handles(e),this._layout(e)),this.hasAttribute(`virtual`)&&this._virtual(e,t||n),this._mo?.takeRecords()}_pins(e,t){let n=this._headCells(e),r=n.map(e=>{let t=e.dataset.pin;return t===`start`||t===`end`?t:e.matches(dn)?`lead`:null});if(!r.some(e=>e===`start`||e===`end`))return;let i=Wt(r);i.forEach((e,t)=>{e&&this._ro?.observe(P(n[t]))});let a=e=>P(n[e]).getBoundingClientRect().width,o=0;i.forEach((t,n)=>{t?.side===`start`&&(this._setVar(e,Vt(`start`,t.ordinal),o),o+=a(n))}),o=0;for(let t=i.length-1;t>=0;t--){let n=i[t];n?.side===`end`&&(this._setVar(e,Vt(`end`,n.ordinal),o),o+=a(t))}if(t)for(let t of e.rows)t.matches(`${un}, .wui-row-expanded`)||t.cells.length!==n.length||i.forEach((e,n)=>{if(!e)return;let r=P(t.cells[n]);r.classList.contains(`wui-pin-${e.side}`)||r.classList.add(`wui-pin-${e.side}`),e.edge&&!r.classList.contains(`wui-pin-${e.side}-edge`)&&r.classList.add(`wui-pin-${e.side}-edge`);let i=Ut(e.side,e.ordinal);r.style.getPropertyValue(`--wui-pin-at`)!==i&&r.style.setProperty(Ht,i)})}_setVar(e,t,n){let r=`${Math.round(n*100)/100}px`;e.style.getPropertyValue(t)!==r&&e.style.setProperty(t,r)}_resizable(e){return e.map((t,n)=>n<e.length-1&&!t.matches(dn))}_handles(e){let t=this._headCells(e),n=this._resizable(t);t.forEach((e,t)=>{if(!n[t]||e.querySelector(ln))return;let r=e.ownerDocument.createElement(`span`);r.className=`wui-col-resize`,r.setAttribute(`role`,`separator`),r.setAttribute(`aria-orientation`,`vertical`),r.setAttribute(`aria-valuemin`,`48`),r.setAttribute(`aria-valuemax`,String(Ot)),r.setAttribute(`tabindex`,`0`);let i=(e.textContent??``).trim();r.setAttribute(`aria-label`,N.resize(i)),i&&!e.hasAttribute(`aria-label`)&&e.setAttribute(`aria-label`,i),e.classList.add(`wui-col-resizable`),e.appendChild(r)})}_hasRows(e){for(let t of e.tBodies)for(let e of t.rows)if(!e.matches(un)&&!hn(e))return!0;return!1}_signature(e){return e.map(e=>e.dataset.key||(e.textContent??``).trim()).join(``)}_layout(e){let t=this._headCells(e),n=this._signature(t);t.length&&n!==this._frozenSig&&(this._hasRows(e)?this._freeze(e,t,n):this._applyRemembered(t))}_applyRemembered(e){for(let t of e){let e=t.dataset.key&&this._widths[t.dataset.key];e&&(t.style.width=`${e}px`);let n=t.querySelector(ln);n&&this._handleValue(n,Ft(e||t.getBoundingClientRect().width))}}_freeze(e,t,n){e.style.tableLayout=``,e.style.width=``,e.removeAttribute(`data-wui-fixed`);for(let e of t)e.hasAttribute(`data-wui-width`)&&(e.style.width=``,e.removeAttribute(`data-wui-width`));this._natural=t.map(e=>e.getBoundingClientRect().width),t.forEach((e,n)=>{if(n===t.length-1||e.matches(dn))return;let r=e.dataset.key&&this._widths[e.dataset.key];this._setWidth(e,r||this._natural[n])}),e.style.tableLayout=`fixed`,e.setAttribute(`data-wui-fixed`,``),this._frozenSig=n,this._fitTable(e,t)}_setWidth(e,t){let n=Ft(t);e.style.width=`${n}px`,e.setAttribute(`data-wui-width`,``);let r=e.querySelector(ln);return r&&this._handleValue(r,n),n}_handleValue(e,t){e.setAttribute(`aria-valuenow`,String(t)),e.setAttribute(`aria-valuetext`,N.width(t))}_fitTable(e,t){let n=t.length-1,r=this._natural[n]||0;for(let e=0;e<n;e++)r+=Number.parseFloat(P(t[e]).style.width)||this._natural[e]||0;e.style.width=`max(100%, ${Math.round(r)}px)`}_ensureFrozen(e){let t=this._headCells(e),n=this._signature(t);return n!==this._frozenSig&&this._freeze(e,t,n),t}_resizeTo(e,t,n){let r=this._table;if(!r)return;let i=this._ensureFrozen(r);this._userSized=!0,this._setWidth(e,t),this._fitTable(r,i),n&&this._remember(e),this._pins(r,!1)}_remember(e){let t=e.dataset.key;t&&(this._widths={...this._widths,[t]:Number.parseFloat(e.style.width)},Bt(this.getAttribute(`view-key`),this._widths))}_reset(e){let t=this._table;if(!e||!t)return;let n=this._ensureFrozen(t);this._userSized=!0;let r=e.dataset.key;if(r&&r in this._widths){let{[r]:e,...t}=this._widths;this._widths=t,Bt(this.getAttribute(`view-key`),this._widths)}this._setWidth(e,this._natural[n.indexOf(e)]||0),this._fitTable(t,n),this._pins(t,!1)}_rtl(){return getComputedStyle(this).direction===`rtl`}_startDrag(e){let t=mn(e.target);if(!t||!this.contains(t)||e.button!==0)return;e.preventDefault(),e.stopPropagation();let n=t.closest(`th`),r=this._table;if(!n||!r)return;this._ensureFrozen(r);let i={th:n,x:e.clientX,from:n.getBoundingClientRect().width,dir:this._rtl()?-1:1,moved:!1};this._drag=i,t.setPointerCapture?.(e.pointerId),t.classList.add(`is-dragging`);let a=e=>{let t=(e.clientX-i.x)*i.dir;Math.abs(t)>1&&(i.moved=!0),this._resizeTo(n,i.from+t,!1)},o=e=>{t.removeEventListener(`pointermove`,a),t.removeEventListener(`pointerup`,o),t.removeEventListener(`pointercancel`,o),t.classList.remove(`is-dragging`),this._drag=null,e.type===`pointercancel`?this._resizeTo(n,i.from,!1):i.moved&&this._remember(n),this._swallowClick=!0,setTimeout(()=>{this._swallowClick=!1},0)};t.addEventListener(`pointermove`,a),t.addEventListener(`pointerup`,o),t.addEventListener(`pointercancel`,o)}_key(e){let t=mn(e.target);if(!t||!this.contains(t))return;let n=t.closest(`th`);if(e.key===`Enter`||e.key===` `){e.preventDefault(),e.stopPropagation();return}if(e.key===`Home`){e.preventDefault(),e.stopPropagation(),this._reset(n);return}if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault(),e.stopPropagation();let r=this._table;if(!r)return;this._ensureFrozen(r);let i=P(n),a=e.shiftKey?50:10,o=e.key===`ArrowRight`!==this._rtl(),s=Number.parseFloat(i.style.width)||i.getBoundingClientRect().width;this._resizeTo(i,s+(o?a:-a),!0)}_click(e){let t=e.target instanceof Element&&e.target.closest(ln)!==null;if(this._swallowClick||t){e.stopPropagation(),(t||this._swallowClick)&&e.preventDefault(),this._swallowClick=!1;return}if(!this.hasAttribute(`group-by`))return;let n=y(e.target,`.wui-group-toggle`)?.closest(`.wui-group-row`);if(!(n instanceof HTMLTableRowElement)||!this.contains(n))return;let r=n.dataset.groupKey;this._collapsed.has(r)?this._collapsed.delete(r):this._collapsed.add(r),this._showGroup(n,!this._collapsed.has(r));let i=this._table;i&&this.hasAttribute(`virtual`)&&(this._virtual(i,!0),this._mo?.takeRecords())}_group(e){let t=this.getAttribute(`group-by`),n=this._headCells(e),r=n.findIndex(e=>e.dataset.key===t);if(r<0)throw Error(`<wui-data-table group-by="${t}"> needs a header cell with data-key="${t}".`);let i=e.tBodies[0];if(!i)return;let a=[...i.rows].filter(e=>!e.matches(un));if(a.some(hn))return;let o=this.ownerDocument,s=new Map;for(let e of i.querySelectorAll(`:scope > tr.wui-group-row`))e instanceof HTMLTableRowElement&&s.set(e.dataset.groupKey,e);let c=It(a,e=>e.dataset.group??e.cells[r]?.textContent?.trim()??``,this._groupOrder);this._groupOrder=c.map(e=>e.key);let l=o.createDocumentFragment(),u=c.map(e=>{let t=s.get(e.key)??this._groupRow(o,e.key);return s.delete(e.key),pn(t.querySelector(`.wui-group-cell`),HTMLTableCellElement).colSpan=n.length,pn(t.querySelector(`.wui-group-count`),HTMLElement).textContent=Pt(e.items.length),pn(t.querySelector(`.wui-group-rows`),HTMLElement).textContent=`, ${N.rows(e.items.length)}`,l.append(t,...e.items),[t,e.key]});for(let e of s.values())e.remove();i.insertBefore(l,this._bottom?.parentNode===i?this._bottom:null);for(let[e,t]of u)this._showGroup(e,!this._collapsed.has(t))}_groupRow(e,t){let n=e.createElement(`tr`);n.className=`wui-group-row`,n.dataset.groupKey=t;let r=e.createElement(`th`);r.className=`wui-group-cell`,r.scope=`rowgroup`;let i=e.createElement(`button`);i.type=`button`,i.className=`wui-group-toggle`,i.innerHTML=fn;let a=e.createElement(`span`);a.className=`wui-group-label`,a.textContent=t;let o=e.createElement(`span`);o.className=`wui-group-count`,o.setAttribute(`aria-hidden`,`true`);let s=e.createElement(`span`);return s.className=`visually-hidden wui-group-rows`,i.append(a,o,s),r.append(i),n.append(r),n}_showGroup(e,t){if(e){e.querySelector(`.wui-group-toggle`)?.setAttribute(`aria-expanded`,String(t));for(let n=e.nextElementSibling;n&&!n.matches(un);n=n.nextElementSibling)n instanceof HTMLElement&&(n.hidden=!t)}}_spacer(e,t){if(t?.parentNode===e)return t;let n=e.ownerDocument,r=n.createElement(`tr`);return r.className=`wui-virtual-spacer`,r.setAttribute(`aria-hidden`,`true`),r.append(n.createElement(`td`)),r}_virtual(e,t){let n=e.tBodies[0];if(!n)return;if(t){this._top=this._spacer(n,this._top),this._bottom=this._spacer(n,this._bottom),n.firstElementChild!==this._top&&n.insertBefore(this._top,n.firstChild),n.lastElementChild!==this._bottom&&n.append(this._bottom);let t=Math.max(1,this._headCells(e).length);P(this._top.cells[0]).colSpan=t,P(this._bottom.cells[0]).colSpan=t,this._items=[...n.rows].filter(e=>!e.classList.contains(`wui-virtual-spacer`)&&!e.hidden),this._range=null,e.setAttribute(`aria-rowcount`,String(this._items.length+1)),e.tHead?.rows[0]?.setAttribute(`aria-rowindex`,`1`),this._items.forEach((e,t)=>{e.setAttribute(`aria-rowindex`,String(t+2))}),this._rowHeight>0||(this._rowHeight=this._measureRow(e))}let r=e.tHead?.getBoundingClientRect().height||0,i=Lt({scrollTop:this.scrollTop-r,viewport:this.clientHeight,rowHeight:this._rowHeight,count:this._items.length}),a=this._range;if(a&&a.start===i.start&&a.end===i.end)return;let o=a?Math.min(a.start,i.start):0,s=a?Math.max(a.end,i.end):this._items.length;for(let e=o;e<s;e++){let t=e<i.start||e>=i.end,n=P(this._items[e]);n.classList.contains(`wui-virtual-off`)!==t&&n.classList.toggle(`wui-virtual-off`,t)}this._range=i;let c=P(this._top),l=P(this._bottom);c.hidden=i.before===0,l.hidden=i.after===0,P(c.cells[0]).style.height=`${i.before}px`,P(l.cells[0]).style.height=`${i.after}px`}_measureRow(e){let t=this._items.find(e=>!e.classList.contains(`wui-group-row`)&&!e.classList.contains(`wui-virtual-off`))?.getBoundingClientRect().height??0;return t>0?t:e.classList.contains(`wui-table-compact`)?Nt.compact:e.classList.contains(`wui-table-cozy`)?Nt.cozy:Nt.comfortable}},_n=n({DISPLAY_FORMAT:()=>wn,MONTHS:()=>vn,WEEKDAYS:()=>yn,clampMonth:()=>Dn,daysIn:()=>En,firstWeekday:()=>xn,fmt:()=>Tn,pad:()=>Sn,parseIso:()=>F,toIso:()=>Cn}),vn=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],yn=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],bn=e=>{let t=String(e??``).trim();return/^[0-6]$/.test(t)?Number(t):null},xn=e=>bn(e.getAttribute(`first-day`))??bn(getComputedStyle(e).getPropertyValue(`--wui-first-day`))??1,Sn=e=>String(e).padStart(2,`0`),Cn=(e,t,n)=>`${e}-${Sn(t+1)}-${Sn(n)}`,F=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>En(a,o-1)?null:{y:a,m:o-1,d:s}},wn=`dd-MMM-yyyy`,Tn=(e,t=wn)=>{let n=F(e);if(!n)return``;let r=vn[n.m];if(r===void 0)throw Error(`month out of range`);let i={yyyy:n.y,MMMM:r,MMM:r.slice(0,3),MM:Sn(n.m+1),dd:Sn(n.d),d:n.d};return(t||`dd-MMM-yyyy`).replace(/yyyy|MMMM|MMM|MM|dd|d/g,e=>String(i[e]))},En=(e,t)=>{let n=new Date(0);return n.setFullYear(e,t+1,0),n.getDate()},Dn=(e,t)=>{for(;t<0;)t+=12,--e;for(;t>11;)t-=12,e+=1;return{y:e,m:t}},On=n({BUSY_CLASS:()=>kn,isInert:()=>I,isReadOnly:()=>An,syncFieldState:()=>jn}),kn=`wui-field-busy`,An=e=>e.hasAttribute(`readonly`),I=e=>e.hasAttribute(`disabled`)||e.hasAttribute(`readonly`)||e.hasAttribute(`loading`);function jn(e,t){let n=e.hasAttribute(`loading`);n?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`),t&&(t.classList.toggle(kn,n),An(e)?t.setAttribute(`aria-readonly`,`true`):t.removeAttribute(`aria-readonly`))}var Mn=n({syncFormMirror:()=>L,syncFormMirrors:()=>In}),Nn=`data-wui-mirror`;function Pn(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 Fn(e){let t=document.createElement(`input`);return t.type=`hidden`,t.setAttribute(Nn,``),e.appendChild(t),t}function L(e,t){let n=e.getAttribute(`name`)??``,r=e.querySelector(`:scope > input[${Nn}]`),i=r instanceof HTMLInputElement?r:null;n?(i||=Fn(e),Pn(e,i,n,t)):i?.remove()}function In(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)=>{Pn(e,r[i]??Fn(e),n,t)})}var Ln={add:`<path d="M6 12h12M12 18V6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"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><path d="M12 16.2v.1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"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><path d="M11.995 17h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"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"></path>`,"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"></path>`,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><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"></path>`,"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><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"></path>`,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><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"></path>`,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><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"></path>`,"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"></path>`,"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"></path>`,"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"></path>`,"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"></path>`,"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"></path>`,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><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"></path>`,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><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"></path>`,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><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"></path>`,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><path d="M15.996 11h.01M11.995 11h.01M7.995 11h.008" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,copy:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16 12.9v4.2c0 3.5-1.4 4.9-4.9 4.9H6.9C3.4 22 2 20.6 2 17.1v-4.2C2 9.4 3.4 8 6.9 8h4.2c3.5 0 4.9 1.4 4.9 4.9z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M22 6.9v4.2c0 3.5-1.4 4.9-4.9 4.9H16v-3.1C16 9.4 14.6 8 11.1 8H8V6.9C8 3.4 9.4 2 12.9 2h4.2C20.6 2 22 3.4 22 6.9z"></path>`,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><path d="M11.995 17h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,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"></path>`,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><path d="M22 10h-4c-3 0-4-1-4-4V2l8 8Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,download:`<path d="M9 11v6l2-2M9 17l-2-2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><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><path d="M22 10h-4c-3 0-4-1-4-4V2l8 8Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,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><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"></path>`,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"></path>`,"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><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"></path>`,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><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"></path>`,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"></path>`,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"></path>`,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><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"></path>`,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"></path>`,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><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"></path>`,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><path d="M11.995 16h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></g>`,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><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"></path>`,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"></path>`,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><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"></path>`,"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"></path>`,menu:`<path d="M3 7h18M3 12h18M3 17h18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>`,minus:`<path d="M6 12h12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,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"></path>`,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"></path>`,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><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><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"></path>`,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"></path>`,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"></path>`,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"></path>`,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"></path>`,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><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"></path>`,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"></path>`,"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"></path>`,"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"></path>`,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"></path>`,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"></path>`,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"></path>`,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"></path>`,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><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"></path>`,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><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><path d="m13.235 17.226 4-4" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,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"></path>`,"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"></path>`,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"></path>`,"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><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"></path>`,"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"></path>`,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"></path>`,"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"></path>`},Rn=n({devError:()=>R,devWarn:()=>zn});function zn(e,...t){console.warn(e,...t)}function R(e,...t){console.error(e,...t)}var Bn=Object.freeze({carousel:{entries:[`elements/carousel.ts`],tags:[`wui-carousel`]},"code-block":{entries:[`elements/code-block.ts`],tags:[`wui-code-block`]},"command-palette":{entries:[`elements/command-palette.ts`],tags:[`wui-command-palette`]},"comment-thread":{entries:[`elements/comment-thread.ts`],tags:[`wui-mention-input`,`wui-comment-thread`]},"consent-banner":{entries:[`elements/consent-banner.ts`],tags:[`wui-consent-banner`]},"context-menu":{entries:[`elements/context-menu.ts`],tags:[`wui-context-menu`]},"date-range":{entries:[`elements/date-range.ts`],tags:[`wui-date-range`]},drawer:{entries:[`elements/drawer.ts`],tags:[`wui-drawer`]},"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`]},resizable:{entries:[`elements/resizable.ts`],tags:[`wui-resizable`]},"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:[]},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`]},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`,buttonClass:`buttonClass.ts`,calendarMath:`calendarMath.ts`,copyText:`copyText.ts`,dataTable:`dataTable.ts`,defineElement:`defineElement.ts`,devWarn:`devWarn.ts`,elementBase:`elementBase.ts`,fieldState:`fieldState.ts`,formatters:`formatters.ts`,formMirror:`formMirror.ts`,glyphs:`global/glyphs.ts`,iconGlyphs:`iconGlyphs.g.ts`,listboxKeyNav:`listboxKeyNav.ts`,loader:`global/loader.ts`,mentionText:`mentionText.ts`,notificationDays:`notificationDays.ts`,optionLabel:`optionLabel.ts`,partRegistry:`select/partRegistry.ts`,selectList:`select/list.ts`,selectRemote:`select/remote.ts`,stepperHeader:`stepperHeader.ts`,tableSelect:`tableSelect.ts`,textMatch:`textMatch.ts`,wuiHttp:`server/wuiHttp.ts`,WuiSelect:`WuiSelect.ts`,zone:`zone.ts`});var Vn=`ui-elements/`;function Hn(e){let t=Bn[e];if(t===void 0)throw Error(`[webority-ui] No on-demand element chunk is named ${e}.`);return t}function Un(e){let t=Hn(e);if(!t.selfContained)return`${Vn+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 Wn=n({CHUNK_DIR:()=>Vn,CHUNK_RETRY_MS:()=>qn,ELEMENTS_DEFINED_EVENT:()=>Gn,ELEMENTS_LOAD_ERROR_EVENT:()=>Kn,assetUrl:()=>or,loadChunk:()=>sr,startElementLoader:()=>rr,stopElementLoader:()=>ir,whenElementsReady:()=>ar}),Gn=`wui-elements:defined`,Kn=`wui-elements:load-error`,qn=1e3,Jn={"ui-elements/carousel.global.js":`15bd67a77be1`,"ui-elements/code-block.global.js":`06a0c0518fe7`,"ui-elements/command-palette.global.js":`b7140c45f796`,"ui-elements/comment-thread.global.js":`f0093c916310`,"ui-elements/consent-banner.global.js":`42e633af993e`,"ui-elements/context-menu.global.js":`4fa44636127c`,"ui-elements/date-range.global.js":`881c3eba336e`,"ui-elements/drawer.global.js":`da36fdbb7452`,"ui-elements/image-crop.global.js":`f74cd158ecfa`,"ui-elements/inline-edit.global.js":`350b162beb17`,"ui-elements/kanban.global.js":`80dd03264c91`,"ui-elements/lead-popup.global.js":`baa9b833331e`,"ui-elements/lightbox.global.js":`1f6f341bcf27`,"ui-elements/org-tree.global.js":`690032fe2267`,"ui-elements/markdown.global.js":`8543340f1ff1`,"ui-elements/phone.global.js":`517629efb0f6`,"ui-elements/resizable.global.js":`8f9b5b09e858`,"ui-elements/saved-views.global.js":`c7ed97f37bdf`,"ui-elements/glyphs.global.js":`8c178c4e2114`,"ui-elements/select-chips.global.js":`7a6fe9ccc846`,"ui-elements/select-recents.global.js":`52658fffde5f`,"ui-elements/select-search.global.js":`76bb8ce7d993`,"ui-elements/slider.global.js":`f84ea64ead58`,"ui-elements/sortable.global.js":`07068489303d`,"ui-elements/status-icon.global.js":`a8b9aa3a3a37`,"ui-elements/timepicker.global.js":`84a1267fbf4d`,"ui-elements/tour.global.js":`c5d5859143bd`,"ui-elements/tree.global.js":`bf97837d27d8`,"ui-elements/wizard.global.js":`bb3a61beecf1`,"ui-chart.global.js":`eee755c64612`,"ui-calendar.global.js":`a2b2fca6b5a2`,"ui-rich-text.global.js":`5ca9a3b2eaec`,"ui-file-viewer.global.js":`91d1519f4273`,"ui-phone.global.js":`c646775bc1d1`},Yn=new Map;for(let[e,t]of Object.entries(Bn))for(let n of t.tags)Yn.set(n,e);var Xn=[...Yn.keys()].join(`,`),Zn=null,Qn=``,$n=!1,er=null,tr=new Map;function nr(){let e=document.currentScript;return e instanceof HTMLScriptElement?e:null}function rr(e=nr()){$n||($n=!0,Zn=e?.src?e.src:null,Qn=e?.nonce||``,dr(document),er=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&dr(e)}),er.observe(document.documentElement,{childList:!0,subtree:!0}))}function ir(){er?.disconnect(),er=null,$n=!1,Zn=null,Qn=``,tr.clear()}function ar(e=document){return Promise.all([...ur(e)].map(e=>sr(e))).then(()=>void 0)}function or(e){if(Zn===null)throw Error(`The on-demand element files have no address to load from.`);let t=new URL(e,Zn);return t.search=Object.hasOwn(Jn,e)?`?v=${Jn[e]}`:``,t.href}function sr(e){let t=tr.get(e);if(t?.promise)return t.promise;let n=Hn(e),{tags:r}=n,i=Un(e),a=()=>Promise.all(r.map(e=>customElements.whenDefined(e))),o={status:`loading`,promise:null},s=new Promise((t,s)=>{let c=``,l=()=>{er&&Object.keys(Bn).every(e=>tr.get(e)?.status===`loaded`||tr.get(e)?.status===`failed`)&&er.disconnect()},u=()=>{o.status=`loaded`,l(),document.dispatchEvent(new CustomEvent(Gn,{detail:{chunk:e,tags:r}})),t()},d=t=>{o.status=`failed`,l(),R(`[webority-ui] Could not load ${c} for ${r.length?r.join(`, `):e}.${t?` ${t.message}`:``}`),document.dispatchEvent(new CustomEvent(Kn,{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,Qn&&(i.nonce=Qn),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),qn)}),document.head.append(i)};if([...document.scripts].some(e=>new URL(e.src,location.href).pathname.endsWith(`/${i}`)))a().then(u);else{try{c=or(i)}catch(e){d(e instanceof Error?e:void 0);return}f(c,!1)}});return o.promise=s,tr.set(e,o),s}function cr(e){return Yn.has(e.localName)&&!customElements.get(e.localName)}function lr(e,t){let n=Yn.get(t.localName);n!==void 0&&cr(t)&&e.add(n)}function ur(e){let t=new Set;e instanceof Element&&lr(t,e);for(let n of e.querySelectorAll(Xn))lr(t,n);return t}function dr(e){for(let t of ur(e))Promise.allSettled([sr(t)])}var fr=n({GLYPH_CHUNK:()=>pr,GLYPH_PENDING_ATTRIBUTE:()=>mr,glyphSvg:()=>z,registerGlyphs:()=>Sr}),pr=`glyphs`,mr=`data-wui-glyph-pending`,hr=`svg[${mr}]`,gr=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,_r={...Ln},vr=!1,yr=null;function br(e,t,n,r,i){return`<svg class="${n?`wui-icon ${n}`:`wui-icon`}" data-icon="${e}"${i?` ${mr}`:``} width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" aria-hidden="true">${r}</svg>`}function z(e,{size:t=16,className:n=``}={}){let r=_r[e];return r===void 0?vr||!gr.test(e)?``:(Promise.allSettled([sr(pr)]),br(e,t,n,``,!0)):br(e,t,n,r,!1)}function xr(e){let t=e instanceof Element&&e.matches(hr)?[e]:[];for(let n of[...t,...e.querySelectorAll(hr)]){let e=_r[n.getAttribute(`data-icon`)??``];e===void 0?n.remove():(n.removeAttribute(mr),n.innerHTML=e)}}function Sr(e){Object.assign(_r,e),vr=!0,xr(document),yr===null&&(yr=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&xr(e)}),yr.observe(document.documentElement,{childList:!0,subtree:!0}))}var Cr=n({TRUSTED_HTML:()=>wr,escapeHtml:()=>B,optionLabelHtml:()=>kr,optionText:()=>Mr,stripTags:()=>Ar,withTrustedLabel:()=>Tr}),wr=Symbol(`wui.trustedHtml`),Tr=e=>({...e,[wr]:!0}),B=e=>String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`),Er=e=>{if(!e)return``;let t=String(e).toLowerCase().replace(/[^a-z0-9-]/g,``);return t?z(t):``},Dr=e=>`wui-flag wui-flag-${e}`,Or=e=>{let t=String(e??``).toLowerCase();return/^[a-z]{2}$/.test(t)?`<span class="${Dr(t)}" aria-hidden="true"></span>`:``},kr=e=>{if(e==null)return``;let t=e[wr]?String(e.label??``):B(e.label),n=Or(e.flag)+Er(e.icon);return n?`<span class="wui-opt-label">${n}${t}</span>`:t},Ar=e=>String(e??``).replace(/<[^>]*>/g,``),jr=new WeakMap,Mr=e=>{if(e==null)return``;if(!e[wr])return Ar(e.label);let t=jr.get(e);if(t&&t.label===e.label)return t.text;let n=document.createElement(`template`);n.innerHTML=String(e.label??``);let r=n.content.textContent??``;return jr.set(e,{label:e.label,text:r}),r},Nr=class extends g{static formAssociated=!0;static get observedAttributes(){return[`value`,`min`,`max`,`placeholder`,`disabled`,`readonly`,`loading`,`first-day`,`disabled-weekdays`,`display-format`,`size`,`aria-label`,`aria-describedby`,`aria-invalid`]}_internals;_value;_defaultValue;_rendered;_viewY;_viewM;_mode;_focus;_slide;_viewNavigated;_openFn;_closeFn;_bindGlobal;_onKeyBound;_onDocClick;_onDocKey;_onHostKey;get _open(){return _(this._openFn,`open missing`)}get _close(){return _(this._closeFn,`close missing`)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=``;let e=new Date(2e3,0,1);this._viewY=e.getFullYear(),this._viewM=e.getMonth(),this._mode=`days`,this._focus=null,this._slide=``}connectedCallback(){this._rendered?this._bindGlobal?.():this.render()}attributeChangedCallback(e,t,n){if(e===`aria-invalid`)this._syncInvalid();else if(this._rendered){if(e===`value`)this._value=n||``,this._syncFormValue(),this._syncTrigger();else if(e===`display-format`)this._syncTrigger();else if(e===`first-day`){let e=this.querySelector(`.datepicker-pop`);e instanceof HTMLDivElement&&e.hidden||this._renderView()}else this.render()}}_syncInvalid(){let e=this.querySelector(`.datepicker-trigger`);e instanceof HTMLButtonElement&&(this.hasAttribute(`aria-invalid`)?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}formResetCallback(){this.value=this._defaultValue||``}get value(){return this._value}set value(e){this._value=e||``,L(this,this._value),this._syncTrigger()}_firstDay(){return xn(this)}render(){this._defaultValue===void 0&&(this._defaultValue=this.getAttribute(`value`)||``,this._value=this._defaultValue||this._value);let e=this.getAttribute(`placeholder`)||`Choose a date`,t=F(this._value);t&&(this._viewY=t.y,this._viewM=t.m);let n=this.getAttribute(`size`),r=n===`sm`?` input-sm`:n===`lg`?` input-lg`:``,i=this.getAttribute(`aria-label`),a=this.getAttribute(`aria-describedby`);this.innerHTML=`
2
2
  <div class="datepicker">
3
3
  <button type="button" class="input datepicker-trigger${r}${t?` has-value`:``}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute(`aria-invalid`)?` aria-invalid="true"`:``}${this.hasAttribute(`disabled`)?` disabled`:``}${i?` aria-label="${B(i)}"`:``}${a?` aria-describedby="${B(a)}"`:``}>
4
- <span data-trigger-label class="${t?``:`wui-select-placeholder`}">${B(t?Sn(this._value,this.getAttribute(`display-format`)):e)}</span>
4
+ <span data-trigger-label class="${t?``:`wui-select-placeholder`}">${B(t?Tn(this._value,this.getAttribute(`display-format`)):e)}</span>
5
5
  ${z(`calendar-dots`)}
6
6
  </button>
7
7
  <div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
8
- </div>`,this._rendered=!0,On(this,this.querySelector(`.datepicker-trigger`)),L(this,this._value),this._wire()}_syncFormValue(){L(this,this._value)}_syncTrigger(){let e=this.querySelector(`.datepicker-trigger`),t=this.querySelector(`[data-trigger-label]`);if(!(t instanceof HTMLSpanElement))return;let n=F(this._value);t.textContent=n?Sn(this._value,this.getAttribute(`display-format`)):this.getAttribute(`placeholder`)||`Choose a date`,t.classList.toggle(`wui-select-placeholder`,!n),e?.classList.toggle(`has-value`,!!n),On(this,e)}_limits(){let e=F(this.getAttribute(`min`)),t=F(this.getAttribute(`max`)),n=e?new Date(e.y,e.m,e.d).getTime():-1/0,r=t?new Date(t.y,t.m,t.d).getTime():1/0,i=new Set;for(let e of(this.getAttribute(`disabled-weekdays`)||``).split(`,`)){let t=e.trim();/^[0-6]$/.test(t)&&i.add(Number(t))}return{dayDisabled:(e,t,a)=>{let o=new Date(e,t,a),s=o.getTime();return s<n||s>r||i.has(o.getDay())},monthDisabled:(e,t)=>{let i=new Date(e,t,1).getTime();return new Date(e,t,Cn(e,t)).getTime()<n||i>r},yearDisabled:e=>{let t=new Date(e,0,1).getTime();return new Date(e,11,31).getTime()<n||t>r}}}_renderView(){let e=this.querySelector(`.datepicker-pop`);e instanceof HTMLDivElement&&(e.innerHTML=this._mode===`months`?this._monthsHtml():this._mode===`years`?this._yearsHtml():this._daysHtml(),this._focusActive())}_daysHtml(){let e=this._firstDay(),t=(new Date(this._viewY,this._viewM,1).getDay()-e+7)%7,n=Cn(this._viewY,this._viewM),r=F(this._value),i=new Date,{dayDisabled:a}=this._limits(),o=this._focus||r||{y:this._viewY,m:this._viewM,d:1},s=(e,t,n,s)=>{let c=bn(e,t,n),l=r&&r.y===e&&r.m===t&&r.d===n,u=i.getFullYear()===e&&i.getMonth()===t&&i.getDate()===n,d=o.y===e&&o.m===t&&o.d===n,f=a(e,t,n);return`<button type="button" class="${[`datepicker-day`,s?`is-outside`:``,u?`is-today`:``,l?`is-selected`:``].filter(Boolean).join(` `)}" data-iso="${c}" role="gridcell" tabindex="${d&&!f?`0`:`-1`}"${l?` aria-selected="true"`:``}${f?` disabled aria-disabled="true"`:``}>${n}</button>`},c=``,l=wn(this._viewY,this._viewM-1),u=Cn(l.y,l.m);for(let e=t-1;e>=0;e--)c+=s(l.y,l.m,u-e,!0);for(let e=1;e<=n;e++)c+=s(this._viewY,this._viewM,e,!1);let d=wn(this._viewY,this._viewM+1),f=(7-(t+n)%7)%7;for(let e=1;e<=f;e++)c+=s(d.y,d.m,e,!0);let p=a(i.getFullYear(),i.getMonth(),i.getDate()),m=I(this)?``:`<button type="button" class="datepicker-link" data-clear>Clear</button>`,h=gn.map((t,n)=>gn[(n+e)%7]).map(e=>`<span>${e}</span>`).join(``);return`
8
+ </div>`,this._rendered=!0,jn(this,this.querySelector(`.datepicker-trigger`)),L(this,this._value),this._wire()}_syncFormValue(){L(this,this._value)}_syncTrigger(){let e=this.querySelector(`.datepicker-trigger`),t=this.querySelector(`[data-trigger-label]`);if(!(t instanceof HTMLSpanElement))return;let n=F(this._value);t.textContent=n?Tn(this._value,this.getAttribute(`display-format`)):this.getAttribute(`placeholder`)||`Choose a date`,t.classList.toggle(`wui-select-placeholder`,!n),e?.classList.toggle(`has-value`,!!n),jn(this,e)}_limits(){let e=F(this.getAttribute(`min`)),t=F(this.getAttribute(`max`)),n=e?new Date(e.y,e.m,e.d).getTime():-1/0,r=t?new Date(t.y,t.m,t.d).getTime():1/0,i=new Set;for(let e of(this.getAttribute(`disabled-weekdays`)||``).split(`,`)){let t=e.trim();/^[0-6]$/.test(t)&&i.add(Number(t))}return{dayDisabled:(e,t,a)=>{let o=new Date(e,t,a),s=o.getTime();return s<n||s>r||i.has(o.getDay())},monthDisabled:(e,t)=>{let i=new Date(e,t,1).getTime();return new Date(e,t,En(e,t)).getTime()<n||i>r},yearDisabled:e=>{let t=new Date(e,0,1).getTime();return new Date(e,11,31).getTime()<n||t>r}}}_renderView(){let e=this.querySelector(`.datepicker-pop`);e instanceof HTMLDivElement&&(e.innerHTML=this._mode===`months`?this._monthsHtml():this._mode===`years`?this._yearsHtml():this._daysHtml(),this._focusActive())}_daysHtml(){let e=this._firstDay(),t=(new Date(this._viewY,this._viewM,1).getDay()-e+7)%7,n=En(this._viewY,this._viewM),r=F(this._value),i=new Date,{dayDisabled:a}=this._limits(),o=this._focus||r||{y:this._viewY,m:this._viewM,d:1},s=(e,t,n,s)=>{let c=Cn(e,t,n),l=r&&r.y===e&&r.m===t&&r.d===n,u=i.getFullYear()===e&&i.getMonth()===t&&i.getDate()===n,d=o.y===e&&o.m===t&&o.d===n,f=a(e,t,n);return`<button type="button" class="${[`datepicker-day`,s?`is-outside`:``,u?`is-today`:``,l?`is-selected`:``].filter(Boolean).join(` `)}" data-iso="${c}" role="gridcell" tabindex="${d&&!f?`0`:`-1`}"${l?` aria-selected="true"`:``}${f?` disabled aria-disabled="true"`:``}>${n}</button>`},c=``,l=Dn(this._viewY,this._viewM-1),u=En(l.y,l.m);for(let e=t-1;e>=0;e--)c+=s(l.y,l.m,u-e,!0);for(let e=1;e<=n;e++)c+=s(this._viewY,this._viewM,e,!1);let d=Dn(this._viewY,this._viewM+1),f=(7-(t+n)%7)%7;for(let e=1;e<=f;e++)c+=s(d.y,d.m,e,!0);let p=a(i.getFullYear(),i.getMonth(),i.getDate()),m=I(this)?``:`<button type="button" class="datepicker-link" data-clear>Clear</button>`,h=yn.map((t,n)=>yn[(n+e)%7]).map(e=>`<span>${e}</span>`).join(``);return`
9
9
  <div class="datepicker-head">
10
10
  <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${z(`chevron-left`)}</button>
11
- <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${hn[this._viewM]} ${this._viewY}</button>
11
+ <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${vn[this._viewM]} ${this._viewY}</button>
12
12
  <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${z(`chevron-right`)}</button>
13
13
  </div>
14
14
  <div class="datepicker-weekdays">${h}</div>
@@ -16,7 +16,7 @@ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{
16
16
  <div class="datepicker-foot">
17
17
  <button type="button" class="datepicker-link" data-today${p?` disabled`:``}>Today</button>
18
18
  ${m}
19
- </div>`}_monthsHtml(){let e=F(this._value),t=new Date,{monthDisabled:n}=this._limits(),r=``;for(let i=0;i<12;i++){let a=e&&e.y===this._viewY&&e.m===i,o=t.getFullYear()===this._viewY&&t.getMonth()===i,s=n(this._viewY,i),c=[`datepicker-cell`,o?`is-today`:``,a?`is-selected`:``].filter(Boolean).join(` `),l=hn[i];if(l===void 0)throw Error(`month name missing`);r+=`<button type="button" class="${c}" data-month="${i}"${s?` disabled`:``}>${l.slice(0,3)}</button>`}return`
19
+ </div>`}_monthsHtml(){let e=F(this._value),t=new Date,{monthDisabled:n}=this._limits(),r=``;for(let i=0;i<12;i++){let a=e&&e.y===this._viewY&&e.m===i,o=t.getFullYear()===this._viewY&&t.getMonth()===i,s=n(this._viewY,i),c=[`datepicker-cell`,o?`is-today`:``,a?`is-selected`:``].filter(Boolean).join(` `),l=vn[i];if(l===void 0)throw Error(`month name missing`);r+=`<button type="button" class="${c}" data-month="${i}"${s?` disabled`:``}>${l.slice(0,3)}</button>`}return`
20
20
  <div class="datepicker-head">
21
21
  <button type="button" class="datepicker-nav-btn" data-nav-year="-1" aria-label="Previous year">${z(`chevron-left`)}</button>
22
22
  <button type="button" class="datepicker-month" data-view="years" aria-label="Choose year">${this._viewY}</button>
@@ -28,7 +28,7 @@ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{
28
28
  <span class="datepicker-month">${r+1} to ${r+10}</span>
29
29
  <button type="button" class="datepicker-nav-btn" data-nav-decade="1" aria-label="Next decade">${z(`chevron-right`)}</button>
30
30
  </div>
31
- <div class="datepicker-cells">${i}</div>`}_focusActive(){let e=this.querySelector(`.datepicker-pop`);if(!(e instanceof HTMLDivElement))return;let t=e.querySelector(`[tabindex="0"]`)||e.querySelector(`.is-selected`)||e.querySelector(`.datepicker-day:not(:disabled), .datepicker-cell:not(:disabled)`);t instanceof HTMLElement&&e.contains(document.activeElement)&&t.focus()}_position(e,t){d(e,t,{clampHeight:!0})}_setFocus(e,t,n,r){let{y:i,m:a}=wn(e,t);this._focus={y:i,m:a,d:n};let o=i!==this._viewY||a!==this._viewM;this._viewY=i,this._viewM=a,this._slide=o&&r||``,this._renderView(),this._slide=``;let s=this.querySelector(`.datepicker-day[data-iso="${bn(i,a,n)}"]`);s instanceof HTMLButtonElement&&s.focus()}_seek(e,t,n,r){let{dayDisabled:i}=this._limits(),a=new Date(e,t,n);for(let e=0;e<400;e++,a.setDate(a.getDate()+r))if(!i(a.getFullYear(),a.getMonth(),a.getDate()))return new Date(a);return null}_onKey(e){if(this._mode!==`days`)return;let t=this._focus||F(this._value)||{y:this._viewY,m:this._viewM,d:1},n=(e,t,n,r,i)=>{let a=this._seek(e,t,n,r);a&&this._setFocus(a.getFullYear(),a.getMonth(),a.getDate(),i)},r=(r,i,a=r<0?-1:1)=>{e.preventDefault(),n(t.y,t.m,t.d+r,a,i)};switch(e.key){case`ArrowLeft`:r(-1,`slide-prev`);break;case`ArrowRight`:r(1,`slide-next`);break;case`ArrowUp`:r(-7,`slide-prev`);break;case`ArrowDown`:r(7,`slide-next`);break;case`Home`:r(-((new Date(t.y,t.m,t.d).getDay()-this._firstDay()+7)%7),`slide-prev`,1);break;case`End`:r(6-(new Date(t.y,t.m,t.d).getDay()-this._firstDay()+7)%7,`slide-next`,-1);break;case`PageUp`:{e.preventDefault();let r=wn(t.y,t.m-(e.shiftKey?12:1));n(r.y,r.m,Math.min(t.d,Cn(r.y,r.m)),-1,`slide-prev`);break}case`PageDown`:{e.preventDefault();let r=wn(t.y,t.m+(e.shiftKey?12:1));n(r.y,r.m,Math.min(t.d,Cn(r.y,r.m)),1,`slide-next`);break}case`Enter`:case` `:e.preventDefault(),this._limits().dayDisabled(t.y,t.m,t.d)||(this.value=bn(t.y,t.m,t.d),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close());return}}_wire(){this._teardown();let e=this.querySelector(`.datepicker-trigger`),t=this.querySelector(`.datepicker-pop`),n=this.querySelector(`.datepicker`);if(!(e instanceof HTMLButtonElement)||!(t instanceof HTMLDivElement))return;let r=()=>!t.hidden,i=()=>{r()&&this._position(e,t)};this._openFn=()=>{if(I(this))return;let r=new Date,a=F(this._value);(a||!this._viewNavigated)&&(this._viewY=r.getFullYear(),this._viewM=r.getMonth()),this._mode=`days`;let o=r.getFullYear()===this._viewY&&r.getMonth()===this._viewM,s=a&&a.y===this._viewY&&a.m===this._viewM;if(this._focus=s?a:{y:this._viewY,m:this._viewM,d:o?r.getDate():1},this._limits().dayDisabled(this._focus.y,this._focus.m,this._focus.d)){let e=this._focus,t=[1,-1].map(t=>this._seek(e.y,e.m,e.d,t)).find(t=>t&&t.getMonth()===e.m);t&&(this._focus={y:t.getFullYear(),m:t.getMonth(),d:t.getDate()})}this._renderView(),t.hidden=!1,n?.classList.add(`open`),this._position(e,t),f(this,i),e.setAttribute(`aria-expanded`,`true`);let c=t.querySelector(`[tabindex="0"]`);c instanceof HTMLElement&&c.focus()},this._closeFn=()=>{t.hidden=!0,n?.classList.remove(`open`),e.setAttribute(`aria-expanded`,`false`),p(this),e.focus()},e.addEventListener(`click`,()=>r()?this._close():this._open()),t.addEventListener(`click`,e=>{let t=e.target;if(!(t instanceof Element))throw Error(`click target is not an element`);let n=t.closest(`[data-nav]`);if(n instanceof HTMLElement){this._viewNavigated=!0,this._slide=Number(n.dataset.nav)<0?`slide-prev`:`slide-next`;let e=wn(this._viewY,this._viewM+Number(n.dataset.nav));this._viewY=e.y,this._viewM=e.m,this._focus={y:e.y,m:e.m,d:1},this._renderView(),this._slide=``;return}let r=t.closest(`[data-nav-year]`);if(r instanceof HTMLElement){this._viewY+=Number(r.dataset.navYear),this._renderView();return}let i=t.closest(`[data-nav-decade]`);if(i instanceof HTMLElement){this._viewY+=Number(i.dataset.navDecade)*10,this._renderView();return}let a=t.closest(`[data-view]`);if(a instanceof HTMLElement){this._mode=a.dataset.view,this._renderView();return}let o=t.closest(`[data-month]`);if(o instanceof HTMLButtonElement&&!o.disabled){this._viewNavigated=!0,this._viewM=Number(o.dataset.month),this._mode=`days`,this._focus={y:this._viewY,m:this._viewM,d:1},this._renderView();return}let s=t.closest(`[data-year]`);if(s instanceof HTMLButtonElement&&!s.disabled){this._viewNavigated=!0,this._viewY=Number(s.dataset.year),this._mode=`months`,this._renderView();return}if(t.closest(`[data-today]`)){let e=new Date;if(this._limits().dayDisabled(e.getFullYear(),e.getMonth(),e.getDate()))return;this.value=bn(e.getFullYear(),e.getMonth(),e.getDate()),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close();return}if(t.closest(`[data-clear]`)){this.value=``,this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close();return}let c=t.closest(`.datepicker-day[data-iso]`);c instanceof HTMLButtonElement&&!c.disabled&&(this.value=c.dataset.iso,this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close())}),this._onKeyBound=e=>{r()&&this._onKey(e)},t.addEventListener(`keydown`,this._onKeyBound),this._bindGlobal=()=>{this._teardown(),this._onDocClick=e=>{r()&&!e.composedPath().includes(this)&&this._close()},document.addEventListener(`click`,this._onDocClick),this._onDocKey=e=>{r()&&e.key===`Escape`&&this._close()},document.addEventListener(`keydown`,this._onDocKey),this._onHostKey=e=>{r()&&e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),this._close())},this.addEventListener(`keydown`,this._onHostKey),r()&&f(this,i)},this._bindGlobal(),this._syncFormValue()}_teardown(){this._onDocClick&&=(document.removeEventListener(`click`,this._onDocClick),null),this._onDocKey&&=(document.removeEventListener(`keydown`,this._onDocKey),null),this._onHostKey&&=(this.removeEventListener(`keydown`,this._onHostKey),null),p(this)}disconnectedCallback(){this._teardown()}},jr=class extends g{_pointerMoveListener;_pointerLeaveListener;_frame;_pointerX;static get observedAttributes(){return[`static`,`max-scale`,`radius`]}constructor(){super(),this._pointerMoveListener=null,this._pointerLeaveListener=null,this._frame=0,this._pointerX=0}connectedCallback(){this._wire()}disconnectedCallback(){this._teardown()}attributeChangedCallback(e,t,n){e===`static`&&this.isConnected&&this._wire()}_maxScale(){return Nr(this.getAttribute(`max-scale`),1.6)}_radius(){return Nr(this.getAttribute(`radius`),100)}_magnifyEnabled(){return!(this.hasAttribute(`static`)||typeof matchMedia==`function`&&(matchMedia(`(pointer: coarse)`).matches||matchMedia(`(prefers-reduced-motion: reduce)`).matches))}_applyMagnification(){this._frame=0;let e=this._maxScale(),t=this._radius();for(let n of this.querySelectorAll(`.dock-item`)){let r=Mr(n),i=r.getBoundingClientRect(),a=Math.abs(this._pointerX-(i.left+i.width/2)),o=Math.max(0,1-a/t),s=1+(e-1)*o;r.style.setProperty(`--wui-dock-mag`,s.toFixed(3))}}_resetMagnification(){this._frame&&=(cancelAnimationFrame(this._frame),0);for(let e of this.querySelectorAll(`.dock-item`))Mr(e).style.removeProperty(`--wui-dock-mag`)}_wire(){this._teardown(),this._magnifyEnabled()&&(this._pointerMoveListener=e=>{this._pointerX=e.clientX,this._frame||=requestAnimationFrame(()=>this._applyMagnification())},this._pointerLeaveListener=()=>this._resetMagnification(),this.addEventListener(`pointermove`,this._pointerMoveListener),this.addEventListener(`pointerleave`,this._pointerLeaveListener))}_teardown(){this._pointerMoveListener&&=(this.removeEventListener(`pointermove`,this._pointerMoveListener),null),this._pointerLeaveListener&&=(this.removeEventListener(`pointerleave`,this._pointerLeaveListener),null),this._resetMagnification()}},Mr=e=>v(e,HTMLElement,`wui-dock item must be an HTML element`),Nr=(e,t)=>{let n=Number.parseFloat(e??``);return Number.isFinite(n)?n:t},Pr=300,Fr=150,Ir=`.wui-hover-card-trigger`,Lr=`.wui-hover-card-panel`,Rr=`a[href],button,input,select,textarea,[tabindex]`,zr=0;function Br(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}var Vr=class extends g{_doc;_timer;_described;_refocusing;_onOver;_onOut;_onFocusIn;_onFocusOut;_onKeyDown;static get observedAttributes(){return[`open`]}constructor(){super(),this._doc=null,this._timer=null,this._described=null,this._refocusing=!1,this._onOver=e=>{if(e.pointerType===`touch`||e.pointerType===`pen`)return;let t=this._zone(e.target);t===`panel`?this._clear():t===`trigger`&&this._schedule(!0)},this._onOut=e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`&&this._zone(e.target)&&!this._zone(e.relatedTarget)&&this._schedule(!1)},this._onFocusIn=e=>{this._refocusing||(this._zone(e.target)===`trigger`?this._schedule(!0):this._zone(e.target)===`panel`&&this._clear())},this._onFocusOut=e=>{this._zone(e.target)&&!this._zone(e.relatedTarget)&&this._schedule(!1)},this._onKeyDown=e=>{if(e.key!==`Escape`||!this.isOpen||this.hasAttribute(`open`))return;e.stopPropagation();let t=this._panel?.contains(this.ownerDocument.activeElement);this._clear(),this._setOpen(!1),t&&(this._refocusing=!0,this._anchor?.focus(),this._refocusing=!1)}}get isOpen(){return this._panel?.hasAttribute(`data-open`)??!1}connectedCallback(){this._doc=this.ownerDocument,this.addEventListener(`pointerover`,this._onOver),this.addEventListener(`pointerout`,this._onOut),this.addEventListener(`focusin`,this._onFocusIn),this.addEventListener(`focusout`,this._onFocusOut),this._syncOpen()}attributeChangedCallback(){this.isConnected&&this._syncOpen()}disconnectedCallback(){this._clear(),this.removeEventListener(`pointerover`,this._onOver),this.removeEventListener(`pointerout`,this._onOut),this.removeEventListener(`focusin`,this._onFocusIn),this.removeEventListener(`focusout`,this._onFocusOut),this._doc?.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`keydown`,this._onKeyDown),p(this),this._doc=null}get _trigger(){return Br(this,Ir)}get _panel(){return Br(this,Lr)}get _anchor(){let e=this._trigger;return e?Br(e,Rr)??e:null}_zone(e){if(!(e instanceof Node)||!this.contains(e))return null;let t=e instanceof Element?e:e.parentElement;return this._panel?.contains(t)?`panel`:this._trigger?.contains(t)?`trigger`:null}_delay(e,t){let n=Number(this.getAttribute(e));return this.hasAttribute(e)&&Number.isFinite(n)&&n>=0?n:t}_clear(){this._timer!==null&&clearTimeout(this._timer),this._timer=null}_syncOpen(){this._clear(),this._setOpen(this.hasAttribute(`open`))}_schedule(e){if(!e&&this.hasAttribute(`open`)||(this._clear(),this.isOpen===e))return;let t=e?this._delay(`open-delay`,Pr):this._delay(`close-delay`,Fr);this._timer=setTimeout(()=>{this._timer=null,this._setOpen(e)},t)}_setOpen(e){let t=this._panel;t&&this.isOpen!==e&&(e?(t.setAttribute(`data-open`,``),this._reposition(),f(this,()=>this._reposition()),this._doc?.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`keydown`,this._onKeyDown),this._describe(t)):(t.removeAttribute(`data-open`),p(this),this._doc?.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`keydown`,this._onKeyDown),this._described?.removeAttribute(`aria-describedby`),this._described=null),this.dispatchEvent(new CustomEvent(e?`wui:hover-card:open`:`wui:hover-card:close`,{bubbles:!0})))}_reposition(){this.isOpen&&d(this._trigger,this._panel,{clampHeight:!0})}_describe(e){let t=this._anchor;t&&(e.id||=`wui-hover-card-${++zr}`,t.setAttribute(`aria-describedby`,e.id),this._described=t)}},Hr=`data-open`,Ur=8,Wr=`.wui-nav-menu-link`,Gr=e=>e instanceof Element?e:e instanceof Node?e.parentElement:null,Kr=e=>[...e].filter(e=>e instanceof HTMLElement),qr=e=>{let t=e.children[0];if(!(t instanceof HTMLElement))throw Error(`Navigation entry has no control.`);return t},Jr=(e,t,n)=>{let r=e[t];if(r===void 0)throw Error(n);return r},Yr=class extends g{constructor(){super(),this._onClick=e=>this._handleClick(e),this._onKeyDown=e=>this._handleKeyDown(e),this._onFocusOut=e=>{let t=this._openItem(),n=e.relatedTarget;t&&n instanceof Node&&!t.contains(n)&&this._set(t,!1)},this._onPointerDown=e=>{let t=this._openItem();t&&!e.composedPath().includes(t)&&this._set(t,!1)},this._onResize=()=>{let e=this._openItem();if(!e)return;let t=_(e.children[1],`Navigation entry has no panel.`);this._align(t)}}connectedCallback(){this._teardown(),this.addEventListener(`click`,this._onClick),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`focusout`,this._onFocusOut),document.addEventListener(`pointerdown`,this._onPointerDown,!0)}disconnectedCallback(){this._teardown()}open(e){let t=this._items().find(t=>{let n=t.children[0];return n instanceof HTMLElement&&this._isTrigger(n)&&n.dataset.key===e});t&&this._set(t,!0)}close(e=!1){let t=this._openItem();t&&(this._set(t,!1),e&&qr(t).focus({preventScroll:!0}))}_items(){return Kr(this.querySelectorAll(`.wui-nav-menu-item`))}_openItem(){return this._items().find(e=>e.children[1]?.hasAttribute(Hr))??null}_isTrigger(e){return!!e?.classList.contains(`wui-nav-menu-trigger`)}_entries(){return this._items().map(qr)}_links(e){let t=e.children[1];return t?Kr(t.querySelectorAll(Wr)):[]}_set(e,t){let n=e.children[1];if(!n)return;let r=qr(e);if(t){let t=this._openItem();t&&t!==e&&this._set(t,!1)}n.hasAttribute(Hr)!==t&&(n.toggleAttribute(Hr,t),r.setAttribute(`aria-expanded`,String(t)),t?(this._align(n),window.addEventListener(`resize`,this._onResize)):(n.removeAttribute(`data-align`),this._openItem()||window.removeEventListener(`resize`,this._onResize)),this.dispatchEvent(new CustomEvent(`wui-navigation-menu:toggle`,{bubbles:!0,detail:{key:r.dataset.key??null,open:t}})))}_align(e){e.removeAttribute(`data-align`),e.getBoundingClientRect().right>window.innerWidth-Ur&&e.setAttribute(`data-align`,`end`)}_handleClick(e){let t=Gr(e.target),n=t?.closest(`.wui-nav-menu-trigger`);if(n&&this.contains(n)){let e=_(n.parentElement,`Navigation trigger has no entry.`),t=_(e.children[1],`Navigation entry has no panel.`);this._set(e,!t.hasAttribute(Hr));return}let r=t?.closest(Wr);r&&this.contains(r)&&this.close()}_handleKeyDown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=Gr(e.target)?.closest(`.wui-nav-menu-trigger, .wui-nav-menu-toplink, .wui-nav-menu-link`);if(!(t instanceof HTMLElement)||!this.contains(t))return;let n=this._openItem();if(e.key===`Escape`){if(!n)return;e.preventDefault(),e.stopPropagation();let r=n.contains(t);this._set(n,!1),r&&qr(n).focus({preventScroll:!0});return}if(t.matches(Wr)){this._linkKey(e,t);return}let r=this._entries(),i=r.indexOf(t);if(e.key===`ArrowRight`||e.key===`ArrowLeft`||e.key===`Home`||e.key===`End`){e.preventDefault();let t=e.key===`Home`?0:e.key===`End`?r.length-1:(i+(e.key===`ArrowRight`?1:-1)+r.length)%r.length;n&&this._set(n,!1),Jr(r,t,`Navigation has no entry to focus.`).focus({preventScroll:!0})}else if(e.key===`ArrowDown`&&this._isTrigger(t)){e.preventDefault();let n=_(t.parentElement,`Navigation trigger has no entry.`);this._set(n,!0),Jr(this._links(n),0,`Navigation panel has no link to focus.`).focus({preventScroll:!0})}}_linkKey(e,t){let n=_(t.closest(`.wui-nav-menu-item`),`Navigation link has no entry.`),r=this._links(n),i=r.indexOf(t);e.key===`ArrowDown`||e.key===`ArrowUp`?(e.preventDefault(),Jr(r,(i+(e.key===`ArrowDown`?1:-1)+r.length)%r.length,`Navigation panel has no link to focus.`).focus({preventScroll:!0})):e.key===`Home`?(e.preventDefault(),Jr(r,0,`Navigation panel has no link to focus.`).focus({preventScroll:!0})):e.key===`End`&&(e.preventDefault(),Jr(r,r.length-1,`Navigation panel has no link to focus.`).focus({preventScroll:!0}))}_teardown(){let e=this._openItem();e&&this._set(e,!1),window.removeEventListener(`resize`,this._onResize),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`focusout`,this._onFocusOut),document.removeEventListener(`pointerdown`,this._onPointerDown,!0)}},Xr=n({NOTIFICATION_COUNT_CAP:()=>99,NOTIFICATION_TEXT:()=>V,groupNotificationsByDay:()=>ii,notificationCountText:()=>$r,notificationDayHeading:()=>ri,notificationTime:()=>ni,notificationTriggerLabel:()=>ei,notificationUnreadAnnouncement:()=>ti}),Zr=99,Qr=864e5,V=Object.freeze({label:`Notifications`,empty:`You are all caught up.`,markAll:`Mark all read`,viewAll:`View all`,unreadPrefix:`Unread: `,today:`Today`,yesterday:`Yesterday`,allRead:`All notifications marked as read.`,noneUnread:`No unread notifications`,failed:Object.freeze({forbidden:`You do not have permission to mark these as read.`,client:`These could not be marked as read. Refresh the page and try again.`,validation:`These could not be marked as read. Refresh the page and try again.`,server:`Something went wrong on our side, so these were not marked as read. Try again in a moment.`,network:`Could not reach the server, so these were not marked as read. Check your connection and try again.`})});function $r(e){return e>99?`99+`:String(e)}function ei(e,t){return t===0?e:`${e}, ${$r(t)} unread`}function ti(e){return e===0?V.noneUnread:`${$r(e)} unread notifications`}function ni(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?``:M(e,{pattern:`time`})}function ri(e,t=Date.now()){let n=M(e);return n===M(t)?V.today:n===M(mt(t)-Qr)?V.yesterday:n}function ii(e,t=Date.now()){let n=new Map;for(let r of e){if(!Number.isFinite(mt(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=M(r.at),i=n.get(e);i||(i={key:e,heading:ri(r.at,t),items:[]},n.set(e,i)),i.items.push(r)}return[...n.values()]}var ai=Object.freeze([`POST`,`PUT`,`PATCH`,`DELETE`]),oi=e=>(In(`[@webority/ui-elements] Wui-Toast-Action: ${e}; the toast shows no action.`),null),si=e=>typeof e==`object`&&!!e;function ci(e){if(e==null||e===``)return null;let t;try{t=JSON.parse(e)}catch{return oi(`the value is not JSON`)}let n=si(t)?t:{},r=n.label,i=n.url,a=String(n.method??`POST`).toUpperCase();return typeof r!=`string`||r===``||typeof i!=`string`||i===``?oi(`label and url must be non-empty strings`):ai.includes(a)?{label:r,url:i,method:a}:oi(`method must be one of ${ai.join(`, `)}`)}var li=n({CSRF_META_NAME:()=>ui,DEFAULT_CSRF_HEADER:()=>di,HTTP_KINDS:()=>hi,WUI_HEADERS:()=>H,WUI_REQUEST_HEADER:()=>mi,classifyStatus:()=>yi,configureCsrf:()=>pi,createRequestQueue:()=>Si,readCsrf:()=>_i,wuiFetch:()=>U}),ui=`wui-csrf`,di=`RequestVerificationToken`,fi={metaName:ui,header:di};function pi({metaName:e=ui,header:t=di}={}){fi={metaName:e,header:t}}var mi=`Wui-Request`,H=Object.freeze({fragment:`Wui-Fragment`,message:`Wui-Message`,redirect:`Wui-Redirect`,result:`Wui-Result`,keepOpen:`Wui-Keep-Open`,toastVariant:`Wui-Toast-Variant`,toastAction:`Wui-Toast-Action`,data:`Wui-Data`,next:`Wui-Next`}),hi=Object.freeze([`ok`,`validation`,`forbidden`,`client`,`server`,`network`,`aborted`,`stale`,`session`]),gi=new Set([`GET`,`HEAD`]);function _i(e=document){let t=[...e.querySelectorAll(`meta`)].find(e=>e.getAttribute(`name`)===fi.metaName),n=t?.getAttribute(`content`);return!t||!n?null:{header:t.getAttribute(`data-header`)||fi.header,token:n}}var vi=e=>{try{return new URL(e,window.location.href).origin===window.location.origin}catch{return!1}};function yi(e){return e>=200&&e<300?`ok`:e===401?`session`:e===403?`forbidden`:e===422?`validation`:e>=400&&e<500?`client`:`server`}var bi=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,xi=e=>{if(e==null||e===``)return null;try{return JSON.parse(e)}catch(e){throw TypeError(`The ${H.data} response header is not JSON: ${e instanceof Error?e.message:String(e)}`,{cause:e})}};async function U(e,t={}){let n=(t.method||`GET`).toUpperCase(),r=t.navigate||(e=>window.location.assign(e)),i={Accept:`text/html`,"X-Requested-With":`XMLHttpRequest`,[mi]:`1`,...t.headers};if(!gi.has(n)&&vi(e)){let e=_i();e&&(i[e.header]=e.token)}let a=e=>{if(e==null)return null;try{return decodeURIComponent(e)}catch{return e}},o=(e,t=null,n=``)=>{let r=e=>t?.headers.get(e)??null;return{kind:e,ok:e===`ok`,status:t?.status??0,html:n,response:t,message:a(r(H.message)),redirect:r(H.redirect),result:r(H.result),keepOpen:r(H.keepOpen)===`1`,toastVariant:r(H.toastVariant),toastAction:ci(r(H.toastAction)),fragment:r(H.fragment)===`1`,data:xi(a(r(H.data))),next:r(H.next)}},s;try{s=await fetch(e,{method:n,body:t.body,headers:i,signal:t.signal,credentials:`same-origin`})}catch(e){return o(bi(e)||t.signal?.aborted?`aborted`:`network`)}let c=yi(s.status);if(c===`ok`&&s.redirected&&s.headers.get(H.fragment)!==`1`&&(c=`session`),c===`session`)return r(s.status===401?s.headers.get(`Location`)||window.location.href:s.url),o(c,s);let l=``;if(c===`ok`||c===`validation`)try{l=await s.text()}catch(e){return o(bi(e)||t.signal?.aborted?`aborted`:`network`,s)}return o(c,s,l)}function Si(){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 U(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 Ci=`.wui-notification-center-trigger`,wi=`.wui-notification-center-panel`,Ti=`.wui-notification-center-count`,Ei=`.wui-notification-center-live`,Di=`.wui-notification-center-markall`,Oi=`.wui-notification-center-item`,ki=`wui-notification-center-item-read`,Ai=`.wui-notification-center-unread-label`,ji=`.app-tabs`,Mi=`.wui-notification-center-tabs [role='tablist']`,Ni=`.wui-notification-center-tabs [role='tab']`,Pi=`.wui-notification-center-empty`,Fi={ArrowDown:1,ArrowUp:-1,Home:`first`,End:`last`},Ii=e=>!!e,Li=e=>Object.hasOwn(V.failed,e),Ri=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},zi=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Bi=class extends g{constructor(){super(),this._doc=null,this._unread=0,this._busy=!1,this._onClick=e=>this._click(e),this._onKeyDown=e=>this._key(e),this._onOutside=e=>{e.composedPath().includes(this)||this.close()},this._onFocusOut=e=>{let t=e.relatedTarget;t instanceof Node&&!this.contains(t)&&this.close()}}connectedCallback(){this._doc=this.ownerDocument,this._unread=this._initialUnread(),this.addEventListener(`click`,this._onClick),this.addEventListener(`keydown`,this._onKeyDown),this._doc.addEventListener(`mousedown`,this._onOutside),this.addEventListener(`focusout`,this._onFocusOut),this._syncOpen(),this.isOpen&&this._layoutTabs()}disconnectedCallback(){this.removeEventListener(`click`,this._onClick),this.removeEventListener(`keydown`,this._onKeyDown),this._doc?.removeEventListener(`mousedown`,this._onOutside),this.removeEventListener(`focusout`,this._onFocusOut),this._doc=null}get isOpen(){return this.hasAttribute(`open`)}open(){this.isOpen||(this.setAttribute(`open`,``),this._syncOpen(),this._layoutTabs(),Ri(this,wi)?.focus(),this._announceToggle())}close({restoreFocus:e=!1}={}){this.isOpen&&(this.removeAttribute(`open`),this._syncOpen(),e&&Ri(this,Ci)?.focus(),this._announceToggle())}toggle(){this.isOpen?this.close():this.open()}_announceToggle(){this.dispatchEvent(new CustomEvent(`wui:notification-center:toggle`,{bubbles:!0,detail:{open:this.isOpen}}))}_syncOpen(){this.querySelector(Ci)?.setAttribute(`aria-expanded`,this.isOpen?`true`:`false`)}_initialUnread(){let e=Number.parseInt(this.getAttribute(`unread`)??``,10);return Number.isInteger(e)&&e>=0?e:this.querySelectorAll(`${Oi}:not(.${ki}):not([data-archived="true"])`).length}_click(e){let t=e.target;if(!(t instanceof Element))return;let n=t.closest(Ni);if(n instanceof HTMLElement&&this.contains(n)){if(this.hasAttribute(`controlled`))return;this._pickTab(n);return}let r=t.closest(`${Ci}, ${Di}, ${Oi}`);r instanceof HTMLElement&&this.contains(r)&&(r.matches(Ci)?this.toggle():this.hasAttribute(`controlled`)||(r.matches(Di)?this._markAll():this._markItem(r)))}_key(e){if(e.key===`Escape`&&this.isOpen){e.preventDefault(),e.stopPropagation(),this.close({restoreFocus:!0});return}if(!this.isOpen)return;let t=e.target;if(!(t instanceof Element))throw Error(`Keyboard event target is not an element.`);if(!this.querySelector(wi)?.contains(t)||t.closest(ji))return;let n=Fi[e.key];if(n===void 0)return;let r=zi(this,Oi).filter(e=>!e.closest(`[hidden]`));if(r.length===0)return;let i=t.closest(Oi),a=i instanceof HTMLElement?r.indexOf(i):-1,o;o=n===`first`?0:n===`last`?r.length-1:a===-1?n===1?0:r.length-1:Math.min(r.length-1,Math.max(0,a+n)),e.preventDefault(),r[o]?.focus()}_markItem(e){e.classList.contains(ki)||(this._applyRead(e),e.dataset.archived!==`true`&&(this._unread=Math.max(0,this._unread-1)),this._render(),this._say(ti(this._unread)),this._emitRead([e.dataset.id].filter(Ii),!1))}async _markAll(){if(this._busy)return;let e=zi(this,`${Oi}:not(.${ki})`);if(e.length===0&&this._unread===0)return;let t=e.map(e=>e.dataset.id).filter(Ii),n=this.getAttribute(`read-action`);if(n){this._setBusy(!0);let e=new URLSearchParams;for(let n of t)e.append(`ids`,n);let r=await U(n,{method:`POST`,body:e});if(this._setBusy(!1),!r.ok){if(r.kind===`session`||r.kind===`aborted`)return;let e=r.kind,t=r.message||(Li(e)?V.failed[e]:V.failed.server);this._say(t),this.dispatchEvent(new CustomEvent(`wui:notification-center:failed`,{bubbles:!0,detail:{kind:e,message:t}}));return}}for(let t of e)this._applyRead(t);this._unread=0,this._render(),this._say(V.allRead),this._emitRead(t,!0)}_pickTab(e){let t=e.closest(Mi);if(t instanceof HTMLElement){for(let n of zi(t,Ni)){let t=n===e;n.classList.toggle(`active`,t),n.setAttribute(`aria-selected`,t?`true`:`false`),n.setAttribute(`tabindex`,t?`0`:`-1`)}this._layoutTabs(),this._filterItems(e.dataset.key)}}_layoutTabs(){for(let e of zi(this,Mi)){let t=Ri(e,`.app-tab.active`);t&&(e.style.setProperty(`--wui-tab-x`,`${t.offsetLeft}px`),e.style.setProperty(`--wui-tab-w`,`${t.offsetWidth}px`)),e.setAttribute(`data-wui-tabs`,``)}}_filterItems(e){let t=!1;for(let n of zi(this,Oi)){let r=n.dataset.archived===`true`,i=n.classList.contains(ki),a=e===`archived`?r:!r&&(e!==`unread`||!i);a&&(t=!0);let o=n.closest(`li`);o&&(o.hidden=!a)}for(let e of zi(this,`.wui-notification-center-list section`))e.hidden=[...e.querySelectorAll(`li`)].every(e=>e.hidden);let n=Ri(this,Pi);n&&(n.hidden=t)}_applyRead(e){e.classList.add(ki),e.querySelector(Ai)?.remove()}_setBusy(e){this._busy=e;let t=this.querySelector(Di);t instanceof HTMLButtonElement&&(t.disabled=e||this._unread===0,e?t.setAttribute(`aria-busy`,`true`):t.removeAttribute(`aria-busy`))}_render(){let e=Ri(this,Ti);e&&(e.textContent=$r(this._unread),e.hidden=this._unread===0),this.querySelector(Ci)?.setAttribute(`aria-label`,ei(this.getAttribute(`label`)||V.label,this._unread));let t=this.querySelector(Di);t instanceof HTMLButtonElement&&(t.disabled=this._unread===0)}_say(e){let t=this.querySelector(Ei);t&&(t.textContent=e)}_emitRead(e,t){this.dispatchEvent(new CustomEvent(`wui:notification-center:read`,{bubbles:!0,detail:{ids:e,all:t}}))}},Vi=`.wui-onboarding-card`,Hi=`.wui-onboarding-steps`,Ui=`.wui-onboarding-toggle`,Wi=`.wui-onboarding-dismiss`,Gi=`.wui-onboarding-restore`,Ki=`wui-onboarding:`,qi=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Ji=class extends g{constructor(){super(),this._onClick=e=>{let t=e.target instanceof Element?e.target:null;t&&(t.closest(Wi)?this.dismiss():t.closest(Gi)?this.restore():t.closest(Ui)&&this.toggle())}}connectedCallback(){this.addEventListener(`click`,this._onClick),this._stored()===`dismissed`&&this._setDismissed(!0)}disconnectedCallback(){this.removeEventListener(`click`,this._onClick)}get dismissed(){return qi(this,Vi)?.hidden===!0}get collapsed(){return qi(this,Hi)?.hidden===!0}dismiss(){this.dismissed||(this._setDismissed(!0),this._store(`dismissed`),qi(this,Gi)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:dismiss`,{bubbles:!0})))}restore(){this.dismissed&&(this._setDismissed(!1),this._store(null),qi(this,Ui)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:restore`,{bubbles:!0})))}toggle(){let e=qi(this,Hi);if(!e)return;let t=!e.hidden;e.hidden=t,this.querySelector(Ui)?.setAttribute(`aria-expanded`,String(!t)),this.dispatchEvent(new CustomEvent(`wui:onboarding:collapse`,{bubbles:!0,detail:{collapsed:t}}))}_setDismissed(e){let t=qi(this,Vi),n=qi(this,Gi);t&&(t.hidden=e),n&&(n.hidden=!e)}_key(){let e=this.getAttribute(`storage-key`);return e?Ki+e:null}_stored(){let e=this._key();if(!e)return null;try{return window.localStorage.getItem(e)}catch{return null}}_store(e){let t=this._key();if(t)try{e?window.localStorage.setItem(t,e):window.localStorage.removeItem(t)}catch{}}},Yi=/[^0-9]/g,Xi=/[^0-9a-zA-Z]/g,Zi=class extends g{static formAssociated=!0;static get observedAttributes(){return[`value`,`length`,`mode`,`disabled`,`readonly`,`loading`,`size`,`aria-label`]}get length(){let e=Number.parseInt(this.getAttribute(`length`)??`6`,10);return Number.isFinite(e)&&e>0?e:6}set length(e){this.setAttribute(`length`,String(e))}get mode(){return this.getAttribute(`mode`)===`alphanumeric`?`alphanumeric`:`numeric`}set mode(e){this.setAttribute(`mode`,String(e??`numeric`))}get value(){return this._value??``}set value(e){this._value=this._clean(e),L(this,this._value),this._paint()}_clean(e){return(e==null?``:String(e)).replace(this.mode===`alphanumeric`?Xi:Yi,``).slice(0,this.length)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}}connectedCallback(){this._rendered?this._onSelectionChange&&document.addEventListener(`selectionchange`,this._onSelectionChange):(this._defaultCaptured||=(this._defaultValue=this._value,!0),this.render())}formResetCallback(){this._value=this._defaultValue||``,L(this,this._value),this._paint()}attributeChangedCallback(e,t,n){this._rendered&&(e===`value`?(this._value=this._clean(n),L(this,this._value),this._paint()):this.render())}render(){this._value=this._clean(this.getAttribute(`value`)??this._value);let e=this.length,t=this.mode===`numeric`,n=this.hasAttribute(`disabled`),r=Dn(this)||this.hasAttribute(`loading`),i=this.getAttribute(`size`),a=i===`sm`||i===`lg`?` otp-${i}`:``,o=Array.from({length:e},()=>`<span class="otp-slot" aria-hidden="true"></span>`).join(``),s=this.getAttribute(`aria-label`),c=s?` aria-label="${s.replace(/"/g,`&quot;`)}"`:``;this.innerHTML=`
31
+ <div class="datepicker-cells">${i}</div>`}_focusActive(){let e=this.querySelector(`.datepicker-pop`);if(!(e instanceof HTMLDivElement))return;let t=e.querySelector(`[tabindex="0"]`)||e.querySelector(`.is-selected`)||e.querySelector(`.datepicker-day:not(:disabled), .datepicker-cell:not(:disabled)`);t instanceof HTMLElement&&e.contains(document.activeElement)&&t.focus()}_position(e,t){d(e,t,{clampHeight:!0})}_setFocus(e,t,n,r){let{y:i,m:a}=Dn(e,t);this._focus={y:i,m:a,d:n};let o=i!==this._viewY||a!==this._viewM;this._viewY=i,this._viewM=a,this._slide=o&&r||``,this._renderView(),this._slide=``;let s=this.querySelector(`.datepicker-day[data-iso="${Cn(i,a,n)}"]`);s instanceof HTMLButtonElement&&s.focus()}_seek(e,t,n,r){let{dayDisabled:i}=this._limits(),a=new Date(e,t,n);for(let e=0;e<400;e++,a.setDate(a.getDate()+r))if(!i(a.getFullYear(),a.getMonth(),a.getDate()))return new Date(a);return null}_onKey(e){if(this._mode!==`days`)return;let t=this._focus||F(this._value)||{y:this._viewY,m:this._viewM,d:1},n=(e,t,n,r,i)=>{let a=this._seek(e,t,n,r);a&&this._setFocus(a.getFullYear(),a.getMonth(),a.getDate(),i)},r=(r,i,a=r<0?-1:1)=>{e.preventDefault(),n(t.y,t.m,t.d+r,a,i)};switch(e.key){case`ArrowLeft`:r(-1,`slide-prev`);break;case`ArrowRight`:r(1,`slide-next`);break;case`ArrowUp`:r(-7,`slide-prev`);break;case`ArrowDown`:r(7,`slide-next`);break;case`Home`:r(-((new Date(t.y,t.m,t.d).getDay()-this._firstDay()+7)%7),`slide-prev`,1);break;case`End`:r(6-(new Date(t.y,t.m,t.d).getDay()-this._firstDay()+7)%7,`slide-next`,-1);break;case`PageUp`:{e.preventDefault();let r=Dn(t.y,t.m-(e.shiftKey?12:1));n(r.y,r.m,Math.min(t.d,En(r.y,r.m)),-1,`slide-prev`);break}case`PageDown`:{e.preventDefault();let r=Dn(t.y,t.m+(e.shiftKey?12:1));n(r.y,r.m,Math.min(t.d,En(r.y,r.m)),1,`slide-next`);break}case`Enter`:case` `:e.preventDefault(),this._limits().dayDisabled(t.y,t.m,t.d)||(this.value=Cn(t.y,t.m,t.d),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close());return}}_wire(){this._teardown();let e=this.querySelector(`.datepicker-trigger`),t=this.querySelector(`.datepicker-pop`),n=this.querySelector(`.datepicker`);if(!(e instanceof HTMLButtonElement)||!(t instanceof HTMLDivElement))return;let r=()=>!t.hidden,i=()=>{r()&&this._position(e,t)};this._openFn=()=>{if(I(this))return;let r=new Date,a=F(this._value);(a||!this._viewNavigated)&&(this._viewY=r.getFullYear(),this._viewM=r.getMonth()),this._mode=`days`;let o=r.getFullYear()===this._viewY&&r.getMonth()===this._viewM,s=a&&a.y===this._viewY&&a.m===this._viewM;if(this._focus=s?a:{y:this._viewY,m:this._viewM,d:o?r.getDate():1},this._limits().dayDisabled(this._focus.y,this._focus.m,this._focus.d)){let e=this._focus,t=[1,-1].map(t=>this._seek(e.y,e.m,e.d,t)).find(t=>t&&t.getMonth()===e.m);t&&(this._focus={y:t.getFullYear(),m:t.getMonth(),d:t.getDate()})}this._renderView(),t.hidden=!1,n?.classList.add(`open`),this._position(e,t),f(this,i),e.setAttribute(`aria-expanded`,`true`);let c=t.querySelector(`[tabindex="0"]`);c instanceof HTMLElement&&c.focus()},this._closeFn=()=>{t.hidden=!0,n?.classList.remove(`open`),e.setAttribute(`aria-expanded`,`false`),p(this),e.focus()},e.addEventListener(`click`,()=>r()?this._close():this._open()),t.addEventListener(`click`,e=>{let t=e.target;if(!(t instanceof Element))throw Error(`click target is not an element`);let n=t.closest(`[data-nav]`);if(n instanceof HTMLElement){this._viewNavigated=!0,this._slide=Number(n.dataset.nav)<0?`slide-prev`:`slide-next`;let e=Dn(this._viewY,this._viewM+Number(n.dataset.nav));this._viewY=e.y,this._viewM=e.m,this._focus={y:e.y,m:e.m,d:1},this._renderView(),this._slide=``;return}let r=t.closest(`[data-nav-year]`);if(r instanceof HTMLElement){this._viewY+=Number(r.dataset.navYear),this._renderView();return}let i=t.closest(`[data-nav-decade]`);if(i instanceof HTMLElement){this._viewY+=Number(i.dataset.navDecade)*10,this._renderView();return}let a=t.closest(`[data-view]`);if(a instanceof HTMLElement){this._mode=a.dataset.view,this._renderView();return}let o=t.closest(`[data-month]`);if(o instanceof HTMLButtonElement&&!o.disabled){this._viewNavigated=!0,this._viewM=Number(o.dataset.month),this._mode=`days`,this._focus={y:this._viewY,m:this._viewM,d:1},this._renderView();return}let s=t.closest(`[data-year]`);if(s instanceof HTMLButtonElement&&!s.disabled){this._viewNavigated=!0,this._viewY=Number(s.dataset.year),this._mode=`months`,this._renderView();return}if(t.closest(`[data-today]`)){let e=new Date;if(this._limits().dayDisabled(e.getFullYear(),e.getMonth(),e.getDate()))return;this.value=Cn(e.getFullYear(),e.getMonth(),e.getDate()),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close();return}if(t.closest(`[data-clear]`)){this.value=``,this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close();return}let c=t.closest(`.datepicker-day[data-iso]`);c instanceof HTMLButtonElement&&!c.disabled&&(this.value=c.dataset.iso,this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close())}),this._onKeyBound=e=>{r()&&this._onKey(e)},t.addEventListener(`keydown`,this._onKeyBound),this._bindGlobal=()=>{this._teardown(),this._onDocClick=e=>{r()&&!e.composedPath().includes(this)&&this._close()},document.addEventListener(`click`,this._onDocClick),this._onDocKey=e=>{r()&&e.key===`Escape`&&this._close()},document.addEventListener(`keydown`,this._onDocKey),this._onHostKey=e=>{r()&&e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),this._close())},this.addEventListener(`keydown`,this._onHostKey),r()&&f(this,i)},this._bindGlobal(),this._syncFormValue()}_teardown(){this._onDocClick&&=(document.removeEventListener(`click`,this._onDocClick),null),this._onDocKey&&=(document.removeEventListener(`keydown`,this._onDocKey),null),this._onHostKey&&=(this.removeEventListener(`keydown`,this._onHostKey),null),p(this)}disconnectedCallback(){this._teardown()}},Pr=class extends g{_pointerMoveListener;_pointerLeaveListener;_frame;_pointerX;static get observedAttributes(){return[`static`,`max-scale`,`radius`]}constructor(){super(),this._pointerMoveListener=null,this._pointerLeaveListener=null,this._frame=0,this._pointerX=0}connectedCallback(){this._wire()}disconnectedCallback(){this._teardown()}attributeChangedCallback(e,t,n){e===`static`&&this.isConnected&&this._wire()}_maxScale(){return Ir(this.getAttribute(`max-scale`),1.6)}_radius(){return Ir(this.getAttribute(`radius`),100)}_magnifyEnabled(){return!(this.hasAttribute(`static`)||typeof matchMedia==`function`&&(matchMedia(`(pointer: coarse)`).matches||matchMedia(`(prefers-reduced-motion: reduce)`).matches))}_applyMagnification(){this._frame=0;let e=this._maxScale(),t=this._radius();for(let n of this.querySelectorAll(`.dock-item`)){let r=Fr(n),i=r.getBoundingClientRect(),a=Math.abs(this._pointerX-(i.left+i.width/2)),o=Math.max(0,1-a/t),s=1+(e-1)*o;r.style.setProperty(`--wui-dock-mag`,s.toFixed(3))}}_resetMagnification(){this._frame&&=(cancelAnimationFrame(this._frame),0);for(let e of this.querySelectorAll(`.dock-item`))Fr(e).style.removeProperty(`--wui-dock-mag`)}_wire(){this._teardown(),this._magnifyEnabled()&&(this._pointerMoveListener=e=>{this._pointerX=e.clientX,this._frame||=requestAnimationFrame(()=>this._applyMagnification())},this._pointerLeaveListener=()=>this._resetMagnification(),this.addEventListener(`pointermove`,this._pointerMoveListener),this.addEventListener(`pointerleave`,this._pointerLeaveListener))}_teardown(){this._pointerMoveListener&&=(this.removeEventListener(`pointermove`,this._pointerMoveListener),null),this._pointerLeaveListener&&=(this.removeEventListener(`pointerleave`,this._pointerLeaveListener),null),this._resetMagnification()}},Fr=e=>v(e,HTMLElement,`wui-dock item must be an HTML element`),Ir=(e,t)=>{let n=Number.parseFloat(e??``);return Number.isFinite(n)?n:t},Lr=300,Rr=150,zr=`.wui-hover-card-trigger`,Br=`.wui-hover-card-panel`,Vr=`a[href],button,input,select,textarea,[tabindex]`,Hr=0;function Ur(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}var Wr=class extends g{_doc;_timer;_described;_refocusing;_onOver;_onOut;_onFocusIn;_onFocusOut;_onKeyDown;static get observedAttributes(){return[`open`]}constructor(){super(),this._doc=null,this._timer=null,this._described=null,this._refocusing=!1,this._onOver=e=>{if(e.pointerType===`touch`||e.pointerType===`pen`)return;let t=this._zone(e.target);t===`panel`?this._clear():t===`trigger`&&this._schedule(!0)},this._onOut=e=>{e.pointerType!==`touch`&&e.pointerType!==`pen`&&this._zone(e.target)&&!this._zone(e.relatedTarget)&&this._schedule(!1)},this._onFocusIn=e=>{this._refocusing||(this._zone(e.target)===`trigger`?this._schedule(!0):this._zone(e.target)===`panel`&&this._clear())},this._onFocusOut=e=>{this._zone(e.target)&&!this._zone(e.relatedTarget)&&this._schedule(!1)},this._onKeyDown=e=>{if(e.key!==`Escape`||!this.isOpen||this.hasAttribute(`open`))return;e.stopPropagation();let t=this._panel?.contains(this.ownerDocument.activeElement);this._clear(),this._setOpen(!1),t&&(this._refocusing=!0,this._anchor?.focus(),this._refocusing=!1)}}get isOpen(){return this._panel?.hasAttribute(`data-open`)??!1}connectedCallback(){this._doc=this.ownerDocument,this.addEventListener(`pointerover`,this._onOver),this.addEventListener(`pointerout`,this._onOut),this.addEventListener(`focusin`,this._onFocusIn),this.addEventListener(`focusout`,this._onFocusOut),this._syncOpen()}attributeChangedCallback(){this.isConnected&&this._syncOpen()}disconnectedCallback(){this._clear(),this.removeEventListener(`pointerover`,this._onOver),this.removeEventListener(`pointerout`,this._onOut),this.removeEventListener(`focusin`,this._onFocusIn),this.removeEventListener(`focusout`,this._onFocusOut),this._doc?.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`keydown`,this._onKeyDown),p(this),this._doc=null}get _trigger(){return Ur(this,zr)}get _panel(){return Ur(this,Br)}get _anchor(){let e=this._trigger;return e?Ur(e,Vr)??e:null}_zone(e){if(!(e instanceof Node)||!this.contains(e))return null;let t=e instanceof Element?e:e.parentElement;return this._panel?.contains(t)?`panel`:this._trigger?.contains(t)?`trigger`:null}_delay(e,t){let n=Number(this.getAttribute(e));return this.hasAttribute(e)&&Number.isFinite(n)&&n>=0?n:t}_clear(){this._timer!==null&&clearTimeout(this._timer),this._timer=null}_syncOpen(){this._clear(),this._setOpen(this.hasAttribute(`open`))}_schedule(e){if(!e&&this.hasAttribute(`open`)||(this._clear(),this.isOpen===e))return;let t=e?this._delay(`open-delay`,Lr):this._delay(`close-delay`,Rr);this._timer=setTimeout(()=>{this._timer=null,this._setOpen(e)},t)}_setOpen(e){let t=this._panel;t&&this.isOpen!==e&&(e?(t.setAttribute(`data-open`,``),this._reposition(),f(this,()=>this._reposition()),this._doc?.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`keydown`,this._onKeyDown),this._describe(t)):(t.removeAttribute(`data-open`),p(this),this._doc?.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`keydown`,this._onKeyDown),this._described?.removeAttribute(`aria-describedby`),this._described=null),this.dispatchEvent(new CustomEvent(e?`wui:hover-card:open`:`wui:hover-card:close`,{bubbles:!0})))}_reposition(){this.isOpen&&d(this._trigger,this._panel,{clampHeight:!0})}_describe(e){let t=this._anchor;t&&(e.id||=`wui-hover-card-${++Hr}`,t.setAttribute(`aria-describedby`,e.id),this._described=t)}},Gr=`data-open`,Kr=8,qr=`.wui-nav-menu-link`,Jr=e=>e instanceof Element?e:e instanceof Node?e.parentElement:null,Yr=e=>[...e].filter(e=>e instanceof HTMLElement),Xr=e=>{let t=e.children[0];if(!(t instanceof HTMLElement))throw Error(`Navigation entry has no control.`);return t},Zr=(e,t,n)=>{let r=e[t];if(r===void 0)throw Error(n);return r},Qr=class extends g{constructor(){super(),this._onClick=e=>this._handleClick(e),this._onKeyDown=e=>this._handleKeyDown(e),this._onFocusOut=e=>{let t=this._openItem(),n=e.relatedTarget;t&&n instanceof Node&&!t.contains(n)&&this._set(t,!1)},this._onPointerDown=e=>{let t=this._openItem();t&&!e.composedPath().includes(t)&&this._set(t,!1)},this._onResize=()=>{let e=this._openItem();if(!e)return;let t=_(e.children[1],`Navigation entry has no panel.`);this._align(t)}}connectedCallback(){this._teardown(),this.addEventListener(`click`,this._onClick),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`focusout`,this._onFocusOut),document.addEventListener(`pointerdown`,this._onPointerDown,!0)}disconnectedCallback(){this._teardown()}open(e){let t=this._items().find(t=>{let n=t.children[0];return n instanceof HTMLElement&&this._isTrigger(n)&&n.dataset.key===e});t&&this._set(t,!0)}close(e=!1){let t=this._openItem();t&&(this._set(t,!1),e&&Xr(t).focus({preventScroll:!0}))}_items(){return Yr(this.querySelectorAll(`.wui-nav-menu-item`))}_openItem(){return this._items().find(e=>e.children[1]?.hasAttribute(Gr))??null}_isTrigger(e){return!!e?.classList.contains(`wui-nav-menu-trigger`)}_entries(){return this._items().map(Xr)}_links(e){let t=e.children[1];return t?Yr(t.querySelectorAll(qr)):[]}_set(e,t){let n=e.children[1];if(!n)return;let r=Xr(e);if(t){let t=this._openItem();t&&t!==e&&this._set(t,!1)}n.hasAttribute(Gr)!==t&&(n.toggleAttribute(Gr,t),r.setAttribute(`aria-expanded`,String(t)),t?(this._align(n),window.addEventListener(`resize`,this._onResize)):(n.removeAttribute(`data-align`),this._openItem()||window.removeEventListener(`resize`,this._onResize)),this.dispatchEvent(new CustomEvent(`wui-navigation-menu:toggle`,{bubbles:!0,detail:{key:r.dataset.key??null,open:t}})))}_align(e){e.removeAttribute(`data-align`),e.getBoundingClientRect().right>window.innerWidth-Kr&&e.setAttribute(`data-align`,`end`)}_handleClick(e){let t=Jr(e.target),n=t?.closest(`.wui-nav-menu-trigger`);if(n&&this.contains(n)){let e=_(n.parentElement,`Navigation trigger has no entry.`),t=_(e.children[1],`Navigation entry has no panel.`);this._set(e,!t.hasAttribute(Gr));return}let r=t?.closest(qr);r&&this.contains(r)&&this.close()}_handleKeyDown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=Jr(e.target)?.closest(`.wui-nav-menu-trigger, .wui-nav-menu-toplink, .wui-nav-menu-link`);if(!(t instanceof HTMLElement)||!this.contains(t))return;let n=this._openItem();if(e.key===`Escape`){if(!n)return;e.preventDefault(),e.stopPropagation();let r=n.contains(t);this._set(n,!1),r&&Xr(n).focus({preventScroll:!0});return}if(t.matches(qr)){this._linkKey(e,t);return}let r=this._entries(),i=r.indexOf(t);if(e.key===`ArrowRight`||e.key===`ArrowLeft`||e.key===`Home`||e.key===`End`){e.preventDefault();let t=e.key===`Home`?0:e.key===`End`?r.length-1:(i+(e.key===`ArrowRight`?1:-1)+r.length)%r.length;n&&this._set(n,!1),Zr(r,t,`Navigation has no entry to focus.`).focus({preventScroll:!0})}else if(e.key===`ArrowDown`&&this._isTrigger(t)){e.preventDefault();let n=_(t.parentElement,`Navigation trigger has no entry.`);this._set(n,!0),Zr(this._links(n),0,`Navigation panel has no link to focus.`).focus({preventScroll:!0})}}_linkKey(e,t){let n=_(t.closest(`.wui-nav-menu-item`),`Navigation link has no entry.`),r=this._links(n),i=r.indexOf(t);e.key===`ArrowDown`||e.key===`ArrowUp`?(e.preventDefault(),Zr(r,(i+(e.key===`ArrowDown`?1:-1)+r.length)%r.length,`Navigation panel has no link to focus.`).focus({preventScroll:!0})):e.key===`Home`?(e.preventDefault(),Zr(r,0,`Navigation panel has no link to focus.`).focus({preventScroll:!0})):e.key===`End`&&(e.preventDefault(),Zr(r,r.length-1,`Navigation panel has no link to focus.`).focus({preventScroll:!0}))}_teardown(){let e=this._openItem();e&&this._set(e,!1),window.removeEventListener(`resize`,this._onResize),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`focusout`,this._onFocusOut),document.removeEventListener(`pointerdown`,this._onPointerDown,!0)}},$r=n({NOTIFICATION_COUNT_CAP:()=>99,NOTIFICATION_TEXT:()=>V,groupNotificationsByDay:()=>si,notificationCountText:()=>ni,notificationDayHeading:()=>oi,notificationTime:()=>ai,notificationTriggerLabel:()=>ri,notificationUnreadAnnouncement:()=>ii}),ei=99,ti=864e5,V=Object.freeze({label:`Notifications`,empty:`You are all caught up.`,markAll:`Mark all read`,viewAll:`View all`,unreadPrefix:`Unread: `,today:`Today`,yesterday:`Yesterday`,allRead:`All notifications marked as read.`,noneUnread:`No unread notifications`,failed:Object.freeze({forbidden:`You do not have permission to mark these as read.`,client:`These could not be marked as read. Refresh the page and try again.`,validation:`These could not be marked as read. Refresh the page and try again.`,server:`Something went wrong on our side, so these were not marked as read. Try again in a moment.`,network:`Could not reach the server, so these were not marked as read. Check your connection and try again.`})});function ni(e){return e>99?`99+`:String(e)}function ri(e,t){return t===0?e:`${e}, ${ni(t)} unread`}function ii(e){return e===0?V.noneUnread:`${ni(e)} unread notifications`}function ai(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?``:M(e,{pattern:`time`})}function oi(e,t=Date.now()){let n=M(e);return n===M(t)?V.today:n===M(_t(t)-ti)?V.yesterday:n}function si(e,t=Date.now()){let n=new Map;for(let r of e){if(!Number.isFinite(_t(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=M(r.at),i=n.get(e);i||(i={key:e,heading:oi(r.at,t),items:[]},n.set(e,i)),i.items.push(r)}return[...n.values()]}var ci=Object.freeze([`POST`,`PUT`,`PATCH`,`DELETE`]),li=e=>(zn(`[@webority/ui-elements] Wui-Toast-Action: ${e}; the toast shows no action.`),null),ui=e=>typeof e==`object`&&!!e;function di(e){if(e==null||e===``)return null;let t;try{t=JSON.parse(e)}catch{return li(`the value is not JSON`)}let n=ui(t)?t:{},r=n.label,i=n.url,a=String(n.method??`POST`).toUpperCase();return typeof r!=`string`||r===``||typeof i!=`string`||i===``?li(`label and url must be non-empty strings`):ci.includes(a)?{label:r,url:i,method:a}:li(`method must be one of ${ci.join(`, `)}`)}var fi=n({CSRF_META_NAME:()=>pi,DEFAULT_CSRF_HEADER:()=>mi,HTTP_KINDS:()=>vi,WUI_HEADERS:()=>H,WUI_REQUEST_HEADER:()=>_i,classifyStatus:()=>Si,configureCsrf:()=>gi,createRequestQueue:()=>Ti,readCsrf:()=>bi,wuiFetch:()=>U}),pi=`wui-csrf`,mi=`RequestVerificationToken`,hi={metaName:pi,header:mi};function gi({metaName:e=pi,header:t=mi}={}){hi={metaName:e,header:t}}var _i=`Wui-Request`,H=Object.freeze({fragment:`Wui-Fragment`,message:`Wui-Message`,redirect:`Wui-Redirect`,result:`Wui-Result`,keepOpen:`Wui-Keep-Open`,toastVariant:`Wui-Toast-Variant`,toastAction:`Wui-Toast-Action`,data:`Wui-Data`,next:`Wui-Next`}),vi=Object.freeze([`ok`,`validation`,`forbidden`,`client`,`server`,`network`,`aborted`,`stale`,`session`]),yi=new Set([`GET`,`HEAD`]);function bi(e=document){let t=[...e.querySelectorAll(`meta`)].find(e=>e.getAttribute(`name`)===hi.metaName),n=t?.getAttribute(`content`);return!t||!n?null:{header:t.getAttribute(`data-header`)||hi.header,token:n}}var xi=e=>{try{return new URL(e,window.location.href).origin===window.location.origin}catch{return!1}};function Si(e){return e>=200&&e<300?`ok`:e===401?`session`:e===403?`forbidden`:e===422?`validation`:e>=400&&e<500?`client`:`server`}var Ci=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,wi=e=>{if(e==null||e===``)return null;try{return JSON.parse(e)}catch(e){throw TypeError(`The ${H.data} response header is not JSON: ${e instanceof Error?e.message:String(e)}`,{cause:e})}};async function U(e,t={}){let n=(t.method||`GET`).toUpperCase(),r=t.navigate||(e=>window.location.assign(e)),i={Accept:`text/html`,"X-Requested-With":`XMLHttpRequest`,[_i]:`1`,...t.headers};if(!yi.has(n)&&xi(e)){let e=bi();e&&(i[e.header]=e.token)}let a=e=>{if(e==null)return null;try{return decodeURIComponent(e)}catch{return e}},o=(e,t=null,n=``)=>{let r=e=>t?.headers.get(e)??null;return{kind:e,ok:e===`ok`,status:t?.status??0,html:n,response:t,message:a(r(H.message)),redirect:r(H.redirect),result:r(H.result),keepOpen:r(H.keepOpen)===`1`,toastVariant:r(H.toastVariant),toastAction:di(r(H.toastAction)),fragment:r(H.fragment)===`1`,data:wi(a(r(H.data))),next:r(H.next)}},s;try{s=await fetch(e,{method:n,...t.body===void 0?{}:{body:t.body},headers:i,...t.signal===void 0?{}:{signal:t.signal},credentials:`same-origin`})}catch(e){return o(Ci(e)||t.signal?.aborted?`aborted`:`network`)}let c=Si(s.status);if(c===`ok`&&s.redirected&&s.headers.get(H.fragment)!==`1`&&(c=`session`),c===`session`)return r(s.status===401?s.headers.get(`Location`)||window.location.href:s.url),o(c,s);let l=``;if(c===`ok`||c===`validation`)try{l=await s.text()}catch(e){return o(Ci(e)||t.signal?.aborted?`aborted`:`network`,s)}return o(c,s,l)}function Ti(){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 U(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 Ei=`.wui-notification-center-trigger`,Di=`.wui-notification-center-panel`,Oi=`.wui-notification-center-count`,ki=`.wui-notification-center-live`,Ai=`.wui-notification-center-markall`,ji=`.wui-notification-center-item`,Mi=`wui-notification-center-item-read`,Ni=`.wui-notification-center-unread-label`,Pi=`.app-tabs`,Fi=`.wui-notification-center-tabs [role='tablist']`,Ii=`.wui-notification-center-tabs [role='tab']`,Li=`.wui-notification-center-empty`,Ri={ArrowDown:1,ArrowUp:-1,Home:`first`,End:`last`},zi=e=>!!e,Bi=e=>Object.hasOwn(V.failed,e),Vi=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Hi=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Ui=class extends g{constructor(){super(),this._doc=null,this._unread=0,this._busy=!1,this._onClick=e=>this._click(e),this._onKeyDown=e=>this._key(e),this._onOutside=e=>{e.composedPath().includes(this)||this.close()},this._onFocusOut=e=>{let t=e.relatedTarget;t instanceof Node&&!this.contains(t)&&this.close()}}connectedCallback(){this._doc=this.ownerDocument,this._unread=this._initialUnread(),this.addEventListener(`click`,this._onClick),this.addEventListener(`keydown`,this._onKeyDown),this._doc.addEventListener(`mousedown`,this._onOutside),this.addEventListener(`focusout`,this._onFocusOut),this._syncOpen(),this.isOpen&&this._layoutTabs()}disconnectedCallback(){this.removeEventListener(`click`,this._onClick),this.removeEventListener(`keydown`,this._onKeyDown),this._doc?.removeEventListener(`mousedown`,this._onOutside),this.removeEventListener(`focusout`,this._onFocusOut),this._doc=null}get isOpen(){return this.hasAttribute(`open`)}open(){this.isOpen||(this.setAttribute(`open`,``),this._syncOpen(),this._layoutTabs(),Vi(this,Di)?.focus(),this._announceToggle())}close({restoreFocus:e=!1}={}){this.isOpen&&(this.removeAttribute(`open`),this._syncOpen(),e&&Vi(this,Ei)?.focus(),this._announceToggle())}toggle(){this.isOpen?this.close():this.open()}_announceToggle(){this.dispatchEvent(new CustomEvent(`wui:notification-center:toggle`,{bubbles:!0,detail:{open:this.isOpen}}))}_syncOpen(){this.querySelector(Ei)?.setAttribute(`aria-expanded`,this.isOpen?`true`:`false`)}_initialUnread(){let e=Number.parseInt(this.getAttribute(`unread`)??``,10);return Number.isInteger(e)&&e>=0?e:this.querySelectorAll(`${ji}:not(.${Mi}):not([data-archived="true"])`).length}_click(e){let t=e.target;if(!(t instanceof Element))return;let n=t.closest(Ii);if(n instanceof HTMLElement&&this.contains(n)){if(this.hasAttribute(`controlled`))return;this._pickTab(n);return}let r=t.closest(`${Ei}, ${Ai}, ${ji}`);r instanceof HTMLElement&&this.contains(r)&&(r.matches(Ei)?this.toggle():this.hasAttribute(`controlled`)||(r.matches(Ai)?this._markAll():this._markItem(r)))}_key(e){if(e.key===`Escape`&&this.isOpen){e.preventDefault(),e.stopPropagation(),this.close({restoreFocus:!0});return}if(!this.isOpen)return;let t=e.target;if(!(t instanceof Element))throw Error(`Keyboard event target is not an element.`);if(!this.querySelector(Di)?.contains(t)||t.closest(Pi))return;let n=Ri[e.key];if(n===void 0)return;let r=Hi(this,ji).filter(e=>!e.closest(`[hidden]`));if(r.length===0)return;let i=t.closest(ji),a=i instanceof HTMLElement?r.indexOf(i):-1,o;o=n===`first`?0:n===`last`?r.length-1:a===-1?n===1?0:r.length-1:Math.min(r.length-1,Math.max(0,a+n)),e.preventDefault(),r[o]?.focus()}_markItem(e){e.classList.contains(Mi)||(this._applyRead(e),e.dataset.archived!==`true`&&(this._unread=Math.max(0,this._unread-1)),this._render(),this._say(ii(this._unread)),this._emitRead([e.dataset.id].filter(zi),!1))}async _markAll(){if(this._busy)return;let e=Hi(this,`${ji}:not(.${Mi})`);if(e.length===0&&this._unread===0)return;let t=e.map(e=>e.dataset.id).filter(zi),n=this.getAttribute(`read-action`);if(n){this._setBusy(!0);let e=new URLSearchParams;for(let n of t)e.append(`ids`,n);let r=await U(n,{method:`POST`,body:e});if(this._setBusy(!1),!r.ok){if(r.kind===`session`||r.kind===`aborted`)return;let e=r.kind,t=r.message||(Bi(e)?V.failed[e]:V.failed.server);this._say(t),this.dispatchEvent(new CustomEvent(`wui:notification-center:failed`,{bubbles:!0,detail:{kind:e,message:t}}));return}}for(let t of e)this._applyRead(t);this._unread=0,this._render(),this._say(V.allRead),this._emitRead(t,!0)}_pickTab(e){let t=e.closest(Fi);if(t instanceof HTMLElement){for(let n of Hi(t,Ii)){let t=n===e;n.classList.toggle(`active`,t),n.setAttribute(`aria-selected`,t?`true`:`false`),n.setAttribute(`tabindex`,t?`0`:`-1`)}this._layoutTabs(),this._filterItems(e.dataset.key)}}_layoutTabs(){for(let e of Hi(this,Fi)){let t=Vi(e,`.app-tab.active`);t&&(e.style.setProperty(`--wui-tab-x`,`${t.offsetLeft}px`),e.style.setProperty(`--wui-tab-w`,`${t.offsetWidth}px`)),e.setAttribute(`data-wui-tabs`,``)}}_filterItems(e){let t=!1;for(let n of Hi(this,ji)){let r=n.dataset.archived===`true`,i=n.classList.contains(Mi),a=e===`archived`?r:!r&&(e!==`unread`||!i);a&&(t=!0);let o=n.closest(`li`);o&&(o.hidden=!a)}for(let e of Hi(this,`.wui-notification-center-list section`))e.hidden=[...e.querySelectorAll(`li`)].every(e=>e.hidden);let n=Vi(this,Li);n&&(n.hidden=t)}_applyRead(e){e.classList.add(Mi),e.querySelector(Ni)?.remove()}_setBusy(e){this._busy=e;let t=this.querySelector(Ai);t instanceof HTMLButtonElement&&(t.disabled=e||this._unread===0,e?t.setAttribute(`aria-busy`,`true`):t.removeAttribute(`aria-busy`))}_render(){let e=Vi(this,Oi);e&&(e.textContent=ni(this._unread),e.hidden=this._unread===0),this.querySelector(Ei)?.setAttribute(`aria-label`,ri(this.getAttribute(`label`)||V.label,this._unread));let t=this.querySelector(Ai);t instanceof HTMLButtonElement&&(t.disabled=this._unread===0)}_say(e){let t=this.querySelector(ki);t&&(t.textContent=e)}_emitRead(e,t){this.dispatchEvent(new CustomEvent(`wui:notification-center:read`,{bubbles:!0,detail:{ids:e,all:t}}))}},Wi=`.wui-onboarding-card`,Gi=`.wui-onboarding-steps`,Ki=`.wui-onboarding-toggle`,qi=`.wui-onboarding-dismiss`,Ji=`.wui-onboarding-restore`,Yi=`wui-onboarding:`,Xi=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Zi=class extends g{constructor(){super(),this._onClick=e=>{let t=e.target instanceof Element?e.target:null;t&&(t.closest(qi)?this.dismiss():t.closest(Ji)?this.restore():t.closest(Ki)&&this.toggle())}}connectedCallback(){this.addEventListener(`click`,this._onClick),this._stored()===`dismissed`&&this._setDismissed(!0)}disconnectedCallback(){this.removeEventListener(`click`,this._onClick)}get dismissed(){return Xi(this,Wi)?.hidden===!0}get collapsed(){return Xi(this,Gi)?.hidden===!0}dismiss(){this.dismissed||(this._setDismissed(!0),this._store(`dismissed`),Xi(this,Ji)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:dismiss`,{bubbles:!0})))}restore(){this.dismissed&&(this._setDismissed(!1),this._store(null),Xi(this,Ki)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:restore`,{bubbles:!0})))}toggle(){let e=Xi(this,Gi);if(!e)return;let t=!e.hidden;e.hidden=t,this.querySelector(Ki)?.setAttribute(`aria-expanded`,String(!t)),this.dispatchEvent(new CustomEvent(`wui:onboarding:collapse`,{bubbles:!0,detail:{collapsed:t}}))}_setDismissed(e){let t=Xi(this,Wi),n=Xi(this,Ji);t&&(t.hidden=e),n&&(n.hidden=!e)}_key(){let e=this.getAttribute(`storage-key`);return e?Yi+e:null}_stored(){let e=this._key();if(!e)return null;try{return window.localStorage.getItem(e)}catch{return null}}_store(e){let t=this._key();if(t)try{e?window.localStorage.setItem(t,e):window.localStorage.removeItem(t)}catch{}}},Qi=/[^0-9]/g,$i=/[^0-9a-zA-Z]/g,ea=class extends g{static formAssociated=!0;static get observedAttributes(){return[`value`,`length`,`mode`,`disabled`,`readonly`,`loading`,`size`,`aria-label`]}get length(){let e=Number.parseInt(this.getAttribute(`length`)??`6`,10);return Number.isFinite(e)&&e>0?e:6}set length(e){this.setAttribute(`length`,String(e))}get mode(){return this.getAttribute(`mode`)===`alphanumeric`?`alphanumeric`:`numeric`}set mode(e){this.setAttribute(`mode`,String(e??`numeric`))}get value(){return this._value??``}set value(e){this._value=this._clean(e),L(this,this._value),this._paint()}_clean(e){return(e==null?``:String(e)).replace(this.mode===`alphanumeric`?$i:Qi,``).slice(0,this.length)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}}connectedCallback(){this._rendered?this._onSelectionChange&&document.addEventListener(`selectionchange`,this._onSelectionChange):(this._defaultCaptured||=(this._defaultValue=this._value,!0),this.render())}formResetCallback(){this._value=this._defaultValue||``,L(this,this._value),this._paint()}attributeChangedCallback(e,t,n){this._rendered&&(e===`value`?(this._value=this._clean(n),L(this,this._value),this._paint()):this.render())}render(){this._value=this._clean(this.getAttribute(`value`)??this._value);let e=this.length,t=this.mode===`numeric`,n=this.hasAttribute(`disabled`),r=An(this)||this.hasAttribute(`loading`),i=this.getAttribute(`size`),a=i===`sm`||i===`lg`?` otp-${i}`:``,o=Array.from({length:e},()=>`<span class="otp-slot" aria-hidden="true"></span>`).join(``),s=this.getAttribute(`aria-label`),c=s?` aria-label="${s.replace(/"/g,`&quot;`)}"`:``;this.innerHTML=`
32
32
  <div class="otp${a}">
33
33
  <input
34
34
  class="otp-field"
@@ -41,12 +41,12 @@ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{
41
41
  spellcheck="false"
42
42
  ${n?`disabled`:``}${r?` readonly`:``} />
43
43
  <div class="otp-slots" aria-hidden="true">${o}</div>
44
- </div>`,this._rendered=!0,L(this,this._value),On(this,this.querySelector(`.otp`)),this._wire(),this._paint()}_refs(){let e=this.querySelector(`.otp-field`);return{input:e instanceof HTMLInputElement?e:null,slots:[...this.querySelectorAll(`.otp-slot`)].filter(e=>e instanceof HTMLElement)}}_paint(){let{input:e,slots:t}=this._refs();if(!e||!t.length)return;e.value!==this._value&&(e.value=this._value);let n=e.selectionStart??this._value.length,r=Math.min(n,t.length-1),i=document.activeElement===e;t.forEach((e,t)=>{e.textContent=this._value[t]??``,e.classList.toggle(`filled`,!!this._value[t]),e.classList.toggle(`active`,i&&t===r)})}_wire(){let{input:e}=this._refs();if(!e)return;let t=e=>{let t=this._clean(e),n=t!==this._value;this._value=t,L(this,this._value),this._paint(),n&&this.dispatchEvent(new Event(`change`,{bubbles:!0})),n&&t.length===this.length&&this.dispatchEvent(new CustomEvent(`complete`,{bubbles:!0,detail:t}))};e.addEventListener(`input`,()=>{let n=e.value;if(this._value.length===this.length&&n.length>this._value.length&&n.startsWith(this._value)){let e=this._clean(n.slice(this._value.length));if(e){t(e);return}}t(n)}),e.addEventListener(`paste`,e=>{if(I(this))return;let n=e.clipboardData?.getData(`text`);n!=null&&(e.preventDefault(),t(n))});for(let t of[`keyup`,`click`,`blur`,`select`])e.addEventListener(t,()=>this._paint());e.addEventListener(`focus`,()=>{this._value.length===this.length&&e.select(),this._paint()}),this._onSelectionChange&&document.removeEventListener(`selectionchange`,this._onSelectionChange),this._onSelectionChange=()=>{document.activeElement===e&&this._paint()},document.addEventListener(`selectionchange`,this._onSelectionChange)}disconnectedCallback(){this._onSelectionChange&&document.removeEventListener(`selectionchange`,this._onSelectionChange)}},Qi=`data-wui-overflow-hidden`,$i=`[aria-selected="true"], .active`,ea=`.chip-body, input, a[href], button:not(.chip-remove)`,ta=1,na=0,ra=e=>Number.parseFloat(e)||0,ia=e=>e.nodeType===1,aa=e=>{let t=e.getAttribute(`data-overflow-label`);if(t)return t;let n=[],r=e=>{for(let t of e.childNodes)if(t.nodeType===3){let e=t.textContent?.trim();e&&n.push(e)}else ia(t)&&!t.matches(`svg, img, [aria-hidden='true']`)&&r(t)};return r(e),n.join(` `)},oa=e=>{if(e.matches(`button, a[href], label, input`))return e;let t=e.querySelector(ea);return t instanceof HTMLElement?t:null},sa=class extends g{constructor(){super(),this._hiddenKey=``,this._ro=null,this._mo=null,this._observedList=null,this._doc=null,this._onDocDown=e=>{!this._menu.hidden&&!e.composedPath().includes(this)&&this._close(!1)}}connectedCallback(){this.classList.add(`wui-overflow`),this._build(),this._doc=this.ownerDocument,this._doc.addEventListener(`pointerdown`,this._onDocDown,!0),typeof ResizeObserver<`u`&&(this._ro=new ResizeObserver(()=>this.layout()),this._ro.observe(this)),typeof MutationObserver<`u`&&(this._mo=new MutationObserver(()=>this.layout()),this._watch()),this.layout()}disconnectedCallback(){this._ro?.disconnect(),this._mo?.disconnect(),this._ro=null,this._mo=null,this._observedList=null,this._doc?.removeEventListener(`pointerdown`,this._onDocDown,!0),this._doc=null,p(this)}static get observedAttributes(){return[`label`]}attributeChangedCallback(){let e=this._more?.firstChild;e&&(e.textContent=this._label())}_label(){return this.getAttribute(`label`)||`More`}_list(){let e=this.querySelector(`[data-wui-overflow-list]`);return e instanceof HTMLElement?e:null}_items(e){return[...e.children].filter(e=>!e.hasAttribute(`data-wui-overflow-skip`))}_build(){if(this._more)return;let e=`wui-overflow-menu-${++na}`,t=this.ownerDocument.createElement(`button`);t.type=`button`,t.className=`wui-overflow-more`,t.hidden=!0,t.setAttribute(`aria-haspopup`,`menu`),t.setAttribute(`aria-expanded`,`false`),t.setAttribute(`aria-controls`,e),t.append(this._label());let n=this.ownerDocument.createElement(`div`);n.className=`wui-overflow-menu`,n.id=e,n.setAttribute(`role`,`menu`),n.hidden=!0,this.append(t,n),this._more=t,this._menu=n,t.addEventListener(`click`,()=>this._menu.hidden?this._open(!1):this._close(!0)),t.addEventListener(`keydown`,e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),this._open(!0))}),n.addEventListener(`keydown`,e=>this._onMenuKey(e))}_watch(){let e=this._list();this._mo&&e!==this._observedList&&(this._mo.disconnect(),this._observedList=e,e&&this._mo.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`class`,`aria-selected`,`disabled`,`aria-disabled`,`data-overflow-label`]}))}layout(){let e=this._list();if(this._watch(),!e||!this._more)return;let t=this._items(e);for(let e of t)e.removeAttribute(Qi);this._more.hidden=!0;let n=this.clientWidth,r=[];if(n>0&&t.length){let i=getComputedStyle(e),a=ra(i.columnGap),o=ra(i.paddingLeft)+ra(i.paddingRight)+ra(i.borderLeftWidth)+ra(i.borderRightWidth),s=t.map(e=>e.offsetWidth);if(s.reduce((e,t)=>e+t,0)+a*(t.length-1)>n-o+ta){this._more.hidden=!1;let e=n-o-this._more.offsetWidth-ra(getComputedStyle(this).columnGap),i=this.hasAttribute(`keep`)?this.getAttribute(`keep`):$i,c=new Set,l=0,u=0,d=i?t.filter(e=>e.matches(i)):[];for(let n of d){let r=l+(s[t.indexOf(n)]??0)+(u?a:0);r>e||(c.add(n),l=r,u+=1)}for(let n=0;n<t.length;n+=1){let r=t[n];if(!r||c.has(r))continue;let i=l+(s[n]??0)+(u?a:0);if(i>e)break;c.add(r),l=i,u+=1}r=t.filter(e=>!c.has(e))}}for(let e of r)e.setAttribute(Qi,``);this._more.hidden=r.length===0,r.length?this._menu.hidden||this._fill(r):this._close(!1);let i=r.map(e=>t.indexOf(e)).join(`,`);i!==this._hiddenKey&&(this._hiddenKey=i,this.dispatchEvent(new CustomEvent(`wui-overflow-change`,{bubbles:!0,detail:{hidden:r.length}})))}_hiddenItems(){let e=this._list();return e?this._items(e).filter(e=>e.hasAttribute(Qi)):[]}_fill(e){this._menu.replaceChildren();for(let t of e){let e=this.ownerDocument.createElement(`button`);e.type=`button`,e.className=`wui-overflow-item`,e.tabIndex=-1;let n=t.querySelector(`input[type=checkbox], input[type=radio]`);n instanceof HTMLInputElement?(e.setAttribute(`role`,n.type===`radio`?`menuitemradio`:`menuitemcheckbox`),e.setAttribute(`aria-checked`,String(n.checked))):e.setAttribute(`role`,`menuitem`);let r=oa(t),i=!r||`disabled`in r&&r.disabled||r.getAttribute(`aria-disabled`)===`true`||t.matches(`.disabled, [aria-disabled='true']`);i&&e.setAttribute(`aria-disabled`,`true`),e.textContent=aa(t),e.addEventListener(`click`,()=>{i||r&&this._choose(t,r)}),this._menu.append(e)}}_choose(e,t){this._close(!1),t.click(),this.layout();let n=!e.hasAttribute(Qi)&&e.matches(`button, a[href]`)?e:this._more;n.hidden||n.focus()}_open(e){let t=this._hiddenItems();if(!t.length)return;this._fill(t),this._menu.hidden=!1,this._more.setAttribute(`aria-expanded`,`true`);let n=()=>d(this._more,this._menu);if(n(),f(this,n),e){let e=this._menu.firstElementChild;e instanceof HTMLElement&&e.focus()}}_close(e){this._menu&&!this._menu.hidden&&(this._menu.hidden=!0,this._more.setAttribute(`aria-expanded`,`false`),p(this),e&&this._more.focus())}_onMenuKey(e){let t=[...this._menu.children].filter(e=>e instanceof HTMLElement),n=this.ownerDocument.activeElement,r=n instanceof HTMLElement?t.indexOf(n):-1,i=null;if(e.key===`ArrowDown`)i=t[(r+1)%t.length];else if(e.key===`ArrowUp`)i=t[(r-1+t.length)%t.length];else if(e.key===`Home`)i=t[0];else if(e.key===`End`)i=t[t.length-1];else if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this._close(!0);return}else if(e.key===`Tab`){this._close(!1);return}else return;e.preventDefault(),i?.focus()}},ca=`.wui-rating-star`,la=`wui-rating-star-preview`,ua=`wui-rating-previewing`,da=`wui-rating-star-full`,fa=`wui-rating-star-empty`,pa=[da,`wui-rating-star-half`,fa],ma=e=>[...e.querySelectorAll(ca)].filter(e=>e instanceof HTMLElement),ha=class extends g{_onChange;_onOver;_onLeave;constructor(){super(),this._onChange=e=>{let t=e.target;t instanceof HTMLInputElement&&t.type===`radio`&&this._fill(Number(t.value))},this._onOver=e=>{if(this.hasAttribute(`disabled`))return;let t=y(e.target,ca);t instanceof HTMLElement&&this._preview(Number(t.dataset.value))},this._onLeave=()=>this._preview(0)}connectedCallback(){this.addEventListener(`change`,this._onChange),this.addEventListener(`mouseover`,this._onOver),this.addEventListener(`mouseleave`,this._onLeave)}disconnectedCallback(){this.removeEventListener(`change`,this._onChange),this.removeEventListener(`mouseover`,this._onOver),this.removeEventListener(`mouseleave`,this._onLeave)}_fill(e){for(let t of ma(this))t.classList.remove(...pa),t.classList.add(Number(t.dataset.value)<=e?da:fa)}_preview(e){this.classList.toggle(ua,e>0);for(let t of ma(this))t.classList.toggle(la,e>0&&Number(t.dataset.value)<=e)}},ga=class extends g{_doc;_onKeyDown;constructor(){super(),this._doc=null,this._onKeyDown=e=>{this.hasAttribute(`keys`)&&le(e,{j:()=>this._press(`.wui-record-pager-next`),k:()=>this._press(`.wui-record-pager-prev`)},this.closest(`[${x}]`))}}connectedCallback(){this._doc=this.ownerDocument,_(this._doc,`wui-record-pager has no owner document`).addEventListener(`keydown`,this._onKeyDown)}disconnectedCallback(){this._doc?.removeEventListener(`keydown`,this._onKeyDown),this._doc=null}_press(e){let t=this.querySelector(e);!(t instanceof HTMLElement)||t instanceof HTMLButtonElement&&t.disabled||t.getAttribute(`aria-disabled`)===`true`||t.click()}},_a=6e4,va=60*_a,ya=24*va,ba=(e,t)=>`${e} ${t}${e===1?``:`s`}`;function xa(e,t=Date.now()){let n=mt(e);if(!Number.isFinite(n))return`-`;let r=t-n,i=Math.abs(r);if(i>=7*ya)return M(n);if(i<_a)return`just now`;let[a,o]=i<va?[Math.floor(i/_a),`minute`]:i<ya?[Math.floor(i/va),`hour`]:[Math.floor(i/ya),`day`];return r>0?`${ba(a,o)} ago`:`in ${ba(a,o)}`}function Sa(e){let t=mt(e);return Number.isFinite(t)?`${M(t,{pattern:`datetime`})} IST`:`-`}var Ca=3e4,wa=new Set,Ta=null,Ea=()=>{if(!(typeof document<`u`&&document.hidden))for(let e of wa)e.refresh()},Da=e=>{wa.add(e),wa.size===1&&(Ta=setInterval(Ea,Ca),document.addEventListener(`visibilitychange`,Ea))},Oa=e=>{wa.delete(e),wa.size===0&&(clearInterval(Ta??void 0),Ta=null,document.removeEventListener(`visibilitychange`,Ea))},ka=class extends g{_observer;constructor(){super(),this._observer=null}connectedCallback(){this.refresh(),Da(this),this._observer=new MutationObserver(()=>this.refresh()),this._observer.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`datetime`]})}disconnectedCallback(){Oa(this),this._observer?.disconnect(),this._observer=null}refresh(){let e=this.querySelector(`time[datetime]`);if(!(e instanceof HTMLTimeElement))return;let t=xa(e.getAttribute(`datetime`));e.textContent!==t&&(e.textContent=t)}},Aa=/^[0-9]$/,ja=()=>typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches,Ma=class extends g{_connected;_signature;_digits;_reels;_roll;_onRollEnd;static get observedAttributes(){return[`value`,`format`,`unit`,`decimals`,`duration`]}constructor(){super(),this._connected=!1,this._signature=null,this._digits=[],this._reels=[],this._roll=null,this._onRollEnd=e=>{e.target instanceof Element&&e.target.classList.contains(`wui-rolling-number-reel`)&&this.removeAttribute(`data-rolling`)}}connectedCallback(){this._connected=!0;let e=this.querySelector(`.wui-rolling-number-roll`);this._roll=e instanceof HTMLElement?e:null,this._roll?.addEventListener(`transitionend`,this._onRollEnd),this._draw(!1)}disconnectedCallback(){this._connected=!1,this._roll?.removeEventListener(`transitionend`,this._onRollEnd)}attributeChangedCallback(){this._connected&&this._draw(!0)}_text(){let e=this.getAttribute(`value`),t=e===null||e.trim()===``?NaN:Number(e);if(!Number.isFinite(t))return null;let n=this.getAttribute(`decimals`);return _t(t,{style:this.getAttribute(`format`)||`number`,unit:this.getAttribute(`unit`)||void 0,decimals:n===null||n===``?void 0:Number(n)})}_showText(e){let t=this.querySelector(`.wui-rolling-number-text`);t instanceof HTMLElement&&t.textContent!==e&&(t.firstChild?t.firstChild.nodeValue=e:t.append(e))}_clear(e){e.replaceChildren(),this.removeAttribute(`data-ready`),this._signature=null,this._digits=[],this._reels=[]}_draw(e){let t=this.querySelector(`.wui-rolling-number-roll`);if(!(t instanceof HTMLElement))return;let n=this._text();if(n===null||(this._showText(n),ja())){this._clear(t);return}this.toggleAttribute(`data-rolling`,e);let r=Number(this.getAttribute(`duration`));this.getAttribute(`duration`)&&Number.isFinite(r)&&r>=0?this.style.setProperty(`--wui-roll-duration`,`${r}ms`):this.style.removeProperty(`--wui-roll-duration`);let i=[...n],a=i.filter(e=>Aa.test(e)).map(Number),o=i.map(e=>Aa.test(e)?`#`:e).join(``);if(e&&o===this._signature){this._reels.forEach((e,t)=>{e.style.setProperty(`--wui-roll-digit`,String(a[t]))}),this._digits=a;return}let s=this._digits,c=[],l=[],u=0;for(let t of i){if(!Aa.test(t)){let e=document.createElement(`span`);e.className=`wui-rolling-number-char`,e.textContent=t,l.push(e);continue}let n=document.createElement(`span`);n.className=`wui-rolling-number-digit`;let r=document.createElement(`span`);r.className=`wui-rolling-number-reel`;for(let e=0;e<10;e+=1){let t=document.createElement(`span`);t.textContent=String(e),r.append(t)}let i=a.length-1-u,o=e?s[s.length-1-i]??0:a[u];r.style.setProperty(`--wui-roll-digit`,String(o)),n.append(r),l.push(n),c.push(r),u+=1}t.replaceChildren(...l),e&&(t.offsetWidth,c.forEach((e,t)=>{e.style.setProperty(`--wui-roll-digit`,String(a[t]))})),this._signature=o,this._digits=a,this._reels=c,this.setAttribute(`data-ready`,``)}},Na=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:``},Pa=(e,t=`wui-opt-avatar`)=>{let n=Na(e.avatar);return!n&&!e.initials?``:`<span class="avatar ${t}" aria-hidden="true"><span class="avatar-face">${B(e.initials??``)}</span>${n?`<img class="avatar-img" src="${Fa(n)}" alt="" />`:``}</span>`},Fa=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),Ia=n({createListboxKeyNav:()=>Ra,moveActiveRow:()=>za}),La=e=>e.target instanceof Element?e.target.tagName:void 0;function Ra(e){let{getVisibleOptions:t,getActive:n,setActive:r,onEnter:i,onEscape:a,onTypeahead:o,typeaheadMs:s=500}=e,c=``,l=null,u=()=>{clearTimeout(l??void 0),l=null,c=``};return{handler:e=>{let d=t(),f=n(),p=La(e)===`INPUT`||La(e)===`TEXTAREA`;if(e.key===`ArrowDown`)e.preventDefault(),r(Math.min(f+1,d.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),r(Math.max(f-1,0));else if(e.key===`Home`&&!p)e.preventDefault(),d.length&&r(0);else if(e.key===`End`&&!p)e.preventDefault(),d.length&&r(d.length-1);else if(e.key===`PageDown`&&!p){if(e.preventDefault(),!d.length)return;r(Math.min((f<0?0:f)+8,d.length-1))}else if(e.key===`PageUp`&&!p){if(e.preventDefault(),!d.length)return;r(Math.max((f<0?0:f)-8,0))}else if(e.key===`Enter`)i&&(e.preventDefault(),i(d[f],d));else if(e.key===`Escape`)a&&a();else if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&La(e)!==`INPUT`&&La(e)!==`TEXTAREA`){e.preventDefault(),clearTimeout(l??void 0),c+=e.key.toLowerCase(),l=setTimeout(u,s);let t=d.findIndex(e=>e.textContent.trim().toLowerCase().startsWith(c));t>=0&&(r(t),o&&o(e.key,t,d))}},clearTypeahead:u,teardown:u}}function za(e,t){let n=e.querySelector(`.is-active`);n!==t&&(n?.classList.remove(`is-active`),t?.classList.add(`is-active`))}var Ba=n({filterOptions:()=>Va,renderOptions:()=>Ua});function Va(e,t){let n=String(t??``).trim().toLowerCase();return n?e.filter(e=>[kr(e),e.description,e.meta].some(e=>String(e??``).toLowerCase().includes(n))):e}var Ha=new WeakMap;function Ua(e,t,n={}){let{selected:r=[],query:i=``,status:a=`idle`,emptyText:o=`No matches`,searchingText:s=`Searching…`,hintText:c=`Type to search…`,actionRow:l=[],recents:u=null}=n,d=new Set(r.map(String)),f=Va(t,i),p=e.id,m=0,h=()=>`${p}-opt-${m++}`,g=e=>`<button type="button" role="option" id="${B(h())}" class="wui-select-option wui-select-add" data-value="${B(e.value)}" data-custom="true" aria-selected="false">${B(e.label)}</button>`,_=l.filter(e=>e.position===`top`).map(g).join(``),v=u?.options.length?`<div class="wui-select-group">${B(u.label)}</div>${u.options.map(e=>Wa(e,h(),d.has(String(e.value)))).join(``)}<div class="wui-select-sep" aria-hidden="true"></div>`:``,y=``,b=``;for(let e of f)e.group&&e.group!==y&&(b+=`<div class="wui-select-group">${B(e.group)}</div>`),y=e.group??``,b+=Wa(e,h(),d.has(String(e.value)));let x=l.filter(e=>e.position===`bottom`).map(g).join(``),S=``;a===`loading`?S=`<div class="wui-select-loading"><span class="wui-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>${B(s)}</div>`:a===`hint`?S=`<div class="wui-select-hint">${B(c)}</div>`:(a===`empty`||f.length===0&&l.length===0)&&(S=`<div class="wui-select-empty">${B(o)}</div>`);let C=_+v+b+x+S;Ha.get(e)!==C&&(Ha.set(e,C),e.innerHTML=C)}function Wa(e,t,n){let r=!!e.disabled,i=r&&e.disabledHint?` title="${B(e.disabledHint)}"`:``,a=`id="${B(t)}" role="option" data-value="${B(e.value)}" aria-selected="${n}"${r?` aria-disabled="true"`:``}${i}`,o=`<span class="wui-select-check" aria-hidden="true">${z(`check`)}</span>`;if(!e.description&&!e.meta)return`<button type="button" class="wui-select-option${n?` selected`:``}" ${a}>${Pa(e)}<span class="wui-select-opt-name">${Er(e)}</span>${o}</button>`;let s=e.description?`<span class="wui-select-opt-desc">${B(e.description)}</span>`:``,c=e.meta?`<span class="wui-select-opt-meta">${B(e.meta)}</span>`:``;return`<div class="wui-select-option wui-select-option-rich${n?` selected`:``}" ${a}>${Pa(e)}<span class="wui-select-option-text"><span class="wui-opt-label">${Er(e)}</span>${s}</span>${c}${o}</div>`}var Ga=Object.freeze([`single`,`multiple`,`search`,`tag`,`country`]),W=e=>e===`multiple`||e===`tag`,Ka=n({registerSelectPart:()=>Ja,selectPart:()=>Ya}),qa=new Map;function Ja(e,t){qa.set(e,t)}function Ya(e){return qa.get(e)}var Xa={chips:`select-chips`,search:`select-search`,country:`phone`,recents:`select-recents`};function Za(e){let t=Object.hasOwn(Xa,e)?Xa[e]:void 0;if(!t)return Promise.reject(Error(`Unknown <wui-select> part: ${e}.`));let n=Ya(e);return n?Promise.resolve(n):ir(t).then(()=>_(Ya(e),`The ${e} part of <wui-select> did not register.`))}var Qa=n({searchesRemotely:()=>$a}),$a=e=>typeof e.loadOptions==`function`||!!e.getAttribute(`source`)||e.hasAttribute(`remote`),eo=n({WuiSelect:()=>to}),to=class extends g{static formAssociated=!0;_internals;_value;_optionsProp;_partOptions;_known;_loadOptionsFn;_validateFn;_declared;_query;_ownsFilter;_active;_status;_error;_nav;_parts;_partSig;_partsMounted;_partToken;_rendered;_defaultValue;_warnedMode;_warnedDensity;_reposition;_onDocClick;_bindGlobal=()=>{throw Error(`The select is not wired.`)};_reanchor;_reanchorScroll;static get observedAttributes(){return`mode.value.placeholder.search-placeholder.empty-text.searchable.clearable.disabled.readonly.loading.required.size.density.icon.prefix.open.aria-label.aria-describedby.aria-invalid.min-chars.debounce.source.remote.allow-custom.add-label.searching-text.hint-text.value-label.value-avatar.value-initials.max-tags.allow-duplicates.separators.pattern.invalid-message.create-label.collapse-chips.selected-text.clear-all-label.countries.suggested.suggested-label.all-countries-label.recents-key.recents-limit.recents-label`.split(`.`)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=``,this._optionsProp=null,this._partOptions=null,this._known=new Map,this._loadOptionsFn=null,this._validateFn=null,this._declared=void 0,this._query=``,this._ownsFilter=!1,this._active=-1,this._status=`idle`,this._error=``,this._nav=null,this._parts=null,this._partSig=``,this._partsMounted=!1,this._partToken=0,this._rendered=!1,this._defaultValue=void 0,this._warnedMode=null,this._reposition=()=>{this._menuOpen()&&this._place()}}connectedCallback(){this._rendered?this._bindGlobal():this.render(),this._ensureParts(),this._mountParts()}disconnectedCallback(){this._teardown(),this._teardownParts()}attributeChangedCallback(e,t,n){e===`value`?(this._value=lo(n,W(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===`mode`&&(this._value=lo(this._value,W(this.mode)),this._partOptions=null,this._known.clear(),this._ensureParts()),(e===`source`||e===`remote`||e===`recents-key`)&&this._ensureParts(),so.has(e)?this._rendered&&(this._drawValue(),this.renderList()):oo.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`:ro(e)?e:(e!==this._warnedMode&&(this._warnedMode=e,In(`<wui-select> mode "${e}" is not one of ${Ga.join(`, `)}; it is treated as "single".`)),`single`)}_checkDensity(){let e=this.getAttribute(`density`);e===null||io.includes(e)||e===this._warnedDensity||(this._warnedDensity=e,In(`<wui-select> density "${e}" is not one of ${io.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=lo(e,W(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?.();this._rendered&&(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(){I(this)||this._open({focus:!1})}closeMenu({focusControl:e=!1}={}){this._close(),e&&this._refs().control?.focus()}renderList(){let e=this._refs();e.list&&(Ua(e.list,this._listOptions(),{selected:this._selectedValues(),query:this._ownsFilter?``:this._query,status:this._status,emptyText:this.getAttribute(`empty-text`)||`No matches`,searchingText:this.getAttribute(`searching-text`)||`Searching…`,hintText:this.getAttribute(`hint-text`)||void 0,actionRow:this._actionRows(),recents:this._recents()}),this._active>=this._visible().length&&(this._active=-1),this._active>=0&&this._setActive(this._active,{reveal:!1}),this._menuOpen()&&this._place())}render(){let e=this._carry();this._teardownParts(),this._snapshotDeclared();let t=this.mode;this._checkDensity();let n=W(t),r=t===`tag`,i=n&&(r||this.hasAttribute(`allow-custom`));this._value=lo(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=lo(this._value,n));let a=this.getAttribute(`size`),o=a===`sm`?` wui-select-sm`:a===`lg`?` wui-select-lg`:``,s=this.getAttribute(`icon`),c=this.getAttribute(`prefix`),l=this.hasAttribute(`clearable`),u=this.hasAttribute(`disabled`);this.id||=`wui-select-${Math.random().toString(36).slice(2,9)}`;let d=`${this.id}-listbox`,f=`${this.id}-entry-error`,p=this.getAttribute(`aria-describedby`)?.trim(),m=p?`${p} ${f}`:f,h=this.hasAttribute(`aria-invalid`)||this._error?` aria-invalid="true"`:``,g=this.hasAttribute(`required`)&&!i?` aria-required="true"`:``,_=` aria-label="${B(this._accessibleName())}" aria-describedby="${B(m)}"${h}${g}`,v=i?``:` role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${B(d)}"`,y=n?`<div class="input wui-select-control wui-select-multi"${v}${_}${u?` aria-disabled="true"`:r?``:` tabindex="0"`}>`:`<button type="button" class="input wui-select-control"${v}${_}${u?` disabled`:``}>`,b=`${s?z(s,{className:`wui-select-icon`}):``}${c?`<span class="wui-select-prefix">${B(c)}</span>`:``}<span class="wui-select-value" data-label></span>${l?`<span class="wui-select-reset" role="button" aria-label="Clear selection" hidden>${z(`x`)}</span>`:``}${z(`chevron-down`,{className:`wui-select-caret`})}`,x=this.getAttribute(`searchable`),S=t===`search`||(x===null?t===`multiple`||t===`country`:x!==`false`)&&!i,C=this.getAttribute(`search-placeholder`)||(t===`country`?`Search countries…`:`Search…`),w=S?`<div class="wui-select-search">${z(`search`)}<input class="wui-select-input" placeholder="${B(C)}" aria-label="${B(C)}" aria-autocomplete="list" /><button type="button" class="wui-select-clear" aria-label="Clear search" hidden>${z(`x`)}</button></div>`:``;this.innerHTML=`
44
+ </div>`,this._rendered=!0,L(this,this._value),jn(this,this.querySelector(`.otp`)),this._wire(),this._paint()}_refs(){let e=this.querySelector(`.otp-field`);return{input:e instanceof HTMLInputElement?e:null,slots:[...this.querySelectorAll(`.otp-slot`)].filter(e=>e instanceof HTMLElement)}}_paint(){let{input:e,slots:t}=this._refs();if(!e||!t.length)return;e.value!==this._value&&(e.value=this._value);let n=e.selectionStart??this._value.length,r=Math.min(n,t.length-1),i=document.activeElement===e;t.forEach((e,t)=>{e.textContent=this._value[t]??``,e.classList.toggle(`filled`,!!this._value[t]),e.classList.toggle(`active`,i&&t===r)})}_wire(){let{input:e}=this._refs();if(!e)return;let t=e=>{let t=this._clean(e),n=t!==this._value;this._value=t,L(this,this._value),this._paint(),n&&this.dispatchEvent(new Event(`change`,{bubbles:!0})),n&&t.length===this.length&&this.dispatchEvent(new CustomEvent(`complete`,{bubbles:!0,detail:t}))};e.addEventListener(`input`,()=>{let n=e.value;if(this._value.length===this.length&&n.length>this._value.length&&n.startsWith(this._value)){let e=this._clean(n.slice(this._value.length));if(e){t(e);return}}t(n)}),e.addEventListener(`paste`,e=>{if(I(this))return;let n=e.clipboardData?.getData(`text`);n!=null&&(e.preventDefault(),t(n))});for(let t of[`keyup`,`click`,`blur`,`select`])e.addEventListener(t,()=>this._paint());e.addEventListener(`focus`,()=>{this._value.length===this.length&&e.select(),this._paint()}),this._onSelectionChange&&document.removeEventListener(`selectionchange`,this._onSelectionChange),this._onSelectionChange=()=>{document.activeElement===e&&this._paint()},document.addEventListener(`selectionchange`,this._onSelectionChange)}disconnectedCallback(){this._onSelectionChange&&document.removeEventListener(`selectionchange`,this._onSelectionChange)}},ta=`data-wui-overflow-hidden`,na=`[aria-selected="true"], .active`,ra=`.chip-body, input, a[href], button:not(.chip-remove)`,ia=1,aa=0,oa=e=>Number.parseFloat(e)||0,sa=e=>e.nodeType===1,ca=e=>{let t=e.getAttribute(`data-overflow-label`);if(t)return t;let n=[],r=e=>{for(let t of e.childNodes)if(t.nodeType===3){let e=t.textContent?.trim();e&&n.push(e)}else sa(t)&&!t.matches(`svg, img, [aria-hidden='true']`)&&r(t)};return r(e),n.join(` `)},la=e=>{if(e.matches(`button, a[href], label, input`))return e;let t=e.querySelector(ra);return t instanceof HTMLElement?t:null},ua=class extends g{constructor(){super(),this._hiddenKey=``,this._ro=null,this._mo=null,this._observedList=null,this._doc=null,this._onDocDown=e=>{!this._menu.hidden&&!e.composedPath().includes(this)&&this._close(!1)}}connectedCallback(){this.classList.add(`wui-overflow`),this._build(),this._doc=this.ownerDocument,this._doc.addEventListener(`pointerdown`,this._onDocDown,!0),typeof ResizeObserver<`u`&&(this._ro=new ResizeObserver(()=>this.layout()),this._ro.observe(this)),typeof MutationObserver<`u`&&(this._mo=new MutationObserver(()=>this.layout()),this._watch()),this.layout()}disconnectedCallback(){this._ro?.disconnect(),this._mo?.disconnect(),this._ro=null,this._mo=null,this._observedList=null,this._doc?.removeEventListener(`pointerdown`,this._onDocDown,!0),this._doc=null,p(this)}static get observedAttributes(){return[`label`]}attributeChangedCallback(){let e=this._more?.firstChild;e&&(e.textContent=this._label())}_label(){return this.getAttribute(`label`)||`More`}_list(){let e=this.querySelector(`[data-wui-overflow-list]`);return e instanceof HTMLElement?e:null}_items(e){return[...e.children].filter(e=>!e.hasAttribute(`data-wui-overflow-skip`))}_build(){if(this._more)return;let e=`wui-overflow-menu-${++aa}`,t=this.ownerDocument.createElement(`button`);t.type=`button`,t.className=`wui-overflow-more`,t.hidden=!0,t.setAttribute(`aria-haspopup`,`menu`),t.setAttribute(`aria-expanded`,`false`),t.setAttribute(`aria-controls`,e),t.append(this._label());let n=this.ownerDocument.createElement(`div`);n.className=`wui-overflow-menu`,n.id=e,n.setAttribute(`role`,`menu`),n.hidden=!0,this.append(t,n),this._more=t,this._menu=n,t.addEventListener(`click`,()=>this._menu.hidden?this._open(!1):this._close(!0)),t.addEventListener(`keydown`,e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),this._open(!0))}),n.addEventListener(`keydown`,e=>this._onMenuKey(e))}_watch(){let e=this._list();this._mo&&e!==this._observedList&&(this._mo.disconnect(),this._observedList=e,e&&this._mo.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`class`,`aria-selected`,`disabled`,`aria-disabled`,`data-overflow-label`]}))}layout(){let e=this._list();if(this._watch(),!e||!this._more)return;let t=this._items(e);for(let e of t)e.removeAttribute(ta);this._more.hidden=!0;let n=this.clientWidth,r=[];if(t.length&&n<=0&&this.getClientRects().length>0)r=t;else if(n>0&&t.length){let i=getComputedStyle(e),a=oa(i.columnGap),o=oa(i.paddingLeft)+oa(i.paddingRight)+oa(i.borderLeftWidth)+oa(i.borderRightWidth),s=t.map(e=>e.offsetWidth);if(s.reduce((e,t)=>e+t,0)+a*(t.length-1)>n-o+ia){this._more.hidden=!1;let e=n-o-this._more.offsetWidth-oa(getComputedStyle(this).columnGap),i=this.hasAttribute(`keep`)?this.getAttribute(`keep`):na,c=new Set,l=0,u=0,d=i?t.filter(e=>e.matches(i)):[];for(let n of d){let r=l+(s[t.indexOf(n)]??0)+(u?a:0);r>e||(c.add(n),l=r,u+=1)}for(let n=0;n<t.length;n+=1){let r=t[n];if(!r||c.has(r))continue;let i=l+(s[n]??0)+(u?a:0);if(i>e)break;c.add(r),l=i,u+=1}r=t.filter(e=>!c.has(e))}}for(let e of r)e.setAttribute(ta,``);this._more.hidden=r.length===0,r.length?this._menu.hidden||this._fill(r):this._close(!1);let i=r.map(e=>t.indexOf(e)).join(`,`);i!==this._hiddenKey&&(this._hiddenKey=i,this.dispatchEvent(new CustomEvent(`wui-overflow-change`,{bubbles:!0,detail:{hidden:r.length}})))}_hiddenItems(){let e=this._list();return e?this._items(e).filter(e=>e.hasAttribute(ta)):[]}_fill(e){this._menu.replaceChildren();for(let t of e){let e=this.ownerDocument.createElement(`button`);e.type=`button`,e.className=`wui-overflow-item`,e.tabIndex=-1;let n=t.querySelector(`input[type=checkbox], input[type=radio]`);n instanceof HTMLInputElement?(e.setAttribute(`role`,n.type===`radio`?`menuitemradio`:`menuitemcheckbox`),e.setAttribute(`aria-checked`,String(n.checked))):e.setAttribute(`role`,`menuitem`);let r=la(t),i=!r||`disabled`in r&&r.disabled||r.getAttribute(`aria-disabled`)===`true`||t.matches(`.disabled, [aria-disabled='true']`);i&&e.setAttribute(`aria-disabled`,`true`),e.textContent=ca(t),e.addEventListener(`click`,()=>{i||r&&this._choose(t,r)}),this._menu.append(e)}}_choose(e,t){this._close(!1),t.click(),this.layout();let n=!e.hasAttribute(ta)&&e.matches(`button, a[href]`)?e:this._more;n.hidden||n.focus()}_open(e){let t=this._hiddenItems();if(!t.length)return;this._fill(t),this._menu.hidden=!1,this._more.setAttribute(`aria-expanded`,`true`);let n=()=>d(this._more,this._menu);if(n(),f(this,n),e){let e=this._menu.firstElementChild;e instanceof HTMLElement&&e.focus()}}_close(e){this._menu&&!this._menu.hidden&&(this._menu.hidden=!0,this._more.setAttribute(`aria-expanded`,`false`),p(this),e&&this._more.focus())}_onMenuKey(e){let t=[...this._menu.children].filter(e=>e instanceof HTMLElement),n=this.ownerDocument.activeElement,r=n instanceof HTMLElement?t.indexOf(n):-1,i=null;if(e.key===`ArrowDown`)i=t[(r+1)%t.length];else if(e.key===`ArrowUp`)i=t[(r-1+t.length)%t.length];else if(e.key===`Home`)i=t[0];else if(e.key===`End`)i=t[t.length-1];else if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this._close(!0);return}else if(e.key===`Tab`){this._close(!1);return}else return;e.preventDefault(),i?.focus()}},da=`.wui-rating-star`,fa=`wui-rating-star-preview`,pa=`wui-rating-previewing`,ma=`wui-rating-star-full`,ha=`wui-rating-star-empty`,ga=[ma,`wui-rating-star-half`,ha],_a=e=>[...e.querySelectorAll(da)].filter(e=>e instanceof HTMLElement),va=class extends g{_onChange;_onOver;_onLeave;constructor(){super(),this._onChange=e=>{let t=e.target;t instanceof HTMLInputElement&&t.type===`radio`&&this._fill(Number(t.value))},this._onOver=e=>{if(this.hasAttribute(`disabled`))return;let t=y(e.target,da);t instanceof HTMLElement&&this._preview(Number(t.dataset.value))},this._onLeave=()=>this._preview(0)}connectedCallback(){this.addEventListener(`change`,this._onChange),this.addEventListener(`mouseover`,this._onOver),this.addEventListener(`mouseleave`,this._onLeave)}disconnectedCallback(){this.removeEventListener(`change`,this._onChange),this.removeEventListener(`mouseover`,this._onOver),this.removeEventListener(`mouseleave`,this._onLeave)}_fill(e){for(let t of _a(this))t.classList.remove(...ga),t.classList.add(Number(t.dataset.value)<=e?ma:ha)}_preview(e){this.classList.toggle(pa,e>0);for(let t of _a(this))t.classList.toggle(fa,e>0&&Number(t.dataset.value)<=e)}},ya=class extends g{_doc;_onKeyDown;constructor(){super(),this._doc=null,this._onKeyDown=e=>{this.hasAttribute(`keys`)&&le(e,{j:()=>this._press(`.wui-record-pager-next`),k:()=>this._press(`.wui-record-pager-prev`)},this.closest(`[${x}]`))}}connectedCallback(){this._doc=this.ownerDocument,_(this._doc,`wui-record-pager has no owner document`).addEventListener(`keydown`,this._onKeyDown)}disconnectedCallback(){this._doc?.removeEventListener(`keydown`,this._onKeyDown),this._doc=null}_press(e){let t=this.querySelector(e);!(t instanceof HTMLElement)||t instanceof HTMLButtonElement&&t.disabled||t.getAttribute(`aria-disabled`)===`true`||t.click()}},ba=6e4,xa=60*ba,Sa=24*xa,Ca=(e,t)=>`${e} ${t}${e===1?``:`s`}`;function wa(e,t=Date.now()){let n=_t(e);if(!Number.isFinite(n))return`-`;let r=t-n,i=Math.abs(r);if(i>=7*Sa)return M(n);if(i<ba)return`just now`;let[a,o]=i<xa?[Math.floor(i/ba),`minute`]:i<Sa?[Math.floor(i/xa),`hour`]:[Math.floor(i/Sa),`day`];return r>0?`${Ca(a,o)} ago`:`in ${Ca(a,o)}`}function Ta(e){let t=_t(e);return Number.isFinite(t)?`${M(t,{pattern:`datetime`})} IST`:`-`}var Ea=3e4,Da=new Set,Oa=null,ka=()=>{if(!(typeof document<`u`&&document.hidden))for(let e of Da)e.refresh()},Aa=e=>{Da.add(e),Da.size===1&&(Oa=setInterval(ka,Ea),document.addEventListener(`visibilitychange`,ka))},ja=e=>{Da.delete(e),Da.size===0&&(clearInterval(Oa??void 0),Oa=null,document.removeEventListener(`visibilitychange`,ka))},Ma=class extends g{_observer;constructor(){super(),this._observer=null}connectedCallback(){this.refresh(),Aa(this),this._observer=new MutationObserver(()=>this.refresh()),this._observer.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`datetime`]})}disconnectedCallback(){ja(this),this._observer?.disconnect(),this._observer=null}refresh(){let e=this.querySelector(`time[datetime]`);if(!(e instanceof HTMLTimeElement))return;let t=wa(e.getAttribute(`datetime`));e.textContent!==t&&(e.textContent=t)}},Na=/^[0-9]$/,Pa=()=>typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches,Fa=class extends g{_connected;_signature;_digits;_reels;_roll;_onRollEnd;static get observedAttributes(){return[`value`,`format`,`unit`,`decimals`,`duration`]}constructor(){super(),this._connected=!1,this._signature=null,this._digits=[],this._reels=[],this._roll=null,this._onRollEnd=e=>{e.target instanceof Element&&e.target.classList.contains(`wui-rolling-number-reel`)&&this.removeAttribute(`data-rolling`)}}connectedCallback(){this._connected=!0;let e=this.querySelector(`.wui-rolling-number-roll`);this._roll=e instanceof HTMLElement?e:null,this._roll?.addEventListener(`transitionend`,this._onRollEnd),this._draw(!1)}disconnectedCallback(){this._connected=!1,this._roll?.removeEventListener(`transitionend`,this._onRollEnd)}attributeChangedCallback(){this._connected&&this._draw(!0)}_text(){let e=this.getAttribute(`value`),t=e===null||e.trim()===``?NaN:Number(e);if(!Number.isFinite(t))return null;let n=this.getAttribute(`decimals`);return bt(t,{style:this.getAttribute(`format`)||`number`,unit:this.getAttribute(`unit`)||void 0,decimals:n===null||n===``?void 0:Number(n)})}_showText(e){let t=this.querySelector(`.wui-rolling-number-text`);t instanceof HTMLElement&&t.textContent!==e&&(t.firstChild?t.firstChild.nodeValue=e:t.append(e))}_clear(e){e.replaceChildren(),this.removeAttribute(`data-ready`),this._signature=null,this._digits=[],this._reels=[]}_draw(e){let t=this.querySelector(`.wui-rolling-number-roll`);if(!(t instanceof HTMLElement))return;let n=this._text();if(n===null||(this._showText(n),Pa())){this._clear(t);return}this.toggleAttribute(`data-rolling`,e);let r=Number(this.getAttribute(`duration`));this.getAttribute(`duration`)&&Number.isFinite(r)&&r>=0?this.style.setProperty(`--wui-roll-duration`,`${r}ms`):this.style.removeProperty(`--wui-roll-duration`);let i=[...n],a=i.filter(e=>Na.test(e)).map(Number),o=i.map(e=>Na.test(e)?`#`:e).join(``);if(e&&o===this._signature){this._reels.forEach((e,t)=>{e.style.setProperty(`--wui-roll-digit`,String(a[t]))}),this._digits=a;return}let s=this._digits,c=[],l=[],u=0;for(let t of i){if(!Na.test(t)){let e=document.createElement(`span`);e.className=`wui-rolling-number-char`,e.textContent=t,l.push(e);continue}let n=document.createElement(`span`);n.className=`wui-rolling-number-digit`;let r=document.createElement(`span`);r.className=`wui-rolling-number-reel`;for(let e=0;e<10;e+=1){let t=document.createElement(`span`);t.textContent=String(e),r.append(t)}let i=a.length-1-u,o=e?s[s.length-1-i]??0:a[u];r.style.setProperty(`--wui-roll-digit`,String(o)),n.append(r),l.push(n),c.push(r),u+=1}t.replaceChildren(...l),e&&(t.offsetWidth,c.forEach((e,t)=>{e.style.setProperty(`--wui-roll-digit`,String(a[t]))})),this._signature=o,this._digits=a,this._reels=c,this.setAttribute(`data-ready`,``)}},Ia=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:``},La=(e,t=`wui-opt-avatar`)=>{let n=Ia(e.avatar);return!n&&!e.initials?``:`<span class="avatar ${t}" aria-hidden="true"><span class="avatar-face">${B(e.initials??``)}</span>${n?`<img class="avatar-img" src="${Ra(n)}" alt="" />`:``}</span>`},Ra=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),za=n({createListboxKeyNav:()=>Va,moveActiveRow:()=>Ha}),Ba=e=>e.target instanceof Element?e.target.tagName:void 0;function Va(e){let{getVisibleOptions:t,getActive:n,setActive:r,onEnter:i,onEscape:a,onTypeahead:o,typeaheadMs:s=500}=e,c=``,l=null,u=()=>{clearTimeout(l??void 0),l=null,c=``};return{handler:e=>{let d=t(),f=n(),p=Ba(e)===`INPUT`||Ba(e)===`TEXTAREA`;if(e.key===`ArrowDown`)e.preventDefault(),r(Math.min(f+1,d.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),r(Math.max(f-1,0));else if(e.key===`Home`&&!p)e.preventDefault(),d.length&&r(0);else if(e.key===`End`&&!p)e.preventDefault(),d.length&&r(d.length-1);else if(e.key===`PageDown`&&!p){if(e.preventDefault(),!d.length)return;r(Math.min((f<0?0:f)+8,d.length-1))}else if(e.key===`PageUp`&&!p){if(e.preventDefault(),!d.length)return;r(Math.max((f<0?0:f)-8,0))}else if(e.key===`Enter`)i&&(e.preventDefault(),i(d[f],d));else if(e.key===`Escape`)a&&a();else if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&Ba(e)!==`INPUT`&&Ba(e)!==`TEXTAREA`){e.preventDefault(),clearTimeout(l??void 0),c+=e.key.toLowerCase(),l=setTimeout(u,s);let t=d.findIndex(e=>e.textContent.trim().toLowerCase().startsWith(c));t>=0&&(r(t),o&&o(e.key,t,d))}},clearTypeahead:u,teardown:u}}function Ha(e,t){let n=e.querySelector(`.is-active`);n!==t&&(n?.classList.remove(`is-active`),t?.classList.add(`is-active`))}var Ua=n({filterOptions:()=>Wa,renderOptions:()=>Ka});function Wa(e,t){let n=String(t??``).trim().toLowerCase();return n?e.filter(e=>[Mr(e),e.description,e.meta].some(e=>String(e??``).toLowerCase().includes(n))):e}var Ga=new WeakMap;function Ka(e,t,n={}){let{selected:r=[],query:i=``,status:a=`idle`,emptyText:o=`No matches`,searchingText:s=`Searching…`,hintText:c=`Type to search…`,actionRow:l=[],recents:u=null}=n,d=new Set(r.map(String)),f=Wa(t,i),p=e.id,m=0,h=()=>`${p}-opt-${m++}`,g=e=>`<button type="button" role="option" id="${B(h())}" class="wui-select-option wui-select-add" data-value="${B(e.value)}" data-custom="true" aria-selected="false">${B(e.label)}</button>`,_=l.filter(e=>e.position===`top`).map(g).join(``),v=u?.options.length?`<div class="wui-select-group">${B(u.label)}</div>${u.options.map(e=>qa(e,h(),d.has(String(e.value)))).join(``)}<div class="wui-select-sep" aria-hidden="true"></div>`:``,y=``,b=``;for(let e of f)e.group&&e.group!==y&&(b+=`<div class="wui-select-group">${B(e.group)}</div>`),y=e.group??``,b+=qa(e,h(),d.has(String(e.value)));let x=l.filter(e=>e.position===`bottom`).map(g).join(``),S=``;a===`loading`?S=`<div class="wui-select-loading"><span class="wui-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>${B(s)}</div>`:a===`hint`?S=`<div class="wui-select-hint">${B(c)}</div>`:(a===`empty`||f.length===0&&l.length===0)&&(S=`<div class="wui-select-empty">${B(o)}</div>`);let C=_+v+b+x+S;Ga.get(e)!==C&&(Ga.set(e,C),e.innerHTML=C)}function qa(e,t,n){let r=!!e.disabled,i=r&&e.disabledHint?` title="${B(e.disabledHint)}"`:``,a=`id="${B(t)}" role="option" data-value="${B(e.value)}" aria-selected="${n}"${r?` aria-disabled="true"`:``}${i}`,o=`<span class="wui-select-check" aria-hidden="true">${z(`check`)}</span>`;if(!e.description&&!e.meta)return`<button type="button" class="wui-select-option${n?` selected`:``}" ${a}>${La(e)}<span class="wui-select-opt-name">${kr(e)}</span>${o}</button>`;let s=e.description?`<span class="wui-select-opt-desc">${B(e.description)}</span>`:``,c=e.meta?`<span class="wui-select-opt-meta">${B(e.meta)}</span>`:``;return`<div class="wui-select-option wui-select-option-rich${n?` selected`:``}" ${a}>${La(e)}<span class="wui-select-option-text"><span class="wui-opt-label">${kr(e)}</span>${s}</span>${c}${o}</div>`}var Ja=Object.freeze([`single`,`multiple`,`search`,`tag`,`country`]),W=e=>e===`multiple`||e===`tag`,Ya=n({registerSelectPart:()=>Za,selectPart:()=>Qa}),Xa=new Map;function Za(e,t){Xa.set(e,t)}function Qa(e){return Xa.get(e)}var $a={chips:`select-chips`,search:`select-search`,country:`phone`,recents:`select-recents`};function eo(e){let t=Object.hasOwn($a,e)?$a[e]:void 0;if(!t)return Promise.reject(Error(`Unknown <wui-select> part: ${e}.`));let n=Qa(e);return n?Promise.resolve(n):sr(t).then(()=>_(Qa(e),`The ${e} part of <wui-select> did not register.`))}var to=n({searchesRemotely:()=>no}),no=e=>typeof e.loadOptions==`function`||!!e.getAttribute(`source`)||e.hasAttribute(`remote`),ro=n({WuiSelect:()=>io}),io=class extends g{static formAssociated=!0;_internals;_value;_optionsProp;_partOptions;_known;_loadOptionsFn;_validateFn;_declared;_query;_ownsFilter;_active;_status;_error;_nav;_parts;_partSig;_partsMounted;_partToken;_rendered;_searchShown;_defaultValue;_warnedMode;_warnedDensity;_reposition;_hoverTimer;_hoverOpened;_onHoverOver;_onHoverOut;_onDocClick;_bindGlobal=()=>{throw Error(`The select is not wired.`)};_reanchor;_reanchorScroll;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.aria-label.aria-describedby.aria-invalid.min-chars.debounce.source.remote.allow-custom.add-label.searching-text.hint-text.value-label.value-avatar.value-initials.max-tags.allow-duplicates.separators.pattern.invalid-message.create-label.collapse-chips.selected-text.clear-all-label.countries.suggested.suggested-label.all-countries-label.recents-key.recents-limit.recents-label`.split(`.`)}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=``,this._optionsProp=null,this._partOptions=null,this._known=new Map,this._loadOptionsFn=null,this._validateFn=null,this._declared=void 0,this._query=``,this._ownsFilter=!1,this._active=-1,this._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._reposition=()=>{this._menuOpen()&&this._place()},this._hoverTimer=null,this._hoverOpened=!1,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)},co)))},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()},lo)))}}connectedCallback(){this.addEventListener(`pointerover`,this._onHoverOver),this.addEventListener(`pointerout`,this._onHoverOut),this._rendered?this._bindGlobal():this.render(),this._ensureParts(),this._mountParts()}disconnectedCallback(){this.removeEventListener(`pointerover`,this._onHoverOver),this.removeEventListener(`pointerout`,this._onHoverOut),this._clearHover(),this._teardown(),this._teardownParts()}attributeChangedCallback(e,t,n){e===`value`?(this._value=go(n,W(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===`mode`&&(this._value=go(this._value,W(this.mode)),this._partOptions=null,this._known.clear(),this._ensureParts()),(e===`source`||e===`remote`||e===`recents-key`)&&this._ensureParts(),mo.has(e)?this._rendered&&(this._drawValue(),this.renderList()):po.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`:oo(e)?e:(e!==this._warnedMode&&(this._warnedMode=e,zn(`<wui-select> mode "${e}" is not one of ${Ja.join(`, `)}; it is treated as "single".`)),`single`)}_checkDensity(){let e=this.getAttribute(`density`);e===null||so.includes(e)||e===this._warnedDensity||(this._warnedDensity=e,zn(`<wui-select> density "${e}" is not one of ${so.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=go(e,W(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(){I(this)||this._open({focus:!1})}closeMenu({focusControl:e=!1}={}){this._close(),e&&this._refs().control?.focus()}renderList(){let e=this._refs();e.list&&(Ka(e.list,this._listOptions(),{selected:this._selectedValues(),query:this._ownsFilter?``:this._query,status:this._status,emptyText:this.getAttribute(`empty-text`)||`No matches`,searchingText:this.getAttribute(`searching-text`)||`Searching…`,hintText:this.getAttribute(`hint-text`)||void 0,actionRow:this._actionRows(),recents:this._recents()}),this._active>=this._visible().length&&(this._active=-1),this._active>=0&&this._setActive(this._active,{reveal:!1}),this._menuOpen()&&this._place())}render(){let e=this._carry();this._teardownParts(),this._snapshotDeclared();let t=this.mode;this._checkDensity();let n=W(t),r=t===`tag`,i=n&&(r||this.hasAttribute(`allow-custom`));this._value=go(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=go(this._value,n));let a=this.getAttribute(`size`),o=a===`sm`?` wui-select-sm`:a===`lg`?` wui-select-lg`:``,s=this.getAttribute(`icon`),c=this.getAttribute(`prefix`),l=this.hasAttribute(`clearable`),u=this.hasAttribute(`disabled`);this.id||=`wui-select-${Math.random().toString(36).slice(2,9)}`;let d=`${this.id}-listbox`,f=`${this.id}-entry-error`,p=this.getAttribute(`aria-describedby`)?.trim(),m=p?`${p} ${f}`:f,h=this.hasAttribute(`aria-invalid`)||this._error?` aria-invalid="true"`:``,g=this.hasAttribute(`required`)&&!i?` aria-required="true"`:``,_=` aria-label="${B(this._accessibleName())}" aria-describedby="${B(m)}"${h}${g}`,v=i?``:` role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${B(d)}"`,y=n?`<div class="input wui-select-control wui-select-multi"${v}${_}${u?` aria-disabled="true"`:r?``:` tabindex="0"`}>`:`<button type="button" class="input wui-select-control"${v}${_}${u?` disabled`:``}>`,b=`${s?z(s,{className:`wui-select-icon`}):``}${c?`<span class="wui-select-prefix">${B(c)}</span>`:``}<span class="wui-select-value" data-label></span>${l?`<span class="wui-select-reset" role="button" aria-label="Clear selection" hidden>${z(`x`)}</span>`:``}${z(`chevron-down`,{className:`wui-select-caret`})}`,x=this.getAttribute(`searchable`),S=x===null?t===`multiple`||t===`country`||this._autoSearch():x!==`false`,C=t===`search`||S&&!i;this._searchShown=C;let w=this.getAttribute(`search-placeholder`)||(t===`country`?`Search countries…`:`Search…`),T=C?`<div class="wui-select-search">${z(`search`)}<input class="wui-select-input" placeholder="${B(w)}" aria-label="${B(w)}" aria-autocomplete="list" /><button type="button" class="wui-select-clear" aria-label="Clear search" hidden>${z(`x`)}</button></div>`:``;this.innerHTML=`
45
45
  <div class="wui-select${o}">
46
46
  ${y}${b}${n?`</div>`:`</button>`}
47
47
  <div class="wui-select-menu wui-select-menu-fixed" hidden>
48
- ${w}
48
+ ${T}
49
49
  <div class="wui-select-options" role="listbox" id="${B(d)}" tabindex="-1"${n?` aria-multiselectable="true"`:``}></div>
50
50
  </div>
51
51
  </div>
52
- <div class="field-error wui-select-error" id="${B(f)}" aria-live="polite"${this._error?``:` hidden`}>${B(this._error)}</div>`,this._rendered=!0,this._syncMirror(),this._syncValidity(),this._drawValue(),this._syncReset(),this.renderList(),this._wire(),On(this,this.querySelector(`.wui-select-control`)),this._mountParts(e)}_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||`Select`}_snapshotDeclared(){if(this._declared)return;let e=[...this.querySelectorAll(`:scope > wui-option`)];e.length&&(this._declared=e.map(e=>{let t={value:e.getAttribute(`value`)??_o(e).trim(),label:e.innerHTML,[xr]:!0,selected:e.hasAttribute(`selected`)};for(let[n,r]of co){let i=e.getAttribute(n);i&&(t[r]=i)}return e.hasAttribute(`disabled`)&&(t.disabled=!0),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){if(e===``)return;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`)||ao[this.mode]}_hasValue(){return Array.isArray(this._value)?this._value.length>0:this._value!==``}_selectedValues(){return Array.isArray(this._value)?this._value:this._hasValue()?[this._value]:[]}_applyValue(){this._syncMirror(),this._syncValidity(),this._rendered&&(this._drawValue(),this._syncReset(),this.renderList())}_syncMirror(){W(this.mode)?Nn(this,this._selectedValues()):L(this,this._value)}_drawValue(){let e=this._refs();if(!e.value)return;let t=W(this.mode),n=t?void 0:this._optionFor(this._value);this._syncTitle(n),this._syncValueAvatar(),this._activePartsList().some(e=>e.renderValue?.()===!0)||(t?(e.value.classList.remove(`wui-select-placeholder`),e.value.textContent=``):(e.value.classList.toggle(`wui-select-placeholder`,!n),e.value.innerHTML=n?Er(n):B(this._placeholder())))}_syncTitle(e){let t=this.querySelector(`.wui-select-control`);if(!t)return;let n=e&&!this.hasAttribute(`title`)?kr(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=!W(this.mode)&&this._hasValue()?Pa({avatar:this.getAttribute(`value-avatar`),initials:this.getAttribute(`value-initials`)},`avatar-xs`):``;e.classList.toggle(`wui-has-value-avatar`,!!t),t&&e.insertAdjacentHTML(`afterbegin`,`<span class="wui-select-value-avatar" aria-hidden="true">${t}</span>`)}_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},`Please fill in this field.`,t instanceof HTMLElement?t:void 0)}else e.setValidity({})}}_syncReset(){let e=G(this,`.wui-select-reset`,HTMLElement);e&&(e.hidden=!(this.hasAttribute(`clearable`)&&this._hasValue()&&!I(this)))}_syncInvalid(){let e=this.querySelector(`.wui-select-control`);e&&(this.hasAttribute(`aria-invalid`)||this._error?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}_syncError(){let e=G(this,`.wui-select-error`,HTMLElement);e&&(e.textContent=this._error,e.hidden=!this._error),this._syncInvalid()}_refs(){return{control:G(this,`.wui-select-control`,HTMLElement),value:G(this,`.wui-select-value`,HTMLElement),menu:G(this,`.wui-select-menu`,HTMLElement),list:G(this,`.wui-select-options`,HTMLElement),search:G(this,`.wui-select-search input`,HTMLInputElement),input:G(this,`.wui-select-draft`,HTMLInputElement)}}_menuOpen(){let e=G(this,`.wui-select-menu`,HTMLElement);return e!==null&&!e.hidden}_visible(){let e=this._refs();return e.list?go(e.list,`.wui-select-option`):[]}_setActive(e,{reveal:t=!0}={}){let n=this._refs();if(!n.list||!n.control)return;let r=this._visible();this._active=e;let i=e>=0?r[e]??null:null;za(n.list,i),i?(t&&i.scrollIntoView({block:`nearest`}),n.control.setAttribute(`aria-activedescendant`,i.id)):n.control.removeAttribute(`aria-activedescendant`)}_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}_place(){let e=this._refs();if(!e.control||!e.menu)return;let t=this.hasAttribute(`open`)?{below:!0}:{};if(this.getAttribute(`density`)===`compact`){let n=e.control.getBoundingClientRect();e.menu.style.width=`max-content`,e.menu.style.minWidth=`${n.width}px`,e.menu.style.maxWidth=`280px`,d(e.control,e.menu,t)}else d(e.control,e.menu,{matchWidth:!0,...t})}_open({focus:e=!0}={}){let t=this._refs();if(!t.menu||!t.control)return;let n=!t.menu.hidden;t.menu.hidden=!1,t.control.setAttribute(`aria-expanded`,`true`),t.control.classList.add(`open`),this._query=t.input?t.input.value:``,this._ownsFilter=this._ownsFilter&&this._query!==``;let r=G(this,`.wui-select-search .wui-select-clear`,HTMLElement);if(r&&(r.hidden=!0),t.search&&(t.search.value=``),this.renderList(),f(this,this._reposition),e&&(t.search?.focus(),this._setActive(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;let n=!t.menu.hidden;t.menu.hidden=!0,t.control.setAttribute(`aria-expanded`,`false`),t.control.classList.remove(`open`),this._setActive(-1),this._nav?.clearTypeahead(),p(this),n&&this.dispatchEvent(new CustomEvent(`wui-select:close`,{bubbles:!0}))}_onQueryChange(e){this._query=e,this._setActive(-1);let t=G(this,`.wui-select-search .wui-select-clear`,HTMLElement);t&&(t.hidden=!e);let n=!1;for(let t of this._activePartsList())t.onQuery?.(e)===!0&&(n=!0);this._ownsFilter=n,this.renderList()}_pick(e){if(e.getAttribute(`aria-disabled`)===`true`)return;let t=e.dataset.custom===`true`,n=e.dataset.value??``,r=t?{value:n,label:_o(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);W(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`&&$a(this)}_onKeyDown(e){if(!I(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`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this._open({focus:!0}));return}}e.key===`Escape`&&(e.preventDefault(),e.stopPropagation()),_(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=_(G(this,`.wui-select`,HTMLElement),`The select wrapper is missing.`),i=G(this,`.wui-select-search .wui-select-clear`,HTMLElement),a=G(this,`.wui-select-reset`,HTMLElement);this._nav=Ra({getVisibleOptions:()=>this._visible(),getActive:()=>this._active,setActive:e=>this._setActive(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:()=>{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._visible().length>0||this._actionRows().length>0;n&&r&&!this._menuOpen()&&!I(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=_(e.search,`The search input is missing.`);t.value=``,this._onQueryChange(``),t.focus()}),t.addEventListener(`click`,e=>{if(!(e.target instanceof Element&&e.target.closest(`[data-remove]`))){if(this.mode===`tag`){if(I(this))return;this._refs().input?.focus(),!this._menuOpen()&&this._draftOpens()&&this._open({focus:!1})}else e.target instanceof HTMLInputElement?!this._menuOpen()&&!I(this)&&this._open({focus:!1}):this._menuOpen()?this._close():I(this)||this._open({focus:!0})}}),a?.addEventListener(`click`,e=>{e.stopPropagation(),this.commit(W(this.mode)?[]:``),this._close(),t.focus()}),n.addEventListener(`click`,n=>{let r=ho(n).closest(`.wui-select-option`);if(r instanceof HTMLElement&&(this._pick(r),W(this.mode))){let n=this.querySelector(`.wui-select-draft`);(e.search??(n instanceof HTMLElement?n:t)).focus()}}),n.addEventListener(`mousedown`,e=>{W(this.mode)&&e.target instanceof Element&&e.target.closest(`.wui-select-option`)&&e.preventDefault()}),n.addEventListener(`mousemove`,e=>{let t=ho(e).closest(`.wui-select-option`);t instanceof HTMLElement&&!t.classList.contains(`is-active`)&&this._setActive(this._visible().indexOf(t),{reveal:!1})}),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._bindGlobal=()=>{this._teardown(),this._onDocClick=e=>{this._menuOpen()&&!e.composedPath().includes(this)&&this._close()},document.addEventListener(`click`,this._onDocClick),this._menuOpen()&&f(this,this._reposition)},this.hasAttribute(`open`)&&this._open({focus:!1}),this._bindGlobal()}_teardown(){this._onDocClick&&=(document.removeEventListener(`click`,this._onDocClick),null),p(this),this._nav?.teardown()}_activePartsList(){return this._partsMounted?_(this._parts,`The mounted parts are missing.`):[]}_ensureParts(){if(!this.isConnected)return;let e=fo(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=>vo(this,e))).then(e=>{n===this._partToken&&(this._parts=e.filter(e=>e!==null),this._mountParts())})}_mountParts(e={draft:``,query:``}){if(!this._parts||this._partsMounted||!this._rendered||!this.isConnected)return;this._partsMounted=!0;let t=no(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??``}}},no=e=>{let{control:t,value:n,menu:r,list:i}=e;return{control:_(t,`control missing`),value:_(n,`value missing`),menu:_(r,`menu missing`),list:_(i,`list missing`),search:e.search,input:e.input}},ro=e=>Ga.includes(e),io=[`comfortable`,`compact`],ao={single:`Select…`,search:`Select…`,multiple:`Select…`,tag:`Add…`,country:`Select country`},oo=new Set([`countries`,`suggested`,`suggested-label`,`all-countries-label`,`max-tags`,`pattern`,`collapse-chips`,`source`,`remote`,`min-chars`]),so=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`]),co=[[`icon`,`icon`],[`description`,`description`],[`meta`,`meta`],[`group`,`group`],[`avatar`,`avatar`],[`initials`,`initials`],[`disabled-hint`,`disabledHint`]],lo=(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),uo=(e,t)=>t===`multiple`?[`chips`]:t===`search`?[`search`]:t===`country`?[`country`]:t===`tag`?$a(e)?[`chips`,`search`]:[`chips`]:[],fo=(e,t)=>e.hasAttribute(`recents-key`)?[`recents`,...uo(e,t)]:uo(e,t),po=`This control could not load. Reload the page.`,mo=e=>typeof e==`object`&&!!e&&`default`in e&&typeof e.default==`function`,ho=e=>{if(e.target instanceof Element)return e.target;throw Error(`The event target is not an element.`)},G=(e,t,n)=>{let r=e.querySelector(t);return r instanceof n?r:null},go=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),_o=e=>{let t=e.textContent;if(t===null)throw Error(`The element has no text.`);return t},vo=(e,t)=>Za(t).then(e=>{if(!mo(e))throw Error(`The part ${t} has no default export.`);return e.default()}).catch(()=>(document.dispatchEvent(new CustomEvent(Un,{bubbles:!0,composed:!0,detail:{chunk:t}})),e.setError(po),null)),yo=`wui-shortcuts-open-change`;function bo(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}function xo(e,t){return[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement)}var So=class extends g{_doc;_onKeyDown;_onClick;_onDocClick;static get observedAttributes(){return[`open`,`no-trigger`]}constructor(){super(),this._doc=null,this._onKeyDown=e=>this._keydown(e),this._onClick=e=>this._click(e),this._onDocClick=e=>{let t=y(e.target,`[data-wui-shortcuts-open]`)?.getAttribute(`data-wui-shortcuts-open`);t&&this.matches(t)?this.setOpen(!0):this.open&&!e.composedPath().includes(this)&&this.setOpen(!1,{focus:!1})}}connectedCallback(){this._doc=this.ownerDocument,this._doc.addEventListener(`keydown`,this._onKeyDown),this._doc.addEventListener(`click`,this._onDocClick),this.addEventListener(`click`,this._onClick),this.hasAttribute(`open`)&&!this.open&&this.setOpen(!0,{focus:!1}),this._place(),this._syncTrigger()}attributeChangedCallback(e,t,n){e===`no-trigger`?this._syncTrigger():this._sheet()&&n!==null!==this.open&&this.setOpen(n!==null)}disconnectedCallback(){this._doc?.removeEventListener(`keydown`,this._onKeyDown),this._doc?.removeEventListener(`click`,this._onDocClick),this.removeEventListener(`click`,this._onClick),this._doc=null}get open(){let e=this._sheet();return!(!e||e.hidden)}set open(e){let t=e===!0||e===``||e===`true`;this._sheet()?t!==this.open&&this.setOpen(t):this.toggleAttribute(`open`,t)}setOpen(e,{focus:t=!0}={}){let n=this._sheet();if(!n)return;let r=n.hidden===e;n.hidden=!e,this.toggleAttribute(`open`,e),e&&this._place();let i=bo(this,`.wui-shortcut-toggle`);i?.setAttribute(`aria-expanded`,String(e)),r&&this.dispatchEvent(new CustomEvent(yo,{bubbles:!0,detail:{open:e}})),t&&(e?bo(n,`.wui-shortcut-close`)?.focus():i?.focus())}_sheet(){return bo(this,`.wui-shortcut-sheet`)}_syncTrigger(){let e=bo(this,`.wui-shortcut-toggle`);e&&(e.hidden=this.hasAttribute(`no-trigger`))}_place(){let e=this._sheet();if(!e||e.hidden)return;e.classList.remove(`wui-shortcut-sheet-below`,`wui-shortcut-sheet-start`);let t=_(this.ownerDocument.defaultView,`WuiShortcuts needs a window to place its sheet`),n={top:0,left:0,right:t.innerWidth,bottom:t.innerHeight};for(let e=this.parentElement;e&&e!==this.ownerDocument.documentElement;e=e.parentElement){let r=t.getComputedStyle(e);if(r.overflowX===`visible`&&r.overflowY===`visible`)continue;let i=e.getBoundingClientRect();n.top=Math.max(n.top,i.top),n.left=Math.max(n.left,i.left),n.right=Math.min(n.right,i.right),n.bottom=Math.min(n.bottom,i.bottom)}let r=e.getBoundingClientRect();r.top<n.top&&e.classList.add(`wui-shortcut-sheet-below`),r.left<n.left&&e.classList.add(`wui-shortcut-sheet-start`)}_scope(){let e=this.closest(`[${x}]`);return e instanceof HTMLElement?e:null}_items(){let e=this.getAttribute(`items`);return e?xo(_(this._scope()??this._doc,`WuiShortcuts used before it was connected`),e):[]}_click(e){let t=e.target;t instanceof Element&&(t.closest(`.wui-shortcut-toggle`)?this.setOpen(!this.open):t.closest(`.wui-shortcut-close`)&&this.setOpen(!1))}_tickFocused(){let e=this._items(),t=_(this._doc,`WuiShortcuts used before it was connected`).activeElement,n=t?.closest?.(`li, tr`),r=e.find(e=>e===t||e.contains(t)||n?.contains(e)),i=(r?.closest(`li, tr`)??r)?.querySelector(`input[type="checkbox"]`);i instanceof HTMLInputElement&&i.click()}_focusSearch(){let e=this.getAttribute(`search`);if(!e)return;let t=_(this._doc,`WuiShortcuts used before it was connected`);(bo(this._scope()??t,e)??bo(t,e))?.focus()}_keydown(e){if(e.defaultPrevented)return;let t=ne(e);if(!t)return;if(t===`esc`&&this.open){e.preventDefault(),this.setOpen(!1);return}let n=this._scope(),r={help:()=>this.setOpen(!this.open)};if(this.getAttribute(`items`)&&(r.j=()=>ue(this._items(),1),r.k=()=>ue(this._items(),-1),r.x=()=>this._tickFocused()),this.getAttribute(`search`)&&(r.slash=()=>this._focusSearch()),r[t]){le(e,r,n);return}if(t===`enter`)return;let i=_(this._doc,`WuiShortcuts used before it was connected`),a=e.target instanceof Node?e.target:null;if(se(i)||!ce(a,n)||ae(a))return;let o=re(t),s=xo(this,`.wui-shortcut-keys [data-shortcut]`).find(e=>e.dataset.shortcut===o);if(!s)return;let c=(n??i).querySelector(`[aria-current="true"]`)?.closest(`[data-key]`),l=c instanceof HTMLElement?c.dataset.key??null:null;if(!this.dispatchEvent(new CustomEvent(`wui:shortcut`,{bubbles:!0,cancelable:!0,detail:{key:o,itemKey:l}}))){e.preventDefault();return}let u=s.dataset.target,d=u?bo(i,u):null;d&&(e.preventDefault(),d.click())}},Co=3,wo=`Show more`,To=`Show less`,Eo=class extends g{_width;_observer;_toggle;_onClick;constructor(){super(),this._width=-1,this._observer=null,this._toggle=null,this._onClick=()=>this.toggle()}connectedCallback(){let e=this.querySelector(`.wui-show-more-toggle`);if(this._toggle=e instanceof HTMLButtonElement?e:null,!this._toggle)return;let t=Number.parseInt(this.getAttribute(`lines`)??``,10);this.style.setProperty(`--wui-show-more-lines`,String(t>=1?t:Co)),this._toggle.addEventListener(`click`,this._onClick),this._sync(),this._check(),typeof ResizeObserver<`u`&&(this._observer=new ResizeObserver(()=>{this.clientWidth!==this._width&&this._check()}),this._observer.observe(this))}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,this._toggle?.removeEventListener(`click`,this._onClick),this._toggle=null}get expanded(){return this.hasAttribute(`expanded`)}toggle(e=!this.expanded){this.toggleAttribute(`expanded`,!!e),this._sync(),this.dispatchEvent(new CustomEvent(`wui:show-more:toggle`,{bubbles:!0,detail:{expanded:this.expanded}}))}_sync(){let e=_(this._toggle,`WuiShowMore used before it was connected`),t=this.expanded;e.setAttribute(`aria-expanded`,String(t)),e.textContent=t?this.getAttribute(`less-label`)||To:this.getAttribute(`more-label`)||wo}_check(){let e=this.querySelector(`.wui-show-more-body`);if(!(e instanceof HTMLElement))return;this._width=this.clientWidth;let t=this.expanded;t&&this.removeAttribute(`expanded`);let n=e.scrollHeight>e.clientHeight+1;t&&this.setAttribute(`expanded`,``);let r=_(this._toggle,`WuiShowMore used before it was connected`);r.hidden=!n}},Do=class extends g{_measure;_resize;_mutation;_ownTabindex;constructor(){super(),this._measure=()=>this.measure(),this._resize=null,this._mutation=null,this._ownTabindex=!1}connectedCallback(){this.measure(),this.addEventListener(`mouseover`,this._measure),typeof ResizeObserver<`u`&&(this._resize=new ResizeObserver(this._measure),this._resize.observe(this)),this._mutation=new MutationObserver(this._measure),this._mutation.observe(this,{childList:!0,subtree:!0,characterData:!0})}disconnectedCallback(){this.removeEventListener(`mouseover`,this._measure),this._resize?.disconnect(),this._mutation?.disconnect(),this._resize=null,this._mutation=null}measure(){let e=this.querySelector(`.wui-truncate-text`);e&&(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight?(this.setAttribute(`data-wui-tip`,(e.textContent??``).replace(/\s+/g,` `).trim()),this.hasAttribute(`tabindex`)||(this.setAttribute(`tabindex`,`0`),this._ownTabindex=!0)):(this.removeAttribute(`data-wui-tip`),this._ownTabindex&&=(this.removeAttribute(`tabindex`),!1)))}},Oo=`wui-whats-new-read`,ko=`wui-whats-new:`,Ao=`data-open`,jo=`data-wui-unread`,Mo=0,No=e=>{let t=Date.parse(e);return Number.isNaN(t)?-1/0:t},Po=(e,t)=>No(t)>No(e)?t:e,Fo=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Io=class extends g{_doc;_stored;_observer;_onTriggerClick;_onKeyDown;_onPointerDown;static get observedAttributes(){return[`storage-key`,`read-through`,`indicator`]}constructor(){super(),this._doc=null,this._stored=``,this._observer=null,this._onTriggerClick=()=>this.isOpen?this.close(!0):this.open(),this._onKeyDown=e=>{e.key===`Escape`&&this.isOpen&&(e.stopPropagation(),this.close(!0))},this._onPointerDown=e=>{this.isOpen&&!e.composedPath().includes(this)&&this.close(!1)}}get isOpen(){return this.hasAttribute(Ao)}get _trigger(){return Fo(this,`.wui-whats-new-trigger`)}get _panel(){return Fo(this,`.wui-whats-new-panel`)}get _dot(){return Fo(this,`.wui-whats-new-dot`)}connectedCallback(){this._doc=this.ownerDocument;let e=this._panel,t=this._trigger;e&&t&&(e.id||=`wui-whats-new-${++Mo}`,t.setAttribute(`aria-controls`,e.id),t.setAttribute(`aria-expanded`,`false`),t.addEventListener(`click`,this._onTriggerClick),this.addEventListener(`keydown`,this._onKeyDown),this._stored=this._load(),this._refresh(),typeof MutationObserver<`u`&&(this._observer=new MutationObserver(()=>this._refresh()),this._observer.observe(e,{childList:!0,subtree:!0})))}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,this._trigger?.removeEventListener(`click`,this._onTriggerClick),this.removeEventListener(`keydown`,this._onKeyDown),this._doc?.removeEventListener(`pointerdown`,this._onPointerDown,!0),p(this),this.removeAttribute(Ao),this._doc=null}attributeChangedCallback(e,t,n){t!==n&&this._doc&&(e===`storage-key`&&(this._stored=this._load()),this._refresh())}open(){let e=this._panel;e&&!this.isOpen&&(this.setAttribute(Ao,``),this._trigger?.setAttribute(`aria-expanded`,`true`),this._place(),f(this,()=>this._place()),this.ownerDocument.addEventListener(`pointerdown`,this._onPointerDown,!0),e.focus({preventScroll:!0}),this._markRead())}close(e){this.isOpen&&(this.removeAttribute(Ao),this._trigger?.setAttribute(`aria-expanded`,`false`),this.ownerDocument.removeEventListener(`pointerdown`,this._onPointerDown,!0),p(this),this._refresh(),e&&this._trigger?.focus())}_place(){d(this._trigger,this._panel,{clampHeight:!0})}_entries(){let e=[];for(let t of this.querySelectorAll(`.wui-whats-new-entry`))t instanceof HTMLElement&&e.push({entry:t,date:t.querySelector(`time[datetime]`)?.getAttribute(`datetime`)??``});return e}_newest(){return this._entries().reduce((e,{date:t})=>Po(e,t),``)}_seenPoint(){return Po(this._stored,this.getAttribute(`read-through`)??``)}_refresh(){let e=this._seenPoint(),t=this._entries(),n=0;for(let{entry:r,date:i}of t){let t=No(i)>No(e);t&&n++,this.isOpen&&r.hasAttribute(jo)||r.toggleAttribute(jo,t)}this.toggleAttribute(jo,n>0);let r=this._dot;r&&(r.textContent=this.getAttribute(`indicator`)===`count`&&n>0?String(n):``)}_markRead(){let e=this._newest();!e||No(e)<=No(this._seenPoint())||(this._stored=Po(this._stored,e),this._save(this._stored),this._refresh(),this.dispatchEvent(new CustomEvent(Oo,{bubbles:!0,detail:{through:e}})))}_storage(){let e=this.getAttribute(`storage-key`);if(!e)return null;try{let t=this.ownerDocument.defaultView;return t?{store:t.localStorage,key:ko+e}:null}catch{return null}}_load(){let e=this._storage();return e?e.store.getItem(e.key)??``:this._stored}_save(e){let t=this._storage();t&&t.store.setItem(t.key,e)}},Lo=n({APP_BUTTON_MARKER:()=>Ro,buttonClass:()=>Ho}),Ro=`AppButton`,zo=new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),Bo={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 Vo(e){return Object.hasOwn(Bo,e)}function Ho(e=`primary`,t=`solid`,n=`md`){if(!zo.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!Vo(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=Bo[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}var Uo=n({COPY_FEEDBACK_MS:()=>Wo,copyTextToClipboard:()=>Go}),Wo=2e3;async function Go(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.top=`0`,t.style.left=`0`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),!!n}catch{return!1}}var Ko=n({MENTION_ID_PATTERN:()=>qo,mentionLabel:()=>Xo,mentionTextFromValue:()=>$o,mentionValueFromText:()=>es,mentionedIds:()=>ts,parseMentionValue:()=>Qo}),qo=/^[A-Za-z0-9_.:-]{1,64}$/,Jo=/@(\\+)\[|@\[([^[\]\n]{1,100})\]\(([A-Za-z0-9_.:-]{1,64})\)/g,Yo=/@(\\*)\[/g;function Xo(e){return String(e??``).replace(/[[\]\r\n]+/g,` `).replace(/\s+/g,` `).trim().slice(0,100)}var Zo=e=>e.replace(Yo,(e,t)=>`@\\${t}[`);function Qo(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(Jo))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 $o(e){let t=``,n=[];for(let r of Qo(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 es(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}`||!qo.test(e.id)||(i+=Zo(n.slice(a,e.start)),i+=`@[${e.label}](${e.id})`,a=e.end);return i+Zo(n.slice(a))}function ts(e){let t=[];for(let n of Qo(e))`id`in n&&!t.includes(n.id)&&t.push(n.id);return t}var ns=n({deriveStepStatus:()=>rs,stepperHeaderItems:()=>is});function rs(e,t){return typeof t==`number`?e<t?`done`:e===t?`active`:`pending`:`pending`}function is(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 as=n({SELECT_ALL_LABEL:()=>os,SELECT_CELL_CLASS:()=>K,SELECT_ROW_LABEL:()=>ss,addRowSelectCells:()=>hs,addSelectColumn:()=>gs,attachShiftRange:()=>ys,createSelectHeaderCell:()=>ls,createSelectRowCell:()=>us,createSelectSpacerCell:()=>ds,syncSelectAll:()=>_s}),os=`Select all rows`,ss=`Select row`,K=`wui-select-cell`,cs=(e,t)=>{let n=e.createElement(`input`);return n.type=`checkbox`,n.className=`wui-check`,n.setAttribute(`aria-label`,t),n};function ls(e=document){let t=e.createElement(`th`);return t.className=K,t.appendChild(cs(e,os)),t}function us(e=document,{disabled:t=!1}={}){let n=e.createElement(`td`);n.className=K;let r=cs(e,ss);return r.disabled=t,n.appendChild(r),n}function ds(e=document){let t=e.createElement(`td`);return t.className=K,t}var fs=e=>e.firstElementChild?.classList.contains(K),ps=e=>e.matches(`.wui-group-row, .wui-virtual-spacer`),ms=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n);function hs(e){for(let t of e){if(fs(t)||ps(t))continue;let e=t.getAttribute(`data-row-selectable`)===`false`;t.insertBefore(us(t.ownerDocument,{disabled:e}),t.firstChild)}}function gs(e){let t=e.querySelector(`thead tr`);if(!(t instanceof HTMLTableRowElement))return null;fs(t)||t.insertBefore(ls(e.ownerDocument),t.firstChild),hs(ms(e,`tbody tr`,HTMLTableRowElement));for(let t of ms(e,`tfoot tr`,HTMLTableRowElement))fs(t)||t.insertBefore(ds(e.ownerDocument),t.firstChild);let n=t.querySelector(`.${K} .wui-check`);return n instanceof HTMLInputElement?n:null}function _s(e){let t=e.querySelector(`thead .${K} .wui-check`),n=ms(e,`tbody tr .wui-check:not(:disabled)`,HTMLInputElement),r=n.length,i=n.filter(e=>e.checked).length;t instanceof HTMLInputElement&&(t.checked=r>0&&i===r,t.indeterminate=i>0&&i<r);for(let t of ms(e,`tbody tr`,HTMLTableRowElement)){let e=t.querySelector(`.wui-check`);t.classList.toggle(`is-selected`,e instanceof HTMLInputElement&&e.checked)}return{selected:i,total:r}}var vs=`tbody .${K} .wui-check:not(:disabled)`;function ys(e,t){let n=null,r=e=>e instanceof Element&&e.matches(`.wui-select-cell .wui-check:not(:disabled)`)&&!!e.closest(`tbody`);e.addEventListener(`mousedown`,e=>{e.shiftKey&&r(e.target)&&e.preventDefault()}),e.addEventListener(`click`,i=>{let a=i.target;if(r(a)){if(i.shiftKey&&n?.isConnected&&n!==a){let r=ms(e,vs,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 bs=n({matchSegments:()=>xs});function xs(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 Ss=Object.freeze({anchorOverlay:a,buttonClass:Lo,calendarMath:mn,copyText:Uo,dataTable:Ct,defineElement:r,devWarn:Fn,elementBase:m,fieldState:Tn,formatters:ze,formMirror:kn,glyphs:lr,iconGlyphs:lr,listboxKeyNav:Ia,loader:Vn,mentionText:Ko,notificationDays:Xr,optionLabel:br,partRegistry:Ka,selectList:Ba,selectRemote:Qa,stepperHeader:ns,tableSelect:as,textMatch:bs,wuiHttp:li,WuiSelect:eo,zone:De}),Cs=`image/jpeg,image/png,image/webp,image/heic,image/heif,.heic,.heif`,ws=10,Ts=512,Es=`image/webp`,Ds=[96,48],Os={dialogTitle:`Edit photo`,dialogSubtitle:`Drag to position the photo, then zoom or rotate it.`,save:`Save photo`,cancel:`Cancel`,choose:`Upload photo`,change:`Change photo`,camera:`Take photo`,remove:`Remove photo`,unreadable:`That photo could not be opened. Choose a JPG, PNG or WebP image.`,heicUnreadable:`This browser cannot open HEIC photos. Choose a JPG, PNG or WebP image instead.`,cropFailed:`That photo could not be saved. Try again, or choose another one.`};function ks(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 As(e){return ks(e)?Os.heicUnreadable:Os.unreadable}function js(e,t){let n=Number(t);return{name:e?.name||`photo`,type:Es,size:Number.isInteger(n)&&n>0?n:512}}var Ms=`/`,Ns=`.search-wrap.wui-search-collapsible`,Ps=`.wui-topsearch-panel`,Fs=`.modal, wui-drawer[open]`,Is=new WeakSet,Ls=e=>{let t=e.querySelector(`.wui-search-toggle`);return t instanceof HTMLElement?t:null},Rs=e=>{let t=e.querySelector(`.search-input`);return t instanceof HTMLInputElement?t:null},zs=e=>[...e.querySelectorAll(Ns)].filter(e=>e instanceof HTMLElement);function Bs(e){e.classList.remove(`is-collapsed`),Ls(e)?.setAttribute(`aria-expanded`,`true`),Rs(e)?.focus()}function Vs(e){Rs(e)?.value||(e.classList.add(`is-collapsed`),Ls(e)?.setAttribute(`aria-expanded`,`false`))}function Hs(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=Ls(e),n=Rs(e);t?.addEventListener(`click`,()=>Bs(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n?.value||(r.preventDefault(),Vs(e),t?.focus())}),e.addEventListener(`focusout`,t=>{let n=t.relatedTarget;n instanceof Node&&e.contains(n)||Vs(e)})}function Us(e){Is.has(e)||(Is.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||ae(t.target instanceof Node?t.target:null)||t.target instanceof Element&&t.target.closest(Fs)||e.querySelector(Ps))return;let n=zs(e).find(e=>e.offsetParent!==null);n&&(t.preventDefault(),Bs(n))}))}function Ws(e=document){let t=e;for(let e of zs(t))Hs(e);Us(e instanceof Element?e.ownerDocument:e)}var Gs=`data-wui-command-shortcut`,Ks=`k`,qs=new WeakSet;function Js(e,t){return!(e.ctrlKey||e.metaKey)||e.altKey||e.shiftKey||e.repeat?!1:String(e.key).toLowerCase()===String(t).toLowerCase()}function Ys(e){return e.nodeType===Node.DOCUMENT_NODE}function Xs(e){let t=_(window.bootstrap?.Modal,`data-wui-command-shortcut: Bootstrap's bundle (window.bootstrap) is not loaded on this page.`),n=e.closest(`.modal`);n&&t.getOrCreateInstance(n).show()}function Zs(e){let t=Ys(e)?e:e.ownerDocument;!qs.has(t)&&e.querySelector(`[data-wui-command-shortcut]`)&&(qs.add(t),t.addEventListener(`keydown`,e=>{for(let n of t.querySelectorAll(`[${Gs}]`))if(Js(e,n.getAttribute(`data-wui-command-shortcut`)||Ks)){e.preventDefault(),n.localName===`wui-command-palette`||n.classList.contains(`modal`)?Xs(n):(n.focus(),`select`in n&&typeof n.select==`function`&&n.select());return}}))}var Qs=`image/png,image/jpeg,image/webp`,$s=5,ec={"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`]},tc={"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`,"text/plain":`text file`,"image/*":`images`,"video/*":`videos`,"audio/*":`audio`,".png":`PNG`,".jpg":`JPG`,".jpeg":`JPG`,".webp":`WEBP`,".gif":`GIF`,".svg":`SVG`,".heic":`HEIC`,".heif":`HEIC`,".pdf":`PDF`,".txt":`text file`},nc=e=>String(e||``).split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean),rc=[`.png`,`.jpg`,`.jpeg`,`.webp`,`.gif`,`.svg`,`.bmp`,`.avif`,`.heic`,`.heif`];function ic(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 rc.some(e=>r.endsWith(e))}var ac=[`KB`,`MB`,`GB`];function oc(e){if(e<1024)return`${e} B`;let t=e/1024,n=0;for(;t>=1024&&n<ac.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${ac[n]}`}function sc(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 cc(e){let t=nc(e);return t.length?t.every(e=>e.startsWith(`.`)?rc.includes(e):e===`image/*`||e.startsWith(`image/`)):!1}function lc(e){let t=[];for(let n of nc(e)){let e=tc[n]||(n.startsWith(`.`)?n.slice(1).toUpperCase():n.toUpperCase());t.includes(e)||t.push(e)}return t.length<=1?t[0]||`supported`:`${t.slice(0,-1).join(`, `)} or ${t[t.length-1]}`}function uc(e,t){let n=nc(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&&(ec[e]||[]).some(e=>i.endsWith(e)))}function dc(e,t={}){if(!e)return null;let n=t.accept===void 0?Qs:t.accept,r=t.maxSizeMb===void 0?5:t.maxSizeMb;if(!uc(e,n)){let e=lc(n),t=nc(n).map(e=>[`images`,`videos`,`audio`].includes(tc[e]??``));return t.every(Boolean)?`Choose ${e}.`:t.some(Boolean)?`Choose ${e.endsWith(` file`)?`${e}s`:`${e} files`}.`:`Choose a ${e.endsWith(` file`)?e:`${e} file`}.`}return r!==null&&r>0&&e.size>r*1024*1024?`Keep the file under ${r} MB.`:null}function fc(e,t){let n=Array.from(e||[]),r=t.multiple?n:n.slice(0,1),i=[],a=[];for(let e of r){let n=dc(e,{accept:t.accept,maxSizeMb:t.maxSizeMb});n?a.push({file:e,message:n}):i.push(e)}return{files:i,rejections:a}}function pc(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}=fc(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 mc=/[0-9]/,hc={9:mc,A:/[A-Za-z]/,"*":/[0-9A-Za-z]/},gc=/[9A*]/,_c=new Set([`text`,`tel`,`search`,`url`,`password`]),vc=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},yc=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},bc=e=>e.length<=3?e:`${e.slice(0,-3).replace(/\B(?=(\d{2})+(?!\d))/g,`,`)},${e.slice(-3)}`,xc=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());return t?`${t[3]}-${t[2]}-${t[1]}`:e};function Sc(e,{upper:t=!1,normalize:n,valid:r,post:i=e=>e,message:a=`Enter the full value`}={}){let o=[...e].map(e=>{let t=hc[e];return t?{re:t}:{lit:e}}),s=o.filter(e=>e.re).length;return{inputMode:o.every(e=>!e.re||e.re===mc)?`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 Cc(){return{inputMode:`decimal`,post:e=>e,message:`Enter a valid amount`,extract(e){let t=``,n=!1,r=0;for(let i of e)mc.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=bc(t)+(e.includes(`.`)?`.${n}`:``);return{text:r,isRaw:[...r].map(e=>e!==`,`)}},isValid:e=>/^\d+(\.\d{1,2})?$/.test(e)}}var wc={"phone-in":()=>Sc(`99999 99999`,{normalize:vc,valid:e=>/^[6-9]/.test(e),message:`Enter a 10-digit mobile number`}),pan:()=>Sc(`AAAAA9999A`,{upper:!0,valid:e=>/^[A-Z]{5}\d{4}[A-Z]$/.test(e),message:`Enter a valid PAN`}),gstin:()=>Sc(`99AAAAA9999A***`,{upper:!0,valid:e=>/^\d{2}[A-Z]{5}\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/.test(e),message:`Enter a valid GSTIN`}),aadhaar:()=>Sc(`9999 9999 9999`,{valid:e=>/^[2-9]/.test(e),message:`Enter a valid 12-digit Aadhaar number`}),ifsc:()=>Sc(`AAAA*******`,{upper:!0,valid:e=>/^[A-Z]{4}0[A-Z0-9]{6}$/.test(e),message:`Enter a valid IFSC`}),"pin-code":()=>Sc(`999999`,{valid:e=>/^[1-9]/.test(e),message:`Enter a valid 6-digit PIN code`}),date:()=>Sc(`99-99-9999`,{normalize:xc,valid:yc,post:(e,t)=>e.length===8&&yc(e)?`${e.slice(4)}-${e.slice(2,4)}-${e.slice(0,2)}`:t,message:`Enter a valid date as DD-MM-YYYY`}),amount:Cc},Tc=Object.keys(wc),Ec=e=>{let t=String(e).toLowerCase();return Object.hasOwn(wc,t)?t:void 0},Dc=e=>gc.test(String(e))&&Ec(e)===void 0,Oc=new Map;function kc(e){if(e==null||e===``)return null;let t=String(e),n=Oc.get(t);return n===void 0&&(n=Dc(t)?Sc(t):Object.hasOwn(wc,t)?wc[t]?.()??null:null,Oc.set(t,n)),n}var Ac=(e,t)=>e.normalize?e.normalize(t):t;function jc(e,t){let n=kc(e);return n?n.extract(Ac(n,String(t??``))):String(t??``)}function Mc(e,t){let n=kc(e);if(!n)return String(t??``);let r=n.extract(Ac(n,String(t??``)));return n.post(r,n.layout(r).text)}function Nc(e,t){let n=kc(e);return n?n.layout(n.extract(Ac(n,String(t??``)))).text:String(t??``)}var Pc=(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},Fc=new WeakMap,Ic=e=>Fc.get(e)?.(),Lc=new WeakMap;function Rc(e,t,n,r){let i=e.getAll(t),a=Lc.get(e)??new Set;Lc.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 zc(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 Bc(e,{mask:t,postFormatted:n=!1,onChange:r,onInvalidChange:i}={}){let a=kc(t);if(!a||!_c.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??zc(e),d=null,f=!1,p=!1,m=!1,h=``,g=``,v,y=()=>{let e=m?h:``;e!==g&&(g=e,u(g))},b=(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&&_c.has(e.type))){let t=Pc(u,o);e.setSelectionRange(t,t)}e.dataset.maskRaw=s,h=s&&!a.isValid(s)?a.message:``,e.setCustomValidity(h),y(),i&&s!==d&&r?.(s,l),d=s},x=Object.getOwnPropertyDescriptor(e,`value`),S=x??s;Object.defineProperty(e,"value",{configurable:!0,enumerable:S.enumerable,get:()=>_(S.get,`input value getter missing`).call(e),set:t=>{if(_(S.set,`input value setter missing`).call(e,t),p)return;let n=Ac(a,e.value);b(n,n.length,!0)}});let C=()=>{f=!0,e.dispatchEvent(new Event(`input`,{bubbles:!0})),f=!1},w=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:Ac(a,e.value);b(r,e.selectionStart??r.length,!0)},ee=()=>{p=!0},T=()=>{p=!1;let t=Ac(a,e.value);b(t,e.selectionStart??t.length,!0),C()},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||(b(e.value.slice(0,o)+e.value.slice(o+1),n?o:r,!0),C()))},D=t=>{if(e.readOnly||e.disabled)return;let n=t.clipboardData?.getData(`text`);if(n==null)return;t.preventDefault();let r=Ac(a,n),i=e.selectionStart??e.value.length,o=e.selectionEnd??i;b(e.value.slice(0,i)+r+e.value.slice(o),i+r.length,!0),C()},te=()=>{let t=a.extract(e.value);return a.post(t,a.layout(t).text)},O=()=>{m=!0,y()};e.addEventListener(`input`,w),e.addEventListener(`beforeinput`,E),e.addEventListener(`paste`,D),e.addEventListener(`compositionstart`,ee),e.addEventListener(`compositionend`,T),e.addEventListener(`blur`,O),e.addEventListener(`invalid`,O);let k=e.form,ne=t=>{e.name&&!e.disabled&&Rc(t.formData,e.name,e.value,te())},re=()=>{clearTimeout(v),v=setTimeout(()=>{m=!1,b(Ac(a,e.value),e.value.length,!0)},0)};n||(k?.addEventListener(`formdata`,ne),Fc.set(e,te)),k?.addEventListener(`reset`,re),k?.addEventListener(`submit`,O);let ie=Ac(a,e.value);return b(ie,ie.length,!1),()=>{clearTimeout(v),e.removeEventListener(`input`,w),e.removeEventListener(`beforeinput`,E),e.removeEventListener(`paste`,D),e.removeEventListener(`compositionstart`,ee),e.removeEventListener(`compositionend`,T),e.removeEventListener(`blur`,O),e.removeEventListener(`invalid`,O),k?.removeEventListener(`formdata`,ne),k?.removeEventListener(`reset`,re),k?.removeEventListener(`submit`,O),Fc.delete(e),x?Object.defineProperty(e,"value",x):Reflect.deleteProperty(e,`value`),m=!1,h=``,y(),e.setCustomValidity(``),delete e.dataset.maskRaw,l&&e.removeAttribute(`inputmode`)}}function Vc(){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=Ic(e);return n===void 0?t.call(this,e):n},e.wuiMaskHook=!0}var Hc=new WeakMap,Uc,Wc=e=>{Hc.has(e)||Hc.set(e,Bc(e,{mask:e.dataset.appMask,postFormatted:e.hasAttribute(`data-mask-post-formatted`)}))},Gc=e=>[...e.querySelectorAll(`input[data-app-mask]`)].filter(e=>e instanceof HTMLInputElement),Kc=e=>e instanceof Element?[...e instanceof HTMLInputElement&&e.matches(`input[data-app-mask]`)?[e]:[],...Gc(e)]:[];function qc(){Uc||typeof MutationObserver>`u`||(Uc=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Kc(e))Hc.get(t)?.(),Hc.delete(t);for(let e of t.addedNodes)for(let t of Kc(e))Wc(t)}}),Uc.observe(document.documentElement,{childList:!0,subtree:!0}))}function Jc(e=document){Vc();for(let t of Gc(e))Wc(t);e===document&&qc()}function Yc(e,t){let n=e.getInstance(t);n&&(n.tip?.isConnected?(t.addEventListener(`hidden${e.EVENT_KEY}`,()=>n.dispose(),{once:!0}),n.hide()):n.dispose())}var Xc=`data-wui-bulk-in-bar`,Zc=`[data-wui-page-header-bar][data-wui-bulk-for]`,Qc=new WeakSet;function $c(e){return`${st(e,{decimals:0})} selected`}function el(e){let t=e.dataset.wuiBulkFor;return t===void 0?null:document.getElementById(t)}function tl(e){return typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`}function nl(e,t){return[...e.querySelectorAll(t)].flatMap(e=>e instanceof HTMLElement?[e]:[])}function rl(e,t){for(let n of nl(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?$c(t):``}function il(e=document){for(let t of nl(e,Zc))el(t)?.setAttribute(Xc,``);Qc.has(document)||(Qc.add(document),document.addEventListener(`selectionchange`,e=>{if(!(e instanceof CustomEvent)||!tl(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 nl(document,Zc))el(n)?.contains(t)&&rl(n,e.detail.selected)}))}var al={minLength:10,uppercase:!0,lowercase:!0,digit:!0,special:!0,uniqueChars:0,customRules:[]},ol=`Password requirements`;function sl(e){return e===!0||e==null?{...al}:{...al,...e}}function cl(e){let t=sl(e),n=[];if(t.minLength>0&&n.push({key:`length`,label:`At least ${t.minLength} characters long`,test:e=>e.length>=t.minLength}),t.uppercase&&n.push({key:`uppercase`,label:`At least one uppercase letter`,test:e=>/[A-Z]/.test(e)}),t.lowercase&&n.push({key:`lowercase`,label:`At least one lowercase letter`,test:e=>/[a-z]/.test(e)}),t.digit&&n.push({key:`digit`,label:`At least one digit`,test:e=>/[0-9]/.test(e)}),t.special&&n.push({key:`special`,label:`At least one special character`,test:e=>/[^A-Za-z0-9]/.test(e)}),t.uniqueChars>0){let e=t.uniqueChars;n.push({key:`unique`,label:`At least ${e} unique character${e>1?`s`:``}`,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 ll(e,t){let n=e==null?``:String(e);return cl(t).map(e=>({key:e.key,label:e.label,met:e.test(n)}))}function ul(e,t){return ll(e,t).every(e=>e.met)}var dl=`wui:row-drop`,fl=`is-drop-over`,pl=`application/x-wui-rows`,ml=`wui-row-dragging`,hl=`[data-wui-drop-target]`,gl=`tbody tr[data-row-key]`,_l=`input, button, a, select, textarea, label`,vl=`.wui-select-cell .wui-check`,yl=new WeakMap,bl=new WeakSet,xl=null,Sl=null;function Cl(e){let t=e.querySelector(vl);return t instanceof HTMLInputElement&&t.checked}function wl(e){let t=[];for(let n of e.querySelectorAll(`tbody tr`))n instanceof HTMLElement&&Cl(n)&&t.push(n.dataset.rowKey);return t}function Tl(e,t){return y(e,t)}function El(e,t){let n=Tl(e,t);return n instanceof HTMLElement?n:null}function Dl(e){let t=e.textContent;if(t===null)throw Error(`A drop target has no text content.`);return t.trim()}var Ol=e=>typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`;function kl(){xl=null,document.body.classList.remove(ml);for(let e of document.querySelectorAll(`${hl}.${fl}`))e.classList.remove(fl)}function Al(e,t,n){e.dispatchEvent(new CustomEvent(dl,{bubbles:!0,detail:{keys:t,target:n.dataset.wuiDropTarget}}))}function jl(e){let t=El(e.target,hl);if(!t||!xl)return;e.preventDefault();let n=_(e.dataTransfer,`A drag event arrived without its DataTransfer.`);n.dropEffect=`move`,t.classList.add(fl)}function Ml(e){let t=El(e.target,hl);!t||e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||t.classList.remove(fl)}function Nl(e){let t=El(e.target,hl);if(!t||!xl)return;e.preventDefault(),t.classList.remove(fl);let{root:n,keys:r}=xl;Al(n,r,t),kl()}function Pl(e){let t=El(e.target,hl);t&&Sl?.keys.length&&(e.preventDefault(),Al(Sl.root,Sl.keys,t))}function Fl(e){(e.key===`Enter`||e.key===` `)&&Pl(e)}function Il(e){bl.has(e)||(bl.add(e),e.addEventListener(`dragover`,jl),e.addEventListener(`dragenter`,jl),e.addEventListener(`dragleave`,Ml),e.addEventListener(`drop`,Nl),e.addEventListener(`click`,Pl),e.addEventListener(`keydown`,Fl))}function Ll(e){let t=yl.get(e);if(t)return t;Il(e.ownerDocument||e);let n=t=>{let n=El(t.target,gl);if(!n||!e.contains(n))return;let r=Tl(t.target,_l);r&&n.contains(r)||(n.draggable=!0)},r=t=>{let n=El(t.target,gl);if(!n||!e.contains(n))return;let r=Cl(n)?wl(e):[n.dataset.rowKey],i=_(t.dataTransfer,`A drag event arrived without its DataTransfer.`);i.setData(pl,JSON.stringify(r)),i.setData(`text/plain`,r.join(`,`)),i.effectAllowed=`move`,xl={root:e,keys:r},document.body.classList.add(ml)},i=t=>{let n=t instanceof CustomEvent?t.detail:void 0;if(Ol(n)){let{keys:t}=n;n.selected>0?Sl={root:e,keys:Array.isArray(t)?t:wl(e)}:n.selected===0&&(Sl=null)}Rl(document)};e.addEventListener(`pointerdown`,n),e.addEventListener(`dragstart`,r),e.addEventListener(`dragend`,kl),e.addEventListener(`selectionchange`,i);let a=()=>{e.removeEventListener(`pointerdown`,n),e.removeEventListener(`dragstart`,r),e.removeEventListener(`dragend`,kl),e.removeEventListener(`selectionchange`,i),yl.delete(e)};return yl.set(e,a),a}function Rl(e=document){let t=e.querySelector(`[data-wui-row-drag] tbody tr ${vl}:checked`)!==null;for(let n of e.querySelectorAll(hl)){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`)||Dl(n);n.setAttribute(`aria-label`,`Move to ${e}`)}for(let t of e.querySelectorAll(`.wui-drop-tray`))t.hasAttribute(`role`)||(t.setAttribute(`role`,`toolbar`),t.setAttribute(`aria-label`,`Move to`))}function zl(e=document){for(let t of e.querySelectorAll(`[data-wui-row-drag]`))t instanceof HTMLElement&&Ll(t);Rl(e.ownerDocument||e)}var Bl=`.table-wrap, .table-responsive, [class*="table-responsive-"]`,Vl=1;function Hl(e){let t=()=>{let t=e.scrollWidth-e.clientWidth,n=Math.abs(e.scrollLeft);e.toggleAttribute(`data-wui-overflow-start`,t>Vl&&n>Vl),e.toggleAttribute(`data-wui-overflow-end`,t>Vl&&n<t-Vl),e.toggleAttribute(`data-wui-overflow-top`,e.scrollTop>Vl)},n=()=>{if(e.scrollWidth-e.clientWidth>Vl){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 Ul=new WeakMap,Wl,Gl=e=>{Ul.has(e)||Ul.set(e,Hl(e))},Kl=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(Bl)].filter(e=>e instanceof HTMLElement);return[...t,...n]};function ql(){Wl||typeof MutationObserver>`u`||(Wl=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Kl(e))Ul.get(t)?.(),Ul.delete(t);for(let e of t.addedNodes)for(let t of Kl(e))Gl(t)}}),Wl.observe(document.documentElement,{childList:!0,subtree:!0}))}function Jl(e=document){for(let t of e.querySelectorAll(Bl))t instanceof HTMLElement&&Gl(t);e===document&&ql()}var Yl=Object.freeze([`page`,`pageSize`,`sortBy`,`sortOrder`,`search`]),Xl=`search`,Zl=Object.freeze({loading:`Loading rows`,error:`These rows did not load. Try again.`,network:`The connection dropped before the rows loaded. Check it and try again.`,forbidden:`You do not have access to these rows.`,retry:`Retry`,actionFailed:`That did not work. Try again.`,actionForbidden:`You do not have permission to do that.`,empty:`No rows`}),Ql=5,$l=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,eu=e=>e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled,tu=e=>$l(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},Y=(e,t,n)=>{let r=e.closest(t);return r instanceof n?r:null},nu=e=>e.localName===`wui-select`,ru=new WeakMap,iu=(e,t)=>{let n=Number(e);return Number.isInteger(n)?n:t},au=e=>({total:iu(e.dataset.total,0),totalCapped:e.dataset.totalCapped===`true`,page:iu(e.dataset.page,1),pageSize:iu(e.dataset.pageSize,0),sortBy:e.dataset.sortBy||``,sortOrder:e.dataset.sortOrder===`desc`?`desc`:`asc`}),ou=(e,t)=>{e&&X().toast(e,{variant:t})},su=(e,t)=>{if(!e)return;let n=new Set([...e.elements].filter(e=>!tu(e)||e.hasAttribute(`data-range-mirror`)).map(e=>e.getAttribute(`name`)).filter(e=>e&&!Yl.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},cu=new Intl.NumberFormat(`en-IN`),lu=(e,t)=>t?`${cu.format(e)}+`:cu.format(e),uu=(e,t,n)=>{let r=e.closest(`.wui-list-card`),i=r?J(r,`.wui-list-card-count`,HTMLElement):null;i&&(i.textContent=lu(t,n))};function du(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(ru.has(e))continue;let t=pu(e);ru.set(e,t),e.hasAttribute(`data-load-first-page`)&&t.reload()}}function fu(e){let t=e instanceof Element?Y(e,`[data-wui-server]`,HTMLElement):null;return t&&ru.get(t)||null}function pu(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||Zl.loading,errorText:e.dataset.errorText||Zl.error},c=new URL(r,window.location.href),l=new Set(c.searchParams.keys()),u=n.hasAttribute(`data-app-datatable-selectable`),d=new Set,f=!1,p=Si(),m=new AbortController,h={signal:m.signal},g=_(J(n,`:scope > tbody[data-wui-rows]`,HTMLTableSectionElement),`A server-paged table needs its rows in <app-table-rows> (tbody[data-wui-rows]).`),v=au(g),y=null,b=null,x=e=>{let t=new URLSearchParams;for(let[n,r]of new URLSearchParams(e))l.has(n)||t.append(n,r);return t},S=e=>x(new URL(e,window.location.href).search),C=e=>{let t=e.toString();return`${window.location.pathname}${t?`?${t}`:``}${window.location.hash}`},w=e=>{let t=new URL(c.href);for(let[n,r]of e)l.has(n)||t.searchParams.append(n,r);return t.origin===window.location.origin?`${t.pathname}${t.search}`:t.href},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},T=ee(s.urlState?x(window.location.search):new URLSearchParams,v);s.urlState&&C(T)!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&window.history.replaceState(window.history.state,``,C(T));let E=(e,n)=>t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:n})),D=e=>{o&&(o.textContent=e)},te=e=>{if(e.total===0)return Zl.empty;let t=e.pageSize>0?Math.max(1,Math.ceil(e.total/e.pageSize)):1,n=e.totalCapped?lu(e.total,!0):`${e.total}`;return`Page ${e.page} of ${t}, ${n} ${e.total===1?`row`:`rows`}`},O=()=>q(n,`:scope > thead > tr:first-child > th`,HTMLTableCellElement),k=e=>{if(u&&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.`)},ne=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`)}},re=e=>{if(u){hs(e);for(let t of e){let e=J(t,`.${K} .wui-check:not(:disabled)`,HTMLInputElement);e&&(f&&d.add(t.dataset.rowKey),e.checked=d.has(t.dataset.rowKey))}_s(n)}ne(e);let t=O();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`)})},ie=e=>re(q(e,`:scope > tr`,HTMLTableRowElement)),ae=e=>{for(let t of e.querySelectorAll(`:scope > template[data-wui-pager], :scope > template[data-wui-empty], :scope > template[data-wui-filters]`))t.remove()},oe=e=>e?.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0})),se=(e,t)=>{if(!i)return;let n=J(e,`:scope > template[data-wui-empty]`,HTMLTemplateElement);oe(i),t.total===0&&n?(i.replaceChildren(n.content.cloneNode(!0)),i.hidden=!1):(i.replaceChildren(),i.hidden=!0)},ce=e=>{let r=au(e),i=r.sortBy!==v.sortBy||r.sortOrder!==v.sortOrder?Jt(g.rows):null;if(a){let t=J(e,`:scope > template[data-wui-pager]`,HTMLTemplateElement);oe(a),a.replaceChildren(...t?[t.content.cloneNode(!0)]:[]),a.hidden=!1}se(e,r);let o=J(e,`:scope > template[data-wui-filters]`,HTMLTemplateElement),c=s.filtersRegion&&o?J(document,s.filtersRegion,HTMLElement):null;c&&o&&(oe(c),c.replaceChildren(o.content.cloneNode(!0))),ae(e),oe(g),n.replaceChild(e,g),g=e;let l=f&&r.total!==v.total;return v=r,l&&(f=!1),t.removeAttribute(`data-wui-table-error`),ie(e),ve(),Yt(e.rows,i),l&&be(),c},le=e=>{let t=document.createElement(`template`);t.innerHTML=`<table>${e}</table>`;let n=J(t.content,`tbody[data-wui-rows]`,HTMLTableSectionElement);return n&&k(n),n?document.importNode(n,!0):null},ue=(e,t=O())=>{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},de=()=>{if(g.querySelector(`:scope > tr:not([data-wui-skeleton])`))return;let e=Math.max(1,O().length);g.replaceChildren(...Array.from({length:Ql},()=>{let t=ue(e);return t.setAttribute(`data-wui-skeleton`,``),t})),t.removeAttribute(`data-wui-table-error`),i&&(i.hidden=!0)},fe=e=>{e?(t.setAttribute(`aria-busy`,`true`),de()):t.removeAttribute(`aria-busy`)},pe=e=>e===`forbidden`?Zl.forbidden:e===`network`?Zl.network:s.errorText,me=e=>{let n=pe(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`,r.innerHTML=z(e===`forbidden`?`lock`:`alert-circle`,{size:24});let a=document.createElement(`div`);a.className=`empty-state-title`,a.textContent=n;let o=document.createElement(`div`);o.className=`empty-state-action`;let s=document.createElement(`button`);s.type=`button`,s.className=Ho(`primary`,`outline`,`sm`),s.dataset.wui=Ro,s.setAttribute(`data-wui-table-retry`,``),s.textContent=Zl.retry,o.append(s),t.append(r,a,o),oe(i),i.replaceChildren(t),i.hidden=!1}D(n)},he=()=>s.filtersForm?J(document,s.filtersForm,HTMLFormElement):null,A=async(n,r=`none`,{quiet:i=!1}={})=>{let a=new URLSearchParams(n);i||(y={query:a,mode:r},fe(!0),D(s.loadingText)),E(`wui:table:loading`,{query:a.toString()});let o=await p.run(w(a));if(o.kind===`aborted`||o.kind===`stale`||o.kind===`session`)return o;i||fe(!1);let c=null;if(o.ok)try{c=le(o.html)}catch(e){R(e)}if(!o.ok||!c){let e=o.ok?`server`:o.kind;return i?In(`A quiet server table refresh failed; the rows on screen are kept.`,e):me(e),E(`wui:table:error`,{status:o.status,kind:e,message:pe(e)}),o}let l=ce(c);return T=ee(a,v),su(he(),T),s.urlState&&r===`push`?window.history.pushState(window.history.state,``,C(T)):s.urlState&&r===`replace`&&window.history.replaceState(window.history.state,``,C(T)),i||D(te(v)),X().refresh(t),l&&X().refresh(l),uu(e,v.total,v.totalCapped),E(`wui:table:loaded`,{...v,query:T.toString()}),o},ge=e=>(e.delete(`page`),e),_e=()=>q(n,`:scope > thead th[data-sort-key]`,HTMLTableCellElement),ve=()=>{for(let e of _e()){let t=e.dataset.sortKey===v.sortBy;e.setAttribute(`aria-sort`,t?v.sortOrder===`desc`?`descending`:`ascending`:`none`)}};for(let e of _e())if(e.classList.add(`sortable`),e.tabIndex=0,!e.querySelector(`.sort-icon`)){let t=e.classList.contains(`num`)||e.classList.contains(`text-end`),n=document.createElement(`span`);n.className=t?`sort-icon wui-sort-lead`:`sort-icon`,n.innerHTML=z(`chevrons-up-down`,{size:14}),t?e.prepend(n):e.append(n)}let ye=e=>{let t=ge(new URLSearchParams(T)),n=v.sortBy===e&&v.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?Y(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&ye(t.dataset.sortKey??``)}),n.addEventListener(`keydown`,e=>{if(e.key!==`Enter`&&e.key!==` `)return;let t=e.target instanceof Element?Y(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&(e.preventDefault(),ye(t.dataset.sortKey??``))});let be=()=>{_s(n);let e=f?{selected:v.total,total:v.total,allMatching:f}:{selected:d.size,total:v.total};n.dispatchEvent(new CustomEvent(`selectionchange`,{bubbles:!0,detail:e}))};u&&(ys(n,(e,t)=>{for(let n of e){let e=Y(n,`tr`,HTMLTableRowElement)?.dataset.rowKey;e&&(t?d.add(e):d.delete(e))}t||(f=!1)}),n.addEventListener(`change`,e=>{let t=e.target;if(t instanceof HTMLInputElement&&t.matches(`.wui-select-cell .wui-check:not(:disabled)`)){if(t.checked||(f=!1),n.tHead?.contains(t))for(let e of q(g,`:scope > tr`,HTMLTableRowElement)){let n=J(e,`.${K} .wui-check:not(:disabled)`,HTMLInputElement);n&&(n.checked=t.checked,t.checked?d.add(e.dataset.rowKey):d.delete(e.dataset.rowKey))}else{let e=Y(t,`tr`,HTMLTableRowElement)?.dataset.rowKey;if(!e)return;t.checked?d.add(e):d.delete(e)}be()}})),a&&(a.addEventListener(`click`,e=>{let t=e.target instanceof Element?Y(e.target,`a[href]`,HTMLAnchorElement):null;!t||e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(e.preventDefault(),A(S(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(S(t.value),`push`))}));let xe=()=>{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},Se=()=>e.isConnected?!0:(m.abort(),clearTimeout(b??void 0),!1),Ce=(e,t)=>{let n=[...e.elements].filter($l),r=new Set;for(let e of n)e.name&&!tu(e)&&r.add(e.name);let i=[];for(let e of n)if(e.name&&!eu(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},we=(e,t)=>{let n=new Set([...e.elements].filter($l).map(e=>e.name).filter(Boolean)),r=new URLSearchParams,i=e=>e!==`search`&&Yl.includes(e);for(let[e,t]of T)e!==`page`&&(i(e)||!n.has(e))&&r.append(e,t);for(let[n,a]of Ce(e,t))a===``||i(n)||l.has(n)||r.append(n,a);let a=xe();if(a){r.delete(Xl);let e=a.value.trim();e&&r.set(Xl,e)}return A(r,`push`)},Te=e=>s.filtersForm&&e.closest?.(s.filtersForm)||s.filtersRegion&&e.closest?.(s.filtersRegion)||null;document.addEventListener(`submit`,e=>{Se()&&s.filtersForm&&e.target instanceof HTMLFormElement&&e.target.matches(s.filtersForm)&&(e.preventDefault(),we(e.target,e.submitter))},h),document.addEventListener(`change`,e=>{if(!Se()||!s.filtersForm||!(e.target instanceof Element))return;let t=Y(e.target,s.filtersForm,HTMLFormElement);!t||e.target===xe()||t.hasAttribute(`data-wui-apply-on-change`)||e.target.closest(`wui-filter-popover`)||we(t)},h);let Ee=(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(nu)){let e=r.getAttribute(`name`)??``;r.value=r.mode===`multiple`||r.mode===`tag`?t.getAll(e):n(e)}for(let t of e.querySelectorAll(`wui-date-range`)){let e=t.getAttribute(`start-name`)||t.getAttribute(`name`),r=t.getAttribute(`end-name`);t.value={start:e?n(e):``,end:r?n(r):``}}};document.addEventListener(`click`,e=>{if(!Se())return;let t=e.target instanceof Element?Y(e.target,`a[href]`,HTMLAnchorElement):null;if(!t||!Te(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=ge(S(n.href));Ee(t.closest(`form`),r),su(t.closest(`form`),r),A(r,`push`)},h),document.addEventListener(`input`,e=>{if(!Se())return;let t=xe();t&&e.target===t&&(clearTimeout(b??void 0),b=setTimeout(()=>{if(!Se())return;let e=ge(new URLSearchParams(T)),n=t.value.trim();n?e.set(Xl,n):e.delete(Xl),e.toString()!==T.toString()&&A(e,`replace`)},300))},h),s.urlState&&window.addEventListener(`popstate`,()=>{if(!Se())return;let e=x(window.location.search),t=xe();t&&(t.value=e.get(`search`)??``),su(he(),e),A(e,`none`)},h),document.addEventListener(`wui:modal:success`,()=>{Se()&&s.refreshOnSuccess&&A(T,`none`)},h),i?.addEventListener(`click`,e=>{e.target instanceof Element&&e.target.closest(`[data-wui-table-retry]`)&&y&&A(y.query,y.mode)});let De=e=>[...g.rows].find(t=>t.dataset.rowKey===e)??null,j=e=>{if(!e?.trim())return null;let t=document.createElement(`template`);if(t.innerHTML=`<table><tbody>${e}</tbody></table>`,t.content.querySelector(`tbody[data-wui-rows]`))return null;let n=q(t.content,`table > tbody > tr[data-row-key]`,HTMLTableRowElement);return n.length?n.map(e=>document.importNode(e,!0)):null},Oe=(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:De(t.dataset.rowKey);e&&(oe(e),e.replaceWith(t),a.push(t))}return re(a),X().refresh(t),i},ke=e=>e.message||(e.kind===`forbidden`?Zl.actionForbidden:Zl.actionFailed),Ae=e=>{e?.isConnected&&e.getAttribute(`data-wui-save-state`)===`saving`&&nn(e,null)},je=e=>{if(e instanceof HTMLTableRowElement)return e;let t=document.createElement(`template`);t.innerHTML=`<table><tbody>${String(e)}</tbody></table>`;let n=J(t.content,`table > tbody > tr`,HTMLTableRowElement);return document.importNode(_(n,"saveRow's `row` is the row as it will read: a <tr> element or its HTML."),!0)},Me=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:De(String(a));if(!s&&!c)throw Error(`saveRow found no row with data-row-key="${a}" on this page.`);let l=O().filter(e=>!e.classList.contains(K)),u=o?je(o):c??ue(Math.max(1,l.length),l);c&&u!==c?c.replaceWith(u):c||g.insertBefore(u,g.firstChild),u!==c&&re([u]),i&&!t.hasAttribute(`data-wui-table-error`)&&(i.hidden=!0),nn(u,`saving`);let d=tn(u),f=await U(e,{method:n.toUpperCase(),body:r});if(f.kind===`session`)return!1;if(f.ok){let e=j(f.html),t=e&&u.isConnected?Oe(e,u,s):null;return t?D(N.saved(tn(t)||d)):(await A(T,`none`),Ae(u)),yu(f,f.toastVariant||`success`),E(`wui:table:saved`,{key:t?.dataset.rowKey??(s?null:String(a)),added:s,status:f.status}),!0}let p=ke(f),m=u;return c&&u!==c&&u.isConnected?(u.replaceWith(c),m=c):s&&!o&&(u.remove(),m=null,i?.childElementCount&&!g.querySelector(`:scope > tr`)&&(i.hidden=!1)),m?.isConnected&&nn(m,`error`,p),f.kind!==`aborted`&&ou(p,`danger`),D(N.notSaved(d,p)),E(`wui:table:failed`,{key:s?null:String(a),added:s,status:f.status,kind:f.kind,message:p}),!1},Ne=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=Y(e,`tr`,HTMLTableRowElement),r=n?.dataset.rowKey??null,i=e.dataset.wuiRowAction||``,a=n?tn(n):``;e.disabled=!0,e.setAttribute(`aria-busy`,`true`),n&&nn(n,`saving`);let o=await U(t,{method:(e.dataset.method||`post`).toUpperCase()});if(e.disabled=!1,e.removeAttribute(`aria-busy`),o.kind===`session`||o.kind===`aborted`)Ae(n);else{if(o.ok){yu(o,o.toastVariant||`success`);let e=n?.isConnected?j(o.html):null,t=e&&n?Oe(e,n,!1):null;t?D(N.saved(tn(t)||a)):(await A(T,`none`),Ae(n))}else{let e=ke(o);ou(e,`danger`),n?.isConnected&&nn(n,`error`,e),D(N.notSaved(a,e))}E(`wui:table:action`,{action:i,key:r,ok:o.ok,status:o.status})}};return n.addEventListener(`click`,e=>{let t=e.target instanceof Element?Y(e.target,`[data-wui-row-action]`,HTMLButtonElement):null;t&&g.contains(t)&&!t.disabled&&(e.preventDefault(),Ne(t))}),k(g),ae(g),u&&gs(n),ie(g),ve(),{el:e,reload:async e=>{let n=e?.quiet===!0;return n&&t.getAttribute(`aria-busy`)===`true`?null:A(T,`none`,{quiet:n})},query:()=>new URLSearchParams(T),setQuery:e=>{let t=new URLSearchParams(T);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:Me,setActiveRow:t=>{e.dataset.activeRowKey=t==null?``:String(t),ne(q(g,`:scope > tr`,HTMLTableRowElement))},selection:{keys:()=>[...d],count:()=>f?v.total:d.size,allMatching:()=>f,selectAllMatching:()=>{f=!0;for(let e of q(g,`:scope > tr`,HTMLTableRowElement)){let t=J(e,`.${K} .wui-check`,HTMLInputElement);t?.disabled||(t&&(t.checked=!0),e.dataset.rowKey&&d.add(e.dataset.rowKey))}be()},clear:()=>{f=!1,d.clear();for(let e of q(g,`:scope > tr > .${K} .wui-check:not(:disabled)`,HTMLInputElement))e.checked=!1;be()}}}}var mu=8e3,hu=`That did not work. Try again.`,gu=[`success`,`info`,`warning`,`danger`],_u=e=>gu.some(t=>t===e);function vu(e){if(!_u(e))throw RangeError(`Unknown toast variant "${e}".`);return e}function X(){return _(window.WUI,`window.WUI is not defined: the Razor behaviour script did not load on this page.`)}function yu(e,t=`success`){if(!e?.message)return;let n=e.toastAction;n?X().toast(e.message,{variant:vu(t),duration:mu,action:{label:n.label,onClick:()=>bu(n)}}):X().toast(e.message,{variant:vu(t)})}async function bu(e){let t=await U(e.url,{method:e.method});if(t.kind!==`session`&&t.kind!==`aborted`){if(t.ok){yu(t,t.toastVariant||`success`);for(let e of document.querySelectorAll(`[data-wui-server]`))e instanceof HTMLElement&&e.dataset.refreshOnSuccess!==`false`&&fu(e)?.reload()}else X().toast(t.message||hu,{variant:`danger`})}}var xu=`wui-remote-modal`,Su=`wui-remote-drawer`,Cu=Object.freeze({sm:360,md:480,lg:640,xl:720}),wu=`wui-modal-fullscreen`,Tu=Object.freeze({sm:380,md:440,lg:640,xl:880}),Z=Object.freeze({loading:`Loading`,close:`Close`,retry:`Try again`,errorTitle:`This could not be loaded`,forbidden:`You do not have access to this.`,client:`It may have been moved or deleted.`,server:`Something went wrong on our side. Try again in a moment.`,network:`Could not reach the server. Check your connection and try again.`,submitFailed:`Your changes were not saved.`,invalid:`Some fields need attention.`}),Eu=`a[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,Du=`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled]),[contenteditable="true"]`,Ou=`[aria-invalid="true"], .is-invalid, .input-validation-error`,ku=`.wui-error-summary, [data-wui-form-errors], .validation-summary-errors, [data-valmsg-summary]`,Au=`[data-wui-modal-content]`,ju=`[data-wui-pane-close], [data-bs-dismiss="modal"]`,Mu=`<button type="button" class="wui-modal-close" data-bs-dismiss="modal" aria-label="Close"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18M6 6l12 12"></path></svg></button>`,Nu=new WeakMap,Pu=new WeakSet;function Fu(e,t){if(e==null)throw TypeError(`The remote modal needs ${t}, and the page does not have it.`);return e}var Q=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Iu=(e,t,n)=>Fu(Q(e,t),n),Lu=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Ru=()=>Object.assign(Error(`The remote modal load was aborted.`),{name:`AbortError`}),zu=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,Bu=(e,t)=>{let n=e instanceof Element?e.closest(t):null;return n instanceof HTMLElement?n:null},Vu=e=>{let t=window.bootstrap?.Modal;if(!t)throw Error(`WUI.modal.load(${String(e)}): Bootstrap's bundle (window.bootstrap) is not loaded on this page.`);return t},Hu=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},Uu=e=>Object.hasOwn(Tu,e),Wu=e=>Object.hasOwn(Cu,e);function Gu(e){if(e==null||e===``)return null;if(e===`fullscreen`)return{fullscreen:!0};if(Uu(e))return{px:Tu[e]};let t=typeof e==`number`?e:/^\d+$/.test(String(e))?Number(e):NaN;if(Number.isInteger(t)&&t>0)return{px:t};throw TypeError(`Unsupported modal size "${String(e)}". Use sm, md, lg, xl, fullscreen or a px number.`)}var Ku=e=>{if(e.classList.contains(`wui-modal-fullscreen`))return{fullscreen:!0};let t=Number.parseInt(e.style.getPropertyValue(`--wui-modal-max-width`),10);return{px:t>0?t:Tu.md}},qu=(e,t)=>{e.classList.toggle(wu,!!t.fullscreen),t.fullscreen?e.style.removeProperty(`--wui-modal-max-width`):e.style.setProperty(`--wui-modal-max-width`,`${t.px}px`)},Ju=[`center`,`top`];function Yu(e){if(e==null||e===``)return null;if(Wu(e))return{px:Cu[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 Xu=e=>e.container===`drawer`,Zu=e=>e.container===`pane`,Qu=e=>e.container!==`modal`,$u=(e,t)=>Xu(e)?Yu(t):Gu(t),ed=()=>document.getElementById(`wui-remote-drawer`)?.classList.contains(`show`)??!1,td=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},nd=e=>Zu(e)?e.shell:Iu(e.shell,`.modal-dialog`,`a dialog frame`);function rd(e=`modal`){let t=e===`drawer`,n=t?Su:xu,r=document.getElementById(n);return r||(r=document.createElement(`div`),r.id=n,r.className=t?`modal fade wui-modal-shell wui-remote-drawer`:`modal fade wui-modal-shell`,r.tabIndex=-1,r.setAttribute(`aria-hidden`,`true`),r.setAttribute(`role`,`dialog`),r.setAttribute(`aria-modal`,`true`),r.style.setProperty(`--wui-modal-max-width`,`${t?Cu.md:Tu.md}px`),r.innerHTML=t?`<div class="modal-dialog wui-remote-drawer-dialog"><div class="modal-content wui-modal"></div></div>`:`<div class="modal-dialog modal-dialog-centered wui-rb-dialog"><div class="modal-content wui-modal"></div></div>`,document.body.appendChild(r),r)}var id=e=>`<div class="wui-modal-header"><div class="wui-modal-heading"><div class="wui-modal-headtext"><div class="wui-modal-title">${Hu(e)}</div></div></div>${Mu}</div>`,ad=e=>`<div class="modal-content wui-modal" aria-busy="true">${id(e)}<div class="wui-modal-body"><div class="wui-modal-loading" role="status"><span class="visually-hidden">${Hu(Z.loading)}</span><div class="skeleton wui-modal-skeleton"></div><div class="skeleton wui-modal-skeleton"></div><div class="skeleton wui-modal-skeleton wui-modal-skeleton--short"></div></div></div></div>`,od=(e,t)=>`<div class="modal-content wui-modal" data-wui-modal-error="${Hu(t)}">${id(e)}<div class="wui-modal-body"><div class="wui-modal-state" role="alert"><p class="wui-modal-state-title">${Hu(Z.errorTitle)}</p><p class="wui-modal-state-text">${Hu(Z[t]||Z.server)}</p><div class="wui-modal-state-actions"><button type="button" class="${Ho(`primary`,`soft`,`md`)}" data-bs-dismiss="modal" data-wui="${Ro}">${Hu(Z.close)}</button><button type="button" class="${Ho(`primary`,`solid`,`md`)}" data-wui-modal-retry data-wui="${Ro}">${Hu(Z.retry)}</button></div></div></div></div>`,sd=e=>{let t=document.createElement(`template`);return t.innerHTML=e,Iu(t.content,`.modal-content`,`a card`)},cd=e=>Q(e.shell,`.modal-content`);function ld(e){if(!e)return;e.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0}));let t=window.bootstrap,n=t?[t.Tooltip,t.Popover]:[];for(let r of[e,...e.querySelectorAll(`*`)]){for(let e of n)Yc(e,r);t?.Dropdown.getInstance(r)?.dispose()}}function ud(e,t){let n=cd(e),r=n?fd(n):new Map;ld(n),n?n.replaceWith(t):nd(e).appendChild(t),pd(t,r),X().refresh()}var dd=`input[type="file"][name]`;function fd(e){let t=new Map;for(let n of e.querySelectorAll(dd)){if(!(n instanceof HTMLInputElement))continue;let e=n.files;e&&e.length>0&&t.set(n.name,[...e])}return t}function pd(e,t){if(t.size!==0&&typeof DataTransfer<`u`)for(let n of e.querySelectorAll(dd)){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 md=e=>Zu(e)?!e.shell.hidden:e.shell.classList.contains(`show`);function hd(e,t,n=!1){let r=t?Q(e,Ou):null,i=r?r.matches(Eu)?r:Q(r,Eu)||r:null;if(!i&&n)i=Q(e,`[data-autofocus]`)||Q(e,Du)||Q(e,`.wui-modal-close`);else if(!i){let t=Lu(e,Eu);i=Q(e,`[data-autofocus]`)||t.find(e=>!e.classList.contains(`wui-modal-close`))||t[0]||e}r?i?.focus?.():i?.focus?.({preventScroll:!0})}function gd(e,t){let n=Lu(e,Eu).filter(e=>e.getClientRects().length>0&&getComputedStyle(e).visibility!==`hidden`);if(!n.length){t.preventDefault(),e.focus();return}let r=Fu(n[0],`a focusable control`),i=Fu(n[n.length-1],`a focusable control`),a=document.activeElement;!e.contains(a)||a===e?(t.preventDefault(),(t.shiftKey?i:r).focus()):t.shiftKey&&a===r?(t.preventDefault(),i.focus()):!t.shiftKey&&a===i&&(t.preventDefault(),r.focus())}function _d(e,t){let n=Q(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`,``),nd(e).appendChild(n)),n.textContent=``,n.textContent=t}var vd=e=>{let t=Q(e.shell,`[data-wui-modal-live]`);t&&(t.textContent=``)},yd=(e,t,n)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))};function bd(e,t,n,r){let i={...r,container:e.container};yd(t,`wui:modal:${n}`,i),Xu(e)&&yd(t,`wui:drawer:${n}`,i),Zu(e)&&yd(t,`wui:pane:${n}`,i)}var xd=e=>e.matches(`[data-wui-pane-host]`)?`pane`:e.classList.contains(`wui-remote-drawer`)?`drawer`:`modal`;function Sd(e){let t=Nu.get(e);if(t)return t;let n={shell:e,container:xd(e),queue:Si(),defaultSize:Ku(e),defaultLabel:e.getAttribute(`aria-label`),placeholder:cd({shell:e})?.outerHTML||`<div class="modal-content wui-modal"></div>`,remoteUrl:e.getAttribute(`data-wui-remote-url`),cache:e.getAttribute(`data-wui-remote-cache`)===`true`,loadedUrl:null,session:null};return Nu.set(e,n),e.addEventListener(`submit`,e=>Wd(n,e)),e.addEventListener(`click`,e=>{Bu(e.target,`[data-wui-modal-retry]`)&&n.session&&(e.preventDefault(),Ad(n,n.session))}),Zu(n)&&e.addEventListener(`click`,t=>{let r=Bu(t.target,ju);r&&e.contains(r)&&n.session&&wd(n,n.session,`dismissed`,null)}),e.addEventListener(`hidden.bs.modal`,t=>{t.target===e&&(e.classList.contains(`wui-modal-stacked`)&&Ed(n),Dd(n))}),e.addEventListener(`shown.bs.modal`,t=>{if(t.target!==e)return;e.classList.contains(`wui-modal-stacked`)&&[...document.querySelectorAll(`.modal-backdrop`)].at(-1)?.classList.add(`wui-modal-backdrop-stacked`);let r=cd(n);n.session&&r?.matches(Au)&&!r.contains(document.activeElement)&&hd(r,!1,Qu(n))}),n.remoteUrl&&e.addEventListener(`show.bs.modal`,t=>{t.target===e&&Od(n,t)}),n}function Cd(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:()=>wd(e,a,`dismissed`,null),reload:()=>Ad(e,a)}};return e.session=a,a}function wd(e,t,n,r){e.session===t&&(t.closing={status:n,detail:r},Zu(e)?Td(e,t):window.bootstrap?.Modal.getOrCreateInstance(e.shell).hide())}function Td(e,t){let n=e.shell,{status:r,detail:i}=Fu(t.closing,`the closing state`),a=n.contains(document.activeElement);e.queue.abort(),e.session=null,ld(cd(e)),n.replaceChildren(),n.hidden=!0,n.removeAttribute(`data-open`),t.resolveClosed({status:r,detail:i}),bd(e,n,`closed`,{status:r,url:t.url}),a&&t.trigger?.isConnected&&t.trigger.focus?.()}function Ed(e){e.shell.classList.remove(`wui-modal-stacked`),ed()&&(document.body.classList.add(`modal-open`),document.body.style.overflow=`hidden`)}function Dd(e){let t=e.session;if(e.queue.abort(),e.session=null,vd(e),t){let n=t.closing||{status:`dismissed`,detail:null};t.resolveClosed({status:n.status,detail:n.detail}),bd(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||(ud(e,sd(e.placeholder)),e.loadedUrl=null,qu(e.shell,e.defaultSize),e.defaultLabel?e.shell.setAttribute(`aria-label`,e.defaultLabel):e.shell.removeAttribute(`aria-label`))}function Od(e,t){let n=`relatedTarget`in t?t.relatedTarget:null,r=n instanceof HTMLElement?n:null,i=r?.getAttribute(`data-wui-url`)||e.remoteUrl||``,a=Cd(e,i,{trigger:r});a.explicitSize=kd(e,r?.getAttribute(`data-wui-size`)),a.explicitSize&&qu(e.shell,a.explicitSize),e.cache&&e.loadedUrl===i||(e.loadedUrl&&ud(e,sd(e.placeholder)),Ad(e,a,{keepPlaceholder:!0}))}function kd(e,t){try{return $u(e,t)}catch(e){return R(e),null}}async function Ad(e,t,{keepPlaceholder:n=!1}={}){n||ud(e,sd(ad(t.options.title||jd(e))));let r=await e.queue.run(t.url,{method:t.method,body:t.body,navigate:t.options.navigate});if(e.session!==t||r.kind===`aborted`||r.kind===`stale`)return`aborted`;if(r.kind===`session`)return`session`;if((r.kind===`ok`||r.kind===`validation`)&&Fd(e,t,r.html,!1))return e.loadedUrl=t.url,bd(e,e.shell,`loaded`,{url:t.url,handle:t.handle}),`loaded`;let i=r.kind===`ok`||r.kind===`validation`?`server`:r.kind;return ud(e,sd(od(t.options.title||jd(e),i))),md(e)&&hd(Fu(cd(e),`a card`),!1,Qu(e)),bd(e,e.shell,`error`,{url:t.url,kind:i,status:r.status}),`error`}var jd=e=>cd(e)?.querySelector(`.wui-modal-title`)?.textContent||e.shell.getAttribute(`aria-label`)||``,Md=`/_content/Webority.Ui.Razor/js/`,Nd=e=>new URL(e,window.location.href).pathname.includes(Md);function Pd(e){if([...document.scripts].some(t=>t.getAttribute(`src`)===e))return;let t=document.createElement(`script`);t.src=e,document.head.appendChild(t)}function Fd(e,t,n,r){let i=document.createElement(`template`);i.innerHTML=n;let a=!1;for(let e of i.content.querySelectorAll(`script`)){if(e.getAttribute(`type`)===`application/json`)continue;let t=e.getAttribute(`src`);e.remove(),t&&Nd(t)?Pd(t):a=!0}a&&In(`WUI.modal: ${t.url} returned a fragment with script; it was removed. Keep page behaviour in the page.`);let o=Q(i.content,Au);if(!o)return R(`WUI.modal: ${t.url} did not answer with an <app-modal-content> fragment.`),!1;if(ud(e,o),r||vd(e),!Zu(e)){qu(e.shell,t.explicitSize||kd(e,o.getAttribute(`data-wui-size`))||e.defaultSize);let n=o.getAttribute(`data-wui-title`);n&&e.shell.setAttribute(`aria-label`,n)}return md(e)&&hd(o,r,Qu(e)),!0}var Id=`button[type="submit"], button:not([type]), input[type="submit"], input[type="image"]`;function Ld(e,t,n){let r=[...e.elements].filter(e=>e.matches(Id));if(n){e.setAttribute(`data-wui-submitting`,``);let n=t&&r.includes(t)?t:r[0];for(let e of r)e.toggleAttribute(`data-wui-was-disabled`,e.disabled),e.disabled=!0;n&&(n.classList.add(`is-loading`),n.setAttribute(`aria-busy`,`true`),n.tagName===`BUTTON`&&n.insertAdjacentHTML(`afterbegin`,`<span class="spinner-border spinner-border-sm me-2" aria-hidden="true" data-wui-submit-spinner></span>`))}else{e.removeAttribute(`data-wui-submitting`);for(let e of r)e.disabled=e.hasAttribute(`data-wui-was-disabled`),e.removeAttribute(`data-wui-was-disabled`),e.classList.remove(`is-loading`),e.removeAttribute(`aria-busy`),e.querySelector(`[data-wui-submit-spinner]`)?.remove()}}function Rd(e){for(let t of e.querySelectorAll(ku))t.remove();for(let t of e.querySelectorAll(Ou))t.removeAttribute(`aria-invalid`),t.classList.remove(`is-invalid`,`input-validation-error`);for(let t of e.querySelectorAll(`.field-error`))t.textContent=``}var zd=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(`.`)),Bd=(e,t)=>{if(typeof e==`object`&&e&&t in e)return Reflect.get(e,t)};async function Vd(e){if(!e||e.status<400||e.status>499||e.status===422||!e.headers.get(`content-type`)?.toLowerCase().includes(`json`))return null;let t;try{t=JSON.parse(await e.text())}catch{return null}let n=e=>typeof e==`string`?e.trim():``,r=n(Bd(t,`title`)),i=(e.statusText||``).trim().toLowerCase(),a=zd.has(r.toLowerCase())||r.toLowerCase()===i;return n(Bd(t,`message`))||n(Bd(t,`detail`))||(r&&!a?r:null)}function Hd(e,t,n,r){let i=t.closest(`.wui-modal-body`)||t;i.querySelector(`[data-wui-modal-submit-error]`)?.remove(),Rd(i);let a=document.createElement(`div`);a.className=`alert alert-danger wui-modal-submit-error`,a.setAttribute(`role`,`alert`),a.setAttribute(`data-wui-modal-submit-error`,``),a.innerHTML=Hu(`${Z.submitFailed} ${r||Z[n]||Z.server}`),i.prepend(a),_d(e,a.textContent)}var Ud=(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 Wd(e,t){let n=t.target,r=e.session;if(!(n instanceof HTMLFormElement)||!r||n.hasAttribute(`data-wui-native`)||!n.closest(Au)||(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`;Ld(n,i,!0);let l;try{l=await e.queue.run(c?Ud(a,s):a,{method:o,body:c?void 0:s,navigate:r.options.navigate})}catch(t){R(t),e.session===r&&n.isConnected&&(Ld(n,i,!1),Hd(e,n,`server`,null));return}if(e.session!==r)return;if(n.isConnected&&Ld(n,i,!1),l.kind===`ok`&&l.result===`success`){Gd(e,r,l);return}if(l.kind===`aborted`||l.kind===`stale`||l.kind===`session`)return;if(l.kind===`validation`&&Fd(e,r,l.html,!0)){let t=Fu(cd(e),`a card`).querySelector(ku)?.textContent?.replace(/\s+/g,` `).trim();_d(e,t||Z.invalid);return}if(l.kind===`ok`&&l.html&&Fd(e,r,l.html,!1))return;let u=l.kind===`ok`||l.kind===`validation`?`server`:l.kind,d=await Vd(l.response);e.session===r&&Hd(e,n,u,d)}function Gd(e,t,n){let r=n.message,i=n.redirect||null,a=n.toastVariant||`success`;if(!of(a))throw TypeError(`Unknown toast variant "${a}". Use ${af.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?Af(r,a):r&&X().toast(r,{variant:a}),bd(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,Ad(e,t)):n.keepOpen?n.html&&Fd(e,t,n.html,!1):wd(e,t,`success`,o)}function Kd(e){let t=Bu(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`)?ef(t.getAttribute(`data-wui-pane`)??``,{target:t.getAttribute(`data-wui-pane-target`),trigger:t}).catch(e=>{zu(e)||R(e)}):t.hasAttribute(`data-wui-modal`)?Xd(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=>{zu(e)||R(e)}):Qd(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=>{zu(e)||R(e)})))}function qd(e){if(e.key!==`Tab`||e.defaultPrevented)return;let t=e.currentTarget;if(!(t instanceof Document))return;let n=Lu(t,`.modal.show`),r=Q(t,`.modal.show.wui-modal-stacked`)??n[n.length-1];r&&gd(r,e)}function Jd(e){if(e.key!==`Escape`||e.defaultPrevented)return;let t=Bu(e.target,$d),n=t&&Nu.get(t),r=e.currentTarget;n?.session&&r instanceof Document&&!r.querySelector(`.modal.show`)&&wd(n,n.session,`dismissed`,null)}function Yd(e=document){let t=e instanceof Document?e:Fu(e.ownerDocument,`an owner document`);Pu.has(t)||(Pu.add(t),t.addEventListener(`click`,Kd),t.addEventListener(`keydown`,qd),t.addEventListener(`keydown`,Jd));let n=Lu(e,`.modal[data-wui-remote-url]`);e instanceof HTMLElement&&e.matches(`.modal[data-wui-remote-url]`)&&n.unshift(e);for(let e of n)Sd(e)}function Xd(e,t={}){try{if(!e)throw TypeError(`WUI.modal.load: a fragment url is required.`);let n=Vu(e),r=t.container===`drawer`,i=r?Yu(t.size):Gu(t.size),a=t.placement||`center`;if(!Ju.includes(a))throw TypeError(`WUI.modal.load: unsupported placement "${a}". Use center or top.`);if(t.signal?.aborted)return Promise.reject(Ru());let o=rd(r?`drawer`:`modal`);Yd(document);let s=Sd(o),c=md(s),l=Cd(s,e,t);l.explicitSize=i,qu(o,i||s.defaultSize),r||Iu(o,`.modal-dialog`,`a dialog frame`).classList.toggle(`modal-dialog-centered`,a===`center`),t.title&&o.setAttribute(`aria-label`,t.title),c||(!r&&ed()&&(document.body.appendChild(o),o.classList.add(`wui-modal-stacked`)),n.getInstance(o)?.dispose(),n.getOrCreateInstance(o,{backdrop:t.staticBackdrop===!1||`static`,keyboard:t.staticBackdrop===!1}));let u=c?Promise.resolve():new Promise(e=>o.addEventListener(`shown.bs.modal`,()=>e(),{once:!0})),d=Ad(s,l);return c||n.getOrCreateInstance(o).show(),Zd(s,l,t,u,d,`WUI.modal.load`)}catch(e){return Promise.reject(e)}}function Zd(e,t,n,r,i,a){let o=new Promise((r,i)=>{n.signal?.addEventListener(`abort`,()=>{e.session===t&&(e.queue.abort(),wd(e,t,`dismissed`,{aborted:!0})),i(Ru())},{once:!0})}),s=Promise.all([r,i]).then(([,e])=>{if(e===`aborted`)throw Ru();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 Qd(e,t={}){return Xd(e,{...t,container:`drawer`,placement:void 0})}var $d=`[data-wui-pane-host]`;function ef(e,t={}){try{if(!e)throw TypeError(`WUI.pane.load: a fragment url is required.`);let n=td(t.target);if(!n)throw TypeError(`WUI.pane.load: the target is not an <app-detail-pane>.`);if(t.signal?.aborted)return Promise.reject(Ru());Yd(document);let r=Sd(n),i=Cd(r,e,t);n.hidden=!1,n.setAttribute(`data-open`,``);let a=Ad(r,i);return Zd(r,i,t,Promise.resolve(),a,`WUI.pane.load`)}catch(e){return Promise.reject(e)}}function tf(e){let t=td(e);if(!t)throw TypeError(`WUI.pane.close: the target is not an <app-detail-pane>.`);let n=Nu.get(t);n?.session&&wd(n,n.session,`dismissed`,null)}var nf=`wuiConfirm`,rf=Object.freeze([`danger`]),af=Object.freeze([`success`,`info`,`warning`,`danger`]),of=e=>af.some(t=>t===e),sf=`wui.flash`,cf=Object.freeze({confirmTitle:`Are you sure?`,confirmLabel:`Confirm`,cancelLabel:`Cancel`,failed:`That did not work. Try again.`,forbidden:`You do not have permission to do that.`,network:`Could not reach the server. Check your connection and try again.`}),lf=new WeakSet,uf=new WeakSet,df=null,ff=null,pf=!1,mf=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},hf=(e,t)=>{e&&X().toast(e,{variant:t})},gf=()=>_(window.bootstrap?.Modal,`data-wui-confirm: Bootstrap's bundle (window.bootstrap) is not loaded on this page.`);function _f(){let e=document.getElementById(nf);return e||(e=document.createElement(`div`),e.id=nf,e.className=`modal fade wui-modal-shell`,e.tabIndex=-1,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`role`,`dialog`),e.setAttribute(`aria-modal`,`true`),e.style.setProperty(`--wui-modal-max-width`,`${Tu.md}px`),e.innerHTML=`<div class="modal-dialog modal-dialog-centered wui-rb-dialog"><div class="modal-content wui-modal wui-confirm"><div class="wui-modal-body"><div class="wui-confirm-content"><span class="wui-confirm-icon"><wui-status-icon tone="info" size="120"></wui-status-icon></span><h3 class="wui-confirm-title" tabindex="-1" data-autofocus></h3><p class="wui-confirm-msg"></p></div></div><div class="wui-modal-footer"><div class="wui-confirm-actions"><button type="button" class="${Ho(`primary`,`soft`,`md`)}" data-bs-dismiss="modal" data-wui="${Ro}">${mf(cf.cancelLabel)}</button><button type="button" class="${Ho(`primary`,`solid`,`md`)}" data-app-confirm data-wui="${Ro}"></button></div></div></div></div>`,document.body.appendChild(e),e)}function vf(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!rf.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);yf({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 yf({title:e,message:t,label:n,danger:r},i){let a=gf(),o=_f(),s=o.querySelector(`.wui-confirm-title`),c=o.querySelector(`[data-app-confirm]`);if(!s||!c)throw Error(`#${nf} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${nf}"> without confirm-href, or leave the dialog to the library.`);let l=o.querySelector(`.wui-confirm-msg`);l||(l=document.createElement(`p`),l.className=`wui-confirm-msg`,s.after(l));let u=e||cf.confirmTitle;s.textContent=u,l.textContent=t,c.textContent=n||cf.confirmLabel,c.classList.toggle(`btn-danger`,r),c.classList.toggle(`btn-primary`,!r),o.querySelector(`wui-status-icon`)?.setAttribute(`tone`,r?`delete`:`info`),o.setAttribute(`aria-label`,u),ff=i,pf=!1,a.getOrCreateInstance(o).show()}var bf=(e,t)=>{df=e;try{t()}finally{df=null}},xf=(e,t)=>{let n=Reflect.get(e,t);if(n===void 0||typeof n==`string`)return n;throw TypeError(`confirmAction: ${t} must be text.`)},Sf=e=>{if(typeof e!=`object`||!e)throw TypeError(`confirmAction: options must be an object with a message.`);let t=Reflect.get(e,`message`);if(typeof t!=`string`)throw TypeError(`confirmAction: message must be text.`);return{title:xf(e,`title`),message:t,label:xf(e,`label`),tone:xf(e,`tone`)}};function Cf(e,t,n){let{title:r,message:i,label:a,tone:o}=Sf(t);if(o!=null&&!rf.includes(o))throw TypeError(`confirmAction: tone "${o}" is not supported. Use danger, or leave it off.`);Uf(e.ownerDocument),yf({title:r,message:i,label:a,danger:o===`danger`},()=>bf(e,n))}var wf=e=>`disabled`in e&&e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`,Tf=e=>{v(e,HTMLElement,`data-wui-confirm needs an HTML element to click.`).click()};function Ef(e){let t=y(e.target,`[data-wui-confirm]:not(form)`);t&&t!==df&&!wf(t)&&(e.preventDefault(),e.stopImmediatePropagation(),vf(t,()=>bf(t,()=>Tf(t))))}function Df(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===df||e.submitter&&e.submitter===df||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;vf(t,()=>bf(t,()=>t.requestSubmit(r)))}function Of(e){let t=y(e.target,`#${nf} [data-app-confirm]`);if(!t||t.hasAttribute(`disabled`)||!ff)return;pf=!0;let n=gf(),r=_(t.closest(`#${nf}`),`#${nf} is missing around its confirm button.`);n.getOrCreateInstance(r).hide()}function kf(e){if(!(e.target instanceof Element)||e.target.id!==`wuiConfirm`)return;let t=pf?ff:null;ff=null,pf=!1,t?.()}function Af(e,t){e&&window.sessionStorage.setItem(sf,JSON.stringify({message:e,variant:t}))}var jf=e=>e===`forbidden`?cf.forbidden:e===`network`?cf.network:cf.failed;function Mf(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.getAttribute(`data-refresh-on-success`)!==`false`&&fu(e)?.reload()}var Nf=(e,t)=>{`disabled`in e&&(e.disabled=t)};async function Pf(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 Ff(t,e)}async function Ff(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.`);Nf(t,!0),t.setAttribute(`aria-busy`,`true`);let i=await U(e,{method:`POST`,body:n});if(i.kind===`session`||i.kind===`aborted`)return;let a=i.toastVariant||`success`;i.ok&&(i.redirect||r===`page`)?(Af(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload()):(Nf(t,!1),t.removeAttribute(`aria-busy`),i.ok?(yu(i,a),Mf()):hf(i.message||jf(i.kind),`danger`))}function If(e,t){Nf(e,!1),e.removeAttribute(`aria-busy`),R(t),hf(cf.failed,`danger`)}function Lf(e){let t=y(e.target,`[data-wui-post]`);t&&(e.preventDefault(),wf(t)||t.getAttribute(`aria-busy`)===`true`||Pf(t).catch(e=>If(t,e)))}function Rf(e){let t=y(e.target,`form[data-wui-post-form]`);if(!(t instanceof HTMLFormElement)||e.defaultPrevented)return;e.preventDefault();let n=_(e.submitter||t.querySelector(`button`),`A data-wui-post-form needs a submit button to report its result on.`);if(n.getAttribute(`aria-busy`)===`true`)return;Ff(t.action,n,new FormData(t)).catch(e=>If(n,e));let r=t.closest(`.dropdown`)?.querySelector(`[data-bs-toggle='dropdown']`);r&&window.bootstrap?.Dropdown?.getInstance(r)?.hide()}function zf(){let e=window.sessionStorage.getItem(sf);if(!e)return;window.sessionStorage.removeItem(sf);let t=JSON.parse(e);if(typeof t!=`object`||!t)throw TypeError(`stored flash is not an object.`);let n=Reflect.get(t,`message`),r=Reflect.get(t,`variant`);if(typeof r!=`string`||!of(r))throw TypeError(`stored flash variant "${String(r)}" is not supported.`);if(typeof n!=`string`)throw TypeError(`stored flash message is not text.`);hf(n,r)}function Bf(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(!of(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${af.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||(e.textContent??``).trim();e.remove(),hf(n,t)}}var Vf=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.form:null;function Hf(e){if(!(e.target instanceof Element))return;let t=e.target.closest(`[data-wui-auto-submit]`);if(!t)return;let n=Vf(e.target)||t.closest(`form`);n instanceof HTMLFormElement&&n.requestSubmit()}function Uf(e){uf.has(e)||(uf.add(e),e.addEventListener(`click`,Of),e.addEventListener(`hidden.bs.modal`,kf))}function Wf(e=document){let t=e instanceof Element?e.ownerDocument:e;lf.has(t)||(lf.add(t),t.addEventListener(`click`,Ef,!0),t.addEventListener(`submit`,Df,!0),Uf(t),t.addEventListener(`click`,Lf),t.addEventListener(`submit`,Rf),t.addEventListener(`change`,Hf),zf()),Bf(e)}var Gf=Object.freeze({title:`Leave without saving?`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,leaveLabel:`Leave`}),Kf=`form[data-wui-unsaved]`,qf=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,Jf=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,Yf=new Set([`submit`,`button`,`reset`,`image`]),Xf=new Set([`hidden`,`checkbox`,`radio`,`file`,`submit`,`button`,`reset`,`image`,`range`,`color`]),Zf=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,Qf=e=>Zf(e)?e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled:`disabled`in e&&!!e.disabled,$f=e=>`name`in e&&typeof e.name==`string`&&e.name!==``,ep=e=>typeof e==`object`&&!!e,tp=e=>Array.isArray(e)&&e.every(e=>Array.isArray(e)&&typeof e[0]==`string`);function np(e){let t=JSON.parse(e);if(!tp(t))throw Error(`unsaved-changes snapshot is malformed`);return t}var rp=new WeakMap,ip=new WeakSet,ap=e=>`${e.name}:${e.size}:${e.lastModified}`,op=e=>[...e.querySelectorAll(Kf)].filter(e=>e instanceof HTMLFormElement);function sp(e){let t=[];for(let n of e.elements)$f(n)&&!Qf(n)&&(Zf(n)&&Yf.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(ap)]):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 cp(e){return sp(e)}function lp(e,t){let n=new Map,r=np(t);for(let e of r){let t=n.get(e[0]);t?t.push(e):n.set(e[0],[e])}let i=np(sp(e)).map(e=>n.get(e[0])?.shift()??e);for(let e of n.values())i.push(...e);return JSON.stringify(i)}function up(e){for(let t of e.elements)if(Zf(t)&&t.name&&!Qf(t)){if(t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!Xf.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 dp=e=>({saved:e.querySelector(qf)&&up(e)?null:sp(e),engaged:!1,discarded:!1});function fp(e){let t=rp.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&sp(e)!==t.saved}var pp=(e,t)=>op(e).filter(e=>e!==t&&fp(e)),mp=()=>!!window.bootstrap?.Modal;function hp(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||Gf.message;Cf(e,{title:Gf.title,message:r,label:Gf.leaveLabel,tone:`danger`},()=>{for(let e of t){let t=rp.get(e);t&&(t.discarded=!0)}n()})}function gp(e){if(e.matches(Jf))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 _p(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 vp(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target,n=y(t,`a[href]`);if(!(n instanceof HTMLAnchorElement)||!gp(n))return;let r=pp(n.ownerDocument,null);r.length&&mp()&&(e.preventDefault(),hp(n,r,()=>n.click()))}function yp(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!_p(t,e.submitter))return;let n=pp(t.ownerDocument,t);if(n.length&&mp()){e.preventDefault();let r=e.submitter,i=(r instanceof HTMLButtonElement||r instanceof HTMLInputElement)&&r.form===t?r:void 0;hp(t,n,()=>t.requestSubmit(i));return}let r=rp.get(t);r&&(r.saved=sp(t),r.discarded=!1)}function bp(e){pp(document,null).length&&(e.preventDefault(),e.returnValue=``)}function xp(e){let t=e.target,n=y(t,Kf);return n instanceof HTMLFormElement?n:null}function Sp(e){let t=xp(e);if(!t)return;let n=rp.get(t);n&&!n.engaged&&(n.saved!==null&&(n.saved=sp(t)),n.engaged=!0)}function Cp(e){let t=xp(e),n=t&&rp.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function wp(e){for(let t of op(e)){let e=rp.get(t);e?.saved&&(e.saved=lp(t,e.saved))}}function Tp(e){let t=ep(e)?e.handle:void 0;return ep(t)?t.el:void 0}function Ep(e){if(!(e instanceof CustomEvent))return;let t=Tp(e.detail);if(t instanceof Element)for(let e of op(t))Op(e)}function Dp(e=document){let t=e instanceof Document?e:e.ownerDocument;if(!ip.has(t)){ip.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,Sp,!0);for(let e of[`input`,`change`])t.addEventListener(e,Cp,!0);t.addEventListener(`click`,vp),t.addEventListener(`submit`,yp),t.addEventListener(`wui:modal:success`,Ep),t.addEventListener(Hn,()=>wp(t)),_(t.defaultView,`unsaved-changes guard needs a document with a window`).addEventListener(`beforeunload`,bp)}let n=op(e);e instanceof HTMLFormElement&&e.matches(Kf)&&n.unshift(e);for(let e of n)rp.has(e)||rp.set(e,dp(e))}function Op(e){if(!(e instanceof HTMLFormElement)||!e.matches(Kf))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);rp.set(e,{saved:sp(e),engaged:!1,discarded:!1})}var kp=Object.freeze({question:`Discard your changes?`,discard:`Discard`,keep:`Keep editing`}),Ap=`wui:drawer:discard`,jp=`wui-drawer[confirm-discard]`,Mp=`.wui-modal-shell`,Np=`data-wui-no-discard`,Pp=`.wui-drawer-discard`,Fp=`input, select, textarea`,Ip=e=>typeof e==`object`&&!!e||typeof e==`function`;function Lp(e){let t=e.currentTarget;if(!(t instanceof Document))throw Error(`The discard guard is not wired on a document.`);return t}function Rp(e,t){return y(e,t)}var zp=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement,Bp=new WeakMap,Vp=new WeakSet,Hp=new WeakSet;function Up(e,t,n,r,i){let a=e.createElement(`button`);return a.type=`button`,a.className=Ho(t,n,`sm`),a.dataset.wui=Ro,a.setAttribute(r,``),a.textContent=i,a}function Wp(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,Up(e,`danger`,`solid`,`data-wui-discard-confirm`,kp.discard),Up(e,`primary`,`soft`,`data-wui-discard-keep`,kp.keep)),n}function Gp(e){if(!(e instanceof Element))return null;let t=e.closest(jp);if(t)return t;let n=e.closest(Mp);return n&&Jp(n).length?n:null}function Kp(e){return e.closest(jp)??e.closest(Mp)}function qp(e,t){return t.hasAttribute(Np)||e.hasAttribute(Np)?!1:t.hasAttribute(`confirm-discard`)||e.hasAttribute(`data-wui-confirm-discard`)?!0:(e.getAttribute(`method`)||`get`).toLowerCase()!==`get`}function Jp(e){return e.matches(jp)?e.querySelectorAll(`form`):[...e.querySelectorAll(`form`)].filter(t=>qp(t,e))}function Yp(e){let t=Bp.get(e);return t!=null&&cp(e)!==t}function Xp(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,_(e.querySelector(`.wui-drawer-panel`),`The drawer has no panel to hold its footer.`).append(t),Hp.add(t),t}function Zp(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),Hp.add(t),t}function Qp(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 $p(e,t,n){let r=e.querySelector(Pp);if(r){Qp(r);return}let i=Wp(e.ownerDocument,t),a;if(e.matches(jp))a=e.querySelector(`.wui-drawer-footer`)??Xp(e),a.prepend(i);else if(e.hasAttribute(`confirm-discard`))a=e.querySelector(`.wui-modal-footer`)??Zp(e),a.prepend(i);else{if(!n)throw Error(`A discard prompt needs the form that is dirty.`);a=n.querySelector(`.modal-footer`),a?a.prepend(i):(a=n,n.append(i))}a.classList.add(`wui-drawer-discarding`),Qp(i)}function em(e){let t=e.parentElement;if(e.remove(),!t)throw Error(`The discard prompt has no footer.`);t.classList.remove(`wui-drawer-discarding`),Hp.has(t)&&t.remove()}function tm(e){for(let t of Jp(e))for(let e of t.querySelectorAll(Fp))if(zp(e)&&e.type!==`hidden`&&!e.disabled){e.focus({preventScroll:!0});return}}function nm(e){let t=Gp(e.target);if(t)for(let e of Jp(t))Bp.get(e)??Bp.set(e,cp(e))}function rm(e){for(let t of Lp(e).querySelectorAll(`form`)){let e=Bp.get(t);e!=null&&Bp.set(t,lp(t,e))}}function im(e){let t=e.target;t instanceof HTMLFormElement&&Gp(t)&&Bp.set(t,cp(t))}function am(e){if(!Ip(e))return;let t=Reflect.get(e,`handle`);if(Ip(t))return Reflect.get(t,`el`)}function om(e){if(!(e instanceof CustomEvent))return;let t=e.detail,n=am(t);if(n instanceof Element)for(let e of n.querySelectorAll(`form`))Bp.delete(e)}function sm(e){let t=e.target;t instanceof Element&&t.matches(jp)&&[...Jp(t)].some(Yp)&&(e.preventDefault(),$p(t,t.getAttribute(`confirm-discard`),null))}function cm(e){let t=e.target;if(!(t instanceof Element)||!t.matches(Mp))return;let n=[...Jp(t)].find(Yp);n&&(e.preventDefault(),$p(t,n.getAttribute(`data-wui-confirm-discard`)??t.getAttribute(`confirm-discard`)??kp.question,n))}function lm(e){let t=e.closest(`wui-drawer`);if(t){t.dispatchEvent(new CustomEvent(`wui-drawer-close`,{bubbles:!0,cancelable:!0}))&&t.hide();return}let n=e.closest(Mp);n&&window.bootstrap?.Modal.getInstance(n)?.hide()}function um(e){let t=_(e.closest(Pp),`The discard button is outside its prompt.`),n=Kp(t);if(em(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);for(let e of Jp(n))Bp.set(e,cp(e));n.dispatchEvent(new CustomEvent(Ap,{bubbles:!0})),n.matches(jp)?_(n.closest(`wui-drawer`),`The confirm-discard drawer is not a wui-drawer.`).hide():_(window.bootstrap?.Modal.getInstance(n),`Bootstrap's Modal has no instance for the discarded dialog.`).hide()}function dm(e){let t=_(e.closest(Pp),`The keep button is outside its prompt.`),n=Kp(t);if(em(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);tm(n)}function fm(e){let t=Rp(e.target,`[data-wui-discard-confirm]`);if(t){um(t);return}let n=Rp(e.target,`[data-wui-discard-keep]`);if(n){dm(n);return}let r=Rp(e.target,`[data-wui-dismiss]`);r&&lm(r)}function pm(e){if(e.key!==`Escape`)return;let t=Lp(e).querySelector(Pp);if(!t)return;e.preventDefault(),e.stopPropagation();let n=Kp(t);if(em(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);tm(n)}function mm(e=document){let t=e instanceof Document?e:e.ownerDocument;Vp.has(t)||(Vp.add(t),t.addEventListener(`focusin`,nm),t.addEventListener(`pointerdown`,nm),t.addEventListener(`submit`,im),t.addEventListener(Hn,rm),t.addEventListener(`wui:modal:success`,om),t.addEventListener(`wui:modal:loaded`,om),t.addEventListener(`wui-drawer-close`,sm,!0),t.addEventListener(`hide.bs.modal`,cm),t.addEventListener(`click`,fm),t.addEventListener(`keydown`,pm,!0))}var hm=31536e3,gm=new WeakMap,_m=e=>e>99?`99+`:String(e),vm=(e,t)=>Object.entries(t).reduce((e,[t,n])=>e.replaceAll(`{${t}}`,()=>String(n)),e);function ym(e,t,n=document){try{n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${hm}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}function bm(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=${hm}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}var xm=e=>{let t=document.createElement(`template`);return t.innerHTML=e,t.content},$=(e,t,n)=>{let r=e?.querySelector(t);return r instanceof n?r:null},Sm=(e,t,n)=>{let r=e?.closest(t);return r instanceof n?r:null},Cm=(e,t,n)=>e?[...e.querySelectorAll(t)].filter(e=>e instanceof n):[],wm=e=>{if(!(e.target instanceof Element))throw Error(`event target is not an element`);return e.target},Tm=e=>{let t=e.getAttribute(`href`);if(t===null)throw Error(`search hit has no href`);return t},Em=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function Dm(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=()=>_(a,`bell list missing`),s=$(e,`.wui-bell-menu`,HTMLElement),{src:c,readAction:l}=e.dataset,u=e.dataset.label||`Notifications`,d=e.dataset.emptyText||`You are all caught up.`,f=e.dataset.loadingText??`Loading…`,p=e.dataset.noUnreadText??`No unread notifications`,m=e.dataset.unreadText??`{count} unread notifications`,h=e.dataset.bellLabel??`{label}, {count} unread`,g=Number(e.dataset.pollSeconds??60),v=Si(),y=Number(e.dataset.unread)||0,b=(t,a=!0)=>{let o=Math.max(0,Number(t)||0),s=o!==y;y=o,e.dataset.unread=String(o),r&&(r.textContent=_m(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?u:vm(h,{label:u,count:_m(o)})),a&&s&&i&&(i.textContent=o===0?p:vm(m,{count:_m(o)}))},x=()=>s?.classList.contains(`show`)??!1,S=()=>{let e=Em(`wui-bell-state`,`Could not load notifications. `),t=document.createElement(`button`);t.type=`button`,t.className=`btn btn-link btn-sm`,t.dataset.wuiBellRetry=``,t.textContent=`Retry`,e.append(t),o().replaceChildren(e)},C=async t=>{if(t&&(o().setAttribute(`aria-busy`,`true`),o().querySelector(`.wui-bell-item`)||o().replaceChildren(Em(`wui-bell-state`,f))),c===void 0)throw Error(`bell has no data-src`);let n=await v.run(c);if(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)return;if(o().removeAttribute(`aria-busy`),!n.ok){t&&S();return}let r=xm(n.html),i=$(r,`[data-wui-unread]`,HTMLElement),a=i?Number(i.getAttribute(`data-wui-unread`)):y;b(a),(t||x())&&(r.querySelector(`.wui-bell-item`)?o().replaceChildren(r):o().replaceChildren(Em(`wui-bell-state`,d))),e.dispatchEvent(new CustomEvent(`wui:notifications:loaded`,{bubbles:!0,detail:{unread:a}}))};e.addEventListener(`show.bs.dropdown`,()=>C(!0)),e.addEventListener(`click`,async e=>{let t=wm(e);if(t.closest(`[data-wui-bell-retry]`)){await C(!0);return}let n=Sm(t,`[data-wui-bell-read]`,HTMLButtonElement);if(!n||!l)return;n.disabled=!0;let r=await U(l,{method:`POST`});n.disabled=!1,r.ok&&(b(0),await C(!0))});let w=null,ee=()=>{g>0&&w===null&&(w=setInterval(()=>C(x()),g*1e3))},T=()=>{w!==null&&clearInterval(w),w=null},E=()=>{document.hidden?T():(C(x()),ee())};return g>0&&(document.addEventListener(`visibilitychange`,E),document.hidden||ee()),t.push(()=>{T(),v.abort(),document.removeEventListener(`visibilitychange`,E)}),{setUnread:e=>b(e),refresh:()=>C(x())}}var Om=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),km=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function Am(e,t){let n=_($(e,`input.search-input`,HTMLInputElement),`search input missing`),r=$(e,`.wui-topsearch-results`,HTMLElement),i=()=>_(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??`No results`,p=e.dataset.resultsCountText??`{count} results`,m=e.dataset.resultCountText??`{count} result`,h=Si(),g,v=-1,y=()=>Cm(i(),`.wui-topsearch-hit`,HTMLElement),b=e=>{let t=y();v=t.length===0?-1:(e+t.length)%t.length,t.forEach((e,t)=>{let n=t===v;e.classList.toggle(`is-active`,n),e.setAttribute(`aria-selected`,n?`true`:`false`)});let r=v>=0?t[v]:void 0;r?(n.setAttribute(`aria-activedescendant`,r.id),r.scrollIntoView?.({block:`nearest`})):n.removeAttribute(`aria-activedescendant`)},x=()=>{i().hidden=!0,n.setAttribute(`aria-expanded`,`false`),n.removeAttribute(`aria-activedescendant`),v=-1},S=()=>{i().hidden=!1,n.setAttribute(`aria-expanded`,`true`)},C=t=>{e.classList.toggle(`is-open`,t),a?.setAttribute(`aria-expanded`,t?`true`:`false`)},w=t=>{let n=new CustomEvent(`wui:search:select`,{bubbles:!0,cancelable:!0,detail:{href:t}});e.dispatchEvent(n)&&window.location.assign(t)},ee=async t=>{if(e.classList.add(`is-loading`),s===void 0)throw Error(`search has no data-src`);let n=await h.run(km(s,c,t));if(n.kind!==`aborted`&&n.kind!==`stale`&&n.kind!==`session`){if(e.classList.remove(`is-loading`),n.ok){let e=xm(n.html),t=$(e,`[data-wui-count]`,HTMLElement);i().replaceChildren(e),y().forEach((e,t)=>{e.id=`${i().id}-opt-${t}`});let r=t?Number(t.getAttribute(`data-wui-count`)):y().length;o&&(o.textContent=r===0?f:vm(r===1?m:p,{count:r}))}else i().replaceChildren(Em(`wui-topsearch-empty`,`Search is unavailable right now.`));v=-1,S()}};n.addEventListener(`input`,()=>{clearTimeout(g);let t=n.value.trim();t.length<u?(h.abort(),e.classList.remove(`is-loading`),i().replaceChildren(),x()):g=setTimeout(()=>ee(t),d)}),n.addEventListener(`keydown`,t=>{if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(i().hidden||y().length===0)return;t.preventDefault(),b(v+(t.key===`ArrowDown`?1:-1))}else if(t.key===`Enter`){let e=y(),r=v>=0?e[v]:void 0;!i().hidden&&r?(t.preventDefault(),w(Tm(r))):l&&n.value.trim()!==``&&(t.preventDefault(),w(km(l,c,n.value.trim())))}else t.key===`Escape`&&(i().hidden?e.classList.contains(`is-open`)&&(t.preventDefault(),t.stopPropagation(),C(!1),a?.focus()):(t.preventDefault(),t.stopPropagation(),x()))}),i().addEventListener(`click`,e=>{let t=Sm(wm(e),`.wui-topsearch-hit`,HTMLElement);!t||e.ctrlKey||e.metaKey||e.shiftKey||e.button===1||(e.preventDefault(),w(Tm(t)))}),a?.addEventListener(`click`,()=>{let t=!e.classList.contains(`is-open`);C(t),t&&n.focus()});let T=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||Om(e.target)||(e.preventDefault(),C(!0),n.focus())},E=t=>{t.target instanceof Node&&e.contains(t.target)||(x(),e.classList.contains(`is-open`)&&C(!1))};document.addEventListener(`keydown`,T),document.addEventListener(`pointerdown`,E),t.push(()=>{clearTimeout(g),h.abort(),document.removeEventListener(`keydown`,T),document.removeEventListener(`pointerdown`,E)})}function jm(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>{ym(n,!!e.detail?.collapsed)});let r=e.dataset.wuiFoldedCookie;r&&e.addEventListener(`wui:shell:nav-fold`,e=>{bm(r,e.detail?.key,!!e.detail?.folded)}),e.addEventListener(`click`,t=>{wm(t).closest(`[data-wui-tabbar-more]`)&&$(e,`[data-app-shell-menu]`,HTMLElement)?.click()});let i=$(e,`[data-wui-bell]`,HTMLElement),a=i?Dm(i,t):null,o=$(e,`[data-wui-topsearch]`,HTMLElement);o&&Am(o,t);let s={el:e,setUnread(e){_(a,`WUI.shell: this <app-shell> has no <app-shell-notifications>.`).setUnread(e)},refreshNotifications(){return _(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)}};gm.set(e,s);let c=n=>{if(n.target===e||n.target instanceof Node&&n.target.contains(e)){for(let e of t)e();gm.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,c)}};return document.addEventListener(`wui:teardown`,c),s}function Mm(e=document){let t=[];e instanceof HTMLElement&&e.matches(`[data-app-shell]`)&&t.push(e),t.push(...Cm(e,`[data-app-shell]`,HTMLElement));for(let e of t)e.dataset.wuiPartsWired||(e.dataset.wuiPartsWired=`1`,jm(e))}function Nm(e){let t=Sm(e,`[data-app-shell]`,HTMLElement);return t?(gm.has(t)||Mm(t),gm.get(t)??null):null}var Pm=`data-wui-submit-once`,Fm=`data-wui-submit-pending`,Im=`wui-submit-spinner`,Lm=new WeakSet,Rm=new WeakMap;function zm(e){return e instanceof HTMLButtonElement||e instanceof HTMLInputElement?e:null}function Bm(e){if(e.setAttribute(`aria-busy`,`true`),e.tagName===`INPUT`||e.querySelector(`.${Im}`))return;let t=e.ownerDocument.createElement(`span`);t.className=`spinner-border spinner-border-sm me-2 ${Im}`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t)}function Vm(e){e.removeAttribute(`aria-busy`),e.querySelector(`.${Im}`)?.remove()}function Hm(e){return e.method===`post`&&e.target!==`_blank`&&e.getAttribute(`data-wui-submit-once`)!==`off`}function Um(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!Hm(t))return;if(t.hasAttribute(Fm)){e.preventDefault();return}t.setAttribute(Fm,``);let n=zm(e.submitter);setTimeout(()=>{t.hasAttribute(Fm)&&(e.defaultPrevented?t.removeAttribute(Fm):n&&(n.disabled=!0,Bm(n),Rm.set(t,n)))},0)}var Wm=e=>[...e.querySelectorAll(`form[${Fm}]`)].filter(e=>e instanceof HTMLFormElement);function Gm(e){for(let t of Wm(e)){t.removeAttribute(Fm);let e=Rm.get(t);e&&(e.disabled=!1,Vm(e),Rm.delete(t))}}function Km(e){let t=e.ownerDocument===null?e:e.ownerDocument;Lm.has(t)||(Lm.add(t),t.addEventListener(`submit`,Um,!0),t.defaultView?.addEventListener(`pageshow`,()=>Gm(t)))}var qm=[`light`,`dark`,`auto`],Jm=[`wave`,`circle`,`slide`,`blinds`,`fade`,`none`],Ym=`wave`,Xm=`theme`,Zm={wave:1100,circle:700,slide:600,blinds:900,fade:350,none:0},Qm=`wui-theme-switching`,$m=`wui:theme:change`,eh=`(prefers-color-scheme: dark)`,th=e=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(e).matches,nh=e=>qm.some(t=>t===e);function rh(e){return e===`dark`||e===`auto`&&th(eh)?`dark`:`light`}function ih(e=Xm){let t=null;try{t=window.localStorage.getItem(e)}catch{}return nh(t)?t:`auto`}function ah(e,t=Xm){try{window.localStorage.setItem(t,e)}catch{}}function oh(e){let t=document.documentElement,n=rh(e);t.setAttribute(`data-theme`,e),t.setAttribute(`data-bs-theme`,n),document.dispatchEvent(new CustomEvent($m,{detail:{mode:n,preference:e}}))}var sh=`(function(k){var m;try{m=localStorage.getItem(k)}catch{m=null}if(m!=='light'&&m!=='dark')m='auto';var r=document.documentElement,q=window.matchMedia?window.matchMedia('(prefers-color-scheme: dark)'):null;function s(){var t=r.getAttribute('data-theme');r.setAttribute('data-bs-theme',t==='auto'?(q&&q.matches?'dark':'light'):t)}r.setAttribute('data-theme',m);s();if(q&&q.addEventListener)q.addEventListener('change',function(){if(r.getAttribute('data-theme')==='auto')s()})})(`;function ch(e=Xm){return`${sh}${JSON.stringify(String(e)).replace(/</g,`\\u003c`)})`}function lh(e,{includeAuto:t=!1}={}){return e===`light`?`dark`:e===`dark`&&t?`auto`:`light`}function uh(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(eh),n=()=>e(t.matches?`dark`:`light`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var dh=60,fh=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,ph=e=>e.toFixed(1),mh=(e,t)=>`${ph(e)}px ${ph(t)}px`,hh={amplitude:22,segments:36,cycles:1.5,ripples:2},gh=6,_h=(e,t,n,r,i)=>{let{amplitude:a,segments:o,cycles:s}=hh,c=n*(t+2*a),l=i?t+a-c:c-a,u=i?t+2*a:-2*a,d=[mh(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(mh(n,i))}return d.push(mh(e,u)),`polygon(${d.join(`, `)})`},vh=(e,t,n,r)=>{let i=t/gh,a=[];for(let t=0;t<gh;t++){let o=t*i,s=i*n,c=r?o+i-s:o,l=r?o+i:o+s;a.push(mh(0,c),mh(e,c),mh(e,l),mh(0,l))}return`polygon(${a.join(`, `)})`};function yh(e,{width:t,height:n,to:r=`dark`,origin:i}){let a=r===`dark`,o=[];for(let r=0;r<=dh;r++){let s=r/dh,c=fh(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(${ph(a*c)}px at ${ph(e)}px ${ph(r)}px)`});break}case`slide`:{let e=n*(1-c);o.push({clipPath:a?`inset(${ph(e)}px 0px 0px 0px)`:`inset(0px 0px ${ph(e)}px 0px)`});break}case`blinds`:o.push({clipPath:vh(t,n,c,a)});break;case`fade`:o.push({clipPath:`none`,opacity:c});break;case`none`:return[];default:o.push({clipPath:_h(t,n,c,s*hh.ripples*2*Math.PI,a)})}}return o}var bh=e=>{e instanceof DOMException&&(e.name===`AbortError`||e.name===`InvalidStateError`)||R(`[@webority/ui-elements] The theme view transition failed:`,e)};function xh(e,{effect:t=Ym,to:n,origin:r,duration:i}={}){let a=document.documentElement,o=n!==void 0&&a.getAttribute(`data-bs-theme`)===n;if(t===`none`||o||th(`(prefers-reduced-motion: reduce)`)||typeof document.startViewTransition!=`function`||typeof a.animate!=`function`)return e(),Promise.resolve(!1);a.classList.add(Qm);let s=document.startViewTransition(e),c=i??Zm[t]??Zm.wave;return s.ready.then(()=>{let e=yh(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(bh),s.finished.catch(bh).finally(()=>a.classList.remove(Qm)).then(()=>!0)}function Sh(){Se(),i(`wui-select`,to),i(`wui-datepicker`,Ar),i(`wui-dock`,jr),i(`wui-otp`,Zi),i(`wui-shortcuts`,So),i(`wui-record-pager`,ga),i(`wui-data-table`,pn),i(`wui-hover-card`,Vr),i(`wui-navigation-menu`,Yr),i(`wui-notification-center`,Bi),i(`wui-onboarding-checklist`,Ji),i(`wui-overflow`,sa),i(`wui-rating`,ha),i(`wui-relative-time`,ka),i(`wui-rolling-number`,Ma),i(`wui-show-more`,Eo),i(`wui-truncate`,Do),i(`wui-whats-new`,Io)}return globalThis.WeborityUiElementsInternal||(globalThis.WeborityUiElementsInternal={version:`0.150.0`,modules:Ss}),er(),Sh(),e.AVATAR_ACCEPT=Cs,e.AVATAR_MAX_SIZE_MB=ws,e.AVATAR_OUTPUT_SIZE=Ts,e.AVATAR_OUTPUT_TYPE=Es,e.AVATAR_PREVIEW_SIZES=Ds,e.AVATAR_TEXT=Os,e.BAR_BULK_IN_BAR_ATTRIBUTE=Xc,e.COLUMN_MAX_WIDTH=Tt,e.COLUMN_MIN_WIDTH=wt,e.COMMAND_SHORTCUT_ATTRIBUTE=Gs,e.CONFIRM_DIALOG_ID=nf,e.CONFIRM_TONES=rf,e.COPY_FEEDBACK_MS=Wo,e.CSRF_META_NAME=ui,e.CURRENCIES=Ve,e.CURRENCY_SYMBOLS=we,e.DATA_TABLE_TEXT=N,e.DATE_PATTERNS=We,e.DEFAULT_CSRF_HEADER=di,e.DEFAULT_CURRENCY=Ce,e.DEFAULT_IMAGE_ACCEPT=Qs,e.DEFAULT_MAX_SIZE_MB=$s,e.DEFAULT_PASSWORD_RULES=al,e.DEFAULT_REQUIREMENTS_TITLE=ol,e.DEFAULT_THEME_EFFECT=Ym,e.DEFAULT_THEME_STORAGE_KEY=Xm,e.DISCARD_EVENT=Ap,e.DISCARD_TEXT=kp,e.DROP_OVER_CLASS=fl,e.DURATION_UNITS=Ue,e.EMPTY_VALUE=Ke,e.FILTER_POPOVER_MAX_CHIPS=de,e.FLASH_STORAGE_KEY=sf,e.FLASH_VARIANTS=af,e.FORMAT_STYLES=Be,e.HTTP_KINDS=hi,e.IST_TIME_ZONE=j,e.LIST_KEYS=w,e.MASK_INPUT_TYPES=_c,e.MASK_NAMES=Tc,e.MENTION_ID_PATTERN=qo,e.MONEY_UNITS=He,e.NOTIFICATION_COUNT_CAP=Zr,e.NOTIFICATION_TEXT=V,e.PIN_AT_VAR=zt,e.PIN_SIDES=Ot,e.RESIZE_STEP=Et,e.RESIZE_STEP_LARGE=Dt,e.ROW_DRAG_TYPE=pl,e.ROW_DROP_EVENT=dl,e.ROW_HEIGHTS=At,e.ROW_MOVE_LIMIT=Ut,e.ROW_MOVE_MS=Wt,e.ROW_SAVE_ATTR=Qt,e.ROW_SAVE_ERROR_CLASS=$t,e.ROW_SAVE_STATES=Zt,e.SCROLL_EDGE_SELECTOR=Bl,e.SEARCH_OPEN_KEY=Ms,e.SELECT_ALL_LABEL=os,e.SELECT_CELL_CLASS=K,e.SELECT_KEY=ee,e.SELECT_ROW_LABEL=ss,e.SERVER_ACTION_TEXT=cf,e.SHORTCUTS_OFF_ATTRIBUTE=b,e.SHORTCUT_EVENT=S,e.SHORTCUT_SCOPE_ATTRIBUTE=x,e.SHORTCUT_TEXT=C,e.SUBMIT_ONCE_ATTRIBUTE=Pm,e.THEME_BOOT_SCRIPT_BODY=sh,e.THEME_CHANGE_EVENT=$m,e.THEME_EFFECTS=Jm,e.THEME_EFFECT_DURATION=Zm,e.THEME_MODES=qm,e.THEME_SWITCHING_CLASS=Qm,e.TOAST_ACTION_METHODS=ai,e.TOAST_ACTION_MS=mu,e.UNSAVED_TEXT=Gf,e.VIRTUAL_OVERSCAN=kt,e.WHATS_NEW_READ_EVENT=Oo,e.WUI_HEADERS=H,e.WuiDataTable=pn,e.WuiDatePicker=Ar,e.WuiDock=jr,e.WuiHoverCard=Vr,e.WuiNavigationMenu=Yr,e.WuiNotificationCenter=Bi,e.WuiOnboardingChecklist=Ji,e.WuiOtp=Zi,e.WuiOverflow=sa,e.WuiRating=ha,e.WuiRecordPager=ga,e.WuiRelativeTime=ka,e.WuiRollingNumber=Ma,e.WuiSelect=to,e.WuiShortcuts=So,e.WuiShowMore=Eo,e.WuiTruncate=Do,e.WuiWhatsNew=Io,e.acceptDroppedFiles=fc,e.acceptLabel=lc,e.addRowSelectCells=hs,e.addSelectColumn=gs,e.applyBarBulk=rl,e.applyTheme=oh,e.ariaKeyShortcuts=ie,e.attachFileDrop=pc,e.attachInputMask=Bc,e.attachRowDrag=Ll,e.attachScrollEdges=Hl,e.attachShiftRange=ys,e.avatarCropOptions=js,e.avatarUnreadableMessage=As,e.barBulkCountText=$c,e.buildPasswordRules=cl,e.clampColumnWidth=Mt,e.classifyStatus=yi,e.closeRemotePane=tf,e.collapseSearch=Vs,e.configureCsrf=pi,e.confirmAction=Cf,e.copyTextToClipboard=Go,e.createDiscardPrompt=Wp,e.createRequestQueue=Si,e.createSelectHeaderCell=ls,e.createSelectRowCell=us,e.createSelectSpacerCell=ds,e.currencyPrefix=Ee,e.deriveStepStatus=rs,e.evaluatePassword=ll,e.formValues=cp,e.formatCompact=ut,e.formatCurrency=ct,e.formatDate=M,e.formatDateTime=yt,e.formatDuration=pt,e.formatFileSize=oc,e.formatMasked=Nc,e.formatNumber=st,e.formatPercent=dt,e.formatRelativeTime=xa,e.formatValue=_t,e.getServerTable=fu,e.getShell=Nm,e.glyphSvg=z,e.groupCount=jt,e.groupItems=Nt,e.groupNotificationsByDay=ii,e.identityCell=en,e.inShortcutScope=ce,e.initCollapsibleSearch=Ws,e.initCommandShortcuts=Zs,e.initDrawerDiscard=mm,e.initInputMasks=Jc,e.initPageBarBulk=il,e.initRemoteModals=Yd,e.initRowDrag=zl,e.initScrollEdges=Jl,e.initServerActions=Wf,e.initServerTables=du,e.initShellParts=Mm,e.initSubmitOnce=Km,e.initUnsavedChanges=Dp,e.isCommandChord=Js,e.isCurrencyCode=Te,e.isHeicFile=ks,e.isImageFile=ic,e.isImageOnlyAccept=cc,e.isMaskPattern=Dc,e.isPdfFile=sc,e.isTimeZone=je,e.isTypingTarget=ae,e.loadRemoteDrawer=Qd,e.loadRemoteModal=Xd,e.loadRemotePane=ef,e.maskedPostValue=Ic,e.matchSegments=xs,e.matchesAccept=uc,e.measureRows=Jt,e.mentionLabel=Xo,e.mentionTextFromValue=$o,e.mentionValueFromText=es,e.mentionedIds=ts,e.moveFocus=ue,e.nextTheme=lh,e.notificationCountText=$r,e.notificationDayHeading=ri,e.notificationTime=ni,e.notificationTriggerLabel=ei,e.notificationUnreadAnnouncement=ti,e.openSearch=Bs,e.parseMentionValue=Qo,e.parseToastAction=ci,e.passwordSatisfies=ul,e.pinAtValue=Bt,e.pinClasses=Ht,e.pinOffsetVar=Rt,e.planPins=Vt,e.playRowMoves=Yt,e.postedMasked=Mc,e.rawMasked=jc,e.readColumnWidths=It,e.readCsrf=_i,e.readStoredTheme=ih,e.relativeTimeTitle=Sa,e.releaseOverlay=Yc,e.resetUnsavedChanges=Op,e.resolveMask=kc,e.resolveTheme=rh,e.rowLabel=tn,e.rowOrderChanged=Xt,e.runShortcut=le,e.runToastAction=bu,e.saveOutcomeText=an,e.setRowSaveState=nn,e.settledRows=rn,e.shortcutKey=re,e.shortcutName=ne,e.shortcutsOff=se,e.showResultToast=yu,e.stepperHeaderItems=is,e.storeTheme=ah,e.syncSelectAll=_s,e.syncTargets=Rl,e.themeBootScript=ch,e.themeKeyframes=yh,e.tickedKeys=wl,e.timeZoneLabel=St,e.toInstant=mt,e.todayIn=Le,e.transitionTheme=xh,e.validateFile=dc,e.virtualRange=Pt,e.wallClockOf=Ie,e.watchSystemTheme=uh,e.whenElementsReady=nr,e.withTrustedLabel=Sr,e.writeColumnWidths=Lt,e.wuiFetch=U,e.zoneOffsetMs=Ne,e.zoneParts=Me,e})({});
52
+ <div class="field-error wui-select-error" id="${B(f)}" aria-live="polite"${this._error?``:` hidden`}>${B(this._error)}</div>`,this._rendered=!0,this._syncMirror(),this._syncValidity(),this._drawValue(),this._syncReset(),this.renderList(),this._wire(),jn(this,this.querySelector(`.wui-select-control`)),this._mountParts(e)}_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||`Select`}_snapshotDeclared(){if(this._declared)return;let e=[...this.querySelectorAll(`:scope > wui-option`)];e.length&&(this._declared=e.map(e=>{let t={value:e.getAttribute(`value`)??Co(e).trim(),label:e.innerHTML,[wr]:!0,selected:e.hasAttribute(`selected`)};for(let[n,r]of ho){let i=e.getAttribute(n);i&&(t[r]=i)}return e.hasAttribute(`disabled`)&&(t.disabled=!0),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){if(e===``)return;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`)||fo[this.mode]}_hasValue(){return Array.isArray(this._value)?this._value.length>0:this._value!==``}_selectedValues(){return Array.isArray(this._value)?this._value:this._hasValue()?[this._value]:[]}_applyValue(){this._syncMirror(),this._syncValidity(),this._rendered&&(this._drawValue(),this._syncReset(),this.renderList())}_syncMirror(){W(this.mode)?In(this,this._selectedValues()):L(this,this._value)}_drawValue(){let e=this._refs();if(!e.value)return;let t=W(this.mode),n=t?void 0:this._optionFor(this._value);this._syncTitle(n),this._syncValueAvatar(),this._activePartsList().some(e=>e.renderValue?.()===!0)||(t?(e.value.classList.remove(`wui-select-placeholder`),e.value.textContent=``):(e.value.classList.toggle(`wui-select-placeholder`,!n),e.value.innerHTML=n?kr(n):B(this._placeholder())))}_syncTitle(e){let t=this.querySelector(`.wui-select-control`);if(!t)return;let n=e&&!this.hasAttribute(`title`)?Mr(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=!W(this.mode)&&this._hasValue()?La({avatar:this.getAttribute(`value-avatar`),initials:this.getAttribute(`value-initials`)},`avatar-xs`):``;e.classList.toggle(`wui-has-value-avatar`,!!t),t&&e.insertAdjacentHTML(`afterbegin`,`<span class="wui-select-value-avatar" aria-hidden="true">${t}</span>`)}_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},`Please fill in this field.`,t instanceof HTMLElement?t:void 0)}else e.setValidity({})}}_syncReset(){let e=G(this,`.wui-select-reset`,HTMLElement);e&&(e.hidden=!(this.hasAttribute(`clearable`)&&this._hasValue()&&!I(this)))}_syncInvalid(){let e=this.querySelector(`.wui-select-control`);e&&(this.hasAttribute(`aria-invalid`)||this._error?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}_syncError(){let e=G(this,`.wui-select-error`,HTMLElement);e&&(e.textContent=this._error,e.hidden=!this._error),this._syncInvalid()}_refs(){return{control:G(this,`.wui-select-control`,HTMLElement),value:G(this,`.wui-select-value`,HTMLElement),menu:G(this,`.wui-select-menu`,HTMLElement),list:G(this,`.wui-select-options`,HTMLElement),search:G(this,`.wui-select-search input`,HTMLInputElement),input:G(this,`.wui-select-draft`,HTMLInputElement)}}_menuOpen(){let e=G(this,`.wui-select-menu`,HTMLElement);return e!==null&&!e.hidden}_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`)||I(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>uo}_visible(){let e=this._refs();return e.list?So(e.list,`.wui-select-option`):[]}_setActive(e,{reveal:t=!0}={}){let n=this._refs();if(!n.list||!n.control)return;let r=this._visible();this._active=e;let i=e>=0?r[e]??null:null;Ha(n.list,i),i?(t&&i.scrollIntoView({block:`nearest`}),n.control.setAttribute(`aria-activedescendant`,i.id)):n.control.removeAttribute(`aria-activedescendant`)}_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}_place(){let e=this._refs();if(!e.control||!e.menu)return;let t=this.hasAttribute(`open`)?{below:!0}:{};if(this.getAttribute(`density`)===`compact`){let n=e.control.getBoundingClientRect();e.menu.style.width=`max-content`,e.menu.style.minWidth=`${n.width}px`,e.menu.style.maxWidth=`280px`,d(e.control,e.menu,t)}else d(e.control,e.menu,{matchWidth:!0,...t})}_open({focus:e=!0}={}){let t=this._refs();if(!t.menu||!t.control)return;let n=!t.menu.hidden;t.menu.hidden=!1,t.control.setAttribute(`aria-expanded`,`true`),t.control.classList.add(`open`),this._query=t.input?t.input.value:``,this._ownsFilter=this._ownsFilter&&this._query!==``;let r=G(this,`.wui-select-search .wui-select-clear`,HTMLElement);if(r&&(r.hidden=!0),t.search&&(t.search.value=``),this.renderList(),f(this,this._reposition),e&&(t.search?.focus(),this._setActive(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.hidden;t.menu.hidden=!0,t.control.setAttribute(`aria-expanded`,`false`),t.control.classList.remove(`open`),this._setActive(-1),this._nav?.clearTypeahead(),p(this),n&&this.dispatchEvent(new CustomEvent(`wui-select:close`,{bubbles:!0}))}_onQueryChange(e){this._query=e,this._setActive(-1);let t=G(this,`.wui-select-search .wui-select-clear`,HTMLElement);t&&(t.hidden=!e);let n=!1;for(let t of this._activePartsList())t.onQuery?.(e)===!0&&(n=!0);this._ownsFilter=n,this.renderList()}_pick(e){if(e.getAttribute(`aria-disabled`)===`true`)return;let t=e.dataset.custom===`true`,n=e.dataset.value??``,r=t?{value:n,label:Co(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);W(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`&&no(this)}_onKeyDown(e){if(!I(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`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this._open({focus:!0}));return}}e.key===`Escape`&&(e.preventDefault(),e.stopPropagation()),_(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=_(G(this,`.wui-select`,HTMLElement),`The select wrapper is missing.`),i=G(this,`.wui-select-search .wui-select-clear`,HTMLElement),a=G(this,`.wui-select-reset`,HTMLElement);this._nav=Va({getVisibleOptions:()=>this._visible(),getActive:()=>this._active,setActive:e=>this._setActive(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:()=>{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._visible().length>0||this._actionRows().length>0;n&&r&&!this._menuOpen()&&!I(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=_(e.search,`The search input is missing.`);t.value=``,this._onQueryChange(``),t.focus()}),t.addEventListener(`click`,e=>{if(!(e.target instanceof Element&&e.target.closest(`[data-remove]`))){if(this.mode===`tag`){if(I(this))return;this._refs().input?.focus(),!this._menuOpen()&&this._draftOpens()&&this._open({focus:!1})}else e.target instanceof HTMLInputElement?!this._menuOpen()&&!I(this)&&this._open({focus:!1}):(this._clearHover(),this._hoverOpened&&this._menuOpen()?(this._hoverOpened=!1,this._open({focus:!0})):this._menuOpen()?this._close():I(this)||this._open({focus:!0}))}}),a?.addEventListener(`click`,e=>{e.stopPropagation(),this.commit(W(this.mode)?[]:``),this._close(),t.focus()}),n.addEventListener(`click`,n=>{let r=xo(n).closest(`.wui-select-option`);if(r instanceof HTMLElement&&(this._pick(r),W(this.mode))){let n=this.querySelector(`.wui-select-draft`);(e.search??(n instanceof HTMLElement?n:t)).focus()}}),n.addEventListener(`mousedown`,e=>{W(this.mode)&&e.target instanceof Element&&e.target.closest(`.wui-select-option`)&&e.preventDefault()}),n.addEventListener(`mousemove`,e=>{let t=xo(e).closest(`.wui-select-option`);t instanceof HTMLElement&&!t.classList.contains(`is-active`)&&this._setActive(this._visible().indexOf(t),{reveal:!1})}),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._bindGlobal=()=>{this._teardown(),this._onDocClick=e=>{this._menuOpen()&&!e.composedPath().includes(this)&&this._close()},document.addEventListener(`click`,this._onDocClick),this._menuOpen()&&f(this,this._reposition)},this.hasAttribute(`open`)&&this._open({focus:!1}),this._bindGlobal()}_teardown(){this._onDocClick&&=(document.removeEventListener(`click`,this._onDocClick),null),p(this),this._nav?.teardown()}_activePartsList(){return this._partsMounted?_(this._parts,`The mounted parts are missing.`):[]}_ensureParts(){if(!this.isConnected)return;let e=vo(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=>wo(this,e))).then(e=>{n===this._partToken&&(this._parts=e.filter(e=>e!==null),this._mountParts())})}_mountParts(e={draft:``,query:``}){if(!this._parts||this._partsMounted||!this._rendered||!this.isConnected)return;this._partsMounted=!0;let t=ao(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??``}}},ao=e=>{let{control:t,value:n,menu:r,list:i}=e;return{control:_(t,`control missing`),value:_(n,`value missing`),menu:_(r,`menu missing`),list:_(i,`list missing`),search:e.search,input:e.input}},oo=e=>Ja.includes(e),so=[`comfortable`,`compact`],co=150,lo=250,uo=10,fo={single:`Select…`,search:`Select…`,multiple:`Select…`,tag:`Add…`,country:`Select country`},po=new Set([`countries`,`suggested`,`suggested-label`,`all-countries-label`,`max-tags`,`pattern`,`collapse-chips`,`source`,`remote`,`min-chars`]),mo=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`]),ho=[[`icon`,`icon`],[`description`,`description`],[`meta`,`meta`],[`group`,`group`],[`avatar`,`avatar`],[`initials`,`initials`],[`disabled-hint`,`disabledHint`]],go=(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),_o=(e,t)=>t===`multiple`?[`chips`]:t===`search`?[`search`]:t===`country`?[`country`]:t===`tag`?no(e)?[`chips`,`search`]:[`chips`]:[],vo=(e,t)=>e.hasAttribute(`recents-key`)?[`recents`,..._o(e,t)]:_o(e,t),yo=`This control could not load. Reload the page.`,bo=e=>typeof e==`object`&&!!e&&`default`in e&&typeof e.default==`function`,xo=e=>{if(e.target instanceof Element)return e.target;throw Error(`The event target is not an element.`)},G=(e,t,n)=>{let r=e.querySelector(t);return r instanceof n?r:null},So=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Co=e=>{let t=e.textContent;if(t===null)throw Error(`The element has no text.`);return t},wo=(e,t)=>eo(t).then(e=>{if(!bo(e))throw Error(`The part ${t} has no default export.`);return e.default()}).catch(()=>(document.dispatchEvent(new CustomEvent(Kn,{bubbles:!0,composed:!0,detail:{chunk:t}})),e.setError(yo),null)),To=`wui-shortcuts-open-change`;function Eo(e,t){let n=e.querySelector(t);return n instanceof HTMLElement?n:null}function Do(e,t){return[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement)}var Oo=class extends g{_doc;_onKeyDown;_onClick;_onDocClick;static get observedAttributes(){return[`open`,`no-trigger`]}constructor(){super(),this._doc=null,this._onKeyDown=e=>this._keydown(e),this._onClick=e=>this._click(e),this._onDocClick=e=>{let t=y(e.target,`[data-wui-shortcuts-open]`)?.getAttribute(`data-wui-shortcuts-open`);t&&this.matches(t)?this.setOpen(!0):this.open&&!e.composedPath().includes(this)&&this.setOpen(!1,{focus:!1})}}connectedCallback(){this._doc=this.ownerDocument,this._doc.addEventListener(`keydown`,this._onKeyDown),this._doc.addEventListener(`click`,this._onDocClick),this.addEventListener(`click`,this._onClick),this.hasAttribute(`open`)&&!this.open&&this.setOpen(!0,{focus:!1}),this._place(),this._syncTrigger()}attributeChangedCallback(e,t,n){e===`no-trigger`?this._syncTrigger():this._sheet()&&n!==null!==this.open&&this.setOpen(n!==null)}disconnectedCallback(){this._doc?.removeEventListener(`keydown`,this._onKeyDown),this._doc?.removeEventListener(`click`,this._onDocClick),this.removeEventListener(`click`,this._onClick),this._doc=null}get open(){let e=this._sheet();return!(!e||e.hidden)}set open(e){let t=e===!0||e===``||e===`true`;this._sheet()?t!==this.open&&this.setOpen(t):this.toggleAttribute(`open`,t)}setOpen(e,{focus:t=!0}={}){let n=this._sheet();if(!n)return;let r=n.hidden===e;n.hidden=!e,this.toggleAttribute(`open`,e),e&&this._place();let i=Eo(this,`.wui-shortcut-toggle`);i?.setAttribute(`aria-expanded`,String(e)),r&&this.dispatchEvent(new CustomEvent(To,{bubbles:!0,detail:{open:e}})),t&&(e?Eo(n,`.wui-shortcut-close`)?.focus():i?.focus())}_sheet(){return Eo(this,`.wui-shortcut-sheet`)}_syncTrigger(){let e=Eo(this,`.wui-shortcut-toggle`);e&&(e.hidden=this.hasAttribute(`no-trigger`))}_place(){let e=this._sheet();if(!e||e.hidden)return;e.classList.remove(`wui-shortcut-sheet-below`,`wui-shortcut-sheet-start`);let t=_(this.ownerDocument.defaultView,`WuiShortcuts needs a window to place its sheet`),n={top:0,left:0,right:t.innerWidth,bottom:t.innerHeight};for(let e=this.parentElement;e&&e!==this.ownerDocument.documentElement;e=e.parentElement){let r=t.getComputedStyle(e);if(r.overflowX===`visible`&&r.overflowY===`visible`)continue;let i=e.getBoundingClientRect();n.top=Math.max(n.top,i.top),n.left=Math.max(n.left,i.left),n.right=Math.min(n.right,i.right),n.bottom=Math.min(n.bottom,i.bottom)}let r=e.getBoundingClientRect();r.top<n.top&&e.classList.add(`wui-shortcut-sheet-below`),r.left<n.left&&e.classList.add(`wui-shortcut-sheet-start`)}_scope(){let e=this.closest(`[${x}]`);return e instanceof HTMLElement?e:null}_items(){let e=this.getAttribute(`items`);return e?Do(_(this._scope()??this._doc,`WuiShortcuts used before it was connected`),e):[]}_click(e){let t=e.target;t instanceof Element&&(t.closest(`.wui-shortcut-toggle`)?this.setOpen(!this.open):t.closest(`.wui-shortcut-close`)&&this.setOpen(!1))}_tickFocused(){let e=this._items(),t=_(this._doc,`WuiShortcuts used before it was connected`).activeElement,n=t?.closest?.(`li, tr`),r=e.find(e=>e===t||e.contains(t)||n?.contains(e)),i=(r?.closest(`li, tr`)??r)?.querySelector(`input[type="checkbox"]`);i instanceof HTMLInputElement&&i.click()}_focusSearch(){let e=this.getAttribute(`search`);if(!e)return;let t=_(this._doc,`WuiShortcuts used before it was connected`);(Eo(this._scope()??t,e)??Eo(t,e))?.focus()}_keydown(e){if(e.defaultPrevented)return;let t=ne(e);if(!t)return;if(t===`esc`&&this.open){e.preventDefault(),this.setOpen(!1);return}let n=this._scope(),r={help:()=>this.setOpen(!this.open)};if(this.getAttribute(`items`)&&(r.j=()=>ue(this._items(),1),r.k=()=>ue(this._items(),-1),r.x=()=>this._tickFocused()),this.getAttribute(`search`)&&(r.slash=()=>this._focusSearch()),r[t]){le(e,r,n);return}if(t===`enter`)return;let i=_(this._doc,`WuiShortcuts used before it was connected`),a=e.target instanceof Node?e.target:null;if(se(i)||!ce(a,n)||ae(a))return;let o=re(t),s=Do(this,`.wui-shortcut-keys [data-shortcut]`).find(e=>e.dataset.shortcut===o);if(!s)return;let c=(n??i).querySelector(`[aria-current="true"]`)?.closest(`[data-key]`),l=c instanceof HTMLElement?c.dataset.key??null:null;if(!this.dispatchEvent(new CustomEvent(`wui:shortcut`,{bubbles:!0,cancelable:!0,detail:{key:o,itemKey:l}}))){e.preventDefault();return}let u=s.dataset.target,d=u?Eo(i,u):null;d&&(e.preventDefault(),d.click())}},ko=3,Ao=`Show more`,jo=`Show less`,Mo=class extends g{_width;_observer;_toggle;_onClick;constructor(){super(),this._width=-1,this._observer=null,this._toggle=null,this._onClick=()=>this.toggle()}connectedCallback(){let e=this.querySelector(`.wui-show-more-toggle`);if(this._toggle=e instanceof HTMLButtonElement?e:null,!this._toggle)return;let t=Number.parseInt(this.getAttribute(`lines`)??``,10);this.style.setProperty(`--wui-show-more-lines`,String(t>=1?t:ko)),this._toggle.addEventListener(`click`,this._onClick),this._sync(),this._check(),typeof ResizeObserver<`u`&&(this._observer=new ResizeObserver(()=>{this.clientWidth!==this._width&&this._check()}),this._observer.observe(this))}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,this._toggle?.removeEventListener(`click`,this._onClick),this._toggle=null}get expanded(){return this.hasAttribute(`expanded`)}toggle(e=!this.expanded){this.toggleAttribute(`expanded`,!!e),this._sync(),this.dispatchEvent(new CustomEvent(`wui:show-more:toggle`,{bubbles:!0,detail:{expanded:this.expanded}}))}_sync(){let e=_(this._toggle,`WuiShowMore used before it was connected`),t=this.expanded;e.setAttribute(`aria-expanded`,String(t)),e.textContent=t?this.getAttribute(`less-label`)||jo:this.getAttribute(`more-label`)||Ao}_check(){let e=this.querySelector(`.wui-show-more-body`);if(!(e instanceof HTMLElement))return;this._width=this.clientWidth;let t=this.expanded;t&&this.removeAttribute(`expanded`);let n=e.scrollHeight>e.clientHeight+1;t&&this.setAttribute(`expanded`,``);let r=_(this._toggle,`WuiShowMore used before it was connected`);r.hidden=!n}},No=class extends g{_measure;_resize;_mutation;_ownTabindex;constructor(){super(),this._measure=()=>this.measure(),this._resize=null,this._mutation=null,this._ownTabindex=!1}connectedCallback(){this.measure(),this.addEventListener(`mouseover`,this._measure),typeof ResizeObserver<`u`&&(this._resize=new ResizeObserver(this._measure),this._resize.observe(this)),this._mutation=new MutationObserver(this._measure),this._mutation.observe(this,{childList:!0,subtree:!0,characterData:!0})}disconnectedCallback(){this.removeEventListener(`mouseover`,this._measure),this._resize?.disconnect(),this._mutation?.disconnect(),this._resize=null,this._mutation=null}measure(){let e=this.querySelector(`.wui-truncate-text`);e&&(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight?(this.setAttribute(`data-wui-tip`,(e.textContent??``).replace(/\s+/g,` `).trim()),this.hasAttribute(`tabindex`)||(this.setAttribute(`tabindex`,`0`),this._ownTabindex=!0)):(this.removeAttribute(`data-wui-tip`),this._ownTabindex&&=(this.removeAttribute(`tabindex`),!1)))}},Po=`wui-whats-new-read`,Fo=`wui-whats-new:`,Io=`data-open`,Lo=`data-wui-unread`,Ro=0,zo=e=>{let t=Date.parse(e);return Number.isNaN(t)?-1/0:t},Bo=(e,t)=>zo(t)>zo(e)?t:e,Vo=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Ho=class extends g{_doc;_stored;_observer;_onTriggerClick;_onKeyDown;_onPointerDown;static get observedAttributes(){return[`storage-key`,`read-through`,`indicator`]}constructor(){super(),this._doc=null,this._stored=``,this._observer=null,this._onTriggerClick=()=>this.isOpen?this.close(!0):this.open(),this._onKeyDown=e=>{e.key===`Escape`&&this.isOpen&&(e.stopPropagation(),this.close(!0))},this._onPointerDown=e=>{this.isOpen&&!e.composedPath().includes(this)&&this.close(!1)}}get isOpen(){return this.hasAttribute(Io)}get _trigger(){return Vo(this,`.wui-whats-new-trigger`)}get _panel(){return Vo(this,`.wui-whats-new-panel`)}get _dot(){return Vo(this,`.wui-whats-new-dot`)}connectedCallback(){this._doc=this.ownerDocument;let e=this._panel,t=this._trigger;e&&t&&(e.id||=`wui-whats-new-${++Ro}`,t.setAttribute(`aria-controls`,e.id),t.setAttribute(`aria-expanded`,`false`),t.addEventListener(`click`,this._onTriggerClick),this.addEventListener(`keydown`,this._onKeyDown),this._stored=this._load(),this._refresh(),typeof MutationObserver<`u`&&(this._observer=new MutationObserver(()=>this._refresh()),this._observer.observe(e,{childList:!0,subtree:!0})))}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,this._trigger?.removeEventListener(`click`,this._onTriggerClick),this.removeEventListener(`keydown`,this._onKeyDown),this._doc?.removeEventListener(`pointerdown`,this._onPointerDown,!0),p(this),this.removeAttribute(Io),this._doc=null}attributeChangedCallback(e,t,n){t!==n&&this._doc&&(e===`storage-key`&&(this._stored=this._load()),this._refresh())}open(){let e=this._panel;e&&!this.isOpen&&(this.setAttribute(Io,``),this._trigger?.setAttribute(`aria-expanded`,`true`),this._place(),f(this,()=>this._place()),this.ownerDocument.addEventListener(`pointerdown`,this._onPointerDown,!0),e.focus({preventScroll:!0}),this._markRead())}close(e){this.isOpen&&(this.removeAttribute(Io),this._trigger?.setAttribute(`aria-expanded`,`false`),this.ownerDocument.removeEventListener(`pointerdown`,this._onPointerDown,!0),p(this),this._refresh(),e&&this._trigger?.focus())}_place(){d(this._trigger,this._panel,{clampHeight:!0})}_entries(){let e=[];for(let t of this.querySelectorAll(`.wui-whats-new-entry`))t instanceof HTMLElement&&e.push({entry:t,date:t.querySelector(`time[datetime]`)?.getAttribute(`datetime`)??``});return e}_newest(){return this._entries().reduce((e,{date:t})=>Bo(e,t),``)}_seenPoint(){return Bo(this._stored,this.getAttribute(`read-through`)??``)}_refresh(){let e=this._seenPoint(),t=this._entries(),n=0;for(let{entry:r,date:i}of t){let t=zo(i)>zo(e);t&&n++,this.isOpen&&r.hasAttribute(Lo)||r.toggleAttribute(Lo,t)}this.toggleAttribute(Lo,n>0);let r=this._dot;r&&(r.textContent=this.getAttribute(`indicator`)===`count`&&n>0?String(n):``)}_markRead(){let e=this._newest();!e||zo(e)<=zo(this._seenPoint())||(this._stored=Bo(this._stored,e),this._save(this._stored),this._refresh(),this.dispatchEvent(new CustomEvent(Po,{bubbles:!0,detail:{through:e}})))}_storage(){let e=this.getAttribute(`storage-key`);if(!e)return null;try{let t=this.ownerDocument.defaultView;return t?{store:t.localStorage,key:Fo+e}:null}catch{return null}}_load(){let e=this._storage();return e?e.store.getItem(e.key)??``:this._stored}_save(e){let t=this._storage();t&&t.store.setItem(t.key,e)}},Uo=n({APP_BUTTON_MARKER:()=>Wo,buttonClass:()=>Jo}),Wo=`AppButton`,Go=new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),Ko={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 qo(e){return Object.hasOwn(Ko,e)}function Jo(e=`primary`,t=`solid`,n=`md`){if(!Go.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!qo(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=Ko[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}var Yo=n({COPY_FEEDBACK_MS:()=>Xo,copyTextToClipboard:()=>Zo}),Xo=2e3;async function Zo(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.top=`0`,t.style.left=`0`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),!!n}catch{return!1}}var Qo=n({MENTION_ID_PATTERN:()=>$o,mentionLabel:()=>ns,mentionTextFromValue:()=>as,mentionValueFromText:()=>os,mentionedIds:()=>ss,parseMentionValue:()=>is}),$o=/^[A-Za-z0-9_.:-]{1,64}$/,es=/@(\\+)\[|@\[([^[\]\n]{1,100})\]\(([A-Za-z0-9_.:-]{1,64})\)/g,ts=/@(\\*)\[/g;function ns(e){return String(e??``).replace(/[[\]\r\n]+/g,` `).replace(/\s+/g,` `).trim().slice(0,100)}var rs=e=>e.replace(ts,(e,t)=>`@\\${t}[`);function is(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(es))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 as(e){let t=``,n=[];for(let r of is(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 os(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}`||!$o.test(e.id)||(i+=rs(n.slice(a,e.start)),i+=`@[${e.label}](${e.id})`,a=e.end);return i+rs(n.slice(a))}function ss(e){let t=[];for(let n of is(e))`id`in n&&!t.includes(n.id)&&t.push(n.id);return t}var cs=n({deriveStepStatus:()=>ls,stepperHeaderItems:()=>us});function ls(e,t){return typeof t==`number`?e<t?`done`:e===t?`active`:`pending`:`pending`}function us(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 ds=n({SELECT_ALL_LABEL:()=>fs,SELECT_CELL_CLASS:()=>K,SELECT_ROW_LABEL:()=>ps,addRowSelectCells:()=>xs,addSelectColumn:()=>Ss,attachShiftRange:()=>Ts,createSelectHeaderCell:()=>hs,createSelectRowCell:()=>gs,createSelectSpacerCell:()=>_s,syncSelectAll:()=>Cs}),fs=`Select all rows`,ps=`Select row`,K=`wui-select-cell`,ms=(e,t)=>{let n=e.createElement(`input`);return n.type=`checkbox`,n.className=`wui-check`,n.setAttribute(`aria-label`,t),n};function hs(e=document){let t=e.createElement(`th`);return t.className=K,t.appendChild(ms(e,fs)),t}function gs(e=document,{disabled:t=!1}={}){let n=e.createElement(`td`);n.className=K;let r=ms(e,ps);return r.disabled=t,n.appendChild(r),n}function _s(e=document){let t=e.createElement(`td`);return t.className=K,t}var vs=e=>e.firstElementChild?.classList.contains(K),ys=e=>e.matches(`.wui-group-row, .wui-virtual-spacer`),bs=(e,t,n)=>[...e.querySelectorAll(t)].filter(e=>e instanceof n);function xs(e){for(let t of e){if(vs(t)||ys(t))continue;let e=t.getAttribute(`data-row-selectable`)===`false`;t.insertBefore(gs(t.ownerDocument,{disabled:e}),t.firstChild)}}function Ss(e){let t=e.querySelector(`thead tr`);if(!(t instanceof HTMLTableRowElement))return null;vs(t)||t.insertBefore(hs(e.ownerDocument),t.firstChild),xs(bs(e,`tbody tr`,HTMLTableRowElement));for(let t of bs(e,`tfoot tr`,HTMLTableRowElement))vs(t)||t.insertBefore(_s(e.ownerDocument),t.firstChild);let n=t.querySelector(`.${K} .wui-check`);return n instanceof HTMLInputElement?n:null}function Cs(e){let t=e.querySelector(`thead .${K} .wui-check`),n=bs(e,`tbody tr .wui-check:not(:disabled)`,HTMLInputElement),r=n.length,i=n.filter(e=>e.checked).length;t instanceof HTMLInputElement&&(t.checked=r>0&&i===r,t.indeterminate=i>0&&i<r);for(let t of bs(e,`tbody tr`,HTMLTableRowElement)){let e=t.querySelector(`.wui-check`);t.classList.toggle(`is-selected`,e instanceof HTMLInputElement&&e.checked)}return{selected:i,total:r}}var ws=`tbody .${K} .wui-check:not(:disabled)`;function Ts(e,t){let n=null,r=e=>e instanceof Element&&e.matches(`.wui-select-cell .wui-check:not(:disabled)`)&&!!e.closest(`tbody`);e.addEventListener(`mousedown`,e=>{e.shiftKey&&r(e.target)&&e.preventDefault()}),e.addEventListener(`click`,i=>{let a=i.target;if(r(a)){if(i.shiftKey&&n?.isConnected&&n!==a){let r=bs(e,ws,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 Es=n({matchSegments:()=>Ds});function Ds(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 Os=Object.freeze({anchorOverlay:a,buttonClass:Uo,calendarMath:_n,copyText:Yo,dataTable:Et,defineElement:r,devWarn:Rn,elementBase:m,fieldState:On,formatters:ze,formMirror:Mn,glyphs:fr,iconGlyphs:fr,listboxKeyNav:za,loader:Wn,mentionText:Qo,notificationDays:$r,optionLabel:Cr,partRegistry:Ya,selectList:Ua,selectRemote:to,stepperHeader:cs,tableSelect:ds,textMatch:Es,wuiHttp:fi,WuiSelect:ro,zone:De}),ks=`image/jpeg,image/png,image/webp,image/heic,image/heif,.heic,.heif`,As=10,js=512,Ms=`image/webp`,Ns=[96,48],Ps={dialogTitle:`Edit photo`,dialogSubtitle:`Drag to position the photo, then zoom or rotate it.`,save:`Save photo`,cancel:`Cancel`,choose:`Upload photo`,change:`Change photo`,camera:`Take photo`,remove:`Remove photo`,unreadable:`That photo could not be opened. Choose a JPG, PNG or WebP image.`,heicUnreadable:`This browser cannot open HEIC photos. Choose a JPG, PNG or WebP image instead.`,cropFailed:`That photo could not be saved. Try again, or choose another one.`};function Fs(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 Is(e){return Fs(e)?Ps.heicUnreadable:Ps.unreadable}function Ls(e,t){let n=Number(t);return{name:e?.name||`photo`,type:Ms,size:Number.isInteger(n)&&n>0?n:512}}var Rs=`/`,zs=`.search-wrap.wui-search-collapsible`,Bs=`.wui-topsearch-panel`,Vs=`.modal, wui-drawer[open]`,Hs=new WeakSet,Us=e=>{let t=e.querySelector(`.wui-search-toggle`);return t instanceof HTMLElement?t:null},Ws=e=>{let t=e.querySelector(`.search-input`);return t instanceof HTMLInputElement?t:null},Gs=e=>[...e.querySelectorAll(zs)].filter(e=>e instanceof HTMLElement);function Ks(e){e.classList.remove(`is-collapsed`),Us(e)?.setAttribute(`aria-expanded`,`true`),Ws(e)?.focus()}function qs(e){Ws(e)?.value||(e.classList.add(`is-collapsed`),Us(e)?.setAttribute(`aria-expanded`,`false`))}function Js(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=Us(e),n=Ws(e);t?.addEventListener(`click`,()=>Ks(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n?.value||(r.preventDefault(),qs(e),t?.focus())}),e.addEventListener(`focusout`,t=>{let n=t.relatedTarget;n instanceof Node&&e.contains(n)||qs(e)})}function Ys(e){Hs.has(e)||(Hs.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||ae(t.target instanceof Node?t.target:null)||t.target instanceof Element&&t.target.closest(Vs)||e.querySelector(Bs))return;let n=Gs(e).find(e=>e.offsetParent!==null);n&&(t.preventDefault(),Ks(n))}))}function Xs(e=document){let t=e;for(let e of Gs(t))Js(e);Ys(e instanceof Element?e.ownerDocument:e)}var Zs=`data-wui-command-shortcut`,Qs=`k`,$s=new WeakSet;function ec(e,t){return!(e.ctrlKey||e.metaKey)||e.altKey||e.shiftKey||e.repeat?!1:String(e.key).toLowerCase()===String(t).toLowerCase()}function tc(e){return e.nodeType===Node.DOCUMENT_NODE}function nc(e){let t=_(window.bootstrap?.Modal,`data-wui-command-shortcut: Bootstrap's bundle (window.bootstrap) is not loaded on this page.`),n=e.closest(`.modal`);n&&t.getOrCreateInstance(n).show()}function rc(e){let t=tc(e)?e:e.ownerDocument;!$s.has(t)&&e.querySelector(`[data-wui-command-shortcut]`)&&($s.add(t),t.addEventListener(`keydown`,e=>{for(let n of t.querySelectorAll(`[${Zs}]`))if(ec(e,n.getAttribute(`data-wui-command-shortcut`)||Qs)){e.preventDefault(),n.localName===`wui-command-palette`||n.classList.contains(`modal`)?nc(n):(n.focus(),`select`in n&&typeof n.select==`function`&&n.select());return}}))}var ic=`image/png,image/jpeg,image/webp`,ac=5,oc={"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`]},sc={"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`,"text/plain":`text file`,"image/*":`images`,"video/*":`videos`,"audio/*":`audio`,".png":`PNG`,".jpg":`JPG`,".jpeg":`JPG`,".webp":`WEBP`,".gif":`GIF`,".svg":`SVG`,".heic":`HEIC`,".heif":`HEIC`,".pdf":`PDF`,".txt":`text file`},cc=e=>String(e||``).split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean),lc=[`.png`,`.jpg`,`.jpeg`,`.webp`,`.gif`,`.svg`,`.bmp`,`.avif`,`.heic`,`.heif`];function uc(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 lc.some(e=>r.endsWith(e))}var dc=[`KB`,`MB`,`GB`];function fc(e){if(e<1024)return`${e} B`;let t=e/1024,n=0;for(;t>=1024&&n<dc.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${dc[n]}`}function pc(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 mc(e){let t=cc(e);return t.length?t.every(e=>e.startsWith(`.`)?lc.includes(e):e===`image/*`||e.startsWith(`image/`)):!1}function hc(e){let t=[];for(let n of cc(e)){let e=sc[n]||(n.startsWith(`.`)?n.slice(1).toUpperCase():n.toUpperCase());t.includes(e)||t.push(e)}return t.length<=1?t[0]||`supported`:`${t.slice(0,-1).join(`, `)} or ${t[t.length-1]}`}function gc(e,t){let n=cc(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&&(oc[e]||[]).some(e=>i.endsWith(e)))}function _c(e,t={}){if(!e)return null;let n=t.accept===void 0?ic:t.accept,r=t.maxSizeMb===void 0?5:t.maxSizeMb;if(!gc(e,n)){let e=hc(n),t=cc(n).map(e=>[`images`,`videos`,`audio`].includes(sc[e]??``));return t.every(Boolean)?`Choose ${e}.`:t.some(Boolean)?`Choose ${e.endsWith(` file`)?`${e}s`:`${e} files`}.`:`Choose a ${e.endsWith(` file`)?e:`${e} file`}.`}return r!==null&&r>0&&e.size>r*1024*1024?`Keep the file under ${r} MB.`:null}function vc(e,t){let n=Array.from(e||[]),r=t.multiple?n:n.slice(0,1),i=[],a=[];for(let e of r){let n=_c(e,{accept:t.accept,maxSizeMb:t.maxSizeMb});n?a.push({file:e,message:n}):i.push(e)}return{files:i,rejections:a}}function yc(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}=vc(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 bc=/[0-9]/,xc={9:bc,A:/[A-Za-z]/,"*":/[0-9A-Za-z]/},Sc=/[9A*]/,Cc=new Set([`text`,`tel`,`search`,`url`,`password`]),wc=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},Tc=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},Ec=e=>e.length<=3?e:`${e.slice(0,-3).replace(/\B(?=(\d{2})+(?!\d))/g,`,`)},${e.slice(-3)}`,Dc=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());return t?`${t[3]}-${t[2]}-${t[1]}`:e};function Oc(e,{upper:t=!1,normalize:n,valid:r,post:i=e=>e,message:a=`Enter the full value`}={}){let o=[...e].map(e=>{let t=xc[e];return t?{re:t}:{lit:e}}),s=o.filter(e=>e.re).length;return{inputMode:o.every(e=>!e.re||e.re===bc)?`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 kc(){return{inputMode:`decimal`,post:e=>e,message:`Enter a valid amount`,extract(e){let t=``,n=!1,r=0;for(let i of e)bc.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=Ec(t)+(e.includes(`.`)?`.${n}`:``);return{text:r,isRaw:[...r].map(e=>e!==`,`)}},isValid:e=>/^\d+(\.\d{1,2})?$/.test(e)}}var Ac={"phone-in":()=>Oc(`99999 99999`,{normalize:wc,valid:e=>/^[6-9]/.test(e),message:`Enter a 10-digit mobile number`}),pan:()=>Oc(`AAAAA9999A`,{upper:!0,valid:e=>/^[A-Z]{5}\d{4}[A-Z]$/.test(e),message:`Enter a valid PAN`}),gstin:()=>Oc(`99AAAAA9999A***`,{upper:!0,valid:e=>/^\d{2}[A-Z]{5}\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/.test(e),message:`Enter a valid GSTIN`}),aadhaar:()=>Oc(`9999 9999 9999`,{valid:e=>/^[2-9]/.test(e),message:`Enter a valid 12-digit Aadhaar number`}),ifsc:()=>Oc(`AAAA*******`,{upper:!0,valid:e=>/^[A-Z]{4}0[A-Z0-9]{6}$/.test(e),message:`Enter a valid IFSC`}),"pin-code":()=>Oc(`999999`,{valid:e=>/^[1-9]/.test(e),message:`Enter a valid 6-digit PIN code`}),date:()=>Oc(`99-99-9999`,{normalize:Dc,valid:Tc,post:(e,t)=>e.length===8&&Tc(e)?`${e.slice(4)}-${e.slice(2,4)}-${e.slice(0,2)}`:t,message:`Enter a valid date as DD-MM-YYYY`}),amount:kc},jc=Object.keys(Ac),Mc=e=>{let t=String(e).toLowerCase();return Object.hasOwn(Ac,t)?t:void 0},Nc=e=>Sc.test(String(e))&&Mc(e)===void 0,Pc=new Map;function Fc(e){if(e==null||e===``)return null;let t=String(e),n=Pc.get(t);return n===void 0&&(n=Nc(t)?Oc(t):Object.hasOwn(Ac,t)?Ac[t]?.()??null:null,Pc.set(t,n)),n}var Ic=(e,t)=>e.normalize?e.normalize(t):t;function Lc(e,t){let n=Fc(e);return n?n.extract(Ic(n,String(t??``))):String(t??``)}function Rc(e,t){let n=Fc(e);if(!n)return String(t??``);let r=n.extract(Ic(n,String(t??``)));return n.post(r,n.layout(r).text)}function zc(e,t){let n=Fc(e);return n?n.layout(n.extract(Ic(n,String(t??``)))).text:String(t??``)}var Bc=(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},Vc=new WeakMap,Hc=e=>Vc.get(e)?.(),Uc=new WeakMap;function Wc(e,t,n,r){let i=e.getAll(t),a=Uc.get(e)??new Set;Uc.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 Gc(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 Kc(e,{mask:t,postFormatted:n=!1,onChange:r,onInvalidChange:i}={}){let a=Fc(t);if(!a||!Cc.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??Gc(e),d=null,f=!1,p=!1,m=!1,h=``,g=``,v,y=()=>{let e=m?h:``;e!==g&&(g=e,u(g))},b=(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&&Cc.has(e.type))){let t=Bc(u,o);e.setSelectionRange(t,t)}e.dataset.maskRaw=s,h=s&&!a.isValid(s)?a.message:``,e.setCustomValidity(h),y(),i&&s!==d&&r?.(s,l),d=s},x=Object.getOwnPropertyDescriptor(e,`value`),S=x??s;Object.defineProperty(e,"value",{configurable:!0,...S.enumerable===void 0?{}:{enumerable:S.enumerable},get:()=>_(S.get,`input value getter missing`).call(e),set:t=>{if(_(S.set,`input value setter missing`).call(e,t),p)return;let n=Ic(a,e.value);b(n,n.length,!0)}});let C=()=>{f=!0,e.dispatchEvent(new Event(`input`,{bubbles:!0})),f=!1},w=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:Ic(a,e.value);b(r,e.selectionStart??r.length,!0)},T=()=>{p=!0},E=()=>{p=!1;let t=Ic(a,e.value);b(t,e.selectionStart??t.length,!0),C()},D=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||(b(e.value.slice(0,o)+e.value.slice(o+1),n?o:r,!0),C()))},O=t=>{if(e.readOnly||e.disabled)return;let n=t.clipboardData?.getData(`text`);if(n==null)return;t.preventDefault();let r=Ic(a,n),i=e.selectionStart??e.value.length,o=e.selectionEnd??i;b(e.value.slice(0,i)+r+e.value.slice(o),i+r.length,!0),C()},ee=()=>{let t=a.extract(e.value);return a.post(t,a.layout(t).text)},k=()=>{m=!0,y()};e.addEventListener(`input`,w),e.addEventListener(`beforeinput`,D),e.addEventListener(`paste`,O),e.addEventListener(`compositionstart`,T),e.addEventListener(`compositionend`,E),e.addEventListener(`blur`,k),e.addEventListener(`invalid`,k);let te=e.form,ne=t=>{e.name&&!e.disabled&&Wc(t.formData,e.name,e.value,ee())},re=()=>{clearTimeout(v),v=setTimeout(()=>{m=!1,b(Ic(a,e.value),e.value.length,!0)},0)};n||(te?.addEventListener(`formdata`,ne),Vc.set(e,ee)),te?.addEventListener(`reset`,re),te?.addEventListener(`submit`,k);let ie=Ic(a,e.value);return b(ie,ie.length,!1),()=>{clearTimeout(v),e.removeEventListener(`input`,w),e.removeEventListener(`beforeinput`,D),e.removeEventListener(`paste`,O),e.removeEventListener(`compositionstart`,T),e.removeEventListener(`compositionend`,E),e.removeEventListener(`blur`,k),e.removeEventListener(`invalid`,k),te?.removeEventListener(`formdata`,ne),te?.removeEventListener(`reset`,re),te?.removeEventListener(`submit`,k),Vc.delete(e),x?Object.defineProperty(e,"value",x):Reflect.deleteProperty(e,`value`),m=!1,h=``,y(),e.setCustomValidity(``),delete e.dataset.maskRaw,l&&e.removeAttribute(`inputmode`)}}function qc(){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=Hc(e);return n===void 0?t.call(this,e):n},e.wuiMaskHook=!0}var Jc=new WeakMap,Yc,Xc=e=>{Jc.has(e)||Jc.set(e,Kc(e,{mask:e.dataset.appMask,postFormatted:e.hasAttribute(`data-mask-post-formatted`)}))},Zc=e=>[...e.querySelectorAll(`input[data-app-mask]`)].filter(e=>e instanceof HTMLInputElement),Qc=e=>e instanceof Element?[...e instanceof HTMLInputElement&&e.matches(`input[data-app-mask]`)?[e]:[],...Zc(e)]:[];function $c(){Yc||typeof MutationObserver>`u`||(Yc=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Qc(e))Jc.get(t)?.(),Jc.delete(t);for(let e of t.addedNodes)for(let t of Qc(e))Xc(t)}}),Yc.observe(document.documentElement,{childList:!0,subtree:!0}))}function el(e=document){qc();for(let t of Zc(e))Xc(t);e===document&&$c()}function tl(e,t){let n=e.getInstance(t);n&&(n.tip?.isConnected?(t.addEventListener(`hidden${e.EVENT_KEY}`,()=>n.dispose(),{once:!0}),n.hide()):n.dispose())}var nl=`data-wui-bulk-in-bar`,rl=`[data-wui-page-header-bar][data-wui-bulk-for]`,il=new WeakSet;function al(e){return`${ut(e,{decimals:0})} selected`}function ol(e){let t=e.dataset.wuiBulkFor;return t===void 0?null:document.getElementById(t)}function sl(e){return typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`}function cl(e,t){return[...e.querySelectorAll(t)].flatMap(e=>e instanceof HTMLElement?[e]:[])}function ll(e,t){for(let n of cl(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?al(t):``}function ul(e=document){for(let t of cl(e,rl))ol(t)?.setAttribute(nl,``);il.has(document)||(il.add(document),document.addEventListener(`selectionchange`,e=>{if(!(e instanceof CustomEvent)||!sl(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 cl(document,rl))ol(n)?.contains(t)&&ll(n,e.detail.selected)}))}var dl={minLength:10,uppercase:!0,lowercase:!0,digit:!0,special:!0,uniqueChars:0,customRules:[]},fl=`Password requirements`;function pl(e){return e===!0||e==null?{...dl}:{...dl,...e}}function ml(e){let t=pl(e),n=[];if(t.minLength>0&&n.push({key:`length`,label:`At least ${t.minLength} characters long`,test:e=>e.length>=t.minLength}),t.uppercase&&n.push({key:`uppercase`,label:`At least one uppercase letter`,test:e=>/[A-Z]/.test(e)}),t.lowercase&&n.push({key:`lowercase`,label:`At least one lowercase letter`,test:e=>/[a-z]/.test(e)}),t.digit&&n.push({key:`digit`,label:`At least one digit`,test:e=>/[0-9]/.test(e)}),t.special&&n.push({key:`special`,label:`At least one special character`,test:e=>/[^A-Za-z0-9]/.test(e)}),t.uniqueChars>0){let e=t.uniqueChars;n.push({key:`unique`,label:`At least ${e} unique character${e>1?`s`:``}`,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 hl(e,t){let n=e==null?``:String(e);return ml(t).map(e=>({key:e.key,label:e.label,met:e.test(n)}))}function gl(e,t){return hl(e,t).every(e=>e.met)}var _l=`wui:row-drop`,vl=`is-drop-over`,yl=`application/x-wui-rows`,bl=`wui-row-dragging`,xl=`[data-wui-drop-target]`,Sl=`tbody tr[data-row-key]`,Cl=`input, button, a, select, textarea, label`,wl=`.wui-select-cell .wui-check`,Tl=new WeakMap,El=new WeakSet,Dl=null,Ol=null;function kl(e){let t=e.querySelector(wl);return t instanceof HTMLInputElement&&t.checked}function Al(e){let t=[];for(let n of e.querySelectorAll(`tbody tr`))n instanceof HTMLElement&&kl(n)&&t.push(n.dataset.rowKey);return t}function jl(e,t){return y(e,t)}function Ml(e,t){let n=jl(e,t);return n instanceof HTMLElement?n:null}function Nl(e){let t=e.textContent;if(t===null)throw Error(`A drop target has no text content.`);return t.trim()}var Pl=e=>typeof e==`object`&&!!e&&`selected`in e&&typeof e.selected==`number`;function Fl(){Dl=null,document.body.classList.remove(bl);for(let e of document.querySelectorAll(`${xl}.${vl}`))e.classList.remove(vl)}function Il(e,t,n){e.dispatchEvent(new CustomEvent(_l,{bubbles:!0,detail:{keys:t,target:n.dataset.wuiDropTarget}}))}function Ll(e){let t=Ml(e.target,xl);if(!t||!Dl)return;e.preventDefault();let n=_(e.dataTransfer,`A drag event arrived without its DataTransfer.`);n.dropEffect=`move`,t.classList.add(vl)}function Rl(e){let t=Ml(e.target,xl);!t||e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||t.classList.remove(vl)}function zl(e){let t=Ml(e.target,xl);if(!t||!Dl)return;e.preventDefault(),t.classList.remove(vl);let{root:n,keys:r}=Dl;Il(n,r,t),Fl()}function Bl(e){let t=Ml(e.target,xl);t&&Ol?.keys.length&&(e.preventDefault(),Il(Ol.root,Ol.keys,t))}function Vl(e){(e.key===`Enter`||e.key===` `)&&Bl(e)}function Hl(e){El.has(e)||(El.add(e),e.addEventListener(`dragover`,Ll),e.addEventListener(`dragenter`,Ll),e.addEventListener(`dragleave`,Rl),e.addEventListener(`drop`,zl),e.addEventListener(`click`,Bl),e.addEventListener(`keydown`,Vl))}function Ul(e){let t=Tl.get(e);if(t)return t;Hl(e.ownerDocument||e);let n=t=>{let n=Ml(t.target,Sl);if(!n||!e.contains(n))return;let r=jl(t.target,Cl);r&&n.contains(r)||(n.draggable=!0)},r=t=>{let n=Ml(t.target,Sl);if(!n||!e.contains(n))return;let r=kl(n)?Al(e):[n.dataset.rowKey],i=_(t.dataTransfer,`A drag event arrived without its DataTransfer.`);i.setData(yl,JSON.stringify(r)),i.setData(`text/plain`,r.join(`,`)),i.effectAllowed=`move`,Dl={root:e,keys:r},document.body.classList.add(bl)},i=t=>{let n=t instanceof CustomEvent?t.detail:void 0;if(Pl(n)){let{keys:t}=n;n.selected>0?Ol={root:e,keys:Array.isArray(t)?t:Al(e)}:n.selected===0&&(Ol=null)}Wl(document)};e.addEventListener(`pointerdown`,n),e.addEventListener(`dragstart`,r),e.addEventListener(`dragend`,Fl),e.addEventListener(`selectionchange`,i);let a=()=>{e.removeEventListener(`pointerdown`,n),e.removeEventListener(`dragstart`,r),e.removeEventListener(`dragend`,Fl),e.removeEventListener(`selectionchange`,i),Tl.delete(e)};return Tl.set(e,a),a}function Wl(e=document){let t=e.querySelector(`[data-wui-row-drag] tbody tr ${wl}:checked`)!==null;for(let n of e.querySelectorAll(xl)){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`)||Nl(n);n.setAttribute(`aria-label`,`Move to ${e}`)}for(let t of e.querySelectorAll(`.wui-drop-tray`))t.hasAttribute(`role`)||(t.setAttribute(`role`,`toolbar`),t.setAttribute(`aria-label`,`Move to`))}function Gl(e=document){for(let t of e.querySelectorAll(`[data-wui-row-drag]`))t instanceof HTMLElement&&Ul(t);Wl(e.ownerDocument||e)}var Kl=`.table-wrap, .table-responsive, [class*="table-responsive-"]`,ql=1;function Jl(e){let t=()=>{let t=e.scrollWidth-e.clientWidth,n=Math.abs(e.scrollLeft);e.toggleAttribute(`data-wui-overflow-start`,t>ql&&n>ql),e.toggleAttribute(`data-wui-overflow-end`,t>ql&&n<t-ql),e.toggleAttribute(`data-wui-overflow-top`,e.scrollTop>ql)},n=()=>{if(e.scrollWidth-e.clientWidth>ql){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 Yl=new WeakMap,Xl,Zl=e=>{Yl.has(e)||Yl.set(e,Jl(e))},Ql=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(Kl)].filter(e=>e instanceof HTMLElement);return[...t,...n]};function $l(){Xl||typeof MutationObserver>`u`||(Xl=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Ql(e))Yl.get(t)?.(),Yl.delete(t);for(let e of t.addedNodes)for(let t of Ql(e))Zl(t)}}),Xl.observe(document.documentElement,{childList:!0,subtree:!0}))}function eu(e=document){for(let t of e.querySelectorAll(Kl))t instanceof HTMLElement&&Zl(t);e===document&&$l()}var tu=Object.freeze([`page`,`pageSize`,`sortBy`,`sortOrder`,`search`]),nu=`search`,ru=Object.freeze({loading:`Loading rows`,error:`These rows did not load. Try again.`,network:`The connection dropped before the rows loaded. Check it and try again.`,forbidden:`You do not have access to these rows.`,retry:`Retry`,actionFailed:`That did not work. Try again.`,actionForbidden:`You do not have permission to do that.`,empty:`No rows`}),iu=5,au=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,ou=e=>e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled,su=e=>au(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},Y=(e,t,n)=>{let r=e.closest(t);return r instanceof n?r:null},cu=e=>e.localName===`wui-select`,lu=new WeakMap,uu=(e,t)=>{let n=Number(e);return Number.isInteger(n)?n:t},du=e=>({total:uu(e.dataset.total,0),totalCapped:e.dataset.totalCapped===`true`,page:uu(e.dataset.page,1),pageSize:uu(e.dataset.pageSize,0),sortBy:e.dataset.sortBy||``,sortOrder:e.dataset.sortOrder===`desc`?`desc`:`asc`}),fu=(e,t)=>{e&&X().toast(e,{variant:t})},pu=(e,t)=>{if(!e)return;let n=new Set([...e.elements].filter(e=>!su(e)||e.hasAttribute(`data-range-mirror`)).map(e=>e.getAttribute(`name`)).filter(e=>e&&!tu.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},mu=new Intl.NumberFormat(`en-IN`),hu=(e,t)=>t?`${mu.format(e)}+`:mu.format(e),gu=(e,t,n)=>{let r=e.closest(`.wui-list-card`),i=r?J(r,`.wui-list-card-count`,HTMLElement):null;i&&(i.textContent=hu(t,n))};function _u(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(lu.has(e))continue;let t=yu(e);lu.set(e,t),e.hasAttribute(`data-load-first-page`)&&t.reload()}}function vu(e){let t=e instanceof Element?Y(e,`[data-wui-server]`,HTMLElement):null;return t&&lu.get(t)||null}function yu(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||ru.loading,errorText:e.dataset.errorText||ru.error},c=new URL(r,window.location.href),l=new Set(c.searchParams.keys()),u=n.hasAttribute(`data-app-datatable-selectable`),d=new Set,f=!1,p=Ti(),m=new AbortController,h={signal:m.signal},g=_(J(n,`:scope > tbody[data-wui-rows]`,HTMLTableSectionElement),`A server-paged table needs its rows in <app-table-rows> (tbody[data-wui-rows]).`),v=du(g),y=null,b=null,x=e=>{let t=new URLSearchParams;for(let[n,r]of new URLSearchParams(e))l.has(n)||t.append(n,r);return t},S=e=>x(new URL(e,window.location.href).search),C=e=>{let t=e.toString();return`${window.location.pathname}${t?`?${t}`:``}${window.location.hash}`},w=e=>{let t=new URL(c.href);for(let[n,r]of e)l.has(n)||t.searchParams.append(n,r);return t.origin===window.location.origin?`${t.pathname}${t.search}`:t.href},T=(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},E=T(s.urlState?x(window.location.search):new URLSearchParams,v);s.urlState&&C(E)!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&window.history.replaceState(window.history.state,``,C(E));let D=(e,n)=>t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:n})),O=e=>{o&&(o.textContent=e)},ee=e=>{if(e.total===0)return ru.empty;let t=e.pageSize>0?Math.max(1,Math.ceil(e.total/e.pageSize)):1,n=e.totalCapped?hu(e.total,!0):`${e.total}`;return`Page ${e.page} of ${t}, ${n} ${e.total===1?`row`:`rows`}`},k=()=>q(n,`:scope > thead > tr:first-child > th`,HTMLTableCellElement),te=e=>{if(u&&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.`)},ne=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`)}},re=e=>{if(u){xs(e);for(let t of e){let e=J(t,`.${K} .wui-check:not(:disabled)`,HTMLInputElement);e&&(f&&d.add(t.dataset.rowKey),e.checked=d.has(t.dataset.rowKey))}Cs(n)}ne(e);let t=k();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`)})},ie=e=>re(q(e,`:scope > tr`,HTMLTableRowElement)),ae=e=>{for(let t of e.querySelectorAll(`:scope > template[data-wui-pager], :scope > template[data-wui-empty], :scope > template[data-wui-filters]`))t.remove()},oe=e=>e?.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0})),se=(e,t)=>{if(!i)return;let n=J(e,`:scope > template[data-wui-empty]`,HTMLTemplateElement);oe(i),t.total===0&&n?(i.replaceChildren(n.content.cloneNode(!0)),i.hidden=!1):(i.replaceChildren(),i.hidden=!0)},ce=e=>{let r=du(e),i=r.sortBy!==v.sortBy||r.sortOrder!==v.sortOrder?Zt(g.rows):null;if(a){let t=J(e,`:scope > template[data-wui-pager]`,HTMLTemplateElement);oe(a),a.replaceChildren(...t?[t.content.cloneNode(!0)]:[]),a.hidden=!1}se(e,r);let o=J(e,`:scope > template[data-wui-filters]`,HTMLTemplateElement),c=s.filtersRegion&&o?J(document,s.filtersRegion,HTMLElement):null;c&&o&&(oe(c),c.replaceChildren(o.content.cloneNode(!0))),ae(e),oe(g),n.replaceChild(e,g),g=e;let l=f&&r.total!==v.total;return v=r,l&&(f=!1),t.removeAttribute(`data-wui-table-error`),ie(e),ve(),Qt(e.rows,i),l&&be(),c},le=e=>{let t=document.createElement(`template`);t.innerHTML=`<table>${e}</table>`;let n=J(t.content,`tbody[data-wui-rows]`,HTMLTableSectionElement);return n&&te(n),n?document.importNode(n,!0):null},ue=(e,t=k())=>{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},de=()=>{if(g.querySelector(`:scope > tr:not([data-wui-skeleton])`))return;let e=Math.max(1,k().length);g.replaceChildren(...Array.from({length:iu},()=>{let t=ue(e);return t.setAttribute(`data-wui-skeleton`,``),t})),t.removeAttribute(`data-wui-table-error`),i&&(i.hidden=!0)},fe=e=>{e?(t.setAttribute(`aria-busy`,`true`),de()):t.removeAttribute(`aria-busy`)},pe=e=>e===`forbidden`?ru.forbidden:e===`network`?ru.network:s.errorText,me=e=>{let n=pe(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`,r.innerHTML=z(e===`forbidden`?`lock`:`alert-circle`,{size:24});let a=document.createElement(`div`);a.className=`empty-state-title`,a.textContent=n;let o=document.createElement(`div`);o.className=`empty-state-action`;let s=document.createElement(`button`);s.type=`button`,s.className=Jo(`primary`,`outline`,`sm`),s.dataset.wui=Wo,s.setAttribute(`data-wui-table-retry`,``),s.textContent=ru.retry,o.append(s),t.append(r,a,o),oe(i),i.replaceChildren(t),i.hidden=!1}O(n)},he=()=>s.filtersForm?J(document,s.filtersForm,HTMLFormElement):null,A=async(n,r=`none`,{quiet:i=!1}={})=>{let a=new URLSearchParams(n);i||(y={query:a,mode:r},fe(!0),O(s.loadingText)),D(`wui:table:loading`,{query:a.toString()});let o=await p.run(w(a));if(o.kind===`aborted`||o.kind===`stale`||o.kind===`session`)return o;i||fe(!1);let c=null;if(o.ok)try{c=le(o.html)}catch(e){R(e)}if(!o.ok||!c){let e=o.ok?`server`:o.kind;return i?zn(`A quiet server table refresh failed; the rows on screen are kept.`,e):me(e),D(`wui:table:error`,{status:o.status,kind:e,message:pe(e)}),o}let l=ce(c);return E=T(a,v),pu(he(),E),s.urlState&&r===`push`?window.history.pushState(window.history.state,``,C(E)):s.urlState&&r===`replace`&&window.history.replaceState(window.history.state,``,C(E)),i||O(ee(v)),X().refresh(t),l&&X().refresh(l),gu(e,v.total,v.totalCapped),D(`wui:table:loaded`,{...v,query:E.toString()}),o},ge=e=>(e.delete(`page`),e),_e=()=>q(n,`:scope > thead th[data-sort-key]`,HTMLTableCellElement),ve=()=>{for(let e of _e()){let t=e.dataset.sortKey===v.sortBy;e.setAttribute(`aria-sort`,t?v.sortOrder===`desc`?`descending`:`ascending`:`none`)}};for(let e of _e())if(e.classList.add(`sortable`),e.tabIndex=0,!e.querySelector(`.sort-icon`)){let t=e.classList.contains(`num`)||e.classList.contains(`text-end`),n=document.createElement(`span`);n.className=t?`sort-icon wui-sort-lead`:`sort-icon`,n.innerHTML=z(`chevrons-up-down`,{size:14}),t?e.prepend(n):e.append(n)}let ye=e=>{let t=ge(new URLSearchParams(E)),n=v.sortBy===e&&v.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?Y(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&ye(t.dataset.sortKey??``)}),n.addEventListener(`keydown`,e=>{if(e.key!==`Enter`&&e.key!==` `)return;let t=e.target instanceof Element?Y(e.target,`th[data-sort-key]`,HTMLTableCellElement):null;t&&n.tHead?.contains(t)&&(e.preventDefault(),ye(t.dataset.sortKey??``))});let be=()=>{Cs(n);let e=f?{selected:v.total,total:v.total,allMatching:f}:{selected:d.size,total:v.total};n.dispatchEvent(new CustomEvent(`selectionchange`,{bubbles:!0,detail:e}))};u&&(Ts(n,(e,t)=>{for(let n of e){let e=Y(n,`tr`,HTMLTableRowElement)?.dataset.rowKey;e&&(t?d.add(e):d.delete(e))}t||(f=!1)}),n.addEventListener(`change`,e=>{let t=e.target;if(t instanceof HTMLInputElement&&t.matches(`.wui-select-cell .wui-check:not(:disabled)`)){if(t.checked||(f=!1),n.tHead?.contains(t))for(let e of q(g,`:scope > tr`,HTMLTableRowElement)){let n=J(e,`.${K} .wui-check:not(:disabled)`,HTMLInputElement);n&&(n.checked=t.checked,t.checked?d.add(e.dataset.rowKey):d.delete(e.dataset.rowKey))}else{let e=Y(t,`tr`,HTMLTableRowElement)?.dataset.rowKey;if(!e)return;t.checked?d.add(e):d.delete(e)}be()}})),a&&(a.addEventListener(`click`,e=>{let t=e.target instanceof Element?Y(e.target,`a[href]`,HTMLAnchorElement):null;!t||e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(e.preventDefault(),A(S(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(S(t.value),`push`))}));let xe=()=>{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},Se=()=>e.isConnected?!0:(m.abort(),clearTimeout(b??void 0),!1),Ce=(e,t)=>{let n=[...e.elements].filter(au),r=new Set;for(let e of n)e.name&&!su(e)&&r.add(e.name);let i=[];for(let e of n)if(e.name&&!ou(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},we=(e,t)=>{let n=new Set([...e.elements].filter(au).map(e=>e.name).filter(Boolean)),r=new URLSearchParams,i=e=>e!==`search`&&tu.includes(e);for(let[e,t]of E)e!==`page`&&(i(e)||!n.has(e))&&r.append(e,t);for(let[n,a]of Ce(e,t))a===``||i(n)||l.has(n)||r.append(n,a);let a=xe();if(a){r.delete(nu);let e=a.value.trim();e&&r.set(nu,e)}return A(r,`push`)},Te=e=>s.filtersForm&&e.closest?.(s.filtersForm)||s.filtersRegion&&e.closest?.(s.filtersRegion)||null;document.addEventListener(`submit`,e=>{Se()&&s.filtersForm&&e.target instanceof HTMLFormElement&&e.target.matches(s.filtersForm)&&(e.preventDefault(),we(e.target,e.submitter))},h),document.addEventListener(`change`,e=>{if(!Se()||!s.filtersForm||!(e.target instanceof Element))return;let t=Y(e.target,s.filtersForm,HTMLFormElement);!t||e.target===xe()||t.hasAttribute(`data-wui-apply-on-change`)||e.target.closest(`wui-filter-popover`)||we(t)},h);let Ee=(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(cu)){let e=r.getAttribute(`name`)??``;r.value=r.mode===`multiple`||r.mode===`tag`?t.getAll(e):n(e)}for(let t of e.querySelectorAll(`wui-date-range`)){let e=t.getAttribute(`start-name`)||t.getAttribute(`name`),r=t.getAttribute(`end-name`);t.value={start:e?n(e):``,end:r?n(r):``}}};document.addEventListener(`click`,e=>{if(!Se())return;let t=e.target instanceof Element?Y(e.target,`a[href]`,HTMLAnchorElement):null;if(!t||!Te(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=ge(S(n.href));Ee(t.closest(`form`),r),pu(t.closest(`form`),r),A(r,`push`)},h),document.addEventListener(`input`,e=>{if(!Se())return;let t=xe();t&&e.target===t&&(clearTimeout(b??void 0),b=setTimeout(()=>{if(!Se())return;let e=ge(new URLSearchParams(E)),n=t.value.trim();n?e.set(nu,n):e.delete(nu),e.toString()!==E.toString()&&A(e,`replace`)},300))},h),s.urlState&&window.addEventListener(`popstate`,()=>{if(!Se())return;let e=x(window.location.search),t=xe();t&&(t.value=e.get(`search`)??``),pu(he(),e),A(e,`none`)},h),document.addEventListener(`wui:modal:success`,()=>{Se()&&s.refreshOnSuccess&&A(E,`none`)},h),i?.addEventListener(`click`,e=>{e.target instanceof Element&&e.target.closest(`[data-wui-table-retry]`)&&y&&A(y.query,y.mode)});let De=e=>[...g.rows].find(t=>t.dataset.rowKey===e)??null,j=e=>{if(!e?.trim())return null;let t=document.createElement(`template`);if(t.innerHTML=`<table><tbody>${e}</tbody></table>`,t.content.querySelector(`tbody[data-wui-rows]`))return null;let n=q(t.content,`table > tbody > tr[data-row-key]`,HTMLTableRowElement);return n.length?n.map(e=>document.importNode(e,!0)):null},Oe=(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:De(t.dataset.rowKey);e&&(oe(e),e.replaceWith(t),a.push(t))}return re(a),X().refresh(t),i},ke=e=>e.message||(e.kind===`forbidden`?ru.actionForbidden:ru.actionFailed),Ae=e=>{e?.isConnected&&e.getAttribute(`data-wui-save-state`)===`saving`&&on(e,null)},je=e=>{if(e instanceof HTMLTableRowElement)return e;let t=document.createElement(`template`);t.innerHTML=`<table><tbody>${String(e)}</tbody></table>`;let n=J(t.content,`table > tbody > tr`,HTMLTableRowElement);return document.importNode(_(n,"saveRow's `row` is the row as it will read: a <tr> element or its HTML."),!0)},Me=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:De(String(a));if(!s&&!c)throw Error(`saveRow found no row with data-row-key="${a}" on this page.`);let l=k().filter(e=>!e.classList.contains(K)),u=o?je(o):c??ue(Math.max(1,l.length),l);c&&u!==c?c.replaceWith(u):c||g.insertBefore(u,g.firstChild),u!==c&&re([u]),i&&!t.hasAttribute(`data-wui-table-error`)&&(i.hidden=!0),on(u,`saving`);let d=an(u),f=await U(e,{method:n.toUpperCase(),body:r});if(f.kind===`session`)return!1;if(f.ok){let e=j(f.html),t=e&&u.isConnected?Oe(e,u,s):null;return t?O(N.saved(an(t)||d)):(await A(E,`none`),Ae(u)),Tu(f,f.toastVariant||`success`),D(`wui:table:saved`,{key:t?.dataset.rowKey??(s?null:String(a)),added:s,status:f.status}),!0}let p=ke(f),m=u;return c&&u!==c&&u.isConnected?(u.replaceWith(c),m=c):s&&!o&&(u.remove(),m=null,i?.childElementCount&&!g.querySelector(`:scope > tr`)&&(i.hidden=!1)),m?.isConnected&&on(m,`error`,p),f.kind!==`aborted`&&fu(p,`danger`),O(N.notSaved(d,p)),D(`wui:table:failed`,{key:s?null:String(a),added:s,status:f.status,kind:f.kind,message:p}),!1},Ne=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=Y(e,`tr`,HTMLTableRowElement),r=n?.dataset.rowKey??null,i=e.dataset.wuiRowAction||``,a=n?an(n):``;e.disabled=!0,e.setAttribute(`aria-busy`,`true`),n&&on(n,`saving`);let o=await U(t,{method:(e.dataset.method||`post`).toUpperCase()});if(e.disabled=!1,e.removeAttribute(`aria-busy`),o.kind===`session`||o.kind===`aborted`)Ae(n);else{if(o.ok){Tu(o,o.toastVariant||`success`);let e=n?.isConnected?j(o.html):null,t=e&&n?Oe(e,n,!1):null;t?O(N.saved(an(t)||a)):(await A(E,`none`),Ae(n))}else{let e=ke(o);fu(e,`danger`),n?.isConnected&&on(n,`error`,e),O(N.notSaved(a,e))}D(`wui:table:action`,{action:i,key:r,ok:o.ok,status:o.status})}};return n.addEventListener(`click`,e=>{let t=e.target instanceof Element?Y(e.target,`[data-wui-row-action]`,HTMLButtonElement):null;t&&g.contains(t)&&!t.disabled&&(e.preventDefault(),Ne(t))}),te(g),ae(g),u&&Ss(n),ie(g),ve(),{el:e,reload:async e=>{let n=e?.quiet===!0;return n&&t.getAttribute(`aria-busy`)===`true`?null:A(E,`none`,{quiet:n})},query:()=>new URLSearchParams(E),setQuery:e=>{let t=new URLSearchParams(E);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:Me,setActiveRow:t=>{e.dataset.activeRowKey=t==null?``:String(t),ne(q(g,`:scope > tr`,HTMLTableRowElement))},selection:{keys:()=>[...d],count:()=>f?v.total:d.size,allMatching:()=>f,selectAllMatching:()=>{f=!0;for(let e of q(g,`:scope > tr`,HTMLTableRowElement)){let t=J(e,`.${K} .wui-check`,HTMLInputElement);t?.disabled||(t&&(t.checked=!0),e.dataset.rowKey&&d.add(e.dataset.rowKey))}be()},clear:()=>{f=!1,d.clear();for(let e of q(g,`:scope > tr > .${K} .wui-check:not(:disabled)`,HTMLInputElement))e.checked=!1;be()}}}}var bu=8e3,xu=`That did not work. Try again.`,Su=[`success`,`info`,`warning`,`danger`],Cu=e=>Su.some(t=>t===e);function wu(e){if(!Cu(e))throw RangeError(`Unknown toast variant "${e}".`);return e}function X(){return _(window.WUI,`window.WUI is not defined: the Razor behaviour script did not load on this page.`)}function Tu(e,t=`success`){if(!e?.message)return;let n=e.toastAction;n?X().toast(e.message,{variant:wu(t),duration:bu,action:{label:n.label,onClick:()=>Eu(n)}}):X().toast(e.message,{variant:wu(t)})}async function Eu(e){let t=await U(e.url,{method:e.method});if(t.kind!==`session`&&t.kind!==`aborted`){if(t.ok){Tu(t,t.toastVariant||`success`);for(let e of document.querySelectorAll(`[data-wui-server]`))e instanceof HTMLElement&&e.dataset.refreshOnSuccess!==`false`&&vu(e)?.reload()}else X().toast(t.message||xu,{variant:`danger`})}}var Du=`wui-remote-modal`,Ou=`wui-remote-drawer`,ku=Object.freeze({sm:360,md:480,lg:640,xl:720}),Au=`wui-modal-fullscreen`,ju=Object.freeze({sm:380,md:440,lg:640,xl:880}),Z=Object.freeze({loading:`Loading`,close:`Close`,retry:`Try again`,errorTitle:`This could not be loaded`,forbidden:`You do not have access to this.`,client:`It may have been moved or deleted.`,server:`Something went wrong on our side. Try again in a moment.`,network:`Could not reach the server. Check your connection and try again.`,submitFailed:`Your changes were not saved.`,invalid:`Some fields need attention.`}),Mu=`a[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,Nu=`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled]),[contenteditable="true"]`,Pu=`[aria-invalid="true"], .is-invalid, .input-validation-error`,Fu=`.wui-error-summary, [data-wui-form-errors], .validation-summary-errors, [data-valmsg-summary]`,Iu=`[data-wui-modal-content]`,Lu=`[data-wui-pane-close], [data-bs-dismiss="modal"]`,Ru=`<button type="button" class="wui-modal-close" data-bs-dismiss="modal" aria-label="Close"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18M6 6l12 12"></path></svg></button>`,zu=new WeakMap,Bu=new WeakSet;function Vu(e,t){if(e==null)throw TypeError(`The remote modal needs ${t}, and the page does not have it.`);return e}var Q=(e,t)=>{let n=e.querySelector(t);return n instanceof HTMLElement?n:null},Hu=(e,t,n)=>Vu(Q(e,t),n),Uu=(e,t)=>[...e.querySelectorAll(t)].filter(e=>e instanceof HTMLElement),Wu=()=>Object.assign(Error(`The remote modal load was aborted.`),{name:`AbortError`}),Gu=e=>typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`,Ku=(e,t)=>{let n=e instanceof Element?e.closest(t):null;return n instanceof HTMLElement?n:null},qu=e=>{let t=window.bootstrap?.Modal;if(!t)throw Error(`WUI.modal.load(${String(e)}): Bootstrap's bundle (window.bootstrap) is not loaded on this page.`);return t},Ju=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},Yu=e=>Object.hasOwn(ju,e),Xu=e=>Object.hasOwn(ku,e);function Zu(e){if(e==null||e===``)return null;if(e===`fullscreen`)return{fullscreen:!0};if(Yu(e))return{px:ju[e]};let t=typeof e==`number`?e:/^\d+$/.test(String(e))?Number(e):NaN;if(Number.isInteger(t)&&t>0)return{px:t};throw TypeError(`Unsupported modal size "${String(e)}". Use sm, md, lg, xl, fullscreen or a px number.`)}var Qu=e=>{if(e.classList.contains(`wui-modal-fullscreen`))return{fullscreen:!0};let t=Number.parseInt(e.style.getPropertyValue(`--wui-modal-max-width`),10);return{px:t>0?t:ju.md}},$u=(e,t)=>{e.classList.toggle(Au,!!t.fullscreen),t.fullscreen?e.style.removeProperty(`--wui-modal-max-width`):e.style.setProperty(`--wui-modal-max-width`,`${t.px}px`)},ed=[`center`,`top`];function td(e){if(e==null||e===``)return null;if(Xu(e))return{px:ku[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 nd=e=>e.container===`drawer`,rd=e=>e.container===`pane`,id=e=>e.container!==`modal`,ad=(e,t)=>nd(e)?td(t):Zu(t),od=()=>document.getElementById(`wui-remote-drawer`)?.classList.contains(`show`)??!1,sd=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},cd=e=>rd(e)?e.shell:Hu(e.shell,`.modal-dialog`,`a dialog frame`);function ld(e=`modal`){let t=e===`drawer`,n=t?Ou:Du,r=document.getElementById(n);return r||(r=document.createElement(`div`),r.id=n,r.className=t?`modal fade wui-modal-shell wui-remote-drawer`:`modal fade wui-modal-shell`,r.tabIndex=-1,r.setAttribute(`aria-hidden`,`true`),r.setAttribute(`role`,`dialog`),r.setAttribute(`aria-modal`,`true`),r.style.setProperty(`--wui-modal-max-width`,`${t?ku.md:ju.md}px`),r.innerHTML=t?`<div class="modal-dialog wui-remote-drawer-dialog"><div class="modal-content wui-modal"></div></div>`:`<div class="modal-dialog modal-dialog-centered wui-rb-dialog"><div class="modal-content wui-modal"></div></div>`,document.body.appendChild(r),r)}var ud=e=>`<div class="wui-modal-header"><div class="wui-modal-heading"><div class="wui-modal-headtext"><div class="wui-modal-title">${Ju(e)}</div></div></div>${Ru}</div>`,dd=e=>`<div class="modal-content wui-modal" aria-busy="true">${ud(e)}<div class="wui-modal-body"><div class="wui-modal-loading" role="status"><span class="visually-hidden">${Ju(Z.loading)}</span><div class="skeleton wui-modal-skeleton"></div><div class="skeleton wui-modal-skeleton"></div><div class="skeleton wui-modal-skeleton wui-modal-skeleton--short"></div></div></div></div>`,fd=(e,t)=>`<div class="modal-content wui-modal" data-wui-modal-error="${Ju(t)}">${ud(e)}<div class="wui-modal-body"><div class="wui-modal-state" role="alert"><p class="wui-modal-state-title">${Ju(Z.errorTitle)}</p><p class="wui-modal-state-text">${Ju(Z[t]||Z.server)}</p><div class="wui-modal-state-actions"><button type="button" class="${Jo(`primary`,`soft`,`md`)}" data-bs-dismiss="modal" data-wui="${Wo}">${Ju(Z.close)}</button><button type="button" class="${Jo(`primary`,`solid`,`md`)}" data-wui-modal-retry data-wui="${Wo}">${Ju(Z.retry)}</button></div></div></div></div>`,pd=e=>{let t=document.createElement(`template`);return t.innerHTML=e,Hu(t.content,`.modal-content`,`a card`)},md=e=>Q(e.shell,`.modal-content`);function hd(e){if(!e)return;e.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0}));let t=window.bootstrap,n=t?[t.Tooltip,t.Popover]:[];for(let r of[e,...e.querySelectorAll(`*`)]){for(let e of n)tl(e,r);t?.Dropdown.getInstance(r)?.dispose()}}function gd(e,t){let n=md(e),r=n?vd(n):new Map;hd(n),n?n.replaceWith(t):cd(e).appendChild(t),yd(t,r),X().refresh()}var _d=`input[type="file"][name]`;function vd(e){let t=new Map;for(let n of e.querySelectorAll(_d)){if(!(n instanceof HTMLInputElement))continue;let e=n.files;e&&e.length>0&&t.set(n.name,[...e])}return t}function yd(e,t){if(t.size!==0&&typeof DataTransfer<`u`)for(let n of e.querySelectorAll(_d)){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 bd=e=>rd(e)?!e.shell.hidden:e.shell.classList.contains(`show`);function xd(e,t,n=!1){let r=t?Q(e,Pu):null,i=r?r.matches(Mu)?r:Q(r,Mu)||r:null;if(!i&&n)i=Q(e,`[data-autofocus]`)||Q(e,Nu)||Q(e,`.wui-modal-close`);else if(!i){let t=Uu(e,Mu);i=Q(e,`[data-autofocus]`)||t.find(e=>!e.classList.contains(`wui-modal-close`))||t[0]||e}r?i?.focus?.():i?.focus?.({preventScroll:!0})}function Sd(e,t){let n=Uu(e,Mu).filter(e=>e.getClientRects().length>0&&getComputedStyle(e).visibility!==`hidden`);if(!n.length){t.preventDefault(),e.focus();return}let r=Vu(n[0],`a focusable control`),i=Vu(n[n.length-1],`a focusable control`),a=document.activeElement;!e.contains(a)||a===e?(t.preventDefault(),(t.shiftKey?i:r).focus()):t.shiftKey&&a===r?(t.preventDefault(),i.focus()):!t.shiftKey&&a===i&&(t.preventDefault(),r.focus())}function Cd(e,t){let n=Q(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`,``),cd(e).appendChild(n)),n.textContent=``,n.textContent=t}var wd=e=>{let t=Q(e.shell,`[data-wui-modal-live]`);t&&(t.textContent=``)},Td=(e,t,n)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))};function Ed(e,t,n,r){let i={...r,container:e.container};Td(t,`wui:modal:${n}`,i),nd(e)&&Td(t,`wui:drawer:${n}`,i),rd(e)&&Td(t,`wui:pane:${n}`,i)}var Dd=e=>e.matches(`[data-wui-pane-host]`)?`pane`:e.classList.contains(`wui-remote-drawer`)?`drawer`:`modal`;function Od(e){let t=zu.get(e);if(t)return t;let n={shell:e,container:Dd(e),queue:Ti(),defaultSize:Qu(e),defaultLabel:e.getAttribute(`aria-label`),placeholder:md({shell:e})?.outerHTML||`<div class="modal-content wui-modal"></div>`,remoteUrl:e.getAttribute(`data-wui-remote-url`),cache:e.getAttribute(`data-wui-remote-cache`)===`true`,loadedUrl:null,session:null};return zu.set(e,n),e.addEventListener(`submit`,e=>Xd(n,e)),e.addEventListener(`click`,e=>{Ku(e.target,`[data-wui-modal-retry]`)&&n.session&&(e.preventDefault(),Id(n,n.session))}),rd(n)&&e.addEventListener(`click`,t=>{let r=Ku(t.target,Lu);r&&e.contains(r)&&n.session&&Ad(n,n.session,`dismissed`,null)}),e.addEventListener(`hidden.bs.modal`,t=>{t.target===e&&(e.classList.contains(`wui-modal-stacked`)&&Md(n),Nd(n))}),e.addEventListener(`shown.bs.modal`,t=>{if(t.target!==e)return;e.classList.contains(`wui-modal-stacked`)&&[...document.querySelectorAll(`.modal-backdrop`)].at(-1)?.classList.add(`wui-modal-backdrop-stacked`);let r=md(n);n.session&&r?.matches(Iu)&&!r.contains(document.activeElement)&&xd(r,!1,id(n))}),n.remoteUrl&&e.addEventListener(`show.bs.modal`,t=>{t.target===e&&Pd(n,t)}),n}function kd(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:()=>Ad(e,a,`dismissed`,null),reload:()=>Id(e,a)}};return e.session=a,a}function Ad(e,t,n,r){e.session===t&&(t.closing={status:n,detail:r},rd(e)?jd(e,t):window.bootstrap?.Modal.getOrCreateInstance(e.shell).hide())}function jd(e,t){let n=e.shell,{status:r,detail:i}=Vu(t.closing,`the closing state`),a=n.contains(document.activeElement);e.queue.abort(),e.session=null,hd(md(e)),n.replaceChildren(),n.hidden=!0,n.removeAttribute(`data-open`),t.resolveClosed({status:r,detail:i}),Ed(e,n,`closed`,{status:r,url:t.url}),a&&t.trigger?.isConnected&&t.trigger.focus?.()}function Md(e){e.shell.classList.remove(`wui-modal-stacked`),od()&&(document.body.classList.add(`modal-open`),document.body.style.overflow=`hidden`)}function Nd(e){let t=e.session;if(e.queue.abort(),e.session=null,wd(e),t){let n=t.closing||{status:`dismissed`,detail:null};t.resolveClosed({status:n.status,detail:n.detail}),Ed(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||(gd(e,pd(e.placeholder)),e.loadedUrl=null,$u(e.shell,e.defaultSize),e.defaultLabel?e.shell.setAttribute(`aria-label`,e.defaultLabel):e.shell.removeAttribute(`aria-label`))}function Pd(e,t){let n=`relatedTarget`in t?t.relatedTarget:null,r=n instanceof HTMLElement?n:null,i=r?.getAttribute(`data-wui-url`)||e.remoteUrl||``,a=kd(e,i,{trigger:r});a.explicitSize=Fd(e,r?.getAttribute(`data-wui-size`)),a.explicitSize&&$u(e.shell,a.explicitSize),e.cache&&e.loadedUrl===i||(e.loadedUrl&&gd(e,pd(e.placeholder)),Id(e,a,{keepPlaceholder:!0}))}function Fd(e,t){try{return ad(e,t)}catch(e){return R(e),null}}async function Id(e,t,{keepPlaceholder:n=!1}={}){n||gd(e,pd(dd(t.options.title||Ld(e))));let r=await e.queue.run(t.url,{method:t.method,body:t.body,navigate:t.options.navigate});if(e.session!==t||r.kind===`aborted`||r.kind===`stale`)return`aborted`;if(r.kind===`session`)return`session`;if((r.kind===`ok`||r.kind===`validation`)&&Vd(e,t,r.html,!1))return e.loadedUrl=t.url,Ed(e,e.shell,`loaded`,{url:t.url,handle:t.handle}),`loaded`;let i=r.kind===`ok`||r.kind===`validation`?`server`:r.kind;return gd(e,pd(fd(t.options.title||Ld(e),i))),bd(e)&&xd(Vu(md(e),`a card`),!1,id(e)),Ed(e,e.shell,`error`,{url:t.url,kind:i,status:r.status}),`error`}var Ld=e=>md(e)?.querySelector(`.wui-modal-title`)?.textContent||e.shell.getAttribute(`aria-label`)||``,Rd=`/_content/Webority.Ui.Razor/js/`,zd=e=>new URL(e,window.location.href).pathname.includes(Rd);function Bd(e){if([...document.scripts].some(t=>t.getAttribute(`src`)===e))return;let t=document.createElement(`script`);t.src=e,document.head.appendChild(t)}function Vd(e,t,n,r){let i=document.createElement(`template`);i.innerHTML=n;let a=!1;for(let e of i.content.querySelectorAll(`script`)){if(e.getAttribute(`type`)===`application/json`)continue;let t=e.getAttribute(`src`);e.remove(),t&&zd(t)?Bd(t):a=!0}a&&zn(`WUI.modal: ${t.url} returned a fragment with script; it was removed. Keep page behaviour in the page.`);let o=Q(i.content,Iu);if(!o)return R(`WUI.modal: ${t.url} did not answer with an <app-modal-content> fragment.`),!1;if(gd(e,o),r||wd(e),!rd(e)){$u(e.shell,t.explicitSize||Fd(e,o.getAttribute(`data-wui-size`))||e.defaultSize);let n=o.getAttribute(`data-wui-title`);n&&e.shell.setAttribute(`aria-label`,n)}return bd(e)&&xd(o,r,id(e)),!0}var Hd=`button[type="submit"], button:not([type]), input[type="submit"], input[type="image"]`;function Ud(e,t,n){let r=[...e.elements].filter(e=>e.matches(Hd));if(n){e.setAttribute(`data-wui-submitting`,``);let n=t&&r.includes(t)?t:r[0];for(let e of r)e.toggleAttribute(`data-wui-was-disabled`,e.disabled),e.disabled=!0;n&&(n.classList.add(`is-loading`),n.setAttribute(`aria-busy`,`true`),n.tagName===`BUTTON`&&n.insertAdjacentHTML(`afterbegin`,`<span class="spinner-border spinner-border-sm me-2" aria-hidden="true" data-wui-submit-spinner></span>`))}else{e.removeAttribute(`data-wui-submitting`);for(let e of r)e.disabled=e.hasAttribute(`data-wui-was-disabled`),e.removeAttribute(`data-wui-was-disabled`),e.classList.remove(`is-loading`),e.removeAttribute(`aria-busy`),e.querySelector(`[data-wui-submit-spinner]`)?.remove()}}function Wd(e){for(let t of e.querySelectorAll(Fu))t.remove();for(let t of e.querySelectorAll(Pu))t.removeAttribute(`aria-invalid`),t.classList.remove(`is-invalid`,`input-validation-error`);for(let t of e.querySelectorAll(`.field-error`))t.textContent=``}var Gd=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(`.`)),Kd=(e,t)=>{if(typeof e==`object`&&e&&t in e)return Reflect.get(e,t)};async function qd(e){if(!e||e.status<400||e.status>499||e.status===422||!e.headers.get(`content-type`)?.toLowerCase().includes(`json`))return null;let t;try{t=JSON.parse(await e.text())}catch{return null}let n=e=>typeof e==`string`?e.trim():``,r=n(Kd(t,`title`)),i=(e.statusText||``).trim().toLowerCase(),a=Gd.has(r.toLowerCase())||r.toLowerCase()===i;return n(Kd(t,`message`))||n(Kd(t,`detail`))||(r&&!a?r:null)}function Jd(e,t,n,r){let i=t.closest(`.wui-modal-body`)||t;i.querySelector(`[data-wui-modal-submit-error]`)?.remove(),Wd(i);let a=document.createElement(`div`);a.className=`alert alert-danger wui-modal-submit-error`,a.setAttribute(`role`,`alert`),a.setAttribute(`data-wui-modal-submit-error`,``),a.innerHTML=Ju(`${Z.submitFailed} ${r||Z[n]||Z.server}`),i.prepend(a),Cd(e,a.textContent)}var Yd=(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 Xd(e,t){let n=t.target,r=e.session;if(!(n instanceof HTMLFormElement)||!r||n.hasAttribute(`data-wui-native`)||!n.closest(Iu)||(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`;Ud(n,i,!0);let l;try{l=await e.queue.run(c?Yd(a,s):a,{method:o,body:c?void 0:s,navigate:r.options.navigate})}catch(t){R(t),e.session===r&&n.isConnected&&(Ud(n,i,!1),Jd(e,n,`server`,null));return}if(e.session!==r)return;if(n.isConnected&&Ud(n,i,!1),l.kind===`ok`&&l.result===`success`){Zd(e,r,l);return}if(l.kind===`aborted`||l.kind===`stale`||l.kind===`session`)return;if(l.kind===`validation`&&Vd(e,r,l.html,!0)){let t=Vu(md(e),`a card`).querySelector(Fu)?.textContent?.replace(/\s+/g,` `).trim();Cd(e,t||Z.invalid);return}if(l.kind===`ok`&&l.html&&Vd(e,r,l.html,!1))return;let u=l.kind===`ok`||l.kind===`validation`?`server`:l.kind,d=await qd(l.response);e.session===r&&Jd(e,n,u,d)}function Zd(e,t,n){let r=n.message,i=n.redirect||null,a=n.toastVariant||`success`;if(!ff(a))throw TypeError(`Unknown toast variant "${a}". Use ${df.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?If(r,a):r&&X().toast(r,{variant:a}),Ed(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,Id(e,t)):n.keepOpen?n.html&&Vd(e,t,n.html,!1):Ad(e,t,`success`,o)}function Qd(e){let t=Ku(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`)?sf(t.getAttribute(`data-wui-pane`)??``,{target:t.getAttribute(`data-wui-pane-target`),trigger:t}).catch(e=>{Gu(e)||R(e)}):t.hasAttribute(`data-wui-modal`)?nf(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=>{Gu(e)||R(e)}):af(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=>{Gu(e)||R(e)})))}function $d(e){if(e.key!==`Tab`||e.defaultPrevented)return;let t=e.currentTarget;if(!(t instanceof Document))return;let n=Uu(t,`.modal.show`),r=Q(t,`.modal.show.wui-modal-stacked`)??n[n.length-1];r&&Sd(r,e)}function ef(e){if(e.key!==`Escape`||e.defaultPrevented)return;let t=Ku(e.target,of),n=t&&zu.get(t),r=e.currentTarget;n?.session&&r instanceof Document&&!r.querySelector(`.modal.show`)&&Ad(n,n.session,`dismissed`,null)}function tf(e=document){let t=e instanceof Document?e:Vu(e.ownerDocument,`an owner document`);Bu.has(t)||(Bu.add(t),t.addEventListener(`click`,Qd),t.addEventListener(`keydown`,$d),t.addEventListener(`keydown`,ef));let n=Uu(e,`.modal[data-wui-remote-url]`);e instanceof HTMLElement&&e.matches(`.modal[data-wui-remote-url]`)&&n.unshift(e);for(let e of n)Od(e)}function nf(e,t={}){try{if(!e)throw TypeError(`WUI.modal.load: a fragment url is required.`);let n=qu(e),r=t.container===`drawer`,i=r?td(t.size):Zu(t.size),a=t.placement||`center`;if(!ed.includes(a))throw TypeError(`WUI.modal.load: unsupported placement "${a}". Use center or top.`);if(t.signal?.aborted)return Promise.reject(Wu());let o=ld(r?`drawer`:`modal`);tf(document);let s=Od(o),c=bd(s),l=kd(s,e,t);l.explicitSize=i,$u(o,i||s.defaultSize),r||Hu(o,`.modal-dialog`,`a dialog frame`).classList.toggle(`modal-dialog-centered`,a===`center`),t.title&&o.setAttribute(`aria-label`,t.title),c||(!r&&od()&&(document.body.appendChild(o),o.classList.add(`wui-modal-stacked`)),n.getInstance(o)?.dispose(),n.getOrCreateInstance(o,{backdrop:t.staticBackdrop===!1||`static`,keyboard:t.staticBackdrop===!1}));let u=c?Promise.resolve():new Promise(e=>o.addEventListener(`shown.bs.modal`,()=>e(),{once:!0})),d=Id(s,l);return c||n.getOrCreateInstance(o).show(),rf(s,l,t,u,d,`WUI.modal.load`)}catch(e){return Promise.reject(e)}}function rf(e,t,n,r,i,a){let o=new Promise((r,i)=>{n.signal?.addEventListener(`abort`,()=>{e.session===t&&(e.queue.abort(),Ad(e,t,`dismissed`,{aborted:!0})),i(Wu())},{once:!0})}),s=Promise.all([r,i]).then(([,e])=>{if(e===`aborted`)throw Wu();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 af(e,t={}){return nf(e,{...t,container:`drawer`,placement:void 0})}var of=`[data-wui-pane-host]`;function sf(e,t={}){try{if(!e)throw TypeError(`WUI.pane.load: a fragment url is required.`);let n=sd(t.target);if(!n)throw TypeError(`WUI.pane.load: the target is not an <app-detail-pane>.`);if(t.signal?.aborted)return Promise.reject(Wu());tf(document);let r=Od(n),i=kd(r,e,t);n.hidden=!1,n.setAttribute(`data-open`,``);let a=Id(r,i);return rf(r,i,t,Promise.resolve(),a,`WUI.pane.load`)}catch(e){return Promise.reject(e)}}function cf(e){let t=sd(e);if(!t)throw TypeError(`WUI.pane.close: the target is not an <app-detail-pane>.`);let n=zu.get(t);n?.session&&Ad(n,n.session,`dismissed`,null)}var lf=`wuiConfirm`,uf=Object.freeze([`danger`]),df=Object.freeze([`success`,`info`,`warning`,`danger`]),ff=e=>df.some(t=>t===e),pf=`wui.flash`,mf=Object.freeze({confirmTitle:`Are you sure?`,confirmLabel:`Confirm`,cancelLabel:`Cancel`,failed:`That did not work. Try again.`,forbidden:`You do not have permission to do that.`,network:`Could not reach the server. Check your connection and try again.`}),hf=new WeakSet,gf=new WeakSet,_f=null,vf=null,yf=!1,bf=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},xf=(e,t)=>{e&&X().toast(e,{variant:t})},Sf=()=>_(window.bootstrap?.Modal,`data-wui-confirm: Bootstrap's bundle (window.bootstrap) is not loaded on this page.`);function Cf(){let e=document.getElementById(lf);return e||(e=document.createElement(`div`),e.id=lf,e.className=`modal fade wui-modal-shell`,e.tabIndex=-1,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`role`,`dialog`),e.setAttribute(`aria-modal`,`true`),e.style.setProperty(`--wui-modal-max-width`,`${ju.md}px`),e.innerHTML=`<div class="modal-dialog modal-dialog-centered wui-rb-dialog"><div class="modal-content wui-modal wui-confirm"><div class="wui-modal-body"><div class="wui-confirm-content"><span class="wui-confirm-icon"><wui-status-icon tone="info" size="120"></wui-status-icon></span><h3 class="wui-confirm-title" tabindex="-1" data-autofocus></h3><p class="wui-confirm-msg"></p></div></div><div class="wui-modal-footer"><div class="wui-confirm-actions"><button type="button" class="${Jo(`primary`,`soft`,`md`)}" data-bs-dismiss="modal" data-wui="${Wo}">${bf(mf.cancelLabel)}</button><button type="button" class="${Jo(`primary`,`solid`,`md`)}" data-app-confirm data-wui="${Wo}"></button></div></div></div></div>`,document.body.appendChild(e),e)}function wf(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!uf.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);Tf({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 Tf({title:e,message:t,label:n,danger:r},i){let a=Sf(),o=Cf(),s=o.querySelector(`.wui-confirm-title`),c=o.querySelector(`[data-app-confirm]`);if(!s||!c)throw Error(`#${lf} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${lf}"> without confirm-href, or leave the dialog to the library.`);let l=o.querySelector(`.wui-confirm-msg`);l||(l=document.createElement(`p`),l.className=`wui-confirm-msg`,s.after(l));let u=e||mf.confirmTitle;s.textContent=u,l.textContent=t,c.textContent=n||mf.confirmLabel,c.classList.toggle(`btn-danger`,r),c.classList.toggle(`btn-primary`,!r),o.querySelector(`wui-status-icon`)?.setAttribute(`tone`,r?`delete`:`info`),o.setAttribute(`aria-label`,u),vf=i,yf=!1,a.getOrCreateInstance(o).show()}var Ef=(e,t)=>{_f=e;try{t()}finally{_f=null}},Df=(e,t)=>{let n=Reflect.get(e,t);if(n===void 0||typeof n==`string`)return n;throw TypeError(`confirmAction: ${t} must be text.`)},Of=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:Df(e,`title`),message:t,label:Df(e,`label`),tone:Df(e,`tone`)}};function kf(e,t,n){let{title:r,message:i,label:a,tone:o}=Of(t);if(o!=null&&!uf.includes(o))throw TypeError(`confirmAction: tone "${o}" is not supported. Use danger, or leave it off.`);Yf(e.ownerDocument),Tf({title:r,message:i,label:a,danger:o===`danger`},()=>Ef(e,n))}var Af=e=>`disabled`in e&&e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`,jf=e=>{v(e,HTMLElement,`data-wui-confirm needs an HTML element to click.`).click()};function Mf(e){let t=y(e.target,`[data-wui-confirm]:not(form)`);t&&t!==_f&&!Af(t)&&(e.preventDefault(),e.stopImmediatePropagation(),wf(t,()=>Ef(t,()=>jf(t))))}function Nf(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===_f||e.submitter&&e.submitter===_f||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;wf(t,()=>Ef(t,()=>t.requestSubmit(r)))}function Pf(e){let t=y(e.target,`#${lf} [data-app-confirm]`);if(!t||t.hasAttribute(`disabled`)||!vf)return;yf=!0;let n=Sf(),r=_(t.closest(`#${lf}`),`#${lf} is missing around its confirm button.`);n.getOrCreateInstance(r).hide()}function Ff(e){if(!(e.target instanceof Element)||e.target.id!==`wuiConfirm`)return;let t=yf?vf:null;vf=null,yf=!1,t?.()}function If(e,t){e&&window.sessionStorage.setItem(pf,JSON.stringify({message:e,variant:t}))}var Lf=e=>e===`forbidden`?mf.forbidden:e===`network`?mf.network:mf.failed;function Rf(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.getAttribute(`data-refresh-on-success`)!==`false`&&vu(e)?.reload()}var zf=(e,t)=>{`disabled`in e&&(e.disabled=t)};async function Bf(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 Vf(t,e)}async function Vf(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.`);zf(t,!0),t.setAttribute(`aria-busy`,`true`);let i=await U(e,{method:`POST`,body:n});if(i.kind===`session`||i.kind===`aborted`)return;let a=i.toastVariant||`success`;i.ok&&(i.redirect||r===`page`)?(If(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload()):(zf(t,!1),t.removeAttribute(`aria-busy`),i.ok?(Tu(i,a),Rf()):xf(i.message||Lf(i.kind),`danger`))}function Hf(e,t){zf(e,!1),e.removeAttribute(`aria-busy`),R(t),xf(mf.failed,`danger`)}function Uf(e){let t=y(e.target,`[data-wui-post]`);t&&(e.preventDefault(),Af(t)||t.getAttribute(`aria-busy`)===`true`||Bf(t).catch(e=>Hf(t,e)))}function Wf(e){let t=y(e.target,`form[data-wui-post-form]`);if(!(t instanceof HTMLFormElement)||e.defaultPrevented)return;e.preventDefault();let n=_(e.submitter||t.querySelector(`button:not(.repeater-add):not(.repeater-remove)`),`A data-wui-post-form needs a submit button to report its result on.`);if(n.getAttribute(`aria-busy`)===`true`)return;Vf(t.action,n,new FormData(t)).catch(e=>Hf(n,e));let r=t.closest(`.dropdown`)?.querySelector(`[data-bs-toggle='dropdown']`);r&&window.bootstrap?.Dropdown?.getInstance(r)?.hide()}function Gf(){let e=window.sessionStorage.getItem(pf);if(!e)return;window.sessionStorage.removeItem(pf);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`||!ff(r))throw TypeError(`stored flash variant "${String(r)}" is not supported.`);if(typeof n!=`string`)throw TypeError(`stored flash message is not text.`);xf(n,r)}function Kf(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(!ff(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${df.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||(e.textContent??``).trim();e.remove(),xf(n,t)}}var qf=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.form:null;function Jf(e){if(!(e.target instanceof Element))return;let t=e.target.closest(`[data-wui-auto-submit]`);if(!t)return;let n=qf(e.target)||t.closest(`form`);n instanceof HTMLFormElement&&n.requestSubmit()}function Yf(e){gf.has(e)||(gf.add(e),e.addEventListener(`click`,Pf),e.addEventListener(`hidden.bs.modal`,Ff))}function Xf(e=document){let t=e instanceof Element?e.ownerDocument:e;hf.has(t)||(hf.add(t),t.addEventListener(`click`,Mf,!0),t.addEventListener(`submit`,Nf,!0),Yf(t),t.addEventListener(`click`,Uf),t.addEventListener(`submit`,Wf),t.addEventListener(`change`,Jf),Gf()),Kf(e)}var Zf=Object.freeze({title:`Leave without saving?`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,leaveLabel:`Leave`}),Qf=`form[data-wui-unsaved]`,$f=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,ep=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,tp=new Set([`submit`,`button`,`reset`,`image`]),np=new Set([`hidden`,`checkbox`,`radio`,`file`,`submit`,`button`,`reset`,`image`,`range`,`color`]),rp=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLObjectElement||e instanceof HTMLOutputElement,ip=e=>rp(e)?e instanceof HTMLObjectElement||e instanceof HTMLOutputElement?!1:e.disabled:`disabled`in e&&!!e.disabled,ap=e=>`name`in e&&typeof e.name==`string`&&e.name!==``,op=e=>typeof e==`object`&&!!e,sp=e=>Array.isArray(e)&&e.every(e=>Array.isArray(e)&&typeof e[0]==`string`);function cp(e){let t=JSON.parse(e);if(!sp(t))throw Error(`unsaved-changes snapshot is malformed`);return t}var lp=new WeakMap,up=new WeakSet,dp=e=>`${e.name}:${e.size}:${e.lastModified}`,fp=e=>[...e.querySelectorAll(Qf)].filter(e=>e instanceof HTMLFormElement);function pp(e){let t=[];for(let n of e.elements)ap(n)&&!ip(n)&&(rp(n)&&tp.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(dp)]):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 mp(e){return pp(e)}function hp(e,t){let n=new Map,r=cp(t);for(let e of r){let t=n.get(e[0]);t?t.push(e):n.set(e[0],[e])}let i=cp(pp(e)).map(e=>n.get(e[0])?.shift()??e);for(let e of n.values())i.push(...e);return JSON.stringify(i)}function gp(e){for(let t of e.elements)if(rp(t)&&t.name&&!ip(t)){if(t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!np.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 _p=e=>({saved:e.querySelector($f)&&gp(e)?null:pp(e),engaged:!1,discarded:!1});function vp(e){let t=lp.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&pp(e)!==t.saved}var yp=(e,t)=>fp(e).filter(e=>e!==t&&vp(e)),bp=()=>!!window.bootstrap?.Modal;function xp(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||Zf.message;kf(e,{title:Zf.title,message:r,label:Zf.leaveLabel,tone:`danger`},()=>{for(let e of t){let t=lp.get(e);t&&(t.discarded=!0)}n()})}function Sp(e){if(e.matches(ep))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 Cp(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 wp(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target,n=y(t,`a[href]`);if(!(n instanceof HTMLAnchorElement)||!Sp(n))return;let r=yp(n.ownerDocument,null);r.length&&bp()&&(e.preventDefault(),xp(n,r,()=>n.click()))}function Tp(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!Cp(t,e.submitter))return;let n=yp(t.ownerDocument,t);if(n.length&&bp()){e.preventDefault();let r=e.submitter,i=(r instanceof HTMLButtonElement||r instanceof HTMLInputElement)&&r.form===t?r:void 0;xp(t,n,()=>t.requestSubmit(i));return}let r=lp.get(t);r&&(r.saved=pp(t),r.discarded=!1)}function Ep(e){yp(document,null).length&&(e.preventDefault(),e.returnValue=``)}function Dp(e){let t=e.target,n=y(t,Qf);return n instanceof HTMLFormElement?n:null}function Op(e){let t=Dp(e);if(!t)return;let n=lp.get(t);n&&!n.engaged&&(n.saved!==null&&(n.saved=pp(t)),n.engaged=!0)}function kp(e){let t=Dp(e),n=t&&lp.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function Ap(e){for(let t of fp(e)){let e=lp.get(t);e?.saved&&(e.saved=hp(t,e.saved))}}function jp(e){let t=op(e)?e.handle:void 0;return op(t)?t.el:void 0}function Mp(e){if(!(e instanceof CustomEvent))return;let t=jp(e.detail);if(t instanceof Element)for(let e of fp(t))Pp(e)}function Np(e=document){let t=e instanceof Document?e:e.ownerDocument;if(!up.has(t)){up.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,Op,!0);for(let e of[`input`,`change`])t.addEventListener(e,kp,!0);t.addEventListener(`click`,wp),t.addEventListener(`submit`,Tp),t.addEventListener(`wui:modal:success`,Mp),t.addEventListener(Gn,()=>Ap(t)),_(t.defaultView,`unsaved-changes guard needs a document with a window`).addEventListener(`beforeunload`,Ep)}let n=fp(e);e instanceof HTMLFormElement&&e.matches(Qf)&&n.unshift(e);for(let e of n)lp.has(e)||lp.set(e,_p(e))}function Pp(e){if(!(e instanceof HTMLFormElement)||!e.matches(Qf))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);lp.set(e,{saved:pp(e),engaged:!1,discarded:!1})}var Fp=Object.freeze({question:`Discard your changes?`,discard:`Discard`,keep:`Keep editing`}),Ip=`wui:drawer:discard`,Lp=`wui-drawer[confirm-discard]`,Rp=`.wui-modal-shell`,zp=`data-wui-no-discard`,Bp=`.wui-drawer-discard`,Vp=`input, select, textarea`,Hp=e=>typeof e==`object`&&!!e||typeof e==`function`;function Up(e){let t=e.currentTarget;if(!(t instanceof Document))throw Error(`The discard guard is not wired on a document.`);return t}function Wp(e,t){return y(e,t)}var Gp=e=>e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement,Kp=new WeakMap,qp=new WeakSet,Jp=new WeakSet;function Yp(e,t,n,r,i){let a=e.createElement(`button`);return a.type=`button`,a.className=Jo(t,n,`sm`),a.dataset.wui=Wo,a.setAttribute(r,``),a.textContent=i,a}function Xp(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,Yp(e,`danger`,`solid`,`data-wui-discard-confirm`,Fp.discard),Yp(e,`primary`,`soft`,`data-wui-discard-keep`,Fp.keep)),n}function Zp(e){if(!(e instanceof Element))return null;let t=e.closest(Lp);if(t)return t;let n=e.closest(Rp);return n&&em(n).length?n:null}function Qp(e){return e.closest(Lp)??e.closest(Rp)}function $p(e,t){return t.hasAttribute(zp)||e.hasAttribute(zp)?!1:t.hasAttribute(`confirm-discard`)||e.hasAttribute(`data-wui-confirm-discard`)?!0:(e.getAttribute(`method`)||`get`).toLowerCase()!==`get`}function em(e){return e.matches(Lp)?e.querySelectorAll(`form`):[...e.querySelectorAll(`form`)].filter(t=>$p(t,e))}function tm(e){let t=Kp.get(e);return t!=null&&mp(e)!==t}function nm(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,_(e.querySelector(`.wui-drawer-panel`),`The drawer has no panel to hold its footer.`).append(t),Jp.add(t),t}function rm(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),Jp.add(t),t}function im(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 am(e,t,n){let r=e.querySelector(Bp);if(r){im(r);return}let i=Xp(e.ownerDocument,t),a;if(e.matches(Lp))a=e.querySelector(`.wui-drawer-footer`)??nm(e),a.prepend(i);else if(e.hasAttribute(`confirm-discard`))a=e.querySelector(`.wui-modal-footer`)??rm(e),a.prepend(i);else{if(!n)throw Error(`A discard prompt needs the form that is dirty.`);a=n.querySelector(`.modal-footer`),a?a.prepend(i):(a=n,n.append(i))}a.classList.add(`wui-drawer-discarding`),im(i)}function om(e){let t=e.parentElement;if(e.remove(),!t)throw Error(`The discard prompt has no footer.`);t.classList.remove(`wui-drawer-discarding`),Jp.has(t)&&t.remove()}function sm(e){for(let t of em(e))for(let e of t.querySelectorAll(Vp))if(Gp(e)&&e.type!==`hidden`&&!e.disabled){e.focus({preventScroll:!0});return}}function cm(e){let t=Zp(e.target);if(t)for(let e of em(t))Kp.get(e)??Kp.set(e,mp(e))}function lm(e){for(let t of Up(e).querySelectorAll(`form`)){let e=Kp.get(t);e!=null&&Kp.set(t,hp(t,e))}}function um(e){let t=e.target;t instanceof HTMLFormElement&&Zp(t)&&Kp.set(t,mp(t))}function dm(e){if(!Hp(e))return;let t=`handle`in e?e.handle:void 0;if(Hp(t))return`el`in t?t.el:void 0}function fm(e){if(!(e instanceof CustomEvent))return;let t=e.detail,n=dm(t);if(n instanceof Element)for(let e of n.querySelectorAll(`form`))Kp.delete(e)}function pm(e){let t=e.target;t instanceof Element&&t.matches(Lp)&&[...em(t)].some(tm)&&(e.preventDefault(),am(t,t.getAttribute(`confirm-discard`),null))}function mm(e){let t=e.target;if(!(t instanceof Element)||!t.matches(Rp))return;let n=[...em(t)].find(tm);n&&(e.preventDefault(),am(t,n.getAttribute(`data-wui-confirm-discard`)??t.getAttribute(`confirm-discard`)??Fp.question,n))}function hm(e){let t=e.closest(`wui-drawer`);if(t){t.dispatchEvent(new CustomEvent(`wui-drawer-close`,{bubbles:!0,cancelable:!0}))&&t.hide();return}let n=e.closest(Rp);n&&window.bootstrap?.Modal.getInstance(n)?.hide()}function gm(e){let t=_(e.closest(Bp),`The discard button is outside its prompt.`),n=Qp(t);if(om(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);for(let e of em(n))Kp.set(e,mp(e));n.dispatchEvent(new CustomEvent(Ip,{bubbles:!0})),n.matches(Lp)?_(n.closest(`wui-drawer`),`The confirm-discard drawer is not a wui-drawer.`).hide():_(window.bootstrap?.Modal.getInstance(n),`Bootstrap's Modal has no instance for the discarded dialog.`).hide()}function _m(e){let t=_(e.closest(Bp),`The keep button is outside its prompt.`),n=Qp(t);if(om(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);sm(n)}function vm(e){let t=Wp(e.target,`[data-wui-discard-confirm]`);if(t){gm(t);return}let n=Wp(e.target,`[data-wui-discard-keep]`);if(n){_m(n);return}let r=Wp(e.target,`[data-wui-dismiss]`);r&&hm(r)}function ym(e){if(e.key!==`Escape`)return;let t=Up(e).querySelector(Bp);if(!t)return;e.preventDefault(),e.stopPropagation();let n=Qp(t);if(om(t),!n)throw Error(`The discard prompt is outside its drawer or modal.`);sm(n)}function bm(e=document){let t=e instanceof Document?e:e.ownerDocument;qp.has(t)||(qp.add(t),t.addEventListener(`focusin`,cm),t.addEventListener(`pointerdown`,cm),t.addEventListener(`submit`,um),t.addEventListener(Gn,lm),t.addEventListener(`wui:modal:success`,fm),t.addEventListener(`wui:modal:loaded`,fm),t.addEventListener(`wui-drawer-close`,pm,!0),t.addEventListener(`hide.bs.modal`,mm),t.addEventListener(`click`,vm),t.addEventListener(`keydown`,ym,!0))}var xm=31536e3,Sm=new WeakMap,Cm=e=>e>99?`99+`:String(e),wm=(e,t)=>Object.entries(t).reduce((e,[t,n])=>e.replaceAll(`{${t}}`,()=>String(n)),e);function Tm(e,t,n=document){try{n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${xm}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}function Em(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=${xm}; SameSite=Lax`}catch(e){if(!(e instanceof DOMException&&e.name===`SecurityError`))throw e}}var Dm=e=>{let t=document.createElement(`template`);return t.innerHTML=e,t.content},$=(e,t,n)=>{let r=e?.querySelector(t);return r instanceof n?r:null},Om=(e,t,n)=>{let r=e?.closest(t);return r instanceof n?r:null},km=(e,t,n)=>e?[...e.querySelectorAll(t)].filter(e=>e instanceof n):[],Am=e=>{if(!(e.target instanceof Element))throw Error(`event target is not an element`);return e.target},jm=e=>{let t=e.getAttribute(`href`);if(t===null)throw Error(`search hit has no href`);return t},Mm=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function Nm(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=()=>_(a,`bell list missing`),s=$(e,`.wui-bell-menu`,HTMLElement),{src:c,readAction:l}=e.dataset,u=e.dataset.label||`Notifications`,d=e.dataset.emptyText||`You are all caught up.`,f=e.dataset.loadingText??`Loading…`,p=e.dataset.noUnreadText??`No unread notifications`,m=e.dataset.unreadText??`{count} unread notifications`,h=e.dataset.bellLabel??`{label}, {count} unread`,g=Number(e.dataset.pollSeconds??60),v=Ti(),y=Number(e.dataset.unread)||0,b=(t,a=!0)=>{let o=Math.max(0,Number(t)||0),s=o!==y;y=o,e.dataset.unread=String(o),r&&(r.textContent=Cm(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?u:wm(h,{label:u,count:Cm(o)})),a&&s&&i&&(i.textContent=o===0?p:wm(m,{count:Cm(o)}))},x=()=>s?.classList.contains(`show`)??!1,S=()=>{let e=Mm(`wui-bell-state`,`Could not load notifications. `),t=document.createElement(`button`);t.type=`button`,t.className=`btn btn-link btn-sm`,t.dataset.wuiBellRetry=``,t.textContent=`Retry`,e.append(t),o().replaceChildren(e)},C=async t=>{if(t&&(o().setAttribute(`aria-busy`,`true`),o().querySelector(`.wui-bell-item`)||o().replaceChildren(Mm(`wui-bell-state`,f))),c===void 0)throw Error(`bell has no data-src`);let n=await v.run(c);if(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)return;if(o().removeAttribute(`aria-busy`),!n.ok){t&&S();return}let r=Dm(n.html),i=$(r,`[data-wui-unread]`,HTMLElement),a=i?Number(i.getAttribute(`data-wui-unread`)):y;b(a),(t||x())&&(r.querySelector(`.wui-bell-item`)?o().replaceChildren(r):o().replaceChildren(Mm(`wui-bell-state`,d))),e.dispatchEvent(new CustomEvent(`wui:notifications:loaded`,{bubbles:!0,detail:{unread:a}}))};e.addEventListener(`show.bs.dropdown`,()=>C(!0)),e.addEventListener(`click`,async e=>{let t=Am(e);if(t.closest(`[data-wui-bell-retry]`)){await C(!0);return}let n=Om(t,`[data-wui-bell-read]`,HTMLButtonElement);if(!n||!l)return;n.disabled=!0;let r=await U(l,{method:`POST`});n.disabled=!1,r.ok&&(b(0),await C(!0))});let w=null,T=()=>{g>0&&w===null&&(w=setInterval(()=>C(x()),g*1e3))},E=()=>{w!==null&&clearInterval(w),w=null},D=()=>{document.hidden?E():(C(x()),T())};return g>0&&(document.addEventListener(`visibilitychange`,D),document.hidden||T()),t.push(()=>{E(),v.abort(),document.removeEventListener(`visibilitychange`,D)}),{setUnread:e=>b(e),refresh:()=>C(x())}}var Pm=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),Fm=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function Im(e,t){let n=_($(e,`input.search-input`,HTMLInputElement),`search input missing`),r=$(e,`.wui-topsearch-results`,HTMLElement),i=()=>_(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??`No results`,p=e.dataset.resultsCountText??`{count} results`,m=e.dataset.resultCountText??`{count} result`,h=Ti(),g,v=-1,y=()=>km(i(),`.wui-topsearch-hit`,HTMLElement),b=e=>{let t=y();v=t.length===0?-1:(e+t.length)%t.length,t.forEach((e,t)=>{let n=t===v;e.classList.toggle(`is-active`,n),e.setAttribute(`aria-selected`,n?`true`:`false`)});let r=v>=0?t[v]:void 0;r?(n.setAttribute(`aria-activedescendant`,r.id),r.scrollIntoView?.({block:`nearest`})):n.removeAttribute(`aria-activedescendant`)},x=()=>{i().hidden=!0,n.setAttribute(`aria-expanded`,`false`),n.removeAttribute(`aria-activedescendant`),v=-1},S=()=>{i().hidden=!1,n.setAttribute(`aria-expanded`,`true`)},C=t=>{e.classList.toggle(`is-open`,t),a?.setAttribute(`aria-expanded`,t?`true`:`false`)},w=t=>{let n=new CustomEvent(`wui:search:select`,{bubbles:!0,cancelable:!0,detail:{href:t}});e.dispatchEvent(n)&&window.location.assign(t)},T=async t=>{if(e.classList.add(`is-loading`),s===void 0)throw Error(`search has no data-src`);let n=await h.run(Fm(s,c,t));if(n.kind!==`aborted`&&n.kind!==`stale`&&n.kind!==`session`){if(e.classList.remove(`is-loading`),n.ok){let e=Dm(n.html),t=$(e,`[data-wui-count]`,HTMLElement);i().replaceChildren(e),y().forEach((e,t)=>{e.id=`${i().id}-opt-${t}`});let r=t?Number(t.getAttribute(`data-wui-count`)):y().length;o&&(o.textContent=r===0?f:wm(r===1?m:p,{count:r}))}else i().replaceChildren(Mm(`wui-topsearch-empty`,`Search is unavailable right now.`));v=-1,S()}};n.addEventListener(`input`,()=>{clearTimeout(g);let t=n.value.trim();t.length<u?(h.abort(),e.classList.remove(`is-loading`),i().replaceChildren(),x()):g=setTimeout(()=>T(t),d)}),n.addEventListener(`keydown`,t=>{if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(i().hidden||y().length===0)return;t.preventDefault(),b(v+(t.key===`ArrowDown`?1:-1))}else if(t.key===`Enter`){let e=y(),r=v>=0?e[v]:void 0;!i().hidden&&r?(t.preventDefault(),w(jm(r))):l&&n.value.trim()!==``&&(t.preventDefault(),w(Fm(l,c,n.value.trim())))}else t.key===`Escape`&&(i().hidden?e.classList.contains(`is-open`)&&(t.preventDefault(),t.stopPropagation(),C(!1),a?.focus()):(t.preventDefault(),t.stopPropagation(),x()))}),i().addEventListener(`click`,e=>{let t=Om(Am(e),`.wui-topsearch-hit`,HTMLElement);!t||e.ctrlKey||e.metaKey||e.shiftKey||e.button===1||(e.preventDefault(),w(jm(t)))}),a?.addEventListener(`click`,()=>{let t=!e.classList.contains(`is-open`);C(t),t&&n.focus()});let E=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||Pm(e.target)||(e.preventDefault(),C(!0),n.focus())},D=t=>{t.target instanceof Node&&e.contains(t.target)||(x(),e.classList.contains(`is-open`)&&C(!1))};document.addEventListener(`keydown`,E),document.addEventListener(`pointerdown`,D),t.push(()=>{clearTimeout(g),h.abort(),document.removeEventListener(`keydown`,E),document.removeEventListener(`pointerdown`,D)})}function Lm(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>{Tm(n,!!e.detail?.collapsed)});let r=e.dataset.wuiFoldedCookie;r&&e.addEventListener(`wui:shell:nav-fold`,e=>{Em(r,e.detail?.key,!!e.detail?.folded)}),e.addEventListener(`click`,t=>{Am(t).closest(`[data-wui-tabbar-more]`)&&$(e,`[data-app-shell-menu]`,HTMLElement)?.click()});let i=$(e,`[data-wui-bell]`,HTMLElement),a=i?Nm(i,t):null,o=$(e,`[data-wui-topsearch]`,HTMLElement);o&&Im(o,t);let s={el:e,setUnread(e){_(a,`WUI.shell: this <app-shell> has no <app-shell-notifications>.`).setUnread(e)},refreshNotifications(){return _(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)}};Sm.set(e,s);let c=n=>{if(n.target===e||n.target instanceof Node&&n.target.contains(e)){for(let e of t)e();Sm.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,c)}};return document.addEventListener(`wui:teardown`,c),s}function Rm(e=document){let t=[];e instanceof HTMLElement&&e.matches(`[data-app-shell]`)&&t.push(e),t.push(...km(e,`[data-app-shell]`,HTMLElement));for(let e of t)e.dataset.wuiPartsWired||(e.dataset.wuiPartsWired=`1`,Lm(e))}function zm(e){let t=Om(e,`[data-app-shell]`,HTMLElement);return t?(Sm.has(t)||Rm(t),Sm.get(t)??null):null}var Bm=`data-wui-submit-once`,Vm=`data-wui-submit-pending`,Hm=`wui-submit-spinner`,Um=new WeakSet,Wm=new WeakMap;function Gm(e){return e instanceof HTMLButtonElement||e instanceof HTMLInputElement?e:null}function Km(e){if(e.setAttribute(`aria-busy`,`true`),e.tagName===`INPUT`||e.querySelector(`.${Hm}`))return;let t=e.ownerDocument.createElement(`span`);t.className=`spinner-border spinner-border-sm me-2 ${Hm}`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t)}function qm(e){e.removeAttribute(`aria-busy`),e.querySelector(`.${Hm}`)?.remove()}function Jm(e){return e.method===`post`&&e.target!==`_blank`&&e.getAttribute(`data-wui-submit-once`)!==`off`}function Ym(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!Jm(t))return;if(t.hasAttribute(Vm)){e.preventDefault();return}t.setAttribute(Vm,``);let n=Gm(e.submitter);setTimeout(()=>{t.hasAttribute(Vm)&&(e.defaultPrevented?t.removeAttribute(Vm):n&&(n.disabled=!0,Km(n),Wm.set(t,n)))},0)}var Xm=e=>[...e.querySelectorAll(`form[${Vm}]`)].filter(e=>e instanceof HTMLFormElement);function Zm(e){for(let t of Xm(e)){t.removeAttribute(Vm);let e=Wm.get(t);e&&(e.disabled=!1,qm(e),Wm.delete(t))}}function Qm(e){let t=e.ownerDocument===null?e:e.ownerDocument;Um.has(t)||(Um.add(t),t.addEventListener(`submit`,Ym,!0),t.defaultView?.addEventListener(`pageshow`,()=>Zm(t)))}var $m=[`light`,`dark`,`auto`],eh=[`wave`,`circle`,`slide`,`blinds`,`fade`,`none`],th=`wave`,nh=`theme`,rh={wave:1100,circle:700,slide:600,blinds:900,fade:350,none:0},ih=`wui-theme-switching`,ah=`wui:theme:change`,oh=`(prefers-color-scheme: dark)`,sh=e=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(e).matches,ch=e=>$m.some(t=>t===e);function lh(e){return e===`dark`||e===`auto`&&sh(oh)?`dark`:`light`}function uh(e=nh){let t=null;try{t=window.localStorage.getItem(e)}catch{}return ch(t)?t:`auto`}function dh(e,t=nh){try{window.localStorage.setItem(t,e)}catch{}}function fh(e){let t=document.documentElement,n=lh(e);t.setAttribute(`data-theme`,e),t.setAttribute(`data-bs-theme`,n),document.dispatchEvent(new CustomEvent(ah,{detail:{mode:n,preference:e}}))}var ph=`(function(k){var m;try{m=localStorage.getItem(k)}catch{m=null}if(m!=='light'&&m!=='dark')m='auto';var r=document.documentElement,q=window.matchMedia?window.matchMedia('(prefers-color-scheme: dark)'):null;function s(){var t=r.getAttribute('data-theme');r.setAttribute('data-bs-theme',t==='auto'?(q&&q.matches?'dark':'light'):t)}r.setAttribute('data-theme',m);s();if(q&&q.addEventListener)q.addEventListener('change',function(){if(r.getAttribute('data-theme')==='auto')s()})})(`;function mh(e=nh){return`${ph}${JSON.stringify(String(e)).replace(/</g,`\\u003c`)})`}function hh(e,{includeAuto:t=!1}={}){return e===`light`?`dark`:e===`dark`&&t?`auto`:`light`}function gh(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(oh),n=()=>e(t.matches?`dark`:`light`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var _h=60,vh=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,yh=e=>e.toFixed(1),bh=(e,t)=>`${yh(e)}px ${yh(t)}px`,xh={amplitude:22,segments:36,cycles:1.5,ripples:2},Sh=6,Ch=(e,t,n,r,i)=>{let{amplitude:a,segments:o,cycles:s}=xh,c=n*(t+2*a),l=i?t+a-c:c-a,u=i?t+2*a:-2*a,d=[bh(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(bh(n,i))}return d.push(bh(e,u)),`polygon(${d.join(`, `)})`},wh=(e,t,n,r)=>{let i=t/Sh,a=[];for(let t=0;t<Sh;t++){let o=t*i,s=i*n,c=r?o+i-s:o,l=r?o+i:o+s;a.push(bh(0,c),bh(e,c),bh(e,l),bh(0,l))}return`polygon(${a.join(`, `)})`};function Th(e,{width:t,height:n,to:r=`dark`,origin:i}){let a=r===`dark`,o=[];for(let r=0;r<=_h;r++){let s=r/_h,c=vh(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(${yh(a*c)}px at ${yh(e)}px ${yh(r)}px)`});break}case`slide`:{let e=n*(1-c);o.push({clipPath:a?`inset(${yh(e)}px 0px 0px 0px)`:`inset(0px 0px ${yh(e)}px 0px)`});break}case`blinds`:o.push({clipPath:wh(t,n,c,a)});break;case`fade`:o.push({clipPath:`none`,opacity:c});break;case`none`:return[];default:o.push({clipPath:Ch(t,n,c,s*xh.ripples*2*Math.PI,a)})}}return o}var Eh=e=>{e instanceof DOMException&&(e.name===`AbortError`||e.name===`InvalidStateError`)||R(`[@webority/ui-elements] The theme view transition failed:`,e)};function Dh(e,{effect:t=th,to:n,origin:r,duration:i}={}){let a=document.documentElement,o=n!==void 0&&a.getAttribute(`data-bs-theme`)===n;if(t===`none`||o||sh(`(prefers-reduced-motion: reduce)`)||typeof document.startViewTransition!=`function`||typeof a.animate!=`function`)return e(),Promise.resolve(!1);a.classList.add(ih);let s=document.startViewTransition(e),c=i??rh[t]??rh.wave;return s.ready.then(()=>{let e=Th(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(Eh),s.finished.catch(Eh).finally(()=>a.classList.remove(ih)).then(()=>!0)}function Oh(){Se(),i(`wui-select`,io),i(`wui-datepicker`,Nr),i(`wui-dock`,Pr),i(`wui-otp`,ea),i(`wui-shortcuts`,Oo),i(`wui-record-pager`,ya),i(`wui-data-table`,gn),i(`wui-hover-card`,Wr),i(`wui-navigation-menu`,Qr),i(`wui-notification-center`,Ui),i(`wui-onboarding-checklist`,Zi),i(`wui-overflow`,ua),i(`wui-rating`,va),i(`wui-relative-time`,Ma),i(`wui-rolling-number`,Fa),i(`wui-show-more`,Mo),i(`wui-truncate`,No),i(`wui-whats-new`,Ho)}return globalThis.WeborityUiElementsInternal||(globalThis.WeborityUiElementsInternal={version:`0.153.0`,modules:Os}),rr(),Oh(),e.AVATAR_ACCEPT=ks,e.AVATAR_MAX_SIZE_MB=As,e.AVATAR_OUTPUT_SIZE=js,e.AVATAR_OUTPUT_TYPE=Ms,e.AVATAR_PREVIEW_SIZES=Ns,e.AVATAR_TEXT=Ps,e.BAR_BULK_IN_BAR_ATTRIBUTE=nl,e.COLUMN_MAX_WIDTH=Ot,e.COLUMN_MIN_WIDTH=Dt,e.COMMAND_SHORTCUT_ATTRIBUTE=Zs,e.CONFIRM_DIALOG_ID=lf,e.CONFIRM_TONES=uf,e.COPY_FEEDBACK_MS=Xo,e.CSRF_META_NAME=pi,e.CURRENCIES=Ve,e.CURRENCY_SYMBOLS=we,e.DATA_TABLE_TEXT=N,e.DATE_PATTERNS=We,e.DEFAULT_CSRF_HEADER=mi,e.DEFAULT_CURRENCY=Ce,e.DEFAULT_IMAGE_ACCEPT=ic,e.DEFAULT_MAX_SIZE_MB=ac,e.DEFAULT_PASSWORD_RULES=dl,e.DEFAULT_REQUIREMENTS_TITLE=fl,e.DEFAULT_THEME_EFFECT=th,e.DEFAULT_THEME_STORAGE_KEY=nh,e.DISCARD_EVENT=Ip,e.DISCARD_TEXT=Fp,e.DROP_OVER_CLASS=vl,e.DURATION_UNITS=Ue,e.EMPTY_VALUE=Ke,e.FILTER_POPOVER_MAX_CHIPS=de,e.FLASH_STORAGE_KEY=pf,e.FLASH_VARIANTS=df,e.FORMAT_STYLES=Be,e.HTTP_KINDS=vi,e.IST_TIME_ZONE=j,e.LIST_KEYS=w,e.MASK_INPUT_TYPES=Cc,e.MASK_NAMES=jc,e.MENTION_ID_PATTERN=$o,e.MONEY_UNITS=He,e.NOTIFICATION_COUNT_CAP=ei,e.NOTIFICATION_TEXT=V,e.PIN_AT_VAR=Ht,e.PIN_SIDES=jt,e.RESIZE_STEP=kt,e.RESIZE_STEP_LARGE=At,e.ROW_DRAG_TYPE=yl,e.ROW_DROP_EVENT=_l,e.ROW_HEIGHTS=Nt,e.ROW_MOVE_LIMIT=Kt,e.ROW_MOVE_MS=qt,e.ROW_SAVE_ATTR=tn,e.ROW_SAVE_ERROR_CLASS=nn,e.ROW_SAVE_STATES=en,e.SCROLL_EDGE_SELECTOR=Kl,e.SEARCH_OPEN_KEY=Rs,e.SELECT_ALL_LABEL=fs,e.SELECT_CELL_CLASS=K,e.SELECT_KEY=T,e.SELECT_ROW_LABEL=ps,e.SERVER_ACTION_TEXT=mf,e.SHORTCUTS_OFF_ATTRIBUTE=b,e.SHORTCUT_EVENT=S,e.SHORTCUT_SCOPE_ATTRIBUTE=x,e.SHORTCUT_TEXT=C,e.SUBMIT_ONCE_ATTRIBUTE=Bm,e.THEME_BOOT_SCRIPT_BODY=ph,e.THEME_CHANGE_EVENT=ah,e.THEME_EFFECTS=eh,e.THEME_EFFECT_DURATION=rh,e.THEME_MODES=$m,e.THEME_SWITCHING_CLASS=ih,e.TOAST_ACTION_METHODS=ci,e.TOAST_ACTION_MS=bu,e.UNSAVED_TEXT=Zf,e.VIRTUAL_OVERSCAN=Mt,e.WHATS_NEW_READ_EVENT=Po,e.WUI_HEADERS=H,e.WuiDataTable=gn,e.WuiDatePicker=Nr,e.WuiDock=Pr,e.WuiHoverCard=Wr,e.WuiNavigationMenu=Qr,e.WuiNotificationCenter=Ui,e.WuiOnboardingChecklist=Zi,e.WuiOtp=ea,e.WuiOverflow=ua,e.WuiRating=va,e.WuiRecordPager=ya,e.WuiRelativeTime=Ma,e.WuiRollingNumber=Fa,e.WuiSelect=io,e.WuiShortcuts=Oo,e.WuiShowMore=Mo,e.WuiTruncate=No,e.WuiWhatsNew=Ho,e.acceptDroppedFiles=vc,e.acceptLabel=hc,e.addRowSelectCells=xs,e.addSelectColumn=Ss,e.applyBarBulk=ll,e.applyTheme=fh,e.ariaKeyShortcuts=ie,e.attachFileDrop=yc,e.attachInputMask=Kc,e.attachRowDrag=Ul,e.attachScrollEdges=Jl,e.attachShiftRange=Ts,e.avatarCropOptions=Ls,e.avatarUnreadableMessage=Is,e.barBulkCountText=al,e.buildPasswordRules=ml,e.clampColumnWidth=Ft,e.classifyStatus=Si,e.closeRemotePane=cf,e.collapseSearch=qs,e.configureCsrf=gi,e.confirmAction=kf,e.copyTextToClipboard=Zo,e.createDiscardPrompt=Xp,e.createRequestQueue=Ti,e.createSelectHeaderCell=hs,e.createSelectRowCell=gs,e.createSelectSpacerCell=_s,e.currencyPrefix=Ee,e.deriveStepStatus=ls,e.evaluatePassword=hl,e.formValues=mp,e.formatCompact=pt,e.formatCurrency=dt,e.formatDate=M,e.formatDateTime=St,e.formatDuration=gt,e.formatFileSize=fc,e.formatMasked=zc,e.formatNumber=ut,e.formatPercent=mt,e.formatRelativeTime=wa,e.formatValue=bt,e.getServerTable=vu,e.getShell=zm,e.glyphSvg=z,e.groupCount=Pt,e.groupItems=It,e.groupNotificationsByDay=si,e.identityCell=rn,e.inShortcutScope=ce,e.initCollapsibleSearch=Xs,e.initCommandShortcuts=rc,e.initDrawerDiscard=bm,e.initInputMasks=el,e.initPageBarBulk=ul,e.initRemoteModals=tf,e.initRowDrag=Gl,e.initScrollEdges=eu,e.initServerActions=Xf,e.initServerTables=_u,e.initShellParts=Rm,e.initSubmitOnce=Qm,e.initUnsavedChanges=Np,e.isCommandChord=ec,e.isCurrencyCode=Te,e.isHeicFile=Fs,e.isImageFile=uc,e.isImageOnlyAccept=mc,e.isMaskPattern=Nc,e.isPdfFile=pc,e.isTimeZone=je,e.isTypingTarget=ae,e.loadRemoteDrawer=af,e.loadRemoteModal=nf,e.loadRemotePane=sf,e.maskedPostValue=Hc,e.matchSegments=Ds,e.matchesAccept=gc,e.measureRows=Zt,e.mentionLabel=ns,e.mentionTextFromValue=as,e.mentionValueFromText=os,e.mentionedIds=ss,e.moveFocus=ue,e.nextTheme=hh,e.notificationCountText=ni,e.notificationDayHeading=oi,e.notificationTime=ai,e.notificationTriggerLabel=ri,e.notificationUnreadAnnouncement=ii,e.openSearch=Ks,e.parseMentionValue=is,e.parseToastAction=di,e.passwordSatisfies=gl,e.pinAtValue=Ut,e.pinClasses=Gt,e.pinOffsetVar=Vt,e.planPins=Wt,e.playRowMoves=Qt,e.postedMasked=Rc,e.rawMasked=Lc,e.readColumnWidths=zt,e.readCsrf=bi,e.readStoredTheme=uh,e.relativeTimeTitle=Ta,e.releaseOverlay=tl,e.resetUnsavedChanges=Pp,e.resolveMask=Fc,e.resolveTheme=lh,e.rowLabel=an,e.rowOrderChanged=$t,e.runShortcut=le,e.runToastAction=Eu,e.saveOutcomeText=cn,e.setRowSaveState=on,e.settledRows=sn,e.shortcutKey=re,e.shortcutName=ne,e.shortcutsOff=se,e.showResultToast=Tu,e.stepperHeaderItems=us,e.storeTheme=dh,e.syncSelectAll=Cs,e.syncTargets=Wl,e.themeBootScript=mh,e.themeKeyframes=Th,e.tickedKeys=Al,e.timeZoneLabel=Tt,e.toInstant=_t,e.todayIn=Le,e.transitionTheme=Dh,e.validateFile=_c,e.virtualRange=Lt,e.wallClockOf=Ie,e.watchSystemTheme=gh,e.whenElementsReady=ar,e.withTrustedLabel=Tr,e.writeColumnWidths=Bt,e.wuiFetch=U,e.zoneOffsetMs=Ne,e.zoneParts=Me,e})({});