/*! For license information please see 1519.js.LICENSE.txt */
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1519],{11284:(e,t,o)=>{o(52733),o(27136)},27136:(e,t,o)=>{o.d(t,{A:()=>_}),o(86689);var s=o(13256),i=o(82901),n=o(90676),r=o(81488),a=o(86314),l=o(87550),d=o(18330),h=o(37436),c=o(37720);const u=e=>class extends((0,h.a)(e)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new d.f(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new c.q(this.inputElement,this._labelController))}};(0,l.SF)("vaadin-text-field",a.k,{moduleId:"vaadin-text-field-styles"});class _ extends(u((0,l.cp)((0,n.q)(s.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return s.qy`
      <style>
        [part='input-field'] {
          flex-grow: 0;
        }
      </style>

      <div class="vaadin-field-container">
        <div part="label">
          <slot name="label"></slot>
          <span part="required-indicator" aria-hidden="true" on-click="focus"></span>
        </div>

        <vaadin-input-container
          part="input-field"
          readonly="[[readonly]]"
          disabled="[[disabled]]"
          invalid="[[invalid]]"
          theme$="[[_theme]]"
        >
          <slot name="prefix" slot="prefix"></slot>
          <slot name="input"></slot>
          <slot name="suffix" slot="suffix"></slot>
          <div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
        </vaadin-input-container>

        <div part="helper-text">
          <slot name="helper"></slot>
        </div>

        <div part="error-message">
          <slot name="error-message"></slot>
        </div>
      </div>
      <slot name="tooltip"></slot>
    `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new r.I(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}(0,i.X)(_)},37436:(e,t,o)=>{o.d(t,{a:()=>i});var s=o(44218);const i=e=>class extends((0,s.R)(e)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(e){this.__dataValue=e}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.value&&e.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),e.value=""),this.value&&(e.value=this.value))}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate()}_onInput(e){super._onInput(e),this.invalid&&this.validate()}_valueChanged(e,t){super._valueChanged(e,t),void 0!==t&&this.invalid&&this.validate()}}},45992:(e,t,o)=>{var s=o(51450);let i=!1;function n(){let e=document.activeElement||document.body;for(;e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function r(){return i}function a(e,t){const o=Math.max(e.tabIndex,0),s=Math.max(t.tabIndex,0);return 0===o||0===s?s>o:o>s}function l(e){const t=e.length;if(t<2)return e;const o=Math.ceil(t/2);return function(e,t){const o=[];for(;e.length>0&&t.length>0;)a(e[0],t[0])?o.push(t.shift()):o.push(e.shift());return o.concat(e,t)}(l(e.slice(0,o)),l(e.slice(o)))}function d(e){return e.getRootNode().activeElement===e}function h(e,t){if(e.nodeType!==Node.ELEMENT_NODE||function(e){const t=e.style;if("hidden"===t.visibility||"none"===t.display)return!0;const o=window.getComputedStyle(e);return"hidden"===o.visibility||"none"===o.display}(e))return!1;const o=e,s=function(e){if(!function(e){return!e.matches('[tabindex="-1"]')&&(e.matches("input, select, textarea, button, object")?e.matches(":not([disabled])"):e.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}(e))return-1;const t=e.getAttribute("tabindex")||0;return Number(t)}(o);let i=s>0;s>=0&&t.push(o);let n=[];return n="slot"===o.localName?o.assignedNodes({flatten:!0}):(o.shadowRoot||o).children,[...n].forEach(e=>{i=h(e,t)||i}),i}function c(e){const t=[];return h(e,t)?l(t):t}function u(e,t="24.5.12"){Object.defineProperty(e,"version",{get:()=>t});const o=customElements.get(e.is);if(o){const t=o.version;t&&e.version&&t===e.version?console.warn(`The component ${e.is} has been loaded twice`):console.error(`Tried to define ${e.is} version ${e.version} when version ${o.version} is already in use. Something will probably break.`)}else customElements.define(e.is,e)}window.addEventListener("keydown",()=>{i=!0},{capture:!0}),window.addEventListener("mousedown",()=>{i=!1},{capture:!0});const _=[];function p(e,t,o=e.getAttribute("dir")){t?e.setAttribute("dir",t):null!=o&&e.removeAttribute("dir")}function v(){return document.documentElement.getAttribute("dir")}new MutationObserver(function(){const e=v();_.forEach(t=>{p(t,e)})}).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const g=e=>class extends e{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:e=>e||"",toAttribute:e=>""===e?null:e}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),p(this,v(),null))}attributeChangedCallback(e,t,o){if(super.attributeChangedCallback(e,t,o),"dir"!==e)return;const s=v(),i=o===s&&-1===_.indexOf(this),n=!o&&t&&-1===_.indexOf(this),r=o!==s&&t===s;i||n?(this.__subscribe(),p(this,s,o)):r&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=_.includes(this),this.__unsubscribe()}_valueToNodeAttribute(e,t,o){("dir"!==o||""!==t||e.hasAttribute("dir"))&&super._valueToNodeAttribute(e,t,o)}_attributeToProperty(e,t,o){"dir"!==e||t?super._attributeToProperty(e,t,o):this.dir=""}__subscribe(){_.includes(this)||_.push(this)}__unsubscribe(){_.includes(this)&&_.splice(_.indexOf(this),1)}},m=new WeakMap,y={},f=/([A-Z])/gu;function b(e){return y[e]||(y[e]=e.replace(f,"-$1").toLowerCase()),y[e]}function w(e){return e[0].toUpperCase()+e.substring(1)}function C(e){const[t,o]=e.split("(");return{method:t,observerProps:o.replace(")","").split(",").map(e=>e.trim())}}function E(e,t){return Object.prototype.hasOwnProperty.call(e,t)||(e[t]=new Map(e[t])),e[t]}const T=(M=e=>class extends e{static createProperty(e,t){[String,Boolean,Number,Array].includes(t)&&(t={type:t}),t.reflectToAttribute&&(t.reflect=!0),super.createProperty(e,t)}static getOrCreateMap(e){return E(this,e)}static finalize(){if(super.finalize(),Array.isArray(this.observers)){const e=this.getOrCreateMap("__complexObservers");this.observers.forEach(t=>{const{method:o,observerProps:s}=C(t);e.set(o,s)})}}static addCheckedInitializer(e){super.addInitializer(t=>{t instanceof this&&e(t)})}static getPropertyDescriptor(e,t,o){const s=super.getPropertyDescriptor(e,t,o);let i=s;if(this.getOrCreateMap("__propKeys").set(e,t),o.sync&&(i={get:s.get,set(s){const i=this[e];this[t]=s,this.requestUpdate(e,i,o),this.hasUpdated&&this.performUpdate()},configurable:!0,enumerable:!0}),o.readOnly){const t=s.set;this.addCheckedInitializer(s=>{s[`_set${w(e)}`]=function(e){t.call(s,e),o.sync&&this.performUpdate()}}),i={get:s.get,set(){},configurable:!0,enumerable:!0}}if("value"in o&&this.addCheckedInitializer(t=>{const s="function"==typeof o.value?o.value.call(t):o.value;o.readOnly?t[`_set${w(e)}`](s):t[e]=s}),o.observer){const t=o.observer;this.getOrCreateMap("__observers").set(e,t),this.addCheckedInitializer(e=>{e[t]||console.warn(`observer method ${t} not defined`)})}if(o.notify){if(this.__notifyProps){if(!this.hasOwnProperty("__notifyProps")){const e=this.__notifyProps;this.__notifyProps=new Set(e)}}else this.__notifyProps=new Set;this.__notifyProps.add(e)}if(o.computed){const t=`__assignComputed${e}`,s=C(o.computed);this.prototype[t]=function(...t){this[e]=this[s.method](...t)},this.getOrCreateMap("__complexObservers").set(t,s.observerProps)}return o.attribute||(o.attribute=b(e)),i}firstUpdated(){super.firstUpdated(),this.$||(this.$={}),this.renderRoot.querySelectorAll("[id]").forEach(e=>{this.$[e.id]=e})}ready(){}updated(e){this.constructor.__observers&&this.__runObservers(e,this.constructor.__observers),this.constructor.__complexObservers&&this.__runComplexObservers(e,this.constructor.__complexObservers),this.__dynamicObservers&&this.__runComplexObservers(e,this.__dynamicObservers),this.constructor.__notifyProps&&this.__runNotifyProps(e,this.constructor.__notifyProps),this.__isReadyInvoked||(this.__isReadyInvoked=!0,this.ready())}setProperties(e){Object.entries(e).forEach(([e,t])=>{const o=this.constructor.__propKeys.get(e),s=this[o];this[o]=t,this.requestUpdate(e,s)}),this.hasUpdated&&this.performUpdate()}_createMethodObserver(e){const t=E(this,"__dynamicObservers"),{method:o,observerProps:s}=C(e);t.set(o,s)}__runComplexObservers(e,t){t.forEach((t,o)=>{t.some(t=>e.has(t))&&(this[o]?this[o](...t.map(e=>this[e])):console.warn(`observer method ${o} not defined`))})}__runObservers(e,t){e.forEach((e,o)=>{const s=t.get(o);void 0!==s&&this[s]&&this[s](this[o],e)})}__runNotifyProps(e,t){e.forEach((e,o)=>{t.has(o)&&this.dispatchEvent(new CustomEvent(`${b(o)}-changed`,{detail:{value:this[o]}}))})}_get(e,t){return function(e,t){return e.split(".").reduce((e,t)=>e?e[t]:void 0,t)}(e,t)}_set(e,t,o){!function(e,t,o){const s=e.split("."),i=s.pop();s.reduce((e,t)=>e[t],o)[i]=t}(e,t,o)}},e=>{if(function(e,t){let o=t;for(;o;){if(m.get(o)===e)return!0;o=Object.getPrototypeOf(o)}return!1}(M,e))return e;const t=M(e);return m.set(t,M),t}),O=s.AH`
  :host {
    z-index: 200;
    position: fixed;

    /* Despite of what the names say, <vaadin-overlay> is just a container
          for position/sizing/alignment. The actual overlay is the overlay part. */

    /* Default position constraints: the entire viewport. Note: themes can
          override this to introduce gaps between the overlay and the viewport. */
    inset: 0;
    bottom: var(--vaadin-overlay-viewport-bottom);

    /* Use flexbox alignment for the overlay part. */
    display: flex;
    flex-direction: column; /* makes dropdowns sizing easier */
    /* Align to center by default. */
    align-items: center;
    justify-content: center;

    /* Allow centering when max-width/max-height applies. */
    margin: auto;

    /* The host is not clickable, only the overlay part is. */
    pointer-events: none;

    /* Remove tap highlight on touch devices. */
    -webkit-tap-highlight-color: transparent;

    /* CSS API for host */
    --vaadin-overlay-viewport-bottom: 0;
  }

  :host([hidden]),
  :host(:not([opened]):not([closing])),
  :host(:not([opened]):not([closing])) [part='overlay'] {
    display: none !important;
  }

  [part='overlay'] {
    -webkit-overflow-scrolling: touch;
    overflow: auto;
    pointer-events: auto;

    /* Prevent overflowing the host */
    max-width: 100%;
    box-sizing: border-box;

    -webkit-tap-highlight-color: initial; /* reenable tap highlight inside */
  }

  [part='backdrop'] {
    z-index: -1;
    content: '';
    background: rgba(0, 0, 0, 0.5);
    position: fixed;
    inset: 0;
    pointer-events: auto;
  }
`,k=e=>class extends e{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(e,t,o){super.attributeChangedCallback(e,t,o),"theme"===e&&this._set_theme(o)}},A=[],x=new Set,L=new Set;var M;function P(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():A}function S(e=""){let t=0;return e.startsWith("lumo-")||e.startsWith("material-")?t=1:e.startsWith("vaadin-")&&(t=2),t}function $(e){const t=[];return e.include&&[].concat(e.include).forEach(e=>{const o=P().find(t=>t.moduleId===e);o?t.push(...$(o),...o.styles):console.warn(`Included moduleId ${e} not found in style registry`)},e.styles),t}function D(e){const t=`${e}-default-theme`,o=P().filter(o=>o.moduleId!==t&&function(e,t){return(e||"").split(" ").some(e=>new RegExp(`^${e.split("*").join(".*")}$`,"u").test(t))}(o.themeFor,e)).map(e=>({...e,styles:[...$(e),...e.styles],includePriority:S(e.moduleId)})).sort((e,t)=>t.includePriority-e.includePriority);return o.length>0?o:P().filter(e=>e.moduleId===t)}const I=e=>class extends(k(e)){constructor(){super(),x.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&L.add(this.is),this.elementStyles)return;const e=this.prototype._template;var t;e&&(!(t=this)||!Object.prototype.hasOwnProperty.call(t,"__themes"))&&function(e,t){const o=document.createElement("style");o.id="vaadin-themable-mixin-style",o.textContent=function(e){return e.map(e=>e.cssText).join("\n")}(e),t.content.appendChild(o)}(this.getStylesForThis(),e)}static finalizeStyles(e){const t=this.getStylesForThis();return e?[...[e].flat(1/0),...t]:t}static getStylesForThis(){const t=e.__themes||[],o=Object.getPrototypeOf(this.prototype),s=(o?o.constructor.__themes:[])||[];this.__themes=[...t,...s,...D(this.is)];const i=this.__themes.flatMap(e=>e.styles);return i.filter((e,t)=>t===i.lastIndexOf(e))}};var N=o(72821);const F=e=>e.test(navigator.userAgent),R=e=>e.test(navigator.platform);F(/Android/u),F(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),F(/Firefox/u);const z=R(/^iPad/u)||R(/^Mac/u)&&navigator.maxTouchPoints>1,B=R(/^iPhone/u)||z;F(/^((?!chrome|android).)*safari/iu),(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})();let V=new WeakMap,H=new WeakMap,U={},W=0;const q=e=>e&&e.nodeType===Node.ELEMENT_NODE,j=(...e)=>{console.error(`Error: ${e.join(" ")}. Skip setting aria-hidden.`)},G=(e,t=document.body,o="data-aria-hidden")=>{const s=Array.from(Array.isArray(e)?e:[e]);return t&&s.push(...Array.from(t.querySelectorAll("[aria-live]"))),((e,t,o,s)=>{const i=((e,t)=>q(e)?t.map(t=>{if(!q(t))return j(t,"is not a valid element"),null;let o=t;for(;o&&o!==e;){if(e.contains(o))return t;o=o.getRootNode().host}return j(t,"is not contained inside",e),null}).filter(e=>Boolean(e)):(j(e,"is not a valid element"),[]))(t,Array.isArray(e)?e:[e]);U[o]||(U[o]=new WeakMap);const n=U[o],r=[],a=new Set,l=new Set(i),d=e=>{if(!e||a.has(e))return;a.add(e);const t=e.assignedSlot;t&&d(t),d(e.parentNode||e.host)};i.forEach(d);const h=e=>{if(!e||l.has(e))return;const t=e.shadowRoot;(t?[...e.children,...t.children]:[...e.children]).forEach(e=>{if(!["template","script","style"].includes(e.localName))if(a.has(e))h(e);else{const t=e.getAttribute(s),i=null!==t&&"false"!==t,a=(V.get(e)||0)+1,l=(n.get(e)||0)+1;V.set(e,a),n.set(e,l),r.push(e),1===a&&i&&H.set(e,!0),1===l&&e.setAttribute(o,"true"),i||e.setAttribute(s,"true")}})};return h(t),a.clear(),W+=1,()=>{r.forEach(e=>{const t=V.get(e)-1,i=n.get(e)-1;V.set(e,t),n.set(e,i),t||(H.has(e)?H.delete(e):e.removeAttribute(s)),i||e.removeAttribute(o)}),W-=1,W||(V=new WeakMap,V=new WeakMap,H=new WeakMap,U={})}})(s,t,o,"aria-hidden")};HTMLElement.prototype;class K{constructor(e,t){this.host=e,this.callback="function"==typeof t?t:()=>e}showModal(){const e=this.callback();this.__showOthers=G(e)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}class X{saveFocus(e){this.focusNode=e||n()}restoreFocus(e){const t=this.focusNode;if(!t)return;const o=!!e&&e.preventScroll;n()===document.body?setTimeout(()=>t.focus({preventScroll:o})):t.focus({preventScroll:o}),this.focusNode=null}}const Y=[];class Z{constructor(e){this.host=e,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return c(this.__trapNode)}get __focusedElementIndex(){const e=this.__focusableElements;return e.indexOf(e.filter(d).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(e){if(this.__trapNode=e,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Y.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Y.pop()}__onKeyDown(e){if(this.__trapNode&&this===Array.from(Y).pop()&&"Tab"===e.key){e.preventDefault();const t=e.shiftKey;this.__focusNextElement(t)}}__focusNextElement(e=!1){const t=this.__focusableElements,o=e?-1:1,s=this.__focusedElementIndex,i=t[(t.length+s+o)%t.length];i.focus(),"input"===i.localName&&i.select()}}const J=(0,o(98741).y)(e=>"function"==typeof e.prototype.addController?e:class extends e{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach(e=>{e.hostConnected&&e.hostConnected()})}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach(e=>{e.hostDisconnected&&e.hostDisconnected()})}addController(e){this.__controllers.add(e),void 0!==this.$&&this.isConnected&&e.hostConnected&&e.hostConnected()}removeController(e){this.__controllers.delete(e)}}),Q=e=>class extends(J(e)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new K(this),this.__focusTrapController=new Z(this),this.__focusRestorationController=new X}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const e=!r();this.__focusRestorationController.restoreFocus({preventScroll:e})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const e=n();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return!0;let t=e;const o=e.ownerDocument;for(;t&&t!==o&&t!==this;)t=t.parentNode||t.host;return t===this}},ee=()=>Array.from(document.body.children).filter(e=>e instanceof HTMLElement&&e._hasOverlayStackMixin&&!e.hasAttribute("closing")).sort((e,t)=>e.__zIndex-t.__zIndex||0),te=()=>ee().filter(e=>e.$.overlay),oe=e=>e===te().pop(),se=e=>class extends e{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return oe(this)}bringToFront(){let e="";const t=ee().filter(e=>e!==this).pop();t&&(e=t.__zIndex+1),this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),te().forEach(e=>{e!==this&&(e.$.overlay.style.pointerEvents="none")})}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=te();let t;for(;(t=e.pop())&&(t===this||(t.$.overlay.style.removeProperty("pointer-events"),t.modeless)););}},ie=e=>class extends(Q(se(e))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),B&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",()=>{}),this.$.backdrop.addEventListener("click",()=>{}),this.addEventListener("mouseup",()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()})}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(e){const t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,t=window.innerWidth>e,o=document.documentElement.clientHeight;t&&o>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",o-e+"px"):this.style.setProperty("--vaadin-overlay-viewport-bottom","0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(e,t,o,s){const i=this._oldOwner!==t||this._oldModel!==o;this._oldModel=o,this._oldOwner=t;const n=this._oldRenderer!==e,r=void 0!==this._oldRenderer;this._oldRenderer=e;const a=this._oldOpened!==s;this._oldOpened=s,n&&r&&(this.innerHTML="",delete this._$litPart$),s&&e&&(n||a||i)&&this.requestContentUpdate()}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(e,t){e?(this._saveFocus(),this._animatedOpening(),(0,N.m)(this,()=>{this._trapFocus();const e=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(e)}),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):t&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const e=getComputedStyle(this),t=e.getPropertyValue("animation-name");return!("none"===e.getPropertyValue("display"))&&t&&"none"!==t}_enqueueAnimation(e,t){const o=`__${e}Handler`,s=e=>{e&&e.target!==this||(t(),this.removeEventListener("animationend",s),delete this[o])};this[o]=s,this.addEventListener("animationend",s)}_flushAnimation(e){const t=`__${e}Handler`;"function"==typeof this[t]&&this[t]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",()=>{this._finishOpening()}):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",()=>{this._finishClosing()}):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(e))return;const t=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}_keydownListener(e){if(this._last&&(!this.modeless||e.composedPath().includes(this.$.overlay))&&"Escape"===e.key){const t=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}},ne={start:"top",end:"bottom"},re={start:"left",end:"right"},ae=new ResizeObserver(e=>{setTimeout(()=>{e.forEach(e=>{e.target.__overlay&&e.target.__overlay._updatePosition()})})}),le=e=>class extends e{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=function(e){const t=[];for(;e;){if(e.nodeType===Node.DOCUMENT_NODE){t.push(e);break}e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?e=e.assignedSlot?e.assignedSlot:e.parentNode:(t.push(e),e=e.host)}return t}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0)}),this.positionTarget&&(this.__observePositionTargetMove=function(e,t){let o=null;const s=document.documentElement;function i(){o&&o.disconnect(),o=null}return function n(r=!1,a=1){i();const{left:l,top:d,width:h,height:c}=e.getBoundingClientRect();if(r||t(),!h||!c)return;const u={rootMargin:`${-Math.floor(d)}px ${-Math.floor(s.clientWidth-(l+h))}px ${-Math.floor(s.clientHeight-(d+c))}px ${-Math.floor(l)}px`,threshold:Math.max(0,Math.min(1,a))||1};let _=!0;o=new IntersectionObserver(function(e){let t=e[0].intersectionRatio;if(t!==a){if(!_)return n();0===t&&(t=1e-7),n(!1,t)}_=!1},u),o.observe(e)}(!0),i}(this.positionTarget,()=>{this._updatePosition()}))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(e=>{e.removeEventListener("scroll",this.__onScroll,!0)}),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(e,t){if(this.__removeUpdatePositionEventListeners(),t&&(t.__overlay=null,ae.unobserve(t),e&&(this.__addUpdatePositionEventListeners(),t.__overlay=this,ae.observe(t))),e){const e=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(t=>{this.__margins[t]=parseInt(e[t],10)})),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition())}}__positionSettingsChanged(){this._updatePosition()}__onScroll(e){e.target instanceof Node&&this.contains(e.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const e=this.positionTarget.getBoundingClientRect();if(0===e.width&&0===e.height&&this.opened)return void(this.opened=!1);const t=this.__shouldAlignStartVertically(e);this.style.justifyContent=t?"flex-start":"flex-end";const o=this.__isRTL,s=this.__shouldAlignStartHorizontally(e,o),i=!o&&s||o&&!s;this.style.alignItems=i?"flex-start":"flex-end";const n=this.getBoundingClientRect(),r=this.__calculatePositionInOneDimension(e,n,this.noVerticalOverlap,ne,this,t),a=this.__calculatePositionInOneDimension(e,n,this.noHorizontalOverlap,re,this,s);Object.assign(this.style,r,a),this.toggleAttribute("bottom-aligned",!t),this.toggleAttribute("top-aligned",t),this.toggleAttribute("end-aligned",!i),this.toggleAttribute("start-aligned",i)}__shouldAlignStartHorizontally(e,t){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const s=Math.min(window.innerWidth,document.documentElement.clientWidth),i=!t&&"start"===this.horizontalAlign||t&&"end"===this.horizontalAlign;return this.__shouldAlignStart(e,o,s,this.__margins,i,this.noHorizontalOverlap,re)}__shouldAlignStartVertically(e){const t=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),s="top"===this.verticalAlign;return this.__shouldAlignStart(e,t,o,this.__margins,s,this.noVerticalOverlap,ne)}__shouldAlignStart(e,t,o,s,i,n,r){const a=o-e[n?r.end:r.start]-s[r.end],l=e[n?r.start:r.end]-s[r.start],d=i?a:l;return i===(d>(i?l:a)||d>t)}__adjustBottomProperty(e,t,o){let s;if(e===t.end){if(t.end===ne.end){const e=Math.min(window.innerHeight,document.documentElement.clientHeight);o>e&&this.__oldViewportHeight&&(s=o-(this.__oldViewportHeight-e)),this.__oldViewportHeight=e}if(t.end===re.end){const e=Math.min(window.innerWidth,document.documentElement.clientWidth);o>e&&this.__oldViewportWidth&&(s=o-(this.__oldViewportWidth-e)),this.__oldViewportWidth=e}}return s}__calculatePositionInOneDimension(e,t,o,s,i,n){const r=n?s.start:s.end,a=n?s.end:s.start,l=parseFloat(i.style[r]||getComputedStyle(i)[r]),d=this.__adjustBottomProperty(r,s,l),h=t[n?s.start:s.end]-e[o===n?s.end:s.start],c=d?`${d}px`:`${l+h*(n?-1:1)}px`;return{[r]:c,[a]:""}}},de=e=>class extends(le(ie(e))){static get properties(){return{position:{type:String,reflectToAttribute:!0}}}get _tagNamePrefix(){return"vaadin-popover"}requestContentUpdate(){if(super.requestContentUpdate(),this.positionTarget&&this.owner){const e=getComputedStyle(this.owner);["top","bottom","start","end"].forEach(t=>{this.style.setProperty(`--${this._tagNamePrefix}-offset-${t}`,e.getPropertyValue(`--${this._tagNamePrefix}-offset-${t}`))})}}_updatePosition(){if(super._updatePosition(),this.positionTarget&&this.opened){if(this.removeAttribute("arrow-centered"),"bottom"===this.position||"top"===this.position){const e=this.positionTarget.getBoundingClientRect(),t=this.$.overlay.getBoundingClientRect(),o=e.width/2-t.width/2;if(this.style.left){const e=t.left+o;e>0&&(this.style.left=`${e}px`,this.setAttribute("arrow-centered",""))}if(this.style.right){const e=parseFloat(this.style.right)+o;e>0&&(this.style.right=`${e}px`,this.setAttribute("arrow-centered",""))}}if("start"===this.position||"end"===this.position){const e=this.positionTarget.getBoundingClientRect(),t=this.$.overlay.getBoundingClientRect(),o=e.height/2-t.height/2;this.style.top=`${t.top+o}px`}}}};class he extends(de(g(I(T(s.WF))))){static get is(){return"vaadin-popover-overlay"}static get styles(){return[O,s.AH`
        :host {
          --_vaadin-popover-content-width: auto;
          --_vaadin-popover-content-height: auto;
        }

        :host([modeless][with-backdrop]) [part='backdrop'] {
          pointer-events: none;
        }

        :host([position^='top'][top-aligned]) [part='overlay'],
        :host([position^='bottom'][top-aligned]) [part='overlay'] {
          margin-top: var(--vaadin-popover-offset-top, 0);
        }

        [part='overlay'] {
          position: relative;
          overflow: visible;
          max-height: 100%;
        }

        [part='content'] {
          overflow: auto;
          box-sizing: border-box;
          max-height: 100%;
          width: var(--_vaadin-popover-content-width);
          height: var(--_vaadin-popover-content-height);
        }

        /* Increase the area of the popover so the pointer can go from the target directly to it. */
        [part='overlay']::before {
          position: absolute;
          content: '';
          inset-block: calc(var(--vaadin-popover-offset-top, 0) * -1) calc(var(--vaadin-popover-offset-bottom, 0) * -1);
          inset-inline: calc(var(--vaadin-popover-offset-start, 0) * -1) calc(var(--vaadin-popover-offset-end, 0) * -1);
          z-index: -1;
          pointer-events: auto;
        }

        :host([position^='top'][bottom-aligned]) [part='overlay'],
        :host([position^='bottom'][bottom-aligned]) [part='overlay'] {
          margin-bottom: var(--vaadin-popover-offset-bottom, 0);
        }

        :host([position^='start'][start-aligned]) [part='overlay'],
        :host([position^='end'][start-aligned]) [part='overlay'] {
          margin-inline-start: var(--vaadin-popover-offset-start, 0);
        }

        :host([position^='start'][end-aligned]) [part='overlay'],
        :host([position^='end'][end-aligned]) [part='overlay'] {
          margin-inline-end: var(--vaadin-popover-offset-end, 0);
        }

        [part='arrow'] {
          display: none;
          position: absolute;
          height: 0;
          width: 0;
        }

        :host([theme~='arrow']) [part='arrow'] {
          display: block;
        }
      `]}render(){return s.qy`
      <div id="backdrop" part="backdrop" hidden ?hidden="${!this.withBackdrop}"></div>
      <div part="overlay" id="overlay" tabindex="0">
        <div part="arrow"></div>
        <div part="content" id="content"><slot></slot></div>
      </div>
    `}_shouldCloseOnOutsideClick(e){return(!this.owner.__hasTrigger("focus")||!d(this))&&super._shouldCloseOnOutsideClick(e)}}u(he);var ce=o(55670);const ue=e=>e??ce.s6;var _e=o(82663),pe=o(68519);let ve=0,ge=0;const me=[];let ye=!1;const fe={run:e=>window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,16),cancel(e){window.cancelIdleCallback?window.cancelIdleCallback(e):window.clearTimeout(e)}},be={run(e){ye||(ye=!0,queueMicrotask(()=>function(){ye=!1;const e=me.length;for(let t=0;t<e;t++){const e=me[t];if(e)try{e()}catch(e){setTimeout(()=>{throw e})}}me.splice(0,e),ge+=e}())),me.push(e);const t=ve;return ve+=1,t},cancel(e){const t=e-ge;if(t>=0){if(!me[t])throw new Error(`invalid async handle: ${e}`);me[t]=null}}},we=new Set;class Ce{static debounce(e,t,o){return e instanceof Ce?e._cancelAsync():e=new Ce,e.setConfig(t,o),e}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(e,t){this._asyncModule=e,this._callback=t,this._timer=this._asyncModule.run(()=>{this._timer=null,we.delete(this),this._callback()})}cancel(){this.isActive()&&(this._cancelAsync(),we.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}let Ee;(0,_e.DH)(!1),window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){(0,pe.r)()};const Te=new Set,Oe=e=>class extends(g(e)){static finalize(){super.finalize();const{is:e}=this;var t;e&&!Te.has(e)&&(window.Vaadin.registrations.push(this),Te.add(e),window.Vaadin.developmentModeCallback&&(Ee=Ce.debounce(Ee,fe,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()}),t=Ee,we.add(t)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}},ke=e=>class extends e{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(e,t){if(!t)return;if(void 0===e)return;const{classList:o}=t;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const e=this.__previousClasses.filter(e=>!this.__initialClasses.has(e));e.length>0&&o.remove(...e)}const s="string"==typeof e?e.split(" ").filter(Boolean):[];s.length>0&&o.add(...s),this.__previousClasses=s}};let Ae=0;const xe=e=>class extends e{static get properties(){return{for:{type:String,observer:"__forChanged"},target:{type:Object,observer:"__targetChanged"}}}connectedCallback(){super.connectedCallback(),this.target&&this._addTargetListeners(this.target)}disconnectedCallback(){super.disconnectedCallback(),this.target&&this._removeTargetListeners(this.target)}__forChanged(e){e&&(this.__setTargetByIdDebouncer=Ce.debounce(this.__setTargetByIdDebouncer,be,()=>this.__setTargetById(e)))}__setTargetById(e){if(!this.isConnected)return;const t=this.getRootNode().getElementById(e);t?this.target=t:console.warn(`No element with id="${e}" set via "for" property found on the page.`)}__targetChanged(e,t){t&&this._removeTargetListeners(t),e&&this._addTargetListeners(e)}_addTargetListeners(e){}_removeTargetListeners(e){}},Le=500;let Me=Le,Pe=Le,Se=Le;class $e{constructor(e){this.host=e}get isClosing(){return null!=this.__closeTimeout}get __focusDelay(){const e=this.host;return null!=e.focusDelay&&e.focusDelay>=0?e.focusDelay:Me}get __hoverDelay(){const e=this.host;return null!=e.hoverDelay&&e.hoverDelay>=0?e.hoverDelay:Pe}get __hideDelay(){const e=this.host;return null!=e.hideDelay&&e.hideDelay>=0?e.hideDelay:Se}open(e={immediate:!1}){const{immediate:t,trigger:o}=e,s="hover"===o&&this.__hoverDelay>0,i="focus"===o&&this.__focusDelay>0;t||!s&&!i||this.__closeTimeout?this.__showPopover():this.__scheduleOpen(o)}close(e){!e&&this.__hideDelay>0?this.__scheduleClose():(this.__abortClose(),this.__setOpened(!1)),this.__abortOpen()}__setOpened(e){this.host.opened=e}__showPopover(){this.__abortClose(),this.__setOpened(!0)}__abortClose(){this.__closeTimeout&&(clearTimeout(this.__closeTimeout),this.__closeTimeout=null)}__abortOpen(){this.__openTimeout&&(clearTimeout(this.__openTimeout),this.__openTimeout=null)}__scheduleClose(){this.__closeTimeout=setTimeout(()=>{this.__closeTimeout=null,this.__setOpened(!1)},this.__hideDelay)}__scheduleOpen(e){this.__abortOpen();const t="focus"===e?this.__focusDelay:this.__hoverDelay;this.__openTimeout=setTimeout(()=>{this.__openTimeout=null,this.__showPopover()},t)}}class De extends((e=>class extends e{static get properties(){return{position:{type:String},_position:{type:String,value:"bottom"},__effectivePosition:{type:String,computed:"__computePosition(position, _position)"}}}__computeHorizontalAlign(e){return["top-end","bottom-end","start-top","start","start-bottom"].includes(e)?"end":"start"}__computeNoHorizontalOverlap(e){return["start-top","start","start-bottom","end-top","end","end-bottom"].includes(e)}__computeNoVerticalOverlap(e){return["top-start","top-end","top","bottom-start","bottom","bottom-end"].includes(e)}__computeVerticalAlign(e){return["top-start","top-end","top","start-bottom","end-bottom"].includes(e)?"bottom":"top"}__computePosition(e,t){return e||t}})(xe(ke(k(Oe(T(s.WF))))))){static get is(){return"vaadin-popover"}static get styles(){return s.AH`
      :host {
        display: none !important;
      }
    `}static get properties(){return{accessibleName:{type:String},accessibleNameRef:{type:String},autofocus:{type:Boolean},contentHeight:{type:String},contentWidth:{type:String},focusDelay:{type:Number},hideDelay:{type:Number},hoverDelay:{type:Number},opened:{type:Boolean,value:!1,notify:!0,observer:"__openedChanged"},overlayRole:{type:String,value:"dialog"},renderer:{type:Object},modal:{type:Boolean,value:!1},noCloseOnOutsideClick:{type:Boolean,value:!1},noCloseOnEsc:{type:Boolean,value:!1},trigger:{type:Array,value:()=>["click"]},withBackdrop:{type:Boolean,value:!1},__shouldRestoreFocus:{type:Boolean,value:!1,sync:!0},__overlayId:{type:String}}}static get observers(){return["__updateContentHeight(contentHeight, _overlayElement)","__updateContentWidth(contentWidth, _overlayElement)","__openedOrTargetChanged(opened, target)","__overlayRoleOrTargetChanged(overlayRole, target)"]}static setDefaultFocusDelay(e){Me=null!=e&&e>=0?e:Le}static setDefaultHideDelay(e){Se=null!=e&&e>=0?e:Le}static setDefaultHoverDelay(e){Pe=null!=e&&e>=0?e:Le}constructor(){super(),this.__overlayId="vaadin-popover-"+Ae++,this.__onGlobalClick=this.__onGlobalClick.bind(this),this.__onGlobalKeyDown=this.__onGlobalKeyDown.bind(this),this.__onTargetClick=this.__onTargetClick.bind(this),this.__onTargetFocusIn=this.__onTargetFocusIn.bind(this),this.__onTargetFocusOut=this.__onTargetFocusOut.bind(this),this.__onTargetMouseEnter=this.__onTargetMouseEnter.bind(this),this.__onTargetMouseLeave=this.__onTargetMouseLeave.bind(this),this._openedStateController=new $e(this)}render(){const e=this.__effectivePosition;return s.qy`
      <vaadin-popover-overlay
        id="${this.__overlayId}"
        role="${this.overlayRole}"
        aria-label="${ue(this.accessibleName)}"
        aria-labelledby="${ue(this.accessibleNameRef)}"
        .renderer="${this.renderer}"
        .owner="${this}"
        theme="${ue(this._theme)}"
        .positionTarget="${this.target}"
        .position="${e}"
        .opened="${this.opened}"
        .modeless="${!this.modal}"
        .focusTrap="${this.modal}"
        .withBackdrop="${this.withBackdrop}"
        ?no-horizontal-overlap="${this.__computeNoHorizontalOverlap(e)}"
        ?no-vertical-overlap="${this.__computeNoVerticalOverlap(e)}"
        .horizontalAlign="${this.__computeHorizontalAlign(e)}"
        .verticalAlign="${this.__computeVerticalAlign(e)}"
        @mousedown="${this.__onOverlayMouseDown}"
        @mouseenter="${this.__onOverlayMouseEnter}"
        @mouseleave="${this.__onOverlayMouseLeave}"
        @focusin="${this.__onOverlayFocusIn}"
        @focusout="${this.__onOverlayFocusOut}"
        @opened-changed="${this.__onOpenedChanged}"
        .restoreFocusOnClose="${this.__shouldRestoreFocus}"
        .restoreFocusNode="${this.target}"
        @vaadin-overlay-escape-press="${this.__onEscapePress}"
        @vaadin-overlay-outside-click="${this.__onOutsideClick}"
        @vaadin-overlay-open="${this.__onOverlayOpened}"
        @vaadin-overlay-closed="${this.__onOverlayClosed}"
      ></vaadin-popover-overlay>
    `}requestContentUpdate(){this.renderer&&this._overlayElement&&this._overlayElement.requestContentUpdate()}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-popover-overlay")}connectedCallback(){super.connectedCallback(),document.documentElement.addEventListener("click",this.__onGlobalClick,!0)}disconnectedCallback(){super.disconnectedCallback(),document.documentElement.removeEventListener("click",this.__onGlobalClick,!0),this._openedStateController.close(!0)}_addTargetListeners(e){e.addEventListener("click",this.__onTargetClick),e.addEventListener("mouseenter",this.__onTargetMouseEnter),e.addEventListener("mouseleave",this.__onTargetMouseLeave),e.addEventListener("focusin",this.__onTargetFocusIn),e.addEventListener("focusout",this.__onTargetFocusOut)}_removeTargetListeners(e){e.removeEventListener("click",this.__onTargetClick),e.removeEventListener("mouseenter",this.__onTargetMouseEnter),e.removeEventListener("mouseleave",this.__onTargetMouseLeave),e.removeEventListener("focusin",this.__onTargetFocusIn),e.removeEventListener("focusout",this.__onTargetFocusOut)}__openedChanged(e,t){e?document.addEventListener("keydown",this.__onGlobalKeyDown,!0):t&&document.removeEventListener("keydown",this.__onGlobalKeyDown,!0)}__openedOrTargetChanged(e,t){t&&(t.setAttribute("aria-expanded",e?"true":"false"),e?t.setAttribute("aria-controls",this.__overlayId):t.removeAttribute("aria-controls"))}__overlayRoleOrTargetChanged(e,t){if(this.__oldTarget&&this.__oldTarget.removeAttribute("aria-haspopup"),t){const o="dialog"===e||"alertdialog"===e;t.setAttribute("aria-haspopup",o?"dialog":"true"),this.__oldTarget=t}}__onGlobalClick(e){!this.opened||this.__isManual||this.modal||e.composedPath().some(e=>e===this._overlayElement||e===this.target)||this.noCloseOnOutsideClick||!oe(this._overlayElement)||this._openedStateController.close(!0)}__onTargetClick(){this.__hasTrigger("click")&&(this.opened||(this.__shouldRestoreFocus=!0),this.opened?this._openedStateController.close(!0):this._openedStateController.open({immediate:!0}))}__onGlobalKeyDown(e){this.modal||("Escape"===e.key&&!this.noCloseOnEsc&&this.opened&&!this.__isManual&&oe(this._overlayElement)&&(e.stopPropagation(),this._openedStateController.close(!0)),"Tab"===e.key&&(e.shiftKey?this.__onGlobalShiftTab(e):this.__onGlobalTab(e)))}__onGlobalTab(e){const t=this._overlayElement.$.overlay;if(this.target&&d(this.target))return e.preventDefault(),void t.focus();const o=this.__getLastFocusable(t);if(o&&d(o)){const o=this.__getNextBodyFocusable(this.target);if(o&&o!==t)return e.preventDefault(),void o.focus()}const s=n();this.__getNextBodyFocusable(s)===t&&o&&o.focus()}__onGlobalShiftTab(e){const t=this._overlayElement.$.overlay;if(this.target&&d(this.target)&&this.__shouldRestoreFocus)return void(this.__shouldRestoreFocus=!1);if(this.target&&d(t))return e.preventDefault(),void this.target.focus();const o=this.__getNextBodyFocusable(this.target);if(o&&d(o)){const o=this.__getLastFocusable(t);o&&(e.preventDefault(),o.focus())}}__getNextBodyFocusable(e){const t=c(document.body),o=t.findIndex(t=>t===e);return t[o+1]}__getLastFocusable(e){return c(e).pop()}__onTargetFocusIn(){if(this.__focusInside=!0,this.__hasTrigger("focus")){if(this.__hasTrigger("click")&&!r())return;this.__shouldRestoreFocus||(this.__shouldRestoreFocus=!0,this._openedStateController.open({trigger:"focus"}))}}__onTargetFocusOut(e){oe(this._overlayElement)&&(this.__hasTrigger("focus")&&this.__mouseDownInside||this._overlayElement.contains(e.relatedTarget)||this.__handleFocusout())}__onTargetMouseEnter(){this.__hoverInside=!0,this.__hasTrigger("hover")&&!this.opened&&(this.modal&&(this.target.style.pointerEvents="auto"),this._openedStateController.open({trigger:"hover"}))}__onTargetMouseLeave(e){this._overlayElement.opened&&!oe(this._overlayElement)||this._overlayElement.contains(e.relatedTarget)||this.__handleMouseLeave()}__onOverlayFocusIn(){this.__focusInside=!0,(this.__hasTrigger("focus")||this.__hasTrigger("click"))&&(this.__shouldRestoreFocus=!0)}__onOverlayFocusOut(e){oe(this._overlayElement)&&(this.__hasTrigger("focus")&&this.__mouseDownInside||e.relatedTarget===this.target||this._overlayElement.contains(e.relatedTarget)||this.__handleFocusout())}__onOverlayMouseDown(){this.__hasTrigger("focus")&&(this.__mouseDownInside=!0,document.addEventListener("mouseup",()=>{this.__mouseDownInside=!1},{once:!0}))}__onOverlayMouseEnter(){this.__hoverInside=!0,this.__hasTrigger("hover")&&this._openedStateController.isClosing&&this._openedStateController.open({immediate:!0})}__onOverlayMouseLeave(e){oe(this._overlayElement)&&e.relatedTarget!==this.target&&this.__handleMouseLeave()}__handleFocusout(){this.__focusInside=!1,this.__hasTrigger("hover")&&this.__hoverInside||this.__hasTrigger("focus")&&this._openedStateController.close(!0)}__handleMouseLeave(){this.__hoverInside=!1,this.__hasTrigger("focus")&&this.__focusInside||this.__hasTrigger("hover")&&this._openedStateController.close()}__onOpenedChanged(e){this.opened=e.detail.value}__onOverlayOpened(){this.autofocus&&!this.modal&&this._overlayElement.$.overlay.focus()}__onOverlayClosed(){this.__shouldRestoreFocus&&setTimeout(()=>{this.__shouldRestoreFocus=!1}),this.modal&&this.target.style.pointerEvents&&(this.target.style.pointerEvents=""),this.dispatchEvent(new CustomEvent("closed"))}__onEscapePress(e){(this.noCloseOnEsc||this.__isManual)&&e.preventDefault()}__onOutsideClick(e){(this.noCloseOnOutsideClick||this.__isManual)&&e.preventDefault()}__hasTrigger(e){return Array.isArray(this.trigger)&&this.trigger.includes(e)}get __isManual(){return null==this.trigger||Array.isArray(this.trigger)&&0===this.trigger.length}__updateDimension(e,t,o){const s=`--_vaadin-popover-content-${t}`;o?e.style.setProperty(s,o):e.style.removeProperty(s)}__updateContentHeight(e,t){t&&this.__updateDimension(t,"height",e)}__updateContentWidth(e,t){t&&this.__updateDimension(t,"width",e)}}u(De)},52733:(e,t,o)=>{o(27397);var s=o(47642);(0,o(87550).SF)("vaadin-text-field",s.k,{moduleId:"lumo-text-field-styles"}),o(27136)}}]);
//# sourceMappingURL=1519.js.map