@descope/web-components-ui 2.2.11 → 2.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/cjs/index.cjs.js +2043 -1752
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +2000 -1707
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/6419.js +82 -0
  6. package/dist/umd/6419.js.LICENSE.txt +23 -0
  7. package/dist/umd/6419.js.map +1 -0
  8. package/dist/umd/8961.js +1 -1
  9. package/dist/umd/8961.js.map +1 -1
  10. package/dist/umd/9365.js +1 -1
  11. package/dist/umd/9365.js.map +1 -1
  12. package/dist/umd/9582.js +1 -1
  13. package/dist/umd/9582.js.map +1 -1
  14. package/dist/umd/DescopeDev.js +1 -1
  15. package/dist/umd/DescopeDev.js.map +1 -1
  16. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  17. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -1
  18. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
  19. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
  20. package/dist/umd/descope-alert-index-js.js +1 -1
  21. package/dist/umd/descope-alert-index-js.js.map +1 -1
  22. package/dist/umd/descope-button.js +1 -1
  23. package/dist/umd/descope-button.js.map +1 -1
  24. package/dist/umd/descope-collapsible-container.js +1 -1
  25. package/dist/umd/descope-collapsible-container.js.map +1 -1
  26. package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
  27. package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
  28. package/dist/umd/descope-enriched-text.js +1 -1
  29. package/dist/umd/descope-enriched-text.js.map +1 -1
  30. package/dist/umd/descope-icon.js +1 -1
  31. package/dist/umd/descope-icon.js.map +1 -1
  32. package/dist/umd/descope-image.js +1 -1
  33. package/dist/umd/descope-image.js.map +1 -1
  34. package/dist/umd/descope-outbound-app-button.js +1 -1
  35. package/dist/umd/descope-outbound-app-button.js.map +1 -1
  36. package/dist/umd/descope-outbound-apps.js +1 -1
  37. package/dist/umd/descope-outbound-apps.js.map +1 -1
  38. package/dist/umd/descope-third-party-app-logo-index-js.js +1 -1
  39. package/dist/umd/descope-third-party-app-logo-index-js.js.map +1 -1
  40. package/dist/umd/descope-timer-button.js +1 -1
  41. package/dist/umd/descope-timer-button.js.map +1 -1
  42. package/dist/umd/descope-timer.js +1 -1
  43. package/dist/umd/descope-timer.js.map +1 -1
  44. package/dist/umd/descope-tooltip.js +2 -0
  45. package/dist/umd/descope-tooltip.js.map +1 -0
  46. package/dist/umd/descope-trusted-devices.js +1 -1
  47. package/dist/umd/descope-trusted-devices.js.map +1 -1
  48. package/dist/umd/descope-upload-file-index-js.js +1 -1
  49. package/dist/umd/descope-upload-file-index-js.js.map +1 -1
  50. package/dist/umd/descope-user-attribute-index-js.js +3 -3
  51. package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
  52. package/dist/umd/descope-user-auth-method-index-js.js +1 -1
  53. package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
  54. package/dist/umd/index.js +1 -1
  55. package/dist/umd/index.js.map +1 -1
  56. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  57. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
  58. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  59. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
  60. package/package.json +29 -28
  61. package/src/helpers/componentHelpers.js +3 -0
  62. package/src/mixins/createStyleMixin/index.js +1 -1
  63. package/src/mixins/hoverableMixin.js +1 -1
  64. package/src/mixins/portalMixin.js +15 -7
  65. package/src/theme/components/index.js +2 -0
