@momentum-design/components 0.134.9 → 0.134.11

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.
@@ -15,7 +15,7 @@
15
15
  :host {
16
16
  display: contents;
17
17
  }
18
- `,uf=zT;var Nl=class extends X{constructor({context:o,initialValue:t}){super(),this.context=new Fs(this,{context:o,initialValue:t})}render(){return this.updateContext(),S`<slot></slot>`}};Nl.styles=[...X.styles,uf];var ff=Nl;var Se=ff;var Ve=a=>{class o extends a{constructor(){super(...arguments);this.elementToAutoFocus=null;this.autoFocusOnMount=!1}async firstUpdated(i){super.firstUpdated(i),this.autoFocusOnMount&&(await this.updateComplete,(this.elementToAutoFocus||this).focus())}}return h([u({type:Boolean,reflect:!0,attribute:"auto-focus-on-mount"})],o.prototype,"autoFocusOnMount",2),o};var te=a=>{class o extends a{}return h([u({reflect:!0,type:Boolean})],o.prototype,"disabled",2),o};var ri=a=>{class o extends a{constructor(){super(...arguments);this.tabIndex=0}}return h([u({reflect:!0,type:Number})],o.prototype,"tabIndex",2),o};var kt={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",END:"End",ENTER:"Enter",ESCAPE:"Escape",HOME:"Home",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT_TAB:"Shift+Tab",SPACE:" ",TAB:"Tab",DELETE:"Delete"};var BT=a=>{let{host:o,context:t,subscribe:e,callback:i,syncProperties:l}=a,c=(i||l)&&(f=>{l&&l.forEach(b=>{o.requestUpdate(b)}),i==null||i(f)});return new Ps(o,{context:t,callback:c,subscribe:e!=null?e:!0})},HT={consume:BT},Ie=HT;var vf=(a,o)=>!!(a.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING),gf=(a,o)=>!!(a.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING),UT=a=>a.getClientRects().length===0,GT=a=>{let{width:o,height:t}=a.getBoundingClientRect(),{offsetWidth:e,offsetHeight:i}=a;return e+i+t+o===0},bf=a=>{if(!(a instanceof Element))return!1;let o=getComputedStyle(a),{overflowX:t,overflowY:e}=o;return t==="auto"||t==="scroll"||e==="auto"||e==="scroll"},KT=a=>GT(a)||UT(a),WT=a=>{let{display:o,opacity:t,visibility:e}=a.style;return o==="none"||t==="0"||e==="hidden"||e==="collapse"},YT=a=>{let o=getComputedStyle(a);return o.visibility==="hidden"||o.height==="0"||o.display==="none"},jT=a=>getComputedStyle(a).display==="contents",qT=a=>a.hasAttribute("hidden")||a.getAttribute("aria-hidden")==="true"||WT(a)||!jT(a)&&(YT(a)||KT(a)),XT=a=>a.disabled,ZT=a=>a.getAttribute("tabindex")!=="-1",QT=a=>!!(new Set(["BUTTON","DETAILS","EMBED","IFRAME","SELECT","TEXTAREA"]).has(a.tagName)||a instanceof HTMLAnchorElement&&a.hasAttribute("href")||a instanceof HTMLInputElement&&a.type!=="hidden"||(a instanceof HTMLAudioElement||a instanceof HTMLVideoElement)&&a.hasAttribute("controls")||(a instanceof HTMLImageElement||a instanceof HTMLObjectElement)&&a.hasAttribute("usemap")||a.hasAttribute("tabindex")&&a.tabIndex>-1),ah=(a,o)=>o.some(t=>a.matches(t));var $s=(a,o={})=>{var A,F,U,Q,Z;if(!a)return[];let t=new Set((A=o==null?void 0:o.excludedElements)!=null?A:[]),e=(F=o==null?void 0:o.includeSelectors)!=null?F:[],i=(U=o==null?void 0:o.excludeSelectors)!=null?U:[],l=(Q=o==null?void 0:o.stopAtNonTabbable)!=null?Q:!1,c=new Set((Z=o.includeElements)!=null?Z:[]),f=J=>{if(!(J instanceof HTMLSlotElement)&&(qT(J)||XT(J)||ah(J,i)))return"stop";if(l&&!(J instanceof HTMLSlotElement)&&J.getAttribute("tabindex")==="-1"){let at=J.getRootNode();if(!(at instanceof ShadowRoot&&at.delegatesFocus))return"stop"}return ah(J,e)||ZT(J)&&QT(J)?"focusable":"continue"},b=J=>{if(t.has(J)||J instanceof HTMLElement&&ah(J,i))return;J instanceof HTMLElement&&f(J)==="focusable"&&c.add(J);let at=[];J instanceof HTMLElement&&J.shadowRoot?at=Array.from(J.shadowRoot.children):J.children.length&&(at=Array.from(J.children)),at.forEach(nt=>{let ht=nt,yt=f(ht);yt==="focusable"&&c.add(ht),yt!=="stop"&&(ht.shadowRoot?b(ht.shadowRoot):ht.tagName==="SLOT"?ht.assignedElements({flatten:!0}).forEach(Ot=>{if(Ot instanceof HTMLElement){if(l&&!(Ot instanceof HTMLSlotElement)&&Ot.getAttribute("tabindex")==="-1")return;b(Ot)}}):b(ht))})};return b(a),[...c]},Xa=(a=document)=>{var t;let o=a instanceof Document?a.activeElement:a;for(;(t=o==null?void 0:o.shadowRoot)!=null&&t.activeElement;)o=o.shadowRoot.activeElement;return o},Ll=a=>"isWidthOverflowing"in a&&typeof a.isWidthOverflowing=="function",nh=a=>{let o=a.getRootNode();return o!==document&&o instanceof ShadowRoot?nh(o.host):a},Ml=a=>{let o=[a],t=a;for(;t;){let e=t.getRootNode();if(e instanceof ShadowRoot)t=e.host,o.push(t);else break}return o};var _i=class{static get stackArray(){return Array.from(this.stack)}static getActiveTrap(){return this.stackArray.at(-1)}static addKeydownListener(o){this.currentKeydownListener=o,document.addEventListener("keydown",o)}static removeKeydownListener(){this.currentKeydownListener&&document.removeEventListener("keydown",this.currentKeydownListener)}static activate(o){this.stackArray.forEach(t=>{t!==o&&t.setIsFocusTrapActivated(!1)}),this.stack.add(o),this.removeKeydownListener(),this.addKeydownListener(o.handleTabKeydown.bind(o))}static deactivate(o){if(this.stack.has(o)&&(this.stack.delete(o),this.removeKeydownListener(),this.stack.size>0)){let t=this.stackArray.pop();t&&(t.setIsFocusTrapActivated(!0),this.addKeydownListener(t.handleTabKeydown.bind(t)))}}};_i.stack=new Set,_i.currentKeydownListener=null;var Ol=z.constructTagName("spatialnavigationprovider");var lh={SPATIAL_NAVIGATION_KEY_MAPPING:{left:"ArrowLeft",right:"ArrowRight",up:"ArrowUp",down:"ArrowDown",escape:"Escape",enter:"Enter"},WEIGHTS:{alignWeight:5,orthogonalWeight:{vertical:2,horizontal:30}}};var JT=Ol,dh=JT;var yf=a=>{let{x:o,y:t,width:e,height:i,left:l,top:c,right:f,bottom:b}=a.getBoundingClientRect(),A=o+e/2,F=t+i/2;return{x:o,y:t,width:e,height:i,left:l,top:c,right:f,bottom:b,xMid:A,yMid:F}},tx=(a,o,t)=>Math.abs(t==="horizontal"?o.yMid-a.yMid:o.xMid-a.xMid),ex=(a,o)=>o==="horizontal"?a.height/2:a.width/2,rx=(a,o,t)=>t==="horizontal"?Math.max(0,Math.min(a.bottom,o.bottom)-Math.max(a.top,o.top)):Math.max(0,Math.min(a.right,o.right)-Math.max(a.left,o.left)),ix=(a,o,t)=>o==="horizontal"?t/a.height:t/a.width,ox=(a,o,t,e)=>{let i=o.xMid-a.xMid,l=o.yMid-a.yMid,c=Math.sqrt(i*i+l*l),f=tx(a,o,t)+ex(a,t)*e.orthogonalWeight[t],b=rx(a,o,t),A=ix(a,t,b)*e.alignWeight;return c+f-A-Math.sqrt(b)},Ef=(a,o,t,e)=>{if(!a||o.length===0)return[];if(o.length===1)return o[0]===a?[]:[{candidate:o[0],distance:0}];let i=yf(a),l=t==="left"||t==="right"?"horizontal":"vertical";return o.reduce((c,f)=>{if(f===a)return c;let b=yf(f);if(t==="left"&&b.right>i.xMid||t==="right"&&b.left<i.xMid||t==="up"&&b.bottom>i.yMid||t==="down"&&b.top<i.yMid)return c;let A=ox(i,b,l,e);return c.push({candidate:f,distance:A}),c},[]).sort((c,f)=>c.distance-f.distance)};var Ko=class extends UIEvent{constructor(o,t,e){super(o,{bubbles:!0,cancelable:!0,composed:!0,view:window}),this.action=e,this.relatedTarget=t}};var Za=class extends Se{constructor(){super({context:dh});this.navigationKeyMapping=lh.SPATIAL_NAVIGATION_KEY_MAPPING;this.distanceCalculationWeights=lh.WEIGHTS;this.root=this;this.initialHistoryLength=window.history.length;this.handleKeyDown=t=>{var c;if(t.shiftKey||t.ctrlKey||t.altKey||t.metaKey||!this.navigationKeys.includes(t.key))return;let e=this.context.value.keyToActionMap[t.key],i=new Ko("navbeforeprocess",this,e);if(t.target&&((c=t.composedPath()[0]||t.target)==null||c.dispatchEvent(i)),i.defaultPrevented)return;let l=!1;switch(e){case"up":l=this.focusNext(t,"up");break;case"down":l=this.focusNext(t,"down");break;case"left":l=this.focusNext(t,"left");break;case"right":l=this.focusNext(t,"right");break;case"enter":l=this.pressEnter();break;case"escape":l=this.goBack();break;default:}l?t.preventDefault():this.dispatchEvent(new Ko("navnotarget",this,e))};this.activeElementObserverCallback=()=>{let t=this.getActiveElement();if(!t||!t.isConnected)if(this.root.contains(document.activeElement)){let e=Xa();e&&this.setActiveElement(e)}else this.initActiveElement(t)};this.handleFocus=t=>{this.initActiveElement(t.target)};this.activeElementObserver=new MutationObserver(this.activeElementObserverCallback)}get navigationKeys(){return[this.navigationKeyMapping.up,this.navigationKeyMapping.down,this.navigationKeyMapping.left,this.navigationKeyMapping.right,this.navigationKeyMapping.enter,this.navigationKeyMapping.escape]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("focus",this.handleFocus),this.initActiveElement()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("focus",this.handleFocus),this.activeElement=void 0,this.activeElementObserver.disconnect()}static get Context(){return dh}updateContext(){let{actionToKeyMap:t}=this.context.value||{};(!t||t.left!==this.navigationKeyMapping.left||t.right!==this.navigationKeyMapping.right||t.up!==this.navigationKeyMapping.up||t.down!==this.navigationKeyMapping.down||t.enter!==this.navigationKeyMapping.enter||t.escape!==this.navigationKeyMapping.escape)&&(this.context.value={actionToKeyMap:{...this.navigationKeyMapping},keyToActionMap:Object.fromEntries(Object.entries(this.navigationKeyMapping).map(([e,i])=>[i,e]))},this.context.updateObservers())}initActiveElement(t){let e=$s(this.root);this.findActiveElement(e,t)}findActiveElement(t,e){if(!e||!t.includes(e)){let i=t[0];i&&this.setActiveElementAndFocus(i)}}focusNext(t,e){let i=_i.getActiveTrap(),l=null,c=[],f=t.composedPath();f=f.includes(this.root)?f:[this.root];for(let b of f)if(b===i||b===this.root||bf(b)){c.push(...$s(b,{excludedElements:l?[l]:void 0,includeSelectors:["[data-spatial-focusable]"],excludeSelectors:["[data-spatial-exclude]"]}));let A=this.focusNextInFocusableAria(c,e);if(A||b===i||b===this.root)return A&&this.emitNavBeforeFocusEvent(A,e),!!A;l=b}return!1}emitNavBeforeFocusEvent(t,e){var i;if(t){let l=new Ko("navbeforefocus",t,e);if((i=this.getActiveElement())==null||i.dispatchEvent(l),!l.defaultPrevented)return this.setActiveElementAndFocus(t),!0}return!1}focusNextInFocusableAria(t,e){var b,A;if(t.length===0)return;let i=this.getActiveElement(),l=Xa();if((!i||!t.includes(i)||i!==l)&&(l&&t.includes(l)?i=l:[i]=t,this.setActiveElement(i)),i!==Xa())return i;let c=`data-spatial-${e}`;if(l){let F=Ml(l).find(Q=>Q.hasAttribute(c)),U=F==null?void 0:F.getAttribute(c);if(F&&U){let Q=(b=F.getRootNode())==null?void 0:b.getElementById(U);if(Q)return Q}}return(A=Ef(i,t,e,this.distanceCalculationWeights)[0])==null?void 0:A.candidate}emitGoBackEvent(t){let e=new Ko("navback",t,"escape");return this.dispatchEvent(e),e.defaultPrevented}setActiveElement(t){var e;t!==((e=this.activeElement)==null?void 0:e.deref())&&(this.activeElementObserver.disconnect(),t?(this.activeElement=new WeakRef(t),t.parentNode&&this.activeElementObserver.observe(t.parentNode,{childList:!0})):this.activeElement=void 0)}setActiveElementAndFocus(t){this.setActiveElement(t),queueMicrotask(()=>t.focus())}getActiveElement(){var t;return(t=this.activeElement)==null?void 0:t.deref()}pressEnter(){let t=Xa();return t instanceof HTMLElement?(t.click(),!0):!1}goBack(){let t=$s(this.root).find(i=>i.hasAttribute("data-spatial-go-back")),e=this.emitGoBackEvent(t);return t&&!e?(t.click(),!0):window.history.length>this.initialHistoryLength?(window.history.back(),!0):!1}};h([u({attribute:!1})],Za.prototype,"navigationKeyMapping",2),h([u({attribute:!1})],Za.prototype,"distanceCalculationWeights",2);var ch=Za;ch.register(Ol);var Tf=ch;var Y={ENTER:"enter",ESCAPE:"escape",UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",SPACE:"space",TAB:"tab",HOME:"home",END:"end",BACKSPACE:"backspace"},sx={[kt.ARROW_UP]:Y.UP,[kt.ARROW_DOWN]:Y.DOWN,[kt.ARROW_LEFT]:Y.LEFT,[kt.ARROW_RIGHT]:Y.RIGHT,[kt.ENTER]:Y.ENTER,[kt.SPACE]:Y.SPACE,[kt.ESCAPE]:Y.ESCAPE,[kt.TAB]:Y.TAB,[kt.HOME]:Y.HOME,[kt.END]:Y.END,[kt.BACKSPACE]:Y.BACKSPACE},ee={DEFAULT:"default",SPATIAL:"spatial"},Nt=a=>{class o extends a{constructor(){super(...arguments);this.spatialNavigationContext=Ie.consume({host:this,context:Tf.Context})}getKeyboardNavMode(){var l;return((l=this.spatialNavigationContext)==null?void 0:l.value)?ee.SPATIAL:ee.DEFAULT}getActionForKeyEvent(i,l=!1){var b,A,F;let f=((F=(A=(b=this.spatialNavigationContext)==null?void 0:b.value)==null?void 0:A.keyToActionMap)!=null?F:sx)[i.key];if(l){if(!(window.getComputedStyle(this).direction==="rtl"))return f;if(f===Y.LEFT)return Y.RIGHT;if(f===Y.RIGHT)return Y.LEFT}return f}isDirectionAction(i){return i===Y.UP||i===Y.DOWN||i===Y.LEFT||i===Y.RIGHT}}return o};var Mt=a=>{class o extends a{constructor(...i){super(...i);this.keyDownEventHandledFlag=!1;this.keyDownEventHandledHandler=()=>{setTimeout(()=>{this.keyDownEventHandledFlag=!1})};this.handleNavBeforeProcessEvent=i=>{this.keyDownEventHandledFlag&&i.preventDefault()};this.addEventListener("keydown",this.keyDownEventHandledHandler),this.addEventListener("navbeforeprocess",this.handleNavBeforeProcessEvent)}keyDownEventHandled(){this.keyDownEventHandledFlag=!0}get isKeyDownEventHandled(){return this.keyDownEventHandledFlag}}return o};var Et=B`
18
+ `,uf=zT;var Nl=class extends X{constructor({context:o,initialValue:t}){super(),this.context=new Fs(this,{context:o,initialValue:t})}render(){return this.updateContext(),S`<slot></slot>`}};Nl.styles=[...X.styles,uf];var ff=Nl;var Se=ff;var Ve=a=>{class o extends a{constructor(){super(...arguments);this.elementToAutoFocus=null;this.autoFocusOnMount=!1}async firstUpdated(i){super.firstUpdated(i),this.autoFocusOnMount&&(await this.updateComplete,(this.elementToAutoFocus||this).focus())}}return h([u({type:Boolean,reflect:!0,attribute:"auto-focus-on-mount"})],o.prototype,"autoFocusOnMount",2),o};var te=a=>{class o extends a{}return h([u({reflect:!0,type:Boolean})],o.prototype,"disabled",2),o};var ri=a=>{class o extends a{constructor(){super(...arguments);this.tabIndex=0}}return h([u({reflect:!0,type:Number})],o.prototype,"tabIndex",2),o};var kt={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",END:"End",ENTER:"Enter",ESCAPE:"Escape",HOME:"Home",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT_TAB:"Shift+Tab",SPACE:" ",TAB:"Tab",DELETE:"Delete"};var BT=a=>{let{host:o,context:t,subscribe:e,callback:i,syncProperties:l}=a,c=(i||l)&&(f=>{l&&l.forEach(b=>{o.requestUpdate(b)}),i==null||i(f)});return new Ps(o,{context:t,callback:c,subscribe:e!=null?e:!0})},HT={consume:BT},Ie=HT;var vf=(a,o)=>!!(a.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING),gf=(a,o)=>!!(a.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING),UT=a=>a.getClientRects().length===0,GT=a=>{let{width:o,height:t}=a.getBoundingClientRect(),{offsetWidth:e,offsetHeight:i}=a;return e+i+t+o===0},bf=a=>{if(!(a instanceof Element))return!1;let o=getComputedStyle(a),{overflowX:t,overflowY:e}=o;return t==="auto"||t==="scroll"||e==="auto"||e==="scroll"},KT=a=>GT(a)||UT(a),WT=a=>{let{display:o,opacity:t,visibility:e}=a.style;return o==="none"||t==="0"||e==="hidden"||e==="collapse"},YT=a=>{let o=getComputedStyle(a);return o.visibility==="hidden"||o.height==="0"||o.display==="none"},jT=a=>getComputedStyle(a).display==="contents",qT=a=>a.hasAttribute("hidden")||a.getAttribute("aria-hidden")==="true"||WT(a)||!jT(a)&&(YT(a)||KT(a)),XT=a=>a.disabled,ZT=a=>a.getAttribute("tabindex")!=="-1",QT=a=>!!(new Set(["BUTTON","DETAILS","EMBED","IFRAME","SELECT","TEXTAREA"]).has(a.tagName)||a instanceof HTMLAnchorElement&&a.hasAttribute("href")||a instanceof HTMLInputElement&&a.type!=="hidden"||(a instanceof HTMLAudioElement||a instanceof HTMLVideoElement)&&a.hasAttribute("controls")||(a instanceof HTMLImageElement||a instanceof HTMLObjectElement)&&a.hasAttribute("usemap")||a.hasAttribute("tabindex")&&a.tabIndex>-1),ah=(a,o)=>o.some(t=>a.matches(t));var $s=(a,o={})=>{var A,F,U,Q,Z;if(!a)return[];let t=new Set((A=o==null?void 0:o.excludedElements)!=null?A:[]),e=(F=o==null?void 0:o.includeSelectors)!=null?F:[],i=(U=o==null?void 0:o.excludeSelectors)!=null?U:[],l=(Q=o==null?void 0:o.stopAtNonTabbable)!=null?Q:!1,c=new Set((Z=o.includeElements)!=null?Z:[]),f=J=>{if(!(J instanceof HTMLSlotElement)&&(qT(J)||XT(J)||ah(J,i)))return"stop";if(l&&!(J instanceof HTMLSlotElement)&&J.getAttribute("tabindex")==="-1"){let at=J.getRootNode();if(!(at instanceof ShadowRoot&&at.delegatesFocus))return"stop"}return ah(J,e)||ZT(J)&&QT(J)?"focusable":"continue"},b=J=>{if(t.has(J)||J instanceof HTMLElement&&ah(J,i))return;J instanceof HTMLElement&&f(J)==="focusable"&&c.add(J);let at=[];J instanceof HTMLElement&&J.shadowRoot?at=Array.from(J.shadowRoot.children):J.children.length&&(at=Array.from(J.children)),at.forEach(nt=>{let ht=nt,yt=f(ht);yt==="focusable"&&c.add(ht),yt!=="stop"&&(ht.shadowRoot?b(ht.shadowRoot):ht.tagName==="SLOT"?ht.assignedElements({flatten:!0}).forEach(Ot=>{if(Ot instanceof HTMLElement){if(l&&!(Ot instanceof HTMLSlotElement)&&Ot.getAttribute("tabindex")==="-1")return;b(Ot)}}):b(ht))})};return b(a),[...c]},Xa=(a=document)=>{var t;let o=a instanceof Document?a.activeElement:a;for(;(t=o==null?void 0:o.shadowRoot)!=null&&t.activeElement;)o=o.shadowRoot.activeElement;return o},Ll=a=>"isWidthOverflowing"in a&&typeof a.isWidthOverflowing=="function",nh=a=>{let o=a.getRootNode();return o!==document&&o instanceof ShadowRoot?nh(o.host):a},Ml=a=>{let o=[a],t=a;for(;t;){let e=t.getRootNode();if(e instanceof ShadowRoot)t=e.host,o.push(t);else break}return o};var _i=class{static get stackArray(){return Array.from(this.stack)}static getActiveTrap(){return this.stackArray.at(-1)}static addKeydownListener(o){this.currentKeydownListener=o,document.addEventListener("keydown",o)}static removeKeydownListener(){this.currentKeydownListener&&document.removeEventListener("keydown",this.currentKeydownListener)}static activate(o){this.stackArray.forEach(t=>{t!==o&&t.setIsFocusTrapActivated(!1)}),this.stack.add(o),this.removeKeydownListener(),this.addKeydownListener(o.handleTabKeydown.bind(o))}static deactivate(o){if(this.stack.has(o)&&(this.stack.delete(o),this.removeKeydownListener(),this.stack.size>0)){let t=this.stackArray.pop();t&&(t.setIsFocusTrapActivated(!0),this.addKeydownListener(t.handleTabKeydown.bind(t)))}}};_i.stack=new Set,_i.currentKeydownListener=null;var Ol=z.constructTagName("spatialnavigationprovider");var lh={SPATIAL_NAVIGATION_KEY_MAPPING:{left:"ArrowLeft",right:"ArrowRight",up:"ArrowUp",down:"ArrowDown",escape:"Escape",enter:"Enter"},WEIGHTS:{alignWeight:5,orthogonalWeight:{vertical:2,horizontal:30}}};var JT=Ol,dh=JT;var yf=a=>{let{x:o,y:t,width:e,height:i,left:l,top:c,right:f,bottom:b}=a.getBoundingClientRect(),A=o+e/2,F=t+i/2;return{x:o,y:t,width:e,height:i,left:l,top:c,right:f,bottom:b,xMid:A,yMid:F}},tx=(a,o,t)=>Math.abs(t==="horizontal"?o.yMid-a.yMid:o.xMid-a.xMid),ex=(a,o)=>o==="horizontal"?a.height/2:a.width/2,rx=(a,o,t)=>t==="horizontal"?Math.max(0,Math.min(a.bottom,o.bottom)-Math.max(a.top,o.top)):Math.max(0,Math.min(a.right,o.right)-Math.max(a.left,o.left)),ix=(a,o,t)=>o==="horizontal"?t/a.height:t/a.width,ox=(a,o,t,e)=>{let i=o.xMid-a.xMid,l=o.yMid-a.yMid,c=Math.sqrt(i*i+l*l),f=tx(a,o,t)+ex(a,t)*e.orthogonalWeight[t],b=rx(a,o,t),A=ix(a,t,b)*e.alignWeight;return c+f-A-Math.sqrt(b)},Ef=(a,o,t,e)=>{if(!a||o.length===0)return[];if(o.length===1)return o[0]===a?[]:[{candidate:o[0],distance:0}];let i=yf(a),l=t==="left"||t==="right"?"horizontal":"vertical";return o.reduce((c,f)=>{if(f===a)return c;let b=yf(f);if(t==="left"&&b.right>i.xMid||t==="right"&&b.left<i.xMid||t==="up"&&b.bottom>i.yMid||t==="down"&&b.top<i.yMid)return c;let A=ox(i,b,l,e);return c.push({candidate:f,distance:A}),c},[]).sort((c,f)=>c.distance-f.distance)};var Ko=class extends UIEvent{constructor(o,t,e){super(o,{bubbles:!0,cancelable:!0,composed:!0,view:window}),this.action=e,this.relatedTarget=t}};var Za=class extends Se{constructor(){super({context:dh});this.navigationKeyMapping=lh.SPATIAL_NAVIGATION_KEY_MAPPING;this.distanceCalculationWeights=lh.WEIGHTS;this.root=this;this.initialHistoryLength=window.history.length;this.handleKeyDownBefore=t=>{if(t.shiftKey||t.ctrlKey||t.altKey||t.metaKey||!this.isNavigationKey(t.key))return;let e=this.context.value.keyToActionMap[t.key];this.isDirectionKey(t.key)&&this.getElementIdForDirectionAttr(t.target,e)!==void 0&&(t.preventDefault(),t.stopImmediatePropagation(),this.handleKeyDown(t))};this.handleKeyDown=t=>{var c;if(t.shiftKey||t.ctrlKey||t.altKey||t.metaKey||!this.isNavigationKey(t.key))return;let e=this.context.value.keyToActionMap[t.key],i=new Ko("navbeforeprocess",this,e);if(t.target&&((c=t.composedPath()[0]||t.target)==null||c.dispatchEvent(i)),i.defaultPrevented)return;let l=!1;switch(e){case"up":l=this.focusNext(t,"up");break;case"down":l=this.focusNext(t,"down");break;case"left":l=this.focusNext(t,"left");break;case"right":l=this.focusNext(t,"right");break;case"enter":l=this.pressEnter();break;case"escape":l=this.goBack();break;default:}l?t.preventDefault():this.dispatchEvent(new Ko("navnotarget",this,e))};this.activeElementObserverCallback=()=>{let t=this.getActiveElement();if(!t||!t.isConnected)if(this.root.contains(document.activeElement)){let e=Xa();e&&this.setActiveElement(e)}else this.initActiveElement(t)};this.handleFocus=t=>{this.initActiveElement(t.target)};this.activeElementObserver=new MutationObserver(this.activeElementObserverCallback)}isNavigationKey(t){return[this.navigationKeyMapping.up,this.navigationKeyMapping.down,this.navigationKeyMapping.left,this.navigationKeyMapping.right,this.navigationKeyMapping.enter,this.navigationKeyMapping.escape].includes(t)}isDirectionKey(t){return[this.navigationKeyMapping.up,this.navigationKeyMapping.down,this.navigationKeyMapping.left,this.navigationKeyMapping.right].includes(t)}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleKeyDownBefore,{capture:!0}),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("focus",this.handleFocus),this.initActiveElement()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleKeyDownBefore,{capture:!0}),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("focus",this.handleFocus),this.activeElement=void 0,this.activeElementObserver.disconnect()}static get Context(){return dh}updateContext(){let{actionToKeyMap:t}=this.context.value||{};(!t||t.left!==this.navigationKeyMapping.left||t.right!==this.navigationKeyMapping.right||t.up!==this.navigationKeyMapping.up||t.down!==this.navigationKeyMapping.down||t.enter!==this.navigationKeyMapping.enter||t.escape!==this.navigationKeyMapping.escape)&&(this.context.value={actionToKeyMap:{...this.navigationKeyMapping},keyToActionMap:Object.fromEntries(Object.entries(this.navigationKeyMapping).map(([e,i])=>[i,e]))},this.context.updateObservers())}initActiveElement(t){let e=$s(this.root);this.findActiveElement(e,t)}findActiveElement(t,e){if(!e||!t.includes(e)){let i=t[0];i&&this.setActiveElementAndFocus(i)}}focusNext(t,e){let i=_i.getActiveTrap(),l=null,c=[],f=t.composedPath();f=f.includes(this.root)?f:[this.root];for(let b of f)if(b===i||b===this.root||bf(b)){c.push(...$s(b,{excludedElements:l?[l]:void 0,includeSelectors:["[data-spatial-focusable]"],excludeSelectors:["[data-spatial-exclude]"]}));let A=this.focusNextInFocusableAria(c,e);if(A||b===i||b===this.root)return A&&this.emitNavBeforeFocusEvent(A,e),!!A;l=b}return!1}emitNavBeforeFocusEvent(t,e){var i;if(t){let l=new Ko("navbeforefocus",t,e);if((i=this.getActiveElement())==null||i.dispatchEvent(l),!l.defaultPrevented)return this.setActiveElementAndFocus(t),!0}return!1}getElementIdForDirectionAttr(t,e){var l;let i=`data-spatial-${e}`;return(l=t==null?void 0:t.getAttribute(i))!=null?l:void 0}focusNextInFocusableAria(t,e){var b,A;let i=this.getActiveElement(),l=Xa();(!i||!t.includes(i)||i!==l)&&(l&&t.includes(l)?i=l:[i]=t,this.setActiveElement(i));let c=`data-spatial-${e}`;if(l){let F=Ml(l).find(Q=>Q.hasAttribute(c)),U=F==null?void 0:F.getAttribute(c);if(F&&U){let Q=(b=F.getRootNode())==null?void 0:b.getElementById(U);if(Q)return Q}}return i!==Xa()?i:t.length===0||(A=Ef(i,t,e,this.distanceCalculationWeights)[0])==null?void 0:A.candidate}emitGoBackEvent(t){let e=new Ko("navback",t,"escape");return this.dispatchEvent(e),e.defaultPrevented}setActiveElement(t){var e;t!==((e=this.activeElement)==null?void 0:e.deref())&&(this.activeElementObserver.disconnect(),t?(this.activeElement=new WeakRef(t),t.parentNode&&this.activeElementObserver.observe(t.parentNode,{childList:!0})):this.activeElement=void 0)}setActiveElementAndFocus(t){this.setActiveElement(t),queueMicrotask(()=>t.focus())}getActiveElement(){var t;return(t=this.activeElement)==null?void 0:t.deref()}pressEnter(){let t=Xa();return t instanceof HTMLElement?(t.click(),!0):!1}goBack(){let t=$s(this.root).find(i=>i.hasAttribute("data-spatial-go-back")),e=this.emitGoBackEvent(t);return t&&!e?(t.click(),!0):window.history.length>this.initialHistoryLength?(window.history.back(),!0):!1}};h([u({attribute:!1})],Za.prototype,"navigationKeyMapping",2),h([u({attribute:!1})],Za.prototype,"distanceCalculationWeights",2);var ch=Za;ch.register(Ol);var Tf=ch;var Y={ENTER:"enter",ESCAPE:"escape",UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",SPACE:"space",TAB:"tab",HOME:"home",END:"end",BACKSPACE:"backspace"},sx={[kt.ARROW_UP]:Y.UP,[kt.ARROW_DOWN]:Y.DOWN,[kt.ARROW_LEFT]:Y.LEFT,[kt.ARROW_RIGHT]:Y.RIGHT,[kt.ENTER]:Y.ENTER,[kt.SPACE]:Y.SPACE,[kt.ESCAPE]:Y.ESCAPE,[kt.TAB]:Y.TAB,[kt.HOME]:Y.HOME,[kt.END]:Y.END,[kt.BACKSPACE]:Y.BACKSPACE},ee={DEFAULT:"default",SPATIAL:"spatial"},Nt=a=>{class o extends a{constructor(){super(...arguments);this.spatialNavigationContext=Ie.consume({host:this,context:Tf.Context})}getKeyboardNavMode(){var l;return((l=this.spatialNavigationContext)==null?void 0:l.value)?ee.SPATIAL:ee.DEFAULT}getActionForKeyEvent(i,l=!1){var b,A,F;let f=((F=(A=(b=this.spatialNavigationContext)==null?void 0:b.value)==null?void 0:A.keyToActionMap)!=null?F:sx)[i.key];if(l){if(!(window.getComputedStyle(this).direction==="rtl"))return f;if(f===Y.LEFT)return Y.RIGHT;if(f===Y.RIGHT)return Y.LEFT}return f}isDirectionAction(i){return i===Y.UP||i===Y.DOWN||i===Y.LEFT||i===Y.RIGHT}}return o};var Mt=a=>{class o extends a{constructor(...i){super(...i);this.keyDownEventHandledFlag=!1;this.keyDownEventHandledHandler=()=>{setTimeout(()=>{this.keyDownEventHandledFlag=!1})};this.handleNavBeforeProcessEvent=i=>{this.keyDownEventHandledFlag&&i.preventDefault()};this.addEventListener("keydown",this.keyDownEventHandledHandler),this.addEventListener("navbeforeprocess",this.handleNavBeforeProcessEvent)}keyDownEventHandled(){this.keyDownEventHandledFlag=!0}get isKeyDownEventHandled(){return this.keyDownEventHandledFlag}}return o};var Et=B`
19
19
  :host {
20
20
  align-items: center;
21
21
  display: flex;
@@ -2748,7 +2748,7 @@
2748
2748
  border-top-right-radius: var(--mdc-popover-arrow-border-radius);
2749
2749
  border-bottom-left-radius: 100%;
2750
2750
  }
