/*! For license information please see descope-apps-list.js.LICENSE.txt */
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[461,2272,2294,3580,4551],{1508:(t,e,o)=>{function s(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 n(t){const e=[];let o;return"slot"===t.localName?o=t.assignedElements():(e.push(t),o=[...t.children]),o.forEach(t=>e.push(...n(t))),e}function i(t,e){return e?e.closest(t)||i(t,e.getRootNode().host):null}function r(t){return t?new Set(t.split(" ")):new Set}function a(t){return t?[...t].join(" "):""}function d(t,e,o){const s=r(t.getAttribute(e));s.add(o),t.setAttribute(e,a(s))}function l(t,e,o){const s=r(t.getAttribute(e));s.delete(o),0!==s.size?t.setAttribute(e,a(s)):t.removeAttribute(e)}function h(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}o.d(e,{Dy:()=>s,J$:()=>n,Wr:()=>l,Z4:()=>r,ZA:()=>h,el:()=>i,iA:()=>d,sz:()=>a})},7720:(t,e,o)=>{o.d(e,{T:()=>d,x:()=>h});var s=o(88961),n=o(63200),i=o(25964),r=o(93895),a=o(72270);const d=(0,i.xE)("list");class l extends((0,a.qu)({componentName:d,baseSelector:".wrapper"})){static get observedAttributes(){return["variant","readonly"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n    <div class="wrapper">\n    <slot></slot>\n    <slot name="empty-state">\n      No item...\n    </slot>\n    </div>\n\t',(0,i.fz)('\n    .wrapper {\n        overflow: auto;\n        display: grid;\n        max-height: 100%;\n        width: 100%;\n      }\n\n      :host {\n        display: inline-flex;\n        width: 100%;\n      }\n      slot[name="empty-state"] {\n        justify-content: center;\n        align-items: center;\n        display: flex;\n        flex-grow: 1;\n      }\n\n      :host slot[name="empty-state"] {\n        display: none;\n      }\n      :host([empty]) slot[name="empty-state"] {\n        display: flex;\n      }\n      ::slotted(:not([slot])) {\n        width: 100%;\n      }\n        ',this)}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}#t(){0===this.items.length?this.setAttribute("empty","true"):this.removeAttribute("empty")}get variant(){return this.getAttribute("variant")||"list"}#e(){this.items.forEach(t=>{let e=t;e.localName!==r.O.componentName&&(e=t.querySelector(r.O.componentName));const o="tiles"===this.variant?"tile":"row";e?.setAttribute("variant",o)})}init(){super.init?.(),(0,i.Ge)(this,()=>{this.#t(),this.#e(),this.#o()})}get isReadOnly(){return"true"===this.getAttribute("readonly")}#o(){this.items.forEach(t=>{this.isReadOnly?t.setAttribute("inert",""):t.removeAttribute("inert")})}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),o!==e&&("variant"===t?this.#e():"readonly"===t&&this.#o())}}const h=(0,n.Zz)((0,s.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},maxHeight:{selector:()=>":host"},minHeight:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],hostDirection:{selector:()=>":host",property:"direction"},fontFamily:{},gap:{},backgroundColor:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},boxShadow:{},gridTemplateColumns:{},maxItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"max-width"},minItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"min-width"},maxRowItems:{property:"max-row-items"},itemsHorizontalAlign:{selector:()=>"::slotted(*)",property:"justify-self"},emptyStateTextColor:{selector:()=>'slot[name="empty-state"]',property:"color"},emptyStateTextFontFamily:{selector:()=>'slot[name="empty-state"]',property:"font-family"}}}),s.VO,s.tQ)(l)},11707:(t,e,o)=>{o.d(e,{I:()=>n});let s=0;function n(){return s++}},24542:(t,e,o)=>{o.r(e),o.d(e,{ListItemClass:()=>s.O,componentName:()=>s.T});var s=o(93895);customElements.define(s.T,s.O)},42068:(t,e,o)=>{o(88660);var s=o(87550),n=o(36411);const i=s.AH`
  :host {
    --lumo-size-xs: 1.625rem;
    --lumo-size-s: 1.875rem;
    --lumo-size-m: 2.25rem;
    --lumo-size-l: 2.75rem;
    --lumo-size-xl: 3.5rem;

    /* Icons */
    --lumo-icon-size-s: 1.25em;
    --lumo-icon-size-m: 1.5em;
    --lumo-icon-size-l: 2.25em;
    /* For backwards compatibility */
    --lumo-icon-size: var(--lumo-icon-size-m);
  }
`;(0,n.q)("sizing-props",i)},44099:(t,e,o)=>{o.d(e,{r:()=>r});var s=o(1508),n=o(65641),i=o(11707);class r extends EventTarget{static generateId(t,e){return`${e||"default"}-${t.localName}-${(0,i.I)()}`}constructor(t,e,o,s={}){super();const{initializer:n,multiple:i,observe:r,useUniqueId:a}=s;this.host=t,this.slotName=e,this.tagName=o,this.observe="boolean"!=typeof r||r,this.multiple="boolean"==typeof i&&i,this.slotInitializer=n,i&&(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 s=this.defaultNode;return!s&&o&&(s=document.createElement(o),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.defaultNode=s)),s&&(this.node=s,t.appendChild(s)),s}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 n.P(o,({addedNodes:t,removedNodes:e})=>{const o=this.multiple?this.nodes:[this.node],n=t.filter(t=>!(0,s.ZA)(t)&&!o.includes(t));e.length&&(this.nodes=o.filter(t=>!e.includes(t)),e.forEach(t=>{this.teardownNode(t)})),n&&n.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...o,...n].filter(t=>t!==this.defaultNode),n.forEach(t=>{this.initAddedNode(t)})):(this.node&&this.node.remove(),this.node=n[0],this.initAddedNode(this.node)))})}}},45400:(t,e,o)=>{o.r(e),o.d(e,{ListClass:()=>s.x,componentName:()=>s.T}),o(24542);var s=o(7720);customElements.define(s.T,s.x)},47477:(t,e,o)=>{o.r(e),o.d(e,{AppsListClass:()=>h,componentName:()=>l}),o(45400),o(53557),o(63595);var s=o(63200),n=o(25964),i=o(88961),r=o(66434),a=o(7720),d=o(93895);const l=(0,n.xE)("apps-list"),h=(0,s.Zz)((0,i.RF)({mappings:{maxHeight:{selector:()=>":host"},minHeight:{selector:()=>":host"},hostDirection:{selector:()=>":host",property:"direction"},gap:{selector:a.x.componentName,property:a.x.cssVarList.gap},maxRowItems:{selector:a.x.componentName,property:a.x.cssVarList.maxRowItems},itemsFontWeight:{selector:r.s.componentName,property:r.s.cssVarList.fontWeightOverride},itemsFontSize:{selector:r.s.componentName,property:r.s.cssVarList.fontSizeOverride},itemsTextAlign:{selector:r.s.componentName,property:r.s.cssVarList.textAlign},itemBackgroundColor:{selector:d.O.componentName,property:d.O.cssVarList.backgroundColor},itemHoverBackgroundColor:{selector:`${d.O.componentName}:hover`,property:d.O.cssVarList.backgroundColor},backgroundColor:{selector:a.x.componentName,property:a.x.cssVarList.backgroundColorOverride},itemBorderStyle:{selector:d.O.componentName,property:d.O.cssVarList.borderStyleOverride},itemBorderColor:{selector:d.O.componentName,property:d.O.cssVarList.borderColorOverride},itemBorderWidth:{selector:d.O.componentName,property:d.O.cssVarList.borderWidthOverride},itemVerticalPadding:{selector:d.O.componentName,property:d.O.cssVarList.verticalPaddingOverride},itemHorizontalPadding:{selector:d.O.componentName,property:d.O.cssVarList.horizontalPaddingOverride},itemAlignment:[{selector:()=>".avatar-wrapper",property:"text-align"},{selector:r.s.componentName,property:r.s.cssVarList.textAlign}]}}),(0,i.t$)({itemRenderer:({name:t,icon:e,url:o},s,i)=>`\n  <a ${o?`href="${o}" title="${o}"`:""} ${i.openInSameWindow?"":'target="_blank"'}>\n    <descope-list-item>\n    <div class="avatar-wrapper">\n      <descope-avatar\n        ${e?`img="${e}"`:""}\n        ${t?`display-name="${t}" abbr=${(0,n.ie)(t)}`:""}\n        size="${i.logoSize||i.size}"\n      ></descope-avatar>\n    </div>\n    <descope-text\n      variant="${i.itemTextVariant}"\n      mode="primary"\n    >${t}</descope-text>\n    </descope-list-item>\n  </a>\n`,rerenderAttrsList:["size","item-text-variant","logo-size","open-in-same-window"]}),i.VO,i.tQ,t=>class extends t{get size(){return this.getAttribute("size")||"sm"}get itemTextVariant(){return this.getAttribute("item-text-variant")||"body1"}get logoSize(){return this.getAttribute("logo-size")}get openInSameWindow(){return"true"===this.getAttribute("open-in-same-window")}})((0,i.tz)({slots:["empty-state"],wrappedEleName:"descope-list",excludeAttrsSync:["tabindex","class","empty","style"],componentName:l,style:()=>`\n      :host {\n        width: 100%;\n        display: inline-flex;\n      }\n\n      descope-text::part(text-wrapper) {\n        display: -webkit-box;\n        -webkit-line-clamp: 2;\n        -webkit-box-orient: vertical;\n        overflow: hidden;\n      }\n\n      descope-list-item[variant="tile"] .avatar-wrapper {\n        width: 100%;\n      }\n\n      .avatar-wrapper {\n        line-height: 0;\n      }\n\n      a {\n        text-decoration: none;\n      }\n\n      descope-text {\n        ${r.s.cssVarList.hostDirection}: var(${h.cssVarList.hostDirection});\n        max-width: 100%;\n        width: 100%;\n      }\n    `}));customElements.define(l,h)},53149:(t,e,o)=>{o.d(e,{y:()=>i});var s=o(98741),n=o(30025);const i=(0,s.y)(t=>class extends t{get _keyboardActive(){return(0,n.aJ)()}ready(){this.addEventListener("focusin",t=>{this._shouldSetFocus(t)&&this._setFocused(!0)}),this.addEventListener("focusout",t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)}),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})},53557:(t,e,o)=>{o.r(e),o.d(e,{AvatarClass:()=>p,componentName:()=>a});var s=o(88961),n=o(72270),i=o(63200),r=o(25964);const a=(0,r.xE)("avatar");class d extends((0,n.qu)({componentName:a,baseSelector:":host > .wrapper"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n      <div class="wrapper">\n        <vaadin-avatar></vaadin-avatar>\n        <div class="editableBadge">\n          <vaadin-icon icon="vaadin:pencil"></vaadin-icon>\n        </div>\n      </div>\n\t\t',(0,r.fz)("\n        :host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n        .editableBadge {\n          border: 1px solid;\n          border-radius: 100%;\n          height: fit-content;\n          width: 25%;\n          height: 25%;\n          display: flex;\n          justify-content: center;\n          align-items: center;\n          padding: 5%;\n          box-sizing: border-box;\n          position: absolute;\n          bottom: 0;\n          inset-inline-end: 0;\n        }\n\n        vaadin-icon {\n          color: currentcolor;\n        }\n\n        vaadin-avatar {\n          width: 100%;\n          height: 100%;\n          margin: 0;\n          border: none\n        }\n\n        .wrapper {\n          display: inline-flex;\n          position: relative;\n          width: 100%;\n          height: 100%;\n        }\n    ",this),this.avatarComponent=this.shadowRoot.querySelector("vaadin-avatar"),(0,r.EA)(this,this.avatarComponent,{includeAttrs:["display-name","img","abbr"],mapAttrs:{"display-name":"name"}});const t=this.shadowRoot.querySelector(".editableBadge");(0,r.mx)(this,()=>{t.style.display=this.isEditable?"":"none"},{includeAttrs:["editable"]})}get isEditable(){return"true"===this.getAttribute("editable")}}const{host:l,editableBadge:h,avatar:c}={host:{selector:()=>":host"},editableBadge:{selector:"> .editableBadge"},avatar:{selector:"vaadin-avatar"}},p=(0,i.Zz)((0,s.RF)({mappings:{hostWidth:[{...l,property:"width"},{...l,property:"min-width"}],hostHeight:{...l,property:"height"},cursor:[c,l],hostDirection:{...l,property:"direction"},avatarTextColor:{...c,property:"color"},avatarBackgroundColor:{...c,property:"background-color"},editableIconColor:{...h,property:"color"},editableBorderColor:{...h,property:"border-color"},editableBackgroundColor:{...h,property:"background-color"}}}),s.VO,s.tQ)(d);o(4408),o(95260),o(37182),customElements.define(a,p)},63595:(t,e,o)=>{o.r(e),o.d(e,{TextClass:()=>s.s,componentName:()=>s.T});var s=o(66434);customElements.define(s.T,s.s)},65641:(t,e,o)=>{o.d(e,{P:()=>s});class s{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=[],s=[];t.length&&(e=t.filter(t=>!this._storedNodes.includes(t))),this._storedNodes.length&&this._storedNodes.forEach((e,n)=>{const i=t.indexOf(e);-1===i?o.push(e):i!==n&&s.push(e)}),(e.length||o.length||s.length)&&this.callback({addedNodes:e,movedNodes:s,removedNodes:o}),this._storedNodes=t}}},66434:(t,e,o)=>{o.d(e,{T:()=>a,s:()=>h});var s=o(88961),n=o(63200),i=o(25964),r=o(72270);const a=(0,i.xE)("text");class d extends((0,r.qu)({componentName:a,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n    <slot part="text-wrapper"></slot>\n    ',(0,i.fz)("\n      :host {\n        display: inline-block;\n        line-height: 1em;\n      }\n      :host > slot {\n        width: 100%;\n        display: inline-block;\n      }\n    ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,i.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:l}={host:{selector:()=>":host"}},h=(0,n.Zz)((0,s.RF)({mappings:{hostWidth:{...l,property:"width"},hostDirection:{...l,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),s.VO,s.tQ)(d)},81488:(t,e,o)=>{o.d(e,{I:()=>n});var s=o(44099);class n extends s.r{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}},93895:(t,e,o)=>{o.d(e,{O:()=>d,T:()=>a});var s=o(88961),n=o(63200),i=o(25964),r=o(72270);const a=(0,i.xE)("list-item"),d=(0,n.Zz)((0,s.RF)({mappings:{verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],backgroundColor:{},borderColor:{},borderStyle:{},borderWidth:{},borderRadius:{},outline:{},cursor:{},gap:{},maxWidth:{selector:()=>":host"},alignItems:{},flexDirection:{},transition:{}}}),s.VO,s.tQ,t=>class extends t{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n      <slot></slot>\n    ",(0,i.fz)("\n      slot {\n          width: 100%;\n          display: flex;\n          overflow: hidden;\n          box-sizing: border-box;\n      }\n      :host {\n        display: block;\n      }\n        ",this)}},s.y)((0,r.qu)({componentName:a,baseSelector:"slot"}))}}]);
//# sourceMappingURL=descope-apps-list.js.map