@webority/ui-elements 0.67.0 → 0.68.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 (47) hide show
  1. package/dist/{WuiAutocomplete-B2SKLPOV.js → WuiAutocomplete-5pVUMbGl.js} +3 -3
  2. package/dist/{WuiCommentThread-Dc2l9Fti.js → WuiCommentThread-BrCd4o4b.js} +1 -1
  3. package/dist/{WuiCountrySelect-D-K0dm77.js → WuiCountrySelect-B4O8uijt.js} +1 -1
  4. package/dist/WuiDataTable-Bqs6FW2t.js +1 -0
  5. package/dist/{WuiDatePicker-DONFTIvZ.js → WuiDatePicker-CeqLTVTD.js} +11 -11
  6. package/dist/{WuiDateRange-BuVA1MK5.js → WuiDateRange-Bk45QgnB.js} +1 -1
  7. package/dist/{WuiInlineEdit-CsyxcqXm.js → WuiInlineEdit-2XnVPzY-.js} +1 -1
  8. package/dist/{WuiMentionInput-BGVjGS4C.js → WuiMentionInput-U87MXi2S.js} +1 -1
  9. package/dist/{WuiMultiSelect-BGZOG93I.js → WuiMultiSelect-CR4meVOZ.js} +10 -10
  10. package/dist/{WuiNotificationCenter-CUmWy8QX.js → WuiNotificationCenter-BLsM1WkE.js} +1 -1
  11. package/dist/{WuiPhone-BoLywT_W.js → WuiPhone-Cbt2ekvK.js} +4 -4
  12. package/dist/{WuiSelect-U5Owq3wT.js → WuiSelect-C-NN9ZSX.js} +6 -6
  13. package/dist/WuiTagInput-DQ79rmjZ.js +6 -0
  14. package/dist/{WuiTimePicker-UjvUcDrS.js → WuiTimePicker-F0KkpOGq.js} +3 -3
  15. package/dist/{WuiTree-p6XmhW5x.js → WuiTree-BSx5pKJo.js} +1 -1
  16. package/dist/dataTable-Cd_IJQcs.js +1 -0
  17. package/dist/elements/autocomplete.js +1 -1
  18. package/dist/elements/comment-thread.js +1 -1
  19. package/dist/elements/country-select.js +1 -1
  20. package/dist/elements/data-table.js +1 -1
  21. package/dist/elements/date-range.js +1 -1
  22. package/dist/elements/datepicker.js +1 -1
  23. package/dist/elements/inline-edit.js +1 -1
  24. package/dist/elements/kanban.js +1 -1
  25. package/dist/elements/mention-input.js +1 -1
  26. package/dist/elements/multiselect.js +1 -1
  27. package/dist/elements/notification-center.js +1 -1
  28. package/dist/elements/phone.js +1 -1
  29. package/dist/elements/select.js +1 -1
  30. package/dist/elements/taginput.js +1 -1
  31. package/dist/elements/timepicker.js +1 -1
  32. package/dist/elements/tree.js +1 -1
  33. package/dist/helpers.js +1 -1
  34. package/dist/{kanban-kV9UbpnO.js → kanban-DclZZohi.js} +1 -1
  35. package/dist/themeTransition-Bzcxp2cy.js +1 -0
  36. package/dist/ui-calendar.global.js +1 -1
  37. package/dist/ui-calendar.js +1 -1
  38. package/dist/ui-chat.global.js +2 -2
  39. package/dist/ui-chat.js +2 -2
  40. package/dist/ui-elements.global.js +117 -117
  41. package/dist/ui-elements.js +1 -1
  42. package/dist/wuiHttp-0pGmgUIV.js +1 -0
  43. package/package.json +1 -1
  44. package/dist/WuiDataTable-tR8Lp4XZ.js +0 -1
  45. package/dist/WuiTagInput-DzEZooIn.js +0 -6
  46. package/dist/themeTransition-DO95LPdz.js +0 -1
  47. package/dist/wuiHttp-DgU5Jp47.js +0 -1
@@ -1,4 +1,4 @@
1
- var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){typeof customElements<`u`&&!customElements.get(e)&&customElements.define(e,t)}var n=4,r=300,i=400;function a(e,t,a={}){if(!e||!t)return;let o=e.getBoundingClientRect(),s=a.clampHeight?t.scrollTop:0;a.clampHeight&&(t.style.maxHeight=``);let c=t.offsetHeight,l=window.innerHeight-o.bottom,u=l<c+n&&o.top>l;if(t.classList.toggle(`drop-up`,u),t.style.position=`fixed`,t.style.top=u?`${Math.max(n,o.top-c-n)}px`:`${o.bottom+n}px`,a.clampHeight){let e=u?o.top-n*2:window.innerHeight-o.bottom-n*2;e<c&&(t.style.maxHeight=`${Math.max(e,0)}px`),t.scrollTop=s}a.matchWidth&&(o.width>=r?(t.style.minWidth=`${o.width}px`,t.style.width=`${o.width}px`,t.style.maxWidth=`${o.width}px`):(t.style.minWidth=`${o.width}px`,t.style.width=`max-content`,t.style.maxWidth=`${Math.min(i,window.innerWidth-n*2)}px`));let d=t.offsetWidth,f=Math.min(o.left,window.innerWidth-d-n);t.style.left=`${Math.max(n,f)}px`}function o(e,t){s(e),e._reanchor=t,e._reanchorScroll=n=>{n.target instanceof Node&&typeof e.contains==`function`&&e.contains(n.target)||t()},window.addEventListener(`resize`,e._reanchor),window.addEventListener(`scroll`,e._reanchorScroll,!0)}function s(e){e?._reanchor&&(window.removeEventListener(`resize`,e._reanchor),window.removeEventListener(`scroll`,e._reanchorScroll,!0),e._reanchor=null,e._reanchorScroll=null)}var c=typeof HTMLElement>`u`?class{}:HTMLElement,l=`data-wui-shortcuts`,u=`data-shortcut-scope`,d=`wui:shortcut`,f={title:`Keyboard shortcuts`,close:`Close`,help:`Show these shortcuts`},p=[{key:`J`,label:`Next item`},{key:`K`,label:`Previous item`},{key:`Enter`,label:`Open the item`}],m={key:`X`,label:`Select the item`},h={"/":`slash`,"?":`help`,Escape:`esc`,Esc:`esc`,Enter:`enter`},g={esc:`Esc`,escape:`Esc`,enter:`Enter`,slash:`/`,help:`?`},_={esc:`Escape`,ctrl:`Control`,cmd:`Meta`,option:`Alt`,opt:`Alt`},v=new Set([`checkbox`,`radio`,`button`,`submit`,`reset`,`range`,`color`,`file`,`image`]),y=new Set([`textbox`,`searchbox`,`combobox`]),b=`a[href], button, summary, input, select, textarea, [role="button"], [role="link"], [role="menuitem"], [role="option"], [role="tab"], [role="checkbox"], [role="switch"]`;function x(e){if(!e||e.ctrlKey||e.metaKey||e.altKey)return null;let t=e.key;return typeof t!=`string`||!t?null:h[t]?h[t]:t.length===1&&t.trim()?t.toLowerCase():null}function S(e){let t=String(e??``).trim();return t.length===1?t.toUpperCase():g[t.toLowerCase()]??t}function ee(e){return String(e??``).trim().split(/\s+/).filter(Boolean).map(e=>_[e.toLowerCase()]??(e.length===1?e.toUpperCase():e)).join(`+`)}function te(e){return!e||e.nodeType!==1?!1:e.isContentEditable||e.closest?.(`[contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]`)||e.tagName===`TEXTAREA`||e.tagName===`SELECT`?!0:e.tagName===`INPUT`?!v.has(String(e.type||`text`).toLowerCase()):y.has(e.getAttribute?.(`role`))}function C(e=typeof document>`u`?null:document){return e?.documentElement?.getAttribute(l)===`off`}function w(e,t){if(!t||e&&t.contains(e))return!0;let n=t.ownerDocument;return(!e||e===n.body||e===n.documentElement)&&n.querySelector(`[data-shortcut-scope]`)===t}function T(e,t,n=null){if(!t||e.defaultPrevented||C(e.target?.ownerDocument??void 0))return!1;let r=x(e);if(!r)return!1;let i=e.target;if(!w(i,n)||te(i))return!1;let a=t[r]??(r.length===1?t[r.toUpperCase()]:void 0);return typeof a!=`function`||r===`enter`&&i?.closest?.(b)?!1:(e.preventDefault(),a(e),!0)}function E(e,t){if(!e.length)return null;let n=e[0].ownerDocument,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=i<0?t>0?0:e.length-1:Math.min(e.length-1,Math.max(0,i+t));return e[a].focus(),e[a].scrollIntoView?.({block:`nearest`}),e[a]}var D=2,ne=`wui-filter-popover-pinned`,re=`.wui-filter-popover-trigger`,ie=`.wui-filter-popover-panel`,ae=`.wui-filter-popover-foot`,oe=`input:not([type]),input[type="text"],input[type="search"]`,se=`a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1'])`;function ce(){try{return sessionStorage.getItem(ne)===`1`}catch{return!1}}function le(e){try{e?sessionStorage.setItem(ne,`1`):sessionStorage.removeItem(ne)}catch{}}var ue=class extends c{constructor(){super(),this._doc=null,this._timer=null,this._sticky=!1,this._inside=!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(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(e.target===t){le(t.checked),t.checked?this._clear():this._schedule(!1);return}this.closest(`form.wui-filter-form`)?.requestSubmit()},this._onFocusOut=e=>{this.contains(e.relatedTarget)||this._schedule(!1)},this._onKeyDown=e=>{e.key!==`Enter`||!this._panel?.contains(e.target)||!e.target.matches(oe)||(e.preventDefault(),this.closest(`form.wui-filter-form`)?.requestSubmit())},this._onShortcut=e=>{this.ownerDocument.querySelector(`wui-filter-popover`)===this&&T(e,{f:()=>this._open(!0,!0)})},this._onEscape=e=>{e.key===`Escape`&&this.isOpen&&this._close(!0)},this._onOutside=e=>{this.isOpen&&!this.contains(e.target)&&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._doc.addEventListener(`keydown`,this._onShortcut),ce()&&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._doc?.removeEventListener(`keydown`,this._onShortcut),this._doc?.removeEventListener(`keydown`,this._onEscape),this._doc?.removeEventListener(`click`,this._onOutside),s(this),this._doc=null}get _trigger(){return this.querySelector(re)}get _panel(){return this.querySelector(ie)}get _pin(){return this.querySelector(`${ae} input[type="checkbox"]`)}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);return}!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(),o(this,()=>this._reposition()),this._doc?.addEventListener(`keydown`,this._onEscape),this._doc?.addEventListener(`click`,this._onOutside)),t&&n.querySelector(se)?.focus())}_close(e){if(this._clear(),!this.isOpen)return;let t=this._panel,n=t.contains(this.ownerDocument.activeElement);t.hidden=!0,this._trigger?.setAttribute(`aria-expanded`,`false`),this._sticky=!1,s(this),this._doc?.removeEventListener(`keydown`,this._onEscape),this._doc?.removeEventListener(`click`,this._onOutside),e&&n&&this._trigger?.focus()}_reposition(){this.isOpen&&this._trigger&&a(this._trigger,this._panel,{clampHeight:!0})}};function de(){t(`wui-filter-popover`,ue)}var fe=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],pe=[`INR`],me=[`rupees`,`paise`],he=[`ms`,`s`,`min`,`h`],O=[`day`,`month`,`year`,`datetime`,`time`],ge=`Asia/Kolkata`,_e=`-`,ve=`−`,ye=`₹`,be=330*60*1e3,xe=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],k=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],Se=(e,t)=>Number.isInteger(e)&&e>=0&&e<=20?e:t,Ce=new Map,we=e=>(Ce.has(e)||Ce.set(e,new Intl.NumberFormat(`en-IN`,{minimumFractionDigits:0,maximumFractionDigits:e})),Ce.get(e)),Te=new Map,Ee=e=>(Te.has(e)||Te.set(e,new Intl.NumberFormat(`en-IN`,{minimumFractionDigits:e,maximumFractionDigits:e})),Te.get(e)),De=e=>typeof e==`number`&&Number.isFinite(e),Oe=e=>e<0&&!Object.is(Math.abs(e),0)?ve:``,ke=(e,t)=>t===`paise`?e/100:e;function Ae(e,{decimals:t}={}){if(!De(e))return`-`;let n=we(Se(t,2)).format(Math.abs(e));return n===`0`?`0`:Oe(e)+n}function je(e,{unit:t=`rupees`,decimals:n}={}){if(!De(e))return`-`;let r=ke(e,t),i=Ee(Se(n,0)).format(Math.abs(r));return(Number(i.replace(/,/g,``))===0?``:Oe(r))+ye+i}var Me=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function Ne(e,{currency:t,unit:n=`rupees`}={}){if(!De(e))return`-`;let r=t?ke(e,n):e,i=t?ye:``,a=Math.abs(r),o=k.findIndex(([e])=>a>=e);if(o===-1){let e=we(Me(a)).format(a);if(e!==`1,000`)return(e===`0`?``:Oe(r))+i+e;o=k.length-1}let[s,c]=k[o],l=a/s,u=l>=100?0:l>=10?1:2,d=Number(l.toFixed(u));return d>=100&&o>0&&(--o,[s,c]=k[o],l=a/s,u=l>=100?0:l>=10?1:2,d=Number(l.toFixed(u))),`${Oe(r)}${i}${we(u).format(d)} ${c}`}function Pe(e,{decimals:t}={}){return De(e)?`${Ae(e*100,{decimals:Se(t,1)})}%`:`-`}function Fe(e,{unit:t=`s`}={}){if(!De(e))return`-`;let n={ms:1,s:1e3,min:6e4,h:36e5}[t]??1e3,r=Math.abs(e*n),i=Oe(e);if(Math.round(r)<1e3)return`${i}${we(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${we(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}${we(0).format(l)}h ${s(c%60)}m`}function Ie(e){if(e instanceof Date)return e.getTime();if(De(e))return e;if(typeof e!=`string`)return NaN;let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(t){let[e,n,r]=[Number(t[1]),Number(t[2]),Number(t[3])],i=new Date(Date.UTC(2e3,n-1,r));return i.setUTCFullYear(e),i.getUTCFullYear()===e&&i.getUTCMonth()===n-1&&i.getUTCDate()===r?i.getTime()-be:NaN}return Date.parse(e)}function Le(e){let t=new Date(e+be);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes()}}function Re(e,{pattern:t=`day`}={}){let n=Ie(e);if(!Number.isFinite(n))return`-`;let r=Le(n),i=e=>String(e).padStart(2,`0`),a=`${i(r.day)}-${xe[r.month]}-${r.year}`,o=`${i(r.hour)}:${i(r.minute)}`;switch(t){case`month`:return`${xe[r.month]}-${r.year}`;case`year`:return String(r.year);case`datetime`:return`${a} ${o}`;case`time`:return o;default:return a}}function ze(e,t){if(e==null||e===``)return`-`;let n=t?.style;if(n===`date`)return Re(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return je(e,t);case`percent`:return Pe(e,t);case`compact`:return Ne(e,t);case`duration`:return Fe(e,t);default:return Ae(e,t)}}var Be=`wui-csrf`,Ve=`RequestVerificationToken`,He=`X-Wui-Request`,A=Object.freeze({fragment:`X-Wui-Fragment`,message:`X-Wui-Message`,redirect:`X-Wui-Redirect`,result:`X-Wui-Result`,keepOpen:`X-Wui-Keep-Open`,toastVariant:`X-Wui-Toast-Variant`,data:`X-Wui-Data`,next:`X-Wui-Next`}),Ue=Object.freeze([`ok`,`validation`,`forbidden`,`client`,`server`,`network`,`aborted`,`stale`,`session`]),We=new Set([`GET`,`HEAD`]);function Ge(e=document){let t=e.querySelector(`meta[name="${Be}"]`),n=t?.getAttribute(`content`);return n?{header:t.getAttribute(`data-header`)||`RequestVerificationToken`,token:n}:null}var Ke=e=>{try{return new URL(e,window.location.href).origin===window.location.origin}catch{return!1}};function qe(e){return e>=200&&e<300?`ok`:e===401?`session`:e===403?`forbidden`:e===422?`validation`:e>=400&&e<500?`client`:`server`}var Je=e=>e?.name===`AbortError`,Ye=e=>{if(e==null||e===``)return null;try{return JSON.parse(e)}catch{return console.error(`X-Wui-Data is not JSON; it was ignored.`),null}};async function j(e,t={}){let n=(t.method||`GET`).toUpperCase(),r=t.navigate||(e=>window.location.assign(e)),i={Accept:`text/html`,"X-Requested-With":`XMLHttpRequest`,[He]:`1`,...t.headers};if(!We.has(n)&&Ke(e)){let e=Ge();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(A.message)),redirect:r(A.redirect),result:r(A.result),keepOpen:r(A.keepOpen)===`1`,toastVariant:r(A.toastVariant),fragment:r(A.fragment)===`1`,data:Ye(a(r(A.data))),next:r(A.next)}},s;try{s=await fetch(e,{method:n,body:t.body,headers:i,signal:t.signal,credentials:`same-origin`})}catch(e){return o(Je(e)||t.signal?.aborted?`aborted`:`network`)}let c=qe(s.status);if(c===`ok`&&s.redirected&&s.headers.get(A.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(Je(e)||t.signal?.aborted?`aborted`:`network`,s)}return o(c,s,l)}function Xe(){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=await j(n,{...r,signal:i.signal});return e===i&&(e=null),a!==t&&s.kind!==`aborted`?{...s,kind:`stale`,ok:!1}:s},abort(){e?.abort(),e=null}}}var Ze=`wui-remote-modal`,Qe=`wui-remote-drawer`,$e=Object.freeze({sm:360,md:480,lg:640}),et=`wui-modal-fullscreen`,tt=Object.freeze({sm:380,md:440,lg:640,xl:880}),M=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.`}),nt=`a[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,rt=`[aria-invalid="true"], .is-invalid, .input-validation-error`,it=`.wui-error-summary, [data-wui-form-errors], .validation-summary-errors, [data-valmsg-summary]`,at=`[data-wui-modal-content]`,ot=`<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>`,st=new WeakMap,ct=new WeakSet,lt=()=>Object.assign(Error(`The remote modal load was aborted.`),{name:`AbortError`}),ut=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},dt=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML};function ft(e){if(e==null||e===``)return null;if(e===`fullscreen`)return{fullscreen:!0};if(Object.hasOwn(tt,e))return{px:tt[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 pt=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:tt.md}},mt=(e,t)=>{e.classList.toggle(et,!!t.fullscreen),t.fullscreen?e.style.removeProperty(`--wui-modal-max-width`):e.style.setProperty(`--wui-modal-max-width`,`${t.px}px`)},ht=[`center`,`top`];function gt(e){if(Object.hasOwn($e,e??``))return{px:$e[e]};let t=ft(e);if(t?.fullscreen||e===`xl`)throw TypeError(`Unsupported drawer size "${String(e)}". Use sm, md, lg or a px number.`);return t}var _t=e=>e.container===`drawer`,vt=(e,t)=>_t(e)?gt(t):ft(t);function yt(e=`modal`){let t=e===`drawer`,n=t?Qe:Ze,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?$e.md:tt.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 bt=e=>`<div class="wui-modal-header"><div class="wui-modal-heading"><div class="wui-modal-headtext"><div class="wui-modal-title">${dt(e)}</div></div></div>${ot}</div>`,xt=e=>`<div class="modal-content wui-modal" aria-busy="true">${bt(e)}<div class="wui-modal-body"><div class="wui-modal-loading" role="status"><span class="visually-hidden">${dt(M.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>`,St=(e,t)=>`<div class="modal-content wui-modal" data-wui-modal-error="${dt(t)}">${bt(e)}<div class="wui-modal-body"><div class="wui-modal-state" role="alert"><p class="wui-modal-state-title">${dt(M.errorTitle)}</p><p class="wui-modal-state-text">${dt(M[t]||M.server)}</p><div class="wui-modal-state-actions"><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">${dt(M.close)}</button><button type="button" class="btn btn-primary" data-wui-modal-retry>${dt(M.retry)}</button></div></div></div></div>`,Ct=e=>{let t=document.createElement(`template`);return t.innerHTML=e,t.content.querySelector(`.modal-content`)},wt=e=>e.shell.querySelector(`.modal-content`);function Tt(e){if(!e)return;e.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0}));let t=window.bootstrap,n=[t?.Tooltip,t?.Popover,t?.Dropdown].filter(e=>e?.getInstance);for(let t of[e,...e.querySelectorAll(`*`)])for(let e of n)e.getInstance(t)?.dispose()}function Et(e,t){let n=wt(e);Tt(n),n?n.replaceWith(t):e.shell.querySelector(`.modal-dialog`).appendChild(t),window.WUI?.refresh?.()}var Dt=e=>e.shell.classList.contains(`show`);function Ot(e,t){let n=t&&e.querySelector(rt),r=n?n.matches(nt)?n:n.querySelector(nt)||n:null;if(!r){let t=[...e.querySelectorAll(nt)];r=e.querySelector(`[data-autofocus]`)||t.find(e=>!e.classList.contains(`wui-modal-close`))||t[0]||e}r.focus?.()}function kt(e,t){let n=e.shell.querySelector(`[data-wui-modal-live]`);n||(n=document.createElement(`div`),n.className=`visually-hidden`,n.setAttribute(`aria-live`,`assertive`),n.setAttribute(`data-wui-modal-live`,``),e.shell.querySelector(`.modal-dialog`).appendChild(n)),n.textContent=``,n.textContent=t}var At=e=>{let t=e.shell.querySelector(`[data-wui-modal-live]`);t&&(t.textContent=``)},jt=(e,t,n)=>e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}));function Mt(e,t,n,r){let i={...r,container:e.container};jt(t,`wui:modal:${n}`,i),_t(e)&&jt(t,`wui:drawer:${n}`,i)}function Nt(e){let t=st.get(e);return t||(t={shell:e,container:e.classList.contains(`wui-remote-drawer`)?`drawer`:`modal`,queue:Xe(),defaultSize:pt(e),defaultLabel:e.getAttribute(`aria-label`),placeholder:wt({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},st.set(e,t),e.addEventListener(`submit`,e=>Kt(t,e)),e.addEventListener(`click`,e=>{!e.target.closest?.(`[data-wui-modal-retry]`)||!t.session||(e.preventDefault(),zt(t,t.session))}),e.addEventListener(`hidden.bs.modal`,n=>{n.target===e&&It(t)}),e.addEventListener(`shown.bs.modal`,n=>{let r=wt(t);n.target===e&&t.session&&r?.matches(at)&&!r.contains(document.activeElement)&&Ot(r,!1)}),t.remoteUrl&&e.addEventListener(`show.bs.modal`,n=>{n.target===e&&Lt(t,n)}),t)}function Pt(e,t,n){e.session&&(e.queue.abort(),e.session.resolveClosed({status:`dismissed`,detail:{replaced:!0}}));let r,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:null};return a.handle={el:e.shell,closed:i,close:()=>Ft(e,a,`dismissed`,null),reload:()=>zt(e,a)},e.session=a,a}function Ft(e,t,n,r){e.session===t&&(t.closing={status:n,detail:r},window.bootstrap?.Modal?.getOrCreateInstance(e.shell).hide())}function It(e){let t=e.session;if(e.queue.abort(),e.session=null,At(e),t){let{status:n,detail:r}=t.closing||{status:`dismissed`,detail:null};t.resolveClosed({status:n,detail:r}),Mt(e,e.shell,`closed`,{status:n,url:t.url});let i=document.activeElement;t.trigger?.isConnected&&(!i||i===document.body||e.shell.contains(i))&&t.trigger.focus?.()}e.cache||(Et(e,Ct(e.placeholder)),e.loadedUrl=null,mt(e.shell,e.defaultSize),e.defaultLabel?e.shell.setAttribute(`aria-label`,e.defaultLabel):e.shell.removeAttribute(`aria-label`))}function Lt(e,t){let n=t.relatedTarget instanceof Element?t.relatedTarget:null,r=n?.getAttribute(`data-wui-url`)||e.remoteUrl,i=Pt(e,r,{trigger:n});i.explicitSize=Rt(e,n?.getAttribute(`data-wui-size`)),i.explicitSize&&mt(e.shell,i.explicitSize),!(e.cache&&e.loadedUrl===r)&&(e.loadedUrl&&Et(e,Ct(e.placeholder)),zt(e,i,{keepPlaceholder:!0}))}function Rt(e,t){try{return vt(e,t)}catch(e){return console.error(e),null}}async function zt(e,t,{keepPlaceholder:n=!1}={}){n||Et(e,Ct(xt(t.options.title||Bt(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`)&&Vt(e,t,r.html,!1))return e.loadedUrl=t.url,Mt(e,e.shell,`loaded`,{url:t.url,handle:t.handle}),`loaded`;let i=r.kind===`ok`||r.kind===`validation`?`server`:r.kind;return Et(e,Ct(St(t.options.title||Bt(e),i))),Dt(e)&&Ot(wt(e),!1),Mt(e,e.shell,`error`,{url:t.url,kind:i,status:r.status}),`error`}var Bt=e=>wt(e)?.querySelector(`.wui-modal-title`)?.textContent||e.shell.getAttribute(`aria-label`)||``;function Vt(e,t,n,r){let i=document.createElement(`template`);i.innerHTML=n;let a=i.content.querySelectorAll(`script`);if(a.length){console.warn(`WUI.modal: ${t.url} returned a fragment with script; it was removed. Keep page behaviour in the page.`);for(let e of a)e.remove()}let o=i.content.querySelector(at);if(!o)return console.error(`WUI.modal: ${t.url} did not answer with an <app-modal-content> fragment.`),!1;Et(e,o),r||At(e),mt(e.shell,t.explicitSize||Rt(e,o.getAttribute(`data-wui-size`))||e.defaultSize);let s=o.getAttribute(`data-wui-title`);return s&&e.shell.setAttribute(`aria-label`,s),Dt(e)&&Ot(o,r),!0}var Ht=`button[type="submit"], button:not([type]), input[type="submit"], input[type="image"]`;function Ut(e,t,n){let r=[...e.elements].filter(e=>e.matches(Ht));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>`));return}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 Wt(e,t,n){let r=t.closest(`.wui-modal-body`)||t;r.querySelector(`[data-wui-modal-submit-error]`)?.remove();let i=document.createElement(`div`);i.className=`alert alert-danger wui-modal-submit-error`,i.setAttribute(`role`,`alert`),i.setAttribute(`data-wui-modal-submit-error`,``),i.textContent=`${M.submitFailed} ${M[n]||M.server}`,r.prepend(i),kt(e,i.textContent)}var Gt=(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 Kt(e,t){let n=t.target,r=e.session;if(!(n instanceof HTMLFormElement)||!r||n.hasAttribute(`data-wui-native`)||!n.closest(at)||(t.preventDefault(),n.hasAttribute(`data-wui-submitting`)))return;let i=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`;Ut(n,i,!0);let l=await e.queue.run(c?Gt(a,s):a,{method:o,body:c?void 0:s,navigate:r.options.navigate});if(e.session===r){if(n.isConnected&&Ut(n,i,!1),l.kind===`ok`&&l.result===`success`){qt(e,r,l);return}if(!(l.kind===`aborted`||l.kind===`stale`||l.kind===`session`)){if(l.kind===`validation`&&Vt(e,r,l.html,!0)){let t=wt(e).querySelector(it)?.textContent.replace(/\s+/g,` `).trim();kt(e,t||M.invalid);return}l.kind===`ok`&&l.html&&Vt(e,r,l.html,!1)||Wt(e,n,l.kind===`ok`||l.kind===`validation`?`server`:l.kind)}}}function qt(e,t,n){let r=n.message,i=n.redirect||null,a={url:t.url,trigger:t.trigger,handle:t.handle,message:r,redirect:i,data:n.data??null,container:e.container};if(r&&window.WUI?.toast?.(r,{variant:`success`}),Mt(e,t.trigger?.isConnected?t.trigger:document,`success`,a),t.options.onSuccess?.(a,t.handle),i&&(t.options.navigate||(e=>window.location.assign(e)))(i),n.next&&!i){t.url=n.next,t.method=`GET`,t.body=void 0,zt(e,t);return}if(n.keepOpen){n.html&&Vt(e,t,n.html,!1);return}Ft(e,t,`success`,a)}function Jt(e){let t=e.target.closest?.(`[data-wui-modal], [data-wui-drawer]`);if(t&&!(t.matches(`a[href]`)&&(e.ctrlKey||e.metaKey||e.shiftKey||e.button!==0))){if(e.preventDefault(),!t.hasAttribute(`data-wui-modal`)){Zt(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=>{e?.name!==`AbortError`&&console.error(e)});return}Xt(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=>{e?.name!==`AbortError`&&console.error(e)})}}function Yt(e=document){let t=e.ownerDocument||e;ct.has(t)||(ct.add(t),t.addEventListener(`click`,Jt));let n=[...e.querySelectorAll?.(`.modal[data-wui-remote-url]`)||[]];e.matches?.(`.modal[data-wui-remote-url]`)&&n.unshift(e);for(let e of n)Nt(e)}function Xt(e,t={}){try{if(!e)throw TypeError(`WUI.modal.load: a fragment url is required.`);let n=ut(e),r=t.container===`drawer`,i=r?gt(t.size):ft(t.size),a=t.placement||`center`;if(!ht.includes(a))throw TypeError(`WUI.modal.load: unsupported placement "${a}". Use center or top.`);if(t.signal?.aborted)return Promise.reject(lt());let o=yt(r?`drawer`:`modal`);Yt(document);let s=Nt(o),c=Dt(s),l=Pt(s,e,t);l.explicitSize=i,mt(o,i||s.defaultSize),r||o.querySelector(`.modal-dialog`).classList.toggle(`modal-dialog-centered`,a===`center`),t.title&&o.setAttribute(`aria-label`,t.title),c||(n.getInstance(o)?.dispose(),n.getOrCreateInstance(o,{backdrop:!t.staticBackdrop||`static`,keyboard:!t.staticBackdrop}));let u=c?Promise.resolve():new Promise(e=>o.addEventListener(`shown.bs.modal`,()=>e(),{once:!0})),d=zt(s,l);c||n.getOrCreateInstance(o).show();let f=new Promise((e,n)=>{t.signal?.addEventListener(`abort`,()=>{s.session===l&&(s.queue.abort(),Ft(s,l,`dismissed`,{aborted:!0})),n(lt())},{once:!0})}),p=Promise.all([u,d]).then(([,t])=>{if(t===`aborted`)throw lt();if(t===`session`)throw Error(`WUI.modal.load(${e}): the session expired; the browser is signing in again.`);return l.handle});return Promise.race([p,f])}catch(e){return Promise.reject(e)}}function Zt(e,t={}){return Xt(e,{...t,container:`drawer`,placement:void 0})}var Qt=Object.freeze([`neutral`,`primary`,`info`,`success`,`warning`,`danger`]),$t=Object.freeze([`number`,`currency`,`compact`]),en=`wui-kanban:`,tn=`(max-width: 767.98px)`,nn=400,rn=6,N=Object.freeze({help:`Press Space to pick up the card. Use the Left and Right arrow keys to choose a column, then Space to drop it, or Escape to cancel.`,empty:`Nothing here`,collapse:e=>`Collapse ${e}`,expand:e=>`Expand ${e}`,lifted:(e,t)=>`Picked up ${e} in ${t}. Use the Left and Right arrow keys to choose a column.`,over:(e,t)=>`${e}, ${t===1?`1 card`:`${t} cards`}. Drop allowed.`,overSource:e=>`${e}, where the card started.`,overRefused:(e,t)=>`${e}. ${t}`,dropHere:(e,t)=>`Drop here to move ${e} to ${t}.`,refused:(e,t)=>`Cards in ${e} cannot move to ${t}.`,moved:(e,t)=>`Moved ${e} to ${t}.`,saving:(e,t)=>`Moving ${e} to ${t}.`,cancelled:e=>`${e} was not moved.`,rolledBack:(e,t)=>`${e} went back to ${t}.`,locked:e=>`${e} cannot be moved.`,more:e=>`Show ${e} more`,fewer:`Show fewer`,swipeHint:`Swipe sideways or tap a column`,busy:`This card is still saving. Try again in a moment.`,failed:Object.freeze({forbidden:`You do not have permission to move this card.`,client:`This card could not be moved. Refresh the board and try again.`,validation:`This card could not be moved. Refresh the board and try again.`,server:`Something went wrong on our side, so the card went back. Try again in a moment.`,network:`Could not reach the server, so the card went back. Check your connection and try again.`})}),an=`[data-wui-column]`,on=`[data-wui-body]`,sn=`[data-wui-card]`,cn=`[data-wui-count]`,ln=`[data-wui-summary]`,un=`[data-wui-empty]`,dn=`[data-wui-drop-note]`,fn=`[data-wui-live]`,pn=`[data-wui-help]`,mn=`[data-wui-switch]`,hn=`[data-wui-scroller]`,gn=`[data-wui-collapse]`,_n=`[data-wui-more]`,vn=`data-wui-visible-limit`,yn=`data-wui-overflow`,bn=`input, select, textarea, [contenteditable=""], [contenteditable="true"], [data-wui-no-drag]`,xn=48,Sn=16,P=e=>e.getAttribute(`data-wui-column`),Cn=e=>e.getAttribute(`data-wui-card`),wn=e=>e.hidden||e.hasAttribute(`hidden`),Tn=e=>wn(e)||e.hasAttribute(yn);function En(e){if(e==null||e===``)return null;let t=typeof e==`number`?e:Number(e);if(!Number.isInteger(t)||t<1)throw TypeError(`Unsupported kanban visible limit "${String(e)}". Use a whole number of 1 or more.`);return t}function Dn(e,t,n,r){let i=new Set;if(t==null||n)return i;let a=0;for(let n of e)r.has(n)||(a<t?a++:i.add(n));return i}function F(e){let t=(e.getAttribute(`aria-label`)||e.textContent||``).replace(/\s+/g,` `).trim();return t.length>80?`${t.slice(0,79)}…`:t||Cn(e)||`Card`}function On(e){return e?`${en}${e}`:null}function kn(e,t=globalThis.localStorage){let n=On(e);if(!n||!t)return{};try{let e=JSON.parse(t.getItem(n)||`null`);return e&&typeof e.collapsed==`object`&&e.collapsed?e.collapsed:{}}catch{return{}}}function An(e,t,n,r=globalThis.localStorage){let i=On(e);if(!i||!r)return;let a={...kn(e,r),[t]:!!n};try{r.setItem(i,JSON.stringify({collapsed:a}))}catch{}}function jn(e,t){if(!$t.includes(e))throw TypeError(`Unsupported kanban summary format "${String(e)}". Use ${$t.join(`, `)}.`);if(t!=null&&t!==``&&!me.includes(t))throw TypeError(`Unsupported kanban summary unit "${String(t)}". Use ${me.join(`, `)}.`);return e===`currency`?{style:`currency`,unit:t||`rupees`}:e===`compact`?{style:`compact`,currency:pe[0],unit:t||`rupees`}:{style:`number`,decimals:0}}function Mn(e){let t=0;for(let n of e){if(n==null||n===``)continue;let e=typeof n==`number`?n:Number(n);Number.isFinite(e)&&(t+=e)}return t}var Nn=(e,t)=>{e&&window.WUI?.toast?.(e,{variant:t})},Pn=class extends c{constructor(){super(),this._wired=!1,this._filter=null,this._expanded=new Set,this._revealed=new Set,this._press=null,this._drag=null,this._kbd=null,this._suppressClick=!1,this._observer=null,this._refreshQueued=!1,this._scrollTimer=0,this._onPointerMove=e=>this._pointerMove(e),this._onPointerUp=e=>this._pointerUp(e),this._onPointerCancel=()=>this._endPointer(!1),this._onDocKeyDown=e=>{e.key===`Escape`&&this._drag&&(e.preventDefault(),this._endPointer(!1))},this._onScroll=()=>{clearTimeout(this._scrollTimer),this._scrollTimer=setTimeout(()=>this._syncSwitcherFromScroll(),80)}}_controlled(){return this.hasAttribute(`controlled`)}connectedCallback(){if(!this._wired){this._wired=!0,this.addEventListener(`pointerdown`,e=>this._pointerDown(e)),this.addEventListener(`keydown`,e=>this._keyDown(e)),this.addEventListener(`click`,e=>this._click(e),!0),this.addEventListener(`dragstart`,e=>{e.target.closest?.(sn)&&e.preventDefault()}),this.addEventListener(`touchmove`,e=>{this._drag&&e.preventDefault()},{passive:!1}),this._scroller()?.addEventListener(`scroll`,this._onScroll,{passive:!0}),this._restoreCollapsed();for(let e of this._allCards())this._prepareCard(e);if(typeof MutationObserver==`function`){this._observer=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e.nodeType===1&&e.matches(sn)&&this._prepareCard(e);this._queueRefresh()});for(let e of this.querySelectorAll(on))this._observer.observe(e,{childList:!0})}this.refresh()}}disconnectedCallback(){this._endPointer(!1),this._observer?.disconnect(),this._observer=null,this._scroller()?.removeEventListener(`scroll`,this._onScroll),clearTimeout(this._scrollTimer),this._wired=!1}setFilter(e){if(e!=null&&typeof e!=`function`)throw TypeError(`wui-kanban setFilter: pass a function or null.`);if(this._filter=e,!e)for(let e of this._allCards())e.hidden=!1;this.refresh()}refresh(){if(this._controlled())return;this._refreshQueued=!1;let e=this._summaryFormat();for(let t of this._columns()){let n=P(t),r=En(t.getAttribute(vn)),i=[],a=[];for(let e of this._cardsIn(t)){if(this._filter&&(e.hidden=this._filter(e)===!1),wn(e)){e.removeAttribute(yn);continue}i.push(e),a.push(e.getAttribute(`data-wui-value`))}let o=this._expanded.has(n),s=Dn(i.map(Cn),r,o,this._revealed);for(let e of i)e.toggleAttribute(yn,s.has(Cn(e)));let c=String(i.length);for(let e of this._countsOf(t))e.textContent!==c&&(e.textContent=c);let l=t.querySelector(un);if(l&&(l.hidden=i.length>0),e){let n=t.querySelector(ln);n&&(n.textContent=ze(Mn(a),e))}let u=t.querySelector(_n);if(u){u.hidden=r==null||(o?i.length<=r:s.size===0),u.setAttribute(`aria-expanded`,o?`true`:`false`);let e=o?N.fewer:N.more(s.size);u.textContent!==e&&(u.textContent=e)}}}moveCard(e,t,n){let r=this._cardByKey(e);if(!r)throw Error(`wui-kanban moveCard: no card "${String(e)}" on this board.`);if(!this._columnByKey(t))throw Error(`wui-kanban moveCard: no column "${String(t)}" on this board.`);return this._commit(r,t,n)}_columns(){return[...this.querySelectorAll(an)]}_columnByKey(e){return this._columns().find(t=>P(t)===e)||null}_columnOf(e){return e.closest(an)}_titleOf(e){return(e.querySelector(`.wui-kanban-title`)?.textContent||P(e)||``).replace(/\s+/g,` `).trim()}_bodyOf(e){return e.querySelector(on)}_cardsIn(e){let t=this._bodyOf(e);return t?[...t.children].filter(e=>e.matches(sn)):[]}_visibleCardsIn(e){return this._cardsIn(e).filter(e=>!Tn(e))}_allCards(){return[...this.querySelectorAll(`${on} > ${sn}`)]}_cardByKey(e){return this._allCards().find(t=>Cn(t)===e)||null}_countsOf(e){let t=P(e),n=[...this.querySelectorAll(mn)].filter(e=>e.getAttribute(`data-wui-switch`)===t);return[...e.querySelectorAll(cn),...n.flatMap(e=>[...e.querySelectorAll(cn)])]}_scroller(){return this.querySelector(hn)}_summaryFormat(){let e=this.getAttribute(`summary-format`);return e?jn(e,this.getAttribute(`summary-unit`)):null}_queueRefresh(){this._refreshQueued||(this._refreshQueued=!0,queueMicrotask(()=>{this._refreshQueued&&this.refresh()}))}_prepareCard(e){let t=this.querySelector(pn);t?.id&&!e.hasAttribute(`aria-describedby`)&&e.setAttribute(`aria-describedby`,t.id),e.hasAttribute(`tabindex`)||(e.tabIndex=0)}_announce(e){let t=this.querySelector(fn);!t||!e||(t.textContent=``,t.textContent=e)}_fire(e,t,n=!1){return this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:n,detail:t}))}_canLift(e){let t=F(e),n=this.hasAttribute(`readonly`);return n||e.hasAttribute(`data-wui-locked`)?(this._announce(N.locked(t)),this._fire(`wui:kanban:locked`,{key:Cn(e),card:e,reason:n?`readonly`:`locked`},!0),!1):e.getAttribute(`aria-busy`)===`true`?(this._announce(N.busy),Nn(N.busy,`info`),!1):!0}_check(e,t,n){if(t===n)return{ok:!1,source:!0,reason:null};let r=this._columnByKey(t),i=this._columnByKey(n),a=N.refused(r?this._titleOf(r):t,i?this._titleOf(i):n),o=i?.getAttribute(`data-accept-from`);if(o!=null&&!o.split(/\s+/).filter(Boolean).includes(t))return{ok:!1,reason:a};if(typeof this.accept==`function`){let r=this.accept(e,t,n);if(r===!1)return{ok:!1,reason:a};if(typeof r==`string`&&r)return{ok:!1,reason:r}}return{ok:!0,reason:null}}_markTargets(e,t){let n=F(e),r=new Map;for(let i of this._columns()){let a=P(i),o=this._check(e,t,a);r.set(a,o),i.setAttribute(`data-wui-drop`,o.source?`source`:o.ok?`ok`:`refused`);let s=i.querySelector(dn);s&&!o.source&&(s.textContent=o.ok?N.dropHere(n,this._titleOf(i)):o.reason,s.hidden=!1)}return r}_clearTargets(){for(let e of this._columns()){e.removeAttribute(`data-wui-drop`),e.removeAttribute(`data-wui-over`),e.removeAttribute(`data-wui-target`);let t=e.querySelector(dn);t&&(t.hidden=!0,t.textContent=``)}}async _commit(e,t,n){let r=this._columnOf(e),i=P(r),a=this._columnByKey(t),o=F(e);if(i===t||!this._canLift(e))return!1;let s=this._check(e,i,t);if(!s.ok)return this._announce(s.reason),Nn(s.reason,`info`),!1;let c=this._cardsIn(a),l=Number.isInteger(n)?Math.max(0,Math.min(n,c.length)):c.length,u={key:Cn(e),card:e,from:i,to:t,index:l},d=e.contains(document.activeElement);if(this._controlled())return this._fire(`wui:kanban:move`,u),this._announce(N.moved(o,this._titleOf(a))),d&&this._refocusSoon(u.key),!0;if(!this._fire(`wui:kanban:move`,u,!0))return!1;let f=a.hasAttribute(vn)&&!this._revealed.has(u.key);f&&this._revealed.add(u.key);let p={parent:e.parentNode,next:e.nextSibling,column:r,revealed:f};this._bodyOf(a).insertBefore(e,c[l]||null),d&&this._focusMoved(e),this.refresh();let m=a.getAttribute(`data-wui-step`);if(m)return this._runStep(e,u,p,m,a.getAttribute(`data-wui-step-size`));let h=this.getAttribute(`move-url`);if(!h)return this._announce(N.moved(o,this._titleOf(a))),this._fire(`wui:kanban:moved`,{...u,result:null}),!0;this._lock(e,!0),this._announce(N.saving(o,this._titleOf(a)));let g=await j(h,{method:`POST`,body:new URLSearchParams({card:u.key,from:i,to:t,index:String(l)})});if(this._lock(e,!1),g.kind===`session`)return!1;if(g.ok){let t=this._applyFragment(g.html)||e;return Nn(g.message,`success`),this._announce(N.moved(F(t),this._titleOf(a))),this._fire(`wui:kanban:moved`,{...u,card:t,result:g}),!0}return this._rollback(e,p),g.kind!==`aborted`&&Nn(g.message||N.failed[g.kind]||N.failed.server,`danger`),this._fire(`wui:kanban:failed`,{...u,kind:g.kind,status:g.status,message:g.message}),!1}async _runStep(e,t,n,r,i){let a=F(e),o=this._columnByKey(t.to),s=new URLSearchParams({card:t.key,from:t.from,to:t.to}).toString(),c=r+(r.includes(`?`)?`&`:`?`)+s;this._lock(e,!0);let l;try{l=await(await Xt(c,{trigger:e,size:i||void 0})).closed}catch(r){return this._lock(e,!1),this._rollback(e,n),r?.name!==`AbortError`&&Nn(N.failed.server,`danger`),this._fire(`wui:kanban:failed`,{...t,kind:`step`,status:0,message:r?.message??null}),!1}if(l?.status!==`success`)return this._lock(e,!1),this._rollback(e,n),this._announce(N.cancelled(a)),this._fire(`wui:kanban:failed`,{...t,kind:`dismissed`,status:0,message:null}),!1;let u=e,d=this.getAttribute(`card-url`);if(d){let n=await j(`${d}${d.includes(`?`)?`&`:`?`}${new URLSearchParams({card:t.key})}`);n.ok&&(u=this._applyFragment(n.html)||e)}return this._lock(u,!1),this._announce(N.moved(F(u),this._titleOf(o))),this._fire(`wui:kanban:moved`,{...t,card:u,result:l}),!0}_lock(e,t){t?(e.setAttribute(`aria-busy`,`true`),e.setAttribute(`data-wui-saving`,``)):(e.removeAttribute(`aria-busy`),e.removeAttribute(`data-wui-saving`))}_rollback(e,t){let n=e.contains(document.activeElement),r=t.next&&t.next.parentNode===t.parent?t.next:null;t.revealed&&this._revealed.delete(Cn(e)),t.parent.insertBefore(e,r),n&&e.focus(),this.refresh(),this._announce(N.rolledBack(F(e),this._titleOf(t.column)))}_applyFragment(e){if(!e)return null;let t=document.createElement(`template`);t.innerHTML=e;for(let e of t.content.querySelectorAll(`script`))console.warn(`[@webority/ui-elements] A kanban fragment carried a script tag; it was removed, not run.`),e.remove();let n=null;for(let e of[...t.content.querySelectorAll(sn)]){if(e.closest(`template`))continue;let t=this._cardByKey(Cn(e));if(!t)continue;let r=t.contains(document.activeElement);t.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0})),t.hidden&&(e.hidden=!0),t.replaceWith(e),this._prepareCard(e),r&&e.focus(),n??=e}for(let e of t.content.querySelectorAll(`template[data-wui-kanban-summary]`))this._columnByKey(e.getAttribute(`data-wui-kanban-summary`))?.querySelector(ln)?.replaceChildren(e.content.cloneNode(!0));return this.refresh(),window.WUI?.refresh?.(),n}_refocusSoon(e){let t=()=>{let t=this._cardByKey(e);t&&this._focusMoved(t)};typeof requestAnimationFrame==`function`?requestAnimationFrame(t):setTimeout(t,0)}_focusMoved(e){e.focus({preventScroll:!0}),e.scrollIntoView?.({block:`nearest`})}_pointerDown(e){if(e.button!==0||e.isPrimary===!1||this._drag||this._kbd)return;let t=e.target.closest?.(sn);if(!t||!this.contains(t)||e.target.closest(bn))return;let n={card:t,id:e.pointerId,x:e.clientX,y:e.clientY,type:e.pointerType,timer:0};this._press=n,e.pointerType===`touch`&&(n.timer=setTimeout(()=>{this._press===n&&this._startDrag(n,n.x,n.y)},400)),window.addEventListener(`pointermove`,this._onPointerMove),window.addEventListener(`pointerup`,this._onPointerUp),window.addEventListener(`pointercancel`,this._onPointerCancel)}_pointerMove(e){let t=this._press;if(!(!t||e.pointerId!==t.id)){if(!this._drag){if(!(Math.hypot(e.clientX-t.x,e.clientY-t.y)>6))return;if(t.type===`touch`){this._endPointer(!1);return}if(this._startDrag(t,e.clientX,e.clientY),!this._drag)return}this._dragTo(e.clientX,e.clientY)}}_pointerUp(e){!this._press||e.pointerId!==this._press.id||this._endPointer(!!this._drag)}_startDrag(e,t,n){let r=e.card;if(!this._canLift(r)){this._endPointer(!1);return}let i=P(this._columnOf(r)),a=r.getBoundingClientRect(),o=r.cloneNode(!0);for(let e of[o,...o.querySelectorAll(`[id]`)])e.removeAttribute(`id`);o.removeAttribute(`data-wui-card`),o.removeAttribute(`tabindex`),o.setAttribute(`aria-hidden`,`true`),o.classList.add(`wui-kanban-ghost`),o.style.width=`${a.width}px`,this.appendChild(o),r.setAttribute(`data-wui-dragging`,``),this.setAttribute(`data-wui-dragging`,``),this._drag={card:r,from:i,ghost:o,dx:t-a.left,dy:n-a.top,over:null,verdicts:this._markTargets(r,i)},this._announce(N.lifted(F(r),this._titleOf(this._columnOf(r)))),document.addEventListener(`keydown`,this._onDocKeyDown),this._dragTo(t,n)}_dragTo(e,t){let n=this._drag;n.x=e,n.y=t,n.ghost.style.transform=`translate(${e-n.dx}px, ${t-n.dy}px)`;let r=this._columnAt(e,t);r!==n.over&&(n.over?.removeAttribute(`data-wui-over`),r?.setAttribute(`data-wui-over`,``),n.over=r),this._autoScroll(e,t,r)}_columnAt(e,t){for(let n of this._columns()){let r=n.getBoundingClientRect();if(e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom)return n}return null}_indexAt(e,t){let n=this._visibleCardsIn(e).filter(e=>e!==this._drag?.card).find(e=>{let n=e.getBoundingClientRect();return t<n.top+n.height/2}),r=this._cardsIn(e).filter(e=>e!==this._drag?.card);return n?r.indexOf(n):r.length}_autoScroll(e,t,n){let r=this._scroller();if(r){let t=r.getBoundingClientRect();t.width>0&&(e<t.left+xn?r.scrollBy?.({left:-16}):e>t.right-xn&&r.scrollBy?.({left:Sn}))}if(n&&this._scrollColumn(n,t))return;let i=window.innerHeight||0;i>0&&(t<xn?window.scrollBy?.({top:-16}):t>i-xn&&window.scrollBy?.({top:Sn}))}_scrollColumn(e,t){let n=this._bodyOf(e);if(!n||e.hasAttribute(`data-collapsed`)||n.scrollHeight<=n.clientHeight)return!1;let r=n.getBoundingClientRect();return t<r.top+xn&&n.scrollTop>0?(n.scrollBy?.({top:-16}),!0):t>r.bottom-xn&&n.scrollTop+n.clientHeight<n.scrollHeight-1?(n.scrollBy?.({top:Sn}),!0):!1}_endPointer(e){let t=this._press,n=this._drag;if(t&&clearTimeout(t.timer),this._press=null,this._drag=null,window.removeEventListener(`pointermove`,this._onPointerMove),window.removeEventListener(`pointerup`,this._onPointerUp),window.removeEventListener(`pointercancel`,this._onPointerCancel),document.removeEventListener(`keydown`,this._onDocKeyDown),!n)return;n.ghost.remove(),n.card.removeAttribute(`data-wui-dragging`),this.removeAttribute(`data-wui-dragging`),this._suppressClick=!0,setTimeout(()=>{this._suppressClick=!1},0);let r=n.over;if(this._clearTargets(),!e||!r){this._announce(N.cancelled(F(n.card)));return}let i=P(r),a=n.verdicts.get(i);if(a?.source){this._announce(N.cancelled(F(n.card)));return}if(!a?.ok){this._announce(a?.reason),Nn(a?.reason,`info`);return}this._commit(n.card,i,this._indexAt(r,n.y))}_click(e){if(this._suppressClick&&e.target.closest?.(sn)){e.preventDefault(),e.stopPropagation(),this._suppressClick=!1;return}let t=e.target.closest?.(gn);if(t&&this.contains(t)){let e=t.closest(an);e&&this._setCollapsed(e,!e.hasAttribute(`data-collapsed`),!0);return}let n=e.target.closest?.(_n);if(n&&this.contains(n)){this._controlled()||this._toggleMore(n.closest(an));return}let r=e.target.closest?.(mn);r&&this.contains(r)&&this._showColumn(r.getAttribute(`data-wui-switch`))}_keyDown(e){if(this._kbd){this._liftedKey(e);return}let t=e.target;if(!t.matches?.(sn)||!this.contains(t))return;let n=this._columnOf(t);switch(e.key){case` `:case`Spacebar`:{if(e.preventDefault(),!this._canLift(t))return;let r=P(n),i=this._columns();this._kbd={card:t,from:r,target:i.indexOf(n),verdicts:this._markTargets(t,r)},t.setAttribute(`data-wui-lifted`,``),this.setAttribute(`data-wui-dragging`,``),n.setAttribute(`data-wui-target`,``),this._announce(N.lifted(F(t),this._titleOf(n)));return}case`ArrowDown`:case`ArrowUp`:{let r=this._visibleCardsIn(n),i=r[r.indexOf(t)+(e.key===`ArrowDown`?1:-1)];i&&(e.preventDefault(),i.focus());return}case`ArrowLeft`:case`ArrowRight`:{let t=this._columns(),r=e.key===`ArrowRight`?1:-1;for(let i=t.indexOf(n)+r;i>=0&&i<t.length;i+=r){let n=this._visibleCardsIn(t[i])[0];if(n&&!t[i].hasAttribute(`data-collapsed`)){e.preventDefault(),n.focus();return}}return}default:}}_liftedKey(e){let t=this._kbd,n=this._columns();switch(e.key){case`ArrowLeft`:case`ArrowRight`:{e.preventDefault();let r=t.target+(e.key===`ArrowRight`?1:-1);if(r<0||r>=n.length)return;n[t.target]?.removeAttribute(`data-wui-target`),t.target=r;let i=n[r];i.setAttribute(`data-wui-target`,``),this._showColumn(P(i),!1);let a=t.verdicts.get(P(i)),o=this._titleOf(i);this._announce(a.source?N.overSource(o):a.ok?N.over(o,this._cardsIn(i).filter(e=>!wn(e)).length):N.overRefused(o,a.reason));return}case` `:case`Spacebar`:case`Enter`:{e.preventDefault();let r=n[t.target],i=P(r),a=t.verdicts.get(i);if(!a.source&&!a.ok){this._announce(a.reason);return}this._endKeyboard(),a.source?this._announce(N.cancelled(F(t.card))):this._commit(t.card,i);return}case`Escape`:case`Tab`:e.key===`Escape`&&e.preventDefault(),this._endKeyboard(),this._showColumn(t.from,!1),this._announce(N.cancelled(F(t.card)));return;default:}}_endKeyboard(){let e=this._kbd;this._kbd=null,e&&(e.card.removeAttribute(`data-wui-lifted`),this.removeAttribute(`data-wui-dragging`),this._clearTargets())}_restoreCollapsed(){let e=kn(this.getAttribute(`board-id`));for(let t of this._columns()){let n=P(t);t.hasAttribute(`data-collapsible`)&&Object.hasOwn(e,n)&&this._setCollapsed(t,e[n],!1)}}_setCollapsed(e,t,n){let r=P(e);e.toggleAttribute(`data-collapsed`,t);let i=this._titleOf(e);for(let n of e.querySelectorAll(gn))n.setAttribute(`aria-expanded`,t?`false`:`true`),n.setAttribute(`aria-label`,t?N.expand(i):N.collapse(i));n&&(An(this.getAttribute(`board-id`),r,t),this._fire(`wui:kanban:collapse`,{column:r,collapsed:t}))}_toggleMore(e){if(!e)return;let t=P(e);if(this._expanded.delete(t))for(let t of this._cardsIn(e))this._revealed.delete(Cn(t));else this._expanded.add(t);this.refresh()}_isPhone(){return typeof matchMedia==`function`&&matchMedia(`(max-width: 767.98px)`).matches}_showColumn(e,t=!0){for(let t of this.querySelectorAll(mn))t.getAttribute(`data-wui-switch`)===e?t.setAttribute(`aria-current`,`true`):t.removeAttribute(`aria-current`);let n=this._columnByKey(e),r=this._scroller();if(!n||!r||!t&&!this._isPhone())return;let i=typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches;r.scrollTo?.({left:n.offsetLeft-r.offsetLeft,behavior:i?`auto`:`smooth`})}_syncSwitcherFromScroll(){let e=this._scroller();if(!e||!this._isPhone())return;let t=e.clientWidth||1,n=this._columns()[Math.round(e.scrollLeft/t)];if(n)for(let e of this.querySelectorAll(mn))e.getAttribute(`data-wui-switch`)===P(n)?e.setAttribute(`aria-current`,`true`):e.removeAttribute(`aria-current`)}},Fn={delete:`data:image/webp;base64,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`,info:`data:image/webp;base64,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`,primary:`data:image/webp;base64,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`,success:`data:image/webp;base64,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`,warning:`data:image/webp;base64,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`},In={error:`<rect width="174" height="174" rx="87" fill="var(--wui-danger-5)"/>
1
+ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){typeof customElements<`u`&&!customElements.get(e)&&customElements.define(e,t)}var n=4,r=300,i=400;function a(e,t,a={}){if(!e||!t)return;let o=e.getBoundingClientRect(),s=a.clampHeight?t.scrollTop:0;a.clampHeight&&(t.style.maxHeight=``);let c=t.offsetHeight,l=window.innerHeight-o.bottom,u=l<c+n&&o.top>l;if(t.classList.toggle(`drop-up`,u),t.style.position=`fixed`,t.style.top=u?`${Math.max(n,o.top-c-n)}px`:`${o.bottom+n}px`,a.clampHeight){let e=u?o.top-n*2:window.innerHeight-o.bottom-n*2;e<c&&(t.style.maxHeight=`${Math.max(e,0)}px`),t.scrollTop=s}a.matchWidth&&(o.width>=r?(t.style.minWidth=`${o.width}px`,t.style.width=`${o.width}px`,t.style.maxWidth=`${o.width}px`):(t.style.minWidth=`${o.width}px`,t.style.width=`max-content`,t.style.maxWidth=`${Math.min(i,window.innerWidth-n*2)}px`));let d=t.offsetWidth,f=Math.min(o.left,window.innerWidth-d-n);t.style.left=`${Math.max(n,f)}px`}function o(e,t){s(e),e._reanchor=t,e._reanchorScroll=n=>{n.target instanceof Node&&typeof e.contains==`function`&&e.contains(n.target)||t()},window.addEventListener(`resize`,e._reanchor),window.addEventListener(`scroll`,e._reanchorScroll,!0)}function s(e){e?._reanchor&&(window.removeEventListener(`resize`,e._reanchor),window.removeEventListener(`scroll`,e._reanchorScroll,!0),e._reanchor=null,e._reanchorScroll=null)}var c=typeof HTMLElement>`u`?class{}:HTMLElement,l=`data-wui-shortcuts`,u=`data-shortcut-scope`,d=`wui:shortcut`,f={title:`Keyboard shortcuts`,close:`Close`,help:`Show these shortcuts`},p=[{key:`J`,label:`Next item`},{key:`K`,label:`Previous item`},{key:`Enter`,label:`Open the item`}],m={key:`X`,label:`Select the item`},h={"/":`slash`,"?":`help`,Escape:`esc`,Esc:`esc`,Enter:`enter`},g={esc:`Esc`,escape:`Esc`,enter:`Enter`,slash:`/`,help:`?`},_={esc:`Escape`,ctrl:`Control`,cmd:`Meta`,option:`Alt`,opt:`Alt`},v=new Set([`checkbox`,`radio`,`button`,`submit`,`reset`,`range`,`color`,`file`,`image`]),y=new Set([`textbox`,`searchbox`,`combobox`]),b=`a[href], button, summary, input, select, textarea, [role="button"], [role="link"], [role="menuitem"], [role="option"], [role="tab"], [role="checkbox"], [role="switch"]`;function x(e){if(!e||e.ctrlKey||e.metaKey||e.altKey)return null;let t=e.key;return typeof t!=`string`||!t?null:h[t]?h[t]:t.length===1&&t.trim()?t.toLowerCase():null}function S(e){let t=String(e??``).trim();return t.length===1?t.toUpperCase():g[t.toLowerCase()]??t}function ee(e){return String(e??``).trim().split(/\s+/).filter(Boolean).map(e=>_[e.toLowerCase()]??(e.length===1?e.toUpperCase():e)).join(`+`)}function C(e){return!e||e.nodeType!==1?!1:e.isContentEditable||e.closest?.(`[contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]`)||e.tagName===`TEXTAREA`||e.tagName===`SELECT`?!0:e.tagName===`INPUT`?!v.has(String(e.type||`text`).toLowerCase()):y.has(e.getAttribute?.(`role`))}function w(e=typeof document>`u`?null:document){return e?.documentElement?.getAttribute(l)===`off`}function T(e,t){if(!t||e&&t.contains(e))return!0;let n=t.ownerDocument;return(!e||e===n.body||e===n.documentElement)&&n.querySelector(`[data-shortcut-scope]`)===t}function E(e,t,n=null){if(!t||e.defaultPrevented||w(e.target?.ownerDocument??void 0))return!1;let r=x(e);if(!r)return!1;let i=e.target;if(!T(i,n)||C(i))return!1;let a=t[r]??(r.length===1?t[r.toUpperCase()]:void 0);return typeof a!=`function`||r===`enter`&&i?.closest?.(b)?!1:(e.preventDefault(),a(e),!0)}function D(e,t){if(!e.length)return null;let n=e[0].ownerDocument,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=i<0?t>0?0:e.length-1:Math.min(e.length-1,Math.max(0,i+t));return e[a].focus(),e[a].scrollIntoView?.({block:`nearest`}),e[a]}var O=2,te=`wui-filter-popover-pinned`,ne=`.wui-filter-popover-trigger`,re=`.wui-filter-popover-panel`,ie=`.wui-filter-popover-foot`,ae=`input:not([type]),input[type="text"],input[type="search"]`,oe=`a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1'])`;function se(){try{return sessionStorage.getItem(te)===`1`}catch{return!1}}function ce(e){try{e?sessionStorage.setItem(te,`1`):sessionStorage.removeItem(te)}catch{}}var le=class extends c{constructor(){super(),this._doc=null,this._timer=null,this._sticky=!1,this._inside=!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(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(e.target===t){ce(t.checked),t.checked?this._clear():this._schedule(!1);return}this.closest(`form.wui-filter-form`)?.requestSubmit()},this._onFocusOut=e=>{this.contains(e.relatedTarget)||this._schedule(!1)},this._onKeyDown=e=>{e.key!==`Enter`||!this._panel?.contains(e.target)||!e.target.matches(ae)||(e.preventDefault(),this.closest(`form.wui-filter-form`)?.requestSubmit())},this._onShortcut=e=>{this.ownerDocument.querySelector(`wui-filter-popover`)===this&&E(e,{f:()=>this._open(!0,!0)})},this._onEscape=e=>{e.key===`Escape`&&this.isOpen&&this._close(!0)},this._onOutside=e=>{this.isOpen&&!this.contains(e.target)&&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._doc.addEventListener(`keydown`,this._onShortcut),se()&&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._doc?.removeEventListener(`keydown`,this._onShortcut),this._doc?.removeEventListener(`keydown`,this._onEscape),this._doc?.removeEventListener(`click`,this._onOutside),s(this),this._doc=null}get _trigger(){return this.querySelector(ne)}get _panel(){return this.querySelector(re)}get _pin(){return this.querySelector(`${ie} input[type="checkbox"]`)}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);return}!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(),o(this,()=>this._reposition()),this._doc?.addEventListener(`keydown`,this._onEscape),this._doc?.addEventListener(`click`,this._onOutside)),t&&n.querySelector(oe)?.focus())}_close(e){if(this._clear(),!this.isOpen)return;let t=this._panel,n=t.contains(this.ownerDocument.activeElement);t.hidden=!0,this._trigger?.setAttribute(`aria-expanded`,`false`),this._sticky=!1,s(this),this._doc?.removeEventListener(`keydown`,this._onEscape),this._doc?.removeEventListener(`click`,this._onOutside),e&&n&&this._trigger?.focus()}_reposition(){this.isOpen&&this._trigger&&a(this._trigger,this._panel,{clampHeight:!0})}};function ue(){t(`wui-filter-popover`,le)}var de=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],fe=[`INR`],pe=[`rupees`,`paise`],me=[`ms`,`s`,`min`,`h`],k=[`day`,`month`,`year`,`datetime`,`time`],he=`Asia/Kolkata`,ge=`-`,_e=`−`,ve=`₹`,ye=330*60*1e3,be=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],xe=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],Se=(e,t)=>Number.isInteger(e)&&e>=0&&e<=20?e:t,Ce=new Map,we=e=>(Ce.has(e)||Ce.set(e,new Intl.NumberFormat(`en-IN`,{minimumFractionDigits:0,maximumFractionDigits:e})),Ce.get(e)),Te=new Map,Ee=e=>(Te.has(e)||Te.set(e,new Intl.NumberFormat(`en-IN`,{minimumFractionDigits:e,maximumFractionDigits:e})),Te.get(e)),De=e=>typeof e==`number`&&Number.isFinite(e),Oe=e=>e<0&&!Object.is(Math.abs(e),0)?_e:``,ke=(e,t)=>t===`paise`?e/100:e;function A(e,{decimals:t}={}){if(!De(e))return`-`;let n=we(Se(t,2)).format(Math.abs(e));return n===`0`?`0`:Oe(e)+n}function Ae(e,{unit:t=`rupees`,decimals:n}={}){if(!De(e))return`-`;let r=ke(e,t),i=Ee(Se(n,0)).format(Math.abs(r));return(Number(i.replace(/,/g,``))===0?``:Oe(r))+ve+i}var je=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2;function Me(e,{currency:t,unit:n=`rupees`}={}){if(!De(e))return`-`;let r=t?ke(e,n):e,i=t?ve:``,a=Math.abs(r),o=xe.findIndex(([e])=>a>=e);if(o===-1){let e=we(je(a)).format(a);if(e!==`1,000`)return(e===`0`?``:Oe(r))+i+e;o=xe.length-1}let[s,c]=xe[o],l=a/s,u=l>=100?0:l>=10?1:2,d=Number(l.toFixed(u));return d>=100&&o>0&&(--o,[s,c]=xe[o],l=a/s,u=l>=100?0:l>=10?1:2,d=Number(l.toFixed(u))),`${Oe(r)}${i}${we(u).format(d)} ${c}`}function Ne(e,{decimals:t}={}){return De(e)?`${A(e*100,{decimals:Se(t,1)})}%`:`-`}function Pe(e,{unit:t=`s`}={}){if(!De(e))return`-`;let n={ms:1,s:1e3,min:6e4,h:36e5}[t]??1e3,r=Math.abs(e*n),i=Oe(e);if(Math.round(r)<1e3)return`${i}${we(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${we(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}${we(0).format(l)}h ${s(c%60)}m`}function Fe(e){if(e instanceof Date)return e.getTime();if(De(e))return e;if(typeof e!=`string`)return NaN;let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(t){let[e,n,r]=[Number(t[1]),Number(t[2]),Number(t[3])],i=new Date(Date.UTC(2e3,n-1,r));return i.setUTCFullYear(e),i.getUTCFullYear()===e&&i.getUTCMonth()===n-1&&i.getUTCDate()===r?i.getTime()-ye:NaN}return Date.parse(e)}function Ie(e){let t=new Date(e+ye);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes()}}function Le(e,{pattern:t=`day`}={}){let n=Fe(e);if(!Number.isFinite(n))return`-`;let r=Ie(n),i=e=>String(e).padStart(2,`0`),a=`${i(r.day)}-${be[r.month]}-${r.year}`,o=`${i(r.hour)}:${i(r.minute)}`;switch(t){case`month`:return`${be[r.month]}-${r.year}`;case`year`:return String(r.year);case`datetime`:return`${a} ${o}`;case`time`:return o;default:return a}}function Re(e,t){if(e==null||e===``)return`-`;let n=t?.style;if(n===`date`)return Le(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return Ae(e,t);case`percent`:return Ne(e,t);case`compact`:return Me(e,t);case`duration`:return Pe(e,t);default:return A(e,t)}}var ze=48,Be=1200,Ve=10,He=50,Ue=[`start`,`end`],We=8,Ge={comfortable:54,cozy:48,compact:40},j={resize:e=>e?`Resize ${e} column`:`Resize column`,width:e=>`${e} pixels`,rows:e=>`${A(e,{decimals:0})} ${e===1?`row`:`rows`}`,saved:e=>e?`${e} saved.`:`Row saved.`,savedMany:e=>`${A(e,{decimals:0})} rows saved.`,notSaved:(e,t)=>`${e?`${e} was not saved.`:`Row was not saved.`}${t?` ${t}`:``}`},Ke=e=>A(e,{decimals:0}),qe=e=>Math.min(Be,Math.max(48,Math.round(Number(e)||0)));function Je(e,t,n=[]){let r=new Map(n.map(e=>[e,[]]));return e.forEach((e,n)=>{let i=t(e,n);r.has(i)||r.set(i,[]),r.get(i).push(e)}),[...r].filter(([,e])=>e.length>0).map(([e,t])=>({key:e,items:t}))}function Ye({scrollTop:e,viewport:t,rowHeight:n,count:r,overscan:i=8}){let a=n>0?n:Ge.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 Xe=e=>`wui-widths:${e}`;function Ze(e){if(!e)return{};try{let t=JSON.parse(window.localStorage.getItem(Xe(e))||`{}`),n={};for(let[e,r]of Object.entries(t||{}))Number.isFinite(r)&&(n[e]=qe(r));return n}catch{return{}}}function Qe(e,t){if(e)try{Object.keys(t).length?window.localStorage.setItem(Xe(e),JSON.stringify(t)):window.localStorage.removeItem(Xe(e))}catch{}}var $e=(e,t)=>`--wui-pin-${e}-${t}`,et=`--wui-pin-at`,tt=(e,t)=>`var(${$e(e,t)}, 0px)`;function nt(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});n>=0&&(t[n].edge=!0);let i=-1;r=0;for(let n=e.length-1;n>=0;n--)e[n]===`end`&&(t[n]={side:`end`,ordinal:r++,edge:!1},i=n);return i>=0&&(t[i].edge=!0),t}var rt=e=>e?`wui-pin-${e.side}${e.edge?` wui-pin-${e.side}-edge`:``}`:``,it=200,at=220,ot=`cubic-bezier(0.22, 1, 0.36, 1)`,st=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,ct=e=>e.getAttribute(`data-row-key`)??e;function lt(e){let t=[...e];if(t.length>200)return null;let n=new Map;for(let e of t)e.hidden||n.set(ct(e),e.offsetTop);return n}function ut(e,t){let n=[...e];if(!t||n.length>200||st())return 0;let r=0;for(let e of n){if(e.hidden||typeof e.animate!=`function`)continue;let n=t.get(ct(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:ot}),r++)}return r}function dt(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 ft=[`saving`,`error`],pt=`data-wui-save-state`,mt=`wui-row-save-error`,ht=e=>e.querySelector(`:scope > .wui-name-cell`)??[...e.cells].find(e=>!e.matches(`.wui-select-cell, .wui-expand-cell`))??null;function gt(e){let t=ht(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.nodeType===1&&e.classList.contains(`wui-row-save-error`)||(r+=e.textContent);return r.replace(/\s+/g,` `).trim()}function _t(e,t,n=``){if(t!==null&&!ft.includes(t))throw Error(`A row's save state is ${ft.join(` or `)} (or null to clear it), not "${t}".`);e.querySelector(`:scope > * > .${mt}`)?.remove(),t===null?e.removeAttribute(pt):e.setAttribute(pt,t),t===`saving`?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`);let r=t===`error`&&n?ht(e):null;if(r){let t=e.ownerDocument.createElement(`span`);t.className=mt,t.textContent=n,r.append(t)}}function vt(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 yt(e){let t=e.filter(e=>e.ok),n=[];t.length===1?n.push(j.saved(t[0].label)):t.length>1&&n.push(j.savedMany(t.length));for(let t of e)t.ok||n.push(j.notSaved(t.label,t.message));return n.join(` `)}var bt={activity:`<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="m7.33 14.49 2.38-3.09c.34-.44.97-.52 1.41-.18l1.83 1.44c.44.34 1.07.26 1.41-.17l2.31-2.98" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,add:`<path d="M6 12h12M12 18V6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"add-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM8 12h8M12 16V8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,alarm:`<path d="M2 22h20M12 6a9 9 0 0 0-9 9v7h18v-7a9 9 0 0 0-9-9ZM12 2v1M4 4l1 1M20 4l-1 1" 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-down":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M18.07 14.43L12 20.5l-6.07-6.07M12 3.5v16.83"></path>`,"arrow-down-up":`<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>`,"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-left-2":`<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>`,"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>`,"arrow-right-2":`<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>`,"arrow-swap-horizontal":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M20.5 14.99l-5.01 5.02M3.5 14.99h17M3.5 9.01l5.01-5.02M20.5 9.01h-17"></path>`,"arrow-up":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M18.07 9.57L12 3.5 5.93 9.57M12 20.5V3.67"></path>`,"arrow-up-right":`<g transform="rotate(-45 12 12)"><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></g>`,"badge-check":`<path d="m8.38 12 2.41 2.42 4.83-4.84" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.75 2.45c.69-.59 1.82-.59 2.52 0l1.58 1.36c.3.26.86.47 1.26.47h1.7c1.06 0 1.93.87 1.93 1.93v1.7c0 .39.21.96.47 1.26l1.36 1.58c.59.69.59 1.82 0 2.52l-1.36 1.58c-.26.3-.47.86-.47 1.26v1.7c0 1.06-.87 1.93-1.93 1.93h-1.7c-.39 0-.96.21-1.26.47l-1.58 1.36c-.69.59-1.82.59-2.52 0l-1.58-1.36c-.3-.26-.86-.47-1.26-.47H6.18c-1.06 0-1.93-.87-1.93-1.93V16.1c0-.39-.21-.95-.46-1.25l-1.35-1.59c-.58-.69-.58-1.81 0-2.5l1.35-1.59c.25-.3.46-.86.46-1.25V6.2c0-1.06.87-1.93 1.93-1.93h1.73c.39 0 .96-.21 1.26-.47l1.58-1.35Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,bell:`<path d="M12.02 2.91c-3.31 0-6 2.69-6 6v2.89c0 .61-.26 1.54-.57 2.06L4.3 15.77c-.71 1.18-.22 2.49 1.08 2.93 4.31 1.44 8.96 1.44 13.27 0 1.21-.4 1.74-1.83 1.08-2.93l-1.15-1.91c-.3-.52-.56-1.45-.56-2.06V8.91c0-3.3-2.7-6-6-6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M13.87 3.2a6.754 6.754 0 0 0-3.7 0c.29-.74 1.01-1.26 1.85-1.26.84 0 1.56.52 1.85 1.26Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.02 19.06c0 1.65-1.35 3-3 3-.82 0-1.58-.34-2.12-.88a3.01 3.01 0 0 1-.88-2.12" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path>`,book:`<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>`,"box-seam":`<path d="M3.17 7.44 12 12.55l8.77-5.08M12 21.61v-9.07" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.93 2.48 4.59 5.45c-1.21.67-2.2 2.35-2.2 3.73v5.65c0 1.38.99 3.06 2.2 3.73l5.34 2.97c1.14.63 3.01.63 4.15 0l5.34-2.97c1.21-.67 2.2-2.35 2.2-3.73V9.18c0-1.38-.99-3.06-2.2-3.73l-5.34-2.97c-1.15-.64-3.01-.64-4.15 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 13.24V9.58L7.51 4.1" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,briefcase:`<path d="M8 22h8c4.02 0 4.74-1.61 4.95-3.57l.75-8C21.97 7.99 21.27 6 17 6H7c-4.27 0-4.97 1.99-4.7 4.43l.75 8C3.26 20.39 3.98 22 8 22ZM8 6v-.8C8 3.43 8 2 11.2 2h1.6C16 2 16 3.43 16 5.2V6" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14 13v1.02c0 1.09-.01 1.98-2 1.98-1.98 0-2-.88-2-1.97V13c0-1 0-1 1-1h2c1 0 1 0 1 1ZM21.65 11A16.484 16.484 0 0 1 14 14.02M2.62 11.27c2.25 1.54 4.79 2.47 7.38 2.76" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,bug:`<path d="M12 8.5c-3.3 0-5.5 2.6-5.5 6s2.2 6 5.5 6 5.5-2.6 5.5-6-2.2-6-5.5-6ZM12 10v10.5M9.6 6.8 8 4.5M14.4 6.8 16 4.5M6.5 12.5H3.8M6.8 16.5l-2.3 1.3M17.5 12.5h2.7M17.2 16.5l2.3 1.3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`,building:`<path d="M12.5 22H4.08c-1.16 0-2.11-.93-2.11-2.07V5.09c0-2.62 1.95-3.81 4.34-2.64l4.44 2.18c.96.47 1.75 1.72 1.75 2.78V22ZM21.97 15.06v3.78c0 2.16-1 3.16-3.16 3.16H12.5V10.42l.47.1 4.5 1.01 2.03.45c1.32.29 2.4.97 2.46 2.89.01.06.01.12.01.19ZM5.5 9h3.47M5.5 13h3.47" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.47 11.53v3.22c0 1.24-1.01 2.25-2.25 2.25s-2.25-1.01-2.25-2.25v-4.23l4.5 1.01ZM21.96 14.87A2.249 2.249 0 0 1 19.72 17c-1.24 0-2.25-1.01-2.25-2.25v-3.22l2.03.45c1.32.29 2.4.97 2.46 2.89Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"building-2":`<path d="M6.7 18H4.15C2.72 18 2 17.28 2 15.85V4.15C2 2.72 2.72 2 4.15 2h4.3c1.43 0 2.15.72 2.15 2.15V6" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.37 8.42v11.16c0 1.61-.8 2.42-2.41 2.42H9.12c-1.61 0-2.42-.81-2.42-2.42V8.42C6.7 6.81 7.51 6 9.12 6h5.84c1.61 0 2.41.81 2.41 2.42Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M13.4 6V4.15c0-1.43.72-2.15 2.15-2.15h4.3C21.28 2 22 2.72 22 4.15v11.7c0 1.43-.72 2.15-2.15 2.15h-2.48M10 11h4M10 14h4M12 22v-3" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,bullseye:`<path d="M12 19.5a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM12 4V2M4 12H2M12 20v2M20 12h2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,cake:`<path d="M2 22h20M3.11 22v-9c0-1.66 1.49-3 3.33-3h11.11c1.84 0 3.33 1.34 3.33 3v9M5.56 10V7.17C5.56 5.97 6.64 5 7.98 5h8.05c1.33 0 2.41.97 2.41 2.17V10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m3.53 13.98.37.01c.74.01 1.33.61 1.33 1.35v.33a1.35 1.35 0 0 0 2.7 0v-.31a1.35 1.35 0 0 1 2.7 0v.31a1.35 1.35 0 0 0 2.7 0v-.31a1.35 1.35 0 0 1 2.7 0v.31a1.35 1.35 0 0 0 2.7 0v-.31c0-.74.6-1.35 1.35-1.35h.45M8 5V3M16 5V3M12 5V2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,calculator:`<path d="M10 22h4c5 0 7-2 7-7V9c0-5-2-7-7-7h-4C5 2 3 4 3 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16.5 7.58v1c0 .82-.67 1.5-1.5 1.5H9c-.82 0-1.5-.67-1.5-1.5v-1c0-.82.67-1.5 1.5-1.5h6c.83 0 1.5.67 1.5 1.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.136 14h.012M11.995 14h.012M15.854 14h.012M8.136 17.5h.012M11.995 17.5h.012M15.854 17.5h.012" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,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-1":`<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>`,"calendar-add":`<path d="M8 2v3M16 2v3M3.5 9.09h17M18 23a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM19.49 19.05h-2.98M18 17.59v2.99" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 8.5v7.86c-.73-.83-1.8-1.36-3-1.36-2.21 0-4 1.79-4 4 0 .75.21 1.46.58 2.06.21.36.48.68.79.94H8c-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="M11.995 13.7h.01M8.294 13.7h.01M8.294 16.7h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"calendar-check":`<path d="M8 2v3M16 2v3M3.5 9.09h17M22 19c0 .75-.21 1.46-.58 2.06A3.97 3.97 0 0 1 18 23c-1.01 0-1.93-.37-2.63-1-.31-.26-.58-.58-.79-.94A3.92 3.92 0 0 1 14 19c0-2.21 1.79-4 4-4 1.2 0 2.27.53 3 1.36A4 4 0 0 1 22 19Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="m16.44 19 .99.99 2.13-1.97" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 8.5v7.86c-.73-.83-1.8-1.36-3-1.36-2.21 0-4 1.79-4 4 0 .75.21 1.46.58 2.06.21.36.48.68.79.94H8c-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="M11.995 13.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>`,"calendar-tick":`<path d="M8 2v3M16 2v3M3.5 9.09h17M22 19c0 .75-.21 1.46-.58 2.06A3.97 3.97 0 0 1 18 23c-1.01 0-1.93-.37-2.63-1-.31-.26-.58-.58-.79-.94A3.92 3.92 0 0 1 14 19c0-2.21 1.79-4 4-4 1.2 0 2.27.53 3 1.36A4 4 0 0 1 22 19Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="m16.44 19 .99.99 2.13-1.97" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 8.5v7.86c-.73-.83-1.8-1.36-3-1.36-2.21 0-4 1.79-4 4 0 .75.21 1.46.58 2.06.21.36.48.68.79.94H8c-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="M11.995 13.7h.01M8.294 13.7h.01M8.294 16.7h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,camera:`<path d="M6.76 22h10.48c2.76 0 3.86-1.69 3.99-3.75l.52-8.26A3.753 3.753 0 0 0 18 6c-.61 0-1.17-.35-1.45-.89l-.72-1.45C15.37 2.75 14.17 2 13.15 2h-2.29c-1.03 0-2.23.75-2.69 1.66l-.72 1.45C7.17 5.65 6.61 6 6 6 3.83 6 2.11 7.83 2.25 9.99l.52 8.26C2.89 20.31 4 22 6.76 22ZM10.5 8h3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 18c1.79 0 3.25-1.46 3.25-3.25S13.79 11.5 12 11.5s-3.25 1.46-3.25 3.25S10.21 18 12 18Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"cash-stack":`<path d="M19.3 7.92v5.15c0 3.08-1.76 4.4-4.4 4.4H6.11c-.45 0-.88-.04-1.28-.13-.25-.04-.49-.11-.71-.19-1.5-.56-2.41-1.86-2.41-4.08V7.92c0-3.08 1.76-4.4 4.4-4.4h8.79c2.24 0 3.85.95 4.28 3.12.07.4.12.81.12 1.28Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22.301 10.92v5.15c0 3.08-1.76 4.4-4.4 4.4h-8.79c-.74 0-1.41-.1-1.99-.32-1.19-.44-2-1.35-2.29-2.81.4.09.83.13 1.28.13h8.79c2.64 0 4.4-1.32 4.4-4.4V7.92c0-.47-.04-.89-.12-1.28 1.9.4 3.12 1.74 3.12 4.28Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.498 13.14a2.64 2.64 0 1 0 0-5.28 2.64 2.64 0 0 0 0 5.28ZM4.78 8.3v4.4M16.222 8.3v4.4" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></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>`,"chart-column":`<path d="M3 22h18M5.6 8.38H4c-.55 0-1 .45-1 1V18c0 .55.45 1 1 1h1.6c.55 0 1-.45 1-1V9.38c0-.55-.45-1-1-1ZM12.8 5.19h-1.6c-.55 0-1 .45-1 1V18c0 .55.45 1 1 1h1.6c.55 0 1-.45 1-1V6.19c0-.55-.45-1-1-1ZM20 2h-1.6c-.55 0-1 .45-1 1v15c0 .55.45 1 1 1H20c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,chat:`<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>`,"chat-dots":`<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="M7 8h10M7 13h6" 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-check":`<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="m7.75 12 2.83 2.83 5.67-5.66" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"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-left":`<path d="M12.7071 6.70711C13.0976 6.31658 13.0976 5.68342 12.7071 5.29289C12.3166 4.90237 11.6834 4.90237 11.2929 5.29289L5.29289 11.2929C4.91431 11.6715 4.90107 12.2811 5.26285 12.6757L10.7628 18.6757C11.136 19.0828 11.7686 19.1103 12.1757 18.7372C12.5828 18.364 12.6103 17.7314 12.2372 17.3243L7.38414 12.0301L12.7071 6.70711Z" fill="currentColor"/><path opacity="0.3" d="M19.7071 6.70711C20.0976 6.31658 20.0976 5.68342 19.7071 5.29289C19.3166 4.90237 18.6834 4.90237 18.2929 5.29289L12.2929 11.2929C11.9143 11.6715 11.9011 12.2811 12.2628 12.6757L17.7628 18.6757C18.136 19.0828 18.7686 19.1103 19.1757 18.7372C19.5828 18.364 19.6103 17.7314 19.2372 17.3243L14.3841 12.0301L19.7071 6.70711Z" fill="currentColor"/>`,"chevrons-right":`<path d="M11.2929 6.70711C10.9024 6.31658 10.9024 5.68342 11.2929 5.29289C11.6834 4.90237 12.3166 4.90237 12.7071 5.29289L18.7071 11.2929C19.0857 11.6715 19.0989 12.2811 18.7372 12.6757L13.2372 18.6757C12.864 19.0828 12.2314 19.1103 11.8243 18.7372C11.4172 18.364 11.3897 17.7314 11.7628 17.3243L16.6159 12.0301L11.2929 6.70711Z" fill="currentColor"/><path opacity="0.3" d="M4.29289 6.70711C3.90237 6.31658 3.90237 5.68342 4.29289 5.29289C4.68342 4.90237 5.31658 4.90237 5.70711 5.29289L11.7071 11.2929C12.0857 11.6715 12.0989 12.2811 11.7372 12.6757L6.23715 18.6757C5.86396 19.0828 5.23139 19.1103 4.82428 18.7372C4.41716 18.364 4.38965 17.7314 4.76285 17.3243L9.61586 12.0301L4.29289 6.70711Z" fill="currentColor"/>`,"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>`,"circle-help":`<path d="M17 18.43h-4l-4.45 2.96A.997.997 0 0 1 7 20.56v-2.13c-3 0-5-2-5-5v-6c0-3 2-5 5-5h10c3 0 5 2 5 5v6c0 3-2 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 11.36v-.21c0-.68.42-1.04.84-1.33.41-.28.82-.64.82-1.3 0-.92-.74-1.66-1.66-1.66-.92 0-1.66.74-1.66 1.66M11.995 13.75h.01" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"clipboard-check":`<path d="m9.31 14.7 1.5 1.5 4-4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10 6h4c2 0 2-1 2-2 0-2-1-2-2-2h-4C9 2 8 2 8 4s1 2 2 2Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16 4.02c3.33.18 5 1.41 5 5.98v6c0 4-1 6-6 6H9c-5 0-6-2-6-6v-6c0-4.56 1.67-5.8 5-5.98" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"clipboard-text":`<path d="M8 12.2h7M8 16.2h4.38M10 6h4c2 0 2-1 2-2 0-2-1-2-2-2h-4C9 2 8 2 8 4s1 2 2 2Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16 4.02c3.33.18 5 1.41 5 5.98v6c0 4-1 6-6 6H9c-5 0-6-2-6-6v-6c0-4.56 1.67-5.8 5-5.98" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"clipboard-tick":`<path d="m9.31 14.7 1.5 1.5 4-4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10 6h4c2 0 2-1 2-2 0-2-1-2-2-2h-4C9 2 8 2 8 4s1 2 2 2Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16 4.02c3.33.18 5 1.41 5 5.98v6c0 4-1 6-6 6H9c-5 0-6-2-6-6v-6c0-4.56 1.67-5.8 5-5.98" 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>`,"close-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM9.17 14.83l5.66-5.66M14.83 14.83 9.17 9.17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,cloud:`<path d="M7.27 13.01a3.79 3.79 0 0 0-1.72-.41c-4.68.33-4.68 7.14 0 7.47h11.09c1.35.01 2.65-.49 3.64-1.4 3.29-2.87 1.53-8.64-2.8-9.19C15.92.11 2.39 3.67 5.6 12.6" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.85 9.92c.52-.26 1.09-.4 1.67-.41" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" 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>`,"code-circle":`<path d="m8 10-2 2 2 2M16 10l2 2-2 2" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10ZM13 9.67l-2 4.66" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,coins:`<path d="M18.5 12.65v3.7c0 3.12-2.91 5.65-6.5 5.65s-6.5-2.53-6.5-5.65v-3.7C5.5 15.77 8.41 18 12 18s6.5-2.23 6.5-5.35Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.5 7.65c0 .91-.25 1.75-.69 2.47C16.74 11.88 14.54 13 12 13c-2.54 0-4.74-1.12-5.81-2.88-.44-.72-.69-1.56-.69-2.47 0-1.56.73-2.97 1.9-3.99C8.58 2.63 10.2 2 12 2c1.8 0 3.42.63 4.6 1.65 1.17 1.03 1.9 2.44 1.9 4Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.5 7.65v5c0 3.12-2.91 5.35-6.5 5.35s-6.5-2.23-6.5-5.35v-5C5.5 4.53 8.41 2 12 2c1.8 0 3.42.63 4.6 1.65 1.17 1.03 1.9 2.44 1.9 4Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,contact:`<path d="M17 21H7c-4 0-5-1-5-5V8c0-4 1-5 5-5h10c4 0 5 1 5 5v8c0 4-1 5-5 5ZM14 8h5M15 12h4M17 16h2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.5 11.29a1.81 1.81 0 1 0 0-3.62 1.81 1.81 0 0 0 0 3.62ZM12 16.33a3.02 3.02 0 0 0-2.74-2.72 7.72 7.72 0 0 0-1.52 0A3.03 3.03 0 0 0 5 16.33" stroke="currentColor" stroke-width="1.5" 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>`,cpu:`<path d="M9.6 20h4.8c4 0 5.6-1.6 5.6-5.6V9.6c0-4-1.6-5.6-5.6-5.6H9.6C5.6 4 4 5.6 4 9.6v4.8c0 4 1.6 5.6 5.6 5.6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.5 17h3c2.5 0 3.5-1 3.5-3.5v-3C17 8 16 7 13.5 7h-3C8 7 7 8 7 10.5v3C7 16 8 17 10.5 17ZM8.01 4V2M12 4V2M16 4V2M20 8h2M20 12h2M20 16h2M16 20v2M12.01 20v2M8.01 20v2M2 8h2M2 12h2M2 16h2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"credit-card":`<path d="M2 8.505h20M6 16.505h2M10.5 16.505h4" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6.44 3.505h11.11c3.56 0 4.45.88 4.45 4.39v8.21c0 3.51-.89 4.39-4.44 4.39H6.44c-3.55.01-4.44-.87-4.44-4.38v-8.22c0-3.51.89-4.39 4.44-4.39Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,cursor:`<path d="m16.15 12.83-1.73.58c-.48.16-.85.53-1.01 1.01l-.58 1.73c-.49 1.49-2.59 1.46-3.05-.03L7.83 9.84c-.38-1.25.77-2.4 2-2.02l6.29 1.95c1.49.47 1.51 2.57.03 3.06Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></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>`,"diagram-3":`<path d="M5 15V8M5.25 22a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM5 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM19 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM5.13 15a4.058 4.058 0 0 1 3.94-3.04l3.43.01c2.62.01 4.85-1.67 5.67-4.01" stroke="currentColor" stroke-width="1.5" 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>`,"document-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>`,"document-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>`,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>`,"edit-2":`<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>`,"emoji-smile":`<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 9.75a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM8.5 9.75a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM8.4 13.3h7.2c.5 0 .9.4.9.9 0 2.49-2.01 4.5-4.5 4.5s-4.5-2.01-4.5-4.5c0-.5.4-.9.9-.9Z" 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>`,"external-link":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M13 11l8.2-8.2M22 6.8V2h-4.8M11 2H9C4 2 2 4 2 9v6c0 5 2 7 7 7h6c5 0 7-2 7-7v-2"></path>`,eye:`<path d="M15.58 12c0 1.98-1.6 3.58-3.58 3.58S8.42 13.98 8.42 12s1.6-3.58 3.58-3.58 3.58 1.6 3.58 3.58Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 20.27c3.53 0 6.82-2.08 9.11-5.68.9-1.41.9-3.78 0-5.19-2.29-3.6-5.58-5.68-9.11-5.68-3.53 0-6.82 2.08-9.11 5.68-.9 1.41-.9 3.78 0 5.19 2.29 3.6 5.58 5.68 9.11 5.68Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"eye-off":`<path d="m14.53 9.47-5.06 5.06a3.576 3.576 0 1 1 5.06-5.06Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.82 5.77C16.07 4.45 14.07 3.73 12 3.73c-3.53 0-6.82 2.08-9.11 5.68-.9 1.41-.9 3.78 0 5.19.79 1.24 1.71 2.31 2.71 3.17M8.42 19.53c1.14.48 2.35.74 3.58.74 3.53 0 6.82-2.08 9.11-5.68.9-1.41.9-3.78 0-5.19-.33-.52-.69-1.01-1.06-1.47" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.51 12.7a3.565 3.565 0 0 1-2.82 2.82M9.47 14.53 2 22M22 2l-7.47 7.47" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,facebook:`<path d="M14 9.3v2.9h2.6c.2 0 .3.2.3.4l-.4 1.9c0 .1-.2.2-.3.2H14V22h-3v-7.2H9.3c-.2 0-.3-.1-.3-.3v-1.9c0-.2.1-.3.3-.3H11V9c0-1.7 1.3-3 3-3h2.7c.2 0 .3.1.3.3v2.4c0 .2-.1.3-.3.3h-2.4c-.2 0-.3.1-.3.3Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M15 22H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h6c5 0 7 2 7 7v6c0 5-2 7-7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,factory:`<path d="M13 22H5c-2 0-3-1-3-3v-8c0-2 1-3 3-3h5v11c0 2 1 3 3 3ZM10.11 4c-.08.3-.11.63-.11 1v3H5V6c0-1.1.9-2 2-2h3.11ZM14 8v5M18 8v5M17 17h-2c-.55 0-1 .45-1 1v4h4v-4c0-.55-.45-1-1-1ZM6 13v4" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10 19V5c0-2 1-3 3-3h6c2 0 3 1 3 3v14c0 2-1 3-3 3h-6c-2 0-3-1-3-3Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"file-plus-2":`<path d="M9.56 18v-5M12 15.5H7M8 2v3M16 2v3M15.81 3.42c3.34.12 5.03 1.35 5.13 6.05l.13 6.17c.08 4.12-.87 6.19-5.87 6.3l-6 .12c-5 .1-6.04-1.94-6.12-6.05l-.14-6.18c-.1-4.7 1.55-6 4.87-6.25l8-.16Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></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>`,flash:`<path d="M6.09 13.28h3.09v7.2c0 1.68.91 2.02 2.02.76l7.57-8.6c.93-1.05.54-1.92-.87-1.92h-3.09v-7.2c0-1.68-.91-2.02-2.02-.76l-7.57 8.6c-.92 1.06-.53 1.92.87 1.92Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,folder:`<path d="M22 11v6c0 4-1 5-5 5H7c-4 0-5-1-5-5V7c0-4 1-5 5-5h1.5c1.5 0 1.83.44 2.4 1.2l1.5 2c.38.5.6.8 1.6.8h3c4 0 5 1 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path>`,"folder-2":`<path d="M22 11v6c0 4-1 5-5 5H7c-4 0-5-1-5-5V7c0-4 1-5 5-5h1.5c1.5 0 1.83.44 2.4 1.2l1.5 2c.38.5.6.8 1.6.8h3c4 0 5 1 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path><path d="M8 2h9c2 0 3 1 3 3v1.38" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"folder-kanban":`<path d="M10.5 19.9V4.1c0-1.5-.64-2.1-2.23-2.1H4.23C2.64 2 2 2.6 2 4.1v15.8c0 1.5.64 2.1 2.23 2.1h4.04c1.59 0 2.23-.6 2.23-2.1ZM22 12.9V4.1c0-1.5-.64-2.1-2.23-2.1h-4.04c-1.59 0-2.23.6-2.23 2.1v8.8c0 1.5.64 2.1 2.23 2.1h4.04c1.59 0 2.23-.6 2.23-2.1Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"folder-open":`<path d="m21.67 14.3-.4 5c-.15 1.53-.27 2.7-2.98 2.7H5.71C3 22 2.88 20.83 2.73 19.3l-.4-5c-.08-.83.18-1.6.65-2.19l.02-.02C3.55 11.42 4.38 11 5.31 11h13.38c.93 0 1.75.42 2.29 1.07.01.01.02.02.02.03.49.59.76 1.36.67 2.2Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path><path d="M3.5 11.43V6.28c0-3.4.85-4.25 4.25-4.25h1.27c1.27 0 1.56.38 2.04 1.02l1.27 1.7c.32.42.51.68 1.36.68h2.55c3.4 0 4.25.85 4.25 4.25v1.79M9.43 17h5.14" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"folder-plus":`<path d="M12.06 16.5v-5M14.5 14h-5" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 11v6c0 4-1 5-5 5H7c-4 0-5-1-5-5V7c0-4 1-5 5-5h1.5c1.5 0 1.83.44 2.4 1.2l1.5 2c.38.5.6.8 1.6.8h3c4 0 5 1 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></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>`,gift:`<path d="M19.97 10h-16v8c0 3 1 4 4 4h8c3 0 4-1 4-4v-8ZM21.5 7v1c0 1.1-.53 2-2 2h-15c-1.53 0-2-.9-2-2V7c0-1.1.47-2 2-2h15c1.47 0 2 .9 2 2ZM11.64 5H6.12a.936.936 0 0 1 .03-1.3l1.42-1.42a.96.96 0 0 1 1.35 0L11.64 5ZM17.87 5h-5.52l2.72-2.72a.96.96 0 0 1 1.35 0l1.42 1.42c.36.36.37.93.03 1.3Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.94 10v5.14c0 .8.88 1.27 1.55.84l.94-.62a1 1 0 0 1 1.1 0l.89.6a.997.997 0 0 0 1.55-.83V10H8.94Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,globe:`<path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8 3h1a28.424 28.424 0 0 0 0 18H8M15 3a28.424 28.424 0 0 1 0 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 16v-1a28.424 28.424 0 0 0 18 0v1M3 9a28.424 28.424 0 0 1 18 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,globe2:`<path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8 3h1a28.424 28.424 0 0 0 0 18H8M15 3a28.424 28.424 0 0 1 0 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 16v-1a28.424 28.424 0 0 0 18 0v1M3 9a28.424 28.424 0 0 1 18 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,google:`<path d="M21.6 10.2h-9.4v3.7h5.5c-.1.9-.7 2.3-2 3.2-.8.6-2 1-3.5 1-2.6 0-4.9-1.7-5.7-4.2-.2-.6-.3-1.3-.3-2s.1-1.4.3-2c.1-.2.1-.4.2-.5.9-2.1 3-3.6 5.5-3.6 1.9 0 3.1.8 3.9 1.5l2.8-2.8C17.2 3 14.9 2 12.2 2 8.3 2 4.9 4.2 3.3 7.5c-.7 1.4-1.1 2.9-1.1 4.5s.4 3.1 1.1 4.5c1.6 3.3 5 5.5 8.9 5.5 2.7 0 5-.9 6.6-2.4 1.9-1.7 3-4.3 3-7.4 0-.8-.1-1.4-.2-2Z" 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>`,headphone:`<path d="M5.46 18.49v-2.92c0-.97.76-1.84 1.84-1.84.97 0 1.84.76 1.84 1.84v2.81c0 1.95-1.62 3.57-3.57 3.57-1.95 0-3.57-1.63-3.57-3.57v-6.16C1.89 6.6 6.33 2.05 11.95 2.05 17.57 2.05 22 6.6 22 12.11v6.16c0 1.95-1.62 3.57-3.57 3.57-1.95 0-3.57-1.62-3.57-3.57v-2.81c0-.97.76-1.84 1.84-1.84.97 0 1.84.76 1.84 1.84v3.03" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,health:`<path d="M8.97 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7h-6c-5 0-7 2-7 7v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m1.97 12.7 6-.02c.75 0 1.59.57 1.87 1.27l1.14 2.88c.26.65.67.65.93 0l2.29-5.81c.22-.56.63-.58.91-.05l1.04 1.97c.31.59 1.11 1.07 1.77 1.07h4.06" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,heart:`<path d="M12.62 20.81c-.34.12-.9.12-1.24 0C8.48 19.82 2 15.69 2 8.69 2 5.6 4.49 3.1 7.56 3.1c1.82 0 3.43.88 4.44 2.24a5.53 5.53 0 0 1 4.44-2.24C19.51 3.1 22 5.6 22 8.69c0 7-6.48 11.13-9.38 12.12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,hierarchy:`<path d="M5 9v7M5.25 8.5a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM5 22a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM19 22a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.13 9a4.058 4.058 0 0 0 3.94 3.04l3.43-.01a5.989 5.989 0 0 1 5.67 4.01" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,history:`<path d="M20.75 13.25c0 4.83-3.92 8.75-8.75 8.75s-8.75-3.92-8.75-8.75S7.17 4.5 12 4.5s8.75 3.92 8.75 8.75ZM12 8v5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 2h6" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"home-2":`<path d="m9.02 2.84-5.39 4.2C2.73 7.74 2 9.23 2 10.36v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21V10.5c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12ZM12 17.99v-3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,house:`<path d="m9.02 2.84-5.39 4.2C2.73 7.74 2 9.23 2 10.36v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21V10.5c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12ZM12 17.99v-3" 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>`,inbox:`<path d="M12 2v7l2-2M12 9l-2-2M1.98 13h4.41c.38 0 .72.21.89.55l1.17 2.34A2 2 0 0 0 10.24 17h3.53a2 2 0 0 0 1.79-1.11l1.17-2.34a1 1 0 0 1 .89-.55h4.36" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7 4.13c-3.54.52-5 2.6-5 6.87v4c0 5 2 7 7 7h6c5 0 7-2 7-7v-4c0-4.27-1.46-6.35-5-6.87" 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>`,instagram:`<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="M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.636 7h.012" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,kanban:`<path d="M10.5 19.9V4.1c0-1.5-.64-2.1-2.23-2.1H4.23C2.64 2 2 2.6 2 4.1v15.8c0 1.5.64 2.1 2.23 2.1h4.04c1.59 0 2.23-.6 2.23-2.1ZM22 12.9V4.1c0-1.5-.64-2.1-2.23-2.1h-4.04c-1.59 0-2.23.6-2.23 2.1v8.8c0 1.5.64 2.1 2.23 2.1h4.04c1.59 0 2.23-.6 2.23-2.1Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,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>`,layer:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M13.01 2.92l5.9 2.62c1.7.75 1.7 1.99 0 2.74l-5.9 2.62c-.67.3-1.77.3-2.44 0l-5.9-2.62c-1.7-.75-1.7-1.99 0-2.74l5.9-2.62c.67-.3 1.77-.3 2.44 0z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3 11c0 .84.63 1.81 1.4 2.15l6.79 3.02c.52.23 1.11.23 1.62 0l6.79-3.02c.77-.34 1.4-1.31 1.4-2.15"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3 16c0 .93.55 1.77 1.4 2.15l6.79 3.02c.52.23 1.11.23 1.62 0l6.79-3.02c.85-.38 1.4-1.22 1.4-2.15"></path>`,"layout-dashboard":`<path d="M5 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3H5C3 2 2 3 2 5v2c0 2 1 3 3 3ZM17 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM17 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM5 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3H5c-2 0-3 1-3 3v2c0 2 1 3 3 3Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"layout-grid":`<path d="M17 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM5 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3H5c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM6 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM18 22a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,lightbulb:`<path d="M20.78 13.65v4.94H3.22v-4.94c0-4.82 3.9-8.72 8.72-8.72h.12c4.82 0 8.72 3.9 8.72 8.72ZM12 2v2.93M15.65 18.59A3.661 3.661 0 0 1 12 22c-1.93 0-3.52-1.5-3.65-3.41h7.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>`,"lock-1":`<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>`,"log-out":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M17.44 14.62L20 12.06 17.44 9.5M9.76 12.06h10.17M11.76 20c-4.42 0-8-3-8-8s3.58-8 8-8"></path>`,login:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M11.68 14.62l2.56-2.56-2.56-2.56M4 12.06h10.17"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M12 4c4.42 0 8 3 8 8s-3.58 8-8 8"></path>`,logout:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M17.44 14.62L20 12.06 17.44 9.5M9.76 12.06h10.17M11.76 20c-4.42 0-8-3-8-8s3.58-8 8-8"></path>`,mail:`<path d="M17 20.5H7c-3 0-5-1.5-5-5v-7c0-3.5 2-5 5-5h10c3 0 5 1.5 5 5v7c0 3.5-2 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="m17 9-3.13 2.5c-1.03.82-2.72.82-3.75 0L7 9" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"map-pin":`<path d="M12 13.43a3.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"></path><path d="M3.62 8.49c1.97-8.66 14.8-8.65 16.76.01 1.15 5.08-2.01 9.38-4.78 12.04a5.193 5.193 0 0 1-7.21 0c-2.76-2.66-5.92-6.97-4.77-12.05Z" stroke="currentColor" stroke-width="1.5"></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>`,"message-question":`<path d="M17 18.43h-4l-4.45 2.96A.997.997 0 0 1 7 20.56v-2.13c-3 0-5-2-5-5v-6c0-3 2-5 5-5h10c3 0 5 2 5 5v6c0 3-2 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 11.36v-.21c0-.68.42-1.04.84-1.33.41-.28.82-.64.82-1.3 0-.92-.74-1.66-1.66-1.66-.92 0-1.66.74-1.66 1.66M11.995 13.75h.01" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"message-square":`<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>`,"message-text":`<path d="M16 2H8C4 2 2 4 2 8v13c0 .55.45 1 1 1h13c4 0 6-2 6-6V8c0-4-2-6-6-6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7 9.5h10M7 14.5h7" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,minus:`<path d="M6 12h12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,mobile:`<path d="M17 6v10c0 4-1 5-5 5H6c-4 0-5-1-5-5V6c0-4 1-5 5-5h6c4 0 5 1 5 5ZM11 4.5H7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 18.1A1.55 1.55 0 1 0 9 15a1.55 1.55 0 0 0 0 3.1Z" 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>`,"more-horizontal":`<path d="M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM19 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Z" stroke="currentColor" stroke-width="1.5"></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>`,notification:`<path d="M12.02 2.91c-3.31 0-6 2.69-6 6v2.89c0 .61-.26 1.54-.57 2.06L4.3 15.77c-.71 1.18-.22 2.49 1.08 2.93 4.31 1.44 8.96 1.44 13.27 0 1.21-.4 1.74-1.83 1.08-2.93l-1.15-1.91c-.3-.52-.56-1.45-.56-2.06V8.91c0-3.3-2.7-6-6-6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M13.87 3.2a6.754 6.754 0 0 0-3.7 0c.29-.74 1.01-1.26 1.85-1.26.84 0 1.56.52 1.85 1.26Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.02 19.06c0 1.65-1.35 3-3 3-.82 0-1.58-.34-2.12-.88a3.01 3.01 0 0 1-.88-2.12" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path>`,palette:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10 4.5V18c0 1.08-.44 2.07-1.14 2.79l-.04.04c-.09.09-.19.18-.28.25-.3.26-.64.46-.99.6-.11.05-.22.09-.33.13-.39.13-.81.19-1.22.19-.27 0-.54-.03-.8-.08-.13-.03-.26-.06-.39-.1-.16-.05-.31-.1-.46-.17 0-.01 0-.01-.01 0-.28-.14-.55-.3-.8-.49l-.01-.01c-.13-.1-.25-.2-.36-.32-.11-.12-.22-.24-.33-.37-.19-.25-.35-.52-.49-.8.01-.01.01-.01 0-.01 0 0 0-.01-.01-.02-.06-.14-.11-.29-.16-.44a5.58 5.58 0 01-.1-.39c-.05-.26-.08-.53-.08-.8V4.5C2 3 3 2 4.5 2h3C9 2 10 3 10 4.5z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M22 16.5v3c0 1.5-1 2.5-2.5 2.5H6c.41 0 .83-.06 1.22-.19.11-.04.22-.08.33-.13.35-.14.69-.34.99-.6.09-.07.19-.16.28-.25l.04-.04 6.8-6.79h3.84c1.5 0 2.5 1 2.5 2.5zM4.81 21.82c-.6-.18-1.17-.51-1.64-.99-.48-.47-.81-1.04-.99-1.64a4.02 4.02 0 002.63 2.63z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M18.37 11.29L15.66 14l-6.8 6.79C9.56 20.07 10 19.08 10 18V8.34l2.71-2.71c1.06-1.06 2.48-1.06 3.54 0l2.12 2.12c1.06 1.06 1.06 2.48 0 3.54zM6 19a1 1 0 100-2 1 1 0 000 2z"></path>`,"panel-left-close":`<path d="M21.97 15V9c0-5-2-7-7-7h-6c-5 0-7 2-7 7v6c0 5 2 7 7 7h6c5 0 7-2 7-7ZM7.97 2v20" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.97 9.44 12.41 12l2.56 2.56" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"panel-left-open":`<path d="M21.97 15V9c0-5-2-7-7-7h-6c-5 0-7 2-7 7v6c0 5 2 7 7 7h6c5 0 7-2 7-7ZM14.97 2v20" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7.97 9.44 10.53 12l-2.56 2.56" 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>`,"pen-tool":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10.75 22.5h2.52c.96 0 1.58-.68 1.4-1.51l-.41-1.81h-4.5l-.41 1.81c-.18.78.5 1.51 1.4 1.51zM14.26 19.17l1.73-1.54c.97-.86 1.01-1.46.24-2.43l-3.05-3.87c-.64-.81-1.69-.81-2.33 0L7.8 15.2c-.77.97-.77 1.6.24 2.43l1.73 1.54M12.01 11.12v2.53"></path><g><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12.52 5h-1c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h1c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1zM3.27 14.17h1c.55 0 1-.45 1-1v-1c0-.55-.45-1-1-1h-1c-.55 0-1 .45-1 1v1c0 .55.45 1 1 1zM20.73 14.17h-1c-.55 0-1-.45-1-1v-1c0-.55.45-1 1-1h1c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1zM10.52 3.56c-3.81.45-6.77 3.68-6.77 7.61M20.25 11.17c0-3.92-2.94-7.14-6.73-7.61"></path></g>`,pencil:`<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>`,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>`,plug:`<path d="M10.5 16h3c2.5 0 4-1.8 4-4V6.91c0-1.05-.86-1.91-1.91-1.91H8.42c-1.05 0-1.91.86-1.91 1.91V12C6.5 14.2 8 16 10.5 16ZM9.5 2v3M14.5 2v3M12 22v-6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,plus:`<path d="M6 12h12M12 18V6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"plus-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM8 12h8M12 16V8" stroke="currentColor" stroke-width="1.5" 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>`,"profile-circle":`<path d="M12.12 12.78a.963.963 0 0 0-.24 0 3.27 3.27 0 0 1-3.16-3.27c0-1.81 1.46-3.28 3.28-3.28a3.276 3.276 0 0 1 .12 6.55ZM18.74 19.38A9.934 9.934 0 0 1 12 22c-2.6 0-4.96-.99-6.74-2.62.1-.94.7-1.86 1.77-2.58 2.74-1.82 7.22-1.82 9.94 0 1.07.72 1.67 1.64 1.77 2.58Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,ranking:`<path d="m13.3 8.11 1.32 2.64c.18.36.66.72 1.06.78l2.39.4c1.53.26 1.89 1.36.79 2.46L17 16.25c-.31.31-.49.92-.39 1.36l.53 2.31c.42 1.82-.55 2.53-2.16 1.58l-2.24-1.33c-.41-.24-1.07-.24-1.48 0L9.02 21.5c-1.61.95-2.58.24-2.16-1.58l.53-2.31c.1-.43-.08-1.04-.39-1.36l-1.86-1.86c-1.1-1.1-.74-2.21.79-2.46l2.39-.4c.4-.07.88-.42 1.06-.78l1.32-2.64c.71-1.43 1.89-1.43 2.6 0ZM6 9V2M18 9V2M12 4V2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,receipt:`<path d="M6.73 19.7c.82-.88 2.07-.81 2.79.15l1.01 1.35c.81 1.07 2.12 1.07 2.93 0l1.01-1.35c.72-.96 1.97-1.03 2.79-.15 1.78 1.9 3.23 1.27 3.23-1.39V7.04C20.5 3.01 19.56 2 15.78 2H8.22C4.44 2 3.5 3.01 3.5 7.04V18.3c0 2.67 1.46 3.29 3.23 1.4Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.096 11h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.898 11h5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.096 7h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.898 7h5.5" stroke="currentColor" stroke-width="1.5" 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>`,"refresh-cw":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M14.55 21.67C18.84 20.54 22 16.64 22 12c0-5.52-4.44-10-10-10C5.33 2 2 7.56 2 7.56m0 0V3m0 4.56H6.44"></path><path stroke="currentColor" stroke-dasharray="3 3" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M2 12c0 5.52 4.48 10 10 10"></path>`,repeat:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M3.58 5.16h13.84c1.66 0 3 1.34 3 3v3.32"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M6.74 2L3.58 5.16l3.16 3.16M20.42 18.84H6.58c-1.66 0-3-1.34-3-3v-3.32"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M17.26 22l3.16-3.16-3.16-3.16"></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>`,"search-normal":`<path d="M11 20a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM18.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>`,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>`,"setting-2":`<path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M2 12.88v-1.76c0-1.04.85-1.9 1.9-1.9 1.81 0 2.55-1.28 1.64-2.85-.52-.9-.21-2.07.7-2.59l1.73-.99c.79-.47 1.81-.19 2.28.6l.11.19c.9 1.57 2.38 1.57 3.29 0l.11-.19c.47-.79 1.49-1.07 2.28-.6l1.73.99c.91.52 1.22 1.69.7 2.59-.91 1.57-.17 2.85 1.64 2.85 1.04 0 1.9.85 1.9 1.9v1.76c0 1.04-.85 1.9-1.9 1.9-1.81 0-2.55 1.28-1.64 2.85.52.91.21 2.07-.7 2.59l-1.73.99c-.79.47-1.81.19-2.28-.6l-.11-.19c-.9-1.57-2.38-1.57-3.29 0l-.11.19c-.47.79-1.49 1.07-2.28.6l-1.73-.99a1.899 1.899 0 0 1-.7-2.59c.91-1.57.17-2.85-1.64-2.85-1.05 0-1.9-.86-1.9-1.9Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,settings:`<path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M2 12.88v-1.76c0-1.04.85-1.9 1.9-1.9 1.81 0 2.55-1.28 1.64-2.85-.52-.9-.21-2.07.7-2.59l1.73-.99c.79-.47 1.81-.19 2.28.6l.11.19c.9 1.57 2.38 1.57 3.29 0l.11-.19c.47-.79 1.49-1.07 2.28-.6l1.73.99c.91.52 1.22 1.69.7 2.59-.91 1.57-.17 2.85 1.64 2.85 1.04 0 1.9.85 1.9 1.9v1.76c0 1.04-.85 1.9-1.9 1.9-1.81 0-2.55 1.28-1.64 2.85.52.91.21 2.07-.7 2.59l-1.73.99c-.79.47-1.81.19-2.28-.6l-.11-.19c-.9-1.57-2.38-1.57-3.29 0l-.11.19c-.47.79-1.49 1.07-2.28.6l-1.73-.99a1.899 1.899 0 0 1-.7-2.59c.91-1.57.17-2.85-1.64-2.85-1.05 0-1.9-.86-1.9-1.9Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"share-2":`<path d="M16.96 6.17c2 1.39 3.38 3.6 3.66 6.15M3.49 12.37a8.601 8.601 0 0 1 3.6-6.15M8.19 20.94c1.16.59 2.48.92 3.87.92 1.34 0 2.6-.3 3.73-.85M12.06 7.7a2.78 2.78 0 1 0 0-5.56 2.78 2.78 0 0 0 0 5.56ZM4.83 19.92a2.78 2.78 0 1 0 0-5.56 2.78 2.78 0 0 0 0 5.56ZM19.17 19.92a2.78 2.78 0 1 0 0-5.56 2.78 2.78 0 0 0 0 5.56Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,shield:`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"shield-check":`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m9.05 11.87 1.61 1.61 4.3-4.3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"shield-lock":`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 12.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 12.5v3" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"shield-plus":`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 12.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 12.5v3" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"shield-tick":`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m9.05 11.87 1.61 1.61 4.3-4.3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,shop:`<path d="M3.01 11.22v4.49C3.01 20.2 4.81 22 9.3 22h5.39c4.49 0 6.29-1.8 6.29-6.29v-4.49" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 12c1.83 0 3.18-1.49 3-3.32L14.34 2H9.67L9 8.68C8.82 10.51 10.17 12 12 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.31 12c2.02 0 3.5-1.64 3.3-3.65l-.28-2.75C20.97 3 19.97 2 17.35 2H14.3l.7 7.01c.17 1.65 1.66 2.99 3.31 2.99ZM5.64 12c1.65 0 3.14-1.34 3.3-2.99l.22-2.21.48-4.8H6.59C3.97 2 2.97 3 2.61 5.6l-.27 2.75C2.14 10.36 3.62 12 5.64 12ZM12 17c-1.67 0-2.5.83-2.5 2.5V22h5v-2.5c0-1.67-.83-2.5-2.5-2.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,sort:`<path d="M3 7h18M6 12h12M10 17h4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>`,sparkles:`<path d="m17.29 4.14-.07 3.79c-.01.52.32 1.21.74 1.52l2.48 1.88c1.59 1.2 1.33 2.67-.57 3.27l-3.23 1.01c-.54.17-1.11.76-1.25 1.31l-.77 2.94c-.61 2.32-2.13 2.55-3.39.51l-1.76-2.85c-.32-.52-1.08-.91-1.68-.88l-3.34.17c-2.39.12-3.07-1.26-1.51-3.08l1.98-2.3c.37-.43.54-1.23.37-1.77L4.28 6.43c-.59-1.9.47-2.95 2.36-2.33l2.95.97c.5.16 1.25.05 1.67-.26l3.08-2.22c1.66-1.2 2.99-.5 2.95 1.55ZM21.91 22l-3.03-3.03" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,star:`<path d="m13.73 3.51 1.76 3.52c.24.49.88.96 1.42 1.05l3.19.53c2.04.34 2.52 1.82 1.05 3.28l-2.48 2.48c-.42.42-.65 1.23-.52 1.81l.71 3.07c.56 2.43-.73 3.37-2.88 2.1l-2.99-1.77c-.54-.32-1.43-.32-1.98 0l-2.99 1.77c-2.14 1.27-3.44.32-2.88-2.1l.71-3.07c.13-.58-.1-1.39-.52-1.81l-2.48-2.48c-1.46-1.46-.99-2.94 1.05-3.28l3.19-.53c.53-.09 1.17-.56 1.41-1.05l1.76-3.52c.96-1.91 2.52-1.91 3.47 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,stars:`<path d="m17.29 4.14-.07 3.79c-.01.52.32 1.21.74 1.52l2.48 1.88c1.59 1.2 1.33 2.67-.57 3.27l-3.23 1.01c-.54.17-1.11.76-1.25 1.31l-.77 2.94c-.61 2.32-2.13 2.55-3.39.51l-1.76-2.85c-.32-.52-1.08-.91-1.68-.88l-3.34.17c-2.39.12-3.07-1.26-1.51-3.08l1.98-2.3c.37-.43.54-1.23.37-1.77L4.28 6.43c-.59-1.9.47-2.95 2.36-2.33l2.95.97c.5.16 1.25.05 1.67-.26l3.08-2.22c1.66-1.2 2.99-.5 2.95 1.55ZM21.91 22l-3.03-3.03" 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>`,task:`<path d="M11 19.5h10M11 12.5h10M11 5.5h10M3 5.5l1 1 3-3M3 12.5l1 1 3-3M3 19.5l1 1 3-3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"task-square":`<path d="M12.37 8.88h5.25M6.38 8.88l.75.75 2.25-2.25M12.37 15.88h5.25M6.38 15.88l.75.75 2.25-2.25" 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 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,telephone:`<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>`,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>`,"tick-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>`,trash:`<path d="M21 5.98c-3.33-.33-6.68-.5-10.02-.5-1.98 0-3.96.1-5.94.3L3 5.98M8.5 4.97l.22-1.31C8.88 2.71 9 2 10.69 2h2.62c1.69 0 1.82.75 1.97 1.67l.22 1.3M18.85 9.14l-.65 10.07C18.09 20.78 18 22 15.21 22H8.79C6 22 5.91 20.78 5.8 19.21L5.15 9.14M10.33 16.5h3.33M9.5 12.5h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"trash-2":`<path d="M21 5.98c-3.33-.33-6.68-.5-10.02-.5-1.98 0-3.96.1-5.94.3L3 5.98M8.5 4.97l.22-1.31C8.88 2.71 9 2 10.69 2h2.62c1.69 0 1.82.75 1.97 1.67l.22 1.3M18.85 9.14l-.65 10.07C18.09 20.78 18 22 15.21 22H8.79C6 22 5.91 20.78 5.8 19.21L5.15 9.14M10.33 16.5h3.33M9.5 12.5h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"trending-up":`<path d="m16.5 9.5-4.2 4.2-1.6-2.4-3.2 3.2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.5 9.5h2v2" 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 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,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>`,"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>`,upload:`<path d="M9 17v-6l-2 2M9 11l2 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>`,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>`,"user-check":`<path d="m14.44 19.05 1.52 1.52L19 17.53M12.16 10.87c-.1-.01-.22-.01-.33 0a4.42 4.42 0 0 1-4.27-4.43A4.428 4.428 0 0 1 11.99 2c2.45 0 4.44 1.99 4.44 4.44 0 2.4-1.9 4.35-4.27 4.43ZM11.99 21.81c-1.82 0-3.63-.46-5.01-1.38-2.42-1.62-2.42-4.26 0-5.87 2.75-1.84 7.26-1.84 10.01 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"user-edit":`<path d="M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m19.21 15.74-3.54 3.54c-.14.14-.27.4-.3.59l-.19 1.35c-.07.49.27.83.76.76l1.35-.19c.19-.03.46-.16.59-.3l3.54-3.54c.61-.61.9-1.32 0-2.22-.89-.89-1.6-.6-2.21.01Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.7 16.25c.3 1.08 1.14 1.92 2.22 2.22" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.41 22c0-3.87 3.85-7 8.59-7 1.04 0 2.04.15 2.97.43" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"user-minus":`<path d="M19.5 19h-4M12.15 10.87c-.1-.01-.22-.01-.33 0a4.42 4.42 0 0 1-4.27-4.43C7.55 3.99 9.53 2 11.99 2a4.435 4.435 0 0 1 .16 8.87ZM11.99 21.81c-1.82 0-3.63-.46-5.01-1.38-2.42-1.62-2.42-4.26 0-5.87 2.75-1.84 7.26-1.84 10.01 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"user-plus":`<path d="M18.5 19.5h-4M16.5 21.5v-4M12.16 10.87c-.1-.01-.22-.01-.33 0a4.42 4.42 0 0 1-4.27-4.43A4.428 4.428 0 0 1 11.99 2c2.45 0 4.44 1.99 4.44 4.44 0 2.4-1.9 4.35-4.27 4.43ZM11.99 21.81c-1.82 0-3.63-.46-5.01-1.38-2.42-1.62-2.42-4.26 0-5.87 2.75-1.84 7.26-1.84 10.01 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,users:`<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>`,"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>`,"volume-slash":`<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>`,wallet2:`<path d="M13 9H7M22 10.97v2.06c0 .55-.44 1-1 1.02h-1.96c-1.08 0-2.07-.79-2.16-1.87-.06-.63.18-1.22.6-1.63.37-.38.88-.6 1.44-.6H21c.56.02 1 .47 1 1.02Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.48 10.55c-.42.41-.66 1-.6 1.63.09 1.08 1.08 1.87 2.16 1.87H21v1.45c0 3-2 5-5 5H7c-3 0-5-2-5-5v-7c0-2.72 1.64-4.62 4.19-4.94.26-.04.53-.06.81-.06h9c.26 0 .51.01.75.05C19.33 3.85 21 5.76 21 8.5v1.45h-2.08c-.56 0-1.07.22-1.44.6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"wand-sparkles":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3.5 20.5c.83.83 2.17.83 3 0l13-13c.83-.83.83-2.17 0-3-.83-.83-2.17-.83-3 0l-13 13c-.83.83-.83 2.17 0 3zM18.01 8.99l-3-3"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8.5 2.44L10 2l-.44 1.5L10 5l-1.5-.44L7 5l.44-1.5L7 2l1.5.44zM4.5 8.44L6 8l-.44 1.5L6 11l-1.5-.44L3 11l.44-1.5L3 8l1.5.44zM19.5 13.44L21 13l-.44 1.5L21 16l-1.5-.44L18 16l.44-1.5L18 13l1.5.44z"></path>`,"warning-2":`<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>`,whatsapp:`<path d="M6.9 20.6c1.5.9 3.3 1.4 5.1 1.4 5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12c0 1.8.5 3.5 1.3 5l-.86 3.306a1 1 0 0 0 1.243 1.213L6.9 20.6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16.5 14.848c0 .162-.036.329-.113.491a1.856 1.856 0 0 1-.306.459c-.221.243-.464.418-.74.531-.27.113-.563.171-.878.171-.46 0-.951-.108-1.47-.328a7.922 7.922 0 0 1-1.55-.892 12.95 12.95 0 0 1-1.478-1.26 12.79 12.79 0 0 1-1.257-1.471 8.02 8.02 0 0 1-.884-1.534C7.608 10.5 7.5 10.01 7.5 9.543c0-.306.054-.598.162-.868.108-.275.28-.527.519-.752.288-.284.603-.423.937-.423.126 0 .252.027.365.081.117.054.22.135.302.252l1.046 1.472c.08.112.14.216.18.315.04.094.063.189.063.274a.61.61 0 0 1-.095.32 1.53 1.53 0 0 1-.252.319l-.343.356a.24.24 0 0 0-.072.18c0 .035.005.067.014.103.013.036.027.063.036.09.08.149.22.342.419.576.203.234.419.473.653.711.244.239.478.459.717.662.234.197.428.332.581.413l.082.037a.311.311 0 0 0 .112.018.248.248 0 0 0 .185-.077l.342-.338c.113-.112.221-.197.325-.252a.6.6 0 0 1 .32-.094.72.72 0 0 1 .275.059c.099.04.203.098.315.175l1.492 1.058a.683.683 0 0 1 .248.287.921.921 0 0 1 .072.351Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></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"/>`,"x-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM9.17 14.83l5.66-5.66M14.83 14.83 9.17 9.17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,youtube:`<path d="M17 20H7c-3 0-5-2-5-5V9c0-3 2-5 5-5h10c3 0 5 2 5 5v6c0 3-2 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="m11.4 9.5 2.5 1.5c.9.6.9 1.5 0 2.1l-2.5 1.5c-1 .6-1.8.1-1.8-1v-3c0-1.3.8-1.7 1.8-1.1Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,zap:`<path d="M6.09 13.28h3.09v7.2c0 1.68.91 2.02 2.02.76l7.57-8.6c.93-1.05.54-1.92-.87-1.92h-3.09v-7.2c0-1.68-.91-2.02-2.02-.76l-7.57 8.6c-.92 1.06-.53 1.92.87 1.92Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"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>`};Object.keys(bt);function M(e,{size:t=16,className:n=``,style:r=``}={}){let i=bt[e];return i?`<svg class="${n?`wui-icon ${n}`:`wui-icon`}" data-icon="${e}" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" aria-hidden="true" style="vertical-align:-.125em${r?`;${r}`:``}">${i}</svg>`:``}var xt=`Select all rows`,St=`Select row`,N=`wui-select-cell`,Ct=(e,t)=>{let n=e.createElement(`input`);return n.type=`checkbox`,n.className=`wui-check`,n.setAttribute(`aria-label`,t),n};function wt(e=document){let t=e.createElement(`th`);return t.className=N,t.appendChild(Ct(e,xt)),t}function Tt(e=document){let t=e.createElement(`td`);return t.className=N,t.appendChild(Ct(e,St)),t}function Et(e=document){let t=e.createElement(`td`);return t.className=N,t}var Dt=e=>e.firstElementChild?.classList.contains(N),Ot=e=>e.matches(`.wui-group-row, .wui-virtual-spacer`);function kt(e){for(let t of e)!Dt(t)&&!Ot(t)&&t.insertBefore(Tt(t.ownerDocument),t.firstChild)}function At(e){let t=e.querySelector(`thead tr`);if(!t)return null;Dt(t)||t.insertBefore(wt(e.ownerDocument),t.firstChild),kt(e.querySelectorAll(`tbody tr`));for(let t of e.querySelectorAll(`tfoot tr`))Dt(t)||t.insertBefore(Et(e.ownerDocument),t.firstChild);return t.querySelector(`.${N} .wui-check`)}function jt(e){let t=e.querySelector(`thead .${N} .wui-check`),n=[...e.querySelectorAll(`tbody tr .wui-check`)],r=n.length,i=n.filter(e=>e.checked).length;t&&(t.checked=r>0&&i===r,t.indeterminate=i>0&&i<r);for(let t of e.querySelectorAll(`tbody tr`))t.classList.toggle(`is-selected`,!!t.querySelector(`.wui-check`)?.checked);return{selected:i,total:r}}var Mt=`tbody .${N} .wui-check`;function Nt(e,t){let n=null,r=e=>e instanceof Element&&e.matches(`.wui-select-cell .wui-check`)&&!!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=[...e.querySelectorAll(Mt)],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 Pt=Object.freeze([`page`,`pageSize`,`sortBy`,`sortOrder`]),Ft=`search`,It=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`}),Lt=5,Rt=new WeakMap,zt=(e,t)=>{let n=Number(e);return Number.isInteger(n)?n:t},Bt=e=>({total:zt(e.dataset.total,0),page:zt(e.dataset.page,1),pageSize:zt(e.dataset.pageSize,0),sortBy:e.dataset.sortBy||``,sortOrder:e.dataset.sortOrder===`desc`?`desc`:`asc`}),Vt=(e,t)=>{e&&window.WUI?.toast?.(e,{variant:t})};function Ht(e=document){let t=e.querySelectorAll?[...e.querySelectorAll(`[data-wui-server]`)]:[];e instanceof Element&&e.matches(`[data-wui-server]`)&&t.unshift(e);for(let e of t)Rt.has(e)||Rt.set(e,Wt(e))}function Ut(e){let t=e instanceof Element?e.closest(`[data-wui-server]`):null;return t&&Rt.get(t)||null}function Wt(e){let t=e.querySelector(`.table-wrap`),n=t?.querySelector(`:scope > table`),r=e.dataset.src;if(!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=t.querySelector(`:scope > [data-wui-table-state]`),a=e.querySelector(`[data-wui-table-pager]`),o=e.querySelector(`[data-wui-table-status]`),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||It.loading,errorText:e.dataset.errorText||It.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=ln(),m=new AbortController,h={signal:m.signal},g=n.querySelector(`:scope > tbody[data-wui-rows]`);if(!g)throw Error(`A server-paged table needs its rows in <app-table-rows> (tbody[data-wui-rows]).`);let _=Bt(g),v=null,y=null,b=e=>{let t=new URLSearchParams;for(let[n,r]of new URLSearchParams(e))l.has(n)||t.append(n,r);return t},x=e=>b(new URL(e,window.location.href).search),S=e=>{let t=e.toString();return`${window.location.pathname}${t?`?${t}`:``}${window.location.hash}`},ee=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},C=(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},w=C(s.urlState?b(window.location.search):new URLSearchParams,_);s.urlState&&S(w)!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&window.history.replaceState(window.history.state,``,S(w));let T=(e,n)=>t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:n})),E=e=>{o&&(o.textContent=e)},D=e=>{if(e.total===0)return It.empty;let t=e.pageSize>0?Math.max(1,Math.ceil(e.total/e.pageSize)):1;return`Page ${e.page} of ${t}, ${e.total} ${e.total===1?`row`:`rows`}`},O=()=>[...n.querySelectorAll(`:scope > thead > tr:first-child > th`)],te=e=>{if(u&&[...e.querySelectorAll(`:scope > tr`)].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){kt(e);for(let t of e){let e=t.querySelector(`.${N} .wui-check`);e&&(f&&d.add(t.dataset.rowKey),e.checked=d.has(t.dataset.rowKey))}jt(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([...e.querySelectorAll(`:scope > tr`)]),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=e.querySelector(`:scope > template[data-wui-empty]`);oe(i),t.total===0&&n?(i.replaceChildren(n.content.cloneNode(!0)),i.hidden=!1):(i.replaceChildren(),i.hidden=!0)},ce=e=>{let r=Bt(e),i=r.sortBy!==_.sortBy||r.sortOrder!==_.sortOrder?lt(g.rows):null;if(a){let t=e.querySelector(`:scope > template[data-wui-pager]`);oe(a),a.replaceChildren(...t?[t.content.cloneNode(!0)]:[]),a.hidden=!1}se(e,r);let o=e.querySelector(`:scope > template[data-wui-filters]`),c=s.filtersRegion&&o?document.querySelector(s.filtersRegion):null;c&&(oe(c),c.replaceChildren(o.content.cloneNode(!0))),ae(e),oe(g),n.replaceChild(e,g),g=e;let l=f&&r.total!==_.total;_=r,l&&(f=!1),t.removeAttribute(`data-wui-table-error`),ie(e),_e(),ut(e.rows,i),l&&ye()},le=e=>{let t=document.createElement(`template`);t.innerHTML=`<table>${e}</table>`;let n=t.content.querySelector(`tbody[data-wui-rows]`);return n&&te(n),n?document.importNode(n,!0):null},ue=e=>{let t=document.createElement(`tr`);for(let n=0;n<e;n++){let e=document.createElement(`td`),r=document.createElement(`span`);r.className=`skeleton`,r.setAttribute(`aria-hidden`,`true`),r.style.cssText=`display:block;width:${n===0?70:50}%;height:12px;border-radius:6px`,e.append(r),t.append(e)}return t},de=()=>{if(g.querySelector(`:scope > tr:not([data-wui-skeleton])`))return;let e=Math.max(1,O().length);g.replaceChildren(...Array.from({length:Lt},()=>{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`?It.forbidden:e===`network`?It.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=`tbl-empty wui-table-error`,t.setAttribute(`role`,`alert`);let r=document.createElement(`span`);r.className=`tbl-empty-icon`,r.innerHTML=M(e===`forbidden`?`lock`:`alert-circle`,{size:24});let a=document.createElement(`div`);a.className=`tbl-empty-title`,a.textContent=n;let o=document.createElement(`div`);o.className=`tbl-empty-action`;let s=document.createElement(`button`);s.type=`button`,s.className=`btn btn-outline-primary btn-sm`,s.setAttribute(`data-wui-table-retry`,``),s.textContent=It.retry,o.append(s),t.append(r,a,o),oe(i),i.replaceChildren(t),i.hidden=!1}E(n)},k=async(e,t=`none`)=>{let n=new URLSearchParams(e);v={query:n,mode:t},fe(!0),E(s.loadingText),T(`wui:table:loading`,{query:n.toString()});let r=await p.run(ee(n));if(r.kind===`aborted`||r.kind===`stale`||r.kind===`session`)return r;fe(!1);let i=null,a=r.ok?null:r.kind;if(r.ok){try{i=le(r.html)}catch(e){console.error(e)}i||(a=`server`)}return a?(me(a),T(`wui:table:error`,{status:r.status,kind:a,message:pe(a)}),r):(ce(i),w=C(n,_),s.urlState&&t===`push`?window.history.pushState(window.history.state,``,S(w)):s.urlState&&t===`replace`&&window.history.replaceState(window.history.state,``,S(w)),E(D(_)),window.WUI?.refresh?.(),T(`wui:table:loaded`,{..._,query:w.toString()}),r)},he=e=>(e.delete(`page`),e),ge=()=>[...n.querySelectorAll(`:scope > thead th[data-sort-key]`)],_e=()=>{for(let e of ge()){let t=e.dataset.sortKey===_.sortBy;e.setAttribute(`aria-sort`,t?_.sortOrder===`desc`?`descending`:`ascending`:`none`)}};for(let e of ge())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=M(`chevrons-up-down`,{size:14}),t?e.prepend(n):e.append(n)}let ve=e=>{let t=he(new URLSearchParams(w)),n=_.sortBy===e&&_.sortOrder===`asc`?`desc`:`asc`;return t.set(`sortBy`,e),t.set(`sortOrder`,n),k(t,`push`)};n.addEventListener(`click`,e=>{let t=e.target.closest(`th[data-sort-key]`);t&&n.tHead?.contains(t)&&ve(t.dataset.sortKey)}),n.addEventListener(`keydown`,e=>{if(e.key!==`Enter`&&e.key!==` `)return;let t=e.target.closest?.(`th[data-sort-key]`);!t||!n.tHead?.contains(t)||(e.preventDefault(),ve(t.dataset.sortKey))});let ye=()=>{jt(n);let e=f?{selected:_.total,total:_.total,allMatching:f}:{selected:d.size,total:_.total};n.dispatchEvent(new CustomEvent(`selectionchange`,{bubbles:!0,detail:e}))};u&&(Nt(n,(e,t)=>{for(let n of e){let e=n.closest(`tr`)?.dataset.rowKey;e&&(t?d.add(e):d.delete(e))}t||(f=!1)}),n.addEventListener(`change`,e=>{let t=e.target;if(t.matches?.(`.wui-select-cell .wui-check`)){if(t.checked||(f=!1),n.tHead?.contains(t))for(let e of g.querySelectorAll(`:scope > tr`)){let n=e.querySelector(`.${N} .wui-check`);n&&(n.checked=t.checked,t.checked?d.add(e.dataset.rowKey):d.delete(e.dataset.rowKey))}else{let e=t.closest(`tr`)?.dataset.rowKey;if(!e)return;t.checked?d.add(e):d.delete(e)}ye()}})),a&&(a.addEventListener(`click`,e=>{let t=e.target.closest(`a[href]`);!t||e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(e.preventDefault(),k(x(t.getAttribute(`href`)),`push`))}),a.addEventListener(`change`,e=>{!e.target.classList?.contains(`tpg-select`)||!e.target.value||(e.stopPropagation(),k(x(e.target.value),`push`))}));let be=()=>{if(!s.searchInput)return null;let e=document.querySelector(s.searchInput);return e&&(e.matches(`input, textarea`)?e:e.querySelector(`input`))},xe=()=>e.isConnected?!0:(m.abort(),clearTimeout(y),!1),Se=(e,t)=>{let n=t?.name?new FormData(e,t):new FormData(e),r=new Set([...e.querySelectorAll(`[name]`)].map(e=>e.getAttribute(`name`))),i=new URLSearchParams;for(let[e,t]of w)e!==`page`&&(Pt.includes(e)||!r.has(e))&&i.append(e,t);for(let[e,t]of n)typeof t!=`string`||t===``||Pt.includes(e)||l.has(e)||i.append(e,t);let a=be();if(a){i.delete(Ft);let e=a.value.trim();e&&i.set(Ft,e)}return k(i,`push`)},Ce=e=>s.filtersForm&&e.closest?.(s.filtersForm)||s.filtersRegion&&e.closest?.(s.filtersRegion)||null;document.addEventListener(`submit`,e=>{!xe()||!s.filtersForm||!(e.target instanceof HTMLFormElement)||!e.target.matches(s.filtersForm)||(e.preventDefault(),Se(e.target,e.submitter))},h),document.addEventListener(`change`,e=>{if(!xe()||!s.filtersForm)return;let t=e.target.closest?.(s.filtersForm);!t||e.target===be()||Se(t)},h);let we=(e,t)=>{if(!e)return;let n=e=>t.get(e)??``;for(let r of e.querySelectorAll(`input[name]:not([type=hidden])`))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 e.querySelectorAll(`select[name]`))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 t of e.querySelectorAll(`wui-select[name]`))t.value=n(t.getAttribute(`name`));for(let n of e.querySelectorAll(`wui-multiselect[name]`))n.values=t.getAll(n.getAttribute(`name`));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(!xe())return;let t=e.target.closest?.(`a[href]`);if(!t||!Ce(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=he(x(n.href));we(t.closest(`form`),r),k(r,`push`)},h),document.addEventListener(`input`,e=>{if(!xe())return;let t=be();!t||e.target!==t||(clearTimeout(y),y=setTimeout(()=>{let e=he(new URLSearchParams(w)),n=t.value.trim();n?e.set(Ft,n):e.delete(Ft),e.toString()!==w.toString()&&k(e,`replace`)},300))},h),s.urlState&&window.addEventListener(`popstate`,()=>{if(!xe())return;let e=b(window.location.search),t=be();t&&(t.value=e.get(`search`)??``),k(e,`none`)},h),document.addEventListener(`wui:modal:success`,()=>{xe()&&s.refreshOnSuccess&&k(w,`none`)},h),i?.addEventListener(`click`,e=>{e.target.closest(`[data-wui-table-retry]`)&&v&&k(v.query,v.mode)});let Te=e=>[...g.rows].find(t=>t.dataset.rowKey===e)??null,Ee=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=[...t.content.querySelectorAll(`table > tbody > tr[data-row-key]`)];return n.length?n.map(e=>document.importNode(e,!0)):null},De=(e,t,n)=>{let r=n?e[0]:e.find(e=>e.dataset.rowKey===t.dataset.rowKey);if(!r)return null;let i=[];for(let n of e){let e=n===r?t:Te(n.dataset.rowKey);e&&(oe(e),e.replaceWith(n),i.push(n))}return re(i),window.WUI?.refresh?.(),r},Oe=e=>e.message||(e.kind===`forbidden`?It.actionForbidden:It.actionFailed),ke=e=>{e?.isConnected&&e.getAttribute(`data-wui-save-state`)===`saving`&&_t(e,null)},A=e=>{if(e instanceof HTMLTableRowElement)return e;let t=document.createElement(`template`);t.innerHTML=`<table><tbody>${String(e)}</tbody></table>`;let n=t.content.querySelector(`table > tbody > tr`);if(!n)throw Error("saveRow's `row` is the row as it will read: a <tr> element or its HTML.");return document.importNode(n,!0)},Ae=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:Te(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(N)).length,u=o?A(o):c??ue(Math.max(1,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),_t(u,`saving`);let d=gt(u),f=await F(e,{method:n.toUpperCase(),body:r});if(f.kind===`session`)return!1;if(f.ok){let e=Ee(f.html),t=e&&u.isConnected?De(e,u,s):null;return t?E(j.saved(gt(t)||d)):(await k(w,`none`),ke(u)),Xt(f,f.toastVariant||`success`),T(`wui:table:saved`,{key:t?.dataset.rowKey??(s?null:String(a)),added:s,status:f.status}),!0}let p=Oe(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&&_t(m,`error`,p),f.kind!==`aborted`&&Vt(p,`danger`),E(j.notSaved(d,p)),T(`wui:table:failed`,{key:s?null:String(a),added:s,status:f.status,kind:f.kind,message:p}),!1},je=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=e.closest(`tr`),r=n?.dataset.rowKey??null,i=e.dataset.wuiRowAction||``,a=n?gt(n):``;e.disabled=!0,e.setAttribute(`aria-busy`,`true`),n&&_t(n,`saving`);let o=await F(t,{method:(e.dataset.method||`post`).toUpperCase()});if(e.disabled=!1,e.removeAttribute(`aria-busy`),o.kind===`session`||o.kind===`aborted`){ke(n);return}if(o.ok){Xt(o,o.toastVariant||`success`);let e=n?.isConnected?Ee(o.html):null,t=e?De(e,n,!1):null;t?E(j.saved(gt(t)||a)):(await k(w,`none`),ke(n))}else{let e=Oe(o);Vt(e,`danger`),n?.isConnected&&_t(n,`error`,e),E(j.notSaved(a,e))}T(`wui:table:action`,{action:i,key:r,ok:o.ok,status:o.status})};return n.addEventListener(`click`,e=>{let t=e.target.closest(`[data-wui-row-action]`);!t||!g.contains(t)||t.disabled||(e.preventDefault(),je(t))}),te(g),ae(g),u&&At(n),ie(g),_e(),{el:e,reload:()=>k(w,`none`),query:()=>new URLSearchParams(w),setQuery:e=>{let t=new URLSearchParams(w);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`),k(t,`push`)},saveRow:Ae,setActiveRow:t=>{e.dataset.activeRowKey=t==null?``:String(t),ne([...g.querySelectorAll(`:scope > tr`)])},selection:{keys:()=>[...d],count:()=>f?_.total:d.size,allMatching:()=>f,selectAllMatching:()=>{f=!0;for(let e of g.querySelectorAll(`:scope > tr`)){let t=e.querySelector(`.${N} .wui-check`);t&&(t.checked=!0),e.dataset.rowKey&&d.add(e.dataset.rowKey)}ye()},clear:()=>{f=!1,d.clear();for(let e of g.querySelectorAll(`:scope > tr > .${N} .wui-check`))e.checked=!1;ye()}}}}var Gt=8e3,Kt=Object.freeze([`POST`,`PUT`,`PATCH`,`DELETE`]),qt=`That did not work. Try again.`,Jt=e=>(console.warn(`[@webority/ui-elements] X-Wui-Toast-Action: ${e}; the toast shows no action.`),null);function Yt(e){if(e==null||e===``)return null;let t;try{t=JSON.parse(e)}catch{return Jt(`the value is not JSON`)}let n=t?.label,r=t?.url,i=String(t?.method??`POST`).toUpperCase();return typeof n!=`string`||n===``||typeof r!=`string`||r===``?Jt(`label and url must be non-empty strings`):Kt.includes(i)?{label:n,url:r,method:i}:Jt(`method must be one of ${Kt.join(`, `)}`)}function Xt(e,t=`success`){if(!e?.message)return;let n=e.toastAction;if(!n){window.WUI?.toast?.(e.message,{variant:t});return}window.WUI?.toast?.(e.message,{variant:t,duration:Gt,action:{label:n.label,onClick:()=>Zt(n)}})}async function Zt(e){let t=await F(e.url,{method:e.method});if(!(t.kind===`session`||t.kind===`aborted`)){if(t.ok){Xt(t,t.toastVariant||`success`);for(let e of document.querySelectorAll(`[data-wui-server]`))e.dataset.refreshOnSuccess!==`false`&&Ut(e)?.reload();return}window.WUI?.toast?.(t.message||qt,{variant:`danger`})}}var Qt=`wui-csrf`,$t=`RequestVerificationToken`,en=`X-Wui-Request`,P=Object.freeze({fragment:`X-Wui-Fragment`,message:`X-Wui-Message`,redirect:`X-Wui-Redirect`,result:`X-Wui-Result`,keepOpen:`X-Wui-Keep-Open`,toastVariant:`X-Wui-Toast-Variant`,toastAction:`X-Wui-Toast-Action`,data:`X-Wui-Data`,next:`X-Wui-Next`}),tn=Object.freeze([`ok`,`validation`,`forbidden`,`client`,`server`,`network`,`aborted`,`stale`,`session`]),nn=new Set([`GET`,`HEAD`]);function rn(e=document){let t=e.querySelector(`meta[name="${Qt}"]`),n=t?.getAttribute(`content`);return n?{header:t.getAttribute(`data-header`)||`RequestVerificationToken`,token:n}:null}var an=e=>{try{return new URL(e,window.location.href).origin===window.location.origin}catch{return!1}};function on(e){return e>=200&&e<300?`ok`:e===401?`session`:e===403?`forbidden`:e===422?`validation`:e>=400&&e<500?`client`:`server`}var sn=e=>e?.name===`AbortError`,cn=e=>{if(e==null||e===``)return null;try{return JSON.parse(e)}catch{return console.error(`X-Wui-Data is not JSON; it was ignored.`),null}};async function F(e,t={}){let n=(t.method||`GET`).toUpperCase(),r=t.navigate||(e=>window.location.assign(e)),i={Accept:`text/html`,"X-Requested-With":`XMLHttpRequest`,[en]:`1`,...t.headers};if(!nn.has(n)&&an(e)){let e=rn();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(P.message)),redirect:r(P.redirect),result:r(P.result),keepOpen:r(P.keepOpen)===`1`,toastVariant:r(P.toastVariant),toastAction:Yt(r(P.toastAction)),fragment:r(P.fragment)===`1`,data:cn(a(r(P.data))),next:r(P.next)}},s;try{s=await fetch(e,{method:n,body:t.body,headers:i,signal:t.signal,credentials:`same-origin`})}catch(e){return o(sn(e)||t.signal?.aborted?`aborted`:`network`)}let c=on(s.status);if(c===`ok`&&s.redirected&&s.headers.get(P.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(sn(e)||t.signal?.aborted?`aborted`:`network`,s)}return o(c,s,l)}function ln(){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=await F(n,{...r,signal:i.signal});return e===i&&(e=null),a!==t&&s.kind!==`aborted`?{...s,kind:`stale`,ok:!1}:s},abort(){e?.abort(),e=null}}}var un=`wui-remote-modal`,dn=`wui-remote-drawer`,fn=Object.freeze({sm:360,md:480,lg:640}),pn=`wui-modal-fullscreen`,mn=Object.freeze({sm:380,md:440,lg:640,xl:880}),I=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.`}),hn=`a[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,gn=`[aria-invalid="true"], .is-invalid, .input-validation-error`,_n=`.wui-error-summary, [data-wui-form-errors], .validation-summary-errors, [data-valmsg-summary]`,vn=`[data-wui-modal-content]`,yn=`<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>`,bn=new WeakMap,xn=new WeakSet,Sn=()=>Object.assign(Error(`The remote modal load was aborted.`),{name:`AbortError`}),Cn=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},wn=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML};function Tn(e){if(e==null||e===``)return null;if(e===`fullscreen`)return{fullscreen:!0};if(Object.hasOwn(mn,e))return{px:mn[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 En=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:mn.md}},Dn=(e,t)=>{e.classList.toggle(pn,!!t.fullscreen),t.fullscreen?e.style.removeProperty(`--wui-modal-max-width`):e.style.setProperty(`--wui-modal-max-width`,`${t.px}px`)},On=[`center`,`top`];function kn(e){if(Object.hasOwn(fn,e??``))return{px:fn[e]};let t=Tn(e);if(t?.fullscreen||e===`xl`)throw TypeError(`Unsupported drawer size "${String(e)}". Use sm, md, lg or a px number.`);return t}var An=e=>e.container===`drawer`,jn=(e,t)=>An(e)?kn(t):Tn(t);function Mn(e=`modal`){let t=e===`drawer`,n=t?dn:un,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?fn.md:mn.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 Nn=e=>`<div class="wui-modal-header"><div class="wui-modal-heading"><div class="wui-modal-headtext"><div class="wui-modal-title">${wn(e)}</div></div></div>${yn}</div>`,Pn=e=>`<div class="modal-content wui-modal" aria-busy="true">${Nn(e)}<div class="wui-modal-body"><div class="wui-modal-loading" role="status"><span class="visually-hidden">${wn(I.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>`,Fn=(e,t)=>`<div class="modal-content wui-modal" data-wui-modal-error="${wn(t)}">${Nn(e)}<div class="wui-modal-body"><div class="wui-modal-state" role="alert"><p class="wui-modal-state-title">${wn(I.errorTitle)}</p><p class="wui-modal-state-text">${wn(I[t]||I.server)}</p><div class="wui-modal-state-actions"><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">${wn(I.close)}</button><button type="button" class="btn btn-primary" data-wui-modal-retry>${wn(I.retry)}</button></div></div></div></div>`,In=e=>{let t=document.createElement(`template`);return t.innerHTML=e,t.content.querySelector(`.modal-content`)},Ln=e=>e.shell.querySelector(`.modal-content`);function Rn(e){if(!e)return;e.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0}));let t=window.bootstrap,n=[t?.Tooltip,t?.Popover,t?.Dropdown].filter(e=>e?.getInstance);for(let t of[e,...e.querySelectorAll(`*`)])for(let e of n)e.getInstance(t)?.dispose()}function zn(e,t){let n=Ln(e);Rn(n),n?n.replaceWith(t):e.shell.querySelector(`.modal-dialog`).appendChild(t),window.WUI?.refresh?.()}var Bn=e=>e.shell.classList.contains(`show`);function Vn(e,t){let n=t&&e.querySelector(gn),r=n?n.matches(hn)?n:n.querySelector(hn)||n:null;if(!r){let t=[...e.querySelectorAll(hn)];r=e.querySelector(`[data-autofocus]`)||t.find(e=>!e.classList.contains(`wui-modal-close`))||t[0]||e}r.focus?.()}function Hn(e,t){let n=e.shell.querySelector(`[data-wui-modal-live]`);n||(n=document.createElement(`div`),n.className=`visually-hidden`,n.setAttribute(`aria-live`,`assertive`),n.setAttribute(`data-wui-modal-live`,``),e.shell.querySelector(`.modal-dialog`).appendChild(n)),n.textContent=``,n.textContent=t}var Un=e=>{let t=e.shell.querySelector(`[data-wui-modal-live]`);t&&(t.textContent=``)},Wn=(e,t,n)=>e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}));function Gn(e,t,n,r){let i={...r,container:e.container};Wn(t,`wui:modal:${n}`,i),An(e)&&Wn(t,`wui:drawer:${n}`,i)}function Kn(e){let t=bn.get(e);return t||(t={shell:e,container:e.classList.contains(`wui-remote-drawer`)?`drawer`:`modal`,queue:ln(),defaultSize:En(e),defaultLabel:e.getAttribute(`aria-label`),placeholder:Ln({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},bn.set(e,t),e.addEventListener(`submit`,e=>ar(t,e)),e.addEventListener(`click`,e=>{!e.target.closest?.(`[data-wui-modal-retry]`)||!t.session||(e.preventDefault(),Qn(t,t.session))}),e.addEventListener(`hidden.bs.modal`,n=>{n.target===e&&Yn(t)}),e.addEventListener(`shown.bs.modal`,n=>{let r=Ln(t);n.target===e&&t.session&&r?.matches(vn)&&!r.contains(document.activeElement)&&Vn(r,!1)}),t.remoteUrl&&e.addEventListener(`show.bs.modal`,n=>{n.target===e&&Xn(t,n)}),t)}function qn(e,t,n){e.session&&(e.queue.abort(),e.session.resolveClosed({status:`dismissed`,detail:{replaced:!0}}));let r,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:null};return a.handle={el:e.shell,closed:i,close:()=>Jn(e,a,`dismissed`,null),reload:()=>Qn(e,a)},e.session=a,a}function Jn(e,t,n,r){e.session===t&&(t.closing={status:n,detail:r},window.bootstrap?.Modal?.getOrCreateInstance(e.shell).hide())}function Yn(e){let t=e.session;if(e.queue.abort(),e.session=null,Un(e),t){let{status:n,detail:r}=t.closing||{status:`dismissed`,detail:null};t.resolveClosed({status:n,detail:r}),Gn(e,e.shell,`closed`,{status:n,url:t.url});let i=document.activeElement;t.trigger?.isConnected&&(!i||i===document.body||e.shell.contains(i))&&t.trigger.focus?.()}e.cache||(zn(e,In(e.placeholder)),e.loadedUrl=null,Dn(e.shell,e.defaultSize),e.defaultLabel?e.shell.setAttribute(`aria-label`,e.defaultLabel):e.shell.removeAttribute(`aria-label`))}function Xn(e,t){let n=t.relatedTarget instanceof Element?t.relatedTarget:null,r=n?.getAttribute(`data-wui-url`)||e.remoteUrl,i=qn(e,r,{trigger:n});i.explicitSize=Zn(e,n?.getAttribute(`data-wui-size`)),i.explicitSize&&Dn(e.shell,i.explicitSize),!(e.cache&&e.loadedUrl===r)&&(e.loadedUrl&&zn(e,In(e.placeholder)),Qn(e,i,{keepPlaceholder:!0}))}function Zn(e,t){try{return jn(e,t)}catch(e){return console.error(e),null}}async function Qn(e,t,{keepPlaceholder:n=!1}={}){n||zn(e,In(Pn(t.options.title||$n(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`)&&er(e,t,r.html,!1))return e.loadedUrl=t.url,Gn(e,e.shell,`loaded`,{url:t.url,handle:t.handle}),`loaded`;let i=r.kind===`ok`||r.kind===`validation`?`server`:r.kind;return zn(e,In(Fn(t.options.title||$n(e),i))),Bn(e)&&Vn(Ln(e),!1),Gn(e,e.shell,`error`,{url:t.url,kind:i,status:r.status}),`error`}var $n=e=>Ln(e)?.querySelector(`.wui-modal-title`)?.textContent||e.shell.getAttribute(`aria-label`)||``;function er(e,t,n,r){let i=document.createElement(`template`);i.innerHTML=n;let a=i.content.querySelectorAll(`script`);if(a.length){console.warn(`WUI.modal: ${t.url} returned a fragment with script; it was removed. Keep page behaviour in the page.`);for(let e of a)e.remove()}let o=i.content.querySelector(vn);if(!o)return console.error(`WUI.modal: ${t.url} did not answer with an <app-modal-content> fragment.`),!1;zn(e,o),r||Un(e),Dn(e.shell,t.explicitSize||Zn(e,o.getAttribute(`data-wui-size`))||e.defaultSize);let s=o.getAttribute(`data-wui-title`);return s&&e.shell.setAttribute(`aria-label`,s),Bn(e)&&Vn(o,r),!0}var tr=`button[type="submit"], button:not([type]), input[type="submit"], input[type="image"]`;function nr(e,t,n){let r=[...e.elements].filter(e=>e.matches(tr));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>`));return}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 rr(e,t,n){let r=t.closest(`.wui-modal-body`)||t;r.querySelector(`[data-wui-modal-submit-error]`)?.remove();let i=document.createElement(`div`);i.className=`alert alert-danger wui-modal-submit-error`,i.setAttribute(`role`,`alert`),i.setAttribute(`data-wui-modal-submit-error`,``),i.textContent=`${I.submitFailed} ${I[n]||I.server}`,r.prepend(i),Hn(e,i.textContent)}var ir=(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 ar(e,t){let n=t.target,r=e.session;if(!(n instanceof HTMLFormElement)||!r||n.hasAttribute(`data-wui-native`)||!n.closest(vn)||(t.preventDefault(),n.hasAttribute(`data-wui-submitting`)))return;let i=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`;nr(n,i,!0);let l=await e.queue.run(c?ir(a,s):a,{method:o,body:c?void 0:s,navigate:r.options.navigate});if(e.session===r){if(n.isConnected&&nr(n,i,!1),l.kind===`ok`&&l.result===`success`){or(e,r,l);return}if(!(l.kind===`aborted`||l.kind===`stale`||l.kind===`session`)){if(l.kind===`validation`&&er(e,r,l.html,!0)){let t=Ln(e).querySelector(_n)?.textContent.replace(/\s+/g,` `).trim();Hn(e,t||I.invalid);return}l.kind===`ok`&&l.html&&er(e,r,l.html,!1)||rr(e,n,l.kind===`ok`||l.kind===`validation`?`server`:l.kind)}}}function or(e,t,n){let r=n.message,i=n.redirect||null,a={url:t.url,trigger:t.trigger,handle:t.handle,message:r,redirect:i,data:n.data??null,container:e.container};if(r&&window.WUI?.toast?.(r,{variant:`success`}),Gn(e,t.trigger?.isConnected?t.trigger:document,`success`,a),t.options.onSuccess?.(a,t.handle),i&&(t.options.navigate||(e=>window.location.assign(e)))(i),n.next&&!i){t.url=n.next,t.method=`GET`,t.body=void 0,Qn(e,t);return}if(n.keepOpen){n.html&&er(e,t,n.html,!1);return}Jn(e,t,`success`,a)}function sr(e){let t=e.target.closest?.(`[data-wui-modal], [data-wui-drawer]`);if(t&&!(t.matches(`a[href]`)&&(e.ctrlKey||e.metaKey||e.shiftKey||e.button!==0))){if(e.preventDefault(),!t.hasAttribute(`data-wui-modal`)){ur(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=>{e?.name!==`AbortError`&&console.error(e)});return}lr(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=>{e?.name!==`AbortError`&&console.error(e)})}}function cr(e=document){let t=e.ownerDocument||e;xn.has(t)||(xn.add(t),t.addEventListener(`click`,sr));let n=[...e.querySelectorAll?.(`.modal[data-wui-remote-url]`)||[]];e.matches?.(`.modal[data-wui-remote-url]`)&&n.unshift(e);for(let e of n)Kn(e)}function lr(e,t={}){try{if(!e)throw TypeError(`WUI.modal.load: a fragment url is required.`);let n=Cn(e),r=t.container===`drawer`,i=r?kn(t.size):Tn(t.size),a=t.placement||`center`;if(!On.includes(a))throw TypeError(`WUI.modal.load: unsupported placement "${a}". Use center or top.`);if(t.signal?.aborted)return Promise.reject(Sn());let o=Mn(r?`drawer`:`modal`);cr(document);let s=Kn(o),c=Bn(s),l=qn(s,e,t);l.explicitSize=i,Dn(o,i||s.defaultSize),r||o.querySelector(`.modal-dialog`).classList.toggle(`modal-dialog-centered`,a===`center`),t.title&&o.setAttribute(`aria-label`,t.title),c||(n.getInstance(o)?.dispose(),n.getOrCreateInstance(o,{backdrop:!t.staticBackdrop||`static`,keyboard:!t.staticBackdrop}));let u=c?Promise.resolve():new Promise(e=>o.addEventListener(`shown.bs.modal`,()=>e(),{once:!0})),d=Qn(s,l);c||n.getOrCreateInstance(o).show();let f=new Promise((e,n)=>{t.signal?.addEventListener(`abort`,()=>{s.session===l&&(s.queue.abort(),Jn(s,l,`dismissed`,{aborted:!0})),n(Sn())},{once:!0})}),p=Promise.all([u,d]).then(([,t])=>{if(t===`aborted`)throw Sn();if(t===`session`)throw Error(`WUI.modal.load(${e}): the session expired; the browser is signing in again.`);return l.handle});return Promise.race([p,f])}catch(e){return Promise.reject(e)}}function ur(e,t={}){return lr(e,{...t,container:`drawer`,placement:void 0})}var dr=Object.freeze([`neutral`,`primary`,`info`,`success`,`warning`,`danger`]),fr=Object.freeze([`number`,`currency`,`compact`]),pr=`wui-kanban:`,mr=`(max-width: 767.98px)`,hr=400,gr=6,L=Object.freeze({help:`Press Space to pick up the card. Use the Left and Right arrow keys to choose a column, then Space to drop it, or Escape to cancel.`,empty:`Nothing here`,collapse:e=>`Collapse ${e}`,expand:e=>`Expand ${e}`,lifted:(e,t)=>`Picked up ${e} in ${t}. Use the Left and Right arrow keys to choose a column.`,over:(e,t)=>`${e}, ${t===1?`1 card`:`${t} cards`}. Drop allowed.`,overSource:e=>`${e}, where the card started.`,overRefused:(e,t)=>`${e}. ${t}`,dropHere:(e,t)=>`Drop here to move ${e} to ${t}.`,refused:(e,t)=>`Cards in ${e} cannot move to ${t}.`,moved:(e,t)=>`Moved ${e} to ${t}.`,saving:(e,t)=>`Moving ${e} to ${t}.`,cancelled:e=>`${e} was not moved.`,rolledBack:(e,t)=>`${e} went back to ${t}.`,locked:e=>`${e} cannot be moved.`,more:e=>`Show ${e} more`,fewer:`Show fewer`,swipeHint:`Swipe sideways or tap a column`,busy:`This card is still saving. Try again in a moment.`,failed:Object.freeze({forbidden:`You do not have permission to move this card.`,client:`This card could not be moved. Refresh the board and try again.`,validation:`This card could not be moved. Refresh the board and try again.`,server:`Something went wrong on our side, so the card went back. Try again in a moment.`,network:`Could not reach the server, so the card went back. Check your connection and try again.`})}),_r=`[data-wui-column]`,vr=`[data-wui-body]`,yr=`[data-wui-card]`,br=`[data-wui-count]`,xr=`[data-wui-summary]`,Sr=`[data-wui-empty]`,Cr=`[data-wui-drop-note]`,wr=`[data-wui-live]`,Tr=`[data-wui-help]`,Er=`[data-wui-switch]`,Dr=`[data-wui-scroller]`,Or=`[data-wui-collapse]`,kr=`[data-wui-more]`,Ar=`data-wui-visible-limit`,jr=`data-wui-overflow`,Mr=`input, select, textarea, [contenteditable=""], [contenteditable="true"], [data-wui-no-drag]`,Nr=48,Pr=16,R=e=>e.getAttribute(`data-wui-column`),Fr=e=>e.getAttribute(`data-wui-card`),Ir=e=>e.hidden||e.hasAttribute(`hidden`),Lr=e=>Ir(e)||e.hasAttribute(jr);function Rr(e){if(e==null||e===``)return null;let t=typeof e==`number`?e:Number(e);if(!Number.isInteger(t)||t<1)throw TypeError(`Unsupported kanban visible limit "${String(e)}". Use a whole number of 1 or more.`);return t}function zr(e,t,n,r){let i=new Set;if(t==null||n)return i;let a=0;for(let n of e)r.has(n)||(a<t?a++:i.add(n));return i}function z(e){let t=(e.getAttribute(`aria-label`)||e.textContent||``).replace(/\s+/g,` `).trim();return t.length>80?`${t.slice(0,79)}…`:t||Fr(e)||`Card`}function Br(e){return e?`${pr}${e}`:null}function Vr(e,t=globalThis.localStorage){let n=Br(e);if(!n||!t)return{};try{let e=JSON.parse(t.getItem(n)||`null`);return e&&typeof e.collapsed==`object`&&e.collapsed?e.collapsed:{}}catch{return{}}}function Hr(e,t,n,r=globalThis.localStorage){let i=Br(e);if(!i||!r)return;let a={...Vr(e,r),[t]:!!n};try{r.setItem(i,JSON.stringify({collapsed:a}))}catch{}}function Ur(e,t){if(!fr.includes(e))throw TypeError(`Unsupported kanban summary format "${String(e)}". Use ${fr.join(`, `)}.`);if(t!=null&&t!==``&&!pe.includes(t))throw TypeError(`Unsupported kanban summary unit "${String(t)}". Use ${pe.join(`, `)}.`);return e===`currency`?{style:`currency`,unit:t||`rupees`}:e===`compact`?{style:`compact`,currency:fe[0],unit:t||`rupees`}:{style:`number`,decimals:0}}function Wr(e){let t=0;for(let n of e){if(n==null||n===``)continue;let e=typeof n==`number`?n:Number(n);Number.isFinite(e)&&(t+=e)}return t}var Gr=(e,t)=>{e&&window.WUI?.toast?.(e,{variant:t})},Kr=class extends c{constructor(){super(),this._wired=!1,this._filter=null,this._expanded=new Set,this._revealed=new Set,this._press=null,this._drag=null,this._kbd=null,this._suppressClick=!1,this._observer=null,this._refreshQueued=!1,this._scrollTimer=0,this._onPointerMove=e=>this._pointerMove(e),this._onPointerUp=e=>this._pointerUp(e),this._onPointerCancel=()=>this._endPointer(!1),this._onDocKeyDown=e=>{e.key===`Escape`&&this._drag&&(e.preventDefault(),this._endPointer(!1))},this._onScroll=()=>{clearTimeout(this._scrollTimer),this._scrollTimer=setTimeout(()=>this._syncSwitcherFromScroll(),80)}}_controlled(){return this.hasAttribute(`controlled`)}connectedCallback(){if(!this._wired){this._wired=!0,this.addEventListener(`pointerdown`,e=>this._pointerDown(e)),this.addEventListener(`keydown`,e=>this._keyDown(e)),this.addEventListener(`click`,e=>this._click(e),!0),this.addEventListener(`dragstart`,e=>{e.target.closest?.(yr)&&e.preventDefault()}),this.addEventListener(`touchmove`,e=>{this._drag&&e.preventDefault()},{passive:!1}),this._scroller()?.addEventListener(`scroll`,this._onScroll,{passive:!0}),this._restoreCollapsed();for(let e of this._allCards())this._prepareCard(e);if(typeof MutationObserver==`function`){this._observer=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e.nodeType===1&&e.matches(yr)&&this._prepareCard(e);this._queueRefresh()});for(let e of this.querySelectorAll(vr))this._observer.observe(e,{childList:!0})}this.refresh()}}disconnectedCallback(){this._endPointer(!1),this._observer?.disconnect(),this._observer=null,this._scroller()?.removeEventListener(`scroll`,this._onScroll),clearTimeout(this._scrollTimer),this._wired=!1}setFilter(e){if(e!=null&&typeof e!=`function`)throw TypeError(`wui-kanban setFilter: pass a function or null.`);if(this._filter=e,!e)for(let e of this._allCards())e.hidden=!1;this.refresh()}refresh(){if(this._controlled())return;this._refreshQueued=!1;let e=this._summaryFormat();for(let t of this._columns()){let n=R(t),r=Rr(t.getAttribute(Ar)),i=[],a=[];for(let e of this._cardsIn(t)){if(this._filter&&(e.hidden=this._filter(e)===!1),Ir(e)){e.removeAttribute(jr);continue}i.push(e),a.push(e.getAttribute(`data-wui-value`))}let o=this._expanded.has(n),s=zr(i.map(Fr),r,o,this._revealed);for(let e of i)e.toggleAttribute(jr,s.has(Fr(e)));let c=String(i.length);for(let e of this._countsOf(t))e.textContent!==c&&(e.textContent=c);let l=t.querySelector(Sr);if(l&&(l.hidden=i.length>0),e){let n=t.querySelector(xr);n&&(n.textContent=Re(Wr(a),e))}let u=t.querySelector(kr);if(u){u.hidden=r==null||(o?i.length<=r:s.size===0),u.setAttribute(`aria-expanded`,o?`true`:`false`);let e=o?L.fewer:L.more(s.size);u.textContent!==e&&(u.textContent=e)}}}moveCard(e,t,n){let r=this._cardByKey(e);if(!r)throw Error(`wui-kanban moveCard: no card "${String(e)}" on this board.`);if(!this._columnByKey(t))throw Error(`wui-kanban moveCard: no column "${String(t)}" on this board.`);return this._commit(r,t,n)}_columns(){return[...this.querySelectorAll(_r)]}_columnByKey(e){return this._columns().find(t=>R(t)===e)||null}_columnOf(e){return e.closest(_r)}_titleOf(e){return(e.querySelector(`.wui-kanban-title`)?.textContent||R(e)||``).replace(/\s+/g,` `).trim()}_bodyOf(e){return e.querySelector(vr)}_cardsIn(e){let t=this._bodyOf(e);return t?[...t.children].filter(e=>e.matches(yr)):[]}_visibleCardsIn(e){return this._cardsIn(e).filter(e=>!Lr(e))}_allCards(){return[...this.querySelectorAll(`${vr} > ${yr}`)]}_cardByKey(e){return this._allCards().find(t=>Fr(t)===e)||null}_countsOf(e){let t=R(e),n=[...this.querySelectorAll(Er)].filter(e=>e.getAttribute(`data-wui-switch`)===t);return[...e.querySelectorAll(br),...n.flatMap(e=>[...e.querySelectorAll(br)])]}_scroller(){return this.querySelector(Dr)}_summaryFormat(){let e=this.getAttribute(`summary-format`);return e?Ur(e,this.getAttribute(`summary-unit`)):null}_queueRefresh(){this._refreshQueued||(this._refreshQueued=!0,queueMicrotask(()=>{this._refreshQueued&&this.refresh()}))}_prepareCard(e){let t=this.querySelector(Tr);t?.id&&!e.hasAttribute(`aria-describedby`)&&e.setAttribute(`aria-describedby`,t.id),e.hasAttribute(`tabindex`)||(e.tabIndex=0)}_announce(e){let t=this.querySelector(wr);!t||!e||(t.textContent=``,t.textContent=e)}_fire(e,t,n=!1){return this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:n,detail:t}))}_canLift(e){let t=z(e),n=this.hasAttribute(`readonly`);return n||e.hasAttribute(`data-wui-locked`)?(this._announce(L.locked(t)),this._fire(`wui:kanban:locked`,{key:Fr(e),card:e,reason:n?`readonly`:`locked`},!0),!1):e.getAttribute(`aria-busy`)===`true`?(this._announce(L.busy),Gr(L.busy,`info`),!1):!0}_check(e,t,n){if(t===n)return{ok:!1,source:!0,reason:null};let r=this._columnByKey(t),i=this._columnByKey(n),a=L.refused(r?this._titleOf(r):t,i?this._titleOf(i):n),o=i?.getAttribute(`data-accept-from`);if(o!=null&&!o.split(/\s+/).filter(Boolean).includes(t))return{ok:!1,reason:a};if(typeof this.accept==`function`){let r=this.accept(e,t,n);if(r===!1)return{ok:!1,reason:a};if(typeof r==`string`&&r)return{ok:!1,reason:r}}return{ok:!0,reason:null}}_markTargets(e,t){let n=z(e),r=new Map;for(let i of this._columns()){let a=R(i),o=this._check(e,t,a);r.set(a,o),i.setAttribute(`data-wui-drop`,o.source?`source`:o.ok?`ok`:`refused`);let s=i.querySelector(Cr);s&&!o.source&&(s.textContent=o.ok?L.dropHere(n,this._titleOf(i)):o.reason,s.hidden=!1)}return r}_clearTargets(){for(let e of this._columns()){e.removeAttribute(`data-wui-drop`),e.removeAttribute(`data-wui-over`),e.removeAttribute(`data-wui-target`);let t=e.querySelector(Cr);t&&(t.hidden=!0,t.textContent=``)}}async _commit(e,t,n){let r=this._columnOf(e),i=R(r),a=this._columnByKey(t),o=z(e);if(i===t||!this._canLift(e))return!1;let s=this._check(e,i,t);if(!s.ok)return this._announce(s.reason),Gr(s.reason,`info`),!1;let c=this._cardsIn(a),l=Number.isInteger(n)?Math.max(0,Math.min(n,c.length)):c.length,u={key:Fr(e),card:e,from:i,to:t,index:l},d=e.contains(document.activeElement);if(this._controlled())return this._fire(`wui:kanban:move`,u),this._announce(L.moved(o,this._titleOf(a))),d&&this._refocusSoon(u.key),!0;if(!this._fire(`wui:kanban:move`,u,!0))return!1;let f=a.hasAttribute(Ar)&&!this._revealed.has(u.key);f&&this._revealed.add(u.key);let p={parent:e.parentNode,next:e.nextSibling,column:r,revealed:f};this._bodyOf(a).insertBefore(e,c[l]||null),d&&this._focusMoved(e),this.refresh();let m=a.getAttribute(`data-wui-step`);if(m)return this._runStep(e,u,p,m,a.getAttribute(`data-wui-step-size`));let h=this.getAttribute(`move-url`);if(!h)return this._announce(L.moved(o,this._titleOf(a))),this._fire(`wui:kanban:moved`,{...u,result:null}),!0;this._lock(e,!0),this._announce(L.saving(o,this._titleOf(a)));let g=await F(h,{method:`POST`,body:new URLSearchParams({card:u.key,from:i,to:t,index:String(l)})});if(this._lock(e,!1),g.kind===`session`)return!1;if(g.ok){let t=this._applyFragment(g.html)||e;return Gr(g.message,`success`),this._announce(L.moved(z(t),this._titleOf(a))),this._fire(`wui:kanban:moved`,{...u,card:t,result:g}),!0}return this._rollback(e,p),g.kind!==`aborted`&&Gr(g.message||L.failed[g.kind]||L.failed.server,`danger`),this._fire(`wui:kanban:failed`,{...u,kind:g.kind,status:g.status,message:g.message}),!1}async _runStep(e,t,n,r,i){let a=z(e),o=this._columnByKey(t.to),s=new URLSearchParams({card:t.key,from:t.from,to:t.to}).toString(),c=r+(r.includes(`?`)?`&`:`?`)+s;this._lock(e,!0);let l;try{l=await(await lr(c,{trigger:e,size:i||void 0})).closed}catch(r){return this._lock(e,!1),this._rollback(e,n),r?.name!==`AbortError`&&Gr(L.failed.server,`danger`),this._fire(`wui:kanban:failed`,{...t,kind:`step`,status:0,message:r?.message??null}),!1}if(l?.status!==`success`)return this._lock(e,!1),this._rollback(e,n),this._announce(L.cancelled(a)),this._fire(`wui:kanban:failed`,{...t,kind:`dismissed`,status:0,message:null}),!1;let u=e,d=this.getAttribute(`card-url`);if(d){let n=await F(`${d}${d.includes(`?`)?`&`:`?`}${new URLSearchParams({card:t.key})}`);n.ok&&(u=this._applyFragment(n.html)||e)}return this._lock(u,!1),this._announce(L.moved(z(u),this._titleOf(o))),this._fire(`wui:kanban:moved`,{...t,card:u,result:l}),!0}_lock(e,t){t?(e.setAttribute(`aria-busy`,`true`),e.setAttribute(`data-wui-saving`,``)):(e.removeAttribute(`aria-busy`),e.removeAttribute(`data-wui-saving`))}_rollback(e,t){let n=e.contains(document.activeElement),r=t.next&&t.next.parentNode===t.parent?t.next:null;t.revealed&&this._revealed.delete(Fr(e)),t.parent.insertBefore(e,r),n&&e.focus(),this.refresh(),this._announce(L.rolledBack(z(e),this._titleOf(t.column)))}_applyFragment(e){if(!e)return null;let t=document.createElement(`template`);t.innerHTML=e;for(let e of t.content.querySelectorAll(`script`))console.warn(`[@webority/ui-elements] A kanban fragment carried a script tag; it was removed, not run.`),e.remove();let n=null;for(let e of[...t.content.querySelectorAll(yr)]){if(e.closest(`template`))continue;let t=this._cardByKey(Fr(e));if(!t)continue;let r=t.contains(document.activeElement);t.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0})),t.hidden&&(e.hidden=!0),t.replaceWith(e),this._prepareCard(e),r&&e.focus(),n??=e}for(let e of t.content.querySelectorAll(`template[data-wui-kanban-summary]`))this._columnByKey(e.getAttribute(`data-wui-kanban-summary`))?.querySelector(xr)?.replaceChildren(e.content.cloneNode(!0));return this.refresh(),window.WUI?.refresh?.(),n}_refocusSoon(e){let t=()=>{let t=this._cardByKey(e);t&&this._focusMoved(t)};typeof requestAnimationFrame==`function`?requestAnimationFrame(t):setTimeout(t,0)}_focusMoved(e){e.focus({preventScroll:!0}),e.scrollIntoView?.({block:`nearest`})}_pointerDown(e){if(e.button!==0||e.isPrimary===!1||this._drag||this._kbd)return;let t=e.target.closest?.(yr);if(!t||!this.contains(t)||e.target.closest(Mr))return;let n={card:t,id:e.pointerId,x:e.clientX,y:e.clientY,type:e.pointerType,timer:0};this._press=n,e.pointerType===`touch`&&(n.timer=setTimeout(()=>{this._press===n&&this._startDrag(n,n.x,n.y)},400)),window.addEventListener(`pointermove`,this._onPointerMove),window.addEventListener(`pointerup`,this._onPointerUp),window.addEventListener(`pointercancel`,this._onPointerCancel)}_pointerMove(e){let t=this._press;if(!(!t||e.pointerId!==t.id)){if(!this._drag){if(!(Math.hypot(e.clientX-t.x,e.clientY-t.y)>6))return;if(t.type===`touch`){this._endPointer(!1);return}if(this._startDrag(t,e.clientX,e.clientY),!this._drag)return}this._dragTo(e.clientX,e.clientY)}}_pointerUp(e){!this._press||e.pointerId!==this._press.id||this._endPointer(!!this._drag)}_startDrag(e,t,n){let r=e.card;if(!this._canLift(r)){this._endPointer(!1);return}let i=R(this._columnOf(r)),a=r.getBoundingClientRect(),o=r.cloneNode(!0);for(let e of[o,...o.querySelectorAll(`[id]`)])e.removeAttribute(`id`);o.removeAttribute(`data-wui-card`),o.removeAttribute(`tabindex`),o.setAttribute(`aria-hidden`,`true`),o.classList.add(`wui-kanban-ghost`),o.style.width=`${a.width}px`,this.appendChild(o),r.setAttribute(`data-wui-dragging`,``),this.setAttribute(`data-wui-dragging`,``),this._drag={card:r,from:i,ghost:o,dx:t-a.left,dy:n-a.top,over:null,verdicts:this._markTargets(r,i)},this._announce(L.lifted(z(r),this._titleOf(this._columnOf(r)))),document.addEventListener(`keydown`,this._onDocKeyDown),this._dragTo(t,n)}_dragTo(e,t){let n=this._drag;n.x=e,n.y=t,n.ghost.style.transform=`translate(${e-n.dx}px, ${t-n.dy}px)`;let r=this._columnAt(e,t);r!==n.over&&(n.over?.removeAttribute(`data-wui-over`),r?.setAttribute(`data-wui-over`,``),n.over=r),this._autoScroll(e,t,r)}_columnAt(e,t){for(let n of this._columns()){let r=n.getBoundingClientRect();if(e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom)return n}return null}_indexAt(e,t){let n=this._visibleCardsIn(e).filter(e=>e!==this._drag?.card).find(e=>{let n=e.getBoundingClientRect();return t<n.top+n.height/2}),r=this._cardsIn(e).filter(e=>e!==this._drag?.card);return n?r.indexOf(n):r.length}_autoScroll(e,t,n){let r=this._scroller();if(r){let t=r.getBoundingClientRect();t.width>0&&(e<t.left+Nr?r.scrollBy?.({left:-16}):e>t.right-Nr&&r.scrollBy?.({left:Pr}))}if(n&&this._scrollColumn(n,t))return;let i=window.innerHeight||0;i>0&&(t<Nr?window.scrollBy?.({top:-16}):t>i-Nr&&window.scrollBy?.({top:Pr}))}_scrollColumn(e,t){let n=this._bodyOf(e);if(!n||e.hasAttribute(`data-collapsed`)||n.scrollHeight<=n.clientHeight)return!1;let r=n.getBoundingClientRect();return t<r.top+Nr&&n.scrollTop>0?(n.scrollBy?.({top:-16}),!0):t>r.bottom-Nr&&n.scrollTop+n.clientHeight<n.scrollHeight-1?(n.scrollBy?.({top:Pr}),!0):!1}_endPointer(e){let t=this._press,n=this._drag;if(t&&clearTimeout(t.timer),this._press=null,this._drag=null,window.removeEventListener(`pointermove`,this._onPointerMove),window.removeEventListener(`pointerup`,this._onPointerUp),window.removeEventListener(`pointercancel`,this._onPointerCancel),document.removeEventListener(`keydown`,this._onDocKeyDown),!n)return;n.ghost.remove(),n.card.removeAttribute(`data-wui-dragging`),this.removeAttribute(`data-wui-dragging`),this._suppressClick=!0,setTimeout(()=>{this._suppressClick=!1},0);let r=n.over;if(this._clearTargets(),!e||!r){this._announce(L.cancelled(z(n.card)));return}let i=R(r),a=n.verdicts.get(i);if(a?.source){this._announce(L.cancelled(z(n.card)));return}if(!a?.ok){this._announce(a?.reason),Gr(a?.reason,`info`);return}this._commit(n.card,i,this._indexAt(r,n.y))}_click(e){if(this._suppressClick&&e.target.closest?.(yr)){e.preventDefault(),e.stopPropagation(),this._suppressClick=!1;return}let t=e.target.closest?.(Or);if(t&&this.contains(t)){let e=t.closest(_r);e&&this._setCollapsed(e,!e.hasAttribute(`data-collapsed`),!0);return}let n=e.target.closest?.(kr);if(n&&this.contains(n)){this._controlled()||this._toggleMore(n.closest(_r));return}let r=e.target.closest?.(Er);r&&this.contains(r)&&this._showColumn(r.getAttribute(`data-wui-switch`))}_keyDown(e){if(this._kbd){this._liftedKey(e);return}let t=e.target;if(!t.matches?.(yr)||!this.contains(t))return;let n=this._columnOf(t);switch(e.key){case` `:case`Spacebar`:{if(e.preventDefault(),!this._canLift(t))return;let r=R(n),i=this._columns();this._kbd={card:t,from:r,target:i.indexOf(n),verdicts:this._markTargets(t,r)},t.setAttribute(`data-wui-lifted`,``),this.setAttribute(`data-wui-dragging`,``),n.setAttribute(`data-wui-target`,``),this._announce(L.lifted(z(t),this._titleOf(n)));return}case`ArrowDown`:case`ArrowUp`:{let r=this._visibleCardsIn(n),i=r[r.indexOf(t)+(e.key===`ArrowDown`?1:-1)];i&&(e.preventDefault(),i.focus());return}case`ArrowLeft`:case`ArrowRight`:{let t=this._columns(),r=e.key===`ArrowRight`?1:-1;for(let i=t.indexOf(n)+r;i>=0&&i<t.length;i+=r){let n=this._visibleCardsIn(t[i])[0];if(n&&!t[i].hasAttribute(`data-collapsed`)){e.preventDefault(),n.focus();return}}return}default:}}_liftedKey(e){let t=this._kbd,n=this._columns();switch(e.key){case`ArrowLeft`:case`ArrowRight`:{e.preventDefault();let r=t.target+(e.key===`ArrowRight`?1:-1);if(r<0||r>=n.length)return;n[t.target]?.removeAttribute(`data-wui-target`),t.target=r;let i=n[r];i.setAttribute(`data-wui-target`,``),this._showColumn(R(i),!1);let a=t.verdicts.get(R(i)),o=this._titleOf(i);this._announce(a.source?L.overSource(o):a.ok?L.over(o,this._cardsIn(i).filter(e=>!Ir(e)).length):L.overRefused(o,a.reason));return}case` `:case`Spacebar`:case`Enter`:{e.preventDefault();let r=n[t.target],i=R(r),a=t.verdicts.get(i);if(!a.source&&!a.ok){this._announce(a.reason);return}this._endKeyboard(),a.source?this._announce(L.cancelled(z(t.card))):this._commit(t.card,i);return}case`Escape`:case`Tab`:e.key===`Escape`&&e.preventDefault(),this._endKeyboard(),this._showColumn(t.from,!1),this._announce(L.cancelled(z(t.card)));return;default:}}_endKeyboard(){let e=this._kbd;this._kbd=null,e&&(e.card.removeAttribute(`data-wui-lifted`),this.removeAttribute(`data-wui-dragging`),this._clearTargets())}_restoreCollapsed(){let e=Vr(this.getAttribute(`board-id`));for(let t of this._columns()){let n=R(t);t.hasAttribute(`data-collapsible`)&&Object.hasOwn(e,n)&&this._setCollapsed(t,e[n],!1)}}_setCollapsed(e,t,n){let r=R(e);e.toggleAttribute(`data-collapsed`,t);let i=this._titleOf(e);for(let n of e.querySelectorAll(Or))n.setAttribute(`aria-expanded`,t?`false`:`true`),n.setAttribute(`aria-label`,t?L.expand(i):L.collapse(i));n&&(Hr(this.getAttribute(`board-id`),r,t),this._fire(`wui:kanban:collapse`,{column:r,collapsed:t}))}_toggleMore(e){if(!e)return;let t=R(e);if(this._expanded.delete(t))for(let t of this._cardsIn(e))this._revealed.delete(Fr(t));else this._expanded.add(t);this.refresh()}_isPhone(){return typeof matchMedia==`function`&&matchMedia(`(max-width: 767.98px)`).matches}_showColumn(e,t=!0){for(let t of this.querySelectorAll(Er))t.getAttribute(`data-wui-switch`)===e?t.setAttribute(`aria-current`,`true`):t.removeAttribute(`aria-current`);let n=this._columnByKey(e),r=this._scroller();if(!n||!r||!t&&!this._isPhone())return;let i=typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches;r.scrollTo?.({left:n.offsetLeft-r.offsetLeft,behavior:i?`auto`:`smooth`})}_syncSwitcherFromScroll(){let e=this._scroller();if(!e||!this._isPhone())return;let t=e.clientWidth||1,n=this._columns()[Math.round(e.scrollLeft/t)];if(n)for(let e of this.querySelectorAll(Er))e.getAttribute(`data-wui-switch`)===R(n)?e.setAttribute(`aria-current`,`true`):e.removeAttribute(`aria-current`)}},qr={delete:`data:image/webp;base64,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`,info:`data:image/webp;base64,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`,primary:`data:image/webp;base64,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`,success:`data:image/webp;base64,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`,warning:`data:image/webp;base64,UklGRi4IAABXRUJQVlA4WAoAAAAQAAAAiAAAiwAAQUxQSJQCAAABgFVtb97mg2AIghAIZrAwaBg0DGIGCwObQcfAEAJBEAxBF/1LbElXu4iICcC4NN/3XJmbPDeuNaclBtg63fPR5OxWUww2hHtucv2xR+3CVqVbzrNe4V6lc86kEm1NRqw3dWKVYfmmSqwyNN/UoCLD802FsDXRkGm8yKJlprHCryjKt5Eii66/YZhN1GUaI1RRuK0jEIvOW39zE60fobO7KM7U1SaqM3W0ifJM3WyiPlMnmxjI1MUmJnLoYBYjj+uoWSH5KmKxc72oiqXxkk1MZbogirH1PGJrZD2tiLmNTprF4HoSWyTrKZuY3MIJJEb/nlCsEvqKxOz6VbFL4hckhtcvimUSPyIxPX9UbGvhE7ZN0geLGN8+qNZJfENi/v5msa+FV9U+iS9IHLi/WDzQXjw8INNTc8EKYBIX/gFYfNAAFB8IAYcTfgBxYsLkhYzZCwdWLzTsXpDwcANVN8TDDQv7QdyY/o9ofmA3LH74qW6IxQ3T7oaweqFh9sIB8sIf0JyQgMMJP0BxAgGrDxjA5IM/AGguWJ+KC6an1QOM5+CB/ALVAT+vkn0Nr4N9+Q2qefHdah3jfWjG3T5AMo4+IdsyPq6m0WfRsowvq2H0TbQr4+tiFn1HzaiME5NNTGcENumGU6NFjJN3g+iswOYknB6tqbgw2cJ0BaopEZcGNiThYmpm7Lh8tuJAh6sNTD0gWcCEPpN+TOg1aceEfpNuTOg5aXYQ+p6bWo+A3omV2jEgVY3agjGTPkwYNbIye8C4VDThiLFnVmMPGD7pUCM0pDIe36AllbFaClCUyjgtBShLhYeoM1Ream9tj1CbltpPyxHK0/JoHdQ9wsZpKcd57bHPAbZO831/1INfMR+PnJYpYFxWUDggdAUAAPAmAJ0BKokAjAA+kT6ZSKWjoqEr0zyIsBIJZAYoAPvx49SOFf0nLi9feHfYl5vSVbA3q88wD9XelP5gP2q/XL3o/SZ6AHSd+g75dPsu/uZlMvWb6APrnlFdmsw4H9yZVhw9L2yx2Qc0ir46ImbCyF5Fosrd/87s6heTYI3JUhc7xwiXhD9Gj1VOnS9BfKLCz/ouhMWPbKRGcbnEGyVetpAC3xibiFL5Zunh9q36umFwvFIQv9v1MtswMw+HF1ht0eX/pNYrV9IRz8yv935/Yp8sBTT1UfJxnq2kY19skkQClDnl2Etr/n5/oi3OQW5dNQEgNjdvVzh1clDbiFyju3OZz7sxVF9xBjZru9nND4/pOG+qkv2UkcmrzZpNtYLRz1V4JayVISPraIPZ0ExsOJOI/on91QsGlREmBk0r9Q8QAP78XNcH/ILg/afi/Ene3CDuNLUp83ARh930rcfOX9BQtPxECmmETWXFAHRwnOcJrVv/ILg/cvr+Gycupedwsllu4F9O4X9V046eDx76cYmO/1Z/Z6//J7L42E6ubP68wc+mxcfaH6p7fBbKJh9WCYFqR5Vfk7+1AkXMrM/JJNwMPXCeNmT+gTuBE4VNWiWhFPl3Pw1bAeayIAnNtEXfpl/X6wc/Emie8P2Yeb7X5wK9ZOF0X9oIjEW6q90BY6WsqhZsIAgna6QEA0sEYwNemOY+KOHyWoAEtvP7MQe9MecjL1Oy5iVklSGe06QZXpQZ3Szl16CTk7WDkwAhtyRt823V1xr/kFbNxYBOdvUQgp81wVSPy5PGGhIOXCouyajqOUMjf//v0NqTJBYkUDVGWSPr+w+jvvK7HJEVdiZfP+ipqwyR9GnwWnep/8qggBSAEuT/Y2fwnwQ3aq2sCv2raOZhC6rlJSV32fNwFfbu4p6jwHv++pIkVCwvXrNTwGZp/WOGRWfLTzYPv6gOGb/kVs4g5HwyjUvNAa3fZB/YCYjI8iFxUq/xLu3hQrLrheac24MAZdoxmUr4e9l8dgibVHj6e6CW84foYzQ+75tL+mx994lHYYKa80GsI2PZ/6k7H+32wrpk+CHkMzFnPaSxmWL0IRb+r3wAAJNLa7Rv4ZRf5Y+r4mnFm3Yn65Yhku+22l9UttmElhLO0HjwLl9e0YVg8pQ3QUTXe7Azs/ajEpOnqWxfw9VkBpfGf7i6Bbgs66Wye/7JqBPmILrCtvFFn79zTyvqti4sb+duZfvCbl1PmObAuucG5ncB2Y4elUVnt4FLft9DQFBeNiMJclD4NSC/tNDD7KSDmd7cch1U8YOIQmwRlrYERg+pTKmzf6RTr4mehEpJbHVMlOcVDc1dg0HIaBsh68tx3K3vYs992CzuhJOZ/cf7Zv1ejOz20h3syMqdF1jUbMRbPqp4/f96K+LV1etvLZBqsUhxLoE+A7xM84pGf81t5kJXj4toZTPSHYYYckG+KjLxi43PidMT+AsoGmiMXSj3MWLHijSkGQEOWaYr57efks///foUajtDcX2x8t3YwQonEo1mSXKKIjDVcxm0QdMn/n94fILJ8jpdG267h4zj4z1vgCEX2tiu01a3JueayBKehW9HfPGTqCF57Rujz/bsMolTAVaD6GonBUIyFxvInkIi2IM9G1N3XB1U3QEEGvP+CoxGSIAzwyGF57YiDt90pO7R94NP1ZankVp1dtEccWyzU9DrUI8iLKYeKwy6Gvokz/NZHnpQd6ehlmIduqYS27V0kM0LbdpYI0qLGlVFA22uCW61dbyfUDaur9N+Tw6rwH/kW97h8HUyAQCnXLSDNgFqRN/1Xgdp0r0dzKU7ImzaKzjS1tYxLXAf/kXCghSyLnGF+uTjhAAAAAA=`},Jr={error:`<rect width="174" height="174" rx="87" fill="var(--wui-danger-5)"/>
2
2
  <rect x="24" y="24" width="126" height="126" rx="63" stroke="var(--wui-danger-20)" stroke-width="16"/>
3
3
  <g clip-path="url(#wui_error_clip0)">
4
4
  <rect x="32" y="32" width="110" height="110" rx="55" fill="var(--wui-danger)"/>
@@ -7,34 +7,34 @@ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{
7
7
  <path d="M95.9285 87.0037L112.943 69.9887C114.823 68.1087 114.823 65.0608 112.943 63.1838L110.675 60.9155C108.795 59.0349 105.747 59.0349 103.87 60.9155L86.8552 77.9298L69.8403 60.9119C67.9603 59.032 64.9124 59.032 63.0353 60.9119L60.7635 63.1802C58.8835 65.0608 58.8835 68.1087 60.7635 69.9858L77.7814 87.0037L60.767 104.018C58.8865 105.899 58.8865 108.947 60.767 110.824L63.0353 113.092C64.9153 114.972 67.9632 114.972 69.8403 113.092L86.8552 96.0769L103.87 113.092C105.75 114.972 108.798 114.972 110.675 113.092L112.943 110.824C114.823 108.943 114.823 105.895 112.943 104.018L95.9285 87.0037Z" fill="white"/>
8
8
  </g>
9
9
  </g>
10
- <defs><clipPath id="wui_error_clip0"><rect x="32" y="32" width="110" height="110" rx="55" fill="white"/></clipPath><clipPath id="wui_error_clip1"><rect width="55" height="55" fill="white" transform="translate(59.3535 59.502)"/></clipPath></defs>`},Ln=[`success`,`error`,`warning`,`info`,`delete`,`primary`],Rn=class extends c{static get observedAttributes(){return[`tone`,`size`]}connectedCallback(){this.render()}attributeChangedCallback(){this.isConnected&&this.render()}render(){let e=this.getAttribute(`tone`),t=Number.parseInt(this.getAttribute(`size`),10)||72,n=In[e];if(n){this.innerHTML=`<svg width="${t}" height="${t}" viewBox="0 0 174 174" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${n}</svg>`;return}let r=Fn[e]||Fn.info;this.innerHTML=`<img src="${r}" width="${t}" height="${t}" alt="" aria-hidden="true" draggable="false" />`}},zn=!1,Bn=!1;function Vn(){Bn||typeof document>`u`||(Bn=!0,document.addEventListener(`keydown`,e=>{zn=e.key===`Tab`},!0),document.addEventListener(`keyup`,()=>{zn=!1},!0))}function Hn(){return zn}var Un=`data-wui-mirror`;function Wn(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 Gn(e){let t=document.createElement(`input`);return t.type=`hidden`,t.setAttribute(Un,``),e.appendChild(t),t}function I(e,t){let n=e.getAttribute(`name`),r=e.querySelector(`:scope > input[${Un}]`);if(!n){r?.remove();return}r||=Gn(e),Wn(e,r,n,t)}function L(e,t){let n=e.getAttribute(`name`),r=[...e.querySelectorAll(`:scope > input[${Un}]`)],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)=>{Wn(e,r[i]??Gn(e),n,t)})}var Kn={activity:`<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="m7.33 14.49 2.38-3.09c.34-.44.97-.52 1.41-.18l1.83 1.44c.44.34 1.07.26 1.41-.17l2.31-2.98" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,add:`<path d="M6 12h12M12 18V6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"add-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM8 12h8M12 16V8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,alarm:`<path d="M2 22h20M12 6a9 9 0 0 0-9 9v7h18v-7a9 9 0 0 0-9-9ZM12 2v1M4 4l1 1M20 4l-1 1" 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-down":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M18.07 14.43L12 20.5l-6.07-6.07M12 3.5v16.83"></path>`,"arrow-down-up":`<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>`,"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-left-2":`<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>`,"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>`,"arrow-right-2":`<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>`,"arrow-swap-horizontal":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M20.5 14.99l-5.01 5.02M3.5 14.99h17M3.5 9.01l5.01-5.02M20.5 9.01h-17"></path>`,"arrow-up":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M18.07 9.57L12 3.5 5.93 9.57M12 20.5V3.67"></path>`,"arrow-up-right":`<g transform="rotate(-45 12 12)"><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></g>`,"badge-check":`<path d="m8.38 12 2.41 2.42 4.83-4.84" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.75 2.45c.69-.59 1.82-.59 2.52 0l1.58 1.36c.3.26.86.47 1.26.47h1.7c1.06 0 1.93.87 1.93 1.93v1.7c0 .39.21.96.47 1.26l1.36 1.58c.59.69.59 1.82 0 2.52l-1.36 1.58c-.26.3-.47.86-.47 1.26v1.7c0 1.06-.87 1.93-1.93 1.93h-1.7c-.39 0-.96.21-1.26.47l-1.58 1.36c-.69.59-1.82.59-2.52 0l-1.58-1.36c-.3-.26-.86-.47-1.26-.47H6.18c-1.06 0-1.93-.87-1.93-1.93V16.1c0-.39-.21-.95-.46-1.25l-1.35-1.59c-.58-.69-.58-1.81 0-2.5l1.35-1.59c.25-.3.46-.86.46-1.25V6.2c0-1.06.87-1.93 1.93-1.93h1.73c.39 0 .96-.21 1.26-.47l1.58-1.35Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,bell:`<path d="M12.02 2.91c-3.31 0-6 2.69-6 6v2.89c0 .61-.26 1.54-.57 2.06L4.3 15.77c-.71 1.18-.22 2.49 1.08 2.93 4.31 1.44 8.96 1.44 13.27 0 1.21-.4 1.74-1.83 1.08-2.93l-1.15-1.91c-.3-.52-.56-1.45-.56-2.06V8.91c0-3.3-2.7-6-6-6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M13.87 3.2a6.754 6.754 0 0 0-3.7 0c.29-.74 1.01-1.26 1.85-1.26.84 0 1.56.52 1.85 1.26Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.02 19.06c0 1.65-1.35 3-3 3-.82 0-1.58-.34-2.12-.88a3.01 3.01 0 0 1-.88-2.12" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path>`,book:`<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>`,"box-seam":`<path d="M3.17 7.44 12 12.55l8.77-5.08M12 21.61v-9.07" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.93 2.48 4.59 5.45c-1.21.67-2.2 2.35-2.2 3.73v5.65c0 1.38.99 3.06 2.2 3.73l5.34 2.97c1.14.63 3.01.63 4.15 0l5.34-2.97c1.21-.67 2.2-2.35 2.2-3.73V9.18c0-1.38-.99-3.06-2.2-3.73l-5.34-2.97c-1.15-.64-3.01-.64-4.15 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 13.24V9.58L7.51 4.1" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,briefcase:`<path d="M8 22h8c4.02 0 4.74-1.61 4.95-3.57l.75-8C21.97 7.99 21.27 6 17 6H7c-4.27 0-4.97 1.99-4.7 4.43l.75 8C3.26 20.39 3.98 22 8 22ZM8 6v-.8C8 3.43 8 2 11.2 2h1.6C16 2 16 3.43 16 5.2V6" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14 13v1.02c0 1.09-.01 1.98-2 1.98-1.98 0-2-.88-2-1.97V13c0-1 0-1 1-1h2c1 0 1 0 1 1ZM21.65 11A16.484 16.484 0 0 1 14 14.02M2.62 11.27c2.25 1.54 4.79 2.47 7.38 2.76" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,bug:`<path d="M12 8.5c-3.3 0-5.5 2.6-5.5 6s2.2 6 5.5 6 5.5-2.6 5.5-6-2.2-6-5.5-6ZM12 10v10.5M9.6 6.8 8 4.5M14.4 6.8 16 4.5M6.5 12.5H3.8M6.8 16.5l-2.3 1.3M17.5 12.5h2.7M17.2 16.5l2.3 1.3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`,building:`<path d="M12.5 22H4.08c-1.16 0-2.11-.93-2.11-2.07V5.09c0-2.62 1.95-3.81 4.34-2.64l4.44 2.18c.96.47 1.75 1.72 1.75 2.78V22ZM21.97 15.06v3.78c0 2.16-1 3.16-3.16 3.16H12.5V10.42l.47.1 4.5 1.01 2.03.45c1.32.29 2.4.97 2.46 2.89.01.06.01.12.01.19ZM5.5 9h3.47M5.5 13h3.47" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.47 11.53v3.22c0 1.24-1.01 2.25-2.25 2.25s-2.25-1.01-2.25-2.25v-4.23l4.5 1.01ZM21.96 14.87A2.249 2.249 0 0 1 19.72 17c-1.24 0-2.25-1.01-2.25-2.25v-3.22l2.03.45c1.32.29 2.4.97 2.46 2.89Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"building-2":`<path d="M6.7 18H4.15C2.72 18 2 17.28 2 15.85V4.15C2 2.72 2.72 2 4.15 2h4.3c1.43 0 2.15.72 2.15 2.15V6" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.37 8.42v11.16c0 1.61-.8 2.42-2.41 2.42H9.12c-1.61 0-2.42-.81-2.42-2.42V8.42C6.7 6.81 7.51 6 9.12 6h5.84c1.61 0 2.41.81 2.41 2.42Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M13.4 6V4.15c0-1.43.72-2.15 2.15-2.15h4.3C21.28 2 22 2.72 22 4.15v11.7c0 1.43-.72 2.15-2.15 2.15h-2.48M10 11h4M10 14h4M12 22v-3" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,bullseye:`<path d="M12 19.5a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM12 4V2M4 12H2M12 20v2M20 12h2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,cake:`<path d="M2 22h20M3.11 22v-9c0-1.66 1.49-3 3.33-3h11.11c1.84 0 3.33 1.34 3.33 3v9M5.56 10V7.17C5.56 5.97 6.64 5 7.98 5h8.05c1.33 0 2.41.97 2.41 2.17V10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m3.53 13.98.37.01c.74.01 1.33.61 1.33 1.35v.33a1.35 1.35 0 0 0 2.7 0v-.31a1.35 1.35 0 0 1 2.7 0v.31a1.35 1.35 0 0 0 2.7 0v-.31a1.35 1.35 0 0 1 2.7 0v.31a1.35 1.35 0 0 0 2.7 0v-.31c0-.74.6-1.35 1.35-1.35h.45M8 5V3M16 5V3M12 5V2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,calculator:`<path d="M10 22h4c5 0 7-2 7-7V9c0-5-2-7-7-7h-4C5 2 3 4 3 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16.5 7.58v1c0 .82-.67 1.5-1.5 1.5H9c-.82 0-1.5-.67-1.5-1.5v-1c0-.82.67-1.5 1.5-1.5h6c.83 0 1.5.67 1.5 1.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.136 14h.012M11.995 14h.012M15.854 14h.012M8.136 17.5h.012M11.995 17.5h.012M15.854 17.5h.012" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,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-1":`<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>`,"calendar-add":`<path d="M8 2v3M16 2v3M3.5 9.09h17M18 23a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM19.49 19.05h-2.98M18 17.59v2.99" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 8.5v7.86c-.73-.83-1.8-1.36-3-1.36-2.21 0-4 1.79-4 4 0 .75.21 1.46.58 2.06.21.36.48.68.79.94H8c-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="M11.995 13.7h.01M8.294 13.7h.01M8.294 16.7h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"calendar-check":`<path d="M8 2v3M16 2v3M3.5 9.09h17M22 19c0 .75-.21 1.46-.58 2.06A3.97 3.97 0 0 1 18 23c-1.01 0-1.93-.37-2.63-1-.31-.26-.58-.58-.79-.94A3.92 3.92 0 0 1 14 19c0-2.21 1.79-4 4-4 1.2 0 2.27.53 3 1.36A4 4 0 0 1 22 19Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="m16.44 19 .99.99 2.13-1.97" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 8.5v7.86c-.73-.83-1.8-1.36-3-1.36-2.21 0-4 1.79-4 4 0 .75.21 1.46.58 2.06.21.36.48.68.79.94H8c-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="M11.995 13.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>`,"calendar-tick":`<path d="M8 2v3M16 2v3M3.5 9.09h17M22 19c0 .75-.21 1.46-.58 2.06A3.97 3.97 0 0 1 18 23c-1.01 0-1.93-.37-2.63-1-.31-.26-.58-.58-.79-.94A3.92 3.92 0 0 1 14 19c0-2.21 1.79-4 4-4 1.2 0 2.27.53 3 1.36A4 4 0 0 1 22 19Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="m16.44 19 .99.99 2.13-1.97" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 8.5v7.86c-.73-.83-1.8-1.36-3-1.36-2.21 0-4 1.79-4 4 0 .75.21 1.46.58 2.06.21.36.48.68.79.94H8c-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="M11.995 13.7h.01M8.294 13.7h.01M8.294 16.7h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,camera:`<path d="M6.76 22h10.48c2.76 0 3.86-1.69 3.99-3.75l.52-8.26A3.753 3.753 0 0 0 18 6c-.61 0-1.17-.35-1.45-.89l-.72-1.45C15.37 2.75 14.17 2 13.15 2h-2.29c-1.03 0-2.23.75-2.69 1.66l-.72 1.45C7.17 5.65 6.61 6 6 6 3.83 6 2.11 7.83 2.25 9.99l.52 8.26C2.89 20.31 4 22 6.76 22ZM10.5 8h3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 18c1.79 0 3.25-1.46 3.25-3.25S13.79 11.5 12 11.5s-3.25 1.46-3.25 3.25S10.21 18 12 18Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"cash-stack":`<path d="M19.3 7.92v5.15c0 3.08-1.76 4.4-4.4 4.4H6.11c-.45 0-.88-.04-1.28-.13-.25-.04-.49-.11-.71-.19-1.5-.56-2.41-1.86-2.41-4.08V7.92c0-3.08 1.76-4.4 4.4-4.4h8.79c2.24 0 3.85.95 4.28 3.12.07.4.12.81.12 1.28Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22.301 10.92v5.15c0 3.08-1.76 4.4-4.4 4.4h-8.79c-.74 0-1.41-.1-1.99-.32-1.19-.44-2-1.35-2.29-2.81.4.09.83.13 1.28.13h8.79c2.64 0 4.4-1.32 4.4-4.4V7.92c0-.47-.04-.89-.12-1.28 1.9.4 3.12 1.74 3.12 4.28Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.498 13.14a2.64 2.64 0 1 0 0-5.28 2.64 2.64 0 0 0 0 5.28ZM4.78 8.3v4.4M16.222 8.3v4.4" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></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>`,"chart-column":`<path d="M3 22h18M5.6 8.38H4c-.55 0-1 .45-1 1V18c0 .55.45 1 1 1h1.6c.55 0 1-.45 1-1V9.38c0-.55-.45-1-1-1ZM12.8 5.19h-1.6c-.55 0-1 .45-1 1V18c0 .55.45 1 1 1h1.6c.55 0 1-.45 1-1V6.19c0-.55-.45-1-1-1ZM20 2h-1.6c-.55 0-1 .45-1 1v15c0 .55.45 1 1 1H20c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,chat:`<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>`,"chat-dots":`<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="M7 8h10M7 13h6" 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-check":`<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="m7.75 12 2.83 2.83 5.67-5.66" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"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-left":`<path d="M12.7071 6.70711C13.0976 6.31658 13.0976 5.68342 12.7071 5.29289C12.3166 4.90237 11.6834 4.90237 11.2929 5.29289L5.29289 11.2929C4.91431 11.6715 4.90107 12.2811 5.26285 12.6757L10.7628 18.6757C11.136 19.0828 11.7686 19.1103 12.1757 18.7372C12.5828 18.364 12.6103 17.7314 12.2372 17.3243L7.38414 12.0301L12.7071 6.70711Z" fill="currentColor"/><path opacity="0.3" d="M19.7071 6.70711C20.0976 6.31658 20.0976 5.68342 19.7071 5.29289C19.3166 4.90237 18.6834 4.90237 18.2929 5.29289L12.2929 11.2929C11.9143 11.6715 11.9011 12.2811 12.2628 12.6757L17.7628 18.6757C18.136 19.0828 18.7686 19.1103 19.1757 18.7372C19.5828 18.364 19.6103 17.7314 19.2372 17.3243L14.3841 12.0301L19.7071 6.70711Z" fill="currentColor"/>`,"chevrons-right":`<path d="M11.2929 6.70711C10.9024 6.31658 10.9024 5.68342 11.2929 5.29289C11.6834 4.90237 12.3166 4.90237 12.7071 5.29289L18.7071 11.2929C19.0857 11.6715 19.0989 12.2811 18.7372 12.6757L13.2372 18.6757C12.864 19.0828 12.2314 19.1103 11.8243 18.7372C11.4172 18.364 11.3897 17.7314 11.7628 17.3243L16.6159 12.0301L11.2929 6.70711Z" fill="currentColor"/><path opacity="0.3" d="M4.29289 6.70711C3.90237 6.31658 3.90237 5.68342 4.29289 5.29289C4.68342 4.90237 5.31658 4.90237 5.70711 5.29289L11.7071 11.2929C12.0857 11.6715 12.0989 12.2811 11.7372 12.6757L6.23715 18.6757C5.86396 19.0828 5.23139 19.1103 4.82428 18.7372C4.41716 18.364 4.38965 17.7314 4.76285 17.3243L9.61586 12.0301L4.29289 6.70711Z" fill="currentColor"/>`,"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>`,"circle-help":`<path d="M17 18.43h-4l-4.45 2.96A.997.997 0 0 1 7 20.56v-2.13c-3 0-5-2-5-5v-6c0-3 2-5 5-5h10c3 0 5 2 5 5v6c0 3-2 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 11.36v-.21c0-.68.42-1.04.84-1.33.41-.28.82-.64.82-1.3 0-.92-.74-1.66-1.66-1.66-.92 0-1.66.74-1.66 1.66M11.995 13.75h.01" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"clipboard-check":`<path d="m9.31 14.7 1.5 1.5 4-4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10 6h4c2 0 2-1 2-2 0-2-1-2-2-2h-4C9 2 8 2 8 4s1 2 2 2Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16 4.02c3.33.18 5 1.41 5 5.98v6c0 4-1 6-6 6H9c-5 0-6-2-6-6v-6c0-4.56 1.67-5.8 5-5.98" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"clipboard-text":`<path d="M8 12.2h7M8 16.2h4.38M10 6h4c2 0 2-1 2-2 0-2-1-2-2-2h-4C9 2 8 2 8 4s1 2 2 2Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16 4.02c3.33.18 5 1.41 5 5.98v6c0 4-1 6-6 6H9c-5 0-6-2-6-6v-6c0-4.56 1.67-5.8 5-5.98" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"clipboard-tick":`<path d="m9.31 14.7 1.5 1.5 4-4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10 6h4c2 0 2-1 2-2 0-2-1-2-2-2h-4C9 2 8 2 8 4s1 2 2 2Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16 4.02c3.33.18 5 1.41 5 5.98v6c0 4-1 6-6 6H9c-5 0-6-2-6-6v-6c0-4.56 1.67-5.8 5-5.98" 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>`,"close-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM9.17 14.83l5.66-5.66M14.83 14.83 9.17 9.17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,cloud:`<path d="M7.27 13.01a3.79 3.79 0 0 0-1.72-.41c-4.68.33-4.68 7.14 0 7.47h11.09c1.35.01 2.65-.49 3.64-1.4 3.29-2.87 1.53-8.64-2.8-9.19C15.92.11 2.39 3.67 5.6 12.6" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.85 9.92c.52-.26 1.09-.4 1.67-.41" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" 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>`,"code-circle":`<path d="m8 10-2 2 2 2M16 10l2 2-2 2" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10ZM13 9.67l-2 4.66" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,coins:`<path d="M18.5 12.65v3.7c0 3.12-2.91 5.65-6.5 5.65s-6.5-2.53-6.5-5.65v-3.7C5.5 15.77 8.41 18 12 18s6.5-2.23 6.5-5.35Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.5 7.65c0 .91-.25 1.75-.69 2.47C16.74 11.88 14.54 13 12 13c-2.54 0-4.74-1.12-5.81-2.88-.44-.72-.69-1.56-.69-2.47 0-1.56.73-2.97 1.9-3.99C8.58 2.63 10.2 2 12 2c1.8 0 3.42.63 4.6 1.65 1.17 1.03 1.9 2.44 1.9 4Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.5 7.65v5c0 3.12-2.91 5.35-6.5 5.35s-6.5-2.23-6.5-5.35v-5C5.5 4.53 8.41 2 12 2c1.8 0 3.42.63 4.6 1.65 1.17 1.03 1.9 2.44 1.9 4Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,contact:`<path d="M17 21H7c-4 0-5-1-5-5V8c0-4 1-5 5-5h10c4 0 5 1 5 5v8c0 4-1 5-5 5ZM14 8h5M15 12h4M17 16h2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.5 11.29a1.81 1.81 0 1 0 0-3.62 1.81 1.81 0 0 0 0 3.62ZM12 16.33a3.02 3.02 0 0 0-2.74-2.72 7.72 7.72 0 0 0-1.52 0A3.03 3.03 0 0 0 5 16.33" stroke="currentColor" stroke-width="1.5" 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>`,cpu:`<path d="M9.6 20h4.8c4 0 5.6-1.6 5.6-5.6V9.6c0-4-1.6-5.6-5.6-5.6H9.6C5.6 4 4 5.6 4 9.6v4.8c0 4 1.6 5.6 5.6 5.6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.5 17h3c2.5 0 3.5-1 3.5-3.5v-3C17 8 16 7 13.5 7h-3C8 7 7 8 7 10.5v3C7 16 8 17 10.5 17ZM8.01 4V2M12 4V2M16 4V2M20 8h2M20 12h2M20 16h2M16 20v2M12.01 20v2M8.01 20v2M2 8h2M2 12h2M2 16h2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"credit-card":`<path d="M2 8.505h20M6 16.505h2M10.5 16.505h4" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6.44 3.505h11.11c3.56 0 4.45.88 4.45 4.39v8.21c0 3.51-.89 4.39-4.44 4.39H6.44c-3.55.01-4.44-.87-4.44-4.38v-8.22c0-3.51.89-4.39 4.44-4.39Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,cursor:`<path d="m16.15 12.83-1.73.58c-.48.16-.85.53-1.01 1.01l-.58 1.73c-.49 1.49-2.59 1.46-3.05-.03L7.83 9.84c-.38-1.25.77-2.4 2-2.02l6.29 1.95c1.49.47 1.51 2.57.03 3.06Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></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>`,"diagram-3":`<path d="M5 15V8M5.25 22a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM5 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM19 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM5.13 15a4.058 4.058 0 0 1 3.94-3.04l3.43.01c2.62.01 4.85-1.67 5.67-4.01" stroke="currentColor" stroke-width="1.5" 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>`,"document-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>`,"document-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>`,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>`,"edit-2":`<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>`,"emoji-smile":`<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 9.75a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM8.5 9.75a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM8.4 13.3h7.2c.5 0 .9.4.9.9 0 2.49-2.01 4.5-4.5 4.5s-4.5-2.01-4.5-4.5c0-.5.4-.9.9-.9Z" 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>`,"external-link":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M13 11l8.2-8.2M22 6.8V2h-4.8M11 2H9C4 2 2 4 2 9v6c0 5 2 7 7 7h6c5 0 7-2 7-7v-2"></path>`,eye:`<path d="M15.58 12c0 1.98-1.6 3.58-3.58 3.58S8.42 13.98 8.42 12s1.6-3.58 3.58-3.58 3.58 1.6 3.58 3.58Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 20.27c3.53 0 6.82-2.08 9.11-5.68.9-1.41.9-3.78 0-5.19-2.29-3.6-5.58-5.68-9.11-5.68-3.53 0-6.82 2.08-9.11 5.68-.9 1.41-.9 3.78 0 5.19 2.29 3.6 5.58 5.68 9.11 5.68Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"eye-off":`<path d="m14.53 9.47-5.06 5.06a3.576 3.576 0 1 1 5.06-5.06Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.82 5.77C16.07 4.45 14.07 3.73 12 3.73c-3.53 0-6.82 2.08-9.11 5.68-.9 1.41-.9 3.78 0 5.19.79 1.24 1.71 2.31 2.71 3.17M8.42 19.53c1.14.48 2.35.74 3.58.74 3.53 0 6.82-2.08 9.11-5.68.9-1.41.9-3.78 0-5.19-.33-.52-.69-1.01-1.06-1.47" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.51 12.7a3.565 3.565 0 0 1-2.82 2.82M9.47 14.53 2 22M22 2l-7.47 7.47" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,facebook:`<path d="M14 9.3v2.9h2.6c.2 0 .3.2.3.4l-.4 1.9c0 .1-.2.2-.3.2H14V22h-3v-7.2H9.3c-.2 0-.3-.1-.3-.3v-1.9c0-.2.1-.3.3-.3H11V9c0-1.7 1.3-3 3-3h2.7c.2 0 .3.1.3.3v2.4c0 .2-.1.3-.3.3h-2.4c-.2 0-.3.1-.3.3Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M15 22H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h6c5 0 7 2 7 7v6c0 5-2 7-7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,factory:`<path d="M13 22H5c-2 0-3-1-3-3v-8c0-2 1-3 3-3h5v11c0 2 1 3 3 3ZM10.11 4c-.08.3-.11.63-.11 1v3H5V6c0-1.1.9-2 2-2h3.11ZM14 8v5M18 8v5M17 17h-2c-.55 0-1 .45-1 1v4h4v-4c0-.55-.45-1-1-1ZM6 13v4" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10 19V5c0-2 1-3 3-3h6c2 0 3 1 3 3v14c0 2-1 3-3 3h-6c-2 0-3-1-3-3Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"file-plus-2":`<path d="M9.56 18v-5M12 15.5H7M8 2v3M16 2v3M15.81 3.42c3.34.12 5.03 1.35 5.13 6.05l.13 6.17c.08 4.12-.87 6.19-5.87 6.3l-6 .12c-5 .1-6.04-1.94-6.12-6.05l-.14-6.18c-.1-4.7 1.55-6 4.87-6.25l8-.16Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></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>`,flash:`<path d="M6.09 13.28h3.09v7.2c0 1.68.91 2.02 2.02.76l7.57-8.6c.93-1.05.54-1.92-.87-1.92h-3.09v-7.2c0-1.68-.91-2.02-2.02-.76l-7.57 8.6c-.92 1.06-.53 1.92.87 1.92Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,folder:`<path d="M22 11v6c0 4-1 5-5 5H7c-4 0-5-1-5-5V7c0-4 1-5 5-5h1.5c1.5 0 1.83.44 2.4 1.2l1.5 2c.38.5.6.8 1.6.8h3c4 0 5 1 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path>`,"folder-2":`<path d="M22 11v6c0 4-1 5-5 5H7c-4 0-5-1-5-5V7c0-4 1-5 5-5h1.5c1.5 0 1.83.44 2.4 1.2l1.5 2c.38.5.6.8 1.6.8h3c4 0 5 1 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path><path d="M8 2h9c2 0 3 1 3 3v1.38" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"folder-kanban":`<path d="M10.5 19.9V4.1c0-1.5-.64-2.1-2.23-2.1H4.23C2.64 2 2 2.6 2 4.1v15.8c0 1.5.64 2.1 2.23 2.1h4.04c1.59 0 2.23-.6 2.23-2.1ZM22 12.9V4.1c0-1.5-.64-2.1-2.23-2.1h-4.04c-1.59 0-2.23.6-2.23 2.1v8.8c0 1.5.64 2.1 2.23 2.1h4.04c1.59 0 2.23-.6 2.23-2.1Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"folder-open":`<path d="m21.67 14.3-.4 5c-.15 1.53-.27 2.7-2.98 2.7H5.71C3 22 2.88 20.83 2.73 19.3l-.4-5c-.08-.83.18-1.6.65-2.19l.02-.02C3.55 11.42 4.38 11 5.31 11h13.38c.93 0 1.75.42 2.29 1.07.01.01.02.02.02.03.49.59.76 1.36.67 2.2Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path><path d="M3.5 11.43V6.28c0-3.4.85-4.25 4.25-4.25h1.27c1.27 0 1.56.38 2.04 1.02l1.27 1.7c.32.42.51.68 1.36.68h2.55c3.4 0 4.25.85 4.25 4.25v1.79M9.43 17h5.14" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"folder-plus":`<path d="M12.06 16.5v-5M14.5 14h-5" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 11v6c0 4-1 5-5 5H7c-4 0-5-1-5-5V7c0-4 1-5 5-5h1.5c1.5 0 1.83.44 2.4 1.2l1.5 2c.38.5.6.8 1.6.8h3c4 0 5 1 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></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>`,gift:`<path d="M19.97 10h-16v8c0 3 1 4 4 4h8c3 0 4-1 4-4v-8ZM21.5 7v1c0 1.1-.53 2-2 2h-15c-1.53 0-2-.9-2-2V7c0-1.1.47-2 2-2h15c1.47 0 2 .9 2 2ZM11.64 5H6.12a.936.936 0 0 1 .03-1.3l1.42-1.42a.96.96 0 0 1 1.35 0L11.64 5ZM17.87 5h-5.52l2.72-2.72a.96.96 0 0 1 1.35 0l1.42 1.42c.36.36.37.93.03 1.3Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.94 10v5.14c0 .8.88 1.27 1.55.84l.94-.62a1 1 0 0 1 1.1 0l.89.6a.997.997 0 0 0 1.55-.83V10H8.94Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,globe:`<path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8 3h1a28.424 28.424 0 0 0 0 18H8M15 3a28.424 28.424 0 0 1 0 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 16v-1a28.424 28.424 0 0 0 18 0v1M3 9a28.424 28.424 0 0 1 18 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,globe2:`<path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8 3h1a28.424 28.424 0 0 0 0 18H8M15 3a28.424 28.424 0 0 1 0 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 16v-1a28.424 28.424 0 0 0 18 0v1M3 9a28.424 28.424 0 0 1 18 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,google:`<path d="M21.6 10.2h-9.4v3.7h5.5c-.1.9-.7 2.3-2 3.2-.8.6-2 1-3.5 1-2.6 0-4.9-1.7-5.7-4.2-.2-.6-.3-1.3-.3-2s.1-1.4.3-2c.1-.2.1-.4.2-.5.9-2.1 3-3.6 5.5-3.6 1.9 0 3.1.8 3.9 1.5l2.8-2.8C17.2 3 14.9 2 12.2 2 8.3 2 4.9 4.2 3.3 7.5c-.7 1.4-1.1 2.9-1.1 4.5s.4 3.1 1.1 4.5c1.6 3.3 5 5.5 8.9 5.5 2.7 0 5-.9 6.6-2.4 1.9-1.7 3-4.3 3-7.4 0-.8-.1-1.4-.2-2Z" 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>`,headphone:`<path d="M5.46 18.49v-2.92c0-.97.76-1.84 1.84-1.84.97 0 1.84.76 1.84 1.84v2.81c0 1.95-1.62 3.57-3.57 3.57-1.95 0-3.57-1.63-3.57-3.57v-6.16C1.89 6.6 6.33 2.05 11.95 2.05 17.57 2.05 22 6.6 22 12.11v6.16c0 1.95-1.62 3.57-3.57 3.57-1.95 0-3.57-1.62-3.57-3.57v-2.81c0-.97.76-1.84 1.84-1.84.97 0 1.84.76 1.84 1.84v3.03" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,health:`<path d="M8.97 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7h-6c-5 0-7 2-7 7v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m1.97 12.7 6-.02c.75 0 1.59.57 1.87 1.27l1.14 2.88c.26.65.67.65.93 0l2.29-5.81c.22-.56.63-.58.91-.05l1.04 1.97c.31.59 1.11 1.07 1.77 1.07h4.06" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,heart:`<path d="M12.62 20.81c-.34.12-.9.12-1.24 0C8.48 19.82 2 15.69 2 8.69 2 5.6 4.49 3.1 7.56 3.1c1.82 0 3.43.88 4.44 2.24a5.53 5.53 0 0 1 4.44-2.24C19.51 3.1 22 5.6 22 8.69c0 7-6.48 11.13-9.38 12.12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,hierarchy:`<path d="M5 9v7M5.25 8.5a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM5 22a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM19 22a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.13 9a4.058 4.058 0 0 0 3.94 3.04l3.43-.01a5.989 5.989 0 0 1 5.67 4.01" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,history:`<path d="M20.75 13.25c0 4.83-3.92 8.75-8.75 8.75s-8.75-3.92-8.75-8.75S7.17 4.5 12 4.5s8.75 3.92 8.75 8.75ZM12 8v5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 2h6" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"home-2":`<path d="m9.02 2.84-5.39 4.2C2.73 7.74 2 9.23 2 10.36v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21V10.5c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12ZM12 17.99v-3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,house:`<path d="m9.02 2.84-5.39 4.2C2.73 7.74 2 9.23 2 10.36v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21V10.5c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12ZM12 17.99v-3" 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>`,inbox:`<path d="M12 2v7l2-2M12 9l-2-2M1.98 13h4.41c.38 0 .72.21.89.55l1.17 2.34A2 2 0 0 0 10.24 17h3.53a2 2 0 0 0 1.79-1.11l1.17-2.34a1 1 0 0 1 .89-.55h4.36" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7 4.13c-3.54.52-5 2.6-5 6.87v4c0 5 2 7 7 7h6c5 0 7-2 7-7v-4c0-4.27-1.46-6.35-5-6.87" 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>`,instagram:`<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="M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.636 7h.012" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,kanban:`<path d="M10.5 19.9V4.1c0-1.5-.64-2.1-2.23-2.1H4.23C2.64 2 2 2.6 2 4.1v15.8c0 1.5.64 2.1 2.23 2.1h4.04c1.59 0 2.23-.6 2.23-2.1ZM22 12.9V4.1c0-1.5-.64-2.1-2.23-2.1h-4.04c-1.59 0-2.23.6-2.23 2.1v8.8c0 1.5.64 2.1 2.23 2.1h4.04c1.59 0 2.23-.6 2.23-2.1Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,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>`,layer:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M13.01 2.92l5.9 2.62c1.7.75 1.7 1.99 0 2.74l-5.9 2.62c-.67.3-1.77.3-2.44 0l-5.9-2.62c-1.7-.75-1.7-1.99 0-2.74l5.9-2.62c.67-.3 1.77-.3 2.44 0z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3 11c0 .84.63 1.81 1.4 2.15l6.79 3.02c.52.23 1.11.23 1.62 0l6.79-3.02c.77-.34 1.4-1.31 1.4-2.15"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3 16c0 .93.55 1.77 1.4 2.15l6.79 3.02c.52.23 1.11.23 1.62 0l6.79-3.02c.85-.38 1.4-1.22 1.4-2.15"></path>`,"layout-dashboard":`<path d="M5 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3H5C3 2 2 3 2 5v2c0 2 1 3 3 3ZM17 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM17 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM5 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3H5c-2 0-3 1-3 3v2c0 2 1 3 3 3Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"layout-grid":`<path d="M17 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM5 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3H5c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM6 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM18 22a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,lightbulb:`<path d="M20.78 13.65v4.94H3.22v-4.94c0-4.82 3.9-8.72 8.72-8.72h.12c4.82 0 8.72 3.9 8.72 8.72ZM12 2v2.93M15.65 18.59A3.661 3.661 0 0 1 12 22c-1.93 0-3.52-1.5-3.65-3.41h7.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>`,"lock-1":`<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>`,"log-out":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M17.44 14.62L20 12.06 17.44 9.5M9.76 12.06h10.17M11.76 20c-4.42 0-8-3-8-8s3.58-8 8-8"></path>`,login:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M11.68 14.62l2.56-2.56-2.56-2.56M4 12.06h10.17"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M12 4c4.42 0 8 3 8 8s-3.58 8-8 8"></path>`,logout:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M17.44 14.62L20 12.06 17.44 9.5M9.76 12.06h10.17M11.76 20c-4.42 0-8-3-8-8s3.58-8 8-8"></path>`,mail:`<path d="M17 20.5H7c-3 0-5-1.5-5-5v-7c0-3.5 2-5 5-5h10c3 0 5 1.5 5 5v7c0 3.5-2 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="m17 9-3.13 2.5c-1.03.82-2.72.82-3.75 0L7 9" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"map-pin":`<path d="M12 13.43a3.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"></path><path d="M3.62 8.49c1.97-8.66 14.8-8.65 16.76.01 1.15 5.08-2.01 9.38-4.78 12.04a5.193 5.193 0 0 1-7.21 0c-2.76-2.66-5.92-6.97-4.77-12.05Z" stroke="currentColor" stroke-width="1.5"></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>`,"message-question":`<path d="M17 18.43h-4l-4.45 2.96A.997.997 0 0 1 7 20.56v-2.13c-3 0-5-2-5-5v-6c0-3 2-5 5-5h10c3 0 5 2 5 5v6c0 3-2 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 11.36v-.21c0-.68.42-1.04.84-1.33.41-.28.82-.64.82-1.3 0-.92-.74-1.66-1.66-1.66-.92 0-1.66.74-1.66 1.66M11.995 13.75h.01" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"message-square":`<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>`,"message-text":`<path d="M16 2H8C4 2 2 4 2 8v13c0 .55.45 1 1 1h13c4 0 6-2 6-6V8c0-4-2-6-6-6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7 9.5h10M7 14.5h7" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,minus:`<path d="M6 12h12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,mobile:`<path d="M17 6v10c0 4-1 5-5 5H6c-4 0-5-1-5-5V6c0-4 1-5 5-5h6c4 0 5 1 5 5ZM11 4.5H7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 18.1A1.55 1.55 0 1 0 9 15a1.55 1.55 0 0 0 0 3.1Z" 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>`,"more-horizontal":`<path d="M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM19 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Z" stroke="currentColor" stroke-width="1.5"></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>`,notification:`<path d="M12.02 2.91c-3.31 0-6 2.69-6 6v2.89c0 .61-.26 1.54-.57 2.06L4.3 15.77c-.71 1.18-.22 2.49 1.08 2.93 4.31 1.44 8.96 1.44 13.27 0 1.21-.4 1.74-1.83 1.08-2.93l-1.15-1.91c-.3-.52-.56-1.45-.56-2.06V8.91c0-3.3-2.7-6-6-6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M13.87 3.2a6.754 6.754 0 0 0-3.7 0c.29-.74 1.01-1.26 1.85-1.26.84 0 1.56.52 1.85 1.26Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.02 19.06c0 1.65-1.35 3-3 3-.82 0-1.58-.34-2.12-.88a3.01 3.01 0 0 1-.88-2.12" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path>`,palette:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10 4.5V18c0 1.08-.44 2.07-1.14 2.79l-.04.04c-.09.09-.19.18-.28.25-.3.26-.64.46-.99.6-.11.05-.22.09-.33.13-.39.13-.81.19-1.22.19-.27 0-.54-.03-.8-.08-.13-.03-.26-.06-.39-.1-.16-.05-.31-.1-.46-.17 0-.01 0-.01-.01 0-.28-.14-.55-.3-.8-.49l-.01-.01c-.13-.1-.25-.2-.36-.32-.11-.12-.22-.24-.33-.37-.19-.25-.35-.52-.49-.8.01-.01.01-.01 0-.01 0 0 0-.01-.01-.02-.06-.14-.11-.29-.16-.44a5.58 5.58 0 01-.1-.39c-.05-.26-.08-.53-.08-.8V4.5C2 3 3 2 4.5 2h3C9 2 10 3 10 4.5z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M22 16.5v3c0 1.5-1 2.5-2.5 2.5H6c.41 0 .83-.06 1.22-.19.11-.04.22-.08.33-.13.35-.14.69-.34.99-.6.09-.07.19-.16.28-.25l.04-.04 6.8-6.79h3.84c1.5 0 2.5 1 2.5 2.5zM4.81 21.82c-.6-.18-1.17-.51-1.64-.99-.48-.47-.81-1.04-.99-1.64a4.02 4.02 0 002.63 2.63z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M18.37 11.29L15.66 14l-6.8 6.79C9.56 20.07 10 19.08 10 18V8.34l2.71-2.71c1.06-1.06 2.48-1.06 3.54 0l2.12 2.12c1.06 1.06 1.06 2.48 0 3.54zM6 19a1 1 0 100-2 1 1 0 000 2z"></path>`,"panel-left-close":`<path d="M21.97 15V9c0-5-2-7-7-7h-6c-5 0-7 2-7 7v6c0 5 2 7 7 7h6c5 0 7-2 7-7ZM7.97 2v20" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.97 9.44 12.41 12l2.56 2.56" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"panel-left-open":`<path d="M21.97 15V9c0-5-2-7-7-7h-6c-5 0-7 2-7 7v6c0 5 2 7 7 7h6c5 0 7-2 7-7ZM14.97 2v20" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7.97 9.44 10.53 12l-2.56 2.56" 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>`,"pen-tool":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10.75 22.5h2.52c.96 0 1.58-.68 1.4-1.51l-.41-1.81h-4.5l-.41 1.81c-.18.78.5 1.51 1.4 1.51zM14.26 19.17l1.73-1.54c.97-.86 1.01-1.46.24-2.43l-3.05-3.87c-.64-.81-1.69-.81-2.33 0L7.8 15.2c-.77.97-.77 1.6.24 2.43l1.73 1.54M12.01 11.12v2.53"></path><g><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12.52 5h-1c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h1c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1zM3.27 14.17h1c.55 0 1-.45 1-1v-1c0-.55-.45-1-1-1h-1c-.55 0-1 .45-1 1v1c0 .55.45 1 1 1zM20.73 14.17h-1c-.55 0-1-.45-1-1v-1c0-.55.45-1 1-1h1c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1zM10.52 3.56c-3.81.45-6.77 3.68-6.77 7.61M20.25 11.17c0-3.92-2.94-7.14-6.73-7.61"></path></g>`,pencil:`<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>`,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>`,plug:`<path d="M10.5 16h3c2.5 0 4-1.8 4-4V6.91c0-1.05-.86-1.91-1.91-1.91H8.42c-1.05 0-1.91.86-1.91 1.91V12C6.5 14.2 8 16 10.5 16ZM9.5 2v3M14.5 2v3M12 22v-6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,plus:`<path d="M6 12h12M12 18V6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"plus-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM8 12h8M12 16V8" stroke="currentColor" stroke-width="1.5" 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>`,"profile-circle":`<path d="M12.12 12.78a.963.963 0 0 0-.24 0 3.27 3.27 0 0 1-3.16-3.27c0-1.81 1.46-3.28 3.28-3.28a3.276 3.276 0 0 1 .12 6.55ZM18.74 19.38A9.934 9.934 0 0 1 12 22c-2.6 0-4.96-.99-6.74-2.62.1-.94.7-1.86 1.77-2.58 2.74-1.82 7.22-1.82 9.94 0 1.07.72 1.67 1.64 1.77 2.58Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,ranking:`<path d="m13.3 8.11 1.32 2.64c.18.36.66.72 1.06.78l2.39.4c1.53.26 1.89 1.36.79 2.46L17 16.25c-.31.31-.49.92-.39 1.36l.53 2.31c.42 1.82-.55 2.53-2.16 1.58l-2.24-1.33c-.41-.24-1.07-.24-1.48 0L9.02 21.5c-1.61.95-2.58.24-2.16-1.58l.53-2.31c.1-.43-.08-1.04-.39-1.36l-1.86-1.86c-1.1-1.1-.74-2.21.79-2.46l2.39-.4c.4-.07.88-.42 1.06-.78l1.32-2.64c.71-1.43 1.89-1.43 2.6 0ZM6 9V2M18 9V2M12 4V2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,receipt:`<path d="M6.73 19.7c.82-.88 2.07-.81 2.79.15l1.01 1.35c.81 1.07 2.12 1.07 2.93 0l1.01-1.35c.72-.96 1.97-1.03 2.79-.15 1.78 1.9 3.23 1.27 3.23-1.39V7.04C20.5 3.01 19.56 2 15.78 2H8.22C4.44 2 3.5 3.01 3.5 7.04V18.3c0 2.67 1.46 3.29 3.23 1.4Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.096 11h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.898 11h5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.096 7h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.898 7h5.5" stroke="currentColor" stroke-width="1.5" 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>`,"refresh-cw":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M14.55 21.67C18.84 20.54 22 16.64 22 12c0-5.52-4.44-10-10-10C5.33 2 2 7.56 2 7.56m0 0V3m0 4.56H6.44"></path><path stroke="currentColor" stroke-dasharray="3 3" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M2 12c0 5.52 4.48 10 10 10"></path>`,repeat:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M3.58 5.16h13.84c1.66 0 3 1.34 3 3v3.32"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M6.74 2L3.58 5.16l3.16 3.16M20.42 18.84H6.58c-1.66 0-3-1.34-3-3v-3.32"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M17.26 22l3.16-3.16-3.16-3.16"></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>`,"search-normal":`<path d="M11 20a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM18.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>`,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>`,"setting-2":`<path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M2 12.88v-1.76c0-1.04.85-1.9 1.9-1.9 1.81 0 2.55-1.28 1.64-2.85-.52-.9-.21-2.07.7-2.59l1.73-.99c.79-.47 1.81-.19 2.28.6l.11.19c.9 1.57 2.38 1.57 3.29 0l.11-.19c.47-.79 1.49-1.07 2.28-.6l1.73.99c.91.52 1.22 1.69.7 2.59-.91 1.57-.17 2.85 1.64 2.85 1.04 0 1.9.85 1.9 1.9v1.76c0 1.04-.85 1.9-1.9 1.9-1.81 0-2.55 1.28-1.64 2.85.52.91.21 2.07-.7 2.59l-1.73.99c-.79.47-1.81.19-2.28-.6l-.11-.19c-.9-1.57-2.38-1.57-3.29 0l-.11.19c-.47.79-1.49 1.07-2.28.6l-1.73-.99a1.899 1.899 0 0 1-.7-2.59c.91-1.57.17-2.85-1.64-2.85-1.05 0-1.9-.86-1.9-1.9Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,settings:`<path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M2 12.88v-1.76c0-1.04.85-1.9 1.9-1.9 1.81 0 2.55-1.28 1.64-2.85-.52-.9-.21-2.07.7-2.59l1.73-.99c.79-.47 1.81-.19 2.28.6l.11.19c.9 1.57 2.38 1.57 3.29 0l.11-.19c.47-.79 1.49-1.07 2.28-.6l1.73.99c.91.52 1.22 1.69.7 2.59-.91 1.57-.17 2.85 1.64 2.85 1.04 0 1.9.85 1.9 1.9v1.76c0 1.04-.85 1.9-1.9 1.9-1.81 0-2.55 1.28-1.64 2.85.52.91.21 2.07-.7 2.59l-1.73.99c-.79.47-1.81.19-2.28-.6l-.11-.19c-.9-1.57-2.38-1.57-3.29 0l-.11.19c-.47.79-1.49 1.07-2.28.6l-1.73-.99a1.899 1.899 0 0 1-.7-2.59c.91-1.57.17-2.85-1.64-2.85-1.05 0-1.9-.86-1.9-1.9Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"share-2":`<path d="M16.96 6.17c2 1.39 3.38 3.6 3.66 6.15M3.49 12.37a8.601 8.601 0 0 1 3.6-6.15M8.19 20.94c1.16.59 2.48.92 3.87.92 1.34 0 2.6-.3 3.73-.85M12.06 7.7a2.78 2.78 0 1 0 0-5.56 2.78 2.78 0 0 0 0 5.56ZM4.83 19.92a2.78 2.78 0 1 0 0-5.56 2.78 2.78 0 0 0 0 5.56ZM19.17 19.92a2.78 2.78 0 1 0 0-5.56 2.78 2.78 0 0 0 0 5.56Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,shield:`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"shield-check":`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m9.05 11.87 1.61 1.61 4.3-4.3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"shield-lock":`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 12.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 12.5v3" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"shield-plus":`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 12.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 12.5v3" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"shield-tick":`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m9.05 11.87 1.61 1.61 4.3-4.3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,shop:`<path d="M3.01 11.22v4.49C3.01 20.2 4.81 22 9.3 22h5.39c4.49 0 6.29-1.8 6.29-6.29v-4.49" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 12c1.83 0 3.18-1.49 3-3.32L14.34 2H9.67L9 8.68C8.82 10.51 10.17 12 12 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.31 12c2.02 0 3.5-1.64 3.3-3.65l-.28-2.75C20.97 3 19.97 2 17.35 2H14.3l.7 7.01c.17 1.65 1.66 2.99 3.31 2.99ZM5.64 12c1.65 0 3.14-1.34 3.3-2.99l.22-2.21.48-4.8H6.59C3.97 2 2.97 3 2.61 5.6l-.27 2.75C2.14 10.36 3.62 12 5.64 12ZM12 17c-1.67 0-2.5.83-2.5 2.5V22h5v-2.5c0-1.67-.83-2.5-2.5-2.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,sort:`<path d="M3 7h18M6 12h12M10 17h4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>`,sparkles:`<path d="m17.29 4.14-.07 3.79c-.01.52.32 1.21.74 1.52l2.48 1.88c1.59 1.2 1.33 2.67-.57 3.27l-3.23 1.01c-.54.17-1.11.76-1.25 1.31l-.77 2.94c-.61 2.32-2.13 2.55-3.39.51l-1.76-2.85c-.32-.52-1.08-.91-1.68-.88l-3.34.17c-2.39.12-3.07-1.26-1.51-3.08l1.98-2.3c.37-.43.54-1.23.37-1.77L4.28 6.43c-.59-1.9.47-2.95 2.36-2.33l2.95.97c.5.16 1.25.05 1.67-.26l3.08-2.22c1.66-1.2 2.99-.5 2.95 1.55ZM21.91 22l-3.03-3.03" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,star:`<path d="m13.73 3.51 1.76 3.52c.24.49.88.96 1.42 1.05l3.19.53c2.04.34 2.52 1.82 1.05 3.28l-2.48 2.48c-.42.42-.65 1.23-.52 1.81l.71 3.07c.56 2.43-.73 3.37-2.88 2.1l-2.99-1.77c-.54-.32-1.43-.32-1.98 0l-2.99 1.77c-2.14 1.27-3.44.32-2.88-2.1l.71-3.07c.13-.58-.1-1.39-.52-1.81l-2.48-2.48c-1.46-1.46-.99-2.94 1.05-3.28l3.19-.53c.53-.09 1.17-.56 1.41-1.05l1.76-3.52c.96-1.91 2.52-1.91 3.47 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,stars:`<path d="m17.29 4.14-.07 3.79c-.01.52.32 1.21.74 1.52l2.48 1.88c1.59 1.2 1.33 2.67-.57 3.27l-3.23 1.01c-.54.17-1.11.76-1.25 1.31l-.77 2.94c-.61 2.32-2.13 2.55-3.39.51l-1.76-2.85c-.32-.52-1.08-.91-1.68-.88l-3.34.17c-2.39.12-3.07-1.26-1.51-3.08l1.98-2.3c.37-.43.54-1.23.37-1.77L4.28 6.43c-.59-1.9.47-2.95 2.36-2.33l2.95.97c.5.16 1.25.05 1.67-.26l3.08-2.22c1.66-1.2 2.99-.5 2.95 1.55ZM21.91 22l-3.03-3.03" 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>`,task:`<path d="M11 19.5h10M11 12.5h10M11 5.5h10M3 5.5l1 1 3-3M3 12.5l1 1 3-3M3 19.5l1 1 3-3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"task-square":`<path d="M12.37 8.88h5.25M6.38 8.88l.75.75 2.25-2.25M12.37 15.88h5.25M6.38 15.88l.75.75 2.25-2.25" 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 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,telephone:`<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>`,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>`,"tick-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>`,trash:`<path d="M21 5.98c-3.33-.33-6.68-.5-10.02-.5-1.98 0-3.96.1-5.94.3L3 5.98M8.5 4.97l.22-1.31C8.88 2.71 9 2 10.69 2h2.62c1.69 0 1.82.75 1.97 1.67l.22 1.3M18.85 9.14l-.65 10.07C18.09 20.78 18 22 15.21 22H8.79C6 22 5.91 20.78 5.8 19.21L5.15 9.14M10.33 16.5h3.33M9.5 12.5h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"trash-2":`<path d="M21 5.98c-3.33-.33-6.68-.5-10.02-.5-1.98 0-3.96.1-5.94.3L3 5.98M8.5 4.97l.22-1.31C8.88 2.71 9 2 10.69 2h2.62c1.69 0 1.82.75 1.97 1.67l.22 1.3M18.85 9.14l-.65 10.07C18.09 20.78 18 22 15.21 22H8.79C6 22 5.91 20.78 5.8 19.21L5.15 9.14M10.33 16.5h3.33M9.5 12.5h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"trending-up":`<path d="m16.5 9.5-4.2 4.2-1.6-2.4-3.2 3.2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.5 9.5h2v2" 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 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,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>`,"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>`,upload:`<path d="M9 17v-6l-2 2M9 11l2 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>`,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>`,"user-check":`<path d="m14.44 19.05 1.52 1.52L19 17.53M12.16 10.87c-.1-.01-.22-.01-.33 0a4.42 4.42 0 0 1-4.27-4.43A4.428 4.428 0 0 1 11.99 2c2.45 0 4.44 1.99 4.44 4.44 0 2.4-1.9 4.35-4.27 4.43ZM11.99 21.81c-1.82 0-3.63-.46-5.01-1.38-2.42-1.62-2.42-4.26 0-5.87 2.75-1.84 7.26-1.84 10.01 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"user-edit":`<path d="M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m19.21 15.74-3.54 3.54c-.14.14-.27.4-.3.59l-.19 1.35c-.07.49.27.83.76.76l1.35-.19c.19-.03.46-.16.59-.3l3.54-3.54c.61-.61.9-1.32 0-2.22-.89-.89-1.6-.6-2.21.01Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.7 16.25c.3 1.08 1.14 1.92 2.22 2.22" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.41 22c0-3.87 3.85-7 8.59-7 1.04 0 2.04.15 2.97.43" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"user-minus":`<path d="M19.5 19h-4M12.15 10.87c-.1-.01-.22-.01-.33 0a4.42 4.42 0 0 1-4.27-4.43C7.55 3.99 9.53 2 11.99 2a4.435 4.435 0 0 1 .16 8.87ZM11.99 21.81c-1.82 0-3.63-.46-5.01-1.38-2.42-1.62-2.42-4.26 0-5.87 2.75-1.84 7.26-1.84 10.01 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"user-plus":`<path d="M18.5 19.5h-4M16.5 21.5v-4M12.16 10.87c-.1-.01-.22-.01-.33 0a4.42 4.42 0 0 1-4.27-4.43A4.428 4.428 0 0 1 11.99 2c2.45 0 4.44 1.99 4.44 4.44 0 2.4-1.9 4.35-4.27 4.43ZM11.99 21.81c-1.82 0-3.63-.46-5.01-1.38-2.42-1.62-2.42-4.26 0-5.87 2.75-1.84 7.26-1.84 10.01 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,users:`<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>`,"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>`,"volume-slash":`<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>`,wallet2:`<path d="M13 9H7M22 10.97v2.06c0 .55-.44 1-1 1.02h-1.96c-1.08 0-2.07-.79-2.16-1.87-.06-.63.18-1.22.6-1.63.37-.38.88-.6 1.44-.6H21c.56.02 1 .47 1 1.02Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.48 10.55c-.42.41-.66 1-.6 1.63.09 1.08 1.08 1.87 2.16 1.87H21v1.45c0 3-2 5-5 5H7c-3 0-5-2-5-5v-7c0-2.72 1.64-4.62 4.19-4.94.26-.04.53-.06.81-.06h9c.26 0 .51.01.75.05C19.33 3.85 21 5.76 21 8.5v1.45h-2.08c-.56 0-1.07.22-1.44.6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"wand-sparkles":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3.5 20.5c.83.83 2.17.83 3 0l13-13c.83-.83.83-2.17 0-3-.83-.83-2.17-.83-3 0l-13 13c-.83.83-.83 2.17 0 3zM18.01 8.99l-3-3"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8.5 2.44L10 2l-.44 1.5L10 5l-1.5-.44L7 5l.44-1.5L7 2l1.5.44zM4.5 8.44L6 8l-.44 1.5L6 11l-1.5-.44L3 11l.44-1.5L3 8l1.5.44zM19.5 13.44L21 13l-.44 1.5L21 16l-1.5-.44L18 16l.44-1.5L18 13l1.5.44z"></path>`,"warning-2":`<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>`,whatsapp:`<path d="M6.9 20.6c1.5.9 3.3 1.4 5.1 1.4 5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12c0 1.8.5 3.5 1.3 5l-.86 3.306a1 1 0 0 0 1.243 1.213L6.9 20.6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16.5 14.848c0 .162-.036.329-.113.491a1.856 1.856 0 0 1-.306.459c-.221.243-.464.418-.74.531-.27.113-.563.171-.878.171-.46 0-.951-.108-1.47-.328a7.922 7.922 0 0 1-1.55-.892 12.95 12.95 0 0 1-1.478-1.26 12.79 12.79 0 0 1-1.257-1.471 8.02 8.02 0 0 1-.884-1.534C7.608 10.5 7.5 10.01 7.5 9.543c0-.306.054-.598.162-.868.108-.275.28-.527.519-.752.288-.284.603-.423.937-.423.126 0 .252.027.365.081.117.054.22.135.302.252l1.046 1.472c.08.112.14.216.18.315.04.094.063.189.063.274a.61.61 0 0 1-.095.32 1.53 1.53 0 0 1-.252.319l-.343.356a.24.24 0 0 0-.072.18c0 .035.005.067.014.103.013.036.027.063.036.09.08.149.22.342.419.576.203.234.419.473.653.711.244.239.478.459.717.662.234.197.428.332.581.413l.082.037a.311.311 0 0 0 .112.018.248.248 0 0 0 .185-.077l.342-.338c.113-.112.221-.197.325-.252a.6.6 0 0 1 .32-.094.72.72 0 0 1 .275.059c.099.04.203.098.315.175l1.492 1.058a.683.683 0 0 1 .248.287.921.921 0 0 1 .072.351Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></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"/>`,"x-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM9.17 14.83l5.66-5.66M14.83 14.83 9.17 9.17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,youtube:`<path d="M17 20H7c-3 0-5-2-5-5V9c0-3 2-5 5-5h10c3 0 5 2 5 5v6c0 3-2 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="m11.4 9.5 2.5 1.5c.9.6.9 1.5 0 2.1l-2.5 1.5c-1 .6-1.8.1-1.8-1v-3c0-1.3.8-1.7 1.8-1.1Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,zap:`<path d="M6.09 13.28h3.09v7.2c0 1.68.91 2.02 2.02.76l7.57-8.6c.93-1.05.54-1.92-.87-1.92h-3.09v-7.2c0-1.68-.91-2.02-2.02-.76l-7.57 8.6c-.92 1.06-.53 1.92.87 1.92Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"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>`};Object.keys(Kn);function R(e,{size:t=16,className:n=``,style:r=``}={}){let i=Kn[e];return i?`<svg class="${n?`wui-icon ${n}`:`wui-icon`}" data-icon="${e}" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" aria-hidden="true" style="vertical-align:-.125em${r?`;${r}`:``}">${i}</svg>`:``}function qn(e){let{getVisibleOptions:t,getActive:n,setActive:r,onEnter:i,onEscape:a,onTypeahead:o,typeaheadMs:s=500}=e,c=``,l=null,u=()=>{clearTimeout(l),l=null,c=``};return{handler:e=>{let d=t(),f=n(),p=e.target?.tagName===`INPUT`||e.target?.tagName===`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&&e.target?.tagName!==`INPUT`&&e.target?.tagName!==`TEXTAREA`){e.preventDefault(),clearTimeout(l),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 Jn(e,t){let n=e.querySelector(`.is-active`);n!==t&&(n?.classList.remove(`is-active`),t?.classList.add(`is-active`))}var Yn=Symbol(`wui.trustedHtml`),Xn=e=>({...e,[Yn]:!0}),z=e=>String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`),Zn=e=>{if(!e)return``;let t=String(e).toLowerCase().replace(/[^a-z0-9-]/g,``);return t?R(t):``},Qn=e=>`wui-flag wui-flag-${e}`,$n=e=>{let t=String(e??``).toLowerCase();return/^[a-z]{2}$/.test(t)?`<span class="${Qn(t)}" aria-hidden="true"></span>`:``},er=e=>{if(e==null)return``;let t=e[Yn]?String(e.label??``):z(e.label),n=$n(e.flag)+Zn(e.icon);return n?`<span class="wui-opt-label">${n}${t}</span>`:t},tr=e=>String(e??``).replace(/<[^>]*>/g,``),nr=new WeakMap,rr=e=>{if(e==null)return``;if(!e[Yn])return tr(e.label);let t=nr.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 nr.set(e,{label:e.label,text:r}),r},ir=class extends c{static formAssociated=!0;_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||`Select`}static get observedAttributes(){return[`value`,`placeholder`,`disabled`,`min-chars`,`debounce`,`remote`,`size`,`aria-label`,`allow-custom`,`aria-invalid`]}constructor(){super(),this._value=``,this._label=``,this._optionsProp=null,this._loading=!1,this._active=-1,this._timer=null,this._reqSeq=0,this._pendingSearch=null,this._typeahead=``,this._typeaheadTimer=null;try{this._internals=this.attachInternals()}catch{this._internals=null}}connectedCallback(){if(!this._rendered){this._defaultCaptured||=(this._defaultValue=this._value,!0),this.render();return}if(this._bindGlobal?.(),this._pendingSearch){let{query:e,seq:t}=this._pendingSearch;clearTimeout(this._timer),this._timer=setTimeout(()=>this._fireSearch(e,t),this._debounceMs)}}formResetCallback(){this.value=this._defaultValue||``}attributeChangedCallback(e,t,n){if(e===`value`){this.value=n;return}if(e===`aria-invalid`){this._syncInvalid();return}this._rendered&&this.render()}_syncInvalid(){let e=this.querySelector(`.search-select-control`);e&&(this.hasAttribute(`aria-invalid`)?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}get value(){return this._value}set value(e){this._value=e==null?``:String(e),I(this,this._value);let t=this._readOptions().find(e=>String(e.value)===this._value);this._label=t?rr(t):``,this._syncInput(),this._renderOptions(``)}set options(e){this._optionsProp=Array.isArray(e)?e:[];let t=this._readOptions().find(e=>String(e.value)===this._value);t&&(this._label=rr(t)),this._renderOptions(),this._syncInput()}get options(){return this._readOptions()}set loading(e){this._loading=!!e,this._renderLoading(),this._renderOptions()}get loading(){return this._loading}get _remote(){return this.hasAttribute(`remote`)}get _allowCustom(){return this.hasAttribute(`allow-custom`)}_matchesKnownOption(e){let t=e.toLowerCase();return this._readOptions().some(e=>rr(e).toLowerCase()===t||String(e.value??``).toLowerCase()===t)}get _minChars(){let e=+!!this._remote,t=this.getAttribute(`min-chars`);if(t==null||t.trim()===``)return e;let n=Number(t);return Number.isInteger(n)&&n>=0?n:e}get _debounceMs(){let e=this.getAttribute(`debounce`);if(e==null||e===``)return 250;let t=Number(e);return Number.isFinite(t)&&t>=0?t:250}_snapshotDeclared(){if(this._declared)return;let e=[...this.querySelectorAll(`:scope > wui-option`)];e.length&&(this._declared=e.map(e=>({value:e.getAttribute(`value`)??e.textContent.trim(),label:e.innerHTML,icon:e.getAttribute(`icon`)||void 0,[Yn]:!0,selected:e.hasAttribute(`selected`)})))}_readOptions(){return this._optionsProp?this._optionsProp:(this._snapshotDeclared(),this._declared||[])}render(){this._snapshotDeclared();let e=this.getAttribute(`placeholder`)||`Search…`,t=this.getAttribute(`size`),n=t===`sm`?` search-select-sm`:t===`lg`?` search-select-lg`:``;this.id||=`wui-autocomplete-${Math.random().toString(36).slice(2,9)}`;let r=`${this.id}-listbox`;this._listboxId=r,this.innerHTML=`
10
+ <defs><clipPath id="wui_error_clip0"><rect x="32" y="32" width="110" height="110" rx="55" fill="white"/></clipPath><clipPath id="wui_error_clip1"><rect width="55" height="55" fill="white" transform="translate(59.3535 59.502)"/></clipPath></defs>`},Yr=[`success`,`error`,`warning`,`info`,`delete`,`primary`],Xr=class extends c{static get observedAttributes(){return[`tone`,`size`]}connectedCallback(){this.render()}attributeChangedCallback(){this.isConnected&&this.render()}render(){let e=this.getAttribute(`tone`),t=Number.parseInt(this.getAttribute(`size`),10)||72,n=Jr[e];if(n){this.innerHTML=`<svg width="${t}" height="${t}" viewBox="0 0 174 174" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${n}</svg>`;return}let r=qr[e]||qr.info;this.innerHTML=`<img src="${r}" width="${t}" height="${t}" alt="" aria-hidden="true" draggable="false" />`}},Zr=!1,Qr=!1;function $r(){Qr||typeof document>`u`||(Qr=!0,document.addEventListener(`keydown`,e=>{Zr=e.key===`Tab`},!0),document.addEventListener(`keyup`,()=>{Zr=!1},!0))}function ei(){return Zr}var ti=`data-wui-mirror`;function ni(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 ri(e){let t=document.createElement(`input`);return t.type=`hidden`,t.setAttribute(ti,``),e.appendChild(t),t}function B(e,t){let n=e.getAttribute(`name`),r=e.querySelector(`:scope > input[${ti}]`);if(!n){r?.remove();return}r||=ri(e),ni(e,r,n,t)}function V(e,t){let n=e.getAttribute(`name`),r=[...e.querySelectorAll(`:scope > input[${ti}]`)],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)=>{ni(e,r[i]??ri(e),n,t)})}function ii(e){let{getVisibleOptions:t,getActive:n,setActive:r,onEnter:i,onEscape:a,onTypeahead:o,typeaheadMs:s=500}=e,c=``,l=null,u=()=>{clearTimeout(l),l=null,c=``};return{handler:e=>{let d=t(),f=n(),p=e.target?.tagName===`INPUT`||e.target?.tagName===`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&&e.target?.tagName!==`INPUT`&&e.target?.tagName!==`TEXTAREA`){e.preventDefault(),clearTimeout(l),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 ai(e,t){let n=e.querySelector(`.is-active`);n!==t&&(n?.classList.remove(`is-active`),t?.classList.add(`is-active`))}var oi=Symbol(`wui.trustedHtml`),si=e=>({...e,[oi]:!0}),H=e=>String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`),ci=e=>{if(!e)return``;let t=String(e).toLowerCase().replace(/[^a-z0-9-]/g,``);return t?M(t):``},li=e=>`wui-flag wui-flag-${e}`,ui=e=>{let t=String(e??``).toLowerCase();return/^[a-z]{2}$/.test(t)?`<span class="${li(t)}" aria-hidden="true"></span>`:``},di=e=>{if(e==null)return``;let t=e[oi]?String(e.label??``):H(e.label),n=ui(e.flag)+ci(e.icon);return n?`<span class="wui-opt-label">${n}${t}</span>`:t},fi=e=>String(e??``).replace(/<[^>]*>/g,``),pi=new WeakMap,mi=e=>{if(e==null)return``;if(!e[oi])return fi(e.label);let t=pi.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 pi.set(e,{label:e.label,text:r}),r},hi=class extends c{static formAssociated=!0;_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||`Select`}static get observedAttributes(){return[`value`,`placeholder`,`disabled`,`min-chars`,`debounce`,`remote`,`size`,`aria-label`,`allow-custom`,`aria-invalid`]}constructor(){super(),this._value=``,this._label=``,this._optionsProp=null,this._loading=!1,this._active=-1,this._timer=null,this._reqSeq=0,this._pendingSearch=null,this._typeahead=``,this._typeaheadTimer=null;try{this._internals=this.attachInternals()}catch{this._internals=null}}connectedCallback(){if(!this._rendered){this._defaultCaptured||=(this._defaultValue=this._value,!0),this.render();return}if(this._bindGlobal?.(),this._pendingSearch){let{query:e,seq:t}=this._pendingSearch;clearTimeout(this._timer),this._timer=setTimeout(()=>this._fireSearch(e,t),this._debounceMs)}}formResetCallback(){this.value=this._defaultValue||``}attributeChangedCallback(e,t,n){if(e===`value`){this.value=n;return}if(e===`aria-invalid`){this._syncInvalid();return}this._rendered&&this.render()}_syncInvalid(){let e=this.querySelector(`.search-select-control`);e&&(this.hasAttribute(`aria-invalid`)?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}get value(){return this._value}set value(e){this._value=e==null?``:String(e),B(this,this._value);let t=this._readOptions().find(e=>String(e.value)===this._value);this._label=t?mi(t):``,this._syncInput(),this._renderOptions(``)}set options(e){this._optionsProp=Array.isArray(e)?e:[];let t=this._readOptions().find(e=>String(e.value)===this._value);t&&(this._label=mi(t)),this._renderOptions(),this._syncInput()}get options(){return this._readOptions()}set loading(e){this._loading=!!e,this._renderLoading(),this._renderOptions()}get loading(){return this._loading}get _remote(){return this.hasAttribute(`remote`)}get _allowCustom(){return this.hasAttribute(`allow-custom`)}_matchesKnownOption(e){let t=e.toLowerCase();return this._readOptions().some(e=>mi(e).toLowerCase()===t||String(e.value??``).toLowerCase()===t)}get _minChars(){let e=+!!this._remote,t=this.getAttribute(`min-chars`);if(t==null||t.trim()===``)return e;let n=Number(t);return Number.isInteger(n)&&n>=0?n:e}get _debounceMs(){let e=this.getAttribute(`debounce`);if(e==null||e===``)return 250;let t=Number(e);return Number.isFinite(t)&&t>=0?t:250}_snapshotDeclared(){if(this._declared)return;let e=[...this.querySelectorAll(`:scope > wui-option`)];e.length&&(this._declared=e.map(e=>({value:e.getAttribute(`value`)??e.textContent.trim(),label:e.innerHTML,icon:e.getAttribute(`icon`)||void 0,[oi]:!0,selected:e.hasAttribute(`selected`)})))}_readOptions(){return this._optionsProp?this._optionsProp:(this._snapshotDeclared(),this._declared||[])}render(){this._snapshotDeclared();let e=this.getAttribute(`placeholder`)||`Search…`,t=this.getAttribute(`size`),n=t===`sm`?` search-select-sm`:t===`lg`?` search-select-lg`:``;this.id||=`wui-autocomplete-${Math.random().toString(36).slice(2,9)}`;let r=`${this.id}-listbox`;this._listboxId=r,this.innerHTML=`
11
11
  <div class="search-select${n}">
12
- <div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${ar(r)}" aria-label="${ar(this._accessibleName())}"${this.hasAttribute(`aria-invalid`)?` aria-invalid="true"`:``}>
13
- <input class="search-select-input search-select-ac-input" placeholder="${ar(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute(`disabled`)?` disabled`:``} />
12
+ <div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${gi(r)}" aria-label="${gi(this._accessibleName())}"${this.hasAttribute(`aria-invalid`)?` aria-invalid="true"`:``}>
13
+ <input class="search-select-input search-select-ac-input" placeholder="${gi(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute(`disabled`)?` disabled`:``} />
14
14
  <span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
15
- <button type="button" class="search-select-clear" aria-label="Clear" hidden>${R(`x`)}</button>
15
+ <button type="button" class="search-select-clear" aria-label="Clear" hidden>${M(`x`)}</button>
16
16
  </div>
17
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${ar(r)}" tabindex="-1" hidden>
17
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${gi(r)}" tabindex="-1" hidden>
18
18
  <div class="search-select-options"></div>
19
19
  <div class="search-select-empty" hidden>No matches</div>
20
20
  <div class="search-select-hint" hidden>Type to search…</div>
21
21
  </div>
22
- </div>`,this._rendered=!0,I(this,this._value),this._wire(),this._syncInput(),this._renderOptions()}_refs(){return{control:this.querySelector(`.search-select-control`),input:this.querySelector(`.search-select-ac-input`),menu:this.querySelector(`.search-select-menu`),spinner:this.querySelector(`.search-select-spinner`),clear:this.querySelector(`.search-select-clear`),optionsWrap:this.querySelector(`.search-select-options`),empty:this.querySelector(`.search-select-empty`),hint:this.querySelector(`.search-select-hint`)}}_optionEls(){return[...this.querySelectorAll(`.search-select-option`)]}_syncInput(){let{input:e,clear:t}=this._refs();e&&document.activeElement!==e&&(e.value=this._label),t&&(t.hidden=!this._value&&!e?.value)}_renderLoading(){let{spinner:e}=this._refs();e&&(e.hidden=!this._loading)}_renderOptions(e){let t=this._refs();if(!t.optionsWrap)return;let n=e??(t.input?t.input.value:``),r=n.trim().toLowerCase(),i=this._readOptions();!this._remote&&r&&(i=i.filter(e=>rr(e).toLowerCase().includes(r)));let a=n.trim(),o=this._allowCustom&&a&&!this._matchesKnownOption(a)?[...i,{value:a,custom:!0}]:i,s=this._listboxId||`${this.id||`wui-autocomplete`}-listbox`;t.optionsWrap.innerHTML=o.map((e,t)=>{let n=`${s}-opt-${t}`;if(e.custom){let t=`Add “${z(e.value)}”`;return`<button type="button" role="option" id="${ar(n)}" class="search-select-option search-select-option-custom" data-value="${ar(e.value)}" data-custom="true" aria-selected="false">${t}</button>`}let r=String(e.value)===String(this._value);return`<button type="button" role="option" id="${ar(n)}" class="search-select-option${r?` selected`:``}" data-value="${ar(e.value)}" aria-selected="${r}">${er(e)}</button>`}).join(``),this._active=-1,t.control?.removeAttribute(`aria-activedescendant`);let c=r.length<this._minChars;t.hint&&(t.hint.hidden=!(this._remote&&c&&!i.length)),t.empty&&(t.empty.hidden=this._loading||o.length>0||this._remote&&c),this._reanchor?.()}_wire(){this._teardown();let e=this._refs();if(!e.control||!e.input)return;let t=()=>a(e.control,e.menu,{matchWidth:!0}),n=()=>this._optionEls().filter(e=>!e.hidden),r=(t,{reveal:r=!0}={})=>{let i=n();this._active=t,Jn(e.optionsWrap,t>=0&&i[t]||null),t>=0&&i[t]?(r&&i[t].scrollIntoView({block:`nearest`}),e.control.setAttribute(`aria-activedescendant`,i[t].id)):e.control.removeAttribute(`aria-activedescendant`)},i=()=>!e.menu.hidden,c=()=>{i()&&t()},l=()=>{!this._remote||this._minChars!==0||e.input.value.trim()||(clearTimeout(this._timer),this._fireSearch(``,++this._reqSeq))},u=({load:n=!0}={})=>{e.menu.hidden=!1,e.control.setAttribute(`aria-expanded`,`true`),e.control.classList.add(`open`),t(),o(this,c),n&&l(),this._renderOptions()},d=()=>{e.menu.hidden=!0,e.control.setAttribute(`aria-expanded`,`false`),e.control.classList.remove(`open`),r(-1),clearTimeout(this._typeaheadTimer),this._typeaheadTimer=null,this._typeahead=``,this._syncInput(),s(this)},f=t=>{let n=t.dataset.custom===`true`;this._value=t.dataset.value;let r=n?null:this._readOptions().find(e=>String(e.value)===t.dataset.value);this._label=n?t.dataset.value:r?rr(r):tr(t.innerHTML),I(this,this._value),e.input.value=this._label,this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,detail:{isCustom:n}})),d(),e.input.focus()},p=t=>{this._value=t,this._label=t,I(this,t),e.input.value=t,this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,detail:{isCustom:!0}})),d()},m=()=>{let t=e.input.value;if(e.clear&&(e.clear.hidden=!t),i()||u({load:!1}),this._remote){if(this._renderOptions(t),clearTimeout(this._timer),t.trim().length<this._minChars){this._pendingSearch=null;return}let e=++this._reqSeq;this._pendingSearch={query:t,seq:e},this._timer=setTimeout(()=>this._fireSearch(t,e),this._debounceMs)}else this._renderOptions(t)};this._navHandler=qn({getVisibleOptions:n,getActive:()=>this._active,setActive:e=>r(e),onEnter:(t,n)=>{if(n[this._active])f(n[this._active]);else if(this._allowCustom){let t=e.input.value.trim();t&&!this._matchesKnownOption(t)&&p(t)}},onEscape:()=>{this._navHandler.clearTypeahead(),d()}});let h=e=>{let t=e.target?.tagName===`INPUT`||e.target?.tagName===`TEXTAREA`;if(e.key===`ArrowDown`){e.preventDefault(),i()||u();let t=n();r(Math.min(this._active+1,t.length-1));return}else if(e.key===`ArrowUp`){e.preventDefault(),r(Math.max(this._active-1,0));return}else if((e.key===`Home`||e.key===`End`||e.key===`PageDown`||e.key===`PageUp`)&&(!i()||t))return;else if(e.key.length===1&&(e.ctrlKey||e.metaKey||e.altKey||!i()||e.target?.tagName===`INPUT`||e.target?.tagName===`TEXTAREA`)&&(!i()||e.target?.tagName===`INPUT`||e.target?.tagName===`TEXTAREA`))return;e.key===`Escape`&&i()&&(e.preventDefault(),e.stopPropagation()),this._navHandler.handler(e)};Vn(),e.input.addEventListener(`focus`,()=>{Hn()&&!i()&&u()}),e.control.addEventListener(`click`,t=>{e.input.disabled||t.target.closest(`.search-select-clear`)||(t.target!==e.input&&e.input.focus(),i()||u())}),e.input.addEventListener(`input`,m),e.input.addEventListener(`keydown`,h),e.menu.addEventListener(`keydown`,h),e.input.addEventListener(`blur`,t=>{if(!this._allowCustom||t.relatedTarget&&this.contains(t.relatedTarget))return;let n=e.input.value.trim();!n||n===this._label||this._matchesKnownOption(n)||p(n)}),e.optionsWrap.addEventListener(`click`,e=>{let t=e.target.closest(`.search-select-option`);t&&f(t)}),e.optionsWrap.addEventListener(`mousemove`,e=>{let t=e.target.closest(`.search-select-option`);t&&!t.classList.contains(`is-active`)&&r(this._optionEls().indexOf(t),{reveal:!1})}),e.optionsWrap.addEventListener(`mouseleave`,()=>r(-1)),e.clear?.addEventListener(`click`,()=>{this._value=``,this._label=``,I(this,``),e.input.value=``,e.clear.hidden=!0,this._renderOptions(``),this.dispatchEvent(new Event(`change`,{bubbles:!0})),e.input.focus(),i()?l():u()}),this._bindGlobal=()=>{this._teardown(),this._onDocClick=e=>{i()&&!this.contains(e.target)&&d()},document.addEventListener(`click`,this._onDocClick),i()&&o(this,c)},this._bindGlobal()}_fireSearch(e,t){this._pendingSearch=null,this.dispatchEvent(new CustomEvent(`search`,{bubbles:!0,detail:{query:e,seq:t}}))}_teardown(){this._onDocClick&&=(document.removeEventListener(`click`,this._onDocClick),null),s(this),clearTimeout(this._timer),this._navHandler?.teardown()}disconnectedCallback(){this._teardown()}},ar=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),or=Object.freeze({slide:(e,t)=>`${e} of ${t}`,status:(e,t,n)=>e===t?`Slide ${e} of ${n}`:`Slides ${e} to ${t} of ${n}`,dot:`Go to slide`,pause:`Pause`,play:`Play`}),sr=120,cr=class extends c{static get observedAttributes(){return[`autoplay`]}constructor(){super(),this._page=0,this._pages=1,this._perView=1,this._paused=!1,this._hover=!1,this._focus=!1,this._timer=null,this._settleTimer=null,this._status=``,this._ready=!1,this._motion=null,this._mutations=null,this._resizer=null,this._doc=null,this._onClick=e=>this._click(e),this._onKeyDown=e=>this._key(e),this._onScroll=()=>{clearTimeout(this._settleTimer),this._settleTimer=setTimeout(()=>this._settle(),sr)},this._onEnter=()=>this._hold({hover:!0}),this._onLeave=()=>this._hold({hover:!1}),this._onFocusIn=()=>this._hold({focus:!0}),this._onFocusOut=e=>this._hold({focus:!!e.relatedTarget&&this.contains(e.relatedTarget)}),this._onVisibility=()=>this._sync(),this._onMotion=()=>this._sync(),this._tick=()=>{this._timer=null,this._go(this._page+1<this._pages?this._page+1:0)}}connectedCallback(){if(this._track=this.querySelector(`.wui-carousel-track`),!this._track){this.ownerDocument.readyState===`loading`&&this.ownerDocument.addEventListener(`DOMContentLoaded`,()=>this.isConnected&&this.connectedCallback(),{once:!0});return}this._doc=this.ownerDocument,this._motion=typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(`(prefers-reduced-motion: reduce)`):null,this._motion?.addEventListener(`change`,this._onMotion),this.addEventListener(`click`,this._onClick),this.addEventListener(`mouseenter`,this._onEnter),this.addEventListener(`mouseleave`,this._onLeave),this.addEventListener(`focusin`,this._onFocusIn),this.addEventListener(`focusout`,this._onFocusOut),this._track.addEventListener(`keydown`,this._onKeyDown),this._track.addEventListener(`scroll`,this._onScroll,{passive:!0}),this._doc.addEventListener(`visibilitychange`,this._onVisibility),typeof MutationObserver<`u`&&(this._mutations=new MutationObserver(()=>this._refresh()),this._mutations.observe(this._track,{childList:!0})),typeof ResizeObserver<`u`&&(this._resizer=new ResizeObserver(()=>this._refresh()),this._resizer.observe(this._track)),this._ready=!0,this._refresh()}disconnectedCallback(){this._ready=!1,clearTimeout(this._timer),clearTimeout(this._settleTimer),this._timer=null,this._motion?.removeEventListener(`change`,this._onMotion),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`mouseenter`,this._onEnter),this.removeEventListener(`mouseleave`,this._onLeave),this.removeEventListener(`focusin`,this._onFocusIn),this.removeEventListener(`focusout`,this._onFocusOut),this._track?.removeEventListener(`keydown`,this._onKeyDown),this._track?.removeEventListener(`scroll`,this._onScroll),this._doc?.removeEventListener(`visibilitychange`,this._onVisibility),this._mutations?.disconnect(),this._resizer?.disconnect(),this._mutations=this._resizer=this._motion=this._doc=null}attributeChangedCallback(){this._ready&&this._sync()}get paused(){return this._paused}set paused(e){this._paused=!!e,this._ready&&this._sync()}next(){this._page+1<this._pages?this._go(this._page+1):this.hasAttribute(`loop`)&&this._go(0)}prev(){this._page>0?this._go(this._page-1):this.hasAttribute(`loop`)&&this._go(this._pages-1)}goTo(e){this._go(Number(e))}_interval(){let e=Number.parseInt(this.getAttribute(`autoplay`)??``,10);return e>0?e:0}_slides(){return Array.from(this._track.children).filter(e=>e.classList.contains(`wui-carousel-slide`))}_playing(){return this._interval()>0&&this._pages>1&&!this._paused&&!this._hover&&!this._focus&&!this._motion?.matches&&!this._doc?.hidden}_hold({hover:e=this._hover,focus:t=this._focus}){this._hover=e,this._focus=t,this._sync()}_click(e){let t=e.target.closest?.(`.wui-carousel-pause, .wui-carousel-prev, .wui-carousel-next, .wui-carousel-dot`);!t||!this.contains(t)||this._track.contains(t)||(t.classList.contains(`wui-carousel-pause`)?(this._paused=!this._paused,this._hover=!1,this._focus=!1,this._sync()):t.getAttribute(`aria-disabled`)===`true`?e.preventDefault():t.classList.contains(`wui-carousel-prev`)?this.prev():t.classList.contains(`wui-carousel-next`)?this.next():this._go(Number(t.dataset.page)))}_key(e){if(e.target!==this._track||e.altKey||e.ctrlKey||e.metaKey)return;let t={ArrowRight:()=>this.next(),ArrowLeft:()=>this.prev(),Home:()=>this._go(0),End:()=>this._go(this._pages-1)}[e.key];t&&(e.preventDefault(),t())}_perViewNow(){let e=typeof window<`u`?window.getComputedStyle(this._track).getPropertyValue(`--wui-carousel-view`):``,t=Number.parseInt(e,10);return t>=1?t:1}_start(e){return Math.min(e*this._perView,Math.max(0,this._slides().length-this._perView))}_label(){let e=this._slides();return e.forEach((t,n)=>{let r=or.slide(n+1,e.length);t.getAttribute(`aria-label`)!==r&&t.setAttribute(`aria-label`,r)}),e.length}_refresh(){let e=this._label();this._perView=this._perViewNow();let t=Math.max(1,Math.ceil(e/this._perView)),n=this.querySelector(`.wui-carousel-dots`);if(n&&n.children.length!==t){let e=this.getAttribute(`dot-label`)||or.dot;n.replaceChildren(...Array.from({length:t},(t,n)=>{let r=this.ownerDocument.createElement(`button`);return r.type=`button`,r.className=`wui-carousel-dot`,r.dataset.page=String(n),r.setAttribute(`aria-label`,`${e} ${this._start(n)+1}`),r}))}this._pages=t,this._page=Math.min(this._page,t-1),this.toggleAttribute(`data-single`,t<=1),this._render(!1),this._sync()}_settle(){let e=this._track,t=this._slides();if(!t.length)return;let n;if(e.scrollWidth>e.clientWidth&&e.scrollLeft+e.clientWidth>=e.scrollWidth-2)n=this._pages-1;else{let r=0,i=1/0;t.forEach((t,n)=>{let a=Math.abs(t.offsetLeft-e.scrollLeft);a<i&&(i=a,r=n)}),n=Math.min(this._pages-1,Math.round(r/this._perView))}n!==this._page&&(this._page=n,this._render(!0),this._sync())}_go(e){if(!Number.isInteger(e))return;this._page=Math.max(0,Math.min(this._pages-1,e));let t=this._slides()[this._start(this._page)];if(t){let e=this._motion?.matches?`auto`:`smooth`;typeof this._track.scrollTo==`function`?this._track.scrollTo({left:t.offsetLeft,behavior:e}):this._track.scrollLeft=t.offsetLeft}this._render(!0),this._sync()}_render(e){let t=this.hasAttribute(`loop`);for(let e of this.querySelectorAll(`.wui-carousel-dot`))Number(e.dataset.page)===this._page?e.setAttribute(`aria-current`,`true`):e.removeAttribute(`aria-current`);this.querySelector(`.wui-carousel-prev`)?.setAttribute(`aria-disabled`,String(!t&&this._page===0)),this.querySelector(`.wui-carousel-next`)?.setAttribute(`aria-disabled`,String(!t&&this._page===this._pages-1));let n=this._slides().length,r=this._start(this._page)+1,i=Math.min(n,r+this._perView-1),a=or.status(r,i,n);if(a===this._status||(this._status=a,!e))return;let o=this.querySelector(`[data-wui-status]`);o&&!this._playing()&&(o.textContent=a),this.dispatchEvent(new CustomEvent(`wui:carousel:change`,{bubbles:!0,detail:{page:this._page,pages:this._pages}}))}_sync(){clearTimeout(this._timer),this._timer=null;let e=this._interval(),t=this.querySelector(`.wui-carousel-pause`);if(t){t.hidden=e===0||this._pages<=1||!!this._motion?.matches;let n=this._paused?this.getAttribute(`play-label`)||or.play:this.getAttribute(`pause-label`)||or.pause,r=t.querySelector(`.wui-carousel-pause-text`);r&&r.textContent!==n&&(r.textContent=n),this.toggleAttribute(`data-paused`,this._paused)}this._playing()&&(this._timer=setTimeout(this._tick,e))}},lr=Object.freeze([`text`,`json`,`js`,`cs`,`sql`,`bash`,`http`,`html`,`css`]),ur=Object.freeze({text:``,json:`JSON`,js:`JavaScript`,cs:`C#`,sql:`SQL`,bash:`Bash`,http:`HTTP`,html:`HTML`,css:`CSS`}),B=e=>RegExp(`\\b(?:${e.join(`|`)})\\b`),dr=`(?![\\s\\S])`,fr=RegExp(`/\\*[\\s\\S]*?(?:\\*/|${dr})`).source,pr=[[`attr`,/"(?:[^"\\\n]|\\.)*"(?=\s*:)/],[`string`,/"(?:[^"\\\n]|\\.)*"?/],[`number`,/-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b/],[`literal`,B([`true`,`false`,`null`])],[`punct`,/[{}[\],:]/]],mr=[[`comment`,RegExp(`//[^\\n]*|${fr}`)],[`string`,/"(?:[^"\\\n]|\\.)*"?|'(?:[^'\\\n]|\\.)*'?|`(?:[^`\\]|\\[\s\S])*`?/],[`number`,/\b(?:0[xX][\da-fA-F_]+|\d[\d_]*\.?\d*(?:[eE][+-]?\d+)?n?)\b/],[`keyword`,B(`async.await.break.case.catch.class.const.continue.default.delete.do.else.export.extends.finally.for.from.function.if.import.in.instanceof.let.new.of.return.static.super.switch.this.throw.try.typeof.var.void.while.yield`.split(`.`))],[`literal`,B([`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`])],[`function`,/(?<![\w$])[A-Za-z_$][\w$]*(?=\s*\()/],[`type`,/(?<![\w$])[A-Z][\w$]*/],[`punct`,/[{}()[\];,]/]],hr=[[`comment`,RegExp(`//[^\\n]*|${fr}`)],[`string`,/@"(?:[^"]|"")*"?|\$@?"(?:[^"\\\n]|\\.)*"?|"(?:[^"\\\n]|\\.)*"?|'(?:[^'\\\n]|\\.)*'?/],[`number`,/\b\d[\d_]*\.?\d*(?:[eE][+-]?\d+)?[fFdDmMlLuU]{0,2}\b/],[`keyword`,B(`abstract.as.async.await.base.bool.break.byte.case.catch.char.checked.class.const.continue.decimal.default.delegate.do.double.else.enum.event.explicit.extern.finally.fixed.float.for.foreach.get.goto.if.implicit.in.init.int.interface.internal.is.lock.long.namespace.new.object.operator.out.override.params.private.protected.public.readonly.record.ref.required.return.sbyte.sealed.set.short.sizeof.static.string.struct.switch.this.throw.try.typeof.uint.ulong.unchecked.unsafe.ushort.using.var.virtual.void.volatile.when.while.with`.split(`.`))],[`literal`,B([`true`,`false`,`null`])],[`function`,/(?<!\w)[A-Za-z_]\w*(?=\s*\()/],[`type`,/(?<!\w)[A-Z]\w*/],[`punct`,/[{}()[\];,]/]],gr=[[`comment`,RegExp(`--[^\\n]*|${fr}`)],[`string`,/'(?:[^']|'')*'?/],[`variable`,/@@?\w+/],[`number`,/\b\d+(?:\.\d+)?\b/],[`keyword`,B(`add.all.alter.and.as.asc.begin.between.by.case.check.column.commit.constraint.create.cross.database.declare.default.delete.desc.distinct.drop.else.end.exec.execute.exists.foreign.from.full.function.group.having.if.in.index.inner.insert.into.is.join.key.left.like.limit.not.null.offset.on.or.order.outer.over.partition.primary.procedure.references.return.returns.right.rollback.select.set.table.then.top.transaction.union.unique.update.values.view.when.where.while.with`.split(`.`))],[`literal`,B([`true`,`false`])],[`type`,B([`bigint`,`bit`,`char`,`date`,`datetime`,`datetime2`,`decimal`,`float`,`int`,`money`,`nchar`,`numeric`,`nvarchar`,`real`,`smallint`,`text`,`time`,`tinyint`,`uniqueidentifier`,`varchar`])],[`function`,/\b[A-Za-z_]\w*(?=\s*\()/],[`punct`,/[(),;]/]],_r=[[`comment`,/(?<![^\s;|&(])#[^\n]*/],[`string`,/"(?:[^"\\]|\\[\s\S])*"?|'[^']*'?/],[`variable`,/\$(?:\{[^}\n]*\}?|[A-Za-z_]\w*|[0-9@#?$!*-])/],[`attr`,/(?<![\w-])--?[A-Za-z][\w-]*/],[`number`,/(?<![\w.-])\d+(?:\.\d+)?\b/],[`keyword`,B([`case`,`do`,`done`,`elif`,`else`,`esac`,`exit`,`export`,`fi`,`for`,`function`,`if`,`in`,`local`,`return`,`select`,`then`,`until`,`while`])],[`function`,B(`awk.az.cat.cd.chmod.chown.cp.curl.docker.dotnet.echo.gcloud.git.grep.kubectl.ls.mkdir.mv.npm.npx.pnpm.rm.sed.source.sudo.wget`.split(`.`))],[`punct`,/[|&;<>(){}[\]]+/]],vr=[[`comment`,/^#[^\n]*/m],[`keyword`,/^(?:GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS|TRACE|CONNECT)(?= )/m],[`literal`,/HTTP\/\d(?:\.\d)?/],[`number`,/(?<=^HTTP\/\d(?:\.\d)? )\d{3}\b/m],[`function`,/(?<=^[A-Z]+ )\S+/m],[`attr`,/^[A-Za-z][\w-]*(?=:)/m],[`string`,/(?<=^[A-Za-z][\w-]*:[ \t]*)[^\n]+/m]],yr=[[`comment`,RegExp(`<!--[\\s\\S]*?(?:-->|${dr})`)],[`keyword`,/<![A-Za-z][^>]*>?/],[`tag`,/<\/?[A-Za-z][^<>]*>?/],[`literal`,/&#?\w+;/]],br={json:pr,js:mr,cs:hr,sql:gr,bash:_r,http:vr,css:[[`comment`,new RegExp(fr)],[`string`,/"(?:[^"\\\n]|\\.)*"?|'(?:[^'\\\n]|\\.)*'?/],[`keyword`,/@[\w-]+|!important/],[`attr`,/[\w-]+(?=\s*:[^{};]*[;}])/],[`number`,/#[0-9a-fA-F]{3,8}\b|(?<![\w-])-?(?:\d+\.?\d*|\.\d+)(?:%|[A-Za-z]{1,4})?/],[`function`,/[\w-]+(?=\()/],[`type`,/[.#](?!\d)[A-Za-z_][\w-]*/],[`punct`,/[{}();:,]/]],html:yr,htmlTag:[[`tag`,/^<\/?[\w:.-]+/],[`string`,/"[^"]*"?|'[^']*'?/],[`attr`,/(?<=\s)[^\s=<>/"']+/],[`punct`,/\/?>|=/]]},xr=new Map;function Sr(e){let t=xr.get(e);if(!t){let n=br[e],r=e===`sql`?`gi`:`g`,i=n.map(([,e])=>`(${e.source})`).join(`|`);t={re:new RegExp(i,`${r}m`),types:n.map(([e])=>e)},xr.set(e,t)}return t}function Cr(e,t,n){if(!n)return;let r=e[e.length-1];r&&r[0]===t?r[1]+=n:e.push([t,n])}function wr(e,t,n=[]){let{re:r,types:i}=Sr(e),a=0;for(let o of t.matchAll(r)){if(!o[0])continue;Cr(n,`plain`,t.slice(a,o.index));let r=i.findIndex((e,t)=>o[t+1]!==void 0);e===`html`&&i[r]===`tag`?wr(`htmlTag`,o[0],n):Cr(n,i[r],o[0]),a=o.index+o[0].length}return Cr(n,`plain`,t.slice(a)),n}function Tr(e){let t=/\r?\n\r?\n/.exec(e);if(!t)return wr(`http`,e);let n=wr(`http`,e.slice(0,t.index+t[0].length)),r=e.slice(t.index+t[0].length),i=r.trimStart()[0];return i===`{`||i===`[`?wr(`json`,r,n):i===`<`?wr(`html`,r,n):(Cr(n,`plain`,r),n)}function Er(e,t){let n=String(e??``);return!n||n.length>1e5?n?[[`plain`,n]]:[]:t===`http`?Tr(n):!Object.hasOwn(br,t)||t===`htmlTag`?[[`plain`,n]]:wr(t,n)}function Dr(e,t){let n=[[]];for(let[r,i]of Er(e,t))i.split(/\r\n|\r|\n/).forEach((e,t)=>{t>0&&n.push([]),e&&n[n.length-1].push([r,e])});return n.length>1&&n[n.length-1].length===0&&n.pop(),n}var Or=2e3;async function kr(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 Ar=class extends c{static get observedAttributes(){return[`language`,`line-numbers`,`wrap`,`label`,`copy-label`,`copied-label`]}constructor(){super(),this._chrome=null,this._observer=null,this._timer=0}connectedCallback(){this._render(),!(typeof MutationObserver>`u`)&&(this._observer=new MutationObserver(e=>{e.some(e=>!this._chrome?.contains(e.target))&&this._render()}),this._observer.observe(this,{childList:!0,subtree:!0,characterData:!0}))}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,clearTimeout(this._timer)}attributeChangedCallback(){this.isConnected&&this._render()}_source(){return Array.from(this.children).find(e=>e.classList.contains(`wui-code-source`))}_render(){let e=this._source();if(!e)return;clearTimeout(this._timer);let t=this.ownerDocument,n=(e.textContent??``).replace(/\r?\n$/,``),r=this.getAttribute(`language`),i=lr.includes(r)?r:`text`,a=this.getAttribute(`label`)||``,o=Dr(n,i),s=t.createElement(`div`);s.className=`wui-code-chrome`,s.append(this._bar(t,a||ur[i],n));let c=t.createElement(`div`);c.className=`wui-code-view`,c.setAttribute(`role`,`region`),c.setAttribute(`aria-label`,a||`Code`),c.tabIndex=0,c.style.setProperty(`--wui-code-digits`,String(String(o.length).length));let l=t.createElement(`pre`);l.className=`wui-code-pre`;let u=t.createElement(`code`);for(let e of o){let n=t.createElement(`span`);n.className=`wui-code-line`;for(let[r,i]of e){if(r===`plain`){n.append(i);continue}let e=t.createElement(`span`);e.className=`wui-code-t-${r}`,e.textContent=i,n.append(e)}u.append(n)}l.append(u),c.append(l),s.append(c),this._chrome?.remove(),this._chrome=s,this.append(s),this.setAttribute(`data-wui-ready`,``),this._observer?.takeRecords()}_bar(e,t,n){let r=e.createElement(`div`);r.className=`wui-code-bar`;let i=e.createElement(`span`);i.className=`wui-code-title`,i.textContent=t;let a=this.getAttribute(`copy-label`)||`Copy`,o=this.getAttribute(`copied-label`)||`Copied`,s=e.createElement(`button`);s.type=`button`,s.className=`btn btn-ghost btn-sm wui-code-copy`,s.setAttribute(`aria-live`,`polite`);let c=e.createElement(`span`);c.className=`wui-code-copy-icon`;let l=e.createElement(`span`),u=e=>{c.innerHTML=R(e?`check`:`files`,{size:14}),l.textContent=e?o:a};return u(!1),s.append(c,l),s.addEventListener(`click`,async()=>{await kr(n)&&(u(!0),clearTimeout(this._timer),this._timer=setTimeout(()=>u(!1),Or))}),r.append(i,s),r}};function jr(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 Mr=`[role="option"]`,Nr=`No results`,Pr=`All`,Fr=`Recent`,Ir=5,Lr=20,Rr=`.wui-cmd-back, [data-depth]`,zr=0,Br=class extends c{static get observedAttributes(){return[`filter`,`highlight`,`empty-text`,`path`,`root-label`,`recents-key`,`recents-limit`,`recents-label`]}constructor(){super(),this._path=[],this._crumbSig=null,this._modal=null,this._recentsId=`wui-cmd-recents-${++zr}`,this._onModalHidden=()=>this._reset(),this._activeId=null,this._lastQuery=null,this._lastIds=null,this._userChose=!1,this._onKeyDown=e=>this._handleKeyDown(e),this._onClick=e=>{let t=e.target?.closest?.(Rr);if(t&&this.contains(t)){let e=t.matches(`.wui-cmd-back`)?this._path.length-1:Number(t.dataset.depth);this._goTo(this._path.slice(0,e));return}let n=this._optionFrom(e.target);n&&this._select(n)},this._onMouseDown=e=>{let t=e.target?.closest?.(Rr);(t&&this.contains(t)||this._optionFrom(e.target,!0))&&e.preventDefault()},this._onMouseMove=e=>{let t=this._optionFrom(e.target);t&&t.id!==this._activeId&&(this._userChose=!0,this._setActive(t,!1))},this._onInput=e=>{!this.hasAttribute(`filter`)||e.target!==this._input()||(this._applyFilter(),this.refresh())}}connectedCallback(){this._teardown(),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`click`,this._onClick),this.addEventListener(`mousedown`,this._onMouseDown),this.addEventListener(`mousemove`,this._onMouseMove),this.addEventListener(`input`,this._onInput),this._modal=this.closest(`.modal`),this._modal?.addEventListener(`hidden.bs.modal`,this._onModalHidden),this._readPath(),this.hasAttribute(`filter`)&&this._applyFilter(),this.refresh()}disconnectedCallback(){this._teardown()}attributeChangedCallback(e){this.isConnected&&(e===`path`&&this._readPath(),this.hasAttribute(`filter`)&&this._applyFilter(),this.refresh())}get filter(){return this.hasAttribute(`filter`)}set filter(e){this.toggleAttribute(`filter`,!!e)}get highlight(){return this.getAttribute(`highlight`)!==`false`}set highlight(e){this.setAttribute(`highlight`,e?`true`:`false`)}get emptyText(){return this.getAttribute(`empty-text`)??Nr}set emptyText(e){this.setAttribute(`empty-text`,String(e??``))}refresh(){this._renderRecents(),this._renderCrumbs();let e=this._input(),t=e?e.value:``,n=t!==this._lastQuery;this._lastQuery=t;let r=this._selectableOptions(),i=r.map(e=>e.id).join(`
23
- `),a=i!==this._lastIds;this._lastIds=i;let o=!n&&(this._userChose||!a)?r.find(e=>e.id===this._activeId):null;o||(this._userChose=!1),this._setActive(o??r[0]??null,n)}_input(){return this.querySelector(`[role="combobox"]`)}_optionFrom(e,t=!1){let n=e?.closest?.(Mr);return n&&this.contains(n)&&!this._isHidden(n)&&(t||!this._isDisabled(n))?n:null}_isDisabled(e){return e.getAttribute(`aria-disabled`)===`true`}_isHidden(e){return e.hidden||!!e.closest(`[role="group"]`)?.hidden}_selectableOptions(){return[...this.querySelectorAll(Mr)].filter(e=>!this._isHidden(e)&&!this._isDisabled(e))}_setActive(e,t){this._activeId=e?e.id:null;for(let t of this.querySelectorAll(Mr))t.setAttribute(`aria-selected`,t===e?`true`:`false`);let n=this._input();n&&(e?n.setAttribute(`aria-activedescendant`,e.id):n.removeAttribute(`aria-activedescendant`)),e&&t&&e.scrollIntoView({block:`nearest`})}_move(e){let t=this._selectableOptions();if(!t.length)return;let n=t.findIndex(e=>e.id===this._activeId),r=n<0?e>0?0:t.length-1:(n+e+t.length)%t.length;this._userChose=!0,this._setActive(t[r],!0)}_handleKeyDown(e){if(e.target===this._input()){if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),this._move(e.key===`ArrowDown`?1:-1);else if(e.key===`Backspace`&&!e.isComposing&&this._path.length&&!e.target.value)e.preventDefault(),this._goTo(this._path.slice(0,-1));else if(e.key===`Enter`&&!e.isComposing){let t=this._selectableOptions().find(e=>e.id===this._activeId);if(!t)return;e.preventDefault(),this._select(t)}}}_select(e){this._remember(e),this.dispatchEvent(new CustomEvent(`wui-command-palette:select`,{bubbles:!0,cancelable:!0,detail:{key:e.dataset.key??null,groupKey:e.dataset.groupKey??null,id:e.id}}))&&(e.dataset.opens?this._open(e.dataset.opens):e.dataset.href&&this._navigate(e.dataset.href))}_open(e){let t=[...this.querySelectorAll(`.wui-cmd-page`)].find(t=>t.dataset.page===e);this._goTo([...this._path,{key:e,label:t?.dataset.label??e}])}_goTo(e){this._input()?.focus(),this.dispatchEvent(new CustomEvent(`wui-command-palette:navigate`,{bubbles:!0,cancelable:!0,detail:{path:e}}))&&(this._path=e,this._restart())}_restart(){let e=this._input();e&&(e.value=``),this.hasAttribute(`filter`)&&this._applyFilter(),this.refresh()}_reset(){this.hasAttribute(`path`)||(this._path=[],this._restart())}_readPath(){let e=this.getAttribute(`path`);if(e==null)return;let t=JSON.parse(e);this._path=Array.isArray(t)?t.filter(e=>e&&typeof e.key==`string`&&typeof e.label==`string`):[]}_renderCrumbs(){let e=this.querySelector(`.wui-cmd-crumbs`);if(!e)return;let t=this.getAttribute(`root-label`)??Pr,n=JSON.stringify([t,this._path]);if(e.hidden=this._path.length===0,n===this._crumbSig)return;this._crumbSig=n;let r=e.querySelector(`.wui-cmd-trail`);if(!r)return;let i=[t,...this._path.map(e=>e.label)];r.replaceChildren(...i.map((e,t)=>{let n=document.createElement(`li`),r=t===i.length-1,a=document.createElement(r?`span`:`button`);return a.className=`wui-cmd-crumb`,a.textContent=e,r?a.setAttribute(`aria-current`,`page`):(a.type=`button`,a.dataset.depth=String(t)),n.append(a),n}))}_recentsHost(){return this.querySelector(`.wui-cmd-recents`)}_realOptions(){let e=this._recentsHost();return[...this.querySelectorAll(Mr)].filter(t=>!e?.contains(t))}_recentEntries(){let e=this.getAttribute(`recents-key`);if(!e)return[];let t;try{t=JSON.parse(globalThis.localStorage?.getItem(e)??`[]`)}catch{return[]}return Array.isArray(t)?t.filter(e=>e&&typeof e.g==`string`&&typeof e.k==`string`):[]}_recentsLimit(){let e=Number.parseInt(this.getAttribute(`recents-limit`)??``,10);return Number.isFinite(e)&&e>0?Math.min(e,Lr):Ir}_remember(e){let t=this.getAttribute(`recents-key`),{groupKey:n,key:r,opens:i}=e.dataset;if(!t||i||n==null||r==null)return;let a=[{g:n,k:r},...this._recentEntries().filter(e=>!(e.g===n&&e.k===r))];try{globalThis.localStorage?.setItem(t,JSON.stringify(a.slice(0,this._recentsLimit())))}catch{}}_renderRecents(){let e=this._recentsHost();if(!e)return;let t=this._input(),n=this._path.length===0&&!(t?.value??``).trim()?this._recentEntries():[],r=this._realOptions(),i=[];for(let e of n){let t=r.find(t=>t.dataset.groupKey===e.g&&t.dataset.key===e.k);if(t&&!t.dataset.opens&&!this._isDisabled(t)&&i.push(t),i.length>=this._recentsLimit())break}if(!i.length){e.firstChild&&e.replaceChildren();return}let a=`${this._recentsId}-label`,o=document.createElement(`div`);o.className=`wui-cmd-group`,o.setAttribute(`role`,`group`),o.setAttribute(`aria-labelledby`,a);let s=document.createElement(`div`);s.className=`wui-cmd-group-label`,s.setAttribute(`role`,`presentation`),s.id=a,s.textContent=this.getAttribute(`recents-label`)??Fr,o.append(s);for(let e of i){let t=e.cloneNode(!0);t.id=`${this._recentsId}-${e.id}`,t.hidden=!1,t.removeAttribute(`aria-selected`),o.append(t)}e.replaceChildren(o)}_inScope(e,t){return!t||(e.closest(`.wui-cmd-page`)?.dataset.page??null)===(this._path.at(-1)?.key??null)}_navigate(e){window.location.assign(e)}_applyFilter(){let e=this._input(),t=(e?e.value:``).trim(),n=t.toLowerCase(),r=this.highlight,i=[...this.querySelectorAll(`.wui-cmd-page`)],a=i.length>0,o=this._path.at(-1)?.key??null;for(let e of i)e.hidden=e.dataset.page!==o;let s=0;for(let e of this._realOptions()){let i=e.querySelector(`.wui-cmd-item-label`),o=e.dataset.label??i?.textContent??``,c=this._inScope(e,a)&&(!n||o.toLowerCase().includes(n));e.hidden=!c,c&&s++,i&&(i.innerHTML=jr(o,r?t:``).map(e=>e.match?`<mark class="wui-cmd-mark">${z(e.text)}</mark>`:z(e.text)).join(``))}let c=this._recentsHost();for(let e of this.querySelectorAll(`[role="group"]`))c?.contains(e)||(e.hidden=![...e.querySelectorAll(Mr)].some(e=>!e.hidden));let l=this.querySelector(`[role="listbox"]`);l&&(l.hidden=s===0);let u=this.querySelector(`.wui-cmd-empty`);u&&(u.textContent=n&&s===0?this.emptyText:``)}_teardown(){this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`mousedown`,this._onMouseDown),this.removeEventListener(`mousemove`,this._onMouseMove),this.removeEventListener(`input`,this._onInput),this._modal?.removeEventListener(`hidden.bs.modal`,this._onModalHidden),this._modal=null}},Vr=Object.freeze([`👍`,`❤️`,`🎉`,`😄`,`👀`,`🙏`]),Hr=Object.freeze([`post`,`reply`,`edit`,`delete`,`react`]),V=Object.freeze({listName:`Comments`,empty:`No comments yet.`,deleted:`This comment was deleted.`,edited:`Edited`,reply:`Reply`,edit:`Edit`,delete:`Delete`,cancel:`Cancel`,save:`Save`,post:`Comment`,confirmDelete:`Delete this comment?`,composerLabel:`Add a comment`,composerPlaceholder:`Write a comment. Type @ to mention someone.`,replyLabel:e=>`Reply to ${e}`,replyPlaceholder:`Write a reply`,editLabel:`Edit comment`,repliesName:e=>`Replies to ${e}`,reactions:`Reactions`,addReaction:`Add a reaction`,pickerName:`Choose a reaction`,emptyBody:`Write something first.`,done:Object.freeze({post:`Comment posted.`,reply:`Reply posted.`,edit:`Comment saved.`,delete:`Comment deleted.`,react:``}),failed:Object.freeze({forbidden:`You do not have permission to do this.`,client:`This did not go through. Refresh the page and try again.`,validation:`This was not accepted. Check it and try again.`,server:`Something went wrong on our side. Try again in a moment.`,network:`Could not reach the server. Check your connection and try again.`})}),Ur=`[data-wui-items]`,Wr=`[data-wui-picker]`,Gr=`[data-wui-composer]`,Kr=`[data-wui-comment]`,qr=`[data-wui-live]`,Jr=e=>typeof e?.message==`string`&&e.message?e.message:V.failed.server,Yr=class extends c{constructor(){super(),this._wired=!1,this._busy=!1,this._peopleProp=null,this._pickerFor=null,this._onClick=this._onClick.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onSubmitKey=this._onSubmitKey.bind(this),this._onDocClick=e=>{this._pickerFor&&!this.querySelector(Wr)?.contains(e.target)&&!this._pickerFor.button.contains(e.target)&&this._closePicker(!1)},this._repositionPicker=()=>{this._pickerFor&&a(this._pickerFor.button,this.querySelector(Wr))}}connectedCallback(){if(Object.hasOwn(this,`people`)){let e=this.people;delete this.people,this.people=e}this._wired||(this._wired=!0,this.addEventListener(`click`,this._onClick),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`wui:mention-input:submit`,this._onSubmitKey),this._handPeople(this.querySelector(`${Gr} wui-mention-input`)))}disconnectedCallback(){this._closePicker(!1)}get people(){return this._peopleProp?this._peopleProp:[...this.querySelectorAll(`:scope > [data-wui-people] > wui-option`)].map(e=>({value:e.getAttribute(`value`)??``,label:e.textContent.trim(),description:e.getAttribute(`data-description`)||void 0,src:e.getAttribute(`data-src`)||void 0}))}set people(e){this._peopleProp=Array.isArray(e)?e:[];for(let e of this.querySelectorAll(`wui-mention-input`))e.people=this._peopleProp}_handPeople(e){!e||this.hasAttribute(`remote`)||this.hasAttribute(`source`)||(e.people=this.people)}_reactionChoices(){let e=this.getAttribute(`reaction-choices`),t=e?e.split(/\s+/).filter(Boolean):[];return t.length?t:Vr}_onClick(e){let t=e.target.closest?.(`[data-wui-emoji]`);if(t&&this.contains(t)&&!t.disabled){let e=t.closest(Wr),n=e?this._pickerFor?.comment:t.closest(Kr);e&&this._closePicker(!0),n&&this._react(n,t.getAttribute(`data-wui-emoji`));return}let n=e.target.closest?.(`[data-wui-action]`);if(!n||!this.contains(n)||n.disabled)return;let r=n.closest(Kr);switch(n.getAttribute(`data-wui-action`)){case`reply`:this._openReply(r,n);break;case`edit`:this._openEditor(r,n);break;case`delete`:this._askDelete(r);break;case`cancel-delete`:this._closeConfirm(r,!0);break;case`confirm-delete`:this._send(`delete`,{commentId:r.getAttribute(`data-wui-comment`)},{comment:r,scope:r});break;case`react-menu`:this._pickerFor?.button===n?this._closePicker(!0):this._openPicker(r,n);break;case`cancel`:this._closeSlot(n.closest(`[data-wui-reply], [data-wui-editor]`),!0);break;case`post`:case`send`:this._sendFrom(n);break}}_onKeyDown(e){let t=this.querySelector(Wr);if(this._pickerFor&&t?.contains(e.target)){let n=[...t.querySelectorAll(`[data-wui-emoji]`)],r=n.indexOf(e.target);e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),this._closePicker(!0)):e.key===`ArrowRight`||e.key===`ArrowLeft`?(e.preventDefault(),n[(r+(e.key===`ArrowRight`?1:-1)+n.length)%n.length]?.focus()):e.key===`Tab`&&this._closePicker(!1);return}if(e.key!==`Escape`)return;let n=e.target.closest?.(`[data-wui-reply], [data-wui-editor]`);if(n&&this.contains(n)){e.preventDefault(),e.stopPropagation(),this._closeSlot(n,!0);return}let r=e.target.closest?.(`[data-wui-confirm]`);r&&(e.preventDefault(),e.stopPropagation(),this._closeConfirm(r.closest(Kr),!0))}_onSubmitKey(e){let t=(e.target.closest?.(`[data-wui-reply], [data-wui-editor], [data-wui-composer]`))?.querySelector(`[data-wui-action="send"], [data-wui-action="post"]`);t&&!t.disabled&&this._sendFrom(t)}_openReply(e,t){let n=e?.querySelector(`:scope > [data-wui-reply]`);if(!n)return;if(!n.hidden){n.querySelector(`wui-mention-input`)?.focus();return}let r=e.querySelector(`.wui-comment-author`)?.textContent.trim()||``;this._fillSlot(n,{label:V.replyLabel(r),placeholder:V.replyPlaceholder,value:``,send:V.reply,opener:t})}_openEditor(e,t){let n=e?.querySelector(`:scope > .wui-comment-row [data-wui-editor]`);if(!n||!n.hidden)return;let r=n.parentElement.querySelector(`:scope > [data-wui-text]`);r&&(r.hidden=!0),this._fillSlot(n,{label:V.editLabel,placeholder:``,value:e.getAttribute(`data-value`)??``,send:V.save,opener:t})}_fillSlot(e,{label:t,placeholder:n,value:r,send:i,opener:a}){let o=this.ownerDocument,s=o.createElement(`wui-mention-input`);s.className=`wui-mention-input`,s.setAttribute(`label`,t),n&&s.setAttribute(`placeholder`,n),s.setAttribute(`rows`,`2`),s.setAttribute(`value`,r);for(let e of[`remote`,`source`,`min-chars`,`debounce`])this.hasAttribute(e)&&s.setAttribute(e,this.getAttribute(e));let c=o.createElement(`div`);c.className=`wui-comment-form-actions`,c.append(this._button(`btn btn-primary btn-sm`,`send`,i),this._button(`btn btn-ghost btn-sm`,`cancel`,V.cancel));let l=o.createElement(`div`);l.className=`wui-comment-error`,l.setAttribute(`data-wui-error`,``),l.hidden=!0,e.replaceChildren(s,c,l),this._handPeople(s),e.hidden=!1,this._openers??=new WeakMap,this._openers.set(e,a),s.focus();let u=s.querySelector(`textarea`);u?.setSelectionRange(u.value.length,u.value.length)}_button(e,t,n){let r=this.ownerDocument.createElement(`button`);return r.type=`button`,r.className=e,r.setAttribute(`data-wui-action`,t),r.textContent=n,r}_closeSlot(e,t){if(!e||e.hidden)return;if(e.hidden=!0,e.replaceChildren(),e.hasAttribute(`data-wui-editor`)){let t=e.parentElement?.querySelector(`:scope > [data-wui-text]`);t&&(t.hidden=!1)}let n=this._openers?.get(e);t&&n?.isConnected&&n.focus()}_askDelete(e){let t=e?.querySelector(`:scope > .wui-comment-row`),n=t?.querySelector(`[data-wui-confirm]`),r=t?.querySelector(`[data-wui-actions]`);n&&(n.hidden=!1,r&&(r.hidden=!0),n.querySelector(`[data-wui-action="cancel-delete"]`)?.focus())}_closeConfirm(e,t){let n=e?.querySelector(`:scope > .wui-comment-row`),r=n?.querySelector(`[data-wui-confirm]`),i=n?.querySelector(`[data-wui-actions]`);r&&(r.hidden=!0),i&&(i.hidden=!1),t&&i?.querySelector(`[data-wui-action="delete"]`)?.focus()}_openPicker(e,t){let n=this.querySelector(Wr);!n||!e||(this._closePicker(!1),this._pickerFor={comment:e,button:t},t.setAttribute(`aria-expanded`,`true`),n.hidden=!1,a(t,n),o(this,this._repositionPicker),this.ownerDocument.addEventListener(`click`,this._onDocClick,!0),n.querySelector(`[data-wui-emoji]`)?.focus())}_closePicker(e){let t=this._pickerFor;if(!t)return;this._pickerFor=null;let n=this.querySelector(Wr);n&&(n.hidden=!0),t.button.setAttribute(`aria-expanded`,`false`),s(this),this.ownerDocument.removeEventListener(`click`,this._onDocClick,!0),e&&t.button.isConnected&&t.button.focus()}_react(e,t){t&&this._send(`react`,{commentId:e.getAttribute(`data-wui-comment`),emoji:t},{comment:e,scope:e})}_sendFrom(e){let t=e.closest(`[data-wui-reply], [data-wui-editor], [data-wui-composer]`);if(!t)return;let n=t.querySelector(`wui-mention-input`),r=n?.value??``;if(!r.trim()){this._showError(t,V.emptyBody),n?.focus();return}let i=t.closest(Kr);t.hasAttribute(`data-wui-composer`)?this._send(`post`,{body:r},{scope:t,form:t}):t.hasAttribute(`data-wui-reply`)?this._send(`reply`,{parentId:i.getAttribute(`data-wui-comment`),body:r},{comment:i,scope:t,form:t}):this._send(`edit`,{commentId:i.getAttribute(`data-wui-comment`),body:r},{comment:i,scope:t,form:t})}async _send(e,t,{comment:n,scope:r,form:i}){if(this._busy)return;this._busy=!0,this.setAttribute(`aria-busy`,`true`);let a=i??n?.querySelector(`:scope > .wui-comment-row`)??this;this._showError(a,null);let o=[...r.querySelectorAll(`button, textarea`)].filter(e=>!e.disabled);for(let e of o)e.disabled=!0;let s=await this._persist({intent:e,...t});for(let e of o)e.isConnected&&(e.disabled=!1);this._busy=!1,this.removeAttribute(`aria-busy`);let c=t.commentId??null,l=t.parentId??null;if(s.ok){s.html!=null&&this._swapItems(s.html),e===`post`?i?.querySelector(`wui-mention-input`)?.clear():i?.isConnected&&this._closeSlot(i,!1),e===`delete`&&n?.isConnected&&this._closeConfirm(n,!1),this._restoreFocus(e,t,i),V.done[e]&&this._announce(V.done[e]),this.dispatchEvent(new CustomEvent(`wui:comment-thread:done`,{bubbles:!0,detail:{intent:e,commentId:c,parentId:l}}));return}s.kind===`session`||s.kind===`aborted`||(this._showError(a.isConnected?a:this,s.message),this._announce(s.message),this.dispatchEvent(new CustomEvent(`wui:comment-thread:failed`,{bubbles:!0,detail:{intent:e,kind:s.kind,message:s.message}})))}async _persist(e){if(this.hasAttribute(`controlled`)){if(typeof this.submit!=`function`)return{ok:!0,html:null};try{return await this.submit(e),{ok:!0,html:null}}catch(e){return{ok:!1,kind:`server`,message:Jr(e)}}}let t=this.getAttribute(`action`);if(!t)return{ok:!1,kind:`client`,message:V.failed.client};let n=new URLSearchParams;for(let[t,r]of Object.entries(e))r!=null&&n.set(t,r);let r=await j(t,{method:`POST`,body:n});return r.ok?{ok:!0,html:r.html}:{ok:!1,kind:r.kind,message:r.message||V.failed[r.kind]||V.failed.server}}_swapItems(e){let t=this.querySelector(Ur);if(!t||!e.trim())return;let n=this.ownerDocument.createElement(`template`);n.innerHTML=e;let r=n.content.querySelector(Ur);t.replaceChildren(...r?r.childNodes:n.content.childNodes)}_restoreFocus(e,t,n){let r=this.ownerDocument,i=r.activeElement;if(i&&i!==r.body&&i.isConnected&&this.contains(i)&&!i.disabled)return;let a=e=>e?[...this.querySelectorAll(Kr)].find(t=>t.getAttribute(`data-wui-comment`)===e):null,o=e=>a(e)?.querySelector(`:scope > .wui-comment-row`),s=null;if(e===`post`)s=n?.querySelector(`textarea`);else if(e===`reply`)s=o(t.parentId)?.querySelector(`[data-wui-action="reply"]`);else if(e===`edit`)s=o(t.commentId)?.querySelector(`[data-wui-action="edit"]`);else if(e===`react`){let e=o(t.commentId);s=[...e?.querySelectorAll(`button[data-wui-emoji]`)??[]].find(e=>e.getAttribute(`data-wui-emoji`)===t.emoji)??e?.querySelector(`[data-wui-action="react-menu"]`)}s??=this.querySelector(`${Gr} textarea`),s?.focus()}_showError(e,t){let n=e?.querySelector?.(`:scope > [data-wui-error], :scope > .wui-comment-main > [data-wui-error]`);n&&(n.textContent=t||``,n.hidden=!t)}_announce(e){let t=this.querySelector(`:scope > ${qr}`);!t||!e||(t.textContent=``,t.textContent=e)}},Xr={"--color-primary":`#4F46E5`,"--color-primary-hover":`#4338CA`,"--color-primary-ink":`#4F46E5`,"--color-primary-text":`#FFFFFF`,"--color-text":`#071437`,"--color-text-muted":`#4B5675`,"--color-border":`#EBEDF3`,"--color-surface":`#FFFFFF`,"--wui-radius-lg":`14px`,"--wui-shadow-overlay-lg":`0 24px 60px -16px rgba(7, 20, 55, 0.28)`,"--wui-z-fixed":`1030`},H=e=>`var(${e}, ${Xr[e]})`,Zr=`
22
+ </div>`,this._rendered=!0,B(this,this._value),this._wire(),this._syncInput(),this._renderOptions()}_refs(){return{control:this.querySelector(`.search-select-control`),input:this.querySelector(`.search-select-ac-input`),menu:this.querySelector(`.search-select-menu`),spinner:this.querySelector(`.search-select-spinner`),clear:this.querySelector(`.search-select-clear`),optionsWrap:this.querySelector(`.search-select-options`),empty:this.querySelector(`.search-select-empty`),hint:this.querySelector(`.search-select-hint`)}}_optionEls(){return[...this.querySelectorAll(`.search-select-option`)]}_syncInput(){let{input:e,clear:t}=this._refs();e&&document.activeElement!==e&&(e.value=this._label),t&&(t.hidden=!this._value&&!e?.value)}_renderLoading(){let{spinner:e}=this._refs();e&&(e.hidden=!this._loading)}_renderOptions(e){let t=this._refs();if(!t.optionsWrap)return;let n=e??(t.input?t.input.value:``),r=n.trim().toLowerCase(),i=this._readOptions();!this._remote&&r&&(i=i.filter(e=>mi(e).toLowerCase().includes(r)));let a=n.trim(),o=this._allowCustom&&a&&!this._matchesKnownOption(a)?[...i,{value:a,custom:!0}]:i,s=this._listboxId||`${this.id||`wui-autocomplete`}-listbox`;t.optionsWrap.innerHTML=o.map((e,t)=>{let n=`${s}-opt-${t}`;if(e.custom){let t=`Add “${H(e.value)}”`;return`<button type="button" role="option" id="${gi(n)}" class="search-select-option search-select-option-custom" data-value="${gi(e.value)}" data-custom="true" aria-selected="false">${t}</button>`}let r=String(e.value)===String(this._value);return`<button type="button" role="option" id="${gi(n)}" class="search-select-option${r?` selected`:``}" data-value="${gi(e.value)}" aria-selected="${r}">${di(e)}</button>`}).join(``),this._active=-1,t.control?.removeAttribute(`aria-activedescendant`);let c=r.length<this._minChars;t.hint&&(t.hint.hidden=!(this._remote&&c&&!i.length)),t.empty&&(t.empty.hidden=this._loading||o.length>0||this._remote&&c),this._reanchor?.()}_wire(){this._teardown();let e=this._refs();if(!e.control||!e.input)return;let t=()=>a(e.control,e.menu,{matchWidth:!0}),n=()=>this._optionEls().filter(e=>!e.hidden),r=(t,{reveal:r=!0}={})=>{let i=n();this._active=t,ai(e.optionsWrap,t>=0&&i[t]||null),t>=0&&i[t]?(r&&i[t].scrollIntoView({block:`nearest`}),e.control.setAttribute(`aria-activedescendant`,i[t].id)):e.control.removeAttribute(`aria-activedescendant`)},i=()=>!e.menu.hidden,c=()=>{i()&&t()},l=()=>{!this._remote||this._minChars!==0||e.input.value.trim()||(clearTimeout(this._timer),this._fireSearch(``,++this._reqSeq))},u=({load:n=!0}={})=>{e.menu.hidden=!1,e.control.setAttribute(`aria-expanded`,`true`),e.control.classList.add(`open`),t(),o(this,c),n&&l(),this._renderOptions()},d=()=>{e.menu.hidden=!0,e.control.setAttribute(`aria-expanded`,`false`),e.control.classList.remove(`open`),r(-1),clearTimeout(this._typeaheadTimer),this._typeaheadTimer=null,this._typeahead=``,this._syncInput(),s(this)},f=t=>{let n=t.dataset.custom===`true`;this._value=t.dataset.value;let r=n?null:this._readOptions().find(e=>String(e.value)===t.dataset.value);this._label=n?t.dataset.value:r?mi(r):fi(t.innerHTML),B(this,this._value),e.input.value=this._label,this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,detail:{isCustom:n}})),d(),e.input.focus()},p=t=>{this._value=t,this._label=t,B(this,t),e.input.value=t,this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,detail:{isCustom:!0}})),d()},m=()=>{let t=e.input.value;if(e.clear&&(e.clear.hidden=!t),i()||u({load:!1}),this._remote){if(this._renderOptions(t),clearTimeout(this._timer),t.trim().length<this._minChars){this._pendingSearch=null;return}let e=++this._reqSeq;this._pendingSearch={query:t,seq:e},this._timer=setTimeout(()=>this._fireSearch(t,e),this._debounceMs)}else this._renderOptions(t)};this._navHandler=ii({getVisibleOptions:n,getActive:()=>this._active,setActive:e=>r(e),onEnter:(t,n)=>{if(n[this._active])f(n[this._active]);else if(this._allowCustom){let t=e.input.value.trim();t&&!this._matchesKnownOption(t)&&p(t)}},onEscape:()=>{this._navHandler.clearTypeahead(),d()}});let h=e=>{let t=e.target?.tagName===`INPUT`||e.target?.tagName===`TEXTAREA`;if(e.key===`ArrowDown`){e.preventDefault(),i()||u();let t=n();r(Math.min(this._active+1,t.length-1));return}else if(e.key===`ArrowUp`){e.preventDefault(),r(Math.max(this._active-1,0));return}else if((e.key===`Home`||e.key===`End`||e.key===`PageDown`||e.key===`PageUp`)&&(!i()||t))return;else if(e.key.length===1&&(e.ctrlKey||e.metaKey||e.altKey||!i()||e.target?.tagName===`INPUT`||e.target?.tagName===`TEXTAREA`)&&(!i()||e.target?.tagName===`INPUT`||e.target?.tagName===`TEXTAREA`))return;e.key===`Escape`&&i()&&(e.preventDefault(),e.stopPropagation()),this._navHandler.handler(e)};$r(),e.input.addEventListener(`focus`,()=>{ei()&&!i()&&u()}),e.control.addEventListener(`click`,t=>{e.input.disabled||t.target.closest(`.search-select-clear`)||(t.target!==e.input&&e.input.focus(),i()||u())}),e.input.addEventListener(`input`,m),e.input.addEventListener(`keydown`,h),e.menu.addEventListener(`keydown`,h),e.input.addEventListener(`blur`,t=>{if(!this._allowCustom||t.relatedTarget&&this.contains(t.relatedTarget))return;let n=e.input.value.trim();!n||n===this._label||this._matchesKnownOption(n)||p(n)}),e.optionsWrap.addEventListener(`click`,e=>{let t=e.target.closest(`.search-select-option`);t&&f(t)}),e.optionsWrap.addEventListener(`mousemove`,e=>{let t=e.target.closest(`.search-select-option`);t&&!t.classList.contains(`is-active`)&&r(this._optionEls().indexOf(t),{reveal:!1})}),e.optionsWrap.addEventListener(`mouseleave`,()=>r(-1)),e.clear?.addEventListener(`click`,()=>{this._value=``,this._label=``,B(this,``),e.input.value=``,e.clear.hidden=!0,this._renderOptions(``),this.dispatchEvent(new Event(`change`,{bubbles:!0})),e.input.focus(),i()?l():u()}),this._bindGlobal=()=>{this._teardown(),this._onDocClick=e=>{i()&&!this.contains(e.target)&&d()},document.addEventListener(`click`,this._onDocClick),i()&&o(this,c)},this._bindGlobal()}_fireSearch(e,t){this._pendingSearch=null,this.dispatchEvent(new CustomEvent(`search`,{bubbles:!0,detail:{query:e,seq:t}}))}_teardown(){this._onDocClick&&=(document.removeEventListener(`click`,this._onDocClick),null),s(this),clearTimeout(this._timer),this._navHandler?.teardown()}disconnectedCallback(){this._teardown()}},gi=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),_i=Object.freeze({slide:(e,t)=>`${e} of ${t}`,status:(e,t,n)=>e===t?`Slide ${e} of ${n}`:`Slides ${e} to ${t} of ${n}`,dot:`Go to slide`,pause:`Pause`,play:`Play`}),vi=120,yi=class extends c{static get observedAttributes(){return[`autoplay`]}constructor(){super(),this._page=0,this._pages=1,this._perView=1,this._paused=!1,this._hover=!1,this._focus=!1,this._timer=null,this._settleTimer=null,this._status=``,this._ready=!1,this._motion=null,this._mutations=null,this._resizer=null,this._doc=null,this._onClick=e=>this._click(e),this._onKeyDown=e=>this._key(e),this._onScroll=()=>{clearTimeout(this._settleTimer),this._settleTimer=setTimeout(()=>this._settle(),vi)},this._onEnter=()=>this._hold({hover:!0}),this._onLeave=()=>this._hold({hover:!1}),this._onFocusIn=()=>this._hold({focus:!0}),this._onFocusOut=e=>this._hold({focus:!!e.relatedTarget&&this.contains(e.relatedTarget)}),this._onVisibility=()=>this._sync(),this._onMotion=()=>this._sync(),this._tick=()=>{this._timer=null,this._go(this._page+1<this._pages?this._page+1:0)}}connectedCallback(){if(this._track=this.querySelector(`.wui-carousel-track`),!this._track){this.ownerDocument.readyState===`loading`&&this.ownerDocument.addEventListener(`DOMContentLoaded`,()=>this.isConnected&&this.connectedCallback(),{once:!0});return}this._doc=this.ownerDocument,this._motion=typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(`(prefers-reduced-motion: reduce)`):null,this._motion?.addEventListener(`change`,this._onMotion),this.addEventListener(`click`,this._onClick),this.addEventListener(`mouseenter`,this._onEnter),this.addEventListener(`mouseleave`,this._onLeave),this.addEventListener(`focusin`,this._onFocusIn),this.addEventListener(`focusout`,this._onFocusOut),this._track.addEventListener(`keydown`,this._onKeyDown),this._track.addEventListener(`scroll`,this._onScroll,{passive:!0}),this._doc.addEventListener(`visibilitychange`,this._onVisibility),typeof MutationObserver<`u`&&(this._mutations=new MutationObserver(()=>this._refresh()),this._mutations.observe(this._track,{childList:!0})),typeof ResizeObserver<`u`&&(this._resizer=new ResizeObserver(()=>this._refresh()),this._resizer.observe(this._track)),this._ready=!0,this._refresh()}disconnectedCallback(){this._ready=!1,clearTimeout(this._timer),clearTimeout(this._settleTimer),this._timer=null,this._motion?.removeEventListener(`change`,this._onMotion),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`mouseenter`,this._onEnter),this.removeEventListener(`mouseleave`,this._onLeave),this.removeEventListener(`focusin`,this._onFocusIn),this.removeEventListener(`focusout`,this._onFocusOut),this._track?.removeEventListener(`keydown`,this._onKeyDown),this._track?.removeEventListener(`scroll`,this._onScroll),this._doc?.removeEventListener(`visibilitychange`,this._onVisibility),this._mutations?.disconnect(),this._resizer?.disconnect(),this._mutations=this._resizer=this._motion=this._doc=null}attributeChangedCallback(){this._ready&&this._sync()}get paused(){return this._paused}set paused(e){this._paused=!!e,this._ready&&this._sync()}next(){this._page+1<this._pages?this._go(this._page+1):this.hasAttribute(`loop`)&&this._go(0)}prev(){this._page>0?this._go(this._page-1):this.hasAttribute(`loop`)&&this._go(this._pages-1)}goTo(e){this._go(Number(e))}_interval(){let e=Number.parseInt(this.getAttribute(`autoplay`)??``,10);return e>0?e:0}_slides(){return Array.from(this._track.children).filter(e=>e.classList.contains(`wui-carousel-slide`))}_playing(){return this._interval()>0&&this._pages>1&&!this._paused&&!this._hover&&!this._focus&&!this._motion?.matches&&!this._doc?.hidden}_hold({hover:e=this._hover,focus:t=this._focus}){this._hover=e,this._focus=t,this._sync()}_click(e){let t=e.target.closest?.(`.wui-carousel-pause, .wui-carousel-prev, .wui-carousel-next, .wui-carousel-dot`);!t||!this.contains(t)||this._track.contains(t)||(t.classList.contains(`wui-carousel-pause`)?(this._paused=!this._paused,this._hover=!1,this._focus=!1,this._sync()):t.getAttribute(`aria-disabled`)===`true`?e.preventDefault():t.classList.contains(`wui-carousel-prev`)?this.prev():t.classList.contains(`wui-carousel-next`)?this.next():this._go(Number(t.dataset.page)))}_key(e){if(e.target!==this._track||e.altKey||e.ctrlKey||e.metaKey)return;let t={ArrowRight:()=>this.next(),ArrowLeft:()=>this.prev(),Home:()=>this._go(0),End:()=>this._go(this._pages-1)}[e.key];t&&(e.preventDefault(),t())}_perViewNow(){let e=typeof window<`u`?window.getComputedStyle(this._track).getPropertyValue(`--wui-carousel-view`):``,t=Number.parseInt(e,10);return t>=1?t:1}_start(e){return Math.min(e*this._perView,Math.max(0,this._slides().length-this._perView))}_label(){let e=this._slides();return e.forEach((t,n)=>{let r=_i.slide(n+1,e.length);t.getAttribute(`aria-label`)!==r&&t.setAttribute(`aria-label`,r)}),e.length}_refresh(){let e=this._label();this._perView=this._perViewNow();let t=Math.max(1,Math.ceil(e/this._perView)),n=this.querySelector(`.wui-carousel-dots`);if(n&&n.children.length!==t){let e=this.getAttribute(`dot-label`)||_i.dot;n.replaceChildren(...Array.from({length:t},(t,n)=>{let r=this.ownerDocument.createElement(`button`);return r.type=`button`,r.className=`wui-carousel-dot`,r.dataset.page=String(n),r.setAttribute(`aria-label`,`${e} ${this._start(n)+1}`),r}))}this._pages=t,this._page=Math.min(this._page,t-1),this.toggleAttribute(`data-single`,t<=1),this._render(!1),this._sync()}_settle(){let e=this._track,t=this._slides();if(!t.length)return;let n;if(e.scrollWidth>e.clientWidth&&e.scrollLeft+e.clientWidth>=e.scrollWidth-2)n=this._pages-1;else{let r=0,i=1/0;t.forEach((t,n)=>{let a=Math.abs(t.offsetLeft-e.scrollLeft);a<i&&(i=a,r=n)}),n=Math.min(this._pages-1,Math.round(r/this._perView))}n!==this._page&&(this._page=n,this._render(!0),this._sync())}_go(e){if(!Number.isInteger(e))return;this._page=Math.max(0,Math.min(this._pages-1,e));let t=this._slides()[this._start(this._page)];if(t){let e=this._motion?.matches?`auto`:`smooth`;typeof this._track.scrollTo==`function`?this._track.scrollTo({left:t.offsetLeft,behavior:e}):this._track.scrollLeft=t.offsetLeft}this._render(!0),this._sync()}_render(e){let t=this.hasAttribute(`loop`);for(let e of this.querySelectorAll(`.wui-carousel-dot`))Number(e.dataset.page)===this._page?e.setAttribute(`aria-current`,`true`):e.removeAttribute(`aria-current`);this.querySelector(`.wui-carousel-prev`)?.setAttribute(`aria-disabled`,String(!t&&this._page===0)),this.querySelector(`.wui-carousel-next`)?.setAttribute(`aria-disabled`,String(!t&&this._page===this._pages-1));let n=this._slides().length,r=this._start(this._page)+1,i=Math.min(n,r+this._perView-1),a=_i.status(r,i,n);if(a===this._status||(this._status=a,!e))return;let o=this.querySelector(`[data-wui-status]`);o&&!this._playing()&&(o.textContent=a),this.dispatchEvent(new CustomEvent(`wui:carousel:change`,{bubbles:!0,detail:{page:this._page,pages:this._pages}}))}_sync(){clearTimeout(this._timer),this._timer=null;let e=this._interval(),t=this.querySelector(`.wui-carousel-pause`);if(t){t.hidden=e===0||this._pages<=1||!!this._motion?.matches;let n=this._paused?this.getAttribute(`play-label`)||_i.play:this.getAttribute(`pause-label`)||_i.pause,r=t.querySelector(`.wui-carousel-pause-text`);r&&r.textContent!==n&&(r.textContent=n),this.toggleAttribute(`data-paused`,this._paused)}this._playing()&&(this._timer=setTimeout(this._tick,e))}},bi=Object.freeze([`text`,`json`,`js`,`cs`,`sql`,`bash`,`http`,`html`,`css`]),xi=Object.freeze({text:``,json:`JSON`,js:`JavaScript`,cs:`C#`,sql:`SQL`,bash:`Bash`,http:`HTTP`,html:`HTML`,css:`CSS`}),U=e=>RegExp(`\\b(?:${e.join(`|`)})\\b`),Si=`(?![\\s\\S])`,Ci=RegExp(`/\\*[\\s\\S]*?(?:\\*/|${Si})`).source,wi=[[`attr`,/"(?:[^"\\\n]|\\.)*"(?=\s*:)/],[`string`,/"(?:[^"\\\n]|\\.)*"?/],[`number`,/-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b/],[`literal`,U([`true`,`false`,`null`])],[`punct`,/[{}[\],:]/]],Ti=[[`comment`,RegExp(`//[^\\n]*|${Ci}`)],[`string`,/"(?:[^"\\\n]|\\.)*"?|'(?:[^'\\\n]|\\.)*'?|`(?:[^`\\]|\\[\s\S])*`?/],[`number`,/\b(?:0[xX][\da-fA-F_]+|\d[\d_]*\.?\d*(?:[eE][+-]?\d+)?n?)\b/],[`keyword`,U(`async.await.break.case.catch.class.const.continue.default.delete.do.else.export.extends.finally.for.from.function.if.import.in.instanceof.let.new.of.return.static.super.switch.this.throw.try.typeof.var.void.while.yield`.split(`.`))],[`literal`,U([`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`])],[`function`,/(?<![\w$])[A-Za-z_$][\w$]*(?=\s*\()/],[`type`,/(?<![\w$])[A-Z][\w$]*/],[`punct`,/[{}()[\];,]/]],Ei=[[`comment`,RegExp(`//[^\\n]*|${Ci}`)],[`string`,/@"(?:[^"]|"")*"?|\$@?"(?:[^"\\\n]|\\.)*"?|"(?:[^"\\\n]|\\.)*"?|'(?:[^'\\\n]|\\.)*'?/],[`number`,/\b\d[\d_]*\.?\d*(?:[eE][+-]?\d+)?[fFdDmMlLuU]{0,2}\b/],[`keyword`,U(`abstract.as.async.await.base.bool.break.byte.case.catch.char.checked.class.const.continue.decimal.default.delegate.do.double.else.enum.event.explicit.extern.finally.fixed.float.for.foreach.get.goto.if.implicit.in.init.int.interface.internal.is.lock.long.namespace.new.object.operator.out.override.params.private.protected.public.readonly.record.ref.required.return.sbyte.sealed.set.short.sizeof.static.string.struct.switch.this.throw.try.typeof.uint.ulong.unchecked.unsafe.ushort.using.var.virtual.void.volatile.when.while.with`.split(`.`))],[`literal`,U([`true`,`false`,`null`])],[`function`,/(?<!\w)[A-Za-z_]\w*(?=\s*\()/],[`type`,/(?<!\w)[A-Z]\w*/],[`punct`,/[{}()[\];,]/]],Di=[[`comment`,RegExp(`--[^\\n]*|${Ci}`)],[`string`,/'(?:[^']|'')*'?/],[`variable`,/@@?\w+/],[`number`,/\b\d+(?:\.\d+)?\b/],[`keyword`,U(`add.all.alter.and.as.asc.begin.between.by.case.check.column.commit.constraint.create.cross.database.declare.default.delete.desc.distinct.drop.else.end.exec.execute.exists.foreign.from.full.function.group.having.if.in.index.inner.insert.into.is.join.key.left.like.limit.not.null.offset.on.or.order.outer.over.partition.primary.procedure.references.return.returns.right.rollback.select.set.table.then.top.transaction.union.unique.update.values.view.when.where.while.with`.split(`.`))],[`literal`,U([`true`,`false`])],[`type`,U([`bigint`,`bit`,`char`,`date`,`datetime`,`datetime2`,`decimal`,`float`,`int`,`money`,`nchar`,`numeric`,`nvarchar`,`real`,`smallint`,`text`,`time`,`tinyint`,`uniqueidentifier`,`varchar`])],[`function`,/\b[A-Za-z_]\w*(?=\s*\()/],[`punct`,/[(),;]/]],Oi=[[`comment`,/(?<![^\s;|&(])#[^\n]*/],[`string`,/"(?:[^"\\]|\\[\s\S])*"?|'[^']*'?/],[`variable`,/\$(?:\{[^}\n]*\}?|[A-Za-z_]\w*|[0-9@#?$!*-])/],[`attr`,/(?<![\w-])--?[A-Za-z][\w-]*/],[`number`,/(?<![\w.-])\d+(?:\.\d+)?\b/],[`keyword`,U([`case`,`do`,`done`,`elif`,`else`,`esac`,`exit`,`export`,`fi`,`for`,`function`,`if`,`in`,`local`,`return`,`select`,`then`,`until`,`while`])],[`function`,U(`awk.az.cat.cd.chmod.chown.cp.curl.docker.dotnet.echo.gcloud.git.grep.kubectl.ls.mkdir.mv.npm.npx.pnpm.rm.sed.source.sudo.wget`.split(`.`))],[`punct`,/[|&;<>(){}[\]]+/]],ki=[[`comment`,/^#[^\n]*/m],[`keyword`,/^(?:GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS|TRACE|CONNECT)(?= )/m],[`literal`,/HTTP\/\d(?:\.\d)?/],[`number`,/(?<=^HTTP\/\d(?:\.\d)? )\d{3}\b/m],[`function`,/(?<=^[A-Z]+ )\S+/m],[`attr`,/^[A-Za-z][\w-]*(?=:)/m],[`string`,/(?<=^[A-Za-z][\w-]*:[ \t]*)[^\n]+/m]],Ai=[[`comment`,RegExp(`<!--[\\s\\S]*?(?:-->|${Si})`)],[`keyword`,/<![A-Za-z][^>]*>?/],[`tag`,/<\/?[A-Za-z][^<>]*>?/],[`literal`,/&#?\w+;/]],ji={json:wi,js:Ti,cs:Ei,sql:Di,bash:Oi,http:ki,css:[[`comment`,new RegExp(Ci)],[`string`,/"(?:[^"\\\n]|\\.)*"?|'(?:[^'\\\n]|\\.)*'?/],[`keyword`,/@[\w-]+|!important/],[`attr`,/[\w-]+(?=\s*:[^{};]*[;}])/],[`number`,/#[0-9a-fA-F]{3,8}\b|(?<![\w-])-?(?:\d+\.?\d*|\.\d+)(?:%|[A-Za-z]{1,4})?/],[`function`,/[\w-]+(?=\()/],[`type`,/[.#](?!\d)[A-Za-z_][\w-]*/],[`punct`,/[{}();:,]/]],html:Ai,htmlTag:[[`tag`,/^<\/?[\w:.-]+/],[`string`,/"[^"]*"?|'[^']*'?/],[`attr`,/(?<=\s)[^\s=<>/"']+/],[`punct`,/\/?>|=/]]},Mi=new Map;function Ni(e){let t=Mi.get(e);if(!t){let n=ji[e],r=e===`sql`?`gi`:`g`,i=n.map(([,e])=>`(${e.source})`).join(`|`);t={re:new RegExp(i,`${r}m`),types:n.map(([e])=>e)},Mi.set(e,t)}return t}function Pi(e,t,n){if(!n)return;let r=e[e.length-1];r&&r[0]===t?r[1]+=n:e.push([t,n])}function Fi(e,t,n=[]){let{re:r,types:i}=Ni(e),a=0;for(let o of t.matchAll(r)){if(!o[0])continue;Pi(n,`plain`,t.slice(a,o.index));let r=i.findIndex((e,t)=>o[t+1]!==void 0);e===`html`&&i[r]===`tag`?Fi(`htmlTag`,o[0],n):Pi(n,i[r],o[0]),a=o.index+o[0].length}return Pi(n,`plain`,t.slice(a)),n}function Ii(e){let t=/\r?\n\r?\n/.exec(e);if(!t)return Fi(`http`,e);let n=Fi(`http`,e.slice(0,t.index+t[0].length)),r=e.slice(t.index+t[0].length),i=r.trimStart()[0];return i===`{`||i===`[`?Fi(`json`,r,n):i===`<`?Fi(`html`,r,n):(Pi(n,`plain`,r),n)}function Li(e,t){let n=String(e??``);return!n||n.length>1e5?n?[[`plain`,n]]:[]:t===`http`?Ii(n):!Object.hasOwn(ji,t)||t===`htmlTag`?[[`plain`,n]]:Fi(t,n)}function Ri(e,t){let n=[[]];for(let[r,i]of Li(e,t))i.split(/\r\n|\r|\n/).forEach((e,t)=>{t>0&&n.push([]),e&&n[n.length-1].push([r,e])});return n.length>1&&n[n.length-1].length===0&&n.pop(),n}var zi=2e3;async function Bi(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 Vi=class extends c{static get observedAttributes(){return[`language`,`line-numbers`,`wrap`,`label`,`copy-label`,`copied-label`]}constructor(){super(),this._chrome=null,this._observer=null,this._timer=0}connectedCallback(){this._render(),!(typeof MutationObserver>`u`)&&(this._observer=new MutationObserver(e=>{e.some(e=>!this._chrome?.contains(e.target))&&this._render()}),this._observer.observe(this,{childList:!0,subtree:!0,characterData:!0}))}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,clearTimeout(this._timer)}attributeChangedCallback(){this.isConnected&&this._render()}_source(){return Array.from(this.children).find(e=>e.classList.contains(`wui-code-source`))}_render(){let e=this._source();if(!e)return;clearTimeout(this._timer);let t=this.ownerDocument,n=(e.textContent??``).replace(/\r?\n$/,``),r=this.getAttribute(`language`),i=bi.includes(r)?r:`text`,a=this.getAttribute(`label`)||``,o=Ri(n,i),s=t.createElement(`div`);s.className=`wui-code-chrome`,s.append(this._bar(t,a||xi[i],n));let c=t.createElement(`div`);c.className=`wui-code-view`,c.setAttribute(`role`,`region`),c.setAttribute(`aria-label`,a||`Code`),c.tabIndex=0,c.style.setProperty(`--wui-code-digits`,String(String(o.length).length));let l=t.createElement(`pre`);l.className=`wui-code-pre`;let u=t.createElement(`code`);for(let e of o){let n=t.createElement(`span`);n.className=`wui-code-line`;for(let[r,i]of e){if(r===`plain`){n.append(i);continue}let e=t.createElement(`span`);e.className=`wui-code-t-${r}`,e.textContent=i,n.append(e)}u.append(n)}l.append(u),c.append(l),s.append(c),this._chrome?.remove(),this._chrome=s,this.append(s),this.setAttribute(`data-wui-ready`,``),this._observer?.takeRecords()}_bar(e,t,n){let r=e.createElement(`div`);r.className=`wui-code-bar`;let i=e.createElement(`span`);i.className=`wui-code-title`,i.textContent=t;let a=this.getAttribute(`copy-label`)||`Copy`,o=this.getAttribute(`copied-label`)||`Copied`,s=e.createElement(`button`);s.type=`button`,s.className=`btn btn-ghost btn-sm wui-code-copy`,s.setAttribute(`aria-live`,`polite`);let c=e.createElement(`span`);c.className=`wui-code-copy-icon`;let l=e.createElement(`span`),u=e=>{c.innerHTML=M(e?`check`:`files`,{size:14}),l.textContent=e?o:a};return u(!1),s.append(c,l),s.addEventListener(`click`,async()=>{await Bi(n)&&(u(!0),clearTimeout(this._timer),this._timer=setTimeout(()=>u(!1),zi))}),r.append(i,s),r}};function Hi(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 Ui=`[role="option"]`,Wi=`No results`,Gi=`All`,Ki=`Recent`,qi=5,Ji=20,Yi=`.wui-cmd-back, [data-depth]`,Xi=0,Zi=class extends c{static get observedAttributes(){return[`filter`,`highlight`,`empty-text`,`path`,`root-label`,`recents-key`,`recents-limit`,`recents-label`]}constructor(){super(),this._path=[],this._crumbSig=null,this._modal=null,this._recentsId=`wui-cmd-recents-${++Xi}`,this._onModalHidden=()=>this._reset(),this._activeId=null,this._lastQuery=null,this._lastIds=null,this._userChose=!1,this._onKeyDown=e=>this._handleKeyDown(e),this._onClick=e=>{let t=e.target?.closest?.(Yi);if(t&&this.contains(t)){let e=t.matches(`.wui-cmd-back`)?this._path.length-1:Number(t.dataset.depth);this._goTo(this._path.slice(0,e));return}let n=this._optionFrom(e.target);n&&this._select(n)},this._onMouseDown=e=>{let t=e.target?.closest?.(Yi);(t&&this.contains(t)||this._optionFrom(e.target,!0))&&e.preventDefault()},this._onMouseMove=e=>{let t=this._optionFrom(e.target);t&&t.id!==this._activeId&&(this._userChose=!0,this._setActive(t,!1))},this._onInput=e=>{!this.hasAttribute(`filter`)||e.target!==this._input()||(this._applyFilter(),this.refresh())}}connectedCallback(){this._teardown(),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`click`,this._onClick),this.addEventListener(`mousedown`,this._onMouseDown),this.addEventListener(`mousemove`,this._onMouseMove),this.addEventListener(`input`,this._onInput),this._modal=this.closest(`.modal`),this._modal?.addEventListener(`hidden.bs.modal`,this._onModalHidden),this._readPath(),this.hasAttribute(`filter`)&&this._applyFilter(),this.refresh()}disconnectedCallback(){this._teardown()}attributeChangedCallback(e){this.isConnected&&(e===`path`&&this._readPath(),this.hasAttribute(`filter`)&&this._applyFilter(),this.refresh())}get filter(){return this.hasAttribute(`filter`)}set filter(e){this.toggleAttribute(`filter`,!!e)}get highlight(){return this.getAttribute(`highlight`)!==`false`}set highlight(e){this.setAttribute(`highlight`,e?`true`:`false`)}get emptyText(){return this.getAttribute(`empty-text`)??Wi}set emptyText(e){this.setAttribute(`empty-text`,String(e??``))}refresh(){this._renderRecents(),this._renderCrumbs();let e=this._input(),t=e?e.value:``,n=t!==this._lastQuery;this._lastQuery=t;let r=this._selectableOptions(),i=r.map(e=>e.id).join(`
23
+ `),a=i!==this._lastIds;this._lastIds=i;let o=!n&&(this._userChose||!a)?r.find(e=>e.id===this._activeId):null;o||(this._userChose=!1),this._setActive(o??r[0]??null,n)}_input(){return this.querySelector(`[role="combobox"]`)}_optionFrom(e,t=!1){let n=e?.closest?.(Ui);return n&&this.contains(n)&&!this._isHidden(n)&&(t||!this._isDisabled(n))?n:null}_isDisabled(e){return e.getAttribute(`aria-disabled`)===`true`}_isHidden(e){return e.hidden||!!e.closest(`[role="group"]`)?.hidden}_selectableOptions(){return[...this.querySelectorAll(Ui)].filter(e=>!this._isHidden(e)&&!this._isDisabled(e))}_setActive(e,t){this._activeId=e?e.id:null;for(let t of this.querySelectorAll(Ui))t.setAttribute(`aria-selected`,t===e?`true`:`false`);let n=this._input();n&&(e?n.setAttribute(`aria-activedescendant`,e.id):n.removeAttribute(`aria-activedescendant`)),e&&t&&e.scrollIntoView({block:`nearest`})}_move(e){let t=this._selectableOptions();if(!t.length)return;let n=t.findIndex(e=>e.id===this._activeId),r=n<0?e>0?0:t.length-1:(n+e+t.length)%t.length;this._userChose=!0,this._setActive(t[r],!0)}_handleKeyDown(e){if(e.target===this._input()){if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),this._move(e.key===`ArrowDown`?1:-1);else if(e.key===`Backspace`&&!e.isComposing&&this._path.length&&!e.target.value)e.preventDefault(),this._goTo(this._path.slice(0,-1));else if(e.key===`Enter`&&!e.isComposing){let t=this._selectableOptions().find(e=>e.id===this._activeId);if(!t)return;e.preventDefault(),this._select(t)}}}_select(e){this._remember(e),this.dispatchEvent(new CustomEvent(`wui-command-palette:select`,{bubbles:!0,cancelable:!0,detail:{key:e.dataset.key??null,groupKey:e.dataset.groupKey??null,id:e.id}}))&&(e.dataset.opens?this._open(e.dataset.opens):e.dataset.href&&this._navigate(e.dataset.href))}_open(e){let t=[...this.querySelectorAll(`.wui-cmd-page`)].find(t=>t.dataset.page===e);this._goTo([...this._path,{key:e,label:t?.dataset.label??e}])}_goTo(e){this._input()?.focus(),this.dispatchEvent(new CustomEvent(`wui-command-palette:navigate`,{bubbles:!0,cancelable:!0,detail:{path:e}}))&&(this._path=e,this._restart())}_restart(){let e=this._input();e&&(e.value=``),this.hasAttribute(`filter`)&&this._applyFilter(),this.refresh()}_reset(){this.hasAttribute(`path`)||(this._path=[],this._restart())}_readPath(){let e=this.getAttribute(`path`);if(e==null)return;let t=JSON.parse(e);this._path=Array.isArray(t)?t.filter(e=>e&&typeof e.key==`string`&&typeof e.label==`string`):[]}_renderCrumbs(){let e=this.querySelector(`.wui-cmd-crumbs`);if(!e)return;let t=this.getAttribute(`root-label`)??Gi,n=JSON.stringify([t,this._path]);if(e.hidden=this._path.length===0,n===this._crumbSig)return;this._crumbSig=n;let r=e.querySelector(`.wui-cmd-trail`);if(!r)return;let i=[t,...this._path.map(e=>e.label)];r.replaceChildren(...i.map((e,t)=>{let n=document.createElement(`li`),r=t===i.length-1,a=document.createElement(r?`span`:`button`);return a.className=`wui-cmd-crumb`,a.textContent=e,r?a.setAttribute(`aria-current`,`page`):(a.type=`button`,a.dataset.depth=String(t)),n.append(a),n}))}_recentsHost(){return this.querySelector(`.wui-cmd-recents`)}_realOptions(){let e=this._recentsHost();return[...this.querySelectorAll(Ui)].filter(t=>!e?.contains(t))}_recentEntries(){let e=this.getAttribute(`recents-key`);if(!e)return[];let t;try{t=JSON.parse(globalThis.localStorage?.getItem(e)??`[]`)}catch{return[]}return Array.isArray(t)?t.filter(e=>e&&typeof e.g==`string`&&typeof e.k==`string`):[]}_recentsLimit(){let e=Number.parseInt(this.getAttribute(`recents-limit`)??``,10);return Number.isFinite(e)&&e>0?Math.min(e,Ji):qi}_remember(e){let t=this.getAttribute(`recents-key`),{groupKey:n,key:r,opens:i}=e.dataset;if(!t||i||n==null||r==null)return;let a=[{g:n,k:r},...this._recentEntries().filter(e=>!(e.g===n&&e.k===r))];try{globalThis.localStorage?.setItem(t,JSON.stringify(a.slice(0,this._recentsLimit())))}catch{}}_renderRecents(){let e=this._recentsHost();if(!e)return;let t=this._input(),n=this._path.length===0&&!(t?.value??``).trim()?this._recentEntries():[],r=this._realOptions(),i=[];for(let e of n){let t=r.find(t=>t.dataset.groupKey===e.g&&t.dataset.key===e.k);if(t&&!t.dataset.opens&&!this._isDisabled(t)&&i.push(t),i.length>=this._recentsLimit())break}if(!i.length){e.firstChild&&e.replaceChildren();return}let a=`${this._recentsId}-label`,o=document.createElement(`div`);o.className=`wui-cmd-group`,o.setAttribute(`role`,`group`),o.setAttribute(`aria-labelledby`,a);let s=document.createElement(`div`);s.className=`wui-cmd-group-label`,s.setAttribute(`role`,`presentation`),s.id=a,s.textContent=this.getAttribute(`recents-label`)??Ki,o.append(s);for(let e of i){let t=e.cloneNode(!0);t.id=`${this._recentsId}-${e.id}`,t.hidden=!1,t.removeAttribute(`aria-selected`),o.append(t)}e.replaceChildren(o)}_inScope(e,t){return!t||(e.closest(`.wui-cmd-page`)?.dataset.page??null)===(this._path.at(-1)?.key??null)}_navigate(e){window.location.assign(e)}_applyFilter(){let e=this._input(),t=(e?e.value:``).trim(),n=t.toLowerCase(),r=this.highlight,i=[...this.querySelectorAll(`.wui-cmd-page`)],a=i.length>0,o=this._path.at(-1)?.key??null;for(let e of i)e.hidden=e.dataset.page!==o;let s=0;for(let e of this._realOptions()){let i=e.querySelector(`.wui-cmd-item-label`),o=e.dataset.label??i?.textContent??``,c=this._inScope(e,a)&&(!n||o.toLowerCase().includes(n));e.hidden=!c,c&&s++,i&&(i.innerHTML=Hi(o,r?t:``).map(e=>e.match?`<mark class="wui-cmd-mark">${H(e.text)}</mark>`:H(e.text)).join(``))}let c=this._recentsHost();for(let e of this.querySelectorAll(`[role="group"]`))c?.contains(e)||(e.hidden=![...e.querySelectorAll(Ui)].some(e=>!e.hidden));let l=this.querySelector(`[role="listbox"]`);l&&(l.hidden=s===0);let u=this.querySelector(`.wui-cmd-empty`);u&&(u.textContent=n&&s===0?this.emptyText:``)}_teardown(){this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`mousedown`,this._onMouseDown),this.removeEventListener(`mousemove`,this._onMouseMove),this.removeEventListener(`input`,this._onInput),this._modal?.removeEventListener(`hidden.bs.modal`,this._onModalHidden),this._modal=null}},Qi=Object.freeze([`👍`,`❤️`,`🎉`,`😄`,`👀`,`🙏`]),$i=Object.freeze([`post`,`reply`,`edit`,`delete`,`react`]),W=Object.freeze({listName:`Comments`,empty:`No comments yet.`,deleted:`This comment was deleted.`,edited:`Edited`,reply:`Reply`,edit:`Edit`,delete:`Delete`,cancel:`Cancel`,save:`Save`,post:`Comment`,confirmDelete:`Delete this comment?`,composerLabel:`Add a comment`,composerPlaceholder:`Write a comment. Type @ to mention someone.`,replyLabel:e=>`Reply to ${e}`,replyPlaceholder:`Write a reply`,editLabel:`Edit comment`,repliesName:e=>`Replies to ${e}`,reactions:`Reactions`,addReaction:`Add a reaction`,pickerName:`Choose a reaction`,emptyBody:`Write something first.`,done:Object.freeze({post:`Comment posted.`,reply:`Reply posted.`,edit:`Comment saved.`,delete:`Comment deleted.`,react:``}),failed:Object.freeze({forbidden:`You do not have permission to do this.`,client:`This did not go through. Refresh the page and try again.`,validation:`This was not accepted. Check it and try again.`,server:`Something went wrong on our side. Try again in a moment.`,network:`Could not reach the server. Check your connection and try again.`})}),ea=`[data-wui-items]`,ta=`[data-wui-picker]`,na=`[data-wui-composer]`,ra=`[data-wui-comment]`,ia=`[data-wui-live]`,aa=e=>typeof e?.message==`string`&&e.message?e.message:W.failed.server,oa=class extends c{constructor(){super(),this._wired=!1,this._busy=!1,this._peopleProp=null,this._pickerFor=null,this._onClick=this._onClick.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onSubmitKey=this._onSubmitKey.bind(this),this._onDocClick=e=>{this._pickerFor&&!this.querySelector(ta)?.contains(e.target)&&!this._pickerFor.button.contains(e.target)&&this._closePicker(!1)},this._repositionPicker=()=>{this._pickerFor&&a(this._pickerFor.button,this.querySelector(ta))}}connectedCallback(){if(Object.hasOwn(this,`people`)){let e=this.people;delete this.people,this.people=e}this._wired||(this._wired=!0,this.addEventListener(`click`,this._onClick),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`wui:mention-input:submit`,this._onSubmitKey),this._handPeople(this.querySelector(`${na} wui-mention-input`)))}disconnectedCallback(){this._closePicker(!1)}get people(){return this._peopleProp?this._peopleProp:[...this.querySelectorAll(`:scope > [data-wui-people] > wui-option`)].map(e=>({value:e.getAttribute(`value`)??``,label:e.textContent.trim(),description:e.getAttribute(`data-description`)||void 0,src:e.getAttribute(`data-src`)||void 0}))}set people(e){this._peopleProp=Array.isArray(e)?e:[];for(let e of this.querySelectorAll(`wui-mention-input`))e.people=this._peopleProp}_handPeople(e){!e||this.hasAttribute(`remote`)||this.hasAttribute(`source`)||(e.people=this.people)}_reactionChoices(){let e=this.getAttribute(`reaction-choices`),t=e?e.split(/\s+/).filter(Boolean):[];return t.length?t:Qi}_onClick(e){let t=e.target.closest?.(`[data-wui-emoji]`);if(t&&this.contains(t)&&!t.disabled){let e=t.closest(ta),n=e?this._pickerFor?.comment:t.closest(ra);e&&this._closePicker(!0),n&&this._react(n,t.getAttribute(`data-wui-emoji`));return}let n=e.target.closest?.(`[data-wui-action]`);if(!n||!this.contains(n)||n.disabled)return;let r=n.closest(ra);switch(n.getAttribute(`data-wui-action`)){case`reply`:this._openReply(r,n);break;case`edit`:this._openEditor(r,n);break;case`delete`:this._askDelete(r);break;case`cancel-delete`:this._closeConfirm(r,!0);break;case`confirm-delete`:this._send(`delete`,{commentId:r.getAttribute(`data-wui-comment`)},{comment:r,scope:r});break;case`react-menu`:this._pickerFor?.button===n?this._closePicker(!0):this._openPicker(r,n);break;case`cancel`:this._closeSlot(n.closest(`[data-wui-reply], [data-wui-editor]`),!0);break;case`post`:case`send`:this._sendFrom(n);break}}_onKeyDown(e){let t=this.querySelector(ta);if(this._pickerFor&&t?.contains(e.target)){let n=[...t.querySelectorAll(`[data-wui-emoji]`)],r=n.indexOf(e.target);e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),this._closePicker(!0)):e.key===`ArrowRight`||e.key===`ArrowLeft`?(e.preventDefault(),n[(r+(e.key===`ArrowRight`?1:-1)+n.length)%n.length]?.focus()):e.key===`Tab`&&this._closePicker(!1);return}if(e.key!==`Escape`)return;let n=e.target.closest?.(`[data-wui-reply], [data-wui-editor]`);if(n&&this.contains(n)){e.preventDefault(),e.stopPropagation(),this._closeSlot(n,!0);return}let r=e.target.closest?.(`[data-wui-confirm]`);r&&(e.preventDefault(),e.stopPropagation(),this._closeConfirm(r.closest(ra),!0))}_onSubmitKey(e){let t=(e.target.closest?.(`[data-wui-reply], [data-wui-editor], [data-wui-composer]`))?.querySelector(`[data-wui-action="send"], [data-wui-action="post"]`);t&&!t.disabled&&this._sendFrom(t)}_openReply(e,t){let n=e?.querySelector(`:scope > [data-wui-reply]`);if(!n)return;if(!n.hidden){n.querySelector(`wui-mention-input`)?.focus();return}let r=e.querySelector(`.wui-comment-author`)?.textContent.trim()||``;this._fillSlot(n,{label:W.replyLabel(r),placeholder:W.replyPlaceholder,value:``,send:W.reply,opener:t})}_openEditor(e,t){let n=e?.querySelector(`:scope > .wui-comment-row [data-wui-editor]`);if(!n||!n.hidden)return;let r=n.parentElement.querySelector(`:scope > [data-wui-text]`);r&&(r.hidden=!0),this._fillSlot(n,{label:W.editLabel,placeholder:``,value:e.getAttribute(`data-value`)??``,send:W.save,opener:t})}_fillSlot(e,{label:t,placeholder:n,value:r,send:i,opener:a}){let o=this.ownerDocument,s=o.createElement(`wui-mention-input`);s.className=`wui-mention-input`,s.setAttribute(`label`,t),n&&s.setAttribute(`placeholder`,n),s.setAttribute(`rows`,`2`),s.setAttribute(`value`,r);for(let e of[`remote`,`source`,`min-chars`,`debounce`])this.hasAttribute(e)&&s.setAttribute(e,this.getAttribute(e));let c=o.createElement(`div`);c.className=`wui-comment-form-actions`,c.append(this._button(`btn btn-primary btn-sm`,`send`,i),this._button(`btn btn-ghost btn-sm`,`cancel`,W.cancel));let l=o.createElement(`div`);l.className=`wui-comment-error`,l.setAttribute(`data-wui-error`,``),l.hidden=!0,e.replaceChildren(s,c,l),this._handPeople(s),e.hidden=!1,this._openers??=new WeakMap,this._openers.set(e,a),s.focus();let u=s.querySelector(`textarea`);u?.setSelectionRange(u.value.length,u.value.length)}_button(e,t,n){let r=this.ownerDocument.createElement(`button`);return r.type=`button`,r.className=e,r.setAttribute(`data-wui-action`,t),r.textContent=n,r}_closeSlot(e,t){if(!e||e.hidden)return;if(e.hidden=!0,e.replaceChildren(),e.hasAttribute(`data-wui-editor`)){let t=e.parentElement?.querySelector(`:scope > [data-wui-text]`);t&&(t.hidden=!1)}let n=this._openers?.get(e);t&&n?.isConnected&&n.focus()}_askDelete(e){let t=e?.querySelector(`:scope > .wui-comment-row`),n=t?.querySelector(`[data-wui-confirm]`),r=t?.querySelector(`[data-wui-actions]`);n&&(n.hidden=!1,r&&(r.hidden=!0),n.querySelector(`[data-wui-action="cancel-delete"]`)?.focus())}_closeConfirm(e,t){let n=e?.querySelector(`:scope > .wui-comment-row`),r=n?.querySelector(`[data-wui-confirm]`),i=n?.querySelector(`[data-wui-actions]`);r&&(r.hidden=!0),i&&(i.hidden=!1),t&&i?.querySelector(`[data-wui-action="delete"]`)?.focus()}_openPicker(e,t){let n=this.querySelector(ta);!n||!e||(this._closePicker(!1),this._pickerFor={comment:e,button:t},t.setAttribute(`aria-expanded`,`true`),n.hidden=!1,a(t,n),o(this,this._repositionPicker),this.ownerDocument.addEventListener(`click`,this._onDocClick,!0),n.querySelector(`[data-wui-emoji]`)?.focus())}_closePicker(e){let t=this._pickerFor;if(!t)return;this._pickerFor=null;let n=this.querySelector(ta);n&&(n.hidden=!0),t.button.setAttribute(`aria-expanded`,`false`),s(this),this.ownerDocument.removeEventListener(`click`,this._onDocClick,!0),e&&t.button.isConnected&&t.button.focus()}_react(e,t){t&&this._send(`react`,{commentId:e.getAttribute(`data-wui-comment`),emoji:t},{comment:e,scope:e})}_sendFrom(e){let t=e.closest(`[data-wui-reply], [data-wui-editor], [data-wui-composer]`);if(!t)return;let n=t.querySelector(`wui-mention-input`),r=n?.value??``;if(!r.trim()){this._showError(t,W.emptyBody),n?.focus();return}let i=t.closest(ra);t.hasAttribute(`data-wui-composer`)?this._send(`post`,{body:r},{scope:t,form:t}):t.hasAttribute(`data-wui-reply`)?this._send(`reply`,{parentId:i.getAttribute(`data-wui-comment`),body:r},{comment:i,scope:t,form:t}):this._send(`edit`,{commentId:i.getAttribute(`data-wui-comment`),body:r},{comment:i,scope:t,form:t})}async _send(e,t,{comment:n,scope:r,form:i}){if(this._busy)return;this._busy=!0,this.setAttribute(`aria-busy`,`true`);let a=i??n?.querySelector(`:scope > .wui-comment-row`)??this;this._showError(a,null);let o=[...r.querySelectorAll(`button, textarea`)].filter(e=>!e.disabled);for(let e of o)e.disabled=!0;let s=await this._persist({intent:e,...t});for(let e of o)e.isConnected&&(e.disabled=!1);this._busy=!1,this.removeAttribute(`aria-busy`);let c=t.commentId??null,l=t.parentId??null;if(s.ok){s.html!=null&&this._swapItems(s.html),e===`post`?i?.querySelector(`wui-mention-input`)?.clear():i?.isConnected&&this._closeSlot(i,!1),e===`delete`&&n?.isConnected&&this._closeConfirm(n,!1),this._restoreFocus(e,t,i),W.done[e]&&this._announce(W.done[e]),this.dispatchEvent(new CustomEvent(`wui:comment-thread:done`,{bubbles:!0,detail:{intent:e,commentId:c,parentId:l}}));return}s.kind===`session`||s.kind===`aborted`||(this._showError(a.isConnected?a:this,s.message),this._announce(s.message),this.dispatchEvent(new CustomEvent(`wui:comment-thread:failed`,{bubbles:!0,detail:{intent:e,kind:s.kind,message:s.message}})))}async _persist(e){if(this.hasAttribute(`controlled`)){if(typeof this.submit!=`function`)return{ok:!0,html:null};try{return await this.submit(e),{ok:!0,html:null}}catch(e){return{ok:!1,kind:`server`,message:aa(e)}}}let t=this.getAttribute(`action`);if(!t)return{ok:!1,kind:`client`,message:W.failed.client};let n=new URLSearchParams;for(let[t,r]of Object.entries(e))r!=null&&n.set(t,r);let r=await F(t,{method:`POST`,body:n});return r.ok?{ok:!0,html:r.html}:{ok:!1,kind:r.kind,message:r.message||W.failed[r.kind]||W.failed.server}}_swapItems(e){let t=this.querySelector(ea);if(!t||!e.trim())return;let n=this.ownerDocument.createElement(`template`);n.innerHTML=e;let r=n.content.querySelector(ea);t.replaceChildren(...r?r.childNodes:n.content.childNodes)}_restoreFocus(e,t,n){let r=this.ownerDocument,i=r.activeElement;if(i&&i!==r.body&&i.isConnected&&this.contains(i)&&!i.disabled)return;let a=e=>e?[...this.querySelectorAll(ra)].find(t=>t.getAttribute(`data-wui-comment`)===e):null,o=e=>a(e)?.querySelector(`:scope > .wui-comment-row`),s=null;if(e===`post`)s=n?.querySelector(`textarea`);else if(e===`reply`)s=o(t.parentId)?.querySelector(`[data-wui-action="reply"]`);else if(e===`edit`)s=o(t.commentId)?.querySelector(`[data-wui-action="edit"]`);else if(e===`react`){let e=o(t.commentId);s=[...e?.querySelectorAll(`button[data-wui-emoji]`)??[]].find(e=>e.getAttribute(`data-wui-emoji`)===t.emoji)??e?.querySelector(`[data-wui-action="react-menu"]`)}s??=this.querySelector(`${na} textarea`),s?.focus()}_showError(e,t){let n=e?.querySelector?.(`:scope > [data-wui-error], :scope > .wui-comment-main > [data-wui-error]`);n&&(n.textContent=t||``,n.hidden=!t)}_announce(e){let t=this.querySelector(`:scope > ${ia}`);!t||!e||(t.textContent=``,t.textContent=e)}},sa={"--color-primary":`#4F46E5`,"--color-primary-hover":`#4338CA`,"--color-primary-ink":`#4F46E5`,"--color-primary-text":`#FFFFFF`,"--color-text":`#071437`,"--color-text-muted":`#4B5675`,"--color-border":`#EBEDF3`,"--color-surface":`#FFFFFF`,"--wui-radius-lg":`14px`,"--wui-shadow-overlay-lg":`0 24px 60px -16px rgba(7, 20, 55, 0.28)`,"--wui-z-fixed":`1030`},G=e=>`var(${e}, ${sa[e]})`,ca=`
24
24
  :host {
25
25
  all: initial;
26
26
  position: fixed;
27
27
  bottom: 20px;
28
28
  left: 20px;
29
29
  right: auto;
30
- z-index: ${H(`--wui-z-fixed`)};
30
+ z-index: ${G(`--wui-z-fixed`)};
31
31
  display: block;
32
32
  width: 420px;
33
33
  max-width: calc(100vw - 40px);
34
34
  font-family: inherit;
35
35
  font-size: 16px;
36
36
  line-height: 1.5;
37
- color: ${H(`--color-text`)};
37
+ color: ${G(`--color-text`)};
38
38
  }
39
39
  :host([position="bottom-right"]) {
40
40
  right: 20px;
@@ -55,10 +55,10 @@ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{
55
55
 
56
56
  .wui-consent-banner-panel {
57
57
  padding: 20px;
58
- background: ${H(`--color-surface`)};
59
- border: 1px solid ${H(`--color-border`)};
60
- border-radius: ${H(`--wui-radius-lg`)};
61
- box-shadow: ${H(`--wui-shadow-overlay-lg`)};
58
+ background: ${G(`--color-surface`)};
59
+ border: 1px solid ${G(`--color-border`)};
60
+ border-radius: ${G(`--wui-radius-lg`)};
61
+ box-shadow: ${G(`--wui-shadow-overlay-lg`)};
62
62
  text-align: start;
63
63
  pointer-events: auto;
64
64
  }
@@ -67,16 +67,16 @@ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{
67
67
  font-size: 18px;
68
68
  font-weight: 600;
69
69
  line-height: 1.3;
70
- color: ${H(`--color-text`)};
70
+ color: ${G(`--color-text`)};
71
71
  }
72
72
  .wui-consent-banner-description {
73
73
  margin: 0 0 16px;
74
74
  font-size: 14px;
75
75
  line-height: 1.5;
76
- color: ${H(`--color-text-muted`)};
76
+ color: ${G(`--color-text-muted`)};
77
77
  }
78
78
  .wui-consent-banner-policy {
79
- color: ${H(`--color-primary-ink`)};
79
+ color: ${G(`--color-primary-ink`)};
80
80
  font-weight: 500;
81
81
  }
82
82
 
@@ -87,15 +87,15 @@ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{
87
87
  margin: 0 0 16px;
88
88
  padding: 12px 0;
89
89
  overflow-y: auto;
90
- border-top: 1px solid ${H(`--color-border`)};
91
- border-bottom: 1px solid ${H(`--color-border`)};
90
+ border-top: 1px solid ${G(`--color-border`)};
91
+ border-bottom: 1px solid ${G(`--color-border`)};
92
92
  }
93
93
  .wui-consent-banner-category-description {
94
94
  margin: 2px 0 0;
95
95
  padding-inline-start: 2.5em;
96
96
  font-size: 12px;
97
97
  line-height: 1.4;
98
- color: ${H(`--color-text-muted`)};
98
+ color: ${G(`--color-text-muted`)};
99
99
  }
100
100
 
101
101
  .form-check {
@@ -113,20 +113,20 @@ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{
113
113
  margin: 0;
114
114
  border: 1px solid rgba(0, 0, 0, 0.25);
115
115
  border-radius: 2em;
116
- background: ${H(`--color-surface`)} radial-gradient(circle, rgba(0, 0, 0, 0.25) 0.35em, transparent 0.4em) left / 1em 1em no-repeat;
116
+ background: ${G(`--color-surface`)} radial-gradient(circle, rgba(0, 0, 0, 0.25) 0.35em, transparent 0.4em) left / 1em 1em no-repeat;
117
117
  cursor: pointer;
118
118
  transition: background-position 0.15s ease-in-out;
119
119
  }
120
120
  .form-check-input:checked {
121
- border-color: ${H(`--color-primary`)};
122
- background: ${H(`--color-primary`)} radial-gradient(circle, #fff 0.35em, transparent 0.4em) right / 1em 1em no-repeat;
121
+ border-color: ${G(`--color-primary`)};
122
+ background: ${G(`--color-primary`)} radial-gradient(circle, #fff 0.35em, transparent 0.4em) right / 1em 1em no-repeat;
123
123
  }
124
124
  .form-check-input:disabled {
125
125
  opacity: 0.5;
126
126
  cursor: default;
127
127
  }
128
128
  .form-check-input:focus-visible {
129
- outline: 2px solid ${H(`--color-primary`)};
129
+ outline: 2px solid ${G(`--color-primary`)};
130
130
  outline-offset: 2px;
131
131
  }
132
132
  .form-check-label {
@@ -155,33 +155,33 @@ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{
155
155
  cursor: pointer;
156
156
  }
157
157
  .btn:focus-visible {
158
- outline: 2px solid ${H(`--color-primary`)};
158
+ outline: 2px solid ${G(`--color-primary`)};
159
159
  outline-offset: 2px;
160
160
  }
161
161
  .btn-primary {
162
- background: ${H(`--color-primary`)};
163
- border-color: ${H(`--color-primary`)};
164
- color: ${H(`--color-primary-text`)};
162
+ background: ${G(`--color-primary`)};
163
+ border-color: ${G(`--color-primary`)};
164
+ color: ${G(`--color-primary-text`)};
165
165
  }
166
166
  .btn-primary:hover {
167
- background: ${H(`--color-primary-hover`)};
168
- border-color: ${H(`--color-primary-hover`)};
167
+ background: ${G(`--color-primary-hover`)};
168
+ border-color: ${G(`--color-primary-hover`)};
169
169
  }
170
170
  .btn-outline-secondary {
171
- border-color: ${H(`--color-text-muted`)};
172
- color: ${H(`--color-text-muted`)};
171
+ border-color: ${G(`--color-text-muted`)};
172
+ color: ${G(`--color-text-muted`)};
173
173
  }
174
174
  .btn-outline-secondary:hover {
175
- background: ${H(`--color-bg-muted`)};
176
- color: ${H(`--color-text`)};
175
+ background: ${G(`--color-bg-muted`)};
176
+ color: ${G(`--color-text`)};
177
177
  }
178
178
  .btn-link {
179
179
  font-weight: 400;
180
- color: ${H(`--color-primary-ink`)};
180
+ color: ${G(`--color-primary-ink`)};
181
181
  text-decoration: underline;
182
182
  }
183
183
  .btn-link:hover {
184
- color: ${H(`--color-primary-hover`)};
184
+ color: ${G(`--color-primary-hover`)};
185
185
  }
186
186
  .wui-consent-banner-settings-toggle {
187
187
  margin-inline-end: auto;
@@ -226,86 +226,86 @@ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{
226
226
  gap: 6px;
227
227
  }
228
228
  }
229
- `,Qr=`data-wui-tour-open`,$r=`wui-consent-save`,ei=`[data-consent-settings]`,ti=`tour-open`,U={heading:`Cookies on this site`,description:`We use cookies to understand how the site is used and to measure our campaigns. You can change your choice at any time.`,policyLabel:`Cookie policy`,essentialLabel:`Essential cookies`,essentialDescription:`Required for the site to work and stay secure. Always on.`,analyticsLabel:`Analytics cookies`,analyticsDescription:`Help us understand how visitors use the site.`,functionalLabel:`Functional cookies`,functionalDescription:`Remember choices you make, such as your preferences.`,marketingLabel:`Marketing cookies`,marketingDescription:`Measure how well our campaigns work.`,settingsLabel:`Cookie settings`,rejectLabel:`Reject all`,acceptLabel:`Accept all`,saveLabel:`Save preferences`},ni=[`analytics`,`functional`,`marketing`],ri={analytics:{label:U.analyticsLabel,description:`analyticsDescription`},functional:{label:U.functionalLabel,description:`functionalDescription`},marketing:{label:U.marketingLabel,description:`marketingDescription`}},ii=new Set;function ai(e){ii.has(e)||(ii.add(e),console.warn(`[@webority/ui-elements] <wui-consent-banner> received categories containing "${e}", which is not one of ${ni.map(e=>`"${e}"`).join(` | `)}. It is ignored.`))}var oi=0,si=class extends c{static get observedAttributes(){return[`heading`,`description`,`policy-href`,`policy-label`,`analytics-description`,`functional-description`,`marketing-description`,`categories`]}constructor(){super(),oi+=1,this._uid=`wui-consent-${oi}`,this._preferences={analytics:!1,functional:!1,marketing:!1},this._settings=!1,this._onDocumentClick=e=>{e.target instanceof Element&&e.target.closest(ei)&&(e.preventDefault(),this.open({settings:!0,focus:!0}))},this._tourWatch=null}get position(){return this.getAttribute(`position`)===`bottom-right`?`bottom-right`:`bottom-left`}set position(e){this.setAttribute(`position`,String(e??`bottom-left`))}get standalone(){return this.hasAttribute(`standalone`)}set standalone(e){this.toggleAttribute(`standalone`,e===!0||e===``||e===`true`)}get heading(){return this.getAttribute(`heading`)||U.heading}set heading(e){this.setAttribute(`heading`,String(e??``))}get description(){return this.getAttribute(`description`)||U.description}set description(e){this.setAttribute(`description`,String(e??``))}get policyHref(){return this.getAttribute(`policy-href`)||``}set policyHref(e){this.setAttribute(`policy-href`,String(e??``))}get policyLabel(){return this.getAttribute(`policy-label`)||U.policyLabel}set policyLabel(e){this.setAttribute(`policy-label`,String(e??``))}get analyticsDescription(){return this.getAttribute(`analytics-description`)||U.analyticsDescription}set analyticsDescription(e){this.setAttribute(`analytics-description`,String(e??``))}get functionalDescription(){return this.getAttribute(`functional-description`)||U.functionalDescription}set functionalDescription(e){this.setAttribute(`functional-description`,String(e??``))}get marketingDescription(){return this.getAttribute(`marketing-description`)||U.marketingDescription}set marketingDescription(e){this.setAttribute(`marketing-description`,String(e??``))}get categories(){let e=this.getAttribute(`categories`);if(!e?.trim())return[...ni];let t=e.split(/\s+/).filter(Boolean);for(let e of t)ni.includes(e)||ai(e);let n=ni.filter(e=>t.includes(e));return n.length?n:[...ni]}set categories(e){e==null?this.removeAttribute(`categories`):this.setAttribute(`categories`,Array.isArray(e)?e.join(` `):String(e))}get preferences(){let e=this.categories;return Object.fromEntries(ni.map(t=>[t,e.includes(t)&&this._preferences[t]]))}set preferences(e){this._preferences={analytics:e?.analytics===!0,functional:e?.functional===!0,marketing:e?.marketing===!0},this._applyPreferences()}get isOpen(){return this.hasAttribute(`open`)}connectedCallback(){this._rendered||this.render(),document.addEventListener(`click`,this._onDocumentClick),this._syncTour(),this._tourWatch??=new MutationObserver(()=>this._syncTour()),this._tourWatch.observe(document.documentElement,{attributes:!0,attributeFilter:[Qr]})}disconnectedCallback(){document.removeEventListener(`click`,this._onDocumentClick),this._tourWatch?.disconnect()}_syncTour(){this.toggleAttribute(ti,document.documentElement.hasAttribute(Qr))}attributeChangedCallback(){this._rendered&&this.render()}render(){let e=this.isOpen,t=this._uid,n=this.policyHref?` <a class="wui-consent-banner-policy" href="${ui(this.policyHref)}">${li(this.policyLabel)}</a>`:``,r=this._root();r.innerHTML=`${r===this?``:`<style>${Zr}</style>`}
229
+ `,la=`data-wui-tour-open`,ua=`wui-consent-save`,da=`[data-consent-settings]`,fa=`tour-open`,K={heading:`Cookies on this site`,description:`We use cookies to understand how the site is used and to measure our campaigns. You can change your choice at any time.`,policyLabel:`Cookie policy`,essentialLabel:`Essential cookies`,essentialDescription:`Required for the site to work and stay secure. Always on.`,analyticsLabel:`Analytics cookies`,analyticsDescription:`Help us understand how visitors use the site.`,functionalLabel:`Functional cookies`,functionalDescription:`Remember choices you make, such as your preferences.`,marketingLabel:`Marketing cookies`,marketingDescription:`Measure how well our campaigns work.`,settingsLabel:`Cookie settings`,rejectLabel:`Reject all`,acceptLabel:`Accept all`,saveLabel:`Save preferences`},pa=[`analytics`,`functional`,`marketing`],ma={analytics:{label:K.analyticsLabel,description:`analyticsDescription`},functional:{label:K.functionalLabel,description:`functionalDescription`},marketing:{label:K.marketingLabel,description:`marketingDescription`}},ha=new Set;function ga(e){ha.has(e)||(ha.add(e),console.warn(`[@webority/ui-elements] <wui-consent-banner> received categories containing "${e}", which is not one of ${pa.map(e=>`"${e}"`).join(` | `)}. It is ignored.`))}var _a=0,va=class extends c{static get observedAttributes(){return[`heading`,`description`,`policy-href`,`policy-label`,`analytics-description`,`functional-description`,`marketing-description`,`categories`]}constructor(){super(),_a+=1,this._uid=`wui-consent-${_a}`,this._preferences={analytics:!1,functional:!1,marketing:!1},this._settings=!1,this._onDocumentClick=e=>{e.target instanceof Element&&e.target.closest(da)&&(e.preventDefault(),this.open({settings:!0,focus:!0}))},this._tourWatch=null}get position(){return this.getAttribute(`position`)===`bottom-right`?`bottom-right`:`bottom-left`}set position(e){this.setAttribute(`position`,String(e??`bottom-left`))}get standalone(){return this.hasAttribute(`standalone`)}set standalone(e){this.toggleAttribute(`standalone`,e===!0||e===``||e===`true`)}get heading(){return this.getAttribute(`heading`)||K.heading}set heading(e){this.setAttribute(`heading`,String(e??``))}get description(){return this.getAttribute(`description`)||K.description}set description(e){this.setAttribute(`description`,String(e??``))}get policyHref(){return this.getAttribute(`policy-href`)||``}set policyHref(e){this.setAttribute(`policy-href`,String(e??``))}get policyLabel(){return this.getAttribute(`policy-label`)||K.policyLabel}set policyLabel(e){this.setAttribute(`policy-label`,String(e??``))}get analyticsDescription(){return this.getAttribute(`analytics-description`)||K.analyticsDescription}set analyticsDescription(e){this.setAttribute(`analytics-description`,String(e??``))}get functionalDescription(){return this.getAttribute(`functional-description`)||K.functionalDescription}set functionalDescription(e){this.setAttribute(`functional-description`,String(e??``))}get marketingDescription(){return this.getAttribute(`marketing-description`)||K.marketingDescription}set marketingDescription(e){this.setAttribute(`marketing-description`,String(e??``))}get categories(){let e=this.getAttribute(`categories`);if(!e?.trim())return[...pa];let t=e.split(/\s+/).filter(Boolean);for(let e of t)pa.includes(e)||ga(e);let n=pa.filter(e=>t.includes(e));return n.length?n:[...pa]}set categories(e){e==null?this.removeAttribute(`categories`):this.setAttribute(`categories`,Array.isArray(e)?e.join(` `):String(e))}get preferences(){let e=this.categories;return Object.fromEntries(pa.map(t=>[t,e.includes(t)&&this._preferences[t]]))}set preferences(e){this._preferences={analytics:e?.analytics===!0,functional:e?.functional===!0,marketing:e?.marketing===!0},this._applyPreferences()}get isOpen(){return this.hasAttribute(`open`)}connectedCallback(){this._rendered||this.render(),document.addEventListener(`click`,this._onDocumentClick),this._syncTour(),this._tourWatch??=new MutationObserver(()=>this._syncTour()),this._tourWatch.observe(document.documentElement,{attributes:!0,attributeFilter:[la]})}disconnectedCallback(){document.removeEventListener(`click`,this._onDocumentClick),this._tourWatch?.disconnect()}_syncTour(){this.toggleAttribute(fa,document.documentElement.hasAttribute(la))}attributeChangedCallback(){this._rendered&&this.render()}render(){let e=this.isOpen,t=this._uid,n=this.policyHref?` <a class="wui-consent-banner-policy" href="${xa(this.policyHref)}">${ba(this.policyLabel)}</a>`:``,r=this._root();r.innerHTML=`${r===this?``:`<style>${ca}</style>`}
230
230
  <div class="wui-consent-banner-panel" role="dialog" aria-labelledby="${t}-heading" aria-describedby="${t}-description" hidden>
231
- <h2 class="wui-consent-banner-heading" id="${t}-heading">${li(this.heading)}</h2>
232
- <p class="wui-consent-banner-description" id="${t}-description">${li(this.description)}${n}</p>
231
+ <h2 class="wui-consent-banner-heading" id="${t}-heading">${ba(this.heading)}</h2>
232
+ <p class="wui-consent-banner-description" id="${t}-description">${ba(this.description)}${n}</p>
233
233
  <div class="wui-consent-banner-settings" hidden>
234
- ${ci(t,`essential`,U.essentialLabel,U.essentialDescription,!0)}
235
- ${this.categories.map(e=>ci(t,e,ri[e].label,this[ri[e].description],!1)).join(`
234
+ ${ya(t,`essential`,K.essentialLabel,K.essentialDescription,!0)}
235
+ ${this.categories.map(e=>ya(t,e,ma[e].label,this[ma[e].description],!1)).join(`
236
236
  `)}
237
237
  </div>
238
238
  <div class="wui-consent-banner-actions">
239
- <button type="button" class="btn btn-sm btn-link wui-consent-banner-settings-toggle" aria-expanded="false">${U.settingsLabel}</button>
240
- <button type="button" class="btn btn-sm btn-outline-secondary wui-consent-banner-reject">${U.rejectLabel}</button>
241
- <button type="button" class="btn btn-sm btn-primary wui-consent-banner-accept">${U.acceptLabel}</button>
242
- <button type="button" class="btn btn-sm btn-primary wui-consent-banner-save" hidden>${U.saveLabel}</button>
239
+ <button type="button" class="btn btn-sm btn-link wui-consent-banner-settings-toggle" aria-expanded="false">${K.settingsLabel}</button>
240
+ <button type="button" class="btn btn-sm btn-outline-secondary wui-consent-banner-reject">${K.rejectLabel}</button>
241
+ <button type="button" class="btn btn-sm btn-primary wui-consent-banner-accept">${K.acceptLabel}</button>
242
+ <button type="button" class="btn btn-sm btn-primary wui-consent-banner-save" hidden>${K.saveLabel}</button>
243
243
  </div>
244
- </div>`,this._rendered=!0,this._wire(),this._applyPreferences(),this._showSettings(this._settings),e&&(this._panel().hidden=!1)}open({settings:e=!1,focus:t=!1}={}){this._rendered||this.render(),this._applyPreferences(),this._showSettings(e),this._panel().hidden=!1,this.setAttribute(`open`,``),t&&(e?this._root().querySelector(`.wui-consent-banner-category input:not([disabled])`):this._root().querySelector(`.wui-consent-banner-accept`))?.focus()}close(){let e=this._panel();e&&(e.hidden=!0),this.removeAttribute(`open`),this._showSettings(!1)}_root(){return this.shadowRoot?this.shadowRoot:this.standalone?this.attachShadow({mode:`open`}):this}_panel(){return this._root().querySelector(`.wui-consent-banner-panel`)}_wire(){let e=this._root();e.querySelector(`.wui-consent-banner-accept`)?.addEventListener(`click`,()=>this._save(this._choiceForShown(!0))),e.querySelector(`.wui-consent-banner-reject`)?.addEventListener(`click`,()=>this._save(this._choiceForShown(!1))),e.querySelector(`.wui-consent-banner-save`)?.addEventListener(`click`,()=>this._save(this._switchValues())),e.querySelector(`.wui-consent-banner-settings-toggle`)?.addEventListener(`click`,()=>this._showSettings(!this._settings))}_save(e){this._preferences={...e},this.dispatchEvent(new CustomEvent($r,{bubbles:!0,composed:!0,detail:{...e}})),this.close()}_choiceForShown(e){let t=this.categories;return Object.fromEntries(ni.map(n=>[n,e&&t.includes(n)]))}_switchValues(){let e={};for(let t of ni)e[t]=this._root().querySelector(`input[data-category="${t}"]`)?.checked===!0;return e}_applyPreferences(){for(let e of ni){let t=this._root().querySelector(`input[data-category="${e}"]`);t&&(t.checked=this._preferences[e])}}_showSettings(e){this._settings=e;let t=this._root(),n=t.querySelector(`.wui-consent-banner-settings`);if(!n)return;n.hidden=!e,t.querySelector(`.wui-consent-banner-settings-toggle`)?.setAttribute(`aria-expanded`,e?`true`:`false`);let r=t.querySelector(`.wui-consent-banner-save`);r&&(r.hidden=!e);for(let n of[`.wui-consent-banner-reject`,`.wui-consent-banner-accept`]){let r=t.querySelector(n);r&&(r.hidden=e)}}};function ci(e,t,n,r,i){let a=`${e}-${t}`;return`<div class="wui-consent-banner-category">
244
+ </div>`,this._rendered=!0,this._wire(),this._applyPreferences(),this._showSettings(this._settings),e&&(this._panel().hidden=!1)}open({settings:e=!1,focus:t=!1}={}){this._rendered||this.render(),this._applyPreferences(),this._showSettings(e),this._panel().hidden=!1,this.setAttribute(`open`,``),t&&(e?this._root().querySelector(`.wui-consent-banner-category input:not([disabled])`):this._root().querySelector(`.wui-consent-banner-accept`))?.focus()}close(){let e=this._panel();e&&(e.hidden=!0),this.removeAttribute(`open`),this._showSettings(!1)}_root(){return this.shadowRoot?this.shadowRoot:this.standalone?this.attachShadow({mode:`open`}):this}_panel(){return this._root().querySelector(`.wui-consent-banner-panel`)}_wire(){let e=this._root();e.querySelector(`.wui-consent-banner-accept`)?.addEventListener(`click`,()=>this._save(this._choiceForShown(!0))),e.querySelector(`.wui-consent-banner-reject`)?.addEventListener(`click`,()=>this._save(this._choiceForShown(!1))),e.querySelector(`.wui-consent-banner-save`)?.addEventListener(`click`,()=>this._save(this._switchValues())),e.querySelector(`.wui-consent-banner-settings-toggle`)?.addEventListener(`click`,()=>this._showSettings(!this._settings))}_save(e){this._preferences={...e},this.dispatchEvent(new CustomEvent(ua,{bubbles:!0,composed:!0,detail:{...e}})),this.close()}_choiceForShown(e){let t=this.categories;return Object.fromEntries(pa.map(n=>[n,e&&t.includes(n)]))}_switchValues(){let e={};for(let t of pa)e[t]=this._root().querySelector(`input[data-category="${t}"]`)?.checked===!0;return e}_applyPreferences(){for(let e of pa){let t=this._root().querySelector(`input[data-category="${e}"]`);t&&(t.checked=this._preferences[e])}}_showSettings(e){this._settings=e;let t=this._root(),n=t.querySelector(`.wui-consent-banner-settings`);if(!n)return;n.hidden=!e,t.querySelector(`.wui-consent-banner-settings-toggle`)?.setAttribute(`aria-expanded`,e?`true`:`false`);let r=t.querySelector(`.wui-consent-banner-save`);r&&(r.hidden=!e);for(let n of[`.wui-consent-banner-reject`,`.wui-consent-banner-accept`]){let r=t.querySelector(n);r&&(r.hidden=e)}}};function ya(e,t,n,r,i){let a=`${e}-${t}`;return`<div class="wui-consent-banner-category">
245
245
  <div class="form-check form-switch">
246
246
  <input class="form-check-input" type="checkbox" role="switch" id="${a}" data-category="${t}"${i?` checked disabled`:``} />
247
- <label class="form-check-label" for="${a}">${li(n)}</label>
247
+ <label class="form-check-label" for="${a}">${ba(n)}</label>
248
248
  </div>
249
- <p class="wui-consent-banner-category-description">${li(r)}</p>
250
- </div>`}var li=e=>String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),ui=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),di=`[role="menuitem"]`,fi=`input, textarea, select, [contenteditable=""], [contenteditable="true"]`,pi=`data-open`,mi=500,hi=10,gi=400,_i=null,vi=null,yi=new WeakMap;function bi(e,t,n){let r=yi.get(e);if(r){if(r.region===t||t.contains(r.region))return!1;r.cancel()}return yi.set(e,{region:t,cancel:n}),!0}var xi=e=>e instanceof Element?e:e?.parentElement??null,Si=class extends c{static get observedAttributes(){return[`disabled`]}constructor(){super(),this._region=null,this._origin=null,this._returnFocus=null,this._press=null,this._swallowClick=!1,this._nav=qn({getVisibleOptions:()=>this._items(),getActive:()=>this._items().indexOf(document.activeElement),setActive:e=>this._items()[e]?.focus({preventScroll:!0})}),this._onContextMenu=e=>this._handleContextMenu(e),this._onContextMenuCapture=e=>{this.isOpen&&!this._inPanel(e.target)&&!this._isKeyEcho()&&this.close()},this._onDocKeyDown=e=>this._handleDocKeyDown(e),this._onPointerDown=e=>this._handlePointerDown(e),this._onPressMove=e=>{this._press&&Math.hypot(e.clientX-this._press.x,e.clientY-this._press.y)>hi&&this._cancelPress()},this._onPressEnd=()=>this._cancelPress(),this._onClickCapture=e=>{!this._swallowClick||!this._region?.contains(e.target)||(this._swallowClick=!1,e.preventDefault(),e.stopImmediatePropagation())},this._onKeyDown=e=>{this._inPanel(e.target)&&this._handleMenuKey(e)},this._onClick=e=>this._handleClick(e),this._onMouseMove=e=>{let t=xi(e.target)?.closest(di);t&&this._inPanel(t)&&!this._isDisabled(t)&&t!==document.activeElement&&t.focus({preventScroll:!0})},this._onDismiss=e=>{e.type===`scroll`&&this._inPanel(e.target)||this.close()},this._onPointerDownCapture=e=>{this._swallowClick=!1,this.isOpen&&!this._inPanel(e.target)&&this.close()}}connectedCallback(){this._teardown(),document.addEventListener(`contextmenu`,this._onContextMenuCapture,!0),document.addEventListener(`contextmenu`,this._onContextMenu),document.addEventListener(`keydown`,this._onDocKeyDown),document.addEventListener(`pointerdown`,this._onPointerDownCapture,!0),document.addEventListener(`pointerdown`,this._onPointerDown),document.addEventListener(`click`,this._onClickCapture,!0),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`click`,this._onClick),this.addEventListener(`mousemove`,this._onMouseMove)}disconnectedCallback(){this._teardown()}attributeChangedCallback(){this.disabled&&this.close()}get target(){return this.getAttribute(`target`)}set target(e){e==null||e===``?this.removeAttribute(`target`):this.setAttribute(`target`,String(e))}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,!!e)}get isOpen(){return this._panel()?.hasAttribute(pi)??!1}open(e,t,{region:n=this,origin:r=n,keyboard:i=!1}={}){let o=this._panel();if(o){if(_i&&_i!==this&&_i.close(!0),!this.isOpen){let e=document.activeElement;this._returnFocus=e&&e!==document.body&&!this._inPanel(e)?e:null}this._region=n,this._origin=r,vi=null,o.setAttribute(pi,``),_i=this,a({getBoundingClientRect:()=>({left:e,right:e,top:t,bottom:t,width:0,height:0})},o,{clampHeight:!0}),window.addEventListener(`scroll`,this._onDismiss,!0),window.addEventListener(`resize`,this._onDismiss),window.addEventListener(`blur`,this._onDismiss),((i?this._items()[0]:null)??o).focus({preventScroll:!0}),this.dispatchEvent(new CustomEvent(`wui-context-menu:open`,{bubbles:!0,detail:{region:n,origin:r,x:e,y:t}}))}}close(e=!1){let t=this._panel();if(!t?.hasAttribute(pi))return;t.removeAttribute(pi),_i===this&&(_i=null),window.removeEventListener(`scroll`,this._onDismiss,!0),window.removeEventListener(`resize`,this._onDismiss),window.removeEventListener(`blur`,this._onDismiss),this._nav.teardown();let n=this._returnFocus;this._returnFocus=null,e&&n?.isConnected&&n.focus({preventScroll:!0})}_panel(){return[...this.children].find(e=>e.getAttribute(`role`)===`menu`)??null}_inPanel(e){return!!e&&!!this._panel()?.contains(e)}_items(){return[...this._panel()?.querySelectorAll(di)??[]].filter(e=>!this._isDisabled(e))}_isDisabled(e){return e.getAttribute(`aria-disabled`)===`true`}_regionFor(e){let t=xi(e);if(!t||this.disabled||!this._panel()||this._inPanel(t)||t.closest(fi))return null;let n=this.target;return n?t.closest(n):this.contains(t)?this:null}_isKeyEcho(){return vi?.menu===this&&this.isOpen&&performance.now()-vi.at<gi}_handleContextMenu(e){if(this._inPanel(e.target)){e.preventDefault();return}if(e.defaultPrevented&&!yi.has(e))return;let t=this._regionFor(e.target);if(t){if(this._isKeyEcho()){e.preventDefault();return}e.shiftKey||bi(e,t,()=>this.close(!0))&&(e.preventDefault(),this.open(e.clientX,e.clientY,{region:t,origin:xi(e.target)}))}}_handleDocKeyDown(e){if(e.defaultPrevented&&!yi.has(e)||!(e.key===`ContextMenu`||e.key===`F10`&&e.shiftKey)||this._inPanel(e.target))return;let t=this._regionFor(e.target);if(!t||!bi(e,t,()=>this.close(!0)))return;e.preventDefault();let n=xi(e.target),r=n.getBoundingClientRect();this.open(r.left+Math.min(16,r.width/2),r.bottom,{region:t,origin:n,keyboard:!0}),vi={menu:this,at:performance.now()}}_handlePointerDown(e){if(e.pointerType!==`touch`)return;let t=this._regionFor(e.target);if(!t||!bi(e,t,()=>this._cancelPress()))return;this._cancelPress();let{clientX:n,clientY:r}=e,i=xi(e.target);this._press={x:n,y:r,timer:setTimeout(()=>{this._cancelPress(),this._swallowClick=!0,this.open(n,r,{region:t,origin:i})},mi)},document.addEventListener(`pointermove`,this._onPressMove,{passive:!0}),document.addEventListener(`pointerup`,this._onPressEnd),document.addEventListener(`pointercancel`,this._onPressEnd),window.addEventListener(`scroll`,this._onPressEnd,!0)}_cancelPress(){this._press&&(clearTimeout(this._press.timer),this._press=null,document.removeEventListener(`pointermove`,this._onPressMove),document.removeEventListener(`pointerup`,this._onPressEnd),document.removeEventListener(`pointercancel`,this._onPressEnd),window.removeEventListener(`scroll`,this._onPressEnd,!0))}_handleMenuKey(e){if(this.isOpen)if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),this.close(!0);else if(e.key===`Tab`)this.close(!0);else if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),this._step(e.key===`ArrowDown`?1:-1);else if(e.key===` `){let t=xi(e.target)?.closest(di);e.preventDefault(),t&&t.click()}else this._nav.handler(e)}_step(e){let t=this._items();if(!t.length)return;let n=t.indexOf(document.activeElement);t[n<0?e>0?0:t.length-1:(n+e+t.length)%t.length].focus({preventScroll:!0})}_handleClick(e){let t=xi(e.target)?.closest(di);if(!(!t||!this._inPanel(t))){if(this._isDisabled(t)){e.preventDefault(),e.stopPropagation();return}this.close(!0),this.dispatchEvent(new CustomEvent(`wui-context-menu:select`,{bubbles:!0,detail:{key:t.dataset.key??null,item:t,region:this._region,origin:this._origin}}))}}_teardown(){this.close(),this._cancelPress(),document.removeEventListener(`contextmenu`,this._onContextMenuCapture,!0),document.removeEventListener(`contextmenu`,this._onContextMenu),document.removeEventListener(`keydown`,this._onDocKeyDown),document.removeEventListener(`pointerdown`,this._onPointerDownCapture,!0),document.removeEventListener(`pointerdown`,this._onPointerDown),document.removeEventListener(`click`,this._onClickCapture,!0),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`mousemove`,this._onMouseMove)}},Ci=[[`AF`,`Afghanistan`,`93`],[`AX`,`Åland Islands`,`358`],[`AL`,`Albania`,`355`],[`DZ`,`Algeria`,`213`],[`AS`,`American Samoa`,`1`],[`AD`,`Andorra`,`376`],[`AO`,`Angola`,`244`],[`AI`,`Anguilla`,`1`],[`AG`,`Antigua & Barbuda`,`1`],[`AR`,`Argentina`,`54`],[`AM`,`Armenia`,`374`],[`AW`,`Aruba`,`297`],[`AC`,`Ascension Island`,`247`],[`AU`,`Australia`,`61`],[`AT`,`Austria`,`43`],[`AZ`,`Azerbaijan`,`994`],[`BS`,`Bahamas`,`1`],[`BH`,`Bahrain`,`973`],[`BD`,`Bangladesh`,`880`],[`BB`,`Barbados`,`1`],[`BY`,`Belarus`,`375`],[`BE`,`Belgium`,`32`],[`BZ`,`Belize`,`501`],[`BJ`,`Benin`,`229`],[`BM`,`Bermuda`,`1`],[`BT`,`Bhutan`,`975`],[`BO`,`Bolivia`,`591`],[`BA`,`Bosnia & Herzegovina`,`387`],[`BW`,`Botswana`,`267`],[`BR`,`Brazil`,`55`],[`IO`,`British Indian Ocean Territory`,`246`],[`VG`,`British Virgin Islands`,`1`],[`BN`,`Brunei`,`673`],[`BG`,`Bulgaria`,`359`],[`BF`,`Burkina Faso`,`226`],[`BI`,`Burundi`,`257`],[`KH`,`Cambodia`,`855`],[`CM`,`Cameroon`,`237`],[`CA`,`Canada`,`1`],[`CV`,`Cape Verde`,`238`],[`BQ`,`Caribbean Netherlands`,`599`],[`KY`,`Cayman Islands`,`1`],[`CF`,`Central African Republic`,`236`],[`TD`,`Chad`,`235`],[`CL`,`Chile`,`56`],[`CN`,`China`,`86`],[`CX`,`Christmas Island`,`61`],[`CC`,`Cocos (Keeling) Islands`,`61`],[`CO`,`Colombia`,`57`],[`KM`,`Comoros`,`269`],[`CG`,`Congo - Brazzaville`,`242`],[`CD`,`Congo - Kinshasa`,`243`],[`CK`,`Cook Islands`,`682`],[`CR`,`Costa Rica`,`506`],[`CI`,`Côte d’Ivoire`,`225`],[`HR`,`Croatia`,`385`],[`CU`,`Cuba`,`53`],[`CW`,`Curaçao`,`599`],[`CY`,`Cyprus`,`357`],[`CZ`,`Czechia`,`420`],[`DK`,`Denmark`,`45`],[`DJ`,`Djibouti`,`253`],[`DM`,`Dominica`,`1`],[`DO`,`Dominican Republic`,`1`],[`EC`,`Ecuador`,`593`],[`EG`,`Egypt`,`20`],[`SV`,`El Salvador`,`503`],[`GQ`,`Equatorial Guinea`,`240`],[`ER`,`Eritrea`,`291`],[`EE`,`Estonia`,`372`],[`SZ`,`Eswatini`,`268`],[`ET`,`Ethiopia`,`251`],[`FK`,`Falkland Islands`,`500`],[`FO`,`Faroe Islands`,`298`],[`FJ`,`Fiji`,`679`],[`FI`,`Finland`,`358`],[`FR`,`France`,`33`],[`GF`,`French Guiana`,`594`],[`PF`,`French Polynesia`,`689`],[`GA`,`Gabon`,`241`],[`GM`,`Gambia`,`220`],[`GE`,`Georgia`,`995`],[`DE`,`Germany`,`49`],[`GH`,`Ghana`,`233`],[`GI`,`Gibraltar`,`350`],[`GR`,`Greece`,`30`],[`GL`,`Greenland`,`299`],[`GD`,`Grenada`,`1`],[`GP`,`Guadeloupe`,`590`],[`GU`,`Guam`,`1`],[`GT`,`Guatemala`,`502`],[`GG`,`Guernsey`,`44`],[`GN`,`Guinea`,`224`],[`GW`,`Guinea-Bissau`,`245`],[`GY`,`Guyana`,`592`],[`HT`,`Haiti`,`509`],[`HN`,`Honduras`,`504`],[`HK`,`Hong Kong SAR China`,`852`],[`HU`,`Hungary`,`36`],[`IS`,`Iceland`,`354`],[`IN`,`India`,`91`],[`ID`,`Indonesia`,`62`],[`IR`,`Iran`,`98`],[`IQ`,`Iraq`,`964`],[`IE`,`Ireland`,`353`],[`IM`,`Isle of Man`,`44`],[`IL`,`Israel`,`972`],[`IT`,`Italy`,`39`],[`JM`,`Jamaica`,`1`],[`JP`,`Japan`,`81`],[`JE`,`Jersey`,`44`],[`JO`,`Jordan`,`962`],[`KZ`,`Kazakhstan`,`7`],[`KE`,`Kenya`,`254`],[`KI`,`Kiribati`,`686`],[`XK`,`Kosovo`,`383`],[`KW`,`Kuwait`,`965`],[`KG`,`Kyrgyzstan`,`996`],[`LA`,`Laos`,`856`],[`LV`,`Latvia`,`371`],[`LB`,`Lebanon`,`961`],[`LS`,`Lesotho`,`266`],[`LR`,`Liberia`,`231`],[`LY`,`Libya`,`218`],[`LI`,`Liechtenstein`,`423`],[`LT`,`Lithuania`,`370`],[`LU`,`Luxembourg`,`352`],[`MO`,`Macao SAR China`,`853`],[`MG`,`Madagascar`,`261`],[`MW`,`Malawi`,`265`],[`MY`,`Malaysia`,`60`],[`MV`,`Maldives`,`960`],[`ML`,`Mali`,`223`],[`MT`,`Malta`,`356`],[`MH`,`Marshall Islands`,`692`],[`MQ`,`Martinique`,`596`],[`MR`,`Mauritania`,`222`],[`MU`,`Mauritius`,`230`],[`YT`,`Mayotte`,`262`],[`MX`,`Mexico`,`52`],[`FM`,`Micronesia`,`691`],[`MD`,`Moldova`,`373`],[`MC`,`Monaco`,`377`],[`MN`,`Mongolia`,`976`],[`ME`,`Montenegro`,`382`],[`MS`,`Montserrat`,`1`],[`MA`,`Morocco`,`212`],[`MZ`,`Mozambique`,`258`],[`MM`,`Myanmar (Burma)`,`95`],[`NA`,`Namibia`,`264`],[`NR`,`Nauru`,`674`],[`NP`,`Nepal`,`977`],[`NL`,`Netherlands`,`31`],[`NC`,`New Caledonia`,`687`],[`NZ`,`New Zealand`,`64`],[`NI`,`Nicaragua`,`505`],[`NE`,`Niger`,`227`],[`NG`,`Nigeria`,`234`],[`NU`,`Niue`,`683`],[`NF`,`Norfolk Island`,`672`],[`KP`,`North Korea`,`850`],[`MK`,`North Macedonia`,`389`],[`MP`,`Northern Mariana Islands`,`1`],[`NO`,`Norway`,`47`],[`OM`,`Oman`,`968`],[`PK`,`Pakistan`,`92`],[`PW`,`Palau`,`680`],[`PS`,`Palestinian Territories`,`970`],[`PA`,`Panama`,`507`],[`PG`,`Papua New Guinea`,`675`],[`PY`,`Paraguay`,`595`],[`PE`,`Peru`,`51`],[`PH`,`Philippines`,`63`],[`PL`,`Poland`,`48`],[`PT`,`Portugal`,`351`],[`PR`,`Puerto Rico`,`1`],[`QA`,`Qatar`,`974`],[`RE`,`Réunion`,`262`],[`RO`,`Romania`,`40`],[`RU`,`Russia`,`7`],[`RW`,`Rwanda`,`250`],[`WS`,`Samoa`,`685`],[`SM`,`San Marino`,`378`],[`ST`,`São Tomé & Príncipe`,`239`],[`SA`,`Saudi Arabia`,`966`],[`SN`,`Senegal`,`221`],[`RS`,`Serbia`,`381`],[`SC`,`Seychelles`,`248`],[`SL`,`Sierra Leone`,`232`],[`SG`,`Singapore`,`65`],[`SX`,`Sint Maarten`,`1`],[`SK`,`Slovakia`,`421`],[`SI`,`Slovenia`,`386`],[`SB`,`Solomon Islands`,`677`],[`SO`,`Somalia`,`252`],[`ZA`,`South Africa`,`27`],[`KR`,`South Korea`,`82`],[`SS`,`South Sudan`,`211`],[`ES`,`Spain`,`34`],[`LK`,`Sri Lanka`,`94`],[`BL`,`St. Barthélemy`,`590`],[`SH`,`St. Helena`,`290`],[`KN`,`St. Kitts & Nevis`,`1`],[`LC`,`St. Lucia`,`1`],[`MF`,`St. Martin`,`590`],[`PM`,`St. Pierre & Miquelon`,`508`],[`VC`,`St. Vincent & Grenadines`,`1`],[`SD`,`Sudan`,`249`],[`SR`,`Suriname`,`597`],[`SJ`,`Svalbard & Jan Mayen`,`47`],[`SE`,`Sweden`,`46`],[`CH`,`Switzerland`,`41`],[`SY`,`Syria`,`963`],[`TW`,`Taiwan`,`886`],[`TJ`,`Tajikistan`,`992`],[`TZ`,`Tanzania`,`255`],[`TH`,`Thailand`,`66`],[`TL`,`Timor-Leste`,`670`],[`TG`,`Togo`,`228`],[`TK`,`Tokelau`,`690`],[`TO`,`Tonga`,`676`],[`TT`,`Trinidad & Tobago`,`1`],[`TA`,`Tristan da Cunha`,`290`],[`TN`,`Tunisia`,`216`],[`TR`,`Türkiye`,`90`],[`TM`,`Turkmenistan`,`993`],[`TC`,`Turks & Caicos Islands`,`1`],[`TV`,`Tuvalu`,`688`],[`VI`,`U.S. Virgin Islands`,`1`],[`UG`,`Uganda`,`256`],[`UA`,`Ukraine`,`380`],[`AE`,`United Arab Emirates`,`971`],[`GB`,`United Kingdom`,`44`],[`US`,`United States`,`1`],[`UY`,`Uruguay`,`598`],[`UZ`,`Uzbekistan`,`998`],[`VU`,`Vanuatu`,`678`],[`VA`,`Vatican City`,`39`],[`VE`,`Venezuela`,`58`],[`VN`,`Vietnam`,`84`],[`WF`,`Wallis & Futuna`,`681`],[`EH`,`Western Sahara`,`212`],[`YE`,`Yemen`,`967`],[`ZM`,`Zambia`,`260`],[`ZW`,`Zimbabwe`,`263`]],wi=e=>(Ci.find(t=>t[0]===e)||[``,``,``])[2],Ti=class extends c{static formAssociated=!0;static get observedAttributes(){return[`value`,`placeholder`,`search-placeholder`,`searchable`,`disabled`,`compact`,`size`,`clearable`,`icon`,`prefix`,`aria-label`,`aria-invalid`]}_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||`Select`}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=``,this._optionsProp=null,this._active=-1,this._typeahead=``,this._typeaheadTimer=null}connectedCallback(){if(!this._rendered){this.render();return}this._bindGlobal?.()}attributeChangedCallback(e,t,n){if(e===`value`){this.value=n;return}if(e===`aria-invalid`){this._syncInvalid();return}this._rendered&&this.render()}_syncInvalid(){let e=this.querySelector(`.search-select-control`);e&&(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==null?``:String(e),I(this,this._value),this._syncSelected(),this._syncReset()}set options(e){this._optionsProp=Array.isArray(e)?e:null,this.isConnected&&this.render()}get options(){return this._readOptions()}_snapshotDeclared(){if(this._declared)return;let e=[...this.querySelectorAll(`:scope > wui-option`)];e.length&&(this._declared=e.map(e=>({value:e.getAttribute(`value`)??e.textContent.trim(),label:e.innerHTML,icon:e.getAttribute(`icon`)||void 0,[Yn]:!0,selected:e.hasAttribute(`selected`)})))}_readOptions(){return this._optionsProp?this._optionsProp:(this._snapshotDeclared(),this._declared||[])}render(){this._defaultValue===void 0&&(this._defaultValue=this.getAttribute(`value`)||``),this._snapshotDeclared();let e=this._readOptions(),t=this.hasAttribute(`searchable`),n=this.hasAttribute(`clearable`),r=this.getAttribute(`size`),i=r===`sm`?` search-select-sm`:r===`lg`?` search-select-lg`:``,a=this.getAttribute(`icon`),o=this.getAttribute(`prefix`),s=this.getAttribute(`placeholder`)||`Select...`,c=this.getAttribute(`search-placeholder`)||`Search...`,l=e.find(e=>String(e.value)===String(this._value))||e.find(e=>e.selected);l&&(this._value=String(l.value)),I(this,this._value),this.id||=`wui-select-${Math.random().toString(36).slice(2,9)}`;let u=`${this.id}-listbox`;this._listboxId=u;let d=e.map((e,t)=>{let n=String(e.value)===String(this._value);return`<button type="button" role="option" id="${Ei(`${u}-opt-${t}`)}" class="search-select-option${n?` selected`:``}" data-value="${Ei(e.value)}" aria-selected="${n}">${er(e)}</button>`}).join(``);this.innerHTML=`
249
+ <p class="wui-consent-banner-category-description">${ba(r)}</p>
250
+ </div>`}var ba=e=>String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),xa=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),Sa=`[role="menuitem"]`,Ca=`input, textarea, select, [contenteditable=""], [contenteditable="true"]`,wa=`data-open`,Ta=500,Ea=10,Da=400,Oa=null,ka=null,Aa=new WeakMap;function ja(e,t,n){let r=Aa.get(e);if(r){if(r.region===t||t.contains(r.region))return!1;r.cancel()}return Aa.set(e,{region:t,cancel:n}),!0}var Ma=e=>e instanceof Element?e:e?.parentElement??null,Na=class extends c{static get observedAttributes(){return[`disabled`]}constructor(){super(),this._region=null,this._origin=null,this._returnFocus=null,this._press=null,this._swallowClick=!1,this._nav=ii({getVisibleOptions:()=>this._items(),getActive:()=>this._items().indexOf(document.activeElement),setActive:e=>this._items()[e]?.focus({preventScroll:!0})}),this._onContextMenu=e=>this._handleContextMenu(e),this._onContextMenuCapture=e=>{this.isOpen&&!this._inPanel(e.target)&&!this._isKeyEcho()&&this.close()},this._onDocKeyDown=e=>this._handleDocKeyDown(e),this._onPointerDown=e=>this._handlePointerDown(e),this._onPressMove=e=>{this._press&&Math.hypot(e.clientX-this._press.x,e.clientY-this._press.y)>Ea&&this._cancelPress()},this._onPressEnd=()=>this._cancelPress(),this._onClickCapture=e=>{!this._swallowClick||!this._region?.contains(e.target)||(this._swallowClick=!1,e.preventDefault(),e.stopImmediatePropagation())},this._onKeyDown=e=>{this._inPanel(e.target)&&this._handleMenuKey(e)},this._onClick=e=>this._handleClick(e),this._onMouseMove=e=>{let t=Ma(e.target)?.closest(Sa);t&&this._inPanel(t)&&!this._isDisabled(t)&&t!==document.activeElement&&t.focus({preventScroll:!0})},this._onDismiss=e=>{e.type===`scroll`&&this._inPanel(e.target)||this.close()},this._onPointerDownCapture=e=>{this._swallowClick=!1,this.isOpen&&!this._inPanel(e.target)&&this.close()}}connectedCallback(){this._teardown(),document.addEventListener(`contextmenu`,this._onContextMenuCapture,!0),document.addEventListener(`contextmenu`,this._onContextMenu),document.addEventListener(`keydown`,this._onDocKeyDown),document.addEventListener(`pointerdown`,this._onPointerDownCapture,!0),document.addEventListener(`pointerdown`,this._onPointerDown),document.addEventListener(`click`,this._onClickCapture,!0),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`click`,this._onClick),this.addEventListener(`mousemove`,this._onMouseMove)}disconnectedCallback(){this._teardown()}attributeChangedCallback(){this.disabled&&this.close()}get target(){return this.getAttribute(`target`)}set target(e){e==null||e===``?this.removeAttribute(`target`):this.setAttribute(`target`,String(e))}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,!!e)}get isOpen(){return this._panel()?.hasAttribute(wa)??!1}open(e,t,{region:n=this,origin:r=n,keyboard:i=!1}={}){let o=this._panel();if(o){if(Oa&&Oa!==this&&Oa.close(!0),!this.isOpen){let e=document.activeElement;this._returnFocus=e&&e!==document.body&&!this._inPanel(e)?e:null}this._region=n,this._origin=r,ka=null,o.setAttribute(wa,``),Oa=this,a({getBoundingClientRect:()=>({left:e,right:e,top:t,bottom:t,width:0,height:0})},o,{clampHeight:!0}),window.addEventListener(`scroll`,this._onDismiss,!0),window.addEventListener(`resize`,this._onDismiss),window.addEventListener(`blur`,this._onDismiss),((i?this._items()[0]:null)??o).focus({preventScroll:!0}),this.dispatchEvent(new CustomEvent(`wui-context-menu:open`,{bubbles:!0,detail:{region:n,origin:r,x:e,y:t}}))}}close(e=!1){let t=this._panel();if(!t?.hasAttribute(wa))return;t.removeAttribute(wa),Oa===this&&(Oa=null),window.removeEventListener(`scroll`,this._onDismiss,!0),window.removeEventListener(`resize`,this._onDismiss),window.removeEventListener(`blur`,this._onDismiss),this._nav.teardown();let n=this._returnFocus;this._returnFocus=null,e&&n?.isConnected&&n.focus({preventScroll:!0})}_panel(){return[...this.children].find(e=>e.getAttribute(`role`)===`menu`)??null}_inPanel(e){return!!e&&!!this._panel()?.contains(e)}_items(){return[...this._panel()?.querySelectorAll(Sa)??[]].filter(e=>!this._isDisabled(e))}_isDisabled(e){return e.getAttribute(`aria-disabled`)===`true`}_regionFor(e){let t=Ma(e);if(!t||this.disabled||!this._panel()||this._inPanel(t)||t.closest(Ca))return null;let n=this.target;return n?t.closest(n):this.contains(t)?this:null}_isKeyEcho(){return ka?.menu===this&&this.isOpen&&performance.now()-ka.at<Da}_handleContextMenu(e){if(this._inPanel(e.target)){e.preventDefault();return}if(e.defaultPrevented&&!Aa.has(e))return;let t=this._regionFor(e.target);if(t){if(this._isKeyEcho()){e.preventDefault();return}e.shiftKey||ja(e,t,()=>this.close(!0))&&(e.preventDefault(),this.open(e.clientX,e.clientY,{region:t,origin:Ma(e.target)}))}}_handleDocKeyDown(e){if(e.defaultPrevented&&!Aa.has(e)||!(e.key===`ContextMenu`||e.key===`F10`&&e.shiftKey)||this._inPanel(e.target))return;let t=this._regionFor(e.target);if(!t||!ja(e,t,()=>this.close(!0)))return;e.preventDefault();let n=Ma(e.target),r=n.getBoundingClientRect();this.open(r.left+Math.min(16,r.width/2),r.bottom,{region:t,origin:n,keyboard:!0}),ka={menu:this,at:performance.now()}}_handlePointerDown(e){if(e.pointerType!==`touch`)return;let t=this._regionFor(e.target);if(!t||!ja(e,t,()=>this._cancelPress()))return;this._cancelPress();let{clientX:n,clientY:r}=e,i=Ma(e.target);this._press={x:n,y:r,timer:setTimeout(()=>{this._cancelPress(),this._swallowClick=!0,this.open(n,r,{region:t,origin:i})},Ta)},document.addEventListener(`pointermove`,this._onPressMove,{passive:!0}),document.addEventListener(`pointerup`,this._onPressEnd),document.addEventListener(`pointercancel`,this._onPressEnd),window.addEventListener(`scroll`,this._onPressEnd,!0)}_cancelPress(){this._press&&(clearTimeout(this._press.timer),this._press=null,document.removeEventListener(`pointermove`,this._onPressMove),document.removeEventListener(`pointerup`,this._onPressEnd),document.removeEventListener(`pointercancel`,this._onPressEnd),window.removeEventListener(`scroll`,this._onPressEnd,!0))}_handleMenuKey(e){if(this.isOpen)if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),this.close(!0);else if(e.key===`Tab`)this.close(!0);else if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),this._step(e.key===`ArrowDown`?1:-1);else if(e.key===` `){let t=Ma(e.target)?.closest(Sa);e.preventDefault(),t&&t.click()}else this._nav.handler(e)}_step(e){let t=this._items();if(!t.length)return;let n=t.indexOf(document.activeElement);t[n<0?e>0?0:t.length-1:(n+e+t.length)%t.length].focus({preventScroll:!0})}_handleClick(e){let t=Ma(e.target)?.closest(Sa);if(!(!t||!this._inPanel(t))){if(this._isDisabled(t)){e.preventDefault(),e.stopPropagation();return}this.close(!0),this.dispatchEvent(new CustomEvent(`wui-context-menu:select`,{bubbles:!0,detail:{key:t.dataset.key??null,item:t,region:this._region,origin:this._origin}}))}}_teardown(){this.close(),this._cancelPress(),document.removeEventListener(`contextmenu`,this._onContextMenuCapture,!0),document.removeEventListener(`contextmenu`,this._onContextMenu),document.removeEventListener(`keydown`,this._onDocKeyDown),document.removeEventListener(`pointerdown`,this._onPointerDownCapture,!0),document.removeEventListener(`pointerdown`,this._onPointerDown),document.removeEventListener(`click`,this._onClickCapture,!0),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`mousemove`,this._onMouseMove)}},Pa=[[`AF`,`Afghanistan`,`93`],[`AX`,`Åland Islands`,`358`],[`AL`,`Albania`,`355`],[`DZ`,`Algeria`,`213`],[`AS`,`American Samoa`,`1`],[`AD`,`Andorra`,`376`],[`AO`,`Angola`,`244`],[`AI`,`Anguilla`,`1`],[`AG`,`Antigua & Barbuda`,`1`],[`AR`,`Argentina`,`54`],[`AM`,`Armenia`,`374`],[`AW`,`Aruba`,`297`],[`AC`,`Ascension Island`,`247`],[`AU`,`Australia`,`61`],[`AT`,`Austria`,`43`],[`AZ`,`Azerbaijan`,`994`],[`BS`,`Bahamas`,`1`],[`BH`,`Bahrain`,`973`],[`BD`,`Bangladesh`,`880`],[`BB`,`Barbados`,`1`],[`BY`,`Belarus`,`375`],[`BE`,`Belgium`,`32`],[`BZ`,`Belize`,`501`],[`BJ`,`Benin`,`229`],[`BM`,`Bermuda`,`1`],[`BT`,`Bhutan`,`975`],[`BO`,`Bolivia`,`591`],[`BA`,`Bosnia & Herzegovina`,`387`],[`BW`,`Botswana`,`267`],[`BR`,`Brazil`,`55`],[`IO`,`British Indian Ocean Territory`,`246`],[`VG`,`British Virgin Islands`,`1`],[`BN`,`Brunei`,`673`],[`BG`,`Bulgaria`,`359`],[`BF`,`Burkina Faso`,`226`],[`BI`,`Burundi`,`257`],[`KH`,`Cambodia`,`855`],[`CM`,`Cameroon`,`237`],[`CA`,`Canada`,`1`],[`CV`,`Cape Verde`,`238`],[`BQ`,`Caribbean Netherlands`,`599`],[`KY`,`Cayman Islands`,`1`],[`CF`,`Central African Republic`,`236`],[`TD`,`Chad`,`235`],[`CL`,`Chile`,`56`],[`CN`,`China`,`86`],[`CX`,`Christmas Island`,`61`],[`CC`,`Cocos (Keeling) Islands`,`61`],[`CO`,`Colombia`,`57`],[`KM`,`Comoros`,`269`],[`CG`,`Congo - Brazzaville`,`242`],[`CD`,`Congo - Kinshasa`,`243`],[`CK`,`Cook Islands`,`682`],[`CR`,`Costa Rica`,`506`],[`CI`,`Côte d’Ivoire`,`225`],[`HR`,`Croatia`,`385`],[`CU`,`Cuba`,`53`],[`CW`,`Curaçao`,`599`],[`CY`,`Cyprus`,`357`],[`CZ`,`Czechia`,`420`],[`DK`,`Denmark`,`45`],[`DJ`,`Djibouti`,`253`],[`DM`,`Dominica`,`1`],[`DO`,`Dominican Republic`,`1`],[`EC`,`Ecuador`,`593`],[`EG`,`Egypt`,`20`],[`SV`,`El Salvador`,`503`],[`GQ`,`Equatorial Guinea`,`240`],[`ER`,`Eritrea`,`291`],[`EE`,`Estonia`,`372`],[`SZ`,`Eswatini`,`268`],[`ET`,`Ethiopia`,`251`],[`FK`,`Falkland Islands`,`500`],[`FO`,`Faroe Islands`,`298`],[`FJ`,`Fiji`,`679`],[`FI`,`Finland`,`358`],[`FR`,`France`,`33`],[`GF`,`French Guiana`,`594`],[`PF`,`French Polynesia`,`689`],[`GA`,`Gabon`,`241`],[`GM`,`Gambia`,`220`],[`GE`,`Georgia`,`995`],[`DE`,`Germany`,`49`],[`GH`,`Ghana`,`233`],[`GI`,`Gibraltar`,`350`],[`GR`,`Greece`,`30`],[`GL`,`Greenland`,`299`],[`GD`,`Grenada`,`1`],[`GP`,`Guadeloupe`,`590`],[`GU`,`Guam`,`1`],[`GT`,`Guatemala`,`502`],[`GG`,`Guernsey`,`44`],[`GN`,`Guinea`,`224`],[`GW`,`Guinea-Bissau`,`245`],[`GY`,`Guyana`,`592`],[`HT`,`Haiti`,`509`],[`HN`,`Honduras`,`504`],[`HK`,`Hong Kong SAR China`,`852`],[`HU`,`Hungary`,`36`],[`IS`,`Iceland`,`354`],[`IN`,`India`,`91`],[`ID`,`Indonesia`,`62`],[`IR`,`Iran`,`98`],[`IQ`,`Iraq`,`964`],[`IE`,`Ireland`,`353`],[`IM`,`Isle of Man`,`44`],[`IL`,`Israel`,`972`],[`IT`,`Italy`,`39`],[`JM`,`Jamaica`,`1`],[`JP`,`Japan`,`81`],[`JE`,`Jersey`,`44`],[`JO`,`Jordan`,`962`],[`KZ`,`Kazakhstan`,`7`],[`KE`,`Kenya`,`254`],[`KI`,`Kiribati`,`686`],[`XK`,`Kosovo`,`383`],[`KW`,`Kuwait`,`965`],[`KG`,`Kyrgyzstan`,`996`],[`LA`,`Laos`,`856`],[`LV`,`Latvia`,`371`],[`LB`,`Lebanon`,`961`],[`LS`,`Lesotho`,`266`],[`LR`,`Liberia`,`231`],[`LY`,`Libya`,`218`],[`LI`,`Liechtenstein`,`423`],[`LT`,`Lithuania`,`370`],[`LU`,`Luxembourg`,`352`],[`MO`,`Macao SAR China`,`853`],[`MG`,`Madagascar`,`261`],[`MW`,`Malawi`,`265`],[`MY`,`Malaysia`,`60`],[`MV`,`Maldives`,`960`],[`ML`,`Mali`,`223`],[`MT`,`Malta`,`356`],[`MH`,`Marshall Islands`,`692`],[`MQ`,`Martinique`,`596`],[`MR`,`Mauritania`,`222`],[`MU`,`Mauritius`,`230`],[`YT`,`Mayotte`,`262`],[`MX`,`Mexico`,`52`],[`FM`,`Micronesia`,`691`],[`MD`,`Moldova`,`373`],[`MC`,`Monaco`,`377`],[`MN`,`Mongolia`,`976`],[`ME`,`Montenegro`,`382`],[`MS`,`Montserrat`,`1`],[`MA`,`Morocco`,`212`],[`MZ`,`Mozambique`,`258`],[`MM`,`Myanmar (Burma)`,`95`],[`NA`,`Namibia`,`264`],[`NR`,`Nauru`,`674`],[`NP`,`Nepal`,`977`],[`NL`,`Netherlands`,`31`],[`NC`,`New Caledonia`,`687`],[`NZ`,`New Zealand`,`64`],[`NI`,`Nicaragua`,`505`],[`NE`,`Niger`,`227`],[`NG`,`Nigeria`,`234`],[`NU`,`Niue`,`683`],[`NF`,`Norfolk Island`,`672`],[`KP`,`North Korea`,`850`],[`MK`,`North Macedonia`,`389`],[`MP`,`Northern Mariana Islands`,`1`],[`NO`,`Norway`,`47`],[`OM`,`Oman`,`968`],[`PK`,`Pakistan`,`92`],[`PW`,`Palau`,`680`],[`PS`,`Palestinian Territories`,`970`],[`PA`,`Panama`,`507`],[`PG`,`Papua New Guinea`,`675`],[`PY`,`Paraguay`,`595`],[`PE`,`Peru`,`51`],[`PH`,`Philippines`,`63`],[`PL`,`Poland`,`48`],[`PT`,`Portugal`,`351`],[`PR`,`Puerto Rico`,`1`],[`QA`,`Qatar`,`974`],[`RE`,`Réunion`,`262`],[`RO`,`Romania`,`40`],[`RU`,`Russia`,`7`],[`RW`,`Rwanda`,`250`],[`WS`,`Samoa`,`685`],[`SM`,`San Marino`,`378`],[`ST`,`São Tomé & Príncipe`,`239`],[`SA`,`Saudi Arabia`,`966`],[`SN`,`Senegal`,`221`],[`RS`,`Serbia`,`381`],[`SC`,`Seychelles`,`248`],[`SL`,`Sierra Leone`,`232`],[`SG`,`Singapore`,`65`],[`SX`,`Sint Maarten`,`1`],[`SK`,`Slovakia`,`421`],[`SI`,`Slovenia`,`386`],[`SB`,`Solomon Islands`,`677`],[`SO`,`Somalia`,`252`],[`ZA`,`South Africa`,`27`],[`KR`,`South Korea`,`82`],[`SS`,`South Sudan`,`211`],[`ES`,`Spain`,`34`],[`LK`,`Sri Lanka`,`94`],[`BL`,`St. Barthélemy`,`590`],[`SH`,`St. Helena`,`290`],[`KN`,`St. Kitts & Nevis`,`1`],[`LC`,`St. Lucia`,`1`],[`MF`,`St. Martin`,`590`],[`PM`,`St. Pierre & Miquelon`,`508`],[`VC`,`St. Vincent & Grenadines`,`1`],[`SD`,`Sudan`,`249`],[`SR`,`Suriname`,`597`],[`SJ`,`Svalbard & Jan Mayen`,`47`],[`SE`,`Sweden`,`46`],[`CH`,`Switzerland`,`41`],[`SY`,`Syria`,`963`],[`TW`,`Taiwan`,`886`],[`TJ`,`Tajikistan`,`992`],[`TZ`,`Tanzania`,`255`],[`TH`,`Thailand`,`66`],[`TL`,`Timor-Leste`,`670`],[`TG`,`Togo`,`228`],[`TK`,`Tokelau`,`690`],[`TO`,`Tonga`,`676`],[`TT`,`Trinidad & Tobago`,`1`],[`TA`,`Tristan da Cunha`,`290`],[`TN`,`Tunisia`,`216`],[`TR`,`Türkiye`,`90`],[`TM`,`Turkmenistan`,`993`],[`TC`,`Turks & Caicos Islands`,`1`],[`TV`,`Tuvalu`,`688`],[`VI`,`U.S. Virgin Islands`,`1`],[`UG`,`Uganda`,`256`],[`UA`,`Ukraine`,`380`],[`AE`,`United Arab Emirates`,`971`],[`GB`,`United Kingdom`,`44`],[`US`,`United States`,`1`],[`UY`,`Uruguay`,`598`],[`UZ`,`Uzbekistan`,`998`],[`VU`,`Vanuatu`,`678`],[`VA`,`Vatican City`,`39`],[`VE`,`Venezuela`,`58`],[`VN`,`Vietnam`,`84`],[`WF`,`Wallis & Futuna`,`681`],[`EH`,`Western Sahara`,`212`],[`YE`,`Yemen`,`967`],[`ZM`,`Zambia`,`260`],[`ZW`,`Zimbabwe`,`263`]],Fa=e=>(Pa.find(t=>t[0]===e)||[``,``,``])[2],Ia=class extends c{static formAssociated=!0;static get observedAttributes(){return[`value`,`placeholder`,`search-placeholder`,`searchable`,`disabled`,`compact`,`size`,`clearable`,`icon`,`prefix`,`aria-label`,`aria-invalid`]}_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||`Select`}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=``,this._optionsProp=null,this._active=-1,this._typeahead=``,this._typeaheadTimer=null}connectedCallback(){if(!this._rendered){this.render();return}this._bindGlobal?.()}attributeChangedCallback(e,t,n){if(e===`value`){this.value=n;return}if(e===`aria-invalid`){this._syncInvalid();return}this._rendered&&this.render()}_syncInvalid(){let e=this.querySelector(`.search-select-control`);e&&(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==null?``:String(e),B(this,this._value),this._syncSelected(),this._syncReset()}set options(e){this._optionsProp=Array.isArray(e)?e:null,this.isConnected&&this.render()}get options(){return this._readOptions()}_snapshotDeclared(){if(this._declared)return;let e=[...this.querySelectorAll(`:scope > wui-option`)];e.length&&(this._declared=e.map(e=>({value:e.getAttribute(`value`)??e.textContent.trim(),label:e.innerHTML,icon:e.getAttribute(`icon`)||void 0,[oi]:!0,selected:e.hasAttribute(`selected`)})))}_readOptions(){return this._optionsProp?this._optionsProp:(this._snapshotDeclared(),this._declared||[])}render(){this._defaultValue===void 0&&(this._defaultValue=this.getAttribute(`value`)||``),this._snapshotDeclared();let e=this._readOptions(),t=this.hasAttribute(`searchable`),n=this.hasAttribute(`clearable`),r=this.getAttribute(`size`),i=r===`sm`?` search-select-sm`:r===`lg`?` search-select-lg`:``,a=this.getAttribute(`icon`),o=this.getAttribute(`prefix`),s=this.getAttribute(`placeholder`)||`Select...`,c=this.getAttribute(`search-placeholder`)||`Search...`,l=e.find(e=>String(e.value)===String(this._value))||e.find(e=>e.selected);l&&(this._value=String(l.value)),B(this,this._value),this.id||=`wui-select-${Math.random().toString(36).slice(2,9)}`;let u=`${this.id}-listbox`;this._listboxId=u;let d=e.map((e,t)=>{let n=String(e.value)===String(this._value);return`<button type="button" role="option" id="${La(`${u}-opt-${t}`)}" class="search-select-option${n?` selected`:``}" data-value="${La(e.value)}" aria-selected="${n}">${di(e)}</button>`}).join(``);this.innerHTML=`
251
251
  <div class="search-select${this.hasAttribute(`compact`)?` search-select-compact`:``}${i}">
252
- <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${Ei(u)}" aria-label="${Ei(this._accessibleName())}"${this.hasAttribute(`aria-invalid`)?` aria-invalid="true"`:``}${this.hasAttribute(`disabled`)?` disabled`:``}>
253
- ${a?R(a,{className:`search-select-icon`}):``}
254
- ${o?`<span class="search-select-prefix">${z(o)}</span>`:``}
255
- <span class="${l?``:`search-select-placeholder`}" data-label>${l?er(l):z(s)}</span>
256
- ${n?`<span class="search-select-reset" role="button" aria-label="Clear selection" hidden>${R(`x`)}</span>`:``}
257
- ${R(`chevron-down`,{className:`search-select-caret`})}
252
+ <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${La(u)}" aria-label="${La(this._accessibleName())}"${this.hasAttribute(`aria-invalid`)?` aria-invalid="true"`:``}${this.hasAttribute(`disabled`)?` disabled`:``}>
253
+ ${a?M(a,{className:`search-select-icon`}):``}
254
+ ${o?`<span class="search-select-prefix">${H(o)}</span>`:``}
255
+ <span class="${l?``:`search-select-placeholder`}" data-label>${l?di(l):H(s)}</span>
256
+ ${n?`<span class="search-select-reset" role="button" aria-label="Clear selection" hidden>${M(`x`)}</span>`:``}
257
+ ${M(`chevron-down`,{className:`search-select-caret`})}
258
258
  </button>
259
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${Ei(u)}" tabindex="-1" hidden>
260
- ${t?`<div class="search-select-search">${R(`search`)}<input class="search-select-input" placeholder="${Ei(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${R(`x`)}</button></div>`:``}
259
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${La(u)}" tabindex="-1" hidden>
260
+ ${t?`<div class="search-select-search">${M(`search`)}<input class="search-select-input" placeholder="${La(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${M(`x`)}</button></div>`:``}
261
261
  <div class="search-select-options">${d}<div class="search-select-empty" hidden>No matches</div></div>
262
262
  </div>
263
- </div>`,this._rendered=!0,I(this,this._value),this._wire(),this._syncReset()}_refs(){return{control:this.querySelector(`.search-select-control`),menu:this.querySelector(`.search-select-menu`),label:this.querySelector(`[data-label]`),reset:this.querySelector(`.search-select-reset`),search:this.querySelector(`.search-select-input`),clear:this.querySelector(`.search-select-clear`),empty:this.querySelector(`.search-select-empty`),optionsWrap:this.querySelector(`.search-select-options`)}}_optionEls(){return[...this.querySelectorAll(`.search-select-option`)]}_visible(){return this._optionEls().filter(e=>!e.hidden)}_syncSelected(){let{label:e}=this._refs(),t=this._readOptions().find(e=>String(e.value)===String(this._value));for(let e of this._optionEls()){let t=e.dataset.value===String(this._value);e.classList.toggle(`selected`,t),e.setAttribute(`aria-selected`,String(t))}e&&(e.innerHTML=t?er(t):z(this.getAttribute(`placeholder`)||`Select...`),e.classList.toggle(`search-select-placeholder`,!t))}_syncReset(){let{reset:e}=this._refs();e&&(e.hidden=!(this.hasAttribute(`clearable`)&&this._value!==``&&!this.hasAttribute(`disabled`)))}_wire(){this._teardown();let e=this._refs();if(!e.control||!e.menu)return;let t=()=>{if(this.hasAttribute(`compact`)){let t=e.control.getBoundingClientRect();e.menu.style.width=`max-content`,e.menu.style.minWidth=`${t.width}px`,e.menu.style.maxWidth=`280px`,a(e.control,e.menu)}else a(e.control,e.menu,{matchWidth:!0})},n=(t,{reveal:n=!0}={})=>{let r=this._visible();this._active=t,Jn(e.optionsWrap,t>=0&&r[t]||null),t>=0&&r[t]?(n&&r[t].scrollIntoView({block:`nearest`}),e.control.setAttribute(`aria-activedescendant`,r[t].id)):e.control.removeAttribute(`aria-activedescendant`)},r=n=>{let r=n.trim().toLowerCase(),i=0;for(let e of this._optionEls()){let t=!r||e.textContent.toLowerCase().includes(r);e.hidden=!t,t&&(i+=1)}e.empty&&(e.empty.hidden=i>0),e.clear&&(e.clear.hidden=!r),e.menu.hidden||t()},i=()=>!e.menu.hidden,c=()=>{i()&&t()},l=()=>{e.menu.hidden=!1,e.control.setAttribute(`aria-expanded`,`true`),e.control.classList.add(`open`),t(),o(this,c),e.search&&(e.search.value=``,r(``),e.search.focus()),n(this._optionEls().findIndex(e=>e.classList.contains(`selected`)))},u=()=>{e.menu.hidden=!0,e.control.setAttribute(`aria-expanded`,`false`),e.control.classList.remove(`open`),n(-1),s(this)},d=t=>{this.value=t.dataset.value,this.dispatchEvent(new Event(`change`,{bubbles:!0})),u(),e.control.focus()};this._navHandler=qn({getVisibleOptions:()=>this._visible(),getActive:()=>this._active,setActive:e=>n(e),onEnter:e=>{e&&d(e)},onEscape:()=>{this._navHandler.clearTypeahead(),u(),e.control.focus()}});let f=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation()),this._navHandler.handler(e)};e.reset?.addEventListener(`click`,t=>{t.stopPropagation(),this.value=``,this.dispatchEvent(new Event(`change`,{bubbles:!0})),e.control.focus()}),e.control.addEventListener(`click`,()=>i()?u():l()),e.control.addEventListener(`keydown`,e=>{if(i()){f(e);return}(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l())}),e.optionsWrap.addEventListener(`click`,e=>{let t=e.target.closest(`.search-select-option`);t&&d(t)}),e.optionsWrap.addEventListener(`mousemove`,e=>{let t=e.target.closest(`.search-select-option`);t&&!t.classList.contains(`is-active`)&&n(this._visible().indexOf(t),{reveal:!1})}),e.optionsWrap.addEventListener(`mouseleave`,()=>n(-1)),e.search?.addEventListener(`input`,()=>{r(e.search.value),n(-1)}),e.clear?.addEventListener(`click`,()=>{e.search.value=``,r(``),e.search.focus()}),e.menu.addEventListener(`keydown`,f),this._bindGlobal=()=>{this._teardown(),this._onDocClick=e=>{i()&&!this.contains(e.target)&&u()},document.addEventListener(`click`,this._onDocClick),i()&&o(this,c)},this._bindGlobal()}_teardown(){this._onDocClick&&=(document.removeEventListener(`click`,this._onDocClick),null),s(this),this._navHandler?.teardown()}disconnectedCallback(){this._teardown()}},Ei=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),Di=e=>{if(e==null)return null;let t=String(e).split(`,`).map(e=>e.trim().toUpperCase()).filter(Boolean);return t.length?new Set(t):null},Oi=e=>{let t=Di(e);return Ci.filter(([e])=>!t||t.has(e)).map(([e,t])=>({value:e,label:t,flag:e}))},ki=class extends Ti{static get observedAttributes(){return[...Ti.observedAttributes,`countries`]}_readOptions(){let e=this.getAttribute(`countries`);return this._countryCache?.attr!==e&&(this._countryCache={attr:e,options:Oi(e)}),this._countryCache.options}},Ai=48,ji=1200,Mi=10,Ni=50,Pi=[`start`,`end`],Fi=8,Ii={comfortable:54,cozy:48,compact:40},W={resize:e=>e?`Resize ${e} column`:`Resize column`,width:e=>`${e} pixels`,rows:e=>`${Ae(e,{decimals:0})} ${e===1?`row`:`rows`}`,saved:e=>e?`${e} saved.`:`Row saved.`,savedMany:e=>`${Ae(e,{decimals:0})} rows saved.`,notSaved:(e,t)=>`${e?`${e} was not saved.`:`Row was not saved.`}${t?` ${t}`:``}`},Li=e=>Ae(e,{decimals:0}),Ri=e=>Math.min(ji,Math.max(48,Math.round(Number(e)||0)));function zi(e,t,n=[]){let r=new Map(n.map(e=>[e,[]]));return e.forEach((e,n)=>{let i=t(e,n);r.has(i)||r.set(i,[]),r.get(i).push(e)}),[...r].filter(([,e])=>e.length>0).map(([e,t])=>({key:e,items:t}))}function Bi({scrollTop:e,viewport:t,rowHeight:n,count:r,overscan:i=8}){let a=n>0?n:Ii.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 Vi=e=>`wui-widths:${e}`;function Hi(e){if(!e)return{};try{let t=JSON.parse(window.localStorage.getItem(Vi(e))||`{}`),n={};for(let[e,r]of Object.entries(t||{}))Number.isFinite(r)&&(n[e]=Ri(r));return n}catch{return{}}}function Ui(e,t){if(e)try{Object.keys(t).length?window.localStorage.setItem(Vi(e),JSON.stringify(t)):window.localStorage.removeItem(Vi(e))}catch{}}var Wi=(e,t)=>`--wui-pin-${e}-${t}`,Gi=`--wui-pin-at`,Ki=(e,t)=>`var(${Wi(e,t)}, 0px)`;function qi(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});n>=0&&(t[n].edge=!0);let i=-1;r=0;for(let n=e.length-1;n>=0;n--)e[n]===`end`&&(t[n]={side:`end`,ordinal:r++,edge:!1},i=n);return i>=0&&(t[i].edge=!0),t}var Ji=e=>e?`wui-pin-${e.side}${e.edge?` wui-pin-${e.side}-edge`:``}`:``,Yi=200,Xi=220,Zi=`cubic-bezier(0.22, 1, 0.36, 1)`,Qi=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,$i=e=>e.getAttribute(`data-row-key`)??e;function ea(e){let t=[...e];if(t.length>200)return null;let n=new Map;for(let e of t)e.hidden||n.set($i(e),e.offsetTop);return n}function ta(e,t){let n=[...e];if(!t||n.length>200||Qi())return 0;let r=0;for(let e of n){if(e.hidden||typeof e.animate!=`function`)continue;let n=t.get($i(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:Zi}),r++)}return r}function na(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 ra=[`saving`,`error`],ia=`data-wui-save-state`,aa=`wui-row-save-error`,oa=e=>e.querySelector(`:scope > .wui-name-cell`)??[...e.cells].find(e=>!e.matches(`.wui-select-cell, .wui-expand-cell`))??null;function sa(e){let t=oa(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.nodeType===1&&e.classList.contains(`wui-row-save-error`)||(r+=e.textContent);return r.replace(/\s+/g,` `).trim()}function ca(e,t,n=``){if(t!==null&&!ra.includes(t))throw Error(`A row's save state is ${ra.join(` or `)} (or null to clear it), not "${t}".`);e.querySelector(`:scope > * > .${aa}`)?.remove(),t===null?e.removeAttribute(ia):e.setAttribute(ia,t),t===`saving`?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`);let r=t===`error`&&n?oa(e):null;if(r){let t=e.ownerDocument.createElement(`span`);t.className=aa,t.textContent=n,r.append(t)}}function la(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 ua(e){let t=e.filter(e=>e.ok),n=[];t.length===1?n.push(W.saved(t[0].label)):t.length>1&&n.push(W.savedMany(t.length));for(let t of e)t.ok||n.push(W.notSaved(t.label,t.message));return n.join(` `)}var da=`.wui-col-resize`,fa=`.wui-group-row, .wui-virtual-spacer`,pa=`.wui-select-cell, .wui-expand-cell`,ma=`<svg class="wui-icon" data-icon="chevron-down" width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true" style="vertical-align:-.125em"><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>`,ha=e=>e.hasAttribute(`data-wui-skeleton`)||!!e.querySelector(`:scope > td > .skeleton`),ga=class extends c{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=e.target.closest?.(da);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=Hi(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(){return this.querySelector(`:scope > table`)}_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.nodeType===1?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(pa)?`lead`:null});if(!r.some(e=>e===`start`||e===`end`))return;let i=qi(r);i.forEach((e,t)=>{e&&this._ro?.observe(n[t])});let a=e=>n[e].getBoundingClientRect().width,o=0;i.forEach((t,n)=>{t?.side===`start`&&(this._setVar(e,Wi(`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,Wi(`end`,n.ordinal),o),o+=a(t))}if(t)for(let t of e.rows)t.matches(`${fa}, .wui-row-expanded`)||t.cells.length!==n.length||i.forEach((e,n)=>{if(!e)return;let r=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=Ki(e.side,e.ordinal);r.style.getPropertyValue(`--wui-pin-at`)!==i&&r.style.setProperty(Gi,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(pa))}_handles(e){let t=this._headCells(e),n=this._resizable(t);t.forEach((e,t)=>{if(!n[t]||e.querySelector(da))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(ji)),r.setAttribute(`tabindex`,`0`);let i=e.textContent.trim();r.setAttribute(`aria-label`,W.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(fa)&&!ha(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(da);n&&this._handleValue(n,Ri(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(pa))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=Ri(t);e.style.width=`${n}px`,e.setAttribute(`data-wui-width`,``);let r=e.querySelector(da);return r&&this._handleValue(r,n),n}_handleValue(e,t){e.setAttribute(`aria-valuenow`,String(t)),e.setAttribute(`aria-valuetext`,W.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(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)},Ui(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,Ui(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=e.target.closest?.(da);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=e.target.closest?.(da);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=e.shiftKey?50:10,a=e.key===`ArrowRight`!==this._rtl(),o=Number.parseFloat(n.style.width)||n.getBoundingClientRect().width;this._resizeTo(n,o+(a?i:-i),!0)}_click(e){let t=!!e.target.closest?.(da);if(this._swallowClick||t){e.stopPropagation(),(t||this._swallowClick)&&e.preventDefault(),this._swallowClick=!1;return}if(!this.hasAttribute(`group-by`))return;let n=(e.target.closest?.(`.wui-group-toggle`))?.closest(`.wui-group-row`);if(!n||!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(fa));if(a.some(ha))return;let o=this.ownerDocument,s=new Map([...i.querySelectorAll(`:scope > tr.wui-group-row`)].map(e=>[e.dataset.groupKey,e])),c=zi(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),t.querySelector(`.wui-group-cell`).colSpan=n.length,t.querySelector(`.wui-group-count`).textContent=Li(e.items.length),t.querySelector(`.wui-group-rows`).textContent=`, ${W.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=ma;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(fa);n=n.nextElementSibling)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);this._top.cells[0].colSpan=t,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=Bi({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=this._items[e];n.classList.contains(`wui-virtual-off`)!==t&&n.classList.toggle(`wui-virtual-off`,t)}this._range=i,this._top.hidden=i.before===0,this._bottom.hidden=i.after===0,this._top.cells[0].style.height=`${i.before}px`,this._bottom.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;return t>0?t:e.classList.contains(`wui-table-compact`)?Ii.compact:e.classList.contains(`wui-table-cozy`)?Ii.cozy:Ii.comfortable}},_a=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],va=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],ya=e=>{let t=String(e??``).trim();return/^[0-6]$/.test(t)?Number(t):null},ba=e=>ya(e.getAttribute(`first-day`))??ya(getComputedStyle(e).getPropertyValue(`--wui-first-day`))??1,xa=e=>String(e).padStart(2,`0`),Sa=(e,t,n)=>`${e}-${xa(t+1)}-${xa(n)}`,G=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e||``);return t?{y:+t[1],m:t[2]-1,d:+t[3]}:null},Ca=`dd-MMM-yyyy`,wa=(e,t=Ca)=>{let n=G(e);if(!n)return``;let r={yyyy:n.y,MMMM:_a[n.m],MMM:_a[n.m].slice(0,3),MM:xa(n.m+1),dd:xa(n.d),d:n.d};return(t||`dd-MMM-yyyy`).replace(/yyyy|MMMM|MMM|MM|dd|d/g,e=>r[e])},Ta=(e,t)=>new Date(e,t+1,0).getDate(),K=(e,t)=>{for(;t<0;)t+=12,--e;for(;t>11;)t-=12,e+=1;return{y:e,m:t}},Ea=class extends c{static formAssociated=!0;static get observedAttributes(){return[`value`,`min`,`max`,`placeholder`,`disabled`,`first-day`,`disabled-weekdays`,`display-format`,`size`,`aria-label`,`aria-describedby`,`aria-invalid`]}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(){if(!this._rendered){this.render();return}this._bindGlobal?.()}attributeChangedCallback(e,t,n){if(e===`aria-invalid`){this._syncInvalid();return}this._rendered&&(e===`value`?(this._value=n||``,this._syncFormValue(),this._syncTrigger()):e===`display-format`?this._syncTrigger():e===`first-day`?this.querySelector(`.datepicker-pop`)?.hidden||this._renderView():this.render())}_syncInvalid(){let e=this.querySelector(`.datepicker-trigger`);e&&(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||``,I(this,this._value),this._syncTrigger()}_firstDay(){return ba(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=G(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=`
263
+ </div>`,this._rendered=!0,B(this,this._value),this._wire(),this._syncReset()}_refs(){return{control:this.querySelector(`.search-select-control`),menu:this.querySelector(`.search-select-menu`),label:this.querySelector(`[data-label]`),reset:this.querySelector(`.search-select-reset`),search:this.querySelector(`.search-select-input`),clear:this.querySelector(`.search-select-clear`),empty:this.querySelector(`.search-select-empty`),optionsWrap:this.querySelector(`.search-select-options`)}}_optionEls(){return[...this.querySelectorAll(`.search-select-option`)]}_visible(){return this._optionEls().filter(e=>!e.hidden)}_syncSelected(){let{label:e}=this._refs(),t=this._readOptions().find(e=>String(e.value)===String(this._value));for(let e of this._optionEls()){let t=e.dataset.value===String(this._value);e.classList.toggle(`selected`,t),e.setAttribute(`aria-selected`,String(t))}e&&(e.innerHTML=t?di(t):H(this.getAttribute(`placeholder`)||`Select...`),e.classList.toggle(`search-select-placeholder`,!t))}_syncReset(){let{reset:e}=this._refs();e&&(e.hidden=!(this.hasAttribute(`clearable`)&&this._value!==``&&!this.hasAttribute(`disabled`)))}_wire(){this._teardown();let e=this._refs();if(!e.control||!e.menu)return;let t=()=>{if(this.hasAttribute(`compact`)){let t=e.control.getBoundingClientRect();e.menu.style.width=`max-content`,e.menu.style.minWidth=`${t.width}px`,e.menu.style.maxWidth=`280px`,a(e.control,e.menu)}else a(e.control,e.menu,{matchWidth:!0})},n=(t,{reveal:n=!0}={})=>{let r=this._visible();this._active=t,ai(e.optionsWrap,t>=0&&r[t]||null),t>=0&&r[t]?(n&&r[t].scrollIntoView({block:`nearest`}),e.control.setAttribute(`aria-activedescendant`,r[t].id)):e.control.removeAttribute(`aria-activedescendant`)},r=n=>{let r=n.trim().toLowerCase(),i=0;for(let e of this._optionEls()){let t=!r||e.textContent.toLowerCase().includes(r);e.hidden=!t,t&&(i+=1)}e.empty&&(e.empty.hidden=i>0),e.clear&&(e.clear.hidden=!r),e.menu.hidden||t()},i=()=>!e.menu.hidden,c=()=>{i()&&t()},l=()=>{e.menu.hidden=!1,e.control.setAttribute(`aria-expanded`,`true`),e.control.classList.add(`open`),t(),o(this,c),e.search&&(e.search.value=``,r(``),e.search.focus()),n(this._optionEls().findIndex(e=>e.classList.contains(`selected`)))},u=()=>{e.menu.hidden=!0,e.control.setAttribute(`aria-expanded`,`false`),e.control.classList.remove(`open`),n(-1),s(this)},d=t=>{this.value=t.dataset.value,this.dispatchEvent(new Event(`change`,{bubbles:!0})),u(),e.control.focus()};this._navHandler=ii({getVisibleOptions:()=>this._visible(),getActive:()=>this._active,setActive:e=>n(e),onEnter:e=>{e&&d(e)},onEscape:()=>{this._navHandler.clearTypeahead(),u(),e.control.focus()}});let f=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation()),this._navHandler.handler(e)};e.reset?.addEventListener(`click`,t=>{t.stopPropagation(),this.value=``,this.dispatchEvent(new Event(`change`,{bubbles:!0})),e.control.focus()}),e.control.addEventListener(`click`,()=>i()?u():l()),e.control.addEventListener(`keydown`,e=>{if(i()){f(e);return}(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l())}),e.optionsWrap.addEventListener(`click`,e=>{let t=e.target.closest(`.search-select-option`);t&&d(t)}),e.optionsWrap.addEventListener(`mousemove`,e=>{let t=e.target.closest(`.search-select-option`);t&&!t.classList.contains(`is-active`)&&n(this._visible().indexOf(t),{reveal:!1})}),e.optionsWrap.addEventListener(`mouseleave`,()=>n(-1)),e.search?.addEventListener(`input`,()=>{r(e.search.value),n(-1)}),e.clear?.addEventListener(`click`,()=>{e.search.value=``,r(``),e.search.focus()}),e.menu.addEventListener(`keydown`,f),this._bindGlobal=()=>{this._teardown(),this._onDocClick=e=>{i()&&!this.contains(e.target)&&u()},document.addEventListener(`click`,this._onDocClick),i()&&o(this,c)},this._bindGlobal()}_teardown(){this._onDocClick&&=(document.removeEventListener(`click`,this._onDocClick),null),s(this),this._navHandler?.teardown()}disconnectedCallback(){this._teardown()}},La=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),Ra=e=>{if(e==null)return null;let t=String(e).split(`,`).map(e=>e.trim().toUpperCase()).filter(Boolean);return t.length?new Set(t):null},za=e=>{let t=Ra(e);return Pa.filter(([e])=>!t||t.has(e)).map(([e,t])=>({value:e,label:t,flag:e}))},Ba=class extends Ia{static get observedAttributes(){return[...Ia.observedAttributes,`countries`]}_readOptions(){let e=this.getAttribute(`countries`);return this._countryCache?.attr!==e&&(this._countryCache={attr:e,options:za(e)}),this._countryCache.options}},Va=`.wui-col-resize`,Ha=`.wui-group-row, .wui-virtual-spacer`,Ua=`.wui-select-cell, .wui-expand-cell`,Wa=`<svg class="wui-icon" data-icon="chevron-down" width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true" style="vertical-align:-.125em"><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>`,Ga=e=>e.hasAttribute(`data-wui-skeleton`)||!!e.querySelector(`:scope > td > .skeleton`),Ka=class extends c{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=e.target.closest?.(Va);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=Ze(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(){return this.querySelector(`:scope > table`)}_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.nodeType===1?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(Ua)?`lead`:null});if(!r.some(e=>e===`start`||e===`end`))return;let i=nt(r);i.forEach((e,t)=>{e&&this._ro?.observe(n[t])});let a=e=>n[e].getBoundingClientRect().width,o=0;i.forEach((t,n)=>{t?.side===`start`&&(this._setVar(e,$e(`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,$e(`end`,n.ordinal),o),o+=a(t))}if(t)for(let t of e.rows)t.matches(`${Ha}, .wui-row-expanded`)||t.cells.length!==n.length||i.forEach((e,n)=>{if(!e)return;let r=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=tt(e.side,e.ordinal);r.style.getPropertyValue(`--wui-pin-at`)!==i&&r.style.setProperty(et,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(Ua))}_handles(e){let t=this._headCells(e),n=this._resizable(t);t.forEach((e,t)=>{if(!n[t]||e.querySelector(Va))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(Be)),r.setAttribute(`tabindex`,`0`);let i=e.textContent.trim();r.setAttribute(`aria-label`,j.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(Ha)&&!Ga(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(Va);n&&this._handleValue(n,qe(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(Ua))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=qe(t);e.style.width=`${n}px`,e.setAttribute(`data-wui-width`,``);let r=e.querySelector(Va);return r&&this._handleValue(r,n),n}_handleValue(e,t){e.setAttribute(`aria-valuenow`,String(t)),e.setAttribute(`aria-valuetext`,j.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(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)},Qe(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,Qe(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=e.target.closest?.(Va);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=e.target.closest?.(Va);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=e.shiftKey?50:10,a=e.key===`ArrowRight`!==this._rtl(),o=Number.parseFloat(n.style.width)||n.getBoundingClientRect().width;this._resizeTo(n,o+(a?i:-i),!0)}_click(e){let t=!!e.target.closest?.(Va);if(this._swallowClick||t){e.stopPropagation(),(t||this._swallowClick)&&e.preventDefault(),this._swallowClick=!1;return}if(!this.hasAttribute(`group-by`))return;let n=(e.target.closest?.(`.wui-group-toggle`))?.closest(`.wui-group-row`);if(!n||!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(Ha));if(a.some(Ga))return;let o=this.ownerDocument,s=new Map([...i.querySelectorAll(`:scope > tr.wui-group-row`)].map(e=>[e.dataset.groupKey,e])),c=Je(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),t.querySelector(`.wui-group-cell`).colSpan=n.length,t.querySelector(`.wui-group-count`).textContent=Ke(e.items.length),t.querySelector(`.wui-group-rows`).textContent=`, ${j.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=Wa;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(Ha);n=n.nextElementSibling)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);this._top.cells[0].colSpan=t,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=Ye({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=this._items[e];n.classList.contains(`wui-virtual-off`)!==t&&n.classList.toggle(`wui-virtual-off`,t)}this._range=i,this._top.hidden=i.before===0,this._bottom.hidden=i.after===0,this._top.cells[0].style.height=`${i.before}px`,this._bottom.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;return t>0?t:e.classList.contains(`wui-table-compact`)?Ge.compact:e.classList.contains(`wui-table-cozy`)?Ge.cozy:Ge.comfortable}},qa=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],Ja=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],Ya=e=>{let t=String(e??``).trim();return/^[0-6]$/.test(t)?Number(t):null},Xa=e=>Ya(e.getAttribute(`first-day`))??Ya(getComputedStyle(e).getPropertyValue(`--wui-first-day`))??1,Za=e=>String(e).padStart(2,`0`),Qa=(e,t,n)=>`${e}-${Za(t+1)}-${Za(n)}`,q=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e||``);return t?{y:+t[1],m:t[2]-1,d:+t[3]}:null},$a=`dd-MMM-yyyy`,eo=(e,t=$a)=>{let n=q(e);if(!n)return``;let r={yyyy:n.y,MMMM:qa[n.m],MMM:qa[n.m].slice(0,3),MM:Za(n.m+1),dd:Za(n.d),d:n.d};return(t||`dd-MMM-yyyy`).replace(/yyyy|MMMM|MMM|MM|dd|d/g,e=>r[e])},to=(e,t)=>new Date(e,t+1,0).getDate(),J=(e,t)=>{for(;t<0;)t+=12,--e;for(;t>11;)t-=12,e+=1;return{y:e,m:t}},no=class extends c{static formAssociated=!0;static get observedAttributes(){return[`value`,`min`,`max`,`placeholder`,`disabled`,`first-day`,`disabled-weekdays`,`display-format`,`size`,`aria-label`,`aria-describedby`,`aria-invalid`]}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(){if(!this._rendered){this.render();return}this._bindGlobal?.()}attributeChangedCallback(e,t,n){if(e===`aria-invalid`){this._syncInvalid();return}this._rendered&&(e===`value`?(this._value=n||``,this._syncFormValue(),this._syncTrigger()):e===`display-format`?this._syncTrigger():e===`first-day`?this.querySelector(`.datepicker-pop`)?.hidden||this._renderView():this.render())}_syncInvalid(){let e=this.querySelector(`.datepicker-trigger`);e&&(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||``,B(this,this._value),this._syncTrigger()}_firstDay(){return Xa(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=q(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=`
264
264
  <div class="datepicker">
265
- <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="${z(i)}"`:``}${a?` aria-describedby="${z(a)}"`:``}>
266
- <span data-trigger-label class="${t?``:`search-select-placeholder`}">${z(t?wa(this._value,this.getAttribute(`display-format`)):e)}</span>
267
- ${R(`calendar-dots`)}
265
+ <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="${H(i)}"`:``}${a?` aria-describedby="${H(a)}"`:``}>
266
+ <span data-trigger-label class="${t?``:`search-select-placeholder`}">${H(t?eo(this._value,this.getAttribute(`display-format`)):e)}</span>
267
+ ${M(`calendar-dots`)}
268
268
  </button>
269
269
  <div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
270
- </div>`,this._rendered=!0,I(this,this._value),this._wire()}_syncFormValue(){I(this,this._value)}_syncTrigger(){let e=this.querySelector(`.datepicker-trigger`),t=this.querySelector(`[data-trigger-label]`);if(!t)return;let n=G(this._value);t.textContent=n?wa(this._value,this.getAttribute(`display-format`)):this.getAttribute(`placeholder`)||`Choose a date`,t.classList.toggle(`search-select-placeholder`,!n),e?.classList.toggle(`has-value`,!!n)}_limits(){let e=G(this.getAttribute(`min`)),t=G(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,Ta(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&&(this._mode===`months`?e.innerHTML=this._monthsHtml():this._mode===`years`?e.innerHTML=this._yearsHtml():e.innerHTML=this._daysHtml(),this._focusActive())}_daysHtml(){let e=this._firstDay(),t=(new Date(this._viewY,this._viewM,1).getDay()-e+7)%7,n=Ta(this._viewY,this._viewM),r=G(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=Sa(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=K(this._viewY,this._viewM-1),u=Ta(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=K(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=va.map((t,n)=>va[(n+e)%7]).map(e=>`<span>${e}</span>`).join(``);return`
270
+ </div>`,this._rendered=!0,B(this,this._value),this._wire()}_syncFormValue(){B(this,this._value)}_syncTrigger(){let e=this.querySelector(`.datepicker-trigger`),t=this.querySelector(`[data-trigger-label]`);if(!t)return;let n=q(this._value);t.textContent=n?eo(this._value,this.getAttribute(`display-format`)):this.getAttribute(`placeholder`)||`Choose a date`,t.classList.toggle(`search-select-placeholder`,!n),e?.classList.toggle(`has-value`,!!n)}_limits(){let e=q(this.getAttribute(`min`)),t=q(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,to(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&&(this._mode===`months`?e.innerHTML=this._monthsHtml():this._mode===`years`?e.innerHTML=this._yearsHtml():e.innerHTML=this._daysHtml(),this._focusActive())}_daysHtml(){let e=this._firstDay(),t=(new Date(this._viewY,this._viewM,1).getDay()-e+7)%7,n=to(this._viewY,this._viewM),r=q(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=Qa(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=J(this._viewY,this._viewM-1),u=to(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=J(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=Ja.map((t,n)=>Ja[(n+e)%7]).map(e=>`<span>${e}</span>`).join(``);return`
271
271
  <div class="datepicker-head">
272
- <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${R(`chevron-left`)}</button>
273
- <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${_a[this._viewM]} ${this._viewY}</button>
274
- <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${R(`chevron-right`)}</button>
272
+ <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${M(`chevron-left`)}</button>
273
+ <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${qa[this._viewM]} ${this._viewY}</button>
274
+ <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${M(`chevron-right`)}</button>
275
275
  </div>
276
276
  <div class="datepicker-weekdays">${m}</div>
277
277
  <div class="datepicker-grid${this._slide?` ${this._slide}`:``}" role="grid">${c}</div>
278
278
  <div class="datepicker-foot">
279
279
  <button type="button" class="datepicker-link" data-today${p?` disabled`:``}>Today</button>
280
280
  <button type="button" class="datepicker-link" data-clear>Clear</button>
281
- </div>`}_monthsHtml(){let e=G(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(` `);r+=`<button type="button" class="${c}" data-month="${i}"${s?` disabled`:``}>${_a[i].slice(0,3)}</button>`}return`
281
+ </div>`}_monthsHtml(){let e=q(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(` `);r+=`<button type="button" class="${c}" data-month="${i}"${s?` disabled`:``}>${qa[i].slice(0,3)}</button>`}return`
282
282
  <div class="datepicker-head">
283
- <button type="button" class="datepicker-nav-btn" data-nav-year="-1" aria-label="Previous year">${R(`chevron-left`)}</button>
283
+ <button type="button" class="datepicker-nav-btn" data-nav-year="-1" aria-label="Previous year">${M(`chevron-left`)}</button>
284
284
  <button type="button" class="datepicker-month" data-view="years" aria-label="Choose year">${this._viewY}</button>
285
- <button type="button" class="datepicker-nav-btn" data-nav-year="1" aria-label="Next year">${R(`chevron-right`)}</button>
285
+ <button type="button" class="datepicker-nav-btn" data-nav-year="1" aria-label="Next year">${M(`chevron-right`)}</button>
286
286
  </div>
287
- <div class="datepicker-cells">${r}</div>`}_yearsHtml(){let e=G(this._value),t=new Date().getFullYear(),{yearDisabled:n}=this._limits(),r=this._viewY-(this._viewY%10+10)%10-1,i=``;for(let a=0;a<12;a++){let o=r+a,s=e&&e.y===o,c=t===o,l=n(o),u=[`datepicker-cell`,c?`is-today`:``,s?`is-selected`:``].filter(Boolean).join(` `);i+=`<button type="button" class="${u}" data-year="${o}"${l?` disabled`:``}>${o}</button>`}return`
287
+ <div class="datepicker-cells">${r}</div>`}_yearsHtml(){let e=q(this._value),t=new Date().getFullYear(),{yearDisabled:n}=this._limits(),r=this._viewY-(this._viewY%10+10)%10-1,i=``;for(let a=0;a<12;a++){let o=r+a,s=e&&e.y===o,c=t===o,l=n(o),u=[`datepicker-cell`,c?`is-today`:``,s?`is-selected`:``].filter(Boolean).join(` `);i+=`<button type="button" class="${u}" data-year="${o}"${l?` disabled`:``}>${o}</button>`}return`
288
288
  <div class="datepicker-head">
289
- <button type="button" class="datepicker-nav-btn" data-nav-decade="-1" aria-label="Previous decade">${R(`chevron-left`)}</button>
289
+ <button type="button" class="datepicker-nav-btn" data-nav-decade="-1" aria-label="Previous decade">${M(`chevron-left`)}</button>
290
290
  <span class="datepicker-month">${r+1} to ${r+10}</span>
291
- <button type="button" class="datepicker-nav-btn" data-nav-decade="1" aria-label="Next decade">${R(`chevron-right`)}</button>
291
+ <button type="button" class="datepicker-nav-btn" data-nav-decade="1" aria-label="Next decade">${M(`chevron-right`)}</button>
292
292
  </div>
293
- <div class="datepicker-cells">${i}</div>`}_focusActive(){let e=this.querySelector(`.datepicker-pop`),t=e?.querySelector(`[tabindex="0"]`)||e?.querySelector(`.is-selected`)||e?.querySelector(`.datepicker-day:not(:disabled), .datepicker-cell:not(:disabled)`);t&&e.contains(document.activeElement)&&t.focus()}_position(e,t){a(e,t,{clampHeight:!0})}_setFocus(e,t,n,r){let{y:i,m:a}=K(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=``,this.querySelector(`.datepicker-day[data-iso="${Sa(i,a,n)}"]`)?.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||G(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`:return r(-1,`slide-prev`);case`ArrowRight`:return r(1,`slide-next`);case`ArrowUp`:return r(-7,`slide-prev`);case`ArrowDown`:return r(7,`slide-next`);case`Home`:return r(-((new Date(t.y,t.m,t.d).getDay()-this._firstDay()+7)%7),`slide-prev`,1);case`End`:return r(6-(new Date(t.y,t.m,t.d).getDay()-this._firstDay()+7)%7,`slide-next`,-1);case`PageUp`:{e.preventDefault();let r=K(t.y,t.m-(e.shiftKey?12:1));return n(r.y,r.m,Math.min(t.d,Ta(r.y,r.m)),-1,`slide-prev`)}case`PageDown`:{e.preventDefault();let r=K(t.y,t.m+(e.shiftKey?12:1));return n(r.y,r.m,Math.min(t.d,Ta(r.y,r.m)),1,`slide-next`)}case`Enter`:case` `:e.preventDefault(),this._limits().dayDisabled(t.y,t.m,t.d)||(this.value=Sa(t.y,t.m,t.d),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close());return;default:}}_wire(){this._teardown();let e=this.querySelector(`.datepicker-trigger`),t=this.querySelector(`.datepicker-pop`),n=this.querySelector(`.datepicker`);if(!e||!t)return;let r=()=>!t.hidden,i=()=>{r()&&this._position(e,t)};this._open=()=>{let r=new Date,a=G(this._value);(a||!this._viewNavigated)&&(this._viewY=r.getFullYear(),this._viewM=r.getMonth()),this._mode=`days`;let s=r.getFullYear()===this._viewY&&r.getMonth()===this._viewM,c=a&&a.y===this._viewY&&a.m===this._viewM;if(this._focus=c?a:{y:this._viewY,m:this._viewM,d:s?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),o(this,i),e.setAttribute(`aria-expanded`,`true`),t.querySelector(`[tabindex="0"]`)?.focus()},this._close=()=>{t.hidden=!0,n?.classList.remove(`open`),e.setAttribute(`aria-expanded`,`false`),s(this),e.focus()},e.addEventListener(`click`,()=>r()?this._close():this._open()),t.addEventListener(`click`,e=>{this._popClick=!0;let t=e.target.closest(`[data-nav]`);if(t){this._viewNavigated=!0,this._slide=Number(t.dataset.nav)<0?`slide-prev`:`slide-next`;let e=K(this._viewY,this._viewM+Number(t.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 n=e.target.closest(`[data-nav-year]`);if(n){this._viewY+=Number(n.dataset.navYear),this._renderView();return}let r=e.target.closest(`[data-nav-decade]`);if(r){this._viewY+=Number(r.dataset.navDecade)*10,this._renderView();return}let i=e.target.closest(`[data-view]`);if(i){this._mode=i.dataset.view,this._renderView();return}let a=e.target.closest(`[data-month]`);if(a&&!a.disabled){this._viewNavigated=!0,this._viewM=Number(a.dataset.month),this._mode=`days`,this._focus={y:this._viewY,m:this._viewM,d:1},this._renderView();return}let o=e.target.closest(`[data-year]`);if(o&&!o.disabled){this._viewNavigated=!0,this._viewY=Number(o.dataset.year),this._mode=`months`,this._renderView();return}if(e.target.closest(`[data-today]`)){let e=new Date;if(this._limits().dayDisabled(e.getFullYear(),e.getMonth(),e.getDate()))return;this.value=Sa(e.getFullYear(),e.getMonth(),e.getDate()),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close();return}if(e.target.closest(`[data-clear]`)){this.value=``,this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close();return}let s=e.target.closest(`.datepicker-day[data-iso]`);s&&!s.disabled&&(this.value=s.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=>{let t=this._popClick;this._popClick=!1,r()&&!t&&!this.contains(e.target)&&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()&&o(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),s(this)}disconnectedCallback(){this._teardown()}},Da=`Asia/Kolkata`,Oa=3,ka=[`today`,`last7Days`,`thisMonth`,`lastMonth`,`thisFinancialYear`],Aa={today:`Today`,last7Days:`Last 7 days`,thisMonth:`This month`,lastMonth:`Last month`,thisFinancialYear:`This financial year`},ja=e=>String(e).padStart(2,`0`),Ma=e=>`${e.getUTCFullYear()}-${ja(e.getUTCMonth()+1)}-${ja(e.getUTCDate())}`;function Na(e=new Date){let t=new Intl.DateTimeFormat(`en-US`,{timeZone:Da,year:`numeric`,month:`2-digit`,day:`2-digit`}).formatToParts(e),n=e=>t.find(t=>t.type===e).value;return`${n(`year`)}-${n(`month`)}-${n(`day`)}`}function Pa(e,t=new Date){let{y:n,m:r,d:i}=G(Na(t)),a=(e,t,n)=>Ma(new Date(Date.UTC(e,t,n))),o=Aa[e];switch(e){case`today`:return{label:o,start:a(n,r,i),end:a(n,r,i)};case`last7Days`:return{label:o,start:a(n,r,i-6),end:a(n,r,i)};case`thisMonth`:return{label:o,start:a(n,r,1),end:a(n,r+1,0)};case`lastMonth`:return{label:o,start:a(n,r-1,1),end:a(n,r,0)};case`thisFinancialYear`:{let e=r>=Oa?n:n-1;return{label:o,start:a(e,Oa,1),end:a(e+1,Oa,0)}}default:return null}}function Fa(e){console.warn(`[@webority/ui-elements] <wui-date-range> presets: ${e}`)}function Ia(e,t=new Date){let n=String(e??``).trim();if(!n)return[];let r;if(n.startsWith(`[`))try{r=JSON.parse(n)}catch{return Fa(`the attribute is not valid JSON`),[]}else r=n.split(`,`).map(e=>e.trim());let i=[];for(let e of r)if(typeof e==`string`){let n=Pa(e,t);n?i.push(n):Fa(`"${e}" is not one of ${ka.join(`, `)}`)}else e&&typeof e.label==`string`&&e.label&&G(e.start)&&G(e.end)?i.push({label:e.label,start:e.start,end:e.end}):Fa(`an item needs a label and ISO start and end dates, or a preset name`);return i}var La=class extends c{static formAssociated=!0;static get observedAttributes(){return[`start`,`end`,`min`,`max`,`placeholder`,`disabled`,`first-day`,`size`,`aria-label`,`aria-describedby`,`name`,`start-name`,`end-name`,`presets`,`aria-invalid`]}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._start=``,this._end=``,this._hover=``;let e=new Date(2e3,0,1);this._viewY=e.getFullYear(),this._viewM=e.getMonth()}connectedCallback(){if(!this._rendered){this.render();return}this._bindGlobal?.()}attributeChangedCallback(e,t,n){if(e===`aria-invalid`){this._syncInvalid();return}this._rendered&&(e===`start`||e===`end`?(this._start=this.getAttribute(`start`)||``,this._end=this.getAttribute(`end`)||``,this._syncTrigger(),this._syncMirrors()):this.render())}_syncInvalid(){let e=this.querySelector(`.daterange-trigger`);e&&(this.hasAttribute(`aria-invalid`)?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}get value(){return{start:this._start,end:this._end}}set value(e){this._start=e?.start||``,this._end=e?.end||``,this._syncTrigger(),this._syncMirrors()}_firstDay(){return ba(this)}_label(){let e=this.getAttribute(`placeholder`)||`Start to End`;return!this._start&&!this._end?{text:e,empty:!0}:{text:`${wa(this._start)||`Start`} to ${wa(this._end)||`End`}`,empty:!1}}render(){this._defaultStart===void 0&&(this._defaultStart=this.getAttribute(`start`)||``,this._defaultEnd=this.getAttribute(`end`)||``,this._start=this._defaultStart||this._start,this._end=this._defaultEnd||this._end);let e=G(this._start);e&&(this._viewY=e.y,this._viewM=e.m);let t=this.getAttribute(`size`),n=t===`sm`?` input-sm`:t===`lg`?` input-lg`:``,{text:r,empty:i}=this._label(),a=this.getAttribute(`aria-label`),o=this.getAttribute(`aria-describedby`);this.innerHTML=`
293
+ <div class="datepicker-cells">${i}</div>`}_focusActive(){let e=this.querySelector(`.datepicker-pop`),t=e?.querySelector(`[tabindex="0"]`)||e?.querySelector(`.is-selected`)||e?.querySelector(`.datepicker-day:not(:disabled), .datepicker-cell:not(:disabled)`);t&&e.contains(document.activeElement)&&t.focus()}_position(e,t){a(e,t,{clampHeight:!0})}_setFocus(e,t,n,r){let{y:i,m:a}=J(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=``,this.querySelector(`.datepicker-day[data-iso="${Qa(i,a,n)}"]`)?.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||q(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`:return r(-1,`slide-prev`);case`ArrowRight`:return r(1,`slide-next`);case`ArrowUp`:return r(-7,`slide-prev`);case`ArrowDown`:return r(7,`slide-next`);case`Home`:return r(-((new Date(t.y,t.m,t.d).getDay()-this._firstDay()+7)%7),`slide-prev`,1);case`End`:return r(6-(new Date(t.y,t.m,t.d).getDay()-this._firstDay()+7)%7,`slide-next`,-1);case`PageUp`:{e.preventDefault();let r=J(t.y,t.m-(e.shiftKey?12:1));return n(r.y,r.m,Math.min(t.d,to(r.y,r.m)),-1,`slide-prev`)}case`PageDown`:{e.preventDefault();let r=J(t.y,t.m+(e.shiftKey?12:1));return n(r.y,r.m,Math.min(t.d,to(r.y,r.m)),1,`slide-next`)}case`Enter`:case` `:e.preventDefault(),this._limits().dayDisabled(t.y,t.m,t.d)||(this.value=Qa(t.y,t.m,t.d),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close());return;default:}}_wire(){this._teardown();let e=this.querySelector(`.datepicker-trigger`),t=this.querySelector(`.datepicker-pop`),n=this.querySelector(`.datepicker`);if(!e||!t)return;let r=()=>!t.hidden,i=()=>{r()&&this._position(e,t)};this._open=()=>{let r=new Date,a=q(this._value);(a||!this._viewNavigated)&&(this._viewY=r.getFullYear(),this._viewM=r.getMonth()),this._mode=`days`;let s=r.getFullYear()===this._viewY&&r.getMonth()===this._viewM,c=a&&a.y===this._viewY&&a.m===this._viewM;if(this._focus=c?a:{y:this._viewY,m:this._viewM,d:s?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),o(this,i),e.setAttribute(`aria-expanded`,`true`),t.querySelector(`[tabindex="0"]`)?.focus()},this._close=()=>{t.hidden=!0,n?.classList.remove(`open`),e.setAttribute(`aria-expanded`,`false`),s(this),e.focus()},e.addEventListener(`click`,()=>r()?this._close():this._open()),t.addEventListener(`click`,e=>{this._popClick=!0;let t=e.target.closest(`[data-nav]`);if(t){this._viewNavigated=!0,this._slide=Number(t.dataset.nav)<0?`slide-prev`:`slide-next`;let e=J(this._viewY,this._viewM+Number(t.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 n=e.target.closest(`[data-nav-year]`);if(n){this._viewY+=Number(n.dataset.navYear),this._renderView();return}let r=e.target.closest(`[data-nav-decade]`);if(r){this._viewY+=Number(r.dataset.navDecade)*10,this._renderView();return}let i=e.target.closest(`[data-view]`);if(i){this._mode=i.dataset.view,this._renderView();return}let a=e.target.closest(`[data-month]`);if(a&&!a.disabled){this._viewNavigated=!0,this._viewM=Number(a.dataset.month),this._mode=`days`,this._focus={y:this._viewY,m:this._viewM,d:1},this._renderView();return}let o=e.target.closest(`[data-year]`);if(o&&!o.disabled){this._viewNavigated=!0,this._viewY=Number(o.dataset.year),this._mode=`months`,this._renderView();return}if(e.target.closest(`[data-today]`)){let e=new Date;if(this._limits().dayDisabled(e.getFullYear(),e.getMonth(),e.getDate()))return;this.value=Qa(e.getFullYear(),e.getMonth(),e.getDate()),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close();return}if(e.target.closest(`[data-clear]`)){this.value=``,this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close();return}let s=e.target.closest(`.datepicker-day[data-iso]`);s&&!s.disabled&&(this.value=s.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=>{let t=this._popClick;this._popClick=!1,r()&&!t&&!this.contains(e.target)&&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()&&o(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),s(this)}disconnectedCallback(){this._teardown()}},ro=`Asia/Kolkata`,io=3,ao=[`today`,`yesterday`,`last7Days`,`last30Days`,`thisMonth`,`lastMonth`,`thisFinancialYear`],oo={today:`Today`,yesterday:`Yesterday`,last7Days:`Last 7 days`,last30Days:`Last 30 days`,thisMonth:`This month`,lastMonth:`Last month`,thisFinancialYear:`This financial year`},so=e=>String(e).padStart(2,`0`),co=e=>`${e.getUTCFullYear()}-${so(e.getUTCMonth()+1)}-${so(e.getUTCDate())}`;function lo(e=new Date){let t=new Intl.DateTimeFormat(`en-US`,{timeZone:ro,year:`numeric`,month:`2-digit`,day:`2-digit`}).formatToParts(e),n=e=>t.find(t=>t.type===e).value;return`${n(`year`)}-${n(`month`)}-${n(`day`)}`}function uo(e,t=new Date){let{y:n,m:r,d:i}=q(lo(t)),a=(e,t,n)=>co(new Date(Date.UTC(e,t,n))),o=oo[e];switch(e){case`today`:return{label:o,start:a(n,r,i),end:a(n,r,i)};case`yesterday`:return{label:o,start:a(n,r,i-1),end:a(n,r,i-1)};case`last7Days`:return{label:o,start:a(n,r,i-6),end:a(n,r,i)};case`last30Days`:return{label:o,start:a(n,r,i-29),end:a(n,r,i)};case`thisMonth`:return{label:o,start:a(n,r,1),end:a(n,r+1,0)};case`lastMonth`:return{label:o,start:a(n,r-1,1),end:a(n,r,0)};case`thisFinancialYear`:{let e=r>=io?n:n-1;return{label:o,start:a(e,io,1),end:a(e+1,io,0)}}default:return null}}function fo(e){console.warn(`[@webority/ui-elements] <wui-date-range> presets: ${e}`)}function po(e,t=new Date){let n=String(e??``).trim();if(!n)return[];let r;if(n.startsWith(`[`))try{r=JSON.parse(n)}catch{return fo(`the attribute is not valid JSON`),[]}else r=n.split(`,`).map(e=>e.trim());let i=[];for(let e of r)if(typeof e==`string`){let n=uo(e,t);n?i.push(n):fo(`"${e}" is not one of ${ao.join(`, `)}`)}else e&&typeof e.label==`string`&&e.label&&q(e.start)&&q(e.end)?i.push({label:e.label,start:e.start,end:e.end}):fo(`an item needs a label and ISO start and end dates, or a preset name`);return i}var mo=class extends c{static formAssociated=!0;static get observedAttributes(){return[`start`,`end`,`min`,`max`,`placeholder`,`disabled`,`first-day`,`size`,`aria-label`,`aria-describedby`,`name`,`start-name`,`end-name`,`presets`,`aria-invalid`]}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._start=``,this._end=``,this._hover=``;let e=new Date(2e3,0,1);this._viewY=e.getFullYear(),this._viewM=e.getMonth()}connectedCallback(){if(!this._rendered){this.render();return}this._bindGlobal?.()}attributeChangedCallback(e,t,n){if(e===`aria-invalid`){this._syncInvalid();return}this._rendered&&(e===`start`||e===`end`?(this._start=this.getAttribute(`start`)||``,this._end=this.getAttribute(`end`)||``,this._syncTrigger(),this._syncMirrors()):this.render())}_syncInvalid(){let e=this.querySelector(`.daterange-trigger`);e&&(this.hasAttribute(`aria-invalid`)?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}get value(){return{start:this._start,end:this._end}}set value(e){this._start=e?.start||``,this._end=e?.end||``,this._syncTrigger(),this._syncMirrors()}_firstDay(){return Xa(this)}_label(){let e=this.getAttribute(`placeholder`)||`Start to End`;return!this._start&&!this._end?{text:e,empty:!0}:{text:`${eo(this._start)||`Start`} to ${eo(this._end)||`End`}`,empty:!1}}render(){this._defaultStart===void 0&&(this._defaultStart=this.getAttribute(`start`)||``,this._defaultEnd=this.getAttribute(`end`)||``,this._start=this._defaultStart||this._start,this._end=this._defaultEnd||this._end);let e=q(this._start);e&&(this._viewY=e.y,this._viewM=e.m);let t=this.getAttribute(`size`),n=t===`sm`?` input-sm`:t===`lg`?` input-lg`:``,{text:r,empty:i}=this._label(),a=this.getAttribute(`aria-label`),o=this.getAttribute(`aria-describedby`);this.innerHTML=`
294
294
  <div class="daterange">
295
- <button type="button" class="input daterange-trigger${n}${i?``:` has-value`}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute(`aria-invalid`)?` aria-invalid="true"`:``}${this.hasAttribute(`disabled`)?` disabled`:``}${a?` aria-label="${z(a)}"`:``}${o?` aria-describedby="${z(o)}"`:``}>
296
- <span data-range-label class="${i?`search-select-placeholder`:``}">${z(r)}</span>
297
- ${R(`calendar`)}
295
+ <button type="button" class="input daterange-trigger${n}${i?``:` has-value`}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute(`aria-invalid`)?` aria-invalid="true"`:``}${this.hasAttribute(`disabled`)?` disabled`:``}${a?` aria-label="${H(a)}"`:``}${o?` aria-describedby="${H(o)}"`:``}>
296
+ <span data-range-label class="${i?`search-select-placeholder`:``}">${H(r)}</span>
297
+ ${M(`calendar`)}
298
298
  </button>
299
299
  <div class="daterange-pop" role="dialog" aria-modal="false" hidden></div>
300
- </div>`,this._rendered=!0,this._syncMirrors(),this._wire()}formResetCallback(){this.value={start:this._defaultStart||``,end:this._defaultEnd||``}}_syncTrigger(){let e=this.querySelector(`.daterange-trigger`),t=this.querySelector(`[data-range-label]`);if(!t)return;let{text:n,empty:r}=this._label();t.textContent=n,t.classList.toggle(`search-select-placeholder`,r),e?.classList.toggle(`has-value`,!r)}_syncMirrors(){let e=this.getAttribute(`start-name`)||this.getAttribute(`name`),t=this.getAttribute(`end-name`);this._mirror(`start`,e,this._start),this._mirror(`end`,t,this._end)}_mirror(e,t,n){if(!t)return;let r=this.querySelector(`input[type="hidden"][data-range-mirror="${e}"]`);r||(r=document.createElement(`input`),r.type=`hidden`,r.setAttribute(`data-range-mirror`,e),this.appendChild(r)),r.name=t,r.value=n||``,r.disabled=this.hasAttribute(`disabled`)}_limits(){let e=G(this.getAttribute(`min`)),t=G(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;return(e,t,i)=>{let a=new Date(e,t,i).getTime();return a<n||a>r}}_monthHtml(e,t){let n=this._firstDay(),r=(new Date(e,t,1).getDay()-n+7)%7,i=Ta(e,t),a=this._limits(),o=va.map((e,t)=>va[(t+n)%7]).map(e=>`<span>${e}</span>`).join(``),s=(e,t,n,r)=>{let i=Sa(e,t,n),o=a(e,t,n);return`<button type="button" class="${[`datepicker-day`,r?`is-outside`:``].filter(Boolean).join(` `)}" data-iso="${i}"${o?` disabled`:``}>${n}</button>`},c=``,l=K(e,t-1),u=Ta(l.y,l.m);for(let e=r-1;e>=0;e--)c+=s(l.y,l.m,u-e,!0);for(let n=1;n<=i;n++)c+=s(e,t,n,!1);let d=K(e,t+1),f=(7-(r+i)%7)%7;for(let e=1;e<=f;e++)c+=s(d.y,d.m,e,!0);return`
300
+ </div>`,this._rendered=!0,this._syncMirrors(),this._wire()}formResetCallback(){this.value={start:this._defaultStart||``,end:this._defaultEnd||``}}_syncTrigger(){let e=this.querySelector(`.daterange-trigger`),t=this.querySelector(`[data-range-label]`);if(!t)return;let{text:n,empty:r}=this._label();t.textContent=n,t.classList.toggle(`search-select-placeholder`,r),e?.classList.toggle(`has-value`,!r)}_syncMirrors(){let e=this.getAttribute(`start-name`)||this.getAttribute(`name`),t=this.getAttribute(`end-name`);this._mirror(`start`,e,this._start),this._mirror(`end`,t,this._end)}_mirror(e,t,n){if(!t)return;let r=this.querySelector(`input[type="hidden"][data-range-mirror="${e}"]`);r||(r=document.createElement(`input`),r.type=`hidden`,r.setAttribute(`data-range-mirror`,e),this.appendChild(r)),r.name=t,r.value=n||``,r.disabled=this.hasAttribute(`disabled`)}_limits(){let e=q(this.getAttribute(`min`)),t=q(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;return(e,t,i)=>{let a=new Date(e,t,i).getTime();return a<n||a>r}}_monthHtml(e,t){let n=this._firstDay(),r=(new Date(e,t,1).getDay()-n+7)%7,i=to(e,t),a=this._limits(),o=Ja.map((e,t)=>Ja[(t+n)%7]).map(e=>`<span>${e}</span>`).join(``),s=(e,t,n,r)=>{let i=Qa(e,t,n),o=a(e,t,n);return`<button type="button" class="${[`datepicker-day`,r?`is-outside`:``].filter(Boolean).join(` `)}" data-iso="${i}"${o?` disabled`:``}>${n}</button>`},c=``,l=J(e,t-1),u=to(l.y,l.m);for(let e=r-1;e>=0;e--)c+=s(l.y,l.m,u-e,!0);for(let n=1;n<=i;n++)c+=s(e,t,n,!1);let d=J(e,t+1),f=(7-(r+i)%7)%7;for(let e=1;e<=f;e++)c+=s(d.y,d.m,e,!0);return`
301
301
  <div class="daterange-cal">
302
- <div class="datepicker-month-label">${_a[t]} ${e}</div>
302
+ <div class="datepicker-month-label">${qa[t]} ${e}</div>
303
303
  <div class="datepicker-weekdays">${o}</div>
304
304
  <div class="datepicker-grid" role="grid">${c}</div>
305
- </div>`}_presetsHtml(){if(!this._presetList?.length)return``;let e=this._limits(),t=t=>{let n=G(t);return e(n.y,n.m,n.d)};return`<div class="wui-daterange-presets" role="group" aria-label="Quick ranges">${this._presetList.map((e,n)=>`<button type="button" class="wui-daterange-preset" data-preset="${n}"${t(e.start)||t(e.end)?` disabled`:``}>${z(e.label)}</button>`).join(``)}</div>`}_renderView(){let e=this.querySelector(`.daterange-pop`);if(!e)return;let t=K(this._viewY,this._viewM+1),n=this._presetsHtml(),r=`
305
+ </div>`}_presetsHtml(){if(!this._presetList?.length)return``;let e=this._limits(),t=t=>{let n=q(t);return e(n.y,n.m,n.d)};return`<div class="wui-daterange-presets" role="group" aria-label="Quick ranges">${this._presetList.map((e,n)=>`<button type="button" class="wui-daterange-preset" data-preset="${n}"${t(e.start)||t(e.end)?` disabled`:``}>${H(e.label)}</button>`).join(``)}</div>`}_renderView(){let e=this.querySelector(`.daterange-pop`);if(!e)return;let t=J(this._viewY,this._viewM+1),n=this._presetsHtml(),r=`
306
306
  <div class="daterange-head">
307
- <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${R(`chevron-left`)}</button>
308
- <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${R(`chevron-right`)}</button>
307
+ <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${M(`chevron-left`)}</button>
308
+ <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${M(`chevron-right`)}</button>
309
309
  </div>
310
310
  <div class="daterange-cals">
311
311
  ${this._monthHtml(this._viewY,this._viewM)}
@@ -314,48 +314,48 @@ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{
314
314
  <div class="datepicker-foot">
315
315
  <span class="daterange-hint" data-range-hint></span>
316
316
  <button type="button" class="datepicker-link" data-clear>Clear</button>
317
- </div>`;e.classList.toggle(`wui-daterange-pop--presets`,n!==``),e.innerHTML=n?`${n}<div class="wui-daterange-main">${r}</div>`:r,this._paint()}_paint(){let e=this.querySelector(`.daterange-pop`);if(!e)return;let t=this._start?new Date(this._start).getTime():null,n=this._end;t&&!this._end&&this._hover&&new Date(this._hover).getTime()>=t&&(n=this._hover);let r=n?new Date(n).getTime():null;for(let n of e.querySelectorAll(`.datepicker-day[data-iso]`)){let e=new Date(n.dataset.iso).getTime(),i=t!=null&&e===t,a=r!=null&&e===r,o=t!=null&&r!=null&&e>t&&e<r;n.classList.toggle(`is-range-start`,i),n.classList.toggle(`is-range-end`,a),n.classList.toggle(`in-range`,o)}e.querySelectorAll(`[data-preset]`).forEach(e=>{let t=this._presetList?.[Number(e.dataset.preset)],n=!!t&&t.start===this._start&&t.end===this._end;e.classList.toggle(`is-active`,n),e.setAttribute(`aria-pressed`,String(n))});let i=e.querySelector(`[data-range-hint]`);i&&(i.textContent=this._start?this._end?`${wa(this._start)} to ${wa(this._end)}`:`Pick an end date`:`Pick a start date`)}_position(e,t){a(e,t,{clampHeight:!0})}_pick(e){if(!this._start||this._start&&this._end){this._start=e,this._end=``,this._hover=``,this._syncTrigger(),this._syncMirrors(),this._paint();return}if(new Date(e).getTime()<new Date(this._start).getTime()){this._start=e,this._syncTrigger(),this._syncMirrors(),this._paint(),this.dispatchEvent(new Event(`change`,{bubbles:!0}));return}this._end=e,this._syncTrigger(),this._syncMirrors(),this._paint(),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close()}_applyPreset({start:e,end:t}){this._start=e,this._end=t,this._hover=``,this._syncTrigger(),this._syncMirrors(),this._paint(),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close()}_wire(){this._teardown();let e=this.querySelector(`.daterange-trigger`),t=this.querySelector(`.daterange-pop`),n=this.querySelector(`.daterange`);if(!e||!t)return;let r=()=>!t.hidden,i=()=>{r()&&this._position(e,t)};this._open=()=>{let r=G(this._start);if(r)this._viewY=r.y,this._viewM=r.m;else{let e=new Date;this._viewY=e.getFullYear(),this._viewM=e.getMonth()}this._presetList=Ia(this.getAttribute(`presets`)),this._renderView(),t.hidden=!1,n?.classList.add(`open`),this._position(e,t),o(this,i),e.setAttribute(`aria-expanded`,`true`)},this._close=()=>{t.hidden=!0,this._hover=``,n?.classList.remove(`open`),e.setAttribute(`aria-expanded`,`false`),s(this)},e.addEventListener(`click`,()=>r()?this._close():this._open()),t.addEventListener(`click`,e=>{this._popClick=!0;let t=e.target.closest(`[data-nav]`);if(t){let e=K(this._viewY,this._viewM+Number(t.dataset.nav));this._viewY=e.y,this._viewM=e.m,this._renderView();return}if(e.target.closest(`[data-clear]`)){this._start=``,this._end=``,this._hover=``,this._syncTrigger(),this._syncMirrors(),this._renderView(),this.dispatchEvent(new Event(`change`,{bubbles:!0}));return}let n=e.target.closest(`[data-preset]`);if(n&&!n.disabled){let e=this._presetList?.[Number(n.dataset.preset)];e&&this._applyPreset(e);return}let r=e.target.closest(`.datepicker-day[data-iso]`);r&&!r.disabled&&this._pick(r.dataset.iso)}),t.addEventListener(`mouseover`,e=>{let t=e.target.closest(`.datepicker-day[data-iso]`);t&&this._start&&!this._end&&(this._hover=t.dataset.iso,this._paint())}),this._bindGlobal=()=>{this._teardown(),this._onDocClick=e=>{let t=this._popClick;this._popClick=!1,r()&&!t&&!this.contains(e.target)&&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()&&o(this,i)},this._bindGlobal(),this._syncMirrors()}_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),s(this)}disconnectedCallback(){this._teardown()}},Ra=class extends c{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 za(this.getAttribute(`max-scale`),1.6)}_radius(){return za(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=n.getBoundingClientRect(),i=Math.abs(this._pointerX-(r.left+r.width/2)),a=Math.max(0,1-i/t),o=1+(e-1)*a;n.style.setProperty(`--wui-dock-mag`,o.toFixed(3))}}_resetMagnification(){this._frame&&=(cancelAnimationFrame(this._frame),0);for(let e of this.querySelectorAll(`.dock-item`))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()}},za=(e,t)=>{let n=Number.parseFloat(e);return Number.isFinite(n)?n:t},Ba=[50,90],Va=10,Ha=100;function Ua(e,t=Ba){let n=Array.isArray(e)?e:String(e??``).split(`,`),r=[];for(let e of n){if(typeof e==`string`&&e.trim()===``)return t;let n=Number(e);if(!Number.isFinite(n)||n<Va||n>Ha)return t;r.includes(n)||r.push(n)}return r.length?r.sort((e,t)=>e-t):t}function Wa({points:e,index:t,visible:n,velocity:r,canDismiss:i}){let a=i?-1:0;if(Math.abs(r)>=.5)return r>0?Math.max(t-1,a):Math.min(t+1,e.length-1);if(i&&n<e[0]/2)return-1;let o=0;for(let t=1;t<e.length;t++)Math.abs(e[t]-n)<Math.abs(e[o]-n)&&(o=t);return o}var Ga=`(max-width: 767.98px)`,Ka=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,qa=4,Ja=0,Ya=new WeakSet;function Xa(e){Ya.has(e)||(Ya.add(e),e.addEventListener(`click`,t=>{let n=t.target?.closest?.(`[data-wui-drawer-open]`);if(!n)return;let r=n.getAttribute(`data-wui-drawer-open`).replace(/^#/,``),i=e.getElementById(r);typeof i?.show==`function`&&(t.preventDefault(),i.show(n))}))}var Za=class extends c{static get observedAttributes(){return[`open`,`snap-points`]}constructor(){super(),this._doc=null,this._media=null,this._shown=!1,this._locked=!1,this._opener=null,this._snap=0,this._drag=null,this._onMedia=()=>this._syncMode(),this._onClick=e=>this._click(e),this._onPointerDown=e=>this._pointerDown(e),this._onPointerMove=e=>this._pointerMove(e),this._onPointerUp=e=>this._pointerUp(e),this._onKeyDown=e=>this._keyDown(e),this._onHostKey=e=>{e.key===`Escape`&&this._keyDown(e)}}connectedCallback(){this._doc=this.ownerDocument,Xa(this._doc),this.addEventListener(`click`,this._onClick),this.addEventListener(`pointerdown`,this._onPointerDown),this._media=typeof matchMedia==`function`?matchMedia(Ga):null,this._media?.addEventListener?.(`change`,this._onMedia),this._syncMode(),this._applyPoints(),this.hasAttribute(`open`)?this._open():this.setAttribute(`inert`,``)}disconnectedCallback(){this._endDrag(),this._shown&&this._release(),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`pointerdown`,this._onPointerDown),this._media?.removeEventListener?.(`change`,this._onMedia),this._media=null,this._doc=null}attributeChangedCallback(e){this._doc&&(e===`open`?this.hasAttribute(`open`)?this._open():this._close():(this._snap=Math.min(this._snap,this._points().length-1),this._applyPoints()))}get isOpen(){return this.hasAttribute(`open`)}show(e){e&&(this._opener=e),this.setAttribute(`open`,``)}hide(){this.removeAttribute(`open`)}_points(){return Ua(this.getAttribute(`snap-points`),Ba)}_sheet(){return!!this._media?.matches}_syncMode(){this.setAttribute(`data-mode`,this._sheet()?`sheet`:`side`)}_applyPoints(){let e=this._points();this._snap=Math.min(Math.max(this._snap,0),e.length-1),this.style.setProperty(`--wui-drawer-max`,String(e[e.length-1])),this.style.setProperty(`--wui-drawer-snap`,String(e[this._snap])),this.setAttribute(`data-snap`,String(this._snap));let t=this.querySelector(`.wui-drawer-handle`);if(!t)return;let n=e[this._snap];t.setAttribute(`aria-valuemin`,String(e[0])),t.setAttribute(`aria-valuemax`,String(e[e.length-1])),t.setAttribute(`aria-valuenow`,String(n)),t.setAttribute(`aria-valuetext`,`${n}% of the screen`)}_setSnap(e){let t=this._points(),n=Math.min(Math.max(e,0),t.length-1),r=n!==this._snap;this._snap=n,this._applyPoints(),r&&this.dispatchEvent(new CustomEvent(`wui-drawer-snap`,{bubbles:!0,detail:{index:n,percent:t[n]}}))}_open(){if(this._shown)return;this._shown=!0;let e=this._doc;this._opener??=e.activeElement;let t=Number.parseInt(this.getAttribute(`default-snap`)??`0`,10);this._snap=Number.isFinite(t)?t:0,this._syncMode(),this._applyPoints(),this.removeAttribute(`inert`),this._locked||(this._locked=!0,Ja++,e.body.classList.add(`wui-drawer-locked`)),e.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`keydown`,this._onHostKey),this._focusIn()}_close(){if(!this._shown)return;this._endDrag(),this.setAttribute(`inert`,``);let e=this._doc,t=this._opener,n=e.activeElement;this._release(),this._opener=null,t?.isConnected&&(n===e.body||this.contains(n))&&t.focus?.()}_release(){this._shown=!1,this._doc?.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`keydown`,this._onHostKey),this._locked&&(this._locked=!1,Ja--,Ja<=0&&(Ja=0,this._doc?.body.classList.remove(`wui-drawer-locked`)))}_panel(){return this.querySelector(`.wui-drawer-panel`)}_focusables(){let e=this._panel();return e?Array.from(e.querySelectorAll(Ka)).filter(e=>!e.closest(`[hidden],[inert]`)):[]}_focusIn(){let e=this._panel();if(!e)return;let t=e.querySelector(`[data-autofocus]`),n=this._sheet()?null:this._focusables().find(e=>e.closest(`.wui-drawer-body`));(t||n||e).focus?.()}_requestClose(){let e=this.dispatchEvent(new CustomEvent(`wui-drawer-close`,{bubbles:!0,cancelable:!0}));return e&&this.hide(),e}_click(e){if(!this.isOpen)return;let t=e.target;(t.closest?.(`[data-wui-drawer-close]`)||t.closest?.(`[data-wui-drawer-backdrop]`)&&!this.hasAttribute(`static`))&&this._requestClose()}_keyDown(e){if(e.key===`Escape`){if(e.defaultPrevented||this.hasAttribute(`static`))return;e.preventDefault(),e.stopPropagation(),this._requestClose();return}if(e.key===`Tab`){this._trapTab(e);return}e.target?.closest?.(`.wui-drawer-handle`)&&this._sheet()&&this._handleKey(e)}_trapTab(e){let t=this._focusables(),n=this._panel();if(!t.length){e.preventDefault(),n?.focus?.();return}let r=t[0],i=t[t.length-1],a=this._doc.activeElement;!n?.contains(a)||a===n?(e.preventDefault(),(e.shiftKey?i:r).focus()):e.shiftKey&&a===r?(e.preventDefault(),i.focus()):!e.shiftKey&&a===i&&(e.preventDefault(),r.focus())}_handleKey(e){let t=this._points().length-1,n={ArrowUp:this._snap+1,ArrowDown:this._snap-1,Home:0,End:t};e.key in n&&(e.preventDefault(),this._setSnap(n[e.key]))}_pointerDown(e){if(!this.isOpen||!this._sheet()||(e.button??0)!==0)return;let t=e.target?.closest?.(`[data-wui-drawer-grip]`);!t||e.target.closest(`button`)||(this._drag={grip:t,id:e.pointerId,startY:e.clientY,lastY:e.clientY,lastT:e.timeStamp,velocity:0,moved:!1},t.setPointerCapture?.(e.pointerId),t.addEventListener(`pointermove`,this._onPointerMove),t.addEventListener(`pointerup`,this._onPointerUp),t.addEventListener(`pointercancel`,this._onPointerUp))}_viewport(){return this._doc.defaultView.innerHeight}_pointerMove(e){let t=this._drag;if(!t||e.pointerId!==t.id)return;let n=e.clientY-t.startY;if(!t.moved&&Math.abs(n)<qa)return;t.moved=!0,this.classList.add(`is-dragging`);let r=e.timeStamp-t.lastT;r>0&&(t.velocity=(e.clientY-t.lastY)/r),t.lastY=e.clientY,t.lastT=e.timeStamp;let i=this._points(),a=(i[i.length-1]-i[this._snap])/100*this._viewport();t.offset=Math.max(n,-a),this.style.setProperty(`--wui-drawer-drag`,`${t.offset}px`)}_pointerUp(e){let t=this._drag;if(!t||e.pointerId!==t.id)return;let{moved:n,velocity:r,offset:i=0}=t;if(this._endDrag(),!n)return;let a=this._points(),o=this._viewport(),s=(a[this._snap]/100*o-i)/(o/100),c=!this.hasAttribute(`static`),l=Wa({points:a,index:this._snap,visible:s,velocity:r,canDismiss:c});l>=0?this._setSnap(l):this._requestClose()}_endDrag(){let e=this._drag;e&&(this._drag=null,e.grip.releasePointerCapture?.(e.id),e.grip.removeEventListener(`pointermove`,this._onPointerMove),e.grip.removeEventListener(`pointerup`,this._onPointerUp),e.grip.removeEventListener(`pointercancel`,this._onPointerUp),this.classList.remove(`is-dragging`),this.style.removeProperty(`--wui-drawer-drag`))}},Qa=300,$a=150,eo=`.wui-hover-card-trigger`,to=`.wui-hover-card-panel`,no=`a[href],button,input,select,textarea,[tabindex]`,ro=0,io=class extends c{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)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)}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),s(this),this._doc=null}get _trigger(){return this.querySelector(eo)}get _panel(){return this.querySelector(to)}get _anchor(){let e=this._trigger;return e?.querySelector(no)??e}_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}_schedule(e){if(this._clear(),this.isOpen===e)return;let t=e?this._delay(`open-delay`,Qa):this._delay(`close-delay`,$a);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(),o(this,()=>this._reposition()),this._doc?.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`keydown`,this._onKeyDown),this._describe(t)):(t.removeAttribute(`data-open`),s(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&&a(this._trigger,this._panel,{clampHeight:!0})}_describe(e){let t=this._anchor;t&&(e.id||=`wui-hover-card-${++ro}`,t.setAttribute(`aria-describedby`,e.id),this._described=t)}},ao=4096,oo=[.92,.8,.65,.5],so=.8,co=8;function lo(e){if(e==null||e===``||e===`free`)return null;let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)&&t>0?t:null}function uo(e,t,n){if(!n)return{x:0,y:0,w:e,h:t};let r=e,i=r/n;return i>t&&(i=t,r=i*n),{x:(e-r)/2,y:(t-i)/2,w:r,h:i}}function fo(e,t,n){return{...e,x:Math.min(Math.max(e.x,0),Math.max(t-e.w,0)),y:Math.min(Math.max(e.y,0),Math.max(n-e.h,0))}}function po(e,t,n,r,i){return fo({...e,x:e.x+t,y:e.y+n},r,i)}function mo(e,t){return Math.min(32,e,t)}function ho(e,t){return t.w/e.w}function go(e,t){return Math.max(4,ho(e,t))}function _o(e,t,n,r,i){let a=Math.min(Math.max(n,1),go(e,t)),o=e.h/e.w,s=Math.min(r,i/o),c=Math.min(Math.max(mo(r,i),mo(r,i)/o),s),l=Math.min(Math.max(t.w/a,c),s),u=l*o,d=e.x+e.w/2,f=e.y+e.h/2;return fo({x:d-l/2,y:f-u/2,w:l,h:u},r,i)}var vo=[`nw`,`ne`,`sw`,`se`];function yo(e,t,n,r,i,a){let o=mo(i,a),s=t.endsWith(`w`),c=t.startsWith(`n`),l=s?e.x+e.w:e.x,u=c?e.y+e.h:e.y,d=Math.min(Math.max(n,0),i),f=Math.min(Math.max(r,0),a);return d=s?Math.min(d,l-o):Math.max(d,l+o),f=c?Math.min(f,u-o):Math.max(f,u+o),{x:Math.min(d,l),y:Math.min(f,u),w:Math.abs(d-l),h:Math.abs(f-u)}}function bo(e,t=ao){let n=Math.min(1,t/Math.max(e.w,e.h));return{width:Math.max(1,Math.round(e.w*n)),height:Math.max(1,Math.round(e.h*n))}}function xo(e,t){let n=t/Math.max(e.w,e.h);return{width:Math.max(1,Math.round(e.w*n)),height:Math.max(1,Math.round(e.h*n))}}function So(e,t,n){return n%180==0?{w:e,h:t}:{w:t,h:e}}function Co(e,t,n){return fo({x:n-(e.y+e.h),y:e.x,w:e.h,h:e.w},n,t)}function wo(e){return String(e||``).split(/[\s,]+/).map(Number).filter(e=>Number.isInteger(e)&&e>0)}var To=[`image/png`,`image/jpeg`,`image/webp`],Eo={"image/png":`.png`,"image/jpeg":`.jpg`,"image/webp":`.webp`};function Do(e){let t=String(e||``).toLowerCase();return To.includes(t)?t:`image/png`}function Oo(e,t){let n=String(e||`image`),r=Eo[t];return(t===`image/jpeg`?/\.jpe?g$/i.test(n):n.toLowerCase().endsWith(r))?n:`${n.replace(/\.[^./\\]+$/,``)||`image`}${r}`}async function ko(e,{width:t,height:n,type:r,maxBytes:i}){let a=r,o=t,s=n,c=null;for(let t=0;t<=co;t++){let n=a===`image/png`?[void 0]:t===0?oo:[oo[1]];for(let t of n){if(c=await e(o,s,a,t),!c||(c.type&&c.type!==a&&(a=c.type),!(i>0)||c.size<=i))return c;if(a===`image/png`)break}o=Math.max(1,Math.round(o*so)),s=Math.max(1,Math.round(s*so))}return c}var Ao=.05,jo=.2,Mo={w:320,h:240},No={nw:`top left`,ne:`top right`,sw:`bottom left`,se:`bottom right`},Po=`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M5 12h14"/></svg>`,Fo=`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M5 12h14M12 5v14"/></svg>`,Io=`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/></svg>`,Lo=`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>`,Ro=(e,t)=>Math.hypot(e.x-t.x,e.y-t.y),zo=class extends c{static get observedAttributes(){return[`src`,`aspect`,`round`,`rotatable`,`previews`]}constructor(){super(),this._rect=null,this._base=null,this._natural=null,this._source=null,this._rotation=0,this._drag=null,this._pointers=new Map,this._pinch=null,this._previewPending=!1,this._resizeObserver=null}get src(){return this.getAttribute(`src`)||``}set src(e){e==null||e===``?this.removeAttribute(`src`):this.setAttribute(`src`,String(e))}get aspect(){return lo(this.getAttribute(`aspect`))}set aspect(e){e==null||e===``?this.removeAttribute(`aspect`):this.setAttribute(`aspect`,String(e))}get round(){return this.hasAttribute(`round`)}set round(e){this.toggleAttribute(`round`,!!e)}get rotatable(){return this.hasAttribute(`rotatable`)}set rotatable(e){this.toggleAttribute(`rotatable`,!!e)}get previews(){return this.getAttribute(`previews`)||``}set previews(e){e==null||e===``?this.removeAttribute(`previews`):this.setAttribute(`previews`,Array.isArray(e)?e.join(` `):String(e))}get rect(){return this._rect?{...this._rect}:null}get rotation(){return this._rotation}set rotation(e){if(!this._rect)return;let t=(Math.round(Number(e)/90)*90%360+360)%360;if(!Number.isNaN(t))for(;this._rotation!==t;)this.rotate()}get zoom(){return this._rect?ho(this._rect,this._base):1}set zoom(e){this._rect&&(this._rect=_o(this._rect,this._base,Number(e)||1,this._natural.w,this._natural.h),this._paint(),this._announce())}connectedCallback(){if(!this._rendered){this.render();return}this._observe()}disconnectedCallback(){this._resizeObserver?.disconnect(),this._resizeObserver=null}attributeChangedCallback(e){this._rendered&&(e===`src`?this._loadImage():e===`aspect`?(this._rebuildHandles(),this._resetRect()):e===`rotatable`?this._tools.hidden=!this.rotatable:e===`previews`?this._renderPreviews():this._applyRound())}render(){this.innerHTML=`<div>
317
+ </div>`;e.classList.toggle(`wui-daterange-pop--presets`,n!==``),e.innerHTML=n?`${n}<div class="wui-daterange-main">${r}</div>`:r,this._paint()}_paint(){let e=this.querySelector(`.daterange-pop`);if(!e)return;let t=this._start?new Date(this._start).getTime():null,n=this._end;t&&!this._end&&this._hover&&new Date(this._hover).getTime()>=t&&(n=this._hover);let r=n?new Date(n).getTime():null;for(let n of e.querySelectorAll(`.datepicker-day[data-iso]`)){let e=new Date(n.dataset.iso).getTime(),i=t!=null&&e===t,a=r!=null&&e===r,o=t!=null&&r!=null&&e>t&&e<r;n.classList.toggle(`is-range-start`,i),n.classList.toggle(`is-range-end`,a),n.classList.toggle(`in-range`,o)}e.querySelectorAll(`[data-preset]`).forEach(e=>{let t=this._presetList?.[Number(e.dataset.preset)],n=!!t&&t.start===this._start&&t.end===this._end;e.classList.toggle(`is-active`,n),e.setAttribute(`aria-pressed`,String(n))});let i=e.querySelector(`[data-range-hint]`);i&&(i.textContent=this._start?this._end?`${eo(this._start)} to ${eo(this._end)}`:`Pick an end date`:`Pick a start date`)}_position(e,t){a(e,t,{clampHeight:!0})}_pick(e){if(!this._start||this._start&&this._end){this._start=e,this._end=``,this._hover=``,this._syncTrigger(),this._syncMirrors(),this._paint();return}if(new Date(e).getTime()<new Date(this._start).getTime()){this._start=e,this._syncTrigger(),this._syncMirrors(),this._paint(),this.dispatchEvent(new Event(`change`,{bubbles:!0}));return}this._end=e,this._syncTrigger(),this._syncMirrors(),this._paint(),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close()}_applyPreset({start:e,end:t}){this._start=e,this._end=t,this._hover=``,this._syncTrigger(),this._syncMirrors(),this._paint(),this.dispatchEvent(new Event(`change`,{bubbles:!0})),this._close()}_wire(){this._teardown();let e=this.querySelector(`.daterange-trigger`),t=this.querySelector(`.daterange-pop`),n=this.querySelector(`.daterange`);if(!e||!t)return;let r=()=>!t.hidden,i=()=>{r()&&this._position(e,t)};this._open=()=>{let r=q(this._start);if(r)this._viewY=r.y,this._viewM=r.m;else{let e=new Date;this._viewY=e.getFullYear(),this._viewM=e.getMonth()}this._presetList=po(this.getAttribute(`presets`)),this._renderView(),t.hidden=!1,n?.classList.add(`open`),this._position(e,t),o(this,i),e.setAttribute(`aria-expanded`,`true`)},this._close=()=>{t.hidden=!0,this._hover=``,n?.classList.remove(`open`),e.setAttribute(`aria-expanded`,`false`),s(this)},e.addEventListener(`click`,()=>r()?this._close():this._open()),t.addEventListener(`click`,e=>{this._popClick=!0;let t=e.target.closest(`[data-nav]`);if(t){let e=J(this._viewY,this._viewM+Number(t.dataset.nav));this._viewY=e.y,this._viewM=e.m,this._renderView();return}if(e.target.closest(`[data-clear]`)){this._start=``,this._end=``,this._hover=``,this._syncTrigger(),this._syncMirrors(),this._renderView(),this.dispatchEvent(new Event(`change`,{bubbles:!0}));return}let n=e.target.closest(`[data-preset]`);if(n&&!n.disabled){let e=this._presetList?.[Number(n.dataset.preset)];e&&this._applyPreset(e);return}let r=e.target.closest(`.datepicker-day[data-iso]`);r&&!r.disabled&&this._pick(r.dataset.iso)}),t.addEventListener(`mouseover`,e=>{let t=e.target.closest(`.datepicker-day[data-iso]`);t&&this._start&&!this._end&&(this._hover=t.dataset.iso,this._paint())}),this._bindGlobal=()=>{this._teardown(),this._onDocClick=e=>{let t=this._popClick;this._popClick=!1,r()&&!t&&!this.contains(e.target)&&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()&&o(this,i)},this._bindGlobal(),this._syncMirrors()}_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),s(this)}disconnectedCallback(){this._teardown()}},ho=class extends c{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 go(this.getAttribute(`max-scale`),1.6)}_radius(){return go(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=n.getBoundingClientRect(),i=Math.abs(this._pointerX-(r.left+r.width/2)),a=Math.max(0,1-i/t),o=1+(e-1)*a;n.style.setProperty(`--wui-dock-mag`,o.toFixed(3))}}_resetMagnification(){this._frame&&=(cancelAnimationFrame(this._frame),0);for(let e of this.querySelectorAll(`.dock-item`))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()}},go=(e,t)=>{let n=Number.parseFloat(e);return Number.isFinite(n)?n:t},_o=[50,90],vo=10,yo=100;function bo(e,t=_o){let n=Array.isArray(e)?e:String(e??``).split(`,`),r=[];for(let e of n){if(typeof e==`string`&&e.trim()===``)return t;let n=Number(e);if(!Number.isFinite(n)||n<vo||n>yo)return t;r.includes(n)||r.push(n)}return r.length?r.sort((e,t)=>e-t):t}function xo({points:e,index:t,visible:n,velocity:r,canDismiss:i}){let a=i?-1:0;if(Math.abs(r)>=.5)return r>0?Math.max(t-1,a):Math.min(t+1,e.length-1);if(i&&n<e[0]/2)return-1;let o=0;for(let t=1;t<e.length;t++)Math.abs(e[t]-n)<Math.abs(e[o]-n)&&(o=t);return o}var So=`(max-width: 767.98px)`,Co=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,wo=4,To=0,Eo=new WeakSet;function Do(e){Eo.has(e)||(Eo.add(e),e.addEventListener(`click`,t=>{let n=t.target?.closest?.(`[data-wui-drawer-open]`);if(!n)return;let r=n.getAttribute(`data-wui-drawer-open`).replace(/^#/,``),i=e.getElementById(r);typeof i?.show==`function`&&(t.preventDefault(),i.show(n))}))}var Oo=class extends c{static get observedAttributes(){return[`open`,`snap-points`]}constructor(){super(),this._doc=null,this._media=null,this._shown=!1,this._locked=!1,this._opener=null,this._snap=0,this._drag=null,this._onMedia=()=>this._syncMode(),this._onClick=e=>this._click(e),this._onPointerDown=e=>this._pointerDown(e),this._onPointerMove=e=>this._pointerMove(e),this._onPointerUp=e=>this._pointerUp(e),this._onKeyDown=e=>this._keyDown(e),this._onHostKey=e=>{e.key===`Escape`&&this._keyDown(e)}}connectedCallback(){this._doc=this.ownerDocument,Do(this._doc),this.addEventListener(`click`,this._onClick),this.addEventListener(`pointerdown`,this._onPointerDown),this._media=typeof matchMedia==`function`?matchMedia(So):null,this._media?.addEventListener?.(`change`,this._onMedia),this._syncMode(),this._applyPoints(),this.hasAttribute(`open`)?this._open():this.setAttribute(`inert`,``)}disconnectedCallback(){this._endDrag(),this._shown&&this._release(),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`pointerdown`,this._onPointerDown),this._media?.removeEventListener?.(`change`,this._onMedia),this._media=null,this._doc=null}attributeChangedCallback(e){this._doc&&(e===`open`?this.hasAttribute(`open`)?this._open():this._close():(this._snap=Math.min(this._snap,this._points().length-1),this._applyPoints()))}get isOpen(){return this.hasAttribute(`open`)}show(e){e&&(this._opener=e),this.setAttribute(`open`,``)}hide(){this.removeAttribute(`open`)}_points(){return bo(this.getAttribute(`snap-points`),_o)}_sheet(){return!!this._media?.matches}_syncMode(){this.setAttribute(`data-mode`,this._sheet()?`sheet`:`side`)}_applyPoints(){let e=this._points();this._snap=Math.min(Math.max(this._snap,0),e.length-1),this.style.setProperty(`--wui-drawer-max`,String(e[e.length-1])),this.style.setProperty(`--wui-drawer-snap`,String(e[this._snap])),this.setAttribute(`data-snap`,String(this._snap));let t=this.querySelector(`.wui-drawer-handle`);if(!t)return;let n=e[this._snap];t.setAttribute(`aria-valuemin`,String(e[0])),t.setAttribute(`aria-valuemax`,String(e[e.length-1])),t.setAttribute(`aria-valuenow`,String(n)),t.setAttribute(`aria-valuetext`,`${n}% of the screen`)}_setSnap(e){let t=this._points(),n=Math.min(Math.max(e,0),t.length-1),r=n!==this._snap;this._snap=n,this._applyPoints(),r&&this.dispatchEvent(new CustomEvent(`wui-drawer-snap`,{bubbles:!0,detail:{index:n,percent:t[n]}}))}_open(){if(this._shown)return;this._shown=!0;let e=this._doc;this._opener??=e.activeElement;let t=Number.parseInt(this.getAttribute(`default-snap`)??`0`,10);this._snap=Number.isFinite(t)?t:0,this._syncMode(),this._applyPoints(),this.removeAttribute(`inert`),this._locked||(this._locked=!0,To++,e.body.classList.add(`wui-drawer-locked`)),e.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`keydown`,this._onHostKey),this._focusIn()}_close(){if(!this._shown)return;this._endDrag(),this.setAttribute(`inert`,``);let e=this._doc,t=this._opener,n=e.activeElement;this._release(),this._opener=null,t?.isConnected&&(n===e.body||this.contains(n))&&t.focus?.()}_release(){this._shown=!1,this._doc?.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`keydown`,this._onHostKey),this._locked&&(this._locked=!1,To--,To<=0&&(To=0,this._doc?.body.classList.remove(`wui-drawer-locked`)))}_panel(){return this.querySelector(`.wui-drawer-panel`)}_focusables(){let e=this._panel();return e?Array.from(e.querySelectorAll(Co)).filter(e=>!e.closest(`[hidden],[inert]`)):[]}_focusIn(){let e=this._panel();if(!e)return;let t=e.querySelector(`[data-autofocus]`),n=this._sheet()?null:this._focusables().find(e=>e.closest(`.wui-drawer-body`));(t||n||e).focus?.()}_requestClose(){let e=this.dispatchEvent(new CustomEvent(`wui-drawer-close`,{bubbles:!0,cancelable:!0}));return e&&this.hide(),e}_click(e){if(!this.isOpen)return;let t=e.target;(t.closest?.(`[data-wui-drawer-close]`)||t.closest?.(`[data-wui-drawer-backdrop]`)&&!this.hasAttribute(`static`))&&this._requestClose()}_keyDown(e){if(e.key===`Escape`){if(e.defaultPrevented||this.hasAttribute(`static`))return;e.preventDefault(),e.stopPropagation(),this._requestClose();return}if(e.key===`Tab`){this._trapTab(e);return}e.target?.closest?.(`.wui-drawer-handle`)&&this._sheet()&&this._handleKey(e)}_trapTab(e){let t=this._focusables(),n=this._panel();if(!t.length){e.preventDefault(),n?.focus?.();return}let r=t[0],i=t[t.length-1],a=this._doc.activeElement;!n?.contains(a)||a===n?(e.preventDefault(),(e.shiftKey?i:r).focus()):e.shiftKey&&a===r?(e.preventDefault(),i.focus()):!e.shiftKey&&a===i&&(e.preventDefault(),r.focus())}_handleKey(e){let t=this._points().length-1,n={ArrowUp:this._snap+1,ArrowDown:this._snap-1,Home:0,End:t};e.key in n&&(e.preventDefault(),this._setSnap(n[e.key]))}_pointerDown(e){if(!this.isOpen||!this._sheet()||(e.button??0)!==0)return;let t=e.target?.closest?.(`[data-wui-drawer-grip]`);!t||e.target.closest(`button`)||(this._drag={grip:t,id:e.pointerId,startY:e.clientY,lastY:e.clientY,lastT:e.timeStamp,velocity:0,moved:!1},t.setPointerCapture?.(e.pointerId),t.addEventListener(`pointermove`,this._onPointerMove),t.addEventListener(`pointerup`,this._onPointerUp),t.addEventListener(`pointercancel`,this._onPointerUp))}_viewport(){return this._doc.defaultView.innerHeight}_pointerMove(e){let t=this._drag;if(!t||e.pointerId!==t.id)return;let n=e.clientY-t.startY;if(!t.moved&&Math.abs(n)<wo)return;t.moved=!0,this.classList.add(`is-dragging`);let r=e.timeStamp-t.lastT;r>0&&(t.velocity=(e.clientY-t.lastY)/r),t.lastY=e.clientY,t.lastT=e.timeStamp;let i=this._points(),a=(i[i.length-1]-i[this._snap])/100*this._viewport();t.offset=Math.max(n,-a),this.style.setProperty(`--wui-drawer-drag`,`${t.offset}px`)}_pointerUp(e){let t=this._drag;if(!t||e.pointerId!==t.id)return;let{moved:n,velocity:r,offset:i=0}=t;if(this._endDrag(),!n)return;let a=this._points(),o=this._viewport(),s=(a[this._snap]/100*o-i)/(o/100),c=!this.hasAttribute(`static`),l=xo({points:a,index:this._snap,visible:s,velocity:r,canDismiss:c});l>=0?this._setSnap(l):this._requestClose()}_endDrag(){let e=this._drag;e&&(this._drag=null,e.grip.releasePointerCapture?.(e.id),e.grip.removeEventListener(`pointermove`,this._onPointerMove),e.grip.removeEventListener(`pointerup`,this._onPointerUp),e.grip.removeEventListener(`pointercancel`,this._onPointerUp),this.classList.remove(`is-dragging`),this.style.removeProperty(`--wui-drawer-drag`))}},ko=300,Ao=150,jo=`.wui-hover-card-trigger`,Mo=`.wui-hover-card-panel`,No=`a[href],button,input,select,textarea,[tabindex]`,Po=0,Fo=class extends c{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)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)}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),s(this),this._doc=null}get _trigger(){return this.querySelector(jo)}get _panel(){return this.querySelector(Mo)}get _anchor(){let e=this._trigger;return e?.querySelector(No)??e}_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}_schedule(e){if(this._clear(),this.isOpen===e)return;let t=e?this._delay(`open-delay`,ko):this._delay(`close-delay`,Ao);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(),o(this,()=>this._reposition()),this._doc?.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`keydown`,this._onKeyDown),this._describe(t)):(t.removeAttribute(`data-open`),s(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&&a(this._trigger,this._panel,{clampHeight:!0})}_describe(e){let t=this._anchor;t&&(e.id||=`wui-hover-card-${++Po}`,t.setAttribute(`aria-describedby`,e.id),this._described=t)}},Io=4096,Lo=[.92,.8,.65,.5],Ro=.8,zo=8;function Bo(e){if(e==null||e===``||e===`free`)return null;let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)&&t>0?t:null}function Vo(e,t,n){if(!n)return{x:0,y:0,w:e,h:t};let r=e,i=r/n;return i>t&&(i=t,r=i*n),{x:(e-r)/2,y:(t-i)/2,w:r,h:i}}function Ho(e,t,n){return{...e,x:Math.min(Math.max(e.x,0),Math.max(t-e.w,0)),y:Math.min(Math.max(e.y,0),Math.max(n-e.h,0))}}function Uo(e,t,n,r,i){return Ho({...e,x:e.x+t,y:e.y+n},r,i)}function Wo(e,t){return Math.min(32,e,t)}function Go(e,t){return t.w/e.w}function Ko(e,t){return Math.max(4,Go(e,t))}function qo(e,t,n,r,i){let a=Math.min(Math.max(n,1),Ko(e,t)),o=e.h/e.w,s=Math.min(r,i/o),c=Math.min(Math.max(Wo(r,i),Wo(r,i)/o),s),l=Math.min(Math.max(t.w/a,c),s),u=l*o,d=e.x+e.w/2,f=e.y+e.h/2;return Ho({x:d-l/2,y:f-u/2,w:l,h:u},r,i)}var Jo=[`nw`,`ne`,`sw`,`se`];function Yo(e,t,n,r,i,a){let o=Wo(i,a),s=t.endsWith(`w`),c=t.startsWith(`n`),l=s?e.x+e.w:e.x,u=c?e.y+e.h:e.y,d=Math.min(Math.max(n,0),i),f=Math.min(Math.max(r,0),a);return d=s?Math.min(d,l-o):Math.max(d,l+o),f=c?Math.min(f,u-o):Math.max(f,u+o),{x:Math.min(d,l),y:Math.min(f,u),w:Math.abs(d-l),h:Math.abs(f-u)}}function Xo(e,t=Io){let n=Math.min(1,t/Math.max(e.w,e.h));return{width:Math.max(1,Math.round(e.w*n)),height:Math.max(1,Math.round(e.h*n))}}function Zo(e,t){let n=t/Math.max(e.w,e.h);return{width:Math.max(1,Math.round(e.w*n)),height:Math.max(1,Math.round(e.h*n))}}function Qo(e,t,n){return n%180==0?{w:e,h:t}:{w:t,h:e}}function $o(e,t,n){return Ho({x:n-(e.y+e.h),y:e.x,w:e.h,h:e.w},n,t)}function es(e){return String(e||``).split(/[\s,]+/).map(Number).filter(e=>Number.isInteger(e)&&e>0)}var ts=[`image/png`,`image/jpeg`,`image/webp`],ns={"image/png":`.png`,"image/jpeg":`.jpg`,"image/webp":`.webp`};function rs(e){let t=String(e||``).toLowerCase();return ts.includes(t)?t:`image/png`}function is(e,t){let n=String(e||`image`),r=ns[t];return(t===`image/jpeg`?/\.jpe?g$/i.test(n):n.toLowerCase().endsWith(r))?n:`${n.replace(/\.[^./\\]+$/,``)||`image`}${r}`}async function as(e,{width:t,height:n,type:r,maxBytes:i}){let a=r,o=t,s=n,c=null;for(let t=0;t<=zo;t++){let n=a===`image/png`?[void 0]:t===0?Lo:[Lo[1]];for(let t of n){if(c=await e(o,s,a,t),!c||(c.type&&c.type!==a&&(a=c.type),!(i>0)||c.size<=i))return c;if(a===`image/png`)break}o=Math.max(1,Math.round(o*Ro)),s=Math.max(1,Math.round(s*Ro))}return c}var os=.05,ss=.2,cs={w:320,h:240},ls={nw:`top left`,ne:`top right`,sw:`bottom left`,se:`bottom right`},us=`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M5 12h14"/></svg>`,ds=`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M5 12h14M12 5v14"/></svg>`,fs=`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/></svg>`,ps=`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>`,ms=(e,t)=>Math.hypot(e.x-t.x,e.y-t.y),hs=class extends c{static get observedAttributes(){return[`src`,`aspect`,`round`,`rotatable`,`previews`]}constructor(){super(),this._rect=null,this._base=null,this._natural=null,this._source=null,this._rotation=0,this._drag=null,this._pointers=new Map,this._pinch=null,this._previewPending=!1,this._resizeObserver=null}get src(){return this.getAttribute(`src`)||``}set src(e){e==null||e===``?this.removeAttribute(`src`):this.setAttribute(`src`,String(e))}get aspect(){return Bo(this.getAttribute(`aspect`))}set aspect(e){e==null||e===``?this.removeAttribute(`aspect`):this.setAttribute(`aspect`,String(e))}get round(){return this.hasAttribute(`round`)}set round(e){this.toggleAttribute(`round`,!!e)}get rotatable(){return this.hasAttribute(`rotatable`)}set rotatable(e){this.toggleAttribute(`rotatable`,!!e)}get previews(){return this.getAttribute(`previews`)||``}set previews(e){e==null||e===``?this.removeAttribute(`previews`):this.setAttribute(`previews`,Array.isArray(e)?e.join(` `):String(e))}get rect(){return this._rect?{...this._rect}:null}get rotation(){return this._rotation}set rotation(e){if(!this._rect)return;let t=(Math.round(Number(e)/90)*90%360+360)%360;if(!Number.isNaN(t))for(;this._rotation!==t;)this.rotate()}get zoom(){return this._rect?Go(this._rect,this._base):1}set zoom(e){this._rect&&(this._rect=qo(this._rect,this._base,Number(e)||1,this._natural.w,this._natural.h),this._paint(),this._announce())}connectedCallback(){if(!this._rendered){this.render();return}this._observe()}disconnectedCallback(){this._resizeObserver?.disconnect(),this._resizeObserver=null}attributeChangedCallback(e){this._rendered&&(e===`src`?this._loadImage():e===`aspect`?(this._rebuildHandles(),this._resetRect()):e===`rotatable`?this._tools.hidden=!this.rotatable:e===`previews`?this._renderPreviews():this._applyRound())}render(){this.innerHTML=`<div>
318
318
  <div class="wui-crop-stage" tabindex="0" role="group" aria-label="Crop area. Drag the frame or use the arrow keys to move it, and plus or minus to zoom.">
319
319
  <img class="wui-crop-img" alt="" draggable="false">
320
320
  <div class="wui-crop-frame"></div>
321
321
  </div>
322
322
  <div class="wui-crop-controls">
323
- <button type="button" class="wui-crop-zoombtn" data-zoom="out" aria-label="Zoom out">${Po}</button>
323
+ <button type="button" class="wui-crop-zoombtn" data-zoom="out" aria-label="Zoom out">${us}</button>
324
324
  <input type="range" class="form-range wui-crop-zoom" min="1" max="4" step="0.01" value="1" aria-label="Zoom">
325
- <button type="button" class="wui-crop-zoombtn" data-zoom="in" aria-label="Zoom in">${Fo}</button>
325
+ <button type="button" class="wui-crop-zoombtn" data-zoom="in" aria-label="Zoom in">${ds}</button>
326
326
  </div>
327
327
  <div class="wui-crop-tools" hidden>
328
- <button type="button" class="wui-crop-toolbtn" data-crop-action="rotate" aria-label="Rotate 90 degrees clockwise">${Io}<span>Rotate</span></button>
329
- <button type="button" class="wui-crop-toolbtn" data-crop-action="reset" aria-label="Reset the crop">${Lo}<span>Reset</span></button>
328
+ <button type="button" class="wui-crop-toolbtn" data-crop-action="rotate" aria-label="Rotate 90 degrees clockwise">${fs}<span>Rotate</span></button>
329
+ <button type="button" class="wui-crop-toolbtn" data-crop-action="reset" aria-label="Reset the crop">${ps}<span>Reset</span></button>
330
330
  </div>
331
331
  <div class="wui-crop-previews" aria-hidden="true" hidden></div>
332
332
  <div class="visually-hidden" data-wui-crop-live aria-live="polite"></div>
333
- </div>`,this._stage=this.querySelector(`.wui-crop-stage`),this._img=this.querySelector(`.wui-crop-img`),this._frame=this.querySelector(`.wui-crop-frame`),this._slider=this.querySelector(`.wui-crop-zoom`),this._tools=this.querySelector(`.wui-crop-tools`),this._previewBox=this.querySelector(`.wui-crop-previews`),this._live=this.querySelector(`[data-wui-crop-live]`),this._rendered=!0,this._tools.hidden=!this.rotatable,this._applyRound(),this._rebuildHandles(),this._renderPreviews(),this._wire(),this._observe(),this._loadImage()}_applyRound(){this._frame.classList.toggle(`wui-crop-frame--round`,this.round),this._previewBox.classList.toggle(`wui-crop-previews--round`,this.round)}_rebuildHandles(){for(let e of this._frame.querySelectorAll(`.wui-crop-handle`))e.remove();if(!this.aspect)for(let e of vo){let t=document.createElement(`button`);t.type=`button`,t.className=`wui-crop-handle wui-crop-handle--${e}`,t.dataset.handle=e,t.setAttribute(`aria-label`,`Resize ${No[e]} corner`),this._frame.appendChild(t)}}_renderPreviews(){let e=wo(this.previews);this._previewBox.replaceChildren(),this._previewBox.hidden=e.length===0;for(let t of e){let e=document.createElement(`canvas`);e.className=`wui-crop-preview`,e.dataset.size=String(t),e.style.width=`${t}px`,e.style.height=`${t}px`,this._previewBox.appendChild(e)}this._schedulePreviews()}_loadImage(){this._rect=null,this._natural=null,this._source=null,this._rotation=0,this._drag=null,this._pinch=null,this._pointers.clear();let e=this.src;this._img.hidden=!e,this._frame.hidden=!0,e&&(this._img.onload=()=>{this._source={w:this._img.naturalWidth,h:this._img.naturalHeight},this._natural={...this._source},this._resetRect(),this.dispatchEvent(new Event(`load`))},this._img.onerror=()=>{this._frame.hidden=!0,this.dispatchEvent(new Event(`error`))},this._img.src=e)}_resetRect(){this._natural&&(this._base=uo(this._natural.w,this._natural.h,this.aspect),this._rect={...this._base},this._frame.hidden=!1,this._paint())}_observe(){typeof ResizeObserver>`u`||this._resizeObserver||(this._resizeObserver=new ResizeObserver(()=>this._paint()),this._resizeObserver.observe(this._stage))}_view(){let e=this._stage.clientWidth||Mo.w,t=this._stage.clientHeight||Mo.h,n=Math.min(e/this._natural.w,t/this._natural.h),r=this._natural.w*n,i=this._natural.h*n;return{scale:n,left:(e-r)/2,top:(t-i)/2,iw:r,ih:i}}_paint(){if(!this._rect)return;let e=this._view(),t=this._rotation%180!=0,n=t?e.ih:e.iw,r=t?e.iw:e.ih;Object.assign(this._img.style,{left:`${e.left+(e.iw-n)/2}px`,top:`${e.top+(e.ih-r)/2}px`,width:`${n}px`,height:`${r}px`,transform:this._rotation?`rotate(${this._rotation}deg)`:``});let i=this._rect;Object.assign(this._frame.style,{left:`${e.left+i.x*e.scale}px`,top:`${e.top+i.y*e.scale}px`,width:`${i.w*e.scale}px`,height:`${i.h*e.scale}px`});let a=ho(i,this._base),o=go(i,this._base);this._slider.max=String(o),this._slider.value=String(Math.min(Math.max(a,1),o)),this._slider.setAttribute(`aria-valuetext`,`${Math.round(a*100)}%`),this._schedulePreviews()}_schedulePreviews(){if(!this._rect||this._previewBox.hidden||this._previewPending)return;this._previewPending=!0;let e=()=>{this._previewPending=!1,this._drawPreviews()};typeof requestAnimationFrame==`function`?requestAnimationFrame(e):e()}_drawPreviews(){if(!this._rect)return;let e=fo(this._rect,this._natural.w,this._natural.h),t=typeof window<`u`&&window.devicePixelRatio||1;for(let n of this._previewBox.children){let r=Number(n.dataset.size),i=Math.max(1,Math.round(r*e.h/e.w));n.style.width=`${r}px`,n.style.height=`${i}px`,n.width=Math.round(r*t),n.height=Math.round(i*t);let a=n.getContext(`2d`);a&&this._drawCrop(a,e,n.width,n.height)}}_drawCrop(e,t,n,r){if(!this._rotation){e.drawImage(this._img,t.x,t.y,t.w,t.h,0,0,n,r);return}let i=this._source;e.save(),e.scale(n/t.w,r/t.h),e.translate(-t.x,-t.y),e.translate(this._natural.w/2,this._natural.h/2),e.rotate(this._rotation*Math.PI/180),e.drawImage(this._img,-i.w/2,-i.h/2,i.w,i.h),e.restore()}_announce(){this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,detail:this.rect}))}_say(){let e=this._rect,t=this._rotation?`, turned ${this._rotation} degrees`:``,n=`Frame ${Math.round(e.w)} by ${Math.round(e.h)} pixels, ${Math.round(e.x)} from the left, ${Math.round(e.y)} from the top, zoom ${Math.round(ho(e,this._base)*100)}%${t}.`;this._live.textContent=n===this._live.textContent?`${n} `:n}rotate(){if(!this._rect)return;let e=Co(this._rect,this._natural.w,this._natural.h);this._rotation=(this._rotation+90)%360,this._natural=So(this._source.w,this._source.h,this._rotation),this._base=uo(this._natural.w,this._natural.h,this.aspect);let t=this.aspect;this._rect=t&&t!==1?{...this._base}:e,this._paint(),this._announce()}reset(){this._source&&(this._rotation=0,this._natural={...this._source},this._resetRect(),this._announce())}_wire(){let e=this._stage;e.addEventListener(`pointerdown`,t=>{if(!this._rect||t.button>0)return;if(this._pointers.set(t.pointerId,{x:t.clientX,y:t.clientY}),e.setPointerCapture?.(t.pointerId),this._pointers.size===2){let[e,n]=[...this._pointers.values()];this._drag=null,this._pinch={distance:Ro(e,n)||1,zoom:this.zoom,done:!1},t.preventDefault();return}if(this._pinch)return;let n=t.target.closest?.(`.wui-crop-handle`);this._drag={id:t.pointerId,corner:n?n.dataset.handle:null,x:t.clientX,y:t.clientY,start:{...this._rect}},n||e.focus(),t.preventDefault()}),e.addEventListener(`pointermove`,t=>{if(this._pointers.has(t.pointerId)&&this._pointers.set(t.pointerId,{x:t.clientX,y:t.clientY}),this._pinch){if(this._pinch.done||this._pointers.size<2||!this._pointers.has(t.pointerId))return;let[e,n]=[...this._pointers.values()],r=this._pinch.zoom*Ro(e,n)/this._pinch.distance;this._rect=_o(this._rect,this._base,r,this._natural.w,this._natural.h),this._paint();return}let n=this._drag;if(!n||n.id!==t.pointerId)return;let r=this._view(),{w:i,h:a}=this._natural;if(n.corner){let o=e.getBoundingClientRect(),s=(t.clientX-o.left-e.clientLeft-r.left)/r.scale,c=(t.clientY-o.top-e.clientTop-r.top)/r.scale;this._rect=yo(this._rect,n.corner,s,c,i,a)}else this._rect=po(n.start,(t.clientX-n.x)/r.scale,(t.clientY-n.y)/r.scale,i,a);this._paint()});let t=t=>{if(this._pointers.delete(t.pointerId)&&e.releasePointerCapture?.(t.pointerId),this._pinch){!this._pinch.done&&this._pointers.size<2&&(this._pinch.done=!0,this._announce()),this._pointers.size===0&&(this._pinch=null);return}let n=this._drag;!n||n.id!==t.pointerId||(this._drag=null,this._announce())};e.addEventListener(`pointerup`,t),e.addEventListener(`pointercancel`,t),e.addEventListener(`keydown`,e=>this._onKey(e)),e.addEventListener(`wheel`,e=>{!this._rect||!this.contains(document.activeElement)||(e.preventDefault(),this.zoom*=e.deltaY<0?1.1:1/1.1)},{passive:!1});for(let e of[`input`,`change`])this._slider.addEventListener(e,e=>e.stopPropagation());this._slider.addEventListener(`input`,()=>{this.zoom=Number(this._slider.value)});for(let e of this.querySelectorAll(`.wui-crop-zoombtn`))e.addEventListener(`click`,()=>{this.zoom*=e.dataset.zoom===`in`?1.25:.8});this.querySelector(`[data-crop-action="rotate"]`).addEventListener(`click`,()=>this.rotate()),this.querySelector(`[data-crop-action="reset"]`).addEventListener(`click`,()=>this.reset())}_onKey(e){if(!this._rect||e.altKey||e.ctrlKey||e.metaKey)return;let{w:t,h:n}=this._natural;if(e.key===`+`||e.key===`=`)this.zoom*=1.25,this._say();else if(e.key===`-`||e.key===`_`)this.zoom*=.8,this._say();else if((e.key===`r`||e.key===`R`)&&this.rotatable)this.rotate(),this._say();else if(e.key.startsWith(`Arrow`)){let r=e.shiftKey?jo:Ao,i=e.key===`ArrowRight`?1:e.key===`ArrowLeft`?-1:0,a=e.key===`ArrowDown`?1:e.key===`ArrowUp`?-1:0,o=e.target.closest?.(`.wui-crop-handle`)?.dataset.handle;if(o){let e=this._rect,s=(o.endsWith(`w`)?e.x:e.x+e.w)+i*r*e.w,c=(o.startsWith(`n`)?e.y:e.y+e.h)+a*r*e.h;this._rect=yo(e,o,s,c,t,n)}else this._rect=po(this._rect,i*r*this._rect.w,a*r*this._rect.h,t,n);this._paint(),this._announce(),this._say()}else return;e.preventDefault()}async toBlob({type:e,maxBytes:t=0,size:n=0}={}){if(!this._rect)return null;let r=Do(e),i=fo(this._rect,this._natural.w,this._natural.h),{width:a,height:o}=n>0?xo(i,n):bo(i);return ko((e,t,n,r)=>new Promise(a=>{let o=document.createElement(`canvas`);o.width=e,o.height=t;let s=o.getContext(`2d`);if(!s){a(null);return}n===`image/jpeg`&&(s.fillStyle=`#fff`,s.fillRect(0,0,e,t)),this._drawCrop(s,i,e,t),o.toBlob(a,n,r)}),{width:a,height:o,type:r,maxBytes:t})}async toFile({name:e,type:t,maxBytes:n=0,size:r=0}={}){let i=await this.toBlob({type:t,maxBytes:n,size:r});return i?new File([i],Oo(e,i.type),{type:i.type}):null}},Bo=Object.freeze([`text`,`number`,`select`,`date`,`textarea`]),Vo=2e3,Ho=Object.freeze({edit:e=>`Edit ${e}: `,readOnly:e=>`${e}: `,saved:e=>`${e} saved.`,notSaved:(e,t)=>`${e} was not saved. ${t}`,failed:Object.freeze({forbidden:`You do not have permission to change this.`,client:`This could not be saved. Refresh the page and try again.`,validation:`This value was not accepted. Check it and try again.`,server:`Something went wrong on our side, so this was not saved. Try again in a moment.`,network:`Could not reach the server, so this was not saved. Check your connection and try again.`})});function Uo(e,{type:t=`text`,options:n,placeholder:r}={}){let i=e==null?``:String(e);if(i===``)return{text:r||`-`,empty:!0};if(t===`date`)return{text:wa(i)||i,empty:!1};if(t===`select`){let e=n?.find(e=>String(e.value)===i);return{text:typeof e?.label==`string`?e.label:i,empty:!1}}return{text:i,empty:!1}}var Wo=`[data-wui-display]`,Go=`[data-wui-value]`,Ko=`[data-wui-editor]`,qo=`[data-wui-control]`,Jo=`[data-wui-error]`,Yo=`[data-wui-live]`,Xo=`[aria-expanded="true"]`,Zo=new Set([`select`,`date`]),Qo=e=>typeof e?.message==`string`&&e.message?e.message:Ho.failed.server,$o=class extends c{static get observedAttributes(){return[`disabled`]}constructor(){super(),this._wired=!1,this._editing=!1,this._busy=!1,this._draft=null,this._pressed=!1,this._popupOpen=!1,this._savedTimer=null,this._onClick=this._onClick.bind(this),this._onKeyCapture=this._onKeyCapture.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onFocusOut=this._onFocusOut.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onChange=this._onChange.bind(this)}connectedCallback(){this._wired||(this._wired=!0,this.addEventListener(`click`,this._onClick),this.addEventListener(`auxclick`,this._onClick),this.addEventListener(`keydown`,this._onKeyCapture,!0),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`pointerdown`,this._onPointerDown),this.addEventListener(`change`,this._onChange))}disconnectedCallback(){clearTimeout(this._savedTimer),this._savedTimer=null,this._releasePress()}attributeChangedCallback(e){e===`disabled`&&this.hasAttribute(`disabled`)&&this.cancel()}edit(){if(this._editing||this._busy||this.hasAttribute(`disabled`))return;let e=this.querySelector(Wo),t=this.querySelector(Ko),n=this._control();!e||!t||!n||(this._editing=!0,this._setState(null),n.value=this._draft??this._value(),e.hidden=!0,t.hidden=!1,this.setAttribute(`data-wui-editing`,``),this._focusControl(n))}cancel(){this._editing&&(this._draft=null,this._setError(null),this.getAttribute(`data-wui-state`)===`error`&&this._setState(null),this._close())}_onClick(e){e.stopPropagation(),e.type===`click`&&!this._editing&&this.querySelector(Wo)?.contains(e.target)&&this.edit()}_onKeyCapture(){this._popupOpen=!!(this._editing&&this.querySelector(Ko)?.querySelector(Xo))}_onKeyDown(e){if(!this._editing){(e.key===`Enter`||e.key===` `)&&e.stopPropagation();return}if(e.stopPropagation(),this._popupOpen)return;if(e.key===`Escape`){e.preventDefault(),this.cancel();return}let t=this._type();e.key!==`Enter`||Zo.has(t)||t===`textarea`&&!(e.ctrlKey||e.metaKey)||(e.preventDefault(),this._commit(this._control()?.value??``))}_onFocusOut(e){if(!this._editing||this._pressed)return;let t=e.relatedTarget;t&&this.contains(t)||document.hasFocus()&&this._commit(this._control()?.value??``)}_onPointerDown(){this._editing&&(this._pressed=!0,document.addEventListener(`pointerup`,this._onPointerUp,!0),document.addEventListener(`pointercancel`,this._onPointerUp,!0))}_onPointerUp(){this._releasePress(),setTimeout(()=>{this._pressed=!1,this._editing&&!this.contains(document.activeElement)&&document.hasFocus()&&this._commit(this._control()?.value??``)},0)}_releasePress(){document.removeEventListener(`pointerup`,this._onPointerUp,!0),document.removeEventListener(`pointercancel`,this._onPointerUp,!0)}_onChange(e){if(!this._editing||!Zo.has(this._type()))return;let t=this._control();!t||e.target!==t||queueMicrotask(()=>this._commit(t.value))}async _commit(e){if(!this._editing||this._busy)return;let t=this._value();if(e===t){this.cancel();return}let n=typeof this.validate==`function`?this.validate(e):null;if(n){this._setError(n),this._announce(n);return}let r=this.hasAttribute(`controlled`);this._draft=null,this._setError(null),this._busy=!0,this._setState(`saving`),this.setAttribute(`aria-busy`,`true`);let i=r?null:this._readShown();r||this._showValue(e),this._close();let a=await this._persist(e,r);this._busy=!1,this.removeAttribute(`aria-busy`);let o=this.getAttribute(`label`)||``;if(a.ok){this.setAttribute(`value`,e),!r&&a.text&&this._showText(a.text,!1),this._setState(`saved`),this._savedTimer=setTimeout(()=>this._setState(null),Vo),this._announce(Ho.saved(o)),this._fire(`wui:inline-edit:saved`,{value:e,previous:t});return}if(i&&this._restoreShown(i),a.kind===`session`||a.kind===`aborted`){this._setState(null);return}this._draft=e,this._setState(`error`),this._setError(a.message),this._announce(Ho.notSaved(o,a.message)),this._fire(`wui:inline-edit:failed`,{value:e,previous:t,kind:a.kind,message:a.message})}async _persist(e,t){if(t){if(typeof this.save!=`function`)return{ok:!0};try{return await this.save(e),{ok:!0}}catch(e){return{ok:!1,kind:`server`,message:Qo(e)}}}let n=this.getAttribute(`action`);if(!n)return{ok:!0};let r=await j(n,{method:`POST`,body:new URLSearchParams({[this.getAttribute(`name`)||`value`]:e})});return r.ok?{ok:!0,text:r.html.trim()}:{ok:!1,kind:r.kind,message:r.message||Ho.failed[r.kind]||Ho.failed.server}}_close(){let e=this.querySelector(Wo),t=this.querySelector(Ko),n=this.contains(document.activeElement);this._editing=!1,this.removeAttribute(`data-wui-editing`),t&&(t.hidden=!0),e&&(e.hidden=!1),t?.querySelector(Xo)?.click(),n&&e?.focus()}_focusControl(e){if(!Zo.has(this._type())){e.focus(),e.select?.();return}let t=e.querySelector(`button`);t&&(t.focus(),t.getAttribute(`aria-expanded`)!==`true`&&t.click())}_showValue(e){if(e===``){this._showText(this.getAttribute(`placeholder`)||`-`,!0);return}let t=this._type(),n=e;if(t===`date`)n=wa(e)||e;else if(t===`select`){let t=[...this._control()?.querySelectorAll(`[data-value]`)??[]].find(t=>t.getAttribute(`data-value`)===e);t&&(n=t.textContent.trim())}this._showText(n,!1)}_readShown(){let e=this.querySelector(Go);return e?{html:e.innerHTML,empty:e.hasAttribute(`data-wui-empty`)}:null}_restoreShown(e){let t=this.querySelector(Go);t&&(t.innerHTML=e.html,t.toggleAttribute(`data-wui-empty`,e.empty))}_showText(e,t){let n=this.querySelector(Go);n&&(n.textContent=e,n.toggleAttribute(`data-wui-empty`,t))}_setError(e){let t=this.querySelector(Jo),n=this._control();t&&(t.textContent=e||``,t.hidden=!e),e?n?.setAttribute(`aria-invalid`,`true`):n?.removeAttribute(`aria-invalid`)}_setState(e){clearTimeout(this._savedTimer),this._savedTimer=null,e?this.setAttribute(`data-wui-state`,e):this.removeAttribute(`data-wui-state`)}_announce(e){let t=this.querySelector(Yo);!t||!e||(t.textContent=``,t.textContent=e)}_fire(e,t){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:t}))}_control(){return this.querySelector(qo)}_value(){return this.getAttribute(`value`)??``}_type(){let e=this.getAttribute(`type`);return Bo.includes(e)?e:`text`}},es=`a.wui-lightbox-item`,q=1,ts=4,ns=.5,rs=2,is=50,as=6,os=300,ss=300;function cs(e){return Number.isFinite(e)?Math.min(ts,Math.max(q,e)):q}function ls(e,t,n,r){let i=(e,n)=>Math.max(0,(e*t-n)/2),a=i(r.width,n.width),o=i(r.height,n.height);return{x:Math.min(a,Math.max(-a,e.x)),y:Math.min(o,Math.max(-o,e.y))}}function us(e,t){return Math.abs(e)<is||Math.abs(e)<Math.abs(t)*1.5?0:e<0?1:-1}function ds(e){let t=String(e??``).split(/[?#]/)[0].split(`/`).filter(Boolean).pop()??``;try{return decodeURIComponent(t)}catch{return t}}function J(e,t,n={}){let r=document.createElement(e);r.className=t;for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return r}function fs(e,t,n){let r=J(`button`,`u-action wui-lightbox-btn ${n}`,{type:`button`,"aria-label":t,title:t});return r.style.setProperty(`--wui-action-size`,`40px`),r.innerHTML=R(e,{size:20}),r}var ps=class extends c{constructor(){super(),this._ui=null,this._index=0,this._zoom=q,this._pan={x:0,y:0},this._pointers=new Map,this._gesture=null,this._lastTap=-1/0,this._returnTo=null,this._lockedOverflow=null,this._onClick=e=>{if(e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return;let t=e.target?.closest?.(es);if(!t||!this.contains(t))return;let n=this._links().indexOf(t);n<0||(e.preventDefault(),this.open(n))}}get download(){return this.hasAttribute(`download`)}set download(e){this.toggleAttribute(`download`,e===!0||e===``||e===`true`)}get label(){return this.getAttribute(`label`)||`Image viewer`}set label(e){this.setAttribute(`label`,String(e??``))}get isOpen(){return this._ui!==null}connectedCallback(){this.addEventListener(`click`,this._onClick)}disconnectedCallback(){this.removeEventListener(`click`,this._onClick),this._teardown()}_links(){return[...this.querySelectorAll(es)]}_items(){return this._links().map(e=>{let t=e.getAttribute(`href`)??``;return{link:e,src:t,alt:e.querySelector(`img`)?.getAttribute(`alt`)??``,caption:e.dataset.caption??``,name:e.dataset.name||ds(t)}})}open(e=0){let t=this._items();return t.length?(this._ui||(this._returnTo=document.activeElement,this._build(),this.dispatchEvent(new CustomEvent(`wui-lightbox:open`,{bubbles:!0,detail:{index:e}}))),this._show(e,t),this._ui.close.focus(),!0):!1}close(){if(!this._ui)return;let e=this._index,t=this._links()[e]??this._returnTo;this._teardown(),t?.isConnected&&t.focus(),this._returnTo=null,this.dispatchEvent(new CustomEvent(`wui-lightbox:close`,{bubbles:!0,detail:{index:e}}))}_teardown(){this._ui&&(this._ui.root.remove(),this._ui=null,this._pointers.clear(),this._gesture=null,this._lockedOverflow!==null&&(document.documentElement.style.overflow=this._lockedOverflow,this._lockedOverflow=null))}_build(){let e=J(`div`,`wui-lightbox-overlay`,{role:`dialog`,"aria-modal":`true`,"aria-label":this.label,tabindex:`-1`}),t=J(`div`,`wui-lightbox-bar`),n=J(`span`,`wui-lightbox-count`,{"aria-live":`polite`}),r=J(`div`,`wui-lightbox-tools`),i=fs(`zoom-out`,`Zoom out`,`wui-lightbox-zoom-out`),a=fs(`zoom-in`,`Zoom in`,`wui-lightbox-zoom-in`),o=J(`a`,`u-action wui-lightbox-btn wui-lightbox-download`,{"aria-label":`Download`,title:`Download`});o.style.setProperty(`--wui-action-size`,`40px`),o.innerHTML=R(`download`,{size:20}),o.hidden=!this.download;let s=fs(`x`,`Close`,`wui-lightbox-close`);r.append(i,a,o,s),t.append(n,r);let c=J(`div`,`wui-lightbox-stage`),l=fs(`chevron-left`,`Previous image`,`wui-lightbox-nav wui-lightbox-prev`),u=fs(`chevron-right`,`Next image`,`wui-lightbox-nav wui-lightbox-next`),d=J(`img`,`wui-lightbox-image`,{decoding:`async`,draggable:`false`,alt:``}),f=J(`p`,`wui-lightbox-status`,{role:`status`});c.append(d,f,l,u);let p=J(`p`,`wui-lightbox-caption`);e.append(t,c,p);let m={root:e,count:n,zoomOut:i,zoomIn:a,download:o,close:s,stage:c,prev:l,next:u,image:d,status:f,caption:p};this._ui=m,s.addEventListener(`click`,()=>this.close()),l.addEventListener(`click`,()=>this.step(-1)),u.addEventListener(`click`,()=>this.step(1)),i.addEventListener(`click`,()=>this._setZoom(this._zoom-ns)),a.addEventListener(`click`,()=>this._setZoom(this._zoom+ns)),e.addEventListener(`keydown`,e=>this._onKeyDown(e)),c.addEventListener(`pointerdown`,e=>this._onPointerDown(e)),c.addEventListener(`pointermove`,e=>this._onPointerMove(e)),c.addEventListener(`pointerup`,e=>this._onPointerEnd(e,!0)),c.addEventListener(`pointercancel`,e=>this._onPointerEnd(e,!1)),c.addEventListener(`wheel`,e=>this._onWheel(e),{passive:!1}),d.addEventListener(`load`,()=>{this._ui===m&&(f.textContent=``,c.removeAttribute(`aria-busy`),d.hidden=!1,this._applyTransform())}),d.addEventListener(`error`,()=>{this._ui===m&&(c.removeAttribute(`aria-busy`),d.hidden=!0,f.textContent=`This image can't be shown.`)}),this.append(e),this._lockedOverflow=document.documentElement.style.overflow,document.documentElement.style.overflow=`hidden`}step(e){if(!this._ui||!e)return;let t=this._items();t.length<2||this._show((this._index+e+t.length)%t.length,t)}_show(e,t){let n=this._ui,r=Math.min(t.length-1,Math.max(0,Math.trunc(Number(e))||0)),i=t[r],a=r!==this._index||!n.image.getAttribute(`src`);if(this._index=r,this._zoom=q,this._pan={x:0,y:0},n.count.textContent=`${Ae(r+1,{decimals:0})} of ${Ae(t.length,{decimals:0})}`,n.caption.textContent=i.caption,n.caption.hidden=!i.caption,n.download.href=i.src,n.download.setAttribute(`download`,i.name),n.prev.hidden=n.next.hidden=t.length<2,n.stage.setAttribute(`aria-busy`,`true`),n.status.textContent=``,n.image.hidden=!1,n.image.alt=i.alt||i.caption,n.image.src=i.src,this._applyTransform(),this._syncZoomButtons(),t.length>1)for(let e of[t[(r+1)%t.length],t[(r-1+t.length)%t.length]])new Image().src=e.src;a&&this.dispatchEvent(new CustomEvent(`wui-lightbox:change`,{bubbles:!0,detail:{index:r}}))}_syncZoomButtons(){this._ui.zoomOut.disabled=this._zoom<=q,this._ui.zoomIn.disabled=this._zoom>=ts;let e=document.activeElement;(e===this._ui.zoomOut||e===this._ui.zoomIn)&&e.disabled&&this._ui.close.focus()}_setZoom(e){this._ui&&(this._zoom=cs(e),this._pan=this._clampedPan(this._pan),this._applyTransform(),this._syncZoomButtons())}_clampedPan(e){let{stage:t,image:n}=this._ui;return ls(e,this._zoom,{width:t.clientWidth,height:t.clientHeight},{width:n.offsetWidth,height:n.offsetHeight})}_applyTransform(){let{image:e,stage:t}=this._ui;e.style.transform=`translate(${this._pan.x}px, ${this._pan.y}px) scale(${this._zoom})`,t.classList.toggle(`wui-lightbox-zoomed`,this._zoom>q)}_onKeyDown(e){if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),this.close();else if(e.key===`Tab`)this._trapTab(e);else if(e.key===`ArrowLeft`||e.key===`ArrowRight`)e.preventDefault(),this.step(e.key===`ArrowRight`?1:-1);else if(e.key===`Home`||e.key===`End`){e.preventDefault();let t=this._items();this._show(e.key===`Home`?0:t.length-1,t)}else e.key===`+`||e.key===`=`?(e.preventDefault(),this._setZoom(this._zoom+ns)):e.key===`-`?(e.preventDefault(),this._setZoom(this._zoom-ns)):e.key===`0`&&(e.preventDefault(),this._setZoom(q))}_trapTab(e){let t=[...this._ui.root.querySelectorAll(`button, a[href]`)].filter(e=>!e.hidden&&!e.disabled);if(!t.length){e.preventDefault();return}let n=t[0],r=t[t.length-1],i=document.activeElement;e.shiftKey&&(i===n||!this._ui.root.contains(i))?(e.preventDefault(),r.focus()):!e.shiftKey&&(i===r||!this._ui.root.contains(i))&&(e.preventDefault(),n.focus())}_onWheel(e){e.preventDefault(),this._setZoom(this._zoom*(e.deltaY<0?1.15:1/1.15))}_onPointerDown(e){if(!e.target.closest(`.wui-lightbox-nav`))if(this._ui.stage.setPointerCapture?.(e.pointerId),this._pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),this._pointers.size===2){let[e,t]=[...this._pointers.values()];this._gesture={kind:`pinch`,distance:Math.hypot(e.x-t.x,e.y-t.y)||1,zoom:this._zoom}}else this._pointers.size===1&&(this._gesture={kind:`drag`,startX:e.clientX,startY:e.clientY,startTime:e.timeStamp,pan:{...this._pan},onImage:e.target===this._ui.image,moved:!1})}_onPointerMove(e){let t=this._gesture;if(!(!t||!this._pointers.has(e.pointerId))){if(this._pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),t.kind===`pinch`&&this._pointers.size===2){let[e,n]=[...this._pointers.values()];this._setZoom(t.zoom*Math.hypot(e.x-n.x,e.y-n.y)/t.distance)}else if(t.kind===`drag`){let n=e.clientX-t.startX,r=e.clientY-t.startY;Math.hypot(n,r)>as&&(t.moved=!0),this._zoom>q&&(this._pan=this._clampedPan({x:t.pan.x+n,y:t.pan.y+r}),this._ui.stage.classList.add(`is-dragging`),this._applyTransform())}}}_onPointerEnd(e,t){let n=this._gesture;if(this._pointers.delete(e.pointerId),this._ui?.stage.classList.remove(`is-dragging`),!n)return;if(n.kind===`pinch`){this._pointers.size<2&&(this._gesture=null);return}if(this._gesture=null,!t)return;let r=e.clientX-n.startX,i=e.clientY-n.startY;if(n.moved){this._zoom===q&&this.step(us(r,i));return}if(!(e.timeStamp-n.startTime>os)){if(!n.onImage){this.close();return}e.timeStamp-this._lastTap<ss?(this._lastTap=-1/0,this._setZoom(this._zoom>q?q:rs)):this._lastTap=e.timeStamp}}},ms=/^[A-Za-z0-9_.:-]{1,64}$/,hs=/@(\\+)\[|@\[([^[\]\n]{1,100})\]\(([A-Za-z0-9_.:-]{1,64})\)/g,gs=/@(\\*)\[/g;function _s(e){return String(e??``).replace(/[[\]\r\n]+/g,` `).replace(/\s+/g,` `).trim().slice(0,100)}var vs=e=>e.replace(gs,(e,t)=>`@\\${t}[`);function ys(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(hs))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 bs(e){let t=``,n=[];for(let r of ys(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 xs(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}`||!ms.test(e.id)||(i+=vs(n.slice(a,e.start)),i+=`@[${e.label}](${e.id})`,a=e.end);return i+vs(n.slice(a))}function Ss(e){let t=[];for(let n of ys(e))`id`in n&&!t.includes(n.id)&&t.push(n.id);return t}var Cs=8,ws=40,Ts=Object.freeze({listName:`People`,searching:`Searching…`,noMatch:`No one matches`,found:e=>`${e===1?`1 person`:`${Ae(e,{decimals:0})} people`}. Up and down to choose, Enter to mention.`,mentioned:e=>`Mentioned ${e}.`}),Es=`[data-wui-control]`,Ds=`[data-wui-field]`,Os=`[data-wui-menu]`,ks=`[data-wui-live]`,As=0,js=e=>e&&ms.test(String(e.value??``))&&_s(e.label)!==``;function Ms(e){let t=e.ownerDocument;e.id||=`wui-mention-${++As}`;let n=t.createElement(`textarea`);n.id=`${e.id}-text`,n.className=`form-control textarea wui-mention-input-text`,n.rows=Number(e.getAttribute(`rows`))>0?Number(e.getAttribute(`rows`)):3,n.setAttribute(`data-wui-control`,``),n.setAttribute(`aria-autocomplete`,`list`),n.setAttribute(`aria-controls`,`${e.id}-people`);let r=e.getAttribute(`label`);r&&n.setAttribute(`aria-label`,r);let i=e.getAttribute(`placeholder`);i&&(n.placeholder=i);for(let t of[`aria-describedby`,`aria-invalid`]){let r=e.getAttribute(t);r&&n.setAttribute(t,r)}n.disabled=e.hasAttribute(`disabled`),e.appendChild(n);let a=e.getAttribute(`name`);if(a){let n=t.createElement(`input`);n.type=`hidden`,n.name=a,n.value=e.getAttribute(`value`)??``,n.setAttribute(`data-wui-field`,``),e.appendChild(n)}let o=t.createElement(`div`);o.className=`wui-mention-menu`,o.id=`${e.id}-people`,o.setAttribute(`role`,`listbox`),o.setAttribute(`aria-label`,Ts.listName),o.setAttribute(`data-wui-menu`,``),o.hidden=!0,e.appendChild(o);let s=t.createElement(`span`);s.className=`visually-hidden`,s.setAttribute(`data-wui-live`,``),s.setAttribute(`aria-live`,`polite`),s.setAttribute(`aria-atomic`,`true`),e.appendChild(s)}var Ns=class extends c{static get observedAttributes(){return[`disabled`,`aria-invalid`,`aria-describedby`]}constructor(){super(),this._wired=!1,this._text=``,this._mentions=[],this._peopleProp=null,this._declared=null,this._loading=!1,this._query=null,this._results=[],this._active=-1,this._timer=null,this._searchSeq=0,this._abort=null,this._onInput=this._onInput.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onCaret=this._onCaret.bind(this),this._onFocusOut=this._onFocusOut.bind(this),this._onMenuDown=e=>e.preventDefault(),this._onMenuClick=this._onMenuClick.bind(this),this._reposition=()=>{this._isOpen()&&this._position()}}connectedCallback(){for(let e of[`people`,`loading`,`value`])if(Object.hasOwn(this,e)){let t=this[e];delete this[e],this[e]=t}if(this._wired)return;this._wired=!0,this.querySelector(Es)||Ms(this);let e=this._control(),t=this.querySelector(Ds)?.value??this.getAttribute(`value`)??``;this._pendingValue===void 0?this._load(t):this._load(this._pendingValue),this._pendingValue=void 0,e.addEventListener(`input`,this._onInput),e.addEventListener(`keydown`,this._onKeyDown),e.addEventListener(`click`,this._onCaret),e.addEventListener(`keyup`,this._onCaret),this.addEventListener(`focusout`,this._onFocusOut);let n=this._menu();n.addEventListener(`mousedown`,this._onMenuDown),n.addEventListener(`click`,this._onMenuClick),n.addEventListener(`mousemove`,e=>{let t=e.target.closest?.(`.wui-mention-option`);t&&Number(t.dataset.index)!==this._active&&this._setActive(Number(t.dataset.index),{reveal:!1})})}disconnectedCallback(){this._close(),clearTimeout(this._timer),this._abort?.abort()}attributeChangedCallback(e,t,n){let r=this._control();r&&(e===`disabled`?(r.disabled=n!==null,n!==null&&this._close()):n===null?r.removeAttribute(e):r.setAttribute(e,n))}get value(){return xs(this._text,this._mentions)}set value(e){let t=e==null?``:String(e);if(!this._wired){this._pendingValue=t;return}t!==this.value&&this._load(t)}get mentions(){let e=new Set,t=[];for(let n of[...this._mentions].sort((e,t)=>e.start-t.start))e.has(n.id)||(e.add(n.id),t.push({id:n.id,label:n.label}));return t}get people(){return this._peopleProp?this._peopleProp:(this._declared||=[...this.querySelectorAll(`[data-wui-people] > wui-option`)].map(e=>({value:e.getAttribute(`value`)??``,label:e.textContent.trim(),description:e.getAttribute(`data-description`)||void 0,src:e.getAttribute(`data-src`)||void 0})),this._declared)}set people(e){this._peopleProp=Array.isArray(e)?e.filter(js):[],(this._isOpen()||this._query!==null)&&this._refresh()}get loading(){return this._loading}set loading(e){this._loading=!!e,this._query!==null&&this._renderMenu()}focus(e){this._control()?.focus(e)}clear(){this._load(``),this._emit()}_control(){return this.querySelector(Es)}_menu(){return this.querySelector(Os)}_load(e){let{text:t,mentions:n}=bs(e);this._text=t,this._mentions=n;let r=this._control();r&&(r.defaultValue=t,r.value=t),this._syncField(),this._close()}_syncField(){let e=this.querySelector(Ds);e&&(e.value=this.value)}_emit(){this._syncField(),this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,detail:{value:this.value,mentions:this.mentions}}))}_onInput(){let e=this._control(),t=e.value,n=this._text,r=t.length-n.length,i=Math.min(n.length,t.length),a=Math.max(0,Math.min(i,e.selectionEnd-Math.max(r,0))),o=0;for(;o<a&&n[o]===t[o];)o++;let s=0;for(;s<i-o&&n[n.length-1-s]===t[t.length-1-s];)s++;let c=n.length-s;this._mentions=this._mentions.filter(e=>e.end<=o||e.start>=c).map(e=>e.start>=c?{...e,start:e.start+r,end:e.end+r}:e),this._text=t,this._emit(),this._onCaret()}_onCaret(e){if(e?.type===`keyup`&&[`ArrowUp`,`ArrowDown`,`Enter`,`Tab`,`Escape`].includes(e.key))return;let t=this._queryAtCaret();if(!t){this._close();return}this._query&&t.text===this._query.text&&t.start===this._query.start||(this._query=t,this._refresh())}_queryAtCaret(){let e=this._control();if(!e||e.disabled||e.selectionStart!==e.selectionEnd)return null;let t=e.selectionStart,n=this._text,r=n.lastIndexOf(`@`,t-1);if(r<0||r>0&&!/[\s([{"'“‘]/.test(n[r-1]))return null;let i=n.slice(r+1,t);return i.length>40||/[\n@]/.test(i)||/^\s/.test(i)||/\s{2}/.test(i)||this._mentions.some(e=>r>=e.start&&r<e.end)?null:{start:r,end:t,text:i}}_refresh(){if(!this._query)return;let e=this.hasAttribute(`remote`)||this.hasAttribute(`source`);if(e&&this._query.text.length<this._minChars()){this._results=[],this._close();return}e&&!this._answered(this._query.text)&&this._search(this._query.text);let t=this._query.text.toLowerCase(),n=e?this.people:this.people.filter(e=>_s(e.label).toLowerCase().includes(t));this._results=n.slice(0,8),this._renderMenu()}_answered(e){return this._lastSearch===e}_minChars(){let e=this.getAttribute(`min-chars`),t=e==null||e===``?1:Number(e);return Number.isFinite(t)&&t>=0?t:1}_debounce(){let e=this.getAttribute(`debounce`),t=e==null||e===``?250:Number(e);return Number.isFinite(t)&&t>=0?t:250}_search(e){this._lastSearch=e,clearTimeout(this._timer);let t=++this._searchSeq;this._timer=setTimeout(()=>{let n=this.getAttribute(`source`);if(!n){this.dispatchEvent(new CustomEvent(`search`,{bubbles:!0,detail:{query:e,seq:t}}));return}this._fetchPeople(n,e,t)},this._debounce())}async _fetchPeople(e,t,n){this._abort?.abort();let r=new AbortController;this._abort=r,this.loading=!0;let i=await j(`${e}${e.includes(`?`)?`&`:`?`}q=${encodeURIComponent(t)}`,{signal:r.signal});if(n!==this._searchSeq)return;if(this._abort=null,!i.ok){this._peopleProp=[],this.loading=!1;return}let a=this.ownerDocument.createElement(`template`);a.innerHTML=i.html,this._peopleProp=[...a.content.querySelectorAll(`wui-option`)].map(e=>({value:e.getAttribute(`value`)??``,label:e.textContent.trim(),description:e.getAttribute(`data-description`)||void 0,src:e.getAttribute(`data-src`)||void 0})).filter(js),this.loading=!1,this._refresh()}_isOpen(){let e=this._menu();return!!(e&&!e.hidden)}_renderMenu(){let e=this._menu(),t=this._control();if(!e||!t||!this._query)return;let n=this.ownerDocument;if(e.replaceChildren(),this._results.forEach((t,r)=>{let i=n.createElement(`div`);if(i.className=`wui-mention-option`,i.id=`${e.id}-${r}`,i.setAttribute(`role`,`option`),i.setAttribute(`aria-selected`,`false`),i.dataset.index=String(r),t.src){let e=n.createElement(`img`);e.className=`wui-mention-option-photo`,e.src=t.src,e.alt=``,i.appendChild(e)}let a=n.createElement(`span`);a.className=`wui-mention-option-text`;let o=n.createElement(`span`);if(o.className=`wui-mention-option-label`,o.textContent=_s(t.label),a.appendChild(o),t.description){let e=n.createElement(`span`);e.className=`wui-mention-option-description`,e.textContent=String(t.description),a.appendChild(e)}i.appendChild(a),e.appendChild(i)}),!this._results.length){let t=n.createElement(`div`);t.className=`wui-mention-empty`,t.textContent=this._loading?Ts.searching:`${Ts.noMatch} “${this._query.text}”`,e.appendChild(t)}let r=this._isOpen();e.hidden=!1,r||o(this,this._reposition),this._position(),this._setActive(this._results.length?0:-1),this._loading||this._announce(this._results.length?Ts.found(this._results.length):`${Ts.noMatch}.`)}_position(){a(this._control(),this._menu())}_close(){this._query=null,this._lastSearch=void 0,clearTimeout(this._timer);let e=this._menu();e&&!e.hidden&&(e.hidden=!0,e.replaceChildren()),this._active=-1,this._control()?.removeAttribute(`aria-activedescendant`),s(this)}_setActive(e,{reveal:t=!0}={}){let n=this._menu(),r=[...n.querySelectorAll(`.wui-mention-option`)];this._active=e>=0&&e<r.length?e:-1;let i=this._active>=0?r[this._active]:null;for(let e of r)e.setAttribute(`aria-selected`,e===i?`true`:`false`);Jn(n,i),i?(t&&i.scrollIntoView?.({block:`nearest`}),this._control().setAttribute(`aria-activedescendant`,i.id)):this._control().removeAttribute(`aria-activedescendant`)}_onKeyDown(e){if(this._isOpen()&&this._query){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=this._results.length;if(!t)return;let n=e.key===`ArrowDown`?1:-1;this._setActive((this._active+n+t)%t);return}if((e.key===`Enter`||e.key===`Tab`)&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&this._active>=0){e.preventDefault(),this._pick(this._results[this._active]);return}if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this._close();return}}if(e.key===`Enter`&&(e.ctrlKey||e.metaKey)){e.preventDefault(),this.dispatchEvent(new CustomEvent(`wui:mention-input:submit`,{bubbles:!0,detail:{value:this.value}}));return}e.key===`Backspace`&&this._removeWholeMention(e)}_removeWholeMention(e){let t=this._control();if(t.selectionStart!==t.selectionEnd)return;let n=t.selectionStart,r=this._mentions.find(e=>e.end===n);r&&(e.preventDefault(),this._replace(r.start,r.end,``))}_onMenuClick(e){let t=e.target.closest?.(`.wui-mention-option`);t&&this._pick(this._results[Number(t.dataset.index)])}_pick(e){if(!e||!this._query)return;let t=_s(e.label),{start:n,end:r}=this._query,i=this._text.slice(r),a=`@${t}${/^\s/.test(i)?``:` `}`;this._replace(n,r,a,{id:String(e.value),label:t}),this._announce(Ts.mentioned(t))}_replace(e,t,n,r){let i=this._control(),a=n.length-(t-e);this._mentions=this._mentions.filter(n=>n.end<=e||n.start>=t).map(e=>e.start>=t?{...e,start:e.start+a,end:e.end+a}:e),r&&this._mentions.push({start:e,end:e+1+r.label.length,id:r.id,label:r.label}),this._text=this._text.slice(0,e)+n+this._text.slice(t),i.value=this._text;let o=e+n.length;i.setSelectionRange(o,o),this._close(),i.focus(),this._emit()}_onFocusOut(e){e.relatedTarget&&this.contains(e.relatedTarget)||this._close()}_announce(e){let t=this.querySelector(ks);t&&(t.textContent=``,t.textContent=e)}},Ps=`[role="menuitem"]`,Fs=`data-open`,Is=4,Ls=e=>e instanceof Element?e:e?.parentElement??null,Rs=e=>e.getAttribute(`aria-disabled`)===`true`,zs=class extends c{constructor(){super(),this._navPanel=null,this._nav=qn({getVisibleOptions:()=>this._navPanel?this._rows(this._navPanel):[],getActive:()=>this._navPanel?this._rows(this._navPanel).indexOf(document.activeElement):-1,setActive:e=>this._rows(this._navPanel)[e]?.focus({preventScroll:!0})}),this._onKeyDown=e=>this._handleKeyDown(e),this._onClick=e=>this._handleClick(e),this._onMouseOver=e=>this._handleMouseOver(e),this._onFocusIn=e=>this._handleFocusIn(e),this._onFocusOut=e=>{let t=e.relatedTarget;this._openMenu()&&t instanceof Node&&!this.contains(t)&&this.close()},this._onPointerDown=e=>{this._openMenu()&&!this.contains(e.target)&&this.close()}}connectedCallback(){this._teardown(),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`click`,this._onClick),this.addEventListener(`mouseover`,this._onMouseOver),this.addEventListener(`focusin`,this._onFocusIn),this.addEventListener(`focusout`,this._onFocusOut),document.addEventListener(`pointerdown`,this._onPointerDown,!0)}disconnectedCallback(){this._teardown()}open(e,{focus:t=null}={}){let n=this._menus().find(t=>this._triggerOf(t).dataset.key===e);n&&this._openTop(n,t)}close(e=!1){let t=this._openMenu();if(t){for(let e of this._panelOf(t).querySelectorAll(`.wui-menubar-sub > [${Fs}]`))this._setSub(e.parentElement,!1);this._setTop(t,!1),s(this),this._nav.teardown(),e&&this._triggerOf(t).focus({preventScroll:!0})}}_menus(){return[...this.children].filter(e=>e.classList.contains(`wui-menubar-menu`))}_triggerOf(e){return e.children[0]}_panelOf(e){return e.children[1]}_openMenu(){return this._menus().find(e=>this._panelOf(e)?.hasAttribute(Fs))??null}_rows(e){let t=[];for(let n of e.children){let e=n.getAttribute(`role`)===`menuitem`?n:n.classList.contains(`wui-menubar-sub`)?n.children[0]:null;e&&!Rs(e)&&t.push(e)}return t}_setTop(e,t){this._panelOf(e).toggleAttribute(Fs,t),this._triggerOf(e).setAttribute(`aria-expanded`,String(t))}_setSub(e,t){let n=e.children[1];if(!t)for(let e of n.querySelectorAll(`.wui-menubar-sub > [${Fs}]`))this._setSub(e.parentElement,!1);n.toggleAttribute(Fs,t),e.children[0].setAttribute(`aria-expanded`,String(t)),t?this._placeSub(n):(n.removeAttribute(`data-side`),n.style.removeProperty(`--wui-menubar-sub-offset`))}_openTop(e,t){let n=this._openMenu();n&&n!==e&&this.close();let r=this._triggerOf(e),i=this._panelOf(e);if(this._setTop(e,!0),a(r,i),o(this,()=>{let e=this._openMenu();e&&a(this._triggerOf(e),this._panelOf(e))}),t){let e=this._rows(i);(t===`last`?e[e.length-1]:e[0])?.focus({preventScroll:!0})}}_openSub(e,t){let n=e.parentElement;for(let t of n.children)t!==e&&t.classList.contains(`wui-menubar-sub`)&&this._setSub(t,!1);this._setSub(e,!0),t&&this._rows(e.children[1])[0]?.focus({preventScroll:!0})}_placeSub(e){e.removeAttribute(`data-side`),e.style.removeProperty(`--wui-menubar-sub-offset`),e.getBoundingClientRect().right>window.innerWidth-Is&&e.setAttribute(`data-side`,`start`);let t=e.getBoundingClientRect().bottom-(window.innerHeight-Is);t>0&&e.style.setProperty(`--wui-menubar-sub-offset`,`${-t}px`)}_handleFocusIn(e){let t=Ls(e.target)?.closest(`.wui-menubar-trigger`);if(!(!t||!this.contains(t)))for(let e of this._menus())this._triggerOf(e).tabIndex=this._triggerOf(e)===t?0:-1}_handleKeyDown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=Ls(e.target)?.closest(Ps);!t||!this.contains(t)||(t.classList.contains(`wui-menubar-trigger`)?this._barKey(e,t):this._menuKey(e,t))}_barKey(e,t){let n=this._menus(),r=n.findIndex(e=>this._triggerOf(e)===t),i=this._openMenu()!==null,a=t=>{e.preventDefault(),i&&!Rs(this._triggerOf(t))?this._openTop(t,`first`):this._triggerOf(t).focus({preventScroll:!0})};e.key===`ArrowRight`?a(n[(r+1)%n.length]):e.key===`ArrowLeft`?a(n[(r-1+n.length)%n.length]):e.key===`Home`?a(n[0]):e.key===`End`?a(n[n.length-1]):(e.key===`ArrowDown`||e.key===`ArrowUp`)&&!Rs(t)?(e.preventDefault(),this._openTop(n[r],e.key===`ArrowDown`?`first`:`last`)):e.key===`Escape`&&i&&(e.preventDefault(),e.stopPropagation(),this.close(!0))}_menuKey(e,t){let n=t.closest(`[role="menu"]`);if(!n)return;let r=n.classList.contains(`wui-menubar-subpanel`),i=t.closest(`.wui-menubar-menu`),a=this._rows(n),o=a.indexOf(t);if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),a.length&&a[(o+(e.key===`ArrowDown`?1:-1)+a.length)%a.length].focus({preventScroll:!0});else if(e.key===`ArrowRight`)e.preventDefault(),t.hasAttribute(`aria-haspopup`)?this._openSub(t.parentElement,!0):this._adjacent(i,1);else if(e.key===`ArrowLeft`)if(e.preventDefault(),r){let e=n.parentElement;this._setSub(e,!1),e.children[0].focus({preventScroll:!0})}else this._adjacent(i,-1);else if(e.key===`Escape`)if(e.preventDefault(),e.stopPropagation(),r){let e=n.parentElement;this._setSub(e,!1),e.children[0].focus({preventScroll:!0})}else this.close(!0);else e.key===`Tab`?this.close(!0):e.key===` `?(e.preventDefault(),t.click()):(this._navPanel=n,this._nav.handler(e))}_adjacent(e,t){let n=this._menus(),r=n[(n.indexOf(e)+t+n.length)%n.length];r&&r!==e&&!Rs(this._triggerOf(r))&&this._openTop(r,`first`)}_handleClick(e){let t=Ls(e.target)?.closest(Ps);if(!t||!this.contains(t))return;let n=e.detail===0;if(t.classList.contains(`wui-menubar-trigger`)){if(Rs(t))return;let e=t.parentElement;this._openMenu()===e?this.close():this._openTop(e,n?`first`:null),(!n||!this._openMenu())&&t.focus({preventScroll:!0});return}if(Rs(t)){e.preventDefault(),e.stopPropagation();return}if(t.hasAttribute(`aria-haspopup`)){e.preventDefault(),this._openSub(t.parentElement,n);return}let r=t.closest(`.wui-menubar-menu`),i=r?this._triggerOf(r).dataset.key:void 0;this.close(!0),this.dispatchEvent(new CustomEvent(`wui-menubar:select`,{bubbles:!0,detail:{key:t.dataset.key??null,item:t,menu:i??null}}))}_handleMouseOver(e){let t=Ls(e.target)?.closest(Ps);if(!t||!this.contains(t)||Rs(t))return;if(t.classList.contains(`wui-menubar-trigger`)){let e=t.parentElement;this._openMenu()&&this._openMenu()!==e&&(this._openTop(e,null),t.focus({preventScroll:!0}));return}t!==document.activeElement&&t.focus({preventScroll:!0});let n=t.parentElement.classList.contains(`wui-menubar-sub`)&&t.parentElement.children[0]===t?t.parentElement:null;if(n)n.children[1].hasAttribute(Fs)||this._openSub(n,!1);else{let e=t.closest(`[role="menu"]`);for(let t of e.children)t.classList.contains(`wui-menubar-sub`)&&this._setSub(t,!1)}}_teardown(){this.close(),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`mouseover`,this._onMouseOver),this.removeEventListener(`focusin`,this._onFocusIn),this.removeEventListener(`focusout`,this._onFocusOut),document.removeEventListener(`pointerdown`,this._onPointerDown,!0)}},Bs={enter:`Enter`,comma:`,`,space:` `,tab:`Tab`},Vs={enter:`
334
- `,comma:`,`,space:` `,tab:` `},Hs=e=>Bs[e],Us=e=>Vs[e];function Ws(e,t){let n=[String(e??``)];for(let e of t)n=n.flatMap(t=>t.split(e));return n.map(e=>e.trim()).filter(Boolean)}var Gs=(e,t)=>t.some(t=>String(e??``).includes(t)),Ks=class extends c{static formAssociated=!0;_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||`Select`}static get observedAttributes(){return[`placeholder`,`search-placeholder`,`searchable`,`disabled`,`icon`,`size`,`collapse-chips`,`aria-label`,`aria-invalid`,`allow-custom`,`custom-pattern`,`custom-invalid-message`]}constructor(){super(),this._values=[],this._optionsProp=null,this._active=-1,this._typeahead=``,this._typeaheadTimer=null,this._customError=``;try{this._internals=this.attachInternals()}catch{this._internals=null}}connectedCallback(){if(!this._rendered){if(!this._valuesInit&&!this._optionsProp&&!this._values.length){let e=this.getAttribute(`value`);if(e!=null&&e!==``)this._values=e.split(`,`).map(e=>e.trim()).filter(Boolean);else{let e=[...this.querySelectorAll(`:scope > wui-option[selected]`)].map(e=>e.getAttribute(`value`)??e.textContent.trim());e.length&&(this._values=e.map(String))}}this._valuesInit=!0,this._defaultCaptured||=(this._defaultValues=this._values.slice(),!0),this.render();return}this._bindGlobal?.()}formResetCallback(){this.values=(this._defaultValues||[]).slice();let e=this.querySelector(`[data-input]`);e&&(e.value=``),this._setCustomError(``)}attributeChangedCallback(e){if(e===`aria-invalid`){this._syncInvalid();return}e===`custom-pattern`||e===`custom-invalid-message`||this._rendered&&this.render()}_syncInvalid(){let e=this.querySelector(`.search-select-control`);e&&(this.hasAttribute(`aria-invalid`)||this._customError?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}get values(){return this._values.slice()}set values(e){this._values=Array.isArray(e)?e.map(String):[],L(this,this._values),this._rendered&&(this._renderControl(),this._renderOptions(this._query()))}set options(e){if(this._optionsProp=Array.isArray(e)?e:null,this._rendered&&this._allowCustom){this._renderControl(),this._renderOptions(this._query());return}this.isConnected&&this.render()}get options(){return this._readOptions()}get validateCustom(){return this._validateCustom??null}set validateCustom(e){this._validateCustom=typeof e==`function`?e:null}get _allowCustom(){return this.hasAttribute(`allow-custom`)}_query(){let e=this.querySelector(this._allowCustom?`[data-input]`:`.search-select-input`);return e?e.value:``}_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`)??e.textContent.trim(),label:e.innerHTML,icon:e.getAttribute(`icon`)||void 0,[Yn]:!0,selected:e.hasAttribute(`selected`)};for(let[n,r]of Js){let i=e.getAttribute(n);i&&(t[r]=i)}return e.hasAttribute(`disabled`)&&(t.disabled=!0),t}))}_readOptions(){return this._optionsProp?this._optionsProp:(this._snapshotDeclared(),this._declared||[])}_labelFor(e){let t=this._readOptions().find(t=>String(t.value)===String(e));return t?rr(t):tr(e)}_labelHtmlFor(e){let t=this._readOptions().find(t=>String(t.value)===String(e));return t?er(t):z(e)}render(){this._snapshotDeclared();let e=this._allowCustom,t=this.hasAttribute(`searchable`)&&!e,n=this.getAttribute(`search-placeholder`)||`Search…`,r=this.getAttribute(`icon`),i=this.getAttribute(`size`),a=i===`sm`?` search-select-sm`:i===`lg`?` search-select-lg`:``;L(this,this._values),this.id||=`wui-multiselect-${Math.random().toString(36).slice(2,9)}`;let o=`${this.id}-listbox`;this._listboxId=o;let s=this.hasAttribute(`disabled`);if(e){let e=`${this.id}-custom-error`;this.innerHTML=`
333
+ </div>`,this._stage=this.querySelector(`.wui-crop-stage`),this._img=this.querySelector(`.wui-crop-img`),this._frame=this.querySelector(`.wui-crop-frame`),this._slider=this.querySelector(`.wui-crop-zoom`),this._tools=this.querySelector(`.wui-crop-tools`),this._previewBox=this.querySelector(`.wui-crop-previews`),this._live=this.querySelector(`[data-wui-crop-live]`),this._rendered=!0,this._tools.hidden=!this.rotatable,this._applyRound(),this._rebuildHandles(),this._renderPreviews(),this._wire(),this._observe(),this._loadImage()}_applyRound(){this._frame.classList.toggle(`wui-crop-frame--round`,this.round),this._previewBox.classList.toggle(`wui-crop-previews--round`,this.round)}_rebuildHandles(){for(let e of this._frame.querySelectorAll(`.wui-crop-handle`))e.remove();if(!this.aspect)for(let e of Jo){let t=document.createElement(`button`);t.type=`button`,t.className=`wui-crop-handle wui-crop-handle--${e}`,t.dataset.handle=e,t.setAttribute(`aria-label`,`Resize ${ls[e]} corner`),this._frame.appendChild(t)}}_renderPreviews(){let e=es(this.previews);this._previewBox.replaceChildren(),this._previewBox.hidden=e.length===0;for(let t of e){let e=document.createElement(`canvas`);e.className=`wui-crop-preview`,e.dataset.size=String(t),e.style.width=`${t}px`,e.style.height=`${t}px`,this._previewBox.appendChild(e)}this._schedulePreviews()}_loadImage(){this._rect=null,this._natural=null,this._source=null,this._rotation=0,this._drag=null,this._pinch=null,this._pointers.clear();let e=this.src;this._img.hidden=!e,this._frame.hidden=!0,e&&(this._img.onload=()=>{this._source={w:this._img.naturalWidth,h:this._img.naturalHeight},this._natural={...this._source},this._resetRect(),this.dispatchEvent(new Event(`load`))},this._img.onerror=()=>{this._frame.hidden=!0,this.dispatchEvent(new Event(`error`))},this._img.src=e)}_resetRect(){this._natural&&(this._base=Vo(this._natural.w,this._natural.h,this.aspect),this._rect={...this._base},this._frame.hidden=!1,this._paint())}_observe(){typeof ResizeObserver>`u`||this._resizeObserver||(this._resizeObserver=new ResizeObserver(()=>this._paint()),this._resizeObserver.observe(this._stage))}_view(){let e=this._stage.clientWidth||cs.w,t=this._stage.clientHeight||cs.h,n=Math.min(e/this._natural.w,t/this._natural.h),r=this._natural.w*n,i=this._natural.h*n;return{scale:n,left:(e-r)/2,top:(t-i)/2,iw:r,ih:i}}_paint(){if(!this._rect)return;let e=this._view(),t=this._rotation%180!=0,n=t?e.ih:e.iw,r=t?e.iw:e.ih;Object.assign(this._img.style,{left:`${e.left+(e.iw-n)/2}px`,top:`${e.top+(e.ih-r)/2}px`,width:`${n}px`,height:`${r}px`,transform:this._rotation?`rotate(${this._rotation}deg)`:``});let i=this._rect;Object.assign(this._frame.style,{left:`${e.left+i.x*e.scale}px`,top:`${e.top+i.y*e.scale}px`,width:`${i.w*e.scale}px`,height:`${i.h*e.scale}px`});let a=Go(i,this._base),o=Ko(i,this._base);this._slider.max=String(o),this._slider.value=String(Math.min(Math.max(a,1),o)),this._slider.setAttribute(`aria-valuetext`,`${Math.round(a*100)}%`),this._schedulePreviews()}_schedulePreviews(){if(!this._rect||this._previewBox.hidden||this._previewPending)return;this._previewPending=!0;let e=()=>{this._previewPending=!1,this._drawPreviews()};typeof requestAnimationFrame==`function`?requestAnimationFrame(e):e()}_drawPreviews(){if(!this._rect)return;let e=Ho(this._rect,this._natural.w,this._natural.h),t=typeof window<`u`&&window.devicePixelRatio||1;for(let n of this._previewBox.children){let r=Number(n.dataset.size),i=Math.max(1,Math.round(r*e.h/e.w));n.style.width=`${r}px`,n.style.height=`${i}px`,n.width=Math.round(r*t),n.height=Math.round(i*t);let a=n.getContext(`2d`);a&&this._drawCrop(a,e,n.width,n.height)}}_drawCrop(e,t,n,r){if(!this._rotation){e.drawImage(this._img,t.x,t.y,t.w,t.h,0,0,n,r);return}let i=this._source;e.save(),e.scale(n/t.w,r/t.h),e.translate(-t.x,-t.y),e.translate(this._natural.w/2,this._natural.h/2),e.rotate(this._rotation*Math.PI/180),e.drawImage(this._img,-i.w/2,-i.h/2,i.w,i.h),e.restore()}_announce(){this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,detail:this.rect}))}_say(){let e=this._rect,t=this._rotation?`, turned ${this._rotation} degrees`:``,n=`Frame ${Math.round(e.w)} by ${Math.round(e.h)} pixels, ${Math.round(e.x)} from the left, ${Math.round(e.y)} from the top, zoom ${Math.round(Go(e,this._base)*100)}%${t}.`;this._live.textContent=n===this._live.textContent?`${n} `:n}rotate(){if(!this._rect)return;let e=$o(this._rect,this._natural.w,this._natural.h);this._rotation=(this._rotation+90)%360,this._natural=Qo(this._source.w,this._source.h,this._rotation),this._base=Vo(this._natural.w,this._natural.h,this.aspect);let t=this.aspect;this._rect=t&&t!==1?{...this._base}:e,this._paint(),this._announce()}reset(){this._source&&(this._rotation=0,this._natural={...this._source},this._resetRect(),this._announce())}_wire(){let e=this._stage;e.addEventListener(`pointerdown`,t=>{if(!this._rect||t.button>0)return;if(this._pointers.set(t.pointerId,{x:t.clientX,y:t.clientY}),e.setPointerCapture?.(t.pointerId),this._pointers.size===2){let[e,n]=[...this._pointers.values()];this._drag=null,this._pinch={distance:ms(e,n)||1,zoom:this.zoom,done:!1},t.preventDefault();return}if(this._pinch)return;let n=t.target.closest?.(`.wui-crop-handle`);this._drag={id:t.pointerId,corner:n?n.dataset.handle:null,x:t.clientX,y:t.clientY,start:{...this._rect}},n||e.focus(),t.preventDefault()}),e.addEventListener(`pointermove`,t=>{if(this._pointers.has(t.pointerId)&&this._pointers.set(t.pointerId,{x:t.clientX,y:t.clientY}),this._pinch){if(this._pinch.done||this._pointers.size<2||!this._pointers.has(t.pointerId))return;let[e,n]=[...this._pointers.values()],r=this._pinch.zoom*ms(e,n)/this._pinch.distance;this._rect=qo(this._rect,this._base,r,this._natural.w,this._natural.h),this._paint();return}let n=this._drag;if(!n||n.id!==t.pointerId)return;let r=this._view(),{w:i,h:a}=this._natural;if(n.corner){let o=e.getBoundingClientRect(),s=(t.clientX-o.left-e.clientLeft-r.left)/r.scale,c=(t.clientY-o.top-e.clientTop-r.top)/r.scale;this._rect=Yo(this._rect,n.corner,s,c,i,a)}else this._rect=Uo(n.start,(t.clientX-n.x)/r.scale,(t.clientY-n.y)/r.scale,i,a);this._paint()});let t=t=>{if(this._pointers.delete(t.pointerId)&&e.releasePointerCapture?.(t.pointerId),this._pinch){!this._pinch.done&&this._pointers.size<2&&(this._pinch.done=!0,this._announce()),this._pointers.size===0&&(this._pinch=null);return}let n=this._drag;!n||n.id!==t.pointerId||(this._drag=null,this._announce())};e.addEventListener(`pointerup`,t),e.addEventListener(`pointercancel`,t),e.addEventListener(`keydown`,e=>this._onKey(e)),e.addEventListener(`wheel`,e=>{!this._rect||!this.contains(document.activeElement)||(e.preventDefault(),this.zoom*=e.deltaY<0?1.1:1/1.1)},{passive:!1});for(let e of[`input`,`change`])this._slider.addEventListener(e,e=>e.stopPropagation());this._slider.addEventListener(`input`,()=>{this.zoom=Number(this._slider.value)});for(let e of this.querySelectorAll(`.wui-crop-zoombtn`))e.addEventListener(`click`,()=>{this.zoom*=e.dataset.zoom===`in`?1.25:.8});this.querySelector(`[data-crop-action="rotate"]`).addEventListener(`click`,()=>this.rotate()),this.querySelector(`[data-crop-action="reset"]`).addEventListener(`click`,()=>this.reset())}_onKey(e){if(!this._rect||e.altKey||e.ctrlKey||e.metaKey)return;let{w:t,h:n}=this._natural;if(e.key===`+`||e.key===`=`)this.zoom*=1.25,this._say();else if(e.key===`-`||e.key===`_`)this.zoom*=.8,this._say();else if((e.key===`r`||e.key===`R`)&&this.rotatable)this.rotate(),this._say();else if(e.key.startsWith(`Arrow`)){let r=e.shiftKey?ss:os,i=e.key===`ArrowRight`?1:e.key===`ArrowLeft`?-1:0,a=e.key===`ArrowDown`?1:e.key===`ArrowUp`?-1:0,o=e.target.closest?.(`.wui-crop-handle`)?.dataset.handle;if(o){let e=this._rect,s=(o.endsWith(`w`)?e.x:e.x+e.w)+i*r*e.w,c=(o.startsWith(`n`)?e.y:e.y+e.h)+a*r*e.h;this._rect=Yo(e,o,s,c,t,n)}else this._rect=Uo(this._rect,i*r*this._rect.w,a*r*this._rect.h,t,n);this._paint(),this._announce(),this._say()}else return;e.preventDefault()}async toBlob({type:e,maxBytes:t=0,size:n=0}={}){if(!this._rect)return null;let r=rs(e),i=Ho(this._rect,this._natural.w,this._natural.h),{width:a,height:o}=n>0?Zo(i,n):Xo(i);return as((e,t,n,r)=>new Promise(a=>{let o=document.createElement(`canvas`);o.width=e,o.height=t;let s=o.getContext(`2d`);if(!s){a(null);return}n===`image/jpeg`&&(s.fillStyle=`#fff`,s.fillRect(0,0,e,t)),this._drawCrop(s,i,e,t),o.toBlob(a,n,r)}),{width:a,height:o,type:r,maxBytes:t})}async toFile({name:e,type:t,maxBytes:n=0,size:r=0}={}){let i=await this.toBlob({type:t,maxBytes:n,size:r});return i?new File([i],is(e,i.type),{type:i.type}):null}},gs=Object.freeze([`text`,`number`,`select`,`date`,`textarea`]),_s=2e3,vs=Object.freeze({edit:e=>`Edit ${e}: `,readOnly:e=>`${e}: `,saved:e=>`${e} saved.`,notSaved:(e,t)=>`${e} was not saved. ${t}`,failed:Object.freeze({forbidden:`You do not have permission to change this.`,client:`This could not be saved. Refresh the page and try again.`,validation:`This value was not accepted. Check it and try again.`,server:`Something went wrong on our side, so this was not saved. Try again in a moment.`,network:`Could not reach the server, so this was not saved. Check your connection and try again.`})});function ys(e,{type:t=`text`,options:n,placeholder:r}={}){let i=e==null?``:String(e);if(i===``)return{text:r||`-`,empty:!0};if(t===`date`)return{text:eo(i)||i,empty:!1};if(t===`select`){let e=n?.find(e=>String(e.value)===i);return{text:typeof e?.label==`string`?e.label:i,empty:!1}}return{text:i,empty:!1}}var bs=`[data-wui-display]`,xs=`[data-wui-value]`,Ss=`[data-wui-editor]`,Cs=`[data-wui-control]`,ws=`[data-wui-error]`,Ts=`[data-wui-live]`,Es=`[aria-expanded="true"]`,Ds=new Set([`select`,`date`]),Os=e=>typeof e?.message==`string`&&e.message?e.message:vs.failed.server,ks=class extends c{static get observedAttributes(){return[`disabled`]}constructor(){super(),this._wired=!1,this._editing=!1,this._busy=!1,this._draft=null,this._pressed=!1,this._popupOpen=!1,this._savedTimer=null,this._onClick=this._onClick.bind(this),this._onKeyCapture=this._onKeyCapture.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onFocusOut=this._onFocusOut.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onChange=this._onChange.bind(this)}connectedCallback(){this._wired||(this._wired=!0,this.addEventListener(`click`,this._onClick),this.addEventListener(`auxclick`,this._onClick),this.addEventListener(`keydown`,this._onKeyCapture,!0),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`pointerdown`,this._onPointerDown),this.addEventListener(`change`,this._onChange))}disconnectedCallback(){clearTimeout(this._savedTimer),this._savedTimer=null,this._releasePress()}attributeChangedCallback(e){e===`disabled`&&this.hasAttribute(`disabled`)&&this.cancel()}edit(){if(this._editing||this._busy||this.hasAttribute(`disabled`))return;let e=this.querySelector(bs),t=this.querySelector(Ss),n=this._control();!e||!t||!n||(this._editing=!0,this._setState(null),n.value=this._draft??this._value(),e.hidden=!0,t.hidden=!1,this.setAttribute(`data-wui-editing`,``),this._focusControl(n))}cancel(){this._editing&&(this._draft=null,this._setError(null),this.getAttribute(`data-wui-state`)===`error`&&this._setState(null),this._close())}_onClick(e){e.stopPropagation(),e.type===`click`&&!this._editing&&this.querySelector(bs)?.contains(e.target)&&this.edit()}_onKeyCapture(){this._popupOpen=!!(this._editing&&this.querySelector(Ss)?.querySelector(Es))}_onKeyDown(e){if(!this._editing){(e.key===`Enter`||e.key===` `)&&e.stopPropagation();return}if(e.stopPropagation(),this._popupOpen)return;if(e.key===`Escape`){e.preventDefault(),this.cancel();return}let t=this._type();e.key!==`Enter`||Ds.has(t)||t===`textarea`&&!(e.ctrlKey||e.metaKey)||(e.preventDefault(),this._commit(this._control()?.value??``))}_onFocusOut(e){if(!this._editing||this._pressed)return;let t=e.relatedTarget;t&&this.contains(t)||document.hasFocus()&&this._commit(this._control()?.value??``)}_onPointerDown(){this._editing&&(this._pressed=!0,document.addEventListener(`pointerup`,this._onPointerUp,!0),document.addEventListener(`pointercancel`,this._onPointerUp,!0))}_onPointerUp(){this._releasePress(),setTimeout(()=>{this._pressed=!1,this._editing&&!this.contains(document.activeElement)&&document.hasFocus()&&this._commit(this._control()?.value??``)},0)}_releasePress(){document.removeEventListener(`pointerup`,this._onPointerUp,!0),document.removeEventListener(`pointercancel`,this._onPointerUp,!0)}_onChange(e){if(!this._editing||!Ds.has(this._type()))return;let t=this._control();!t||e.target!==t||queueMicrotask(()=>this._commit(t.value))}async _commit(e){if(!this._editing||this._busy)return;let t=this._value();if(e===t){this.cancel();return}let n=typeof this.validate==`function`?this.validate(e):null;if(n){this._setError(n),this._announce(n);return}let r=this.hasAttribute(`controlled`);this._draft=null,this._setError(null),this._busy=!0,this._setState(`saving`),this.setAttribute(`aria-busy`,`true`);let i=r?null:this._readShown();r||this._showValue(e),this._close();let a=await this._persist(e,r);this._busy=!1,this.removeAttribute(`aria-busy`);let o=this.getAttribute(`label`)||``;if(a.ok){this.setAttribute(`value`,e),!r&&a.text&&this._showText(a.text,!1),this._setState(`saved`),this._savedTimer=setTimeout(()=>this._setState(null),_s),this._announce(vs.saved(o)),this._fire(`wui:inline-edit:saved`,{value:e,previous:t});return}if(i&&this._restoreShown(i),a.kind===`session`||a.kind===`aborted`){this._setState(null);return}this._draft=e,this._setState(`error`),this._setError(a.message),this._announce(vs.notSaved(o,a.message)),this._fire(`wui:inline-edit:failed`,{value:e,previous:t,kind:a.kind,message:a.message})}async _persist(e,t){if(t){if(typeof this.save!=`function`)return{ok:!0};try{return await this.save(e),{ok:!0}}catch(e){return{ok:!1,kind:`server`,message:Os(e)}}}let n=this.getAttribute(`action`);if(!n)return{ok:!0};let r=await F(n,{method:`POST`,body:new URLSearchParams({[this.getAttribute(`name`)||`value`]:e})});return r.ok?{ok:!0,text:r.html.trim()}:{ok:!1,kind:r.kind,message:r.message||vs.failed[r.kind]||vs.failed.server}}_close(){let e=this.querySelector(bs),t=this.querySelector(Ss),n=this.contains(document.activeElement);this._editing=!1,this.removeAttribute(`data-wui-editing`),t&&(t.hidden=!0),e&&(e.hidden=!1),t?.querySelector(Es)?.click(),n&&e?.focus()}_focusControl(e){if(!Ds.has(this._type())){e.focus(),e.select?.();return}let t=e.querySelector(`button`);t&&(t.focus(),t.getAttribute(`aria-expanded`)!==`true`&&t.click())}_showValue(e){if(e===``){this._showText(this.getAttribute(`placeholder`)||`-`,!0);return}let t=this._type(),n=e;if(t===`date`)n=eo(e)||e;else if(t===`select`){let t=[...this._control()?.querySelectorAll(`[data-value]`)??[]].find(t=>t.getAttribute(`data-value`)===e);t&&(n=t.textContent.trim())}this._showText(n,!1)}_readShown(){let e=this.querySelector(xs);return e?{html:e.innerHTML,empty:e.hasAttribute(`data-wui-empty`)}:null}_restoreShown(e){let t=this.querySelector(xs);t&&(t.innerHTML=e.html,t.toggleAttribute(`data-wui-empty`,e.empty))}_showText(e,t){let n=this.querySelector(xs);n&&(n.textContent=e,n.toggleAttribute(`data-wui-empty`,t))}_setError(e){let t=this.querySelector(ws),n=this._control();t&&(t.textContent=e||``,t.hidden=!e),e?n?.setAttribute(`aria-invalid`,`true`):n?.removeAttribute(`aria-invalid`)}_setState(e){clearTimeout(this._savedTimer),this._savedTimer=null,e?this.setAttribute(`data-wui-state`,e):this.removeAttribute(`data-wui-state`)}_announce(e){let t=this.querySelector(Ts);!t||!e||(t.textContent=``,t.textContent=e)}_fire(e,t){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:t}))}_control(){return this.querySelector(Cs)}_value(){return this.getAttribute(`value`)??``}_type(){let e=this.getAttribute(`type`);return gs.includes(e)?e:`text`}},As=`a.wui-lightbox-item`,Y=1,js=4,Ms=.5,Ns=2,Ps=50,Fs=6,Is=300,Ls=300;function Rs(e){return Number.isFinite(e)?Math.min(js,Math.max(Y,e)):Y}function zs(e,t,n,r){let i=(e,n)=>Math.max(0,(e*t-n)/2),a=i(r.width,n.width),o=i(r.height,n.height);return{x:Math.min(a,Math.max(-a,e.x)),y:Math.min(o,Math.max(-o,e.y))}}function Bs(e,t){return Math.abs(e)<Ps||Math.abs(e)<Math.abs(t)*1.5?0:e<0?1:-1}function Vs(e){let t=String(e??``).split(/[?#]/)[0].split(`/`).filter(Boolean).pop()??``;try{return decodeURIComponent(t)}catch{return t}}function Hs(e,t,n={}){let r=document.createElement(e);r.className=t;for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return r}function Us(e,t,n){let r=Hs(`button`,`u-action wui-lightbox-btn ${n}`,{type:`button`,"aria-label":t,title:t});return r.style.setProperty(`--wui-action-size`,`40px`),r.innerHTML=M(e,{size:20}),r}var Ws=class extends c{constructor(){super(),this._ui=null,this._index=0,this._zoom=Y,this._pan={x:0,y:0},this._pointers=new Map,this._gesture=null,this._lastTap=-1/0,this._returnTo=null,this._lockedOverflow=null,this._onClick=e=>{if(e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return;let t=e.target?.closest?.(As);if(!t||!this.contains(t))return;let n=this._links().indexOf(t);n<0||(e.preventDefault(),this.open(n))}}get download(){return this.hasAttribute(`download`)}set download(e){this.toggleAttribute(`download`,e===!0||e===``||e===`true`)}get label(){return this.getAttribute(`label`)||`Image viewer`}set label(e){this.setAttribute(`label`,String(e??``))}get isOpen(){return this._ui!==null}connectedCallback(){this.addEventListener(`click`,this._onClick)}disconnectedCallback(){this.removeEventListener(`click`,this._onClick),this._teardown()}_links(){return[...this.querySelectorAll(As)]}_items(){return this._links().map(e=>{let t=e.getAttribute(`href`)??``;return{link:e,src:t,alt:e.querySelector(`img`)?.getAttribute(`alt`)??``,caption:e.dataset.caption??``,name:e.dataset.name||Vs(t)}})}open(e=0){let t=this._items();return t.length?(this._ui||(this._returnTo=document.activeElement,this._build(),this.dispatchEvent(new CustomEvent(`wui-lightbox:open`,{bubbles:!0,detail:{index:e}}))),this._show(e,t),this._ui.close.focus(),!0):!1}close(){if(!this._ui)return;let e=this._index,t=this._links()[e]??this._returnTo;this._teardown(),t?.isConnected&&t.focus(),this._returnTo=null,this.dispatchEvent(new CustomEvent(`wui-lightbox:close`,{bubbles:!0,detail:{index:e}}))}_teardown(){this._ui&&(this._ui.root.remove(),this._ui=null,this._pointers.clear(),this._gesture=null,this._lockedOverflow!==null&&(document.documentElement.style.overflow=this._lockedOverflow,this._lockedOverflow=null))}_build(){let e=Hs(`div`,`wui-lightbox-overlay`,{role:`dialog`,"aria-modal":`true`,"aria-label":this.label,tabindex:`-1`}),t=Hs(`div`,`wui-lightbox-bar`),n=Hs(`span`,`wui-lightbox-count`,{"aria-live":`polite`}),r=Hs(`div`,`wui-lightbox-tools`),i=Us(`zoom-out`,`Zoom out`,`wui-lightbox-zoom-out`),a=Us(`zoom-in`,`Zoom in`,`wui-lightbox-zoom-in`),o=Hs(`a`,`u-action wui-lightbox-btn wui-lightbox-download`,{"aria-label":`Download`,title:`Download`});o.style.setProperty(`--wui-action-size`,`40px`),o.innerHTML=M(`download`,{size:20}),o.hidden=!this.download;let s=Us(`x`,`Close`,`wui-lightbox-close`);r.append(i,a,o,s),t.append(n,r);let c=Hs(`div`,`wui-lightbox-stage`),l=Us(`chevron-left`,`Previous image`,`wui-lightbox-nav wui-lightbox-prev`),u=Us(`chevron-right`,`Next image`,`wui-lightbox-nav wui-lightbox-next`),d=Hs(`img`,`wui-lightbox-image`,{decoding:`async`,draggable:`false`,alt:``}),f=Hs(`p`,`wui-lightbox-status`,{role:`status`});c.append(d,f,l,u);let p=Hs(`p`,`wui-lightbox-caption`);e.append(t,c,p);let m={root:e,count:n,zoomOut:i,zoomIn:a,download:o,close:s,stage:c,prev:l,next:u,image:d,status:f,caption:p};this._ui=m,s.addEventListener(`click`,()=>this.close()),l.addEventListener(`click`,()=>this.step(-1)),u.addEventListener(`click`,()=>this.step(1)),i.addEventListener(`click`,()=>this._setZoom(this._zoom-Ms)),a.addEventListener(`click`,()=>this._setZoom(this._zoom+Ms)),e.addEventListener(`keydown`,e=>this._onKeyDown(e)),c.addEventListener(`pointerdown`,e=>this._onPointerDown(e)),c.addEventListener(`pointermove`,e=>this._onPointerMove(e)),c.addEventListener(`pointerup`,e=>this._onPointerEnd(e,!0)),c.addEventListener(`pointercancel`,e=>this._onPointerEnd(e,!1)),c.addEventListener(`wheel`,e=>this._onWheel(e),{passive:!1}),d.addEventListener(`load`,()=>{this._ui===m&&(f.textContent=``,c.removeAttribute(`aria-busy`),d.hidden=!1,this._applyTransform())}),d.addEventListener(`error`,()=>{this._ui===m&&(c.removeAttribute(`aria-busy`),d.hidden=!0,f.textContent=`This image can't be shown.`)}),this.append(e),this._lockedOverflow=document.documentElement.style.overflow,document.documentElement.style.overflow=`hidden`}step(e){if(!this._ui||!e)return;let t=this._items();t.length<2||this._show((this._index+e+t.length)%t.length,t)}_show(e,t){let n=this._ui,r=Math.min(t.length-1,Math.max(0,Math.trunc(Number(e))||0)),i=t[r],a=r!==this._index||!n.image.getAttribute(`src`);if(this._index=r,this._zoom=Y,this._pan={x:0,y:0},n.count.textContent=`${A(r+1,{decimals:0})} of ${A(t.length,{decimals:0})}`,n.caption.textContent=i.caption,n.caption.hidden=!i.caption,n.download.href=i.src,n.download.setAttribute(`download`,i.name),n.prev.hidden=n.next.hidden=t.length<2,n.stage.setAttribute(`aria-busy`,`true`),n.status.textContent=``,n.image.hidden=!1,n.image.alt=i.alt||i.caption,n.image.src=i.src,this._applyTransform(),this._syncZoomButtons(),t.length>1)for(let e of[t[(r+1)%t.length],t[(r-1+t.length)%t.length]])new Image().src=e.src;a&&this.dispatchEvent(new CustomEvent(`wui-lightbox:change`,{bubbles:!0,detail:{index:r}}))}_syncZoomButtons(){this._ui.zoomOut.disabled=this._zoom<=Y,this._ui.zoomIn.disabled=this._zoom>=js;let e=document.activeElement;(e===this._ui.zoomOut||e===this._ui.zoomIn)&&e.disabled&&this._ui.close.focus()}_setZoom(e){this._ui&&(this._zoom=Rs(e),this._pan=this._clampedPan(this._pan),this._applyTransform(),this._syncZoomButtons())}_clampedPan(e){let{stage:t,image:n}=this._ui;return zs(e,this._zoom,{width:t.clientWidth,height:t.clientHeight},{width:n.offsetWidth,height:n.offsetHeight})}_applyTransform(){let{image:e,stage:t}=this._ui;e.style.transform=`translate(${this._pan.x}px, ${this._pan.y}px) scale(${this._zoom})`,t.classList.toggle(`wui-lightbox-zoomed`,this._zoom>Y)}_onKeyDown(e){if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),this.close();else if(e.key===`Tab`)this._trapTab(e);else if(e.key===`ArrowLeft`||e.key===`ArrowRight`)e.preventDefault(),this.step(e.key===`ArrowRight`?1:-1);else if(e.key===`Home`||e.key===`End`){e.preventDefault();let t=this._items();this._show(e.key===`Home`?0:t.length-1,t)}else e.key===`+`||e.key===`=`?(e.preventDefault(),this._setZoom(this._zoom+Ms)):e.key===`-`?(e.preventDefault(),this._setZoom(this._zoom-Ms)):e.key===`0`&&(e.preventDefault(),this._setZoom(Y))}_trapTab(e){let t=[...this._ui.root.querySelectorAll(`button, a[href]`)].filter(e=>!e.hidden&&!e.disabled);if(!t.length){e.preventDefault();return}let n=t[0],r=t[t.length-1],i=document.activeElement;e.shiftKey&&(i===n||!this._ui.root.contains(i))?(e.preventDefault(),r.focus()):!e.shiftKey&&(i===r||!this._ui.root.contains(i))&&(e.preventDefault(),n.focus())}_onWheel(e){e.preventDefault(),this._setZoom(this._zoom*(e.deltaY<0?1.15:1/1.15))}_onPointerDown(e){if(!e.target.closest(`.wui-lightbox-nav`))if(this._ui.stage.setPointerCapture?.(e.pointerId),this._pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),this._pointers.size===2){let[e,t]=[...this._pointers.values()];this._gesture={kind:`pinch`,distance:Math.hypot(e.x-t.x,e.y-t.y)||1,zoom:this._zoom}}else this._pointers.size===1&&(this._gesture={kind:`drag`,startX:e.clientX,startY:e.clientY,startTime:e.timeStamp,pan:{...this._pan},onImage:e.target===this._ui.image,moved:!1})}_onPointerMove(e){let t=this._gesture;if(!(!t||!this._pointers.has(e.pointerId))){if(this._pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),t.kind===`pinch`&&this._pointers.size===2){let[e,n]=[...this._pointers.values()];this._setZoom(t.zoom*Math.hypot(e.x-n.x,e.y-n.y)/t.distance)}else if(t.kind===`drag`){let n=e.clientX-t.startX,r=e.clientY-t.startY;Math.hypot(n,r)>Fs&&(t.moved=!0),this._zoom>Y&&(this._pan=this._clampedPan({x:t.pan.x+n,y:t.pan.y+r}),this._ui.stage.classList.add(`is-dragging`),this._applyTransform())}}}_onPointerEnd(e,t){let n=this._gesture;if(this._pointers.delete(e.pointerId),this._ui?.stage.classList.remove(`is-dragging`),!n)return;if(n.kind===`pinch`){this._pointers.size<2&&(this._gesture=null);return}if(this._gesture=null,!t)return;let r=e.clientX-n.startX,i=e.clientY-n.startY;if(n.moved){this._zoom===Y&&this.step(Bs(r,i));return}if(!(e.timeStamp-n.startTime>Is)){if(!n.onImage){this.close();return}e.timeStamp-this._lastTap<Ls?(this._lastTap=-1/0,this._setZoom(this._zoom>Y?Y:Ns)):this._lastTap=e.timeStamp}}},Gs=/^[A-Za-z0-9_.:-]{1,64}$/,Ks=/@(\\+)\[|@\[([^[\]\n]{1,100})\]\(([A-Za-z0-9_.:-]{1,64})\)/g,qs=/@(\\*)\[/g;function Js(e){return String(e??``).replace(/[[\]\r\n]+/g,` `).replace(/\s+/g,` `).trim().slice(0,100)}var Ys=e=>e.replace(qs,(e,t)=>`@\\${t}[`);function Xs(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(Ks))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 Zs(e){let t=``,n=[];for(let r of Xs(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 Qs(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}`||!Gs.test(e.id)||(i+=Ys(n.slice(a,e.start)),i+=`@[${e.label}](${e.id})`,a=e.end);return i+Ys(n.slice(a))}function $s(e){let t=[];for(let n of Xs(e))`id`in n&&!t.includes(n.id)&&t.push(n.id);return t}var ec=8,tc=40,nc=Object.freeze({listName:`People`,searching:`Searching…`,noMatch:`No one matches`,found:e=>`${e===1?`1 person`:`${A(e,{decimals:0})} people`}. Up and down to choose, Enter to mention.`,mentioned:e=>`Mentioned ${e}.`}),rc=`[data-wui-control]`,ic=`[data-wui-field]`,ac=`[data-wui-menu]`,oc=`[data-wui-live]`,sc=0,cc=e=>e&&Gs.test(String(e.value??``))&&Js(e.label)!==``;function lc(e){let t=e.ownerDocument;e.id||=`wui-mention-${++sc}`;let n=t.createElement(`textarea`);n.id=`${e.id}-text`,n.className=`form-control textarea wui-mention-input-text`,n.rows=Number(e.getAttribute(`rows`))>0?Number(e.getAttribute(`rows`)):3,n.setAttribute(`data-wui-control`,``),n.setAttribute(`aria-autocomplete`,`list`),n.setAttribute(`aria-controls`,`${e.id}-people`);let r=e.getAttribute(`label`);r&&n.setAttribute(`aria-label`,r);let i=e.getAttribute(`placeholder`);i&&(n.placeholder=i);for(let t of[`aria-describedby`,`aria-invalid`]){let r=e.getAttribute(t);r&&n.setAttribute(t,r)}n.disabled=e.hasAttribute(`disabled`),e.appendChild(n);let a=e.getAttribute(`name`);if(a){let n=t.createElement(`input`);n.type=`hidden`,n.name=a,n.value=e.getAttribute(`value`)??``,n.setAttribute(`data-wui-field`,``),e.appendChild(n)}let o=t.createElement(`div`);o.className=`wui-mention-menu`,o.id=`${e.id}-people`,o.setAttribute(`role`,`listbox`),o.setAttribute(`aria-label`,nc.listName),o.setAttribute(`data-wui-menu`,``),o.hidden=!0,e.appendChild(o);let s=t.createElement(`span`);s.className=`visually-hidden`,s.setAttribute(`data-wui-live`,``),s.setAttribute(`aria-live`,`polite`),s.setAttribute(`aria-atomic`,`true`),e.appendChild(s)}var uc=class extends c{static get observedAttributes(){return[`disabled`,`aria-invalid`,`aria-describedby`]}constructor(){super(),this._wired=!1,this._text=``,this._mentions=[],this._peopleProp=null,this._declared=null,this._loading=!1,this._query=null,this._results=[],this._active=-1,this._timer=null,this._searchSeq=0,this._abort=null,this._onInput=this._onInput.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onCaret=this._onCaret.bind(this),this._onFocusOut=this._onFocusOut.bind(this),this._onMenuDown=e=>e.preventDefault(),this._onMenuClick=this._onMenuClick.bind(this),this._reposition=()=>{this._isOpen()&&this._position()}}connectedCallback(){for(let e of[`people`,`loading`,`value`])if(Object.hasOwn(this,e)){let t=this[e];delete this[e],this[e]=t}if(this._wired)return;this._wired=!0,this.querySelector(rc)||lc(this);let e=this._control(),t=this.querySelector(ic)?.value??this.getAttribute(`value`)??``;this._pendingValue===void 0?this._load(t):this._load(this._pendingValue),this._pendingValue=void 0,e.addEventListener(`input`,this._onInput),e.addEventListener(`keydown`,this._onKeyDown),e.addEventListener(`click`,this._onCaret),e.addEventListener(`keyup`,this._onCaret),this.addEventListener(`focusout`,this._onFocusOut);let n=this._menu();n.addEventListener(`mousedown`,this._onMenuDown),n.addEventListener(`click`,this._onMenuClick),n.addEventListener(`mousemove`,e=>{let t=e.target.closest?.(`.wui-mention-option`);t&&Number(t.dataset.index)!==this._active&&this._setActive(Number(t.dataset.index),{reveal:!1})})}disconnectedCallback(){this._close(),clearTimeout(this._timer),this._abort?.abort()}attributeChangedCallback(e,t,n){let r=this._control();r&&(e===`disabled`?(r.disabled=n!==null,n!==null&&this._close()):n===null?r.removeAttribute(e):r.setAttribute(e,n))}get value(){return Qs(this._text,this._mentions)}set value(e){let t=e==null?``:String(e);if(!this._wired){this._pendingValue=t;return}t!==this.value&&this._load(t)}get mentions(){let e=new Set,t=[];for(let n of[...this._mentions].sort((e,t)=>e.start-t.start))e.has(n.id)||(e.add(n.id),t.push({id:n.id,label:n.label}));return t}get people(){return this._peopleProp?this._peopleProp:(this._declared||=[...this.querySelectorAll(`[data-wui-people] > wui-option`)].map(e=>({value:e.getAttribute(`value`)??``,label:e.textContent.trim(),description:e.getAttribute(`data-description`)||void 0,src:e.getAttribute(`data-src`)||void 0})),this._declared)}set people(e){this._peopleProp=Array.isArray(e)?e.filter(cc):[],(this._isOpen()||this._query!==null)&&this._refresh()}get loading(){return this._loading}set loading(e){this._loading=!!e,this._query!==null&&this._renderMenu()}focus(e){this._control()?.focus(e)}clear(){this._load(``),this._emit()}_control(){return this.querySelector(rc)}_menu(){return this.querySelector(ac)}_load(e){let{text:t,mentions:n}=Zs(e);this._text=t,this._mentions=n;let r=this._control();r&&(r.defaultValue=t,r.value=t),this._syncField(),this._close()}_syncField(){let e=this.querySelector(ic);e&&(e.value=this.value)}_emit(){this._syncField(),this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,detail:{value:this.value,mentions:this.mentions}}))}_onInput(){let e=this._control(),t=e.value,n=this._text,r=t.length-n.length,i=Math.min(n.length,t.length),a=Math.max(0,Math.min(i,e.selectionEnd-Math.max(r,0))),o=0;for(;o<a&&n[o]===t[o];)o++;let s=0;for(;s<i-o&&n[n.length-1-s]===t[t.length-1-s];)s++;let c=n.length-s;this._mentions=this._mentions.filter(e=>e.end<=o||e.start>=c).map(e=>e.start>=c?{...e,start:e.start+r,end:e.end+r}:e),this._text=t,this._emit(),this._onCaret()}_onCaret(e){if(e?.type===`keyup`&&[`ArrowUp`,`ArrowDown`,`Enter`,`Tab`,`Escape`].includes(e.key))return;let t=this._queryAtCaret();if(!t){this._close();return}this._query&&t.text===this._query.text&&t.start===this._query.start||(this._query=t,this._refresh())}_queryAtCaret(){let e=this._control();if(!e||e.disabled||e.selectionStart!==e.selectionEnd)return null;let t=e.selectionStart,n=this._text,r=n.lastIndexOf(`@`,t-1);if(r<0||r>0&&!/[\s([{"'“‘]/.test(n[r-1]))return null;let i=n.slice(r+1,t);return i.length>40||/[\n@]/.test(i)||/^\s/.test(i)||/\s{2}/.test(i)||this._mentions.some(e=>r>=e.start&&r<e.end)?null:{start:r,end:t,text:i}}_refresh(){if(!this._query)return;let e=this.hasAttribute(`remote`)||this.hasAttribute(`source`);if(e&&this._query.text.length<this._minChars()){this._results=[],this._close();return}e&&!this._answered(this._query.text)&&this._search(this._query.text);let t=this._query.text.toLowerCase(),n=e?this.people:this.people.filter(e=>Js(e.label).toLowerCase().includes(t));this._results=n.slice(0,8),this._renderMenu()}_answered(e){return this._lastSearch===e}_minChars(){let e=this.getAttribute(`min-chars`),t=e==null||e===``?1:Number(e);return Number.isFinite(t)&&t>=0?t:1}_debounce(){let e=this.getAttribute(`debounce`),t=e==null||e===``?250:Number(e);return Number.isFinite(t)&&t>=0?t:250}_search(e){this._lastSearch=e,clearTimeout(this._timer);let t=++this._searchSeq;this._timer=setTimeout(()=>{let n=this.getAttribute(`source`);if(!n){this.dispatchEvent(new CustomEvent(`search`,{bubbles:!0,detail:{query:e,seq:t}}));return}this._fetchPeople(n,e,t)},this._debounce())}async _fetchPeople(e,t,n){this._abort?.abort();let r=new AbortController;this._abort=r,this.loading=!0;let i=await F(`${e}${e.includes(`?`)?`&`:`?`}q=${encodeURIComponent(t)}`,{signal:r.signal});if(n!==this._searchSeq)return;if(this._abort=null,!i.ok){this._peopleProp=[],this.loading=!1;return}let a=this.ownerDocument.createElement(`template`);a.innerHTML=i.html,this._peopleProp=[...a.content.querySelectorAll(`wui-option`)].map(e=>({value:e.getAttribute(`value`)??``,label:e.textContent.trim(),description:e.getAttribute(`data-description`)||void 0,src:e.getAttribute(`data-src`)||void 0})).filter(cc),this.loading=!1,this._refresh()}_isOpen(){let e=this._menu();return!!(e&&!e.hidden)}_renderMenu(){let e=this._menu(),t=this._control();if(!e||!t||!this._query)return;let n=this.ownerDocument;if(e.replaceChildren(),this._results.forEach((t,r)=>{let i=n.createElement(`div`);if(i.className=`wui-mention-option`,i.id=`${e.id}-${r}`,i.setAttribute(`role`,`option`),i.setAttribute(`aria-selected`,`false`),i.dataset.index=String(r),t.src){let e=n.createElement(`img`);e.className=`wui-mention-option-photo`,e.src=t.src,e.alt=``,i.appendChild(e)}let a=n.createElement(`span`);a.className=`wui-mention-option-text`;let o=n.createElement(`span`);if(o.className=`wui-mention-option-label`,o.textContent=Js(t.label),a.appendChild(o),t.description){let e=n.createElement(`span`);e.className=`wui-mention-option-description`,e.textContent=String(t.description),a.appendChild(e)}i.appendChild(a),e.appendChild(i)}),!this._results.length){let t=n.createElement(`div`);t.className=`wui-mention-empty`,t.textContent=this._loading?nc.searching:`${nc.noMatch} “${this._query.text}”`,e.appendChild(t)}let r=this._isOpen();e.hidden=!1,r||o(this,this._reposition),this._position(),this._setActive(this._results.length?0:-1),this._loading||this._announce(this._results.length?nc.found(this._results.length):`${nc.noMatch}.`)}_position(){a(this._control(),this._menu())}_close(){this._query=null,this._lastSearch=void 0,clearTimeout(this._timer);let e=this._menu();e&&!e.hidden&&(e.hidden=!0,e.replaceChildren()),this._active=-1,this._control()?.removeAttribute(`aria-activedescendant`),s(this)}_setActive(e,{reveal:t=!0}={}){let n=this._menu(),r=[...n.querySelectorAll(`.wui-mention-option`)];this._active=e>=0&&e<r.length?e:-1;let i=this._active>=0?r[this._active]:null;for(let e of r)e.setAttribute(`aria-selected`,e===i?`true`:`false`);ai(n,i),i?(t&&i.scrollIntoView?.({block:`nearest`}),this._control().setAttribute(`aria-activedescendant`,i.id)):this._control().removeAttribute(`aria-activedescendant`)}_onKeyDown(e){if(this._isOpen()&&this._query){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=this._results.length;if(!t)return;let n=e.key===`ArrowDown`?1:-1;this._setActive((this._active+n+t)%t);return}if((e.key===`Enter`||e.key===`Tab`)&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&this._active>=0){e.preventDefault(),this._pick(this._results[this._active]);return}if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this._close();return}}if(e.key===`Enter`&&(e.ctrlKey||e.metaKey)){e.preventDefault(),this.dispatchEvent(new CustomEvent(`wui:mention-input:submit`,{bubbles:!0,detail:{value:this.value}}));return}e.key===`Backspace`&&this._removeWholeMention(e)}_removeWholeMention(e){let t=this._control();if(t.selectionStart!==t.selectionEnd)return;let n=t.selectionStart,r=this._mentions.find(e=>e.end===n);r&&(e.preventDefault(),this._replace(r.start,r.end,``))}_onMenuClick(e){let t=e.target.closest?.(`.wui-mention-option`);t&&this._pick(this._results[Number(t.dataset.index)])}_pick(e){if(!e||!this._query)return;let t=Js(e.label),{start:n,end:r}=this._query,i=this._text.slice(r),a=`@${t}${/^\s/.test(i)?``:` `}`;this._replace(n,r,a,{id:String(e.value),label:t}),this._announce(nc.mentioned(t))}_replace(e,t,n,r){let i=this._control(),a=n.length-(t-e);this._mentions=this._mentions.filter(n=>n.end<=e||n.start>=t).map(e=>e.start>=t?{...e,start:e.start+a,end:e.end+a}:e),r&&this._mentions.push({start:e,end:e+1+r.label.length,id:r.id,label:r.label}),this._text=this._text.slice(0,e)+n+this._text.slice(t),i.value=this._text;let o=e+n.length;i.setSelectionRange(o,o),this._close(),i.focus(),this._emit()}_onFocusOut(e){e.relatedTarget&&this.contains(e.relatedTarget)||this._close()}_announce(e){let t=this.querySelector(oc);t&&(t.textContent=``,t.textContent=e)}},dc=`[role="menuitem"]`,fc=`data-open`,pc=4,mc=e=>e instanceof Element?e:e?.parentElement??null,hc=e=>e.getAttribute(`aria-disabled`)===`true`,gc=class extends c{constructor(){super(),this._navPanel=null,this._nav=ii({getVisibleOptions:()=>this._navPanel?this._rows(this._navPanel):[],getActive:()=>this._navPanel?this._rows(this._navPanel).indexOf(document.activeElement):-1,setActive:e=>this._rows(this._navPanel)[e]?.focus({preventScroll:!0})}),this._onKeyDown=e=>this._handleKeyDown(e),this._onClick=e=>this._handleClick(e),this._onMouseOver=e=>this._handleMouseOver(e),this._onFocusIn=e=>this._handleFocusIn(e),this._onFocusOut=e=>{let t=e.relatedTarget;this._openMenu()&&t instanceof Node&&!this.contains(t)&&this.close()},this._onPointerDown=e=>{this._openMenu()&&!this.contains(e.target)&&this.close()}}connectedCallback(){this._teardown(),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`click`,this._onClick),this.addEventListener(`mouseover`,this._onMouseOver),this.addEventListener(`focusin`,this._onFocusIn),this.addEventListener(`focusout`,this._onFocusOut),document.addEventListener(`pointerdown`,this._onPointerDown,!0)}disconnectedCallback(){this._teardown()}open(e,{focus:t=null}={}){let n=this._menus().find(t=>this._triggerOf(t).dataset.key===e);n&&this._openTop(n,t)}close(e=!1){let t=this._openMenu();if(t){for(let e of this._panelOf(t).querySelectorAll(`.wui-menubar-sub > [${fc}]`))this._setSub(e.parentElement,!1);this._setTop(t,!1),s(this),this._nav.teardown(),e&&this._triggerOf(t).focus({preventScroll:!0})}}_menus(){return[...this.children].filter(e=>e.classList.contains(`wui-menubar-menu`))}_triggerOf(e){return e.children[0]}_panelOf(e){return e.children[1]}_openMenu(){return this._menus().find(e=>this._panelOf(e)?.hasAttribute(fc))??null}_rows(e){let t=[];for(let n of e.children){let e=n.getAttribute(`role`)===`menuitem`?n:n.classList.contains(`wui-menubar-sub`)?n.children[0]:null;e&&!hc(e)&&t.push(e)}return t}_setTop(e,t){this._panelOf(e).toggleAttribute(fc,t),this._triggerOf(e).setAttribute(`aria-expanded`,String(t))}_setSub(e,t){let n=e.children[1];if(!t)for(let e of n.querySelectorAll(`.wui-menubar-sub > [${fc}]`))this._setSub(e.parentElement,!1);n.toggleAttribute(fc,t),e.children[0].setAttribute(`aria-expanded`,String(t)),t?this._placeSub(n):(n.removeAttribute(`data-side`),n.style.removeProperty(`--wui-menubar-sub-offset`))}_openTop(e,t){let n=this._openMenu();n&&n!==e&&this.close();let r=this._triggerOf(e),i=this._panelOf(e);if(this._setTop(e,!0),a(r,i),o(this,()=>{let e=this._openMenu();e&&a(this._triggerOf(e),this._panelOf(e))}),t){let e=this._rows(i);(t===`last`?e[e.length-1]:e[0])?.focus({preventScroll:!0})}}_openSub(e,t){let n=e.parentElement;for(let t of n.children)t!==e&&t.classList.contains(`wui-menubar-sub`)&&this._setSub(t,!1);this._setSub(e,!0),t&&this._rows(e.children[1])[0]?.focus({preventScroll:!0})}_placeSub(e){e.removeAttribute(`data-side`),e.style.removeProperty(`--wui-menubar-sub-offset`),e.getBoundingClientRect().right>window.innerWidth-pc&&e.setAttribute(`data-side`,`start`);let t=e.getBoundingClientRect().bottom-(window.innerHeight-pc);t>0&&e.style.setProperty(`--wui-menubar-sub-offset`,`${-t}px`)}_handleFocusIn(e){let t=mc(e.target)?.closest(`.wui-menubar-trigger`);if(!(!t||!this.contains(t)))for(let e of this._menus())this._triggerOf(e).tabIndex=this._triggerOf(e)===t?0:-1}_handleKeyDown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=mc(e.target)?.closest(dc);!t||!this.contains(t)||(t.classList.contains(`wui-menubar-trigger`)?this._barKey(e,t):this._menuKey(e,t))}_barKey(e,t){let n=this._menus(),r=n.findIndex(e=>this._triggerOf(e)===t),i=this._openMenu()!==null,a=t=>{e.preventDefault(),i&&!hc(this._triggerOf(t))?this._openTop(t,`first`):this._triggerOf(t).focus({preventScroll:!0})};e.key===`ArrowRight`?a(n[(r+1)%n.length]):e.key===`ArrowLeft`?a(n[(r-1+n.length)%n.length]):e.key===`Home`?a(n[0]):e.key===`End`?a(n[n.length-1]):(e.key===`ArrowDown`||e.key===`ArrowUp`)&&!hc(t)?(e.preventDefault(),this._openTop(n[r],e.key===`ArrowDown`?`first`:`last`)):e.key===`Escape`&&i&&(e.preventDefault(),e.stopPropagation(),this.close(!0))}_menuKey(e,t){let n=t.closest(`[role="menu"]`);if(!n)return;let r=n.classList.contains(`wui-menubar-subpanel`),i=t.closest(`.wui-menubar-menu`),a=this._rows(n),o=a.indexOf(t);if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),a.length&&a[(o+(e.key===`ArrowDown`?1:-1)+a.length)%a.length].focus({preventScroll:!0});else if(e.key===`ArrowRight`)e.preventDefault(),t.hasAttribute(`aria-haspopup`)?this._openSub(t.parentElement,!0):this._adjacent(i,1);else if(e.key===`ArrowLeft`)if(e.preventDefault(),r){let e=n.parentElement;this._setSub(e,!1),e.children[0].focus({preventScroll:!0})}else this._adjacent(i,-1);else if(e.key===`Escape`)if(e.preventDefault(),e.stopPropagation(),r){let e=n.parentElement;this._setSub(e,!1),e.children[0].focus({preventScroll:!0})}else this.close(!0);else e.key===`Tab`?this.close(!0):e.key===` `?(e.preventDefault(),t.click()):(this._navPanel=n,this._nav.handler(e))}_adjacent(e,t){let n=this._menus(),r=n[(n.indexOf(e)+t+n.length)%n.length];r&&r!==e&&!hc(this._triggerOf(r))&&this._openTop(r,`first`)}_handleClick(e){let t=mc(e.target)?.closest(dc);if(!t||!this.contains(t))return;let n=e.detail===0;if(t.classList.contains(`wui-menubar-trigger`)){if(hc(t))return;let e=t.parentElement;this._openMenu()===e?this.close():this._openTop(e,n?`first`:null),(!n||!this._openMenu())&&t.focus({preventScroll:!0});return}if(hc(t)){e.preventDefault(),e.stopPropagation();return}if(t.hasAttribute(`aria-haspopup`)){e.preventDefault(),this._openSub(t.parentElement,n);return}let r=t.closest(`.wui-menubar-menu`),i=r?this._triggerOf(r).dataset.key:void 0;this.close(!0),this.dispatchEvent(new CustomEvent(`wui-menubar:select`,{bubbles:!0,detail:{key:t.dataset.key??null,item:t,menu:i??null}}))}_handleMouseOver(e){let t=mc(e.target)?.closest(dc);if(!t||!this.contains(t)||hc(t))return;if(t.classList.contains(`wui-menubar-trigger`)){let e=t.parentElement;this._openMenu()&&this._openMenu()!==e&&(this._openTop(e,null),t.focus({preventScroll:!0}));return}t!==document.activeElement&&t.focus({preventScroll:!0});let n=t.parentElement.classList.contains(`wui-menubar-sub`)&&t.parentElement.children[0]===t?t.parentElement:null;if(n)n.children[1].hasAttribute(fc)||this._openSub(n,!1);else{let e=t.closest(`[role="menu"]`);for(let t of e.children)t.classList.contains(`wui-menubar-sub`)&&this._setSub(t,!1)}}_teardown(){this.close(),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`mouseover`,this._onMouseOver),this.removeEventListener(`focusin`,this._onFocusIn),this.removeEventListener(`focusout`,this._onFocusOut),document.removeEventListener(`pointerdown`,this._onPointerDown,!0)}},_c={enter:`Enter`,comma:`,`,space:` `,tab:`Tab`},vc={enter:`
334
+ `,comma:`,`,space:` `,tab:` `},yc=e=>_c[e],bc=e=>vc[e];function xc(e,t){let n=[String(e??``)];for(let e of t)n=n.flatMap(t=>t.split(e));return n.map(e=>e.trim()).filter(Boolean)}var Sc=(e,t)=>t.some(t=>String(e??``).includes(t)),Cc=class extends c{static formAssociated=!0;_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||`Select`}static get observedAttributes(){return[`placeholder`,`search-placeholder`,`searchable`,`disabled`,`icon`,`size`,`collapse-chips`,`aria-label`,`aria-invalid`,`allow-custom`,`custom-pattern`,`custom-invalid-message`]}constructor(){super(),this._values=[],this._optionsProp=null,this._active=-1,this._typeahead=``,this._typeaheadTimer=null,this._customError=``;try{this._internals=this.attachInternals()}catch{this._internals=null}}connectedCallback(){if(!this._rendered){if(!this._valuesInit&&!this._optionsProp&&!this._values.length){let e=this.getAttribute(`value`);if(e!=null&&e!==``)this._values=e.split(`,`).map(e=>e.trim()).filter(Boolean);else{let e=[...this.querySelectorAll(`:scope > wui-option[selected]`)].map(e=>e.getAttribute(`value`)??e.textContent.trim());e.length&&(this._values=e.map(String))}}this._valuesInit=!0,this._defaultCaptured||=(this._defaultValues=this._values.slice(),!0),this.render();return}this._bindGlobal?.()}formResetCallback(){this.values=(this._defaultValues||[]).slice();let e=this.querySelector(`[data-input]`);e&&(e.value=``),this._setCustomError(``)}attributeChangedCallback(e){if(e===`aria-invalid`){this._syncInvalid();return}e===`custom-pattern`||e===`custom-invalid-message`||this._rendered&&this.render()}_syncInvalid(){let e=this.querySelector(`.search-select-control`);e&&(this.hasAttribute(`aria-invalid`)||this._customError?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}get values(){return this._values.slice()}set values(e){this._values=Array.isArray(e)?e.map(String):[],V(this,this._values),this._rendered&&(this._renderControl(),this._renderOptions(this._query()))}set options(e){if(this._optionsProp=Array.isArray(e)?e:null,this._rendered&&this._allowCustom){this._renderControl(),this._renderOptions(this._query());return}this.isConnected&&this.render()}get options(){return this._readOptions()}get validateCustom(){return this._validateCustom??null}set validateCustom(e){this._validateCustom=typeof e==`function`?e:null}get _allowCustom(){return this.hasAttribute(`allow-custom`)}_query(){let e=this.querySelector(this._allowCustom?`[data-input]`:`.search-select-input`);return e?e.value:``}_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`)??e.textContent.trim(),label:e.innerHTML,icon:e.getAttribute(`icon`)||void 0,[oi]:!0,selected:e.hasAttribute(`selected`)};for(let[n,r]of Tc){let i=e.getAttribute(n);i&&(t[r]=i)}return e.hasAttribute(`disabled`)&&(t.disabled=!0),t}))}_readOptions(){return this._optionsProp?this._optionsProp:(this._snapshotDeclared(),this._declared||[])}_labelFor(e){let t=this._readOptions().find(t=>String(t.value)===String(e));return t?mi(t):fi(e)}_labelHtmlFor(e){let t=this._readOptions().find(t=>String(t.value)===String(e));return t?di(t):H(e)}render(){this._snapshotDeclared();let e=this._allowCustom,t=this.hasAttribute(`searchable`)&&!e,n=this.getAttribute(`search-placeholder`)||`Search…`,r=this.getAttribute(`icon`),i=this.getAttribute(`size`),a=i===`sm`?` search-select-sm`:i===`lg`?` search-select-lg`:``;V(this,this._values),this.id||=`wui-multiselect-${Math.random().toString(36).slice(2,9)}`;let o=`${this.id}-listbox`;this._listboxId=o;let s=this.hasAttribute(`disabled`);if(e){let e=`${this.id}-custom-error`;this.innerHTML=`
335
335
  <div class="search-select${a}">
336
336
  <div class="input search-select-control search-select-multi"${this.hasAttribute(`aria-invalid`)?` aria-invalid="true"`:``}${s?` aria-disabled="true"`:``}>
337
- ${r?R(r,{className:`search-select-icon`}):``}
338
- <div class="ms-chips" data-chips><input type="text" class="ms-input" data-input role="combobox" aria-autocomplete="list" aria-haspopup="listbox" aria-expanded="false" aria-controls="${Y(o)}" aria-label="${Y(this._accessibleName())}" aria-describedby="${Y(e)}" autocomplete="off"${s?` disabled`:``} /></div>
339
- ${R(`chevron-down`,{className:`search-select-caret`})}
337
+ ${r?M(r,{className:`search-select-icon`}):``}
338
+ <div class="ms-chips" data-chips><input type="text" class="ms-input" data-input role="combobox" aria-autocomplete="list" aria-haspopup="listbox" aria-expanded="false" aria-controls="${X(o)}" aria-label="${X(this._accessibleName())}" aria-describedby="${X(e)}" autocomplete="off"${s?` disabled`:``} /></div>
339
+ ${M(`chevron-down`,{className:`search-select-caret`})}
340
340
  </div>
341
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${Y(o)}" aria-multiselectable="true" tabindex="-1" hidden>
341
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${X(o)}" aria-multiselectable="true" tabindex="-1" hidden>
342
342
  <div class="search-select-options"></div>
343
343
  </div>
344
344
  </div>
345
- <div class="field-error wui-ms-custom-error" id="${Y(e)}" aria-live="polite" hidden></div>`}else this.innerHTML=`
345
+ <div class="field-error wui-ms-custom-error" id="${X(e)}" aria-live="polite" hidden></div>`}else this.innerHTML=`
346
346
  <div class="search-select${a}">
347
- <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${Y(o)}" aria-label="${Y(this._accessibleName())}"${this.hasAttribute(`aria-invalid`)?` aria-invalid="true"`:``}${s?` aria-disabled="true"`:` tabindex="0"`}>
348
- ${r?R(r,{className:`search-select-icon`}):``}
347
+ <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${X(o)}" aria-label="${X(this._accessibleName())}"${this.hasAttribute(`aria-invalid`)?` aria-invalid="true"`:``}${s?` aria-disabled="true"`:` tabindex="0"`}>
348
+ ${r?M(r,{className:`search-select-icon`}):``}
349
349
  <div class="ms-chips" data-chips></div>
350
- ${R(`chevron-down`,{className:`search-select-caret`})}
350
+ ${M(`chevron-down`,{className:`search-select-caret`})}
351
351
  </div>
352
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${Y(o)}" aria-multiselectable="true" tabindex="-1" hidden>
353
- ${t?`<div class="search-select-search">${R(`search`)}<input class="search-select-input" placeholder="${Y(n)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${R(`x`)}</button></div>`:``}
352
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${X(o)}" aria-multiselectable="true" tabindex="-1" hidden>
353
+ ${t?`<div class="search-select-search">${M(`search`)}<input class="search-select-input" placeholder="${X(n)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${M(`x`)}</button></div>`:``}
354
354
  <div class="search-select-options"></div>
355
355
  <div class="search-select-empty" hidden>No matches</div>
356
356
  </div>
357
- </div>`;this._rendered=!0,this._customError=``,L(this,this._values),this._renderControl(),this._renderOptions(),this._wire()}_renderControl(){let e=this.querySelector(`[data-chips]`);if(!e)return;let t=this.getAttribute(`placeholder`)||`Select…`,n=this._allowCustom?e.querySelector(`[data-input]`):null,r=this._values.map(e=>`<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${Y(e)}" aria-label="Remove ${Y(this._labelFor(e))}">${R(`x`)}</button></span>`).join(``);if(n){for(let t of[...e.querySelectorAll(`:scope > .chip`)])t.remove();n.insertAdjacentHTML(`beforebegin`,r),n.placeholder=this._values.length?``:t,this._collapseChips();return}if(!this._values.length){e.innerHTML=`<span class="search-select-placeholder">${z(t)}</span>`;return}e.innerHTML=r,this._collapseChips()}_collapseChips(){let e=this.querySelector(`[data-chips]`);if(!e||!this.hasAttribute(`collapse-chips`)||!this._values.length)return;e.querySelector(`.chip-more`)?.remove();let t=[...e.querySelectorAll(`:scope > .chip:not(.chip-more)`)];for(let e of t)e.style.display=``;if(!t.length)return;let n=e.clientWidth,r=e=>e.offsetLeft+e.offsetWidth;if(r(t[t.length-1])<=n)return;let i=document.createElement(`span`);i.className=`chip chip-sm chip-more`,i.textContent=`+${t.length}`,t[t.length-1].after(i);let a=i.offsetWidth+6,o=0;for(let e of t)if(r(e)<=n-a)o+=1;else break;o<1&&(o=1);for(let e=o;e<t.length;e+=1)t[e].style.display=`none`;i.textContent=`+${t.length-o}`}_matches(e,t){return rr(e).toLowerCase().includes(t)||String(e.description??``).toLowerCase().includes(t)}_optionNamed(e){let t=e.trim().toLowerCase();return this._readOptions().find(e=>String(e.value??``).toLowerCase()===t||rr(e).trim().toLowerCase()===t)}_renderOptions(e){let t=this.querySelector(`.search-select-options`),n=this.querySelector(`.search-select-empty`);if(!t)return;let r=(e||``).trim(),i=r.toLowerCase(),a=this._readOptions();i&&(a=a.filter(e=>this._matches(e,i)));let o=this._listboxId||`${this.id||`wui-multiselect`}-listbox`,s=this._allowCustom&&r&&!this._optionNamed(r),c=a.map((e,t)=>{let n=this._values.includes(String(e.value)),r=`${o}-opt-${t}`;return Ys(e)?Qs(e,r,n):`<button type="button" role="option" id="${Y(r)}" class="search-select-option${n?` selected`:``}" data-value="${Y(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${er(e)}</span><span class="ms-check">${R(`check`)}</span></button>`});s&&c.push(`<button type="button" role="option" id="${Y(`${o}-opt-${a.length}`)}" class="search-select-option search-select-option-custom" data-value="${Y(r)}" data-custom="true" aria-selected="false">Add “${z(r)}”</button>`),t.innerHTML=c.join(``),n&&(n.hidden=a.length>0),this._active=-1,this._combobox()?.removeAttribute(`aria-activedescendant`),this._allowCustom&&this._syncCustomMenu?.(),this._reanchor?.()}_combobox(){return this._allowCustom?this.querySelector(`[data-input]`):this.querySelector(`.search-select-control`)}_setCustomError(e){this._customError=e||``;let t=this.querySelector(`.wui-ms-custom-error`),n=this.querySelector(`[data-input]`);t&&(t.textContent=this._customError,t.hidden=!this._customError),n&&(this._customError?n.setAttribute(`aria-invalid`,`true`):n.removeAttribute(`aria-invalid`)),this._syncInvalid()}_customRefusal(e){let t=this.getAttribute(`custom-invalid-message`)||`Enter a valid value.`,n=this.getAttribute(`custom-pattern`);if(n){let r=ec(n);if(r&&!r.test(e))return t}let r=this._validateCustom;if(r){let n=r(e);return n===!0?``:typeof n==`string`&&n?n:t}return``}_commitTyped(e){let t=e.trim().replace(/,+$/,``).trim();if(!t)return``;let n=this._optionNamed(t),r;if(n){if(n.disabled)return n.disabledHint||this.getAttribute(`custom-invalid-message`)||`That option is not available.`;r=String(n.value)}else{let e=this._customRefusal(t);if(e)return e;r=t}let i=r.toLowerCase();return this._values.some(e=>e.toLowerCase()===i)||(this._values=[...this._values,r]),``}_wire(){this._teardown();let e=this.querySelector(`.search-select-control`),t=this.querySelector(`.search-select-menu`),n=this.querySelector(`.search-select-input`),r=this.querySelector(`.search-select-clear`),i=this.querySelector(`.search-select-options`),c=this._allowCustom,l=c?this.querySelector(`[data-input]`):null,u=l||e;if(!e||!t)return;let d=()=>this.hasAttribute(`disabled`),f=()=>a(e,t,{matchWidth:!0}),p=()=>[...this.querySelectorAll(`.search-select-option`)],m=()=>p().filter(e=>!e.hidden),h=(e,{reveal:t=!0}={})=>{let n=m();this._active=e,Jn(i,e>=0&&n[e]||null),e>=0&&n[e]?(t&&n[e].scrollIntoView({block:`nearest`}),u.setAttribute(`aria-activedescendant`,n[e].id)):u.removeAttribute(`aria-activedescendant`)},g=!1,_=()=>c?g:!t.hidden,v=()=>{let n=g&&p().length>0,r=t.hidden;t.hidden=!n,u.setAttribute(`aria-expanded`,String(n)),e.classList.toggle(`open`,n),n&&r&&f()};this._syncCustomMenu=c?v:null;let y=()=>{_()&&f()},b=()=>{if(!d()){if(o(this,y),c){g=!0,v();return}t.hidden=!1,e.setAttribute(`aria-expanded`,`true`),e.classList.add(`open`),f(),n&&(n.value=``,this._renderOptions(``),n.focus())}},x=()=>{c?(g=!1,v()):(t.hidden=!0,e.setAttribute(`aria-expanded`,`false`),e.classList.remove(`open`)),h(-1),clearTimeout(this._typeaheadTimer),this._typeaheadTimer=null,this._typeahead=``,s(this)},S=()=>{L(this,this._values),this.dispatchEvent(new Event(`change`,{bubbles:!0}))},ee=e=>{let t=String(e);if(this._values.includes(t))this._values=this._values.filter(e=>e!==t);else if(c&&this._values.some(e=>e.toLowerCase()===t.toLowerCase()))return;else this._values=[...this._values,t];this._renderControl(),this._renderOptions(this._query()),S()},te=e=>{this._values=this._values.filter(t=>t!==String(e)),this._renderControl(),this._renderOptions(this._query()),S()},C=(e,{quiet:t=!1}={})=>{let n=this._values.length,r=Gs(e,qs)?Ws(e,qs):[e],i=[],a=``;for(let e of r){let t=this._commitTyped(e);t&&(i.push(e.trim()),a||=t)}t&&i.length||(l.value=i.join(`, `),this._setCustomError(a),this._values.length!==n&&(this._renderControl(),S()),this._renderOptions(l.value))},w=e=>{if(!(!e||e.getAttribute(`aria-disabled`)===`true`)){if(e.dataset.custom===`true`){C(e.dataset.value);return}ee(e.dataset.value),l?.value&&(l.value=``,this._setCustomError(``),this._renderOptions(``))}};e.addEventListener(`click`,e=>{if(d())return;let t=e.target.closest(`[data-remove]`);if(t){e.stopPropagation(),te(t.dataset.remove),l?.focus();return}if(l){let t=_();e.target!==l&&l.focus(),e.target===l||!t?b():x();return}_()?x():b()}),i.addEventListener(`click`,e=>{let t=e.target.closest(`.search-select-option`);t&&(w(t),(l||n)?.focus())}),i.addEventListener(`mousemove`,e=>{let t=e.target.closest(`.search-select-option`);t&&!t.classList.contains(`is-active`)&&h(m().indexOf(t),{reveal:!1})}),i.addEventListener(`mouseleave`,()=>h(-1)),i.addEventListener(`error`,e=>{e.target?.classList?.contains(`avatar-img`)&&e.target.remove()},!0),n?.addEventListener(`input`,()=>{this._renderOptions(n.value),r&&(r.hidden=!n.value),h(-1)}),this._navHandler=qn({getVisibleOptions:m,getActive:()=>this._active,setActive:e=>h(e),onEnter:e=>{e?w(e):l?.value.trim()&&C(l.value)},onEscape:()=>{this._navHandler.clearTypeahead(),x(),l||e.focus()}});let T=e=>{let t=l||n;if(e.key===`Backspace`&&!t?.value&&this._values.length){te(this._values[this._values.length-1]);return}e.key===`Escape`&&_()&&(e.preventDefault(),e.stopPropagation()),this._navHandler.handler(e)};if(n?.addEventListener(`keydown`,T),r?.addEventListener(`click`,()=>{n.value=``,this._renderOptions(``),r.hidden=!0,n.focus()}),l){let t=e=>{e.target!==l&&e.preventDefault()};i.addEventListener(`mousedown`,t),e.addEventListener(`mousedown`,t),Vn(),l.addEventListener(`focus`,()=>{Hn()&&b()}),l.addEventListener(`input`,()=>{this._customError&&this._setCustomError(``),this._renderOptions(l.value),b()}),l.addEventListener(`keydown`,e=>{if(e.key===`,`&&l.value.trim()){e.preventDefault(),C(l.value);return}if(e.key===`Enter`){if(this._active<0&&!l.value.trim())return;this._navHandler.handler(e);return}(e.key===`ArrowDown`||e.key===`ArrowUp`)&&!_()&&b(),T(e)}),l.addEventListener(`paste`,e=>{let t=e.clipboardData?.getData(`text/plain`)??``;Gs(t,qs)&&(e.preventDefault(),C(`${l.value}${t}`))}),l.addEventListener(`blur`,e=>{e.relatedTarget&&this.contains(e.relatedTarget)||(l.value.trim()&&C(l.value,{quiet:!0}),x())})}else e.addEventListener(`keydown`,e=>{if(_()){T(e);return}(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),b())});this._bindGlobal=()=>{this._teardown(),!this._ro&&typeof ResizeObserver<`u`&&(this._ro=new ResizeObserver(()=>this._collapseChips()),this._ro.observe(this)),this._onDocClick=e=>{_()&&!this.contains(e.target)&&x()},document.addEventListener(`click`,this._onDocClick),_()&&o(this,y)},this._bindGlobal()}_teardown(){this._onDocClick&&=(document.removeEventListener(`click`,this._onDocClick),null),s(this),this._navHandler?.teardown()}disconnectedCallback(){this._teardown(),this._ro?.disconnect(),this._ro=null}},qs=[`,`,`;`,`
358
- `,` `],Js=[[`description`,`description`],[`avatar`,`avatar`],[`initials`,`initials`],[`disabled-hint`,`disabledHint`]],Ys=e=>!!(e.description||e.avatar||e.initials||e.disabled||e.disabledHint),Xs=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:``},Zs=e=>{let t=Xs(e.avatar);return!t&&!e.initials?``:`<span class="avatar wui-opt-avatar" aria-hidden="true"><span class="avatar-face">${z(e.initials??``)}</span>${t?`<img class="avatar-img" src="${Y(t)}" alt="" />`:``}</span>`},Qs=(e,t,n)=>{let r=!!e.disabled,i=e.description?`<span class="wui-opt-desc">${z(e.description)}</span>`:``,a=e.disabledHint&&r?`<span class="wui-opt-hint">${z(e.disabledHint)}</span>`:``;return`<button type="button" role="option" id="${Y(t)}" class="search-select-option wui-opt-rich${n?` selected`:``}" data-value="${Y(e.value)}" aria-selected="${n}"${r?` aria-disabled="true"`:``}><span class="ms-opt-label"><span class="wui-opt-name">${er(e)}</span>${i}</span>${a}${Zs(e)}<span class="ms-check">${R(`check`)}</span></button>`},$s=new Map,ec=e=>{if($s.has(e))return $s.get(e);let t=null;try{t=RegExp(`^(?:${e})$`,`u`)}catch{console.warn(`<wui-multiselect> custom-pattern is not a valid regular expression and is ignored: ${e}`)}return $s.set(e,t),t},Y=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),tc=`data-open`,nc=8,rc=`.wui-nav-menu-link`,ic=e=>e instanceof Element?e:e?.parentElement??null,ac=class extends c{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&&!t.contains(e.target)&&this._set(t,!1)},this._onResize=()=>{let e=this._openItem();e&&this._align(e.children[1])}}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=>this._isTrigger(t.children[0])&&t.children[0].dataset.key===e);t&&this._set(t,!0)}close(e=!1){let t=this._openItem();t&&(this._set(t,!1),e&&t.children[0].focus({preventScroll:!0}))}_items(){return[...this.querySelectorAll(`.wui-nav-menu-item`)]}_openItem(){return this._items().find(e=>e.children[1]?.hasAttribute(tc))??null}_isTrigger(e){return!!e?.classList.contains(`wui-nav-menu-trigger`)}_entries(){return this._items().map(e=>e.children[0])}_links(e){return[...e.children[1]?.querySelectorAll(rc)??[]]}_set(e,t){let n=e.children[0],r=e.children[1];if(r){if(t){let t=this._openItem();t&&t!==e&&this._set(t,!1)}r.hasAttribute(tc)!==t&&(r.toggleAttribute(tc,t),n.setAttribute(`aria-expanded`,String(t)),t?(this._align(r),window.addEventListener(`resize`,this._onResize)):(r.removeAttribute(`data-align`),this._openItem()||window.removeEventListener(`resize`,this._onResize)),this.dispatchEvent(new CustomEvent(`wui-navigation-menu:toggle`,{bubbles:!0,detail:{key:n.dataset.key??null,open:t}})))}}_align(e){e.removeAttribute(`data-align`),e.getBoundingClientRect().right>window.innerWidth-nc&&e.setAttribute(`data-align`,`end`)}_handleClick(e){let t=ic(e.target),n=t?.closest(`.wui-nav-menu-trigger`);if(n&&this.contains(n)){let e=n.parentElement;this._set(e,!e.children[1].hasAttribute(tc));return}let r=t?.closest(rc);r&&this.contains(r)&&this.close()}_handleKeyDown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=ic(e.target)?.closest(`.wui-nav-menu-trigger, .wui-nav-menu-toplink, .wui-nav-menu-link`);if(!t||!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&&n.children[0].focus({preventScroll:!0});return}if(t.matches(rc)){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),r[t].focus({preventScroll:!0})}else if(e.key===`ArrowDown`&&this._isTrigger(t)){e.preventDefault();let n=t.parentElement;this._set(n,!0),this._links(n)[0]?.focus({preventScroll:!0})}}_linkKey(e,t){let n=t.closest(`.wui-nav-menu-item`),r=this._links(n),i=r.indexOf(t);e.key===`ArrowDown`||e.key===`ArrowUp`?(e.preventDefault(),r[(i+(e.key===`ArrowDown`?1:-1)+r.length)%r.length].focus({preventScroll:!0})):e.key===`Home`?(e.preventDefault(),r[0].focus({preventScroll:!0})):e.key===`End`&&(e.preventDefault(),r[r.length-1].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)}},oc=99,sc=1440*60*1e3,cc=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 lc(e){return e>99?`99+`:String(e)}function uc(e,t){return t===0?e:`${e}, ${lc(t)} unread`}function dc(e){return e===0?cc.noneUnread:`${lc(e)} unread notifications`}function fc(e){return Re(e,{pattern:`time`})}function pc(e,t=Date.now()){let n=Re(e);return n===Re(t)?cc.today:n===Re(Ie(t)-sc)?cc.yesterday:n}function mc(e,t=Date.now()){let n=new Map;for(let r of e){if(!Number.isFinite(Ie(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=Re(r.at);n.has(e)||n.set(e,{key:e,heading:pc(r.at,t),items:[]}),n.get(e).items.push(r)}return[...n.values()]}var hc=`.wui-notification-center-trigger`,gc=`.wui-notification-center-panel`,_c=`.wui-notification-center-count`,vc=`.wui-notification-center-live`,yc=`.wui-notification-center-markall`,bc=`.wui-notification-center-item`,xc=`wui-notification-center-item-read`,Sc=`.wui-notification-center-unread-label`,Cc=class extends c{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=>{this.contains(e.target)||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()}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.querySelector(gc)?.focus(),this._announceToggle())}close({restoreFocus:e=!1}={}){this.isOpen&&(this.removeAttribute(`open`),this._syncOpen(),e&&this.querySelector(hc)?.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(hc)?.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(`${bc}:not(.${xc})`).length}_click(e){let t=e.target.closest?.(`${hc}, ${yc}, ${bc}`);if(!(!t||!this.contains(t))){if(t.matches(hc)){this.toggle();return}this.hasAttribute(`controlled`)||(t.matches(yc)?this._markAll():this._markItem(t))}}_key(e){if(e.key===`Escape`&&this.isOpen){e.preventDefault(),e.stopPropagation(),this.close({restoreFocus:!0});return}if(!this.isOpen||!this.querySelector(gc)?.contains(e.target))return;let t={ArrowDown:1,ArrowUp:-1,Home:`first`,End:`last`}[e.key];if(t===void 0)return;let n=[...this.querySelectorAll(bc)];if(n.length===0)return;let r=n.indexOf(e.target.closest(bc)),i;i=t===`first`?0:t===`last`?n.length-1:r===-1?t===1?0:n.length-1:Math.min(n.length-1,Math.max(0,r+t)),e.preventDefault(),n[i].focus()}_markItem(e){e.classList.contains(xc)||(this._applyRead(e),this._unread=Math.max(0,this._unread-1),this._render(),this._say(dc(this._unread)),this._emitRead([e.dataset.id].filter(Boolean),!1))}async _markAll(){if(this._busy)return;let e=[...this.querySelectorAll(`${bc}:not(.${xc})`)];if(e.length===0&&this._unread===0)return;let t=e.map(e=>e.dataset.id).filter(Boolean),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 j(n,{method:`POST`,body:e});if(this._setBusy(!1),!r.ok){if(r.kind===`session`||r.kind===`aborted`)return;let e=r.message||cc.failed[r.kind]||cc.failed.server;this._say(e),this.dispatchEvent(new CustomEvent(`wui:notification-center:failed`,{bubbles:!0,detail:{kind:r.kind,message:e}}));return}}for(let t of e)this._applyRead(t);this._unread=0,this._render(),this._say(cc.allRead),this._emitRead(t,!0)}_applyRead(e){e.classList.add(xc),e.querySelector(Sc)?.remove()}_setBusy(e){this._busy=e;let t=this.querySelector(yc);t&&(t.disabled=e||this._unread===0,e?t.setAttribute(`aria-busy`,`true`):t.removeAttribute(`aria-busy`))}_render(){let e=this.querySelector(_c);e&&(e.textContent=lc(this._unread),e.hidden=this._unread===0),this.querySelector(hc)?.setAttribute(`aria-label`,uc(this.getAttribute(`label`)||cc.label,this._unread));let t=this.querySelector(yc);t&&(t.disabled=this._unread===0)}_say(e){let t=this.querySelector(vc);t&&(t.textContent=e)}_emitRead(e,t){this.dispatchEvent(new CustomEvent(`wui:notification-center:read`,{bubbles:!0,detail:{ids:e,all:t}}))}},wc=`.wui-onboarding-card`,Tc=`.wui-onboarding-steps`,Ec=`.wui-onboarding-toggle`,Dc=`.wui-onboarding-dismiss`,Oc=`.wui-onboarding-restore`,kc=`wui-onboarding:`,Ac=class extends c{constructor(){super(),this._onClick=e=>{let t=e.target instanceof Element?e.target:null;t&&(t.closest(Dc)?this.dismiss():t.closest(Oc)?this.restore():t.closest(Ec)&&this.toggle())}}connectedCallback(){this.addEventListener(`click`,this._onClick),this._stored()===`dismissed`&&this._setDismissed(!0)}disconnectedCallback(){this.removeEventListener(`click`,this._onClick)}get dismissed(){return this.querySelector(wc)?.hidden===!0}get collapsed(){return this.querySelector(Tc)?.hidden===!0}dismiss(){this.dismissed||(this._setDismissed(!0),this._store(`dismissed`),this.querySelector(Oc)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:dismiss`,{bubbles:!0})))}restore(){this.dismissed&&(this._setDismissed(!1),this._store(null),this.querySelector(Ec)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:restore`,{bubbles:!0})))}toggle(){let e=this.querySelector(Tc);if(!e)return;let t=!e.hidden;e.hidden=t,this.querySelector(Ec)?.setAttribute(`aria-expanded`,String(!t)),this.dispatchEvent(new CustomEvent(`wui:onboarding:collapse`,{bubbles:!0,detail:{collapsed:t}}))}_setDismissed(e){let t=this.querySelector(wc),n=this.querySelector(Oc);t&&(t.hidden=e),n&&(n.hidden=!e)}_key(){let e=this.getAttribute(`storage-key`);return e?kc+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{}}},jc=/[^0-9]/g,Mc=/[^0-9a-zA-Z]/g,Nc=class extends c{static formAssociated=!0;static get observedAttributes(){return[`value`,`length`,`mode`,`disabled`,`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),I(this,this._value),this._paint()}_clean(e){return(e==null?``:String(e)).replace(this.mode===`alphanumeric`?Mc:jc,``).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||``,I(this,this._value),this._paint()}attributeChangedCallback(e,t,n){this._rendered&&(e===`value`?(this._value=this._clean(n),I(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=Array.from({length:e},()=>`<span class="otp-slot" aria-hidden="true"></span>`).join(``),i=this.getAttribute(`aria-label`),a=i?` aria-label="${i.replace(/"/g,`&quot;`)}"`:``;this.innerHTML=`
357
+ </div>`;this._rendered=!0,this._customError=``,V(this,this._values),this._renderControl(),this._renderOptions(),this._wire()}_renderControl(){let e=this.querySelector(`[data-chips]`);if(!e)return;let t=this.getAttribute(`placeholder`)||`Select…`,n=this._allowCustom?e.querySelector(`[data-input]`):null,r=this._values.map(e=>`<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${X(e)}" aria-label="Remove ${X(this._labelFor(e))}">${M(`x`)}</button></span>`).join(``);if(n){for(let t of[...e.querySelectorAll(`:scope > .chip`)])t.remove();n.insertAdjacentHTML(`beforebegin`,r),n.placeholder=this._values.length?``:t,this._collapseChips();return}if(!this._values.length){e.innerHTML=`<span class="search-select-placeholder">${H(t)}</span>`;return}e.innerHTML=r,this._collapseChips()}_collapseChips(){let e=this.querySelector(`[data-chips]`);if(!e||!this.hasAttribute(`collapse-chips`)||!this._values.length)return;e.querySelector(`.chip-more`)?.remove();let t=[...e.querySelectorAll(`:scope > .chip:not(.chip-more)`)];for(let e of t)e.style.display=``;if(!t.length)return;let n=e.clientWidth,r=e=>e.offsetLeft+e.offsetWidth;if(r(t[t.length-1])<=n)return;let i=document.createElement(`span`);i.className=`chip chip-sm chip-more`,i.textContent=`+${t.length}`,t[t.length-1].after(i);let a=i.offsetWidth+6,o=0;for(let e of t)if(r(e)<=n-a)o+=1;else break;o<1&&(o=1);for(let e=o;e<t.length;e+=1)t[e].style.display=`none`;i.textContent=`+${t.length-o}`}_matches(e,t){return mi(e).toLowerCase().includes(t)||String(e.description??``).toLowerCase().includes(t)}_optionNamed(e){let t=e.trim().toLowerCase();return this._readOptions().find(e=>String(e.value??``).toLowerCase()===t||mi(e).trim().toLowerCase()===t)}_renderOptions(e){let t=this.querySelector(`.search-select-options`),n=this.querySelector(`.search-select-empty`);if(!t)return;let r=(e||``).trim(),i=r.toLowerCase(),a=this._readOptions();i&&(a=a.filter(e=>this._matches(e,i)));let o=this._listboxId||`${this.id||`wui-multiselect`}-listbox`,s=this._allowCustom&&r&&!this._optionNamed(r),c=a.map((e,t)=>{let n=this._values.includes(String(e.value)),r=`${o}-opt-${t}`;return Ec(e)?kc(e,r,n):`<button type="button" role="option" id="${X(r)}" class="search-select-option${n?` selected`:``}" data-value="${X(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${di(e)}</span><span class="ms-check">${M(`check`)}</span></button>`});s&&c.push(`<button type="button" role="option" id="${X(`${o}-opt-${a.length}`)}" class="search-select-option search-select-option-custom" data-value="${X(r)}" data-custom="true" aria-selected="false">Add “${H(r)}”</button>`),t.innerHTML=c.join(``),n&&(n.hidden=a.length>0),this._active=-1,this._combobox()?.removeAttribute(`aria-activedescendant`),this._allowCustom&&this._syncCustomMenu?.(),this._reanchor?.()}_combobox(){return this._allowCustom?this.querySelector(`[data-input]`):this.querySelector(`.search-select-control`)}_setCustomError(e){this._customError=e||``;let t=this.querySelector(`.wui-ms-custom-error`),n=this.querySelector(`[data-input]`);t&&(t.textContent=this._customError,t.hidden=!this._customError),n&&(this._customError?n.setAttribute(`aria-invalid`,`true`):n.removeAttribute(`aria-invalid`)),this._syncInvalid()}_customRefusal(e){let t=this.getAttribute(`custom-invalid-message`)||`Enter a valid value.`,n=this.getAttribute(`custom-pattern`);if(n){let r=jc(n);if(r&&!r.test(e))return t}let r=this._validateCustom;if(r){let n=r(e);return n===!0?``:typeof n==`string`&&n?n:t}return``}_commitTyped(e){let t=e.trim().replace(/,+$/,``).trim();if(!t)return``;let n=this._optionNamed(t),r;if(n){if(n.disabled)return n.disabledHint||this.getAttribute(`custom-invalid-message`)||`That option is not available.`;r=String(n.value)}else{let e=this._customRefusal(t);if(e)return e;r=t}let i=r.toLowerCase();return this._values.some(e=>e.toLowerCase()===i)||(this._values=[...this._values,r]),``}_wire(){this._teardown();let e=this.querySelector(`.search-select-control`),t=this.querySelector(`.search-select-menu`),n=this.querySelector(`.search-select-input`),r=this.querySelector(`.search-select-clear`),i=this.querySelector(`.search-select-options`),c=this._allowCustom,l=c?this.querySelector(`[data-input]`):null,u=l||e;if(!e||!t)return;let d=()=>this.hasAttribute(`disabled`),f=()=>a(e,t,{matchWidth:!0}),p=()=>[...this.querySelectorAll(`.search-select-option`)],m=()=>p().filter(e=>!e.hidden),h=(e,{reveal:t=!0}={})=>{let n=m();this._active=e,ai(i,e>=0&&n[e]||null),e>=0&&n[e]?(t&&n[e].scrollIntoView({block:`nearest`}),u.setAttribute(`aria-activedescendant`,n[e].id)):u.removeAttribute(`aria-activedescendant`)},g=!1,_=()=>c?g:!t.hidden,v=()=>{let n=g&&p().length>0,r=t.hidden;t.hidden=!n,u.setAttribute(`aria-expanded`,String(n)),e.classList.toggle(`open`,n),n&&r&&f()};this._syncCustomMenu=c?v:null;let y=()=>{_()&&f()},b=()=>{if(!d()){if(o(this,y),c){g=!0,v();return}t.hidden=!1,e.setAttribute(`aria-expanded`,`true`),e.classList.add(`open`),f(),n&&(n.value=``,this._renderOptions(``),n.focus())}},x=()=>{c?(g=!1,v()):(t.hidden=!0,e.setAttribute(`aria-expanded`,`false`),e.classList.remove(`open`)),h(-1),clearTimeout(this._typeaheadTimer),this._typeaheadTimer=null,this._typeahead=``,s(this)},S=()=>{V(this,this._values),this.dispatchEvent(new Event(`change`,{bubbles:!0}))},ee=e=>{let t=String(e);if(this._values.includes(t))this._values=this._values.filter(e=>e!==t);else if(c&&this._values.some(e=>e.toLowerCase()===t.toLowerCase()))return;else this._values=[...this._values,t];this._renderControl(),this._renderOptions(this._query()),S()},C=e=>{this._values=this._values.filter(t=>t!==String(e)),this._renderControl(),this._renderOptions(this._query()),S()},w=(e,{quiet:t=!1}={})=>{let n=this._values.length,r=Sc(e,wc)?xc(e,wc):[e],i=[],a=``;for(let e of r){let t=this._commitTyped(e);t&&(i.push(e.trim()),a||=t)}t&&i.length||(l.value=i.join(`, `),this._setCustomError(a),this._values.length!==n&&(this._renderControl(),S()),this._renderOptions(l.value))},T=e=>{if(!(!e||e.getAttribute(`aria-disabled`)===`true`)){if(e.dataset.custom===`true`){w(e.dataset.value);return}ee(e.dataset.value),l?.value&&(l.value=``,this._setCustomError(``),this._renderOptions(``))}};e.addEventListener(`click`,e=>{if(d())return;let t=e.target.closest(`[data-remove]`);if(t){e.stopPropagation(),C(t.dataset.remove),l?.focus();return}if(l){let t=_();e.target!==l&&l.focus(),e.target===l||!t?b():x();return}_()?x():b()}),i.addEventListener(`click`,e=>{let t=e.target.closest(`.search-select-option`);t&&(T(t),(l||n)?.focus())}),i.addEventListener(`mousemove`,e=>{let t=e.target.closest(`.search-select-option`);t&&!t.classList.contains(`is-active`)&&h(m().indexOf(t),{reveal:!1})}),i.addEventListener(`mouseleave`,()=>h(-1)),i.addEventListener(`error`,e=>{e.target?.classList?.contains(`avatar-img`)&&e.target.remove()},!0),n?.addEventListener(`input`,()=>{this._renderOptions(n.value),r&&(r.hidden=!n.value),h(-1)}),this._navHandler=ii({getVisibleOptions:m,getActive:()=>this._active,setActive:e=>h(e),onEnter:e=>{e?T(e):l?.value.trim()&&w(l.value)},onEscape:()=>{this._navHandler.clearTypeahead(),x(),l||e.focus()}});let E=e=>{let t=l||n;if(e.key===`Backspace`&&!t?.value&&this._values.length){C(this._values[this._values.length-1]);return}e.key===`Escape`&&_()&&(e.preventDefault(),e.stopPropagation()),this._navHandler.handler(e)};if(n?.addEventListener(`keydown`,E),r?.addEventListener(`click`,()=>{n.value=``,this._renderOptions(``),r.hidden=!0,n.focus()}),l){let t=e=>{e.target!==l&&e.preventDefault()};i.addEventListener(`mousedown`,t),e.addEventListener(`mousedown`,t),$r(),l.addEventListener(`focus`,()=>{ei()&&b()}),l.addEventListener(`input`,()=>{this._customError&&this._setCustomError(``),this._renderOptions(l.value),b()}),l.addEventListener(`keydown`,e=>{if(e.key===`,`&&l.value.trim()){e.preventDefault(),w(l.value);return}if(e.key===`Enter`){if(this._active<0&&!l.value.trim())return;this._navHandler.handler(e);return}(e.key===`ArrowDown`||e.key===`ArrowUp`)&&!_()&&b(),E(e)}),l.addEventListener(`paste`,e=>{let t=e.clipboardData?.getData(`text/plain`)??``;Sc(t,wc)&&(e.preventDefault(),w(`${l.value}${t}`))}),l.addEventListener(`blur`,e=>{e.relatedTarget&&this.contains(e.relatedTarget)||(l.value.trim()&&w(l.value,{quiet:!0}),x())})}else e.addEventListener(`keydown`,e=>{if(_()){E(e);return}(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),b())});this._bindGlobal=()=>{this._teardown(),!this._ro&&typeof ResizeObserver<`u`&&(this._ro=new ResizeObserver(()=>this._collapseChips()),this._ro.observe(this)),this._onDocClick=e=>{_()&&!this.contains(e.target)&&x()},document.addEventListener(`click`,this._onDocClick),_()&&o(this,y)},this._bindGlobal()}_teardown(){this._onDocClick&&=(document.removeEventListener(`click`,this._onDocClick),null),s(this),this._navHandler?.teardown()}disconnectedCallback(){this._teardown(),this._ro?.disconnect(),this._ro=null}},wc=[`,`,`;`,`
358
+ `,` `],Tc=[[`description`,`description`],[`avatar`,`avatar`],[`initials`,`initials`],[`disabled-hint`,`disabledHint`]],Ec=e=>!!(e.description||e.avatar||e.initials||e.disabled||e.disabledHint),Dc=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:``},Oc=e=>{let t=Dc(e.avatar);return!t&&!e.initials?``:`<span class="avatar wui-opt-avatar" aria-hidden="true"><span class="avatar-face">${H(e.initials??``)}</span>${t?`<img class="avatar-img" src="${X(t)}" alt="" />`:``}</span>`},kc=(e,t,n)=>{let r=!!e.disabled,i=e.description?`<span class="wui-opt-desc">${H(e.description)}</span>`:``,a=e.disabledHint&&r?`<span class="wui-opt-hint">${H(e.disabledHint)}</span>`:``;return`<button type="button" role="option" id="${X(t)}" class="search-select-option wui-opt-rich${n?` selected`:``}" data-value="${X(e.value)}" aria-selected="${n}"${r?` aria-disabled="true"`:``}><span class="ms-opt-label"><span class="wui-opt-name">${di(e)}</span>${i}</span>${a}${Oc(e)}<span class="ms-check">${M(`check`)}</span></button>`},Ac=new Map,jc=e=>{if(Ac.has(e))return Ac.get(e);let t=null;try{t=RegExp(`^(?:${e})$`,`u`)}catch{console.warn(`<wui-multiselect> custom-pattern is not a valid regular expression and is ignored: ${e}`)}return Ac.set(e,t),t},X=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),Mc=`data-open`,Nc=8,Pc=`.wui-nav-menu-link`,Fc=e=>e instanceof Element?e:e?.parentElement??null,Ic=class extends c{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&&!t.contains(e.target)&&this._set(t,!1)},this._onResize=()=>{let e=this._openItem();e&&this._align(e.children[1])}}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=>this._isTrigger(t.children[0])&&t.children[0].dataset.key===e);t&&this._set(t,!0)}close(e=!1){let t=this._openItem();t&&(this._set(t,!1),e&&t.children[0].focus({preventScroll:!0}))}_items(){return[...this.querySelectorAll(`.wui-nav-menu-item`)]}_openItem(){return this._items().find(e=>e.children[1]?.hasAttribute(Mc))??null}_isTrigger(e){return!!e?.classList.contains(`wui-nav-menu-trigger`)}_entries(){return this._items().map(e=>e.children[0])}_links(e){return[...e.children[1]?.querySelectorAll(Pc)??[]]}_set(e,t){let n=e.children[0],r=e.children[1];if(r){if(t){let t=this._openItem();t&&t!==e&&this._set(t,!1)}r.hasAttribute(Mc)!==t&&(r.toggleAttribute(Mc,t),n.setAttribute(`aria-expanded`,String(t)),t?(this._align(r),window.addEventListener(`resize`,this._onResize)):(r.removeAttribute(`data-align`),this._openItem()||window.removeEventListener(`resize`,this._onResize)),this.dispatchEvent(new CustomEvent(`wui-navigation-menu:toggle`,{bubbles:!0,detail:{key:n.dataset.key??null,open:t}})))}}_align(e){e.removeAttribute(`data-align`),e.getBoundingClientRect().right>window.innerWidth-Nc&&e.setAttribute(`data-align`,`end`)}_handleClick(e){let t=Fc(e.target),n=t?.closest(`.wui-nav-menu-trigger`);if(n&&this.contains(n)){let e=n.parentElement;this._set(e,!e.children[1].hasAttribute(Mc));return}let r=t?.closest(Pc);r&&this.contains(r)&&this.close()}_handleKeyDown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=Fc(e.target)?.closest(`.wui-nav-menu-trigger, .wui-nav-menu-toplink, .wui-nav-menu-link`);if(!t||!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&&n.children[0].focus({preventScroll:!0});return}if(t.matches(Pc)){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),r[t].focus({preventScroll:!0})}else if(e.key===`ArrowDown`&&this._isTrigger(t)){e.preventDefault();let n=t.parentElement;this._set(n,!0),this._links(n)[0]?.focus({preventScroll:!0})}}_linkKey(e,t){let n=t.closest(`.wui-nav-menu-item`),r=this._links(n),i=r.indexOf(t);e.key===`ArrowDown`||e.key===`ArrowUp`?(e.preventDefault(),r[(i+(e.key===`ArrowDown`?1:-1)+r.length)%r.length].focus({preventScroll:!0})):e.key===`Home`?(e.preventDefault(),r[0].focus({preventScroll:!0})):e.key===`End`&&(e.preventDefault(),r[r.length-1].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)}},Lc=99,Rc=1440*60*1e3,zc=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 Bc(e){return e>99?`99+`:String(e)}function Vc(e,t){return t===0?e:`${e}, ${Bc(t)} unread`}function Hc(e){return e===0?zc.noneUnread:`${Bc(e)} unread notifications`}function Uc(e){return Le(e,{pattern:`time`})}function Wc(e,t=Date.now()){let n=Le(e);return n===Le(t)?zc.today:n===Le(Fe(t)-Rc)?zc.yesterday:n}function Gc(e,t=Date.now()){let n=new Map;for(let r of e){if(!Number.isFinite(Fe(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=Le(r.at);n.has(e)||n.set(e,{key:e,heading:Wc(r.at,t),items:[]}),n.get(e).items.push(r)}return[...n.values()]}var Kc=`.wui-notification-center-trigger`,qc=`.wui-notification-center-panel`,Jc=`.wui-notification-center-count`,Yc=`.wui-notification-center-live`,Xc=`.wui-notification-center-markall`,Zc=`.wui-notification-center-item`,Qc=`wui-notification-center-item-read`,$c=`.wui-notification-center-unread-label`,el=class extends c{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=>{this.contains(e.target)||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()}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.querySelector(qc)?.focus(),this._announceToggle())}close({restoreFocus:e=!1}={}){this.isOpen&&(this.removeAttribute(`open`),this._syncOpen(),e&&this.querySelector(Kc)?.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(Kc)?.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(`${Zc}:not(.${Qc})`).length}_click(e){let t=e.target.closest?.(`${Kc}, ${Xc}, ${Zc}`);if(!(!t||!this.contains(t))){if(t.matches(Kc)){this.toggle();return}this.hasAttribute(`controlled`)||(t.matches(Xc)?this._markAll():this._markItem(t))}}_key(e){if(e.key===`Escape`&&this.isOpen){e.preventDefault(),e.stopPropagation(),this.close({restoreFocus:!0});return}if(!this.isOpen||!this.querySelector(qc)?.contains(e.target))return;let t={ArrowDown:1,ArrowUp:-1,Home:`first`,End:`last`}[e.key];if(t===void 0)return;let n=[...this.querySelectorAll(Zc)];if(n.length===0)return;let r=n.indexOf(e.target.closest(Zc)),i;i=t===`first`?0:t===`last`?n.length-1:r===-1?t===1?0:n.length-1:Math.min(n.length-1,Math.max(0,r+t)),e.preventDefault(),n[i].focus()}_markItem(e){e.classList.contains(Qc)||(this._applyRead(e),this._unread=Math.max(0,this._unread-1),this._render(),this._say(Hc(this._unread)),this._emitRead([e.dataset.id].filter(Boolean),!1))}async _markAll(){if(this._busy)return;let e=[...this.querySelectorAll(`${Zc}:not(.${Qc})`)];if(e.length===0&&this._unread===0)return;let t=e.map(e=>e.dataset.id).filter(Boolean),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 F(n,{method:`POST`,body:e});if(this._setBusy(!1),!r.ok){if(r.kind===`session`||r.kind===`aborted`)return;let e=r.message||zc.failed[r.kind]||zc.failed.server;this._say(e),this.dispatchEvent(new CustomEvent(`wui:notification-center:failed`,{bubbles:!0,detail:{kind:r.kind,message:e}}));return}}for(let t of e)this._applyRead(t);this._unread=0,this._render(),this._say(zc.allRead),this._emitRead(t,!0)}_applyRead(e){e.classList.add(Qc),e.querySelector($c)?.remove()}_setBusy(e){this._busy=e;let t=this.querySelector(Xc);t&&(t.disabled=e||this._unread===0,e?t.setAttribute(`aria-busy`,`true`):t.removeAttribute(`aria-busy`))}_render(){let e=this.querySelector(Jc);e&&(e.textContent=Bc(this._unread),e.hidden=this._unread===0),this.querySelector(Kc)?.setAttribute(`aria-label`,Vc(this.getAttribute(`label`)||zc.label,this._unread));let t=this.querySelector(Xc);t&&(t.disabled=this._unread===0)}_say(e){let t=this.querySelector(Yc);t&&(t.textContent=e)}_emitRead(e,t){this.dispatchEvent(new CustomEvent(`wui:notification-center:read`,{bubbles:!0,detail:{ids:e,all:t}}))}},tl=`.wui-onboarding-card`,nl=`.wui-onboarding-steps`,rl=`.wui-onboarding-toggle`,il=`.wui-onboarding-dismiss`,al=`.wui-onboarding-restore`,ol=`wui-onboarding:`,sl=class extends c{constructor(){super(),this._onClick=e=>{let t=e.target instanceof Element?e.target:null;t&&(t.closest(il)?this.dismiss():t.closest(al)?this.restore():t.closest(rl)&&this.toggle())}}connectedCallback(){this.addEventListener(`click`,this._onClick),this._stored()===`dismissed`&&this._setDismissed(!0)}disconnectedCallback(){this.removeEventListener(`click`,this._onClick)}get dismissed(){return this.querySelector(tl)?.hidden===!0}get collapsed(){return this.querySelector(nl)?.hidden===!0}dismiss(){this.dismissed||(this._setDismissed(!0),this._store(`dismissed`),this.querySelector(al)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:dismiss`,{bubbles:!0})))}restore(){this.dismissed&&(this._setDismissed(!1),this._store(null),this.querySelector(rl)?.focus(),this.dispatchEvent(new CustomEvent(`wui:onboarding:restore`,{bubbles:!0})))}toggle(){let e=this.querySelector(nl);if(!e)return;let t=!e.hidden;e.hidden=t,this.querySelector(rl)?.setAttribute(`aria-expanded`,String(!t)),this.dispatchEvent(new CustomEvent(`wui:onboarding:collapse`,{bubbles:!0,detail:{collapsed:t}}))}_setDismissed(e){let t=this.querySelector(tl),n=this.querySelector(al);t&&(t.hidden=e),n&&(n.hidden=!e)}_key(){let e=this.getAttribute(`storage-key`);return e?ol+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{}}},cl=/[^0-9]/g,ll=/[^0-9a-zA-Z]/g,ul=class extends c{static formAssociated=!0;static get observedAttributes(){return[`value`,`length`,`mode`,`disabled`,`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),B(this,this._value),this._paint()}_clean(e){return(e==null?``:String(e)).replace(this.mode===`alphanumeric`?ll:cl,``).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||``,B(this,this._value),this._paint()}attributeChangedCallback(e,t,n){this._rendered&&(e===`value`?(this._value=this._clean(n),B(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=Array.from({length:e},()=>`<span class="otp-slot" aria-hidden="true"></span>`).join(``),i=this.getAttribute(`aria-label`),a=i?` aria-label="${i.replace(/"/g,`&quot;`)}"`:``;this.innerHTML=`
359
359
  <div class="otp">
360
360
  <input
361
361
  class="otp-field"
@@ -368,21 +368,21 @@ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{
368
368
  spellcheck="false"
369
369
  ${n?`disabled`:``} />
370
370
  <div class="otp-slots" aria-hidden="true">${r}</div>
371
- </div>`,this._rendered=!0,I(this,this._value),this._wire(),this._paint()}_refs(){return{input:this.querySelector(`.otp-field`),slots:[...this.querySelectorAll(`.otp-slot`)]}}_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,I(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=>{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)}},Pc=`data-wui-overflow-hidden`,Fc=`[aria-selected="true"], .active`,Ic=`.chip-body, input, a[href], button:not(.chip-remove)`,Lc=1,Rc=0,zc=e=>Number.parseFloat(e)||0,Bc=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 t.nodeType===1&&!t.matches(`svg, img, [aria-hidden='true']`)&&r(t)};return r(e),n.join(` `)},Vc=e=>e.matches(`button, a[href], label, input`)?e:e.querySelector(Ic),Hc=class extends c{constructor(){super(),this._more=null,this._menu=null,this._hiddenKey=``,this._ro=null,this._mo=null,this._observedList=null,this._doc=null,this._onDocDown=e=>{!this._menu.hidden&&!this.contains(e.target)&&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,s(this)}static get observedAttributes(){return[`label`]}attributeChangedCallback(){this._more&&(this._more.firstChild.textContent=this._label())}_label(){return this.getAttribute(`label`)||`More`}_list(){return this.querySelector(`[data-wui-overflow-list]`)}_items(e){return[...e.children].filter(e=>!e.hasAttribute(`data-wui-overflow-skip`))}_build(){if(this._more)return;let e=`wui-overflow-menu-${++Rc}`,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(Pc);this._more.hidden=!0;let n=this.clientWidth,r=[];if(n>0&&t.length){let i=getComputedStyle(e),a=zc(i.columnGap),o=zc(i.paddingLeft)+zc(i.paddingRight)+zc(i.borderLeftWidth)+zc(i.borderRightWidth),s=t.map(e=>e.offsetWidth);if(s.reduce((e,t)=>e+t,0)+a*(t.length-1)>n-o+Lc){this._more.hidden=!1;let e=n-o-this._more.offsetWidth-zc(getComputedStyle(this).columnGap),i=this.hasAttribute(`keep`)?this.getAttribute(`keep`):Fc,c=new Set(i?t.filter(e=>e.matches(i)):[]),l=0,u=0;for(let e of c)l+=s[t.indexOf(e)]+(u?a:0),u+=1;for(let n=0;n<t.length;n+=1){if(c.has(t[n]))continue;let r=l+s[n]+(u?a:0);if(r>e)break;c.add(t[n]),l=r,u+=1}r=t.filter(e=>!c.has(e))}}for(let e of r)e.setAttribute(Pc,``);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(Pc)):[]}_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?(e.setAttribute(`role`,n.type===`radio`?`menuitemradio`:`menuitemcheckbox`),e.setAttribute(`aria-checked`,String(n.checked))):e.setAttribute(`role`,`menuitem`);let r=Vc(t),i=!r||r.disabled||r.getAttribute(`aria-disabled`)===`true`||t.matches(`.disabled, [aria-disabled='true']`);i&&e.setAttribute(`aria-disabled`,`true`),e.textContent=Bc(t),e.addEventListener(`click`,()=>{i||this._choose(t,r)}),this._menu.append(e)}}_choose(e,t){this._close(!1),t.click(),this.layout();let n=!e.hasAttribute(Pc)&&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=()=>a(this._more,this._menu);n(),o(this,n),e&&this._menu.firstElementChild?.focus()}_close(e){!this._menu||this._menu.hidden||(this._menu.hidden=!0,this._more.setAttribute(`aria-expanded`,`false`),s(this),e&&this._more.focus())}_onMenuKey(e){let t=[...this._menu.children],n=t.indexOf(this.ownerDocument.activeElement),r=null;if(e.key===`ArrowDown`)r=t[(n+1)%t.length];else if(e.key===`ArrowUp`)r=t[(n-1+t.length)%t.length];else if(e.key===`Home`)r=t[0];else if(e.key===`End`)r=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(),r?.focus()}},Uc={AD:[`Europe/Andorra`],AE:[`Asia/Dubai`],AF:[`Asia/Kabul`],AG:[`America/Antigua`],AI:[`America/Anguilla`],AL:[`Europe/Tirane`],AM:[`Asia/Yerevan`],AO:[`Africa/Luanda`],AR:[`America/Argentina/Buenos_Aires`,`America/Argentina/Catamarca`,`America/Argentina/ComodRivadavia`,`America/Argentina/Cordoba`,`America/Argentina/Jujuy`,`America/Argentina/La_Rioja`,`America/Argentina/Mendoza`,`America/Argentina/Rio_Gallegos`,`America/Argentina/Salta`,`America/Argentina/San_Juan`,`America/Argentina/San_Luis`,`America/Argentina/Tucuman`,`America/Argentina/Ushuaia`,`America/Buenos_Aires`,`America/Catamarca`,`America/Cordoba`,`America/Jujuy`,`America/Mendoza`,`America/Rosario`],AS:[`Pacific/Pago_Pago`,`Pacific/Samoa`,`US/Samoa`],AT:[`Europe/Vienna`],AU:[`Antarctica/Macquarie`,`Australia/Adelaide`,`Australia/Brisbane`,`Australia/Broken_Hill`,`Australia/Canberra`,`Australia/Currie`,`Australia/Darwin`,`Australia/Eucla`,`Australia/Hobart`,`Australia/LHI`,`Australia/Lindeman`,`Australia/Lord_Howe`,`Australia/Melbourne`,`Australia/NSW`,`Australia/North`,`Australia/Perth`,`Australia/Queensland`,`Australia/South`,`Australia/Sydney`,`Australia/Tasmania`,`Australia/Victoria`,`Australia/West`,`Australia/Yancowinna`],AW:[`America/Aruba`],AX:[`Europe/Mariehamn`],AZ:[`Asia/Baku`],BA:[`Europe/Sarajevo`],BB:[`America/Barbados`],BD:[`Asia/Dacca`,`Asia/Dhaka`],BE:[`Europe/Brussels`],BF:[`Africa/Ouagadougou`],BG:[`Europe/Sofia`],BH:[`Asia/Bahrain`],BI:[`Africa/Bujumbura`],BJ:[`Africa/Porto-Novo`],BL:[`America/St_Barthelemy`],BM:[`Atlantic/Bermuda`],BN:[`Asia/Brunei`],BO:[`America/La_Paz`],BQ:[`America/Kralendijk`],BR:[`America/Araguaina`,`America/Bahia`,`America/Belem`,`America/Boa_Vista`,`America/Campo_Grande`,`America/Cuiaba`,`America/Eirunepe`,`America/Fortaleza`,`America/Maceio`,`America/Manaus`,`America/Noronha`,`America/Porto_Acre`,`America/Porto_Velho`,`America/Recife`,`America/Rio_Branco`,`America/Santarem`,`America/Sao_Paulo`,`Brazil/DeNoronha`,`Brazil/East`,`Brazil/West`],BS:[`America/Nassau`],BT:[`Asia/Thimbu`,`Asia/Thimphu`],BW:[`Africa/Gaborone`],BY:[`Europe/Minsk`],BZ:[`America/Belize`],CA:`America/Atikokan.America/Blanc-Sablon.America/Cambridge_Bay.America/Coral_Harbour.America/Creston.America/Dawson.America/Dawson_Creek.America/Edmonton.America/Fort_Nelson.America/Glace_Bay.America/Goose_Bay.America/Halifax.America/Inuvik.America/Iqaluit.America/Moncton.America/Montreal.America/Nipigon.America/Pangnirtung.America/Rainy_River.America/Rankin_Inlet.America/Regina.America/Resolute.America/St_Johns.America/Swift_Current.America/Thunder_Bay.America/Toronto.America/Vancouver.America/Whitehorse.America/Winnipeg.America/Yellowknife.Canada/Atlantic.Canada/Central.Canada/Eastern.Canada/Mountain.Canada/Newfoundland.Canada/Pacific.Canada/Saskatchewan.Canada/Yukon`.split(`.`),CC:[`Indian/Cocos`],CD:[`Africa/Kinshasa`,`Africa/Lubumbashi`],CF:[`Africa/Bangui`],CG:[`Africa/Brazzaville`],CH:[`Europe/Zurich`],CI:[`Africa/Abidjan`],CK:[`Pacific/Rarotonga`],CL:[`America/Coyhaique`,`America/Punta_Arenas`,`America/Santiago`,`Chile/Continental`,`Chile/EasterIsland`,`Pacific/Easter`],CM:[`Africa/Douala`],CN:[`Asia/Chongqing`,`Asia/Harbin`,`Asia/Kashgar`,`Asia/Shanghai`,`Asia/Urumqi`],CO:[`America/Bogota`],CR:[`America/Costa_Rica`],CU:[`America/Havana`],CV:[`Atlantic/Cape_Verde`],CW:[`America/Curacao`],CX:[`Indian/Christmas`],CY:[`Asia/Famagusta`,`Asia/Nicosia`,`Europe/Nicosia`],CZ:[`Europe/Prague`],DE:[`Europe/Berlin`,`Europe/Busingen`],DJ:[`Africa/Djibouti`],DK:[`Europe/Copenhagen`],DM:[`America/Dominica`],DO:[`America/Santo_Domingo`],DZ:[`Africa/Algiers`],EC:[`America/Guayaquil`,`Pacific/Galapagos`],EE:[`Europe/Tallinn`],EG:[`Africa/Cairo`],EH:[`Africa/El_Aaiun`],ER:[`Africa/Asmara`,`Africa/Asmera`],ES:[`Africa/Ceuta`,`Atlantic/Canary`,`Europe/Madrid`],ET:[`Africa/Addis_Ababa`],FI:[`Europe/Helsinki`],FJ:[`Pacific/Fiji`],FK:[`Atlantic/Stanley`],FM:[`Pacific/Chuuk`,`Pacific/Kosrae`,`Pacific/Pohnpei`,`Pacific/Ponape`,`Pacific/Truk`,`Pacific/Yap`],FO:[`Atlantic/Faeroe`,`Atlantic/Faroe`],FR:[`Europe/Paris`],GA:[`Africa/Libreville`],GB:[`Europe/Belfast`,`Europe/London`],GD:[`America/Grenada`],GE:[`Asia/Tbilisi`],GF:[`America/Cayenne`],GG:[`Europe/Guernsey`],GH:[`Africa/Accra`],GI:[`Europe/Gibraltar`],GL:[`America/Danmarkshavn`,`America/Godthab`,`America/Nuuk`,`America/Scoresbysund`,`America/Thule`],GM:[`Africa/Banjul`],GN:[`Africa/Conakry`],GP:[`America/Guadeloupe`],GQ:[`Africa/Malabo`],GR:[`Europe/Athens`],GT:[`America/Guatemala`],GU:[`Pacific/Guam`],GW:[`Africa/Bissau`],GY:[`America/Guyana`],HK:[`Asia/Hong_Kong`],HN:[`America/Tegucigalpa`],HR:[`Europe/Zagreb`],HT:[`America/Port-au-Prince`],HU:[`Europe/Budapest`],ID:[`Asia/Jakarta`,`Asia/Jayapura`,`Asia/Makassar`,`Asia/Pontianak`,`Asia/Ujung_Pandang`],IE:[`Europe/Dublin`],IL:[`Asia/Jerusalem`,`Asia/Tel_Aviv`],IM:[`Europe/Isle_of_Man`],IN:[`Asia/Calcutta`,`Asia/Kolkata`],IO:[`Indian/Chagos`],IQ:[`Asia/Baghdad`],IR:[`Asia/Tehran`],IS:[`Atlantic/Reykjavik`],IT:[`Europe/Rome`],JE:[`Europe/Jersey`],JM:[`America/Jamaica`],JO:[`Asia/Amman`],JP:[`Asia/Tokyo`],KE:[`Africa/Nairobi`],KG:[`Asia/Bishkek`],KH:[`Asia/Phnom_Penh`],KI:[`Pacific/Enderbury`,`Pacific/Kanton`,`Pacific/Kiritimati`,`Pacific/Tarawa`],KM:[`Indian/Comoro`],KN:[`America/St_Kitts`],KP:[`Asia/Pyongyang`],KR:[`Asia/Seoul`],KW:[`Asia/Kuwait`],KY:[`America/Cayman`],KZ:[`Asia/Almaty`,`Asia/Aqtau`,`Asia/Aqtobe`,`Asia/Atyrau`,`Asia/Oral`,`Asia/Qostanay`,`Asia/Qyzylorda`],LA:[`Asia/Vientiane`],LB:[`Asia/Beirut`],LC:[`America/St_Lucia`],LI:[`Europe/Vaduz`],LK:[`Asia/Colombo`],LR:[`Africa/Monrovia`],LS:[`Africa/Maseru`],LT:[`Europe/Vilnius`],LU:[`Europe/Luxembourg`],LV:[`Europe/Riga`],LY:[`Africa/Tripoli`],MA:[`Africa/Casablanca`],MC:[`Europe/Monaco`],MD:[`Europe/Chisinau`,`Europe/Tiraspol`],ME:[`Europe/Podgorica`],MF:[`America/Marigot`],MG:[`Indian/Antananarivo`],MH:[`Pacific/Kwajalein`,`Pacific/Majuro`],MK:[`Europe/Skopje`],ML:[`Africa/Bamako`,`Africa/Timbuktu`],MM:[`Asia/Rangoon`,`Asia/Yangon`],MN:[`Asia/Choibalsan`,`Asia/Hovd`,`Asia/Ulaanbaatar`,`Asia/Ulan_Bator`],MO:[`Asia/Macao`,`Asia/Macau`],MP:[`Pacific/Saipan`],MQ:[`America/Martinique`],MR:[`Africa/Nouakchott`],MS:[`America/Montserrat`],MT:[`Europe/Malta`],MU:[`Indian/Mauritius`],MV:[`Indian/Maldives`],MW:[`Africa/Blantyre`],MX:[`America/Bahia_Banderas`,`America/Cancun`,`America/Chihuahua`,`America/Ciudad_Juarez`,`America/Ensenada`,`America/Hermosillo`,`America/Matamoros`,`America/Mazatlan`,`America/Merida`,`America/Mexico_City`,`America/Monterrey`,`America/Ojinaga`,`America/Santa_Isabel`,`America/Tijuana`,`Mexico/BajaNorte`,`Mexico/BajaSur`,`Mexico/General`],MY:[`Asia/Kuala_Lumpur`,`Asia/Kuching`],MZ:[`Africa/Maputo`],NA:[`Africa/Windhoek`],NC:[`Pacific/Noumea`],NE:[`Africa/Niamey`],NF:[`Pacific/Norfolk`],NG:[`Africa/Lagos`],NI:[`America/Managua`],NL:[`Europe/Amsterdam`],NO:[`Europe/Oslo`],NP:[`Asia/Kathmandu`,`Asia/Katmandu`],NR:[`Pacific/Nauru`],NU:[`Pacific/Niue`],NZ:[`Pacific/Auckland`,`Pacific/Chatham`],OM:[`Asia/Muscat`],PA:[`America/Panama`],PE:[`America/Lima`],PF:[`Pacific/Gambier`,`Pacific/Marquesas`,`Pacific/Tahiti`],PG:[`Pacific/Bougainville`,`Pacific/Port_Moresby`],PH:[`Asia/Manila`],PK:[`Asia/Karachi`],PL:[`Europe/Warsaw`],PM:[`America/Miquelon`],PR:[`America/Puerto_Rico`],PS:[`Asia/Gaza`,`Asia/Hebron`],PT:[`Atlantic/Azores`,`Atlantic/Madeira`,`Europe/Lisbon`],PW:[`Pacific/Palau`],PY:[`America/Asuncion`],QA:[`Asia/Qatar`],RE:[`Indian/Reunion`],RO:[`Europe/Bucharest`],RS:[`Europe/Belgrade`],RU:`Asia/Anadyr.Asia/Barnaul.Asia/Chita.Asia/Irkutsk.Asia/Kamchatka.Asia/Khandyga.Asia/Krasnoyarsk.Asia/Magadan.Asia/Novokuznetsk.Asia/Novosibirsk.Asia/Omsk.Asia/Sakhalin.Asia/Srednekolymsk.Asia/Tomsk.Asia/Ust-Nera.Asia/Vladivostok.Asia/Yakutsk.Asia/Yekaterinburg.Europe/Astrakhan.Europe/Kaliningrad.Europe/Kirov.Europe/Moscow.Europe/Samara.Europe/Saratov.Europe/Ulyanovsk.Europe/Volgograd`.split(`.`),RW:[`Africa/Kigali`],SA:[`Asia/Riyadh`],SB:[`Pacific/Guadalcanal`],SC:[`Indian/Mahe`],SD:[`Africa/Khartoum`],SE:[`Europe/Stockholm`],SG:[`Asia/Singapore`],SH:[`Atlantic/St_Helena`],SI:[`Europe/Ljubljana`],SJ:[`Arctic/Longyearbyen`,`Atlantic/Jan_Mayen`],SK:[`Europe/Bratislava`],SL:[`Africa/Freetown`],SM:[`Europe/San_Marino`],SN:[`Africa/Dakar`],SO:[`Africa/Mogadishu`],SR:[`America/Paramaribo`],SS:[`Africa/Juba`],ST:[`Africa/Sao_Tome`],SV:[`America/El_Salvador`],SX:[`America/Lower_Princes`],SY:[`Asia/Damascus`],SZ:[`Africa/Mbabane`],TC:[`America/Grand_Turk`],TD:[`Africa/Ndjamena`],TG:[`Africa/Lome`],TH:[`Asia/Bangkok`],TJ:[`Asia/Dushanbe`],TK:[`Pacific/Fakaofo`],TL:[`Asia/Dili`],TM:[`Asia/Ashgabat`,`Asia/Ashkhabad`],TN:[`Africa/Tunis`],TO:[`Pacific/Tongatapu`],TR:[`Asia/Istanbul`,`Europe/Istanbul`],TT:[`America/Port_of_Spain`],TV:[`Pacific/Funafuti`],TW:[`Asia/Taipei`],TZ:[`Africa/Dar_es_Salaam`],UA:[`Europe/Kiev`,`Europe/Kyiv`,`Europe/Simferopol`,`Europe/Uzhgorod`,`Europe/Zaporozhye`],UG:[`Africa/Kampala`],US:`America/Adak.America/Anchorage.America/Atka.America/Boise.America/Chicago.America/Denver.America/Detroit.America/Fort_Wayne.America/Indiana/Indianapolis.America/Indiana/Knox.America/Indiana/Marengo.America/Indiana/Petersburg.America/Indiana/Tell_City.America/Indiana/Vevay.America/Indiana/Vincennes.America/Indiana/Winamac.America/Indianapolis.America/Juneau.America/Kentucky/Louisville.America/Kentucky/Monticello.America/Knox_IN.America/Los_Angeles.America/Louisville.America/Menominee.America/Metlakatla.America/New_York.America/Nome.America/North_Dakota/Beulah.America/North_Dakota/Center.America/North_Dakota/New_Salem.America/Phoenix.America/Shiprock.America/Sitka.America/Yakutat.Pacific/Honolulu.US/Alaska.US/Aleutian.US/Arizona.US/Central.US/East-Indiana.US/Eastern.US/Hawaii.US/Indiana-Starke.US/Michigan.US/Mountain.US/Pacific`.split(`.`),UY:[`America/Montevideo`],UZ:[`Asia/Samarkand`,`Asia/Tashkent`],VA:[`Europe/Vatican`],VC:[`America/St_Vincent`],VE:[`America/Caracas`],VG:[`America/Tortola`],VI:[`America/St_Thomas`,`America/Virgin`],VN:[`Asia/Ho_Chi_Minh`,`Asia/Saigon`],VU:[`Pacific/Efate`],WF:[`Pacific/Wallis`],WS:[`Pacific/Apia`],YE:[`Asia/Aden`],YT:[`Indian/Mayotte`],ZA:[`Africa/Johannesburg`],ZM:[`Africa/Lusaka`],ZW:[`Africa/Harare`]},Wc=new Set(Ci.map(([e])=>e)),Gc=new Map;for(let[e,t]of Object.entries(Uc))for(let n of t)Gc.set(n,e);function Kc(e){let t=Gc.get(e);return t&&Wc.has(t)?t:null}function qc(e){if(!e)return null;let t;try{t=new Intl.Locale(e).region}catch{return null}return t&&Wc.has(t)?t:null}function Jc(){let e;try{e=Intl.DateTimeFormat().resolvedOptions().timeZone}catch{e=void 0}let t=typeof navigator>`u`?void 0:navigator.language;return Kc(e)||qc(t)||null}var Yc=`ui-phone.global.js`,Xc=typeof document>`u`?``:document.currentScript?.src||``;function Zc(e=Xc){return window.WeborityPhone?Promise.resolve(window.WeborityPhone):new Promise((t,n)=>{let r=document.querySelector(`script[src*="${Yc}"]`);if(!r){if(!e){n(Error(`The phone metadata script has no address to load from.`));return}let t=new URL(e);r=document.createElement(`script`),r.src=new URL(Yc,t).href+t.search,document.head.append(r)}r.addEventListener(`load`,()=>window.WeborityPhone?t(window.WeborityPhone):n(Error(`The phone metadata script did not load.`))),r.addEventListener(`error`,()=>n(Error(`The phone metadata script failed to load.`)))})}var Qc=e=>e?`wui-flag wui-flag-${String(e).toLowerCase()}`:`wui-flag`,$c=e=>e?`+${wi(e)}`:``,X=null,el=null;function tl(){return X?Promise.resolve(X):(el||=Zc().then(e=>(X=e,X)).catch(()=>null),el)}function nl(e,t){let n=`+${wi(e)}`;return t?.startsWith(n)?t.slice(n.length).trimStart():null}function rl(e,t){if(!X||!t||!e)return t;try{return nl(e,new X.AsYouType(e).input(`+${wi(e)}${t}`))||t}catch{return t}}function il(e,t){if(t<=0)return 0;let n=0;for(let r=0;r<e.length;r++)if(/[0-9]/.test(e[r])&&(n+=1,n===t))return r+1;return e.length}function al(e){if(!X||!e)return null;try{return nl(e,X.getExampleNumber(e,X.examples)?.formatInternational())||null}catch{return null}}function ol(e){let t=al(e);return t?`For example ${t}`:null}function sl(e){if(!X||!e)return null;try{if(!X.isValidPhoneNumber(e))return!1;let t=X.parsePhoneNumber(e)?.getType?.();return t===void 0||t===`MOBILE`||t===`FIXED_LINE_OR_MOBILE`}catch{return null}}function cl(e){if(!X||!e)return null;try{let t=X.getExampleNumber(e,X.examples);return t?.nationalNumber?t.nationalNumber.length:null}catch{return null}}function ll(e,t,n){try{let r=X.parsePhoneNumber(t,e),i=r?.nationalNumber;return!i||r.country!==e||i.length>n||!t.endsWith(i)?null:i}catch{return null}}function ul(e){if(!X||!e?.trim().startsWith(`+`))return null;try{let t=new X.AsYouType;t.input(e.trim());let n=t.getCountry();return n?{country:n,national:t.getNationalNumber()||``}:null}catch{return null}}var dl=class extends c{static formAssociated=!0;static get observedAttributes(){return[`value`,`country`,`placeholder`,`disabled`,`required`,`aria-label`,`aria-describedby`]}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._defaultCountry=Jc()||``,this._country=this._defaultCountry,this._national=``,this._active=-1,this._committedValue=``,this._validateOnInput=!1}connectedCallback(){if(!this._rendered){this.render();return}this._bindGlobal?.()}attributeChangedCallback(e,t,n){if(e===`value`){this.value=n;return}if(this._rendered){if(e===`aria-label`){let t=this.querySelector(`input[type=tel]`);t&&(n==null?t.removeAttribute(e):t.setAttribute(e,n));return}if(e===`aria-describedby`){this._syncDescribedBy();return}e===`country`&&(this._country=n||this._defaultCountry,this._suppressCountryRender)||this.render()}}formResetCallback(){this._validateOnInput=!1,this.value=this._defaultValue||``}get value(){return this._national&&this._country?`+${wi(this._country)}${this._national}`:``}set value(e){let t=String(e??``).trim(),n=ul(t);if(n)this._country=n.country,this._national=n.national.replace(/[^0-9]/g,``);else if(t.startsWith(`+`)){let e=t.replace(/[^0-9]/g,``),n=String(wi(this._country));n&&e.startsWith(n)&&(e=e.slice(n.length)),this._national=e}else this._national=t.replace(/[^0-9]/g,``);n&&this.getAttribute(`country`)!==this._country?this.setAttribute(`country`,this._country):this._rendered&&this.render(),this._committedValue=this.value,this._syncMirror()}_syncMirror(){I(this,this.value)}_syncDescribedBy(){let e=this.querySelector(`input[type=tel]`);if(!e)return;let t=[this.getAttribute(`aria-describedby`),this.querySelector(`[data-phone-error]`)?.id].filter(Boolean);t.length?e.setAttribute(`aria-describedby`,t.join(` `)):e.removeAttribute(`aria-describedby`)}_emitInput(){this.dispatchEvent(new Event(`input`,{bubbles:!0}))}_emitChange(){this._committedValue=this.value,this.dispatchEvent(new Event(`change`,{bubbles:!0}))}render(){this._defaultValue===void 0&&(this._defaultValue=this.getAttribute(`value`)||``),this._country=this.getAttribute(`country`)||this._country;let e=this.getAttribute(`placeholder`)||ol(this._country)||`Enter phone number`;this.id||=`wui-phone-${Math.random().toString(36).slice(2,9)}`;let t=`${this.id}-listbox`;this._listboxId=t,this.innerHTML=`
371
+ </div>`,this._rendered=!0,B(this,this._value),this._wire(),this._paint()}_refs(){return{input:this.querySelector(`.otp-field`),slots:[...this.querySelectorAll(`.otp-slot`)]}}_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,B(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=>{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)}},dl=`data-wui-overflow-hidden`,fl=`[aria-selected="true"], .active`,pl=`.chip-body, input, a[href], button:not(.chip-remove)`,ml=1,hl=0,gl=e=>Number.parseFloat(e)||0,_l=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 t.nodeType===1&&!t.matches(`svg, img, [aria-hidden='true']`)&&r(t)};return r(e),n.join(` `)},vl=e=>e.matches(`button, a[href], label, input`)?e:e.querySelector(pl),yl=class extends c{constructor(){super(),this._more=null,this._menu=null,this._hiddenKey=``,this._ro=null,this._mo=null,this._observedList=null,this._doc=null,this._onDocDown=e=>{!this._menu.hidden&&!this.contains(e.target)&&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,s(this)}static get observedAttributes(){return[`label`]}attributeChangedCallback(){this._more&&(this._more.firstChild.textContent=this._label())}_label(){return this.getAttribute(`label`)||`More`}_list(){return this.querySelector(`[data-wui-overflow-list]`)}_items(e){return[...e.children].filter(e=>!e.hasAttribute(`data-wui-overflow-skip`))}_build(){if(this._more)return;let e=`wui-overflow-menu-${++hl}`,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(dl);this._more.hidden=!0;let n=this.clientWidth,r=[];if(n>0&&t.length){let i=getComputedStyle(e),a=gl(i.columnGap),o=gl(i.paddingLeft)+gl(i.paddingRight)+gl(i.borderLeftWidth)+gl(i.borderRightWidth),s=t.map(e=>e.offsetWidth);if(s.reduce((e,t)=>e+t,0)+a*(t.length-1)>n-o+ml){this._more.hidden=!1;let e=n-o-this._more.offsetWidth-gl(getComputedStyle(this).columnGap),i=this.hasAttribute(`keep`)?this.getAttribute(`keep`):fl,c=new Set(i?t.filter(e=>e.matches(i)):[]),l=0,u=0;for(let e of c)l+=s[t.indexOf(e)]+(u?a:0),u+=1;for(let n=0;n<t.length;n+=1){if(c.has(t[n]))continue;let r=l+s[n]+(u?a:0);if(r>e)break;c.add(t[n]),l=r,u+=1}r=t.filter(e=>!c.has(e))}}for(let e of r)e.setAttribute(dl,``);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(dl)):[]}_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?(e.setAttribute(`role`,n.type===`radio`?`menuitemradio`:`menuitemcheckbox`),e.setAttribute(`aria-checked`,String(n.checked))):e.setAttribute(`role`,`menuitem`);let r=vl(t),i=!r||r.disabled||r.getAttribute(`aria-disabled`)===`true`||t.matches(`.disabled, [aria-disabled='true']`);i&&e.setAttribute(`aria-disabled`,`true`),e.textContent=_l(t),e.addEventListener(`click`,()=>{i||this._choose(t,r)}),this._menu.append(e)}}_choose(e,t){this._close(!1),t.click(),this.layout();let n=!e.hasAttribute(dl)&&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=()=>a(this._more,this._menu);n(),o(this,n),e&&this._menu.firstElementChild?.focus()}_close(e){!this._menu||this._menu.hidden||(this._menu.hidden=!0,this._more.setAttribute(`aria-expanded`,`false`),s(this),e&&this._more.focus())}_onMenuKey(e){let t=[...this._menu.children],n=t.indexOf(this.ownerDocument.activeElement),r=null;if(e.key===`ArrowDown`)r=t[(n+1)%t.length];else if(e.key===`ArrowUp`)r=t[(n-1+t.length)%t.length];else if(e.key===`Home`)r=t[0];else if(e.key===`End`)r=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(),r?.focus()}},bl={AD:[`Europe/Andorra`],AE:[`Asia/Dubai`],AF:[`Asia/Kabul`],AG:[`America/Antigua`],AI:[`America/Anguilla`],AL:[`Europe/Tirane`],AM:[`Asia/Yerevan`],AO:[`Africa/Luanda`],AR:[`America/Argentina/Buenos_Aires`,`America/Argentina/Catamarca`,`America/Argentina/ComodRivadavia`,`America/Argentina/Cordoba`,`America/Argentina/Jujuy`,`America/Argentina/La_Rioja`,`America/Argentina/Mendoza`,`America/Argentina/Rio_Gallegos`,`America/Argentina/Salta`,`America/Argentina/San_Juan`,`America/Argentina/San_Luis`,`America/Argentina/Tucuman`,`America/Argentina/Ushuaia`,`America/Buenos_Aires`,`America/Catamarca`,`America/Cordoba`,`America/Jujuy`,`America/Mendoza`,`America/Rosario`],AS:[`Pacific/Pago_Pago`,`Pacific/Samoa`,`US/Samoa`],AT:[`Europe/Vienna`],AU:[`Antarctica/Macquarie`,`Australia/Adelaide`,`Australia/Brisbane`,`Australia/Broken_Hill`,`Australia/Canberra`,`Australia/Currie`,`Australia/Darwin`,`Australia/Eucla`,`Australia/Hobart`,`Australia/LHI`,`Australia/Lindeman`,`Australia/Lord_Howe`,`Australia/Melbourne`,`Australia/NSW`,`Australia/North`,`Australia/Perth`,`Australia/Queensland`,`Australia/South`,`Australia/Sydney`,`Australia/Tasmania`,`Australia/Victoria`,`Australia/West`,`Australia/Yancowinna`],AW:[`America/Aruba`],AX:[`Europe/Mariehamn`],AZ:[`Asia/Baku`],BA:[`Europe/Sarajevo`],BB:[`America/Barbados`],BD:[`Asia/Dacca`,`Asia/Dhaka`],BE:[`Europe/Brussels`],BF:[`Africa/Ouagadougou`],BG:[`Europe/Sofia`],BH:[`Asia/Bahrain`],BI:[`Africa/Bujumbura`],BJ:[`Africa/Porto-Novo`],BL:[`America/St_Barthelemy`],BM:[`Atlantic/Bermuda`],BN:[`Asia/Brunei`],BO:[`America/La_Paz`],BQ:[`America/Kralendijk`],BR:[`America/Araguaina`,`America/Bahia`,`America/Belem`,`America/Boa_Vista`,`America/Campo_Grande`,`America/Cuiaba`,`America/Eirunepe`,`America/Fortaleza`,`America/Maceio`,`America/Manaus`,`America/Noronha`,`America/Porto_Acre`,`America/Porto_Velho`,`America/Recife`,`America/Rio_Branco`,`America/Santarem`,`America/Sao_Paulo`,`Brazil/DeNoronha`,`Brazil/East`,`Brazil/West`],BS:[`America/Nassau`],BT:[`Asia/Thimbu`,`Asia/Thimphu`],BW:[`Africa/Gaborone`],BY:[`Europe/Minsk`],BZ:[`America/Belize`],CA:`America/Atikokan.America/Blanc-Sablon.America/Cambridge_Bay.America/Coral_Harbour.America/Creston.America/Dawson.America/Dawson_Creek.America/Edmonton.America/Fort_Nelson.America/Glace_Bay.America/Goose_Bay.America/Halifax.America/Inuvik.America/Iqaluit.America/Moncton.America/Montreal.America/Nipigon.America/Pangnirtung.America/Rainy_River.America/Rankin_Inlet.America/Regina.America/Resolute.America/St_Johns.America/Swift_Current.America/Thunder_Bay.America/Toronto.America/Vancouver.America/Whitehorse.America/Winnipeg.America/Yellowknife.Canada/Atlantic.Canada/Central.Canada/Eastern.Canada/Mountain.Canada/Newfoundland.Canada/Pacific.Canada/Saskatchewan.Canada/Yukon`.split(`.`),CC:[`Indian/Cocos`],CD:[`Africa/Kinshasa`,`Africa/Lubumbashi`],CF:[`Africa/Bangui`],CG:[`Africa/Brazzaville`],CH:[`Europe/Zurich`],CI:[`Africa/Abidjan`],CK:[`Pacific/Rarotonga`],CL:[`America/Coyhaique`,`America/Punta_Arenas`,`America/Santiago`,`Chile/Continental`,`Chile/EasterIsland`,`Pacific/Easter`],CM:[`Africa/Douala`],CN:[`Asia/Chongqing`,`Asia/Harbin`,`Asia/Kashgar`,`Asia/Shanghai`,`Asia/Urumqi`],CO:[`America/Bogota`],CR:[`America/Costa_Rica`],CU:[`America/Havana`],CV:[`Atlantic/Cape_Verde`],CW:[`America/Curacao`],CX:[`Indian/Christmas`],CY:[`Asia/Famagusta`,`Asia/Nicosia`,`Europe/Nicosia`],CZ:[`Europe/Prague`],DE:[`Europe/Berlin`,`Europe/Busingen`],DJ:[`Africa/Djibouti`],DK:[`Europe/Copenhagen`],DM:[`America/Dominica`],DO:[`America/Santo_Domingo`],DZ:[`Africa/Algiers`],EC:[`America/Guayaquil`,`Pacific/Galapagos`],EE:[`Europe/Tallinn`],EG:[`Africa/Cairo`],EH:[`Africa/El_Aaiun`],ER:[`Africa/Asmara`,`Africa/Asmera`],ES:[`Africa/Ceuta`,`Atlantic/Canary`,`Europe/Madrid`],ET:[`Africa/Addis_Ababa`],FI:[`Europe/Helsinki`],FJ:[`Pacific/Fiji`],FK:[`Atlantic/Stanley`],FM:[`Pacific/Chuuk`,`Pacific/Kosrae`,`Pacific/Pohnpei`,`Pacific/Ponape`,`Pacific/Truk`,`Pacific/Yap`],FO:[`Atlantic/Faeroe`,`Atlantic/Faroe`],FR:[`Europe/Paris`],GA:[`Africa/Libreville`],GB:[`Europe/Belfast`,`Europe/London`],GD:[`America/Grenada`],GE:[`Asia/Tbilisi`],GF:[`America/Cayenne`],GG:[`Europe/Guernsey`],GH:[`Africa/Accra`],GI:[`Europe/Gibraltar`],GL:[`America/Danmarkshavn`,`America/Godthab`,`America/Nuuk`,`America/Scoresbysund`,`America/Thule`],GM:[`Africa/Banjul`],GN:[`Africa/Conakry`],GP:[`America/Guadeloupe`],GQ:[`Africa/Malabo`],GR:[`Europe/Athens`],GT:[`America/Guatemala`],GU:[`Pacific/Guam`],GW:[`Africa/Bissau`],GY:[`America/Guyana`],HK:[`Asia/Hong_Kong`],HN:[`America/Tegucigalpa`],HR:[`Europe/Zagreb`],HT:[`America/Port-au-Prince`],HU:[`Europe/Budapest`],ID:[`Asia/Jakarta`,`Asia/Jayapura`,`Asia/Makassar`,`Asia/Pontianak`,`Asia/Ujung_Pandang`],IE:[`Europe/Dublin`],IL:[`Asia/Jerusalem`,`Asia/Tel_Aviv`],IM:[`Europe/Isle_of_Man`],IN:[`Asia/Calcutta`,`Asia/Kolkata`],IO:[`Indian/Chagos`],IQ:[`Asia/Baghdad`],IR:[`Asia/Tehran`],IS:[`Atlantic/Reykjavik`],IT:[`Europe/Rome`],JE:[`Europe/Jersey`],JM:[`America/Jamaica`],JO:[`Asia/Amman`],JP:[`Asia/Tokyo`],KE:[`Africa/Nairobi`],KG:[`Asia/Bishkek`],KH:[`Asia/Phnom_Penh`],KI:[`Pacific/Enderbury`,`Pacific/Kanton`,`Pacific/Kiritimati`,`Pacific/Tarawa`],KM:[`Indian/Comoro`],KN:[`America/St_Kitts`],KP:[`Asia/Pyongyang`],KR:[`Asia/Seoul`],KW:[`Asia/Kuwait`],KY:[`America/Cayman`],KZ:[`Asia/Almaty`,`Asia/Aqtau`,`Asia/Aqtobe`,`Asia/Atyrau`,`Asia/Oral`,`Asia/Qostanay`,`Asia/Qyzylorda`],LA:[`Asia/Vientiane`],LB:[`Asia/Beirut`],LC:[`America/St_Lucia`],LI:[`Europe/Vaduz`],LK:[`Asia/Colombo`],LR:[`Africa/Monrovia`],LS:[`Africa/Maseru`],LT:[`Europe/Vilnius`],LU:[`Europe/Luxembourg`],LV:[`Europe/Riga`],LY:[`Africa/Tripoli`],MA:[`Africa/Casablanca`],MC:[`Europe/Monaco`],MD:[`Europe/Chisinau`,`Europe/Tiraspol`],ME:[`Europe/Podgorica`],MF:[`America/Marigot`],MG:[`Indian/Antananarivo`],MH:[`Pacific/Kwajalein`,`Pacific/Majuro`],MK:[`Europe/Skopje`],ML:[`Africa/Bamako`,`Africa/Timbuktu`],MM:[`Asia/Rangoon`,`Asia/Yangon`],MN:[`Asia/Choibalsan`,`Asia/Hovd`,`Asia/Ulaanbaatar`,`Asia/Ulan_Bator`],MO:[`Asia/Macao`,`Asia/Macau`],MP:[`Pacific/Saipan`],MQ:[`America/Martinique`],MR:[`Africa/Nouakchott`],MS:[`America/Montserrat`],MT:[`Europe/Malta`],MU:[`Indian/Mauritius`],MV:[`Indian/Maldives`],MW:[`Africa/Blantyre`],MX:[`America/Bahia_Banderas`,`America/Cancun`,`America/Chihuahua`,`America/Ciudad_Juarez`,`America/Ensenada`,`America/Hermosillo`,`America/Matamoros`,`America/Mazatlan`,`America/Merida`,`America/Mexico_City`,`America/Monterrey`,`America/Ojinaga`,`America/Santa_Isabel`,`America/Tijuana`,`Mexico/BajaNorte`,`Mexico/BajaSur`,`Mexico/General`],MY:[`Asia/Kuala_Lumpur`,`Asia/Kuching`],MZ:[`Africa/Maputo`],NA:[`Africa/Windhoek`],NC:[`Pacific/Noumea`],NE:[`Africa/Niamey`],NF:[`Pacific/Norfolk`],NG:[`Africa/Lagos`],NI:[`America/Managua`],NL:[`Europe/Amsterdam`],NO:[`Europe/Oslo`],NP:[`Asia/Kathmandu`,`Asia/Katmandu`],NR:[`Pacific/Nauru`],NU:[`Pacific/Niue`],NZ:[`Pacific/Auckland`,`Pacific/Chatham`],OM:[`Asia/Muscat`],PA:[`America/Panama`],PE:[`America/Lima`],PF:[`Pacific/Gambier`,`Pacific/Marquesas`,`Pacific/Tahiti`],PG:[`Pacific/Bougainville`,`Pacific/Port_Moresby`],PH:[`Asia/Manila`],PK:[`Asia/Karachi`],PL:[`Europe/Warsaw`],PM:[`America/Miquelon`],PR:[`America/Puerto_Rico`],PS:[`Asia/Gaza`,`Asia/Hebron`],PT:[`Atlantic/Azores`,`Atlantic/Madeira`,`Europe/Lisbon`],PW:[`Pacific/Palau`],PY:[`America/Asuncion`],QA:[`Asia/Qatar`],RE:[`Indian/Reunion`],RO:[`Europe/Bucharest`],RS:[`Europe/Belgrade`],RU:`Asia/Anadyr.Asia/Barnaul.Asia/Chita.Asia/Irkutsk.Asia/Kamchatka.Asia/Khandyga.Asia/Krasnoyarsk.Asia/Magadan.Asia/Novokuznetsk.Asia/Novosibirsk.Asia/Omsk.Asia/Sakhalin.Asia/Srednekolymsk.Asia/Tomsk.Asia/Ust-Nera.Asia/Vladivostok.Asia/Yakutsk.Asia/Yekaterinburg.Europe/Astrakhan.Europe/Kaliningrad.Europe/Kirov.Europe/Moscow.Europe/Samara.Europe/Saratov.Europe/Ulyanovsk.Europe/Volgograd`.split(`.`),RW:[`Africa/Kigali`],SA:[`Asia/Riyadh`],SB:[`Pacific/Guadalcanal`],SC:[`Indian/Mahe`],SD:[`Africa/Khartoum`],SE:[`Europe/Stockholm`],SG:[`Asia/Singapore`],SH:[`Atlantic/St_Helena`],SI:[`Europe/Ljubljana`],SJ:[`Arctic/Longyearbyen`,`Atlantic/Jan_Mayen`],SK:[`Europe/Bratislava`],SL:[`Africa/Freetown`],SM:[`Europe/San_Marino`],SN:[`Africa/Dakar`],SO:[`Africa/Mogadishu`],SR:[`America/Paramaribo`],SS:[`Africa/Juba`],ST:[`Africa/Sao_Tome`],SV:[`America/El_Salvador`],SX:[`America/Lower_Princes`],SY:[`Asia/Damascus`],SZ:[`Africa/Mbabane`],TC:[`America/Grand_Turk`],TD:[`Africa/Ndjamena`],TG:[`Africa/Lome`],TH:[`Asia/Bangkok`],TJ:[`Asia/Dushanbe`],TK:[`Pacific/Fakaofo`],TL:[`Asia/Dili`],TM:[`Asia/Ashgabat`,`Asia/Ashkhabad`],TN:[`Africa/Tunis`],TO:[`Pacific/Tongatapu`],TR:[`Asia/Istanbul`,`Europe/Istanbul`],TT:[`America/Port_of_Spain`],TV:[`Pacific/Funafuti`],TW:[`Asia/Taipei`],TZ:[`Africa/Dar_es_Salaam`],UA:[`Europe/Kiev`,`Europe/Kyiv`,`Europe/Simferopol`,`Europe/Uzhgorod`,`Europe/Zaporozhye`],UG:[`Africa/Kampala`],US:`America/Adak.America/Anchorage.America/Atka.America/Boise.America/Chicago.America/Denver.America/Detroit.America/Fort_Wayne.America/Indiana/Indianapolis.America/Indiana/Knox.America/Indiana/Marengo.America/Indiana/Petersburg.America/Indiana/Tell_City.America/Indiana/Vevay.America/Indiana/Vincennes.America/Indiana/Winamac.America/Indianapolis.America/Juneau.America/Kentucky/Louisville.America/Kentucky/Monticello.America/Knox_IN.America/Los_Angeles.America/Louisville.America/Menominee.America/Metlakatla.America/New_York.America/Nome.America/North_Dakota/Beulah.America/North_Dakota/Center.America/North_Dakota/New_Salem.America/Phoenix.America/Shiprock.America/Sitka.America/Yakutat.Pacific/Honolulu.US/Alaska.US/Aleutian.US/Arizona.US/Central.US/East-Indiana.US/Eastern.US/Hawaii.US/Indiana-Starke.US/Michigan.US/Mountain.US/Pacific`.split(`.`),UY:[`America/Montevideo`],UZ:[`Asia/Samarkand`,`Asia/Tashkent`],VA:[`Europe/Vatican`],VC:[`America/St_Vincent`],VE:[`America/Caracas`],VG:[`America/Tortola`],VI:[`America/St_Thomas`,`America/Virgin`],VN:[`Asia/Ho_Chi_Minh`,`Asia/Saigon`],VU:[`Pacific/Efate`],WF:[`Pacific/Wallis`],WS:[`Pacific/Apia`],YE:[`Asia/Aden`],YT:[`Indian/Mayotte`],ZA:[`Africa/Johannesburg`],ZM:[`Africa/Lusaka`],ZW:[`Africa/Harare`]},xl=new Set(Pa.map(([e])=>e)),Sl=new Map;for(let[e,t]of Object.entries(bl))for(let n of t)Sl.set(n,e);function Cl(e){let t=Sl.get(e);return t&&xl.has(t)?t:null}function wl(e){if(!e)return null;let t;try{t=new Intl.Locale(e).region}catch{return null}return t&&xl.has(t)?t:null}function Tl(){let e;try{e=Intl.DateTimeFormat().resolvedOptions().timeZone}catch{e=void 0}let t=typeof navigator>`u`?void 0:navigator.language;return Cl(e)||wl(t)||null}var El=`ui-phone.global.js`,Dl=typeof document>`u`?``:document.currentScript?.src||``;function Ol(e=Dl){return window.WeborityPhone?Promise.resolve(window.WeborityPhone):new Promise((t,n)=>{let r=document.querySelector(`script[src*="${El}"]`);if(!r){if(!e){n(Error(`The phone metadata script has no address to load from.`));return}let t=new URL(e);r=document.createElement(`script`),r.src=new URL(El,t).href+t.search,document.head.append(r)}r.addEventListener(`load`,()=>window.WeborityPhone?t(window.WeborityPhone):n(Error(`The phone metadata script did not load.`))),r.addEventListener(`error`,()=>n(Error(`The phone metadata script failed to load.`)))})}var kl=e=>e?`wui-flag wui-flag-${String(e).toLowerCase()}`:`wui-flag`,Al=e=>e?`+${Fa(e)}`:``,Z=null,jl=null;function Ml(){return Z?Promise.resolve(Z):(jl||=Ol().then(e=>(Z=e,Z)).catch(()=>null),jl)}function Nl(e,t){let n=`+${Fa(e)}`;return t?.startsWith(n)?t.slice(n.length).trimStart():null}function Pl(e,t){if(!Z||!t||!e)return t;try{return Nl(e,new Z.AsYouType(e).input(`+${Fa(e)}${t}`))||t}catch{return t}}function Fl(e,t){if(t<=0)return 0;let n=0;for(let r=0;r<e.length;r++)if(/[0-9]/.test(e[r])&&(n+=1,n===t))return r+1;return e.length}function Il(e){if(!Z||!e)return null;try{return Nl(e,Z.getExampleNumber(e,Z.examples)?.formatInternational())||null}catch{return null}}function Ll(e){let t=Il(e);return t?`For example ${t}`:null}function Rl(e){if(!Z||!e)return null;try{if(!Z.isValidPhoneNumber(e))return!1;let t=Z.parsePhoneNumber(e)?.getType?.();return t===void 0||t===`MOBILE`||t===`FIXED_LINE_OR_MOBILE`}catch{return null}}function zl(e){if(!Z||!e)return null;try{let t=Z.getExampleNumber(e,Z.examples);return t?.nationalNumber?t.nationalNumber.length:null}catch{return null}}function Bl(e,t,n){try{let r=Z.parsePhoneNumber(t,e),i=r?.nationalNumber;return!i||r.country!==e||i.length>n||!t.endsWith(i)?null:i}catch{return null}}function Vl(e){if(!Z||!e?.trim().startsWith(`+`))return null;try{let t=new Z.AsYouType;t.input(e.trim());let n=t.getCountry();return n?{country:n,national:t.getNationalNumber()||``}:null}catch{return null}}var Hl=class extends c{static formAssociated=!0;static get observedAttributes(){return[`value`,`country`,`placeholder`,`disabled`,`required`,`aria-label`,`aria-describedby`]}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._defaultCountry=Tl()||``,this._country=this._defaultCountry,this._national=``,this._active=-1,this._committedValue=``,this._validateOnInput=!1}connectedCallback(){if(!this._rendered){this.render();return}this._bindGlobal?.()}attributeChangedCallback(e,t,n){if(e===`value`){this.value=n;return}if(this._rendered){if(e===`aria-label`){let t=this.querySelector(`input[type=tel]`);t&&(n==null?t.removeAttribute(e):t.setAttribute(e,n));return}if(e===`aria-describedby`){this._syncDescribedBy();return}e===`country`&&(this._country=n||this._defaultCountry,this._suppressCountryRender)||this.render()}}formResetCallback(){this._validateOnInput=!1,this.value=this._defaultValue||``}get value(){return this._national&&this._country?`+${Fa(this._country)}${this._national}`:``}set value(e){let t=String(e??``).trim(),n=Vl(t);if(n)this._country=n.country,this._national=n.national.replace(/[^0-9]/g,``);else if(t.startsWith(`+`)){let e=t.replace(/[^0-9]/g,``),n=String(Fa(this._country));n&&e.startsWith(n)&&(e=e.slice(n.length)),this._national=e}else this._national=t.replace(/[^0-9]/g,``);n&&this.getAttribute(`country`)!==this._country?this.setAttribute(`country`,this._country):this._rendered&&this.render(),this._committedValue=this.value,this._syncMirror()}_syncMirror(){B(this,this.value)}_syncDescribedBy(){let e=this.querySelector(`input[type=tel]`);if(!e)return;let t=[this.getAttribute(`aria-describedby`),this.querySelector(`[data-phone-error]`)?.id].filter(Boolean);t.length?e.setAttribute(`aria-describedby`,t.join(` `)):e.removeAttribute(`aria-describedby`)}_emitInput(){this.dispatchEvent(new Event(`input`,{bubbles:!0}))}_emitChange(){this._committedValue=this.value,this.dispatchEvent(new Event(`change`,{bubbles:!0}))}render(){this._defaultValue===void 0&&(this._defaultValue=this.getAttribute(`value`)||``),this._country=this.getAttribute(`country`)||this._country;let e=this.getAttribute(`placeholder`)||Ll(this._country)||`Enter phone number`;this.id||=`wui-phone-${Math.random().toString(36).slice(2,9)}`;let t=`${this.id}-listbox`;this._listboxId=t,this.innerHTML=`
372
372
  <div class="phone-input-wrap">
373
373
  <div class="phone-country-adornment">
374
- <button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${fl(t)}"${this.hasAttribute(`disabled`)?` disabled`:``}>
375
- <span class="${Qc(this._country)}" data-flag aria-hidden="true"></span>
376
- ${R(`chevron-down`,{className:`phone-chevron`})}
377
- <span class="phone-dial" data-dial>${$c(this._country)}</span>
374
+ <button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${Ul(t)}"${this.hasAttribute(`disabled`)?` disabled`:``}>
375
+ <span class="${kl(this._country)}" data-flag aria-hidden="true"></span>
376
+ ${M(`chevron-down`,{className:`phone-chevron`})}
377
+ <span class="phone-dial" data-dial>${Al(this._country)}</span>
378
378
  </button>
379
- <div class="country-dropdown-menu" role="listbox" id="${fl(t)}" tabindex="-1" hidden>
380
- <div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${R(`search`)}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${fl(t)}" aria-autocomplete="list" /></div>
379
+ <div class="country-dropdown-menu" role="listbox" id="${Ul(t)}" tabindex="-1" hidden>
380
+ <div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${M(`search`)}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${Ul(t)}" aria-autocomplete="list" /></div>
381
381
  <div class="country-list-scroll"><div class="country-empty" hidden>No countries found</div></div>
382
382
  </div>
383
383
  </div>
384
- <input type="tel" class="input" placeholder="${fl(e)}" value="${fl(rl(this._country,this._national))}"${this.getAttribute(`aria-label`)?` aria-label="${fl(this.getAttribute(`aria-label`))}"`:``}${this.getAttribute(`aria-describedby`)?` aria-describedby="${fl(this.getAttribute(`aria-describedby`))}"`:``}${this.hasAttribute(`required`)?` required aria-required="true"`:``}${this.hasAttribute(`disabled`)?` disabled`:``} />
385
- </div>`,this._rendered=!0,I(this,this.value),this._wire()}_ensureItems(){let e=this.querySelector(`.country-list-scroll`);if(!e||e.querySelector(`.country-dropdown-item`))return;let t=this._listboxId,n=Ci.map(([e,n,r],i)=>`<button type="button" role="option" id="${fl(`${t}-opt-${i}`)}" class="country-dropdown-item${e===this._country?` selected`:``}" data-iso="${e}" aria-selected="${e===this._country}"><span class="${Qc(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join(``);e.insertAdjacentHTML(`afterbegin`,n)}_itemEls(){return[...this.querySelectorAll(`.country-dropdown-item`)]}_visibleItems(){return this._itemEls().filter(e=>!e.hidden)}_wire(){this._teardown();let e=this.querySelector(`.country-toggle`),t=this.querySelector(`.phone-input-wrap`),n=this.querySelector(`.country-dropdown-menu`),r=this.querySelector(`.dropdown-search-input`),i=this.querySelector(`.country-list-scroll`),c=this.querySelector(`.country-empty`),l=this.querySelector(`input[type=tel]`),u=this.querySelector(`[data-flag]`),d=this.querySelector(`[data-dial]`);if(!e||!n)return;let f=()=>!n.hidden,p=()=>a(t||e,n),m=(e,{reveal:t=!0}={})=>{let n=this._visibleItems();this._active=e,Jn(i,e>=0&&n[e]||null),e>=0&&n[e]?(t&&n[e].scrollIntoView({block:`nearest`}),r?.setAttribute(`aria-activedescendant`,n[e].id)):r?.removeAttribute(`aria-activedescendant`)},h=()=>{f()&&p()},g=()=>{this._ensureItems(),n.hidden=!1,e.setAttribute(`aria-expanded`,`true`),r.value=``,v(``),p(),o(this,h),r.focus(),m(this._visibleItems().findIndex(e=>e.classList.contains(`selected`)))},_=()=>{n.hidden=!0,e.setAttribute(`aria-expanded`,`false`),m(-1),s(this)},v=e=>{let t=e.trim().toLowerCase(),n=0;for(let e of this._itemEls()){let r=!t||e.textContent.toLowerCase().includes(t);e.hidden=!r,r&&(n+=1)}c&&(c.hidden=n>0)},y=e=>{this._country=e,this.getAttribute(`country`)!==e&&(this._suppressCountryRender=!0,this.setAttribute(`country`,e),this._suppressCountryRender=!1),u&&(u.className=Qc(e)),d&&(d.textContent=`+${wi(e)}`);for(let t of this._itemEls()){let n=t.dataset.iso===e;t.classList.toggle(`selected`,n),t.setAttribute(`aria-selected`,String(n))}!this.getAttribute(`placeholder`)&&l&&(l.placeholder=ol(e)||`Enter phone number`),l&&this._national&&(l.value=rl(e,this._national)),_(),this._syncMirror(),this._emitChange(),this._validateOnInput&&x(S()),l?.focus()},b=t=>{let n=this._visibleItems();if(t.key===`ArrowDown`){if(t.preventDefault(),!f()){g();return}m(Math.min(this._active+1,n.length-1))}else if(t.key===`ArrowUp`){if(t.preventDefault(),!f())return;m(Math.max(this._active-1,0))}else t.key===`Enter`?(t.preventDefault(),f()&&n[this._active]&&y(n[this._active].dataset.iso)):t.key===`Escape`&&f()&&(t.preventDefault(),t.stopPropagation(),_(),e.focus())};e.addEventListener(`click`,()=>f()?_():g()),e.addEventListener(`keydown`,e=>{if(f()){b(e);return}(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g())}),r.addEventListener(`input`,()=>{v(r.value);let e=this._visibleItems();m(e.length?0:-1)}),i.addEventListener(`click`,e=>{let t=e.target.closest(`.country-dropdown-item`);t&&y(t.dataset.iso)}),i.addEventListener(`mousemove`,e=>{let t=e.target.closest(`.country-dropdown-item`);t&&!t.classList.contains(`is-active`)&&m(this._visibleItems().indexOf(t),{reveal:!1})}),i.addEventListener(`mouseleave`,()=>m(-1)),n.addEventListener(`keydown`,b);let x=e=>{l.classList.toggle(`is-invalid`,e),e?l.setAttribute(`aria-invalid`,`true`):l.removeAttribute(`aria-invalid`);let n=this.querySelector(`[data-phone-error]`);if(e){n||(n=document.createElement(`div`),n.className=`field-error`,n.id=`${this.id}-phone-error`,n.setAttribute(`data-phone-error`,``),t.after(n));let e=al(this._country);n.textContent=this._country?e?`Enter a valid phone number, e.g. ${e}`:`Enter a valid phone number`:`Choose a country`}else n?.remove();this._syncDescribedBy()},S=()=>this._national.length>0&&(!this._country||sl(this.value)===!1);l.addEventListener(`input`,e=>{e.stopPropagation();let t=l.selectionStart??l.value.length,n=l.value.slice(0,t).replace(/[^0-9]/g,``).length,r=l.value.replace(/[^0-9]/g,``),i=cl(this._country);if(i&&r.length>i){let e=ll(this._country,r,i);e?(n=Math.max(0,n-(r.length-e.length)),r=e):r=r.slice(0,i)}this._national=r;let a=rl(this._country,this._national);if(l.value!==a){l.value=a;let e=il(a,Math.min(n,r.length));l.setSelectionRange(e,e)}this._syncMirror(),this._emitInput(),this._validateOnInput&&x(S())}),l.addEventListener(`change`,e=>e.stopPropagation()),l.addEventListener(`blur`,()=>{let e=S();x(e),e&&(this._validateOnInput=!0),this.value!==this._committedValue&&this._emitChange()}),l.addEventListener(`paste`,e=>{let t=ul(e.clipboardData?.getData(`text`));t&&(e.preventDefault(),this._national=t.national.replace(/[^0-9]/g,``),t.country===this._country?l.value=rl(this._country,this._national):this.setAttribute(`country`,t.country),this._syncMirror(),this._emitInput(),this._emitChange(),this._validateOnInput&&l.isConnected&&x(S()),this.querySelector(`input[type=tel]`)?.focus())}),this._bindGlobal=()=>{this._teardownGlobals?.(),this._onDocClick=e=>{f()&&!this.contains(e.target)&&_()},document.addEventListener(`click`,this._onDocClick),f()&&o(this,h)},this._teardownGlobals=()=>{this._onDocClick&&=(document.removeEventListener(`click`,this._onDocClick),null),s(this)},this._bindGlobal(),this._validateOnInput&&x(S()),tl().then(e=>{if(!(!e||!l.isConnected)&&(this._national&&(l.value=rl(this._country,this._national)),!this.getAttribute(`placeholder`))){let e=ol(this._country);e&&(l.placeholder=e)}}),this._syncMirror()}_teardown(){this._teardownGlobals?.()}disconnectedCallback(){this._teardown()}},fl=e=>String(e??``).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),pl=`.wui-rating-star`,ml=`wui-rating-star-preview`,hl=`wui-rating-previewing`,gl=[`wui-rating-star-full`,`wui-rating-star-half`,`wui-rating-star-empty`],_l=class extends c{constructor(){super(),this._onChange=e=>{let t=e.target;t?.type===`radio`&&this._fill(Number(t.value))},this._onOver=e=>{if(this.hasAttribute(`disabled`))return;let t=e.target.closest?.(pl);t&&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 this.querySelectorAll(pl))t.classList.remove(...gl),t.classList.add(Number(t.dataset.value)<=e?gl[0]:gl[2])}_preview(e){this.classList.toggle(hl,e>0);for(let t of this.querySelectorAll(pl))t.classList.toggle(ml,e>0&&Number(t.dataset.value)<=e)}},vl=class extends c{constructor(){super(),this._doc=null,this._onKeyDown=e=>{this.hasAttribute(`keys`)&&T(e,{j:()=>this._press(`.wui-record-pager-next`),k:()=>this._press(`.wui-record-pager-prev`)},this.closest(`[${u}]`))}}connectedCallback(){this._doc=this.ownerDocument,this._doc.addEventListener(`keydown`,this._onKeyDown)}disconnectedCallback(){this._doc?.removeEventListener(`keydown`,this._onKeyDown),this._doc=null}_press(e){let t=this.querySelector(e);!t||t.disabled||t.getAttribute(`aria-disabled`)===`true`||t.click()}},yl=6e4,bl=60*yl,xl=24*bl,Sl=(e,t)=>`${e} ${t}${e===1?``:`s`}`;function Cl(e,t=Date.now()){let n=Ie(e);if(!Number.isFinite(n))return`-`;let r=t-n,i=Math.abs(r);if(i>=7*xl)return Re(n);if(i<yl)return`just now`;let[a,o]=i<bl?[Math.floor(i/yl),`minute`]:i<xl?[Math.floor(i/bl),`hour`]:[Math.floor(i/xl),`day`];return r>0?`${Sl(a,o)} ago`:`in ${Sl(a,o)}`}function wl(e){let t=Ie(e);return Number.isFinite(t)?`${Re(t,{pattern:`datetime`})} IST`:`-`}var Tl=3e4,El=new Set,Dl=null,Ol=()=>{if(!(typeof document<`u`&&document.hidden))for(let e of El)e.refresh()},kl=e=>{El.add(e),El.size===1&&(Dl=setInterval(Ol,Tl),document.addEventListener(`visibilitychange`,Ol))},Al=e=>{El.delete(e),El.size===0&&(clearInterval(Dl),Dl=null,document.removeEventListener(`visibilitychange`,Ol))},jl=class extends c{constructor(){super(),this._observer=null}connectedCallback(){this.refresh(),kl(this),this._observer=new MutationObserver(()=>this.refresh()),this._observer.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`datetime`]})}disconnectedCallback(){Al(this),this._observer?.disconnect(),this._observer=null}refresh(){let e=this.querySelector(`time[datetime]`);if(!e)return;let t=Cl(e.getAttribute(`datetime`));e.textContent!==t&&(e.textContent=t)}},Ml=`wui-resizable-panel`,Nl=`wui-resizable-handle`,Pl=5,Fl=20,Il=10,Ll=`wui-resizable:`,Rl=.001,zl=0,Bl=e=>e.reduce((e,t)=>e+t,0),Vl=(e,t,n)=>Math.min(Math.max(e,t),n),Hl=e=>Math.round(e*10)/10,Ul=(e,t)=>e.length===t.length&&e.every((e,n)=>Math.abs(e-t[n])<Rl);function Wl(e,t,n){let r=e.map((e,r)=>Vl(e,t[r],n[r]));for(let e=0;e<r.length;e++){let e=100-Bl(r);if(Math.abs(e)<Rl)break;let i=r.map((r,i)=>e>0?n[i]-r:r-t[i]),a=Bl(i);if(a<=0)break;let o=Math.min(Math.abs(e),a);r=r.map((t,n)=>t+Math.sign(e)*o*i[n]/a)}return r}function Gl(e,t,n,r){let i=e[t]+e[t+1];return[Math.max(n[t],i-r[t+1]),Math.min(r[t],i-n[t+1])]}function Kl(e,t,n,r,i){let[a,o]=Gl(e,t,r,i);if(a>o)return e;let s=e[t]+e[t+1],c=Vl(e[t]+n,a,o),l=[...e];return l[t]=c,l[t+1]=s-c,l}function ql(e){let t=e.filter(e=>e===null).length,n=Bl(e.filter(e=>e!==null));if(t>0&&n<100)return e.map(e=>e??(100-n)/t);let r=e.map(e=>e??1),i=Bl(r);return r.map(e=>e*100/i)}var Jl=(e,t)=>{let n=Number.parseFloat(e.getAttribute(t));return Number.isFinite(n)&&n>0?n:null},Yl=class extends c{constructor(){super(),this._panels=[],this._handles=[],this._mins=[],this._maxs=[],this._defaults=[],this._sizes=null,this._drag=null,this._observer=null,this._onPointerDown=e=>this._pointerDown(e),this._onPointerMove=e=>this._pointerMove(e),this._onPointerUp=e=>this._pointerUp(e,!1),this._onPointerCancel=e=>this._pointerUp(e,!0),this._onKeyDown=e=>this._keyDown(e),this._onDoubleClick=e=>this._reset(e)}connectedCallback(){this.addEventListener(`pointerdown`,this._onPointerDown),this.addEventListener(`pointermove`,this._onPointerMove),this.addEventListener(`pointerup`,this._onPointerUp),this.addEventListener(`pointercancel`,this._onPointerCancel),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`dblclick`,this._onDoubleClick),typeof MutationObserver<`u`&&(this._observer=new MutationObserver(()=>this._sync()),this._observer.observe(this,{childList:!0})),this._sync()}disconnectedCallback(){this.removeEventListener(`pointerdown`,this._onPointerDown),this.removeEventListener(`pointermove`,this._onPointerMove),this.removeEventListener(`pointerup`,this._onPointerUp),this.removeEventListener(`pointercancel`,this._onPointerCancel),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`dblclick`,this._onDoubleClick),this._observer?.disconnect(),this._observer=null,this._drag=null}get sizes(){return this._sizes?[...this._sizes]:[]}get _vertical(){return this.getAttribute(`direction`)===`vertical`}_sync(){let e=[...this.children];this._panels=e.filter(e=>e.classList.contains(Ml)),this._handles=e.filter(e=>e.classList.contains(Nl));let t=this._panels.length;if(t===0)return;this._mins=this._panels.map(e=>Jl(e,`data-min-size`)??Il),this._maxs=this._panels.map(e=>Jl(e,`data-max-size`)??100),this._defaults=Wl(ql(this._panels.map(e=>Jl(e,`data-default-size`))),this._mins,this._maxs);let n=this._sizes&&this._sizes.length===t?this._sizes:null;this._sizes=Wl(n??this._load(t)??this._defaults,this._mins,this._maxs);for(let e of this._panels)e.id||=`wui-resizable-panel-${++zl}`;this._render()}_render(){this._panels.forEach((e,t)=>{e.style.flex=`${Hl(this._sizes[t])} 1 0px`});for(let e of this._handles){let t=this._indexOf(e);if(t<0)continue;let[n,r]=Gl(this._sizes,t,this._mins,this._maxs);e.setAttribute(`aria-controls`,this._panels[t].id),e.setAttribute(`aria-valuenow`,String(Math.round(this._sizes[t]))),e.setAttribute(`aria-valuemin`,String(Math.ceil(n-Rl))),e.setAttribute(`aria-valuemax`,String(Math.floor(r+Rl)))}}_indexOf(e){let t=this._panels.indexOf(e.previousElementSibling);return t>=0&&e.nextElementSibling===this._panels[t+1]?t:-1}_handleFor(e){let t=e.target instanceof Element?e.target.closest(`.${Nl}`):null;if(!t||t.parentElement!==this)return null;let n=this._indexOf(t);return n<0?null:{handle:t,index:n}}_storageKey(){let e=this.getAttribute(`storage-key`);return e?Ll+e:null}_load(e){let t=this._storageKey();if(!t)return null;try{let n=JSON.parse(globalThis.localStorage?.getItem(t)??`null`);return Array.isArray(n)&&n.length===e&&n.every((e,t)=>Number.isFinite(e)&&e>=this._mins[t]-Rl&&e<=this._maxs[t]+Rl)&&Math.abs(Bl(n)-100)<.5?n:null}catch{return null}}_save(){let e=this._storageKey();if(e)try{globalThis.localStorage?.setItem(e,JSON.stringify(this._sizes.map(Hl)))}catch{}}_commit(e){Ul(e,this._sizes)||(this._save(),this.dispatchEvent(new CustomEvent(`wui-resizable:change`,{bubbles:!0,detail:{sizes:this.sizes}})))}_pointerDown(e){let t=this._handleFor(e);if(!t||e.pointerType===`mouse`&&e.button!==0)return;let n=this._panels.reduce((e,t)=>{let n=t.getBoundingClientRect();return e+(this._vertical?n.height:n.width)},0);n<=0||(e.preventDefault(),t.handle.setPointerCapture?.(e.pointerId),t.handle.focus?.({preventScroll:!0}),this._drag={...t,pointerId:e.pointerId,start:this._vertical?e.clientY:e.clientX,before:[...this._sizes],room:n,flip:!this._vertical&&getComputedStyle(this).direction===`rtl`},this.classList.add(`is-dragging`),t.handle.classList.add(`is-active`))}_pointerMove(e){let t=this._drag;if(!t||e.pointerId!==t.pointerId)return;let n=(this._vertical?e.clientY:e.clientX)-t.start,r=(t.flip?-n:n)*100/t.room;this._sizes=Kl(t.before,t.index,r,this._mins,this._maxs),this._render()}_pointerUp(e,t){let n=this._drag;if(!(!n||e.pointerId!==n.pointerId)){if(this._drag=null,this.classList.remove(`is-dragging`),n.handle.classList.remove(`is-active`),n.handle.releasePointerCapture?.(e.pointerId),t){this._sizes=n.before,this._render();return}this._commit(n.before)}}_keyDown(e){let t=this._handleFor(e);if(!t||e.altKey||e.ctrlKey||e.metaKey)return;let[n,r]=this._vertical?[`ArrowUp`,`ArrowDown`]:[`ArrowLeft`,`ArrowRight`],i=!this._vertical&&getComputedStyle(this).direction===`rtl`,a=e.shiftKey?Fl:Pl,o;if(e.key===n)o=i?a:-a;else if(e.key===r)o=i?-a:a;else if(e.key===`Home`)o=-1/0;else if(e.key===`End`)o=1/0;else return;e.preventDefault();let s=[...this._sizes];this._sizes=Kl(s,t.index,o,this._mins,this._maxs),this._render(),this._commit(s)}_reset(e){if(!this._handleFor(e))return;let t=[...this._sizes];this._sizes=[...this._defaults],this._render(),this._commit(t)}},Xl=/^[0-9]$/,Zl=()=>typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches,Ql=class extends c{static get observedAttributes(){return[`value`,`format`,`unit`,`decimals`,`duration`]}constructor(){super(),this._connected=!1,this._signature=null,this._digits=[],this._reels=[]}connectedCallback(){this._connected=!0,this._draw(!1)}disconnectedCallback(){this._connected=!1}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 ze(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||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)return;let n=this._text();if(n===null){this._clear(t);return}if(this._showText(n),Zl()){this._clear(t);return}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=>Xl.test(e)).map(Number),o=i.map(e=>Xl.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(!Xl.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`,``)}},$l=class extends c{constructor(){super(),this._doc=null,this._onKeyDown=e=>this._keydown(e),this._onClick=e=>this._click(e),this._onDocClick=e=>{this.open&&!this.contains(e.target)&&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)}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`;t!==this.open&&this.setOpen(t)}setOpen(e,{focus:t=!0}={}){let n=this._sheet();if(!n)return;n.hidden=!e;let r=this.querySelector(`.wui-shortcut-toggle`);r?.setAttribute(`aria-expanded`,String(e)),t&&(e?n.querySelector(`.wui-shortcut-close`)?.focus():r?.focus())}_sheet(){return this.querySelector(`.wui-shortcut-sheet`)}_scope(){return this.closest(`[${u}]`)}_items(){let e=this.getAttribute(`items`);return e?[...(this._scope()??this._doc).querySelectorAll(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.activeElement,n=t?.closest?.(`li, tr`),r=e.find(e=>e===t||e.contains(t)||n?.contains(e));(r?.closest(`li, tr`)??r)?.querySelector(`input[type="checkbox"]`)?.click()}_focusSearch(){let e=this.getAttribute(`search`);((this._scope()??this._doc).querySelector(e)??this._doc.querySelector(e))?.focus()}_keydown(e){if(e.defaultPrevented)return;let t=x(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=()=>E(this._items(),1),r.k=()=>E(this._items(),-1),r.x=()=>this._tickFocused()),this.getAttribute(`search`)&&(r.slash=()=>this._focusSearch()),r[t]){T(e,r,n);return}if(t===`enter`||C(this._doc)||!w(e.target,n)||te(e.target))return;let i=S(t),a=[...this.querySelectorAll(`.wui-shortcut-keys [data-shortcut]`)].find(e=>e.dataset.shortcut===i);if(!a)return;let o=(n??this._doc).querySelector(`[aria-current="true"]`)?.closest(`[data-key]`)?.dataset.key??null;if(!this.dispatchEvent(new CustomEvent(`wui:shortcut`,{bubbles:!0,cancelable:!0,detail:{key:i,itemKey:o}}))){e.preventDefault();return}let s=a.dataset.target?this._doc.querySelector(a.dataset.target):null;s&&(e.preventDefault(),s.click())}},eu=3,tu=`Show more`,nu=`Show less`,ru=class extends c{constructor(){super(),this._width=-1,this._observer=null,this._toggle=null,this._onClick=()=>this.toggle()}connectedCallback(){if(this._toggle=this.querySelector(`.wui-show-more-toggle`),!this._toggle)return;let e=Number.parseInt(this.getAttribute(`lines`),10);this.style.setProperty(`--wui-show-more-lines`,String(e>=1?e:eu)),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.expanded;this._toggle.setAttribute(`aria-expanded`,String(e)),this._toggle.textContent=e?this.getAttribute(`less-label`)||nu:this.getAttribute(`more-label`)||tu}_check(){let e=this.querySelector(`.wui-show-more-body`);if(!e)return;this._width=this.clientWidth;let t=this.expanded;t&&this.removeAttribute(`expanded`);let n=e.scrollHeight>e.clientHeight+1;t&&this.setAttribute(`expanded`,``),this._toggle.hidden=!n}},iu=class extends c{static formAssociated=!0;static get observedAttributes(){return[`min`,`max`,`step`,`value`,`start`,`end`,`name`,`start-name`,`end-name`,`disabled`,`size`,`show-value`,`unit`,`aria-label`]}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=50,this._start=25,this._end=75,this._isDragging=!1,this._dragThumb=null,this._pointerDownListener=null,this._pointerMoveListener=null,this._pointerUpListener=null,this._thumbKeyListener=null,this._trackClickListener=null}connectedCallback(){if(!this._rendered){this.render();return}this._wire()}get value(){return this._value}set value(e){this._value=this._snapToStep(this._clamp(au(e,this._value))),this._syncValue(),this._syncMirrors()}get start(){return this._start}set start(e){this._start=Math.min(this._snapToStep(this._clamp(au(e,this._start))),this._end),this._syncValue(),this._syncMirrors()}get end(){return this._end}set end(e){this._end=Math.max(this._snapToStep(this._clamp(au(e,this._end))),this._start),this._syncValue(),this._syncMirrors()}attributeChangedCallback(e,t,n){if(e===`value`||e===`start`||e===`end`||e===`min`||e===`max`||e===`step`){this._updateFromAttribute(e),this._rendered&&(this._syncValue(),this._syncMirrors());return}this._rendered&&this.render()}formResetCallback(){this._isRange()?this._resetRange():this._resetSingle()}_updateFromAttribute(e){e===`value`?this._value=this._snapToStep(this._clamp(au(this.getAttribute(`value`),this._value))):e===`start`?this._start=this._snapToStep(this._clamp(au(this.getAttribute(`start`),this._start))):e===`end`&&(this._end=this._snapToStep(this._clamp(au(this.getAttribute(`end`),this._end))))}_isRange(){return this.hasAttribute(`range`)}_min(){return au(this.getAttribute(`min`),0)}_max(){return au(this.getAttribute(`max`),100)}_step(){return au(this.getAttribute(`step`),1)}_clamp(e){return Math.max(this._min(),Math.min(e,this._max()))}_snapToStep(e){let t=this._step();if(t<=0)return e;let n=this._min();return this._clamp(n+Math.round((e-n)/t)*t)}_captureDefaults(){this._defaultsCaptured||=(this._isRange()?(this._defaultStart=this._start,this._defaultEnd=this._end):this._defaultValue=this._value,!0)}_resetSingle(){this._value=this._defaultValue??50,this._syncValue(),this._syncMirrors()}_resetRange(){this._start=this._defaultStart??25,this._end=this._defaultEnd??75,this._syncValue(),this._syncMirrors()}render(){this._captureDefaults();let e=this._min(),t=this._max(),n=this._isRange(),r=this.getAttribute(`size`),i=r===`sm`?` slider-sm`:r===`lg`?` slider-lg`:``,a=this.hasAttribute(`disabled`);n?(this._start=this._clamp(this._start),this._end=this._clamp(this._end),this._start>this._end&&([this._start,this._end]=[this._end,this._start])):this._value=this._clamp(this._value);let o=n=>t===e?0:(n-e)/(t-e)*100,s=n?o(this._start):0,c=o(n?this._end:this._value);this.innerHTML=`
384
+ <input type="tel" class="input" placeholder="${Ul(e)}" value="${Ul(Pl(this._country,this._national))}"${this.getAttribute(`aria-label`)?` aria-label="${Ul(this.getAttribute(`aria-label`))}"`:``}${this.getAttribute(`aria-describedby`)?` aria-describedby="${Ul(this.getAttribute(`aria-describedby`))}"`:``}${this.hasAttribute(`required`)?` required aria-required="true"`:``}${this.hasAttribute(`disabled`)?` disabled`:``} />
385
+ </div>`,this._rendered=!0,B(this,this.value),this._wire()}_ensureItems(){let e=this.querySelector(`.country-list-scroll`);if(!e||e.querySelector(`.country-dropdown-item`))return;let t=this._listboxId,n=Pa.map(([e,n,r],i)=>`<button type="button" role="option" id="${Ul(`${t}-opt-${i}`)}" class="country-dropdown-item${e===this._country?` selected`:``}" data-iso="${e}" aria-selected="${e===this._country}"><span class="${kl(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join(``);e.insertAdjacentHTML(`afterbegin`,n)}_itemEls(){return[...this.querySelectorAll(`.country-dropdown-item`)]}_visibleItems(){return this._itemEls().filter(e=>!e.hidden)}_wire(){this._teardown();let e=this.querySelector(`.country-toggle`),t=this.querySelector(`.phone-input-wrap`),n=this.querySelector(`.country-dropdown-menu`),r=this.querySelector(`.dropdown-search-input`),i=this.querySelector(`.country-list-scroll`),c=this.querySelector(`.country-empty`),l=this.querySelector(`input[type=tel]`),u=this.querySelector(`[data-flag]`),d=this.querySelector(`[data-dial]`);if(!e||!n)return;let f=()=>!n.hidden,p=()=>a(t||e,n),m=(e,{reveal:t=!0}={})=>{let n=this._visibleItems();this._active=e,ai(i,e>=0&&n[e]||null),e>=0&&n[e]?(t&&n[e].scrollIntoView({block:`nearest`}),r?.setAttribute(`aria-activedescendant`,n[e].id)):r?.removeAttribute(`aria-activedescendant`)},h=()=>{f()&&p()},g=()=>{this._ensureItems(),n.hidden=!1,e.setAttribute(`aria-expanded`,`true`),r.value=``,v(``),p(),o(this,h),r.focus(),m(this._visibleItems().findIndex(e=>e.classList.contains(`selected`)))},_=()=>{n.hidden=!0,e.setAttribute(`aria-expanded`,`false`),m(-1),s(this)},v=e=>{let t=e.trim().toLowerCase(),n=0;for(let e of this._itemEls()){let r=!t||e.textContent.toLowerCase().includes(t);e.hidden=!r,r&&(n+=1)}c&&(c.hidden=n>0)},y=e=>{this._country=e,this.getAttribute(`country`)!==e&&(this._suppressCountryRender=!0,this.setAttribute(`country`,e),this._suppressCountryRender=!1),u&&(u.className=kl(e)),d&&(d.textContent=`+${Fa(e)}`);for(let t of this._itemEls()){let n=t.dataset.iso===e;t.classList.toggle(`selected`,n),t.setAttribute(`aria-selected`,String(n))}!this.getAttribute(`placeholder`)&&l&&(l.placeholder=Ll(e)||`Enter phone number`),l&&this._national&&(l.value=Pl(e,this._national)),_(),this._syncMirror(),this._emitChange(),this._validateOnInput&&x(S()),l?.focus()},b=t=>{let n=this._visibleItems();if(t.key===`ArrowDown`){if(t.preventDefault(),!f()){g();return}m(Math.min(this._active+1,n.length-1))}else if(t.key===`ArrowUp`){if(t.preventDefault(),!f())return;m(Math.max(this._active-1,0))}else t.key===`Enter`?(t.preventDefault(),f()&&n[this._active]&&y(n[this._active].dataset.iso)):t.key===`Escape`&&f()&&(t.preventDefault(),t.stopPropagation(),_(),e.focus())};e.addEventListener(`click`,()=>f()?_():g()),e.addEventListener(`keydown`,e=>{if(f()){b(e);return}(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g())}),r.addEventListener(`input`,()=>{v(r.value);let e=this._visibleItems();m(e.length?0:-1)}),i.addEventListener(`click`,e=>{let t=e.target.closest(`.country-dropdown-item`);t&&y(t.dataset.iso)}),i.addEventListener(`mousemove`,e=>{let t=e.target.closest(`.country-dropdown-item`);t&&!t.classList.contains(`is-active`)&&m(this._visibleItems().indexOf(t),{reveal:!1})}),i.addEventListener(`mouseleave`,()=>m(-1)),n.addEventListener(`keydown`,b);let x=e=>{l.classList.toggle(`is-invalid`,e),e?l.setAttribute(`aria-invalid`,`true`):l.removeAttribute(`aria-invalid`);let n=this.querySelector(`[data-phone-error]`);if(e){n||(n=document.createElement(`div`),n.className=`field-error`,n.id=`${this.id}-phone-error`,n.setAttribute(`data-phone-error`,``),t.after(n));let e=Il(this._country);n.textContent=this._country?e?`Enter a valid phone number, e.g. ${e}`:`Enter a valid phone number`:`Choose a country`}else n?.remove();this._syncDescribedBy()},S=()=>this._national.length>0&&(!this._country||Rl(this.value)===!1);l.addEventListener(`input`,e=>{e.stopPropagation();let t=l.selectionStart??l.value.length,n=l.value.slice(0,t).replace(/[^0-9]/g,``).length,r=l.value.replace(/[^0-9]/g,``),i=zl(this._country);if(i&&r.length>i){let e=Bl(this._country,r,i);e?(n=Math.max(0,n-(r.length-e.length)),r=e):r=r.slice(0,i)}this._national=r;let a=Pl(this._country,this._national);if(l.value!==a){l.value=a;let e=Fl(a,Math.min(n,r.length));l.setSelectionRange(e,e)}this._syncMirror(),this._emitInput(),this._validateOnInput&&x(S())}),l.addEventListener(`change`,e=>e.stopPropagation()),l.addEventListener(`blur`,()=>{let e=S();x(e),e&&(this._validateOnInput=!0),this.value!==this._committedValue&&this._emitChange()}),l.addEventListener(`paste`,e=>{let t=Vl(e.clipboardData?.getData(`text`));t&&(e.preventDefault(),this._national=t.national.replace(/[^0-9]/g,``),t.country===this._country?l.value=Pl(this._country,this._national):this.setAttribute(`country`,t.country),this._syncMirror(),this._emitInput(),this._emitChange(),this._validateOnInput&&l.isConnected&&x(S()),this.querySelector(`input[type=tel]`)?.focus())}),this._bindGlobal=()=>{this._teardownGlobals?.(),this._onDocClick=e=>{f()&&!this.contains(e.target)&&_()},document.addEventListener(`click`,this._onDocClick),f()&&o(this,h)},this._teardownGlobals=()=>{this._onDocClick&&=(document.removeEventListener(`click`,this._onDocClick),null),s(this)},this._bindGlobal(),this._validateOnInput&&x(S()),Ml().then(e=>{if(!(!e||!l.isConnected)&&(this._national&&(l.value=Pl(this._country,this._national)),!this.getAttribute(`placeholder`))){let e=Ll(this._country);e&&(l.placeholder=e)}}),this._syncMirror()}_teardown(){this._teardownGlobals?.()}disconnectedCallback(){this._teardown()}},Ul=e=>String(e??``).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),Wl=`.wui-rating-star`,Gl=`wui-rating-star-preview`,Kl=`wui-rating-previewing`,ql=[`wui-rating-star-full`,`wui-rating-star-half`,`wui-rating-star-empty`],Jl=class extends c{constructor(){super(),this._onChange=e=>{let t=e.target;t?.type===`radio`&&this._fill(Number(t.value))},this._onOver=e=>{if(this.hasAttribute(`disabled`))return;let t=e.target.closest?.(Wl);t&&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 this.querySelectorAll(Wl))t.classList.remove(...ql),t.classList.add(Number(t.dataset.value)<=e?ql[0]:ql[2])}_preview(e){this.classList.toggle(Kl,e>0);for(let t of this.querySelectorAll(Wl))t.classList.toggle(Gl,e>0&&Number(t.dataset.value)<=e)}},Yl=class extends c{constructor(){super(),this._doc=null,this._onKeyDown=e=>{this.hasAttribute(`keys`)&&E(e,{j:()=>this._press(`.wui-record-pager-next`),k:()=>this._press(`.wui-record-pager-prev`)},this.closest(`[${u}]`))}}connectedCallback(){this._doc=this.ownerDocument,this._doc.addEventListener(`keydown`,this._onKeyDown)}disconnectedCallback(){this._doc?.removeEventListener(`keydown`,this._onKeyDown),this._doc=null}_press(e){let t=this.querySelector(e);!t||t.disabled||t.getAttribute(`aria-disabled`)===`true`||t.click()}},Xl=6e4,Zl=60*Xl,Ql=24*Zl,$l=(e,t)=>`${e} ${t}${e===1?``:`s`}`;function eu(e,t=Date.now()){let n=Fe(e);if(!Number.isFinite(n))return`-`;let r=t-n,i=Math.abs(r);if(i>=7*Ql)return Le(n);if(i<Xl)return`just now`;let[a,o]=i<Zl?[Math.floor(i/Xl),`minute`]:i<Ql?[Math.floor(i/Zl),`hour`]:[Math.floor(i/Ql),`day`];return r>0?`${$l(a,o)} ago`:`in ${$l(a,o)}`}function tu(e){let t=Fe(e);return Number.isFinite(t)?`${Le(t,{pattern:`datetime`})} IST`:`-`}var nu=3e4,ru=new Set,iu=null,au=()=>{if(!(typeof document<`u`&&document.hidden))for(let e of ru)e.refresh()},ou=e=>{ru.add(e),ru.size===1&&(iu=setInterval(au,nu),document.addEventListener(`visibilitychange`,au))},su=e=>{ru.delete(e),ru.size===0&&(clearInterval(iu),iu=null,document.removeEventListener(`visibilitychange`,au))},cu=class extends c{constructor(){super(),this._observer=null}connectedCallback(){this.refresh(),ou(this),this._observer=new MutationObserver(()=>this.refresh()),this._observer.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`datetime`]})}disconnectedCallback(){su(this),this._observer?.disconnect(),this._observer=null}refresh(){let e=this.querySelector(`time[datetime]`);if(!e)return;let t=eu(e.getAttribute(`datetime`));e.textContent!==t&&(e.textContent=t)}},lu=`wui-resizable-panel`,uu=`wui-resizable-handle`,du=5,fu=20,pu=10,mu=`wui-resizable:`,hu=.001,gu=0,_u=e=>e.reduce((e,t)=>e+t,0),vu=(e,t,n)=>Math.min(Math.max(e,t),n),yu=e=>Math.round(e*10)/10,bu=(e,t)=>e.length===t.length&&e.every((e,n)=>Math.abs(e-t[n])<hu);function xu(e,t,n){let r=e.map((e,r)=>vu(e,t[r],n[r]));for(let e=0;e<r.length;e++){let e=100-_u(r);if(Math.abs(e)<hu)break;let i=r.map((r,i)=>e>0?n[i]-r:r-t[i]),a=_u(i);if(a<=0)break;let o=Math.min(Math.abs(e),a);r=r.map((t,n)=>t+Math.sign(e)*o*i[n]/a)}return r}function Su(e,t,n,r){let i=e[t]+e[t+1];return[Math.max(n[t],i-r[t+1]),Math.min(r[t],i-n[t+1])]}function Cu(e,t,n,r,i){let[a,o]=Su(e,t,r,i);if(a>o)return e;let s=e[t]+e[t+1],c=vu(e[t]+n,a,o),l=[...e];return l[t]=c,l[t+1]=s-c,l}function wu(e){let t=e.filter(e=>e===null).length,n=_u(e.filter(e=>e!==null));if(t>0&&n<100)return e.map(e=>e??(100-n)/t);let r=e.map(e=>e??1),i=_u(r);return r.map(e=>e*100/i)}var Tu=(e,t)=>{let n=Number.parseFloat(e.getAttribute(t));return Number.isFinite(n)&&n>0?n:null},Eu=class extends c{constructor(){super(),this._panels=[],this._handles=[],this._mins=[],this._maxs=[],this._defaults=[],this._sizes=null,this._drag=null,this._observer=null,this._onPointerDown=e=>this._pointerDown(e),this._onPointerMove=e=>this._pointerMove(e),this._onPointerUp=e=>this._pointerUp(e,!1),this._onPointerCancel=e=>this._pointerUp(e,!0),this._onKeyDown=e=>this._keyDown(e),this._onDoubleClick=e=>this._reset(e)}connectedCallback(){this.addEventListener(`pointerdown`,this._onPointerDown),this.addEventListener(`pointermove`,this._onPointerMove),this.addEventListener(`pointerup`,this._onPointerUp),this.addEventListener(`pointercancel`,this._onPointerCancel),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`dblclick`,this._onDoubleClick),typeof MutationObserver<`u`&&(this._observer=new MutationObserver(()=>this._sync()),this._observer.observe(this,{childList:!0})),this._sync()}disconnectedCallback(){this.removeEventListener(`pointerdown`,this._onPointerDown),this.removeEventListener(`pointermove`,this._onPointerMove),this.removeEventListener(`pointerup`,this._onPointerUp),this.removeEventListener(`pointercancel`,this._onPointerCancel),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`dblclick`,this._onDoubleClick),this._observer?.disconnect(),this._observer=null,this._drag=null}get sizes(){return this._sizes?[...this._sizes]:[]}get _vertical(){return this.getAttribute(`direction`)===`vertical`}_sync(){let e=[...this.children];this._panels=e.filter(e=>e.classList.contains(lu)),this._handles=e.filter(e=>e.classList.contains(uu));let t=this._panels.length;if(t===0)return;this._mins=this._panels.map(e=>Tu(e,`data-min-size`)??pu),this._maxs=this._panels.map(e=>Tu(e,`data-max-size`)??100),this._defaults=xu(wu(this._panels.map(e=>Tu(e,`data-default-size`))),this._mins,this._maxs);let n=this._sizes&&this._sizes.length===t?this._sizes:null;this._sizes=xu(n??this._load(t)??this._defaults,this._mins,this._maxs);for(let e of this._panels)e.id||=`wui-resizable-panel-${++gu}`;this._render()}_render(){this._panels.forEach((e,t)=>{e.style.flex=`${yu(this._sizes[t])} 1 0px`});for(let e of this._handles){let t=this._indexOf(e);if(t<0)continue;let[n,r]=Su(this._sizes,t,this._mins,this._maxs);e.setAttribute(`aria-controls`,this._panels[t].id),e.setAttribute(`aria-valuenow`,String(Math.round(this._sizes[t]))),e.setAttribute(`aria-valuemin`,String(Math.ceil(n-hu))),e.setAttribute(`aria-valuemax`,String(Math.floor(r+hu)))}}_indexOf(e){let t=this._panels.indexOf(e.previousElementSibling);return t>=0&&e.nextElementSibling===this._panels[t+1]?t:-1}_handleFor(e){let t=e.target instanceof Element?e.target.closest(`.${uu}`):null;if(!t||t.parentElement!==this)return null;let n=this._indexOf(t);return n<0?null:{handle:t,index:n}}_storageKey(){let e=this.getAttribute(`storage-key`);return e?mu+e:null}_load(e){let t=this._storageKey();if(!t)return null;try{let n=JSON.parse(globalThis.localStorage?.getItem(t)??`null`);return Array.isArray(n)&&n.length===e&&n.every((e,t)=>Number.isFinite(e)&&e>=this._mins[t]-hu&&e<=this._maxs[t]+hu)&&Math.abs(_u(n)-100)<.5?n:null}catch{return null}}_save(){let e=this._storageKey();if(e)try{globalThis.localStorage?.setItem(e,JSON.stringify(this._sizes.map(yu)))}catch{}}_commit(e){bu(e,this._sizes)||(this._save(),this.dispatchEvent(new CustomEvent(`wui-resizable:change`,{bubbles:!0,detail:{sizes:this.sizes}})))}_pointerDown(e){let t=this._handleFor(e);if(!t||e.pointerType===`mouse`&&e.button!==0)return;let n=this._panels.reduce((e,t)=>{let n=t.getBoundingClientRect();return e+(this._vertical?n.height:n.width)},0);n<=0||(e.preventDefault(),t.handle.setPointerCapture?.(e.pointerId),t.handle.focus?.({preventScroll:!0}),this._drag={...t,pointerId:e.pointerId,start:this._vertical?e.clientY:e.clientX,before:[...this._sizes],room:n,flip:!this._vertical&&getComputedStyle(this).direction===`rtl`},this.classList.add(`is-dragging`),t.handle.classList.add(`is-active`))}_pointerMove(e){let t=this._drag;if(!t||e.pointerId!==t.pointerId)return;let n=(this._vertical?e.clientY:e.clientX)-t.start,r=(t.flip?-n:n)*100/t.room;this._sizes=Cu(t.before,t.index,r,this._mins,this._maxs),this._render()}_pointerUp(e,t){let n=this._drag;if(!(!n||e.pointerId!==n.pointerId)){if(this._drag=null,this.classList.remove(`is-dragging`),n.handle.classList.remove(`is-active`),n.handle.releasePointerCapture?.(e.pointerId),t){this._sizes=n.before,this._render();return}this._commit(n.before)}}_keyDown(e){let t=this._handleFor(e);if(!t||e.altKey||e.ctrlKey||e.metaKey)return;let[n,r]=this._vertical?[`ArrowUp`,`ArrowDown`]:[`ArrowLeft`,`ArrowRight`],i=!this._vertical&&getComputedStyle(this).direction===`rtl`,a=e.shiftKey?fu:du,o;if(e.key===n)o=i?a:-a;else if(e.key===r)o=i?-a:a;else if(e.key===`Home`)o=-1/0;else if(e.key===`End`)o=1/0;else return;e.preventDefault();let s=[...this._sizes];this._sizes=Cu(s,t.index,o,this._mins,this._maxs),this._render(),this._commit(s)}_reset(e){if(!this._handleFor(e))return;let t=[...this._sizes];this._sizes=[...this._defaults],this._render(),this._commit(t)}},Du=/^[0-9]$/,Ou=()=>typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches,ku=class extends c{static get observedAttributes(){return[`value`,`format`,`unit`,`decimals`,`duration`]}constructor(){super(),this._connected=!1,this._signature=null,this._digits=[],this._reels=[]}connectedCallback(){this._connected=!0,this._draw(!1)}disconnectedCallback(){this._connected=!1}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 Re(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||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)return;let n=this._text();if(n===null){this._clear(t);return}if(this._showText(n),Ou()){this._clear(t);return}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=>Du.test(e)).map(Number),o=i.map(e=>Du.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(!Du.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`,``)}},Au=class extends c{constructor(){super(),this._doc=null,this._onKeyDown=e=>this._keydown(e),this._onClick=e=>this._click(e),this._onDocClick=e=>{this.open&&!this.contains(e.target)&&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)}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`;t!==this.open&&this.setOpen(t)}setOpen(e,{focus:t=!0}={}){let n=this._sheet();if(!n)return;n.hidden=!e;let r=this.querySelector(`.wui-shortcut-toggle`);r?.setAttribute(`aria-expanded`,String(e)),t&&(e?n.querySelector(`.wui-shortcut-close`)?.focus():r?.focus())}_sheet(){return this.querySelector(`.wui-shortcut-sheet`)}_scope(){return this.closest(`[${u}]`)}_items(){let e=this.getAttribute(`items`);return e?[...(this._scope()??this._doc).querySelectorAll(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.activeElement,n=t?.closest?.(`li, tr`),r=e.find(e=>e===t||e.contains(t)||n?.contains(e));(r?.closest(`li, tr`)??r)?.querySelector(`input[type="checkbox"]`)?.click()}_focusSearch(){let e=this.getAttribute(`search`);((this._scope()??this._doc).querySelector(e)??this._doc.querySelector(e))?.focus()}_keydown(e){if(e.defaultPrevented)return;let t=x(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=()=>D(this._items(),1),r.k=()=>D(this._items(),-1),r.x=()=>this._tickFocused()),this.getAttribute(`search`)&&(r.slash=()=>this._focusSearch()),r[t]){E(e,r,n);return}if(t===`enter`||w(this._doc)||!T(e.target,n)||C(e.target))return;let i=S(t),a=[...this.querySelectorAll(`.wui-shortcut-keys [data-shortcut]`)].find(e=>e.dataset.shortcut===i);if(!a)return;let o=(n??this._doc).querySelector(`[aria-current="true"]`)?.closest(`[data-key]`)?.dataset.key??null;if(!this.dispatchEvent(new CustomEvent(`wui:shortcut`,{bubbles:!0,cancelable:!0,detail:{key:i,itemKey:o}}))){e.preventDefault();return}let s=a.dataset.target?this._doc.querySelector(a.dataset.target):null;s&&(e.preventDefault(),s.click())}},ju=3,Mu=`Show more`,Nu=`Show less`,Pu=class extends c{constructor(){super(),this._width=-1,this._observer=null,this._toggle=null,this._onClick=()=>this.toggle()}connectedCallback(){if(this._toggle=this.querySelector(`.wui-show-more-toggle`),!this._toggle)return;let e=Number.parseInt(this.getAttribute(`lines`),10);this.style.setProperty(`--wui-show-more-lines`,String(e>=1?e:ju)),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.expanded;this._toggle.setAttribute(`aria-expanded`,String(e)),this._toggle.textContent=e?this.getAttribute(`less-label`)||Nu:this.getAttribute(`more-label`)||Mu}_check(){let e=this.querySelector(`.wui-show-more-body`);if(!e)return;this._width=this.clientWidth;let t=this.expanded;t&&this.removeAttribute(`expanded`);let n=e.scrollHeight>e.clientHeight+1;t&&this.setAttribute(`expanded`,``),this._toggle.hidden=!n}},Fu=class extends c{static formAssociated=!0;static get observedAttributes(){return[`min`,`max`,`step`,`value`,`start`,`end`,`name`,`start-name`,`end-name`,`disabled`,`size`,`show-value`,`unit`,`aria-label`]}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=50,this._start=25,this._end=75,this._isDragging=!1,this._dragThumb=null,this._pointerDownListener=null,this._pointerMoveListener=null,this._pointerUpListener=null,this._thumbKeyListener=null,this._trackClickListener=null}connectedCallback(){if(!this._rendered){this.render();return}this._wire()}get value(){return this._value}set value(e){this._value=this._snapToStep(this._clamp(Iu(e,this._value))),this._syncValue(),this._syncMirrors()}get start(){return this._start}set start(e){this._start=Math.min(this._snapToStep(this._clamp(Iu(e,this._start))),this._end),this._syncValue(),this._syncMirrors()}get end(){return this._end}set end(e){this._end=Math.max(this._snapToStep(this._clamp(Iu(e,this._end))),this._start),this._syncValue(),this._syncMirrors()}attributeChangedCallback(e,t,n){if(e===`value`||e===`start`||e===`end`||e===`min`||e===`max`||e===`step`){this._updateFromAttribute(e),this._rendered&&(this._syncValue(),this._syncMirrors());return}this._rendered&&this.render()}formResetCallback(){this._isRange()?this._resetRange():this._resetSingle()}_updateFromAttribute(e){e===`value`?this._value=this._snapToStep(this._clamp(Iu(this.getAttribute(`value`),this._value))):e===`start`?this._start=this._snapToStep(this._clamp(Iu(this.getAttribute(`start`),this._start))):e===`end`&&(this._end=this._snapToStep(this._clamp(Iu(this.getAttribute(`end`),this._end))))}_isRange(){return this.hasAttribute(`range`)}_min(){return Iu(this.getAttribute(`min`),0)}_max(){return Iu(this.getAttribute(`max`),100)}_step(){return Iu(this.getAttribute(`step`),1)}_clamp(e){return Math.max(this._min(),Math.min(e,this._max()))}_snapToStep(e){let t=this._step();if(t<=0)return e;let n=this._min();return this._clamp(n+Math.round((e-n)/t)*t)}_captureDefaults(){this._defaultsCaptured||=(this._isRange()?(this._defaultStart=this._start,this._defaultEnd=this._end):this._defaultValue=this._value,!0)}_resetSingle(){this._value=this._defaultValue??50,this._syncValue(),this._syncMirrors()}_resetRange(){this._start=this._defaultStart??25,this._end=this._defaultEnd??75,this._syncValue(),this._syncMirrors()}render(){this._captureDefaults();let e=this._min(),t=this._max(),n=this._isRange(),r=this.getAttribute(`size`),i=r===`sm`?` slider-sm`:r===`lg`?` slider-lg`:``,a=this.hasAttribute(`disabled`);n?(this._start=this._clamp(this._start),this._end=this._clamp(this._end),this._start>this._end&&([this._start,this._end]=[this._end,this._start])):this._value=this._clamp(this._value);let o=n=>t===e?0:(n-e)/(t-e)*100,s=n?o(this._start):0,c=o(n?this._end:this._value);this.innerHTML=`
386
386
  <div class="slider${i}">
387
387
  <div class="slider-track" role="presentation"></div>
388
388
  <div class="slider-fill" style="left: ${s}%; right: ${100-c}%;" role="presentation"></div>
@@ -425,29 +425,29 @@ var WeborityUiElements=(function(e){Object.defineProperty(e,Symbol.toStringTag,{
425
425
  aria-valuenow="${this._value}"
426
426
  aria-valuetext="${this._formatValue(this._value)}"
427
427
  ${a?`disabled`:``}
428
- aria-label="${ou(this.getAttribute(`aria-label`)||`Value`)}"
428
+ aria-label="${Lu(this.getAttribute(`aria-label`)||`Value`)}"
429
429
  ></button>
430
430
  `}
431
431
  ${this.hasAttribute(`show-value`)?n?`<span class="slider-value">${this._formatValue(this._start)} to ${this._formatValue(this._end)}</span>`:`<span class="slider-value">${this._formatValue(this._value)}</span>`:``}
432
432
  </div>
433
- `,this._rendered=!0,this._placeParts(),this._syncMirrors(),this._wire()}_formatValue(e){return`${e}${this.getAttribute(`unit`)||``}`}_placeParts(){let e=this._min(),t=this._max(),n=n=>t===e?0:(n-e)/(t-e),r=this._isRange(),i=r?n(this._start):0,a=n(r?this._end:this._value),o=this.querySelector(`.slider-fill`);o&&(o.style.left=`${i*100}%`,o.style.right=`${100-a*100}%`,r&&o.style.setProperty(`--wui-fill-start`,String(i)),o.style.setProperty(`--wui-fill-end`,String(a)));let s=(e,t)=>{e&&(e.style.left=`${t*100}%`,e.style.setProperty(`--wui-t`,String(t)))};r?(s(this.querySelector(`[data-thumb="start"]`),i),s(this.querySelector(`[data-thumb="end"]`),a)):s(this.querySelector(`.slider-thumb`),a)}_syncValue(){if(this._rendered)if(this._placeParts(),this._isRange()){let e=this.querySelector(`[data-thumb="start"]`),t=this.querySelector(`[data-thumb="end"]`);e&&(e.setAttribute(`aria-valuenow`,String(this._start)),e.setAttribute(`aria-valuetext`,this._formatValue(this._start))),t&&(t.setAttribute(`aria-valuenow`,String(this._end)),t.setAttribute(`aria-valuetext`,this._formatValue(this._end)));let n=this.querySelector(`.slider-value`);n&&(n.textContent=`${this._formatValue(this._start)} to ${this._formatValue(this._end)}`)}else{let e=this.querySelector(`.slider-thumb`);e&&(e.setAttribute(`aria-valuenow`,String(this._value)),e.setAttribute(`aria-valuetext`,this._formatValue(this._value)));let t=this.querySelector(`.slider-value`);t&&(t.textContent=this._formatValue(this._value))}}_syncMirrors(){this._isRange()?this._syncRangeMirrors():this._syncSingleMirror()}_syncSingleMirror(){this.getAttribute(`name`)&&I(this,String(this._value))}_syncRangeMirrors(){let e=this.getAttribute(`start-name`)||this.getAttribute(`name`),t=this.getAttribute(`end-name`);this._mirrorRange(`start`,e,this._start),this._mirrorRange(`end`,t,this._end)}_mirrorRange(e,t,n){if(!t)return;let r=this.querySelector(`input[type="hidden"][data-slider-mirror="${e}"]`);r||(r=document.createElement(`input`),r.type=`hidden`,r.setAttribute(`data-slider-mirror`,e),this.appendChild(r)),r.name=t,r.value=String(n),r.disabled=this.hasAttribute(`disabled`)}_valueAtPosition(e){let t=this.querySelector(`.slider-track`);if(!t)return this._min();let n=t.getBoundingClientRect(),r=this.querySelector(`.slider-thumb`),i=r?r.offsetWidth/2:0,a=n.width-i*2,o=a>0?Math.max(0,Math.min(1,(e-n.left-i)/a)):0,s=this._min()+o*(this._max()-this._min());return this._snapToStep(s)}_nearestThumb(e){return Math.abs(e-this._start)<=Math.abs(e-this._end)?`start`:`end`}_wire(){if(this._teardown(),this.hasAttribute(`disabled`))return;let e=this.querySelectorAll(`.slider-thumb`),t=this.querySelector(`.slider-track`),n=this._isRange();this._pointerDownListener=e=>{if(this.hasAttribute(`disabled`))return;let t=e.target.closest(`.slider-thumb`);t&&(e.preventDefault(),this._isDragging=!0,this._dragThumb=t.getAttribute(`data-thumb`),document.addEventListener(`pointermove`,this._pointerMoveListener),document.addEventListener(`pointerup`,this._pointerUpListener),document.addEventListener(`pointercancel`,this._pointerUpListener))},this._pointerMoveListener=e=>{if(!this._isDragging)return;e.preventDefault();let t=this._valueAtPosition(e.clientX);if(this._dragThumb===`single`)this._value=this._clamp(t),this._syncValue(),this.dispatchEvent(new CustomEvent(`slide`,{detail:{value:this._value}}));else if(this._dragThumb===`start`){let e=Math.min(t,this._end);this._start=this._clamp(e),this._syncValue(),this.dispatchEvent(new CustomEvent(`slide`,{detail:{start:this._start,end:this._end}}))}else if(this._dragThumb===`end`){let e=Math.max(t,this._start);this._end=this._clamp(e),this._syncValue(),this.dispatchEvent(new CustomEvent(`slide`,{detail:{start:this._start,end:this._end}}))}},this._pointerUpListener=()=>{this._isDragging&&(this._isDragging=!1,this._dragThumb=null,document.removeEventListener(`pointermove`,this._pointerMoveListener),document.removeEventListener(`pointerup`,this._pointerUpListener),document.removeEventListener(`pointercancel`,this._pointerUpListener),this._syncMirrors(),this.dispatchEvent(new Event(`change`,{bubbles:!0})))},this._thumbKeyListener=e=>{let t=e.currentTarget;if(this.hasAttribute(`disabled`))return;let n=this._step(),r=n*10,i=null,a=t.getAttribute(`data-thumb`),o=a===`end`?this._end:a===`start`?this._start:this._value;e.key===`ArrowLeft`||e.key===`ArrowDown`?(e.preventDefault(),i=o-n):e.key===`ArrowRight`||e.key===`ArrowUp`?(e.preventDefault(),i=o+n):e.key===`PageDown`?(e.preventDefault(),i=o-r):e.key===`PageUp`?(e.preventDefault(),i=o+r):e.key===`Home`?(e.preventDefault(),i=this._min()):e.key===`End`&&(e.preventDefault(),i=this._max()),i!=null&&(i=this._clamp(i),a===`single`?this._value=i:a===`start`?this._start=Math.min(i,this._end):a===`end`&&(this._end=Math.max(i,this._start)),this._syncValue(),this._syncMirrors(),this.dispatchEvent(new Event(`change`,{bubbles:!0})))},this._trackClickListener=e=>{if(this.hasAttribute(`disabled`))return;let t=this._valueAtPosition(e.clientX);n?this._nearestThumb(t)===`start`?this._start=Math.min(this._clamp(t),this._end):this._end=Math.max(this._clamp(t),this._start):this._value=this._clamp(t),this._syncValue(),this._syncMirrors(),this.dispatchEvent(new Event(`change`,{bubbles:!0}))},e.forEach(e=>{e.addEventListener(`pointerdown`,this._pointerDownListener),e.addEventListener(`keydown`,this._thumbKeyListener)}),t?.addEventListener(`click`,this._trackClickListener)}_teardown(){for(let e of this.querySelectorAll(`.slider-thumb`))e.removeEventListener(`pointerdown`,this._pointerDownListener),e.removeEventListener(`keydown`,this._thumbKeyListener);document.removeEventListener(`pointermove`,this._pointerMoveListener),document.removeEventListener(`pointerup`,this._pointerUpListener),document.removeEventListener(`pointercancel`,this._pointerUpListener),this._isDragging=!1,this._dragThumb=null,this.querySelector(`.slider-track`)?.removeEventListener(`click`,this._trackClickListener)}disconnectedCallback(){this._teardown()}},au=(e,t)=>{let n=Number.parseFloat(e);return Number.isFinite(n)?n:t},ou=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),su=new Set,cu=`.wui-sortable-handle`,lu=`a[href],button,input,select,textarea,label,summary,[contenteditable='true'],[role='button'],[role='link']`,uu=4,du=8,fu=250,pu=48,mu=18,hu=class extends c{static get observedAttributes(){return[`name`,`disabled`]}constructor(){super(),this._drag=null,this._kb=null,this._moving=!1,this.controlled=!1,this._observer=null,this._onPointerDown=this._onPointerDown.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onFocusOut=this._onFocusOut.bind(this),this._onDragStart=e=>e.preventDefault(),this._onDocMove=this._onDocMove.bind(this),this._onDocUp=this._onDocUp.bind(this),this._onDocCancel=this._onDocCancel.bind(this),this._onDocKey=this._onDocKey.bind(this),this._onDocTouchMove=e=>{this._drag?.started&&e.preventDefault()},this._onSelectStart=e=>e.preventDefault(),this._scrollTick=this._scrollTick.bind(this)}connectedCallback(){su.add(this),this.addEventListener(`pointerdown`,this._onPointerDown),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`dragstart`,this._onDragStart),this._observer=new MutationObserver(()=>this._syncMirrors()),this._observer.observe(this,{childList:!0}),this._syncMirrors()}disconnectedCallback(){su.delete(this),this.removeEventListener(`pointerdown`,this._onPointerDown),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`focusout`,this._onFocusOut),this.removeEventListener(`dragstart`,this._onDragStart),this._observer?.disconnect(),this._observer=null,this._abort()}attributeChangedCallback(e){e===`disabled`&&this._abort(),this.isConnected&&this._syncMirrors()}get order(){return this._items().map(e=>e.getAttribute(`data-id`))}set order(e){if(this._drag?.started||this._kb)return;let t=this._items(),n=new Map(t.map(e=>[e.getAttribute(`data-id`),e])),r=[];for(let t of e??[]){let e=n.get(String(t));e&&!r.includes(e)&&r.push(e)}[...r,...t.filter(e=>!r.includes(e))].forEach((e,t)=>{let n=this._items()[t];n!==e&&this.insertBefore(e,n)}),this._syncMirrors()}_items(){return[...this.querySelectorAll(`:scope > [data-id]`)]}_itemFrom(e){let t=e;for(;t&&t.parentElement!==this;)t=t.parentElement;return t?.hasAttribute(`data-id`)?t:null}_itemDisabled(e){return e.hasAttribute(`data-disabled`)}_horizontal(){return this.getAttribute(`orientation`)===`horizontal`}_syncMirrors(){L(this,this.order)}_insertAt(e,t){let n=this._items();if(n.indexOf(e)===t)return;let r=n.filter(t=>t!==e),i=r[t]??null;i?this.insertBefore(e,i):r.length>0?r[r.length-1].after(e):this.appendChild(e)}_indexFor(e,t,n){let r=this._items().filter(t=>t!==e),i=this._horizontal();for(let e=0;e<r.length;e++){let a=r[e].getBoundingClientRect();if(i?n<a.top||n<=a.bottom&&t<a.left+a.width/2:n<a.top+a.height/2)return e}return r.length}_peers(){let e=this.getAttribute(`group`);return[...su].filter(t=>t===this||e&&t.getAttribute(`group`)===e&&!t.hasAttribute(`disabled`))}_labelOf(e){return e.getAttribute(`data-label`)||e.textContent.replace(/\s+/g,` `).trim()||e.getAttribute(`data-id`)}_announce(e){let t=this.querySelector(`:scope > .wui-sortable-live`);t||(t=document.createElement(`div`),t.className=`wui-sortable-live`,t.setAttribute(`role`,`status`),t.setAttribute(`aria-live`,`polite`),t.setAttribute(`aria-atomic`,`true`),this.appendChild(t)),t.textContent=e}_position(e){let t=this._items();return`position ${t.indexOf(e)+1} of ${t.length}`}_onPointerDown(e){if(this._drag||this._kb||this.hasAttribute(`disabled`)||e.pointerType===`mouse`&&e.button!==0)return;let t=this._itemFrom(e.target);if(!t||this._itemDisabled(t))return;let n=t.querySelector(`:scope > ${cu}`),r=!!n&&n.contains(e.target);if(this.hasAttribute(`handle`)&&!r)return;if(!r){let n=e.target.closest?.(lu);if(n&&n!==t&&t.contains(n))return}let i=e.pointerType===`touch`&&!r,a={item:t,pointerId:e.pointerId,startX:e.clientX,startY:e.clientY,x:e.clientX,y:e.clientY,slop:e.pointerType===`touch`?du:uu,ready:!i,started:!1,timer:null,raf:0,list:this,ghost:null};this._drag=a,i&&(a.timer=setTimeout(()=>{a.timer=null,a.ready=!0,this._begin()},fu)),document.addEventListener(`pointermove`,this._onDocMove),document.addEventListener(`pointerup`,this._onDocUp),document.addEventListener(`pointercancel`,this._onDocCancel),document.addEventListener(`keydown`,this._onDocKey,!0),document.addEventListener(`touchmove`,this._onDocTouchMove,{passive:!1})}_onDocMove(e){let t=this._drag;if(!(!t||e.pointerId!==t.pointerId)){if(t.x=e.clientX,t.y=e.clientY,!t.started){let e=Math.hypot(t.x-t.startX,t.y-t.startY);if(!t.ready){e>t.slop&&this._finish(!0);return}if(e<t.slop||(this._begin(),!this._drag?.started))return}e.preventDefault?.(),this._moveGhost(),this._update()}}_onDocUp(e){this._drag&&e.pointerId===this._drag.pointerId&&this._finish(!1)}_onDocCancel(e){this._drag&&e.pointerId===this._drag.pointerId&&this._finish(!0)}_onDocKey(e){e.key!==`Escape`||!this._drag||(e.preventDefault(),e.stopPropagation(),this._finish(!0))}_begin(){let e=this._drag;if(!e||e.started)return;e.started=!0;let t=e.item.getBoundingClientRect();e.offsetX=e.startX-t.left,e.offsetY=e.startY-t.top,e.fromIndex=this._items().indexOf(e.item);let n=e.item.cloneNode(!0);for(let e of[n,...n.querySelectorAll(`[id],[data-id]`)])e.removeAttribute(`id`),e.removeAttribute(`data-id`);n.classList.add(`wui-sortable-ghost`),n.setAttribute(`aria-hidden`,`true`),n.inert=!0,n.style.width=`${t.width}px`,n.style.height=`${t.height}px`,e.ghost=n,e.item.classList.add(`wui-sortable-dragging`),document.body.appendChild(n),document.documentElement.classList.add(`wui-sortable-active`),document.addEventListener(`selectstart`,this._onSelectStart),this._moveGhost(),e.raf=requestAnimationFrame(this._scrollTick),this._emit(this,`wui-sortable:start`,{id:e.item.getAttribute(`data-id`)})}_moveGhost(){let e=this._drag;e?.ghost&&(e.ghost.style.transform=`translate(${e.x-e.offsetX}px, ${e.y-e.offsetY}px)`)}_update(){let e=this._drag;if(!e?.started)return;let t=e.list;for(let n of this._peers()){let r=n.getBoundingClientRect();if(e.x>=r.left&&e.x<=r.right&&e.y>=r.top&&e.y<=r.bottom){t=n;break}}let n=t._indexFor(e.item,e.x,e.y);(t!==e.list||n!==t._items().indexOf(e.item))&&t._insertAt(e.item,n),e.list=t}_scrollTick(){let e=this._drag;if(!e?.started)return;let t=_u(e.list),n=t?t.getBoundingClientRect():null,r=Math.max(n?.top??0,0),i=Math.min(n?.bottom??window.innerHeight,window.innerHeight),a=Math.max(n?.left??0,0),o=Math.min(n?.right??window.innerWidth,window.innerWidth),s=gu(e.y,r,i),c=gu(e.x,a,o);(c||s)&&(t?(t.scrollTop+=s,t.scrollLeft+=c):window.scrollBy(c,s),this._update()),e.raf=requestAnimationFrame(this._scrollTick)}_finish(e){let t=this._drag;if(!t||(this._drag=null,clearTimeout(t.timer),cancelAnimationFrame(t.raf),document.removeEventListener(`pointermove`,this._onDocMove),document.removeEventListener(`pointerup`,this._onDocUp),document.removeEventListener(`pointercancel`,this._onDocCancel),document.removeEventListener(`keydown`,this._onDocKey,!0),document.removeEventListener(`touchmove`,this._onDocTouchMove),document.removeEventListener(`selectstart`,this._onSelectStart),!t.started))return;t.ghost?.remove(),document.documentElement.classList.remove(`wui-sortable-active`),t.item.classList.remove(`wui-sortable-dragging`);let n=t.item.getAttribute(`data-id`);e?(this._insertAt(t.item,t.fromIndex),this._syncMirrors(),t.list!==this&&t.list._syncMirrors()):this._settle(t.item,this,t.fromIndex,t.list),this._emit(this,`wui-sortable:end`,{id:n,cancelled:e})}_settle(e,t,n,r){let i=r._items().indexOf(e);if(r===t&&i===n)return;let a=e.getAttribute(`data-id`),o=r.order,s=r!==t,c=t.order;s&&(t.controlled||r.controlled)&&t._insertAt(e,n),t._syncMirrors(),r._syncMirrors();let l=r._labelOf(e),u=s&&r.getAttribute(`aria-label`)?` to ${r.getAttribute(`aria-label`)}`:``,d={id:a,fromIndex:n,toIndex:i,from:t,to:r};s&&this._emit(t,`wui-sortable:change`,{...d,ids:c}),this._emit(r,`wui-sortable:change`,{...d,ids:o}),r._announce(`${l} moved${u}, position ${i+1} of ${o.length}.`)}_emit(e,t,n){e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}_abort(){this._drag&&this._finish(!0),this._kb&&this._dropKeyboard(!0)}_onKeyDown(e){if(this.hasAttribute(`disabled`))return;let t=e.target.closest?.(cu),n=t&&t.parentElement?.parentElement===this?t.parentElement:null;if(!n||this._itemDisabled(n)||this._drag)return;let r=e.key;if(!this._kb){if(r!==` `&&r!==`Enter`)return;e.preventDefault(),this._liftKeyboard(n,t);return}if(this._kb.item===n){if(r===` `||r===`Enter`)e.preventDefault(),this._dropKeyboard(!1);else if(r===`Escape`)e.preventDefault(),e.stopPropagation(),this._dropKeyboard(!0);else if([`ArrowUp`,`ArrowLeft`,`ArrowDown`,`ArrowRight`,`Home`,`End`].includes(r)){e.preventDefault();let i=this._items(),a=i.indexOf(n),o=i.length-1,s=r===`Home`?0:r===`End`?o:Math.max(0,Math.min(o,a+(r===`ArrowUp`||r===`ArrowLeft`?-1:1)));if(s===a){this._announce(`${this._labelOf(n)} is already ${a===0?`first`:`last`}, ${this._position(n)}.`);return}this._moveFocused(()=>this._insertAt(n,s),t),this._announce(`${this._labelOf(n)} moved to ${this._position(n)}.`)}}}_onFocusOut(e){!this._kb||this._moving||e.relatedTarget&&this._kb.handle.contains(e.relatedTarget)||this._dropKeyboard(!1)}_liftKeyboard(e,t){this._kb={item:e,handle:t,fromIndex:this._items().indexOf(e)},t.setAttribute(`aria-pressed`,`true`),this._announce(`${this._labelOf(e)} lifted, ${this._position(e)}. Use the arrow keys to move it, Space to drop it, Escape to cancel.`)}_dropKeyboard(e){let t=this._kb;if(t){if(this._kb=null,t.handle.removeAttribute(`aria-pressed`),e){this._moveFocused(()=>this._insertAt(t.item,t.fromIndex),t.handle),this._announce(`Reorder cancelled. ${this._labelOf(t.item)} is back at ${this._position(t.item)}.`);return}if(this._items().indexOf(t.item)===t.fromIndex){this._announce(`${this._labelOf(t.item)} dropped, ${this._position(t.item)}.`);return}this._settle(t.item,this,t.fromIndex,this)}}_moveFocused(e,t){this._moving=!0;let n=this.contains(document.activeElement);e(),n&&document.activeElement!==t&&t.focus(),this._moving=!1}};function gu(e,t,n){return e<t+pu?-Math.ceil(mu*Math.min(1,(t+pu-e)/pu)):e>n-pu?Math.ceil(mu*Math.min(1,(e-(n-pu))/pu)):0}function _u(e){for(let t=e.parentElement;t&&t!==document.body&&t!==document.documentElement;t=t.parentElement){let e=getComputedStyle(t),n=/(auto|scroll)/.test(e.overflowY)&&t.scrollHeight>t.clientHeight,r=/(auto|scroll)/.test(e.overflowX)&&t.scrollWidth>t.clientWidth;if(n||r)return t}return null}var vu=class extends c{static formAssociated=!0;_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||`Add tags`}static get observedAttributes(){return[`placeholder`,`disabled`,`size`,`max-tags`,`aria-label`,`separators`,`allow-duplicates`,`aria-invalid`]}constructor(){super(),this._values=[],this._draftText=``;try{this._internals=this.attachInternals()}catch{this._internals=null}}connectedCallback(){if(!this._rendered){if(!this._valuesInit&&!this._values.length){let e=this.getAttribute(`value`);if(e!=null&&e!==``)this._values=e.split(`,`).map(e=>e.trim()).filter(Boolean);else{let e=[...this.querySelectorAll(`:scope > wui-tag`)].map(e=>e.textContent.trim());e.length&&(this._values=e.map(String))}}this._valuesInit=!0,this._defaultCaptured||=(this._defaultValues=this._values.slice(),!0),this.render();return}this._wire()}formResetCallback(){this.values=(this._defaultValues||[]).slice(),this._draftText=``;let e=this.querySelector(`[data-input]`);e&&(e.value=``)}attributeChangedCallback(e){if(e===`aria-invalid`){this._syncInvalid();return}if(this._rendered){if(e===`separators`||e===`allow-duplicates`){this._wire();return}this.render()}}_syncInvalid(){let e=this.querySelector(`.search-select-control`);e&&(this.hasAttribute(`aria-invalid`)?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}get values(){return this._values.slice()}set values(e){this._values=Array.isArray(e)?e.map(String):[],L(this,this._values),this._rendered&&this._renderControl()}render(){let e=this.getAttribute(`size`),t=e===`sm`?` search-select-sm`:e===`lg`?` search-select-lg`:``;L(this,this._values),this.innerHTML=`
433
+ `,this._rendered=!0,this._placeParts(),this._syncMirrors(),this._wire()}_formatValue(e){return`${e}${this.getAttribute(`unit`)||``}`}_placeParts(){let e=this._min(),t=this._max(),n=n=>t===e?0:(n-e)/(t-e),r=this._isRange(),i=r?n(this._start):0,a=n(r?this._end:this._value),o=this.querySelector(`.slider-fill`);o&&(o.style.left=`${i*100}%`,o.style.right=`${100-a*100}%`,r&&o.style.setProperty(`--wui-fill-start`,String(i)),o.style.setProperty(`--wui-fill-end`,String(a)));let s=(e,t)=>{e&&(e.style.left=`${t*100}%`,e.style.setProperty(`--wui-t`,String(t)))};r?(s(this.querySelector(`[data-thumb="start"]`),i),s(this.querySelector(`[data-thumb="end"]`),a)):s(this.querySelector(`.slider-thumb`),a)}_syncValue(){if(this._rendered)if(this._placeParts(),this._isRange()){let e=this.querySelector(`[data-thumb="start"]`),t=this.querySelector(`[data-thumb="end"]`);e&&(e.setAttribute(`aria-valuenow`,String(this._start)),e.setAttribute(`aria-valuetext`,this._formatValue(this._start))),t&&(t.setAttribute(`aria-valuenow`,String(this._end)),t.setAttribute(`aria-valuetext`,this._formatValue(this._end)));let n=this.querySelector(`.slider-value`);n&&(n.textContent=`${this._formatValue(this._start)} to ${this._formatValue(this._end)}`)}else{let e=this.querySelector(`.slider-thumb`);e&&(e.setAttribute(`aria-valuenow`,String(this._value)),e.setAttribute(`aria-valuetext`,this._formatValue(this._value)));let t=this.querySelector(`.slider-value`);t&&(t.textContent=this._formatValue(this._value))}}_syncMirrors(){this._isRange()?this._syncRangeMirrors():this._syncSingleMirror()}_syncSingleMirror(){this.getAttribute(`name`)&&B(this,String(this._value))}_syncRangeMirrors(){let e=this.getAttribute(`start-name`)||this.getAttribute(`name`),t=this.getAttribute(`end-name`);this._mirrorRange(`start`,e,this._start),this._mirrorRange(`end`,t,this._end)}_mirrorRange(e,t,n){if(!t)return;let r=this.querySelector(`input[type="hidden"][data-slider-mirror="${e}"]`);r||(r=document.createElement(`input`),r.type=`hidden`,r.setAttribute(`data-slider-mirror`,e),this.appendChild(r)),r.name=t,r.value=String(n),r.disabled=this.hasAttribute(`disabled`)}_valueAtPosition(e){let t=this.querySelector(`.slider-track`);if(!t)return this._min();let n=t.getBoundingClientRect(),r=this.querySelector(`.slider-thumb`),i=r?r.offsetWidth/2:0,a=n.width-i*2,o=a>0?Math.max(0,Math.min(1,(e-n.left-i)/a)):0,s=this._min()+o*(this._max()-this._min());return this._snapToStep(s)}_nearestThumb(e){return Math.abs(e-this._start)<=Math.abs(e-this._end)?`start`:`end`}_wire(){if(this._teardown(),this.hasAttribute(`disabled`))return;let e=this.querySelectorAll(`.slider-thumb`),t=this.querySelector(`.slider-track`),n=this._isRange();this._pointerDownListener=e=>{if(this.hasAttribute(`disabled`))return;let t=e.target.closest(`.slider-thumb`);t&&(e.preventDefault(),this._isDragging=!0,this._dragThumb=t.getAttribute(`data-thumb`),document.addEventListener(`pointermove`,this._pointerMoveListener),document.addEventListener(`pointerup`,this._pointerUpListener),document.addEventListener(`pointercancel`,this._pointerUpListener))},this._pointerMoveListener=e=>{if(!this._isDragging)return;e.preventDefault();let t=this._valueAtPosition(e.clientX);if(this._dragThumb===`single`)this._value=this._clamp(t),this._syncValue(),this.dispatchEvent(new CustomEvent(`slide`,{detail:{value:this._value}}));else if(this._dragThumb===`start`){let e=Math.min(t,this._end);this._start=this._clamp(e),this._syncValue(),this.dispatchEvent(new CustomEvent(`slide`,{detail:{start:this._start,end:this._end}}))}else if(this._dragThumb===`end`){let e=Math.max(t,this._start);this._end=this._clamp(e),this._syncValue(),this.dispatchEvent(new CustomEvent(`slide`,{detail:{start:this._start,end:this._end}}))}},this._pointerUpListener=()=>{this._isDragging&&(this._isDragging=!1,this._dragThumb=null,document.removeEventListener(`pointermove`,this._pointerMoveListener),document.removeEventListener(`pointerup`,this._pointerUpListener),document.removeEventListener(`pointercancel`,this._pointerUpListener),this._syncMirrors(),this.dispatchEvent(new Event(`change`,{bubbles:!0})))},this._thumbKeyListener=e=>{let t=e.currentTarget;if(this.hasAttribute(`disabled`))return;let n=this._step(),r=n*10,i=null,a=t.getAttribute(`data-thumb`),o=a===`end`?this._end:a===`start`?this._start:this._value;e.key===`ArrowLeft`||e.key===`ArrowDown`?(e.preventDefault(),i=o-n):e.key===`ArrowRight`||e.key===`ArrowUp`?(e.preventDefault(),i=o+n):e.key===`PageDown`?(e.preventDefault(),i=o-r):e.key===`PageUp`?(e.preventDefault(),i=o+r):e.key===`Home`?(e.preventDefault(),i=this._min()):e.key===`End`&&(e.preventDefault(),i=this._max()),i!=null&&(i=this._clamp(i),a===`single`?this._value=i:a===`start`?this._start=Math.min(i,this._end):a===`end`&&(this._end=Math.max(i,this._start)),this._syncValue(),this._syncMirrors(),this.dispatchEvent(new Event(`change`,{bubbles:!0})))},this._trackClickListener=e=>{if(this.hasAttribute(`disabled`))return;let t=this._valueAtPosition(e.clientX);n?this._nearestThumb(t)===`start`?this._start=Math.min(this._clamp(t),this._end):this._end=Math.max(this._clamp(t),this._start):this._value=this._clamp(t),this._syncValue(),this._syncMirrors(),this.dispatchEvent(new Event(`change`,{bubbles:!0}))},e.forEach(e=>{e.addEventListener(`pointerdown`,this._pointerDownListener),e.addEventListener(`keydown`,this._thumbKeyListener)}),t?.addEventListener(`click`,this._trackClickListener)}_teardown(){for(let e of this.querySelectorAll(`.slider-thumb`))e.removeEventListener(`pointerdown`,this._pointerDownListener),e.removeEventListener(`keydown`,this._thumbKeyListener);document.removeEventListener(`pointermove`,this._pointerMoveListener),document.removeEventListener(`pointerup`,this._pointerUpListener),document.removeEventListener(`pointercancel`,this._pointerUpListener),this._isDragging=!1,this._dragThumb=null,this.querySelector(`.slider-track`)?.removeEventListener(`click`,this._trackClickListener)}disconnectedCallback(){this._teardown()}},Iu=(e,t)=>{let n=Number.parseFloat(e);return Number.isFinite(n)?n:t},Lu=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),Ru=new Set,zu=`.wui-sortable-handle`,Bu=`a[href],button,input,select,textarea,label,summary,[contenteditable='true'],[role='button'],[role='link']`,Vu=4,Hu=8,Uu=250,Wu=48,Gu=18,Ku=class extends c{static get observedAttributes(){return[`name`,`disabled`]}constructor(){super(),this._drag=null,this._kb=null,this._moving=!1,this.controlled=!1,this._observer=null,this._onPointerDown=this._onPointerDown.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onFocusOut=this._onFocusOut.bind(this),this._onDragStart=e=>e.preventDefault(),this._onDocMove=this._onDocMove.bind(this),this._onDocUp=this._onDocUp.bind(this),this._onDocCancel=this._onDocCancel.bind(this),this._onDocKey=this._onDocKey.bind(this),this._onDocTouchMove=e=>{this._drag?.started&&e.preventDefault()},this._onSelectStart=e=>e.preventDefault(),this._scrollTick=this._scrollTick.bind(this)}connectedCallback(){Ru.add(this),this.addEventListener(`pointerdown`,this._onPointerDown),this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`focusout`,this._onFocusOut),this.addEventListener(`dragstart`,this._onDragStart),this._observer=new MutationObserver(()=>this._syncMirrors()),this._observer.observe(this,{childList:!0}),this._syncMirrors()}disconnectedCallback(){Ru.delete(this),this.removeEventListener(`pointerdown`,this._onPointerDown),this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`focusout`,this._onFocusOut),this.removeEventListener(`dragstart`,this._onDragStart),this._observer?.disconnect(),this._observer=null,this._abort()}attributeChangedCallback(e){e===`disabled`&&this._abort(),this.isConnected&&this._syncMirrors()}get order(){return this._items().map(e=>e.getAttribute(`data-id`))}set order(e){if(this._drag?.started||this._kb)return;let t=this._items(),n=new Map(t.map(e=>[e.getAttribute(`data-id`),e])),r=[];for(let t of e??[]){let e=n.get(String(t));e&&!r.includes(e)&&r.push(e)}[...r,...t.filter(e=>!r.includes(e))].forEach((e,t)=>{let n=this._items()[t];n!==e&&this.insertBefore(e,n)}),this._syncMirrors()}_items(){return[...this.querySelectorAll(`:scope > [data-id]`)]}_itemFrom(e){let t=e;for(;t&&t.parentElement!==this;)t=t.parentElement;return t?.hasAttribute(`data-id`)?t:null}_itemDisabled(e){return e.hasAttribute(`data-disabled`)}_horizontal(){return this.getAttribute(`orientation`)===`horizontal`}_syncMirrors(){V(this,this.order)}_insertAt(e,t){let n=this._items();if(n.indexOf(e)===t)return;let r=n.filter(t=>t!==e),i=r[t]??null;i?this.insertBefore(e,i):r.length>0?r[r.length-1].after(e):this.appendChild(e)}_indexFor(e,t,n){let r=this._items().filter(t=>t!==e),i=this._horizontal();for(let e=0;e<r.length;e++){let a=r[e].getBoundingClientRect();if(i?n<a.top||n<=a.bottom&&t<a.left+a.width/2:n<a.top+a.height/2)return e}return r.length}_peers(){let e=this.getAttribute(`group`);return[...Ru].filter(t=>t===this||e&&t.getAttribute(`group`)===e&&!t.hasAttribute(`disabled`))}_labelOf(e){return e.getAttribute(`data-label`)||e.textContent.replace(/\s+/g,` `).trim()||e.getAttribute(`data-id`)}_announce(e){let t=this.querySelector(`:scope > .wui-sortable-live`);t||(t=document.createElement(`div`),t.className=`wui-sortable-live`,t.setAttribute(`role`,`status`),t.setAttribute(`aria-live`,`polite`),t.setAttribute(`aria-atomic`,`true`),this.appendChild(t)),t.textContent=e}_position(e){let t=this._items();return`position ${t.indexOf(e)+1} of ${t.length}`}_onPointerDown(e){if(this._drag||this._kb||this.hasAttribute(`disabled`)||e.pointerType===`mouse`&&e.button!==0)return;let t=this._itemFrom(e.target);if(!t||this._itemDisabled(t))return;let n=t.querySelector(`:scope > ${zu}`),r=!!n&&n.contains(e.target);if(this.hasAttribute(`handle`)&&!r)return;if(!r){let n=e.target.closest?.(Bu);if(n&&n!==t&&t.contains(n))return}let i=e.pointerType===`touch`&&!r,a={item:t,pointerId:e.pointerId,startX:e.clientX,startY:e.clientY,x:e.clientX,y:e.clientY,slop:e.pointerType===`touch`?Hu:Vu,ready:!i,started:!1,timer:null,raf:0,list:this,ghost:null};this._drag=a,i&&(a.timer=setTimeout(()=>{a.timer=null,a.ready=!0,this._begin()},Uu)),document.addEventListener(`pointermove`,this._onDocMove),document.addEventListener(`pointerup`,this._onDocUp),document.addEventListener(`pointercancel`,this._onDocCancel),document.addEventListener(`keydown`,this._onDocKey,!0),document.addEventListener(`touchmove`,this._onDocTouchMove,{passive:!1})}_onDocMove(e){let t=this._drag;if(!(!t||e.pointerId!==t.pointerId)){if(t.x=e.clientX,t.y=e.clientY,!t.started){let e=Math.hypot(t.x-t.startX,t.y-t.startY);if(!t.ready){e>t.slop&&this._finish(!0);return}if(e<t.slop||(this._begin(),!this._drag?.started))return}e.preventDefault?.(),this._moveGhost(),this._update()}}_onDocUp(e){this._drag&&e.pointerId===this._drag.pointerId&&this._finish(!1)}_onDocCancel(e){this._drag&&e.pointerId===this._drag.pointerId&&this._finish(!0)}_onDocKey(e){e.key!==`Escape`||!this._drag||(e.preventDefault(),e.stopPropagation(),this._finish(!0))}_begin(){let e=this._drag;if(!e||e.started)return;e.started=!0;let t=e.item.getBoundingClientRect();e.offsetX=e.startX-t.left,e.offsetY=e.startY-t.top,e.fromIndex=this._items().indexOf(e.item);let n=e.item.cloneNode(!0);for(let e of[n,...n.querySelectorAll(`[id],[data-id]`)])e.removeAttribute(`id`),e.removeAttribute(`data-id`);n.classList.add(`wui-sortable-ghost`),n.setAttribute(`aria-hidden`,`true`),n.inert=!0,n.style.width=`${t.width}px`,n.style.height=`${t.height}px`,e.ghost=n,e.item.classList.add(`wui-sortable-dragging`),document.body.appendChild(n),document.documentElement.classList.add(`wui-sortable-active`),document.addEventListener(`selectstart`,this._onSelectStart),this._moveGhost(),e.raf=requestAnimationFrame(this._scrollTick),this._emit(this,`wui-sortable:start`,{id:e.item.getAttribute(`data-id`)})}_moveGhost(){let e=this._drag;e?.ghost&&(e.ghost.style.transform=`translate(${e.x-e.offsetX}px, ${e.y-e.offsetY}px)`)}_update(){let e=this._drag;if(!e?.started)return;let t=e.list;for(let n of this._peers()){let r=n.getBoundingClientRect();if(e.x>=r.left&&e.x<=r.right&&e.y>=r.top&&e.y<=r.bottom){t=n;break}}let n=t._indexFor(e.item,e.x,e.y);(t!==e.list||n!==t._items().indexOf(e.item))&&t._insertAt(e.item,n),e.list=t}_scrollTick(){let e=this._drag;if(!e?.started)return;let t=Ju(e.list),n=t?t.getBoundingClientRect():null,r=Math.max(n?.top??0,0),i=Math.min(n?.bottom??window.innerHeight,window.innerHeight),a=Math.max(n?.left??0,0),o=Math.min(n?.right??window.innerWidth,window.innerWidth),s=qu(e.y,r,i),c=qu(e.x,a,o);(c||s)&&(t?(t.scrollTop+=s,t.scrollLeft+=c):window.scrollBy(c,s),this._update()),e.raf=requestAnimationFrame(this._scrollTick)}_finish(e){let t=this._drag;if(!t||(this._drag=null,clearTimeout(t.timer),cancelAnimationFrame(t.raf),document.removeEventListener(`pointermove`,this._onDocMove),document.removeEventListener(`pointerup`,this._onDocUp),document.removeEventListener(`pointercancel`,this._onDocCancel),document.removeEventListener(`keydown`,this._onDocKey,!0),document.removeEventListener(`touchmove`,this._onDocTouchMove),document.removeEventListener(`selectstart`,this._onSelectStart),!t.started))return;t.ghost?.remove(),document.documentElement.classList.remove(`wui-sortable-active`),t.item.classList.remove(`wui-sortable-dragging`);let n=t.item.getAttribute(`data-id`);e?(this._insertAt(t.item,t.fromIndex),this._syncMirrors(),t.list!==this&&t.list._syncMirrors()):this._settle(t.item,this,t.fromIndex,t.list),this._emit(this,`wui-sortable:end`,{id:n,cancelled:e})}_settle(e,t,n,r){let i=r._items().indexOf(e);if(r===t&&i===n)return;let a=e.getAttribute(`data-id`),o=r.order,s=r!==t,c=t.order;s&&(t.controlled||r.controlled)&&t._insertAt(e,n),t._syncMirrors(),r._syncMirrors();let l=r._labelOf(e),u=s&&r.getAttribute(`aria-label`)?` to ${r.getAttribute(`aria-label`)}`:``,d={id:a,fromIndex:n,toIndex:i,from:t,to:r};s&&this._emit(t,`wui-sortable:change`,{...d,ids:c}),this._emit(r,`wui-sortable:change`,{...d,ids:o}),r._announce(`${l} moved${u}, position ${i+1} of ${o.length}.`)}_emit(e,t,n){e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}_abort(){this._drag&&this._finish(!0),this._kb&&this._dropKeyboard(!0)}_onKeyDown(e){if(this.hasAttribute(`disabled`))return;let t=e.target.closest?.(zu),n=t&&t.parentElement?.parentElement===this?t.parentElement:null;if(!n||this._itemDisabled(n)||this._drag)return;let r=e.key;if(!this._kb){if(r!==` `&&r!==`Enter`)return;e.preventDefault(),this._liftKeyboard(n,t);return}if(this._kb.item===n){if(r===` `||r===`Enter`)e.preventDefault(),this._dropKeyboard(!1);else if(r===`Escape`)e.preventDefault(),e.stopPropagation(),this._dropKeyboard(!0);else if([`ArrowUp`,`ArrowLeft`,`ArrowDown`,`ArrowRight`,`Home`,`End`].includes(r)){e.preventDefault();let i=this._items(),a=i.indexOf(n),o=i.length-1,s=r===`Home`?0:r===`End`?o:Math.max(0,Math.min(o,a+(r===`ArrowUp`||r===`ArrowLeft`?-1:1)));if(s===a){this._announce(`${this._labelOf(n)} is already ${a===0?`first`:`last`}, ${this._position(n)}.`);return}this._moveFocused(()=>this._insertAt(n,s),t),this._announce(`${this._labelOf(n)} moved to ${this._position(n)}.`)}}}_onFocusOut(e){!this._kb||this._moving||e.relatedTarget&&this._kb.handle.contains(e.relatedTarget)||this._dropKeyboard(!1)}_liftKeyboard(e,t){this._kb={item:e,handle:t,fromIndex:this._items().indexOf(e)},t.setAttribute(`aria-pressed`,`true`),this._announce(`${this._labelOf(e)} lifted, ${this._position(e)}. Use the arrow keys to move it, Space to drop it, Escape to cancel.`)}_dropKeyboard(e){let t=this._kb;if(t){if(this._kb=null,t.handle.removeAttribute(`aria-pressed`),e){this._moveFocused(()=>this._insertAt(t.item,t.fromIndex),t.handle),this._announce(`Reorder cancelled. ${this._labelOf(t.item)} is back at ${this._position(t.item)}.`);return}if(this._items().indexOf(t.item)===t.fromIndex){this._announce(`${this._labelOf(t.item)} dropped, ${this._position(t.item)}.`);return}this._settle(t.item,this,t.fromIndex,this)}}_moveFocused(e,t){this._moving=!0;let n=this.contains(document.activeElement);e(),n&&document.activeElement!==t&&t.focus(),this._moving=!1}};function qu(e,t,n){return e<t+Wu?-Math.ceil(Gu*Math.min(1,(t+Wu-e)/Wu)):e>n-Wu?Math.ceil(Gu*Math.min(1,(e-(n-Wu))/Wu)):0}function Ju(e){for(let t=e.parentElement;t&&t!==document.body&&t!==document.documentElement;t=t.parentElement){let e=getComputedStyle(t),n=/(auto|scroll)/.test(e.overflowY)&&t.scrollHeight>t.clientHeight,r=/(auto|scroll)/.test(e.overflowX)&&t.scrollWidth>t.clientWidth;if(n||r)return t}return null}var Yu=class extends c{static formAssociated=!0;_accessibleName(){return this.getAttribute(`aria-label`)||this.getAttribute(`placeholder`)||`Add tags`}static get observedAttributes(){return[`placeholder`,`disabled`,`size`,`max-tags`,`aria-label`,`separators`,`allow-duplicates`,`aria-invalid`]}constructor(){super(),this._values=[],this._draftText=``;try{this._internals=this.attachInternals()}catch{this._internals=null}}connectedCallback(){if(!this._rendered){if(!this._valuesInit&&!this._values.length){let e=this.getAttribute(`value`);if(e!=null&&e!==``)this._values=e.split(`,`).map(e=>e.trim()).filter(Boolean);else{let e=[...this.querySelectorAll(`:scope > wui-tag`)].map(e=>e.textContent.trim());e.length&&(this._values=e.map(String))}}this._valuesInit=!0,this._defaultCaptured||=(this._defaultValues=this._values.slice(),!0),this.render();return}this._wire()}formResetCallback(){this.values=(this._defaultValues||[]).slice(),this._draftText=``;let e=this.querySelector(`[data-input]`);e&&(e.value=``)}attributeChangedCallback(e){if(e===`aria-invalid`){this._syncInvalid();return}if(this._rendered){if(e===`separators`||e===`allow-duplicates`){this._wire();return}this.render()}}_syncInvalid(){let e=this.querySelector(`.search-select-control`);e&&(this.hasAttribute(`aria-invalid`)?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`))}get values(){return this._values.slice()}set values(e){this._values=Array.isArray(e)?e.map(String):[],V(this,this._values),this._rendered&&this._renderControl()}render(){let e=this.getAttribute(`size`),t=e===`sm`?` search-select-sm`:e===`lg`?` search-select-lg`:``;V(this,this._values),this.innerHTML=`
434
434
  <div class="search-select${t}">
435
435
  <div class="input search-select-control search-select-multi"${this.hasAttribute(`aria-invalid`)?` aria-invalid="true"`:``}${this.hasAttribute(`disabled`)?` aria-disabled="true"`:``}>
436
- <div class="ms-chips" data-chips><input type="text" class="ms-input" data-input aria-label="${bu(this._accessibleName())}" placeholder="${bu(this.getAttribute(`placeholder`)||`Add…`)}" autocomplete="off"${this.hasAttribute(`disabled`)?` disabled`:``}/></div>
436
+ <div class="ms-chips" data-chips><input type="text" class="ms-input" data-input aria-label="${Zu(this._accessibleName())}" placeholder="${Zu(this.getAttribute(`placeholder`)||`Add…`)}" autocomplete="off"${this.hasAttribute(`disabled`)?` disabled`:``}/></div>
437
437
  </div>
438
- </div>`,this._rendered=!0,L(this,this._values),this._renderControl(),this._wire()}_renderControl(){let e=this.querySelector(`[data-chips]`);if(e){for(let t of e.querySelectorAll(`:scope > .chip`))t.remove();this._values.length&&e.querySelector(`[data-input]`).insertAdjacentHTML(`beforebegin`,this._values.map(e=>`<span class="chip chip-sm"><span class="chip-label">${yu(e)}</span><button type="button" class="chip-remove" data-remove="${bu(e)}" aria-label="Remove ${bu(e)}">${R(`x`)}</button></span>`).join(``))}}_wire(){this._teardown();let e=this.querySelector(`.search-select-control`),t=this.querySelector(`[data-input]`);if(!e||!t)return;let n=()=>this.hasAttribute(`disabled`),r=(this.getAttribute(`separators`)||`enter,comma`).split(`,`).map(e=>e.trim()),i=this.getAttribute(`max-tags`),a=this.hasAttribute(`allow-duplicates`),o=new Set(r.map(Hs).filter(Boolean)),s=()=>{L(this,this._values),this.dispatchEvent(new Event(`change`,{bubbles:!0}))},c=e=>{let t=e.trim();if(!t||i&&this._values.length>=parseInt(i,10))return;let n=a?t:t.toLowerCase();(!this._values.some(e=>a?e===t:e.toLowerCase()===n)||a)&&(this._values.push(t),this._renderControl(),s())},l=e=>{this._values=this._values.filter(t=>t!==e),this._renderControl(),s()},u=e=>{if(e.key===`Enter`&&o.has(`Enter`)){e.preventDefault(),c(t.value),t.value=``;return}if(e.key===`,`&&o.has(`,`)){e.preventDefault(),c(t.value.replace(/,+$/,``)),t.value=``;return}if(e.key===` `&&o.has(` `)){let n=t.value.trim();n&&(e.preventDefault(),c(n),t.value=``);return}if(e.key===`Tab`&&o.has(`Tab`)){e.preventDefault(),c(t.value),t.value=``;return}e.key===`Backspace`&&!t.value&&this._values.length&&(e.preventDefault(),l(this._values[this._values.length-1])),e.key===`Escape`&&(t.value=``)},d=e=>{e.preventDefault();let n=e.clipboardData.getData(`text/plain`),a=[];for(let e of r){let t=Us(e)??e;if(Gs(n,[t])){a.push(...Ws(n,[t]));break}}a.length||a.push(n.trim());for(let e of a)if(c(e),i&&this._values.length>=parseInt(i,10))break;t.value=``};this._onControlClick=e=>{if(n())return;let r=e.target.closest(`[data-remove]`);if(r){e.stopPropagation(),l(r.dataset.remove),t.focus();return}t.focus()},this._onInputKey=u,this._onInputPaste=d,e.addEventListener(`click`,this._onControlClick),t.addEventListener(`keydown`,this._onInputKey),t.addEventListener(`paste`,this._onInputPaste),this._onDocClick=e=>{this.contains(e.target)||t.blur()},document.addEventListener(`click`,this._onDocClick)}_teardown(){this._onDocClick&&=(document.removeEventListener(`click`,this._onDocClick),null);let e=this.querySelector(`.search-select-control`),t=this.querySelector(`[data-input]`);e&&this._onControlClick&&e.removeEventListener(`click`,this._onControlClick),t&&this._onInputKey&&(t.removeEventListener(`keydown`,this._onInputKey),t.removeEventListener(`paste`,this._onInputPaste))}disconnectedCallback(){this._teardown()}},yu=e=>String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),bu=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),xu=e=>String(e).padStart(2,`0`),Su=(e,t)=>`${xu(e)}:${xu(t)}`,Cu=e=>{let t=/^(\d{2}):(\d{2})$/.exec(e||``);return t?{h:+t[1],m:+t[2]}:null},wu=(e,t=`24`)=>{if(!e)return``;if(t===`24`)return Su(e.h,e.m);let n=e.h%12||12,r=e.h>=12?`PM`:`AM`;return`${n}:${xu(e.m)} ${r}`},Tu=e=>{let t=String(e||``).trim().toLowerCase(),n=/^(\d{1,2})(?:[:.](\d{2})|(\d{2}))?\s*(?:([ap])\.?\s*(?:m\.?)?)?$/.exec(t);if(!n)return null;let r=+n[1],i=+(n[2]??n[3]??`0`);if(i>59)return null;if(n[4]){if(r<1||r>12)return null;r=r%12+(n[4]===`p`?12:0)}else if(r>23)return null;return{h:r,m:i}},Eu=0,Du=class extends c{static formAssociated=!0;static get observedAttributes(){return[`value`,`min`,`max`,`step`,`format`,`placeholder`,`disabled`,`required`,`size`,`aria-label`,`aria-describedby`,`aria-invalid`]}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=``,this._uid=`wui-tp-${++Eu}`,this._typedError=``,this._typeahead=``,this._typeaheadTimer=null,this.addEventListener(`focusout`,e=>{this._isOpen?.()&&e.relatedTarget&&!this.contains(e.relatedTarget)&&this._close({commit:!0})})}connectedCallback(){if(!this._rendered){this.render();return}this._bindGlobal?.()}attributeChangedCallback(e,t,n){if(this._rendered)switch(e){case`value`:this._value=n||``,this._typedError=``,this._syncFormValue(),this._syncText(),this._syncInvalid();return;case`aria-invalid`:case`aria-describedby`:this._syncInvalid();return;case`aria-label`:case`placeholder`:case`disabled`:case`required`:this._syncAttrs();return;default:this.render()}}formResetCallback(){this.value=this._defaultValue||``}get value(){return this._value}set value(e){this._value=e||``,this._typedError=``,I(this,this._value),this._syncText(),this._syncInvalid()}_format(){return this.getAttribute(`format`)||`24`}_step(){return Math.max(1,parseInt(this.getAttribute(`step`)||`30`,10)||30)}_bounds(){let e=Cu(this.getAttribute(`min`))||{h:0,m:0},t=Cu(this.getAttribute(`max`))||{h:23,m:59};return{min:e.h*60+e.m,max:t.h*60+t.m}}_allowed(e,t){let n=e*60+t,{min:r,max:i}=this._bounds();return n>=r&&n<=i&&n%this._step()===0}_times(){let e=[];for(let t=0;t<1440;t+=this._step()){let n=Math.floor(t/60),r=t%60;this._allowed(n,r)&&e.push({h:n,m:r})}return e}_refusal(e){if(this._allowed(e.h,e.m))return``;let t=this._format(),{min:n,max:r}=this._bounds(),i=e.h*60+e.m,a=e=>wu({h:Math.floor(e/60),m:e%60},t);if(i<n||i>r){let e=!!Cu(this.getAttribute(`min`)),t=!!Cu(this.getAttribute(`max`));return e&&t?`Enter a time between ${a(n)} and ${a(r)}.`:e?`Enter a time at or after ${a(n)}.`:`Enter a time at or before ${a(r)}.`}return`Enter a time in ${this._step()}-minute steps.`}render(){this._defaultValue===void 0&&(this._defaultValue=this.getAttribute(`value`)||``,this._value=this._defaultValue||this._value),this._isOpen=null;let e=this.getAttribute(`size`),t=e===`sm`?` input-sm`:e===`lg`?` input-lg`:``,n=this._uid;this.innerHTML=`
438
+ </div>`,this._rendered=!0,V(this,this._values),this._renderControl(),this._wire()}_renderControl(){let e=this.querySelector(`[data-chips]`);if(e){for(let t of e.querySelectorAll(`:scope > .chip`))t.remove();this._values.length&&e.querySelector(`[data-input]`).insertAdjacentHTML(`beforebegin`,this._values.map(e=>`<span class="chip chip-sm"><span class="chip-label">${Xu(e)}</span><button type="button" class="chip-remove" data-remove="${Zu(e)}" aria-label="Remove ${Zu(e)}">${M(`x`)}</button></span>`).join(``))}}_wire(){this._teardown();let e=this.querySelector(`.search-select-control`),t=this.querySelector(`[data-input]`);if(!e||!t)return;let n=()=>this.hasAttribute(`disabled`),r=(this.getAttribute(`separators`)||`enter,comma`).split(`,`).map(e=>e.trim()),i=this.getAttribute(`max-tags`),a=this.hasAttribute(`allow-duplicates`),o=new Set(r.map(yc).filter(Boolean)),s=()=>{V(this,this._values),this.dispatchEvent(new Event(`change`,{bubbles:!0}))},c=e=>{let t=e.trim();if(!t||i&&this._values.length>=parseInt(i,10))return;let n=a?t:t.toLowerCase();(!this._values.some(e=>a?e===t:e.toLowerCase()===n)||a)&&(this._values.push(t),this._renderControl(),s())},l=e=>{this._values=this._values.filter(t=>t!==e),this._renderControl(),s()},u=e=>{if(e.key===`Enter`&&o.has(`Enter`)){e.preventDefault(),c(t.value),t.value=``;return}if(e.key===`,`&&o.has(`,`)){e.preventDefault(),c(t.value.replace(/,+$/,``)),t.value=``;return}if(e.key===` `&&o.has(` `)){let n=t.value.trim();n&&(e.preventDefault(),c(n),t.value=``);return}if(e.key===`Tab`&&o.has(`Tab`)){e.preventDefault(),c(t.value),t.value=``;return}e.key===`Backspace`&&!t.value&&this._values.length&&(e.preventDefault(),l(this._values[this._values.length-1])),e.key===`Escape`&&(t.value=``)},d=e=>{e.preventDefault();let n=e.clipboardData.getData(`text/plain`),a=[];for(let e of r){let t=bc(e)??e;if(Sc(n,[t])){a.push(...xc(n,[t]));break}}a.length||a.push(n.trim());for(let e of a)if(c(e),i&&this._values.length>=parseInt(i,10))break;t.value=``};this._onControlClick=e=>{if(n())return;let r=e.target.closest(`[data-remove]`);if(r){e.stopPropagation(),l(r.dataset.remove),t.focus();return}t.focus()},this._onInputKey=u,this._onInputPaste=d,e.addEventListener(`click`,this._onControlClick),t.addEventListener(`keydown`,this._onInputKey),t.addEventListener(`paste`,this._onInputPaste),this._onDocClick=e=>{this.contains(e.target)||t.blur()},document.addEventListener(`click`,this._onDocClick)}_teardown(){this._onDocClick&&=(document.removeEventListener(`click`,this._onDocClick),null);let e=this.querySelector(`.search-select-control`),t=this.querySelector(`[data-input]`);e&&this._onControlClick&&e.removeEventListener(`click`,this._onControlClick),t&&this._onInputKey&&(t.removeEventListener(`keydown`,this._onInputKey),t.removeEventListener(`paste`,this._onInputPaste))}disconnectedCallback(){this._teardown()}},Xu=e=>String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),Zu=e=>String(e??``).replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`),Qu=e=>String(e).padStart(2,`0`),$u=(e,t)=>`${Qu(e)}:${Qu(t)}`,ed=e=>{let t=/^(\d{2}):(\d{2})$/.exec(e||``);return t?{h:+t[1],m:+t[2]}:null},td=(e,t=`24`)=>{if(!e)return``;if(t===`24`)return $u(e.h,e.m);let n=e.h%12||12,r=e.h>=12?`PM`:`AM`;return`${n}:${Qu(e.m)} ${r}`},nd=e=>{let t=String(e||``).trim().toLowerCase(),n=/^(\d{1,2})(?:[:.](\d{2})|(\d{2}))?\s*(?:([ap])\.?\s*(?:m\.?)?)?$/.exec(t);if(!n)return null;let r=+n[1],i=+(n[2]??n[3]??`0`);if(i>59)return null;if(n[4]){if(r<1||r>12)return null;r=r%12+(n[4]===`p`?12:0)}else if(r>23)return null;return{h:r,m:i}},rd=0,id=class extends c{static formAssociated=!0;static get observedAttributes(){return[`value`,`min`,`max`,`step`,`format`,`placeholder`,`disabled`,`required`,`size`,`aria-label`,`aria-describedby`,`aria-invalid`]}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=null}this._value=``,this._uid=`wui-tp-${++rd}`,this._typedError=``,this._typeahead=``,this._typeaheadTimer=null,this.addEventListener(`focusout`,e=>{this._isOpen?.()&&e.relatedTarget&&!this.contains(e.relatedTarget)&&this._close({commit:!0})})}connectedCallback(){if(!this._rendered){this.render();return}this._bindGlobal?.()}attributeChangedCallback(e,t,n){if(this._rendered)switch(e){case`value`:this._value=n||``,this._typedError=``,this._syncFormValue(),this._syncText(),this._syncInvalid();return;case`aria-invalid`:case`aria-describedby`:this._syncInvalid();return;case`aria-label`:case`placeholder`:case`disabled`:case`required`:this._syncAttrs();return;default:this.render()}}formResetCallback(){this.value=this._defaultValue||``}get value(){return this._value}set value(e){this._value=e||``,this._typedError=``,B(this,this._value),this._syncText(),this._syncInvalid()}_format(){return this.getAttribute(`format`)||`24`}_step(){return Math.max(1,parseInt(this.getAttribute(`step`)||`30`,10)||30)}_bounds(){let e=ed(this.getAttribute(`min`))||{h:0,m:0},t=ed(this.getAttribute(`max`))||{h:23,m:59};return{min:e.h*60+e.m,max:t.h*60+t.m}}_allowed(e,t){let n=e*60+t,{min:r,max:i}=this._bounds();return n>=r&&n<=i&&n%this._step()===0}_times(){let e=[];for(let t=0;t<1440;t+=this._step()){let n=Math.floor(t/60),r=t%60;this._allowed(n,r)&&e.push({h:n,m:r})}return e}_refusal(e){if(this._allowed(e.h,e.m))return``;let t=this._format(),{min:n,max:r}=this._bounds(),i=e.h*60+e.m,a=e=>td({h:Math.floor(e/60),m:e%60},t);if(i<n||i>r){let e=!!ed(this.getAttribute(`min`)),t=!!ed(this.getAttribute(`max`));return e&&t?`Enter a time between ${a(n)} and ${a(r)}.`:e?`Enter a time at or after ${a(n)}.`:`Enter a time at or before ${a(r)}.`}return`Enter a time in ${this._step()}-minute steps.`}render(){this._defaultValue===void 0&&(this._defaultValue=this.getAttribute(`value`)||``,this._value=this._defaultValue||this._value),this._isOpen=null;let e=this.getAttribute(`size`),t=e===`sm`?` input-sm`:e===`lg`?` input-lg`:``,n=this._uid;this.innerHTML=`
439
439
  <div class="timepicker">
440
440
  <div class="wui-timepicker-field">
441
441
  <input type="text" class="input timepicker-trigger${t}" id="${n}-input" role="combobox" aria-haspopup="dialog" aria-expanded="false" aria-controls="${n}-pop" aria-autocomplete="none" autocomplete="off" spellcheck="false">
442
- <button type="button" class="wui-timepicker-toggle" tabindex="-1" aria-label="Choose time" aria-haspopup="dialog" aria-expanded="false" aria-controls="${n}-pop">${R(`clock`)}</button>
442
+ <button type="button" class="wui-timepicker-toggle" tabindex="-1" aria-label="Choose time" aria-haspopup="dialog" aria-expanded="false" aria-controls="${n}-pop">${M(`clock`)}</button>
443
443
  </div>
444
444
  <div class="timepicker-pop" id="${n}-pop" role="dialog" aria-label="Choose time" hidden></div>
445
445
  <div class="field-error wui-timepicker-error" id="${n}-error" hidden></div>
446
- </div>`,this._rendered=!0,this._syncAttrs(),this._syncText(),this._syncInvalid(),I(this,this._value),this._wire()}_input(){return this.querySelector(`.timepicker-trigger`)}_pop(){return this.querySelector(`.timepicker-pop`)}_syncFormValue(){I(this,this._value)}_syncAttrs(){let e=this._input(),t=this.querySelector(`.wui-timepicker-toggle`);if(!e)return;let n=this.hasAttribute(`disabled`);e.disabled=n,t&&(t.disabled=n),e.placeholder=this.getAttribute(`placeholder`)||`Select time`,this.hasAttribute(`required`)?e.setAttribute(`aria-required`,`true`):e.removeAttribute(`aria-required`);let r=this.getAttribute(`aria-label`);r?e.setAttribute(`aria-label`,r):e.removeAttribute(`aria-label`),I(this,this._value),n&&this._isOpen?.()&&this._close({commit:!1})}_syncText(){let e=this._input();e&&(e.value=wu(Cu(this._value),this._format()),this._isOpen?.()&&this._syncColumns())}_syncInvalid(){let e=this._input(),t=this.querySelector(`.wui-timepicker-error`);if(!e||!t)return;let n=this._typedError;t.textContent=n,t.hidden=!n,this.hasAttribute(`aria-invalid`)||n?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`);let r=[this.getAttribute(`aria-describedby`),n?t.id:null].filter(Boolean).join(` `);r?e.setAttribute(`aria-describedby`,r):e.removeAttribute(`aria-describedby`),e.setCustomValidity?.(n)}_commitText(){let e=this._input();if(!e||e.value===wu(Cu(this._value),this._format()))return!0;let t=e.value.trim(),n=``;if(t){let e=Tu(t),r=e?this._refusal(e):`Enter a time like ${this._format()===`12`?`7:45 PM`:`19:45`}.`;if(r)return this._typedError=r,this._syncInvalid(),!1;n=Su(e.h,e.m)}let r=n!==this._value;return this.value=n,r&&this.dispatchEvent(new Event(`change`,{bubbles:!0})),!0}_pending(){let e=Tu(this._input()?.value);return e&&this._allowed(e.h,e.m)?e:null}_columnsHtml(){let e=this._format(),t=this._times(),n=(e,t,n)=>`<div class="wui-timepicker-col" role="listbox" aria-label="${t}" data-col="${e}">${n.map(e=>`<button type="button" class="timepicker-option" role="option" tabindex="-1" aria-selected="false" data-v="${e.v}">${e.text}</button>`).join(``)}</div>`,r=[...new Set(t.map(e=>e.h))],i=[...new Set(t.map(e=>e.m))].sort((e,t)=>e-t),a;if(e===`12`){let e=[...new Set(r.map(e=>e%12))].sort((e,t)=>e-t),t=[...new Set(r.map(e=>e>=12?`pm`:`am`))].sort();a=n(`hour`,`Hour`,e.map(e=>({v:e,text:String(e||12)})))+n(`minute`,`Minute`,i.map(e=>({v:e,text:xu(e)})))+n(`period`,`AM or PM`,t.map(e=>({v:e,text:e.toUpperCase()})))}else a=n(`hour`,`Hour`,r.map(e=>({v:e,text:xu(e)})))+n(`minute`,`Minute`,i.map(e=>({v:e,text:xu(e)})));return`<div class="wui-timepicker-cols">${a}</div>`}_selectedIn(e,t){return t?e===`minute`?String(t.m):e===`period`?t.h>=12?`pm`:`am`:String(this._format()===`12`?t.h%12:t.h):null}_optionEnabled(e,t,n){if(!n)return!0;let r=this._format()===`12`,i=n.h>=12,a=e=>r?[e+(i?12:0)]:[e],o=Array.from({length:60},(e,t)=>t);if(e===`hour`)return a(+t).some(e=>o.some(t=>this._allowed(e,t)));if(e===`minute`)return this._allowed(n.h,+t);let s=t===`pm`?12:0;return Array.from({length:12},(e,t)=>s+t).some(e=>o.some(t=>this._allowed(e,t)))}_syncColumns({scroll:e=!1}={}){let t=this._pop();if(!t)return;let n=this._pending();for(let r of t.querySelectorAll(`.wui-timepicker-col`)){let t=r.dataset.col,i=this._selectedIn(t,n),a=[...r.querySelectorAll(`.timepicker-option`)],o=null;for(let e of a){let r=e.dataset.v===i;e.classList.toggle(`is-selected`,r),e.setAttribute(`aria-selected`,r?`true`:`false`),e.disabled=!r&&!this._optionEnabled(t,e.dataset.v,n),r&&(o=e)}o=o||a.find(e=>!e.disabled)||null;for(let e of a)e.tabIndex=e===o?0:-1;e&&o&&(r.scrollTop=o.offsetTop-(r.clientHeight-o.offsetHeight)/2)}}_pick(e,t){let n=this._times();if(!n.length)return;let r=this._pending()||n[0],i=this._format()===`12`,a=r.h,o=r.m;if(e===`minute`?o=+t:a=e===`period`?a%12+(t===`pm`?12:0):i?+t+(r.h>=12?12:0):+t,!this._allowed(a,o)){let t=a*60+o,r=n.filter(t=>e===`minute`?t.m===o:e===`period`?t.h>=12==a>=12:i?t.h%12==a%12&&t.h>=12==a>=12:t.h===a).sort((e,n)=>Math.abs(e.h*60+e.m-t)-Math.abs(n.h*60+n.m-t))[0];if(!r)return;a=r.h,o=r.m}let s=this._input();s.value=wu({h:a,m:o},this._format()),this._typedError=``,this._syncInvalid(),this._syncColumns()}_position(){a(this.querySelector(`.wui-timepicker-field`),this._pop())}_onColumnKey(e){let t=e.target.closest?.(`.timepicker-option`),n=t?.closest(`.wui-timepicker-col`);if(!t||!n)return;let r=[...n.querySelectorAll(`.timepicker-option`)].filter(e=>!e.disabled),i=r.indexOf(t),a=[...this._pop().querySelectorAll(`.wui-timepicker-col`)],o=e=>{e&&(this._pick(n.dataset.col,e.dataset.v),(n.querySelector(`.timepicker-option.is-selected`)||e).focus())};switch(e.key){case`ArrowDown`:e.preventDefault(),o(r[Math.min(i+1,r.length-1)]);return;case`ArrowUp`:e.preventDefault(),o(r[Math.max(i-1,0)]);return;case`Home`:e.preventDefault(),o(r[0]);return;case`End`:e.preventDefault(),o(r[r.length-1]);return;case`PageDown`:e.preventDefault(),o(r[Math.min(i+8,r.length-1)]);return;case`PageUp`:e.preventDefault(),o(r[Math.max(i-8,0)]);return;case`ArrowRight`:case`ArrowLeft`:e.preventDefault(),a[a.indexOf(n)+(e.key===`ArrowRight`?1:-1)]?.querySelector(`.timepicker-option[tabindex="0"]`)?.focus();return;case`Enter`:e.preventDefault(),this._close({commit:!0,refocus:!0});return;case` `:e.preventDefault(),o(t);return;case`Escape`:e.preventDefault(),e.stopPropagation(),this._close({commit:!1,refocus:!0});return;default:e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&(e.preventDefault(),clearTimeout(this._typeaheadTimer),this._typeahead+=e.key.toLowerCase(),this._typeaheadTimer=setTimeout(()=>{this._typeahead=``,this._typeaheadTimer=null},500),o(r.find(e=>e.textContent.trim().toLowerCase().startsWith(this._typeahead))))}}_wire(){this._teardown();let e=this._input(),t=this.querySelector(`.wui-timepicker-toggle`),n=this._pop(),r=this.querySelector(`.timepicker`);if(!e||!n)return;let i=()=>!n.hidden;this._isOpen=i;let a=()=>{i()&&this._position()},c=()=>n.querySelector(`.wui-timepicker-col .timepicker-option[tabindex="0"]`)?.focus();this._open=({focus:s=!1}={})=>{this.hasAttribute(`disabled`)||(i()||(n.innerHTML=this._columnsHtml(),n.hidden=!1,r?.classList.add(`open`),e.setAttribute(`aria-expanded`,`true`),t?.setAttribute(`aria-expanded`,`true`),this._position(),o(this,a),this._syncColumns({scroll:!0})),s&&c())},this._close=({commit:a=!0,refocus:o=!1}={})=>{if(!i())return;let c=n.contains(document.activeElement);n.hidden=!0,n.innerHTML=``,r?.classList.remove(`open`),e.setAttribute(`aria-expanded`,`false`),t?.setAttribute(`aria-expanded`,`false`),s(this),clearTimeout(this._typeaheadTimer),this._typeaheadTimer=null,this._typeahead=``,a?this._commitText():(this._typedError=``,this._syncText(),this._syncInvalid()),(o||c)&&e.focus()},e.addEventListener(`pointerdown`,e=>{this._lastPointer=e.pointerType}),e.addEventListener(`click`,()=>{this._lastPointer!==`touch`&&!i()&&this._open(),this._lastPointer=null}),t?.addEventListener(`click`,()=>{i()?this._close({commit:!0,refocus:!0}):this._open({focus:!0})}),e.addEventListener(`keydown`,e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),this._open({focus:!0});else if(e.key===`Enter`){let t=i(),n=this._commitText();t&&n&&this._close({commit:!1}),(!n||t)&&e.preventDefault()}else e.key===`Escape`&&i()?(e.preventDefault(),e.stopPropagation(),this._close({commit:!1})):e.key===`Tab`&&i()&&this._close({commit:!0})}),e.addEventListener(`input`,e=>{e.stopPropagation(),this._typedError&&(this._typedError=``,this._syncInvalid()),i()&&this._syncColumns({scroll:!0})}),e.addEventListener(`change`,e=>{e.stopPropagation(),i()||this._commitText()}),n.addEventListener(`click`,e=>{this._popClick=!0;let t=e.target.closest(`.timepicker-option`),n=t?.closest(`.wui-timepicker-col`);t&&n&&!t.disabled&&this._pick(n.dataset.col,t.dataset.v)}),n.addEventListener(`keydown`,e=>{i()&&this._onColumnKey(e)}),this._bindGlobal=()=>{this._teardown(),this._onDocClick=e=>{let t=this._popClick;this._popClick=!1,i()&&!t&&!this.contains(e.target)&&this._close({commit:!0})},document.addEventListener(`click`,this._onDocClick),this._onDocKey=e=>{i()&&e.key===`Escape`&&this._close({commit:!1})},document.addEventListener(`keydown`,this._onDocKey),this._onHostKey=e=>{!i()||e.key!==`Escape`||(e.preventDefault(),e.stopPropagation(),this._close({commit:!1,refocus:!0}))},this.addEventListener(`keydown`,this._onHostKey),i()&&o(this,a)},this._bindGlobal()}_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),s(this),clearTimeout(this._typeaheadTimer),this._typeaheadTimer=null,this._typeahead=``}disconnectedCallback(){this._teardown()}},Ou=`data-advance`,ku=`wui-tour-hint`,Au=`Click {actionName} to continue.`,ju=`a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]`,Mu=(e,t)=>e?.advanceOn===`click`&&!!t,Nu=e=>(e??``).replace(/\s+/g,` `).trim();function Pu(e){let t=e.ownerDocument,n=(e.getAttribute(`aria-labelledby`)||``).split(/\s+/).filter(Boolean),r=e.tagName===`INPUT`&&/^(button|submit|reset)$/.test(e.type)?e.value:``,i=[n.map(e=>t.getElementById(e)?.textContent??``).join(` `),e.getAttribute(`aria-label`),Array.from(e.labels??[],e=>e.textContent).join(` `),e.getAttribute(`alt`),r,e.textContent,e.getAttribute(`title`)];for(let e of i){let t=Nu(e);if(t)return t}return``}function Fu(e){for(let t of[e,...e.querySelectorAll(ju)])if(t.tabIndex>=0&&!t.disabled)return t;return null}function Iu(e,t,n){let r=(e.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(e=>e&&e!==t);n&&r.push(t),r.length>0?e.setAttribute(`aria-describedby`,r.join(` `)):e.removeAttribute(`aria-describedby`)}function Lu(e,t){let n=e.querySelector(`.${ku}`),r=e.querySelector(`.wui-tour-text`)?.id,i=r?`${r.replace(/-text$/,``)}-hint`:``;if(!t){n?.remove(),i&&Iu(e,i,!1);return}n||(n=e.ownerDocument.createElement(`p`),n.className=ku,i&&(n.id=i),e.querySelector(`.wui-tour-actions`).before(n)),n.textContent=t,i&&Iu(e,i,!0)}var Ru=e=>getComputedStyle(e).animationName;function zu(e,{layer:t,spot:n,card:r},i,a){let o=Mu(i,a);t.toggleAttribute(Ou,o&&!(t.getRootNode()instanceof ShadowRoot)),n.hasAttribute(Ou)&&(n.removeAttribute(Ou),o&&Ru(n)),o&&n.setAttribute(Ou,``);let s=r.querySelector(`.wui-tour-next`);s.classList.toggle(`btn-primary`,!o),s.classList.toggle(`btn-link`,o);let c=o?Nu(i.actionLabel)||Pu(a):``,l=e.getAttribute(`advance-label`)||Au,u=c?l.replace(/\{actionName\}/g,()=>c):``;return Lu(r,u),u}function Bu(e,t,n){if(!Mu(e,t))return()=>{};let r=null,i=()=>{r??=setTimeout(n,0)};return t.addEventListener(`click`,i),()=>{t.removeEventListener(`click`,i),clearTimeout(r)}}function Vu(e,t,n,r){return e.contains(r)||Mu(t,n)&&n.contains(r)}function Hu(e,{card:t,active:n,step:r,target:i}){let a=Array.from(t.querySelectorAll(`button`)).filter(e=>!e.hidden),o=Mu(r,i)?Fu(i):null;o&&a.push(o);let s=a.findIndex(e=>e===n||e===o&&i.contains(n));e.preventDefault(),a[s===-1?e.shiftKey?a.length-1:0:(s+(e.shiftKey?-1:1)+a.length)%a.length].focus()}var Uu=2/3,Wu=1e3,Gu=new Set([`top`,`left`,`width`,`height`]),Ku=new WeakMap,qu=(e,t)=>typeof e.getAnimations==`function`?e.getAnimations().filter(t):[],Ju=e=>e.transitionProperty===`opacity`,Yu=e=>Gu.has(e.transitionProperty),Xu=e=>typeof e.animationName==`string`&&e.animationName.startsWith(`wui-tour-`);function Zu(e){return e.length===0?null:new Promise(t=>{let n=setTimeout(t,Wu);Promise.allSettled(e.map(e=>e.finished)).then(()=>{clearTimeout(n),t()})})}function Qu(e){let t=e.parentElement?.querySelector(`:scope > .wui-tour-spot`),n=0;for(let e of t?qu(t,Yu):[]){let t=e.effect?.getComputedTiming?.();if(typeof t?.duration!=`number`)continue;let r=typeof e.currentTime==`number`?e.currentTime:0;n=Math.max(n,(t.delay??0)+t.duration*Uu-r)}return n}function $u(e){let t=Qu(e);t>0?e.style.setProperty(`--wui-tour-card-delay`,`${Math.round(t)}ms`):e.style.removeProperty(`--wui-tour-card-delay`),e.dataset.state=`entering`;let n={};Ku.set(e,n);let r=()=>{Ku.get(e)===n&&e.dataset.state===`entering`&&(e.dataset.state=`shown`)},i=qu(e,Xu);i.length===0?r():Promise.allSettled(i.map(e=>e.finished)).then(r)}function ed(e){return e.dataset.state=`leaving`,Zu(qu(e,Ju))}function td(e){let t=e.classList.contains(`wui-tour-layer`)?e:e.shadowRoot?.querySelector(`.wui-tour-layer`);t&&(t.dataset.state=`leaving`);let n=t?Zu(qu(t,Ju)):null;if(!n){e.remove();return}e.setAttribute(`inert`,``),n.then(()=>e.remove())}var nd=2,Z=12,rd=8,id=4,ad=20,od=`(max-width: 575.98px)`,sd=[`bottom`,`top`,`right`,`left`],cd=[`top-left`,`top-right`,`bottom-right`,`bottom-left`],ld,ud=(e,t,n)=>Math.max(t,Math.min(e,n)),dd=(e,t,n,r)=>(Math.max(e,n)+Math.min(t,r))/2;function fd(e,t){if(!t?.scrollIntoView)return;e.style.maxHeight=``;let n=vd(e),r=e.offsetHeight+Z;if(t.getBoundingClientRect().height+nd*2+r*2<=n.bottom-n.top){t.scrollIntoView({block:`center`,inline:`nearest`});return}let i=t.style.scrollMarginTop;t.style.scrollMarginTop=`${n.top+r+nd}px`,t.scrollIntoView({block:`start`,inline:`nearest`}),t.style.scrollMarginTop=i}function pd(e,t,n){let r=e.style,i=t.style,a=yd(t);if(!n){r.top=`50%`,r.left=`50%`,r.width=`0px`,r.height=`0px`,r.boxShadow=`0 0 0 100vmax var(--color-scrim-strong)`;for(let e of cd)r.removeProperty(`border-${e}-radius`),r.removeProperty(`corner-${e}-shape`);t.dataset.placement=`center`,a.hidden=!0,i.position=`fixed`,i.top=`50%`,i.left=`50%`,i.transform=`translate(-50%, -50%)`,i.maxHeight=`calc(100vh - 16px)`;return}r.boxShadow=``,i.transform=``,i.position=`fixed`;let o=n.getBoundingClientRect();r.top=`${o.top}px`,r.left=`${o.left}px`,r.width=`${o.width}px`,r.height=`${o.height}px`,md(r,n);let s=t.scrollTop;i.maxHeight=``;let c={width:t.offsetWidth,height:t.offsetHeight},l=vd(t),u=l.bottom-l.top,d={bottom:l.bottom-o.bottom-Z,top:o.top-Z-l.top,right:l.right-o.right-Z,left:o.left-Z-l.left},f=window.matchMedia(od).matches,p=sd.find(e=>e===`top`||e===`bottom`?c.height<=d[e]+1:!f&&c.width<=d[e]+1&&c.height<=u+1),m=Math.min(o.bottom,l.bottom+rd)-Math.max(o.top,l.top-rd);p?hd(t,a,p,o,l,c):m>=Math.min(c.height,u)+id*2?gd(t,a,o,l,c):_d(t,a,d.bottom>=d.top?`bottom`:`top`,o,l,c,d),t.scrollTop=s}function md(e,t){ld??=CSS.supports(`corner-top-left-shape`,`squircle`);let n=getComputedStyle(t);for(let t of cd)e.setProperty(`border-${t}-radius`,n.getPropertyValue(`border-${t}-radius`)),ld&&e.setProperty(`corner-${t}-shape`,n.getPropertyValue(`corner-${t}-shape`))}function hd(e,t,n,r,i,a){let o=n===`top`||n===`bottom`,s,c,l;if(o){let e=dd(r.left,r.right,i.left,i.right);s=ud(e-a.width/2,i.left,i.right-a.width),c=n===`bottom`?r.bottom+Z:r.top-Z-a.height,l=ud(e-s,ad,a.width-ad)}else{let e=dd(r.top,r.bottom,i.top,i.bottom);c=ud(e-a.height/2,i.top,i.bottom-a.height),s=n===`right`?r.right+Z:r.left-Z-a.width,l=ud(e-c,ad,a.height-ad)}e.dataset.placement=n,e.style.top=`${c}px`,e.style.left=`${s}px`,t.hidden=!1,t.style.left=o?`${l-e.clientLeft-t.offsetWidth/2}px`:``,t.style.top=o?``:`${l-e.clientTop-t.offsetHeight/2}px`}function gd(e,t,n,r,i){let a=r.bottom-r.top;e.dataset.placement=`overlap`,t.hidden=!0,e.style.maxHeight=i.height>a?`${Math.max(a,0)}px`:``;let o=Math.min(n.bottom,r.bottom)-id;e.style.top=`${Math.max(r.top,o-Math.min(i.height,a))}px`,e.style.left=`${ud(n.left+id,r.left,r.right-i.width)}px`}function _d(e,t,n,r,i,a,o){let s=Math.max(o[n],0),c=Math.min(a.height,s);e.dataset.placement=n,t.hidden=!0,e.style.maxHeight=a.height>s?`${s}px`:``,e.style.top=`${n===`bottom`?r.bottom+Z:r.top-Z-c}px`;let l=dd(r.left,r.right,i.left,i.right);e.style.left=`${ud(l-a.width/2,i.left,i.right-a.width)}px`}function vd(e){let t=e.parentElement,n=t?getComputedStyle(t):null,r=e=>Number.parseFloat(n?.[e])||0;return{top:r(`paddingTop`)+rd,bottom:window.innerHeight-r(`paddingBottom`)-rd,left:r(`paddingLeft`)+rd,right:window.innerWidth-r(`paddingRight`)-rd}}function yd(e){let t=e.querySelector(`:scope > .wui-tour-arrow`);return t||(t=document.createElement(`span`),t.className=`wui-tour-arrow`,t.setAttribute(`aria-hidden`,`true`),t.hidden=!0,e.append(t)),t}var bd=0;function xd(e,t,n){let r=`wui-tour-end-${++bd}`,i=e.createElement(`div`);return i.className=`wui-tour-card wui-tour-end`,i.dataset.layout=`center`,i.setAttribute(`role`,`dialog`),n&&i.setAttribute(`aria-modal`,`true`),i.tabIndex=-1,i.setAttribute(`aria-labelledby`,`${r}-title`),i.setAttribute(`aria-describedby`,`${r}-message`),i.innerHTML=`
446
+ </div>`,this._rendered=!0,this._syncAttrs(),this._syncText(),this._syncInvalid(),B(this,this._value),this._wire()}_input(){return this.querySelector(`.timepicker-trigger`)}_pop(){return this.querySelector(`.timepicker-pop`)}_syncFormValue(){B(this,this._value)}_syncAttrs(){let e=this._input(),t=this.querySelector(`.wui-timepicker-toggle`);if(!e)return;let n=this.hasAttribute(`disabled`);e.disabled=n,t&&(t.disabled=n),e.placeholder=this.getAttribute(`placeholder`)||`Select time`,this.hasAttribute(`required`)?e.setAttribute(`aria-required`,`true`):e.removeAttribute(`aria-required`);let r=this.getAttribute(`aria-label`);r?e.setAttribute(`aria-label`,r):e.removeAttribute(`aria-label`),B(this,this._value),n&&this._isOpen?.()&&this._close({commit:!1})}_syncText(){let e=this._input();e&&(e.value=td(ed(this._value),this._format()),this._isOpen?.()&&this._syncColumns())}_syncInvalid(){let e=this._input(),t=this.querySelector(`.wui-timepicker-error`);if(!e||!t)return;let n=this._typedError;t.textContent=n,t.hidden=!n,this.hasAttribute(`aria-invalid`)||n?e.setAttribute(`aria-invalid`,`true`):e.removeAttribute(`aria-invalid`);let r=[this.getAttribute(`aria-describedby`),n?t.id:null].filter(Boolean).join(` `);r?e.setAttribute(`aria-describedby`,r):e.removeAttribute(`aria-describedby`),e.setCustomValidity?.(n)}_commitText(){let e=this._input();if(!e||e.value===td(ed(this._value),this._format()))return!0;let t=e.value.trim(),n=``;if(t){let e=nd(t),r=e?this._refusal(e):`Enter a time like ${this._format()===`12`?`7:45 PM`:`19:45`}.`;if(r)return this._typedError=r,this._syncInvalid(),!1;n=$u(e.h,e.m)}let r=n!==this._value;return this.value=n,r&&this.dispatchEvent(new Event(`change`,{bubbles:!0})),!0}_pending(){let e=nd(this._input()?.value);return e&&this._allowed(e.h,e.m)?e:null}_columnsHtml(){let e=this._format(),t=this._times(),n=(e,t,n)=>`<div class="wui-timepicker-col" role="listbox" aria-label="${t}" data-col="${e}">${n.map(e=>`<button type="button" class="timepicker-option" role="option" tabindex="-1" aria-selected="false" data-v="${e.v}">${e.text}</button>`).join(``)}</div>`,r=[...new Set(t.map(e=>e.h))],i=[...new Set(t.map(e=>e.m))].sort((e,t)=>e-t),a;if(e===`12`){let e=[...new Set(r.map(e=>e%12))].sort((e,t)=>e-t),t=[...new Set(r.map(e=>e>=12?`pm`:`am`))].sort();a=n(`hour`,`Hour`,e.map(e=>({v:e,text:String(e||12)})))+n(`minute`,`Minute`,i.map(e=>({v:e,text:Qu(e)})))+n(`period`,`AM or PM`,t.map(e=>({v:e,text:e.toUpperCase()})))}else a=n(`hour`,`Hour`,r.map(e=>({v:e,text:Qu(e)})))+n(`minute`,`Minute`,i.map(e=>({v:e,text:Qu(e)})));return`<div class="wui-timepicker-cols">${a}</div>`}_selectedIn(e,t){return t?e===`minute`?String(t.m):e===`period`?t.h>=12?`pm`:`am`:String(this._format()===`12`?t.h%12:t.h):null}_optionEnabled(e,t,n){if(!n)return!0;let r=this._format()===`12`,i=n.h>=12,a=e=>r?[e+(i?12:0)]:[e],o=Array.from({length:60},(e,t)=>t);if(e===`hour`)return a(+t).some(e=>o.some(t=>this._allowed(e,t)));if(e===`minute`)return this._allowed(n.h,+t);let s=t===`pm`?12:0;return Array.from({length:12},(e,t)=>s+t).some(e=>o.some(t=>this._allowed(e,t)))}_syncColumns({scroll:e=!1}={}){let t=this._pop();if(!t)return;let n=this._pending();for(let r of t.querySelectorAll(`.wui-timepicker-col`)){let t=r.dataset.col,i=this._selectedIn(t,n),a=[...r.querySelectorAll(`.timepicker-option`)],o=null;for(let e of a){let r=e.dataset.v===i;e.classList.toggle(`is-selected`,r),e.setAttribute(`aria-selected`,r?`true`:`false`),e.disabled=!r&&!this._optionEnabled(t,e.dataset.v,n),r&&(o=e)}o=o||a.find(e=>!e.disabled)||null;for(let e of a)e.tabIndex=e===o?0:-1;e&&o&&(r.scrollTop=o.offsetTop-(r.clientHeight-o.offsetHeight)/2)}}_pick(e,t){let n=this._times();if(!n.length)return;let r=this._pending()||n[0],i=this._format()===`12`,a=r.h,o=r.m;if(e===`minute`?o=+t:a=e===`period`?a%12+(t===`pm`?12:0):i?+t+(r.h>=12?12:0):+t,!this._allowed(a,o)){let t=a*60+o,r=n.filter(t=>e===`minute`?t.m===o:e===`period`?t.h>=12==a>=12:i?t.h%12==a%12&&t.h>=12==a>=12:t.h===a).sort((e,n)=>Math.abs(e.h*60+e.m-t)-Math.abs(n.h*60+n.m-t))[0];if(!r)return;a=r.h,o=r.m}let s=this._input();s.value=td({h:a,m:o},this._format()),this._typedError=``,this._syncInvalid(),this._syncColumns()}_position(){a(this.querySelector(`.wui-timepicker-field`),this._pop())}_onColumnKey(e){let t=e.target.closest?.(`.timepicker-option`),n=t?.closest(`.wui-timepicker-col`);if(!t||!n)return;let r=[...n.querySelectorAll(`.timepicker-option`)].filter(e=>!e.disabled),i=r.indexOf(t),a=[...this._pop().querySelectorAll(`.wui-timepicker-col`)],o=e=>{e&&(this._pick(n.dataset.col,e.dataset.v),(n.querySelector(`.timepicker-option.is-selected`)||e).focus())};switch(e.key){case`ArrowDown`:e.preventDefault(),o(r[Math.min(i+1,r.length-1)]);return;case`ArrowUp`:e.preventDefault(),o(r[Math.max(i-1,0)]);return;case`Home`:e.preventDefault(),o(r[0]);return;case`End`:e.preventDefault(),o(r[r.length-1]);return;case`PageDown`:e.preventDefault(),o(r[Math.min(i+8,r.length-1)]);return;case`PageUp`:e.preventDefault(),o(r[Math.max(i-8,0)]);return;case`ArrowRight`:case`ArrowLeft`:e.preventDefault(),a[a.indexOf(n)+(e.key===`ArrowRight`?1:-1)]?.querySelector(`.timepicker-option[tabindex="0"]`)?.focus();return;case`Enter`:e.preventDefault(),this._close({commit:!0,refocus:!0});return;case` `:e.preventDefault(),o(t);return;case`Escape`:e.preventDefault(),e.stopPropagation(),this._close({commit:!1,refocus:!0});return;default:e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&(e.preventDefault(),clearTimeout(this._typeaheadTimer),this._typeahead+=e.key.toLowerCase(),this._typeaheadTimer=setTimeout(()=>{this._typeahead=``,this._typeaheadTimer=null},500),o(r.find(e=>e.textContent.trim().toLowerCase().startsWith(this._typeahead))))}}_wire(){this._teardown();let e=this._input(),t=this.querySelector(`.wui-timepicker-toggle`),n=this._pop(),r=this.querySelector(`.timepicker`);if(!e||!n)return;let i=()=>!n.hidden;this._isOpen=i;let a=()=>{i()&&this._position()},c=()=>n.querySelector(`.wui-timepicker-col .timepicker-option[tabindex="0"]`)?.focus();this._open=({focus:s=!1}={})=>{this.hasAttribute(`disabled`)||(i()||(n.innerHTML=this._columnsHtml(),n.hidden=!1,r?.classList.add(`open`),e.setAttribute(`aria-expanded`,`true`),t?.setAttribute(`aria-expanded`,`true`),this._position(),o(this,a),this._syncColumns({scroll:!0})),s&&c())},this._close=({commit:a=!0,refocus:o=!1}={})=>{if(!i())return;let c=n.contains(document.activeElement);n.hidden=!0,n.innerHTML=``,r?.classList.remove(`open`),e.setAttribute(`aria-expanded`,`false`),t?.setAttribute(`aria-expanded`,`false`),s(this),clearTimeout(this._typeaheadTimer),this._typeaheadTimer=null,this._typeahead=``,a?this._commitText():(this._typedError=``,this._syncText(),this._syncInvalid()),(o||c)&&e.focus()},e.addEventListener(`pointerdown`,e=>{this._lastPointer=e.pointerType}),e.addEventListener(`click`,()=>{this._lastPointer!==`touch`&&!i()&&this._open(),this._lastPointer=null}),t?.addEventListener(`click`,()=>{i()?this._close({commit:!0,refocus:!0}):this._open({focus:!0})}),e.addEventListener(`keydown`,e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),this._open({focus:!0});else if(e.key===`Enter`){let t=i(),n=this._commitText();t&&n&&this._close({commit:!1}),(!n||t)&&e.preventDefault()}else e.key===`Escape`&&i()?(e.preventDefault(),e.stopPropagation(),this._close({commit:!1})):e.key===`Tab`&&i()&&this._close({commit:!0})}),e.addEventListener(`input`,e=>{e.stopPropagation(),this._typedError&&(this._typedError=``,this._syncInvalid()),i()&&this._syncColumns({scroll:!0})}),e.addEventListener(`change`,e=>{e.stopPropagation(),i()||this._commitText()}),n.addEventListener(`click`,e=>{this._popClick=!0;let t=e.target.closest(`.timepicker-option`),n=t?.closest(`.wui-timepicker-col`);t&&n&&!t.disabled&&this._pick(n.dataset.col,t.dataset.v)}),n.addEventListener(`keydown`,e=>{i()&&this._onColumnKey(e)}),this._bindGlobal=()=>{this._teardown(),this._onDocClick=e=>{let t=this._popClick;this._popClick=!1,i()&&!t&&!this.contains(e.target)&&this._close({commit:!0})},document.addEventListener(`click`,this._onDocClick),this._onDocKey=e=>{i()&&e.key===`Escape`&&this._close({commit:!1})},document.addEventListener(`keydown`,this._onDocKey),this._onHostKey=e=>{!i()||e.key!==`Escape`||(e.preventDefault(),e.stopPropagation(),this._close({commit:!1,refocus:!0}))},this.addEventListener(`keydown`,this._onHostKey),i()&&o(this,a)},this._bindGlobal()}_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),s(this),clearTimeout(this._typeaheadTimer),this._typeaheadTimer=null,this._typeahead=``}disconnectedCallback(){this._teardown()}},ad=`data-advance`,od=`wui-tour-hint`,sd=`Click {actionName} to continue.`,cd=`a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]`,ld=(e,t)=>e?.advanceOn===`click`&&!!t,ud=e=>(e??``).replace(/\s+/g,` `).trim();function dd(e){let t=e.ownerDocument,n=(e.getAttribute(`aria-labelledby`)||``).split(/\s+/).filter(Boolean),r=e.tagName===`INPUT`&&/^(button|submit|reset)$/.test(e.type)?e.value:``,i=[n.map(e=>t.getElementById(e)?.textContent??``).join(` `),e.getAttribute(`aria-label`),Array.from(e.labels??[],e=>e.textContent).join(` `),e.getAttribute(`alt`),r,e.textContent,e.getAttribute(`title`)];for(let e of i){let t=ud(e);if(t)return t}return``}function fd(e){for(let t of[e,...e.querySelectorAll(cd)])if(t.tabIndex>=0&&!t.disabled)return t;return null}function pd(e,t,n){let r=(e.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(e=>e&&e!==t);n&&r.push(t),r.length>0?e.setAttribute(`aria-describedby`,r.join(` `)):e.removeAttribute(`aria-describedby`)}function md(e,t){let n=e.querySelector(`.${od}`),r=e.querySelector(`.wui-tour-text`)?.id,i=r?`${r.replace(/-text$/,``)}-hint`:``;if(!t){n?.remove(),i&&pd(e,i,!1);return}n||(n=e.ownerDocument.createElement(`p`),n.className=od,i&&(n.id=i),e.querySelector(`.wui-tour-actions`).before(n)),n.textContent=t,i&&pd(e,i,!0)}var hd=e=>getComputedStyle(e).animationName;function gd(e,{layer:t,spot:n,card:r},i,a){let o=ld(i,a);t.toggleAttribute(ad,o&&!(t.getRootNode()instanceof ShadowRoot)),n.hasAttribute(ad)&&(n.removeAttribute(ad),o&&hd(n)),o&&n.setAttribute(ad,``);let s=r.querySelector(`.wui-tour-next`);s.classList.toggle(`btn-primary`,!o),s.classList.toggle(`btn-link`,o);let c=o?ud(i.actionLabel)||dd(a):``,l=e.getAttribute(`advance-label`)||sd,u=c?l.replace(/\{actionName\}/g,()=>c):``;return md(r,u),u}function _d(e,t,n){if(!ld(e,t))return()=>{};let r=null,i=()=>{r??=setTimeout(n,0)};return t.addEventListener(`click`,i),()=>{t.removeEventListener(`click`,i),clearTimeout(r)}}function vd(e,t,n,r){return e.contains(r)||ld(t,n)&&n.contains(r)}function yd(e,{card:t,active:n,step:r,target:i}){let a=Array.from(t.querySelectorAll(`button`)).filter(e=>!e.hidden),o=ld(r,i)?fd(i):null;o&&a.push(o);let s=a.findIndex(e=>e===n||e===o&&i.contains(n));e.preventDefault(),a[s===-1?e.shiftKey?a.length-1:0:(s+(e.shiftKey?-1:1)+a.length)%a.length].focus()}var bd=2/3,xd=1e3,Sd=new Set([`top`,`left`,`width`,`height`]),Cd=new WeakMap,wd=(e,t)=>typeof e.getAnimations==`function`?e.getAnimations().filter(t):[],Td=e=>e.transitionProperty===`opacity`,Ed=e=>Sd.has(e.transitionProperty),Dd=e=>typeof e.animationName==`string`&&e.animationName.startsWith(`wui-tour-`);function Od(e){return e.length===0?null:new Promise(t=>{let n=setTimeout(t,xd);Promise.allSettled(e.map(e=>e.finished)).then(()=>{clearTimeout(n),t()})})}function kd(e){let t=e.parentElement?.querySelector(`:scope > .wui-tour-spot`),n=0;for(let e of t?wd(t,Ed):[]){let t=e.effect?.getComputedTiming?.();if(typeof t?.duration!=`number`)continue;let r=typeof e.currentTime==`number`?e.currentTime:0;n=Math.max(n,(t.delay??0)+t.duration*bd-r)}return n}function Ad(e){let t=kd(e);t>0?e.style.setProperty(`--wui-tour-card-delay`,`${Math.round(t)}ms`):e.style.removeProperty(`--wui-tour-card-delay`),e.dataset.state=`entering`;let n={};Cd.set(e,n);let r=()=>{Cd.get(e)===n&&e.dataset.state===`entering`&&(e.dataset.state=`shown`)},i=wd(e,Dd);i.length===0?r():Promise.allSettled(i.map(e=>e.finished)).then(r)}function jd(e){return e.dataset.state=`leaving`,Od(wd(e,Td))}function Md(e){let t=e.classList.contains(`wui-tour-layer`)?e:e.shadowRoot?.querySelector(`.wui-tour-layer`);t&&(t.dataset.state=`leaving`);let n=t?Od(wd(t,Td)):null;if(!n){e.remove();return}e.setAttribute(`inert`,``),n.then(()=>e.remove())}var Nd=2,Q=12,Pd=8,Fd=4,Id=20,Ld=`(max-width: 575.98px)`,Rd=[`bottom`,`top`,`right`,`left`],zd=[`top-left`,`top-right`,`bottom-right`,`bottom-left`],Bd,Vd=(e,t,n)=>Math.max(t,Math.min(e,n)),Hd=(e,t,n,r)=>(Math.max(e,n)+Math.min(t,r))/2;function Ud(e,t){if(!t?.scrollIntoView)return;e.style.maxHeight=``;let n=Yd(e),r=e.offsetHeight+Q;if(t.getBoundingClientRect().height+Nd*2+r*2<=n.bottom-n.top){t.scrollIntoView({block:`center`,inline:`nearest`});return}let i=t.style.scrollMarginTop;t.style.scrollMarginTop=`${n.top+r+Nd}px`,t.scrollIntoView({block:`start`,inline:`nearest`}),t.style.scrollMarginTop=i}function Wd(e,t,n){let r=e.style,i=t.style,a=Xd(t);if(!n){r.top=`50%`,r.left=`50%`,r.width=`0px`,r.height=`0px`,r.boxShadow=`0 0 0 100vmax var(--color-scrim-strong)`;for(let e of zd)r.removeProperty(`border-${e}-radius`),r.removeProperty(`corner-${e}-shape`);t.dataset.placement=`center`,a.hidden=!0,i.position=`fixed`,i.top=`50%`,i.left=`50%`,i.transform=`translate(-50%, -50%)`,i.maxHeight=`calc(100vh - 16px)`;return}r.boxShadow=``,i.transform=``,i.position=`fixed`;let o=n.getBoundingClientRect();r.top=`${o.top}px`,r.left=`${o.left}px`,r.width=`${o.width}px`,r.height=`${o.height}px`,Gd(r,n);let s=t.scrollTop;i.maxHeight=``;let c={width:t.offsetWidth,height:t.offsetHeight},l=Yd(t),u=l.bottom-l.top,d={bottom:l.bottom-o.bottom-Q,top:o.top-Q-l.top,right:l.right-o.right-Q,left:o.left-Q-l.left},f=window.matchMedia(Ld).matches,p=Rd.find(e=>e===`top`||e===`bottom`?c.height<=d[e]+1:!f&&c.width<=d[e]+1&&c.height<=u+1),m=Math.min(o.bottom,l.bottom+Pd)-Math.max(o.top,l.top-Pd);p?Kd(t,a,p,o,l,c):m>=Math.min(c.height,u)+Fd*2?qd(t,a,o,l,c):Jd(t,a,d.bottom>=d.top?`bottom`:`top`,o,l,c,d),t.scrollTop=s}function Gd(e,t){Bd??=CSS.supports(`corner-top-left-shape`,`squircle`);let n=getComputedStyle(t);for(let t of zd)e.setProperty(`border-${t}-radius`,n.getPropertyValue(`border-${t}-radius`)),Bd&&e.setProperty(`corner-${t}-shape`,n.getPropertyValue(`corner-${t}-shape`))}function Kd(e,t,n,r,i,a){let o=n===`top`||n===`bottom`,s,c,l;if(o){let e=Hd(r.left,r.right,i.left,i.right);s=Vd(e-a.width/2,i.left,i.right-a.width),c=n===`bottom`?r.bottom+Q:r.top-Q-a.height,l=Vd(e-s,Id,a.width-Id)}else{let e=Hd(r.top,r.bottom,i.top,i.bottom);c=Vd(e-a.height/2,i.top,i.bottom-a.height),s=n===`right`?r.right+Q:r.left-Q-a.width,l=Vd(e-c,Id,a.height-Id)}e.dataset.placement=n,e.style.top=`${c}px`,e.style.left=`${s}px`,t.hidden=!1,t.style.left=o?`${l-e.clientLeft-t.offsetWidth/2}px`:``,t.style.top=o?``:`${l-e.clientTop-t.offsetHeight/2}px`}function qd(e,t,n,r,i){let a=r.bottom-r.top;e.dataset.placement=`overlap`,t.hidden=!0,e.style.maxHeight=i.height>a?`${Math.max(a,0)}px`:``;let o=Math.min(n.bottom,r.bottom)-Fd;e.style.top=`${Math.max(r.top,o-Math.min(i.height,a))}px`,e.style.left=`${Vd(n.left+Fd,r.left,r.right-i.width)}px`}function Jd(e,t,n,r,i,a,o){let s=Math.max(o[n],0),c=Math.min(a.height,s);e.dataset.placement=n,t.hidden=!0,e.style.maxHeight=a.height>s?`${s}px`:``,e.style.top=`${n===`bottom`?r.bottom+Q:r.top-Q-c}px`;let l=Hd(r.left,r.right,i.left,i.right);e.style.left=`${Vd(l-a.width/2,i.left,i.right-a.width)}px`}function Yd(e){let t=e.parentElement,n=t?getComputedStyle(t):null,r=e=>Number.parseFloat(n?.[e])||0;return{top:r(`paddingTop`)+Pd,bottom:window.innerHeight-r(`paddingBottom`)-Pd,left:r(`paddingLeft`)+Pd,right:window.innerWidth-r(`paddingRight`)-Pd}}function Xd(e){let t=e.querySelector(`:scope > .wui-tour-arrow`);return t||(t=document.createElement(`span`),t.className=`wui-tour-arrow`,t.setAttribute(`aria-hidden`,`true`),t.hidden=!0,e.append(t)),t}var Zd=0;function Qd(e,t,n){let r=`wui-tour-end-${++Zd}`,i=e.createElement(`div`);return i.className=`wui-tour-card wui-tour-end`,i.dataset.layout=`center`,i.setAttribute(`role`,`dialog`),n&&i.setAttribute(`aria-modal`,`true`),i.tabIndex=-1,i.setAttribute(`aria-labelledby`,`${r}-title`),i.setAttribute(`aria-describedby`,`${r}-message`),i.innerHTML=`
447
447
  <div class="wui-tour-end-mark" aria-hidden="true"><svg viewBox="0 0 24 24" focusable="false"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></div>
448
448
  <h2 class="wui-tour-title wui-tour-end-title" id="${r}-title"></h2>
449
449
  <p class="wui-tour-text wui-tour-end-message" id="${r}-message"></p>
450
- <div class="wui-tour-actions"><button type="button" class="btn btn-sm btn-primary wui-tour-end-button"></button></div>`,i.querySelector(`.wui-tour-end-title`).textContent=t.title,i.querySelector(`.wui-tour-end-message`).textContent=t.message,i.querySelector(`.wui-tour-end-button`).textContent=t.button,i}function Sd(e,t,n){let r=e.ownerDocument,i=e.getRootNode()===r,a=e.querySelector(`.wui-tour-card:not(.wui-tour-end)`),o=e.querySelector(`.wui-tour-spot`),s=e.querySelector(`[role=status]`),c=xd(r,t,i),l=c.querySelector(`.wui-tour-end-button`),u=new AbortController;return new Promise(d=>{let f=()=>{u.abort(),d()};if(n?.aborted){f();return}let p={signal:u.signal};n?.addEventListener(`abort`,f,p),l.addEventListener(`click`,f,p),r.addEventListener(`keydown`,e=>{e.altKey||e.ctrlKey||e.metaKey||(e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),f()):e.key===`Tab`&&i&&(e.preventDefault(),l.focus()))},{capture:!0,signal:u.signal}),i&&r.addEventListener(`focusin`,e=>{c.contains(e.target)||l.focus()},p);let m=()=>{u.signal.aborted||(a.hidden=!0,pd(o,a,null),e.append(c),$u(c),s.textContent=[t.title,t.message].filter(Boolean).join(`. `),l.focus())},h=ed(a);h?h.then(m):m()})}var Cd=`
450
+ <div class="wui-tour-actions"><button type="button" class="btn btn-sm btn-primary wui-tour-end-button"></button></div>`,i.querySelector(`.wui-tour-end-title`).textContent=t.title,i.querySelector(`.wui-tour-end-message`).textContent=t.message,i.querySelector(`.wui-tour-end-button`).textContent=t.button,i}function $d(e,t,n){let r=e.ownerDocument,i=e.getRootNode()===r,a=e.querySelector(`.wui-tour-card:not(.wui-tour-end)`),o=e.querySelector(`.wui-tour-spot`),s=e.querySelector(`[role=status]`),c=Qd(r,t,i),l=c.querySelector(`.wui-tour-end-button`),u=new AbortController;return new Promise(d=>{let f=()=>{u.abort(),d()};if(n?.aborted){f();return}let p={signal:u.signal};n?.addEventListener(`abort`,f,p),l.addEventListener(`click`,f,p),r.addEventListener(`keydown`,e=>{e.altKey||e.ctrlKey||e.metaKey||(e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),f()):e.key===`Tab`&&i&&(e.preventDefault(),l.focus()))},{capture:!0,signal:u.signal}),i&&r.addEventListener(`focusin`,e=>{c.contains(e.target)||l.focus()},p);let m=()=>{u.signal.aborted||(a.hidden=!0,Wd(o,a,null),e.append(c),Ad(c),s.textContent=[t.title,t.message].filter(Boolean).join(`. `),l.focus())},h=jd(a);h?h.then(m):m()})}var ef=`
451
451
  :host {
452
452
  all: initial;
453
453
  ${Object.entries({"--wui-z-tour":`1550`,"--wui-radius-sm":`8px`,"--wui-radius-lg":`14px`,"--wui-shadow-overlay":`0 8px 28px -6px rgba(7, 20, 55, 0.14)`,"--wui-ease-out-quart":`cubic-bezier(0.22, 1, 0.36, 1)`,"--wui-tour-motion-duration":`200ms`,"--wui-tour-motion-ease":`cubic-bezier(0.22, 1, 0.36, 1)`,"--wui-tour-spot-duration":`240ms`,"--wui-tour-spot-ease":`cubic-bezier(0.32, 0.72, 0, 1)`,"--color-primary":`#4F46E5`,"--color-primary-hover":`#4338CA`,"--color-primary-ink":`#4F46E5`,"--color-focus-ring":`#4F46E5`,"--wui-focus-ring-width":`2px`,"--wui-focus-ring-offset":`2px`,"--color-primary-text":`#FFFFFF`,"--color-success-soft":`#E8FAEE`,"--color-success-text":`#0e7531`,"--color-on-scrim":`#FFFFFF`,"--color-scrim-strong":`color-mix(in srgb, #071437 62%, transparent)`,"--color-surface":`#FFFFFF`,"--color-text":`#071437`,"--color-text-muted":`#4B5675`,"--color-border":`#EBEDF3`,"--color-bg-muted":`#F5F6FA`}).map(([e,t])=>` ${e}: ${t};`).join(`
@@ -916,7 +916,7 @@ ${Object.entries({"--wui-z-tour":`1550`,"--wui-radius-sm":`8px`,"--wui-radius-lg
916
916
  }
917
917
  }
918
918
 
919
- `,wd=`wui-tour-media`,Td=`wui-tour-media-toggle`,Ed=`http://www.w3.org/2000/svg`,Dd=`M6 5h4v14H6zM14 5h4v14h-4z`,Od=`M8 5v14l11-7z`,kd={pause:`Pause animation`,play:`Play animation`},Ad=()=>globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches===!0;function jd(e){let t=document.createElementNS(Ed,`svg`);t.setAttribute(`viewBox`,`0 0 24 24`),t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`focusable`,`false`);let n=document.createElementNS(Ed,`path`);return n.setAttribute(`d`,e),t.appendChild(n),t}function Md(e){let t=document.createElement(`img`);return t.setAttribute(`alt`,e.mediaAlt??``),t.setAttribute(`width`,`1280`),t.setAttribute(`height`,`720`),t.setAttribute(`loading`,`lazy`),t.setAttribute(`decoding`,`async`),t.setAttribute(`src`,e.media),t}function Nd(e,t){let n=document.createElement(`video`);return n.muted=!0,n.setAttribute(`muted`,``),n.loop=!0,n.setAttribute(`playsinline`,``),t&&n.setAttribute(`autoplay`,``),n.setAttribute(`preload`,t?`auto`:`metadata`),e.mediaAlt&&n.setAttribute(`aria-label`,e.mediaAlt),e.mediaPoster&&n.setAttribute(`poster`,e.mediaPoster),n.setAttribute(`src`,e.media),n}function Pd(e,t){let n=document.createElement(`button`);n.type=`button`,n.className=Td;let r=(r=!e.paused)=>{n.setAttribute(`aria-label`,r?t.pause:t.play),n.replaceChildren(jd(r?Dd:Od))};return e.addEventListener(`play`,()=>r()),e.addEventListener(`pause`,()=>r()),n.addEventListener(`click`,()=>{e.paused?e.play()?.catch(()=>r()):e.pause()}),r(e.hasAttribute(`autoplay`)),n}function Fd(e){let t=e.querySelector(`:scope > .${wd}`);if(!t)return;let n=t.querySelector(`video`);n&&(n.pause(),n.removeAttribute(`src`),n.load()),t.remove()}function Id(e,t,n=kd){if(Fd(e),!t.media){e.removeAttribute(`data-media`);return}let r=document.createElement(`div`);if(r.className=wd,t.mediaType===`video`){let e=Nd(t,!Ad());r.append(e,Pd(e,n))}else r.appendChild(Md(t));e.prepend(r),e.setAttribute(`data-media`,t.target?`step`:`welcome`)}var Ld=`Step {current} of {total}`;function Rd(e){let t=new Set;return{drop:e=>{t.add(e)},position:e=>{t.delete(e);let n=0;for(let r of t)r<e&&n++;return e+1-n},total:()=>e-t.size}}function zd(e,t,n){return(e.getAttribute(`progress-label`)||Ld).replace(/\{(current|total)\}/g,(e,r)=>String(r===`current`?t:n))}function Bd(e,{text:t,position:n,total:r}){let i=e.querySelector(`.wui-tour-position`);i.textContent=t;let a=e.querySelector(`.wui-tour-progress-bar`);if(!a){let t=e.ownerDocument,n=t.createElement(`div`);n.className=`wui-tour-progress`,n.setAttribute(`aria-hidden`,`true`),a=t.createElement(`div`),a.className=`wui-tour-progress-bar`,n.append(a),i.before(n)}let o=a.children;for(;o.length<r;){let t=e.ownerDocument.createElement(`span`);t.className=`wui-tour-progress-segment`,a.append(t)}for(;o.length>r;)a.lastElementChild.remove();for(let e=0;e<o.length;e++)o[e].toggleAttribute(`data-filled`,e<n)}var Vd=`wui-tour-step`,Hd=`wui-tour-host`,Ud=`wui-tour-seen:`,Wd=`data-tracking`,Gd={back:`Back`,next:`Next`,skip:`Skip`,done:`Done`,mediaPause:`Pause animation`,mediaPlay:`Play animation`,endTitle:`You're all set`,endMessage:`You know your way around now. Enjoy exploring.`,endButton:`Done`},Kd={back:`back-label`,next:`next-label`,skip:`skip-label`,done:`done-label`,mediaPause:`media-pause-label`,mediaPlay:`media-play-label`,endTitle:`end-title`,endMessage:`end-message`,endButton:`end-button`},qd=[[`media`,`media`],[`mediaAlt`,`media-alt`],[`mediaPoster`,`media-poster`],[`mediaType`,`media-type`],[`advanceOn`,`advance-on`],[`actionLabel`,`action-label`]],Jd={index:null,position:null,total:null},Yd=0;function Xd(e=Ud,t=globalThis.localStorage){return{isSeen:async n=>t.getItem(e+n)===`1`,markSeen:async n=>{t.setItem(e+n,`1`)}}}var Zd=e=>!e?.isConnected||getComputedStyle(e).visibility===`hidden`?!1:e.getClientRects().length>0,Qd=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),$d=()=>{let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e},ef=null;function tf(e){if(`adoptedStyleSheets`in e&&typeof CSSStyleSheet==`function`&&`replaceSync`in CSSStyleSheet.prototype){ef||(ef=new CSSStyleSheet,ef.replaceSync(Cd)),e.adoptedStyleSheets=[ef];return}let t=document.createElement(`style`);t.textContent=Cd,e.appendChild(t)}var nf=class extends c{static get observedAttributes(){return[`open`]}constructor(){super(),this.seenStore=null,this.onBeforeStep=null,this._run=0,this._running=!1,this._layer=null,this._outer=null,this._shadow=null,this._unbindAdvance=null,this._ending=null,this._seenMark=null}connectedCallback(){this.hasAttribute(`open`)&&this.start()}disconnectedCallback(){this.stop()}attributeChangedCallback(e,t,n){e!==`open`||!this.isConnected||(n===null?this.stop():this.start())}get tourId(){return this.getAttribute(`tour-id`)||``}set tourId(e){e==null||e===``?this.removeAttribute(`tour-id`):this.setAttribute(`tour-id`,String(e))}get isolated(){return this.hasAttribute(`isolated`)}set isolated(e){this.toggleAttribute(`isolated`,e===!0||e===``||e===`true`)}_stepList(){return Array.from(this.querySelectorAll(`:scope > ${Vd}`),e=>{let t={target:e.getAttribute(`target`)||``,title:e.getAttribute(`title`)||void 0,description:e.textContent.trim()};for(let[n,r]of qd)e.hasAttribute(r)&&(t[n]=e.getAttribute(r));return t})}_store(){return this.seenStore?this.seenStore:this.getAttribute(`seen-store`)===`local`?Xd():globalThis.window?.WUI?.tour?.seenStore||null}_label(e){return this.getAttribute(Kd[e])||Gd[e]}_endDialogText(){return this.getAttribute(`end-dialog`)===`false`?null:{title:this._label(`endTitle`),message:this._label(`endMessage`),button:this._label(`endButton`)}}_markSeen(e){let t=this._store();return t?t.markSeen(this.tourId,e):null}async start(){if(this._running)return;this._running=!0;let e=++this._run;this.hasAttribute(`open`)||this.setAttribute(`open`,``);try{await this._start(e)}catch(t){throw e===this._run&&(this._running=!1),t}}async _start(e){this._steps=this._stepList(),this._progress=Rd(this._steps.length);let t=this._store();if(t&&!this.tourId)throw Error(`<wui-tour> needs a tour-id to use a seen store.`);if(t&&await t.isSeen(this.tourId)){e===this._run&&this._finish(`alreadySeen`);return}for(let[e,t]of this._steps.entries())t.target&&!Zd(document.querySelector(t.target))&&this._progress.drop(e);this._returnFocus=document.activeElement;let n=await this._locate(0,1,e);if(e===this._run){if(!n){this._finish(`noTargets`);return}this._firstIndex=n.index,this.dispatchEvent(new CustomEvent(`wui-tour:start`,{bubbles:!0,detail:{total:this._progress.total()}})),e===this._run&&(this._build(),this._show(n))}}next(){return this._move(1)}back(){return!this._current||this._current.index<=this._firstIndex?Promise.resolve():this._move(-1)}async goTo(e){if(this._current){if(!Number.isInteger(e)||e<0||e>=this._steps.length)throw RangeError(`<wui-tour> has no step ${e}; it has ${this._steps.length}.`);await this._go(e,1)}}stop(){this._running&&(this._run++,this._teardown(),this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`))}async _locate(e,t,n){let r=this._steps;for(let i=e;i>=0&&i<r.length;i+=t){let e=r[i];if(await this._beforeStep(e,i),n!==this._run)return null;if(!e.target)return{index:i,target:null};let t=document.querySelector(e.target);if(Zd(t))return this._progress.position(i),{index:i,target:t};this._progress.drop(i)}return null}async _beforeStep(e,t){let n=[];this.dispatchEvent(new CustomEvent(`wui-tour:beforestep`,{bubbles:!0,detail:{step:e,index:t,wait:e=>n.push(e)}})),await Promise.all(n),typeof this.onBeforeStep==`function`&&await this.onBeforeStep(e,t)}_build(){let e=`wui-tour-${++Yd}`,t=document.createElement(`div`);t.className=`wui-tour-layer`,t.innerHTML=`
919
+ `,tf=`wui-tour-media`,nf=`wui-tour-media-toggle`,rf=`http://www.w3.org/2000/svg`,af=`M6 5h4v14H6zM14 5h4v14h-4z`,of=`M8 5v14l11-7z`,sf={pause:`Pause animation`,play:`Play animation`},cf=()=>globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches===!0;function lf(e){let t=document.createElementNS(rf,`svg`);t.setAttribute(`viewBox`,`0 0 24 24`),t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`focusable`,`false`);let n=document.createElementNS(rf,`path`);return n.setAttribute(`d`,e),t.appendChild(n),t}function uf(e){let t=document.createElement(`img`);return t.setAttribute(`alt`,e.mediaAlt??``),t.setAttribute(`width`,`1280`),t.setAttribute(`height`,`720`),t.setAttribute(`loading`,`lazy`),t.setAttribute(`decoding`,`async`),t.setAttribute(`src`,e.media),t}function df(e,t){let n=document.createElement(`video`);return n.muted=!0,n.setAttribute(`muted`,``),n.loop=!0,n.setAttribute(`playsinline`,``),t&&n.setAttribute(`autoplay`,``),n.setAttribute(`preload`,t?`auto`:`metadata`),e.mediaAlt&&n.setAttribute(`aria-label`,e.mediaAlt),e.mediaPoster&&n.setAttribute(`poster`,e.mediaPoster),n.setAttribute(`src`,e.media),n}function ff(e,t){let n=document.createElement(`button`);n.type=`button`,n.className=nf;let r=(r=!e.paused)=>{n.setAttribute(`aria-label`,r?t.pause:t.play),n.replaceChildren(lf(r?af:of))};return e.addEventListener(`play`,()=>r()),e.addEventListener(`pause`,()=>r()),n.addEventListener(`click`,()=>{e.paused?e.play()?.catch(()=>r()):e.pause()}),r(e.hasAttribute(`autoplay`)),n}function pf(e){let t=e.querySelector(`:scope > .${tf}`);if(!t)return;let n=t.querySelector(`video`);n&&(n.pause(),n.removeAttribute(`src`),n.load()),t.remove()}function mf(e,t,n=sf){if(pf(e),!t.media){e.removeAttribute(`data-media`);return}let r=document.createElement(`div`);if(r.className=tf,t.mediaType===`video`){let e=df(t,!cf());r.append(e,ff(e,n))}else r.appendChild(uf(t));e.prepend(r),e.setAttribute(`data-media`,t.target?`step`:`welcome`)}var hf=`Step {current} of {total}`;function gf(e){let t=new Set;return{drop:e=>{t.add(e)},position:e=>{t.delete(e);let n=0;for(let r of t)r<e&&n++;return e+1-n},total:()=>e-t.size}}function _f(e,t,n){return(e.getAttribute(`progress-label`)||hf).replace(/\{(current|total)\}/g,(e,r)=>String(r===`current`?t:n))}function vf(e,{text:t,position:n,total:r}){let i=e.querySelector(`.wui-tour-position`);i.textContent=t;let a=e.querySelector(`.wui-tour-progress-bar`);if(!a){let t=e.ownerDocument,n=t.createElement(`div`);n.className=`wui-tour-progress`,n.setAttribute(`aria-hidden`,`true`),a=t.createElement(`div`),a.className=`wui-tour-progress-bar`,n.append(a),i.before(n)}let o=a.children;for(;o.length<r;){let t=e.ownerDocument.createElement(`span`);t.className=`wui-tour-progress-segment`,a.append(t)}for(;o.length>r;)a.lastElementChild.remove();for(let e=0;e<o.length;e++)o[e].toggleAttribute(`data-filled`,e<n)}var yf=`wui-tour-step`,bf=`wui-tour-host`,xf=`wui-tour-seen:`,Sf=`data-tracking`,Cf={back:`Back`,next:`Next`,skip:`Skip`,done:`Done`,mediaPause:`Pause animation`,mediaPlay:`Play animation`,endTitle:`You're all set`,endMessage:`You know your way around now. Enjoy exploring.`,endButton:`Done`},wf={back:`back-label`,next:`next-label`,skip:`skip-label`,done:`done-label`,mediaPause:`media-pause-label`,mediaPlay:`media-play-label`,endTitle:`end-title`,endMessage:`end-message`,endButton:`end-button`},Tf=[[`media`,`media`],[`mediaAlt`,`media-alt`],[`mediaPoster`,`media-poster`],[`mediaType`,`media-type`],[`advanceOn`,`advance-on`],[`actionLabel`,`action-label`]],Ef={index:null,position:null,total:null},Df=0;function Of(e=xf,t=globalThis.localStorage){return{isSeen:async n=>t.getItem(e+n)===`1`,markSeen:async n=>{t.setItem(e+n,`1`)}}}var kf=e=>!e?.isConnected||getComputedStyle(e).visibility===`hidden`?!1:e.getClientRects().length>0,Af=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),jf=()=>{let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e},Mf=null;function Nf(e){if(`adoptedStyleSheets`in e&&typeof CSSStyleSheet==`function`&&`replaceSync`in CSSStyleSheet.prototype){Mf||(Mf=new CSSStyleSheet,Mf.replaceSync(ef)),e.adoptedStyleSheets=[Mf];return}let t=document.createElement(`style`);t.textContent=ef,e.appendChild(t)}var Pf=class extends c{static get observedAttributes(){return[`open`]}constructor(){super(),this.seenStore=null,this.onBeforeStep=null,this._run=0,this._running=!1,this._layer=null,this._outer=null,this._shadow=null,this._unbindAdvance=null,this._ending=null,this._seenMark=null}connectedCallback(){this.hasAttribute(`open`)&&this.start()}disconnectedCallback(){this.stop()}attributeChangedCallback(e,t,n){e!==`open`||!this.isConnected||(n===null?this.stop():this.start())}get tourId(){return this.getAttribute(`tour-id`)||``}set tourId(e){e==null||e===``?this.removeAttribute(`tour-id`):this.setAttribute(`tour-id`,String(e))}get isolated(){return this.hasAttribute(`isolated`)}set isolated(e){this.toggleAttribute(`isolated`,e===!0||e===``||e===`true`)}_stepList(){return Array.from(this.querySelectorAll(`:scope > ${yf}`),e=>{let t={target:e.getAttribute(`target`)||``,title:e.getAttribute(`title`)||void 0,description:e.textContent.trim()};for(let[n,r]of Tf)e.hasAttribute(r)&&(t[n]=e.getAttribute(r));return t})}_store(){return this.seenStore?this.seenStore:this.getAttribute(`seen-store`)===`local`?Of():globalThis.window?.WUI?.tour?.seenStore||null}_label(e){return this.getAttribute(wf[e])||Cf[e]}_endDialogText(){return this.getAttribute(`end-dialog`)===`false`?null:{title:this._label(`endTitle`),message:this._label(`endMessage`),button:this._label(`endButton`)}}_markSeen(e){let t=this._store();return t?t.markSeen(this.tourId,e):null}async start(){if(this._running)return;this._running=!0;let e=++this._run;this.hasAttribute(`open`)||this.setAttribute(`open`,``);try{await this._start(e)}catch(t){throw e===this._run&&(this._running=!1),t}}async _start(e){this._steps=this._stepList(),this._progress=gf(this._steps.length);let t=this._store();if(t&&!this.tourId)throw Error(`<wui-tour> needs a tour-id to use a seen store.`);if(t&&await t.isSeen(this.tourId)){e===this._run&&this._finish(`alreadySeen`);return}for(let[e,t]of this._steps.entries())t.target&&!kf(document.querySelector(t.target))&&this._progress.drop(e);this._returnFocus=document.activeElement;let n=await this._locate(0,1,e);if(e===this._run){if(!n){this._finish(`noTargets`);return}this._firstIndex=n.index,this.dispatchEvent(new CustomEvent(`wui-tour:start`,{bubbles:!0,detail:{total:this._progress.total()}})),e===this._run&&(this._build(),this._show(n))}}next(){return this._move(1)}back(){return!this._current||this._current.index<=this._firstIndex?Promise.resolve():this._move(-1)}async goTo(e){if(this._current){if(!Number.isInteger(e)||e<0||e>=this._steps.length)throw RangeError(`<wui-tour> has no step ${e}; it has ${this._steps.length}.`);await this._go(e,1)}}stop(){this._running&&(this._run++,this._teardown(),this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`))}async _locate(e,t,n){let r=this._steps;for(let i=e;i>=0&&i<r.length;i+=t){let e=r[i];if(await this._beforeStep(e,i),n!==this._run)return null;if(!e.target)return{index:i,target:null};let t=document.querySelector(e.target);if(kf(t))return this._progress.position(i),{index:i,target:t};this._progress.drop(i)}return null}async _beforeStep(e,t){let n=[];this.dispatchEvent(new CustomEvent(`wui-tour:beforestep`,{bubbles:!0,detail:{step:e,index:t,wait:e=>n.push(e)}})),await Promise.all(n),typeof this.onBeforeStep==`function`&&await this.onBeforeStep(e,t)}_build(){let e=`wui-tour-${++Df}`,t=document.createElement(`div`);t.className=`wui-tour-layer`,t.innerHTML=`
920
920
  <div class="wui-tour-spot" aria-hidden="true"></div>
921
921
  <div class="wui-tour-card" role="dialog" aria-modal="true" tabindex="-1" aria-labelledby="${e}-title" aria-describedby="${e}-text">
922
922
  <p class="wui-tour-position"></p>
@@ -930,4 +930,4 @@ ${Object.entries({"--wui-z-tour":`1550`,"--wui-radius-sm":`8px`,"--wui-radius-lg
930
930
  </div>
931
931
  </div>
932
932
  </div>
933
- <div class="visually-hidden" role="status" aria-live="polite"></div>`;let n=t;this._shadow=null,this.isolated&&(n=document.createElement(Hd),this._shadow=n.attachShadow({mode:`open`}),tf(this._shadow),this._shadow.appendChild(t)),document.body.appendChild(n),document.documentElement.setAttribute(Qr,``),this._outer=n,this._layer=t,this._spot=t.querySelector(`.wui-tour-spot`),this._card=t.querySelector(`.wui-tour-card`),this._live=t.querySelector(`[role=status]`),this._card.querySelector(`.wui-tour-skip`).addEventListener(`click`,()=>this._close(`skipped`,`button`)),this._card.querySelector(`.wui-tour-back`).addEventListener(`click`,()=>this._move(-1)),this._card.querySelector(`.wui-tour-next`).addEventListener(`click`,()=>this._move(1)),this._shadow&&this._card.removeAttribute(`aria-modal`),this._onKey=e=>this._key(e),this._onFocusIn=e=>{if(!this._layer||this._ending)return;let t=this._current,n=t?this._steps[t.index]:null;Vu(this._layer,n,t?.target??null,e.target)||this._card.focus()},document.addEventListener(`keydown`,this._onKey,!0),this._shadow||document.addEventListener(`focusin`,this._onFocusIn),o(n,()=>this._follow())}_active(){return this._shadow?this._shadow.activeElement:document.activeElement}_show(e){this._current=e;let{index:t,target:n}=e,r=this._steps[t],i=this._card,a=this._progress.position(t),o=this._progress.total(),s=a===o&&!this._endDialogText(),c=zd(this,a,o);Bd(i,{text:c,position:a,total:o}),Id(i,r,{pause:this._label(`mediaPause`),play:this._label(`mediaPlay`)});let l=zu(this,{layer:this._layer,spot:this._spot,card:i},r,n),u=i.querySelector(`.wui-tour-title`);u.textContent=r.title||``,u.hidden=!r.title,i.querySelector(`.wui-tour-text`).textContent=r.description||``,i.querySelector(`.wui-tour-skip`).textContent=this._label(`skip`),i.querySelector(`.wui-tour-back`).textContent=this._label(`back`),i.querySelector(`.wui-tour-back`).hidden=t<=this._firstIndex,i.querySelector(`.wui-tour-next`).textContent=this._label(s?`done`:`next`);let d=[c,r.title,r.description].filter(Boolean).join(`. `);this._live.textContent=l?[d,l].join(/[.!?]$/.test(d)?` `:`. `):d,fd(i,n),this._spot.removeAttribute(Wd),this._place(),$u(i),this._unbindAdvance?.(),this._unbindAdvance=Bu(r,n,()=>this._move(1));let f=this._active();(i.contains(f)?!f.hidden:this._shadow!==null&&Qd($d()))||i.focus(),this.dispatchEvent(new CustomEvent(`wui-tour:step`,{bubbles:!0,detail:{step:r,index:t,position:a,total:o}}))}_place(){!this._current||!this._layer||pd(this._spot,this._card,this._current.target)}_follow(){if(!this._current||!this._layer||this._ending)return;let e=this._spot.style.cssText;this._place(),this._spot.style.cssText!==e&&this._spot.setAttribute(Wd,``)}async _move(e){this._current&&await this._go(this._current.index+e,e)}async _go(e,t){if(!this._current||this._moving)return;this._moving=!0;let n=this._run;try{let r=await this._locate(e,t,n);if(n!==this._run)return;if(r){let e=ed(this._card);if(e&&await e,n!==this._run)return;this._show(r)}else if(t>0){let e=this._endDialogText();if(e&&await this._showEnd(e),n!==this._run)return;await this._close(`finished`)}}finally{this._moving=!1}}_showEnd(e){return this._unbindAdvance?.(),this._unbindAdvance=null,zu(this,{layer:this._layer,spot:this._spot,card:this._card},null,null),this._spot.removeAttribute(Wd),this._ending=new AbortController,this._seenMark=this._markSeen(`finished`),Sd(this._layer,e,this._ending.signal)}_key(e){if(!(!this._layer||this._ending||e.altKey||e.ctrlKey||e.metaKey)){if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),this._close(`skipped`,`escape`);else if(e.key===`ArrowRight`||e.key===`ArrowLeft`){if(Qd(e.composedPath?.()[0]??e.target))return;e.preventDefault(),e.key===`ArrowRight`?this._move(1):this._current.index>this._firstIndex&&this._move(-1)}else if(e.key===`Tab`&&!this._shadow){let{index:t,target:n}=this._current;Hu(e,{card:this._card,active:this._active(),step:this._steps[t],target:n})}}}_teardown(){if(!this._layer)return;document.removeEventListener(`keydown`,this._onKey,!0),document.removeEventListener(`focusin`,this._onFocusIn);let e=!this._shadow||this._shadow.activeElement!==null||!document.activeElement||document.activeElement===document.body;this._unbindAdvance?.(),this._unbindAdvance=null,this._ending?.abort(),this._ending=null,this._seenMark=null,s(this._outer),td(this._outer),document.documentElement.removeAttribute(Qr),this._outer=null,this._shadow=null,this._layer=null,this._current=null;let t=this._returnFocus;this._returnFocus=null,e&&t?.isConnected&&t.focus?.()}async _close(e,t=null){let n=this._run,r=this._current,i=r?{index:r.index,position:this._progress.position(r.index),total:this._progress.total()}:Jd,a=this._seenMark;this._teardown();try{n===this._run&&await(a??this._markSeen(e))}finally{this._finish(e,i,t)}}_finish(e,t=Jd,n=null){this._run++,this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`),this.dispatchEvent(new CustomEvent(`wui-tour:close`,{bubbles:!0,detail:{reason:e,...t,via:n}}))}},rf=[`none`,`single`,`multiple`],af=`parentId`,of=`Loading`,sf=`Could not load. Try again.`,cf=`:scope > input[data-wui-mirror]`,lf=[`nodes`,`selection`,`selected`,`values`,`loadChildren`,`loadUrl`,`name`],uf=0;function Q(e,t,n){let r=document.createElement(e);t&&(r.className=t);for(let[e,t]of Object.entries(n??{}))t!=null&&r.setAttribute(e,String(t));return r}var df=class extends c{static get observedAttributes(){return[`selection`,`selected`,`name`,`aria-label`,`loading-text`,`error-text`]}constructor(){super(),this._uid=`wui-tree-${++uf}`,this._seq=0,this._roots=[],this._byId=new Map,this._prev=null,this._staged=null,this._els=new Map,this._checked=new Set,this._selected=null,this._focusId=null,this._loader=null,this._list=null,this._live=null,this._ready=!1,this._nav=qn({getVisibleOptions:()=>this._visible().map(e=>this._els.get(e.id)?.row),getActive:()=>this._visible().findIndex(e=>e.id===this._focusId),setActive:e=>this._focusNode(this._visible()[e]),onEnter:()=>{let e=this._byId.get(this._focusId);e&&this._activate(e)}}),this._onKeyDown=e=>this._handleKeyDown(e),this._onClick=e=>this._handleClick(e),this._onFocusIn=e=>{let t=this._nodeFrom(e.target);t&&t.id!==this._focusId&&this._setRoving(t)}}connectedCallback(){let e={};for(let t of lf)Object.hasOwn(this,t)&&(e[t]=this[t],delete this[t]);if(!this._ready){this._ready=!0;let e=this._readScript();this.replaceChildren(),this._list=Q(`ul`,`wui-tree`),this._list.setAttribute(`role`,`tree`),this._live=Q(`div`,`visually-hidden`,{role:`status`,"aria-live":`polite`}),this.append(this._list,this._live),e&&this._adoptAll(e)}for(let[t,n]of Object.entries(e))this[t]=n;this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`click`,this._onClick),this.addEventListener(`focusin`,this._onFocusIn),this._render(),this._loadOpenNodes()}disconnectedCallback(){this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`focusin`,this._onFocusIn),this._nav.teardown()}attributeChangedCallback(e,t,n){e===`selected`&&(this._selected=n),this._ready&&this.isConnected&&this._render()}get nodes(){return this._roots.map(e=>e.raw)}set nodes(e){this._adoptAll(e??[]),this._render(),this._loadOpenNodes()}get selection(){let e=this.getAttribute(`selection`);return rf.includes(e)?e:`none`}set selection(e){this.setAttribute(`selection`,String(e))}get selected(){return this._selected}set selected(e){this._selected=e==null?null:String(e),this._render()}get values(){let e=[],t=n=>{for(let r of n)this._state(r)===`checked`&&e.push(r.id),r.children&&t(r.children)};return t(this._roots),[...e,...[...this._checked].filter(e=>!this._byId.has(e))]}set values(e){this._checked.clear();for(let t of e??[]){let e=this._byId.get(String(t));e?this._setChecked(e,!0):this._checked.add(String(t))}this._render()}get loadChildren(){return this._loader}set loadChildren(e){this._loader=typeof e==`function`?e:null}get loadUrl(){return this.getAttribute(`load-url`)}set loadUrl(e){e==null?this.removeAttribute(`load-url`):this.setAttribute(`load-url`,String(e))}get name(){return this.getAttribute(`name`)}set name(e){e==null?this.removeAttribute(`name`):this.setAttribute(`name`,String(e))}get loadingText(){return this.getAttribute(`loading-text`)??of}set loadingText(e){this.setAttribute(`loading-text`,String(e??``))}get errorText(){return this.getAttribute(`error-text`)??sf}set errorText(e){this.setAttribute(`error-text`,String(e??``))}_readScript(){let e=this.querySelector(`:scope > script[type='application/json']`);if(!e)return null;try{return JSON.parse(e.textContent)}catch(e){return console.error(`[@webority/ui-elements] <wui-tree> could not read its JSON nodes:`,e?.message),null}}_adoptAll(e){let t=this._byId;this._prev=t,this._byId=new Map;let n;try{n=this._adoptStaged(e,null,1)}catch(e){throw this._byId=t,e}finally{this._prev=null}this._roots=n;for(let e of t.keys())this._byId.has(e)||this._checked.delete(e);for(let e of this._roots)this._passChecksDown(e);this._focusId&&!this._byId.has(this._focusId)&&(this._focusId=null)}_adoptStaged(e,t,n){let r=[],i=[];this._staged={ids:r,checks:i};try{let r=this._adopt(e,t,n);for(let e of i)this._checked.add(e);return r}catch(e){for(let e of r)this._byId.delete(e);throw e}finally{this._staged=null}}_adopt(e,t,n){if(!Array.isArray(e))throw Error(`<wui-tree> nodes must be an array.`);return e.map(e=>{let r=e?.id==null?``:String(e.id);if(!r)throw Error(`<wui-tree> every node needs an id.`);if(this._byId.has(r))throw Error(`<wui-tree> node id "${r}" is used twice.`);let i=this._prev?.get(r),a={id:r,raw:e,parent:t,level:n,seq:++this._seq,label:e.label==null?r:String(e.label),icon:e.icon||null,badge:e.badge==null||e.badge===``?null:String(e.badge),badgeTone:e.badgeTone||null,disabled:!!e.disabled,hasChildren:!!e.hasChildren,children:null,expanded:i?i.expanded:!!e.expanded,loading:!1,failed:!1};this._byId.set(r,a),this._staged.ids.push(r);let o=e.children??(e.hasChildren?i?.children?.map(e=>e.raw):void 0);return Array.isArray(o)&&(a.children=this._adopt(o,a,n+1)),a.loading=!!i?.loading&&a.children===null&&a.hasChildren,e.checked&&!i&&this._staged.checks.push(r),a})}_passChecksDown(e){e.children?.length&&this._checked.has(e.id)&&(this._checked.delete(e.id),this._setChecked(e,!0));for(let t of e.children??[])this._passChecksDown(t)}_loadOpenNodes(){queueMicrotask(()=>{if(this.isConnected)for(let e of[...this._byId.values()])e.expanded&&e.children===null&&e.hasChildren&&!e.loading&&this._load(e)})}_isBranch(e){return e.children?e.children.length>0:e.hasChildren}_visible(){let e=[],t=n=>{for(let r of n)e.push(r),r.expanded&&r.children&&t(r.children)};return t(this._roots),e}_state(e){if(e.children?.length){let t=0,n=0;for(let r of e.children){let e=this._state(r);e===`checked`?t++:e===`unchecked`&&n++}return t===e.children.length?`checked`:n===e.children.length?`unchecked`:`mixed`}return this._checked.has(e.id)?`checked`:`unchecked`}_setChecked(e,t){if(e.children?.length)for(let n of e.children)n.disabled||this._setChecked(n,t);else t?this._checked.add(e.id):this._checked.delete(e.id)}_nodeFrom(e){let t=e?.closest?.(`li.wui-tree-item`);if(!t)return null;for(let[e,n]of this._els)if(n.li===t)return this._byId.get(e)??null;return null}_emit(e,t){this.dispatchEvent(new CustomEvent(`wui-tree:${e}`,{detail:t,bubbles:!0,composed:!0}))}_announce(e){this._live&&(this._live.textContent=e)}_setRoving(e){let t=this._els.get(this._focusId);t&&(t.li.tabIndex=-1),this._focusId=e.id;let n=this._els.get(e.id);n&&(n.li.tabIndex=0)}_focusNode(e){e&&(this._setRoving(e),this._els.get(e.id)?.li.focus())}_activate(e){e.disabled||(this.selection===`single`&&(this._selected=e.id,this._render(),this._syncForm()),this._emit(`select`,{id:e.id,node:e.raw}))}_enabledLeaves(e){return e.disabled?[]:e.children?.length?e.children.flatMap(e=>this._enabledLeaves(e)):[e]}_toggleCheck(e){let t=this._enabledLeaves(e);if(!t.length)return;let n=!t.every(e=>this._checked.has(e.id));this._setChecked(e,n),this._render(),this._syncForm(),this._emit(`check`,{id:e.id,checked:n,values:this.values})}_toggleExpand(e){e.disabled||!this._isBranch(e)||(e.expanded?(e.expanded=!1,this._render()):this._expand(e))}_expand(e){e.expanded=!0,e.children===null?this._load(e):this._render()}async _load(e){if(e.loading)return;e.loading=!0,e.failed=!1,this._announce(this.loadingText),this._render();let t,n=null;try{t=await this._fetchChildren(e)}catch(e){n=e}let r=this._byId.get(e.id);if(!r){this._announce(``);return}if(r.loading){if(r.loading=!1,!n)try{r.children=this._adoptStaged(t,r,r.level+1),this._passChecksDown(r),this._announce(``)}catch(e){n=e}n&&(r.failed=!0,r.expanded=!1,this._announce(this.errorText),this._emit(`error`,{id:r.id,message:n?.message??String(n)})),this._render(),this._syncForm()}}async _fetchChildren(e){if(this._loader)return this._loader(e.raw);let t=this.getAttribute(`load-url`);if(!t)throw Error(`<wui-tree> has a node with children to load but no loadChildren or load-url.`);let n=new URL(t,window.location.href);n.searchParams.set(af,e.id);let r=await j(n.href,{headers:{Accept:`application/json`}});if(!r.ok)throw Error(`Loading children answered ${r.kind}.`);return JSON.parse(r.html)}_handleClick(e){let t=this._nodeFrom(e.target);!t||t.disabled||(this._focusNode(t),e.target.closest(`.wui-tree-toggle`)?this._toggleExpand(t):e.target.closest(`.wui-tree-check`)?(e.preventDefault(),this._toggleCheck(t)):this._activate(t))}_handleKeyDown(e){if(e.ctrlKey||e.metaKey||e.altKey)return;let t=this._nodeFrom(e.target);if(!(!t||e.target!==this._els.get(t.id)?.li))if(e.key===`ArrowRight`){if(e.preventDefault(),!this._isBranch(t)||t.disabled)return;t.expanded?t.children?.length&&this._focusNode(t.children[0]):this._expand(t)}else e.key===`ArrowLeft`?(e.preventDefault(),t.expanded&&this._isBranch(t)&&!t.disabled?this._toggleExpand(t):t.parent&&this._focusNode(t.parent)):e.key===` `?(e.preventDefault(),this.selection===`multiple`?this._toggleCheck(t):this.selection===`single`&&this._activate(t)):this._nav.handler(e)}_syncForm(){let e=this.selection;if(e===`multiple`)L(this,this.values);else if(e===`single`)I(this,this._selected??``);else for(let e of this.querySelectorAll(cf))e.remove()}_render(){if(!this._list)return;let e=document.activeElement,t=!!e&&this._list.contains(e),n=this._visible();n.some(e=>e.id===this._focusId)||(this._focusId=(n.find(e=>e.id===this._selected)??n[0])?.id??null),this._els=new Map;let r=this.getAttribute(`aria-label`);r?this._list.setAttribute(`aria-label`,r):this._list.removeAttribute(`aria-label`),this._list.replaceChildren(...this._buildLevel(this._roots)),t&&this._focusId&&this._els.get(this._focusId)?.li.focus(),this._syncForm()}_buildLevel(e){return e.map((t,n)=>this._buildItem(t,n+1,e.length))}_buildItem(e,t,n){let r=this.selection,i=this._isBranch(e),a=this._state(e),o=Q(`li`,`wui-tree-item`,{role:`treeitem`,tabindex:e.id===this._focusId?0:-1,"aria-level":e.level,"aria-setsize":n,"aria-posinset":t,"aria-labelledby":`${this._uid}-${e.seq}`,"aria-describedby":e.badge?`${this._uid}-${e.seq}-badge`:null});i&&o.setAttribute(`aria-expanded`,String(e.expanded)),e.disabled&&o.setAttribute(`aria-disabled`,`true`),e.loading&&o.setAttribute(`aria-busy`,`true`),r===`single`&&o.setAttribute(`aria-selected`,String(e.id===this._selected)),r===`multiple`&&o.setAttribute(`aria-checked`,a===`mixed`?`mixed`:String(a===`checked`));let s=Q(`div`,`wui-tree-row`,{role:`presentation`});s.style.setProperty(`--wui-tree-level`,String(e.level-1)),r===`single`&&e.id===this._selected&&s.classList.add(`wui-tree-row-selected`),e.failed&&s.classList.add(`wui-tree-row-error`);let c=Q(`span`,i?`wui-tree-toggle`:`wui-tree-toggle wui-tree-toggle-leaf`,{"aria-hidden":`true`});if(i&&(c.innerHTML=R(`chevron-right`,{size:16})),s.append(c),r===`multiple`){let t=Q(`input`,`form-check-input wui-tree-check`,{type:`checkbox`,tabindex:-1,"aria-hidden":`true`});t.checked=a===`checked`,t.indeterminate=a===`mixed`,t.disabled=e.disabled,t.addEventListener(`mousedown`,e=>e.preventDefault()),s.append(t)}if(e.icon){let t=Q(`span`,`wui-tree-icon`,{"aria-hidden":`true`});t.innerHTML=R(e.icon,{size:16}),s.append(t)}let l=Q(`span`,`wui-tree-label`,{id:`${this._uid}-${e.seq}`});if(l.textContent=e.label,s.append(l),e.badge){let t=Q(`span`,`badge wui-tree-badge${e.badgeTone&&e.badgeTone!==`neutral`?` badge-${e.badgeTone}`:``}`,{id:`${this._uid}-${e.seq}-badge`});t.textContent=e.badge,s.append(t)}if(e.loading&&s.append(Q(`span`,`wui-tree-spinner`,{"aria-hidden":`true`})),o.append(s),e.expanded&&e.children?.length){let t=Q(`ul`,`wui-tree-group`,{role:`group`});t.append(...this._buildLevel(e.children)),o.append(t)}return this._els.set(e.id,{li:o,row:s}),o}},ff=class extends c{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`);if(e){if(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);return}this.removeAttribute(`data-wui-tip`),this._ownTabindex&&=(this.removeAttribute(`tabindex`),!1)}}},pf=`wui-whats-new-read`,mf=`wui-whats-new:`,hf=`data-open`,gf=`data-wui-unread`,_f=0,vf=class extends c{static get observedAttributes(){return[`storage-key`]}constructor(){super(),this._doc=null,this._seen=``,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&&!this.contains(e.target)&&this.close(!1)}}get isOpen(){return this.hasAttribute(hf)}get _trigger(){return this.querySelector(`.wui-whats-new-trigger`)}get _panel(){return this.querySelector(`.wui-whats-new-panel`)}connectedCallback(){this._doc=this.ownerDocument;let e=this._panel,t=this._trigger;!e||!t||(e.id||=`wui-whats-new-${++_f}`,t.setAttribute(`aria-controls`,e.id),t.setAttribute(`aria-expanded`,`false`),t.addEventListener(`click`,this._onTriggerClick),this.addEventListener(`keydown`,this._onKeyDown),this._seen=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),s(this),this.removeAttribute(hf),this._doc=null}attributeChangedCallback(e,t,n){t===n||!this._doc||(this._seen=this._load(),this._refresh())}open(){let e=this._panel;!e||this.isOpen||(this.setAttribute(hf,``),this._trigger?.setAttribute(`aria-expanded`,`true`),this._place(),o(this,()=>this._place()),this._doc.addEventListener(`pointerdown`,this._onPointerDown,!0),e.focus({preventScroll:!0}),this._markRead())}close(e){this.isOpen&&(this.removeAttribute(hf),this._trigger?.setAttribute(`aria-expanded`,`false`),this._doc.removeEventListener(`pointerdown`,this._onPointerDown,!0),s(this),this._refresh(),e&&this._trigger?.focus())}_place(){a(this._trigger,this._panel,{clampHeight:!0})}_entries(){return[...this.querySelectorAll(`.wui-whats-new-entry`)].map(e=>({entry:e,date:e.querySelector(`time[datetime]`)?.getAttribute(`datetime`)??``}))}_newest(){return this._entries().reduce((e,{date:t})=>t>e?t:e,``)}_refresh(){let e=this._entries(),t=0;for(let{entry:n,date:r}of e){let e=r>this._seen;e&&t++,!(this.isOpen&&n.hasAttribute(gf))&&n.toggleAttribute(gf,e)}this.toggleAttribute(gf,t>0)}_markRead(){let e=this._newest();!e||e<=this._seen||(this._seen=e,this._save(e),this.toggleAttribute(gf,!1),this.dispatchEvent(new CustomEvent(pf,{bubbles:!0,detail:{through:e}})))}_storage(){let e=this.getAttribute(`storage-key`);if(!e)return null;try{return{store:this.ownerDocument.defaultView.localStorage,key:mf+e}}catch{return null}}_load(){let e=this._storage();return e?e.store.getItem(e.key)??``:this._seen}_save(e){let t=this._storage();t&&t.store.setItem(t.key,e)}},yf=`wui-wizard-step`,bf=`:scope > [data-wui-glyphs]`,xf=class extends c{static get observedAttributes(){return[`active`,`variant`,`orientation`,`icon-size`,`non-linear`,`hide-stepper`,`hide-connectors`,`disabled`,`skippable`,`label`,`back-label`,`next-label`,`skip-label`,`finish-label`]}constructor(){super(),this._active=0,this._skipped=new Set,this._invalid=new Set,this._finished=!1,this._rendered=!1,this._reflecting=!1,this._beforeNext=null,this._header=null,this._footer=null,this._known=[],this._observer=null,this._glyphs=null,this._glyphObserver=null}get active(){return this._active}set active(e){let t=Number.parseInt(e,10);Number.isFinite(t)&&this._go(t,`set`)}get beforeNext(){return this._beforeNext}set beforeNext(e){this._beforeNext=typeof e==`function`?e:null}get _steps(){return[...this.querySelectorAll(`:scope > ${yf}`)]}refresh(){this._rendered&&this._renderChrome()}connectedCallback(){if(this._rendered)this._wire(),this._onStepsMutated();else{let e=Number.parseInt(this.getAttribute(`active`),10);this._active=Number.isFinite(e)&&e>=0?e:0,this.render()}}disconnectedCallback(){this._teardown()}attributeChangedCallback(e,t,n){if(!(!this._rendered||this._reflecting)){if(e===`active`){let e=Number.parseInt(n,10);Number.isFinite(e)&&this._go(e,`set`);return}this._renderChrome()}}render(){let e=this._steps;this._header||(this._header=document.createElement(`nav`),this._header.className=`stepper wizard-stepper`,this._footer=document.createElement(`div`),this._footer.className=`form-actions wizard-footer form-actions-between`,e.length?(this.insertBefore(this._header,e[0]),e[e.length-1].after(this._footer)):(this.prepend(this._header),this.append(this._footer))),this._known=e,this._renderChrome(),this._rendered=!0,this._wire()}_renderChrome(){let e=this._reconcileSteps();this._placeChrome(e),this._clampActive(e),this._syncPanels(e),this._header.innerHTML=this._headerHtml(e),this._footer.innerHTML=this._footerHtml(e),this._header.hidden=this.hasAttribute(`hide-stepper`)}_clampActive(e){let t=Math.max(0,e.length-1);this._active>t&&(this._active=t),this._active<0&&(this._active=0)}_reconcileSteps(){let e=this._steps,t=this._known;if(this._known=e,Sf(e,t))return e;let n=n=>new Set([...n].map(n=>e.indexOf(t[n])).filter(e=>e>=0));this._skipped=n(this._skipped),this._invalid=n(this._invalid);let r=t[this._active];if(!r)return e;let i=e.indexOf(r);if(i<0){let n=t=>e.includes(t),r=t.slice(this._active+1).find(n)??t.slice(0,this._active).reverse().find(n);i=r?e.indexOf(r):this._active}return i=Math.min(i,Math.max(0,e.length-1)),i!==this._active&&(this._active=i,this._reflectActive(i)),e}_placeChrome(e){if(!e.length)return;let t=e[e.length-1];this._header.nextElementSibling!==e[0]&&this.insertBefore(this._header,e[0]),this._footer.previousElementSibling!==t&&t.after(this._footer)}_onStepsMutated(){if(!this._rendered)return;let e=this._steps,t=!e.length||this._header.nextElementSibling===e[0]&&this._footer.previousElementSibling===e[e.length-1];this.querySelector(bf)!==this._glyphs&&(this._watchGlyphs(),this._renderHeader()),!(t&&Sf(e,this._known))&&(this._renderChrome(),this._observer?.takeRecords())}_syncPanels(e){e.forEach((e,t)=>{let n=t===this._active;e.classList.add(`wizard-panel`),e.hidden=!n,e.setAttribute(`role`,`tabpanel`),e.setAttribute(`aria-hidden`,n?`false`:`true`)})}_stepStatus(e,t){return e.getAttribute(`status`)||(this._invalid.has(t)?`error`:this._finished?`done`:t===this._active?`active`:t<this._active?this._skipped.has(t)?`skipped`:`done`:`pending`)}_headerHtml(e){let t=this.getAttribute(`variant`)===`journey`,n=this.getAttribute(`variant`)===`icons`,r=this.getAttribute(`orientation`)===`vertical`,i=!this.hasAttribute(`hide-connectors`);this._header.className=[`stepper`,`wizard-stepper`,t&&`stepper-journey`,n&&`stepper-icons`,r&&`stepper-vertical`,!i&&`wui-stepper-no-connectors`].filter(Boolean).join(` `),this._header.setAttribute(`aria-label`,this.getAttribute(`label`)||`Progress`);let a=this.hasAttribute(`non-linear`);return e.map((r,o)=>{let s=this._stepStatus(r,o),c=r.getAttribute(`label`)||``,l=r.getAttribute(`description`)||``,u=r.getAttribute(`icon`)||``,d=o+1,f;f=s===`done`?this._glyph(`check`):s===`error`?this._glyph(`alert-triangle`):s===`skipped`?this._glyph(`minus`):u?this._glyph(u):String(d);let p=s===`pending`?`step`:`step ${s}`,m=s===`active`?` aria-current="step"`:``,h=a||o<this._active,g=l?`<span class="step-desc">${Cf(l)}</span>`:``,_;_=t?`<span class="step-circle">${f}</span><span class="step-text"><span class="step-index">Step ${d}</span><span class="step-label">${Cf(c)}</span>${g}</span>`:n?`<span class="step-circle">${f}</span><span class="step-index">Step ${d}</span><span class="step-label">${Cf(c)}</span>${g}`:`<span class="step-circle">${f}</span><span class="step-label">${Cf(c)}</span>${g}`;let v=h?`<button type="button" class="${p}" data-step="${o}"${m}>${_}</button>`:`<div class="${p}"${m}>${_}</div>`;return t&&i&&o<e.length-1?`${v}<span class="step-line${s===`done`?` done`:``}" aria-hidden="true"></span>`:v}).join(``)}_footerHtml(e){let t=this._active,n=e.length-1,r=this.hasAttribute(`disabled`)?` disabled`:``,i=e[t]?.hasAttribute(`optional`)||this.hasAttribute(`skippable`),a=this.getAttribute(`back-label`)||`Back`,o=this.getAttribute(`next-label`)||`Next`,s=this.getAttribute(`skip-label`)||`Skip`,c=this.getAttribute(`finish-label`)||`Finish`;return`${t>0?`<button type="button" class="btn btn-secondary" data-nav="back"${r}>${R(`arrow-left`,{className:`me-2`})}${Cf(a)}</button>`:`<span></span>`}<span class="wizard-footer-actions">${i&&t<n?`<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${Cf(s)}</button>`:``}${t<n?`<button type="button" class="btn btn-primary" data-nav="next"${r}>${Cf(o)}${R(`arrow-right`,{className:`ms-2`})}</button>`:`<button type="button" class="btn btn-primary" data-nav="finish"${r}>${Cf(c)}</button>`}</span>`}_wire(){this._teardown(),this._onHeaderClick=e=>{let t=e.target.closest(`[data-step]`);t&&this.contains(t)&&this._stepTo(Number.parseInt(t.dataset.step,10))},this._onFooterClick=e=>{let t=e.target.closest(`[data-nav]`);if(!t||!this.contains(t)||this.hasAttribute(`disabled`))return;let n=t.dataset.nav;n===`back`?this._back():n===`skip`?this._skip():(n===`next`||n===`finish`)&&this._next()},this._header.addEventListener(`click`,this._onHeaderClick),this._footer.addEventListener(`click`,this._onFooterClick),this._observer=new MutationObserver(()=>this._onStepsMutated()),this._observer.observe(this,{childList:!0}),this._watchGlyphs()}_glyph(e){let t=this.querySelector(bf),n=t&&[...t.children].find(t=>t.getAttribute(`data-icon`)===e);if(n)return n.outerHTML;let r=Number.parseInt(this.getAttribute(`icon-size`),10);return R(e,r>0?{size:r}:void 0)}_watchGlyphs(){this._glyphObserver?.disconnect(),this._glyphObserver=null,this._glyphs=this.querySelector(bf),this._glyphs&&(this._glyphObserver=new MutationObserver(()=>this._renderHeader()),this._glyphObserver.observe(this._glyphs,{childList:!0,subtree:!0,attributes:!0,characterData:!0}))}_renderHeader(){this._rendered&&(this._header.innerHTML=this._headerHtml(this._steps))}_teardown(){this._header&&this._onHeaderClick&&this._header.removeEventListener(`click`,this._onHeaderClick),this._footer&&this._onFooterClick&&this._footer.removeEventListener(`click`,this._onFooterClick),this._observer?.disconnect(),this._observer=null,this._glyphObserver?.disconnect(),this._glyphObserver=null}_stepTo(e){this.hasAttribute(`disabled`)||!this.hasAttribute(`non-linear`)&&e>=this._active||this._go(e,`step`)}_back(){this._active>0&&this._go(this._active-1,`back`)}async _next(){this._reconcileSteps();let e=this._active,t=this._steps,n=e>=t.length-1,r=t[e];if(!this.dispatchEvent(new CustomEvent(`wui-wizard:beforechange`,{detail:n?{index:e,next:e,reason:`finish`}:{index:e,next:e+1,reason:`next`},cancelable:!0})))return this._flagInvalid(e);if(this._beforeNext){let i;try{i=await this._beforeNext(e)}catch{i=!1}if(this._reconcileSteps(),t=this._steps,e=t.indexOf(r),e<0)return;if(n=e>=t.length-1,i===!1)return this._flagInvalid(e)}if(this._invalid.delete(e),this._skipped.delete(e),n)return this._finish();this._go(e+1,`next`)}_skip(){let e=this._active,t=this._steps;if(!(!t[e]?.hasAttribute(`optional`)&&!this.hasAttribute(`skippable`))){if(this._invalid.delete(e),this._skipped.add(e),this.dispatchEvent(new CustomEvent(`wui-wizard:skip`,{detail:{index:e}})),e>=t.length-1)return this._finish();this._go(e+1,`skip`)}}_flagInvalid(e){this._invalid.add(e),this._renderChrome(),this.dispatchEvent(new CustomEvent(`wui-wizard:invalid`,{detail:{index:e}}))}_finish(){this._invalid.delete(this._active),this._finished=!0,this._renderChrome(),this.dispatchEvent(new CustomEvent(`wui-wizard:finish`,{detail:{index:this._active}}))}_go(e,t){let n=this._reconcileSteps(),r=Math.max(0,n.length-1),i=Math.min(Math.max(e,0),r),a=this._active;this._finished=!1,this._invalid.delete(a),this._active=i,this._reflectActive(i),this._renderChrome(),t!==`silent`&&i!==a&&this.dispatchEvent(new CustomEvent(`wui-wizard:change`,{detail:{index:i,previous:a,reason:t}}))}_reflectActive(e){this._reflecting=!0,this.setAttribute(`active`,String(e)),this._reflecting=!1}},Sf=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),Cf=e=>String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),wf=class extends c{static get observedAttributes(){return[`label`,`description`,`optional`,`icon`,`status`]}attributeChangedCallback(){let e=this.closest(`wui-wizard`);e&&typeof e.refresh==`function`&&e.refresh()}},Tf=`image/jpeg,image/png,image/webp,image/heic,image/heif,.heic,.heif`,Ef=10,Df=512,Of=`image/webp`,kf=[96,48],Af={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 jf(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 Mf(e){return jf(e)?Af.heicUnreadable:Af.unreadable}function Nf(e,t){let n=Number(t);return{name:e?.name||`photo`,type:Of,size:Number.isInteger(n)&&n>0?n:512}}var Pf=`image/png,image/jpeg,image/webp`,Ff=5,If={"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`]},Lf={"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`,".png":`PNG`,".jpg":`JPG`,".jpeg":`JPG`,".webp":`WEBP`,".gif":`GIF`,".svg":`SVG`,".heic":`HEIC`,".heif":`HEIC`,".pdf":`PDF`,".txt":`text file`},Rf=e=>String(e||``).split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean),zf=[`.png`,`.jpg`,`.jpeg`,`.webp`,`.gif`,`.svg`,`.bmp`,`.avif`,`.heic`,`.heif`];function Bf(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 zf.some(e=>r.endsWith(e))}function Vf(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().split(/[?#]/)[0].endsWith(`.pdf`)}function Hf(e){let t=Rf(e);return t.length?t.every(e=>e.startsWith(`.`)?zf.includes(e):e===`image/*`||e.startsWith(`image/`)):!1}function Uf(e){let t=[];for(let n of Rf(e)){let e=Lf[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 Wf(e,t){let n=Rf(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&&(If[e]||[]).some(e=>i.endsWith(e)))}function Gf(e,t={}){if(!e)return null;let n=t.accept===void 0?Pf:t.accept,r=t.maxSizeMb===void 0?5:t.maxSizeMb;if(!Wf(e,n)){let e=Uf(n);return`Choose a ${e.endsWith(` file`)?e:`${e} file`}.`}return r>0&&e.size>r*1024*1024?`Keep the file under ${r} MB.`:null}var Kf=/[0-9]/,qf={9:Kf,A:/[A-Za-z]/,"*":/[0-9A-Za-z]/},Jf=/[9A*]/,Yf=new Set([`text`,`tel`,`search`,`url`,`password`]),Xf=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},Zf=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},Qf=e=>e.length<=3?e:`${e.slice(0,-3).replace(/\B(?=(\d{2})+(?!\d))/g,`,`)},${e.slice(-3)}`,$f=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());return t?`${t[3]}-${t[2]}-${t[1]}`:e};function ep(e,{upper:t=!1,normalize:n,valid:r,post:i=e=>e,message:a=`Enter the full value`}={}){let o=[...e].map(e=>qf[e]?{re:qf[e]}:{lit:e}),s=o.filter(e=>e.re).length;return{inputMode:o.every(e=>!e.re||e.re===Kf)?`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++)o[i].lit===void 0?(t+=e[r++],n.push(!0)):(t+=o[i].lit,n.push(!1));return{text:t,isRaw:n}},isValid:e=>e.length===s&&(!r||r(e))}}function tp(){return{inputMode:`decimal`,post:e=>e,message:`Enter a valid amount`,extract(e){let t=``,n=!1,r=0;for(let i of e)Kf.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=Qf(t)+(e.includes(`.`)?`.${n}`:``);return{text:r,isRaw:[...r].map(e=>e!==`,`)}},isValid:e=>/^\d+(\.\d{1,2})?$/.test(e)}}var np={"phone-in":()=>ep(`99999 99999`,{normalize:Xf,valid:e=>/^[6-9]/.test(e),message:`Enter a 10-digit mobile number`}),pan:()=>ep(`AAAAA9999A`,{upper:!0,valid:e=>/^[A-Z]{5}\d{4}[A-Z]$/.test(e),message:`Enter a valid PAN`}),gstin:()=>ep(`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:()=>ep(`9999 9999 9999`,{valid:e=>/^[2-9]/.test(e),message:`Enter a valid 12-digit Aadhaar number`}),ifsc:()=>ep(`AAAA*******`,{upper:!0,valid:e=>/^[A-Z]{4}0[A-Z0-9]{6}$/.test(e),message:`Enter a valid IFSC`}),"pin-code":()=>ep(`999999`,{valid:e=>/^[1-9]/.test(e),message:`Enter a valid 6-digit PIN code`}),date:()=>ep(`99-99-9999`,{normalize:$f,valid:Zf,post:(e,t)=>e.length===8&&Zf(e)?`${e.slice(4)}-${e.slice(2,4)}-${e.slice(0,2)}`:t,message:`Enter a valid date as DD-MM-YYYY`}),amount:tp},rp=Object.keys(np),ip=e=>{let t=String(e).toLowerCase();return Object.hasOwn(np,t)?t:void 0},ap=e=>Jf.test(String(e))&&ip(e)===void 0,op=new Map;function sp(e){if(e==null||e===``)return null;let t=String(e);return op.has(t)||(ap(t)?op.set(t,ep(t)):op.set(t,Object.hasOwn(np,t)?np[t]():null)),op.get(t)}var cp=(e,t)=>e.normalize?e.normalize(t):t;function lp(e,t){let n=sp(e);return n?n.extract(cp(n,String(t??``))):String(t??``)}function up(e,t){let n=sp(e);if(!n)return String(t??``);let r=n.extract(cp(n,String(t??``)));return n.post(r,n.layout(r).text)}function dp(e,t){let n=sp(e);return n?n.layout(n.extract(cp(n,String(t??``)))).text:String(t??``)}var fp=(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},pp=new WeakMap,mp=e=>pp.get(e)?.(),hp=new WeakMap;function gp(e,t,n,r){let i=e.getAll(t),a=hp.get(e);a||hp.set(e,a=new Set);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);return}e.delete(t);for(let n of i)e.append(t,n)}}function _p(e){let t=null,n=null,r=!1,i=(t,n)=>n===null?e.removeAttribute(t):e.setAttribute(t,n),a,o,s=()=>{t?.remove(),t=null,n&&(n.hidden=!1),n=null,r&&e.classList.remove(`error`),r=!1,a!==void 0&&i(`aria-invalid`,a),o!==void 0&&i(`aria-describedby`,o),a=void 0,o=void 0};return i=>{if(!i){s();return}let c=e.closest(`.field`),l=c?.querySelector(`.field-error`);l&&l!==t&&l.textContent.trim()||(t||(r=!e.classList.contains(`error`),e.classList.add(`error`),a=e.getAttribute(`aria-invalid`),o=e.getAttribute(`aria-describedby`),c&&(t=document.createElement(`div`),t.className=`field-error`,e.id&&(t.id=`${e.id}-error`),n=c.querySelector(`.field-hint`),n&&(n.hidden=!0),c.insertBefore(t,[...c.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 vp(e,{mask:t,postFormatted:n=!1,onChange:r,onInvalidChange:i}={}){let a=sp(t);if(!a||!Yf.has(e.type))return()=>{};let o=Object.getPrototypeOf(e),s=Object.getOwnPropertyDescriptor(o,`value`).set,c=!e.hasAttribute(`inputmode`);c&&e.setAttribute(`inputmode`,a.inputMode);let l=i??_p(e),u=null,d=!1,f=!1,p=!1,m=``,h=``,g,_=()=>{let e=p?m:``;e!==h&&(h=e,l(h))},v=(t,n,i)=>{let o=a.extract(t.slice(0,n)).length,c=a.extract(t),{text:l,isRaw:d}=a.layout(c);if(e.value!==l&&(s.call(e,l),document.activeElement===e&&Yf.has(e.type))){let t=fp(d,o);e.setSelectionRange(t,t)}e.dataset.maskRaw=c,m=c&&!a.isValid(c)?a.message:``,e.setCustomValidity(m),_(),i&&c!==u&&r?.(c,l),u=c},y=Object.getOwnPropertyDescriptor(e,`value`),b=y??Object.getOwnPropertyDescriptor(o,`value`);Object.defineProperty(e,"value",{configurable:!0,enumerable:b.enumerable,get:()=>b.get.call(e),set:t=>{if(b.set.call(e,t),f)return;let n=cp(a,e.value);v(n,n.length,!0)}});let x=()=>{d=!0,e.dispatchEvent(new Event(`input`,{bubbles:!0})),d=!1},S=t=>{if(d||f||t.isComposing)return;let n=t.inputType===`insertText`&&(t.data?.length??0)<=1||t.inputType?.startsWith(`delete`)?e.value:cp(a,e.value);v(n,e.selectionStart??n.length,!0)},ee=()=>{f=!0},te=()=>{f=!1;let t=cp(a,e.value);v(t,e.selectionStart??t.length,!0),x()},C=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)&&(v(e.value.slice(0,o)+e.value.slice(o+1),n?o:r,!0),x()))},w=t=>{if(e.readOnly||e.disabled)return;let n=t.clipboardData?.getData(`text`);if(n==null)return;t.preventDefault();let r=cp(a,n),i=e.selectionStart??e.value.length,o=e.selectionEnd??i;v(e.value.slice(0,i)+r+e.value.slice(o),i+r.length,!0),x()},T=()=>{let t=a.extract(e.value);return a.post(t,a.layout(t).text)},E=()=>{p=!0,_()};e.addEventListener(`input`,S),e.addEventListener(`beforeinput`,C),e.addEventListener(`paste`,w),e.addEventListener(`compositionstart`,ee),e.addEventListener(`compositionend`,te),e.addEventListener(`blur`,E),e.addEventListener(`invalid`,E);let D=e.form,ne=t=>{e.name&&!e.disabled&&gp(t.formData,e.name,e.value,T())},re=()=>{clearTimeout(g),g=setTimeout(()=>{p=!1,v(cp(a,e.value),e.value.length,!0)},0)};n||(D?.addEventListener(`formdata`,ne),pp.set(e,T)),D?.addEventListener(`reset`,re),D?.addEventListener(`submit`,E);let ie=cp(a,e.value);return v(ie,ie.length,!1),()=>{clearTimeout(g),e.removeEventListener(`input`,S),e.removeEventListener(`beforeinput`,C),e.removeEventListener(`paste`,w),e.removeEventListener(`compositionstart`,ee),e.removeEventListener(`compositionend`,te),e.removeEventListener(`blur`,E),e.removeEventListener(`invalid`,E),D?.removeEventListener(`formdata`,ne),D?.removeEventListener(`reset`,re),D?.removeEventListener(`submit`,E),pp.delete(e),y?Object.defineProperty(e,"value",y):delete e.value,p=!1,m=``,_(),e.setCustomValidity(``),delete e.dataset.maskRaw,c&&e.removeAttribute(`inputmode`)}}function yp(){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=mp(e);return n===void 0?t.call(this,e):n},e.wuiMaskHook=!0}var bp=new WeakMap,xp,Sp=e=>{bp.has(e)||bp.set(e,vp(e,{mask:e.dataset.appMask,postFormatted:e.hasAttribute(`data-mask-post-formatted`)}))},Cp=e=>e.nodeType===1?[...e.matches(`input[data-app-mask]`)?[e]:[],...e.querySelectorAll(`input[data-app-mask]`)]:[];function wp(){xp||typeof MutationObserver>`u`||(xp=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Cp(e))bp.get(t)?.(),bp.delete(t);for(let e of t.addedNodes)for(let t of Cp(e))Sp(t)}}),xp.observe(document.documentElement,{childList:!0,subtree:!0}))}function Tp(e=document){yp();for(let t of e.querySelectorAll(`input[data-app-mask]`))Sp(t);e===document&&wp()}var Ep={minLength:10,uppercase:!0,lowercase:!0,digit:!0,special:!0,uniqueChars:0,customRules:[]},Dp=`Password requirements`;function Op(e){return e===!0||e==null?{...Ep}:{...Ep,...e}}function kp(e){let t=Op(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 Ap(e,t){let n=e==null?``:String(e);return kp(t).map(e=>({key:e.key,label:e.label,met:e.test(n)}))}function jp(e,t){return Ap(e,t).every(e=>e.met)}var Mp=`.table-wrap, .table-responsive, [class*="table-responsive-"]`,Np=1;function Pp(e){let t=()=>{let t=e.scrollWidth-e.clientWidth,n=Math.abs(e.scrollLeft);e.toggleAttribute(`data-wui-overflow-start`,t>Np&&n>Np),e.toggleAttribute(`data-wui-overflow-end`,t>Np&&n<t-Np),e.toggleAttribute(`data-wui-overflow-top`,e.scrollTop>Np)},n=()=>{if(e.scrollWidth-e.clientWidth>Np){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 Fp=new WeakMap,Ip,Lp=e=>{Fp.has(e)||Fp.set(e,Pp(e))},Rp=e=>e.nodeType===1?[...e.matches(`.table-wrap, .table-responsive, [class*="table-responsive-"]`)?[e]:[],...e.querySelectorAll(Mp)]:[];function zp(){Ip||typeof MutationObserver>`u`||(Ip=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Rp(e))Fp.get(t)?.(),Fp.delete(t);for(let e of t.addedNodes)for(let t of Rp(e))Lp(t)}}),Ip.observe(document.documentElement,{childList:!0,subtree:!0}))}function Bp(e=document){for(let t of e.querySelectorAll(Mp))Lp(t);e===document&&zp()}var Vp=`Select all rows`,Hp=`Select row`,$=`wui-select-cell`,Up=(e,t)=>{let n=e.createElement(`input`);return n.type=`checkbox`,n.className=`wui-check`,n.setAttribute(`aria-label`,t),n};function Wp(e=document){let t=e.createElement(`th`);return t.className=$,t.appendChild(Up(e,Vp)),t}function Gp(e=document){let t=e.createElement(`td`);return t.className=$,t.appendChild(Up(e,Hp)),t}function Kp(e=document){let t=e.createElement(`td`);return t.className=$,t}var qp=e=>e.firstElementChild?.classList.contains($),Jp=e=>e.matches(`.wui-group-row, .wui-virtual-spacer`);function Yp(e){for(let t of e)!qp(t)&&!Jp(t)&&t.insertBefore(Gp(t.ownerDocument),t.firstChild)}function Xp(e){let t=e.querySelector(`thead tr`);if(!t)return null;qp(t)||t.insertBefore(Wp(e.ownerDocument),t.firstChild),Yp(e.querySelectorAll(`tbody tr`));for(let t of e.querySelectorAll(`tfoot tr`))qp(t)||t.insertBefore(Kp(e.ownerDocument),t.firstChild);return t.querySelector(`.${$} .wui-check`)}function Zp(e){let t=e.querySelector(`thead .${$} .wui-check`),n=[...e.querySelectorAll(`tbody tr .wui-check`)],r=n.length,i=n.filter(e=>e.checked).length;t&&(t.checked=r>0&&i===r,t.indeterminate=i>0&&i<r);for(let t of e.querySelectorAll(`tbody tr`))t.classList.toggle(`is-selected`,!!t.querySelector(`.wui-check`)?.checked);return{selected:i,total:r}}var Qp=`tbody .${$} .wui-check`;function $p(e,t){let n=null,r=e=>e instanceof Element&&e.matches(`.wui-select-cell .wui-check`)&&!!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=[...e.querySelectorAll(Qp)],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 em=Object.freeze([`page`,`pageSize`,`sortBy`,`sortOrder`]),tm=`search`,nm=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`}),rm=5,im=new WeakMap,am=(e,t)=>{let n=Number(e);return Number.isInteger(n)?n:t},om=e=>({total:am(e.dataset.total,0),page:am(e.dataset.page,1),pageSize:am(e.dataset.pageSize,0),sortBy:e.dataset.sortBy||``,sortOrder:e.dataset.sortOrder===`desc`?`desc`:`asc`}),sm=(e,t)=>{e&&window.WUI?.toast?.(e,{variant:t})};function cm(e=document){let t=e.querySelectorAll?[...e.querySelectorAll(`[data-wui-server]`)]:[];e instanceof Element&&e.matches(`[data-wui-server]`)&&t.unshift(e);for(let e of t)im.has(e)||im.set(e,um(e))}function lm(e){let t=e instanceof Element?e.closest(`[data-wui-server]`):null;return t&&im.get(t)||null}function um(e){let t=e.querySelector(`.table-wrap`),n=t?.querySelector(`:scope > table`),r=e.dataset.src;if(!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=t.querySelector(`:scope > [data-wui-table-state]`),a=e.querySelector(`[data-wui-table-pager]`),o=e.querySelector(`[data-wui-table-status]`),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||nm.loading,errorText:e.dataset.errorText||nm.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=Xe(),m=new AbortController,h={signal:m.signal},g=n.querySelector(`:scope > tbody[data-wui-rows]`);if(!g)throw Error(`A server-paged table needs its rows in <app-table-rows> (tbody[data-wui-rows]).`);let _=om(g),v=null,y=null,b=e=>{let t=new URLSearchParams;for(let[n,r]of new URLSearchParams(e))l.has(n)||t.append(n,r);return t},x=e=>b(new URL(e,window.location.href).search),S=e=>{let t=e.toString();return`${window.location.pathname}${t?`?${t}`:``}${window.location.hash}`},ee=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},te=(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},C=te(s.urlState?b(window.location.search):new URLSearchParams,_);s.urlState&&S(C)!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&window.history.replaceState(window.history.state,``,S(C));let w=(e,n)=>t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:n})),T=e=>{o&&(o.textContent=e)},E=e=>{if(e.total===0)return nm.empty;let t=e.pageSize>0?Math.max(1,Math.ceil(e.total/e.pageSize)):1;return`Page ${e.page} of ${t}, ${e.total} ${e.total===1?`row`:`rows`}`},D=()=>[...n.querySelectorAll(`:scope > thead > tr:first-child > th`)],ne=e=>{if(u&&[...e.querySelectorAll(`:scope > tr`)].some(e=>!e.dataset.rowKey))throw Error(`A selectable server-paged table needs data-row-key on every row, so a selection can span pages.`)},re=t=>{let n=e.dataset.activeRowKey;if(n!==void 0)for(let e of t){let t=e.classList.contains(`wui-row-active`),r=n!==``&&e.dataset.rowKey===n;e.classList.toggle(`wui-row-active`,r),r?e.setAttribute(`aria-current`,`true`):t&&e.removeAttribute(`aria-current`)}},ie=e=>{if(u){Yp(e);for(let t of e){let e=t.querySelector(`.${$} .wui-check`);e&&(f&&d.add(t.dataset.rowKey),e.checked=d.has(t.dataset.rowKey))}Zp(n)}re(e);let t=D();if(n.classList.contains(`wui-table-stack`))for(let n of e)[...n.cells].forEach((e,n)=>{let r=t[n]?.textContent.trim();r&&!e.hasAttribute(`data-label`)&&e.setAttribute(`data-label`,r)});t.forEach((t,n)=>{if(t.classList.contains(`wui-col-hidden`))for(let t of e)t.cells[n]?.classList.add(`wui-col-hidden`)})},ae=e=>ie([...e.querySelectorAll(`:scope > tr`)]),oe=e=>{for(let t of e.querySelectorAll(`:scope > template[data-wui-pager], :scope > template[data-wui-empty], :scope > template[data-wui-filters]`))t.remove()},se=e=>e?.dispatchEvent(new CustomEvent(`wui:teardown`,{bubbles:!0})),ce=(e,t)=>{if(!i)return;let n=e.querySelector(`:scope > template[data-wui-empty]`);se(i),t.total===0&&n?(i.replaceChildren(n.content.cloneNode(!0)),i.hidden=!1):(i.replaceChildren(),i.hidden=!0)},le=e=>{let r=om(e),i=r.sortBy!==_.sortBy||r.sortOrder!==_.sortOrder?ea(g.rows):null;if(a){let t=e.querySelector(`:scope > template[data-wui-pager]`);se(a),a.replaceChildren(...t?[t.content.cloneNode(!0)]:[]),a.hidden=!1}ce(e,r);let o=e.querySelector(`:scope > template[data-wui-filters]`),c=s.filtersRegion&&o?document.querySelector(s.filtersRegion):null;c&&(se(c),c.replaceChildren(o.content.cloneNode(!0))),oe(e),se(g),n.replaceChild(e,g),g=e;let l=f&&r.total!==_.total;_=r,l&&(f=!1),t.removeAttribute(`data-wui-table-error`),ae(e),ve(),ta(e.rows,i),l&&be()},ue=e=>{let t=document.createElement(`template`);t.innerHTML=`<table>${e}</table>`;let n=t.content.querySelector(`tbody[data-wui-rows]`);return n&&ne(n),n?document.importNode(n,!0):null},de=e=>{let t=document.createElement(`tr`);for(let n=0;n<e;n++){let e=document.createElement(`td`),r=document.createElement(`span`);r.className=`skeleton`,r.setAttribute(`aria-hidden`,`true`),r.style.cssText=`display:block;width:${n===0?70:50}%;height:12px;border-radius:6px`,e.append(r),t.append(e)}return t},fe=()=>{if(g.querySelector(`:scope > tr:not([data-wui-skeleton])`))return;let e=Math.max(1,D().length);g.replaceChildren(...Array.from({length:rm},()=>{let t=de(e);return t.setAttribute(`data-wui-skeleton`,``),t})),t.removeAttribute(`data-wui-table-error`),i&&(i.hidden=!0)},pe=e=>{e?(t.setAttribute(`aria-busy`,`true`),fe()):t.removeAttribute(`aria-busy`)},me=e=>e===`forbidden`?nm.forbidden:e===`network`?nm.network:s.errorText,he=e=>{let n=me(e);if(t.setAttribute(`data-wui-table-error`,e),a&&(a.hidden=!0),i){let t=document.createElement(`div`);t.className=`tbl-empty wui-table-error`,t.setAttribute(`role`,`alert`);let r=document.createElement(`span`);r.className=`tbl-empty-icon`,r.innerHTML=R(e===`forbidden`?`lock`:`alert-circle`,{size:24});let a=document.createElement(`div`);a.className=`tbl-empty-title`,a.textContent=n;let o=document.createElement(`div`);o.className=`tbl-empty-action`;let s=document.createElement(`button`);s.type=`button`,s.className=`btn btn-outline-primary btn-sm`,s.setAttribute(`data-wui-table-retry`,``),s.textContent=nm.retry,o.append(s),t.append(r,a,o),se(i),i.replaceChildren(t),i.hidden=!1}T(n)},O=async(e,t=`none`)=>{let n=new URLSearchParams(e);v={query:n,mode:t},pe(!0),T(s.loadingText),w(`wui:table:loading`,{query:n.toString()});let r=await p.run(ee(n));if(r.kind===`aborted`||r.kind===`stale`||r.kind===`session`)return r;pe(!1);let i=null,a=r.ok?null:r.kind;if(r.ok){try{i=ue(r.html)}catch(e){console.error(e)}i||(a=`server`)}return a?(he(a),w(`wui:table:error`,{status:r.status,kind:a,message:me(a)}),r):(le(i),C=te(n,_),s.urlState&&t===`push`?window.history.pushState(window.history.state,``,S(C)):s.urlState&&t===`replace`&&window.history.replaceState(window.history.state,``,S(C)),T(E(_)),window.WUI?.refresh?.(),w(`wui:table:loaded`,{..._,query:C.toString()}),r)},ge=e=>(e.delete(`page`),e),_e=()=>[...n.querySelectorAll(`:scope > thead th[data-sort-key]`)],ve=()=>{for(let e of _e()){let t=e.dataset.sortKey===_.sortBy;e.setAttribute(`aria-sort`,t?_.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=R(`chevrons-up-down`,{size:14}),t?e.prepend(n):e.append(n)}let ye=e=>{let t=ge(new URLSearchParams(C)),n=_.sortBy===e&&_.sortOrder===`asc`?`desc`:`asc`;return t.set(`sortBy`,e),t.set(`sortOrder`,n),O(t,`push`)};n.addEventListener(`click`,e=>{let t=e.target.closest(`th[data-sort-key]`);t&&n.tHead?.contains(t)&&ye(t.dataset.sortKey)}),n.addEventListener(`keydown`,e=>{if(e.key!==`Enter`&&e.key!==` `)return;let t=e.target.closest?.(`th[data-sort-key]`);!t||!n.tHead?.contains(t)||(e.preventDefault(),ye(t.dataset.sortKey))});let be=()=>{Zp(n);let e=f?{selected:_.total,total:_.total,allMatching:f}:{selected:d.size,total:_.total};n.dispatchEvent(new CustomEvent(`selectionchange`,{bubbles:!0,detail:e}))};u&&($p(n,(e,t)=>{for(let n of e){let e=n.closest(`tr`)?.dataset.rowKey;e&&(t?d.add(e):d.delete(e))}t||(f=!1)}),n.addEventListener(`change`,e=>{let t=e.target;if(t.matches?.(`.wui-select-cell .wui-check`)){if(t.checked||(f=!1),n.tHead?.contains(t))for(let e of g.querySelectorAll(`:scope > tr`)){let n=e.querySelector(`.${$} .wui-check`);n&&(n.checked=t.checked,t.checked?d.add(e.dataset.rowKey):d.delete(e.dataset.rowKey))}else{let e=t.closest(`tr`)?.dataset.rowKey;if(!e)return;t.checked?d.add(e):d.delete(e)}be()}})),a&&(a.addEventListener(`click`,e=>{let t=e.target.closest(`a[href]`);!t||e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(e.preventDefault(),O(x(t.getAttribute(`href`)),`push`))}),a.addEventListener(`change`,e=>{!e.target.classList?.contains(`tpg-select`)||!e.target.value||(e.stopPropagation(),O(x(e.target.value),`push`))}));let xe=()=>{if(!s.searchInput)return null;let e=document.querySelector(s.searchInput);return e&&(e.matches(`input, textarea`)?e:e.querySelector(`input`))},k=()=>e.isConnected?!0:(m.abort(),clearTimeout(y),!1),Se=(e,t)=>{let n=t?.name?new FormData(e,t):new FormData(e),r=new Set([...e.querySelectorAll(`[name]`)].map(e=>e.getAttribute(`name`))),i=new URLSearchParams;for(let[e,t]of C)e!==`page`&&(em.includes(e)||!r.has(e))&&i.append(e,t);for(let[e,t]of n)typeof t!=`string`||t===``||em.includes(e)||l.has(e)||i.append(e,t);let a=xe();if(a){i.delete(tm);let e=a.value.trim();e&&i.set(tm,e)}return O(i,`push`)},Ce=e=>s.filtersForm&&e.closest?.(s.filtersForm)||s.filtersRegion&&e.closest?.(s.filtersRegion)||null;document.addEventListener(`submit`,e=>{!k()||!s.filtersForm||!(e.target instanceof HTMLFormElement)||!e.target.matches(s.filtersForm)||(e.preventDefault(),Se(e.target,e.submitter))},h),document.addEventListener(`change`,e=>{if(!k()||!s.filtersForm)return;let t=e.target.closest?.(s.filtersForm);!t||e.target===xe()||Se(t)},h);let we=(e,t)=>{if(!e)return;let n=e=>t.get(e)??``;for(let r of e.querySelectorAll(`input[name]:not([type=hidden])`))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 e.querySelectorAll(`select[name]`))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 t of e.querySelectorAll(`wui-select[name]`))t.value=n(t.getAttribute(`name`));for(let n of e.querySelectorAll(`wui-multiselect[name]`))n.values=t.getAll(n.getAttribute(`name`));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(!k())return;let t=e.target.closest?.(`a[href]`);if(!t||!Ce(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(x(n.href));we(t.closest(`form`),r),O(r,`push`)},h),document.addEventListener(`input`,e=>{if(!k())return;let t=xe();!t||e.target!==t||(clearTimeout(y),y=setTimeout(()=>{let e=ge(new URLSearchParams(C)),n=t.value.trim();n?e.set(tm,n):e.delete(tm),e.toString()!==C.toString()&&O(e,`replace`)},300))},h),s.urlState&&window.addEventListener(`popstate`,()=>{if(!k())return;let e=b(window.location.search),t=xe();t&&(t.value=e.get(`search`)??``),O(e,`none`)},h),document.addEventListener(`wui:modal:success`,()=>{k()&&s.refreshOnSuccess&&O(C,`none`)},h),i?.addEventListener(`click`,e=>{e.target.closest(`[data-wui-table-retry]`)&&v&&O(v.query,v.mode)});let Te=e=>[...g.rows].find(t=>t.dataset.rowKey===e)??null,Ee=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=[...t.content.querySelectorAll(`table > tbody > tr[data-row-key]`)];return n.length?n.map(e=>document.importNode(e,!0)):null},De=(e,t,n)=>{let r=n?e[0]:e.find(e=>e.dataset.rowKey===t.dataset.rowKey);if(!r)return null;let i=[];for(let n of e){let e=n===r?t:Te(n.dataset.rowKey);e&&(se(e),e.replaceWith(n),i.push(n))}return ie(i),window.WUI?.refresh?.(),r},Oe=e=>e.message||(e.kind===`forbidden`?nm.actionForbidden:nm.actionFailed),ke=e=>{e?.isConnected&&e.getAttribute(`data-wui-save-state`)===`saving`&&ca(e,null)},Ae=e=>{if(e instanceof HTMLTableRowElement)return e;let t=document.createElement(`template`);t.innerHTML=`<table><tbody>${String(e)}</tbody></table>`;let n=t.content.querySelector(`table > tbody > tr`);if(!n)throw Error("saveRow's `row` is the row as it will read: a <tr> element or its HTML.");return document.importNode(n,!0)},je=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:Te(String(a));if(!s&&!c)throw Error(`saveRow found no row with data-row-key="${a}" on this page.`);let l=D().filter(e=>!e.classList.contains($)).length,u=o?Ae(o):c??de(Math.max(1,l));c&&u!==c?c.replaceWith(u):c||g.insertBefore(u,g.firstChild),u!==c&&ie([u]),i&&!t.hasAttribute(`data-wui-table-error`)&&(i.hidden=!0),ca(u,`saving`);let d=sa(u),f=await j(e,{method:n.toUpperCase(),body:r});if(f.kind===`session`)return!1;if(f.ok){let e=Ee(f.html),t=e&&u.isConnected?De(e,u,s):null;return t?T(W.saved(sa(t)||d)):(await O(C,`none`),ke(u)),sm(f.message,f.toastVariant||`success`),w(`wui:table:saved`,{key:t?.dataset.rowKey??(s?null:String(a)),added:s,status:f.status}),!0}let p=Oe(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&&ca(m,`error`,p),f.kind!==`aborted`&&sm(p,`danger`),T(W.notSaved(d,p)),w(`wui:table:failed`,{key:s?null:String(a),added:s,status:f.status,kind:f.kind,message:p}),!1},Me=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=e.closest(`tr`),r=n?.dataset.rowKey??null,i=e.dataset.wuiRowAction||``,a=n?sa(n):``;e.disabled=!0,e.setAttribute(`aria-busy`,`true`),n&&ca(n,`saving`);let o=await j(t,{method:(e.dataset.method||`post`).toUpperCase()});if(e.disabled=!1,e.removeAttribute(`aria-busy`),o.kind===`session`||o.kind===`aborted`){ke(n);return}if(o.ok){sm(o.message,o.toastVariant||`success`);let e=n?.isConnected?Ee(o.html):null,t=e?De(e,n,!1):null;t?T(W.saved(sa(t)||a)):(await O(C,`none`),ke(n))}else{let e=Oe(o);sm(e,`danger`),n?.isConnected&&ca(n,`error`,e),T(W.notSaved(a,e))}w(`wui:table:action`,{action:i,key:r,ok:o.ok,status:o.status})};return n.addEventListener(`click`,e=>{let t=e.target.closest(`[data-wui-row-action]`);!t||!g.contains(t)||t.disabled||(e.preventDefault(),Me(t))}),ne(g),oe(g),u&&Xp(n),ae(g),ve(),{el:e,reload:()=>O(C,`none`),query:()=>new URLSearchParams(C),setQuery:e=>{let t=new URLSearchParams(C);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`),O(t,`push`)},saveRow:je,setActiveRow:t=>{e.dataset.activeRowKey=t==null?``:String(t),re([...g.querySelectorAll(`:scope > tr`)])},selection:{keys:()=>[...d],count:()=>f?_.total:d.size,allMatching:()=>f,selectAllMatching:()=>{f=!0;for(let e of g.querySelectorAll(`:scope > tr`)){let t=e.querySelector(`.${$} .wui-check`);t&&(t.checked=!0),e.dataset.rowKey&&d.add(e.dataset.rowKey)}be()},clear:()=>{f=!1,d.clear();for(let e of g.querySelectorAll(`:scope > tr > .${$} .wui-check`))e.checked=!1;be()}}}}var dm=`wuiConfirm`,fm=Object.freeze([`danger`]),pm=Object.freeze([`success`,`info`,`warning`,`danger`]),mm=`wui.flash`,hm=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.`}),gm=new WeakSet,_m=new WeakSet,vm=null,ym=null,bm=!1,xm=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},Sm=(e,t)=>{e&&window.WUI?.toast?.(e,{variant:t})},Cm=()=>{let e=window.bootstrap?.Modal;if(!e)throw Error(`data-wui-confirm: Bootstrap's bundle (window.bootstrap) is not loaded on this page.`);return e};function wm(){let e=document.getElementById(dm);return e||(e=document.createElement(`div`),e.id=dm,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`,`${tt.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="btn btn-secondary" data-bs-dismiss="modal">${xm(hm.cancelLabel)}</button><button type="button" class="btn btn-primary" data-app-confirm></button></div></div></div></div>`,document.body.appendChild(e),e)}function Tm(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!fm.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);Em({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 Em({title:e,message:t,label:n,danger:r},i){let a=Cm(),o=wm(),s=o.querySelector(`.wui-confirm-title`),c=o.querySelector(`[data-app-confirm]`);if(!s||!c)throw Error(`#${dm} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${dm}"> 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)),s.textContent=e||hm.confirmTitle,l.textContent=t,c.textContent=n||hm.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`,s.textContent),ym=i,bm=!1,a.getOrCreateInstance(o).show()}var Dm=(e,t)=>{vm=e;try{t()}finally{vm=null}};function Om(e,{title:t,message:n,label:r,tone:i},a){if(i!=null&&!fm.includes(i))throw TypeError(`confirmAction: tone "${i}" is not supported. Use danger, or leave it off.`);Vm(e.ownerDocument),Em({title:t,message:n,label:r,danger:i===`danger`},()=>Dm(e,a))}var km=e=>e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`;function Am(e){let t=e.target.closest?.(`[data-wui-confirm]:not(form)`);!t||t===vm||km(t)||(e.preventDefault(),e.stopImmediatePropagation(),Tm(t,()=>Dm(t,()=>t.click())))}function jm(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===vm||e.submitter&&e.submitter===vm)return;e.preventDefault(),e.stopImmediatePropagation();let n=e.submitter?.form===t?e.submitter:void 0;Tm(t,()=>Dm(t,()=>t.requestSubmit(n)))}function Mm(e){let t=e.target.closest?.(`#${dm} [data-app-confirm]`);!t||t.disabled||!ym||(bm=!0,Cm().getOrCreateInstance(t.closest(`#${dm}`)).hide())}function Nm(e){if(e.target.id!==`wuiConfirm`)return;let t=bm?ym:null;ym=null,bm=!1,t?.()}var Pm=(e,t)=>{e&&window.sessionStorage.setItem(mm,JSON.stringify({message:e,variant:t}))},Fm=e=>e===`forbidden`?hm.forbidden:e===`network`?hm.network:hm.failed;function Im(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.dataset.refreshOnSuccess!==`false`&&lm(e)?.reload()}async function Lm(e){let t=e.getAttribute(`data-wui-post`);if(!t)throw Error(`A data-wui-post button needs the URL the action posts to.`);let n=e.getAttribute(`data-wui-post-reload`);if(n!==null&&n!==`page`)throw TypeError(`data-wui-post-reload="${n}" is not supported. Use page, or leave it off to reload the server tables.`);e.disabled=!0,e.setAttribute(`aria-busy`,`true`);let r=await j(t,{method:`POST`});if(r.kind===`session`||r.kind===`aborted`)return;let i=r.toastVariant||`success`;if(r.ok&&(r.redirect||n===`page`)){Pm(r.message,i),r.redirect?window.location.assign(r.redirect):window.location.reload();return}if(e.disabled=!1,e.removeAttribute(`aria-busy`),r.ok){Sm(r.message,i),Im();return}Sm(r.message||Fm(r.kind),`danger`)}function Rm(e){let t=e.target.closest?.(`[data-wui-post]`);t&&(e.preventDefault(),!(km(t)||t.getAttribute(`aria-busy`)===`true`)&&Lm(t).catch(e=>console.error(e)))}function zm(){let e=window.sessionStorage.getItem(mm);if(!e)return;window.sessionStorage.removeItem(mm);let{message:t,variant:n}=JSON.parse(e);Sm(t,n)}function Bm(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(!pm.includes(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${pm.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||e.textContent.trim();e.remove(),Sm(n,t)}}function Vm(e){_m.has(e)||(_m.add(e),e.addEventListener(`click`,Mm),e.addEventListener(`hidden.bs.modal`,Nm))}function Hm(e=document){let t=e.ownerDocument||e;gm.has(t)||(gm.add(t),t.addEventListener(`click`,Am,!0),t.addEventListener(`submit`,jm,!0),Vm(t),t.addEventListener(`click`,Rm),zm()),Bm(e)}var Um=31536e3,Wm=new WeakMap,Gm=e=>e>99?`99+`:String(e);function Km(e,t,n=document){n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${Um}; SameSite=Lax`}var qm=e=>{let t=document.createElement(`template`);return t.innerHTML=e,t.content},Jm=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function Ym(e,t){let n=e.querySelector(`.wui-bell-trigger`),r=e.querySelector(`.wui-bell-count`),i=e.querySelector(`[data-wui-bell-live]`),a=e.querySelector(`[data-wui-bell-list]`),o=e.querySelector(`.wui-bell-menu`),{src:s,readAction:c}=e.dataset,l=e.dataset.label||`Notifications`,u=e.dataset.emptyText||`You are all caught up.`,d=Number(e.dataset.pollSeconds??60),f=Xe(),p=Number(e.dataset.unread)||0,m=(t,a=!0)=>{let o=Math.max(0,Number(t)||0),s=o!==p;p=o,e.dataset.unread=String(o),r&&(r.textContent=Gm(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?l:`${l}, ${Gm(o)} unread`),a&&s&&i&&(i.textContent=o===0?`No unread notifications`:`${Gm(o)} unread notifications`)},h=()=>o?.classList.contains(`show`)??!1,g=()=>{let e=Jm(`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),a.replaceChildren(e)},_=async t=>{t&&(a.setAttribute(`aria-busy`,`true`),a.querySelector(`.wui-bell-item`)||a.replaceChildren(Jm(`wui-bell-state`,`Loading…`)));let n=await f.run(s);if(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)return;if(a.removeAttribute(`aria-busy`),!n.ok){t&&g();return}let r=qm(n.html),i=r.querySelector(`[data-wui-unread]`),o=i?Number(i.getAttribute(`data-wui-unread`)):p;m(o),(t||h())&&(r.querySelector(`.wui-bell-item`)?a.replaceChildren(r):a.replaceChildren(Jm(`wui-bell-state`,u))),e.dispatchEvent(new CustomEvent(`wui:notifications:loaded`,{bubbles:!0,detail:{unread:o}}))};e.addEventListener(`show.bs.dropdown`,()=>_(!0)),e.addEventListener(`click`,async e=>{if(e.target.closest(`[data-wui-bell-retry]`)){_(!0);return}let t=e.target.closest(`[data-wui-bell-read]`);if(!t||!c)return;t.disabled=!0;let n=await j(c,{method:`POST`});t.disabled=!1,n.ok&&(m(0),_(!0))});let v=null,y=()=>{d>0&&v===null&&(v=setInterval(()=>_(h()),d*1e3))},b=()=>{v!==null&&clearInterval(v),v=null},x=()=>{document.hidden?b():(_(h()),y())};return d>0&&(document.addEventListener(`visibilitychange`,x),document.hidden||y()),t.push(()=>{b(),f.abort(),document.removeEventListener(`visibilitychange`,x)}),{setUnread:e=>m(e),refresh:()=>_(h())}}var Xm=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),Zm=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function Qm(e,t){let n=e.querySelector(`input.search-input`),r=e.querySelector(`.wui-topsearch-results`),i=e.querySelector(`.wui-topsearch-open`),a=e.querySelector(`[data-wui-topsearch-live]`),{src:o,param:s=`q`,resultsHref:c}=e.dataset,l=Number(e.dataset.minChars??2),u=Number(e.dataset.debounceMs??250),d=Xe(),f=null,p=-1,m=()=>[...r.querySelectorAll(`.wui-topsearch-hit`)],h=e=>{let t=m();p=t.length===0?-1:(e+t.length)%t.length,t.forEach((e,t)=>{let n=t===p;e.classList.toggle(`is-active`,n),e.setAttribute(`aria-selected`,n?`true`:`false`)}),p>=0?(n.setAttribute(`aria-activedescendant`,t[p].id),t[p].scrollIntoView?.({block:`nearest`})):n.removeAttribute(`aria-activedescendant`)},g=()=>{r.hidden=!0,n.setAttribute(`aria-expanded`,`false`),n.removeAttribute(`aria-activedescendant`),p=-1},_=()=>{r.hidden=!1,n.setAttribute(`aria-expanded`,`true`)},v=t=>{e.classList.toggle(`is-open`,t),i?.setAttribute(`aria-expanded`,t?`true`:`false`)},y=t=>{let n=new CustomEvent(`wui:search:select`,{bubbles:!0,cancelable:!0,detail:{href:t}});e.dispatchEvent(n)&&window.location.assign(t)},b=async t=>{e.classList.add(`is-loading`);let n=await d.run(Zm(o,s,t));if(!(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)){if(e.classList.remove(`is-loading`),n.ok){let e=qm(n.html),t=e.querySelector(`[data-wui-count]`);r.replaceChildren(e),m().forEach((e,t)=>{e.id=`${r.id}-opt-${t}`});let i=t?Number(t.getAttribute(`data-wui-count`)):m().length;a&&(a.textContent=i===0?`No results`:`${i} ${i===1?`result`:`results`}`)}else r.replaceChildren(Jm(`wui-topsearch-empty`,`Search is unavailable right now.`));p=-1,_()}};n.addEventListener(`input`,()=>{clearTimeout(f);let t=n.value.trim();if(t.length<l){d.abort(),e.classList.remove(`is-loading`),r.replaceChildren(),g();return}f=setTimeout(()=>b(t),u)}),n.addEventListener(`keydown`,t=>{if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(r.hidden||m().length===0)return;t.preventDefault(),h(p+(t.key===`ArrowDown`?1:-1))}else if(t.key===`Enter`){let e=m();!r.hidden&&p>=0&&e[p]?(t.preventDefault(),y(e[p].getAttribute(`href`))):c&&n.value.trim()!==``&&(t.preventDefault(),y(Zm(c,s,n.value.trim())))}else t.key===`Escape`&&(r.hidden?e.classList.contains(`is-open`)&&(t.preventDefault(),t.stopPropagation(),v(!1),i?.focus()):(t.preventDefault(),t.stopPropagation(),g()))}),r.addEventListener(`click`,e=>{let t=e.target.closest(`.wui-topsearch-hit`);!t||e.ctrlKey||e.metaKey||e.shiftKey||e.button===1||(e.preventDefault(),y(t.getAttribute(`href`)))}),i?.addEventListener(`click`,()=>{let t=!e.classList.contains(`is-open`);v(t),t&&n.focus()});let x=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||Xm(e.target)||(e.preventDefault(),v(!0),n.focus())},S=t=>{e.contains(t.target)||(g(),e.classList.contains(`is-open`)&&v(!1))};document.addEventListener(`keydown`,x),document.addEventListener(`pointerdown`,S),t.push(()=>{clearTimeout(f),d.abort(),document.removeEventListener(`keydown`,x),document.removeEventListener(`pointerdown`,S)})}function $m(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>Km(n,!!e.detail?.collapsed)),e.addEventListener(`click`,t=>{t.target.closest(`[data-wui-tabbar-more]`)&&e.querySelector(`[data-app-shell-menu]`)?.click()});let r=e.querySelector(`[data-wui-bell]`),i=r?Ym(r,t):null,a=e.querySelector(`[data-wui-topsearch]`);a&&Qm(a,t);let o={el:e,setUnread(e){if(!i)throw Error(`WUI.shell: this <app-shell> has no <app-shell-notifications>.`);i.setUnread(e)},refreshNotifications(){if(!i)throw Error(`WUI.shell: this <app-shell> has no <app-shell-notifications>.`);return i.refresh()},get collapsed(){return e.classList.contains(`collapsed`)},set collapsed(t){if(!!t===e.classList.contains(`collapsed`))return;let n=e.querySelector(`[data-app-shell-collapse]`);n?n.click():e.classList.toggle(`collapsed`,!!t)}};Wm.set(e,o);let s=n=>{if(n.target===e||n.target.contains?.(e)){for(let e of t)e();Wm.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,s)}};return document.addEventListener(`wui:teardown`,s),o}function eh(e=document){let t=[];e instanceof Element&&e.matches(`[data-app-shell]`)&&t.push(e),t.push(...e.querySelectorAll(`[data-app-shell]`));for(let e of t)e.dataset.wuiPartsWired||(e.dataset.wuiPartsWired=`1`,$m(e))}function th(e){let t=e?.closest?.(`[data-app-shell]`)??null;return t?(Wm.has(t)||eh(t),Wm.get(t)??null):null}var nh=[`light`,`dark`,`auto`],rh=[`wave`,`circle`,`slide`,`blinds`,`fade`,`none`],ih=`wave`,ah=`theme`,oh={wave:1100,circle:700,slide:600,blinds:900,fade:350,none:0},sh=`wui-theme-switching`,ch=`wui:theme:change`,lh=`wui-theme-toggle`,uh=`(prefers-color-scheme: dark)`,dh=e=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(e).matches,fh=e=>nh.includes(e);function ph(e){return e===`dark`||e===`auto`&&dh(uh)?`dark`:`light`}function mh(e=ah){let t=null;try{t=window.localStorage.getItem(e)}catch{}return fh(t)?t:`auto`}function hh(e,t=ah){try{window.localStorage.setItem(t,e)}catch{}}function gh(e){let t=document.documentElement,n=ph(e);t.setAttribute(`data-theme`,e),t.setAttribute(`data-bs-theme`,n),document.dispatchEvent(new CustomEvent(ch,{detail:{mode:n,preference:e}}))}var _h=`(function(k){var m;try{m=localStorage.getItem(k)}catch{}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 vh(e=ah){return`${_h}${JSON.stringify(String(e)).replace(/</g,`\\u003c`)})`}function yh(e,{includeAuto:t=!1}={}){return e===`light`?`dark`:e===`dark`&&t?`auto`:`light`}function bh(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(uh),n=()=>e(t.matches?`dark`:`light`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var xh=60,Sh=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,Ch=e=>e.toFixed(1),wh=(e,t)=>`${Ch(e)}px ${Ch(t)}px`,Th={amplitude:22,segments:36,cycles:1.5,ripples:2},Eh=6,Dh=(e,t,n,r,i)=>{let{amplitude:a,segments:o,cycles:s}=Th,c=n*(t+2*a),l=i?t+a-c:c-a,u=i?t+2*a:-2*a,d=[wh(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(wh(n,i))}return d.push(wh(e,u)),`polygon(${d.join(`, `)})`},Oh=(e,t,n,r)=>{let i=t/Eh,a=[];for(let t=0;t<Eh;t++){let o=t*i,s=i*n,c=r?o+i-s:o,l=r?o+i:o+s;a.push(wh(0,c),wh(e,c),wh(e,l),wh(0,l))}return`polygon(${a.join(`, `)})`};function kh(e,{width:t,height:n,to:r=`dark`,origin:i}={}){let a=r===`dark`,o=[];for(let r=0;r<=xh;r++){let s=r/xh,c=Sh(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(${Ch(a*c)}px at ${Ch(e)}px ${Ch(r)}px)`});break}case`slide`:{let e=n*(1-c);o.push({clipPath:a?`inset(${Ch(e)}px 0px 0px 0px)`:`inset(0px 0px ${Ch(e)}px 0px)`});break}case`blinds`:o.push({clipPath:Oh(t,n,c,a)});break;case`fade`:o.push({clipPath:`none`,opacity:c});break;case`none`:return[];default:o.push({clipPath:Dh(t,n,c,s*Th.ripples*2*Math.PI,a)})}}return o}function Ah(e,{effect:t=ih,to:n,origin:r,duration:i,live:a}={}){let o=document.documentElement,s=n!==void 0&&o.getAttribute(`data-bs-theme`)===n;if(t===`none`||s||dh(`(prefers-reduced-motion: reduce)`)||typeof document.startViewTransition!=`function`||typeof o.animate!=`function`)return e(),Promise.resolve(!1);o.classList.add(sh);let c=a instanceof Element?a:null;c&&(c.style.viewTransitionName=lh);let l=document.startViewTransition(e),u=i??oh[t]??oh.wave;return l.ready.then(()=>{let e=kh(t,{width:window.innerWidth,height:window.innerHeight,to:n,origin:r});o.animate(e,{duration:u,easing:`linear`,fill:`both`,pseudoElement:`::view-transition-new(root)`})}).catch(()=>{}),l.finished.catch(()=>{}).then(()=>(o.classList.remove(sh),c&&(c.style.viewTransitionName=``),!0))}var jh=Object.freeze({title:`Leave without saving?`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,leaveLabel:`Leave`}),Mh=`form[data-wui-unsaved]`,Nh=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,Ph=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,Fh=new Set([`submit`,`button`,`reset`,`image`]),Ih=new WeakMap,Lh=new WeakSet,Rh=e=>`${e.name}:${e.size}:${e.lastModified}`;function zh(e){let t=[];for(let n of e.elements)!n.name||n.disabled||Fh.has(n.type)||(n.type===`checkbox`||n.type===`radio`?t.push([n.name,n.value,n.checked]):n.type===`file`?t.push([n.name,[...n.files||[]].map(Rh)]):n.type===`select-multiple`?t.push([n.name,[...n.selectedOptions].map(e=>e.value)]):t.push([n.name,n.value]));return JSON.stringify(t)}var Bh=e=>({saved:e.querySelector(Nh)?null:zh(e),engaged:!1,discarded:!1});function Vh(e){let t=Ih.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&zh(e)!==t.saved}var Hh=(e,t)=>[...e.querySelectorAll(Mh)].filter(e=>e!==t&&Vh(e)),Uh=()=>!!window.bootstrap?.Modal;function Wh(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||jh.message;Om(e,{title:jh.title,message:r,label:jh.leaveLabel,tone:`danger`},()=>{for(let e of t)Ih.get(e).discarded=!0;n()})}function Gh(e){if(e.matches(Ph))return!1;let t=e.getAttribute(`target`);if(t&&t.toLowerCase()!==`_self`)return!1;let n=new URL(e.getAttribute(`href`),window.location.href);if(n.protocol!==`http:`&&n.protocol!==`https:`)return!1;let r=window.location;return!(n.hash&&n.origin===r.origin&&n.pathname===r.pathname&&n.search===r.search)}function Kh(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 qh(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target.closest?.(`a[href]`);if(!t||!Gh(t))return;let n=Hh(t.ownerDocument,null);!n.length||!Uh()||(e.preventDefault(),Wh(t,n,()=>t.click()))}function Jh(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!Kh(t,e.submitter))return;let n=Hh(t.ownerDocument,t);if(n.length&&Uh()){e.preventDefault();let r=e.submitter?.form===t?e.submitter:void 0;Wh(t,n,()=>t.requestSubmit(r));return}let r=Ih.get(t);r&&(r.saved=zh(t),r.discarded=!1)}function Yh(e){Hh(document,null).length&&(e.preventDefault(),e.returnValue=``)}function Xh(e){let t=e.target.closest?.(Mh),n=t&&Ih.get(t);!n||n.engaged||(n.saved!==null&&(n.saved=zh(t)),n.engaged=!0)}function Zh(e){let t=e.target.closest?.(Mh),n=t&&Ih.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function Qh(e){let t=e.detail?.handle?.el;if(t instanceof Element)for(let e of t.querySelectorAll(Mh))eg(e)}function $h(e=document){let t=e.ownerDocument||e;if(!Lh.has(t)){Lh.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,Xh,!0);for(let e of[`input`,`change`])t.addEventListener(e,Zh,!0);t.addEventListener(`click`,qh),t.addEventListener(`submit`,Jh),t.addEventListener(`wui:modal:success`,Qh),t.defaultView.addEventListener(`beforeunload`,Yh)}let n=[...e.querySelectorAll?.(Mh)||[]];e.matches?.(Mh)&&n.unshift(e);for(let e of n)Ih.has(e)||Ih.set(e,Bh(e))}function eg(e){if(!(e instanceof HTMLFormElement)||!e.matches(Mh))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);Ih.set(e,{saved:zh(e),engaged:!1,discarded:!1})}function tg(){de(),t(`wui-select`,Ti),t(`wui-country-select`,ki),t(`wui-phone`,dl),t(`wui-datepicker`,Ea),t(`wui-date-range`,La),t(`wui-dock`,Ra),t(`wui-image-crop`,zo),t(`wui-kanban`,Pn),t(`wui-inline-edit`,$o),t(`wui-consent-banner`,si),t(`wui-slider`,iu),t(`wui-sortable`,hu),t(`wui-timepicker`,Du),t(`wui-tour`,nf),t(`wui-tree`,df),t(`wui-autocomplete`,ir),t(`wui-command-palette`,Br),t(`wui-context-menu`,Si),t(`wui-multiselect`,Ks),t(`wui-taginput`,vu),t(`wui-otp`,Nc),t(`wui-status-icon`,Rn),t(`wui-shortcuts`,$l),t(`wui-record-pager`,vl),t(`wui-carousel`,cr),t(`wui-code-block`,Ar),t(`wui-data-table`,ga),t(`wui-drawer`,Za),t(`wui-hover-card`,io),t(`wui-lightbox`,ps),t(`wui-menubar`,zs),t(`wui-navigation-menu`,ac),t(`wui-notification-center`,Cc),t(`wui-onboarding-checklist`,Ac),t(`wui-overflow`,Hc),t(`wui-rating`,_l),t(`wui-relative-time`,jl),t(`wui-resizable`,Yl),t(`wui-rolling-number`,Ql),t(`wui-show-more`,ru),t(`wui-truncate`,ff),t(`wui-whats-new`,vf),t(`wui-mention-input`,Ns),t(`wui-comment-thread`,Yr),t(`wui-wizard-step`,wf),t(`wui-wizard`,xf)}return tg(),e.AVATAR_ACCEPT=Tf,e.AVATAR_MAX_SIZE_MB=Ef,e.AVATAR_OUTPUT_SIZE=Df,e.AVATAR_OUTPUT_TYPE=Of,e.AVATAR_PREVIEW_SIZES=kf,e.AVATAR_TEXT=Af,e.COLUMN_MAX_WIDTH=ji,e.COLUMN_MIN_WIDTH=Ai,e.COMMENT_INTENTS=Hr,e.COMMENT_REACTIONS=Vr,e.COMMENT_TEXT=V,e.CONFIRM_DIALOG_ID=dm,e.CONFIRM_TONES=fm,e.COPY_FEEDBACK_MS=Or,e.CSRF_META_NAME=Be,e.CURRENCIES=pe,e.DATA_TABLE_TEXT=W,e.DATE_PATTERNS=O,e.DEFAULT_CSRF_HEADER=Ve,e.DEFAULT_IMAGE_ACCEPT=Pf,e.DEFAULT_MAX_SIZE_MB=Ff,e.DEFAULT_PASSWORD_RULES=Ep,e.DEFAULT_REQUIREMENTS_TITLE=Dp,e.DEFAULT_THEME_EFFECT=ih,e.DEFAULT_THEME_STORAGE_KEY=ah,e.DURATION_UNITS=he,e.EMPTY_VALUE=_e,e.FILTER_POPOVER_MAX_CHIPS=D,e.FLASH_STORAGE_KEY=mm,e.FLASH_VARIANTS=pm,e.FORMAT_STYLES=fe,e.HTTP_KINDS=Ue,e.INLINE_EDIT_SAVED_MS=Vo,e.INLINE_EDIT_TEXT=Ho,e.INLINE_EDIT_TYPES=Bo,e.IST_TIME_ZONE=ge,e.KANBAN_DRAG_THRESHOLD_PX=rn,e.KANBAN_LONG_PRESS_MS=nn,e.KANBAN_PHONE_QUERY=tn,e.KANBAN_STORAGE_PREFIX=en,e.KANBAN_SUMMARY_FORMATS=$t,e.KANBAN_TEXT=N,e.KANBAN_TONES=Qt,e.LIST_KEYS=p,e.MASK_INPUT_TYPES=Yf,e.MASK_NAMES=rp,e.MENTION_ID_PATTERN=ms,e.MENTION_MAX_QUERY=ws,e.MENTION_MAX_RESULTS=Cs,e.MENTION_TEXT=Ts,e.MONEY_UNITS=me,e.NOTIFICATION_COUNT_CAP=oc,e.NOTIFICATION_TEXT=cc,e.PIN_AT_VAR=Gi,e.PIN_SIDES=Pi,e.RESIZE_STEP=Mi,e.RESIZE_STEP_LARGE=Ni,e.ROW_HEIGHTS=Ii,e.ROW_MOVE_LIMIT=Yi,e.ROW_MOVE_MS=Xi,e.ROW_SAVE_ATTR=ia,e.ROW_SAVE_ERROR_CLASS=aa,e.ROW_SAVE_STATES=ra,e.SCROLL_EDGE_SELECTOR=Mp,e.SELECT_ALL_LABEL=Vp,e.SELECT_CELL_CLASS=$,e.SELECT_KEY=m,e.SELECT_ROW_LABEL=Hp,e.SERVER_ACTION_TEXT=hm,e.SHORTCUTS_OFF_ATTRIBUTE=l,e.SHORTCUT_EVENT=d,e.SHORTCUT_SCOPE_ATTRIBUTE=u,e.SHORTCUT_TEXT=f,e.STATUS_TONES=Ln,e.THEME_BOOT_SCRIPT_BODY=_h,e.THEME_CHANGE_EVENT=ch,e.THEME_EFFECTS=rh,e.THEME_EFFECT_DURATION=oh,e.THEME_LIVE_NAME=lh,e.THEME_MODES=nh,e.THEME_SWITCHING_CLASS=sh,e.UNSAVED_TEXT=jh,e.VIRTUAL_OVERSCAN=Fi,e.WHATS_NEW_READ_EVENT=pf,e.WUI_HEADERS=A,e.WuiAutocomplete=ir,e.WuiCarousel=cr,e.WuiCodeBlock=Ar,e.WuiCommandPalette=Br,e.WuiCommentThread=Yr,e.WuiConsentBanner=si,e.WuiContextMenu=Si,e.WuiCountrySelect=ki,e.WuiDataTable=ga,e.WuiDatePicker=Ea,e.WuiDateRange=La,e.WuiDock=Ra,e.WuiDrawer=Za,e.WuiHoverCard=io,e.WuiImageCrop=zo,e.WuiInlineEdit=$o,e.WuiKanban=Pn,e.WuiLightbox=ps,e.WuiMentionInput=Ns,e.WuiMenubar=zs,e.WuiMultiSelect=Ks,e.WuiNavigationMenu=ac,e.WuiNotificationCenter=Cc,e.WuiOnboardingChecklist=Ac,e.WuiOtp=Nc,e.WuiOverflow=Hc,e.WuiPhone=dl,e.WuiRating=_l,e.WuiRecordPager=vl,e.WuiRelativeTime=jl,e.WuiResizable=Yl,e.WuiRollingNumber=Ql,e.WuiSelect=Ti,e.WuiShortcuts=$l,e.WuiShowMore=ru,e.WuiSlider=iu,e.WuiSortable=hu,e.WuiStatusIcon=Rn,e.WuiTagInput=vu,e.WuiTimePicker=Du,e.WuiTour=nf,e.WuiTree=df,e.WuiTruncate=ff,e.WuiWhatsNew=vf,e.WuiWizard=xf,e.WuiWizardStep=wf,e.acceptLabel=Uf,e.addRowSelectCells=Yp,e.addSelectColumn=Xp,e.applyTheme=gh,e.ariaKeyShortcuts=ee,e.attachInputMask=vp,e.attachScrollEdges=Pp,e.attachShiftRange=$p,e.avatarCropOptions=Nf,e.avatarUnreadableMessage=Mf,e.buildPasswordRules=kp,e.clampColumnWidth=Ri,e.classifyStatus=qe,e.confirmAction=Om,e.copyTextToClipboard=kr,e.createLocalSeenStore=Xd,e.createRequestQueue=Xe,e.createSelectHeaderCell=Wp,e.createSelectRowCell=Gp,e.createSelectSpacerCell=Kp,e.defineWeborityElements=tg,e.evaluatePassword=Ap,e.formatCompact=Ne,e.formatCurrency=je,e.formatDate=Re,e.formatDuration=Fe,e.formatMasked=dp,e.formatNumber=Ae,e.formatPercent=Pe,e.formatRelativeTime=Cl,e.formatValue=ze,e.getServerTable=lm,e.getShell=th,e.glyphSvg=R,e.groupCount=Li,e.groupItems=zi,e.groupNotificationsByDay=mc,e.identityCell=oa,e.inShortcutScope=w,e.initInputMasks=Tp,e.initRemoteModals=Yt,e.initScrollEdges=Bp,e.initServerActions=Hm,e.initServerTables=cm,e.initShellParts=eh,e.initUnsavedChanges=$h,e.inlineEditText=Uo,e.isHeicFile=jf,e.isImageFile=Bf,e.isImageOnlyAccept=Hf,e.isMaskPattern=ap,e.isPdfFile=Vf,e.isTypingTarget=te,e.kanbanCardLabel=F,e.kanbanOverflow=Dn,e.kanbanStorageKey=On,e.kanbanSummaryFormat=jn,e.kanbanVisibleLimit=En,e.loadRemoteDrawer=Zt,e.loadRemoteModal=Xt,e.maskedPostValue=mp,e.matchSegments=jr,e.matchesAccept=Wf,e.measureRows=ea,e.mentionLabel=_s,e.mentionTextFromValue=bs,e.mentionValueFromText=xs,e.mentionedIds=Ss,e.moveFocus=E,e.nextTheme=yh,e.notificationCountText=lc,e.notificationDayHeading=pc,e.notificationTime=fc,e.notificationTriggerLabel=uc,e.notificationUnreadAnnouncement=dc,e.parseMentionValue=ys,e.passwordSatisfies=jp,e.pinAtValue=Ki,e.pinClasses=Ji,e.pinOffsetVar=Wi,e.planPins=qi,e.playRowMoves=ta,e.postedMasked=up,e.rawMasked=lp,e.readColumnWidths=Hi,e.readCsrf=Ge,e.readKanbanCollapsed=kn,e.readStoredTheme=mh,e.relativeTimeTitle=wl,e.resetUnsavedChanges=eg,e.resolveMask=sp,e.resolveTheme=ph,e.rowLabel=sa,e.rowOrderChanged=na,e.runShortcut=T,e.saveOutcomeText=ua,e.setRowSaveState=ca,e.settledRows=la,e.shortcutKey=S,e.shortcutName=x,e.shortcutsOff=C,e.storeTheme=hh,e.sumKanbanValues=Mn,e.syncSelectAll=Zp,e.themeBootScript=vh,e.themeKeyframes=kh,e.toInstant=Ie,e.transitionTheme=Ah,e.validateFile=Gf,e.virtualRange=Bi,e.watchSystemTheme=bh,e.withTrustedLabel=Xn,e.writeColumnWidths=Ui,e.writeKanbanCollapsed=An,e.wuiFetch=j,e})({});
933
+ <div class="visually-hidden" role="status" aria-live="polite"></div>`;let n=t;this._shadow=null,this.isolated&&(n=document.createElement(bf),this._shadow=n.attachShadow({mode:`open`}),Nf(this._shadow),this._shadow.appendChild(t)),document.body.appendChild(n),document.documentElement.setAttribute(la,``),this._outer=n,this._layer=t,this._spot=t.querySelector(`.wui-tour-spot`),this._card=t.querySelector(`.wui-tour-card`),this._live=t.querySelector(`[role=status]`),this._card.querySelector(`.wui-tour-skip`).addEventListener(`click`,()=>this._close(`skipped`,`button`)),this._card.querySelector(`.wui-tour-back`).addEventListener(`click`,()=>this._move(-1)),this._card.querySelector(`.wui-tour-next`).addEventListener(`click`,()=>this._move(1)),this._shadow&&this._card.removeAttribute(`aria-modal`),this._onKey=e=>this._key(e),this._onFocusIn=e=>{if(!this._layer||this._ending)return;let t=this._current,n=t?this._steps[t.index]:null;vd(this._layer,n,t?.target??null,e.target)||this._card.focus()},document.addEventListener(`keydown`,this._onKey,!0),this._shadow||document.addEventListener(`focusin`,this._onFocusIn),o(n,()=>this._follow())}_active(){return this._shadow?this._shadow.activeElement:document.activeElement}_show(e){this._current=e;let{index:t,target:n}=e,r=this._steps[t],i=this._card,a=this._progress.position(t),o=this._progress.total(),s=a===o&&!this._endDialogText(),c=_f(this,a,o);vf(i,{text:c,position:a,total:o}),mf(i,r,{pause:this._label(`mediaPause`),play:this._label(`mediaPlay`)});let l=gd(this,{layer:this._layer,spot:this._spot,card:i},r,n),u=i.querySelector(`.wui-tour-title`);u.textContent=r.title||``,u.hidden=!r.title,i.querySelector(`.wui-tour-text`).textContent=r.description||``,i.querySelector(`.wui-tour-skip`).textContent=this._label(`skip`),i.querySelector(`.wui-tour-back`).textContent=this._label(`back`),i.querySelector(`.wui-tour-back`).hidden=t<=this._firstIndex,i.querySelector(`.wui-tour-next`).textContent=this._label(s?`done`:`next`);let d=[c,r.title,r.description].filter(Boolean).join(`. `);this._live.textContent=l?[d,l].join(/[.!?]$/.test(d)?` `:`. `):d,Ud(i,n),this._spot.removeAttribute(Sf),this._place(),Ad(i),this._unbindAdvance?.(),this._unbindAdvance=_d(r,n,()=>this._move(1));let f=this._active();(i.contains(f)?!f.hidden:this._shadow!==null&&Af(jf()))||i.focus(),this.dispatchEvent(new CustomEvent(`wui-tour:step`,{bubbles:!0,detail:{step:r,index:t,position:a,total:o}}))}_place(){!this._current||!this._layer||Wd(this._spot,this._card,this._current.target)}_follow(){if(!this._current||!this._layer||this._ending)return;let e=this._spot.style.cssText;this._place(),this._spot.style.cssText!==e&&this._spot.setAttribute(Sf,``)}async _move(e){this._current&&await this._go(this._current.index+e,e)}async _go(e,t){if(!this._current||this._moving)return;this._moving=!0;let n=this._run;try{let r=await this._locate(e,t,n);if(n!==this._run)return;if(r){let e=jd(this._card);if(e&&await e,n!==this._run)return;this._show(r)}else if(t>0){let e=this._endDialogText();if(e&&await this._showEnd(e),n!==this._run)return;await this._close(`finished`)}}finally{this._moving=!1}}_showEnd(e){return this._unbindAdvance?.(),this._unbindAdvance=null,gd(this,{layer:this._layer,spot:this._spot,card:this._card},null,null),this._spot.removeAttribute(Sf),this._ending=new AbortController,this._seenMark=this._markSeen(`finished`),$d(this._layer,e,this._ending.signal)}_key(e){if(!(!this._layer||this._ending||e.altKey||e.ctrlKey||e.metaKey)){if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),this._close(`skipped`,`escape`);else if(e.key===`ArrowRight`||e.key===`ArrowLeft`){if(Af(e.composedPath?.()[0]??e.target))return;e.preventDefault(),e.key===`ArrowRight`?this._move(1):this._current.index>this._firstIndex&&this._move(-1)}else if(e.key===`Tab`&&!this._shadow){let{index:t,target:n}=this._current;yd(e,{card:this._card,active:this._active(),step:this._steps[t],target:n})}}}_teardown(){if(!this._layer)return;document.removeEventListener(`keydown`,this._onKey,!0),document.removeEventListener(`focusin`,this._onFocusIn);let e=!this._shadow||this._shadow.activeElement!==null||!document.activeElement||document.activeElement===document.body;this._unbindAdvance?.(),this._unbindAdvance=null,this._ending?.abort(),this._ending=null,this._seenMark=null,s(this._outer),Md(this._outer),document.documentElement.removeAttribute(la),this._outer=null,this._shadow=null,this._layer=null,this._current=null;let t=this._returnFocus;this._returnFocus=null,e&&t?.isConnected&&t.focus?.()}async _close(e,t=null){let n=this._run,r=this._current,i=r?{index:r.index,position:this._progress.position(r.index),total:this._progress.total()}:Ef,a=this._seenMark;this._teardown();try{n===this._run&&await(a??this._markSeen(e))}finally{this._finish(e,i,t)}}_finish(e,t=Ef,n=null){this._run++,this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`),this.dispatchEvent(new CustomEvent(`wui-tour:close`,{bubbles:!0,detail:{reason:e,...t,via:n}}))}},Ff=[`none`,`single`,`multiple`],If=`parentId`,Lf=`Loading`,Rf=`Could not load. Try again.`,zf=`:scope > input[data-wui-mirror]`,Bf=[`nodes`,`selection`,`selected`,`values`,`loadChildren`,`loadUrl`,`name`],Vf=0;function $(e,t,n){let r=document.createElement(e);t&&(r.className=t);for(let[e,t]of Object.entries(n??{}))t!=null&&r.setAttribute(e,String(t));return r}var Hf=class extends c{static get observedAttributes(){return[`selection`,`selected`,`name`,`aria-label`,`loading-text`,`error-text`]}constructor(){super(),this._uid=`wui-tree-${++Vf}`,this._seq=0,this._roots=[],this._byId=new Map,this._prev=null,this._staged=null,this._els=new Map,this._checked=new Set,this._selected=null,this._focusId=null,this._loader=null,this._list=null,this._live=null,this._ready=!1,this._nav=ii({getVisibleOptions:()=>this._visible().map(e=>this._els.get(e.id)?.row),getActive:()=>this._visible().findIndex(e=>e.id===this._focusId),setActive:e=>this._focusNode(this._visible()[e]),onEnter:()=>{let e=this._byId.get(this._focusId);e&&this._activate(e)}}),this._onKeyDown=e=>this._handleKeyDown(e),this._onClick=e=>this._handleClick(e),this._onFocusIn=e=>{let t=this._nodeFrom(e.target);t&&t.id!==this._focusId&&this._setRoving(t)}}connectedCallback(){let e={};for(let t of Bf)Object.hasOwn(this,t)&&(e[t]=this[t],delete this[t]);if(!this._ready){this._ready=!0;let e=this._readScript();this.replaceChildren(),this._list=$(`ul`,`wui-tree`),this._list.setAttribute(`role`,`tree`),this._live=$(`div`,`visually-hidden`,{role:`status`,"aria-live":`polite`}),this.append(this._list,this._live),e&&this._adoptAll(e)}for(let[t,n]of Object.entries(e))this[t]=n;this.addEventListener(`keydown`,this._onKeyDown),this.addEventListener(`click`,this._onClick),this.addEventListener(`focusin`,this._onFocusIn),this._render(),this._loadOpenNodes()}disconnectedCallback(){this.removeEventListener(`keydown`,this._onKeyDown),this.removeEventListener(`click`,this._onClick),this.removeEventListener(`focusin`,this._onFocusIn),this._nav.teardown()}attributeChangedCallback(e,t,n){e===`selected`&&(this._selected=n),this._ready&&this.isConnected&&this._render()}get nodes(){return this._roots.map(e=>e.raw)}set nodes(e){this._adoptAll(e??[]),this._render(),this._loadOpenNodes()}get selection(){let e=this.getAttribute(`selection`);return Ff.includes(e)?e:`none`}set selection(e){this.setAttribute(`selection`,String(e))}get selected(){return this._selected}set selected(e){this._selected=e==null?null:String(e),this._render()}get values(){let e=[],t=n=>{for(let r of n)this._state(r)===`checked`&&e.push(r.id),r.children&&t(r.children)};return t(this._roots),[...e,...[...this._checked].filter(e=>!this._byId.has(e))]}set values(e){this._checked.clear();for(let t of e??[]){let e=this._byId.get(String(t));e?this._setChecked(e,!0):this._checked.add(String(t))}this._render()}get loadChildren(){return this._loader}set loadChildren(e){this._loader=typeof e==`function`?e:null}get loadUrl(){return this.getAttribute(`load-url`)}set loadUrl(e){e==null?this.removeAttribute(`load-url`):this.setAttribute(`load-url`,String(e))}get name(){return this.getAttribute(`name`)}set name(e){e==null?this.removeAttribute(`name`):this.setAttribute(`name`,String(e))}get loadingText(){return this.getAttribute(`loading-text`)??Lf}set loadingText(e){this.setAttribute(`loading-text`,String(e??``))}get errorText(){return this.getAttribute(`error-text`)??Rf}set errorText(e){this.setAttribute(`error-text`,String(e??``))}_readScript(){let e=this.querySelector(`:scope > script[type='application/json']`);if(!e)return null;try{return JSON.parse(e.textContent)}catch(e){return console.error(`[@webority/ui-elements] <wui-tree> could not read its JSON nodes:`,e?.message),null}}_adoptAll(e){let t=this._byId;this._prev=t,this._byId=new Map;let n;try{n=this._adoptStaged(e,null,1)}catch(e){throw this._byId=t,e}finally{this._prev=null}this._roots=n;for(let e of t.keys())this._byId.has(e)||this._checked.delete(e);for(let e of this._roots)this._passChecksDown(e);this._focusId&&!this._byId.has(this._focusId)&&(this._focusId=null)}_adoptStaged(e,t,n){let r=[],i=[];this._staged={ids:r,checks:i};try{let r=this._adopt(e,t,n);for(let e of i)this._checked.add(e);return r}catch(e){for(let e of r)this._byId.delete(e);throw e}finally{this._staged=null}}_adopt(e,t,n){if(!Array.isArray(e))throw Error(`<wui-tree> nodes must be an array.`);return e.map(e=>{let r=e?.id==null?``:String(e.id);if(!r)throw Error(`<wui-tree> every node needs an id.`);if(this._byId.has(r))throw Error(`<wui-tree> node id "${r}" is used twice.`);let i=this._prev?.get(r),a={id:r,raw:e,parent:t,level:n,seq:++this._seq,label:e.label==null?r:String(e.label),icon:e.icon||null,badge:e.badge==null||e.badge===``?null:String(e.badge),badgeTone:e.badgeTone||null,disabled:!!e.disabled,hasChildren:!!e.hasChildren,children:null,expanded:i?i.expanded:!!e.expanded,loading:!1,failed:!1};this._byId.set(r,a),this._staged.ids.push(r);let o=e.children??(e.hasChildren?i?.children?.map(e=>e.raw):void 0);return Array.isArray(o)&&(a.children=this._adopt(o,a,n+1)),a.loading=!!i?.loading&&a.children===null&&a.hasChildren,e.checked&&!i&&this._staged.checks.push(r),a})}_passChecksDown(e){e.children?.length&&this._checked.has(e.id)&&(this._checked.delete(e.id),this._setChecked(e,!0));for(let t of e.children??[])this._passChecksDown(t)}_loadOpenNodes(){queueMicrotask(()=>{if(this.isConnected)for(let e of[...this._byId.values()])e.expanded&&e.children===null&&e.hasChildren&&!e.loading&&this._load(e)})}_isBranch(e){return e.children?e.children.length>0:e.hasChildren}_visible(){let e=[],t=n=>{for(let r of n)e.push(r),r.expanded&&r.children&&t(r.children)};return t(this._roots),e}_state(e){if(e.children?.length){let t=0,n=0;for(let r of e.children){let e=this._state(r);e===`checked`?t++:e===`unchecked`&&n++}return t===e.children.length?`checked`:n===e.children.length?`unchecked`:`mixed`}return this._checked.has(e.id)?`checked`:`unchecked`}_setChecked(e,t){if(e.children?.length)for(let n of e.children)n.disabled||this._setChecked(n,t);else t?this._checked.add(e.id):this._checked.delete(e.id)}_nodeFrom(e){let t=e?.closest?.(`li.wui-tree-item`);if(!t)return null;for(let[e,n]of this._els)if(n.li===t)return this._byId.get(e)??null;return null}_emit(e,t){this.dispatchEvent(new CustomEvent(`wui-tree:${e}`,{detail:t,bubbles:!0,composed:!0}))}_announce(e){this._live&&(this._live.textContent=e)}_setRoving(e){let t=this._els.get(this._focusId);t&&(t.li.tabIndex=-1),this._focusId=e.id;let n=this._els.get(e.id);n&&(n.li.tabIndex=0)}_focusNode(e){e&&(this._setRoving(e),this._els.get(e.id)?.li.focus())}_activate(e){e.disabled||(this.selection===`single`&&(this._selected=e.id,this._render(),this._syncForm()),this._emit(`select`,{id:e.id,node:e.raw}))}_enabledLeaves(e){return e.disabled?[]:e.children?.length?e.children.flatMap(e=>this._enabledLeaves(e)):[e]}_toggleCheck(e){let t=this._enabledLeaves(e);if(!t.length)return;let n=!t.every(e=>this._checked.has(e.id));this._setChecked(e,n),this._render(),this._syncForm(),this._emit(`check`,{id:e.id,checked:n,values:this.values})}_toggleExpand(e){e.disabled||!this._isBranch(e)||(e.expanded?(e.expanded=!1,this._render()):this._expand(e))}_expand(e){e.expanded=!0,e.children===null?this._load(e):this._render()}async _load(e){if(e.loading)return;e.loading=!0,e.failed=!1,this._announce(this.loadingText),this._render();let t,n=null;try{t=await this._fetchChildren(e)}catch(e){n=e}let r=this._byId.get(e.id);if(!r){this._announce(``);return}if(r.loading){if(r.loading=!1,!n)try{r.children=this._adoptStaged(t,r,r.level+1),this._passChecksDown(r),this._announce(``)}catch(e){n=e}n&&(r.failed=!0,r.expanded=!1,this._announce(this.errorText),this._emit(`error`,{id:r.id,message:n?.message??String(n)})),this._render(),this._syncForm()}}async _fetchChildren(e){if(this._loader)return this._loader(e.raw);let t=this.getAttribute(`load-url`);if(!t)throw Error(`<wui-tree> has a node with children to load but no loadChildren or load-url.`);let n=new URL(t,window.location.href);n.searchParams.set(If,e.id);let r=await F(n.href,{headers:{Accept:`application/json`}});if(!r.ok)throw Error(`Loading children answered ${r.kind}.`);return JSON.parse(r.html)}_handleClick(e){let t=this._nodeFrom(e.target);!t||t.disabled||(this._focusNode(t),e.target.closest(`.wui-tree-toggle`)?this._toggleExpand(t):e.target.closest(`.wui-tree-check`)?(e.preventDefault(),this._toggleCheck(t)):this._activate(t))}_handleKeyDown(e){if(e.ctrlKey||e.metaKey||e.altKey)return;let t=this._nodeFrom(e.target);if(!(!t||e.target!==this._els.get(t.id)?.li))if(e.key===`ArrowRight`){if(e.preventDefault(),!this._isBranch(t)||t.disabled)return;t.expanded?t.children?.length&&this._focusNode(t.children[0]):this._expand(t)}else e.key===`ArrowLeft`?(e.preventDefault(),t.expanded&&this._isBranch(t)&&!t.disabled?this._toggleExpand(t):t.parent&&this._focusNode(t.parent)):e.key===` `?(e.preventDefault(),this.selection===`multiple`?this._toggleCheck(t):this.selection===`single`&&this._activate(t)):this._nav.handler(e)}_syncForm(){let e=this.selection;if(e===`multiple`)V(this,this.values);else if(e===`single`)B(this,this._selected??``);else for(let e of this.querySelectorAll(zf))e.remove()}_render(){if(!this._list)return;let e=document.activeElement,t=!!e&&this._list.contains(e),n=this._visible();n.some(e=>e.id===this._focusId)||(this._focusId=(n.find(e=>e.id===this._selected)??n[0])?.id??null),this._els=new Map;let r=this.getAttribute(`aria-label`);r?this._list.setAttribute(`aria-label`,r):this._list.removeAttribute(`aria-label`),this._list.replaceChildren(...this._buildLevel(this._roots)),t&&this._focusId&&this._els.get(this._focusId)?.li.focus(),this._syncForm()}_buildLevel(e){return e.map((t,n)=>this._buildItem(t,n+1,e.length))}_buildItem(e,t,n){let r=this.selection,i=this._isBranch(e),a=this._state(e),o=$(`li`,`wui-tree-item`,{role:`treeitem`,tabindex:e.id===this._focusId?0:-1,"aria-level":e.level,"aria-setsize":n,"aria-posinset":t,"aria-labelledby":`${this._uid}-${e.seq}`,"aria-describedby":e.badge?`${this._uid}-${e.seq}-badge`:null});i&&o.setAttribute(`aria-expanded`,String(e.expanded)),e.disabled&&o.setAttribute(`aria-disabled`,`true`),e.loading&&o.setAttribute(`aria-busy`,`true`),r===`single`&&o.setAttribute(`aria-selected`,String(e.id===this._selected)),r===`multiple`&&o.setAttribute(`aria-checked`,a===`mixed`?`mixed`:String(a===`checked`));let s=$(`div`,`wui-tree-row`,{role:`presentation`});s.style.setProperty(`--wui-tree-level`,String(e.level-1)),r===`single`&&e.id===this._selected&&s.classList.add(`wui-tree-row-selected`),e.failed&&s.classList.add(`wui-tree-row-error`);let c=$(`span`,i?`wui-tree-toggle`:`wui-tree-toggle wui-tree-toggle-leaf`,{"aria-hidden":`true`});if(i&&(c.innerHTML=M(`chevron-right`,{size:16})),s.append(c),r===`multiple`){let t=$(`input`,`form-check-input wui-tree-check`,{type:`checkbox`,tabindex:-1,"aria-hidden":`true`});t.checked=a===`checked`,t.indeterminate=a===`mixed`,t.disabled=e.disabled,t.addEventListener(`mousedown`,e=>e.preventDefault()),s.append(t)}if(e.icon){let t=$(`span`,`wui-tree-icon`,{"aria-hidden":`true`});t.innerHTML=M(e.icon,{size:16}),s.append(t)}let l=$(`span`,`wui-tree-label`,{id:`${this._uid}-${e.seq}`});if(l.textContent=e.label,s.append(l),e.badge){let t=$(`span`,`badge wui-tree-badge${e.badgeTone&&e.badgeTone!==`neutral`?` badge-${e.badgeTone}`:``}`,{id:`${this._uid}-${e.seq}-badge`});t.textContent=e.badge,s.append(t)}if(e.loading&&s.append($(`span`,`wui-tree-spinner`,{"aria-hidden":`true`})),o.append(s),e.expanded&&e.children?.length){let t=$(`ul`,`wui-tree-group`,{role:`group`});t.append(...this._buildLevel(e.children)),o.append(t)}return this._els.set(e.id,{li:o,row:s}),o}},Uf=class extends c{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`);if(e){if(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);return}this.removeAttribute(`data-wui-tip`),this._ownTabindex&&=(this.removeAttribute(`tabindex`),!1)}}},Wf=`wui-whats-new-read`,Gf=`wui-whats-new:`,Kf=`data-open`,qf=`data-wui-unread`,Jf=0,Yf=class extends c{static get observedAttributes(){return[`storage-key`]}constructor(){super(),this._doc=null,this._seen=``,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&&!this.contains(e.target)&&this.close(!1)}}get isOpen(){return this.hasAttribute(Kf)}get _trigger(){return this.querySelector(`.wui-whats-new-trigger`)}get _panel(){return this.querySelector(`.wui-whats-new-panel`)}connectedCallback(){this._doc=this.ownerDocument;let e=this._panel,t=this._trigger;!e||!t||(e.id||=`wui-whats-new-${++Jf}`,t.setAttribute(`aria-controls`,e.id),t.setAttribute(`aria-expanded`,`false`),t.addEventListener(`click`,this._onTriggerClick),this.addEventListener(`keydown`,this._onKeyDown),this._seen=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),s(this),this.removeAttribute(Kf),this._doc=null}attributeChangedCallback(e,t,n){t===n||!this._doc||(this._seen=this._load(),this._refresh())}open(){let e=this._panel;!e||this.isOpen||(this.setAttribute(Kf,``),this._trigger?.setAttribute(`aria-expanded`,`true`),this._place(),o(this,()=>this._place()),this._doc.addEventListener(`pointerdown`,this._onPointerDown,!0),e.focus({preventScroll:!0}),this._markRead())}close(e){this.isOpen&&(this.removeAttribute(Kf),this._trigger?.setAttribute(`aria-expanded`,`false`),this._doc.removeEventListener(`pointerdown`,this._onPointerDown,!0),s(this),this._refresh(),e&&this._trigger?.focus())}_place(){a(this._trigger,this._panel,{clampHeight:!0})}_entries(){return[...this.querySelectorAll(`.wui-whats-new-entry`)].map(e=>({entry:e,date:e.querySelector(`time[datetime]`)?.getAttribute(`datetime`)??``}))}_newest(){return this._entries().reduce((e,{date:t})=>t>e?t:e,``)}_refresh(){let e=this._entries(),t=0;for(let{entry:n,date:r}of e){let e=r>this._seen;e&&t++,!(this.isOpen&&n.hasAttribute(qf))&&n.toggleAttribute(qf,e)}this.toggleAttribute(qf,t>0)}_markRead(){let e=this._newest();!e||e<=this._seen||(this._seen=e,this._save(e),this.toggleAttribute(qf,!1),this.dispatchEvent(new CustomEvent(Wf,{bubbles:!0,detail:{through:e}})))}_storage(){let e=this.getAttribute(`storage-key`);if(!e)return null;try{return{store:this.ownerDocument.defaultView.localStorage,key:Gf+e}}catch{return null}}_load(){let e=this._storage();return e?e.store.getItem(e.key)??``:this._seen}_save(e){let t=this._storage();t&&t.store.setItem(t.key,e)}},Xf=`wui-wizard-step`,Zf=`:scope > [data-wui-glyphs]`,Qf=class extends c{static get observedAttributes(){return[`active`,`variant`,`orientation`,`icon-size`,`non-linear`,`hide-stepper`,`hide-connectors`,`disabled`,`skippable`,`label`,`back-label`,`next-label`,`skip-label`,`finish-label`]}constructor(){super(),this._active=0,this._skipped=new Set,this._invalid=new Set,this._finished=!1,this._rendered=!1,this._reflecting=!1,this._beforeNext=null,this._header=null,this._footer=null,this._known=[],this._observer=null,this._glyphs=null,this._glyphObserver=null}get active(){return this._active}set active(e){let t=Number.parseInt(e,10);Number.isFinite(t)&&this._go(t,`set`)}get beforeNext(){return this._beforeNext}set beforeNext(e){this._beforeNext=typeof e==`function`?e:null}get _steps(){return[...this.querySelectorAll(`:scope > ${Xf}`)]}refresh(){this._rendered&&this._renderChrome()}connectedCallback(){if(this._rendered)this._wire(),this._onStepsMutated();else{let e=Number.parseInt(this.getAttribute(`active`),10);this._active=Number.isFinite(e)&&e>=0?e:0,this.render()}}disconnectedCallback(){this._teardown()}attributeChangedCallback(e,t,n){if(!(!this._rendered||this._reflecting)){if(e===`active`){let e=Number.parseInt(n,10);Number.isFinite(e)&&this._go(e,`set`);return}this._renderChrome()}}render(){let e=this._steps;this._header||(this._header=document.createElement(`nav`),this._header.className=`stepper wizard-stepper`,this._footer=document.createElement(`div`),this._footer.className=`form-actions wizard-footer form-actions-between`,e.length?(this.insertBefore(this._header,e[0]),e[e.length-1].after(this._footer)):(this.prepend(this._header),this.append(this._footer))),this._known=e,this._renderChrome(),this._rendered=!0,this._wire()}_renderChrome(){let e=this._reconcileSteps();this._placeChrome(e),this._clampActive(e),this._syncPanels(e),this._header.innerHTML=this._headerHtml(e),this._footer.innerHTML=this._footerHtml(e),this._header.hidden=this.hasAttribute(`hide-stepper`)}_clampActive(e){let t=Math.max(0,e.length-1);this._active>t&&(this._active=t),this._active<0&&(this._active=0)}_reconcileSteps(){let e=this._steps,t=this._known;if(this._known=e,$f(e,t))return e;let n=n=>new Set([...n].map(n=>e.indexOf(t[n])).filter(e=>e>=0));this._skipped=n(this._skipped),this._invalid=n(this._invalid);let r=t[this._active];if(!r)return e;let i=e.indexOf(r);if(i<0){let n=t=>e.includes(t),r=t.slice(this._active+1).find(n)??t.slice(0,this._active).reverse().find(n);i=r?e.indexOf(r):this._active}return i=Math.min(i,Math.max(0,e.length-1)),i!==this._active&&(this._active=i,this._reflectActive(i)),e}_placeChrome(e){if(!e.length)return;let t=e[e.length-1];this._header.nextElementSibling!==e[0]&&this.insertBefore(this._header,e[0]),this._footer.previousElementSibling!==t&&t.after(this._footer)}_onStepsMutated(){if(!this._rendered)return;let e=this._steps,t=!e.length||this._header.nextElementSibling===e[0]&&this._footer.previousElementSibling===e[e.length-1];this.querySelector(Zf)!==this._glyphs&&(this._watchGlyphs(),this._renderHeader()),!(t&&$f(e,this._known))&&(this._renderChrome(),this._observer?.takeRecords())}_syncPanels(e){e.forEach((e,t)=>{let n=t===this._active;e.classList.add(`wizard-panel`),e.hidden=!n,e.setAttribute(`role`,`tabpanel`),e.setAttribute(`aria-hidden`,n?`false`:`true`)})}_stepStatus(e,t){return e.getAttribute(`status`)||(this._invalid.has(t)?`error`:this._finished?`done`:t===this._active?`active`:t<this._active?this._skipped.has(t)?`skipped`:`done`:`pending`)}_headerHtml(e){let t=this.getAttribute(`variant`)===`journey`,n=this.getAttribute(`variant`)===`icons`,r=this.getAttribute(`orientation`)===`vertical`,i=!this.hasAttribute(`hide-connectors`);this._header.className=[`stepper`,`wizard-stepper`,t&&`stepper-journey`,n&&`stepper-icons`,r&&`stepper-vertical`,!i&&`wui-stepper-no-connectors`].filter(Boolean).join(` `),this._header.setAttribute(`aria-label`,this.getAttribute(`label`)||`Progress`);let a=this.hasAttribute(`non-linear`);return e.map((r,o)=>{let s=this._stepStatus(r,o),c=r.getAttribute(`label`)||``,l=r.getAttribute(`description`)||``,u=r.getAttribute(`icon`)||``,d=o+1,f;f=s===`done`?this._glyph(`check`):s===`error`?this._glyph(`alert-triangle`):s===`skipped`?this._glyph(`minus`):u?this._glyph(u):String(d);let p=s===`pending`?`step`:`step ${s}`,m=s===`active`?` aria-current="step"`:``,h=a||o<this._active,g=l?`<span class="step-desc">${ep(l)}</span>`:``,_;_=t?`<span class="step-circle">${f}</span><span class="step-text"><span class="step-index">Step ${d}</span><span class="step-label">${ep(c)}</span>${g}</span>`:n?`<span class="step-circle">${f}</span><span class="step-index">Step ${d}</span><span class="step-label">${ep(c)}</span>${g}`:`<span class="step-circle">${f}</span><span class="step-label">${ep(c)}</span>${g}`;let v=h?`<button type="button" class="${p}" data-step="${o}"${m}>${_}</button>`:`<div class="${p}"${m}>${_}</div>`;return t&&i&&o<e.length-1?`${v}<span class="step-line${s===`done`?` done`:``}" aria-hidden="true"></span>`:v}).join(``)}_footerHtml(e){let t=this._active,n=e.length-1,r=this.hasAttribute(`disabled`)?` disabled`:``,i=e[t]?.hasAttribute(`optional`)||this.hasAttribute(`skippable`),a=this.getAttribute(`back-label`)||`Back`,o=this.getAttribute(`next-label`)||`Next`,s=this.getAttribute(`skip-label`)||`Skip`,c=this.getAttribute(`finish-label`)||`Finish`;return`${t>0?`<button type="button" class="btn btn-secondary" data-nav="back"${r}>${M(`arrow-left`,{className:`me-2`})}${ep(a)}</button>`:`<span></span>`}<span class="wizard-footer-actions">${i&&t<n?`<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${ep(s)}</button>`:``}${t<n?`<button type="button" class="btn btn-primary" data-nav="next"${r}>${ep(o)}${M(`arrow-right`,{className:`ms-2`})}</button>`:`<button type="button" class="btn btn-primary" data-nav="finish"${r}>${ep(c)}</button>`}</span>`}_wire(){this._teardown(),this._onHeaderClick=e=>{let t=e.target.closest(`[data-step]`);t&&this.contains(t)&&this._stepTo(Number.parseInt(t.dataset.step,10))},this._onFooterClick=e=>{let t=e.target.closest(`[data-nav]`);if(!t||!this.contains(t)||this.hasAttribute(`disabled`))return;let n=t.dataset.nav;n===`back`?this._back():n===`skip`?this._skip():(n===`next`||n===`finish`)&&this._next()},this._header.addEventListener(`click`,this._onHeaderClick),this._footer.addEventListener(`click`,this._onFooterClick),this._observer=new MutationObserver(()=>this._onStepsMutated()),this._observer.observe(this,{childList:!0}),this._watchGlyphs()}_glyph(e){let t=this.querySelector(Zf),n=t&&[...t.children].find(t=>t.getAttribute(`data-icon`)===e);if(n)return n.outerHTML;let r=Number.parseInt(this.getAttribute(`icon-size`),10);return M(e,r>0?{size:r}:void 0)}_watchGlyphs(){this._glyphObserver?.disconnect(),this._glyphObserver=null,this._glyphs=this.querySelector(Zf),this._glyphs&&(this._glyphObserver=new MutationObserver(()=>this._renderHeader()),this._glyphObserver.observe(this._glyphs,{childList:!0,subtree:!0,attributes:!0,characterData:!0}))}_renderHeader(){this._rendered&&(this._header.innerHTML=this._headerHtml(this._steps))}_teardown(){this._header&&this._onHeaderClick&&this._header.removeEventListener(`click`,this._onHeaderClick),this._footer&&this._onFooterClick&&this._footer.removeEventListener(`click`,this._onFooterClick),this._observer?.disconnect(),this._observer=null,this._glyphObserver?.disconnect(),this._glyphObserver=null}_stepTo(e){this.hasAttribute(`disabled`)||!this.hasAttribute(`non-linear`)&&e>=this._active||this._go(e,`step`)}_back(){this._active>0&&this._go(this._active-1,`back`)}async _next(){this._reconcileSteps();let e=this._active,t=this._steps,n=e>=t.length-1,r=t[e];if(!this.dispatchEvent(new CustomEvent(`wui-wizard:beforechange`,{detail:n?{index:e,next:e,reason:`finish`}:{index:e,next:e+1,reason:`next`},cancelable:!0})))return this._flagInvalid(e);if(this._beforeNext){let i;try{i=await this._beforeNext(e)}catch{i=!1}if(this._reconcileSteps(),t=this._steps,e=t.indexOf(r),e<0)return;if(n=e>=t.length-1,i===!1)return this._flagInvalid(e)}if(this._invalid.delete(e),this._skipped.delete(e),n)return this._finish();this._go(e+1,`next`)}_skip(){let e=this._active,t=this._steps;if(!(!t[e]?.hasAttribute(`optional`)&&!this.hasAttribute(`skippable`))){if(this._invalid.delete(e),this._skipped.add(e),this.dispatchEvent(new CustomEvent(`wui-wizard:skip`,{detail:{index:e}})),e>=t.length-1)return this._finish();this._go(e+1,`skip`)}}_flagInvalid(e){this._invalid.add(e),this._renderChrome(),this.dispatchEvent(new CustomEvent(`wui-wizard:invalid`,{detail:{index:e}}))}_finish(){this._invalid.delete(this._active),this._finished=!0,this._renderChrome(),this.dispatchEvent(new CustomEvent(`wui-wizard:finish`,{detail:{index:this._active}}))}_go(e,t){let n=this._reconcileSteps(),r=Math.max(0,n.length-1),i=Math.min(Math.max(e,0),r),a=this._active;this._finished=!1,this._invalid.delete(a),this._active=i,this._reflectActive(i),this._renderChrome(),t!==`silent`&&i!==a&&this.dispatchEvent(new CustomEvent(`wui-wizard:change`,{detail:{index:i,previous:a,reason:t}}))}_reflectActive(e){this._reflecting=!0,this.setAttribute(`active`,String(e)),this._reflecting=!1}},$f=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),ep=e=>String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),tp=class extends c{static get observedAttributes(){return[`label`,`description`,`optional`,`icon`,`status`]}attributeChangedCallback(){let e=this.closest(`wui-wizard`);e&&typeof e.refresh==`function`&&e.refresh()}},np=`image/jpeg,image/png,image/webp,image/heic,image/heif,.heic,.heif`,rp=10,ip=512,ap=`image/webp`,op=[96,48],sp={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 cp(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 lp(e){return cp(e)?sp.heicUnreadable:sp.unreadable}function up(e,t){let n=Number(t);return{name:e?.name||`photo`,type:ap,size:Number.isInteger(n)&&n>0?n:512}}var dp=`/`,fp=`.search-wrap.wui-search-collapsible`,pp=`.wui-topsearch-panel`,mp=`.modal, wui-drawer[open]`,hp=new WeakSet,gp=e=>e.querySelector(`.wui-search-toggle`),_p=e=>e.querySelector(`.search-input`);function vp(e){e.classList.remove(`is-collapsed`),gp(e)?.setAttribute(`aria-expanded`,`true`),_p(e)?.focus()}function yp(e){_p(e)?.value||(e.classList.add(`is-collapsed`),gp(e)?.setAttribute(`aria-expanded`,`false`))}function bp(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=gp(e),n=_p(e);t?.addEventListener(`click`,()=>vp(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n.value||(r.preventDefault(),yp(e),t?.focus())}),e.addEventListener(`focusout`,t=>{e.contains(t.relatedTarget)||yp(e)})}function xp(e){hp.has(e)||(hp.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||C(t.target)||t.target?.closest?.(mp)||e.querySelector(pp))return;let n=[...e.querySelectorAll(fp)].find(e=>e.offsetParent!==null);n&&(t.preventDefault(),vp(n))}))}function Sp(e=document){for(let t of e.querySelectorAll(fp))bp(t);xp(e.ownerDocument??e)}var Cp=`wuiConfirm`,wp=Object.freeze([`danger`]),Tp=Object.freeze([`success`,`info`,`warning`,`danger`]),Ep=`wui.flash`,Dp=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.`}),Op=new WeakSet,kp=new WeakSet,Ap=null,jp=null,Mp=!1,Np=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},Pp=(e,t)=>{e&&window.WUI?.toast?.(e,{variant:t})},Fp=()=>{let e=window.bootstrap?.Modal;if(!e)throw Error(`data-wui-confirm: Bootstrap's bundle (window.bootstrap) is not loaded on this page.`);return e};function Ip(){let e=document.getElementById(Cp);return e||(e=document.createElement(`div`),e.id=Cp,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`,`${mn.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="btn btn-secondary" data-bs-dismiss="modal">${Np(Dp.cancelLabel)}</button><button type="button" class="btn btn-primary" data-app-confirm></button></div></div></div></div>`,document.body.appendChild(e),e)}function Lp(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!wp.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);Rp({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 Rp({title:e,message:t,label:n,danger:r},i){let a=Fp(),o=Ip(),s=o.querySelector(`.wui-confirm-title`),c=o.querySelector(`[data-app-confirm]`);if(!s||!c)throw Error(`#${Cp} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${Cp}"> 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)),s.textContent=e||Dp.confirmTitle,l.textContent=t,c.textContent=n||Dp.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`,s.textContent),jp=i,Mp=!1,a.getOrCreateInstance(o).show()}var zp=(e,t)=>{Ap=e;try{t()}finally{Ap=null}};function Bp(e,{title:t,message:n,label:r,tone:i},a){if(i!=null&&!wp.includes(i))throw TypeError(`confirmAction: tone "${i}" is not supported. Use danger, or leave it off.`);tm(e.ownerDocument),Rp({title:t,message:n,label:r,danger:i===`danger`},()=>zp(e,a))}var Vp=e=>e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`;function Hp(e){let t=e.target.closest?.(`[data-wui-confirm]:not(form)`);!t||t===Ap||Vp(t)||(e.preventDefault(),e.stopImmediatePropagation(),Lp(t,()=>zp(t,()=>t.click())))}function Up(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===Ap||e.submitter&&e.submitter===Ap)return;e.preventDefault(),e.stopImmediatePropagation();let n=e.submitter?.form===t?e.submitter:void 0;Lp(t,()=>zp(t,()=>t.requestSubmit(n)))}function Wp(e){let t=e.target.closest?.(`#${Cp} [data-app-confirm]`);!t||t.disabled||!jp||(Mp=!0,Fp().getOrCreateInstance(t.closest(`#${Cp}`)).hide())}function Gp(e){if(e.target.id!==`wuiConfirm`)return;let t=Mp?jp:null;jp=null,Mp=!1,t?.()}var Kp=(e,t)=>{e&&window.sessionStorage.setItem(Ep,JSON.stringify({message:e,variant:t}))},qp=e=>e===`forbidden`?Dp.forbidden:e===`network`?Dp.network:Dp.failed;function Jp(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.dataset.refreshOnSuccess!==`false`&&Ut(e)?.reload()}async function Yp(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 Xp(t,e)}async function Xp(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.`);t.disabled=!0,t.setAttribute(`aria-busy`,`true`);let i=await F(e,{method:`POST`,body:n});if(i.kind===`session`||i.kind===`aborted`)return;let a=i.toastVariant||`success`;if(i.ok&&(i.redirect||r===`page`)){Kp(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload();return}if(t.disabled=!1,t.removeAttribute(`aria-busy`),i.ok){Xt(i,a),Jp();return}Pp(i.message||qp(i.kind),`danger`)}function Zp(e){let t=e.target.closest?.(`[data-wui-post]`);t&&(e.preventDefault(),!(Vp(t)||t.getAttribute(`aria-busy`)===`true`)&&Yp(t).catch(e=>console.error(e)))}function Qp(e){let t=e.target.closest?.(`form[data-wui-post-form]`);if(!t||e.defaultPrevented)return;e.preventDefault();let n=e.submitter||t.querySelector(`button`);n.getAttribute(`aria-busy`)!==`true`&&(Xp(t.getAttribute(`action`),n,new FormData(t)).catch(e=>console.error(e)),window.bootstrap?.Dropdown?.getInstance(t.closest(`.dropdown`)?.querySelector(`[data-bs-toggle='dropdown']`))?.hide())}function $p(){let e=window.sessionStorage.getItem(Ep);if(!e)return;window.sessionStorage.removeItem(Ep);let{message:t,variant:n}=JSON.parse(e);Pp(t,n)}function em(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(!Tp.includes(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${Tp.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||e.textContent.trim();e.remove(),Pp(n,t)}}function tm(e){kp.has(e)||(kp.add(e),e.addEventListener(`click`,Wp),e.addEventListener(`hidden.bs.modal`,Gp))}function nm(e=document){let t=e.ownerDocument||e;Op.has(t)||(Op.add(t),t.addEventListener(`click`,Hp,!0),t.addEventListener(`submit`,Up,!0),tm(t),t.addEventListener(`click`,Zp),t.addEventListener(`submit`,Qp),$p()),em(e)}var rm=Object.freeze({title:`Leave without saving?`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,leaveLabel:`Leave`}),im=`form[data-wui-unsaved]`,am=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,om=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,sm=new Set([`submit`,`button`,`reset`,`image`]),cm=new WeakMap,lm=new WeakSet,um=e=>`${e.name}:${e.size}:${e.lastModified}`;function dm(e){let t=[];for(let n of e.elements)!n.name||n.disabled||sm.has(n.type)||(n.type===`checkbox`||n.type===`radio`?t.push([n.name,n.value,n.checked]):n.type===`file`?t.push([n.name,[...n.files||[]].map(um)]):n.type===`select-multiple`?t.push([n.name,[...n.selectedOptions].map(e=>e.value)]):t.push([n.name,n.value]));return JSON.stringify(t)}function fm(e){return dm(e)}var pm=e=>({saved:e.querySelector(am)?null:dm(e),engaged:!1,discarded:!1});function mm(e){let t=cm.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&dm(e)!==t.saved}var hm=(e,t)=>[...e.querySelectorAll(im)].filter(e=>e!==t&&mm(e)),gm=()=>!!window.bootstrap?.Modal;function _m(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||rm.message;Bp(e,{title:rm.title,message:r,label:rm.leaveLabel,tone:`danger`},()=>{for(let e of t)cm.get(e).discarded=!0;n()})}function vm(e){if(e.matches(om))return!1;let t=e.getAttribute(`target`);if(t&&t.toLowerCase()!==`_self`)return!1;let n=new URL(e.getAttribute(`href`),window.location.href);if(n.protocol!==`http:`&&n.protocol!==`https:`)return!1;let r=window.location;return!(n.hash&&n.origin===r.origin&&n.pathname===r.pathname&&n.search===r.search)}function ym(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 bm(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target.closest?.(`a[href]`);if(!t||!vm(t))return;let n=hm(t.ownerDocument,null);!n.length||!gm()||(e.preventDefault(),_m(t,n,()=>t.click()))}function xm(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!ym(t,e.submitter))return;let n=hm(t.ownerDocument,t);if(n.length&&gm()){e.preventDefault();let r=e.submitter?.form===t?e.submitter:void 0;_m(t,n,()=>t.requestSubmit(r));return}let r=cm.get(t);r&&(r.saved=dm(t),r.discarded=!1)}function Sm(e){hm(document,null).length&&(e.preventDefault(),e.returnValue=``)}function Cm(e){let t=e.target.closest?.(im),n=t&&cm.get(t);!n||n.engaged||(n.saved!==null&&(n.saved=dm(t)),n.engaged=!0)}function wm(e){let t=e.target.closest?.(im),n=t&&cm.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function Tm(e){let t=e.detail?.handle?.el;if(t instanceof Element)for(let e of t.querySelectorAll(im))Dm(e)}function Em(e=document){let t=e.ownerDocument||e;if(!lm.has(t)){lm.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,Cm,!0);for(let e of[`input`,`change`])t.addEventListener(e,wm,!0);t.addEventListener(`click`,bm),t.addEventListener(`submit`,xm),t.addEventListener(`wui:modal:success`,Tm),t.defaultView.addEventListener(`beforeunload`,Sm)}let n=[...e.querySelectorAll?.(im)||[]];e.matches?.(im)&&n.unshift(e);for(let e of n)cm.has(e)||cm.set(e,pm(e))}function Dm(e){if(!(e instanceof HTMLFormElement)||!e.matches(im))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);cm.set(e,{saved:dm(e),engaged:!1,discarded:!1})}var Om=Object.freeze({discard:`Discard`,keep:`Keep editing`}),km=`wui:drawer:discard`,Am=`wui-drawer[confirm-discard]`,jm=`.wui-modal-shell`,Mm=`form[data-wui-confirm-discard]`,Nm=`.wui-drawer-discard`,Pm=`input, select, textarea`,Fm=new WeakMap,Im=new WeakSet,Lm=new WeakSet;function Rm(e,t,n,r){let i=e.createElement(`button`);return i.type=`button`,i.className=t,i.setAttribute(n,``),i.textContent=r,i}function zm(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,Rm(e,`btn btn-danger btn-sm`,`data-wui-discard-confirm`,Om.discard),Rm(e,`btn btn-secondary btn-sm`,`data-wui-discard-keep`,Om.keep)),n}function Bm(e){let t=e.closest?.(Am);if(t)return t;let n=e.closest?.(jm);return n?.querySelector(Mm)?n:null}function Vm(e){return e.closest(Am)??e.closest(jm)}function Hm(e){return e.matches(Am)?e.querySelectorAll(`form`):e.querySelectorAll(Mm)}function Um(e){let t=Fm.get(e);return t!=null&&fm(e)!==t}function Wm(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,e.querySelector(`.wui-drawer-panel`).append(t),Lm.add(t),t}function Gm(e){e.querySelector(`[data-wui-discard-confirm]`).focus()}function Km(e,t){let n=e.querySelector(Nm);if(n){Gm(n);return}let r=zm(e.ownerDocument,t),i;if(e.matches(Am))i=e.querySelector(`.wui-drawer-footer`)??Wm(e),i.prepend(r);else{let t=e.querySelector(Mm);i=t.querySelector(`.modal-footer`),i?i.prepend(r):(i=t,t.append(r))}i.classList.add(`wui-drawer-discarding`),Gm(r)}function qm(e){let t=e.parentElement;e.remove(),t.classList.remove(`wui-drawer-discarding`),Lm.has(t)&&t.remove()}function Jm(e){for(let t of Hm(e)){let e=[...t.querySelectorAll(Pm)].find(e=>e.type!==`hidden`&&!e.disabled);if(e){e.focus();return}}}function Ym(e){let t=Bm(e.target);if(t)for(let e of Hm(t))Fm.get(e)??Fm.set(e,fm(e))}function Xm(e){let t=e.target;!(t instanceof HTMLFormElement)||!Bm(t)||Fm.set(t,fm(t))}function Zm(e){let t=e.detail?.handle?.el;if(t instanceof Element)for(let e of t.querySelectorAll(`form`))Fm.delete(e)}function Qm(e){let t=e.target;!(t instanceof Element)||!t.matches(Am)||[...Hm(t)].some(Um)&&(e.preventDefault(),Km(t,t.getAttribute(`confirm-discard`)))}function $m(e){let t=e.target;if(!(t instanceof Element)||!t.matches(jm))return;let n=[...Hm(t)].find(Um);n&&(e.preventDefault(),Km(t,n.getAttribute(`data-wui-confirm-discard`)))}function eh(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(jm);n&&window.bootstrap?.Modal?.getInstance(n)?.hide()}function th(e){let t=e.closest(Nm),n=Vm(t);qm(t);for(let e of Hm(n))Fm.set(e,fm(e));n.dispatchEvent(new CustomEvent(km,{bubbles:!0})),n.matches(Am)?n.hide():window.bootstrap.Modal.getInstance(n).hide()}function nh(e){let t=e.closest(Nm),n=Vm(t);qm(t),Jm(n)}function rh(e){let t=e.target,n=t.closest?.(`[data-wui-discard-confirm]`);if(n){th(n);return}let r=t.closest?.(`[data-wui-discard-keep]`);if(r){nh(r);return}let i=t.closest?.(`[data-wui-dismiss]`);i&&eh(i)}function ih(e){if(e.key!==`Escape`)return;let t=e.currentTarget.querySelector(Nm);if(!t)return;e.preventDefault(),e.stopPropagation();let n=Vm(t);qm(t),Jm(n)}function ah(e=document){let t=e.ownerDocument||e;Im.has(t)||(Im.add(t),t.addEventListener(`focusin`,Ym),t.addEventListener(`pointerdown`,Ym),t.addEventListener(`submit`,Xm),t.addEventListener(`wui:modal:success`,Zm),t.addEventListener(`wui:modal:loaded`,Zm),t.addEventListener(`wui-drawer-close`,Qm,!0),t.addEventListener(`hide.bs.modal`,$m),t.addEventListener(`click`,rh),t.addEventListener(`keydown`,ih,!0))}var oh=`image/png,image/jpeg,image/webp`,sh=5,ch={"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`]},lh={"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`,".png":`PNG`,".jpg":`JPG`,".jpeg":`JPG`,".webp":`WEBP`,".gif":`GIF`,".svg":`SVG`,".heic":`HEIC`,".heif":`HEIC`,".pdf":`PDF`,".txt":`text file`},uh=e=>String(e||``).split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean),dh=[`.png`,`.jpg`,`.jpeg`,`.webp`,`.gif`,`.svg`,`.bmp`,`.avif`,`.heic`,`.heif`];function fh(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 dh.some(e=>r.endsWith(e))}function ph(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().split(/[?#]/)[0].endsWith(`.pdf`)}function mh(e){let t=uh(e);return t.length?t.every(e=>e.startsWith(`.`)?dh.includes(e):e===`image/*`||e.startsWith(`image/`)):!1}function hh(e){let t=[];for(let n of uh(e)){let e=lh[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 gh(e,t){let n=uh(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&&(ch[e]||[]).some(e=>i.endsWith(e)))}function _h(e,t={}){if(!e)return null;let n=t.accept===void 0?oh:t.accept,r=t.maxSizeMb===void 0?5:t.maxSizeMb;if(!gh(e,n)){let e=hh(n);return`Choose a ${e.endsWith(` file`)?e:`${e} file`}.`}return r>0&&e.size>r*1024*1024?`Keep the file under ${r} MB.`:null}var vh=/[0-9]/,yh={9:vh,A:/[A-Za-z]/,"*":/[0-9A-Za-z]/},bh=/[9A*]/,xh=new Set([`text`,`tel`,`search`,`url`,`password`]),Sh=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},Ch=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},wh=e=>e.length<=3?e:`${e.slice(0,-3).replace(/\B(?=(\d{2})+(?!\d))/g,`,`)},${e.slice(-3)}`,Th=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());return t?`${t[3]}-${t[2]}-${t[1]}`:e};function Eh(e,{upper:t=!1,normalize:n,valid:r,post:i=e=>e,message:a=`Enter the full value`}={}){let o=[...e].map(e=>yh[e]?{re:yh[e]}:{lit:e}),s=o.filter(e=>e.re).length;return{inputMode:o.every(e=>!e.re||e.re===vh)?`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++)o[i].lit===void 0?(t+=e[r++],n.push(!0)):(t+=o[i].lit,n.push(!1));return{text:t,isRaw:n}},isValid:e=>e.length===s&&(!r||r(e))}}function Dh(){return{inputMode:`decimal`,post:e=>e,message:`Enter a valid amount`,extract(e){let t=``,n=!1,r=0;for(let i of e)vh.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=wh(t)+(e.includes(`.`)?`.${n}`:``);return{text:r,isRaw:[...r].map(e=>e!==`,`)}},isValid:e=>/^\d+(\.\d{1,2})?$/.test(e)}}var Oh={"phone-in":()=>Eh(`99999 99999`,{normalize:Sh,valid:e=>/^[6-9]/.test(e),message:`Enter a 10-digit mobile number`}),pan:()=>Eh(`AAAAA9999A`,{upper:!0,valid:e=>/^[A-Z]{5}\d{4}[A-Z]$/.test(e),message:`Enter a valid PAN`}),gstin:()=>Eh(`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:()=>Eh(`9999 9999 9999`,{valid:e=>/^[2-9]/.test(e),message:`Enter a valid 12-digit Aadhaar number`}),ifsc:()=>Eh(`AAAA*******`,{upper:!0,valid:e=>/^[A-Z]{4}0[A-Z0-9]{6}$/.test(e),message:`Enter a valid IFSC`}),"pin-code":()=>Eh(`999999`,{valid:e=>/^[1-9]/.test(e),message:`Enter a valid 6-digit PIN code`}),date:()=>Eh(`99-99-9999`,{normalize:Th,valid:Ch,post:(e,t)=>e.length===8&&Ch(e)?`${e.slice(4)}-${e.slice(2,4)}-${e.slice(0,2)}`:t,message:`Enter a valid date as DD-MM-YYYY`}),amount:Dh},kh=Object.keys(Oh),Ah=e=>{let t=String(e).toLowerCase();return Object.hasOwn(Oh,t)?t:void 0},jh=e=>bh.test(String(e))&&Ah(e)===void 0,Mh=new Map;function Nh(e){if(e==null||e===``)return null;let t=String(e);return Mh.has(t)||(jh(t)?Mh.set(t,Eh(t)):Mh.set(t,Object.hasOwn(Oh,t)?Oh[t]():null)),Mh.get(t)}var Ph=(e,t)=>e.normalize?e.normalize(t):t;function Fh(e,t){let n=Nh(e);return n?n.extract(Ph(n,String(t??``))):String(t??``)}function Ih(e,t){let n=Nh(e);if(!n)return String(t??``);let r=n.extract(Ph(n,String(t??``)));return n.post(r,n.layout(r).text)}function Lh(e,t){let n=Nh(e);return n?n.layout(n.extract(Ph(n,String(t??``)))).text:String(t??``)}var Rh=(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},zh=new WeakMap,Bh=e=>zh.get(e)?.(),Vh=new WeakMap;function Hh(e,t,n,r){let i=e.getAll(t),a=Vh.get(e);a||Vh.set(e,a=new Set);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);return}e.delete(t);for(let n of i)e.append(t,n)}}function Uh(e){let t=null,n=null,r=!1,i=(t,n)=>n===null?e.removeAttribute(t):e.setAttribute(t,n),a,o,s=()=>{t?.remove(),t=null,n&&(n.hidden=!1),n=null,r&&e.classList.remove(`error`),r=!1,a!==void 0&&i(`aria-invalid`,a),o!==void 0&&i(`aria-describedby`,o),a=void 0,o=void 0};return i=>{if(!i){s();return}let c=e.closest(`.field`),l=c?.querySelector(`.field-error`);l&&l!==t&&l.textContent.trim()||(t||(r=!e.classList.contains(`error`),e.classList.add(`error`),a=e.getAttribute(`aria-invalid`),o=e.getAttribute(`aria-describedby`),c&&(t=document.createElement(`div`),t.className=`field-error`,e.id&&(t.id=`${e.id}-error`),n=c.querySelector(`.field-hint`),n&&(n.hidden=!0),c.insertBefore(t,[...c.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 Wh(e,{mask:t,postFormatted:n=!1,onChange:r,onInvalidChange:i}={}){let a=Nh(t);if(!a||!xh.has(e.type))return()=>{};let o=Object.getPrototypeOf(e),s=Object.getOwnPropertyDescriptor(o,`value`).set,c=!e.hasAttribute(`inputmode`);c&&e.setAttribute(`inputmode`,a.inputMode);let l=i??Uh(e),u=null,d=!1,f=!1,p=!1,m=``,h=``,g,_=()=>{let e=p?m:``;e!==h&&(h=e,l(h))},v=(t,n,i)=>{let o=a.extract(t.slice(0,n)).length,c=a.extract(t),{text:l,isRaw:d}=a.layout(c);if(e.value!==l&&(s.call(e,l),document.activeElement===e&&xh.has(e.type))){let t=Rh(d,o);e.setSelectionRange(t,t)}e.dataset.maskRaw=c,m=c&&!a.isValid(c)?a.message:``,e.setCustomValidity(m),_(),i&&c!==u&&r?.(c,l),u=c},y=Object.getOwnPropertyDescriptor(e,`value`),b=y??Object.getOwnPropertyDescriptor(o,`value`);Object.defineProperty(e,"value",{configurable:!0,enumerable:b.enumerable,get:()=>b.get.call(e),set:t=>{if(b.set.call(e,t),f)return;let n=Ph(a,e.value);v(n,n.length,!0)}});let x=()=>{d=!0,e.dispatchEvent(new Event(`input`,{bubbles:!0})),d=!1},S=t=>{if(d||f||t.isComposing)return;let n=t.inputType===`insertText`&&(t.data?.length??0)<=1||t.inputType?.startsWith(`delete`)?e.value:Ph(a,e.value);v(n,e.selectionStart??n.length,!0)},ee=()=>{f=!0},C=()=>{f=!1;let t=Ph(a,e.value);v(t,e.selectionStart??t.length,!0),x()},w=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)&&(v(e.value.slice(0,o)+e.value.slice(o+1),n?o:r,!0),x()))},T=t=>{if(e.readOnly||e.disabled)return;let n=t.clipboardData?.getData(`text`);if(n==null)return;t.preventDefault();let r=Ph(a,n),i=e.selectionStart??e.value.length,o=e.selectionEnd??i;v(e.value.slice(0,i)+r+e.value.slice(o),i+r.length,!0),x()},E=()=>{let t=a.extract(e.value);return a.post(t,a.layout(t).text)},D=()=>{p=!0,_()};e.addEventListener(`input`,S),e.addEventListener(`beforeinput`,w),e.addEventListener(`paste`,T),e.addEventListener(`compositionstart`,ee),e.addEventListener(`compositionend`,C),e.addEventListener(`blur`,D),e.addEventListener(`invalid`,D);let O=e.form,te=t=>{e.name&&!e.disabled&&Hh(t.formData,e.name,e.value,E())},ne=()=>{clearTimeout(g),g=setTimeout(()=>{p=!1,v(Ph(a,e.value),e.value.length,!0)},0)};n||(O?.addEventListener(`formdata`,te),zh.set(e,E)),O?.addEventListener(`reset`,ne),O?.addEventListener(`submit`,D);let re=Ph(a,e.value);return v(re,re.length,!1),()=>{clearTimeout(g),e.removeEventListener(`input`,S),e.removeEventListener(`beforeinput`,w),e.removeEventListener(`paste`,T),e.removeEventListener(`compositionstart`,ee),e.removeEventListener(`compositionend`,C),e.removeEventListener(`blur`,D),e.removeEventListener(`invalid`,D),O?.removeEventListener(`formdata`,te),O?.removeEventListener(`reset`,ne),O?.removeEventListener(`submit`,D),zh.delete(e),y?Object.defineProperty(e,"value",y):delete e.value,p=!1,m=``,_(),e.setCustomValidity(``),delete e.dataset.maskRaw,c&&e.removeAttribute(`inputmode`)}}function Gh(){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=Bh(e);return n===void 0?t.call(this,e):n},e.wuiMaskHook=!0}var Kh=new WeakMap,qh,Jh=e=>{Kh.has(e)||Kh.set(e,Wh(e,{mask:e.dataset.appMask,postFormatted:e.hasAttribute(`data-mask-post-formatted`)}))},Yh=e=>e.nodeType===1?[...e.matches(`input[data-app-mask]`)?[e]:[],...e.querySelectorAll(`input[data-app-mask]`)]:[];function Xh(){qh||typeof MutationObserver>`u`||(qh=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Yh(e))Kh.get(t)?.(),Kh.delete(t);for(let e of t.addedNodes)for(let t of Yh(e))Jh(t)}}),qh.observe(document.documentElement,{childList:!0,subtree:!0}))}function Zh(e=document){Gh();for(let t of e.querySelectorAll(`input[data-app-mask]`))Jh(t);e===document&&Xh()}var Qh=`data-wui-bulk-in-bar`,$h=`[data-wui-page-header-bar][data-wui-bulk-for]`,eg=new WeakSet;function tg(e){return`${A(e,{decimals:0})} selected`}function ng(e,t){for(let n of e.querySelectorAll(`[data-wui-bar-swap]`))n.hidden=t>0;let n=e.querySelector(`[data-wui-bar-bulk]`);n&&(n.hidden=t===0,n.querySelector(`.page-header-bar-bulk-count`).textContent=t>0?tg(t):``)}function rg(e=document){for(let t of e.querySelectorAll($h))document.getElementById(t.dataset.wuiBulkFor)?.setAttribute(Qh,``);eg.has(document)||(eg.add(document),document.addEventListener(`selectionchange`,e=>{if(typeof e.detail?.selected==`number`)for(let t of document.querySelectorAll($h))document.getElementById(t.dataset.wuiBulkFor)?.contains(e.target)&&ng(t,e.detail.selected)}))}var ig={minLength:10,uppercase:!0,lowercase:!0,digit:!0,special:!0,uniqueChars:0,customRules:[]},ag=`Password requirements`;function og(e){return e===!0||e==null?{...ig}:{...ig,...e}}function sg(e){let t=og(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 cg(e,t){let n=e==null?``:String(e);return sg(t).map(e=>({key:e.key,label:e.label,met:e.test(n)}))}function lg(e,t){return cg(e,t).every(e=>e.met)}var ug=`wui:row-drop`,dg=`is-drop-over`,fg=`application/x-wui-rows`,pg=`wui-row-dragging`,mg=`[data-wui-drop-target]`,hg=`tbody tr[data-row-key]`,gg=`input, button, a, select, textarea, label`,_g=`.wui-select-cell .wui-check`,vg=new WeakMap,yg=new WeakSet,bg=null,xg=null;function Sg(e){return e.querySelector(_g)?.checked===!0}function Cg(e){return[...e.querySelectorAll(`tbody tr`)].filter(Sg).map(e=>e.dataset.rowKey)}function wg(){bg=null,document.body.classList.remove(pg);for(let e of document.querySelectorAll(`${mg}.${dg}`))e.classList.remove(dg)}function Tg(e,t,n){e.dispatchEvent(new CustomEvent(ug,{bubbles:!0,detail:{keys:t,target:n.dataset.wuiDropTarget}}))}function Eg(e){let t=e.target.closest?.(mg);!t||!bg||(e.preventDefault(),e.dataTransfer.dropEffect=`move`,t.classList.add(dg))}function Dg(e){let t=e.target.closest?.(mg);!t||t.contains(e.relatedTarget)||t.classList.remove(dg)}function Og(e){let t=e.target.closest?.(mg);if(!t||!bg)return;e.preventDefault(),t.classList.remove(dg);let{root:n,keys:r}=bg;Tg(n,r,t),wg()}function kg(e){let t=e.target.closest?.(mg);!t||!xg?.keys.length||(e.preventDefault(),Tg(xg.root,xg.keys,t))}function Ag(e){(e.key===`Enter`||e.key===` `)&&kg(e)}function jg(e){yg.has(e)||(yg.add(e),e.addEventListener(`dragover`,Eg),e.addEventListener(`dragenter`,Eg),e.addEventListener(`dragleave`,Dg),e.addEventListener(`drop`,Og),e.addEventListener(`click`,kg),e.addEventListener(`keydown`,Ag))}function Mg(e){let t=vg.get(e);if(t)return t;jg(e.ownerDocument||e);let n=t=>{let n=t.target.closest?.(hg);if(!n||!e.contains(n))return;let r=t.target.closest(gg);r&&n.contains(r)||(n.draggable=!0)},r=t=>{let n=t.target.closest?.(hg);if(!n||!e.contains(n))return;let r=Sg(n)?Cg(e):[n.dataset.rowKey];t.dataTransfer.setData(fg,JSON.stringify(r)),t.dataTransfer.setData(`text/plain`,r.join(`,`)),t.dataTransfer.effectAllowed=`move`,bg={root:e,keys:r},document.body.classList.add(pg)},i=t=>{let n=t.detail?.selected;n>0?xg={root:e,keys:t.detail.keys??Cg(e)}:n===0&&(xg=null),Ng(document)};e.addEventListener(`pointerdown`,n),e.addEventListener(`dragstart`,r),e.addEventListener(`dragend`,wg),e.addEventListener(`selectionchange`,i);let a=()=>{e.removeEventListener(`pointerdown`,n),e.removeEventListener(`dragstart`,r),e.removeEventListener(`dragend`,wg),e.removeEventListener(`selectionchange`,i),vg.delete(e)};return vg.set(e,a),a}function Ng(e=document){let t=e.querySelector(`[data-wui-row-drag] tbody tr ${_g}:checked`)!==null;for(let n of e.querySelectorAll(mg)){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`)||n.textContent.trim();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 Pg(e=document){for(let t of e.querySelectorAll(`[data-wui-row-drag]`))Mg(t);Ng(e.ownerDocument||e)}var Fg=`.table-wrap, .table-responsive, [class*="table-responsive-"]`,Ig=1;function Lg(e){let t=()=>{let t=e.scrollWidth-e.clientWidth,n=Math.abs(e.scrollLeft);e.toggleAttribute(`data-wui-overflow-start`,t>Ig&&n>Ig),e.toggleAttribute(`data-wui-overflow-end`,t>Ig&&n<t-Ig),e.toggleAttribute(`data-wui-overflow-top`,e.scrollTop>Ig)},n=()=>{if(e.scrollWidth-e.clientWidth>Ig){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 Rg=new WeakMap,zg,Bg=e=>{Rg.has(e)||Rg.set(e,Lg(e))},Vg=e=>e.nodeType===1?[...e.matches(`.table-wrap, .table-responsive, [class*="table-responsive-"]`)?[e]:[],...e.querySelectorAll(Fg)]:[];function Hg(){zg||typeof MutationObserver>`u`||(zg=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of Vg(e))Rg.get(t)?.(),Rg.delete(t);for(let e of t.addedNodes)for(let t of Vg(e))Bg(t)}}),zg.observe(document.documentElement,{childList:!0,subtree:!0}))}function Ug(e=document){for(let t of e.querySelectorAll(Fg))Bg(t);e===document&&Hg()}var Wg=31536e3,Gg=new WeakMap,Kg=e=>e>99?`99+`:String(e);function qg(e,t,n=document){n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${Wg}; SameSite=Lax`}var Jg=e=>{let t=document.createElement(`template`);return t.innerHTML=e,t.content},Yg=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function Xg(e,t){let n=e.querySelector(`.wui-bell-trigger`),r=e.querySelector(`.wui-bell-count`),i=e.querySelector(`[data-wui-bell-live]`),a=e.querySelector(`[data-wui-bell-list]`),o=e.querySelector(`.wui-bell-menu`),{src:s,readAction:c}=e.dataset,l=e.dataset.label||`Notifications`,u=e.dataset.emptyText||`You are all caught up.`,d=Number(e.dataset.pollSeconds??60),f=ln(),p=Number(e.dataset.unread)||0,m=(t,a=!0)=>{let o=Math.max(0,Number(t)||0),s=o!==p;p=o,e.dataset.unread=String(o),r&&(r.textContent=Kg(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?l:`${l}, ${Kg(o)} unread`),a&&s&&i&&(i.textContent=o===0?`No unread notifications`:`${Kg(o)} unread notifications`)},h=()=>o?.classList.contains(`show`)??!1,g=()=>{let e=Yg(`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),a.replaceChildren(e)},_=async t=>{t&&(a.setAttribute(`aria-busy`,`true`),a.querySelector(`.wui-bell-item`)||a.replaceChildren(Yg(`wui-bell-state`,`Loading…`)));let n=await f.run(s);if(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)return;if(a.removeAttribute(`aria-busy`),!n.ok){t&&g();return}let r=Jg(n.html),i=r.querySelector(`[data-wui-unread]`),o=i?Number(i.getAttribute(`data-wui-unread`)):p;m(o),(t||h())&&(r.querySelector(`.wui-bell-item`)?a.replaceChildren(r):a.replaceChildren(Yg(`wui-bell-state`,u))),e.dispatchEvent(new CustomEvent(`wui:notifications:loaded`,{bubbles:!0,detail:{unread:o}}))};e.addEventListener(`show.bs.dropdown`,()=>_(!0)),e.addEventListener(`click`,async e=>{if(e.target.closest(`[data-wui-bell-retry]`)){_(!0);return}let t=e.target.closest(`[data-wui-bell-read]`);if(!t||!c)return;t.disabled=!0;let n=await F(c,{method:`POST`});t.disabled=!1,n.ok&&(m(0),_(!0))});let v=null,y=()=>{d>0&&v===null&&(v=setInterval(()=>_(h()),d*1e3))},b=()=>{v!==null&&clearInterval(v),v=null},x=()=>{document.hidden?b():(_(h()),y())};return d>0&&(document.addEventListener(`visibilitychange`,x),document.hidden||y()),t.push(()=>{b(),f.abort(),document.removeEventListener(`visibilitychange`,x)}),{setUnread:e=>m(e),refresh:()=>_(h())}}var Zg=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),Qg=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function $g(e,t){let n=e.querySelector(`input.search-input`),r=e.querySelector(`.wui-topsearch-results`),i=e.querySelector(`.wui-topsearch-open`),a=e.querySelector(`[data-wui-topsearch-live]`),{src:o,param:s=`q`,resultsHref:c}=e.dataset,l=Number(e.dataset.minChars??2),u=Number(e.dataset.debounceMs??250),d=ln(),f=null,p=-1,m=()=>[...r.querySelectorAll(`.wui-topsearch-hit`)],h=e=>{let t=m();p=t.length===0?-1:(e+t.length)%t.length,t.forEach((e,t)=>{let n=t===p;e.classList.toggle(`is-active`,n),e.setAttribute(`aria-selected`,n?`true`:`false`)}),p>=0?(n.setAttribute(`aria-activedescendant`,t[p].id),t[p].scrollIntoView?.({block:`nearest`})):n.removeAttribute(`aria-activedescendant`)},g=()=>{r.hidden=!0,n.setAttribute(`aria-expanded`,`false`),n.removeAttribute(`aria-activedescendant`),p=-1},_=()=>{r.hidden=!1,n.setAttribute(`aria-expanded`,`true`)},v=t=>{e.classList.toggle(`is-open`,t),i?.setAttribute(`aria-expanded`,t?`true`:`false`)},y=t=>{let n=new CustomEvent(`wui:search:select`,{bubbles:!0,cancelable:!0,detail:{href:t}});e.dispatchEvent(n)&&window.location.assign(t)},b=async t=>{e.classList.add(`is-loading`);let n=await d.run(Qg(o,s,t));if(!(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)){if(e.classList.remove(`is-loading`),n.ok){let e=Jg(n.html),t=e.querySelector(`[data-wui-count]`);r.replaceChildren(e),m().forEach((e,t)=>{e.id=`${r.id}-opt-${t}`});let i=t?Number(t.getAttribute(`data-wui-count`)):m().length;a&&(a.textContent=i===0?`No results`:`${i} ${i===1?`result`:`results`}`)}else r.replaceChildren(Yg(`wui-topsearch-empty`,`Search is unavailable right now.`));p=-1,_()}};n.addEventListener(`input`,()=>{clearTimeout(f);let t=n.value.trim();if(t.length<l){d.abort(),e.classList.remove(`is-loading`),r.replaceChildren(),g();return}f=setTimeout(()=>b(t),u)}),n.addEventListener(`keydown`,t=>{if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(r.hidden||m().length===0)return;t.preventDefault(),h(p+(t.key===`ArrowDown`?1:-1))}else if(t.key===`Enter`){let e=m();!r.hidden&&p>=0&&e[p]?(t.preventDefault(),y(e[p].getAttribute(`href`))):c&&n.value.trim()!==``&&(t.preventDefault(),y(Qg(c,s,n.value.trim())))}else t.key===`Escape`&&(r.hidden?e.classList.contains(`is-open`)&&(t.preventDefault(),t.stopPropagation(),v(!1),i?.focus()):(t.preventDefault(),t.stopPropagation(),g()))}),r.addEventListener(`click`,e=>{let t=e.target.closest(`.wui-topsearch-hit`);!t||e.ctrlKey||e.metaKey||e.shiftKey||e.button===1||(e.preventDefault(),y(t.getAttribute(`href`)))}),i?.addEventListener(`click`,()=>{let t=!e.classList.contains(`is-open`);v(t),t&&n.focus()});let x=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||Zg(e.target)||(e.preventDefault(),v(!0),n.focus())},S=t=>{e.contains(t.target)||(g(),e.classList.contains(`is-open`)&&v(!1))};document.addEventListener(`keydown`,x),document.addEventListener(`pointerdown`,S),t.push(()=>{clearTimeout(f),d.abort(),document.removeEventListener(`keydown`,x),document.removeEventListener(`pointerdown`,S)})}function e_(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>qg(n,!!e.detail?.collapsed)),e.addEventListener(`click`,t=>{t.target.closest(`[data-wui-tabbar-more]`)&&e.querySelector(`[data-app-shell-menu]`)?.click()});let r=e.querySelector(`[data-wui-bell]`),i=r?Xg(r,t):null,a=e.querySelector(`[data-wui-topsearch]`);a&&$g(a,t);let o={el:e,setUnread(e){if(!i)throw Error(`WUI.shell: this <app-shell> has no <app-shell-notifications>.`);i.setUnread(e)},refreshNotifications(){if(!i)throw Error(`WUI.shell: this <app-shell> has no <app-shell-notifications>.`);return i.refresh()},get collapsed(){return e.classList.contains(`collapsed`)},set collapsed(t){if(!!t===e.classList.contains(`collapsed`))return;let n=e.querySelector(`[data-app-shell-collapse]`);n?n.click():e.classList.toggle(`collapsed`,!!t)}};Gg.set(e,o);let s=n=>{if(n.target===e||n.target.contains?.(e)){for(let e of t)e();Gg.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,s)}};return document.addEventListener(`wui:teardown`,s),o}function t_(e=document){let t=[];e instanceof Element&&e.matches(`[data-app-shell]`)&&t.push(e),t.push(...e.querySelectorAll(`[data-app-shell]`));for(let e of t)e.dataset.wuiPartsWired||(e.dataset.wuiPartsWired=`1`,e_(e))}function n_(e){let t=e?.closest?.(`[data-app-shell]`)??null;return t?(Gg.has(t)||t_(t),Gg.get(t)??null):null}var r_=[`light`,`dark`,`auto`],i_=[`wave`,`circle`,`slide`,`blinds`,`fade`,`none`],a_=`wave`,o_=`theme`,s_={wave:1100,circle:700,slide:600,blinds:900,fade:350,none:0},c_=`wui-theme-switching`,l_=`wui:theme:change`,u_=`wui-theme-toggle`,d_=`(prefers-color-scheme: dark)`,f_=e=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(e).matches,p_=e=>r_.includes(e);function m_(e){return e===`dark`||e===`auto`&&f_(d_)?`dark`:`light`}function h_(e=o_){let t=null;try{t=window.localStorage.getItem(e)}catch{}return p_(t)?t:`auto`}function g_(e,t=o_){try{window.localStorage.setItem(t,e)}catch{}}function __(e){let t=document.documentElement,n=m_(e);t.setAttribute(`data-theme`,e),t.setAttribute(`data-bs-theme`,n),document.dispatchEvent(new CustomEvent(l_,{detail:{mode:n,preference:e}}))}var v_=`(function(k){var m;try{m=localStorage.getItem(k)}catch{}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 y_(e=o_){return`${v_}${JSON.stringify(String(e)).replace(/</g,`\\u003c`)})`}function b_(e,{includeAuto:t=!1}={}){return e===`light`?`dark`:e===`dark`&&t?`auto`:`light`}function x_(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(d_),n=()=>e(t.matches?`dark`:`light`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var S_=60,C_=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,w_=e=>e.toFixed(1),T_=(e,t)=>`${w_(e)}px ${w_(t)}px`,E_={amplitude:22,segments:36,cycles:1.5,ripples:2},D_=6,O_=(e,t,n,r,i)=>{let{amplitude:a,segments:o,cycles:s}=E_,c=n*(t+2*a),l=i?t+a-c:c-a,u=i?t+2*a:-2*a,d=[T_(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(T_(n,i))}return d.push(T_(e,u)),`polygon(${d.join(`, `)})`},k_=(e,t,n,r)=>{let i=t/D_,a=[];for(let t=0;t<D_;t++){let o=t*i,s=i*n,c=r?o+i-s:o,l=r?o+i:o+s;a.push(T_(0,c),T_(e,c),T_(e,l),T_(0,l))}return`polygon(${a.join(`, `)})`};function A_(e,{width:t,height:n,to:r=`dark`,origin:i}={}){let a=r===`dark`,o=[];for(let r=0;r<=S_;r++){let s=r/S_,c=C_(s);switch(e){case`circle`:{let e=i?.x??t/2,r=i?.y??n/2,a=Math.hypot(Math.max(e,t-e),Math.max(r,n-r));o.push({clipPath:`circle(${w_(a*c)}px at ${w_(e)}px ${w_(r)}px)`});break}case`slide`:{let e=n*(1-c);o.push({clipPath:a?`inset(${w_(e)}px 0px 0px 0px)`:`inset(0px 0px ${w_(e)}px 0px)`});break}case`blinds`:o.push({clipPath:k_(t,n,c,a)});break;case`fade`:o.push({clipPath:`none`,opacity:c});break;case`none`:return[];default:o.push({clipPath:O_(t,n,c,s*E_.ripples*2*Math.PI,a)})}}return o}function j_(e,{effect:t=a_,to:n,origin:r,duration:i,live:a}={}){let o=document.documentElement,s=n!==void 0&&o.getAttribute(`data-bs-theme`)===n;if(t===`none`||s||f_(`(prefers-reduced-motion: reduce)`)||typeof document.startViewTransition!=`function`||typeof o.animate!=`function`)return e(),Promise.resolve(!1);o.classList.add(c_);let c=a instanceof Element?a:null;c&&(c.style.viewTransitionName=u_);let l=document.startViewTransition(e),u=i??s_[t]??s_.wave;return l.ready.then(()=>{let e=A_(t,{width:window.innerWidth,height:window.innerHeight,to:n,origin:r});o.animate(e,{duration:u,easing:`linear`,fill:`both`,pseudoElement:`::view-transition-new(root)`})}).catch(()=>{}),l.finished.catch(()=>{}).then(()=>(o.classList.remove(c_),c&&(c.style.viewTransitionName=``),!0))}function M_(){ue(),t(`wui-select`,Ia),t(`wui-country-select`,Ba),t(`wui-phone`,Hl),t(`wui-datepicker`,no),t(`wui-date-range`,mo),t(`wui-dock`,ho),t(`wui-image-crop`,hs),t(`wui-kanban`,Kr),t(`wui-inline-edit`,ks),t(`wui-consent-banner`,va),t(`wui-slider`,Fu),t(`wui-sortable`,Ku),t(`wui-timepicker`,id),t(`wui-tour`,Pf),t(`wui-tree`,Hf),t(`wui-autocomplete`,hi),t(`wui-command-palette`,Zi),t(`wui-context-menu`,Na),t(`wui-multiselect`,Cc),t(`wui-taginput`,Yu),t(`wui-otp`,ul),t(`wui-status-icon`,Xr),t(`wui-shortcuts`,Au),t(`wui-record-pager`,Yl),t(`wui-carousel`,yi),t(`wui-code-block`,Vi),t(`wui-data-table`,Ka),t(`wui-drawer`,Oo),t(`wui-hover-card`,Fo),t(`wui-lightbox`,Ws),t(`wui-menubar`,gc),t(`wui-navigation-menu`,Ic),t(`wui-notification-center`,el),t(`wui-onboarding-checklist`,sl),t(`wui-overflow`,yl),t(`wui-rating`,Jl),t(`wui-relative-time`,cu),t(`wui-resizable`,Eu),t(`wui-rolling-number`,ku),t(`wui-show-more`,Pu),t(`wui-truncate`,Uf),t(`wui-whats-new`,Yf),t(`wui-mention-input`,uc),t(`wui-comment-thread`,oa),t(`wui-wizard-step`,tp),t(`wui-wizard`,Qf)}return M_(),e.AVATAR_ACCEPT=np,e.AVATAR_MAX_SIZE_MB=rp,e.AVATAR_OUTPUT_SIZE=ip,e.AVATAR_OUTPUT_TYPE=ap,e.AVATAR_PREVIEW_SIZES=op,e.AVATAR_TEXT=sp,e.BAR_BULK_IN_BAR_ATTRIBUTE=Qh,e.COLUMN_MAX_WIDTH=Be,e.COLUMN_MIN_WIDTH=ze,e.COMMENT_INTENTS=$i,e.COMMENT_REACTIONS=Qi,e.COMMENT_TEXT=W,e.CONFIRM_DIALOG_ID=Cp,e.CONFIRM_TONES=wp,e.COPY_FEEDBACK_MS=zi,e.CSRF_META_NAME=Qt,e.CURRENCIES=fe,e.DATA_TABLE_TEXT=j,e.DATE_PATTERNS=k,e.DEFAULT_CSRF_HEADER=$t,e.DEFAULT_IMAGE_ACCEPT=oh,e.DEFAULT_MAX_SIZE_MB=sh,e.DEFAULT_PASSWORD_RULES=ig,e.DEFAULT_REQUIREMENTS_TITLE=ag,e.DEFAULT_THEME_EFFECT=a_,e.DEFAULT_THEME_STORAGE_KEY=o_,e.DISCARD_EVENT=km,e.DISCARD_TEXT=Om,e.DROP_OVER_CLASS=dg,e.DURATION_UNITS=me,e.EMPTY_VALUE=ge,e.FILTER_POPOVER_MAX_CHIPS=O,e.FLASH_STORAGE_KEY=Ep,e.FLASH_VARIANTS=Tp,e.FORMAT_STYLES=de,e.HTTP_KINDS=tn,e.INLINE_EDIT_SAVED_MS=_s,e.INLINE_EDIT_TEXT=vs,e.INLINE_EDIT_TYPES=gs,e.IST_TIME_ZONE=he,e.KANBAN_DRAG_THRESHOLD_PX=gr,e.KANBAN_LONG_PRESS_MS=hr,e.KANBAN_PHONE_QUERY=mr,e.KANBAN_STORAGE_PREFIX=pr,e.KANBAN_SUMMARY_FORMATS=fr,e.KANBAN_TEXT=L,e.KANBAN_TONES=dr,e.LIST_KEYS=p,e.MASK_INPUT_TYPES=xh,e.MASK_NAMES=kh,e.MENTION_ID_PATTERN=Gs,e.MENTION_MAX_QUERY=tc,e.MENTION_MAX_RESULTS=ec,e.MENTION_TEXT=nc,e.MONEY_UNITS=pe,e.NOTIFICATION_COUNT_CAP=Lc,e.NOTIFICATION_TEXT=zc,e.PIN_AT_VAR=et,e.PIN_SIDES=Ue,e.RESIZE_STEP=Ve,e.RESIZE_STEP_LARGE=He,e.ROW_DRAG_TYPE=fg,e.ROW_DROP_EVENT=ug,e.ROW_HEIGHTS=Ge,e.ROW_MOVE_LIMIT=it,e.ROW_MOVE_MS=at,e.ROW_SAVE_ATTR=pt,e.ROW_SAVE_ERROR_CLASS=mt,e.ROW_SAVE_STATES=ft,e.SCROLL_EDGE_SELECTOR=Fg,e.SEARCH_OPEN_KEY=dp,e.SELECT_ALL_LABEL=xt,e.SELECT_CELL_CLASS=N,e.SELECT_KEY=m,e.SELECT_ROW_LABEL=St,e.SERVER_ACTION_TEXT=Dp,e.SHORTCUTS_OFF_ATTRIBUTE=l,e.SHORTCUT_EVENT=d,e.SHORTCUT_SCOPE_ATTRIBUTE=u,e.SHORTCUT_TEXT=f,e.STATUS_TONES=Yr,e.THEME_BOOT_SCRIPT_BODY=v_,e.THEME_CHANGE_EVENT=l_,e.THEME_EFFECTS=i_,e.THEME_EFFECT_DURATION=s_,e.THEME_LIVE_NAME=u_,e.THEME_MODES=r_,e.THEME_SWITCHING_CLASS=c_,e.TOAST_ACTION_METHODS=Kt,e.TOAST_ACTION_MS=Gt,e.UNSAVED_TEXT=rm,e.VIRTUAL_OVERSCAN=We,e.WHATS_NEW_READ_EVENT=Wf,e.WUI_HEADERS=P,e.WuiAutocomplete=hi,e.WuiCarousel=yi,e.WuiCodeBlock=Vi,e.WuiCommandPalette=Zi,e.WuiCommentThread=oa,e.WuiConsentBanner=va,e.WuiContextMenu=Na,e.WuiCountrySelect=Ba,e.WuiDataTable=Ka,e.WuiDatePicker=no,e.WuiDateRange=mo,e.WuiDock=ho,e.WuiDrawer=Oo,e.WuiHoverCard=Fo,e.WuiImageCrop=hs,e.WuiInlineEdit=ks,e.WuiKanban=Kr,e.WuiLightbox=Ws,e.WuiMentionInput=uc,e.WuiMenubar=gc,e.WuiMultiSelect=Cc,e.WuiNavigationMenu=Ic,e.WuiNotificationCenter=el,e.WuiOnboardingChecklist=sl,e.WuiOtp=ul,e.WuiOverflow=yl,e.WuiPhone=Hl,e.WuiRating=Jl,e.WuiRecordPager=Yl,e.WuiRelativeTime=cu,e.WuiResizable=Eu,e.WuiRollingNumber=ku,e.WuiSelect=Ia,e.WuiShortcuts=Au,e.WuiShowMore=Pu,e.WuiSlider=Fu,e.WuiSortable=Ku,e.WuiStatusIcon=Xr,e.WuiTagInput=Yu,e.WuiTimePicker=id,e.WuiTour=Pf,e.WuiTree=Hf,e.WuiTruncate=Uf,e.WuiWhatsNew=Yf,e.WuiWizard=Qf,e.WuiWizardStep=tp,e.acceptLabel=hh,e.addRowSelectCells=kt,e.addSelectColumn=At,e.applyBarBulk=ng,e.applyTheme=__,e.ariaKeyShortcuts=ee,e.attachInputMask=Wh,e.attachRowDrag=Mg,e.attachScrollEdges=Lg,e.attachShiftRange=Nt,e.avatarCropOptions=up,e.avatarUnreadableMessage=lp,e.barBulkCountText=tg,e.buildPasswordRules=sg,e.clampColumnWidth=qe,e.classifyStatus=on,e.collapseSearch=yp,e.confirmAction=Bp,e.copyTextToClipboard=Bi,e.createDiscardPrompt=zm,e.createLocalSeenStore=Of,e.createRequestQueue=ln,e.createSelectHeaderCell=wt,e.createSelectRowCell=Tt,e.createSelectSpacerCell=Et,e.defineWeborityElements=M_,e.evaluatePassword=cg,e.formValues=fm,e.formatCompact=Me,e.formatCurrency=Ae,e.formatDate=Le,e.formatDuration=Pe,e.formatMasked=Lh,e.formatNumber=A,e.formatPercent=Ne,e.formatRelativeTime=eu,e.formatValue=Re,e.getServerTable=Ut,e.getShell=n_,e.glyphSvg=M,e.groupCount=Ke,e.groupItems=Je,e.groupNotificationsByDay=Gc,e.identityCell=ht,e.inShortcutScope=T,e.initCollapsibleSearch=Sp,e.initDrawerDiscard=ah,e.initInputMasks=Zh,e.initPageBarBulk=rg,e.initRemoteModals=cr,e.initRowDrag=Pg,e.initScrollEdges=Ug,e.initServerActions=nm,e.initServerTables=Ht,e.initShellParts=t_,e.initUnsavedChanges=Em,e.inlineEditText=ys,e.isHeicFile=cp,e.isImageFile=fh,e.isImageOnlyAccept=mh,e.isMaskPattern=jh,e.isPdfFile=ph,e.isTypingTarget=C,e.kanbanCardLabel=z,e.kanbanOverflow=zr,e.kanbanStorageKey=Br,e.kanbanSummaryFormat=Ur,e.kanbanVisibleLimit=Rr,e.loadRemoteDrawer=ur,e.loadRemoteModal=lr,e.maskedPostValue=Bh,e.matchSegments=Hi,e.matchesAccept=gh,e.measureRows=lt,e.mentionLabel=Js,e.mentionTextFromValue=Zs,e.mentionValueFromText=Qs,e.mentionedIds=$s,e.moveFocus=D,e.nextTheme=b_,e.notificationCountText=Bc,e.notificationDayHeading=Wc,e.notificationTime=Uc,e.notificationTriggerLabel=Vc,e.notificationUnreadAnnouncement=Hc,e.openSearch=vp,e.parseMentionValue=Xs,e.parseToastAction=Yt,e.passwordSatisfies=lg,e.pinAtValue=tt,e.pinClasses=rt,e.pinOffsetVar=$e,e.planPins=nt,e.playRowMoves=ut,e.postedMasked=Ih,e.rawMasked=Fh,e.readColumnWidths=Ze,e.readCsrf=rn,e.readKanbanCollapsed=Vr,e.readStoredTheme=h_,e.relativeTimeTitle=tu,e.resetUnsavedChanges=Dm,e.resolveMask=Nh,e.resolveTheme=m_,e.rowLabel=gt,e.rowOrderChanged=dt,e.runShortcut=E,e.runToastAction=Zt,e.saveOutcomeText=yt,e.setRowSaveState=_t,e.settledRows=vt,e.shortcutKey=S,e.shortcutName=x,e.shortcutsOff=w,e.showResultToast=Xt,e.storeTheme=g_,e.sumKanbanValues=Wr,e.syncSelectAll=jt,e.syncTargets=Ng,e.themeBootScript=y_,e.themeKeyframes=A_,e.tickedKeys=Cg,e.toInstant=Fe,e.transitionTheme=j_,e.validateFile=_h,e.virtualRange=Ye,e.watchSystemTheme=x_,e.withTrustedLabel=si,e.writeColumnWidths=Qe,e.writeKanbanCollapsed=Hr,e.wuiFetch=F,e})({});