@@ -0,0 +1,82 @@
1
+ /*! For license information please see 6419.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[6419],{1508:(t,e,o)=>{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 s(t){const e=[];let o;return"slot"===t.localName?o=t.assignedElements():(e.push(t),o=[...t.children]),o.forEach(t=>e.push(...s(t))),e}function n(t,e){return e?e.closest(t)||n(t,e.getRootNode().host):null}function r(t){return t?new Set(t.split(" ")):new Set}function a(t){return t?[...t].join(" "):""}function l(t,e,o){const i=r(t.getAttribute(e));i.add(o),t.setAttribute(e,a(i))}function h(t,e,o){const i=r(t.getAttribute(e));i.delete(o),0!==i.size?t.setAttribute(e,a(i)):t.removeAttribute(e)}function d(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}o.d(e,{Dy:()=>i,J$:()=>s,Wr:()=>h,Z4:()=>r,ZA:()=>d,el:()=>n,iA:()=>l,sz:()=>a})},4080:(t,e,o)=>{o.d(e,{CI:()=>_,H8:()=>r,gm:()=>a,m0:()=>n,nr:()=>d,un:()=>h});const i=t=>t.test(navigator.userAgent),s=t=>t.test(navigator.platform),n=i(/Android/u),r=i(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),a=i(/Firefox/u),l=s(/^iPad/u)||s(/^Mac/u)&&navigator.maxTouchPoints>1,h=s(/^iPhone/u)||l,d=i(/^((?!chrome|android).)*safari/iu),_=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})()},11707:(t,e,o)=>{o.d(e,{I:()=>s});let i=0;function s(){return i++}},44099:(t,e,o)=>{o.d(e,{r:()=>r});var i=o(1508),s=o(65641),n=o(11707);class r extends EventTarget{static generateId(t,e){return`${e||"default"}-${t.localName}-${(0,n.I)()}`}constructor(t,e,o,i={}){super();const{initializer:s,multiple:n,observe:r,useUniqueId:a}=i;this.host=t,this.slotName=e,this.tagName=o,this.observe="boolean"!=typeof r||r,this.multiple="boolean"==typeof n&&n,this.slotInitializer=s,n&&(this.nodes=[]),a&&(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:o}=this;let i=this.defaultNode;return!i&&o&&(i=document.createElement(o),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}]`,o=this.host.shadowRoot.querySelector(e);this.__slotObserver=new s.P(o,({addedNodes:t,removedNodes:e})=>{const o=this.multiple?this.nodes:[this.node],s=t.filter(t=>!(0,i.ZA)(t)&&!o.includes(t));e.length&&(this.nodes=o.filter(t=>!e.includes(t)),e.forEach(t=>{this.teardownNode(t)})),s&&s.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...o,...s].filter(t=>t!==this.defaultNode),s.forEach(t=>{this.initAddedNode(t)})):(this.node&&this.node.remove(),this.node=s[0],this.initAddedNode(this.node)))})}}},65641:(t,e,o)=>{o.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 o=[],i=[];t.length&&(e=t.filter(t=>!this._storedNodes.includes(t))),this._storedNodes.length&&this._storedNodes.forEach((e,s)=>{const n=t.indexOf(e);-1===n?o.push(e):n!==s&&i.push(e)}),(e.length||o.length||i.length)&&this.callback({addedNodes:e,movedNodes:i,removedNodes:o}),this._storedNodes=t}}},71916:(t,e,o)=>{o(64511),o(3241),o(83315);var i=o(40211),s=o(87550);const n=s.AH`
3
+ :host {
4
+ --vaadin-tooltip-offset-top: var(--lumo-space-xs);
5
+ --vaadin-tooltip-offset-bottom: var(--lumo-space-xs);
6
+ --vaadin-tooltip-offset-start: var(--lumo-space-xs);
7
+ --vaadin-tooltip-offset-end: var(--lumo-space-xs);
8
+ }
9
+
10
+ [part='overlay'] {
11
+ background: var(--lumo-base-color) linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct));
12
+ color: var(--lumo-body-text-color);
13
+ font-size: var(--lumo-font-size-xs);
14
+ line-height: var(--lumo-line-height-s);
15
+ }
16
+
17
+ [part='content'] {
18
+ padding: var(--lumo-space-xs) var(--lumo-space-s);
19
+ }
20
+ `;(0,s.SF)("vaadin-tooltip-overlay",[i.L,n],{moduleId:"lumo-tooltip-overlay"});var r=o(13256),a=o(82901),l=o(23927),h=o(5072),d=o(24473),_=o(81481);const u=t=>class extends((0,_.t)((0,d.c)(t))){static get properties(){return{position:{type:String,reflectToAttribute:!0}}}requestContentUpdate(){if(super.requestContentUpdate(),this.toggleAttribute("hidden",""===this.textContent.trim()),this.positionTarget&&this.owner){const t=getComputedStyle(this.owner);["top","bottom","start","end"].forEach(e=>{this.style.setProperty(`--vaadin-tooltip-offset-${e}`,t.getPropertyValue(`--vaadin-tooltip-offset-${e}`))})}}_updatePosition(){if(super._updatePosition(),this.positionTarget){if("bottom"===this.position||"top"===this.position){const t=this.positionTarget.getBoundingClientRect(),e=this.$.overlay.getBoundingClientRect(),o=t.width/2-e.width/2;if(this.style.left){const t=e.left+o;t>0&&(this.style.left=`${t}px`)}if(this.style.right){const t=parseFloat(this.style.right)+o;t>0&&(this.style.right=`${t}px`)}}if("start"===this.position||"end"===this.position){const t=this.positionTarget.getBoundingClientRect(),e=this.$.overlay.getBoundingClientRect(),o=t.height/2-e.height/2;this.style.top=`${e.top+o}px`}}}},c=s.AH`
21
+ :host {
22
+ z-index: 1100;
23
+ }
24
+
25
+ [part='overlay'] {
26
+ max-width: 40ch;
27
+ }
28
+
29
+ :host([position^='top'][top-aligned]) [part='overlay'],
30
+ :host([position^='bottom'][top-aligned]) [part='overlay'] {
31
+ margin-top: var(--vaadin-tooltip-offset-top, 0);
32
+ }
33
+
34
+ :host([position^='top'][bottom-aligned]) [part='overlay'],
35
+ :host([position^='bottom'][bottom-aligned]) [part='overlay'] {
36
+ margin-bottom: var(--vaadin-tooltip-offset-bottom, 0);
37
+ }
38
+
39
+ :host([position^='start'][start-aligned]) [part='overlay'],
40
+ :host([position^='end'][start-aligned]) [part='overlay'] {
41
+ margin-inline-start: var(--vaadin-tooltip-offset-start, 0);
42
+ }
43
+
44
+ :host([position^='start'][end-aligned]) [part='overlay'],
45
+ :host([position^='end'][end-aligned]) [part='overlay'] {
46
+ margin-inline-end: var(--vaadin-tooltip-offset-end, 0);
47
+ }
48
+
49
+ @media (forced-colors: active) {
50
+ [part='overlay'] {
51
+ outline: 1px dashed;
52
+ }
53
+ }
54
+ `;(0,s.SF)("vaadin-tooltip-overlay",[h.B,c],{moduleId:"vaadin-tooltip-overlay-styles"});class p extends(u((0,l.v)((0,s.cp)(r.Pu)))){static get is(){return"vaadin-tooltip-overlay"}static get template(){return r.qy`
55
+ <div id="backdrop" part="backdrop" hidden></div>
56
+ <div part="overlay" id="overlay">
57
+ <div part="content" id="content"><slot></slot></div>
58
+ </div>
59
+ `}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this}}(0,a.X)(p);var v=o(55774),g=o(90676),m=o(75365),y=o(30025),f=o(62804),b=o(76685),C=o(1508),E=o(55341),w=o(44099),T=o(11707);const N=500;let O=N,S=N,A=N;const D=new Set;let x=!1,L=null,P=null;class I{constructor(t){this.host=t}get openedProp(){return this.host.manual?"opened":"_autoOpened"}get focusDelay(){const t=this.host;return null!=t.focusDelay&&t.focusDelay>0?t.focusDelay:O}get hoverDelay(){const t=this.host;return null!=t.hoverDelay&&t.hoverDelay>0?t.hoverDelay:S}get hideDelay(){const t=this.host;return null!=t.hideDelay&&t.hideDelay>0?t.hideDelay:A}get isClosing(){return D.has(this.host)}open(t={immediate:!1}){const{immediate:e,hover:o,focus:i}=t,s=o&&this.hoverDelay>0,n=i&&this.focusDelay>0;e||!s&&!n||this.__closeTimeout?this.__showTooltip():this.__warmupTooltip(n)}close(t){!t&&this.hideDelay>0?this.__scheduleClose():(this.__abortClose(),this._setOpened(!1)),this.__abortWarmUp(),x&&(this.__abortCooldown(),this.__scheduleCooldown())}_isOpened(){return this.host[this.openedProp]}_setOpened(t){this.host[this.openedProp]=t}__flushClosingTooltips(){D.forEach(t=>{t._stateController.close(!0),D.delete(t)})}__showTooltip(){this.__abortClose(),this.__flushClosingTooltips(),this._setOpened(!0),x=!0,this.__abortWarmUp(),this.__abortCooldown()}__warmupTooltip(t){this._isOpened()||(x?this.__showTooltip():this.__scheduleWarmUp(t))}__abortClose(){this.__closeTimeout&&(clearTimeout(this.__closeTimeout),this.__closeTimeout=null)}__abortCooldown(){P&&(clearTimeout(P),P=null)}__abortWarmUp(){L&&(clearTimeout(L),L=null)}__scheduleClose(){this._isOpened()&&(D.add(this.host),this.__closeTimeout=setTimeout(()=>{D.delete(this.host),this.__closeTimeout=null,this._setOpened(!1)},this.hideDelay))}__scheduleCooldown(){P=setTimeout(()=>{P=null,x=!1},this.hideDelay)}__scheduleWarmUp(t){const e=t?this.focusDelay:this.hoverDelay;L=setTimeout(()=>{L=null,x=!0,this.__showTooltip()},e)}}const M=t=>class extends((0,E.i)(t)){static get properties(){return{ariaTarget:{type:Object},context:{type:Object,value:()=>({})},focusDelay:{type:Number},for:{type:String,observer:"__forChanged"},generator:{type:Object},hideDelay:{type:Number},hoverDelay:{type:Number},manual:{type:Boolean,value:!1,sync:!0},opened:{type:Boolean,value:!1,sync:!0},position:{type:String},shouldShow:{type:Object,value:()=>(t,e)=>!0},target:{type:Object,observer:"__targetChanged"},text:{type:String,observer:"__textChanged"},_autoOpened:{type:Boolean,observer:"__autoOpenedChanged",sync:!0},_effectiveAriaTarget:{type:Object,computed:"__computeAriaTarget(ariaTarget, target)",observer:"__effectiveAriaTargetChanged"},__effectivePosition:{type:String,computed:"__computePosition(position, _position)"},__isTargetHidden:{type:Boolean,value:!1},_isConnected:{type:Boolean,sync:!0},_position:{type:String,value:"bottom"},_srLabel:{type:Object},_overlayContent:{type:String}}}static get observers(){return["__generatorChanged(_overlayElement, generator, context)","__updateSrLabelText(_srLabel, _overlayContent)"]}static setDefaultFocusDelay(t){O=null!=t&&t>=0?t:N}static setDefaultHideDelay(t){A=null!=t&&t>=0?t:N}static setDefaultHoverDelay(t){S=null!=t&&t>=0?t:N}constructor(){super(),this._uniqueId=`vaadin-tooltip-${(0,T.I)()}`,this._renderer=this.__tooltipRenderer.bind(this),this.__onFocusin=this.__onFocusin.bind(this),this.__onFocusout=this.__onFocusout.bind(this),this.__onMouseDown=this.__onMouseDown.bind(this),this.__onMouseEnter=this.__onMouseEnter.bind(this),this.__onMouseLeave=this.__onMouseLeave.bind(this),this.__onKeyDown=this.__onKeyDown.bind(this),this.__onOverlayOpen=this.__onOverlayOpen.bind(this),this.__targetVisibilityObserver=new IntersectionObserver(t=>{t.forEach(t=>this.__onTargetVisibilityChange(t.isIntersecting))},{threshold:0}),this._stateController=new I(this)}connectedCallback(){super.connectedCallback(),this._isConnected=!0,document.body.addEventListener("vaadin-overlay-open",this.__onOverlayOpen)}disconnectedCallback(){super.disconnectedCallback(),this._autoOpened&&this._stateController.close(!0),this._isConnected=!1,document.body.removeEventListener("vaadin-overlay-open",this.__onOverlayOpen)}ready(){super.ready(),this._srLabelController=new w.r(this,"sr-label","div",{initializer:t=>{t.id=this._uniqueId,t.setAttribute("role","tooltip"),this._srLabel=t}}),this.addController(this._srLabelController)}__computeHorizontalAlign(t){return["top-end","bottom-end","start-top","start","start-bottom"].includes(t)?"end":"start"}__computeNoHorizontalOverlap(t){return["start-top","start","start-bottom","end-top","end","end-bottom"].includes(t)}__computeNoVerticalOverlap(t){return["top-start","top-end","top","bottom-start","bottom","bottom-end"].includes(t)}__computeVerticalAlign(t){return["top-start","top-end","top","start-bottom","end-bottom"].includes(t)?"bottom":"top"}__computeOpened(t,e,o,i){return i&&(t?e:o)}__computePosition(t,e){return t||e}__autoOpenedChanged(t,e){t?document.addEventListener("keydown",this.__onKeyDown,!0):e&&document.removeEventListener("keydown",this.__onKeyDown,!0)}__forChanged(t){t&&(this.__setTargetByIdDebouncer=b.aq.debounce(this.__setTargetByIdDebouncer,f._3,()=>this.__setTargetById(t)))}__setTargetById(t){if(!this.isConnected)return;const e=this.getRootNode().getElementById(t);e?this.target=e:console.warn(`No element with id="${t}" found to show tooltip.`)}__targetChanged(t,e){e&&(e.removeEventListener("mouseenter",this.__onMouseEnter),e.removeEventListener("mouseleave",this.__onMouseLeave),e.removeEventListener("focusin",this.__onFocusin),e.removeEventListener("focusout",this.__onFocusout),e.removeEventListener("mousedown",this.__onMouseDown),this.__targetVisibilityObserver.unobserve(e)),t&&(t.addEventListener("mouseenter",this.__onMouseEnter),t.addEventListener("mouseleave",this.__onMouseLeave),t.addEventListener("focusin",this.__onFocusin),t.addEventListener("focusout",this.__onFocusout),t.addEventListener("mousedown",this.__onMouseDown),requestAnimationFrame(()=>{this.__targetVisibilityObserver.observe(t)}))}__onFocusin(t){this.manual||(0,y.aJ)()&&(this.target.contains(t.relatedTarget)||this.__isShouldShow()&&(this.__focusInside=!0,this.__isTargetHidden||this.__hoverInside&&this._autoOpened||this._stateController.open({focus:!0})))}__onFocusout(t){this.manual||this.target.contains(t.relatedTarget)||(this.__focusInside=!1,this.__hoverInside||this._stateController.close(!0))}__onKeyDown(t){"Escape"===t.key&&(t.stopPropagation(),this._stateController.close(!0))}__onMouseDown(){this._stateController.close(!0)}__onMouseEnter(){this.manual||this.__isShouldShow()&&(this.__hoverInside||(this.__hoverInside=!0,this.__isTargetHidden||this.__focusInside&&this._autoOpened||this._stateController.open({hover:!0})))}__onMouseLeave(t){t.relatedTarget!==this._overlayElement&&this.__handleMouseLeave()}__onOverlayMouseEnter(){this._stateController.isClosing&&this._stateController.open({immediate:!0})}__onOverlayMouseLeave(t){t.relatedTarget!==this.target&&this.__handleMouseLeave()}__handleMouseLeave(){this.manual||(this.__hoverInside=!1,this.__focusInside||this._stateController.close())}__onOverlayOpen(){this.manual||this._overlayElement.opened&&!this._overlayElement._last&&this._stateController.close(!0)}__onTargetVisibilityChange(t){const e=this.__isTargetHidden;this.__isTargetHidden=!t,e&&t&&(this.__focusInside||this.__hoverInside)?this._stateController.open({immediate:!0}):!t&&this._autoOpened&&this._stateController.close(!0)}__isShouldShow(){return"function"!=typeof this.shouldShow||!0===this.shouldShow(this.target,this.context)}__textChanged(t,e){this._overlayElement&&(t||e)&&this._overlayElement.requestContentUpdate()}__tooltipRenderer(t){t.textContent="function"==typeof this.generator?this.generator(this.context):this.text,this._overlayContent=t.textContent}__computeAriaTarget(t,e){return(Array.isArray(t)?t.some(t=>t&&t.nodeType===Node.ELEMENT_NODE):t)?t:e}__effectiveAriaTargetChanged(t,e){e&&[e].flat().forEach(t=>{(0,C.Wr)(t,"aria-describedby",this._uniqueId)}),t&&[t].flat().forEach(t=>{(0,C.iA)(t,"aria-describedby",this._uniqueId)})}__generatorChanged(t,e,o){t&&(e===this.__oldTextGenerator&&o===this.__oldContext||t.requestContentUpdate(),this.__oldTextGenerator=e,this.__oldContext=o)}__updateSrLabelText(t,e){t&&(t.textContent=e)}};class H extends(M((0,m._)((0,g.q)((0,v.w)(r.Pu))))){static get is(){return"vaadin-tooltip"}static get template(){return r.qy`
60
+ <style>
61
+ :host {
62
+ display: none;
63
+ }
64
+ </style>
65
+ <vaadin-tooltip-overlay
66
+ renderer="[[_renderer]]"
67
+ theme$="[[_theme]]"
68
+ opened="[[__computeOpened(manual, opened, _autoOpened, _isConnected)]]"
69
+ position-target="[[target]]"
70
+ position="[[__effectivePosition]]"
71
+ no-horizontal-overlap$="[[__computeNoHorizontalOverlap(__effectivePosition)]]"
72
+ no-vertical-overlap$="[[__computeNoVerticalOverlap(__effectivePosition)]]"
73
+ horizontal-align="[[__computeHorizontalAlign(__effectivePosition)]]"
74
+ vertical-align="[[__computeVerticalAlign(__effectivePosition)]]"
75
+ on-mouseenter="__onOverlayMouseEnter"
76
+ on-mouseleave="__onOverlayMouseLeave"
77
+ modeless
78
+ ></vaadin-tooltip-overlay>
79
+
80
+ <slot name="sr-label"></slot>
81
+ `}}(0,a.X)(H)},81481:(t,e,o)=>{o.d(e,{t:()=>a});var i=o(1508);const s={start:"top",end:"bottom"},n={start:"left",end:"right"},r=new ResizeObserver(t=>{setTimeout(()=>{t.forEach(t=>{t.target.__overlay&&t.target.__overlay._updatePosition()})})}),a=t=>class extends t{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=(0,i.Dy)(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(t=>{t.addEventListener("scroll",this.__onScroll,!0)})}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(t=>{t.removeEventListener("scroll",this.__onScroll,!0)}),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,r.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,r.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(e=>{this.__margins[e]=parseInt(t[e],10)})),this.setAttribute("dir",t.direction),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition())}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){t.target instanceof Node&&this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened)return;const t=this.positionTarget.getBoundingClientRect();if(0===t.width&&0===t.height&&this.opened)return void(this.opened=!1);const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const o=this.__isRTL,i=this.__shouldAlignStartHorizontally(t,o),r=!o&&i||o&&!i;this.style.alignItems=r?"flex-start":"flex-end";const a=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(t,a,this.noVerticalOverlap,s,this,e),h=this.__calculatePositionInOneDimension(t,a,this.noHorizontalOverlap,n,this,i);Object.assign(this.style,l,h),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!r),this.toggleAttribute("start-aligned",r)}__shouldAlignStartHorizontally(t,e){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const i=Math.min(window.innerWidth,document.documentElement.clientWidth),s=!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign;return this.__shouldAlignStart(t,o,i,this.__margins,s,this.noHorizontalOverlap,n)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),i="top"===this.verticalAlign;return this.__shouldAlignStart(t,e,o,this.__margins,i,this.noVerticalOverlap,s)}__shouldAlignStart(t,e,o,i,s,n,r){const a=o-t[n?r.end:r.start]-i[r.end],l=t[n?r.start:r.end]-i[r.start],h=s?a:l;return s===(h>(s?l:a)||h>e)}__adjustBottomProperty(t,e,o){let i;if(t===e.end){if(e.end===s.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);o>t&&this.__oldViewportHeight&&(i=o-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===n.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);o>t&&this.__oldViewportWidth&&(i=o-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return i}__calculatePositionInOneDimension(t,e,o,i,s,n){const r=n?i.start:i.end,a=n?i.end:i.start,l=parseFloat(s.style[r]||getComputedStyle(s)[r]),h=this.__adjustBottomProperty(r,i,l),d=e[n?i.start:i.end]-t[o===n?i.end:i.start],_=h?`${h}px`:`${l+d*(n?-1:1)}px`;return{[r]:_,[a]:""}}}}}]);
82
+ //# sourceMappingURL=6419.js.map
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 2023 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+
7
+ /**
8
+ * @license
9
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
10
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
11
+ */
12
+
13
+ /**
14
+ * @license
15
+ * Copyright (c) 2022 - 2023 Vaadin Ltd.
16
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
17
+ */
18
+
19
+ /**
20
+ * @license
21
+ * Copyright (c) 2023 Vaadin Ltd.
22
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
23
+ */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"6419.js","mappings":";wIAgBO,SAASA,EAAqBC,GACnC,MAAMC,EAAS,GAEf,KAAOD,GAAM,CACX,GAAIA,EAAKE,WAAaC,KAAKC,cAAe,CACxCH,EAAOI,KAAKL,GACZ,KACF,CAEIA,EAAKE,WAAaC,KAAKG,uBAOzBN,EADEA,EAAKO,aACAP,EAAKO,aAIPP,EAAKQ,YAVVP,EAAOI,KAAKL,GACZA,EAAOA,EAAKS,KAUhB,CAEA,OAAOR,CACT,CAUO,SAASS,EAAqBV,GACnC,MAAMC,EAAS,GACf,IAAIU,EAQJ,MAPuB,SAAnBX,EAAKY,UACPD,EAAWX,EAAKa,oBAEhBZ,EAAOI,KAAKL,GACZW,EAAW,IAAIX,EAAKc,WAEtBH,EAASI,QAASC,GAASf,EAAOI,QAAQK,EAAqBM,KACxDf,CACT,CAUO,SAASgB,EAAkBC,EAAUlB,GAC1C,OAAKA,EAIEA,EAAKmB,QAAQD,IAAaD,EAAkBC,EAAUlB,EAAKoB,cAAcX,MAHvE,IAIX,CAQO,SAASY,EAA0BC,GACxC,OAAKA,EAIE,IAAIC,IAAID,EAAME,MAAM,MAHlB,IAAID,GAIf,CAQO,SAASE,EAAwBC,GACtC,OAAOA,EAAS,IAAIA,GAAQC,KAAK,KAAO,EAC1C,CASO,SAASC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,IAAI9B,OAAO+B,WAAYtT,SAASuT,gBAAgBC,aAEvEqB,EAAezB,GAAiBnS,KAAK+T,qBAEvCF,EAAeD,GADG5T,KAAK+T,mBAAqB5B,IAI9CnS,KAAK+T,mBAAqB5B,CAC5B,CACF,CAEA,OAAO0B,CACT,CAOA,iCAAAnC,CAAkC5M,EAAYE,EAAaqO,EAAWC,EAAW3P,EAASqQ,GACxF,MAAML,EAAmBK,EAAmBV,EAAU/D,MAAQ+D,EAAU9D,IAClEyE,EAAqBD,EAAmBV,EAAU9D,IAAM8D,EAAU/D,MAElEqE,EAAetO,WAAW3B,EAAQa,MAAMmP,IAAqBlP,iBAAiBd,GAASgQ,IACvFO,EAAgBlU,KAAK0T,uBAAuBC,EAAkBL,EAAWM,GAEzEO,EACJnP,EAAYgP,EAAmBV,EAAU/D,MAAQ+D,EAAU9D,KAC3D1K,EAAWuO,IAAcW,EAAmBV,EAAU9D,IAAM8D,EAAU/D,OAElE6E,EAAaF,EACf,GAAGA,MACH,GAAGN,EAAeO,GAAQH,GAAoB,EAAI,OAEtD,MAAO,CACL,CAACL,GAAmBS,EACpB,CAACH,GAAqB,GAE1B,E","sources":["webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/dom-utils.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/browser-utils.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/unique-id-utils.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/slot-controller.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/slot-observer.js","webpack://@descope/web-components-ui/../components/descope-tooltip/node_modules/@vaadin/tooltip/theme/lumo/vaadin-tooltip-styles.js","webpack://@descope/web-components-ui/../components/descope-tooltip/node_modules/@vaadin/tooltip/src/vaadin-tooltip-overlay-mixin.js","webpack://@descope/web-components-ui/../components/descope-tooltip/node_modules/@vaadin/tooltip/src/vaadin-tooltip-overlay-styles.js","webpack://@descope/web-components-ui/../components/descope-tooltip/node_modules/@vaadin/tooltip/src/vaadin-tooltip-overlay.js","webpack://@descope/web-components-ui/../components/descope-tooltip/node_modules/@vaadin/tooltip/src/vaadin-tooltip-mixin.js","webpack://@descope/web-components-ui/../components/descope-tooltip/node_modules/@vaadin/tooltip/src/vaadin-tooltip.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/overlay/src/vaadin-overlay-position-mixin.js"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Returns an array of ancestor root nodes for the given node.\n *\n * A root node is either a document node or a document fragment node (Shadow Root).\n * The array is collected by a bottom-up DOM traversing that starts with the given node\n * and involves both the light DOM and ancestor shadow DOM trees.\n *\n * @param {Node} node\n * @return {Node[]}\n */\nexport function getAncestorRootNodes(node) {\n const result = [];\n\n while (node) {\n if (node.nodeType === Node.DOCUMENT_NODE) {\n result.push(node);\n break;\n }\n\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n result.push(node);\n node = node.host;\n continue;\n }\n\n if (node.assignedSlot) {\n node = node.assignedSlot;\n continue;\n }\n\n node = node.parentNode;\n }\n\n return result;\n}\n\n/**\n * Returns the list of flattened elements for the given `node`.\n * This list consists of a node's children and, for any children that are\n * `<slot>` elements, the expanded flattened list of `assignedElements`.\n *\n * @param {Node} node\n * @return {Element[]}\n */\nexport function getFlattenedElements(node) {\n const result = [];\n let elements;\n if (node.localName === 'slot') {\n elements = node.assignedElements();\n } else {\n result.push(node);\n elements = [...node.children];\n }\n elements.forEach((elem) => result.push(...getFlattenedElements(elem)));\n return result;\n}\n\n/**\n * Traverses the given node and its parents, including those that are across\n * the shadow root boundaries, until it finds a node that matches the selector.\n *\n * @param {string} selector The CSS selector to match against\n * @param {Node} node The starting node for the traversal\n * @return {Node | null} The closest matching element, or null if no match is found\n */\nexport function getClosestElement(selector, node) {\n if (!node) {\n return null;\n }\n\n return node.closest(selector) || getClosestElement(selector, node.getRootNode().host);\n}\n\n/**\n * Takes a string with values separated by space and returns a set the values\n *\n * @param {string} value\n * @return {Set<string>}\n */\nexport function deserializeAttributeValue(value) {\n if (!value) {\n return new Set();\n }\n\n return new Set(value.split(' '));\n}\n\n/**\n * Takes a set of string values and returns a string with values separated by space\n *\n * @param {Set<string>} values\n * @return {string}\n */\nexport function serializeAttributeValue(values) {\n return values ? [...values].join(' ') : '';\n}\n\n/**\n * Adds a value to an attribute containing space-delimited values.\n *\n * @param {HTMLElement} element\n * @param {string} attr\n * @param {string} value\n */\nexport function addValueToAttribute(element, attr, value) {\n const values = deserializeAttributeValue(element.getAttribute(attr));\n values.add(value);\n element.setAttribute(attr, serializeAttributeValue(values));\n}\n\n/**\n * Removes a value from an attribute containing space-delimited values.\n * If the value is the last one, the whole attribute is removed.\n *\n * @param {HTMLElement} element\n * @param {string} attr\n * @param {string} value\n */\nexport function removeValueFromAttribute(element, attr, value) {\n const values = deserializeAttributeValue(element.getAttribute(attr));\n values.delete(value);\n if (values.size === 0) {\n element.removeAttribute(attr);\n return;\n }\n element.setAttribute(attr, serializeAttributeValue(values));\n}\n\n/**\n * Returns true if the given node is an empty text node, false otherwise.\n *\n * @param {Node} node\n * @return {boolean}\n */\nexport function isEmptyTextNode(node) {\n return node.nodeType === Node.TEXT_NODE && node.textContent.trim() === '';\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nconst testUserAgent = (regexp) => regexp.test(navigator.userAgent);\n\nconst testPlatform = (regexp) => regexp.test(navigator.platform);\n\nconst testVendor = (regexp) => regexp.test(navigator.vendor);\n\nexport const isAndroid = testUserAgent(/Android/u);\n\nexport const isChrome = testUserAgent(/Chrome/u) && testVendor(/Google Inc/u);\n\nexport const isFirefox = testUserAgent(/Firefox/u);\n\n// IPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\nexport const isIPad = testPlatform(/^iPad/u) || (testPlatform(/^Mac/u) && navigator.maxTouchPoints > 1);\n\nexport const isIPhone = testPlatform(/^iPhone/u);\n\nexport const isIOS = isIPhone || isIPad;\n\nexport const isSafari = testUserAgent(/^((?!chrome|android).)*safari/iu);\n\nexport const isTouch = (() => {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n})();\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nlet uniqueId = 0;\n\n/**\n * Resets the unique id counter.\n *\n * @return {void}\n */\nexport function resetUniqueId() {\n uniqueId = 0;\n}\n\n/**\n * Returns a unique integer id.\n *\n * @return {number}\n */\nexport function generateUniqueId() {\n // eslint-disable-next-line no-plusplus\n return uniqueId++;\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { isEmptyTextNode } from './dom-utils.js';\nimport { SlotObserver } from './slot-observer.js';\nimport { generateUniqueId } from './unique-id-utils.js';\n\n/**\n * A controller for providing content to slot element and observing changes.\n */\nexport class SlotController extends EventTarget {\n /**\n * Ensure that every instance has unique ID.\n *\n * @param {HTMLElement} host\n * @param {string} slotName\n * @return {string}\n * @protected\n */\n static generateId(host, slotName) {\n const prefix = slotName || 'default';\n return `${prefix}-${host.localName}-${generateUniqueId()}`;\n }\n\n constructor(host, slotName, tagName, config = {}) {\n super();\n\n const { initializer, multiple, observe, useUniqueId } = config;\n\n this.host = host;\n this.slotName = slotName;\n this.tagName = tagName;\n this.observe = typeof observe === 'boolean' ? observe : true;\n this.multiple = typeof multiple === 'boolean' ? multiple : false;\n this.slotInitializer = initializer;\n\n if (multiple) {\n this.nodes = [];\n }\n\n // Only generate the default ID if requested by the controller.\n if (useUniqueId) {\n this.defaultId = this.constructor.generateId(host, slotName);\n }\n }\n\n hostConnected() {\n if (!this.initialized) {\n if (this.multiple) {\n this.initMultiple();\n } else {\n this.initSingle();\n }\n\n if (this.observe) {\n this.observeSlot();\n }\n\n this.initialized = true;\n }\n }\n\n /** @protected */\n initSingle() {\n let node = this.getSlotChild();\n\n if (!node) {\n node = this.attachDefaultNode();\n this.initNode(node);\n } else {\n this.node = node;\n this.initAddedNode(node);\n }\n }\n\n /** @protected */\n initMultiple() {\n const children = this.getSlotChildren();\n\n if (children.length === 0) {\n const defaultNode = this.attachDefaultNode();\n if (defaultNode) {\n this.nodes = [defaultNode];\n this.initNode(defaultNode);\n }\n } else {\n this.nodes = children;\n children.forEach((node) => {\n this.initAddedNode(node);\n });\n }\n }\n\n /**\n * Create and attach default node using the provided tag name, if any.\n * @return {Node | undefined}\n * @protected\n */\n attachDefaultNode() {\n const { host, slotName, tagName } = this;\n\n // Check if the node was created previously and if so, reuse it.\n let node = this.defaultNode;\n\n // Tag name is optional, sometimes we don't init default content.\n if (!node && tagName) {\n node = document.createElement(tagName);\n if (node instanceof Element) {\n if (slotName !== '') {\n node.setAttribute('slot', slotName);\n }\n this.defaultNode = node;\n }\n }\n\n if (node) {\n this.node = node;\n host.appendChild(node);\n }\n\n return node;\n }\n\n /**\n * Return the list of nodes matching the slot managed by the controller.\n * @return {Node}\n */\n getSlotChildren() {\n const { slotName } = this;\n return Array.from(this.host.childNodes).filter((node) => {\n // Either an element (any slot) or a text node (only un-named slot).\n return (\n (node.nodeType === Node.ELEMENT_NODE && node.slot === slotName) ||\n (node.nodeType === Node.TEXT_NODE && node.textContent.trim() && slotName === '')\n );\n });\n }\n\n /**\n * Return a reference to the node managed by the controller.\n * @return {Node}\n */\n getSlotChild() {\n return this.getSlotChildren()[0];\n }\n\n /**\n * Run `slotInitializer` for the node managed by the controller.\n *\n * @param {Node} node\n * @protected\n */\n initNode(node) {\n const { slotInitializer } = this;\n // Don't try to bind `this` to initializer (normally it's arrow function).\n // Instead, pass the host as a first argument to access component's state.\n if (slotInitializer) {\n slotInitializer(node, this.host);\n }\n }\n\n /**\n * Override to initialize the newly added custom node.\n *\n * @param {Node} _node\n * @protected\n */\n initCustomNode(_node) {}\n\n /**\n * Override to teardown slotted node when it's removed.\n *\n * @param {Node} _node\n * @protected\n */\n teardownNode(_node) {}\n\n /**\n * Run both `initCustomNode` and `initNode` for a custom slotted node.\n *\n * @param {Node} node\n * @protected\n */\n initAddedNode(node) {\n if (node !== this.defaultNode) {\n this.initCustomNode(node);\n this.initNode(node);\n }\n }\n\n /**\n * Setup the observer to manage slot content changes.\n * @protected\n */\n observeSlot() {\n const { slotName } = this;\n const selector = slotName === '' ? 'slot:not([name])' : `slot[name=${slotName}]`;\n const slot = this.host.shadowRoot.querySelector(selector);\n\n this.__slotObserver = new SlotObserver(slot, ({ addedNodes, removedNodes }) => {\n const current = this.multiple ? this.nodes : [this.node];\n\n // Calling `slot.assignedNodes()` includes whitespace text nodes in case of default slot:\n // unlike comment nodes, they are not filtered out. So we need to manually ignore them.\n const newNodes = addedNodes.filter((node) => !isEmptyTextNode(node) && !current.includes(node));\n\n if (removedNodes.length) {\n this.nodes = current.filter((node) => !removedNodes.includes(node));\n\n removedNodes.forEach((node) => {\n this.teardownNode(node);\n });\n }\n\n if (newNodes && newNodes.length > 0) {\n if (this.multiple) {\n // Remove default node if exists\n if (this.defaultNode) {\n this.defaultNode.remove();\n }\n this.nodes = [...current, ...newNodes].filter((node) => node !== this.defaultNode);\n newNodes.forEach((node) => {\n this.initAddedNode(node);\n });\n } else {\n // Remove previous node if exists\n if (this.node) {\n this.node.remove();\n }\n this.node = newNodes[0];\n this.initAddedNode(this.node);\n }\n }\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * A helper for observing slot changes.\n */\nexport class SlotObserver {\n constructor(slot, callback) {\n /** @type HTMLSlotElement */\n this.slot = slot;\n\n /** @type Function */\n this.callback = callback;\n\n /** @type {Node[]} */\n this._storedNodes = [];\n\n this._connected = false;\n this._scheduled = false;\n\n this._boundSchedule = () => {\n this._schedule();\n };\n\n this.connect();\n this._schedule();\n }\n\n /**\n * Activates an observer. This method is automatically called when\n * a `SlotObserver` is created. It should only be called to re-activate\n * an observer that has been deactivated via the `disconnect` method.\n */\n connect() {\n this.slot.addEventListener('slotchange', this._boundSchedule);\n this._connected = true;\n }\n\n /**\n * Deactivates the observer. After calling this method the observer callback\n * will not be called when changes to slotted nodes occur. The `connect` method\n * may be subsequently called to reactivate the observer.\n */\n disconnect() {\n this.slot.removeEventListener('slotchange', this._boundSchedule);\n this._connected = false;\n }\n\n /** @private */\n _schedule() {\n if (!this._scheduled) {\n this._scheduled = true;\n\n queueMicrotask(() => {\n this.flush();\n });\n }\n }\n\n /**\n * Run the observer callback synchronously.\n */\n flush() {\n if (!this._connected) {\n return;\n }\n\n this._scheduled = false;\n\n this._processNodes();\n }\n\n /** @private */\n _processNodes() {\n const currentNodes = this.slot.assignedNodes({ flatten: true });\n\n let addedNodes = [];\n const removedNodes = [];\n const movedNodes = [];\n\n if (currentNodes.length) {\n addedNodes = currentNodes.filter((node) => !this._storedNodes.includes(node));\n }\n\n if (this._storedNodes.length) {\n this._storedNodes.forEach((node, index) => {\n const idx = currentNodes.indexOf(node);\n if (idx === -1) {\n removedNodes.push(node);\n } else if (idx !== index) {\n movedNodes.push(node);\n }\n });\n }\n\n if (addedNodes.length || removedNodes.length || movedNodes.length) {\n this.callback({ addedNodes, movedNodes, removedNodes });\n }\n\n this._storedNodes = currentNodes;\n }\n}\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { overlay } from '@vaadin/vaadin-lumo-styles/mixins/overlay.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst tooltipOverlay = css`\n :host {\n --vaadin-tooltip-offset-top: var(--lumo-space-xs);\n --vaadin-tooltip-offset-bottom: var(--lumo-space-xs);\n --vaadin-tooltip-offset-start: var(--lumo-space-xs);\n --vaadin-tooltip-offset-end: var(--lumo-space-xs);\n }\n\n [part='overlay'] {\n background: var(--lumo-base-color) linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct));\n color: var(--lumo-body-text-color);\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-s);\n }\n\n [part='content'] {\n padding: var(--lumo-space-xs) var(--lumo-space-s);\n }\n`;\n\nregisterStyles('vaadin-tooltip-overlay', [overlay, tooltipOverlay], { moduleId: 'lumo-tooltip-overlay' });\n","/**\n * @license\n * Copyright (c) 2022 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';\nimport { PositionMixin } from '@vaadin/overlay/src/vaadin-overlay-position-mixin.js';\n\n/**\n * A mixin providing common tooltip overlay functionality.\n *\n * @polymerMixin\n * @mixes PositionMixin\n * @mixes OverlayMixin\n */\nexport const TooltipOverlayMixin = (superClass) =>\n class TooltipOverlayMixinClass extends PositionMixin(OverlayMixin(superClass)) {\n static get properties() {\n return {\n position: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n requestContentUpdate() {\n super.requestContentUpdate();\n\n this.toggleAttribute('hidden', this.textContent.trim() === '');\n\n // Copy custom properties from the tooltip\n if (this.positionTarget && this.owner) {\n const style = getComputedStyle(this.owner);\n ['top', 'bottom', 'start', 'end'].forEach((prop) => {\n this.style.setProperty(\n `--vaadin-tooltip-offset-${prop}`,\n style.getPropertyValue(`--vaadin-tooltip-offset-${prop}`),\n );\n });\n }\n }\n\n /**\n * @protected\n * @override\n */\n _updatePosition() {\n super._updatePosition();\n\n if (!this.positionTarget) {\n return;\n }\n\n // Center the tooltip overlay horizontally\n if (this.position === 'bottom' || this.position === 'top') {\n const targetRect = this.positionTarget.getBoundingClientRect();\n const overlayRect = this.$.overlay.getBoundingClientRect();\n\n const offset = targetRect.width / 2 - overlayRect.width / 2;\n\n if (this.style.left) {\n const left = overlayRect.left + offset;\n if (left > 0) {\n this.style.left = `${left}px`;\n }\n }\n\n if (this.style.right) {\n const right = parseFloat(this.style.right) + offset;\n if (right > 0) {\n this.style.right = `${right}px`;\n }\n }\n }\n\n // Center the tooltip overlay vertically\n if (this.position === 'start' || this.position === 'end') {\n const targetRect = this.positionTarget.getBoundingClientRect();\n const overlayRect = this.$.overlay.getBoundingClientRect();\n\n const offset = targetRect.height / 2 - overlayRect.height / 2;\n this.style.top = `${overlayRect.top + offset}px`;\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2022 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nexport const tooltipOverlayStyles = css`\n :host {\n z-index: 1100;\n }\n\n [part='overlay'] {\n max-width: 40ch;\n }\n\n :host([position^='top'][top-aligned]) [part='overlay'],\n :host([position^='bottom'][top-aligned]) [part='overlay'] {\n margin-top: var(--vaadin-tooltip-offset-top, 0);\n }\n\n :host([position^='top'][bottom-aligned]) [part='overlay'],\n :host([position^='bottom'][bottom-aligned]) [part='overlay'] {\n margin-bottom: var(--vaadin-tooltip-offset-bottom, 0);\n }\n\n :host([position^='start'][start-aligned]) [part='overlay'],\n :host([position^='end'][start-aligned]) [part='overlay'] {\n margin-inline-start: var(--vaadin-tooltip-offset-start, 0);\n }\n\n :host([position^='start'][end-aligned]) [part='overlay'],\n :host([position^='end'][end-aligned]) [part='overlay'] {\n margin-inline-end: var(--vaadin-tooltip-offset-end, 0);\n }\n\n @media (forced-colors: active) {\n [part='overlay'] {\n outline: 1px dashed;\n }\n }\n`;\n","/**\n * @license\n * Copyright (c) 2022 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';\nimport { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { TooltipOverlayMixin } from './vaadin-tooltip-overlay-mixin.js';\nimport { tooltipOverlayStyles } from './vaadin-tooltip-overlay-styles.js';\n\nregisterStyles('vaadin-tooltip-overlay', [overlayStyles, tooltipOverlayStyles], {\n moduleId: 'vaadin-tooltip-overlay-styles',\n});\n\n/**\n * An element used internally by `<vaadin-tooltip>`. Not intended to be used separately.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes DirMixin\n * @mixes ThemableMixin\n * @mixes TooltipOverlayMixin\n * @private\n */\nclass TooltipOverlay extends TooltipOverlayMixin(DirMixin(ThemableMixin(PolymerElement))) {\n static get is() {\n return 'vaadin-tooltip-overlay';\n }\n\n static get template() {\n return html`\n <div id=\"backdrop\" part=\"backdrop\" hidden></div>\n <div part=\"overlay\" id=\"overlay\">\n <div part=\"content\" id=\"content\"><slot></slot></div>\n </div>\n `;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n // When setting `manual` and `opened` attributes, the overlay is already moved to body\n // by the time when `ready()` callback of the `vaadin-tooltip` is executed by Polymer,\n // so querySelector() would return null. So we use this workaround to set properties.\n this.owner = this.__dataHost;\n this.owner._overlayElement = this;\n }\n}\n\ndefineCustomElement(TooltipOverlay);\n","/**\n * @license\n * Copyright (c) 2022 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';\nimport { microTask } from '@vaadin/component-base/src/async.js';\nimport { Debouncer } from '@vaadin/component-base/src/debounce.js';\nimport { addValueToAttribute, removeValueFromAttribute } from '@vaadin/component-base/src/dom-utils.js';\nimport { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js';\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\nimport { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';\n\nconst DEFAULT_DELAY = 500;\n\nlet defaultFocusDelay = DEFAULT_DELAY;\nlet defaultHoverDelay = DEFAULT_DELAY;\nlet defaultHideDelay = DEFAULT_DELAY;\n\nconst closing = new Set();\n\nlet warmedUp = false;\nlet warmUpTimeout = null;\nlet cooldownTimeout = null;\n\n/**\n * Resets the global tooltip warmup and cooldown state.\n * Only for internal use in tests.\n * @private\n */\nexport function resetGlobalTooltipState() {\n warmedUp = false;\n clearTimeout(warmUpTimeout);\n clearTimeout(cooldownTimeout);\n closing.clear();\n}\n\n/**\n * Controller for handling tooltip opened state.\n */\nclass TooltipStateController {\n constructor(host) {\n this.host = host;\n }\n\n /** @private */\n get openedProp() {\n return this.host.manual ? 'opened' : '_autoOpened';\n }\n\n /** @private */\n get focusDelay() {\n const tooltip = this.host;\n return tooltip.focusDelay != null && tooltip.focusDelay > 0 ? tooltip.focusDelay : defaultFocusDelay;\n }\n\n /** @private */\n get hoverDelay() {\n const tooltip = this.host;\n return tooltip.hoverDelay != null && tooltip.hoverDelay > 0 ? tooltip.hoverDelay : defaultHoverDelay;\n }\n\n /** @private */\n get hideDelay() {\n const tooltip = this.host;\n return tooltip.hideDelay != null && tooltip.hideDelay > 0 ? tooltip.hideDelay : defaultHideDelay;\n }\n\n /**\n * Whether closing is currently in progress.\n * @return {boolean}\n */\n get isClosing() {\n return closing.has(this.host);\n }\n\n /**\n * Schedule opening the tooltip.\n * @param {Object} options\n */\n open(options = { immediate: false }) {\n const { immediate, hover, focus } = options;\n const isHover = hover && this.hoverDelay > 0;\n const isFocus = focus && this.focusDelay > 0;\n\n if (!immediate && (isHover || isFocus) && !this.__closeTimeout) {\n this.__warmupTooltip(isFocus);\n } else {\n this.__showTooltip();\n }\n }\n\n /**\n * Schedule closing the tooltip.\n * @param {boolean} immediate\n */\n close(immediate) {\n if (!immediate && this.hideDelay > 0) {\n this.__scheduleClose();\n } else {\n this.__abortClose();\n this._setOpened(false);\n }\n\n this.__abortWarmUp();\n\n if (warmedUp) {\n // Re-start cooldown timer on each tooltip closing.\n this.__abortCooldown();\n this.__scheduleCooldown();\n }\n }\n\n /** @private */\n _isOpened() {\n return this.host[this.openedProp];\n }\n\n /** @private */\n _setOpened(opened) {\n this.host[this.openedProp] = opened;\n }\n\n /** @private */\n __flushClosingTooltips() {\n closing.forEach((tooltip) => {\n tooltip._stateController.close(true);\n closing.delete(tooltip);\n });\n }\n\n /** @private */\n __showTooltip() {\n this.__abortClose();\n this.__flushClosingTooltips();\n\n this._setOpened(true);\n warmedUp = true;\n\n // Abort previously scheduled timers.\n this.__abortWarmUp();\n this.__abortCooldown();\n }\n\n /** @private */\n __warmupTooltip(isFocus) {\n if (!this._isOpened()) {\n // First tooltip is opened, warm up.\n if (!warmedUp) {\n this.__scheduleWarmUp(isFocus);\n } else {\n // Warmed up, show another tooltip.\n this.__showTooltip();\n }\n }\n }\n\n /** @private */\n __abortClose() {\n if (this.__closeTimeout) {\n clearTimeout(this.__closeTimeout);\n this.__closeTimeout = null;\n }\n }\n\n /** @private */\n __abortCooldown() {\n if (cooldownTimeout) {\n clearTimeout(cooldownTimeout);\n cooldownTimeout = null;\n }\n }\n\n /** @private */\n __abortWarmUp() {\n if (warmUpTimeout) {\n clearTimeout(warmUpTimeout);\n warmUpTimeout = null;\n }\n }\n\n /** @private */\n __scheduleClose() {\n if (this._isOpened()) {\n closing.add(this.host);\n\n this.__closeTimeout = setTimeout(() => {\n closing.delete(this.host);\n this.__closeTimeout = null;\n this._setOpened(false);\n }, this.hideDelay);\n }\n }\n\n /** @private */\n __scheduleCooldown() {\n cooldownTimeout = setTimeout(() => {\n cooldownTimeout = null;\n warmedUp = false;\n }, this.hideDelay);\n }\n\n /** @private */\n __scheduleWarmUp(isFocus) {\n const delay = isFocus ? this.focusDelay : this.hoverDelay;\n warmUpTimeout = setTimeout(() => {\n warmUpTimeout = null;\n warmedUp = true;\n this.__showTooltip();\n }, delay);\n }\n}\n\n/**\n * A mixin providing common tooltip functionality.\n *\n * @polymerMixin\n * @mixes OverlayClassMixin\n */\nexport const TooltipMixin = (superClass) =>\n class TooltipMixinClass extends OverlayClassMixin(superClass) {\n static get properties() {\n return {\n /**\n * Element used to link with the `aria-describedby`\n * attribute. Supports array of multiple elements.\n * When not set, defaults to `target`.\n */\n ariaTarget: {\n type: Object,\n },\n\n /**\n * Object with properties passed to `generator` and\n * `shouldShow` functions for generating tooltip text\n * or detecting whether to show the tooltip or not.\n */\n context: {\n type: Object,\n value: () => {\n return {};\n },\n },\n\n /**\n * The delay in milliseconds before the tooltip\n * is opened on keyboard focus, when not in manual mode.\n * @attr {number} focus-delay\n */\n focusDelay: {\n type: Number,\n },\n\n /**\n * The id of the element used as a tooltip trigger.\n * The element should be in the DOM by the time when\n * the attribute is set, otherwise a warning is shown.\n */\n for: {\n type: String,\n observer: '__forChanged',\n },\n\n /**\n * Function used to generate the tooltip content.\n * When provided, it overrides the `text` property.\n * Use the `context` property to provide argument\n * that can be passed to the generator function.\n */\n generator: {\n type: Object,\n },\n\n /**\n * The delay in milliseconds before the tooltip\n * is closed on losing hover, when not in manual mode.\n * On blur, the tooltip is closed immediately.\n * @attr {number} hide-delay\n */\n hideDelay: {\n type: Number,\n },\n\n /**\n * The delay in milliseconds before the tooltip\n * is opened on hover, when not in manual mode.\n * @attr {number} hover-delay\n */\n hoverDelay: {\n type: Number,\n },\n\n /**\n * When true, the tooltip is controlled programmatically\n * instead of reacting to focus and mouse events.\n */\n manual: {\n type: Boolean,\n value: false,\n sync: true,\n },\n\n /**\n * When true, the tooltip is opened programmatically.\n * Only works if `manual` is set to `true`.\n */\n opened: {\n type: Boolean,\n value: false,\n sync: true,\n },\n\n /**\n * Position of the tooltip with respect to its target.\n * Supported values: `top-start`, `top`, `top-end`,\n * `bottom-start`, `bottom`, `bottom-end`, `start-top`,\n * `start`, `start-bottom`, `end-top`, `end`, `end-bottom`.\n */\n position: {\n type: String,\n },\n\n /**\n * Function used to detect whether to show the tooltip based on a condition,\n * called every time the tooltip is about to be shown on hover and focus.\n * The function takes two parameters: `target` and `context`, which contain\n * values of the corresponding tooltip properties at the time of calling.\n * The tooltip is only shown when the function invocation returns `true`.\n */\n shouldShow: {\n type: Object,\n value: () => {\n return (_target, _context) => true;\n },\n },\n\n /**\n * Reference to the element used as a tooltip trigger.\n * The target must be placed in the same shadow scope.\n * Defaults to an element referenced with `for`.\n */\n target: {\n type: Object,\n observer: '__targetChanged',\n },\n\n /**\n * String used as a tooltip content.\n */\n text: {\n type: String,\n observer: '__textChanged',\n },\n\n /**\n * Set to true when the overlay is opened using auto-added\n * event listeners: mouseenter and focusin (keyboard only).\n * @protected\n */\n _autoOpened: {\n type: Boolean,\n observer: '__autoOpenedChanged',\n sync: true,\n },\n\n /**\n * Element used to link with the `aria-describedby`\n * attribute. When not set, defaults to `target`.\n * @protected\n */\n _effectiveAriaTarget: {\n type: Object,\n computed: '__computeAriaTarget(ariaTarget, target)',\n observer: '__effectiveAriaTargetChanged',\n },\n\n /** @private */\n __effectivePosition: {\n type: String,\n computed: '__computePosition(position, _position)',\n },\n\n /** @private */\n __isTargetHidden: {\n type: Boolean,\n value: false,\n },\n\n /** @private */\n _isConnected: {\n type: Boolean,\n sync: true,\n },\n\n /**\n * Default value used when `position` property is not set.\n * @protected\n */\n _position: {\n type: String,\n value: 'bottom',\n },\n\n /** @private */\n _srLabel: {\n type: Object,\n },\n\n /** @private */\n _overlayContent: {\n type: String,\n },\n };\n }\n\n static get observers() {\n return [\n '__generatorChanged(_overlayElement, generator, context)',\n '__updateSrLabelText(_srLabel, _overlayContent)',\n ];\n }\n\n /**\n * Sets the default focus delay to be used by all tooltip instances,\n * except for those that have focus delay configured using property.\n *\n * @param {number} delay\n */\n static setDefaultFocusDelay(focusDelay) {\n defaultFocusDelay = focusDelay != null && focusDelay >= 0 ? focusDelay : DEFAULT_DELAY;\n }\n\n /**\n * Sets the default hide delay to be used by all tooltip instances,\n * except for those that have hide delay configured using property.\n *\n * @param {number} hideDelay\n */\n static setDefaultHideDelay(hideDelay) {\n defaultHideDelay = hideDelay != null && hideDelay >= 0 ? hideDelay : DEFAULT_DELAY;\n }\n\n /**\n * Sets the default hover delay to be used by all tooltip instances,\n * except for those that have hover delay configured using property.\n *\n * @param {number} delay\n */\n static setDefaultHoverDelay(hoverDelay) {\n defaultHoverDelay = hoverDelay != null && hoverDelay >= 0 ? hoverDelay : DEFAULT_DELAY;\n }\n\n constructor() {\n super();\n\n this._uniqueId = `vaadin-tooltip-${generateUniqueId()}`;\n this._renderer = this.__tooltipRenderer.bind(this);\n\n this.__onFocusin = this.__onFocusin.bind(this);\n this.__onFocusout = this.__onFocusout.bind(this);\n this.__onMouseDown = this.__onMouseDown.bind(this);\n this.__onMouseEnter = this.__onMouseEnter.bind(this);\n this.__onMouseLeave = this.__onMouseLeave.bind(this);\n this.__onKeyDown = this.__onKeyDown.bind(this);\n this.__onOverlayOpen = this.__onOverlayOpen.bind(this);\n\n this.__targetVisibilityObserver = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => this.__onTargetVisibilityChange(entry.isIntersecting));\n },\n { threshold: 0 },\n );\n\n this._stateController = new TooltipStateController(this);\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n this._isConnected = true;\n\n document.body.addEventListener('vaadin-overlay-open', this.__onOverlayOpen);\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n if (this._autoOpened) {\n this._stateController.close(true);\n }\n this._isConnected = false;\n\n document.body.removeEventListener('vaadin-overlay-open', this.__onOverlayOpen);\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._srLabelController = new SlotController(this, 'sr-label', 'div', {\n initializer: (element) => {\n element.id = this._uniqueId;\n element.setAttribute('role', 'tooltip');\n this._srLabel = element;\n },\n });\n this.addController(this._srLabelController);\n }\n\n /** @private */\n __computeHorizontalAlign(position) {\n return ['top-end', 'bottom-end', 'start-top', 'start', 'start-bottom'].includes(position) ? 'end' : 'start';\n }\n\n /** @private */\n __computeNoHorizontalOverlap(position) {\n return ['start-top', 'start', 'start-bottom', 'end-top', 'end', 'end-bottom'].includes(position);\n }\n\n /** @private */\n __computeNoVerticalOverlap(position) {\n return ['top-start', 'top-end', 'top', 'bottom-start', 'bottom', 'bottom-end'].includes(position);\n }\n\n /** @private */\n __computeVerticalAlign(position) {\n return ['top-start', 'top-end', 'top', 'start-bottom', 'end-bottom'].includes(position) ? 'bottom' : 'top';\n }\n\n /** @private */\n __computeOpened(manual, opened, autoOpened, connected) {\n return connected && (manual ? opened : autoOpened);\n }\n\n /** @private */\n __computePosition(position, defaultPosition) {\n return position || defaultPosition;\n }\n\n /** @private */\n __autoOpenedChanged(opened, oldOpened) {\n if (opened) {\n document.addEventListener('keydown', this.__onKeyDown, true);\n } else if (oldOpened) {\n document.removeEventListener('keydown', this.__onKeyDown, true);\n }\n }\n\n /** @private */\n __forChanged(forId) {\n if (forId) {\n this.__setTargetByIdDebouncer = Debouncer.debounce(this.__setTargetByIdDebouncer, microTask, () =>\n this.__setTargetById(forId),\n );\n }\n }\n\n /** @private */\n __setTargetById(targetId) {\n if (!this.isConnected) {\n return;\n }\n\n const target = this.getRootNode().getElementById(targetId);\n\n if (target) {\n this.target = target;\n } else {\n console.warn(`No element with id=\"${targetId}\" found to show tooltip.`);\n }\n }\n\n /** @private */\n __targetChanged(target, oldTarget) {\n if (oldTarget) {\n oldTarget.removeEventListener('mouseenter', this.__onMouseEnter);\n oldTarget.removeEventListener('mouseleave', this.__onMouseLeave);\n oldTarget.removeEventListener('focusin', this.__onFocusin);\n oldTarget.removeEventListener('focusout', this.__onFocusout);\n oldTarget.removeEventListener('mousedown', this.__onMouseDown);\n\n this.__targetVisibilityObserver.unobserve(oldTarget);\n }\n\n if (target) {\n target.addEventListener('mouseenter', this.__onMouseEnter);\n target.addEventListener('mouseleave', this.__onMouseLeave);\n target.addEventListener('focusin', this.__onFocusin);\n target.addEventListener('focusout', this.__onFocusout);\n target.addEventListener('mousedown', this.__onMouseDown);\n\n // Wait before observing to avoid Chrome issue.\n requestAnimationFrame(() => {\n this.__targetVisibilityObserver.observe(target);\n });\n }\n }\n\n /** @private */\n __onFocusin(event) {\n if (this.manual) {\n return;\n }\n\n // Only open on keyboard focus.\n if (!isKeyboardActive()) {\n return;\n }\n\n // Do not re-open while focused if closed on Esc or mousedown.\n if (this.target.contains(event.relatedTarget)) {\n return;\n }\n\n if (!this.__isShouldShow()) {\n return;\n }\n\n this.__focusInside = true;\n\n if (!this.__isTargetHidden && (!this.__hoverInside || !this._autoOpened)) {\n this._stateController.open({ focus: true });\n }\n }\n\n /** @private */\n __onFocusout(event) {\n if (this.manual) {\n return;\n }\n\n // Do not close when moving focus within a component.\n if (this.target.contains(event.relatedTarget)) {\n return;\n }\n\n this.__focusInside = false;\n\n if (!this.__hoverInside) {\n this._stateController.close(true);\n }\n }\n\n /** @private */\n __onKeyDown(event) {\n if (event.key === 'Escape') {\n event.stopPropagation();\n this._stateController.close(true);\n }\n }\n\n /** @private */\n __onMouseDown() {\n this._stateController.close(true);\n }\n\n /** @private */\n __onMouseEnter() {\n if (this.manual) {\n return;\n }\n\n if (!this.__isShouldShow()) {\n return;\n }\n\n if (this.__hoverInside) {\n // Already hovering inside the element, do nothing.\n return;\n }\n\n this.__hoverInside = true;\n\n if (!this.__isTargetHidden && (!this.__focusInside || !this._autoOpened)) {\n this._stateController.open({ hover: true });\n }\n }\n\n /** @private */\n __onMouseLeave(event) {\n if (event.relatedTarget !== this._overlayElement) {\n this.__handleMouseLeave();\n }\n }\n\n /** @protected */\n __onOverlayMouseEnter() {\n // Retain opened state when moving pointer over the overlay.\n // Closing can start due to an offset between the target and\n // the overlay itself. If that's the case, re-open overlay.\n // See https://github.com/vaadin/web-components/issues/6316\n if (this._stateController.isClosing) {\n this._stateController.open({ immediate: true });\n }\n }\n\n /** @protected */\n __onOverlayMouseLeave(event) {\n if (event.relatedTarget !== this.target) {\n this.__handleMouseLeave();\n }\n }\n\n /** @private */\n __handleMouseLeave() {\n if (this.manual) {\n return;\n }\n\n this.__hoverInside = false;\n\n if (!this.__focusInside) {\n this._stateController.close();\n }\n }\n\n /** @private */\n __onOverlayOpen() {\n if (this.manual) {\n return;\n }\n\n // Close tooltip if another overlay is opened on top of the tooltip's overlay\n if (this._overlayElement.opened && !this._overlayElement._last) {\n this._stateController.close(true);\n }\n }\n\n /** @private */\n __onTargetVisibilityChange(isVisible) {\n const oldHidden = this.__isTargetHidden;\n this.__isTargetHidden = !isVisible;\n\n // Open the overlay when the target becomes visible and has focus or hover.\n if (oldHidden && isVisible && (this.__focusInside || this.__hoverInside)) {\n this._stateController.open({ immediate: true });\n return;\n }\n\n // Close the overlay when the target is no longer fully visible.\n if (!isVisible && this._autoOpened) {\n this._stateController.close(true);\n }\n }\n\n /** @private */\n __isShouldShow() {\n if (typeof this.shouldShow === 'function' && this.shouldShow(this.target, this.context) !== true) {\n return false;\n }\n\n return true;\n }\n\n /** @private */\n __textChanged(text, oldText) {\n if (this._overlayElement && (text || oldText)) {\n this._overlayElement.requestContentUpdate();\n }\n }\n\n /** @private */\n __tooltipRenderer(root) {\n root.textContent = typeof this.generator === 'function' ? this.generator(this.context) : this.text;\n\n // Update the sr-only label text content\n this._overlayContent = root.textContent;\n }\n\n /** @private */\n __computeAriaTarget(ariaTarget, target) {\n const isElementNode = (el) => el && el.nodeType === Node.ELEMENT_NODE;\n const isAriaTargetSet = Array.isArray(ariaTarget) ? ariaTarget.some(isElementNode) : ariaTarget;\n return isAriaTargetSet ? ariaTarget : target;\n }\n\n /** @private */\n __effectiveAriaTargetChanged(ariaTarget, oldAriaTarget) {\n if (oldAriaTarget) {\n [oldAriaTarget].flat().forEach((target) => {\n removeValueFromAttribute(target, 'aria-describedby', this._uniqueId);\n });\n }\n\n if (ariaTarget) {\n [ariaTarget].flat().forEach((target) => {\n addValueToAttribute(target, 'aria-describedby', this._uniqueId);\n });\n }\n }\n\n /** @private */\n __generatorChanged(overlayElement, generator, context) {\n if (overlayElement) {\n if (generator !== this.__oldTextGenerator || context !== this.__oldContext) {\n overlayElement.requestContentUpdate();\n }\n\n this.__oldTextGenerator = generator;\n this.__oldContext = context;\n }\n }\n\n /** @private */\n __updateSrLabelText(srLabel, textContent) {\n if (srLabel) {\n srLabel.textContent = textContent;\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2022 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './vaadin-tooltip-overlay.js';\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';\nimport { TooltipMixin } from './vaadin-tooltip-mixin.js';\n\n/**\n * `<vaadin-tooltip>` is a Web Component for creating tooltips.\n *\n * ```html\n * <button id=\"confirm\">Confirm</button>\n * <vaadin-tooltip text=\"Click to save changes\" for=\"confirm\"></vaadin-tooltip>\n * ```\n *\n * ### Styling\n *\n * `<vaadin-tooltip>` uses `<vaadin-tooltip-overlay>` internal\n * themable component as the actual visible overlay.\n *\n * See [`<vaadin-overlay>`](#/elements/vaadin-overlay) documentation\n * for `<vaadin-tooltip-overlay>` parts.\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description\n * -----------------|----------------------------------------\n * `position` | Reflects the `position` property value.\n *\n * Note: the `theme` attribute value set on `<vaadin-tooltip>` is\n * propagated to the internal `<vaadin-tooltip-overlay>` component.\n *\n * ### Custom CSS Properties\n *\n * The following custom CSS properties are available on the `<vaadin-tooltip>` element:\n *\n * Custom CSS property | Description\n * ---------------------------------|-------------\n * `--vaadin-tooltip-offset-top` | Used as an offset when the tooltip is aligned vertically below the target\n * `--vaadin-tooltip-offset-bottom` | Used as an offset when the tooltip is aligned vertically above the target\n * `--vaadin-tooltip-offset-start` | Used as an offset when the tooltip is aligned horizontally after the target\n * `--vaadin-tooltip-offset-end` | Used as an offset when the tooltip is aligned horizontally before the target\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ControllerMixin\n * @mixes ElementMixin\n * @mixes ThemePropertyMixin\n * @mixes TooltipMixin\n */\nclass Tooltip extends TooltipMixin(ThemePropertyMixin(ElementMixin(ControllerMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-tooltip';\n }\n\n static get template() {\n return html`\n <style>\n :host {\n display: none;\n }\n </style>\n <vaadin-tooltip-overlay\n renderer=\"[[_renderer]]\"\n theme$=\"[[_theme]]\"\n opened=\"[[__computeOpened(manual, opened, _autoOpened, _isConnected)]]\"\n position-target=\"[[target]]\"\n position=\"[[__effectivePosition]]\"\n no-horizontal-overlap$=\"[[__computeNoHorizontalOverlap(__effectivePosition)]]\"\n no-vertical-overlap$=\"[[__computeNoVerticalOverlap(__effectivePosition)]]\"\n horizontal-align=\"[[__computeHorizontalAlign(__effectivePosition)]]\"\n vertical-align=\"[[__computeVerticalAlign(__effectivePosition)]]\"\n on-mouseenter=\"__onOverlayMouseEnter\"\n on-mouseleave=\"__onOverlayMouseLeave\"\n modeless\n ></vaadin-tooltip-overlay>\n\n <slot name=\"sr-label\"></slot>\n `;\n }\n}\n\ndefineCustomElement(Tooltip);\n\nexport { Tooltip };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { getAncestorRootNodes } from '@vaadin/component-base/src/dom-utils.js';\n\nconst PROP_NAMES_VERTICAL = {\n start: 'top',\n end: 'bottom',\n};\n\nconst PROP_NAMES_HORIZONTAL = {\n start: 'left',\n end: 'right',\n};\n\nconst targetResizeObserver = new ResizeObserver((entries) => {\n setTimeout(() => {\n entries.forEach((entry) => {\n if (entry.target.__overlay) {\n entry.target.__overlay._updatePosition();\n }\n });\n });\n});\n\n/**\n * @polymerMixin\n */\nexport const PositionMixin = (superClass) =>\n class PositionMixin extends superClass {\n static get properties() {\n return {\n /**\n * The element next to which this overlay should be aligned.\n * The position of the overlay relative to the positionTarget can be adjusted\n * with properties `horizontalAlign`, `verticalAlign`, `noHorizontalOverlap`\n * and `noVerticalOverlap`.\n */\n positionTarget: {\n type: Object,\n value: null,\n sync: true,\n },\n\n /**\n * When `positionTarget` is set, this property defines whether to align the overlay's\n * left or right side to the target element by default.\n * Possible values are `start` and `end`.\n * RTL is taken into account when interpreting the value.\n * The overlay is automatically flipped to the opposite side when it doesn't fit into\n * the default side defined by this property.\n *\n * @attr {start|end} horizontal-align\n */\n horizontalAlign: {\n type: String,\n value: 'start',\n sync: true,\n },\n\n /**\n * When `positionTarget` is set, this property defines whether to align the overlay's\n * top or bottom side to the target element by default.\n * Possible values are `top` and `bottom`.\n * The overlay is automatically flipped to the opposite side when it doesn't fit into\n * the default side defined by this property.\n *\n * @attr {top|bottom} vertical-align\n */\n verticalAlign: {\n type: String,\n value: 'top',\n sync: true,\n },\n\n /**\n * When `positionTarget` is set, this property defines whether the overlay should overlap\n * the target element in the x-axis, or be positioned right next to it.\n *\n * @attr {boolean} no-horizontal-overlap\n */\n noHorizontalOverlap: {\n type: Boolean,\n value: false,\n sync: true,\n },\n\n /**\n * When `positionTarget` is set, this property defines whether the overlay should overlap\n * the target element in the y-axis, or be positioned right above/below it.\n *\n * @attr {boolean} no-vertical-overlap\n */\n noVerticalOverlap: {\n type: Boolean,\n value: false,\n sync: true,\n },\n\n /**\n * If the overlay content has no intrinsic height, this property can be used to set\n * the minimum vertical space (in pixels) required by the overlay. Setting a value to\n * the property effectively disables the content measurement in favor of using this\n * fixed value for determining the open direction.\n *\n * @attr {number} required-vertical-space\n */\n requiredVerticalSpace: {\n type: Number,\n value: 0,\n sync: true,\n },\n };\n }\n\n static get observers() {\n return [\n '__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)',\n '__overlayOpenedChanged(opened, positionTarget)',\n ];\n }\n\n constructor() {\n super();\n\n this.__onScroll = this.__onScroll.bind(this);\n this._updatePosition = this._updatePosition.bind(this);\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n if (this.opened) {\n this.__addUpdatePositionEventListeners();\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.__removeUpdatePositionEventListeners();\n }\n\n /** @private */\n __addUpdatePositionEventListeners() {\n window.visualViewport.addEventListener('resize', this._updatePosition);\n window.visualViewport.addEventListener('scroll', this.__onScroll, true);\n\n this.__positionTargetAncestorRootNodes = getAncestorRootNodes(this.positionTarget);\n this.__positionTargetAncestorRootNodes.forEach((node) => {\n node.addEventListener('scroll', this.__onScroll, true);\n });\n }\n\n /** @private */\n __removeUpdatePositionEventListeners() {\n window.visualViewport.removeEventListener('resize', this._updatePosition);\n window.visualViewport.removeEventListener('scroll', this.__onScroll, true);\n\n if (this.__positionTargetAncestorRootNodes) {\n this.__positionTargetAncestorRootNodes.forEach((node) => {\n node.removeEventListener('scroll', this.__onScroll, true);\n });\n this.__positionTargetAncestorRootNodes = null;\n }\n }\n\n /** @private */\n __overlayOpenedChanged(opened, positionTarget) {\n this.__removeUpdatePositionEventListeners();\n\n if (positionTarget) {\n positionTarget.__overlay = null;\n targetResizeObserver.unobserve(positionTarget);\n\n if (opened) {\n this.__addUpdatePositionEventListeners();\n positionTarget.__overlay = this;\n targetResizeObserver.observe(positionTarget);\n }\n }\n\n if (opened) {\n const computedStyle = getComputedStyle(this);\n if (!this.__margins) {\n this.__margins = {};\n ['top', 'bottom', 'left', 'right'].forEach((propName) => {\n this.__margins[propName] = parseInt(computedStyle[propName], 10);\n });\n }\n this.setAttribute('dir', computedStyle.direction);\n\n this._updatePosition();\n // Schedule another position update (to cover virtual keyboard opening for example)\n requestAnimationFrame(() => this._updatePosition());\n }\n }\n\n __positionSettingsChanged() {\n this._updatePosition();\n }\n\n /** @private */\n __onScroll(e) {\n // If the scroll event occurred inside the overlay, ignore it.\n if (e.target instanceof Node && this.contains(e.target)) {\n return;\n }\n\n this._updatePosition();\n }\n\n _updatePosition() {\n if (!this.positionTarget || !this.opened) {\n return;\n }\n\n const targetRect = this.positionTarget.getBoundingClientRect();\n\n if (targetRect.width === 0 && targetRect.height === 0 && this.opened) {\n this.opened = false;\n return;\n }\n\n // Detect the desired alignment and update the layout accordingly\n const shouldAlignStartVertically = this.__shouldAlignStartVertically(targetRect);\n this.style.justifyContent = shouldAlignStartVertically ? 'flex-start' : 'flex-end';\n\n const isRTL = this.__isRTL;\n const shouldAlignStartHorizontally = this.__shouldAlignStartHorizontally(targetRect, isRTL);\n const flexStart = (!isRTL && shouldAlignStartHorizontally) || (isRTL && !shouldAlignStartHorizontally);\n this.style.alignItems = flexStart ? 'flex-start' : 'flex-end';\n\n // Get the overlay rect after possible overlay alignment changes\n const overlayRect = this.getBoundingClientRect();\n\n // Obtain vertical positioning properties\n const verticalProps = this.__calculatePositionInOneDimension(\n targetRect,\n overlayRect,\n this.noVerticalOverlap,\n PROP_NAMES_VERTICAL,\n this,\n shouldAlignStartVertically,\n );\n\n // Obtain horizontal positioning properties\n const horizontalProps = this.__calculatePositionInOneDimension(\n targetRect,\n overlayRect,\n this.noHorizontalOverlap,\n PROP_NAMES_HORIZONTAL,\n this,\n shouldAlignStartHorizontally,\n );\n\n // Apply the positioning properties to the overlay\n Object.assign(this.style, verticalProps, horizontalProps);\n\n this.toggleAttribute('bottom-aligned', !shouldAlignStartVertically);\n this.toggleAttribute('top-aligned', shouldAlignStartVertically);\n\n this.toggleAttribute('end-aligned', !flexStart);\n this.toggleAttribute('start-aligned', flexStart);\n }\n\n __shouldAlignStartHorizontally(targetRect, rtl) {\n // Using previous size to fix a case where window resize may cause the overlay to be squeezed\n // smaller than its current space before the fit-calculations.\n const contentWidth = Math.max(this.__oldContentWidth || 0, this.$.overlay.offsetWidth);\n this.__oldContentWidth = this.$.overlay.offsetWidth;\n\n const viewportWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);\n const defaultAlignLeft = (!rtl && this.horizontalAlign === 'start') || (rtl && this.horizontalAlign === 'end');\n\n return this.__shouldAlignStart(\n targetRect,\n contentWidth,\n viewportWidth,\n this.__margins,\n defaultAlignLeft,\n this.noHorizontalOverlap,\n PROP_NAMES_HORIZONTAL,\n );\n }\n\n __shouldAlignStartVertically(targetRect) {\n // Using previous size to fix a case where window resize may cause the overlay to be squeezed\n // smaller than its current space before the fit-calculations.\n const contentHeight =\n this.requiredVerticalSpace || Math.max(this.__oldContentHeight || 0, this.$.overlay.offsetHeight);\n this.__oldContentHeight = this.$.overlay.offsetHeight;\n\n const viewportHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);\n const defaultAlignTop = this.verticalAlign === 'top';\n\n return this.__shouldAlignStart(\n targetRect,\n contentHeight,\n viewportHeight,\n this.__margins,\n defaultAlignTop,\n this.noVerticalOverlap,\n PROP_NAMES_VERTICAL,\n );\n }\n\n // eslint-disable-next-line max-params\n __shouldAlignStart(targetRect, contentSize, viewportSize, margins, defaultAlignStart, noOverlap, propNames) {\n const spaceForStartAlignment =\n viewportSize - targetRect[noOverlap ? propNames.end : propNames.start] - margins[propNames.end];\n const spaceForEndAlignment = targetRect[noOverlap ? propNames.start : propNames.end] - margins[propNames.start];\n\n const spaceForDefaultAlignment = defaultAlignStart ? spaceForStartAlignment : spaceForEndAlignment;\n const spaceForOtherAlignment = defaultAlignStart ? spaceForEndAlignment : spaceForStartAlignment;\n\n const shouldGoToDefaultSide =\n spaceForDefaultAlignment > spaceForOtherAlignment || spaceForDefaultAlignment > contentSize;\n\n return defaultAlignStart === shouldGoToDefaultSide;\n }\n\n /**\n * Returns an adjusted value after resizing the browser window,\n * to avoid wrong calculations when e.g. previously set `bottom`\n * CSS property value is larger than the updated viewport height.\n * See https://github.com/vaadin/web-components/issues/4604\n */\n __adjustBottomProperty(cssPropNameToSet, propNames, currentValue) {\n let adjustedProp;\n\n if (cssPropNameToSet === propNames.end) {\n // Adjust horizontally\n if (propNames.end === PROP_NAMES_VERTICAL.end) {\n const viewportHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);\n\n if (currentValue > viewportHeight && this.__oldViewportHeight) {\n const heightDiff = this.__oldViewportHeight - viewportHeight;\n adjustedProp = currentValue - heightDiff;\n }\n\n this.__oldViewportHeight = viewportHeight;\n }\n\n // Adjust vertically\n if (propNames.end === PROP_NAMES_HORIZONTAL.end) {\n const viewportWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);\n\n if (currentValue > viewportWidth && this.__oldViewportWidth) {\n const widthDiff = this.__oldViewportWidth - viewportWidth;\n adjustedProp = currentValue - widthDiff;\n }\n\n this.__oldViewportWidth = viewportWidth;\n }\n }\n\n return adjustedProp;\n }\n\n /**\n * Returns an object with CSS position properties to set,\n * e.g. { top: \"100px\" }\n */\n // eslint-disable-next-line max-params\n __calculatePositionInOneDimension(targetRect, overlayRect, noOverlap, propNames, overlay, shouldAlignStart) {\n const cssPropNameToSet = shouldAlignStart ? propNames.start : propNames.end;\n const cssPropNameToClear = shouldAlignStart ? propNames.end : propNames.start;\n\n const currentValue = parseFloat(overlay.style[cssPropNameToSet] || getComputedStyle(overlay)[cssPropNameToSet]);\n const adjustedValue = this.__adjustBottomProperty(cssPropNameToSet, propNames, currentValue);\n\n const diff =\n overlayRect[shouldAlignStart ? propNames.start : propNames.end] -\n targetRect[noOverlap === shouldAlignStart ? propNames.end : propNames.start];\n\n const valueToSet = adjustedValue\n ? `${adjustedValue}px`\n : `${currentValue + diff * (shouldAlignStart ? -1 : 1)}px`;\n\n return {\n [cssPropNameToSet]: valueToSet,\n [cssPropNameToClear]: '',\n };\n }\n };\n"],"names":["getAncestorRootNodes","node","result","nodeType","Node","DOCUMENT_NODE","push","DOCUMENT_FRAGMENT_NODE","assignedSlot","parentNode","host","getFlattenedElements","elements","localName","assignedElements","children","forEach","elem","getClosestElement","selector","closest","getRootNode","deserializeAttributeValue","value","Set","split","serializeAttributeValue","values","join","addValueToAttribute","element","attr","getAttribute","add","setAttribute","removeValueFromAttribute","delete","size","removeAttribute","isEmptyTextNode","TEXT_NODE","textContent","trim","testUserAgent","regexp","test","navigator","userAgent","testPlatform","platform","isAndroid","isChrome","vendor","isFirefox","isIPad","maxTouchPoints","isIOS","isSafari","isTouch","document","createEvent","e","uniqueId","generateUniqueId","SlotController","EventTarget","generateId","slotName","constructor","tagName","config","super","initializer","multiple","observe","useUniqueId","this","slotInitializer","nodes","defaultId","hostConnected","initialized","initMultiple","initSingle","observeSlot","getSlotChild","initAddedNode","attachDefaultNode","initNode","getSlotChildren","length","defaultNode","createElement","Element","appendChild","Array","from","childNodes","filter","ELEMENT_NODE","slot","initCustomNode","_node","teardownNode","shadowRoot","querySelector","__slotObserver","addedNodes","removedNodes","current","newNodes","includes","remove","SlotObserver","callback","_storedNodes","_connected","_scheduled","_boundSchedule","_schedule","connect","addEventListener","disconnect","removeEventListener","queueMicrotask","flush","_processNodes","currentNodes","assignedNodes","flatten","movedNodes","index","idx","indexOf","tooltipOverlay","overlay","moduleId","TooltipOverlayMixin","superClass","properties","position","type","String","reflectToAttribute","requestContentUpdate","toggleAttribute","positionTarget","owner","style","getComputedStyle","prop","setProperty","getPropertyValue","_updatePosition","targetRect","getBoundingClientRect","overlayRect","$","offset","width","left","right","parseFloat","height","top","tooltipOverlayStyles","TooltipOverlay","is","template","ready","__dataHost","_overlayElement","DEFAULT_DELAY","defaultFocusDelay","defaultHoverDelay","defaultHideDelay","closing","warmedUp","warmUpTimeout","cooldownTimeout","TooltipStateController","openedProp","manual","focusDelay","tooltip","hoverDelay","hideDelay","isClosing","has","open","options","immediate","hover","focus","isHover","isFocus","__closeTimeout","__showTooltip","__warmupTooltip","close","__scheduleClose","__abortClose","_setOpened","__abortWarmUp","__abortCooldown","__scheduleCooldown","_isOpened","opened","__flushClosingTooltips","_stateController","__scheduleWarmUp","clearTimeout","setTimeout","delay","TooltipMixin","ariaTarget","Object","context","Number","for","observer","generator","Boolean","sync","shouldShow","_target","_context","target","text","_autoOpened","_effectiveAriaTarget","computed","__effectivePosition","__isTargetHidden","_isConnected","_position","_srLabel","_overlayContent","observers","setDefaultFocusDelay","setDefaultHideDelay","setDefaultHoverDelay","_uniqueId","_renderer","__tooltipRenderer","bind","__onFocusin","__onFocusout","__onMouseDown","__onMouseEnter","__onMouseLeave","__onKeyDown","__onOverlayOpen","__targetVisibilityObserver","IntersectionObserver","entries","entry","__onTargetVisibilityChange","isIntersecting","threshold","connectedCallback","body","disconnectedCallback","_srLabelController","id","addController","__computeHorizontalAlign","__computeNoHorizontalOverlap","__computeNoVerticalOverlap","__computeVerticalAlign","__computeOpened","autoOpened","connected","__computePosition","defaultPosition","__autoOpenedChanged","oldOpened","__forChanged","forId","__setTargetByIdDebouncer","debounce","__setTargetById","targetId","isConnected","getElementById","console","warn","__targetChanged","oldTarget","unobserve","requestAnimationFrame","event","contains","relatedTarget","__isShouldShow","__focusInside","__hoverInside","key","stopPropagation","__handleMouseLeave","__onOverlayMouseEnter","__onOverlayMouseLeave","_last","isVisible","oldHidden","__textChanged","oldText","root","__computeAriaTarget","isArray","some","el","__effectiveAriaTargetChanged","oldAriaTarget","flat","__generatorChanged","overlayElement","__oldTextGenerator","__oldContext","__updateSrLabelText","srLabel","Tooltip","PROP_NAMES_VERTICAL","start","end","PROP_NAMES_HORIZONTAL","targetResizeObserver","ResizeObserver","__overlay","PositionMixin","horizontalAlign","verticalAlign","noHorizontalOverlap","noVerticalOverlap","requiredVerticalSpace","__onScroll","__addUpdatePositionEventListeners","__removeUpdatePositionEventListeners","window","visualViewport","__positionTargetAncestorRootNodes","__overlayOpenedChanged","computedStyle","__margins","propName","parseInt","direction","__positionSettingsChanged","shouldAlignStartVertically","__shouldAlignStartVertically","justifyContent","isRTL","__isRTL","shouldAlignStartHorizontally","__shouldAlignStartHorizontally","flexStart","alignItems","verticalProps","__calculatePositionInOneDimension","horizontalProps","assign","rtl","contentWidth","Math","max","__oldContentWidth","offsetWidth","viewportWidth","min","innerWidth","documentElement","clientWidth","defaultAlignLeft","__shouldAlignStart","contentHeight","__oldContentHeight","offsetHeight","viewportHeight","innerHeight","clientHeight","defaultAlignTop","contentSize","viewportSize","margins","defaultAlignStart","noOverlap","propNames","spaceForStartAlignment","spaceForEndAlignment","spaceForDefaultAlignment","__adjustBottomProperty","cssPropNameToSet","currentValue","adjustedProp","__oldViewportHeight","__oldViewportWidth","shouldAlignStart","cssPropNameToClear","adjustedValue","diff","valueToSet"],"sourceRoot":""}
package/dist/umd/8961.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8961],{1160:(t,e,s)=>{s.d(e,{t:()=>o});var r=s(72270),i=s(63200),n=s(25964),a=s(50336);const o=({componentName:t,wrappedEleName:e,slots:s=[],style:o,excludeAttrsSync:l=[],includeAttrsSync:h=[],includeForwardProps:c=[],delegatesFocus:u=!0})=>{class d extends((0,r.qu)({componentName:t,baseSelector:e})){#t=a.r.bind(this,"blur");#e=a.r.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:u}).innerHTML=`\n\t\t\t<${e}>\n\t\t\t${s.map(t=>`<slot ${t?`name="${t}" slot="${t}"`:""}></slot>`).join("")}\n\t\t\t</${e}>\n\t\t`,(0,n.fz)(((0,i.Tn)(o)?o():o)||"",this)}init(){super.init?.(),this.baseElement.addEventListener("blur",t=>{this.#t()}),this.baseElement.addEventListener("focus",t=>{this.#e()}),(0,n.q)(this.baseElement,this,c),(0,n.Gh)(this.baseElement,this,{excludeAttrs:l,includeAttrs:h})}}return d}},1317:(t,e,s)=>{s.d(e,{_:()=>i});var r=s(50336);const i=t=>class extends t{#s=r.r.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",t=>{t.stopPropagation()}),this.addEventListener("blur",()=>{this.value!==this.prevValue&&(this.#s(),this.prevValue=this.value)})}}},3563:(t,e,s)=>{s(63200),s(22515),s(11430),s(34797),s(25964)},4430:(t,e,s)=>{s.d(e,{X:()=>n}),s(42672);const r=["required","pattern"],i=Symbol("validationTarget"),n=t=>class extends t{#r=i;static get observedAttributes(){return[...t.observedAttributes||[],...r]}static get formAssociated(){return!0}#i;get internals(){return this.#i}set internals(t){this.#i=t}constructor(){super(),this.#i=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}get defaultErrorMsgTypeMismatch(){return"Please match the requested type."}getCustomErrorMessage(t,e){return this.hasAttribute(t)?this.getAttribute(t)||" ":e}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:r,stepMismatch:i,tooShort:n,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:c}=t;switch(!0){case e:return this.getCustomErrorMessage("data-errormessage-value-missing",this.defaultErrorMsgValueMissing);case s||i||h:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch",this.defaultErrorMsgPatternMismatch);case r:return this.getCustomErrorMessage("data-errormessage-type-mismatch",this.defaultErrorMsgTypeMismatch);case n:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-short",this.defaultErrorMsgTooShort);case a:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-long",this.defaultErrorMsgTooLong);case l:return this.getCustomErrorMessage("data-errormessage-pattern-range-underflow",this.defaultErrorMsgRangeUnderflow);case o:return this.getCustomErrorMessage("data-errormessage-pattern-range-overflow",this.defaultErrorMsgRangeOverflow);case c:return this.validationMessage;default:return""}}#n(){const t=this.isReadOnly?{}:this.getValidity();this.#i.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#i.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#i.validity.valid}reportValidity(){return this.#i.reportValidity()}get validity(){return this.#i.validity}get validationTarget(){return this.#r===i?this.inputElement:this.#r}set validationTarget(t){this.#r=t}setCustomValidity(t){t?this.#i.setValidity({customError:!0},t,this.validationTarget):(this.#i.setValidity({}),this.#n())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#i.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),r.includes(t)&&this.#n()}init(){super.init?.(),this.addEventListener("change",this.#n),this.addEventListener("invalid",t=>t.stopPropagation()),this.addEventListener("input",this.#n),setTimeout(()=>this.#n())}}},11430:(t,e,s)=>{s.d(e,{V:()=>i});var r=s(25964);const i=t=>class extends t{constructor(){super(),(0,r.fz)(':host([draggable="true"]) * { cursor: inherit!important }',this)}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}}),super.init?.()}}},11501:(t,e,s)=>{s.d(e,{m:()=>r});const r=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",()=>this.removeAttribute("hover"),{once:!0})})}}},19852:(t,e,s)=>{s(25964)},22515:(t,e,s)=>{s.d(e,{R:()=>l});var r=s(69591),i=s(63200),n=s(25964),a=s(79673),o=s(83538);const l=({mappings:t={},componentNameOverride:e=""})=>s=>{const l=e||s.componentName;return class e extends s{static get cssVarList(){return{...s.cssVarList,...(0,o.SR)(l,{...t})}}#a;#o;#l;#h;#c;#u;#d;#m;#p;constructor({getRootElement:t,componentNameSuffix:s="",themeSection:n=r.IM,baseSelector:a}={}){super(),this.#h=s,this.#c=n,this.#d=a??this.baseSelector,this.#p=t,this.#m=Object.keys(e.cssVarList).map(t=>(0,i.GL)("st",s,t))}get#g(){return a.br.currentTheme?.[l]||""}#b(){this.#o.replaceSync(this.#g[this.#c]),this.currentThemeName=a.br.currentThemeName,this.onThemeChange?.(a.br.currentThemeName)}#E(){this.#o=(0,n.fz)("",this.#u,{prepend:!0}),this.#l=a.br.onCurrentThemeChange(this.#b.bind(this)),this.#b()}#v(){if(this.#m.length){let t=(0,o.AM)(l,r.aE);const e=this.getAttribute("id");e&&(t+=`#${CSS.escape(e)}`),this.#a=(0,n.fz)(`:host(${t}) {}`,this.#u)}}#f(t,e){const s=this.#a.cssRules[0].style;if(!s)return;const r=(0,n.Ix)(l,t.replace(new RegExp("^st-"),""));e?s?.setProperty(r,e):(s?.removeProperty(r),this.removeAttribute(t))}#y(t=[]){t.forEach(t=>{this.#m.includes(t)&&this.#f(t,this.getAttribute(t))})}#A(){if(Object.keys(t).length){const e=(0,o._r)((0,i.GL)(l,this.#h),this.#d,t);(0,n.fz)(e,this.#u,{prepend:!0})}}#C(t){(this.#u.classList||this.#u.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#u=await(this.#p?.(this))||this.shadowRoot,this.#C(l),this.#A(),this.#E(),this.#v(),(0,n.mx)(this,this.#y.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#l?.()}}}},27754:(t,e,s)=>{s.d(e,{b:()=>r});const r=t=>class extends t{updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}}},34797:(t,e,s)=>{s.d(e,{q:()=>l});var r=s(63200),i=s(61246),n=s(27754),a=s(11501),o=s(36745);const l=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#S;#M=!0;get baseSelector(){return e}get baseElement(){return this.#S??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#S||console.warn("missing base element for component",this.localName),this.#S}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#M&&(this.#M=!1,this.init?.())}}return(0,r.Zz)(i.t,a.m,o.y,n.b)(s)}},36745:(t,e,s)=>{s.d(e,{y:()=>n});var r=s(25964);const i=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options","loading","allow-custom-value","collapsed"],n=t=>class extends t{init(){super.init?.(),(0,r.mx)(this,t=>t.forEach(t=>{const e=this.getAttribute(t);(t=>i.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.debug(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}),{})}}},49449:(t,e,s)=>{s.d(e,{y:()=>h});var r=s(63200),i=s(1317),n=s(70962),a=s(4430),o=s(36745),l=s(34797);const h=(...t)=>(0,r.Zz)(a.X,i._,o.y,n.j)((0,l.q)(...t))},50336:(t,e,s)=>{function r(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{r:()=>r})},61246:(t,e,s)=>{s.d(e,{t:()=>r});const r=t=>class extends t{#w(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#w()}}},70962:(t,e,s)=>{s.d(e,{j:()=>i});var r=s(50336);const i=t=>class extends t{init(){this.#T(),super.init?.()}#T(){["blur","focus","focusin","focusout"].forEach(t=>{this.addEventListener(t,t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()})})}handleFocusEventsDispatching(t){let e;t?.forEach(t=>{t?.addEventListener("focusout",t=>{t.stopImmediatePropagation(),e=setTimeout(()=>{e=null,r.r.call(this,"blur"),r.r.call(this,"focusout",{bubbles:!0})})});const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(r.r.call(this,"focus"),r.r.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)})}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",e=>{this!==e.target&&(e.stopImmediatePropagation(),t!==this.value&&(t=this.value,r.r.call(this,"input",{bubbles:!0,composed:!0})))})}}},71209:(t,e,s)=>{s.d(e,{O:()=>u});var r=s(63200),i=s(25964),n=s(50336),a=s(4430),o=s(22515);const l=["invalid","required"],h=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e?.localName)return e},c=({proxyProps:t=[],useProxyTargets:e=!1,inputEvent:s="input",triggerValidationEvents:r=[],proxyParentValidation:o=!1})=>c=>class extends((0,a.X)(c)){static get observedAttributes(){return[...c.observedAttributes||[],...l]}#R;#s=n.r.bind(this,"change");constructor(){super(),this.#R=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout(()=>{!this.#R&&console.warn(this.localName,"no input was found")},0)}get inputElement(){if(this.#R)return this.#R;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#R=h(t)||h(e),this.#R}set inputElement(t){this.#R=t}getValidity(){return this.inputElement?.validity||{}}#x(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#x(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},this.baseElement.addEventListener("input",t=>{t.composed||this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}),r.forEach(t=>{this.baseElement?.addEventListener(t,()=>{this.inputElement?.setCustomValidity("")})}),setTimeout(()=>{(Array.isArray(s)?s:[s]).forEach(t=>{this.baseElement?.addEventListener(t,()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#x()})}),this.baseElement.addEventListener("change",()=>{this.#s()}),this.addEventListener("invalid",()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#x()}),t.forEach(t=>{const s=this.querySelector('input[slot="external-input"]')||null,r=e?[this.baseElement,s].filter(Boolean):[];((t,e,s)=>{const r=Array.isArray(e)?e:[e];Object.defineProperty(t,s,{set(t){r.forEach(e=>{e[s]=t})},get:()=>e[0][s],configurable:!0})})(this,[this.inputElement,...r],t)}),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,i.EA)(this,this.inputElement,{includeAttrs:["inputmode"]})}),o){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...r)=>{if(3===r.length){const t=r.slice(0,r.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...r);return t[s](...r)}:"function"==typeof t[s]?(...r)=>(e.internals[s](...r),t[s](...r)):t[s]})}}},u=t=>(0,r.Zz)(c(t),(0,o.R)({componentNameOverride:(0,i.xE)("input-wrapper")}))},71887:(t,e,s)=>{s.d(e,{y:()=>r});const r=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mousedown",t=>{t.preventDefault(),this.setAttribute("active","true"),window.addEventListener("mouseup",()=>this.removeAttribute("active"),{once:!0})})}}},72270:(t,e,s)=>{s.d(e,{OR:()=>n.O,h:()=>n.h,qu:()=>r.q,yc:()=>i.y});var r=s(34797),i=(s(3563),s(49449)),n=s(84548)},78968:(t,e,s)=>{s.d(e,{Jm:()=>h.J,OZ:()=>a.O,RF:()=>r.R,VO:()=>i.V,mA:()=>l.m,t$:()=>c.t,tQ:()=>o.t,tz:()=>n.t,y:()=>u.y});var r=s(22515),i=s(11430),n=s(1160),a=s(71209),o=s(61246),l=(s(4430),s(87503)),h=(s(36745),s(19852),s(83370)),c=s(84292),u=s(71887)},83370:(t,e,s)=>{s.d(e,{J:()=>r});const r=({connectorClasses:t})=>e=>class extends e{#V=t;static get observedAttributes(){return[...e.observedAttributes||[],"connector-template"]}get connectorClasses(){return this.#V}set connectorClasses(t){this.#V=t}get connectorTemplate(){return this.getAttribute("connector-template")}initializeConnector(){const t=this.connectorTemplate;if(!this.connectorClasses[t])return;const e=this.connectorClasses[t];this.connector=new e(this.getAttribute.bind(this))}async fetchConnectorResults(t){if(!this.connector)return console.error(`No connector initialized for the field with template: ${this.connectorTemplate}`),{results:[]};const{results:e,error:s}=await this.connector.fetch(t);return s?{results:[],error:s}:{results:e.map(({label:t,value:e})=>({label:t,value:e}))}}init(){super.init?.(),this.initializeConnector()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),e!==s&&"connector-template"===t&&this.initializeConnector()}}},83538:(t,e,s)=>{s.d(e,{AM:()=>d,SR:()=>u,_r:()=>h});var r=s(63200),i=s(25964);const n=t=>`${t}__override`,a=(t,e,s=!1)=>{const r=`var(${t}${e?`, ${e}`:""})`;return s?`var(${n(t)}, ${r})`:r};class o{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce((t,[e,s])=>`${t}${e} { \n${s.map(({property:t,value:e})=>`${t}: ${e}`).join(";\n")} \n}\n\n`,"")}}const l=(t,e="fallback")=>(0,r.GL)(t,e),h=(t,e,s)=>{const n=new o,h=(t,e)=>{if(!t)return"";if("string"==typeof t)return t;const s=l(e,t?.suffix);return a(s,h(t.fallback,s))};return Object.keys(s).forEach(o=>{const l=((t,e)=>{const s={selector:"",property:(0,r.kW)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map(t=>({...s,...t})):[{...s,...e}]:[s]})(o,s[o]),c=(0,i.Ix)(t,o);l.forEach(({selector:t,property:s,important:i,fallback:o})=>{const l=h(o,c);n.add(((t="",e="")=>(0,r.Tn)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,r.Tn)(s)?s():s,a(c,l,!0)+(i?"!important":""))})}),n.toString()},c=(t,e,{fallback:s})=>{if(!s)return{};const i=l(e,s.suffix),n=(0,r.dk)(t,s.suffix||"fallback");return{[n]:i,...c(n,i,s)}},u=(t,e)=>Object.keys(e).reduce((s,r)=>{const a=(0,i.Ix)(t,r);return Object.assign(s,{[r]:a},{[r+"Override"]:n(a)},c(r,a,e[r]))},{}),d=(t,e)=>`.${t}`.repeat(e)},84292:(t,e,s)=>{s.d(e,{t:()=>a});var r=s(25964);const i=()=>!0,n=t=>`<pre>${JSON.stringify(t,null,4)}</pre>`,a=({itemRenderer:t=n,validateSchema:e=i,slotName:s,rerenderAttrsList:a=[],targetSelector:o,sortFn:l=t=>t})=>i=>class extends i{#L=[];#N;#O(t){if(!e)return!0;const s=e(t);return!0===s||(console.error("Data schema validation failed",s||""),!1)}#$(){const t=s?`*[slot="${s}"]`:":not([slot])";this.#N&&this.#N.querySelectorAll(t).forEach(t=>t.remove())}#I(){this.#$(),(l?this.data.sort(l):this.data).forEach((e,s)=>{const r="string"==typeof(i=t(e,s,this))?(t=>{const e=document.createElement("template");return e.innerHTML=t,e})(i).content:i instanceof HTMLTemplateElement?i.content:(console.error("Invalid template",i),null);var i;this.#N&&this.#N.appendChild(r?.cloneNode(!0))})}set data(t){this.#O(t)&&(this.#L=t,this.#I())}get data(){return this.#L}init(){super.init?.(),this.#N=o?this.shadowRoot.querySelector(o):this.baseElement,(0,r.mx)(this,t=>{t.includes("data")?this.#k():this.#I()},{includeAttrs:[...a,"data"]})}#k(){const t=this.getAttribute("data");if(t)try{this.data=JSON.parse(t)}catch(e){console.warn("Invalid JSON data",t)}}}},84548:(t,e,s)=>{s.d(e,{O:()=>r,h:()=>i});const r={CONNECTOR_INVALID:"CONNECTOR_INVALID",FETCH_RESULTS_ERROR:"FETCH_RESULTS_ERROR"},i=()=>class{constructor(t){this.getAttribute=t,this.isValid=this.#_()}checkConnectorValidity(){this.isValid=this.#_()}#_(){return!this.getRequiredParams().filter(t=>{const e=this.getAttribute(t);return!e||!this.validateParam(t,e)}).length}validateParam(t,e){return e.trim().length>0}getRequiredParams(){return console.error("Connector must implement getRequiredParams"),[]}async fetch(t){return this.isValid?this._fetchResults(t):(console.error(`[${this.constructor.name}] Cannot fetch results: connector is not properly configured`),{results:[],error:r.CONNECTOR_INVALID})}_fetchResults(t){return console.error("Connector must implement fetchResults"),{results:[],error:void 0}}}},87503:(t,e,s)=>{s.d(e,{m:()=>l});var r=s(63200),i=s(25964),n=s(22515),a=s(83538);const o=t=>async e=>{const s=await t(e);return new Promise(t=>{let e=0;const r=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(r)};r()})},l=({name:t,selector:e,mappings:s={},forward:{attributes:l=[],include:h=!0}={}})=>c=>{const u=t||(t=>t.replace(/[^\w\s]/gi,""))(e),d=(0,n.R)({mappings:s})(c);return class extends d{static get cssVarList(){return{...d.cssVarList,[u]:(0,a.SR)((0,r.GL)(c.componentName,"_"+u),s)}}#q;constructor(){const t=o(async t=>{const s=(t.shadowRoot||t).querySelector(t.baseSelector);return e?(await o(()=>s)(t)).querySelector(e):s});super({getRootElement:t,componentNameSuffix:"_"+u,themeSection:"@"+u,baseSelector:":host"}),this.#q=t(this).then(t=>t.host)}async#P(){const t=await this.#q;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#q;(0,i.EA)(this,t,{[h?"includeAttrs":"excludeAttrs"]:l}),this.#P()}}}},88961:(t,e,s)=>{s.d(e,{Jm:()=>r.Jm,OZ:()=>r.OZ,RF:()=>r.RF,VO:()=>r.VO,mA:()=>r.mA,t$:()=>r.t$,tQ:()=>r.tQ,tz:()=>r.tz,y:()=>r.y});var r=s(78968)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8961],{1160:(t,e,s)=>{s.d(e,{t:()=>o});var r=s(72270),i=s(63200),n=s(25964),a=s(50336);const o=({componentName:t,wrappedEleName:e,slots:s=[],style:o,excludeAttrsSync:l=[],includeAttrsSync:h=[],includeForwardProps:c=[],delegatesFocus:u=!0})=>{class d extends((0,r.qu)({componentName:t,baseSelector:e})){#t=a.r.bind(this,"blur");#e=a.r.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:u}).innerHTML=`\n\t\t\t<${e}>\n\t\t\t${s.map(t=>`<slot ${t?`name="${t}" slot="${t}"`:""}></slot>`).join("")}\n\t\t\t</${e}>\n\t\t`,(0,n.fz)(((0,i.Tn)(o)?o():o)||"",this)}init(){super.init?.(),this.baseElement.addEventListener("blur",t=>{this.#t()}),this.baseElement.addEventListener("focus",t=>{this.#e()}),(0,n.q)(this.baseElement,this,c),(0,n.Gh)(this.baseElement,this,{excludeAttrs:l,includeAttrs:h})}}return d}},1317:(t,e,s)=>{s.d(e,{_:()=>i});var r=s(50336);const i=t=>class extends t{#s=r.r.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",t=>{t.stopPropagation()}),this.addEventListener("blur",()=>{this.value!==this.prevValue&&(this.#s(),this.prevValue=this.value)})}}},3563:(t,e,s)=>{s(63200),s(22515),s(11430),s(34797),s(25964)},4430:(t,e,s)=>{s.d(e,{X:()=>n}),s(42672);const r=["required","pattern"],i=Symbol("validationTarget"),n=t=>class extends t{#r=i;static get observedAttributes(){return[...t.observedAttributes||[],...r]}static get formAssociated(){return!0}#i;get internals(){return this.#i}set internals(t){this.#i=t}constructor(){super(),this.#i=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}get defaultErrorMsgTypeMismatch(){return"Please match the requested type."}getCustomErrorMessage(t,e){return this.hasAttribute(t)?this.getAttribute(t)||" ":e}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:r,stepMismatch:i,tooShort:n,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:c}=t;switch(!0){case e:return this.getCustomErrorMessage("data-errormessage-value-missing",this.defaultErrorMsgValueMissing);case s||i||h:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch",this.defaultErrorMsgPatternMismatch);case r:return this.getCustomErrorMessage("data-errormessage-type-mismatch",this.defaultErrorMsgTypeMismatch);case n:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-short",this.defaultErrorMsgTooShort);case a:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-long",this.defaultErrorMsgTooLong);case l:return this.getCustomErrorMessage("data-errormessage-pattern-range-underflow",this.defaultErrorMsgRangeUnderflow);case o:return this.getCustomErrorMessage("data-errormessage-pattern-range-overflow",this.defaultErrorMsgRangeOverflow);case c:return this.validationMessage;default:return""}}#n(){const t=this.isReadOnly?{}:this.getValidity();this.#i.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#i.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#i.validity.valid}reportValidity(){return this.#i.reportValidity()}get validity(){return this.#i.validity}get validationTarget(){return this.#r===i?this.inputElement:this.#r}set validationTarget(t){this.#r=t}setCustomValidity(t){t?this.#i.setValidity({customError:!0},t,this.validationTarget):(this.#i.setValidity({}),this.#n())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#i.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),r.includes(t)&&this.#n()}init(){super.init?.(),this.addEventListener("change",this.#n),this.addEventListener("invalid",t=>t.stopPropagation()),this.addEventListener("input",this.#n),setTimeout(()=>this.#n())}}},11430:(t,e,s)=>{s.d(e,{V:()=>i});var r=s(25964);const i=t=>class extends t{constructor(){super(),(0,r.fz)(':host([draggable="true"]) * { cursor: inherit!important }',this)}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}}),super.init?.()}}},11501:(t,e,s)=>{s.d(e,{m:()=>r});const r=t=>class extends t{init(){super.init?.(),(this.baseElement||this).addEventListener("mouseover",t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",()=>this.removeAttribute("hover"),{once:!0})})}}},19852:(t,e,s)=>{s(25964)},22515:(t,e,s)=>{s.d(e,{R:()=>l});var r=s(69591),i=s(63200),n=s(25964),a=s(79673),o=s(83538);const l=({mappings:t={},componentNameOverride:e=""})=>s=>{const l=e||s.componentName;return class e extends s{static get cssVarList(){return{...s.cssVarList,...(0,o.SR)(l,{...t})}}#a;#o;#l;#h;#c;#u;#d;#m;#p;constructor({getRootElement:t,componentNameSuffix:s="",themeSection:n=r.IM,baseSelector:a}={}){super(),this.#h=s,this.#c=n,this.#d=a??this.baseSelector,this.#p=t,this.#m=Object.keys(e.cssVarList).map(t=>(0,i.GL)("st",s,t))}get#g(){return a.br.currentTheme?.[l]||""}#b(){this.#o.replaceSync(this.#g[this.#c]),this.currentThemeName=a.br.currentThemeName,this.onThemeChange?.(a.br.currentThemeName)}#E(){this.#o=(0,n.fz)("",this.#u,{prepend:!0}),this.#l=a.br.onCurrentThemeChange(this.#b.bind(this)),this.#b()}#v(){if(this.#m.length){let t=(0,o.AM)(l,r.aE);const e=this.getAttribute("id");e&&(t+=`#${CSS.escape(e)}`),this.#a=(0,n.fz)(`:host(${t}) {}`,this.#u)}}#f(t,e){const s=this.#a.cssRules[0].style;if(!s)return;const r=(0,n.Ix)(l,t.replace(new RegExp("^st-"),""));e?s?.setProperty(r,e):(s?.removeProperty(r),this.removeAttribute(t))}#y(t=[]){t.forEach(t=>{this.#m.includes(t)&&this.#f(t,this.getAttribute(t))})}#A(){if(Object.keys(t).length){const e=(0,o._r)((0,i.GL)(l,this.#h),this.#d,t);(0,n.fz)(e,this.#u,{prepend:!0})}}#C(t){(this.#u?.classList||this.#u?.host?.classList||this.classList).add(t)}async init(){super.init?.(),!this.shadowRoot?.isConnected&&this.shadowRoot||(this.#u=await(this.#p?.(this))||this.shadowRoot,this.#C(l),this.#A(),this.#E(),this.#v(),(0,n.mx)(this,this.#y.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#l?.()}}}},27754:(t,e,s)=>{s.d(e,{b:()=>r});const r=t=>class extends t{updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}}},34797:(t,e,s)=>{s.d(e,{q:()=>l});var r=s(63200),i=s(61246),n=s(27754),a=s(11501),o=s(36745);const l=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#S;#M=!0;get baseSelector(){return e}get baseElement(){return this.#S??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#S||console.warn("missing base element for component",this.localName),this.#S}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#M&&(this.#M=!1,this.init?.())}}return(0,r.Zz)(i.t,a.m,o.y,n.b)(s)}},36745:(t,e,s)=>{s.d(e,{y:()=>n});var r=s(25964);const i=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options","loading","allow-custom-value","collapsed"],n=t=>class extends t{init(){super.init?.(),(0,r.mx)(this,t=>t.forEach(t=>{const e=this.getAttribute(t);(t=>i.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.debug(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}),{})}}},49449:(t,e,s)=>{s.d(e,{y:()=>h});var r=s(63200),i=s(1317),n=s(70962),a=s(4430),o=s(36745),l=s(34797);const h=(...t)=>(0,r.Zz)(a.X,i._,o.y,n.j)((0,l.q)(...t))},50336:(t,e,s)=>{function r(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{r:()=>r})},61246:(t,e,s)=>{s.d(e,{t:()=>r});const r=t=>class extends t{#w(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#w()}}},70962:(t,e,s)=>{s.d(e,{j:()=>i});var r=s(50336);const i=t=>class extends t{init(){this.#T(),super.init?.()}#T(){["blur","focus","focusin","focusout"].forEach(t=>{this.addEventListener(t,t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()})})}handleFocusEventsDispatching(t){let e;t?.forEach(t=>{t?.addEventListener("focusout",t=>{t.stopImmediatePropagation(),e=setTimeout(()=>{e=null,r.r.call(this,"blur"),r.r.call(this,"focusout",{bubbles:!0})})});const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(r.r.call(this,"focus"),r.r.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)})}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",e=>{this!==e.target&&(e.stopImmediatePropagation(),t!==this.value&&(t=this.value,r.r.call(this,"input",{bubbles:!0,composed:!0})))})}}},71209:(t,e,s)=>{s.d(e,{O:()=>u});var r=s(63200),i=s(25964),n=s(50336),a=s(4430),o=s(22515);const l=["invalid","required"],h=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e?.localName)return e},c=({proxyProps:t=[],useProxyTargets:e=!1,inputEvent:s="input",triggerValidationEvents:r=[],proxyParentValidation:o=!1})=>c=>class extends((0,a.X)(c)){static get observedAttributes(){return[...c.observedAttributes||[],...l]}#R;#s=n.r.bind(this,"change");constructor(){super(),this.#R=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout(()=>{!this.#R&&console.warn(this.localName,"no input was found")},0)}get inputElement(){if(this.#R)return this.#R;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#R=h(t)||h(e),this.#R}set inputElement(t){this.#R=t}getValidity(){return this.inputElement?.validity||{}}#x(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#x(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},this.baseElement.addEventListener("input",t=>{t.composed||this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}),r.forEach(t=>{this.baseElement?.addEventListener(t,()=>{this.inputElement?.setCustomValidity("")})}),setTimeout(()=>{(Array.isArray(s)?s:[s]).forEach(t=>{this.baseElement?.addEventListener(t,()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#x()})}),this.baseElement.addEventListener("change",()=>{this.#s()}),this.addEventListener("invalid",()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#x()}),t.forEach(t=>{const s=this.querySelector('input[slot="external-input"]')||null,r=e?[this.baseElement,s].filter(Boolean):[];((t,e,s)=>{const r=Array.isArray(e)?e:[e];Object.defineProperty(t,s,{set(t){r.forEach(e=>{e[s]=t})},get:()=>e[0][s],configurable:!0})})(this,[this.inputElement,...r],t)}),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,i.EA)(this,this.inputElement,{includeAttrs:["inputmode"]})}),o){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...r)=>{if(3===r.length){const t=r.slice(0,r.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...r);return t[s](...r)}:"function"==typeof t[s]?(...r)=>(e.internals[s](...r),t[s](...r)):t[s]})}}},u=t=>(0,r.Zz)(c(t),(0,o.R)({componentNameOverride:(0,i.xE)("input-wrapper")}))},71887:(t,e,s)=>{s.d(e,{y:()=>r});const r=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mousedown",t=>{t.preventDefault(),this.setAttribute("active","true"),window.addEventListener("mouseup",()=>this.removeAttribute("active"),{once:!0})})}}},72270:(t,e,s)=>{s.d(e,{OR:()=>n.O,h:()=>n.h,qu:()=>r.q,yc:()=>i.y});var r=s(34797),i=(s(3563),s(49449)),n=s(84548)},78968:(t,e,s)=>{s.d(e,{Jm:()=>h.J,OZ:()=>a.O,RF:()=>r.R,VO:()=>i.V,mA:()=>l.m,t$:()=>c.t,tQ:()=>o.t,tz:()=>n.t,y:()=>u.y});var r=s(22515),i=s(11430),n=s(1160),a=s(71209),o=s(61246),l=(s(4430),s(87503)),h=(s(36745),s(19852),s(83370)),c=s(84292),u=s(71887)},83370:(t,e,s)=>{s.d(e,{J:()=>r});const r=({connectorClasses:t})=>e=>class extends e{#L=t;static get observedAttributes(){return[...e.observedAttributes||[],"connector-template"]}get connectorClasses(){return this.#L}set connectorClasses(t){this.#L=t}get connectorTemplate(){return this.getAttribute("connector-template")}initializeConnector(){const t=this.connectorTemplate;if(!this.connectorClasses[t])return;const e=this.connectorClasses[t];this.connector=new e(this.getAttribute.bind(this))}async fetchConnectorResults(t){if(!this.connector)return console.error(`No connector initialized for the field with template: ${this.connectorTemplate}`),{results:[]};const{results:e,error:s}=await this.connector.fetch(t);return s?{results:[],error:s}:{results:e.map(({label:t,value:e})=>({label:t,value:e}))}}init(){super.init?.(),this.initializeConnector()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),e!==s&&"connector-template"===t&&this.initializeConnector()}}},83538:(t,e,s)=>{s.d(e,{AM:()=>d,SR:()=>u,_r:()=>h});var r=s(63200),i=s(25964);const n=t=>`${t}__override`,a=(t,e,s=!1)=>{const r=`var(${t}${e?`, ${e}`:""})`;return s?`var(${n(t)}, ${r})`:r};class o{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce((t,[e,s])=>`${t}${e} { \n${s.map(({property:t,value:e})=>`${t}: ${e}`).join(";\n")} \n}\n\n`,"")}}const l=(t,e="fallback")=>(0,r.GL)(t,e),h=(t,e,s)=>{const n=new o,h=(t,e)=>{if(!t)return"";if("string"==typeof t)return t;const s=l(e,t?.suffix);return a(s,h(t.fallback,s))};return Object.keys(s).forEach(o=>{const l=((t,e)=>{const s={selector:"",property:(0,r.kW)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map(t=>({...s,...t})):[{...s,...e}]:[s]})(o,s[o]),c=(0,i.Ix)(t,o);l.forEach(({selector:t,property:s,important:i,fallback:o})=>{const l=h(o,c);n.add(((t="",e="")=>(0,r.Tn)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,r.Tn)(s)?s():s,a(c,l,!0)+(i?"!important":""))})}),n.toString()},c=(t,e,{fallback:s})=>{if(!s)return{};const i=l(e,s.suffix),n=(0,r.dk)(t,s.suffix||"fallback");return{[n]:i,...c(n,i,s)}},u=(t,e)=>Object.keys(e).reduce((s,r)=>{const a=(0,i.Ix)(t,r);return Object.assign(s,{[r]:a},{[r+"Override"]:n(a)},c(r,a,e[r]))},{}),d=(t,e)=>`.${t}`.repeat(e)},84292:(t,e,s)=>{s.d(e,{t:()=>a});var r=s(25964);const i=()=>!0,n=t=>`<pre>${JSON.stringify(t,null,4)}</pre>`,a=({itemRenderer:t=n,validateSchema:e=i,slotName:s,rerenderAttrsList:a=[],targetSelector:o,sortFn:l=t=>t})=>i=>class extends i{#V=[];#N;#O(t){if(!e)return!0;const s=e(t);return!0===s||(console.error("Data schema validation failed",s||""),!1)}#$(){const t=s?`*[slot="${s}"]`:":not([slot])";this.#N&&this.#N.querySelectorAll(t).forEach(t=>t.remove())}#I(){this.#$(),(l?this.data.sort(l):this.data).forEach((e,s)=>{const r="string"==typeof(i=t(e,s,this))?(t=>{const e=document.createElement("template");return e.innerHTML=t,e})(i).content:i instanceof HTMLTemplateElement?i.content:(console.error("Invalid template",i),null);var i;this.#N&&this.#N.appendChild(r?.cloneNode(!0))})}set data(t){this.#O(t)&&(this.#V=t,this.#I())}get data(){return this.#V}init(){super.init?.(),this.#N=o?this.shadowRoot.querySelector(o):this.baseElement,(0,r.mx)(this,t=>{t.includes("data")?this.#k():this.#I()},{includeAttrs:[...a,"data"]})}#k(){const t=this.getAttribute("data");if(t)try{this.data=JSON.parse(t)}catch(e){console.warn("Invalid JSON data",t)}}}},84548:(t,e,s)=>{s.d(e,{O:()=>r,h:()=>i});const r={CONNECTOR_INVALID:"CONNECTOR_INVALID",FETCH_RESULTS_ERROR:"FETCH_RESULTS_ERROR"},i=()=>class{constructor(t){this.getAttribute=t,this.isValid=this.#P()}checkConnectorValidity(){this.isValid=this.#P()}#P(){return!this.getRequiredParams().filter(t=>{const e=this.getAttribute(t);return!e||!this.validateParam(t,e)}).length}validateParam(t,e){return e.trim().length>0}getRequiredParams(){return console.error("Connector must implement getRequiredParams"),[]}async fetch(t){return this.isValid?this._fetchResults(t):(console.error(`[${this.constructor.name}] Cannot fetch results: connector is not properly configured`),{results:[],error:r.CONNECTOR_INVALID})}_fetchResults(t){return console.error("Connector must implement fetchResults"),{results:[],error:void 0}}}},87503:(t,e,s)=>{s.d(e,{m:()=>l});var r=s(63200),i=s(25964),n=s(22515),a=s(83538);const o=t=>async e=>{const s=await t(e);return new Promise(t=>{let e=0;const r=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(r)};r()})},l=({name:t,selector:e,mappings:s={},forward:{attributes:l=[],include:h=!0}={}})=>c=>{const u=t||(t=>t.replace(/[^\w\s]/gi,""))(e),d=(0,n.R)({mappings:s})(c);return class extends d{static get cssVarList(){return{...d.cssVarList,[u]:(0,a.SR)(u?(0,r.GL)(c.componentName,"_"+u):c.componentName,s)}}#_;constructor(){const t=o(async t=>{const s=(t.shadowRoot||t).querySelector(t.baseSelector);return e&&t.shadowRoot?(await o(()=>s)(t)).querySelector(e):s});super({getRootElement:t,componentNameSuffix:u&&"_"+u,themeSection:u?"_"+u:void 0,baseSelector:""}),this.#q=()=>t(this).then(t=>t?.host||t)}#q;async#z(){const t=await this.#_;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.(),this.#_=this.#q();const t=await this.#_;(0,i.EA)(this,t,{[h?"includeAttrs":"excludeAttrs"]:l}),this.#z()}}}},88961:(t,e,s)=>{s.d(e,{Jm:()=>r.Jm,OZ:()=>r.OZ,RF:()=>r.RF,VO:()=>r.VO,mA:()=>r.mA,t$:()=>r.t$,tQ:()=>r.tQ,tz:()=>r.tz,y:()=>r.y});var r=s(78968)}}]);
2
2
  //# sourceMappingURL=8961.js.map