/*! For license information please see 9275.js.LICENSE.txt */
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9275],{1508:(t,e,s)=>{function i(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}function o(t){const e=[];let s;return"slot"===t.localName?s=t.assignedElements():(e.push(t),s=[...t.children]),s.forEach(t=>e.push(...o(t))),e}function n(t,e){return e?e.closest(t)||n(t,e.getRootNode().host):null}function d(t){return t?new Set(t.split(" ")):new Set}function h(t){return t?[...t].join(" "):""}function a(t,e,s){const i=d(t.getAttribute(e));i.add(s),t.setAttribute(e,h(i))}function l(t,e,s){const i=d(t.getAttribute(e));i.delete(s),0!==i.size?t.setAttribute(e,h(i)):t.removeAttribute(e)}function r(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}s.d(e,{Dy:()=>i,J$:()=>o,Wr:()=>l,Z4:()=>d,ZA:()=>r,el:()=>n,iA:()=>a,sz:()=>h})},5745:(t,e,s)=>{s.d(e,{i:()=>i});const i=(0,s(98741).y)(t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})},7888:(t,e,s)=>{s.d(e,{f:()=>i});const i=(0,s(98741).y)(t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",t=>{this._onKeyDown(t)}),this.addEventListener("keyup",t=>{this._onKeyUp(t)})}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})},11707:(t,e,s)=>{s.d(e,{I:()=>o});let i=0;function o(){return i++}},36176:(t,e,s)=>{s.d(e,{l:()=>o});var i=s(5745);const o=t=>class extends((0,i.i)(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}},42068:(t,e,s)=>{s(88660);var i=s(87550),o=s(36411);const n=i.AH`
  :host {
    --lumo-size-xs: 1.625rem;
    --lumo-size-s: 1.875rem;
    --lumo-size-m: 2.25rem;
    --lumo-size-l: 2.75rem;
    --lumo-size-xl: 3.5rem;

    /* Icons */
    --lumo-icon-size-s: 1.25em;
    --lumo-icon-size-m: 1.5em;
    --lumo-icon-size-l: 2.25em;
    /* For backwards compatibility */
    --lumo-icon-size: var(--lumo-icon-size-m);
  }
`;(0,o.q)("sizing-props",n)},44099:(t,e,s)=>{s.d(e,{r:()=>d});var i=s(1508),o=s(65641),n=s(11707);class d extends EventTarget{static generateId(t,e){return`${e||"default"}-${t.localName}-${(0,n.I)()}`}constructor(t,e,s,i={}){super();const{initializer:o,multiple:n,observe:d,useUniqueId:h}=i;this.host=t,this.slotName=e,this.tagName=s,this.observe="boolean"!=typeof d||d,this.multiple="boolean"==typeof n&&n,this.slotInitializer=o,n&&(this.nodes=[]),h&&(this.defaultId=this.constructor.generateId(t,e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach(t=>{this.initAddedNode(t)})}attachDefaultNode(){const{host:t,slotName:e,tagName:s}=this;let i=this.defaultNode;return!i&&s&&(i=document.createElement(s),i instanceof Element&&(""!==e&&i.setAttribute("slot",e),this.defaultNode=i)),i&&(this.node=i,t.appendChild(i)),i}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t)}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=""===t?"slot:not([name])":`slot[name=${t}]`,s=this.host.shadowRoot.querySelector(e);this.__slotObserver=new o.P(s,({addedNodes:t,removedNodes:e})=>{const s=this.multiple?this.nodes:[this.node],o=t.filter(t=>!(0,i.ZA)(t)&&!s.includes(t));e.length&&(this.nodes=s.filter(t=>!e.includes(t)),e.forEach(t=>{this.teardownNode(t)})),o&&o.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...s,...o].filter(t=>t!==this.defaultNode),o.forEach(t=>{this.initAddedNode(t)})):(this.node&&this.node.remove(),this.node=o[0],this.initAddedNode(this.node)))})}}},53149:(t,e,s)=>{s.d(e,{y:()=>n});var i=s(98741),o=s(30025);const n=(0,i.y)(t=>class extends t{get _keyboardActive(){return(0,o.aJ)()}ready(){this.addEventListener("focusin",t=>{this._shouldSetFocus(t)&&this._setFocused(!0)}),this.addEventListener("focusout",t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)}),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})},65641:(t,e,s)=>{s.d(e,{P:()=>i});class i{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask(()=>{this.flush()}))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const s=[],i=[];t.length&&(e=t.filter(t=>!this._storedNodes.includes(t))),this._storedNodes.length&&this._storedNodes.forEach((e,o)=>{const n=t.indexOf(e);-1===n?s.push(e):n!==o&&i.push(e)}),(e.length||s.length||i.length)&&this.callback({addedNodes:e,movedNodes:i,removedNodes:s}),this._storedNodes=t}}},81488:(t,e,s)=>{s.d(e,{I:()=>o});var i=s(44099);class o extends i.r{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}}}]);
//# sourceMappingURL=9275.js.map