2751
- `,Og=[r0];var wd=z.constructTagName("popoverportal"),_d=class extends X{connectedCallback(){super.connectedCallback(),this.ariaHidden="true",this.style.display="none"}disconnectedCallback(){var o;super.disconnectedCallback(),(o=this.onDisconnect)==null||o.call(this)}};var kd=class{constructor(o){this.portalElement=null;this.disconnectAfterAppendTo=!1;this.arrowPixelChange=!1;this.popover=o}setupDelay(){try{let[o,t]=this.popover.delay.split(",").map(e=>{let i=parseInt(e,10);if(Number.isNaN(i)||i<0)throw new Error(`Invalid delay value: ${e}`);return i});return[o,t]}catch{return this.popover.delay="0,0",[0,0]}}setupHoverBridge(o){let t=this.popover.renderRoot.querySelector('div[part="popover-hover-bridge"]');Object.assign(t.style,{top:"",left:"",right:"",bottom:""});let e=this.popover.triggerElement;if(t&&e){let i=this.popover.getBoundingClientRect(),l=e.getBoundingClientRect(),c=0;if(!l)return;let f=this.popover.offsetHeight||0,b=this.popover.offsetWidth||0,A=o.split("-")[0];switch(A==="top"||A==="bottom"?c=Math.max(0,Math.max(i.top-l.bottom,l.top-i.bottom)):(A==="left"||A==="right")&&(c=Math.max(0,Math.max(l.left-i.right,i.left-l.right))),c+=1,A){case"top":t.style.height=`${c}px`,t.style.bottom=`calc(-1 * (${c}px))`,t.style.left="50%",t.style.width=`${b}px`;break;case"left":t.style.height=`${f}px`,t.style.width=`${c}px`,t.style.right=`calc(-1.5 * (${c}px))`;break;case"right":t.style.height=`${f}px`,t.style.width=`${c}px`,t.style.left=`calc(-0.5 * (${c}px))`;break;case"bottom":default:t.style.height=`${c}px`,t.style.top=`calc(-1 * (${c}px))`,t.style.left="50%",t.style.width=`${b}px`;break}}}setupAppendTo(){var o,t;if(this.popover.appendTo){let e=document.getElementById(this.popover.appendTo);e&&!Array.from(e.children).includes(this.popover)&&(this.disconnectAfterAppendTo=!0,this.portalElement=document.createElement(wd),this.portalElement.onDisconnect=()=>{this.popover.remove(),this.portalElement=null},(t=(o=this.popover.parentElement)==null?void 0:o.appendChild)==null||t.call(o,this.portalElement),e.appendChild(this.popover))}}cleanupAppendTo(){!this.disconnectAfterAppendTo&&this.portalElement&&this.portalElement.remove(),this.disconnectAfterAppendTo=!1}updateAriaLabels(){var o,t,e;this.popover.interactive&&this.popover.role&&(this.popover.ariaLabel||(this.popover.ariaLabel=((o=this.popover.triggerElement)==null?void 0:o.ariaLabel)||((t=this.popover.triggerElement)==null?void 0:t.textContent)||""),!this.popover.ariaLabelledby&&!this.popover.ariaLabel&&(this.popover.ariaLabelledby=((e=this.popover.triggerElement)==null?void 0:e.id)||""))}updateAriaModal(){this.popover.role===et.DIALOG||this.popover.role===et.ALERTDIALOG?this.popover.setAttribute("aria-modal","true"):this.popover.removeAttribute("aria-modal")}updateAriaExpandedAttribute(){var o,t,e;this.popover.disableAriaExpanded||((o=this.popover.triggerElement)==null||o.setAttribute("aria-expanded",`${this.popover.visible}`),(e=this.popover.triggerElement)==null||e.setAttribute("aria-haspopup",((t=this.popover.triggerElement)==null?void 0:t.getAttribute("aria-haspopup"))||this.popover.role||"dialog"))}updateArrowStyle(o,t){var F;if(!this.popover.arrowElement)return;let e=t.split("-")[0],i={top:"bottom",right:"left",bottom:"top",left:"right"}[e],{x:l,y:c}=o,f=this.popover.arrowElement.getBoundingClientRect(),b=(F=this.popover.arrowElement.offsetParent)==null?void 0:F.getBoundingClientRect();if(!this.arrowPixelChange){let U=b!=null&&b[i]?12-Math.abs(f[i]-b[i]):0;Math.round(U)===1?this.arrowPixelChange=!0:this.arrowPixelChange=!1}let A=this.arrowPixelChange?.5:0;this.popover.arrowElement.setAttribute("data-side",e),Object.assign(this.popover.arrowElement.style,{left:l!=null?`${l}px`:"",top:c!=null?`${c}px`:"",[i]:`${-this.popover.arrowElement.offsetHeight/2-A}px`})}updatePopoverStyle(o,t){Object.assign(this.popover.style,{left:`${o}px`,top:`${t}px`})}};var _t=class extends Mt(Nt(Jl(ql(jl(X))))){constructor(){super();this.depthManager=new ho(this);this.id="";this.triggerID="";this.trigger=bt.TRIGGER;this.placement=bt.PLACEMENT;this.color=bt.COLOR;this.visible=bt.VISIBLE;this.offset=bt.OFFSET;this.boundary=bt.BOUNDARY;this.boundaryRoot=bt.BOUNDARY_ROOT;this.focusTrap=bt.FOCUS_TRAP;this.preventScroll=bt.PREVENT_SCROLL;this.showArrow=bt.ARROW;this.closeButton=bt.CLOSE_BUTTON;this.interactive=bt.INTERACTIVE;this.delay=bt.DELAY;this.hideOnEscape=bt.HIDE_ON_ESCAPE;this.propagateEventOnEscape=bt.PROPAGATE_EVENT_ON_ESCAPE;this.hideOnBlur=bt.HIDE_ON_BLUR;this.hideOnOutsideClick=bt.HIDE_ON_CLICK_OUTSIDE;this.focusBackToTrigger=bt.FOCUS_BACK;this.backdrop=bt.BACKDROP;this.isBackdropInvisible=bt.IS_BACKDROP_INVISIBLE;this.disableFlip=bt.DISABLE_FLIP;this.size=bt.SIZE;this.closeButtonAriaLabel=null;this.strategy=bt.STRATEGY;this.role=bt.ROLE;this.ariaLabelledby=null;this.ariaDescribedby=null;this.disableAriaExpanded=bt.DISABLE_ARIA_EXPANDED;this.keepConnectedTooltipOpen=bt.KEEP_CONNECTED_TOOLTIP_OPEN;this.animationFrame=bt.ANIMATION_FRAME;this.inline=bt.INLINE;this.elementIndexToReceiveFocus=null;this.stackGroupName="";this.arrowElement=null;this.isHovered=!1;this.openDelay=0;this.closeDelay=0;this.floatingUICleanupFunction=null;this.shouldSuppressOpening=!1;this.timers=new Cd(this);this.parseTrigger=()=>{var l;let i=(((l=this.trigger)==null?void 0:l.split(" "))||[]).filter(c=>Object.values(_e).includes(c)).length>0?this.trigger:bt.TRIGGER;i==="mouseenter"&&(this.interactive?i="mouseenter click":i="mouseenter focusin"),this.trigger=i};this.setupTriggerListeners=()=>{if(this.trigger.includes("click")&&(document.addEventListener("click",this.togglePopoverVisible,{capture:!0}),this.hideOnBlur&&document.addEventListener("focusout",this.handleFocusOut,{capture:!0})),this.trigger.includes("mouseenter")){let t=this.renderRoot.querySelector('div[part="popover-hover-bridge"]');t==null||t.addEventListener("mouseenter",this.show),document.addEventListener("mouseenter",this.handleMouseEnter,{capture:!0}),document.addEventListener("mouseleave",this.handleMouseLeave,{capture:!0}),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay)}this.trigger.includes("focusin")&&(document.addEventListener("focusin",this.handleFocusIn,{capture:!0}),this.interactive||document.addEventListener("focusout",this.handleFocusOut,{capture:!0}))};this.removeTriggerListeners=()=>{document.removeEventListener("click",this.togglePopoverVisible,{capture:!0});let t=this.renderRoot.querySelector('div[part="popover-hover-bridge"]');t==null||t.removeEventListener("mouseenter",this.show),document.removeEventListener("mouseenter",this.handleMouseEnter,{capture:!0}),document.removeEventListener("mouseleave",this.handleMouseLeave,{capture:!0}),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),document.removeEventListener("focusin",this.handleFocusIn,{capture:!0}),document.removeEventListener("focusout",this.handleFocusOut,{capture:!0})};this.removeAllListeners=()=>{this.removeTriggerListeners(),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick,{capture:!0}),this.hideOnEscape&&(this.removeEventListener("keydown",this.onEscapeKeydown),document.removeEventListener("keydown",this.onEscapeKeydown)),this.hideOnBlur&&this.removeEventListener("focusout",this.onPopoverFocusOut)};this.onOutsidePopoverClick=t=>{if(!this.depthManager.isHostOnTop())return;let e=t.composedPath(),i=this.contains(t.target)||e.includes(this.triggerElement)||e.includes(this),l=this.backdropElement?e.includes(this.backdropElement):!1;(!i||l)&&(this.hide(),Fi.onClickOutside(this),l&&t.stopPropagation())};this.onEscapeKeydown=t=>{!this.visible||this.getActionForKeyEvent(t)!==Y.ESCAPE||!this.depthManager.isHostOnTop()||(this.propagateEventOnEscape||t.stopPropagation(),t.preventDefault(),this.hide(),Fi.onEscapeKeyPressed(this),this.keyDownEventHandled())};this.onPopoverFocusOut=t=>{this.contains(t.relatedTarget)||this.hide()};this.handleMouseEnter=t=>{this.isEventFromTrigger(t)&&(this.isHovered=!0,this.show())};this.handleMouseLeave=t=>{if(!this.isEventFromTrigger(t))return;let e=t,{triggerElement:i}=this;i&&e.relatedTarget instanceof Element&&Ml(e.relatedTarget).includes(i)||(this.isHovered=!1,this.startCloseDelay())};this.handleFocusOut=t=>{if(this.isEventFromTrigger(t)){if(this.hideOnBlur){let{relatedTarget:e}=t;this.contains(e)||this.hide();return}this.isHovered||this.hide()}};this.handleFocusIn=t=>{var e,i,l,c;this.isEventFromTrigger(t)&&((e=this.triggerElement)!=null&&e.matches(":focus-visible")||(c=(l=(i=this.triggerElement)==null?void 0:i.shadowRoot)==null?void 0:l.querySelector(".mdc-focus-ring"))!=null&&c.matches(":focus-visible")||this.isHovered)&&this.show()};this.cancelOpenDelay=()=>{this.timers.clearTimeout(Ri.OPEN)};this.startCloseDelay=()=>{this.cancelOpenDelay(),this.interactive?this.timers.setTimeout(Ri.HOVER,()=>{this.visible=!1},this.closeDelay):this.hide()};this.cancelCloseDelay=()=>{this.timers.clearTimeout(Ri.HOVER),this.timers.clearTimeout(Ri.CLOSE)};this.hide=()=>{this.cancelOpenDelay();let t=()=>{this.visible=!1};this.closeDelay>0?this.timers.setTimeout(Ri.CLOSE,t,this.closeDelay):(this.timers.clearTimeout(Ri.CLOSE),t())};this.togglePopoverVisible=t=>{this.isEventFromTrigger(t)&&(this.visible?this.hide():this.show())};this.positionPopover=()=>{let{triggerElement:t}=this;if(!t)return;let e=!this.boundary||this.boundary==="clippingAncestors"?"clippingAncestors":Array.from(document.querySelectorAll(this.boundary)),i=this.boundaryRoot,l=[];if(this.inline&&l.push(Lg()),l.push(_g({boundary:e,rootBoundary:i,padding:this.boundaryPadding})),this.disableFlip||l.push(wg({boundary:e,rootBoundary:i})),this.size){let f=A=>{this.style.setProperty("--mdc-popover-internal-available-height",`${A}px`)},b=this.renderRoot.querySelector('[part="popover-content"]');l.push(kg({boundary:e,rootBoundary:i,apply({availableHeight:A}){b&&(Object.assign(b.style,{maxHeight:`${A}px`,overflowY:"auto"}),f(A))},padding:50}))}let c=0;if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector('div[part="popover-arrow"]'),this.arrowElement)){let f=this.arrowElement.offsetHeight;c=Math.sqrt(2*f**2)/2,l.push(Ng({element:this.arrowElement,padding:12}))}l.push(Cg(typeof this.offset=="number"?this.offset+c:this.offset)),this.floatingUICleanupFunction=Ig(t,this,async()=>{let{triggerElement:f}=this;if(!f)return;let b=this.adjustPlacementForRtl(this.placement),{x:A,y:F,middlewareData:U,placement:Q}=await Mg(f,this,{placement:b,middleware:l,strategy:this.strategy});this.utils.updatePopoverStyle(A,F),U.arrow&&this.arrowElement&&this.utils.updateArrowStyle(U.arrow,Q),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(Q)},{animationFrame:this.animationFrame})};this.show=this.show.bind(this),this.utils=new kd(this),this.parseTrigger(),[this.openDelay,this.closeDelay]=this.utils.setupDelay()}get zIndex(){return Number.isInteger(this.internalZIndex)?this.internalZIndex:this.depthManager.getHostZIndex()}set zIndex(t){this.internalZIndex=t}get connectedTooltip(){let t=this.getRootNode().querySelectorAll(`mdc-tooltip[triggerID="${this.triggerID}"]`);return Array.from(t).find(e=>e!==this)}get triggerElement(){return this.getRootNode().querySelector(`[id="${this.triggerID}"]`)}async firstUpdated(t){super.firstUpdated(t),Fi.onCreatedPopover(this)}connectedCallback(){super.connectedCallback(),this.utils.setupAppendTo(),this.setupTriggerListeners()}async disconnectedCallback(){var t,e;super.disconnectedCallback(),this.removeAllListeners(),(t=this.deactivateFocusTrap)==null||t.call(this),this.deactivatePreventScroll(),this.moveElementBackAfterBackdropRemoval(this.triggerElement),this.removeBackdrop(),(e=this.floatingUICleanupFunction)==null||e.call(this),this.keepConnectedTooltipOpen||this.connectedTooltip&&(this.connectedTooltip.shouldSuppressOpening=!1),this.utils.cleanupAppendTo(),Fi.onDestroyedPopover(this)}async updated(t){if(super.updated(t),t.has("visible")){let e=t.get("visible")||!1;await this.isOpenUpdated(e,this.visible),this.utils.updateAriaExpandedAttribute()}t.has("trigger")&&(this.parseTrigger(),this.removeTriggerListeners(),this.setupTriggerListeners()),t.has("placement")&&this.setAttribute("placement",Object.values(Lt).includes(this.placement)?this.placement:bt.PLACEMENT),t.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),t.has("color")&&this.setAttribute("color",Object.values(Qo).includes(this.color)?this.color:bt.COLOR),t.has("appendTo")&&(this.appendTo&&this.isConnected?this.utils.setupAppendTo():this.utils.cleanupAppendTo()),(t.has("interactive")||t.has("aria-label")||t.has("aria-labelledby"))&&this.utils.updateAriaLabels(),t.has("role")&&(this.role===""&&(this.role=null),this.utils.updateAriaModal()),t.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),t.has("focusTrap")&&!this.focusTrap&&this.visible&&this.deactivateFocusTrap(),t.has("preventScroll")&&(!this.preventScroll&&this.visible?this.deactivatePreventScroll():this.preventScroll&&this.visible&&this.activatePreventScroll())}onComponentStackChanged(t){t==="removed"?this.hide():t==="moved"&&this.requestUpdate("zIndex")}async isOpenUpdated(t,e){var l,c;let{triggerElement:i}=this;t===e||!i||(e&&!this.shouldSuppressOpening?(this.depthManager.pushHost()&&this.requestUpdate("zIndex"),this.keepConnectedTooltipOpen||this.connectedTooltip&&(this.connectedTooltip.visible=!1,this.connectedTooltip.shouldSuppressOpening=!0),this.backdrop&&!this.backdropElement&&(this.createBackdrop("popover"),this.keepElementAboveBackdrop(i)),this.positionPopover(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(i.style.pointerEvents="none")),this.hideOnEscape&&(this.addEventListener("keydown",this.onEscapeKeydown),document.addEventListener("keydown",this.onEscapeKeydown)),this.activatePreventScroll(),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick,{capture:!0}),setTimeout(()=>{var f,b,A;this.interactive&&this.focusTrap&&((f=this.activateFocusTrap)==null||f.call(this),(A=this.setInitialFocus)==null||A.call(this,(b=this.elementIndexToReceiveFocus)!=null?b:0))},0),Fi.onShowPopover(this)):(this.depthManager.popHost(),(l=this.floatingUICleanupFunction)==null||l.call(this),this.backdrop&&(this.moveElementBackAfterBackdropRemoval(i),this.removeBackdrop()),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(i.style.pointerEvents="")),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick,{capture:!0}),this.hideOnEscape&&(this.removeEventListener("keydown",this.onEscapeKeydown),document.removeEventListener("keydown",this.onEscapeKeydown)),this.deactivatePreventScroll(),(c=this.deactivateFocusTrap)==null||c.call(this),this.focusBackToTrigger&&(i==null||i.focus()),this.keepConnectedTooltipOpen||this.connectedTooltip&&(this.connectedTooltip.shouldSuppressOpening=!1),Fi.onHidePopover(this)))}show(){if(this.shouldSuppressOpening||(this.cancelCloseDelay(),this.visible))return;let t=()=>{this.visible=!0};this.openDelay>0?this.timers.setTimeout(Ri.OPEN,t,this.openDelay):(this.timers.clearTimeout(Ri.OPEN),t())}isEventFromTrigger(t){var e;return this.triggerID?t.composed?t.composedPath().some(i=>(i==null?void 0:i.id)===this.triggerID):((e=t.target)==null?void 0:e.id)===this.triggerID:!1}isRtl(){return window.getComputedStyle(this).direction==="rtl"}adjustPlacementForRtl(t){if(!this.isRtl())return t;switch(t){case Lt.LEFT:return Lt.RIGHT;case Lt.LEFT_START:return Lt.RIGHT_START;case Lt.LEFT_END:return Lt.RIGHT_END;case Lt.RIGHT:return Lt.LEFT;case Lt.RIGHT_START:return Lt.LEFT_START;case Lt.RIGHT_END:return Lt.LEFT_END;default:return t}}render(){return this.style.zIndex=`${this.zIndex}`,S`
2751
+ `,Og=[r0];var wd=z.constructTagName("popoverportal"),_d=class extends X{connectedCallback(){super.connectedCallback(),this.ariaHidden="true",this.style.display="none"}disconnectedCallback(){var o;super.disconnectedCallback(),(o=this.onDisconnect)==null||o.call(this)}};var kd=class{constructor(o){this.portalElement=null;this.disconnectAfterAppendTo=!1;this.arrowPixelChange=!1;this.popover=o}setupDelay(){try{let[o,t]=this.popover.delay.split(",").map(e=>{let i=parseInt(e,10);if(Number.isNaN(i)||i<0)throw new Error(`Invalid delay value: ${e}`);return i});return[o,t]}catch{return this.popover.delay="0,0",[0,0]}}setupHoverBridge(o){let t=this.popover.renderRoot.querySelector('div[part="popover-hover-bridge"]');Object.assign(t.style,{top:"",left:"",right:"",bottom:""});let e=this.popover.triggerElement;if(t&&e){let i=this.popover.getBoundingClientRect(),l=e.getBoundingClientRect(),c=0;if(!l)return;let f=this.popover.offsetHeight||0,b=this.popover.offsetWidth||0,A=o.split("-")[0];switch(A==="top"||A==="bottom"?c=Math.max(0,Math.max(i.top-l.bottom,l.top-i.bottom)):(A==="left"||A==="right")&&(c=Math.max(0,Math.max(l.left-i.right,i.left-l.right))),c+=1,A){case"top":t.style.height=`${c}px`,t.style.bottom=`calc(-1 * (${c}px))`,t.style.left="50%",t.style.width=`${b}px`;break;case"left":t.style.height=`${f}px`,t.style.width=`${c}px`,t.style.right=`calc(-1.5 * (${c}px))`;break;case"right":t.style.height=`${f}px`,t.style.width=`${c}px`,t.style.left=`calc(-0.5 * (${c}px))`;break;case"bottom":default:t.style.height=`${c}px`,t.style.top=`calc(-1 * (${c}px))`,t.style.left="50%",t.style.width=`${b}px`;break}}}setupAppendTo(){var o,t;if(this.popover.appendTo){let e=document.getElementById(this.popover.appendTo);e&&!Array.from(e.children).includes(this.popover)&&(this.disconnectAfterAppendTo=!0,this.portalElement=document.createElement(wd),this.portalElement.onDisconnect=()=>{this.popover.remove(),this.portalElement=null},(t=(o=this.popover.parentElement)==null?void 0:o.appendChild)==null||t.call(o,this.portalElement),e.appendChild(this.popover))}}cleanupAppendTo(){!this.disconnectAfterAppendTo&&this.portalElement&&this.portalElement.remove(),this.disconnectAfterAppendTo=!1}updateAriaLabels(){var o,t,e;this.popover.interactive&&this.popover.role&&(this.popover.ariaLabel||(this.popover.ariaLabel=((o=this.popover.triggerElement)==null?void 0:o.ariaLabel)||((t=this.popover.triggerElement)==null?void 0:t.textContent)||""),!this.popover.ariaLabelledby&&!this.popover.ariaLabel&&(this.popover.ariaLabelledby=((e=this.popover.triggerElement)==null?void 0:e.id)||""))}updateAriaModal(){this.popover.role===et.DIALOG||this.popover.role===et.ALERTDIALOG?this.popover.setAttribute("aria-modal","true"):this.popover.removeAttribute("aria-modal")}updateAriaExpandedAttribute(){var o,t,e;this.popover.disableAriaExpanded||((o=this.popover.triggerElement)==null||o.setAttribute("aria-expanded",`${this.popover.visible}`),(e=this.popover.triggerElement)==null||e.setAttribute("aria-haspopup",((t=this.popover.triggerElement)==null?void 0:t.getAttribute("aria-haspopup"))||this.popover.role||"dialog"))}updateArrowStyle(o,t){var F;if(!this.popover.arrowElement)return;let e=t.split("-")[0],i={top:"bottom",right:"left",bottom:"top",left:"right"}[e],{x:l,y:c}=o,f=this.popover.arrowElement.getBoundingClientRect(),b=(F=this.popover.arrowElement.offsetParent)==null?void 0:F.getBoundingClientRect();if(!this.arrowPixelChange){let U=b!=null&&b[i]?12-Math.abs(f[i]-b[i]):0;Math.round(U)===1?this.arrowPixelChange=!0:this.arrowPixelChange=!1}let A=this.arrowPixelChange?.5:0;this.popover.arrowElement.setAttribute("data-side",e),Object.assign(this.popover.arrowElement.style,{left:l!=null?`${l}px`:"",top:c!=null?`${c}px`:"",[i]:`${-this.popover.arrowElement.offsetHeight/2-A}px`})}updatePopoverStyle(o,t){Object.assign(this.popover.style,{left:`${o}px`,top:`${t}px`})}};var _t=class extends Mt(Nt(Jl(ql(jl(X))))){constructor(){super();this.depthManager=new ho(this);this.id="";this.triggerID="";this.trigger=bt.TRIGGER;this.placement=bt.PLACEMENT;this.color=bt.COLOR;this.visible=bt.VISIBLE;this.offset=bt.OFFSET;this.boundary=bt.BOUNDARY;this.boundaryRoot=bt.BOUNDARY_ROOT;this.focusTrap=bt.FOCUS_TRAP;this.preventScroll=bt.PREVENT_SCROLL;this.showArrow=bt.ARROW;this.closeButton=bt.CLOSE_BUTTON;this.interactive=bt.INTERACTIVE;this.delay=bt.DELAY;this.hideOnEscape=bt.HIDE_ON_ESCAPE;this.propagateEventOnEscape=bt.PROPAGATE_EVENT_ON_ESCAPE;this.hideOnBlur=bt.HIDE_ON_BLUR;this.hideOnOutsideClick=bt.HIDE_ON_CLICK_OUTSIDE;this.focusBackToTrigger=bt.FOCUS_BACK;this.backdrop=bt.BACKDROP;this.isBackdropInvisible=bt.IS_BACKDROP_INVISIBLE;this.disableFlip=bt.DISABLE_FLIP;this.size=bt.SIZE;this.closeButtonAriaLabel=null;this.strategy=bt.STRATEGY;this.role=bt.ROLE;this.ariaLabelledby=null;this.ariaDescribedby=null;this.disableAriaExpanded=bt.DISABLE_ARIA_EXPANDED;this.keepConnectedTooltipOpen=bt.KEEP_CONNECTED_TOOLTIP_OPEN;this.animationFrame=bt.ANIMATION_FRAME;this.inline=bt.INLINE;this.elementIndexToReceiveFocus=null;this.stackGroupName="";this.arrowElement=null;this.isHovered=!1;this.openDelay=0;this.closeDelay=0;this.floatingUICleanupFunction=null;this.shouldSuppressOpening=!1;this.timers=new Cd(this);this.parseTrigger=()=>{var l;let i=(((l=this.trigger)==null?void 0:l.split(" "))||[]).filter(c=>Object.values(_e).includes(c)).length>0?this.trigger:bt.TRIGGER;i==="mouseenter"&&(this.interactive?i="mouseenter click":i="mouseenter focusin"),this.trigger=i};this.setupTriggerListeners=()=>{if(this.trigger.includes("click")&&(document.addEventListener("click",this.togglePopoverVisible,{capture:!0}),this.hideOnBlur&&document.addEventListener("focusout",this.handleFocusOut,{capture:!0})),this.trigger.includes("mouseenter")){let t=this.renderRoot.querySelector('div[part="popover-hover-bridge"]');t==null||t.addEventListener("mouseenter",this.show),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),document.addEventListener("mouseover",this.handleMouseEnter,{capture:!0}),document.addEventListener("mouseout",this.handleMouseLeave,{capture:!0})}this.trigger.includes("focusin")&&(document.addEventListener("focusin",this.handleFocusIn,{capture:!0}),this.interactive||document.addEventListener("focusout",this.handleFocusOut,{capture:!0}))};this.removeTriggerListeners=()=>{document.removeEventListener("click",this.togglePopoverVisible,{capture:!0});let t=this.renderRoot.querySelector('div[part="popover-hover-bridge"]');t==null||t.removeEventListener("mouseenter",this.show),document.removeEventListener("mouseover",this.handleMouseEnter,{capture:!0}),document.removeEventListener("mouseout",this.handleMouseLeave,{capture:!0}),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),document.removeEventListener("focusin",this.handleFocusIn,{capture:!0}),document.removeEventListener("focusout",this.handleFocusOut,{capture:!0})};this.removeAllListeners=()=>{this.removeTriggerListeners(),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick,{capture:!0}),this.hideOnEscape&&(this.removeEventListener("keydown",this.onEscapeKeydown),document.removeEventListener("keydown",this.onEscapeKeydown)),this.hideOnBlur&&this.removeEventListener("focusout",this.onPopoverFocusOut)};this.onOutsidePopoverClick=t=>{if(!this.depthManager.isHostOnTop())return;let e=t.composedPath(),i=this.contains(t.target)||e.includes(this.triggerElement)||e.includes(this),l=this.backdropElement?e.includes(this.backdropElement):!1;(!i||l)&&(this.hide(),Fi.onClickOutside(this),l&&t.stopPropagation())};this.onEscapeKeydown=t=>{!this.visible||this.getActionForKeyEvent(t)!==Y.ESCAPE||!this.depthManager.isHostOnTop()||(this.propagateEventOnEscape||t.stopPropagation(),t.preventDefault(),this.hide(),Fi.onEscapeKeyPressed(this),this.keyDownEventHandled())};this.onPopoverFocusOut=t=>{this.contains(t.relatedTarget)||this.hide()};this.isHoverWithinTrigger=t=>{let{triggerElement:e}=this,{relatedTarget:i}=t;return e&&i instanceof Element?Ml(i).includes(e):!1};this.handleMouseEnter=t=>{this.isEventFromTrigger(t)&&(this.isHoverWithinTrigger(t)||(this.isHovered=!0,this.show()))};this.handleMouseLeave=t=>{this.isEventFromTrigger(t)&&(this.isHoverWithinTrigger(t)||(this.isHovered=!1,this.startCloseDelay()))};this.handleFocusOut=t=>{if(this.isEventFromTrigger(t)){if(this.hideOnBlur){let{relatedTarget:e}=t;this.contains(e)||this.hide();return}this.isHovered||this.hide()}};this.handleFocusIn=t=>{var e,i,l,c;this.isEventFromTrigger(t)&&((e=this.triggerElement)!=null&&e.matches(":focus-visible")||(c=(l=(i=this.triggerElement)==null?void 0:i.shadowRoot)==null?void 0:l.querySelector(".mdc-focus-ring"))!=null&&c.matches(":focus-visible")||this.isHovered)&&this.show()};this.cancelOpenDelay=()=>{this.timers.clearTimeout(Ri.OPEN)};this.startCloseDelay=()=>{this.cancelOpenDelay(),this.interactive?this.timers.setTimeout(Ri.HOVER,()=>{this.visible=!1},this.closeDelay):this.hide()};this.cancelCloseDelay=()=>{this.timers.clearTimeout(Ri.HOVER),this.timers.clearTimeout(Ri.CLOSE)};this.hide=()=>{this.cancelOpenDelay();let t=()=>{this.visible=!1};this.closeDelay>0?this.timers.setTimeout(Ri.CLOSE,t,this.closeDelay):(this.timers.clearTimeout(Ri.CLOSE),t())};this.togglePopoverVisible=t=>{this.isEventFromTrigger(t)&&(this.visible?this.hide():this.show())};this.positionPopover=()=>{let{triggerElement:t}=this;if(!t)return;let e=!this.boundary||this.boundary==="clippingAncestors"?"clippingAncestors":Array.from(document.querySelectorAll(this.boundary)),i=this.boundaryRoot,l=[];if(this.inline&&l.push(Lg()),l.push(_g({boundary:e,rootBoundary:i,padding:this.boundaryPadding})),this.disableFlip||l.push(wg({boundary:e,rootBoundary:i})),this.size){let f=A=>{this.style.setProperty("--mdc-popover-internal-available-height",`${A}px`)},b=this.renderRoot.querySelector('[part="popover-content"]');l.push(kg({boundary:e,rootBoundary:i,apply({availableHeight:A}){b&&(Object.assign(b.style,{maxHeight:`${A}px`,overflowY:"auto"}),f(A))},padding:50}))}let c=0;if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector('div[part="popover-arrow"]'),this.arrowElement)){let f=this.arrowElement.offsetHeight;c=Math.sqrt(2*f**2)/2,l.push(Ng({element:this.arrowElement,padding:12}))}l.push(Cg(typeof this.offset=="number"?this.offset+c:this.offset)),this.floatingUICleanupFunction=Ig(t,this,async()=>{let{triggerElement:f}=this;if(!f)return;let b=this.adjustPlacementForRtl(this.placement),{x:A,y:F,middlewareData:U,placement:Q}=await Mg(f,this,{placement:b,middleware:l,strategy:this.strategy});this.utils.updatePopoverStyle(A,F),U.arrow&&this.arrowElement&&this.utils.updateArrowStyle(U.arrow,Q),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(Q)},{animationFrame:this.animationFrame})};this.show=this.show.bind(this),this.utils=new kd(this),this.parseTrigger(),[this.openDelay,this.closeDelay]=this.utils.setupDelay()}get zIndex(){return Number.isInteger(this.internalZIndex)?this.internalZIndex:this.depthManager.getHostZIndex()}set zIndex(t){this.internalZIndex=t}get connectedTooltip(){let t=this.getRootNode().querySelectorAll(`mdc-tooltip[triggerID="${this.triggerID}"]`);return Array.from(t).find(e=>e!==this)}get triggerElement(){return this.getRootNode().querySelector(`[id="${this.triggerID}"]`)}async firstUpdated(t){super.firstUpdated(t),Fi.onCreatedPopover(this)}connectedCallback(){super.connectedCallback(),this.utils.setupAppendTo(),this.setupTriggerListeners()}async disconnectedCallback(){var t,e;super.disconnectedCallback(),this.removeAllListeners(),(t=this.deactivateFocusTrap)==null||t.call(this),this.deactivatePreventScroll(),this.moveElementBackAfterBackdropRemoval(this.triggerElement),this.removeBackdrop(),(e=this.floatingUICleanupFunction)==null||e.call(this),this.keepConnectedTooltipOpen||this.connectedTooltip&&(this.connectedTooltip.shouldSuppressOpening=!1),this.utils.cleanupAppendTo(),Fi.onDestroyedPopover(this)}async updated(t){if(super.updated(t),t.has("visible")){let e=t.get("visible")||!1;await this.isOpenUpdated(e,this.visible),this.utils.updateAriaExpandedAttribute()}t.has("trigger")&&(this.parseTrigger(),this.removeTriggerListeners(),this.setupTriggerListeners()),t.has("placement")&&this.setAttribute("placement",Object.values(Lt).includes(this.placement)?this.placement:bt.PLACEMENT),t.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),t.has("color")&&this.setAttribute("color",Object.values(Qo).includes(this.color)?this.color:bt.COLOR),t.has("appendTo")&&(this.appendTo&&this.isConnected?this.utils.setupAppendTo():this.utils.cleanupAppendTo()),(t.has("interactive")||t.has("aria-label")||t.has("aria-labelledby"))&&this.utils.updateAriaLabels(),t.has("role")&&(this.role===""&&(this.role=null),this.utils.updateAriaModal()),t.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),t.has("focusTrap")&&!this.focusTrap&&this.visible&&this.deactivateFocusTrap(),t.has("preventScroll")&&(!this.preventScroll&&this.visible?this.deactivatePreventScroll():this.preventScroll&&this.visible&&this.activatePreventScroll())}onComponentStackChanged(t){t==="removed"?this.hide():t==="moved"&&this.requestUpdate("zIndex")}async isOpenUpdated(t,e){var l,c;let{triggerElement:i}=this;t===e||!i||(e&&!this.shouldSuppressOpening?(this.depthManager.pushHost()&&this.requestUpdate("zIndex"),this.keepConnectedTooltipOpen||this.connectedTooltip&&(this.connectedTooltip.visible=!1,this.connectedTooltip.shouldSuppressOpening=!0),this.backdrop&&!this.backdropElement&&(this.createBackdrop("popover"),this.keepElementAboveBackdrop(i)),this.positionPopover(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(i.style.pointerEvents="none")),this.hideOnEscape&&(this.addEventListener("keydown",this.onEscapeKeydown),document.addEventListener("keydown",this.onEscapeKeydown)),this.activatePreventScroll(),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick,{capture:!0}),setTimeout(()=>{var f,b,A;this.interactive&&this.focusTrap&&((f=this.activateFocusTrap)==null||f.call(this),(A=this.setInitialFocus)==null||A.call(this,(b=this.elementIndexToReceiveFocus)!=null?b:0))},0),Fi.onShowPopover(this)):(this.depthManager.popHost(),(l=this.floatingUICleanupFunction)==null||l.call(this),this.backdrop&&(this.moveElementBackAfterBackdropRemoval(i),this.removeBackdrop()),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(i.style.pointerEvents="")),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick,{capture:!0}),this.hideOnEscape&&(this.removeEventListener("keydown",this.onEscapeKeydown),document.removeEventListener("keydown",this.onEscapeKeydown)),this.deactivatePreventScroll(),(c=this.deactivateFocusTrap)==null||c.call(this),this.focusBackToTrigger&&(i==null||i.focus()),this.keepConnectedTooltipOpen||this.connectedTooltip&&(this.connectedTooltip.shouldSuppressOpening=!1),Fi.onHidePopover(this)))}show(){if(this.shouldSuppressOpening||(this.cancelCloseDelay(),this.visible))return;let t=()=>{this.visible=!0};this.openDelay>0?this.timers.setTimeout(Ri.OPEN,t,this.openDelay):(this.timers.clearTimeout(Ri.OPEN),t())}isEventFromTrigger(t){var e;return this.triggerID?t.composed?t.composedPath().some(i=>(i==null?void 0:i.id)===this.triggerID):((e=t.target)==null?void 0:e.id)===this.triggerID:!1}isRtl(){return window.getComputedStyle(this).direction==="rtl"}adjustPlacementForRtl(t){if(!this.isRtl())return t;switch(t){case Lt.LEFT:return Lt.RIGHT;case Lt.LEFT_START:return Lt.RIGHT_START;case Lt.LEFT_END:return Lt.RIGHT_END;case Lt.RIGHT:return Lt.LEFT;case Lt.RIGHT_START:return Lt.LEFT_START;case Lt.RIGHT_END:return Lt.LEFT_END;default:return t}}render(){return this.style.zIndex=`${this.zIndex}`,S`
2752
2752
  <div part="popover-hover-bridge"></div>
2753
2753
  ${this.closeButton?S` <mdc-button
2754
2754
  part="popover-close"