@cas-smartdesign/tab-bar 4.0.1

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.
@@ -0,0 +1,23 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <meta http-equiv="X-UA-Compatible" content="ie=edge" />
7
+ <title>Tabs</title>
8
+ <style>
9
+ .markdown-body {
10
+ box-sizing: border-box;
11
+ min-width: 200px;
12
+ max-width: 980px;
13
+ margin: 0 auto !important;
14
+ padding-bottom: 45px;
15
+ }
16
+ </style>
17
+ <script type="module" crossorigin src="./doc.mjs"></script>
18
+ <link rel="stylesheet" crossorigin href="./doc.css">
19
+ </head>
20
+ <body>
21
+ <div class="markdown-body"><div id="markdown-container"></div></div>
22
+ </body>
23
+ </html>
@@ -0,0 +1,141 @@
1
+ var window;(window||={})["@cas-smartdesign/tab-bar"]=(()=>{var Le=Object.defineProperty;var xo=Object.getOwnPropertyDescriptor;var yo=Object.getOwnPropertyNames;var wo=Object.prototype.hasOwnProperty;var Ao=(i,t)=>{for(var e in t)Le(i,e,{get:t[e],enumerable:!0})},_o=(i,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of yo(t))!wo.call(i,r)&&r!==e&&Le(i,r,{get:()=>t[r],enumerable:!(o=xo(t,r))||o.enumerable});return i};var So=i=>_o(Le({},"__esModule",{value:!0}),i);var $r={};Ao($r,{Tab:()=>Y,default:()=>et});var pe=window,ue=pe.ShadowRoot&&(pe.ShadyCSS===void 0||pe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Re=Symbol(),yi=new WeakMap,Ft=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==Re)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(ue&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=yi.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&yi.set(e,t))}return t}toString(){return this.cssText}},it=i=>new Ft(typeof i=="string"?i:i+"",void 0,Re),ct=(i,...t)=>{let e=i.length===1?i[0]:t.reduce((o,r,s)=>o+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[s+1],i[0]);return new Ft(e,i,Re)},De=(i,t)=>{ue?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{let o=document.createElement("style"),r=pe.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=e.cssText,i.appendChild(o)})},fe=ue?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return it(e)})(i):i;var Te,me=window,wi=me.trustedTypes,$o=wi?wi.emptyScript:"",Ai=me.reactiveElementPolyfillSupport,Be={toAttribute(i,t){switch(t){case Boolean:i=i?$o:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},_i=(i,t)=>t!==i&&(t==t||i==i),ke={attribute:!0,type:String,converter:Be,reflect:!1,hasChanged:_i},Me="finalized",ot=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();let t=[];return this.elementProperties.forEach((e,o)=>{let r=this._$Ep(o,e);r!==void 0&&(this._$Ev.set(r,o),t.push(r))}),t}static createProperty(t,e=ke){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){let o=typeof t=="symbol"?Symbol():"__"+t,r=this.getPropertyDescriptor(t,o,e);r!==void 0&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,o){return{get(){return this[e]},set(r){let s=this[t];this[e]=r,this.requestUpdate(t,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||ke}static finalize(){if(this.hasOwnProperty(Me))return!1;this[Me]=!0;let t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let e=this.properties,o=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let r of o)this.createProperty(r,e[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let r of o)e.unshift(fe(r))}else t!==void 0&&e.push(fe(t));return e}static _$Ep(t,e){let o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,o;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((o=t.hostConnected)===null||o===void 0||o.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;let e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return De(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var o;return(o=e.hostConnected)===null||o===void 0?void 0:o.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var o;return(o=e.hostDisconnected)===null||o===void 0?void 0:o.call(e)})}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$EO(t,e,o=ke){var r;let s=this.constructor._$Ep(t,o);if(s!==void 0&&o.reflect===!0){let n=(((r=o.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?o.converter:Be).toAttribute(e,o.type);this._$El=t,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$El=null}}_$AK(t,e){var o;let r=this.constructor,s=r._$Ev.get(t);if(s!==void 0&&this._$El!==s){let n=r.getPropertyOptions(s),l=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)===null||o===void 0?void 0:o.fromAttribute)!==void 0?n.converter:Be;this._$El=s,this[s]=l.fromAttribute(e,n.type),this._$El=null}}requestUpdate(t,e,o){let r=!0;t!==void 0&&(((o=o||this.constructor.getPropertyOptions(t)).hasChanged||_i)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),o.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,o))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((r,s)=>this[s]=r),this._$Ei=void 0);let e=!1,o=this._$AL;try{e=this.shouldUpdate(o),e?(this.willUpdate(o),(t=this._$ES)===null||t===void 0||t.forEach(r=>{var s;return(s=r.hostUpdate)===null||s===void 0?void 0:s.call(r)}),this.update(o)):this._$Ek()}catch(r){throw e=!1,this._$Ek(),r}e&&this._$AE(o)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(o=>{var r;return(r=o.hostUpdated)===null||r===void 0?void 0:r.call(o)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,o)=>this._$EO(o,this[o],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};ot[Me]=!0,ot.elementProperties=new Map,ot.elementStyles=[],ot.shadowRootOptions={mode:"open"},Ai?.({ReactiveElement:ot}),((Te=me.reactiveElementVersions)!==null&&Te!==void 0?Te:me.reactiveElementVersions=[]).push("1.6.3");var Ne,ve=window,kt=ve.trustedTypes,Si=kt?kt.createPolicy("lit-html",{createHTML:i=>i}):void 0,We="$lit$",ht=`lit$${(Math.random()+"").slice(9)}$`,Li="?"+ht,Eo=`<${Li}>`,_t=document,Xt=()=>_t.createComment(""),Yt=i=>i===null||typeof i!="object"&&typeof i!="function",Ri=Array.isArray,Co=i=>Ri(i)||typeof i?.[Symbol.iterator]=="function",He=`[
2
+ \f\r]`,Kt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$i=/-->/g,Ei=/>/g,wt=RegExp(`>|${He}(?:([^\\s"'>=/]+)(${He}*=${He}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Ci=/'/g,Ii=/"/g,Di=/^(?:script|style|textarea|title)$/i,Ti=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),U=Ti(1),Lr=Ti(2),rt=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),Oi=new WeakMap,At=_t.createTreeWalker(_t,129,null,!1);function ki(i,t){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Si!==void 0?Si.createHTML(t):t}var Io=(i,t)=>{let e=i.length-1,o=[],r,s=t===2?"<svg>":"",n=Kt;for(let l=0;l<e;l++){let a=i[l],c,d,h=-1,u=0;for(;u<a.length&&(n.lastIndex=u,d=n.exec(a),d!==null);)u=n.lastIndex,n===Kt?d[1]==="!--"?n=$i:d[1]!==void 0?n=Ei:d[2]!==void 0?(Di.test(d[2])&&(r=RegExp("</"+d[2],"g")),n=wt):d[3]!==void 0&&(n=wt):n===wt?d[0]===">"?(n=r??Kt,h=-1):d[1]===void 0?h=-2:(h=n.lastIndex-d[2].length,c=d[1],n=d[3]===void 0?wt:d[3]==='"'?Ii:Ci):n===Ii||n===Ci?n=wt:n===$i||n===Ei?n=Kt:(n=wt,r=void 0);let p=n===wt&&i[l+1].startsWith("/>")?" ":"";s+=n===Kt?a+Eo:h>=0?(o.push(c),a.slice(0,h)+We+a.slice(h)+ht+p):a+ht+(h===-2?(o.push(void 0),l):p)}return[ki(i,s+(i[e]||"<?>")+(t===2?"</svg>":"")),o]},Gt=class i{constructor({strings:t,_$litType$:e},o){let r;this.parts=[];let s=0,n=0,l=t.length-1,a=this.parts,[c,d]=Io(t,e);if(this.el=i.createElement(c,o),At.currentNode=this.el.content,e===2){let h=this.el.content,u=h.firstChild;u.remove(),h.append(...u.childNodes)}for(;(r=At.nextNode())!==null&&a.length<l;){if(r.nodeType===1){if(r.hasAttributes()){let h=[];for(let u of r.getAttributeNames())if(u.endsWith(We)||u.startsWith(ht)){let p=d[n++];if(h.push(u),p!==void 0){let y=r.getAttribute(p.toLowerCase()+We).split(ht),m=/([.?@])?(.*)/.exec(p);a.push({type:1,index:s,name:m[2],strings:y,ctor:m[1]==="."?je:m[1]==="?"?ze:m[1]==="@"?qe:Mt})}else a.push({type:6,index:s})}for(let u of h)r.removeAttribute(u)}if(Di.test(r.tagName)){let h=r.textContent.split(ht),u=h.length-1;if(u>0){r.textContent=kt?kt.emptyScript:"";for(let p=0;p<u;p++)r.append(h[p],Xt()),At.nextNode(),a.push({type:2,index:++s});r.append(h[u],Xt())}}}else if(r.nodeType===8)if(r.data===Li)a.push({type:2,index:s});else{let h=-1;for(;(h=r.data.indexOf(ht,h+1))!==-1;)a.push({type:7,index:s}),h+=ht.length-1}s++}}static createElement(t,e){let o=_t.createElement("template");return o.innerHTML=t,o}};function Bt(i,t,e=i,o){var r,s,n,l;if(t===rt)return t;let a=o!==void 0?(r=e._$Co)===null||r===void 0?void 0:r[o]:e._$Cl,c=Yt(t)?void 0:t._$litDirective$;return a?.constructor!==c&&((s=a?._$AO)===null||s===void 0||s.call(a,!1),c===void 0?a=void 0:(a=new c(i),a._$AT(i,e,o)),o!==void 0?((n=(l=e)._$Co)!==null&&n!==void 0?n:l._$Co=[])[o]=a:e._$Cl=a),a!==void 0&&(t=Bt(i,a._$AS(i,t.values),a,o)),t}var Ue=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;let{el:{content:o},parts:r}=this._$AD,s=((e=t?.creationScope)!==null&&e!==void 0?e:_t).importNode(o,!0);At.currentNode=s;let n=At.nextNode(),l=0,a=0,c=r[0];for(;c!==void 0;){if(l===c.index){let d;c.type===2?d=new Jt(n,n.nextSibling,this,t):c.type===1?d=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(d=new Ve(n,this,t)),this._$AV.push(d),c=r[++a]}l!==c?.index&&(n=At.nextNode(),l++)}return At.currentNode=_t,s}v(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},Jt=class i{constructor(t,e,o,r){var s;this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=r,this._$Cp=(s=r?.isConnected)===null||s===void 0||s}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Bt(this,t,e),Yt(t)?t===w||t==null||t===""?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==rt&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Co(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==w&&Yt(this._$AH)?this._$AA.nextSibling.data=t:this.$(_t.createTextNode(t)),this._$AH=t}g(t){var e;let{values:o,_$litType$:r}=t,s=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Gt.createElement(ki(r.h,r.h[0]),this.options)),r);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===s)this._$AH.v(o);else{let n=new Ue(s,this),l=n.u(this.options);n.v(o),this.$(l),this._$AH=n}}_$AC(t){let e=Oi.get(t.strings);return e===void 0&&Oi.set(t.strings,e=new Gt(t)),e}T(t){Ri(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,r=0;for(let s of t)r===e.length?e.push(o=new i(this.k(Xt()),this.k(Xt()),this,this.options)):o=e[r],o._$AI(s),r++;r<e.length&&(this._$AR(o&&o._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var o;for((o=this._$AP)===null||o===void 0||o.call(this,!1,!0,e);t&&t!==this._$AB;){let r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}},Mt=class{constructor(t,e,o,r,s){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=s,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=w}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,o,r){let s=this.strings,n=!1;if(s===void 0)t=Bt(this,t,e,0),n=!Yt(t)||t!==this._$AH&&t!==rt,n&&(this._$AH=t);else{let l=t,a,c;for(t=s[0],a=0;a<s.length-1;a++)c=Bt(this,l[o+a],e,a),c===rt&&(c=this._$AH[a]),n||(n=!Yt(c)||c!==this._$AH[a]),c===w?t=w:t!==w&&(t+=(c??"")+s[a+1]),this._$AH[a]=c}n&&!r&&this.j(t)}j(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},je=class extends Mt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===w?void 0:t}},Oo=kt?kt.emptyScript:"",ze=class extends Mt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==w?this.element.setAttribute(this.name,Oo):this.element.removeAttribute(this.name)}},qe=class extends Mt{constructor(t,e,o,r,s){super(t,e,o,r,s),this.type=5}_$AI(t,e=this){var o;if((t=(o=Bt(this,t,e,0))!==null&&o!==void 0?o:w)===rt)return;let r=this._$AH,s=t===w&&r!==w||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==w&&(r===w||s);s&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,o;typeof this._$AH=="function"?this._$AH.call((o=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&o!==void 0?o:this.element,t):this._$AH.handleEvent(t)}},Ve=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){Bt(this,t)}};var Pi=ve.litHtmlPolyfillSupport;Pi?.(Gt,Jt),((Ne=ve.litHtmlVersions)!==null&&Ne!==void 0?Ne:ve.litHtmlVersions=[]).push("2.8.0");var Bi=(i,t,e)=>{var o,r;let s=(o=e?.renderBefore)!==null&&o!==void 0?o:t,n=s._$litPart$;if(n===void 0){let l=(r=e?.renderBefore)!==null&&r!==void 0?r:null;s._$litPart$=n=new Jt(t.insertBefore(Xt(),l),l,void 0,e??{})}return n._$AI(i),n};var Fe,Ke;var q=class extends ot{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;let o=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=o.firstChild),o}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Bi(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return rt}};q.finalized=!0,q._$litElement$=!0,(Fe=globalThis.litElementHydrateSupport)===null||Fe===void 0||Fe.call(globalThis,{LitElement:q});var Mi=globalThis.litElementPolyfillSupport;Mi?.({LitElement:q});((Ke=globalThis.litElementVersions)!==null&&Ke!==void 0?Ke:globalThis.litElementVersions=[]).push("3.3.3");var Po=(i,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,i)}},Lo=(i,t,e)=>{t.constructor.createProperty(e,i)};function f(i){return(t,e)=>e!==void 0?Lo(i,t,e):Po(i,t)}var $="top",L="bottom",O="right",I="left",ge="auto",pt=[$,L,O,I],st="start",St="end",Ni="clippingParents",be="viewport",Nt="popper",Hi="reference",Xe=pt.reduce(function(i,t){return i.concat([t+"-"+st,t+"-"+St])},[]),xe=[].concat(pt,[ge]).reduce(function(i,t){return i.concat([t,t+"-"+st,t+"-"+St])},[]),Ro="beforeRead",Do="read",To="afterRead",ko="beforeMain",Bo="main",Mo="afterMain",No="beforeWrite",Ho="write",Wo="afterWrite",Wi=[Ro,Do,To,ko,Bo,Mo,No,Ho,Wo];function T(i){return i?(i.nodeName||"").toLowerCase():null}function _(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var t=i.ownerDocument;return t&&t.defaultView||window}return i}function F(i){var t=_(i).Element;return i instanceof t||i instanceof Element}function R(i){var t=_(i).HTMLElement;return i instanceof t||i instanceof HTMLElement}function Ht(i){if(typeof ShadowRoot>"u")return!1;var t=_(i).ShadowRoot;return i instanceof t||i instanceof ShadowRoot}function Uo(i){var t=i.state;Object.keys(t.elements).forEach(function(e){var o=t.styles[e]||{},r=t.attributes[e]||{},s=t.elements[e];!R(s)||!T(s)||(Object.assign(s.style,o),Object.keys(r).forEach(function(n){var l=r[n];l===!1?s.removeAttribute(n):s.setAttribute(n,l===!0?"":l)}))})}function jo(i){var t=i.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(o){var r=t.elements[o],s=t.attributes[o]||{},n=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:e[o]),l=n.reduce(function(a,c){return a[c]="",a},{});!R(r)||!T(r)||(Object.assign(r.style,l),Object.keys(s).forEach(function(a){r.removeAttribute(a)}))})}}var Ui={name:"applyStyles",enabled:!0,phase:"write",fn:Uo,effect:jo,requires:["computeStyles"]};function k(i){return i.split("-")[0]}var Z=Math.max,$t=Math.min,nt=Math.round;function Wt(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Zt(){return!/^((?!chrome|android).)*safari/i.test(Wt())}function K(i,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var o=i.getBoundingClientRect(),r=1,s=1;t&&R(i)&&(r=i.offsetWidth>0&&nt(o.width)/i.offsetWidth||1,s=i.offsetHeight>0&&nt(o.height)/i.offsetHeight||1);var n=F(i)?_(i):window,l=n.visualViewport,a=!Zt()&&e,c=(o.left+(a&&l?l.offsetLeft:0))/r,d=(o.top+(a&&l?l.offsetTop:0))/s,h=o.width/r,u=o.height/s;return{width:h,height:u,top:d,right:c+h,bottom:d+u,left:c,x:c,y:d}}function Et(i){var t=K(i),e=i.offsetWidth,o=i.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:i.offsetLeft,y:i.offsetTop,width:e,height:o}}function Qt(i,t){var e=t.getRootNode&&t.getRootNode();if(i.contains(t))return!0;if(e&&Ht(e)){var o=t;do{if(o&&i.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function j(i){return _(i).getComputedStyle(i)}function Ye(i){return["table","td","th"].indexOf(T(i))>=0}function M(i){return((F(i)?i.ownerDocument:i.document)||window.document).documentElement}function at(i){return T(i)==="html"?i:i.assignedSlot||i.parentNode||(Ht(i)?i.host:null)||M(i)}function ji(i){return!R(i)||j(i).position==="fixed"?null:i.offsetParent}function zo(i){var t=/firefox/i.test(Wt()),e=/Trident/i.test(Wt());if(e&&R(i)){var o=j(i);if(o.position==="fixed")return null}var r=at(i);for(Ht(r)&&(r=r.host);R(r)&&["html","body"].indexOf(T(r))<0;){var s=j(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function Q(i){for(var t=_(i),e=ji(i);e&&Ye(e)&&j(e).position==="static";)e=ji(e);return e&&(T(e)==="html"||T(e)==="body"&&j(e).position==="static")?t:e||zo(i)||t}function Ct(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function It(i,t,e){return Z(i,$t(t,e))}function zi(i,t,e){var o=It(i,t,e);return o>e?e:o}function te(){return{top:0,right:0,bottom:0,left:0}}function ee(i){return Object.assign({},te(),i)}function ie(i,t){return t.reduce(function(e,o){return e[o]=i,e},{})}var qo=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,ee(typeof t!="number"?t:ie(t,pt))};function Vo(i){var t,e=i.state,o=i.name,r=i.options,s=e.elements.arrow,n=e.modifiersData.popperOffsets,l=k(e.placement),a=Ct(l),c=[I,O].indexOf(l)>=0,d=c?"height":"width";if(!(!s||!n)){var h=qo(r.padding,e),u=Et(s),p=a==="y"?$:I,y=a==="y"?L:O,m=e.rects.reference[d]+e.rects.reference[a]-n[a]-e.rects.popper[d],g=n[a]-e.rects.reference[a],A=Q(s),E=A?a==="y"?A.clientHeight||0:A.clientWidth||0:0,C=m/2-g/2,v=h[p],b=E-u[d]-h[y],x=E/2-u[d]/2+C,S=It(v,x,b),B=a;e.modifiersData[o]=(t={},t[B]=S,t.centerOffset=S-x,t)}}function Fo(i){var t=i.state,e=i.options,o=e.element,r=o===void 0?"[data-popper-arrow]":o;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||Qt(t.elements.popper,r)&&(t.elements.arrow=r))}var qi={name:"arrow",enabled:!0,phase:"main",fn:Vo,effect:Fo,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function X(i){return i.split("-")[1]}var Ko={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xo(i,t){var e=i.x,o=i.y,r=t.devicePixelRatio||1;return{x:nt(e*r)/r||0,y:nt(o*r)/r||0}}function Vi(i){var t,e=i.popper,o=i.popperRect,r=i.placement,s=i.variation,n=i.offsets,l=i.position,a=i.gpuAcceleration,c=i.adaptive,d=i.roundOffsets,h=i.isFixed,u=n.x,p=u===void 0?0:u,y=n.y,m=y===void 0?0:y,g=typeof d=="function"?d({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var A=n.hasOwnProperty("x"),E=n.hasOwnProperty("y"),C=I,v=$,b=window;if(c){var x=Q(e),S="clientHeight",B="clientWidth";if(x===_(e)&&(x=M(e),j(x).position!=="static"&&l==="absolute"&&(S="scrollHeight",B="scrollWidth")),x=x,r===$||(r===I||r===O)&&s===St){v=L;var D=h&&x===b&&b.visualViewport?b.visualViewport.height:x[S];m-=D-o.height,m*=a?1:-1}if(r===I||(r===$||r===L)&&s===St){C=O;var P=h&&x===b&&b.visualViewport?b.visualViewport.width:x[B];p-=P-o.width,p*=a?1:-1}}var N=Object.assign({position:l},c&&Ko),G=d===!0?Xo({x:p,y:m},_(e)):{x:p,y:m};if(p=G.x,m=G.y,a){var W;return Object.assign({},N,(W={},W[v]=E?"0":"",W[C]=A?"0":"",W.transform=(b.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",W))}return Object.assign({},N,(t={},t[v]=E?m+"px":"",t[C]=A?p+"px":"",t.transform="",t))}function Yo(i){var t=i.state,e=i.options,o=e.gpuAcceleration,r=o===void 0?!0:o,s=e.adaptive,n=s===void 0?!0:s,l=e.roundOffsets,a=l===void 0?!0:l,c={placement:k(t.placement),variation:X(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Vi(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:n,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Vi(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Fi={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Yo,data:{}};var ye={passive:!0};function Go(i){var t=i.state,e=i.instance,o=i.options,r=o.scroll,s=r===void 0?!0:r,n=o.resize,l=n===void 0?!0:n,a=_(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&c.forEach(function(d){d.addEventListener("scroll",e.update,ye)}),l&&a.addEventListener("resize",e.update,ye),function(){s&&c.forEach(function(d){d.removeEventListener("scroll",e.update,ye)}),l&&a.removeEventListener("resize",e.update,ye)}}var Ki={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Go,data:{}};var Jo={left:"right",right:"left",bottom:"top",top:"bottom"};function Ut(i){return i.replace(/left|right|bottom|top/g,function(t){return Jo[t]})}var Zo={start:"end",end:"start"};function we(i){return i.replace(/start|end/g,function(t){return Zo[t]})}function Ot(i){var t=_(i),e=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:e,scrollTop:o}}function Pt(i){return K(M(i)).left+Ot(i).scrollLeft}function Ge(i,t){var e=_(i),o=M(i),r=e.visualViewport,s=o.clientWidth,n=o.clientHeight,l=0,a=0;if(r){s=r.width,n=r.height;var c=Zt();(c||!c&&t==="fixed")&&(l=r.offsetLeft,a=r.offsetTop)}return{width:s,height:n,x:l+Pt(i),y:a}}function Je(i){var t,e=M(i),o=Ot(i),r=(t=i.ownerDocument)==null?void 0:t.body,s=Z(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),n=Z(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-o.scrollLeft+Pt(i),a=-o.scrollTop;return j(r||e).direction==="rtl"&&(l+=Z(e.clientWidth,r?r.clientWidth:0)-s),{width:s,height:n,x:l,y:a}}function Lt(i){var t=j(i),e=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+o)}function Ae(i){return["html","body","#document"].indexOf(T(i))>=0?i.ownerDocument.body:R(i)&&Lt(i)?i:Ae(at(i))}function ut(i,t){var e;t===void 0&&(t=[]);var o=Ae(i),r=o===((e=i.ownerDocument)==null?void 0:e.body),s=_(o),n=r?[s].concat(s.visualViewport||[],Lt(o)?o:[]):o,l=t.concat(n);return r?l:l.concat(ut(at(n)))}function jt(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function Qo(i,t){var e=K(i,!1,t==="fixed");return e.top=e.top+i.clientTop,e.left=e.left+i.clientLeft,e.bottom=e.top+i.clientHeight,e.right=e.left+i.clientWidth,e.width=i.clientWidth,e.height=i.clientHeight,e.x=e.left,e.y=e.top,e}function Xi(i,t,e){return t===be?jt(Ge(i,e)):F(t)?Qo(t,e):jt(Je(M(i)))}function tr(i){var t=ut(at(i)),e=["absolute","fixed"].indexOf(j(i).position)>=0,o=e&&R(i)?Q(i):i;return F(o)?t.filter(function(r){return F(r)&&Qt(r,o)&&T(r)!=="body"}):[]}function Ze(i,t,e,o){var r=t==="clippingParents"?tr(i):[].concat(t),s=[].concat(r,[e]),n=s[0],l=s.reduce(function(a,c){var d=Xi(i,c,o);return a.top=Z(d.top,a.top),a.right=$t(d.right,a.right),a.bottom=$t(d.bottom,a.bottom),a.left=Z(d.left,a.left),a},Xi(i,n,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function oe(i){var t=i.reference,e=i.element,o=i.placement,r=o?k(o):null,s=o?X(o):null,n=t.x+t.width/2-e.width/2,l=t.y+t.height/2-e.height/2,a;switch(r){case $:a={x:n,y:t.y-e.height};break;case L:a={x:n,y:t.y+t.height};break;case O:a={x:t.x+t.width,y:l};break;case I:a={x:t.x-e.width,y:l};break;default:a={x:t.x,y:t.y}}var c=r?Ct(r):null;if(c!=null){var d=c==="y"?"height":"width";switch(s){case st:a[c]=a[c]-(t[d]/2-e[d]/2);break;case St:a[c]=a[c]+(t[d]/2-e[d]/2);break;default:}}return a}function tt(i,t){t===void 0&&(t={});var e=t,o=e.placement,r=o===void 0?i.placement:o,s=e.strategy,n=s===void 0?i.strategy:s,l=e.boundary,a=l===void 0?Ni:l,c=e.rootBoundary,d=c===void 0?be:c,h=e.elementContext,u=h===void 0?Nt:h,p=e.altBoundary,y=p===void 0?!1:p,m=e.padding,g=m===void 0?0:m,A=ee(typeof g!="number"?g:ie(g,pt)),E=u===Nt?Hi:Nt,C=i.rects.popper,v=i.elements[y?E:u],b=Ze(F(v)?v:v.contextElement||M(i.elements.popper),a,d,n),x=K(i.elements.reference),S=oe({reference:x,element:C,strategy:"absolute",placement:r}),B=jt(Object.assign({},C,S)),D=u===Nt?B:x,P={top:b.top-D.top+A.top,bottom:D.bottom-b.bottom+A.bottom,left:b.left-D.left+A.left,right:D.right-b.right+A.right},N=i.modifiersData.offset;if(u===Nt&&N){var G=N[r];Object.keys(P).forEach(function(W){var vt=[O,L].indexOf(W)>=0?1:-1,gt=[$,L].indexOf(W)>=0?"y":"x";P[W]+=G[gt]*vt})}return P}function Qe(i,t){t===void 0&&(t={});var e=t,o=e.placement,r=e.boundary,s=e.rootBoundary,n=e.padding,l=e.flipVariations,a=e.allowedAutoPlacements,c=a===void 0?xe:a,d=X(o),h=d?l?Xe:Xe.filter(function(y){return X(y)===d}):pt,u=h.filter(function(y){return c.indexOf(y)>=0});u.length===0&&(u=h);var p=u.reduce(function(y,m){return y[m]=tt(i,{placement:m,boundary:r,rootBoundary:s,padding:n})[k(m)],y},{});return Object.keys(p).sort(function(y,m){return p[y]-p[m]})}function er(i){if(k(i)===ge)return[];var t=Ut(i);return[we(i),t,we(t)]}function ir(i){var t=i.state,e=i.options,o=i.name;if(!t.modifiersData[o]._skip){for(var r=e.mainAxis,s=r===void 0?!0:r,n=e.altAxis,l=n===void 0?!0:n,a=e.fallbackPlacements,c=e.padding,d=e.boundary,h=e.rootBoundary,u=e.altBoundary,p=e.flipVariations,y=p===void 0?!0:p,m=e.allowedAutoPlacements,g=t.options.placement,A=k(g),E=A===g,C=a||(E||!y?[Ut(g)]:er(g)),v=[g].concat(C).reduce(function(Tt,dt){return Tt.concat(k(dt)===ge?Qe(t,{placement:dt,boundary:d,rootBoundary:h,padding:c,flipVariations:y,allowedAutoPlacements:m}):dt)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,B=!0,D=v[0],P=0;P<v.length;P++){var N=v[P],G=k(N),W=X(N)===st,vt=[$,L].indexOf(G)>=0,gt=vt?"width":"height",V=tt(t,{placement:N,boundary:d,rootBoundary:h,altBoundary:u,padding:c}),J=vt?W?O:I:W?L:$;b[gt]>x[gt]&&(J=Ut(J));var ae=Ut(J),bt=[];if(s&&bt.push(V[G]<=0),l&&bt.push(V[J]<=0,V[ae]<=0),bt.every(function(Tt){return Tt})){D=N,B=!1;break}S.set(N,bt)}if(B)for(var le=y?3:1,Ce=function(dt){var Vt=v.find(function(ce){var xt=S.get(ce);if(xt)return xt.slice(0,dt).every(function(Ie){return Ie})});if(Vt)return D=Vt,"break"},qt=le;qt>0;qt--){var de=Ce(qt);if(de==="break")break}t.placement!==D&&(t.modifiersData[o]._skip=!0,t.placement=D,t.reset=!0)}}var Yi={name:"flip",enabled:!0,phase:"main",fn:ir,requiresIfExists:["offset"],data:{_skip:!1}};function Gi(i,t,e){return e===void 0&&(e={x:0,y:0}),{top:i.top-t.height-e.y,right:i.right-t.width+e.x,bottom:i.bottom-t.height+e.y,left:i.left-t.width-e.x}}function Ji(i){return[$,O,L,I].some(function(t){return i[t]>=0})}function or(i){var t=i.state,e=i.name,o=t.rects.reference,r=t.rects.popper,s=t.modifiersData.preventOverflow,n=tt(t,{elementContext:"reference"}),l=tt(t,{altBoundary:!0}),a=Gi(n,o),c=Gi(l,r,s),d=Ji(a),h=Ji(c);t.modifiersData[e]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}var Zi={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:or};function rr(i,t,e){var o=k(i),r=[I,$].indexOf(o)>=0?-1:1,s=typeof e=="function"?e(Object.assign({},t,{placement:i})):e,n=s[0],l=s[1];return n=n||0,l=(l||0)*r,[I,O].indexOf(o)>=0?{x:l,y:n}:{x:n,y:l}}function sr(i){var t=i.state,e=i.options,o=i.name,r=e.offset,s=r===void 0?[0,0]:r,n=xe.reduce(function(d,h){return d[h]=rr(h,t.rects,s),d},{}),l=n[t.placement],a=l.x,c=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=c),t.modifiersData[o]=n}var Qi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:sr};function nr(i){var t=i.state,e=i.name;t.modifiersData[e]=oe({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var to={name:"popperOffsets",enabled:!0,phase:"read",fn:nr,data:{}};function ti(i){return i==="x"?"y":"x"}function ar(i){var t=i.state,e=i.options,o=i.name,r=e.mainAxis,s=r===void 0?!0:r,n=e.altAxis,l=n===void 0?!1:n,a=e.boundary,c=e.rootBoundary,d=e.altBoundary,h=e.padding,u=e.tether,p=u===void 0?!0:u,y=e.tetherOffset,m=y===void 0?0:y,g=tt(t,{boundary:a,rootBoundary:c,padding:h,altBoundary:d}),A=k(t.placement),E=X(t.placement),C=!E,v=Ct(A),b=ti(v),x=t.modifiersData.popperOffsets,S=t.rects.reference,B=t.rects.popper,D=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,P=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,G={x:0,y:0};if(x){if(s){var W,vt=v==="y"?$:I,gt=v==="y"?L:O,V=v==="y"?"height":"width",J=x[v],ae=J+g[vt],bt=J-g[gt],le=p?-B[V]/2:0,Ce=E===st?S[V]:B[V],qt=E===st?-B[V]:-S[V],de=t.elements.arrow,Tt=p&&de?Et(de):{width:0,height:0},dt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:te(),Vt=dt[vt],ce=dt[gt],xt=It(0,S[V],Tt[V]),Ie=C?S[V]/2-le-xt-Vt-P.mainAxis:Ce-xt-Vt-P.mainAxis,uo=C?-S[V]/2+le+xt+ce+P.mainAxis:qt+xt+ce+P.mainAxis,Oe=t.elements.arrow&&Q(t.elements.arrow),fo=Oe?v==="y"?Oe.clientTop||0:Oe.clientLeft||0:0,hi=(W=N?.[v])!=null?W:0,mo=J+Ie-hi-fo,vo=J+uo-hi,pi=It(p?$t(ae,mo):ae,J,p?Z(bt,vo):bt);x[v]=pi,G[v]=pi-J}if(l){var ui,go=v==="x"?$:I,bo=v==="x"?L:O,yt=x[b],he=b==="y"?"height":"width",fi=yt+g[go],mi=yt-g[bo],Pe=[$,I].indexOf(A)!==-1,vi=(ui=N?.[b])!=null?ui:0,gi=Pe?fi:yt-S[he]-B[he]-vi+P.altAxis,bi=Pe?yt+S[he]+B[he]-vi-P.altAxis:mi,xi=p&&Pe?zi(gi,yt,bi):It(p?gi:fi,yt,p?bi:mi);x[b]=xi,G[b]=xi-yt}t.modifiersData[o]=G}}var eo={name:"preventOverflow",enabled:!0,phase:"main",fn:ar,requiresIfExists:["offset"]};function ei(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function ii(i){return i===_(i)||!R(i)?Ot(i):ei(i)}function lr(i){var t=i.getBoundingClientRect(),e=nt(t.width)/i.offsetWidth||1,o=nt(t.height)/i.offsetHeight||1;return e!==1||o!==1}function oi(i,t,e){e===void 0&&(e=!1);var o=R(t),r=R(t)&&lr(t),s=M(t),n=K(i,r,e),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!e)&&((T(t)!=="body"||Lt(s))&&(l=ii(t)),R(t)?(a=K(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):s&&(a.x=Pt(s))),{x:n.left+l.scrollLeft-a.x,y:n.top+l.scrollTop-a.y,width:n.width,height:n.height}}function dr(i){var t=new Map,e=new Set,o=[];i.forEach(function(s){t.set(s.name,s)});function r(s){e.add(s.name);var n=[].concat(s.requires||[],s.requiresIfExists||[]);n.forEach(function(l){if(!e.has(l)){var a=t.get(l);a&&r(a)}}),o.push(s)}return i.forEach(function(s){e.has(s.name)||r(s)}),o}function ri(i){var t=dr(i);return Wi.reduce(function(e,o){return e.concat(t.filter(function(r){return r.phase===o}))},[])}function si(i){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(i())})})),t}}function ni(i){var t=i.reduce(function(e,o){var r=e[o.name];return e[o.name]=r?Object.assign({},r,o,{options:Object.assign({},r.options,o.options),data:Object.assign({},r.data,o.data)}):o,e},{});return Object.keys(t).map(function(e){return t[e]})}var io={placement:"bottom",modifiers:[],strategy:"absolute"};function oo(){for(var i=arguments.length,t=new Array(i),e=0;e<i;e++)t[e]=arguments[e];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function ro(i){i===void 0&&(i={});var t=i,e=t.defaultModifiers,o=e===void 0?[]:e,r=t.defaultOptions,s=r===void 0?io:r;return function(l,a,c){c===void 0&&(c=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},io,s),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},h=[],u=!1,p={state:d,setOptions:function(A){var E=typeof A=="function"?A(d.options):A;m(),d.options=Object.assign({},s,d.options,E),d.scrollParents={reference:F(l)?ut(l):l.contextElement?ut(l.contextElement):[],popper:ut(a)};var C=ri(ni([].concat(o,d.options.modifiers)));return d.orderedModifiers=C.filter(function(v){return v.enabled}),y(),p.update()},forceUpdate:function(){if(!u){var A=d.elements,E=A.reference,C=A.popper;if(oo(E,C)){d.rects={reference:oi(E,Q(C),d.options.strategy==="fixed"),popper:Et(C)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(P){return d.modifiersData[P.name]=Object.assign({},P.data)});for(var v=0;v<d.orderedModifiers.length;v++){if(d.reset===!0){d.reset=!1,v=-1;continue}var b=d.orderedModifiers[v],x=b.fn,S=b.options,B=S===void 0?{}:S,D=b.name;typeof x=="function"&&(d=x({state:d,options:B,name:D,instance:p})||d)}}}},update:si(function(){return new Promise(function(g){p.forceUpdate(),g(d)})}),destroy:function(){m(),u=!0}};if(!oo(l,a))return p;p.setOptions(c).then(function(g){!u&&c.onFirstUpdate&&c.onFirstUpdate(g)});function y(){d.orderedModifiers.forEach(function(g){var A=g.name,E=g.options,C=E===void 0?{}:E,v=g.effect;if(typeof v=="function"){var b=v({state:d,name:A,instance:p,options:C}),x=function(){};h.push(b||x)}})}function m(){h.forEach(function(g){return g()}),h=[]}return p}}var cr=[Ki,to,Fi,Ui,Qi,Yi,eo,qi,Zi],ai=ro({defaultModifiers:cr});var so={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},no=i=>(...t)=>({_$litDirective$:i,values:t}),_e=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var re=class extends _e{constructor(t){if(super(t),this.et=w,t.type!==so.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===w||t==null)return this.ft=void 0,this.et=t;if(t===rt)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;let e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}};re.directiveName="unsafeHTML",re.resultType=1;var ao=no(re);var se=i=>i??w;var Se=class{static showImage(t,e,o,r){let s;if(r||!(t instanceof HTMLImageElement)?s=n=>t.style.backgroundImage=this.prepareSrc(n):s=n=>t.src=n,s(o),e){let n=()=>{s(e)},l=new Image;l.addEventListener("load",n),l.src=e,l.complete&&(l.removeEventListener("load",n),n())}}static prepareSrc(t){return t?t.startsWith("url")?t:`url("${t}")`:null}};var hr=':host{display:block;contain:strict;height:50px}:host([selected]){background-color:#d3e6fa}:host(:not([selected]):hover),:host(:not([selected])[focused]){background-color:#e7f1fa}@media (forced-colors: active){:host([selected]){outline:4px solid}:host(:not([selected]):hover){outline:4px dotted}:host(:not([selected])[focused]){outline:4px dashed}}:host([enable-line-clamp]) .labels>:only-child{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;word-wrap:break-word}.container{display:flex;height:100%;box-sizing:border-box}.container .level-indicator{width:7px;height:100%}.container .level-indicator.level-0{background-color:#a0c3ef}.container .level-indicator.level-1{background-color:#e7c374}.container .level-indicator.level-2{background-color:#bfd596}.container .level-indicator.level-3{background-color:#fd998d}.container .level-indicator.level-4{background-color:#c6e8f5}.container .level-indicator.level-5{background-color:#fde3a4}.container .level-indicator.level-6{background-color:#dcbfe0}.side-content{display:flex;align-items:center;flex-grow:0}.labels{display:flex;flex-direction:column;justify-content:center;flex:1 1 0px;height:100%;line-height:normal;overflow:hidden;padding:var(--sd-list-item-label-content-padding, 0 8px)}.caption,.description{width:100%;font-family:var(--sd-list-item-font-family, "Segoe UI", "Lucida Sans", Arial, sans-serif);font-style:normal;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;user-select:none;text-decoration:var(--sd-list-item-text-decoration, inherit)}.caption em,.description em{font-weight:bolder}.caption{font-size:var(--sd-list-item-caption-font-size, 16px);color:var(--sd-list-item-caption-text-color, #111);font-weight:var(--sd-list-item-caption-font-weight, normal)}.description{font-size:var(--sd-list-item-description-font-size, 13px);color:var(--sd-list-item-description-text-color, #767676);font-weight:var(--sd-list-item-description-font-weight, normal)}.icon-wrapper{width:var(--sd-list-item-icon-wrapper-width, 45px);height:100%;display:flex;align-items:center;justify-content:center}.icon-wrapper .icon{min-height:var(--sd-list-item-icon-size, 24px);min-width:var(--sd-list-item-icon-size, 24px);background-repeat:no-repeat;background-position:center;background-size:cover}',pr=Object.defineProperty,ur=Object.getOwnPropertyDescriptor,z=(i,t,e,o)=>{for(var r=o>1?void 0:o?ur(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(r=(o?n(t,e,r):n(r))||r);return o&&r&&pr(t,e,r),r},Rt,H=(Rt=class extends q{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[ct`
4
+ ${it(hr)}
5
+ `]}render(){return U`
6
+ <div class="container">
7
+ ${this.getLevelIndicators().map((i,t)=>U` <div class="level-indicator level-${t}"></div> `)}
8
+ <div class="side-content">
9
+ <slot name="left-content"></slot>
10
+ ${this.renderIcon()}
11
+ </div>
12
+ <div class="labels">
13
+ ${this.renderLabel("caption",this.caption,this.captionAttrTitle)}
14
+ ${this.renderLabel("description",this.description,this.descriptionAttrTitle)}
15
+ </div>
16
+ <div class="side-content">
17
+ <slot name="right-content"></slot>
18
+ </div>
19
+ </div>
20
+ `}renderIcon(){if(this.icon||this.iconPlaceholder){let i=this.iconBackgroundColor!=null?`background-color:${this.iconBackgroundColor}`:void 0;return U`
21
+ <div
22
+ class="icon-wrapper"
23
+ @pointerdown="${this.handleIconClick}"
24
+ style="${se(i)}"
25
+ role="img"
26
+ aria-label="${se(this.iconAttrAriaLabel)}"
27
+ title="${se(this.iconAttrTitle)}"
28
+ >
29
+ <div class="icon"></div>
30
+ </div>
31
+ `}return w}renderLabel(i,t,e){return t?U`
32
+ <div class="${i}" title="${se(e)}">
33
+ ${this.contentMode==="html"?ao(t):t}
34
+ </div>
35
+ `:w}updated(i){super.updated(i),(i.has("icon")||i.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&Se.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),i.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){let i=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let t=0,e=this.shadowRoot.querySelector(".caption");e&&(t+=e.scrollWidth-e.clientWidth);let o=this.shadowRoot.querySelector(".description");return o&&(t=Math.max(t,o.scrollWidth-o.clientWidth)),t>0&&t++,i&&this.setAttribute("enable-line-clamp",""),t}handleIconClick(i){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",i))&&i.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},Rt.ID="sd-list-item",Rt.ensureDefined=()=>{customElements.get(Rt.ID)||customElements.define(Rt.ID,Rt)},Rt);z([f({type:String})],H.prototype,"caption",2);z([f({type:String})],H.prototype,"description",2);z([f({type:Boolean})],H.prototype,"selected",2);z([f({type:String})],H.prototype,"icon",2);z([f({type:String})],H.prototype,"iconBackgroundColor",2);z([f({type:String})],H.prototype,"iconPlaceholder",2);z([f({type:Number})],H.prototype,"level",2);z([f()],H.prototype,"contentMode",2);z([f({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],H.prototype,"enableLineClamp",2);z([f({type:Boolean,reflect:!0,attribute:"aria-disabled"})],H.prototype,"disabled",2);z([f({type:String,attribute:"icon-attr-aria-label"})],H.prototype,"iconAttrAriaLabel",2);z([f({type:String,reflect:!0})],H.prototype,"role",2);z([f({type:String,attribute:"caption-attr-title"})],H.prototype,"captionAttrTitle",2);z([f({type:String,attribute:"description-attr-title"})],H.prototype,"descriptionAttrTitle",2);z([f({type:String,attribute:"icon-attr-title"})],H.prototype,"iconAttrTitle",2);var Dt=H,lo=(i,t)=>{let e=document.createElement(Dt.ID);if(i){if(e.caption=i.caption,e.description=i.description,e.icon=i.icon,e.iconBackgroundColor=i.iconBackgroundColor,e.iconPlaceholder=i.iconPlaceholder,e.level=i.level,e.disabled=i.disabled,i.contentMode&&(e.contentMode=i.contentMode),i.leftContentGenerator){let o=i.leftContentGenerator(i,e);o&&(o.slot="left-content",e.appendChild(o))}if(i.rightContentGenerator){let o=i.rightContentGenerator(i,e);o&&(o.slot="right-content",e.appendChild(o))}}return e};Dt.ensureDefined();var li=class{getOffsetForIndexAndAlignment(t,e,o,r,s,n){let l=Math.max(0,n*r),a=Math.min(l,t*r),c=Math.max(0,t*r-s+r);switch(e){case"start":return a;case"end":return c;case"center":{let d=Math.round(c+(a-c)/2);return d<Math.ceil(s/2)?0:d>l+Math.floor(s/2)?l:d}case"auto":default:return o>=c&&o<=a?o:o<c?c:a}}debounce(t){let e;return(...o)=>{e&&window.cancelAnimationFrame(e),e=window.requestAnimationFrame(()=>{t(...o),e=null})}}},fr=new li,$e=class{constructor(t=100,e=5){this.pageSize=t,this.preloadedItemsCount=e,this._finalSizeIsKnown=!1,this._itemCache=[],this._lastRequestedFirstIndex=0,this._lastRequestedLastIndex=0,this._lastLoadedIndex=0,this.handleListDataRequest=o=>{let{startIndex:r,stopIndex:s}=o.detail;this._lastRequestedFirstIndex=r,this._lastRequestedLastIndex=s,this._list.items=this._itemCache.slice(r,s+1),!this.finalSizeIsKnown&&this._lastLoadedIndex<s+this.preloadedItemsCount&&this.requestData()},this.itemCount=t}get currentPage(){return this.items.length==0&&this.finalSizeIsKnown?0:Math.floor((this.items.length-1)/this.pageSize)}get finalSizeIsKnown(){return this._finalSizeIsKnown}set finalSizeIsKnown(t){this._finalSizeIsKnown=t,t&&(this.itemCount=this._itemCache.length),this._list&&(this._list.finalSizeIsKnown=t)}get itemCount(){return this._itemCount}set itemCount(t){this._itemCount=t,this._list&&(this._list.itemCount=t)}get items(){return this._itemCache}set items(t){this._itemCache=t,this.onItemsChange()}addItems(t){this._itemCache=this._itemCache.concat(t),this.onItemsChange()}connectList(t){this._list&&this._list.removeEventListener("data-request",this.handleListDataRequest),this._list=t,t.itemCount=this.itemCount,t.addEventListener("data-request",this.handleListDataRequest),t.finalSizeIsKnown=this._finalSizeIsKnown}onItemsChange(){this._pendingDataRequest=!1,this._lastLoadedIndex=this._itemCache.length-1,this.finalSizeIsKnown?this.itemCount=this._itemCache.length:this._lastLoadedIndex>this.itemCount&&(this.itemCount=this._lastLoadedIndex),this._list&&(this._list.items=this._itemCache.slice(this._lastRequestedFirstIndex,this._lastRequestedLastIndex+1))}requestData(){if(!this._pendingDataRequest)if(this.onDataRequest)this._pendingDataRequest=!0,this.onDataRequest(this.currentPage+1),this._lastLoadedIndex+=this.pageSize-1,this._lastLoadedIndex>this.itemCount&&(this.itemCount=this._lastLoadedIndex);else throw Error("The final size is not yet known and the list would require item data from index "+this._lastRequestedFirstIndex+". to "+this._lastRequestedLastIndex+". which is not possible to load without a configured onDataRequest")}},mr=":host{display:block;position:relative;contain:layout}:host(:focus){outline:none}:host(:focus-visible) ::slotted([focused]){box-shadow:0 0 0 1px #1467ba inset}.container{width:100%}.container>::slotted(*){width:100%;position:absolute;box-sizing:border-box}.container>::slotted(:not([last])){border-bottom:1px solid #d9d9d9}",vr=Object.defineProperty,gr=Object.getOwnPropertyDescriptor,mt=(i,t,e,o)=>{for(var r=o>1?void 0:o?gr(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(r=(o?n(t,e,r):n(r))||r);return o&&r&&vr(t,e,r),r},di=(i=>(i.TriggerOnly="trigger-only",i.Single="single",i.Multi="multi",i))(di||{}),br=0,ft,lt=(ft=class extends q{constructor(){super(),this.items=[],this.selectionType="trigger-only",this.id=ft.ID+"_"+br++,this.role="listbox",this.itemGenerator=lo,this._lastKnownScrollTop=0,this._lastRenderedScrollTop=0,this._itemsRenderData=[],this._elementCache=new Map,this._visibleItemsNum=0,this._selectedIndices=[],this._focusIndex=-1,this._lastKnownHeight=0,this.onScroll=()=>{this._lastKnownScrollTop=this.scrollTop;let i=this._lastRenderedScrollTop-this._lastKnownScrollTop;Math.abs(i)>=this.itemHeight&&(this._lastRenderedScrollTop=this._lastKnownScrollTop,this.requestUpdate())},this.handleKeyDown=i=>{let t=!0;switch(i.key){case"Down":case"ArrowDown":this.focusIndex=this.normalizeIndex(this.focusIndex+1);break;case"Up":case"ArrowUp":this.focusIndex=this.normalizeIndex(this.focusIndex-1);break;case"Enter":this.handleSelection(this.focusIndex,i.metaKey||i.ctrlKey);break;case"End":this.focusIndex=this.itemCount-1;break;case"PageDown":this.focusIndex=this.normalizeIndex(this.focusIndex+this._visibleItemsNum-1);break;case"Home":this.focusIndex=0;break;case"PageUp":this.focusIndex=this.normalizeIndex(this.focusIndex-this._visibleItemsNum+1);break;default:t=!1;break}t&&(i.preventDefault(),i.stopPropagation())},this._resizeObserver=new ResizeObserver(()=>{this._lastKnownHeight!==this.offsetHeight&&(this._lastKnownHeight=this.offsetHeight,this.requestUpdate())})}get focusTarget(){return this.hasAttribute("focus-target")}set focusTarget(i){this.toggleAttribute("focus-target",i)}get focusIndex(){return this._focusIndex}set focusIndex(i){if(i>=-1&&i<this.itemCount){let t=this._focusIndex;this._focusIndex=i,(i<=this._firstVisibleIndex||this._lastVisibleIndex<=i)&&this.scrollToItem(i),t!=i&&(i==-1&&this.removeAttribute("aria-activedescendant"),this.requestUpdate("focusIndex",t))}}get selectedIndices(){return this._selectedIndices}set selectedIndices(i){i?this._selectedIndices=i.map(t=>Number(t)):this._selectedIndices=[],this.requestUpdate("selectedIndices")}scrollToItem(i,t="auto"){this.scrollTop=fr.getOffsetForIndexAndAlignment(this.normalizeIndex(i),t,this.scrollTop,this.itemHeight,this.height,this.itemCount),this._lastKnownScrollTop=this.scrollTop}getListItem(i){return!this.shadowRoot||i<this._firstVisibleIndex||this._lastVisibleIndex<i?null:this.querySelector(`[item-index="${i}"]`)}connectedCallback(){super.connectedCallback(),this._resizeObserver.observe(this),this.scrollTop!==this._lastKnownScrollTop&&(this.scrollTop=this._lastKnownScrollTop,this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.disconnect()}firstUpdated(i){super.firstUpdated(i),this.addEventListener("scroll",this.onScroll),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick),this.addEventListener("mousedown",t=>{t.button==1&&t.preventDefault()}),this.addEventListener("auxclick",this.handleClick),this.addEventListener("focus",()=>{this.matches(":focus-visible")&&(this.focusIndex==-1?(this.selectedIndices&&(this.focusIndex=this.selectedIndices[0]),this.focusIndex==-1&&this.itemCount>0&&(this.focusIndex=0)):this.updateFocusedItemAttributes())}),this.addEventListener("blur",()=>{this.focusIndex!=-1&&this.updateFocusedItemAttributes()}),this.selectedIndices.length>0&&this.scrollToItem(this.selectedIndices[0],"center")}updateFocusedItemAttributes(){let i=this.getListItem(this.focusIndex);i&&(this.focusTarget||document.activeElement==this?(i.setAttribute("focused",""),this.setAttribute("aria-activedescendant",i.id)):(i.removeAttribute("focused"),this.removeAttribute("aria-activedescendant")))}static get styles(){return[ct`
36
+ ${it(mr)}
37
+ `]}render(){return this.updateItemsRenderData(),U`
38
+ <div class="container" style="height: ${this.itemCount*this.itemHeight}px">
39
+ <slot name="items"></slot>
40
+ </div>
41
+ `}updated(i){if(super.updated(i),this._lastRenderedScrollTop=this._lastKnownScrollTop,this.updateItems(),(this._increaseWidthOnNextRenderIfNeeded||this._reachedMaxWidth)&&this._firstVisibleIndex<this._lastVisibleIndex)if(this.querySelector("[item-index]"))this.adjustWidthIfNeeded();else{let t=new MutationObserver(()=>{this.adjustWidthIfNeeded(),t.disconnect()});t.observe(this)}}adjustWidthIfNeeded(){this._increaseWidthOnNextRenderIfNeeded?(this._increaseWidthOnNextRenderIfNeeded=!1,window.requestAnimationFrame(()=>{let i=Number.parseInt(getComputedStyle(this).maxWidth)-this.offsetWidth;if(i==0)this._reachedMaxWidth=!0,this.enableLineClampOnItemsIfNeeded();else{this._reachedMaxWidth=!1;let t=[...this.querySelectorAll("[item-index]")].map(o=>{if(o instanceof Dt){o.enableLineClamp=!1;let r=o.missingWidthForTexts;return r>i&&(o.enableLineClamp=!0),r}}),e=Math.max(...t);e>0&&(this.style.width=`${this.offsetWidth+e}px`)}})):this._reachedMaxWidth&&this.enableLineClampOnItemsIfNeeded()}enableLineClampOnItemsIfNeeded(){this.querySelectorAll("[item-index]").forEach(i=>{i instanceof Dt&&(i.enableLineClamp=i.enableLineClamp||i.missingWidthForTexts>0)})}increaseWidthOnNextRenderIfNeeded(){this._increaseWidthOnNextRenderIfNeeded=!0}updateItems(){let i=[...this.querySelectorAll("[item-index]")],t=new Map,e=document.createDocumentFragment();for(let o of this._itemsRenderData){let r=this.renderItem(o);r.parentElement||e.appendChild(r),t.set(o.dataHash,r);let s=i.indexOf(r);s!==-1&&i.splice(s,1)}this.appendChild(e);for(let o of i)o instanceof Dt&&(o.enableLineClamp=!1),this.removeChild(o);t.forEach((o,r)=>{this._elementCache.set(r,o)})}renderItem({index:i,top:t,dataHash:e,data:o}){let r;return o?this._elementCache.has(e)?(r=this._elementCache.get(e),this._elementCache.delete(e)):(r=this.itemGenerator(o,i),r.setAttribute("slot","items")):(r=document.createElement("div"),r.setAttribute("placeholder-item",""),r.setAttribute("slot","items")),Object.assign(r.style,{transform:`translateY(${t}px)`,height:`${this.itemHeight}px`}),r.setAttribute("item-index",i.toString()),r.setAttribute("aria-setsize",String(this.finalSizeIsKnown?this.itemCount:-1)),r.setAttribute("aria-posinset",String(i+1)),(!r.id||r.id.startsWith(this.id+"_item_"))&&(r.id=this.id+"_item_"+i),this.itemCount-1==i?r.setAttribute("last",""):r.removeAttribute("last"),this.updateSelectedAttribute(i,r),this.updateFocusedAttribute(i,r),r}updateFocusedAttribute(i,t){this.focusIndex==i&&(this.focusTarget||document.activeElement==this)?(t.setAttribute("focused",""),this.setAttribute("aria-activedescendant",t.id)):t.removeAttribute("focused")}updateSelectedAttribute(i,t){let e=this.selectedIndices.indexOf(i)!==-1;e?t.setAttribute("selected",""):t.removeAttribute("selected"),t.setAttribute("aria-selected",String(e))}updateItemsRenderData(){if(this._itemsRenderData=[],this._visibleItemsNum=Math.min(Math.ceil(this.height/this.itemHeight),this.itemCount),this._visibleItemsNum>0){this._firstVisibleIndex=this.normalizeIndex(Math.floor(this._lastKnownScrollTop/this.itemHeight)),this._lastVisibleIndex=this.normalizeIndex(this._firstVisibleIndex+this._visibleItemsNum);let i=this.normalizeIndex(this._firstVisibleIndex-2),t=this.normalizeIndex(this._lastVisibleIndex+2);this.requestData(i,t);for(let e=i;e<=t;e++){let o=e-i,r=this.items[o],s;r?s=JSON.stringify(r):s=`placeholder-${o}`,this._itemsRenderData.push({index:e,top:this.itemHeight*e,physicalIndex:o,dataHash:s,data:r})}}else this._firstVisibleIndex=0,this._lastVisibleIndex=0}normalizeIndex(i){return Math.max(0,Math.min(i,this.itemCount-1))}get height(){return this.offsetHeight}requestData(i,t){!Number.isNaN(i)&&!Number.isNaN(t)&&this.dispatchEvent(new CustomEvent("data-request",{detail:{startIndex:i,stopIndex:t}}))}handleSelection(i,t){if(i<0||this.itemCount<=i)return;let e=i%this._visibleItemsNum,o=this.items[e];if(!o||o.disabled)return;let r=!0;if(this.selectionType!=="trigger-only"){let s=this.selectedIndices.indexOf(i);r=s==-1,r?this.selectionType==="single"?this.selectedIndices=[i]:this.selectedIndices.push(i):this.selectedIndices.splice(s,1),this.requestUpdate("selectedIndices")}this.focusIndex=i,this.dispatchSelectionEvent(i,r,t)}dispatchSelectionEvent(i,t,e){this.dispatchEvent(new CustomEvent("selection",{detail:{index:i,selected:t,hasModifier:e}}))}handleClick(i){let t=i.composedPath().find(e=>e.hasAttribute&&e.hasAttribute("item-index"));if(t){let e=parseInt(t.getAttribute("item-index"));if(Number.isInteger(e)){if(i.button==0||i.button==1){let o=i.type=="auxclick"&&i.button==1||i.metaKey||i.ctrlKey;this.handleSelection(e,o)}this.focusIndex=e}}}},ft.ID="sd-virtual-list",ft.ensureDefined=()=>{Dt.ensureDefined(),customElements.get(ft.ID)||customElements.define(ft.ID,ft)},ft);mt([f({type:Number,attribute:"item-height",reflect:!0})],lt.prototype,"itemHeight",2);mt([f({type:Number})],lt.prototype,"itemCount",2);mt([f({type:Array,attribute:!1})],lt.prototype,"items",2);mt([f({type:String,attribute:"selection-type",reflect:!0,noAccessor:!0})],lt.prototype,"selectionType",2);mt([f({type:String,attribute:!0,reflect:!0})],lt.prototype,"id",2);mt([f({type:String,reflect:!0})],lt.prototype,"role",2);mt([f({type:Number,attribute:"focus-index",reflect:!0})],lt.prototype,"focusIndex",1);mt([f({type:Array,attribute:!1})],lt.prototype,"selectedIndices",1);var Ee=lt;Ee.ensureDefined();var xr=":host{contain:content;outline:none}:host(:not([selected])) .text{opacity:.8}:host(:hover),:host(:focus),:host([anchors-shown]){background-color:var(--sd-tab-bar-hover-color, #e7f1fa);cursor:pointer}.root{position:relative;overflow:hidden;width:100%;height:100%;display:flex;align-items:center;justify-content:flex-start;padding:var(--sd-tab-bar-padding, 8px) calc(2 * var(--sd-tab-bar-padding, 8px));box-sizing:border-box}.counter{text-align:center;background-color:#d9d9d9;min-width:24px;height:24px;line-height:24px;margin-left:calc(-.5 * var(--sd-tab-bar-padding, 8px));margin-right:var(--sd-tab-bar-padding, 8px)}:host([selected]) .counter{color:var(--sd-tab-bar-selected-counter-color, white);background-color:var(--sd-tab-bar-selected-counter-background-color, #3b85d1)}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex-grow:1}.down-arrow{padding-left:calc(1.5 * var(--sd-tab-bar-padding, 8px));margin-right:calc(-1 * var(--sd-tab-bar-padding, 8px));outline:none;fill:var(--sd-tab-bar-color, #1467ba);flex:0 0 auto}.ripple{position:absolute;background:var(--sd-tab-bar-color, #1467ba);border-radius:50%;width:5px;height:5px;animation:rippleEffect .88s 1;opacity:0}@keyframes rippleEffect{0%{transform:scale(1);opacity:.4}to{transform:scale(100);opacity:0}}",yr=Object.defineProperty,wr=Object.getOwnPropertyDescriptor,ne=(i,t,e,o)=>{for(var r=o>1?void 0:o?wr(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(r=(o?n(t,e,r):n(r))||r);return o&&r&&yr(t,e,r),r},co=navigator.userAgent.indexOf("Trident")!==-1,po=class extends q{constructor(){super(...arguments),this.minimumOverlayWidth=150,this.handleKeyDown=t=>{this.hasAnchors?(this.vertical?["Left","ArrowLeft","Right","ArrowRight","Enter"]:["Down","ArrowDown","Up","ArrowUp","Enter"]).indexOf(t.key)===-1?(this.hideAnchors(),this.focus()):(this.anchorsShown||(this.showAnchors(),window.requestAnimationFrame(()=>{this.list.focusIndex=0,this.list.focus(),this.updateDropdownSizes()})),t.preventDefault(),t.stopPropagation()):t.key==="Enter"&&(this.dispatchSelectionEvent(),t.preventDefault(),t.stopPropagation())},this.handleListSelection=t=>{this.hideAnchors(),t.stopPropagation(),this.dispatchSelectionEvent(this.anchors[t.detail.index]),this.focus()},this.handlePointerLeave=t=>{(co||this.list&&!this.list.contains(t.target))&&window.addEventListener("pointermove",this.handlePointerMove)},this.handlePointerMove=t=>{!this.isPointerAbove(t,this)&&!this.isPointerAbove(t,this.list)&&(this.hideAnchors(),window.removeEventListener("pointermove",this.handlePointerMove))}}get selected(){return this.hasAttribute("selected")}set selected(t){if(t)this.setAttribute("selected","");else if(this.removeAttribute("selected"),this.shadowRoot&&this.showRipple){let e=this.shadowRoot.querySelector(".ripple");e.style.display="none",this.showRipple=!1}}firstUpdated(t){super.firstUpdated(t);let e=window.CSS&&window.CSS.supports;this._cssMathMaxSupported=e&&CSS.supports("max-width","max(50vw)");let o=this.ownerDocument;o.adoptedStyleSheets&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,...o.adoptedStyleSheets]),this.addEventListener("pointerdown",r=>{if(!this.noInk&&!this.showRipple){this.showRipple=!0;let s=this.getBoundingClientRect(),n=this.shadowRoot.querySelector(".ripple");n.style.left=`${r.clientX-s.left}px`,n.style.top=`${r.clientY-s.top}px`,n.style.display="",n.addEventListener("animationend",()=>{n.style.display="none",this.showRipple=!1},{once:!0})}}),this.addEventListener("click",r=>{r.composedPath().indexOf(this.list)===-1&&(this.dispatchSelectionEvent(),r.preventDefault(),r.stopPropagation())}),this.addEventListener("keydown",this.handleKeyDown),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}disconnectedCallback(){super.disconnectedCallback(),this.hideAnchors()}static get styles(){return[ct`
42
+ ${it(xr)}
43
+ `]}render(){return U`
44
+ <div class="root" @pointerover=${this.showAnchors} @pointerdown=${this.showAnchors}>
45
+ ${this.showCounter?U` <span class="counter">${this.index+1}</span> `:""}
46
+ <div class="text">${this.text}</div>
47
+ <div class="ripple" style="display: none"></div>
48
+ ${this.hasAnchors?U`
49
+ <svg class="down-arrow" tabindex="-1" viewBox="0 0 16 16" width="16" height="16">
50
+ <path d="M13 4v2l-5 5-5-5v-2l5 5z"></path>
51
+ </svg>
52
+ `:""}
53
+ </div>
54
+ `}updateDropdownSizes(){let t=((window.innerHeight||document.documentElement.clientHeight)-this.offsetHeight)*.5;Object.assign(this.list.style,{maxHeight:`${t}px`,minWidth:`${Math.max(this.offsetWidth,this.minimumOverlayWidth)}px`,maxWidth:this._cssMathMaxSupported?`max(50vw, ${this.offsetWidth}px)`:Math.max((window.innerWidth||document.documentElement.clientWidth)/2,this.offsetWidth)+"px"})}dispatchSelectionEvent(t){this.dispatchEvent(new CustomEvent("selection",{detail:{anchor:t}}))}isPointerAbove(t,e){let o=e.getBoundingClientRect();return o.left<=t.clientX&&o.right>=t.clientX&&o.top<=t.clientY&&o.bottom>=t.clientY}showAnchors(){!this.anchorsShown&&this.hasAnchors&&(this.root.addEventListener("pointerleave",this.handlePointerLeave),this.list||this.createList(),this.dataProvider.items=this.anchors.map((t,e)=>({caption:t,index:e})),this.updateDropdownSizes(),this.ownerDocument.body.appendChild(this.list),this.popper||(this.popper=ai(this,this.list,{placement:this.vertical?"right-start":"bottom-start",modifiers:[{name:"computeStyles",options:{gpuAcceleration:!co}},{name:"hide",enabled:!1},{name:"preventOverflow",options:{padding:0}},{name:"adjustWidthIfNeeded",enabled:!0,phase:"read",fn({state:t}){t.elements.popper.increaseWidthOnNextRenderIfNeeded()}}]})),window.requestAnimationFrame(()=>{this.popper&&this.popper.update()}),this.anchorsShown=!0)}createList(){this.list=document.createElement(Ee.ID),this.dataProvider=new $e,this.dataProvider.finalSizeIsKnown=!0,this.dataProvider.connectList(this.list),this.list.classList.add("anchor-list"),this.list.tabIndex=0,this.list.selectionType=di.TriggerOnly,this.list.addEventListener("selection",this.handleListSelection),this.list.addEventListener("keydown",t=>{t.key=="Escape"&&(this.hideAnchors(),this.focus())}),this.list.addEventListener("focusout",()=>{this.hideAnchors()}),this.list.setAttribute("slot","anchors"),this.list.itemHeight=50,Object.assign(this.list.style,{zIndex:"21000",boxShadow:`rgba(0, 0, 0, 0.14) 0px 2px 2px 0px,
55
+ rgba(0, 0, 0, 0.12) 0px 1px 5px 0px,
56
+ rgba(0, 0, 0, 0.2) 0px 3px 1px -2px`,background:"white",overflowY:"auto"})}hideAnchors(){this.anchorsShown&&(this.anchorsShown=!1,this.root.removeEventListener("pointerleave",this.handlePointerLeave),this.list&&(this.list.focusIndex=-1,this.list.parentElement.removeChild(this.list))),this.popper&&(this.popper.destroy(),this.popper=null)}get hasAnchors(){return!!(this.anchors&&this.anchors.length)}get root(){return this.shadowRoot?this.shadowRoot.querySelector(".root"):null}};po.ID="sd-tab";var Y=po;ne([f({type:String})],Y.prototype,"text",2);ne([f({type:Array})],Y.prototype,"anchors",2);ne([f()],Y.prototype,"index",2);ne([f()],Y.prototype,"showCounter",2);ne([f({type:Boolean,reflect:!0,attribute:"anchors-shown"})],Y.prototype,"anchorsShown",2);Ee.ensureDefined();customElements.get(Y.ID)||customElements.define(Y.ID,Y);var Ar=":host{display:block;outline:none;contain:content}:host([vertical]) .tab-button-container{flex-direction:column}:host([vertical]) .slider{top:0;width:2px}:host(:not([vertical])) .slider{bottom:0;height:2px}.root{display:flex;width:100%;overflow:hidden}.tab-button-container{display:flex;flex-wrap:nowrap;overflow:hidden;position:relative;flex:1 1 auto}@supports (scrollbar-width: none){:host(:not([vertical])) .tab-button-container{overflow-x:auto;scrollbar-width:none}:host(:not([vertical])) .tab-button-container::-webkit-scrollbar{display:none}}@supports selector(::-webkit-scrollbar){:host(:not([vertical])) .tab-button-container{overflow-x:auto;scrollbar-width:none}:host(:not([vertical])) .tab-button-container::-webkit-scrollbar{display:none}}:host([vertical]) .root{height:100%}:host([vertical]) .tab-button-container{overflow-y:auto;height:100%}:host([vertical]) ::slotted(*){flex-shrink:0;flex-grow:0}.slider{background-color:var(--sd-tab-bar-color, #1467ba);position:absolute;left:0}:host(:not([no-slide])) .slider,:host([no-slide=false]) .slider{transition-duration:var(--sd-tab-bar-slide-duration, .5s)}.scroll-button{cursor:pointer;padding:4px;position:relative;flex:0 0 auto;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 2px #00000024,0 1px 5px #0000001f,0 3px 1px -2px #0003}.scroll-button>svg{width:24px;height:24px;fill:var(--sd-tab-bar-color, #1467ba)}.ripple{position:absolute;left:0;top:0;background-position:center;transition:background-color .88s;opacity:.4;width:100%;height:100%;border-radius:50%}.ripple:active{background-color:var(--sd-tab-bar-color, #1467ba);background-size:100%;transition:background-color 0s}",_r=Object.defineProperty,Sr=Object.getOwnPropertyDescriptor,zt=(i,t,e,o)=>{for(var r=o>1?void 0:o?Sr(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(r=(o?n(t,e,r):n(r))||r);return o&&r&&_r(t,e,r),r},ho=40,ci=class extends q{constructor(){super(...arguments),this.handleSlotChange=()=>{this.tabElements=this.shadowRoot.querySelector("slot").assignedNodes().filter(e=>e instanceof Y);let t=0;this.tabElements.forEach(e=>{e.vertical=this.vertical,e.showCounter=this.showCounter,e.index=t++,e.addEventListener("focus",this.handleTabFocus),e.addEventListener("selection",this.handleTabSelection)}),this.updateScrollButtonVisibility(),this.selectedIndex==null&&(this._focusedIndex=0,this._selectedIndex=0),this.updateSelectionState()},this.handleTabFocus=t=>{let e=t.target.index;this.focusedIndex!==e&&(this._focusedIndex=e,this.scrollToFocusedIfNeeded())},this.handleTabSelection=t=>{this.selectedIndex=t.target.index,this.dispatchSelectionEvent(t.detail.anchor)},this.handleKeyDown=t=>{switch(t.key){case"Up":case"ArrowUp":case"Left":case"ArrowLeft":t.preventDefault(),this.focusedIndex=Math.max(this.focusedIndex-1,0);break;case"Down":case"ArrowDown":case"Right":case"ArrowRight":t.preventDefault(),this.focusedIndex=Math.min(this.focusedIndex+1,this.tabElements.length-1);break}},this.debounced={}}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.debounce("update-scroll-button-visibility",()=>{this.lastKnownWidth!==this.offsetWidth&&(this.lastKnownWidth=this.offsetWidth,this.updateScrollButtonVisibility())})}),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect()}firstUpdated(t){super.firstUpdated(t);let e=this.ownerDocument;e.adoptedStyleSheets&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,...e.adoptedStyleSheets]),this.shadowRoot.querySelector("slot").addEventListener("slotchange",this.handleSlotChange),this.addEventListener("keydown",this.handleKeyDown),this.tabButtonContainer.addEventListener("wheel",o=>{if(this.tabButtonContainer.scrollWidth>this.tabButtonContainer.offsetWidth){let r=document.elementsFromPoint(o.x,o.y)[0];this.tabButtonContainer.scrollLeft+=o.deltaY;let s=document.elementsFromPoint(o.x,o.y)[0];r!=s&&(r instanceof Y&&r.hideAnchors(),s instanceof Y&&s.showAnchors()),o.preventDefault()}})}static get styles(){return[ct`
57
+ ${it(Ar)}
58
+ `]}render(){return U`
59
+ <div class="root">
60
+ ${!this.vertical&&this.showLeftScrollButton?U`
61
+ <div class="scroll-button left" @pointerdown="${()=>{this.tabButtonContainer.scrollLeft-=ho}}">
62
+ <div class="ripple"></div>
63
+ <svg><g><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path></g></svg>
64
+ </div>`:""}
65
+ <div class="tab-button-container" @scroll="${this.updateScrollButtonVisibility}">
66
+ <slot></slot>
67
+ ${this.noBar?"":U` <div class="slider"></div>`}
68
+ </div>
69
+ ${!this.vertical&&this.showRightScrollButton?U`
70
+ <div class="scroll-button right" @pointerdown="${()=>{this.tabButtonContainer.scrollLeft+=ho}}">
71
+ <div class="ripple"></div>
72
+ <svg><g><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></g></svg>
73
+ </div>`:""}
74
+ </div>
75
+ `}set selectedIndex(t){this._selectedIndex!==t&&(this.focusedIndex=t,this._selectedIndex=t,this.updateSelectionState())}get selectedIndex(){return this._selectedIndex}updateSelectionState(){this.tabElements&&this.tabElements.forEach((t,e)=>{e===this._selectedIndex?(t.selected=!0,this.slider&&window.requestAnimationFrame(()=>{let o=t.offsetLeft,r=t.offsetTop;t.offsetParent!=this._tabButtonContainer&&(o-=this._tabButtonContainer.offsetLeft,r-=this._tabButtonContainer.offsetTop);let s=this.slider;this.vertical?(s.style.height=t.offsetHeight+"px",s.style.transform=`translateY(${r}px)`):(s.style.width=t.offsetWidth+"px",s.style.transform=`translateX(${o}px)`)})):t.selected=!1})}set focusedIndex(t){this._focusedIndex!==t&&(this._focusedIndex=t,this.updateFocusedState())}get focusedIndex(){return this._focusedIndex}updateFocusedState(){this.tabElements&&this.focusedIndex>=0&&this.focusedIndex<this.tabElements.length&&(this.scrollToFocusedIfNeeded(),this.tabElements[this.focusedIndex].focus())}get slider(){return this.shadowRoot.querySelector(".slider")}get tabButtonContainer(){return this._tabButtonContainer||(this._tabButtonContainer=this.shadowRoot.querySelector(".tab-button-container")),this._tabButtonContainer}scrollToFocusedIfNeeded(){if(this.tabElements&&this.focusedIndex>=0&&this.focusedIndex<this.tabElements.length){let t=this.tabElements[this.focusedIndex],e=t.offsetLeft;t.offsetParent!=this._tabButtonContainer&&(e-=this._tabButtonContainer.offsetLeft);let o=t.offsetWidth,r=e+o;if(e>this.tabButtonContainer.scrollLeft&&r<this.tabButtonContainer.scrollLeft+this.tabButtonContainer.offsetWidth)return;this.tabButtonContainer.scrollLeft<e?this.tabButtonContainer.scrollLeft=r-this.tabButtonContainer.offsetWidth:this.tabButtonContainer.scrollLeft+this.tabButtonContainer.offsetWidth>r&&(this.tabButtonContainer.scrollLeft=e)}}updateScrollButtonVisibility(){this.showLeftScrollButton=this.tabButtonContainer.scrollLeft!==0,this.showRightScrollButton=this.tabButtonContainer.scrollLeft<this.tabButtonContainer.scrollWidth-this.tabButtonContainer.offsetWidth}dispatchSelectionEvent(t){this.dispatchEvent(new CustomEvent("selection",{detail:{selectedTab:{index:this.selectedIndex,tabElement:this.tabElements[this.selectedIndex]},anchor:t}}))}debounce(t,e){this.debounced[t]||(this.debounced[t]=!0,requestAnimationFrame(()=>{delete this.debounced[t],e()}))}};ci.ID="sd-tab-bar",ci.shadowRootOptions={...q.shadowRootOptions,delegatesFocus:!0};var et=ci;zt([f({type:Boolean,reflect:!0,attribute:"no-bar"})],et.prototype,"noBar",2);zt([f({type:Boolean,reflect:!0,attribute:"no-slide"})],et.prototype,"noSlide",2);zt([f({type:Boolean,reflect:!0})],et.prototype,"vertical",2);zt([f({type:Boolean,reflect:!0,attribute:"show-counter"})],et.prototype,"showCounter",2);zt([f()],et.prototype,"showLeftScrollButton",2);zt([f()],et.prototype,"showRightScrollButton",2);customElements.get(et.ID)||customElements.define(et.ID,et);return So($r);})();
76
+ /*! Bundled license information:
77
+
78
+ @lit/reactive-element/css-tag.js:
79
+ (**
80
+ * @license
81
+ * Copyright 2019 Google LLC
82
+ * SPDX-License-Identifier: BSD-3-Clause
83
+ *)
84
+
85
+ @lit/reactive-element/reactive-element.js:
86
+ (**
87
+ * @license
88
+ * Copyright 2017 Google LLC
89
+ * SPDX-License-Identifier: BSD-3-Clause
90
+ *)
91
+
92
+ lit-html/lit-html.js:
93
+ (**
94
+ * @license
95
+ * Copyright 2017 Google LLC
96
+ * SPDX-License-Identifier: BSD-3-Clause
97
+ *)
98
+
99
+ lit-element/lit-element.js:
100
+ (**
101
+ * @license
102
+ * Copyright 2017 Google LLC
103
+ * SPDX-License-Identifier: BSD-3-Clause
104
+ *)
105
+
106
+ lit-html/is-server.js:
107
+ (**
108
+ * @license
109
+ * Copyright 2022 Google LLC
110
+ * SPDX-License-Identifier: BSD-3-Clause
111
+ *)
112
+
113
+ @lit/reactive-element/decorators/property.js:
114
+ (**
115
+ * @license
116
+ * Copyright 2017 Google LLC
117
+ * SPDX-License-Identifier: BSD-3-Clause
118
+ *)
119
+
120
+ lit-html/directive.js:
121
+ (**
122
+ * @license
123
+ * Copyright 2017 Google LLC
124
+ * SPDX-License-Identifier: BSD-3-Clause
125
+ *)
126
+
127
+ lit-html/directives/unsafe-html.js:
128
+ (**
129
+ * @license
130
+ * Copyright 2017 Google LLC
131
+ * SPDX-License-Identifier: BSD-3-Clause
132
+ *)
133
+
134
+ lit-html/directives/if-defined.js:
135
+ (**
136
+ * @license
137
+ * Copyright 2018 Google LLC
138
+ * SPDX-License-Identifier: BSD-3-Clause
139
+ *)
140
+ */
141
+ //# sourceMappingURL=tab-bar-with-externals.js.map