@webority/ui-elements 0.77.1 → 0.77.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{WuiMultiSelect-CAMJOfq1.js → WuiMultiSelect-Pm9-F-YU.js} +1 -1
- package/dist/elements/filter-popover.js +1 -1
- package/dist/elements/multiselect.js +1 -1
- package/dist/filterPopover-wAZS4TuD.js +1 -0
- package/dist/ui-elements.global.js +3 -3
- package/dist/ui-elements.js +1 -1
- package/package.json +1 -1
- package/dist/filterPopover-BD8kwDfx.js +0 -1
package/dist/ui-elements.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./elementBase-BlsR4tqa.js";import{a as t,c as n,d as r,f as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./shortcutKeys-BQiDpsTJ.js";import{n as h,t as g}from"./filterPopover-BD8kwDfx.js";import{t as _}from"./devWarn-DXdRWZs3.js";import{a as v,c as y,d as b,f as x,h as S,i as ee,l as te,m as ne,n as re,o as ie,p as ae,r as oe,s as se,t as ce,u as le}from"./formatters-BAE__8ye.js";import{A as ue,C as de,D as fe,E as pe,M as me,O as he,S as ge,T as _e,_ as ve,a as ye,b as be,c as xe,d as Se,f as Ce,g as we,h as Te,i as Ee,j as De,k as Oe,l as ke,m as Ae,n as je,o as Me,p as Ne,r as Pe,s as Fe,t as Ie,u as Le,v as Re,w as ze,x as Be,y as Ve}from"./dataTable-Cd_IJQcs.js";import{t as He}from"./iconGlyphs.g-Bk8AzmSO.js";import{C as Ue,S as We,T as Ge,_ as Ke,a as qe,b as Je,c as C,d as Ye,f as Xe,g as Ze,h as Qe,i as $e,l as et,m as tt,n as nt,o as w,p as rt,r as it,s as at,t as ot,u as st,v as ct,w as lt,x as ut,y as dt}from"./wuiHttp-27mq9Jpn.js";import{_ as ft,a as pt,b as mt,c as ht,d as gt,f as _t,g as vt,h as yt,i as bt,l as xt,m as St,n as Ct,o as wt,p as Tt,r as Et,s as Dt,t as Ot,u as kt,v as At,y as jt}from"./kanban-Ca4U3YaX.js";import{n as Mt,t as Nt}from"./statusIcons-2X4iGkKL.js";import{o as Pt}from"./optionLabel-Bd3vP-XI.js";import{t as Ft}from"./WuiAutocomplete-Cvoyr30K.js";import{t as It}from"./WuiCarousel-DjQNKykv.js";import{t as Lt}from"./WuiCodeBlock-8qgxTcyK.js";import{n as Rt,t as zt}from"./copyText-DM5HhXjf.js";import{t as Bt}from"./textMatch-wdY7XLIc.js";import{t as Vt}from"./WuiCommandPalette-DMXm40wj.js";import{i as Ht,n as Ut,r as Wt,t as Gt}from"./WuiCommentThread-WL1GX7Jy.js";import{t as Kt}from"./WuiConsentBanner-D6YE84__.js";import{t as qt}from"./WuiContextMenu-BLNKaFsB.js";import{t as Jt}from"./WuiSelect-DR4PYwAw.js";import{t as Yt}from"./WuiCountrySelect-Dac15o75.js";import{t as Xt}from"./WuiDataTable-BVAsbW-S.js";import{t as Zt}from"./WuiDatePicker-BUtDjbek.js";import{t as Qt}from"./WuiDateRange-DCNf4MSb.js";import{t as $t}from"./WuiDock-BD2HgMmP.js";import{t as en}from"./WuiDrawer-D6K2eRlW.js";import{t as tn}from"./WuiHoverCard-Ql6CD3BL.js";import{t as nn}from"./WuiImageCrop-Cr3D2iPo.js";import{a as rn,i as an,n as on,r as sn,t as cn}from"./WuiInlineEdit-DrQmhWZ6.js";import{t as ln}from"./WuiLightbox-DQ47WenM.js";import{a as un,c as dn,i as fn,l as pn,n as mn,o as hn,r as gn,s as _n,t as vn,u as yn}from"./WuiMentionInput-BqcTKb8b.js";import{t as bn}from"./WuiMenubar-4MOZ51R_.js";import{t as xn}from"./WuiMultiSelect-CAMJOfq1.js";import{t as Sn}from"./WuiNavigationMenu-BsLnvz2Y.js";import{a as Cn,c as wn,i as Tn,n as En,o as Dn,r as On,s as kn,t as An}from"./notificationDays-pYmoU0g6.js";import{t as jn}from"./WuiNotificationCenter-Dc7hD9w-.js";import{t as Mn}from"./WuiOnboardingChecklist-s2DG6PZ0.js";import{t as Nn}from"./WuiOtp-BbO_75RB.js";import{t as Pn}from"./WuiOverflow-Ixc3PRuW.js";import{t as Fn}from"./WuiPhone-BhmKncvF.js";import{t as In}from"./WuiRating-BzeW6iDC.js";import{t as Ln}from"./WuiRecordPager-yXv4g2ZR.js";import{n as Rn,r as zn,t as Bn}from"./WuiRelativeTime-Cfc8TMd8.js";import{t as Vn}from"./WuiResizable-m2Ypa-zD.js";import{t as Hn}from"./WuiRollingNumber-DBgi_3l7.js";import{t as Un}from"./WuiShortcuts-CMibF1XM.js";import{t as Wn}from"./WuiShowMore-Bu7IQcXS.js";import{t as Gn}from"./WuiSlider-CH4vFmtk.js";import{t as Kn}from"./WuiSortable-Bd7Fz5Ox.js";import{t as qn}from"./WuiTagInput-C9_GyLav.js";import{t as Jn}from"./WuiTimePicker-CaJrTq3m.js";import{n as Yn,t as Xn}from"./WuiTour-DOeTJa4V.js";import{t as Zn}from"./WuiTree-amrUzT-J.js";import{t as Qn}from"./WuiTruncate-BLl2u3b-.js";import{n as $n,t as er}from"./WuiWhatsNew-68sOQOTO.js";import{n as tr,t as nr}from"./WuiWizardStep-1O75EzB2.js";import{$ as rr,A as ir,B as ar,C as or,D as sr,E as cr,F as lr,G as ur,H as dr,I as fr,J as pr,K as mr,L as hr,M as gr,N as _r,O as vr,P as yr,Q as br,R as xr,S as Sr,T as Cr,U as wr,V as Tr,W as Er,X as Dr,Y as Or,Z as kr,_ as Ar,a as jr,at as Mr,b as Nr,c as Pr,d as Fr,et as Ir,f as Lr,g as Rr,h as zr,i as Br,it as Vr,j as Hr,k as Ur,l as Wr,m as Gr,n as Kr,nt as qr,o as Jr,p as Yr,q as Xr,r as Zr,rt as Qr,s as $r,t as ei,tt as ti,u as ni,v as ri,w as ii,x as ai,y as oi,z as si}from"./themeTransition-QXpGgIMc.js";var ci=`/`,li=`.search-wrap.wui-search-collapsible`,ui=`.wui-topsearch-panel`,di=`.modal, wui-drawer[open]`,fi=new WeakSet,T=e=>e.querySelector(`.wui-search-toggle`),E=e=>e.querySelector(`.search-input`);function D(e){e.classList.remove(`is-collapsed`),T(e)?.setAttribute(`aria-expanded`,`true`),E(e)?.focus()}function O(e){E(e)?.value||(e.classList.add(`is-collapsed`),T(e)?.setAttribute(`aria-expanded`,`false`))}function pi(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=T(e),n=E(e);t?.addEventListener(`click`,()=>D(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n.value||(r.preventDefault(),O(e),t?.focus())}),e.addEventListener(`focusout`,t=>{e.contains(t.relatedTarget)||O(e)})}function mi(e){fi.has(e)||(fi.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||o(t.target)||t.target?.closest?.(di)||e.querySelector(ui))return;let n=[...e.querySelectorAll(li)].find(e=>e.offsetParent!==null);n&&(t.preventDefault(),D(n))}))}function hi(e=document){for(let t of e.querySelectorAll(li))pi(t);mi(e.ownerDocument??e)}var k=`wuiConfirm`,A=Object.freeze([`danger`]),j=Object.freeze([`success`,`info`,`warning`,`danger`]),M=`wui.flash`,N=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.`}),gi=new WeakSet,_i=new WeakSet,P=null,F=null,I=!1,vi=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},L=(e,t)=>{e&&window.WUI?.toast?.(e,{variant:t})},yi=()=>{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 bi(){let e=document.getElementById(k);return e||(e=document.createElement(`div`),e.id=k,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`,`${ft.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">${vi(N.cancelLabel)}</button><button type="button" class="btn btn-primary" data-app-confirm></button></div></div></div></div>`,document.body.appendChild(e),e)}function xi(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!A.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);Si({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 Si({title:e,message:t,label:n,danger:r},i){let a=yi(),o=bi(),s=o.querySelector(`.wui-confirm-title`),c=o.querySelector(`[data-app-confirm]`);if(!s||!c)throw Error(`#${k} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${k}"> 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||N.confirmTitle,l.textContent=t,c.textContent=n||N.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),F=i,I=!1,a.getOrCreateInstance(o).show()}var R=(e,t)=>{P=e;try{t()}finally{P=null}};function Ci(e,{title:t,message:n,label:r,tone:i},a){if(i!=null&&!A.includes(i))throw TypeError(`confirmAction: tone "${i}" is not supported. Use danger, or leave it off.`);Ri(e.ownerDocument),Si({title:t,message:n,label:r,danger:i===`danger`},()=>R(e,a))}var wi=e=>e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`;function Ti(e){let t=e.target.closest?.(`[data-wui-confirm]:not(form)`);!t||t===P||wi(t)||(e.preventDefault(),e.stopImmediatePropagation(),xi(t,()=>R(t,()=>t.click())))}function Ei(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===P||e.submitter&&e.submitter===P)return;e.preventDefault(),e.stopImmediatePropagation();let n=e.submitter?.form===t?e.submitter:void 0;xi(t,()=>R(t,()=>t.requestSubmit(n)))}function Di(e){let t=e.target.closest?.(`#${k} [data-app-confirm]`);!t||t.disabled||!F||(I=!0,yi().getOrCreateInstance(t.closest(`#${k}`)).hide())}function Oi(e){if(e.target.id!==`wuiConfirm`)return;let t=I?F:null;F=null,I=!1,t?.()}var ki=(e,t)=>{e&&window.sessionStorage.setItem(M,JSON.stringify({message:e,variant:t}))},Ai=e=>e===`forbidden`?N.forbidden:e===`network`?N.network:N.failed;function ji(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.dataset.refreshOnSuccess!==`false`&&tt(e)?.reload()}async function Mi(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 Ni(t,e)}async function Ni(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 C(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`)){ki(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload();return}if(t.disabled=!1,t.removeAttribute(`aria-busy`),i.ok){rt(i,a),ji();return}L(i.message||Ai(i.kind),`danger`)}function Pi(e){let t=e.target.closest?.(`[data-wui-post]`);t&&(e.preventDefault(),!(wi(t)||t.getAttribute(`aria-busy`)===`true`)&&Mi(t).catch(e=>_(e)))}function Fi(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`&&(Ni(t.getAttribute(`action`),n,new FormData(t)).catch(e=>_(e)),window.bootstrap?.Dropdown?.getInstance(t.closest(`.dropdown`)?.querySelector(`[data-bs-toggle='dropdown']`))?.hide())}function Ii(){let e=window.sessionStorage.getItem(M);if(!e)return;window.sessionStorage.removeItem(M);let{message:t,variant:n}=JSON.parse(e);L(t,n)}function Li(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(!j.includes(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${j.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||e.textContent.trim();e.remove(),L(n,t)}}function Ri(e){_i.has(e)||(_i.add(e),e.addEventListener(`click`,Di),e.addEventListener(`hidden.bs.modal`,Oi))}function zi(e=document){let t=e.ownerDocument||e;gi.has(t)||(gi.add(t),t.addEventListener(`click`,Ti,!0),t.addEventListener(`submit`,Ei,!0),Ri(t),t.addEventListener(`click`,Pi),t.addEventListener(`submit`,Fi),Ii()),Li(e)}var z=Object.freeze({title:`Leave without saving?`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,leaveLabel:`Leave`}),B=`form[data-wui-unsaved]`,Bi=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,Vi=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,Hi=new Set([`submit`,`button`,`reset`,`image`]),V=new WeakMap,Ui=new WeakSet,Wi=e=>`${e.name}:${e.size}:${e.lastModified}`;function H(e){let t=[];for(let n of e.elements)!n.name||n.disabled||Hi.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(Wi)]):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 U(e){return H(e)}var Gi=e=>({saved:e.querySelector(Bi)?null:H(e),engaged:!1,discarded:!1});function Ki(e){let t=V.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&H(e)!==t.saved}var W=(e,t)=>[...e.querySelectorAll(B)].filter(e=>e!==t&&Ki(e)),qi=()=>!!window.bootstrap?.Modal;function Ji(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||z.message;Ci(e,{title:z.title,message:r,label:z.leaveLabel,tone:`danger`},()=>{for(let e of t)V.get(e).discarded=!0;n()})}function Yi(e){if(e.matches(Vi))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 Xi(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 Zi(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||!Yi(t))return;let n=W(t.ownerDocument,null);!n.length||!qi()||(e.preventDefault(),Ji(t,n,()=>t.click()))}function Qi(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!Xi(t,e.submitter))return;let n=W(t.ownerDocument,t);if(n.length&&qi()){e.preventDefault();let r=e.submitter?.form===t?e.submitter:void 0;Ji(t,n,()=>t.requestSubmit(r));return}let r=V.get(t);r&&(r.saved=H(t),r.discarded=!1)}function $i(e){W(document,null).length&&(e.preventDefault(),e.returnValue=``)}function ea(e){let t=e.target.closest?.(B),n=t&&V.get(t);!n||n.engaged||(n.saved!==null&&(n.saved=H(t)),n.engaged=!0)}function ta(e){let t=e.target.closest?.(B),n=t&&V.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function na(e){let t=e.detail?.handle?.el;if(t instanceof Element)for(let e of t.querySelectorAll(B))ia(e)}function ra(e=document){let t=e.ownerDocument||e;if(!Ui.has(t)){Ui.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,ea,!0);for(let e of[`input`,`change`])t.addEventListener(e,ta,!0);t.addEventListener(`click`,Zi),t.addEventListener(`submit`,Qi),t.addEventListener(`wui:modal:success`,na),t.defaultView.addEventListener(`beforeunload`,$i)}let n=[...e.querySelectorAll?.(B)||[]];e.matches?.(B)&&n.unshift(e);for(let e of n)V.has(e)||V.set(e,Gi(e))}function ia(e){if(!(e instanceof HTMLFormElement)||!e.matches(B))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);V.set(e,{saved:H(e),engaged:!1,discarded:!1})}var aa=Object.freeze({discard:`Discard`,keep:`Keep editing`}),oa=`wui:drawer:discard`,G=`wui-drawer[confirm-discard]`,K=`.wui-modal-shell`,sa=`form[data-wui-confirm-discard]`,q=`.wui-drawer-discard`,ca=`input, select, textarea`,J=new WeakMap,la=new WeakSet,ua=new WeakSet;function da(e,t,n,r){let i=e.createElement(`button`);return i.type=`button`,i.className=t,i.setAttribute(n,``),i.textContent=r,i}function fa(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,da(e,`btn btn-danger btn-sm`,`data-wui-discard-confirm`,aa.discard),da(e,`btn btn-secondary btn-sm`,`data-wui-discard-keep`,aa.keep)),n}function pa(e){let t=e.closest?.(G);if(t)return t;let n=e.closest?.(K);return n&&(n.hasAttribute(`confirm-discard`)||n.querySelector(sa))?n:null}function Y(e){return e.closest(G)??e.closest(K)}function X(e){return e.matches(G)||e.hasAttribute(`confirm-discard`)?e.querySelectorAll(`form`):e.querySelectorAll(sa)}function ma(e){let t=J.get(e);return t!=null&&U(e)!==t}function ha(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,e.querySelector(`.wui-drawer-panel`).append(t),ua.add(t),t}function ga(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-modal-footer`,(e.querySelector(`.wui-modal-body`)?.parentElement??e.querySelector(`.modal-content`)??e).append(t),ua.add(t),t}function _a(e){e.querySelector(`[data-wui-discard-confirm]`).focus()}function va(e,t){let n=e.querySelector(q);if(n){_a(n);return}let r=fa(e.ownerDocument,t),i;if(e.matches(G))i=e.querySelector(`.wui-drawer-footer`)??ha(e),i.prepend(r);else if(e.hasAttribute(`confirm-discard`))i=e.querySelector(`.wui-modal-footer`)??ga(e),i.prepend(r);else{let t=e.querySelector(sa);i=t.querySelector(`.modal-footer`),i?i.prepend(r):(i=t,t.append(r))}i.classList.add(`wui-drawer-discarding`),_a(r)}function ya(e){let t=e.parentElement;e.remove(),t.classList.remove(`wui-drawer-discarding`),ua.has(t)&&t.remove()}function ba(e){for(let t of X(e)){let e=[...t.querySelectorAll(ca)].find(e=>e.type!==`hidden`&&!e.disabled);if(e){e.focus();return}}}function xa(e){let t=pa(e.target);if(t)for(let e of X(t))J.get(e)??J.set(e,U(e))}function Sa(e){let t=e.target;!(t instanceof HTMLFormElement)||!pa(t)||J.set(t,U(t))}function Ca(e){let t=e.detail?.handle?.el;if(t instanceof Element)for(let e of t.querySelectorAll(`form`))J.delete(e)}function wa(e){let t=e.target;!(t instanceof Element)||!t.matches(G)||[...X(t)].some(ma)&&(e.preventDefault(),va(t,t.getAttribute(`confirm-discard`)))}function Ta(e){let t=e.target;if(!(t instanceof Element)||!t.matches(K))return;let n=[...X(t)].find(ma);n&&(e.preventDefault(),va(t,t.getAttribute(`confirm-discard`)??n.getAttribute(`data-wui-confirm-discard`)))}function Ea(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(K);n&&window.bootstrap?.Modal?.getInstance(n)?.hide()}function Da(e){let t=e.closest(q),n=Y(t);ya(t);for(let e of X(n))J.set(e,U(e));n.dispatchEvent(new CustomEvent(oa,{bubbles:!0})),n.matches(G)?n.hide():window.bootstrap.Modal.getInstance(n).hide()}function Oa(e){let t=e.closest(q),n=Y(t);ya(t),ba(n)}function ka(e){let t=e.target,n=t.closest?.(`[data-wui-discard-confirm]`);if(n){Da(n);return}let r=t.closest?.(`[data-wui-discard-keep]`);if(r){Oa(r);return}let i=t.closest?.(`[data-wui-dismiss]`);i&&Ea(i)}function Aa(e){if(e.key!==`Escape`)return;let t=e.currentTarget.querySelector(q);if(!t)return;e.preventDefault(),e.stopPropagation();let n=Y(t);ya(t),ba(n)}function ja(e=document){let t=e.ownerDocument||e;la.has(t)||(la.add(t),t.addEventListener(`focusin`,xa),t.addEventListener(`pointerdown`,xa),t.addEventListener(`submit`,Sa),t.addEventListener(`wui:modal:success`,Ca),t.addEventListener(`wui:modal:loaded`,Ca),t.addEventListener(`wui-drawer-close`,wa,!0),t.addEventListener(`hide.bs.modal`,Ta),t.addEventListener(`click`,ka),t.addEventListener(`keydown`,Aa,!0))}var Ma=`data-wui-bulk-in-bar`,Na=`[data-wui-page-header-bar][data-wui-bulk-for]`,Pa=new WeakSet;function Fa(e){return`${x(e,{decimals:0})} selected`}function Ia(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?Fa(t):``)}function La(e=document){for(let t of e.querySelectorAll(Na))document.getElementById(t.dataset.wuiBulkFor)?.setAttribute(Ma,``);Pa.has(document)||(Pa.add(document),document.addEventListener(`selectionchange`,e=>{if(typeof e.detail?.selected==`number`)for(let t of document.querySelectorAll(Na))document.getElementById(t.dataset.wuiBulkFor)?.contains(e.target)&&Ia(t,e.detail.selected)}))}var Ra=31536e3,Z=new WeakMap,Q=e=>e>99?`99+`:String(e);function za(e,t,n=document){n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${Ra}; SameSite=Lax`}var Ba=e=>{let t=document.createElement(`template`);return t.innerHTML=e,t.content},$=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function Va(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=w(),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=Q(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?l:`${l}, ${Q(o)} unread`),a&&s&&i&&(i.textContent=o===0?`No unread notifications`:`${Q(o)} unread notifications`)},h=()=>o?.classList.contains(`show`)??!1,g=()=>{let e=$(`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($(`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=Ba(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($(`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 C(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 Ha=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),Ua=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function Wa(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=w(),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(Ua(o,s,t));if(!(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)){if(e.classList.remove(`is-loading`),n.ok){let e=Ba(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($(`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(Ua(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||Ha(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 Ga(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>za(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?Va(r,t):null,a=e.querySelector(`[data-wui-topsearch]`);a&&Wa(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)}};Z.set(e,o);let s=n=>{if(n.target===e||n.target.contains?.(e)){for(let e of t)e();Z.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,s)}};return document.addEventListener(`wui:teardown`,s),o}function Ka(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`,Ga(e))}function qa(e){let t=e?.closest?.(`[data-app-shell]`)??null;return t?(Z.has(t)||Ka(t),Z.get(t)??null):null}function Ja(){h(),e(`wui-select`,Jt),e(`wui-country-select`,Yt),e(`wui-phone`,Fn),e(`wui-datepicker`,Zt),e(`wui-date-range`,Qt),e(`wui-dock`,$t),e(`wui-image-crop`,nn),e(`wui-kanban`,ht),e(`wui-inline-edit`,an),e(`wui-consent-banner`,Kt),e(`wui-slider`,Gn),e(`wui-sortable`,Kn),e(`wui-timepicker`,Jn),e(`wui-tour`,Xn),e(`wui-tree`,Zn),e(`wui-autocomplete`,Ft),e(`wui-command-palette`,Vt),e(`wui-context-menu`,qt),e(`wui-multiselect`,xn),e(`wui-taginput`,qn),e(`wui-otp`,Nn),e(`wui-status-icon`,Mt),e(`wui-shortcuts`,Un),e(`wui-record-pager`,Ln),e(`wui-carousel`,It),e(`wui-code-block`,Lt),e(`wui-data-table`,Xt),e(`wui-drawer`,en),e(`wui-hover-card`,tn),e(`wui-lightbox`,ln),e(`wui-menubar`,bn),e(`wui-navigation-menu`,Sn),e(`wui-notification-center`,jn),e(`wui-onboarding-checklist`,Mn),e(`wui-overflow`,Pn),e(`wui-rating`,In),e(`wui-relative-time`,Bn),e(`wui-resizable`,Vn),e(`wui-rolling-number`,Hn),e(`wui-show-more`,Wn),e(`wui-truncate`,Qn),e(`wui-whats-new`,$n),e(`wui-mention-input`,fn),e(`wui-comment-thread`,Ht),e(`wui-wizard-step`,nr),e(`wui-wizard`,tr)}Ja();export{kr as AVATAR_ACCEPT,br as AVATAR_MAX_SIZE_MB,rr as AVATAR_OUTPUT_SIZE,Ir as AVATAR_OUTPUT_TYPE,ti as AVATAR_PREVIEW_SIZES,qr as AVATAR_TEXT,Ma as BAR_BULK_IN_BAR_ATTRIBUTE,Ie as COLUMN_MAX_WIDTH,je as COLUMN_MIN_WIDTH,Gt as COMMENT_INTENTS,Ut as COMMENT_REACTIONS,Wt as COMMENT_TEXT,k as CONFIRM_DIALOG_ID,A as CONFIRM_TONES,zt as COPY_FEEDBACK_MS,ot as CSRF_META_NAME,ce as CURRENCIES,Pe as DATA_TABLE_TEXT,re as DATE_PATTERNS,nt as DEFAULT_CSRF_HEADER,wr as DEFAULT_IMAGE_ACCEPT,Er as DEFAULT_MAX_SIZE_MB,vr as DEFAULT_PASSWORD_RULES,Ur as DEFAULT_REQUIREMENTS_TITLE,ei as DEFAULT_THEME_EFFECT,Kr as DEFAULT_THEME_STORAGE_KEY,oa as DISCARD_EVENT,aa as DISCARD_TEXT,ai as DROP_OVER_CLASS,oe as DURATION_UNITS,ee as EMPTY_VALUE,g as FILTER_POPOVER_MAX_CHIPS,M as FLASH_STORAGE_KEY,j as FLASH_VARIANTS,v as FORMAT_STYLES,it as HTTP_KINDS,cn as INLINE_EDIT_SAVED_MS,on as INLINE_EDIT_TEXT,sn as INLINE_EDIT_TYPES,ie as IST_TIME_ZONE,Ot as KANBAN_DRAG_THRESHOLD_PX,Ct as KANBAN_LONG_PRESS_MS,Et as KANBAN_PHONE_QUERY,bt as KANBAN_STORAGE_PREFIX,pt as KANBAN_SUMMARY_FORMATS,wt as KANBAN_TEXT,Dt as KANBAN_TONES,p as LIST_KEYS,_r as MASK_INPUT_TYPES,yr as MASK_NAMES,un as MENTION_ID_PATTERN,vn as MENTION_MAX_QUERY,mn as MENTION_MAX_RESULTS,gn as MENTION_TEXT,se as MONEY_UNITS,An as NOTIFICATION_COUNT_CAP,En as NOTIFICATION_TEXT,Ee as PIN_AT_VAR,ye as PIN_SIDES,Me as RESIZE_STEP,Fe as RESIZE_STEP_LARGE,Sr as ROW_DRAG_TYPE,or as ROW_DROP_EVENT,xe as ROW_HEIGHTS,ke as ROW_MOVE_LIMIT,Le as ROW_MOVE_MS,Se as ROW_SAVE_ATTR,Ce as ROW_SAVE_ERROR_CLASS,Ne as ROW_SAVE_STATES,ri as SCROLL_EDGE_SELECTOR,ci as SEARCH_OPEN_KEY,Ze as SELECT_ALL_LABEL,Ke as SELECT_CELL_CLASS,c as SELECT_KEY,ct as SELECT_ROW_LABEL,N as SERVER_ACTION_TEXT,d as SHORTCUTS_OFF_ATTRIBUTE,a as SHORTCUT_EVENT,t as SHORTCUT_SCOPE_ATTRIBUTE,l as SHORTCUT_TEXT,Nt as STATUS_TONES,Zr as THEME_BOOT_SCRIPT_BODY,Br as THEME_CHANGE_EVENT,jr as THEME_EFFECTS,Jr as THEME_EFFECT_DURATION,$r as THEME_MODES,Pr as THEME_SWITCHING_CLASS,et as TOAST_ACTION_METHODS,st as TOAST_ACTION_MS,z as UNSAVED_TEXT,Ae as VIRTUAL_OVERSCAN,er as WHATS_NEW_READ_EVENT,$e as WUI_HEADERS,Ft as WuiAutocomplete,It as WuiCarousel,Lt as WuiCodeBlock,Vt as WuiCommandPalette,Ht as WuiCommentThread,Kt as WuiConsentBanner,qt as WuiContextMenu,Yt as WuiCountrySelect,Xt as WuiDataTable,Zt as WuiDatePicker,Qt as WuiDateRange,$t as WuiDock,en as WuiDrawer,tn as WuiHoverCard,nn as WuiImageCrop,an as WuiInlineEdit,ht as WuiKanban,ln as WuiLightbox,fn as WuiMentionInput,bn as WuiMenubar,xn as WuiMultiSelect,Sn as WuiNavigationMenu,jn as WuiNotificationCenter,Mn as WuiOnboardingChecklist,Nn as WuiOtp,Pn as WuiOverflow,Fn as WuiPhone,In as WuiRating,Ln as WuiRecordPager,Bn as WuiRelativeTime,Vn as WuiResizable,Hn as WuiRollingNumber,Jt as WuiSelect,Un as WuiShortcuts,Wn as WuiShowMore,Gn as WuiSlider,Kn as WuiSortable,Mt as WuiStatusIcon,qn as WuiTagInput,Jn as WuiTimePicker,Xn as WuiTour,Zn as WuiTree,Qn as WuiTruncate,$n as WuiWhatsNew,tr as WuiWizard,nr as WuiWizardStep,ur as acceptLabel,dt as addRowSelectCells,Je as addSelectColumn,Ia as applyBarBulk,Wr as applyTheme,f as ariaKeyShortcuts,lr as attachInputMask,ii as attachRowDrag,oi as attachScrollEdges,ut as attachShiftRange,Qr as avatarCropOptions,Vr as avatarUnreadableMessage,Fa as barBulkCountText,ir as buildPasswordRules,Te as clampColumnWidth,qe as classifyStatus,O as collapseSearch,Ci as confirmAction,Rt as copyTextToClipboard,fa as createDiscardPrompt,Yn as createLocalSeenStore,w as createRequestQueue,We as createSelectHeaderCell,Ue as createSelectRowCell,lt as createSelectSpacerCell,Ja as defineWeborityElements,Hr as evaluatePassword,U as formValues,y as formatCompact,te as formatCurrency,le as formatDate,b as formatDuration,fr as formatMasked,x as formatNumber,ae as formatPercent,Rn as formatRelativeTime,ne as formatValue,tt as getServerTable,qa as getShell,He as glyphSvg,we as groupCount,ve as groupItems,On as groupNotificationsByDay,Re as identityCell,n as inShortcutScope,hi as initCollapsibleSearch,ja as initDrawerDiscard,hr as initInputMasks,La as initPageBarBulk,At as initRemoteModals,Cr as initRowDrag,Nr as initScrollEdges,zi as initServerActions,Qe as initServerTables,Ka as initShellParts,ra as initUnsavedChanges,rn as inlineEditText,Mr as isHeicFile,mr as isImageFile,Xr as isImageOnlyAccept,xr as isMaskPattern,pr as isPdfFile,o as isTypingTarget,xt as kanbanCardLabel,kt as kanbanOverflow,gt as kanbanStorageKey,_t as kanbanSummaryFormat,Tt as kanbanVisibleLimit,jt as loadRemoteDrawer,mt as loadRemoteModal,si as maskedPostValue,Bt as matchSegments,Or as matchesAccept,Ve as measureRows,hn as mentionLabel,_n as mentionTextFromValue,dn as mentionValueFromText,pn as mentionedIds,m as moveFocus,ni as nextTheme,Tn as notificationCountText,Cn as notificationDayHeading,Dn as notificationTime,kn as notificationTriggerLabel,wn as notificationUnreadAnnouncement,D as openSearch,yn as parseMentionValue,Ye as parseToastAction,gr as passwordSatisfies,be as pinAtValue,Be as pinClasses,ge as pinOffsetVar,de as planPins,ze as playRowMoves,ar as postedMasked,Tr as rawMasked,_e as readColumnWidths,at as readCsrf,St as readKanbanCollapsed,Fr as readStoredTheme,zn as relativeTimeTitle,ia as resetUnsavedChanges,dr as resolveMask,Lr as resolveTheme,pe as rowLabel,fe as rowOrderChanged,r as runShortcut,Xe as runToastAction,he as saveOutcomeText,Oe as setRowSaveState,ue as settledRows,i as shortcutKey,u as shortcutName,s as shortcutsOff,rt as showResultToast,Yr as storeTheme,yt as sumKanbanValues,Ge as syncSelectAll,cr as syncTargets,Gr as themeBootScript,zr as themeKeyframes,sr as tickedKeys,S as toInstant,Rr as transitionTheme,Dr as validateFile,De as virtualRange,Ar as watchSystemTheme,Pt as withTrustedLabel,me as writeColumnWidths,vt as writeKanbanCollapsed,C as wuiFetch};
|
|
1
|
+
import{n as e}from"./elementBase-BlsR4tqa.js";import{a as t,c as n,d as r,f as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./shortcutKeys-BQiDpsTJ.js";import{n as h,t as g}from"./filterPopover-wAZS4TuD.js";import{t as _}from"./devWarn-DXdRWZs3.js";import{a as v,c as y,d as b,f as x,h as ee,i as te,l as ne,m as re,n as ie,o as ae,p as oe,r as se,s as ce,t as le,u as ue}from"./formatters-BAE__8ye.js";import{A as de,C as fe,D as pe,E as me,M as he,O as ge,S as _e,T as ve,_ as ye,a as be,b as xe,c as Se,d as Ce,f as we,g as Te,h as Ee,i as De,j as Oe,k as ke,l as Ae,m as je,n as Me,o as Ne,p as Pe,r as Fe,s as Ie,t as Le,u as Re,v as ze,w as Be,x as Ve,y as He}from"./dataTable-Cd_IJQcs.js";import{t as Ue}from"./iconGlyphs.g-Bk8AzmSO.js";import{C as We,S as Ge,T as Ke,_ as qe,a as Je,b as Ye,c as S,d as Xe,f as Ze,g as Qe,h as $e,i as et,l as tt,m as nt,n as rt,o as C,p as it,r as at,s as ot,t as st,u as ct,v as lt,w as ut,x as dt,y as ft}from"./wuiHttp-27mq9Jpn.js";import{_ as pt,a as mt,b as ht,c as gt,d as _t,f as vt,g as yt,h as bt,i as xt,l as St,m as Ct,n as wt,o as Tt,p as Et,r as Dt,s as Ot,t as kt,u as At,v as jt,y as Mt}from"./kanban-Ca4U3YaX.js";import{n as Nt,t as Pt}from"./statusIcons-2X4iGkKL.js";import{o as Ft}from"./optionLabel-Bd3vP-XI.js";import{t as It}from"./WuiAutocomplete-Cvoyr30K.js";import{t as Lt}from"./WuiCarousel-DjQNKykv.js";import{t as Rt}from"./WuiCodeBlock-8qgxTcyK.js";import{n as zt,t as Bt}from"./copyText-DM5HhXjf.js";import{t as Vt}from"./textMatch-wdY7XLIc.js";import{t as Ht}from"./WuiCommandPalette-DMXm40wj.js";import{i as Ut,n as Wt,r as Gt,t as Kt}from"./WuiCommentThread-WL1GX7Jy.js";import{t as qt}from"./WuiConsentBanner-D6YE84__.js";import{t as Jt}from"./WuiContextMenu-BLNKaFsB.js";import{t as Yt}from"./WuiSelect-DR4PYwAw.js";import{t as Xt}from"./WuiCountrySelect-Dac15o75.js";import{t as Zt}from"./WuiDataTable-BVAsbW-S.js";import{t as Qt}from"./WuiDatePicker-BUtDjbek.js";import{t as $t}from"./WuiDateRange-DCNf4MSb.js";import{t as en}from"./WuiDock-BD2HgMmP.js";import{t as tn}from"./WuiDrawer-D6K2eRlW.js";import{t as nn}from"./WuiHoverCard-Ql6CD3BL.js";import{t as rn}from"./WuiImageCrop-Cr3D2iPo.js";import{a as an,i as on,n as sn,r as cn,t as ln}from"./WuiInlineEdit-DrQmhWZ6.js";import{t as un}from"./WuiLightbox-DQ47WenM.js";import{a as dn,c as fn,i as pn,l as mn,n as hn,o as gn,r as _n,s as vn,t as yn,u as bn}from"./WuiMentionInput-BqcTKb8b.js";import{t as xn}from"./WuiMenubar-4MOZ51R_.js";import{t as Sn}from"./WuiMultiSelect-Pm9-F-YU.js";import{t as Cn}from"./WuiNavigationMenu-BsLnvz2Y.js";import{a as wn,c as Tn,i as En,n as Dn,o as On,r as kn,s as An,t as jn}from"./notificationDays-pYmoU0g6.js";import{t as Mn}from"./WuiNotificationCenter-Dc7hD9w-.js";import{t as Nn}from"./WuiOnboardingChecklist-s2DG6PZ0.js";import{t as Pn}from"./WuiOtp-BbO_75RB.js";import{t as Fn}from"./WuiOverflow-Ixc3PRuW.js";import{t as In}from"./WuiPhone-BhmKncvF.js";import{t as Ln}from"./WuiRating-BzeW6iDC.js";import{t as Rn}from"./WuiRecordPager-yXv4g2ZR.js";import{n as zn,r as Bn,t as Vn}from"./WuiRelativeTime-Cfc8TMd8.js";import{t as Hn}from"./WuiResizable-m2Ypa-zD.js";import{t as Un}from"./WuiRollingNumber-DBgi_3l7.js";import{t as Wn}from"./WuiShortcuts-CMibF1XM.js";import{t as Gn}from"./WuiShowMore-Bu7IQcXS.js";import{t as Kn}from"./WuiSlider-CH4vFmtk.js";import{t as qn}from"./WuiSortable-Bd7Fz5Ox.js";import{t as Jn}from"./WuiTagInput-C9_GyLav.js";import{t as Yn}from"./WuiTimePicker-CaJrTq3m.js";import{n as Xn,t as Zn}from"./WuiTour-DOeTJa4V.js";import{t as Qn}from"./WuiTree-amrUzT-J.js";import{t as $n}from"./WuiTruncate-BLl2u3b-.js";import{n as er,t as tr}from"./WuiWhatsNew-68sOQOTO.js";import{n as nr,t as rr}from"./WuiWizardStep-1O75EzB2.js";import{$ as ir,A as ar,B as or,C as sr,D as cr,E as lr,F as ur,G as dr,H as fr,I as pr,J as mr,K as hr,L as gr,M as _r,N as vr,O as yr,P as br,Q as xr,R as Sr,S as Cr,T as wr,U as Tr,V as Er,W as Dr,X as Or,Y as kr,Z as Ar,_ as jr,a as Mr,at as Nr,b as Pr,c as Fr,d as Ir,et as Lr,f as Rr,g as zr,h as Br,i as Vr,it as Hr,j as Ur,k as Wr,l as Gr,m as Kr,n as qr,nt as Jr,o as Yr,p as Xr,q as Zr,r as Qr,rt as $r,s as ei,t as ti,tt as ni,u as ri,v as ii,w as ai,x as oi,y as si,z as ci}from"./themeTransition-QXpGgIMc.js";var li=`/`,ui=`.search-wrap.wui-search-collapsible`,di=`.wui-topsearch-panel`,fi=`.modal, wui-drawer[open]`,pi=new WeakSet,w=e=>e.querySelector(`.wui-search-toggle`),T=e=>e.querySelector(`.search-input`);function E(e){e.classList.remove(`is-collapsed`),w(e)?.setAttribute(`aria-expanded`,`true`),T(e)?.focus()}function mi(e){T(e)?.value||(e.classList.add(`is-collapsed`),w(e)?.setAttribute(`aria-expanded`,`false`))}function hi(e){if(e.dataset.wuiCollapseWired)return;e.dataset.wuiCollapseWired=`1`;let t=w(e),n=T(e);t?.addEventListener(`click`,()=>E(e)),n?.addEventListener(`keydown`,r=>{r.key!==`Escape`||n.value||(r.preventDefault(),mi(e),t?.focus())}),e.addEventListener(`focusout`,t=>{e.contains(t.relatedTarget)||mi(e)})}function gi(e){pi.has(e)||(pi.add(e),e.addEventListener(`keydown`,t=>{if(t.key!==`/`||t.ctrlKey||t.altKey||t.metaKey||t.defaultPrevented||o(t.target)||t.target?.closest?.(fi)||e.querySelector(di))return;let n=[...e.querySelectorAll(ui)].find(e=>e.offsetParent!==null);n&&(t.preventDefault(),E(n))}))}function _i(e=document){for(let t of e.querySelectorAll(ui))hi(t);gi(e.ownerDocument??e)}var D=`wuiConfirm`,vi=Object.freeze([`danger`]),O=Object.freeze([`success`,`info`,`warning`,`danger`]),k=`wui.flash`,A=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.`}),yi=new WeakSet,bi=new WeakSet,j=null,M=null,N=!1,xi=e=>{let t=document.createElement(`span`);return t.textContent=e??``,t.innerHTML},P=(e,t)=>{e&&window.WUI?.toast?.(e,{variant:t})},Si=()=>{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 Ci(){let e=document.getElementById(D);return e||(e=document.createElement(`div`),e.id=D,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`,`${pt.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">${xi(A.cancelLabel)}</button><button type="button" class="btn btn-primary" data-app-confirm></button></div></div></div></div>`,document.body.appendChild(e),e)}function wi(e,t){let n=e.getAttribute(`data-wui-confirm-tone`);if(n!==null&&!vi.includes(n))throw TypeError(`data-wui-confirm-tone="${n}" is not supported. Use danger, or leave it off.`);Ti({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 Ti({title:e,message:t,label:n,danger:r},i){let a=Si(),o=Ci(),s=o.querySelector(`.wui-confirm-title`),c=o.querySelector(`[data-app-confirm]`);if(!s||!c)throw Error(`#${D} is not a confirm dialog with a confirm button. Render <app-confirm-dialog id="${D}"> 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||A.confirmTitle,l.textContent=t,c.textContent=n||A.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),M=i,N=!1,a.getOrCreateInstance(o).show()}var F=(e,t)=>{j=e;try{t()}finally{j=null}};function Ei(e,{title:t,message:n,label:r,tone:i},a){if(i!=null&&!vi.includes(i))throw TypeError(`confirmAction: tone "${i}" is not supported. Use danger, or leave it off.`);Vi(e.ownerDocument),Ti({title:t,message:n,label:r,danger:i===`danger`},()=>F(e,a))}var Di=e=>e.disabled===!0||e.getAttribute(`aria-disabled`)===`true`;function Oi(e){let t=e.target.closest?.(`[data-wui-confirm]:not(form)`);!t||t===j||Di(t)||(e.preventDefault(),e.stopImmediatePropagation(),wi(t,()=>F(t,()=>t.click())))}function ki(e){let t=e.target;if(!(t instanceof HTMLFormElement)||!t.hasAttribute(`data-wui-confirm`)||t===j||e.submitter&&e.submitter===j)return;e.preventDefault(),e.stopImmediatePropagation();let n=e.submitter?.form===t?e.submitter:void 0;wi(t,()=>F(t,()=>t.requestSubmit(n)))}function Ai(e){let t=e.target.closest?.(`#${D} [data-app-confirm]`);!t||t.disabled||!M||(N=!0,Si().getOrCreateInstance(t.closest(`#${D}`)).hide())}function ji(e){if(e.target.id!==`wuiConfirm`)return;let t=N?M:null;M=null,N=!1,t?.()}var Mi=(e,t)=>{e&&window.sessionStorage.setItem(k,JSON.stringify({message:e,variant:t}))},Ni=e=>e===`forbidden`?A.forbidden:e===`network`?A.network:A.failed;function Pi(){for(let e of document.querySelectorAll(`[data-wui-server]`))e.dataset.refreshOnSuccess!==`false`&&nt(e)?.reload()}async function Fi(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 Ii(t,e)}async function Ii(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 S(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`)){Mi(i.message,a),i.redirect?window.location.assign(i.redirect):window.location.reload();return}if(t.disabled=!1,t.removeAttribute(`aria-busy`),i.ok){it(i,a),Pi();return}P(i.message||Ni(i.kind),`danger`)}function Li(e){let t=e.target.closest?.(`[data-wui-post]`);t&&(e.preventDefault(),!(Di(t)||t.getAttribute(`aria-busy`)===`true`)&&Fi(t).catch(e=>_(e)))}function Ri(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`&&(Ii(t.getAttribute(`action`),n,new FormData(t)).catch(e=>_(e)),window.bootstrap?.Dropdown?.getInstance(t.closest(`.dropdown`)?.querySelector(`[data-bs-toggle='dropdown']`))?.hide())}function zi(){let e=window.sessionStorage.getItem(k);if(!e)return;window.sessionStorage.removeItem(k);let{message:t,variant:n}=JSON.parse(e);P(t,n)}function Bi(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(!O.includes(t))throw TypeError(`data-wui-flash-variant="${t}" is not supported. Use ${O.join(`, `)}.`);let n=e.getAttribute(`data-wui-flash`)||e.textContent.trim();e.remove(),P(n,t)}}function Vi(e){bi.has(e)||(bi.add(e),e.addEventListener(`click`,Ai),e.addEventListener(`hidden.bs.modal`,ji))}function Hi(e=document){let t=e.ownerDocument||e;yi.has(t)||(yi.add(t),t.addEventListener(`click`,Oi,!0),t.addEventListener(`submit`,ki,!0),Vi(t),t.addEventListener(`click`,Li),t.addEventListener(`submit`,Ri),zi()),Bi(e)}var I=Object.freeze({title:`Leave without saving?`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,leaveLabel:`Leave`}),L=`form[data-wui-unsaved]`,Ui=`[aria-invalid="true"], .field-error:not(:empty), .field-validation-error, .validation-summary-errors, .wui-error-summary`,Wi=`[download], [data-wui-modal], [data-wui-post], [data-bs-toggle]`,Gi=new Set([`submit`,`button`,`reset`,`image`]),Ki=new Set([`hidden`,`checkbox`,`radio`,`file`,`submit`,`button`,`reset`,`image`,`range`,`color`]),R=new WeakMap,qi=new WeakSet,Ji=e=>`${e.name}:${e.size}:${e.lastModified}`;function z(e){let t=[];for(let n of e.elements)!n.name||n.disabled||Gi.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(Ji)]):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 B(e){return z(e)}function Yi(e){for(let t of e.elements)if(!(!t.name||t.disabled)){if(t.tagName===`TEXTAREA`||t.tagName===`INPUT`&&!Ki.has(t.type)){if(t.value.trim()!==``)return!0}else if(t.tagName===`INPUT`&&t.type===`file`&&t.files?.length>0)return!0}return!1}var Xi=e=>({saved:e.querySelector(Ui)&&Yi(e)?null:z(e),engaged:!1,discarded:!1});function Zi(e){let t=R.get(e);return!t||t.discarded||!e.isConnected?!1:t.saved===null||t.engaged&&z(e)!==t.saved}var V=(e,t)=>[...e.querySelectorAll(L)].filter(e=>e!==t&&Zi(e)),Qi=()=>!!window.bootstrap?.Modal;function $i(e,t,n){let r=t.map(e=>e.getAttribute(`data-wui-unsaved`)).find(Boolean)||I.message;Ei(e,{title:I.title,message:r,label:I.leaveLabel,tone:`danger`},()=>{for(let e of t)R.get(e).discarded=!0;n()})}function ea(e){if(e.matches(Wi))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 ta(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 na(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||!ea(t))return;let n=V(t.ownerDocument,null);!n.length||!Qi()||(e.preventDefault(),$i(t,n,()=>t.click()))}function ra(e){let t=e.target;if(!(t instanceof HTMLFormElement)||e.defaultPrevented||!ta(t,e.submitter))return;let n=V(t.ownerDocument,t);if(n.length&&Qi()){e.preventDefault();let r=e.submitter?.form===t?e.submitter:void 0;$i(t,n,()=>t.requestSubmit(r));return}let r=R.get(t);r&&(r.saved=z(t),r.discarded=!1)}function ia(e){V(document,null).length&&(e.preventDefault(),e.returnValue=``)}function aa(e){let t=e.target.closest?.(L),n=t&&R.get(t);!n||n.engaged||(n.saved!==null&&(n.saved=z(t)),n.engaged=!0)}function oa(e){let t=e.target.closest?.(L),n=t&&R.get(t);n&&(n.discarded=!1,e.isTrusted&&(n.engaged=!0))}function sa(e){let t=e.detail?.handle?.el;if(t instanceof Element)for(let e of t.querySelectorAll(L))la(e)}function ca(e=document){let t=e.ownerDocument||e;if(!qi.has(t)){qi.add(t);for(let e of[`focusin`,`pointerdown`,`drop`])t.addEventListener(e,aa,!0);for(let e of[`input`,`change`])t.addEventListener(e,oa,!0);t.addEventListener(`click`,na),t.addEventListener(`submit`,ra),t.addEventListener(`wui:modal:success`,sa),t.defaultView.addEventListener(`beforeunload`,ia)}let n=[...e.querySelectorAll?.(L)||[]];e.matches?.(L)&&n.unshift(e);for(let e of n)R.has(e)||R.set(e,Xi(e))}function la(e){if(!(e instanceof HTMLFormElement)||!e.matches(L))throw TypeError(`resetUnsavedChanges: ${String(e)} is not a <form data-wui-unsaved>.`);R.set(e,{saved:z(e),engaged:!1,discarded:!1})}var H=Object.freeze({discard:`Discard`,keep:`Keep editing`}),ua=`wui:drawer:discard`,U=`wui-drawer[confirm-discard]`,W=`.wui-modal-shell`,G=`form[data-wui-confirm-discard]`,K=`.wui-drawer-discard`,da=`input, select, textarea`,q=new WeakMap,fa=new WeakSet,J=new WeakSet;function pa(e,t,n,r){let i=e.createElement(`button`);return i.type=`button`,i.className=t,i.setAttribute(n,``),i.textContent=r,i}function ma(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,pa(e,`btn btn-danger btn-sm`,`data-wui-discard-confirm`,H.discard),pa(e,`btn btn-secondary btn-sm`,`data-wui-discard-keep`,H.keep)),n}function ha(e){let t=e.closest?.(U);if(t)return t;let n=e.closest?.(W);return n&&(n.hasAttribute(`confirm-discard`)||n.querySelector(G))?n:null}function Y(e){return e.closest(U)??e.closest(W)}function X(e){return e.matches(U)||e.hasAttribute(`confirm-discard`)?e.querySelectorAll(`form`):e.querySelectorAll(G)}function ga(e){let t=q.get(e);return t!=null&&B(e)!==t}function _a(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-drawer-footer`,e.querySelector(`.wui-drawer-panel`).append(t),J.add(t),t}function va(e){let t=e.ownerDocument.createElement(`div`);return t.className=`wui-modal-footer`,(e.querySelector(`.wui-modal-body`)?.parentElement??e.querySelector(`.modal-content`)??e).append(t),J.add(t),t}function ya(e){e.querySelector(`[data-wui-discard-confirm]`).focus()}function ba(e,t){let n=e.querySelector(K);if(n){ya(n);return}let r=ma(e.ownerDocument,t),i;if(e.matches(U))i=e.querySelector(`.wui-drawer-footer`)??_a(e),i.prepend(r);else if(e.hasAttribute(`confirm-discard`))i=e.querySelector(`.wui-modal-footer`)??va(e),i.prepend(r);else{let t=e.querySelector(G);i=t.querySelector(`.modal-footer`),i?i.prepend(r):(i=t,t.append(r))}i.classList.add(`wui-drawer-discarding`),ya(r)}function Z(e){let t=e.parentElement;e.remove(),t.classList.remove(`wui-drawer-discarding`),J.has(t)&&t.remove()}function xa(e){for(let t of X(e)){let e=[...t.querySelectorAll(da)].find(e=>e.type!==`hidden`&&!e.disabled);if(e){e.focus();return}}}function Sa(e){let t=ha(e.target);if(t)for(let e of X(t))q.get(e)??q.set(e,B(e))}function Ca(e){let t=e.target;!(t instanceof HTMLFormElement)||!ha(t)||q.set(t,B(t))}function wa(e){let t=e.detail?.handle?.el;if(t instanceof Element)for(let e of t.querySelectorAll(`form`))q.delete(e)}function Ta(e){let t=e.target;!(t instanceof Element)||!t.matches(U)||[...X(t)].some(ga)&&(e.preventDefault(),ba(t,t.getAttribute(`confirm-discard`)))}function Ea(e){let t=e.target;if(!(t instanceof Element)||!t.matches(W))return;let n=[...X(t)].find(ga);n&&(e.preventDefault(),ba(t,t.getAttribute(`confirm-discard`)??n.getAttribute(`data-wui-confirm-discard`)))}function Da(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(W);n&&window.bootstrap?.Modal?.getInstance(n)?.hide()}function Oa(e){let t=e.closest(K),n=Y(t);Z(t);for(let e of X(n))q.set(e,B(e));n.dispatchEvent(new CustomEvent(ua,{bubbles:!0})),n.matches(U)?n.hide():window.bootstrap.Modal.getInstance(n).hide()}function ka(e){let t=e.closest(K),n=Y(t);Z(t),xa(n)}function Aa(e){let t=e.target,n=t.closest?.(`[data-wui-discard-confirm]`);if(n){Oa(n);return}let r=t.closest?.(`[data-wui-discard-keep]`);if(r){ka(r);return}let i=t.closest?.(`[data-wui-dismiss]`);i&&Da(i)}function ja(e){if(e.key!==`Escape`)return;let t=e.currentTarget.querySelector(K);if(!t)return;e.preventDefault(),e.stopPropagation();let n=Y(t);Z(t),xa(n)}function Ma(e=document){let t=e.ownerDocument||e;fa.has(t)||(fa.add(t),t.addEventListener(`focusin`,Sa),t.addEventListener(`pointerdown`,Sa),t.addEventListener(`submit`,Ca),t.addEventListener(`wui:modal:success`,wa),t.addEventListener(`wui:modal:loaded`,wa),t.addEventListener(`wui-drawer-close`,Ta,!0),t.addEventListener(`hide.bs.modal`,Ea),t.addEventListener(`click`,Aa),t.addEventListener(`keydown`,ja,!0))}var Na=`data-wui-bulk-in-bar`,Pa=`[data-wui-page-header-bar][data-wui-bulk-for]`,Fa=new WeakSet;function Ia(e){return`${x(e,{decimals:0})} selected`}function La(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?Ia(t):``)}function Ra(e=document){for(let t of e.querySelectorAll(Pa))document.getElementById(t.dataset.wuiBulkFor)?.setAttribute(Na,``);Fa.has(document)||(Fa.add(document),document.addEventListener(`selectionchange`,e=>{if(typeof e.detail?.selected==`number`)for(let t of document.querySelectorAll(Pa))document.getElementById(t.dataset.wuiBulkFor)?.contains(e.target)&&La(t,e.detail.selected)}))}var za=31536e3,Q=new WeakMap,Ba=e=>e>99?`99+`:String(e);function Va(e,t,n=document){n.cookie=`${e}=${t?`1`:`0`}; Path=/; Max-Age=${za}; SameSite=Lax`}var Ha=e=>{let t=document.createElement(`template`);return t.innerHTML=e,t.content},$=(e,t)=>{let n=document.createElement(`div`);return n.className=e,n.textContent=t,n};function Ua(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=C(),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=Ba(o),r.hidden=o===0),n?.setAttribute(`aria-label`,o===0?l:`${l}, ${Ba(o)} unread`),a&&s&&i&&(i.textContent=o===0?`No unread notifications`:`${Ba(o)} unread notifications`)},h=()=>o?.classList.contains(`show`)??!1,g=()=>{let e=$(`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($(`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=Ha(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($(`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 S(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 Wa=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),Ga=(e,t,n)=>`${e}${e.includes(`?`)?`&`:`?`}${encodeURIComponent(t)}=${encodeURIComponent(n)}`;function Ka(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=C(),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(Ga(o,s,t));if(!(n.kind===`aborted`||n.kind===`stale`||n.kind===`session`)){if(e.classList.remove(`is-loading`),n.ok){let e=Ha(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($(`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(Ga(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||Wa(e.target)||(e.preventDefault(),v(!0),n.focus())},ee=t=>{e.contains(t.target)||(g(),e.classList.contains(`is-open`)&&v(!1))};document.addEventListener(`keydown`,x),document.addEventListener(`pointerdown`,ee),t.push(()=>{clearTimeout(f),d.abort(),document.removeEventListener(`keydown`,x),document.removeEventListener(`pointerdown`,ee)})}function qa(e){let t=[],n=e.dataset.wuiCollapsedCookie;n&&e.addEventListener(`wui:shell:collapse`,e=>Va(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?Ua(r,t):null,a=e.querySelector(`[data-wui-topsearch]`);a&&Ka(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)}};Q.set(e,o);let s=n=>{if(n.target===e||n.target.contains?.(e)){for(let e of t)e();Q.delete(e),delete e.dataset.wuiPartsWired,document.removeEventListener(`wui:teardown`,s)}};return document.addEventListener(`wui:teardown`,s),o}function Ja(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`,qa(e))}function Ya(e){let t=e?.closest?.(`[data-app-shell]`)??null;return t?(Q.has(t)||Ja(t),Q.get(t)??null):null}function Xa(){h(),e(`wui-select`,Yt),e(`wui-country-select`,Xt),e(`wui-phone`,In),e(`wui-datepicker`,Qt),e(`wui-date-range`,$t),e(`wui-dock`,en),e(`wui-image-crop`,rn),e(`wui-kanban`,gt),e(`wui-inline-edit`,on),e(`wui-consent-banner`,qt),e(`wui-slider`,Kn),e(`wui-sortable`,qn),e(`wui-timepicker`,Yn),e(`wui-tour`,Zn),e(`wui-tree`,Qn),e(`wui-autocomplete`,It),e(`wui-command-palette`,Ht),e(`wui-context-menu`,Jt),e(`wui-multiselect`,Sn),e(`wui-taginput`,Jn),e(`wui-otp`,Pn),e(`wui-status-icon`,Nt),e(`wui-shortcuts`,Wn),e(`wui-record-pager`,Rn),e(`wui-carousel`,Lt),e(`wui-code-block`,Rt),e(`wui-data-table`,Zt),e(`wui-drawer`,tn),e(`wui-hover-card`,nn),e(`wui-lightbox`,un),e(`wui-menubar`,xn),e(`wui-navigation-menu`,Cn),e(`wui-notification-center`,Mn),e(`wui-onboarding-checklist`,Nn),e(`wui-overflow`,Fn),e(`wui-rating`,Ln),e(`wui-relative-time`,Vn),e(`wui-resizable`,Hn),e(`wui-rolling-number`,Un),e(`wui-show-more`,Gn),e(`wui-truncate`,$n),e(`wui-whats-new`,er),e(`wui-mention-input`,pn),e(`wui-comment-thread`,Ut),e(`wui-wizard-step`,rr),e(`wui-wizard`,nr)}Xa();export{Ar as AVATAR_ACCEPT,xr as AVATAR_MAX_SIZE_MB,ir as AVATAR_OUTPUT_SIZE,Lr as AVATAR_OUTPUT_TYPE,ni as AVATAR_PREVIEW_SIZES,Jr as AVATAR_TEXT,Na as BAR_BULK_IN_BAR_ATTRIBUTE,Le as COLUMN_MAX_WIDTH,Me as COLUMN_MIN_WIDTH,Kt as COMMENT_INTENTS,Wt as COMMENT_REACTIONS,Gt as COMMENT_TEXT,D as CONFIRM_DIALOG_ID,vi as CONFIRM_TONES,Bt as COPY_FEEDBACK_MS,st as CSRF_META_NAME,le as CURRENCIES,Fe as DATA_TABLE_TEXT,ie as DATE_PATTERNS,rt as DEFAULT_CSRF_HEADER,Tr as DEFAULT_IMAGE_ACCEPT,Dr as DEFAULT_MAX_SIZE_MB,yr as DEFAULT_PASSWORD_RULES,Wr as DEFAULT_REQUIREMENTS_TITLE,ti as DEFAULT_THEME_EFFECT,qr as DEFAULT_THEME_STORAGE_KEY,ua as DISCARD_EVENT,H as DISCARD_TEXT,oi as DROP_OVER_CLASS,se as DURATION_UNITS,te as EMPTY_VALUE,g as FILTER_POPOVER_MAX_CHIPS,k as FLASH_STORAGE_KEY,O as FLASH_VARIANTS,v as FORMAT_STYLES,at as HTTP_KINDS,ln as INLINE_EDIT_SAVED_MS,sn as INLINE_EDIT_TEXT,cn as INLINE_EDIT_TYPES,ae as IST_TIME_ZONE,kt as KANBAN_DRAG_THRESHOLD_PX,wt as KANBAN_LONG_PRESS_MS,Dt as KANBAN_PHONE_QUERY,xt as KANBAN_STORAGE_PREFIX,mt as KANBAN_SUMMARY_FORMATS,Tt as KANBAN_TEXT,Ot as KANBAN_TONES,p as LIST_KEYS,vr as MASK_INPUT_TYPES,br as MASK_NAMES,dn as MENTION_ID_PATTERN,yn as MENTION_MAX_QUERY,hn as MENTION_MAX_RESULTS,_n as MENTION_TEXT,ce as MONEY_UNITS,jn as NOTIFICATION_COUNT_CAP,Dn as NOTIFICATION_TEXT,De as PIN_AT_VAR,be as PIN_SIDES,Ne as RESIZE_STEP,Ie as RESIZE_STEP_LARGE,Cr as ROW_DRAG_TYPE,sr as ROW_DROP_EVENT,Se as ROW_HEIGHTS,Ae as ROW_MOVE_LIMIT,Re as ROW_MOVE_MS,Ce as ROW_SAVE_ATTR,we as ROW_SAVE_ERROR_CLASS,Pe as ROW_SAVE_STATES,ii as SCROLL_EDGE_SELECTOR,li as SEARCH_OPEN_KEY,Qe as SELECT_ALL_LABEL,qe as SELECT_CELL_CLASS,c as SELECT_KEY,lt as SELECT_ROW_LABEL,A as SERVER_ACTION_TEXT,d as SHORTCUTS_OFF_ATTRIBUTE,a as SHORTCUT_EVENT,t as SHORTCUT_SCOPE_ATTRIBUTE,l as SHORTCUT_TEXT,Pt as STATUS_TONES,Qr as THEME_BOOT_SCRIPT_BODY,Vr as THEME_CHANGE_EVENT,Mr as THEME_EFFECTS,Yr as THEME_EFFECT_DURATION,ei as THEME_MODES,Fr as THEME_SWITCHING_CLASS,tt as TOAST_ACTION_METHODS,ct as TOAST_ACTION_MS,I as UNSAVED_TEXT,je as VIRTUAL_OVERSCAN,tr as WHATS_NEW_READ_EVENT,et as WUI_HEADERS,It as WuiAutocomplete,Lt as WuiCarousel,Rt as WuiCodeBlock,Ht as WuiCommandPalette,Ut as WuiCommentThread,qt as WuiConsentBanner,Jt as WuiContextMenu,Xt as WuiCountrySelect,Zt as WuiDataTable,Qt as WuiDatePicker,$t as WuiDateRange,en as WuiDock,tn as WuiDrawer,nn as WuiHoverCard,rn as WuiImageCrop,on as WuiInlineEdit,gt as WuiKanban,un as WuiLightbox,pn as WuiMentionInput,xn as WuiMenubar,Sn as WuiMultiSelect,Cn as WuiNavigationMenu,Mn as WuiNotificationCenter,Nn as WuiOnboardingChecklist,Pn as WuiOtp,Fn as WuiOverflow,In as WuiPhone,Ln as WuiRating,Rn as WuiRecordPager,Vn as WuiRelativeTime,Hn as WuiResizable,Un as WuiRollingNumber,Yt as WuiSelect,Wn as WuiShortcuts,Gn as WuiShowMore,Kn as WuiSlider,qn as WuiSortable,Nt as WuiStatusIcon,Jn as WuiTagInput,Yn as WuiTimePicker,Zn as WuiTour,Qn as WuiTree,$n as WuiTruncate,er as WuiWhatsNew,nr as WuiWizard,rr as WuiWizardStep,dr as acceptLabel,ft as addRowSelectCells,Ye as addSelectColumn,La as applyBarBulk,Gr as applyTheme,f as ariaKeyShortcuts,ur as attachInputMask,ai as attachRowDrag,si as attachScrollEdges,dt as attachShiftRange,$r as avatarCropOptions,Hr as avatarUnreadableMessage,Ia as barBulkCountText,ar as buildPasswordRules,Ee as clampColumnWidth,Je as classifyStatus,mi as collapseSearch,Ei as confirmAction,zt as copyTextToClipboard,ma as createDiscardPrompt,Xn as createLocalSeenStore,C as createRequestQueue,Ge as createSelectHeaderCell,We as createSelectRowCell,ut as createSelectSpacerCell,Xa as defineWeborityElements,Ur as evaluatePassword,B as formValues,y as formatCompact,ne as formatCurrency,ue as formatDate,b as formatDuration,pr as formatMasked,x as formatNumber,oe as formatPercent,zn as formatRelativeTime,re as formatValue,nt as getServerTable,Ya as getShell,Ue as glyphSvg,Te as groupCount,ye as groupItems,kn as groupNotificationsByDay,ze as identityCell,n as inShortcutScope,_i as initCollapsibleSearch,Ma as initDrawerDiscard,gr as initInputMasks,Ra as initPageBarBulk,jt as initRemoteModals,wr as initRowDrag,Pr as initScrollEdges,Hi as initServerActions,$e as initServerTables,Ja as initShellParts,ca as initUnsavedChanges,an as inlineEditText,Nr as isHeicFile,hr as isImageFile,Zr as isImageOnlyAccept,Sr as isMaskPattern,mr as isPdfFile,o as isTypingTarget,St as kanbanCardLabel,At as kanbanOverflow,_t as kanbanStorageKey,vt as kanbanSummaryFormat,Et as kanbanVisibleLimit,Mt as loadRemoteDrawer,ht as loadRemoteModal,ci as maskedPostValue,Vt as matchSegments,kr as matchesAccept,He as measureRows,gn as mentionLabel,vn as mentionTextFromValue,fn as mentionValueFromText,mn as mentionedIds,m as moveFocus,ri as nextTheme,En as notificationCountText,wn as notificationDayHeading,On as notificationTime,An as notificationTriggerLabel,Tn as notificationUnreadAnnouncement,E as openSearch,bn as parseMentionValue,Xe as parseToastAction,_r as passwordSatisfies,xe as pinAtValue,Ve as pinClasses,_e as pinOffsetVar,fe as planPins,Be as playRowMoves,or as postedMasked,Er as rawMasked,ve as readColumnWidths,ot as readCsrf,Ct as readKanbanCollapsed,Ir as readStoredTheme,Bn as relativeTimeTitle,la as resetUnsavedChanges,fr as resolveMask,Rr as resolveTheme,me as rowLabel,pe as rowOrderChanged,r as runShortcut,Ze as runToastAction,ge as saveOutcomeText,ke as setRowSaveState,de as settledRows,i as shortcutKey,u as shortcutName,s as shortcutsOff,it as showResultToast,Xr as storeTheme,bt as sumKanbanValues,Ke as syncSelectAll,lr as syncTargets,Kr as themeBootScript,Br as themeKeyframes,cr as tickedKeys,ee as toInstant,zr as transitionTheme,Or as validateFile,Oe as virtualRange,jr as watchSystemTheme,Ft as withTrustedLabel,he as writeColumnWidths,yt as writeKanbanCollapsed,S as wuiFetch};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/ui-elements",
|
|
3
|
-
"version": "0.77.
|
|
3
|
+
"version": "0.77.2",
|
|
4
4
|
"description": "Webority framework-agnostic UI custom elements (<wui-*>) — the single implementation of the interactive components, styled by @webority/theme. Used natively in Razor and wrapped by @webority/ui-react.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./elementBase-BlsR4tqa.js";import{n,r,t as i}from"./anchorOverlay-HAWsGzlr.js";import{d as a}from"./shortcutKeys-BQiDpsTJ.js";var o=2,s=`wui-filter-popover-pinned`,c=`.wui-filter-popover-trigger`,l=`.wui-filter-popover-panel`,u=`.wui-filter-popover-head`,d=`input:not([type]),input[type="text"],input[type="search"]`,f=`a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1'])`;function p(){try{return sessionStorage.getItem(s)===`1`}catch{return!1}}function m(e){try{e?sessionStorage.setItem(s,`1`):sessionStorage.removeItem(s)}catch{}}var h=class extends t{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){m(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(d)||(e.preventDefault(),this.closest(`form.wui-filter-form`)?.requestSubmit())},this._onShortcut=e=>{this.ownerDocument.querySelector(`wui-filter-popover`)===this&&a(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),p()&&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),r(this),this._doc=null}get _trigger(){return this.querySelector(c)}get _panel(){return this.querySelector(l)}get _pin(){return this.querySelector(`${u} 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 r=this._panel,i=this._trigger;!r||!i||(this.isOpen?e&&(this._sticky=!0):(r.hidden=!1,i.setAttribute(`aria-expanded`,`true`),this._sticky=e,this._reposition(),n(this,()=>this._reposition()),this._doc?.addEventListener(`keydown`,this._onEscape),this._doc?.addEventListener(`click`,this._onOutside)),t&&(r.querySelector(`.wui-filter-popover-grid`)?.querySelector(f)??r.querySelector(f))?.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,r(this),this._doc?.removeEventListener(`keydown`,this._onEscape),this._doc?.removeEventListener(`click`,this._onOutside),e&&n&&this._trigger?.focus()}_reposition(){this.isOpen&&this._trigger&&i(this._trigger,this._panel,{clampHeight:!0,alignEnd:!0})}};function g(){e(`wui-filter-popover`,h)}export{g as n,o as t};
|