@cas-smartdesign/combo-box 7.4.2 → 7.5.0
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.
- package/dist/combo-box-with-externals.js +30 -60
- package/dist/combo-box-with-externals.js.map +4 -4
- package/dist/combo-box.mjs +75 -82
- package/dist/combo-box.mjs.map +1 -1
- package/dist/docs/2_basic-examples.js +1 -1
- package/dist/docs/6_validation_example.js +1 -1
- package/dist/docs/doc.css +1 -1
- package/dist/docs/doc.mjs +96 -99
- package/npm-third-party-licenses.json +52 -47
- package/package.json +10 -9
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var window;(window||={})["@cas-smartdesign/combo-box"]=(()=>{var
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Bi=/'/g,Ri=/"/g,zi=/^(?:script|style|textarea|title)$/i,Fi=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),T=Fi(1),Ys=Fi(2),dt=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),ki=new WeakMap,Et=$t.createTreeWalker($t,129,null,!1);function qi(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Di!==void 0?Di.createHTML(t):t}var Bo=(e,t)=>{let i=e.length-1,o=[],s,r=t===2?"<svg>":"",n=te;for(let l=0;l<i;l++){let a=e[l],c,d,p=-1,f=0;for(;f<a.length&&(n.lastIndex=f,d=n.exec(a),d!==null);)f=n.lastIndex,n===te?d[1]==="!--"?n=Ti:d[1]!==void 0?n=Vi:d[2]!==void 0?(zi.test(d[2])&&(s=RegExp("</"+d[2],"g")),n=It):d[3]!==void 0&&(n=It):n===It?d[0]===">"?(n=s??te,p=-1):d[1]===void 0?p=-2:(p=n.lastIndex-d[2].length,c=d[1],n=d[3]===void 0?It:d[3]==='"'?Ri:Bi):n===Ri||n===Bi?n=It:n===Ti||n===Vi?n=te:(n=It,s=void 0);let u=n===It&&e[l+1].startsWith("/>")?" ":"";r+=n===te?a+To:p>=0?(o.push(c),a.slice(0,p)+Ge+a.slice(p)+vt+u):a+vt+(p===-2?(o.push(void 0),l):u)}return[qi(e,r+(e[i]||"<?>")+(t===2?"</svg>":"")),o]},oe=class e{constructor({strings:t,_$litType$:i},o){let s;this.parts=[];let r=0,n=0,l=t.length-1,a=this.parts,[c,d]=Bo(t,i);if(this.el=e.createElement(c,o),Et.currentNode=this.el.content,i===2){let p=this.el.content,f=p.firstChild;f.remove(),p.append(...f.childNodes)}for(;(s=Et.nextNode())!==null&&a.length<l;){if(s.nodeType===1){if(s.hasAttributes()){let p=[];for(let f of s.getAttributeNames())if(f.endsWith(Ge)||f.startsWith(vt)){let u=d[n++];if(p.push(f),u!==void 0){let w=s.getAttribute(u.toLowerCase()+Ge).split(vt),m=/([.?@])?(.*)/.exec(u);a.push({type:1,index:r,name:m[2],strings:w,ctor:m[1]==="."?Ye:m[1]==="?"?Je:m[1]==="@"?Qe:Ft})}else a.push({type:6,index:r})}for(let f of p)s.removeAttribute(f)}if(zi.test(s.tagName)){let p=s.textContent.split(vt),f=p.length-1;if(f>0){s.textContent=Ht?Ht.emptyScript:"";for(let u=0;u<f;u++)s.append(p[u],ee()),Et.nextNode(),a.push({type:2,index:++r});s.append(p[f],ee())}}}else if(s.nodeType===8)if(s.data===Ni)a.push({type:2,index:r});else{let p=-1;for(;(p=s.data.indexOf(vt,p+1))!==-1;)a.push({type:7,index:r}),p+=vt.length-1}r++}}static createElement(t,i){let o=$t.createElement("template");return o.innerHTML=t,o}};function zt(e,t,i=e,o){var s,r,n,l;if(t===dt)return t;let a=o!==void 0?(s=i._$Co)===null||s===void 0?void 0:s[o]:i._$Cl,c=ie(t)?void 0:t._$litDirective$;return a?.constructor!==c&&((r=a?._$AO)===null||r===void 0||r.call(a,!1),c===void 0?a=void 0:(a=new c(e),a._$AT(e,i,o)),o!==void 0?((n=(l=i)._$Co)!==null&&n!==void 0?n:l._$Co=[])[o]=a:i._$Cl=a),a!==void 0&&(t=zt(e,a._$AS(e,t.values),a,o)),t}var Xe=class{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;let{el:{content:o},parts:s}=this._$AD,r=((i=t?.creationScope)!==null&&i!==void 0?i:$t).importNode(o,!0);Et.currentNode=r;let n=Et.nextNode(),l=0,a=0,c=s[0];for(;c!==void 0;){if(l===c.index){let d;c.type===2?d=new se(n,n.nextSibling,this,t):c.type===1?d=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(d=new Ze(n,this,t)),this._$AV.push(d),c=s[++a]}l!==c?.index&&(n=Et.nextNode(),l++)}return Et.currentNode=$t,r}v(t){let i=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,i),i+=o.strings.length-2):o._$AI(t[i])),i++}},se=class e{constructor(t,i,o,s){var r;this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=o,this.options=s,this._$Cp=(r=s?.isConnected)===null||r===void 0||r}get _$AU(){var t,i;return(i=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&i!==void 0?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode,i=this._$AM;return i!==void 0&&t?.nodeType===11&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=zt(this,t,i),ie(t)?t===y||t==null||t===""?(this._$AH!==y&&this._$AR(),this._$AH=y):t!==this._$AH&&t!==dt&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Vo(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!==y&&ie(this._$AH)?this._$AA.nextSibling.data=t:this.$($t.createTextNode(t)),this._$AH=t}g(t){var i;let{values:o,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=oe.createElement(qi(s.h,s.h[0]),this.options)),s);if(((i=this._$AH)===null||i===void 0?void 0:i._$AD)===r)this._$AH.v(o);else{let n=new Xe(r,this),l=n.u(this.options);n.v(o),this.$(l),this._$AH=n}}_$AC(t){let i=ki.get(t.strings);return i===void 0&&ki.set(t.strings,i=new oe(t)),i}T(t){Hi(this._$AH)||(this._$AH=[],this._$AR());let i=this._$AH,o,s=0;for(let r of t)s===i.length?i.push(o=new e(this.k(ee()),this.k(ee()),this,this.options)):o=i[s],o._$AI(r),s++;s<i.length&&(this._$AR(o&&o._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){var o;for((o=this._$AP)===null||o===void 0||o.call(this,!1,!0,i);t&&t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){var i;this._$AM===void 0&&(this._$Cp=t,(i=this._$AP)===null||i===void 0||i.call(this,t))}},Ft=class{constructor(t,i,o,s,r){this.type=1,this._$AH=y,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=r,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=y}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,o,s){let r=this.strings,n=!1;if(r===void 0)t=zt(this,t,i,0),n=!ie(t)||t!==this._$AH&&t!==dt,n&&(this._$AH=t);else{let l=t,a,c;for(t=r[0],a=0;a<r.length-1;a++)c=zt(this,l[o+a],i,a),c===dt&&(c=this._$AH[a]),n||(n=!ie(c)||c!==this._$AH[a]),c===y?t=y:t!==y&&(t+=(c??"")+r[a+1]),this._$AH[a]=c}n&&!s&&this.j(t)}j(t){t===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Ye=class extends Ft{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===y?void 0:t}},Ro=Ht?Ht.emptyScript:"",Je=class extends Ft{constructor(){super(...arguments),this.type=4}j(t){t&&t!==y?this.element.setAttribute(this.name,Ro):this.element.removeAttribute(this.name)}},Qe=class extends Ft{constructor(t,i,o,s,r){super(t,i,o,s,r),this.type=5}_$AI(t,i=this){var o;if((t=(o=zt(this,t,i,0))!==null&&o!==void 0?o:y)===dt)return;let s=this._$AH,r=t===y&&s!==y||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==y&&(s===y||r);r&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,o;typeof this._$AH=="function"?this._$AH.call((o=(i=this.options)===null||i===void 0?void 0:i.host)!==null&&o!==void 0?o:this.element,t):this._$AH.handleEvent(t)}},Ze=class{constructor(t,i,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){zt(this,t)}};var Mi=Se.litHtmlPolyfillSupport;Mi?.(oe,se),((je=Se.litHtmlVersions)!==null&&je!==void 0?je:Se.litHtmlVersions=[]).push("2.8.0");var Ui=(e,t,i)=>{var o,s;let r=(o=i?.renderBefore)!==null&&o!==void 0?o:t,n=r._$litPart$;if(n===void 0){let l=(s=i?.renderBefore)!==null&&s!==void 0?s:null;r._$litPart$=n=new se(t.insertBefore(ee(),l),l,void 0,i??{})}return n._$AI(e),n};var ti,ei;var W=class extends lt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,i;let o=super.createRenderRoot();return(t=(i=this.renderOptions).renderBefore)!==null&&t!==void 0||(i.renderBefore=o.firstChild),o}update(t){let i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ui(i,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 dt}};W.finalized=!0,W._$litElement$=!0,(ti=globalThis.litElementHydrateSupport)===null||ti===void 0||ti.call(globalThis,{LitElement:W});var Wi=globalThis.litElementPolyfillSupport;Wi?.({LitElement:W});((ei=globalThis.litElementVersions)!==null&&ei!==void 0?ei:globalThis.litElementVersions=[]).push("3.3.3");var ko=(e,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(i){i.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(i){i.createProperty(t.key,e)}},Mo=(e,t,i)=>{t.constructor.createProperty(i,e)};function h(e){return(t,i)=>i!==void 0?Mo(e,t,i):ko(e,t)}var I="top",V="bottom",L="right",P="left",Ce="auto",gt=[I,V,L,P],ct="start",Ot="end",ji="clippingParents",Ie="viewport",qt="popper",Ki="reference",ii=gt.reduce(function(e,t){return e.concat([t+"-"+ct,t+"-"+Ot])},[]),Ee=[].concat(gt,[Ce]).reduce(function(e,t){return e.concat([t,t+"-"+ct,t+"-"+Ot])},[]),No="beforeRead",Ho="read",zo="afterRead",Fo="beforeMain",qo="main",Uo="afterMain",Wo="beforeWrite",jo="write",Ko="afterWrite",Gi=[No,Ho,zo,Fo,qo,Uo,Wo,jo,Ko];function k(e){return e?(e.nodeName||"").toLowerCase():null}function A(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Y(e){var t=A(e).Element;return e instanceof t||e instanceof Element}function B(e){var t=A(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Ut(e){if(typeof ShadowRoot>"u")return!1;var t=A(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Go(e){var t=e.state;Object.keys(t.elements).forEach(function(i){var o=t.styles[i]||{},s=t.attributes[i]||{},r=t.elements[i];!B(r)||!k(r)||(Object.assign(r.style,o),Object.keys(s).forEach(function(n){var l=s[n];l===!1?r.removeAttribute(n):r.setAttribute(n,l===!0?"":l)}))})}function Xo(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(o){var s=t.elements[o],r=t.attributes[o]||{},n=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:i[o]),l=n.reduce(function(a,c){return a[c]="",a},{});!B(s)||!k(s)||(Object.assign(s.style,l),Object.keys(r).forEach(function(a){s.removeAttribute(a)}))})}}var Xi={name:"applyStyles",enabled:!0,phase:"write",fn:Go,effect:Xo,requires:["computeStyles"]};function M(e){return e.split("-")[0]}var ot=Math.max,Pt=Math.min,ht=Math.round;function Wt(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function re(){return!/^((?!chrome|android).)*safari/i.test(Wt())}function J(e,t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var o=e.getBoundingClientRect(),s=1,r=1;t&&B(e)&&(s=e.offsetWidth>0&&ht(o.width)/e.offsetWidth||1,r=e.offsetHeight>0&&ht(o.height)/e.offsetHeight||1);var n=Y(e)?A(e):window,l=n.visualViewport,a=!re()&&i,c=(o.left+(a&&l?l.offsetLeft:0))/s,d=(o.top+(a&&l?l.offsetTop:0))/r,p=o.width/s,f=o.height/r;return{width:p,height:f,top:d,right:c+p,bottom:d+f,left:c,x:c,y:d}}function Lt(e){var t=J(e),i=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:o}}function ne(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&Ut(i)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function j(e){return A(e).getComputedStyle(e)}function oi(e){return["table","td","th"].indexOf(k(e))>=0}function H(e){return((Y(e)?e.ownerDocument:e.document)||window.document).documentElement}function pt(e){return k(e)==="html"?e:e.assignedSlot||e.parentNode||(Ut(e)?e.host:null)||H(e)}function Yi(e){return!B(e)||j(e).position==="fixed"?null:e.offsetParent}function Yo(e){var t=/firefox/i.test(Wt()),i=/Trident/i.test(Wt());if(i&&B(e)){var o=j(e);if(o.position==="fixed")return null}var s=pt(e);for(Ut(s)&&(s=s.host);B(s)&&["html","body"].indexOf(k(s))<0;){var r=j(s);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return s;s=s.parentNode}return null}function st(e){for(var t=A(e),i=Yi(e);i&&oi(i)&&j(i).position==="static";)i=Yi(i);return i&&(k(i)==="html"||k(i)==="body"&&j(i).position==="static")?t:i||Yo(e)||t}function Dt(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Tt(e,t,i){return ot(e,Pt(t,i))}function Ji(e,t,i){var o=Tt(e,t,i);return o>i?i:o}function ae(){return{top:0,right:0,bottom:0,left:0}}function le(e){return Object.assign({},ae(),e)}function de(e,t){return t.reduce(function(i,o){return i[o]=e,i},{})}var Jo=function(t,i){return t=typeof t=="function"?t(Object.assign({},i.rects,{placement:i.placement})):t,le(typeof t!="number"?t:de(t,gt))};function Qo(e){var t,i=e.state,o=e.name,s=e.options,r=i.elements.arrow,n=i.modifiersData.popperOffsets,l=M(i.placement),a=Dt(l),c=[P,L].indexOf(l)>=0,d=c?"height":"width";if(!(!r||!n)){var p=Jo(s.padding,i),f=Lt(r),u=a==="y"?I:P,w=a==="y"?V:L,m=i.rects.reference[d]+i.rects.reference[a]-n[a]-i.rects.popper[d],g=n[a]-i.rects.reference[a],_=st(r),$=_?a==="y"?_.clientHeight||0:_.clientWidth||0:0,O=m/2-g/2,v=p[u],b=$-f[d]-p[w],x=$/2-f[d]/2+O,C=Tt(v,x,b),N=a;i.modifiersData[o]=(t={},t[N]=C,t.centerOffset=C-x,t)}}function Zo(e){var t=e.state,i=e.options,o=i.element,s=o===void 0?"[data-popper-arrow]":o;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||ne(t.elements.popper,s)&&(t.elements.arrow=s))}var Qi={name:"arrow",enabled:!0,phase:"main",fn:Qo,effect:Zo,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Q(e){return e.split("-")[1]}var ts={top:"auto",right:"auto",bottom:"auto",left:"auto"};function es(e,t){var i=e.x,o=e.y,s=t.devicePixelRatio||1;return{x:ht(i*s)/s||0,y:ht(o*s)/s||0}}function Zi(e){var t,i=e.popper,o=e.popperRect,s=e.placement,r=e.variation,n=e.offsets,l=e.position,a=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,p=e.isFixed,f=n.x,u=f===void 0?0:f,w=n.y,m=w===void 0?0:w,g=typeof d=="function"?d({x:u,y:m}):{x:u,y:m};u=g.x,m=g.y;var _=n.hasOwnProperty("x"),$=n.hasOwnProperty("y"),O=P,v=I,b=window;if(c){var x=st(i),C="clientHeight",N="clientWidth";if(x===A(i)&&(x=H(i),j(x).position!=="static"&&l==="absolute"&&(C="scrollHeight",N="scrollWidth")),x=x,s===I||(s===P||s===L)&&r===Ot){v=V;var R=p&&x===b&&b.visualViewport?b.visualViewport.height:x[C];m-=R-o.height,m*=a?1:-1}if(s===P||(s===I||s===V)&&r===Ot){O=L;var D=p&&x===b&&b.visualViewport?b.visualViewport.width:x[N];u-=D-o.width,u*=a?1:-1}}var F=Object.assign({position:l},c&&ts),tt=d===!0?es({x:u,y:m},A(i)):{x:u,y:m};if(u=tt.x,m=tt.y,a){var U;return Object.assign({},F,(U={},U[v]=$?"0":"",U[O]=_?"0":"",U.transform=(b.devicePixelRatio||1)<=1?"translate("+u+"px, "+m+"px)":"translate3d("+u+"px, "+m+"px, 0)",U))}return Object.assign({},F,(t={},t[v]=$?m+"px":"",t[O]=_?u+"px":"",t.transform="",t))}function is(e){var t=e.state,i=e.options,o=i.gpuAcceleration,s=o===void 0?!0:o,r=i.adaptive,n=r===void 0?!0:r,l=i.roundOffsets,a=l===void 0?!0:l,c={placement:M(t.placement),variation:Q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Zi(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,Zi(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 to={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:is,data:{}};var $e={passive:!0};function os(e){var t=e.state,i=e.instance,o=e.options,s=o.scroll,r=s===void 0?!0:s,n=o.resize,l=n===void 0?!0:n,a=A(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&c.forEach(function(d){d.addEventListener("scroll",i.update,$e)}),l&&a.addEventListener("resize",i.update,$e),function(){r&&c.forEach(function(d){d.removeEventListener("scroll",i.update,$e)}),l&&a.removeEventListener("resize",i.update,$e)}}var eo={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:os,data:{}};var ss={left:"right",right:"left",bottom:"top",top:"bottom"};function jt(e){return e.replace(/left|right|bottom|top/g,function(t){return ss[t]})}var rs={start:"end",end:"start"};function Oe(e){return e.replace(/start|end/g,function(t){return rs[t]})}function Vt(e){var t=A(e),i=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:i,scrollTop:o}}function Bt(e){return J(H(e)).left+Vt(e).scrollLeft}function si(e,t){var i=A(e),o=H(e),s=i.visualViewport,r=o.clientWidth,n=o.clientHeight,l=0,a=0;if(s){r=s.width,n=s.height;var c=re();(c||!c&&t==="fixed")&&(l=s.offsetLeft,a=s.offsetTop)}return{width:r,height:n,x:l+Bt(e),y:a}}function ri(e){var t,i=H(e),o=Vt(e),s=(t=e.ownerDocument)==null?void 0:t.body,r=ot(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),n=ot(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),l=-o.scrollLeft+Bt(e),a=-o.scrollTop;return j(s||i).direction==="rtl"&&(l+=ot(i.clientWidth,s?s.clientWidth:0)-r),{width:r,height:n,x:l,y:a}}function Rt(e){var t=j(e),i=t.overflow,o=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+o)}function Pe(e){return["html","body","#document"].indexOf(k(e))>=0?e.ownerDocument.body:B(e)&&Rt(e)?e:Pe(pt(e))}function bt(e,t){var i;t===void 0&&(t=[]);var o=Pe(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),r=A(o),n=s?[r].concat(r.visualViewport||[],Rt(o)?o:[]):o,l=t.concat(n);return s?l:l.concat(bt(pt(n)))}function Kt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ns(e,t){var i=J(e,!1,t==="fixed");return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}function io(e,t,i){return t===Ie?Kt(si(e,i)):Y(t)?ns(t,i):Kt(ri(H(e)))}function as(e){var t=bt(pt(e)),i=["absolute","fixed"].indexOf(j(e).position)>=0,o=i&&B(e)?st(e):e;return Y(o)?t.filter(function(s){return Y(s)&&ne(s,o)&&k(s)!=="body"}):[]}function ni(e,t,i,o){var s=t==="clippingParents"?as(e):[].concat(t),r=[].concat(s,[i]),n=r[0],l=r.reduce(function(a,c){var d=io(e,c,o);return a.top=ot(d.top,a.top),a.right=Pt(d.right,a.right),a.bottom=Pt(d.bottom,a.bottom),a.left=ot(d.left,a.left),a},io(e,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 ce(e){var t=e.reference,i=e.element,o=e.placement,s=o?M(o):null,r=o?Q(o):null,n=t.x+t.width/2-i.width/2,l=t.y+t.height/2-i.height/2,a;switch(s){case I:a={x:n,y:t.y-i.height};break;case V:a={x:n,y:t.y+t.height};break;case L:a={x:t.x+t.width,y:l};break;case P:a={x:t.x-i.width,y:l};break;default:a={x:t.x,y:t.y}}var c=s?Dt(s):null;if(c!=null){var d=c==="y"?"height":"width";switch(r){case ct:a[c]=a[c]-(t[d]/2-i[d]/2);break;case Ot:a[c]=a[c]+(t[d]/2-i[d]/2);break;default:}}return a}function rt(e,t){t===void 0&&(t={});var i=t,o=i.placement,s=o===void 0?e.placement:o,r=i.strategy,n=r===void 0?e.strategy:r,l=i.boundary,a=l===void 0?ji:l,c=i.rootBoundary,d=c===void 0?Ie:c,p=i.elementContext,f=p===void 0?qt:p,u=i.altBoundary,w=u===void 0?!1:u,m=i.padding,g=m===void 0?0:m,_=le(typeof g!="number"?g:de(g,gt)),$=f===qt?Ki:qt,O=e.rects.popper,v=e.elements[w?$:f],b=ni(Y(v)?v:v.contextElement||H(e.elements.popper),a,d,n),x=J(e.elements.reference),C=ce({reference:x,element:O,strategy:"absolute",placement:s}),N=Kt(Object.assign({},O,C)),R=f===qt?N:x,D={top:b.top-R.top+_.top,bottom:R.bottom-b.bottom+_.bottom,left:b.left-R.left+_.left,right:R.right-b.right+_.right},F=e.modifiersData.offset;if(f===qt&&F){var tt=F[s];Object.keys(D).forEach(function(U){var wt=[L,V].indexOf(U)>=0?1:-1,_t=[I,V].indexOf(U)>=0?"y":"x";D[U]+=tt[_t]*wt})}return D}function ai(e,t){t===void 0&&(t={});var i=t,o=i.placement,s=i.boundary,r=i.rootBoundary,n=i.padding,l=i.flipVariations,a=i.allowedAutoPlacements,c=a===void 0?Ee:a,d=Q(o),p=d?l?ii:ii.filter(function(w){return Q(w)===d}):gt,f=p.filter(function(w){return c.indexOf(w)>=0});f.length===0&&(f=p);var u=f.reduce(function(w,m){return w[m]=rt(e,{placement:m,boundary:s,rootBoundary:r,padding:n})[M(m)],w},{});return Object.keys(u).sort(function(w,m){return u[w]-u[m]})}function ls(e){if(M(e)===Ce)return[];var t=jt(e);return[Oe(e),t,Oe(t)]}function ds(e){var t=e.state,i=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var s=i.mainAxis,r=s===void 0?!0:s,n=i.altAxis,l=n===void 0?!0:n,a=i.fallbackPlacements,c=i.padding,d=i.boundary,p=i.rootBoundary,f=i.altBoundary,u=i.flipVariations,w=u===void 0?!0:u,m=i.allowedAutoPlacements,g=t.options.placement,_=M(g),$=_===g,O=a||($||!w?[jt(g)]:ls(g)),v=[g].concat(O).reduce(function(Nt,mt){return Nt.concat(M(mt)===Ce?ai(t,{placement:mt,boundary:d,rootBoundary:p,padding:c,flipVariations:w,allowedAutoPlacements:m}):mt)},[]),b=t.rects.reference,x=t.rects.popper,C=new Map,N=!0,R=v[0],D=0;D<v.length;D++){var F=v[D],tt=M(F),U=Q(F)===ct,wt=[I,V].indexOf(tt)>=0,_t=wt?"width":"height",G=rt(t,{placement:F,boundary:d,rootBoundary:p,altBoundary:f,padding:c}),et=wt?U?L:P:U?V:I;b[_t]>x[_t]&&(et=jt(et));var me=jt(et),At=[];if(r&&At.push(G[tt]<=0),l&&At.push(G[et]<=0,G[me]<=0),At.every(function(Nt){return Nt})){R=F,N=!1;break}C.set(F,At)}if(N)for(var ve=w?3:1,Be=function(mt){var Qt=v.find(function(be){var St=C.get(be);if(St)return St.slice(0,mt).every(function(Re){return Re})});if(Qt)return R=Qt,"break"},Jt=ve;Jt>0;Jt--){var ge=Be(Jt);if(ge==="break")break}t.placement!==R&&(t.modifiersData[o]._skip=!0,t.placement=R,t.reset=!0)}}var oo={name:"flip",enabled:!0,phase:"main",fn:ds,requiresIfExists:["offset"],data:{_skip:!1}};function so(e,t,i){return i===void 0&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function ro(e){return[I,L,V,P].some(function(t){return e[t]>=0})}function cs(e){var t=e.state,i=e.name,o=t.rects.reference,s=t.rects.popper,r=t.modifiersData.preventOverflow,n=rt(t,{elementContext:"reference"}),l=rt(t,{altBoundary:!0}),a=so(n,o),c=so(l,s,r),d=ro(a),p=ro(c);t.modifiersData[i]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}var no={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:cs};function hs(e,t,i){var o=M(e),s=[P,I].indexOf(o)>=0?-1:1,r=typeof i=="function"?i(Object.assign({},t,{placement:e})):i,n=r[0],l=r[1];return n=n||0,l=(l||0)*s,[P,L].indexOf(o)>=0?{x:l,y:n}:{x:n,y:l}}function ps(e){var t=e.state,i=e.options,o=e.name,s=i.offset,r=s===void 0?[0,0]:s,n=Ee.reduce(function(d,p){return d[p]=hs(p,t.rects,r),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 ao={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ps};function us(e){var t=e.state,i=e.name;t.modifiersData[i]=ce({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var lo={name:"popperOffsets",enabled:!0,phase:"read",fn:us,data:{}};function li(e){return e==="x"?"y":"x"}function fs(e){var t=e.state,i=e.options,o=e.name,s=i.mainAxis,r=s===void 0?!0:s,n=i.altAxis,l=n===void 0?!1:n,a=i.boundary,c=i.rootBoundary,d=i.altBoundary,p=i.padding,f=i.tether,u=f===void 0?!0:f,w=i.tetherOffset,m=w===void 0?0:w,g=rt(t,{boundary:a,rootBoundary:c,padding:p,altBoundary:d}),_=M(t.placement),$=Q(t.placement),O=!$,v=Dt(_),b=li(v),x=t.modifiersData.popperOffsets,C=t.rects.reference,N=t.rects.popper,R=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,D=typeof R=="number"?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),F=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,tt={x:0,y:0};if(x){if(r){var U,wt=v==="y"?I:P,_t=v==="y"?V:L,G=v==="y"?"height":"width",et=x[v],me=et+g[wt],At=et-g[_t],ve=u?-N[G]/2:0,Be=$===ct?C[G]:N[G],Jt=$===ct?-N[G]:-C[G],ge=t.elements.arrow,Nt=u&&ge?Lt(ge):{width:0,height:0},mt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ae(),Qt=mt[wt],be=mt[_t],St=Tt(0,C[G],Nt[G]),Re=O?C[G]/2-ve-St-Qt-D.mainAxis:Be-St-Qt-D.mainAxis,yo=O?-C[G]/2+ve+St+be+D.mainAxis:Jt+St+be+D.mainAxis,ke=t.elements.arrow&&st(t.elements.arrow),wo=ke?v==="y"?ke.clientTop||0:ke.clientLeft||0:0,xi=(U=F?.[v])!=null?U:0,_o=et+Re-xi-wo,Ao=et+yo-xi,yi=Tt(u?Pt(me,_o):me,et,u?ot(At,Ao):At);x[v]=yi,tt[v]=yi-et}if(l){var wi,So=v==="x"?I:P,Co=v==="x"?V:L,Ct=x[b],xe=b==="y"?"height":"width",_i=Ct+g[So],Ai=Ct-g[Co],Me=[I,P].indexOf(_)!==-1,Si=(wi=F?.[b])!=null?wi:0,Ci=Me?_i:Ct-C[xe]-N[xe]-Si+D.altAxis,Ii=Me?Ct+C[xe]+N[xe]-Si-D.altAxis:Ai,Ei=u&&Me?Ji(Ci,Ct,Ii):Tt(u?Ci:_i,Ct,u?Ii:Ai);x[b]=Ei,tt[b]=Ei-Ct}t.modifiersData[o]=tt}}var co={name:"preventOverflow",enabled:!0,phase:"main",fn:fs,requiresIfExists:["offset"]};function di(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ci(e){return e===A(e)||!B(e)?Vt(e):di(e)}function ms(e){var t=e.getBoundingClientRect(),i=ht(t.width)/e.offsetWidth||1,o=ht(t.height)/e.offsetHeight||1;return i!==1||o!==1}function hi(e,t,i){i===void 0&&(i=!1);var o=B(t),s=B(t)&&ms(t),r=H(t),n=J(e,s,i),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!i)&&((k(t)!=="body"||Rt(r))&&(l=ci(t)),B(t)?(a=J(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):r&&(a.x=Bt(r))),{x:n.left+l.scrollLeft-a.x,y:n.top+l.scrollTop-a.y,width:n.width,height:n.height}}function vs(e){var t=new Map,i=new Set,o=[];e.forEach(function(r){t.set(r.name,r)});function s(r){i.add(r.name);var n=[].concat(r.requires||[],r.requiresIfExists||[]);n.forEach(function(l){if(!i.has(l)){var a=t.get(l);a&&s(a)}}),o.push(r)}return e.forEach(function(r){i.has(r.name)||s(r)}),o}function pi(e){var t=vs(e);return Gi.reduce(function(i,o){return i.concat(t.filter(function(s){return s.phase===o}))},[])}function ui(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}function fi(e){var t=e.reduce(function(i,o){var s=i[o.name];return i[o.name]=s?Object.assign({},s,o,{options:Object.assign({},s.options,o.options),data:Object.assign({},s.data,o.data)}):o,i},{});return Object.keys(t).map(function(i){return t[i]})}var ho={placement:"bottom",modifiers:[],strategy:"absolute"};function po(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function uo(e){e===void 0&&(e={});var t=e,i=t.defaultModifiers,o=i===void 0?[]:i,s=t.defaultOptions,r=s===void 0?ho:s;return function(l,a,c){c===void 0&&(c=r);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},ho,r),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},p=[],f=!1,u={state:d,setOptions:function(_){var $=typeof _=="function"?_(d.options):_;m(),d.options=Object.assign({},r,d.options,$),d.scrollParents={reference:Y(l)?bt(l):l.contextElement?bt(l.contextElement):[],popper:bt(a)};var O=pi(fi([].concat(o,d.options.modifiers)));return d.orderedModifiers=O.filter(function(v){return v.enabled}),w(),u.update()},forceUpdate:function(){if(!f){var _=d.elements,$=_.reference,O=_.popper;if(po($,O)){d.rects={reference:hi($,st(O),d.options.strategy==="fixed"),popper:Lt(O)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(D){return d.modifiersData[D.name]=Object.assign({},D.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,C=b.options,N=C===void 0?{}:C,R=b.name;typeof x=="function"&&(d=x({state:d,options:N,name:R,instance:u})||d)}}}},update:ui(function(){return new Promise(function(g){u.forceUpdate(),g(d)})}),destroy:function(){m(),f=!0}};if(!po(l,a))return u;u.setOptions(c).then(function(g){!f&&c.onFirstUpdate&&c.onFirstUpdate(g)});function w(){d.orderedModifiers.forEach(function(g){var _=g.name,$=g.options,O=$===void 0?{}:$,v=g.effect;if(typeof v=="function"){var b=v({state:d,name:_,instance:u,options:O}),x=function(){};p.push(b||x)}})}function m(){p.forEach(function(g){return g()}),p=[]}return u}}var gs=[eo,lo,to,Xi,ao,oo,co,Qi,no],mi=uo({defaultModifiers:gs});var z=e=>e??y;var bs=":host{display:inline-block;font-size:13px;line-height:20px;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;color:#111;contain:content}:host([hidden]){display:none!important}:host([level=warn i]){color:#555}:host([level=suggest i]){color:#bf8800}:host([level=error i]){color:#cc0017}:host([level=warn]){color:#555}:host([level=suggest]){color:#bf8800}:host([level=error]){color:#cc0017}.icon{height:12px;width:12px;padding-right:4px;margin-bottom:-1px}",xs="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cstyle%20id='style3'%3e%20.st0{fill:%23fff}.st1{fill:%23c00}%20%3c/style%3e%3cg%20id='g5'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20id='path9'/%3e%3c/g%3e%3cg%20id='g11'%3e%3cpath%20class='st0'%20id='rect13'%20d='M5.5%202.5h1v4h-1z'/%3e%3cpath%20class='st1'%20d='M6%203v3-3m1-1H5v5h2V2z'%20id='path15'/%3e%3c/g%3e%3cg%20id='g17'%3e%3cpath%20class='st0'%20id='rect19'%20d='M5.5%208.5h1v1h-1z'/%3e%3cpath%20class='st1'%20id='polygon21'%20d='M7%208H5v2h2V8z'/%3e%3c/g%3e%3c/svg%3e",ys="data:image/svg+xml,%3csvg%20id='Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cstyle%3e%20.st0{fill:%23bf8800}%20%3c/style%3e%3cpath%20class='st0'%20d='M12%20.8l11%2019.8v1.3H1v-1.3L12%20.8zm.8-.6h-1.6L0%2020v3h24v-3L12.8.2z'/%3e%3cpath%20class='st0'%20d='M11%208h2v8h-2zm0%2010h2v2h-2z'/%3e%3c/svg%3e",ws="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20fill='%23555'/%3e%3cpath%20d='M6%209V6v3m-1%201h2V5H5v5zm2-8H5v2h2z'%20class='st1'%20fill='%23555'/%3e%3c/svg%3e",_s=Object.defineProperty,As=Object.getOwnPropertyDescriptor,gi=(e,t,i,o)=>{for(var s=o>1?void 0:o?As(t,i):t,r=e.length-1,n;r>=0;r--)(n=e[r])&&(s=(o?n(t,i,s):n(s))||s);return o&&s&&_s(t,i,s),s},Gt,he=(Gt=class extends W{static parseLevel(e){if(e){let t=Object.keys(pe).find(i=>i.toLowerCase()===e.toLowerCase());return t&&pe[t]}}static get styles(){return[it`
|
|
4
|
-
${X(
|
|
5
|
-
`]}render(){return T`${this.iconToUse&&T`<img class="icon" src="${this.iconToUse}">`}${this.message}`}get iconToUse(){return this.icon||this._defaultIconPath}shouldUpdate(e){return e.has("level")&&(this._defaultIconPath=this.iconForLevel,!this.icon)?!0:super.shouldUpdate(e)}get iconForLevel(){switch(
|
|
6
|
-
${X(
|
|
7
|
-
`]}render(){
|
|
1
|
+
var window;(window||={})["@cas-smartdesign/combo-box"]=(()=>{var He=Object.defineProperty;var yo=Object.getOwnPropertyDescriptor;var wo=Object.getOwnPropertyNames;var _o=Object.prototype.hasOwnProperty;var Ao=(e,t)=>{for(var i in t)He(e,i,{get:t[i],enumerable:!0})},So=(e,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of wo(t))!_o.call(e,s)&&s!==i&&He(e,s,{get:()=>t[s],enumerable:!(o=yo(t,s))||o.enumerable});return e};var Co=e=>So(He({},"__esModule",{value:!0}),e);var Fs={};Ao(Fs,{default:()=>uo});var we=globalThis,_e=we.ShadowRoot&&(we.ShadyCSS===void 0||we.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ze=Symbol(),Ci=new WeakMap,Qt=class{constructor(t,i,o){if(this._$cssResult$=!0,o!==ze)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.o,i=this.t;if(_e&&t===void 0){let o=i!==void 0&&i.length===1;o&&(t=Ci.get(i)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&Ci.set(i,t))}return t}toString(){return this.cssText}},X=e=>new Qt(typeof e=="string"?e:e+"",void 0,ze),it=(e,...t)=>{let i=e.length===1?e[0]:t.reduce(((o,s,r)=>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.")})(s)+e[r+1]),e[0]);return new Qt(i,e,ze)},Ii=(e,t)=>{if(_e)e.adoptedStyleSheets=t.map((i=>i instanceof CSSStyleSheet?i:i.styleSheet));else for(let i of t){let o=document.createElement("style"),s=we.litNonce;s!==void 0&&o.setAttribute("nonce",s),o.textContent=i.cssText,e.appendChild(o)}},Fe=_e?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let i="";for(let o of t.cssRules)i+=o.cssText;return X(i)})(e):e;var{is:Io,defineProperty:$o,getOwnPropertyDescriptor:Eo,getOwnPropertyNames:Po,getOwnPropertySymbols:Oo,getPrototypeOf:Lo}=Object,Ae=globalThis,$i=Ae.trustedTypes,Do=$i?$i.emptyScript:"",To=Ae.reactiveElementPolyfillSupport,Zt=(e,t)=>e,te={toAttribute(e,t){switch(t){case Boolean:e=e?Do:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=e!==null;break;case Number:i=e===null?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch{i=null}}return i}},Se=(e,t)=>!Io(e,t),Ei={attribute:!0,type:String,converter:te,reflect:!1,useDefault:!1,hasChanged:Se};Symbol.metadata??=Symbol("metadata"),Ae.litPropertyMetadata??=new WeakMap;var lt=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,i=Ei){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(t,i),!i.noAccessor){let o=Symbol(),s=this.getPropertyDescriptor(t,o,i);s!==void 0&&$o(this.prototype,t,s)}}static getPropertyDescriptor(t,i,o){let{get:s,set:r}=Eo(this.prototype,t)??{get(){return this[i]},set(n){this[i]=n}};return{get:s,set(n){let l=s?.call(this);r?.call(this,n),this.requestUpdate(t,l,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ei}static _$Ei(){if(this.hasOwnProperty(Zt("elementProperties")))return;let t=Lo(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Zt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Zt("properties"))){let i=this.properties,o=[...Po(i),...Oo(i)];for(let s of o)this.createProperty(s,i[s])}let t=this[Symbol.metadata];if(t!==null){let i=litPropertyMetadata.get(t);if(i!==void 0)for(let[o,s]of i)this.elementProperties.set(o,s)}this._$Eh=new Map;for(let[i,o]of this.elementProperties){let s=this._$Eu(i,o);s!==void 0&&this._$Eh.set(s,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let i=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let s of o)i.unshift(Fe(s))}else t!==void 0&&i.push(Fe(t));return i}static _$Eu(t,i){let o=i.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,i=this.constructor.elementProperties;for(let o of i.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ii(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,i,o){this._$AK(t,o)}_$ET(t,i){let o=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,o);if(s!==void 0&&o.reflect===!0){let r=(o.converter?.toAttribute!==void 0?o.converter:te).toAttribute(i,o.type);this._$Em=t,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,i){let o=this.constructor,s=o._$Eh.get(t);if(s!==void 0&&this._$Em!==s){let r=o.getPropertyOptions(s),n=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:te;this._$Em=s;let l=n.fromAttribute(i,r.type);this[s]=l??this._$Ej?.get(s)??l,this._$Em=null}}requestUpdate(t,i,o){if(t!==void 0){let s=this.constructor,r=this[t];if(o??=s.getPropertyOptions(t),!((o.hasChanged??Se)(r,i)||o.useDefault&&o.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,o))))return;this.C(t,i,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,i,{useDefault:o,reflect:s,wrapped:r},n){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??i??this[t]),r!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(i=void 0),this._$AL.set(t,i)),s===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[s,r]of o){let{wrapped:n}=r,l=this[s];n!==!0||this._$AL.has(s)||l===void 0||this.C(s,void 0,r,l)}}let t=!1,i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),this._$EO?.forEach((o=>o.hostUpdate?.())),this.update(i)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(i)}willUpdate(t){}_$AE(t){this._$EO?.forEach((i=>i.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((i=>this._$ET(i,this[i]))),this._$EM()}updated(t){}firstUpdated(t){}};lt.elementStyles=[],lt.shadowRootOptions={mode:"open"},lt[Zt("elementProperties")]=new Map,lt[Zt("finalized")]=new Map,To?.({ReactiveElement:lt}),(Ae.reactiveElementVersions??=[]).push("2.1.1");var Xe=globalThis,Ce=Xe.trustedTypes,Pi=Ce?Ce.createPolicy("lit-html",{createHTML:e=>e}):void 0,Ri="$lit$",vt=`lit$${Math.random().toFixed(9).slice(2)}$`,Bi="?"+vt,Vo=`<${Bi}>`,Et=document,ie=()=>Et.createComment(""),oe=e=>e===null||typeof e!="object"&&typeof e!="function",Ye=Array.isArray,Ro=e=>Ye(e)||typeof e?.[Symbol.iterator]=="function",qe=`[
|
|
2
|
+
\f\r]`,ee=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Oi=/-->/g,Li=/>/g,It=RegExp(`>|${qe}(?:([^\\s"'>=/]+)(${qe}*=${qe}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Di=/'/g,Ti=/"/g,Mi=/^(?:script|style|textarea|title)$/i,Je=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),T=Je(1),Gs=Je(2),Xs=Je(3),dt=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),Vi=new WeakMap,$t=Et.createTreeWalker(Et,129);function ki(e,t){if(!Ye(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Pi!==void 0?Pi.createHTML(t):t}var Bo=(e,t)=>{let i=e.length-1,o=[],s,r=t===2?"<svg>":t===3?"<math>":"",n=ee;for(let l=0;l<i;l++){let a=e[l],c,d,p=-1,f=0;for(;f<a.length&&(n.lastIndex=f,d=n.exec(a),d!==null);)f=n.lastIndex,n===ee?d[1]==="!--"?n=Oi:d[1]!==void 0?n=Li:d[2]!==void 0?(Mi.test(d[2])&&(s=RegExp("</"+d[2],"g")),n=It):d[3]!==void 0&&(n=It):n===It?d[0]===">"?(n=s??ee,p=-1):d[1]===void 0?p=-2:(p=n.lastIndex-d[2].length,c=d[1],n=d[3]===void 0?It:d[3]==='"'?Ti:Di):n===Ti||n===Di?n=It:n===Oi||n===Li?n=ee:(n=It,s=void 0);let u=n===It&&e[l+1].startsWith("/>")?" ":"";r+=n===ee?a+Vo:p>=0?(o.push(c),a.slice(0,p)+Ri+a.slice(p)+vt+u):a+vt+(p===-2?l:u)}return[ki(e,r+(e[i]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},se=class e{constructor({strings:t,_$litType$:i},o){let s;this.parts=[];let r=0,n=0,l=t.length-1,a=this.parts,[c,d]=Bo(t,i);if(this.el=e.createElement(c,o),$t.currentNode=this.el.content,i===2||i===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(s=$t.nextNode())!==null&&a.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(let p of s.getAttributeNames())if(p.endsWith(Ri)){let f=d[n++],u=s.getAttribute(p).split(vt),b=/([.?@])?(.*)/.exec(f);a.push({type:1,index:r,name:b[2],strings:u,ctor:b[1]==="."?We:b[1]==="?"?je:b[1]==="@"?Ke:zt}),s.removeAttribute(p)}else p.startsWith(vt)&&(a.push({type:6,index:r}),s.removeAttribute(p));if(Mi.test(s.tagName)){let p=s.textContent.split(vt),f=p.length-1;if(f>0){s.textContent=Ce?Ce.emptyScript:"";for(let u=0;u<f;u++)s.append(p[u],ie()),$t.nextNode(),a.push({type:2,index:++r});s.append(p[f],ie())}}}else if(s.nodeType===8)if(s.data===Bi)a.push({type:2,index:r});else{let p=-1;for(;(p=s.data.indexOf(vt,p+1))!==-1;)a.push({type:7,index:r}),p+=vt.length-1}r++}}static createElement(t,i){let o=Et.createElement("template");return o.innerHTML=t,o}};function Ht(e,t,i=e,o){if(t===dt)return t;let s=o!==void 0?i._$Co?.[o]:i._$Cl,r=oe(t)?void 0:t._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),r===void 0?s=void 0:(s=new r(e),s._$AT(e,i,o)),o!==void 0?(i._$Co??=[])[o]=s:i._$Cl=s),s!==void 0&&(t=Ht(e,s._$AS(e,t.values),s,o)),t}var Ue=class{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:i},parts:o}=this._$AD,s=(t?.creationScope??Et).importNode(i,!0);$t.currentNode=s;let r=$t.nextNode(),n=0,l=0,a=o[0];for(;a!==void 0;){if(n===a.index){let c;a.type===2?c=new re(r,r.nextSibling,this,t):a.type===1?c=new a.ctor(r,a.name,a.strings,this,t):a.type===6&&(c=new Ge(r,this,t)),this._$AV.push(c),a=o[++l]}n!==a?.index&&(r=$t.nextNode(),n++)}return $t.currentNode=Et,s}p(t){let i=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,i),i+=o.strings.length-2):o._$AI(t[i])),i++}},re=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,o,s){this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=o,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,i=this._$AM;return i!==void 0&&t?.nodeType===11&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=Ht(this,t,i),oe(t)?t===w||t==null||t===""?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==dt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ro(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==w&&oe(this._$AH)?this._$AA.nextSibling.data=t:this.T(Et.createTextNode(t)),this._$AH=t}$(t){let{values:i,_$litType$:o}=t,s=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=se.createElement(ki(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===s)this._$AH.p(i);else{let r=new Ue(s,this),n=r.u(this.options);r.p(i),this.T(n),this._$AH=r}}_$AC(t){let i=Vi.get(t.strings);return i===void 0&&Vi.set(t.strings,i=new se(t)),i}k(t){Ye(this._$AH)||(this._$AH=[],this._$AR());let i=this._$AH,o,s=0;for(let r of t)s===i.length?i.push(o=new e(this.O(ie()),this.O(ie()),this,this.options)):o=i[s],o._$AI(r),s++;s<i.length&&(this._$AR(o&&o._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t!==this._$AB;){let o=t.nextSibling;t.remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},zt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,o,s,r){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=r,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=w}_$AI(t,i=this,o,s){let r=this.strings,n=!1;if(r===void 0)t=Ht(this,t,i,0),n=!oe(t)||t!==this._$AH&&t!==dt,n&&(this._$AH=t);else{let l=t,a,c;for(t=r[0],a=0;a<r.length-1;a++)c=Ht(this,l[o+a],i,a),c===dt&&(c=this._$AH[a]),n||=!oe(c)||c!==this._$AH[a],c===w?t=w:t!==w&&(t+=(c??"")+r[a+1]),this._$AH[a]=c}n&&!s&&this.j(t)}j(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},We=class extends zt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===w?void 0:t}},je=class extends zt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==w)}},Ke=class extends zt{constructor(t,i,o,s,r){super(t,i,o,s,r),this.type=5}_$AI(t,i=this){if((t=Ht(this,t,i,0)??w)===dt)return;let o=this._$AH,s=t===w&&o!==w||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==w&&(o===w||s);s&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},Ge=class{constructor(t,i,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){Ht(this,t)}};var Mo=Xe.litHtmlPolyfillSupport;Mo?.(se,re),(Xe.litHtmlVersions??=[]).push("3.3.1");var Ni=(e,t,i)=>{let o=i?.renderBefore??t,s=o._$litPart$;if(s===void 0){let r=i?.renderBefore??null;o._$litPart$=s=new re(t.insertBefore(ie(),r),r,void 0,i??{})}return s._$AI(e),s};var Qe=globalThis,W=class extends lt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ni(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return dt}};W._$litElement$=!0,W.finalized=!0,Qe.litElementHydrateSupport?.({LitElement:W});var ko=Qe.litElementPolyfillSupport;ko?.({LitElement:W});(Qe.litElementVersions??=[]).push("4.2.1");var No={attribute:!0,type:String,converter:te,reflect:!1,hasChanged:Se},Ho=(e=No,t,i)=>{let{kind:o,metadata:s}=i,r=globalThis.litPropertyMetadata.get(s);if(r===void 0&&globalThis.litPropertyMetadata.set(s,r=new Map),o==="setter"&&((e=Object.create(e)).wrapped=!0),r.set(i.name,e),o==="accessor"){let{name:n}=i;return{set(l){let a=t.get.call(this);t.set.call(this,l),this.requestUpdate(n,a,e)},init(l){return l!==void 0&&this.C(n,void 0,e,l),l}}}if(o==="setter"){let{name:n}=i;return function(l){let a=this[n];t.call(this,l),this.requestUpdate(n,a,e)}}throw Error("Unsupported decorator location: "+o)};function h(e){return(t,i)=>typeof i=="object"?Ho(e,t,i):((o,s,r)=>{let n=s.hasOwnProperty(r);return s.constructor.createProperty(r,o),n?Object.getOwnPropertyDescriptor(s,r):void 0})(e,t,i)}var I="top",V="bottom",L="right",O="left",Ie="auto",gt=[I,V,L,O],ct="start",Pt="end",Hi="clippingParents",$e="viewport",Ft="popper",zi="reference",Ze=gt.reduce(function(e,t){return e.concat([t+"-"+ct,t+"-"+Pt])},[]),Ee=[].concat(gt,[Ie]).reduce(function(e,t){return e.concat([t,t+"-"+ct,t+"-"+Pt])},[]),zo="beforeRead",Fo="read",qo="afterRead",Uo="beforeMain",Wo="main",jo="afterMain",Ko="beforeWrite",Go="write",Xo="afterWrite",Fi=[zo,Fo,qo,Uo,Wo,jo,Ko,Go,Xo];function M(e){return e?(e.nodeName||"").toLowerCase():null}function A(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Y(e){var t=A(e).Element;return e instanceof t||e instanceof Element}function R(e){var t=A(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function qt(e){if(typeof ShadowRoot>"u")return!1;var t=A(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Yo(e){var t=e.state;Object.keys(t.elements).forEach(function(i){var o=t.styles[i]||{},s=t.attributes[i]||{},r=t.elements[i];!R(r)||!M(r)||(Object.assign(r.style,o),Object.keys(s).forEach(function(n){var l=s[n];l===!1?r.removeAttribute(n):r.setAttribute(n,l===!0?"":l)}))})}function Jo(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(o){var s=t.elements[o],r=t.attributes[o]||{},n=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:i[o]),l=n.reduce(function(a,c){return a[c]="",a},{});!R(s)||!M(s)||(Object.assign(s.style,l),Object.keys(r).forEach(function(a){s.removeAttribute(a)}))})}}var qi={name:"applyStyles",enabled:!0,phase:"write",fn:Yo,effect:Jo,requires:["computeStyles"]};function k(e){return e.split("-")[0]}var ot=Math.max,Ot=Math.min,ht=Math.round;function Ut(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function ne(){return!/^((?!chrome|android).)*safari/i.test(Ut())}function J(e,t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var o=e.getBoundingClientRect(),s=1,r=1;t&&R(e)&&(s=e.offsetWidth>0&&ht(o.width)/e.offsetWidth||1,r=e.offsetHeight>0&&ht(o.height)/e.offsetHeight||1);var n=Y(e)?A(e):window,l=n.visualViewport,a=!ne()&&i,c=(o.left+(a&&l?l.offsetLeft:0))/s,d=(o.top+(a&&l?l.offsetTop:0))/r,p=o.width/s,f=o.height/r;return{width:p,height:f,top:d,right:c+p,bottom:d+f,left:c,x:c,y:d}}function Lt(e){var t=J(e),i=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:o}}function ae(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&qt(i)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function j(e){return A(e).getComputedStyle(e)}function ti(e){return["table","td","th"].indexOf(M(e))>=0}function H(e){return((Y(e)?e.ownerDocument:e.document)||window.document).documentElement}function pt(e){return M(e)==="html"?e:e.assignedSlot||e.parentNode||(qt(e)?e.host:null)||H(e)}function Ui(e){return!R(e)||j(e).position==="fixed"?null:e.offsetParent}function Qo(e){var t=/firefox/i.test(Ut()),i=/Trident/i.test(Ut());if(i&&R(e)){var o=j(e);if(o.position==="fixed")return null}var s=pt(e);for(qt(s)&&(s=s.host);R(s)&&["html","body"].indexOf(M(s))<0;){var r=j(s);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return s;s=s.parentNode}return null}function st(e){for(var t=A(e),i=Ui(e);i&&ti(i)&&j(i).position==="static";)i=Ui(i);return i&&(M(i)==="html"||M(i)==="body"&&j(i).position==="static")?t:i||Qo(e)||t}function Dt(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Tt(e,t,i){return ot(e,Ot(t,i))}function Wi(e,t,i){var o=Tt(e,t,i);return o>i?i:o}function le(){return{top:0,right:0,bottom:0,left:0}}function de(e){return Object.assign({},le(),e)}function ce(e,t){return t.reduce(function(i,o){return i[o]=e,i},{})}var Zo=function(t,i){return t=typeof t=="function"?t(Object.assign({},i.rects,{placement:i.placement})):t,de(typeof t!="number"?t:ce(t,gt))};function ts(e){var t,i=e.state,o=e.name,s=e.options,r=i.elements.arrow,n=i.modifiersData.popperOffsets,l=k(i.placement),a=Dt(l),c=[O,L].indexOf(l)>=0,d=c?"height":"width";if(!(!r||!n)){var p=Zo(s.padding,i),f=Lt(r),u=a==="y"?I:O,b=a==="y"?V:L,g=i.rects.reference[d]+i.rects.reference[a]-n[a]-i.rects.popper[d],v=n[a]-i.rects.reference[a],_=st(r),E=_?a==="y"?_.clientHeight||0:_.clientWidth||0:0,P=g/2-v/2,m=p[u],x=E-f[d]-p[b],y=E/2-f[d]/2+P,C=Tt(m,y,x),N=a;i.modifiersData[o]=(t={},t[N]=C,t.centerOffset=C-y,t)}}function es(e){var t=e.state,i=e.options,o=i.element,s=o===void 0?"[data-popper-arrow]":o;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||ae(t.elements.popper,s)&&(t.elements.arrow=s))}var ji={name:"arrow",enabled:!0,phase:"main",fn:ts,effect:es,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Q(e){return e.split("-")[1]}var is={top:"auto",right:"auto",bottom:"auto",left:"auto"};function os(e,t){var i=e.x,o=e.y,s=t.devicePixelRatio||1;return{x:ht(i*s)/s||0,y:ht(o*s)/s||0}}function Ki(e){var t,i=e.popper,o=e.popperRect,s=e.placement,r=e.variation,n=e.offsets,l=e.position,a=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,p=e.isFixed,f=n.x,u=f===void 0?0:f,b=n.y,g=b===void 0?0:b,v=typeof d=="function"?d({x:u,y:g}):{x:u,y:g};u=v.x,g=v.y;var _=n.hasOwnProperty("x"),E=n.hasOwnProperty("y"),P=O,m=I,x=window;if(c){var y=st(i),C="clientHeight",N="clientWidth";if(y===A(i)&&(y=H(i),j(y).position!=="static"&&l==="absolute"&&(C="scrollHeight",N="scrollWidth")),y=y,s===I||(s===O||s===L)&&r===Pt){m=V;var B=p&&y===x&&x.visualViewport?x.visualViewport.height:y[C];g-=B-o.height,g*=a?1:-1}if(s===O||(s===I||s===V)&&r===Pt){P=L;var D=p&&y===x&&x.visualViewport?x.visualViewport.width:y[N];u-=D-o.width,u*=a?1:-1}}var F=Object.assign({position:l},c&&is),tt=d===!0?os({x:u,y:g},A(i)):{x:u,y:g};if(u=tt.x,g=tt.y,a){var U;return Object.assign({},F,(U={},U[m]=E?"0":"",U[P]=_?"0":"",U.transform=(x.devicePixelRatio||1)<=1?"translate("+u+"px, "+g+"px)":"translate3d("+u+"px, "+g+"px, 0)",U))}return Object.assign({},F,(t={},t[m]=E?g+"px":"",t[P]=_?u+"px":"",t.transform="",t))}function ss(e){var t=e.state,i=e.options,o=i.gpuAcceleration,s=o===void 0?!0:o,r=i.adaptive,n=r===void 0?!0:r,l=i.roundOffsets,a=l===void 0?!0:l,c={placement:k(t.placement),variation:Q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ki(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,Ki(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 Gi={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ss,data:{}};var Pe={passive:!0};function rs(e){var t=e.state,i=e.instance,o=e.options,s=o.scroll,r=s===void 0?!0:s,n=o.resize,l=n===void 0?!0:n,a=A(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&c.forEach(function(d){d.addEventListener("scroll",i.update,Pe)}),l&&a.addEventListener("resize",i.update,Pe),function(){r&&c.forEach(function(d){d.removeEventListener("scroll",i.update,Pe)}),l&&a.removeEventListener("resize",i.update,Pe)}}var Xi={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:rs,data:{}};var ns={left:"right",right:"left",bottom:"top",top:"bottom"};function Wt(e){return e.replace(/left|right|bottom|top/g,function(t){return ns[t]})}var as={start:"end",end:"start"};function Oe(e){return e.replace(/start|end/g,function(t){return as[t]})}function Vt(e){var t=A(e),i=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:i,scrollTop:o}}function Rt(e){return J(H(e)).left+Vt(e).scrollLeft}function ei(e,t){var i=A(e),o=H(e),s=i.visualViewport,r=o.clientWidth,n=o.clientHeight,l=0,a=0;if(s){r=s.width,n=s.height;var c=ne();(c||!c&&t==="fixed")&&(l=s.offsetLeft,a=s.offsetTop)}return{width:r,height:n,x:l+Rt(e),y:a}}function ii(e){var t,i=H(e),o=Vt(e),s=(t=e.ownerDocument)==null?void 0:t.body,r=ot(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),n=ot(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),l=-o.scrollLeft+Rt(e),a=-o.scrollTop;return j(s||i).direction==="rtl"&&(l+=ot(i.clientWidth,s?s.clientWidth:0)-r),{width:r,height:n,x:l,y:a}}function Bt(e){var t=j(e),i=t.overflow,o=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+o)}function Le(e){return["html","body","#document"].indexOf(M(e))>=0?e.ownerDocument.body:R(e)&&Bt(e)?e:Le(pt(e))}function bt(e,t){var i;t===void 0&&(t=[]);var o=Le(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),r=A(o),n=s?[r].concat(r.visualViewport||[],Bt(o)?o:[]):o,l=t.concat(n);return s?l:l.concat(bt(pt(n)))}function jt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ls(e,t){var i=J(e,!1,t==="fixed");return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}function Yi(e,t,i){return t===$e?jt(ei(e,i)):Y(t)?ls(t,i):jt(ii(H(e)))}function ds(e){var t=bt(pt(e)),i=["absolute","fixed"].indexOf(j(e).position)>=0,o=i&&R(e)?st(e):e;return Y(o)?t.filter(function(s){return Y(s)&&ae(s,o)&&M(s)!=="body"}):[]}function oi(e,t,i,o){var s=t==="clippingParents"?ds(e):[].concat(t),r=[].concat(s,[i]),n=r[0],l=r.reduce(function(a,c){var d=Yi(e,c,o);return a.top=ot(d.top,a.top),a.right=Ot(d.right,a.right),a.bottom=Ot(d.bottom,a.bottom),a.left=ot(d.left,a.left),a},Yi(e,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 he(e){var t=e.reference,i=e.element,o=e.placement,s=o?k(o):null,r=o?Q(o):null,n=t.x+t.width/2-i.width/2,l=t.y+t.height/2-i.height/2,a;switch(s){case I:a={x:n,y:t.y-i.height};break;case V:a={x:n,y:t.y+t.height};break;case L:a={x:t.x+t.width,y:l};break;case O:a={x:t.x-i.width,y:l};break;default:a={x:t.x,y:t.y}}var c=s?Dt(s):null;if(c!=null){var d=c==="y"?"height":"width";switch(r){case ct:a[c]=a[c]-(t[d]/2-i[d]/2);break;case Pt:a[c]=a[c]+(t[d]/2-i[d]/2);break;default:}}return a}function rt(e,t){t===void 0&&(t={});var i=t,o=i.placement,s=o===void 0?e.placement:o,r=i.strategy,n=r===void 0?e.strategy:r,l=i.boundary,a=l===void 0?Hi:l,c=i.rootBoundary,d=c===void 0?$e:c,p=i.elementContext,f=p===void 0?Ft:p,u=i.altBoundary,b=u===void 0?!1:u,g=i.padding,v=g===void 0?0:g,_=de(typeof v!="number"?v:ce(v,gt)),E=f===Ft?zi:Ft,P=e.rects.popper,m=e.elements[b?E:f],x=oi(Y(m)?m:m.contextElement||H(e.elements.popper),a,d,n),y=J(e.elements.reference),C=he({reference:y,element:P,strategy:"absolute",placement:s}),N=jt(Object.assign({},P,C)),B=f===Ft?N:y,D={top:x.top-B.top+_.top,bottom:B.bottom-x.bottom+_.bottom,left:x.left-B.left+_.left,right:B.right-x.right+_.right},F=e.modifiersData.offset;if(f===Ft&&F){var tt=F[s];Object.keys(D).forEach(function(U){var wt=[L,V].indexOf(U)>=0?1:-1,_t=[I,V].indexOf(U)>=0?"y":"x";D[U]+=tt[_t]*wt})}return D}function si(e,t){t===void 0&&(t={});var i=t,o=i.placement,s=i.boundary,r=i.rootBoundary,n=i.padding,l=i.flipVariations,a=i.allowedAutoPlacements,c=a===void 0?Ee:a,d=Q(o),p=d?l?Ze:Ze.filter(function(b){return Q(b)===d}):gt,f=p.filter(function(b){return c.indexOf(b)>=0});f.length===0&&(f=p);var u=f.reduce(function(b,g){return b[g]=rt(e,{placement:g,boundary:s,rootBoundary:r,padding:n})[k(g)],b},{});return Object.keys(u).sort(function(b,g){return u[b]-u[g]})}function cs(e){if(k(e)===Ie)return[];var t=Wt(e);return[Oe(e),t,Oe(t)]}function hs(e){var t=e.state,i=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var s=i.mainAxis,r=s===void 0?!0:s,n=i.altAxis,l=n===void 0?!0:n,a=i.fallbackPlacements,c=i.padding,d=i.boundary,p=i.rootBoundary,f=i.altBoundary,u=i.flipVariations,b=u===void 0?!0:u,g=i.allowedAutoPlacements,v=t.options.placement,_=k(v),E=_===v,P=a||(E||!b?[Wt(v)]:cs(v)),m=[v].concat(P).reduce(function(Nt,mt){return Nt.concat(k(mt)===Ie?si(t,{placement:mt,boundary:d,rootBoundary:p,padding:c,flipVariations:b,allowedAutoPlacements:g}):mt)},[]),x=t.rects.reference,y=t.rects.popper,C=new Map,N=!0,B=m[0],D=0;D<m.length;D++){var F=m[D],tt=k(F),U=Q(F)===ct,wt=[I,V].indexOf(tt)>=0,_t=wt?"width":"height",G=rt(t,{placement:F,boundary:d,rootBoundary:p,altBoundary:f,padding:c}),et=wt?U?L:O:U?V:I;x[_t]>y[_t]&&(et=Wt(et));var ve=Wt(et),At=[];if(r&&At.push(G[tt]<=0),l&&At.push(G[et]<=0,G[ve]<=0),At.every(function(Nt){return Nt})){B=F,N=!1;break}C.set(F,At)}if(N)for(var ge=b?3:1,Be=function(mt){var Jt=m.find(function(xe){var St=C.get(xe);if(St)return St.slice(0,mt).every(function(Me){return Me})});if(Jt)return B=Jt,"break"},Yt=ge;Yt>0;Yt--){var be=Be(Yt);if(be==="break")break}t.placement!==B&&(t.modifiersData[o]._skip=!0,t.placement=B,t.reset=!0)}}var Ji={name:"flip",enabled:!0,phase:"main",fn:hs,requiresIfExists:["offset"],data:{_skip:!1}};function Qi(e,t,i){return i===void 0&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function Zi(e){return[I,L,V,O].some(function(t){return e[t]>=0})}function ps(e){var t=e.state,i=e.name,o=t.rects.reference,s=t.rects.popper,r=t.modifiersData.preventOverflow,n=rt(t,{elementContext:"reference"}),l=rt(t,{altBoundary:!0}),a=Qi(n,o),c=Qi(l,s,r),d=Zi(a),p=Zi(c);t.modifiersData[i]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}var to={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ps};function us(e,t,i){var o=k(e),s=[O,I].indexOf(o)>=0?-1:1,r=typeof i=="function"?i(Object.assign({},t,{placement:e})):i,n=r[0],l=r[1];return n=n||0,l=(l||0)*s,[O,L].indexOf(o)>=0?{x:l,y:n}:{x:n,y:l}}function fs(e){var t=e.state,i=e.options,o=e.name,s=i.offset,r=s===void 0?[0,0]:s,n=Ee.reduce(function(d,p){return d[p]=us(p,t.rects,r),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 eo={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:fs};function ms(e){var t=e.state,i=e.name;t.modifiersData[i]=he({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var io={name:"popperOffsets",enabled:!0,phase:"read",fn:ms,data:{}};function ri(e){return e==="x"?"y":"x"}function vs(e){var t=e.state,i=e.options,o=e.name,s=i.mainAxis,r=s===void 0?!0:s,n=i.altAxis,l=n===void 0?!1:n,a=i.boundary,c=i.rootBoundary,d=i.altBoundary,p=i.padding,f=i.tether,u=f===void 0?!0:f,b=i.tetherOffset,g=b===void 0?0:b,v=rt(t,{boundary:a,rootBoundary:c,padding:p,altBoundary:d}),_=k(t.placement),E=Q(t.placement),P=!E,m=Dt(_),x=ri(m),y=t.modifiersData.popperOffsets,C=t.rects.reference,N=t.rects.popper,B=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,D=typeof B=="number"?{mainAxis:B,altAxis:B}:Object.assign({mainAxis:0,altAxis:0},B),F=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,tt={x:0,y:0};if(y){if(r){var U,wt=m==="y"?I:O,_t=m==="y"?V:L,G=m==="y"?"height":"width",et=y[m],ve=et+v[wt],At=et-v[_t],ge=u?-N[G]/2:0,Be=E===ct?C[G]:N[G],Yt=E===ct?-N[G]:-C[G],be=t.elements.arrow,Nt=u&&be?Lt(be):{width:0,height:0},mt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:le(),Jt=mt[wt],xe=mt[_t],St=Tt(0,C[G],Nt[G]),Me=P?C[G]/2-ge-St-Jt-D.mainAxis:Be-St-Jt-D.mainAxis,fo=P?-C[G]/2+ge+St+xe+D.mainAxis:Yt+St+xe+D.mainAxis,ke=t.elements.arrow&&st(t.elements.arrow),mo=ke?m==="y"?ke.clientTop||0:ke.clientLeft||0:0,vi=(U=F?.[m])!=null?U:0,vo=et+Me-vi-mo,go=et+fo-vi,gi=Tt(u?Ot(ve,vo):ve,et,u?ot(At,go):At);y[m]=gi,tt[m]=gi-et}if(l){var bi,bo=m==="x"?I:O,xo=m==="x"?V:L,Ct=y[x],ye=x==="y"?"height":"width",xi=Ct+v[bo],yi=Ct-v[xo],Ne=[I,O].indexOf(_)!==-1,wi=(bi=F?.[x])!=null?bi:0,_i=Ne?xi:Ct-C[ye]-N[ye]-wi+D.altAxis,Ai=Ne?Ct+C[ye]+N[ye]-wi-D.altAxis:yi,Si=u&&Ne?Wi(_i,Ct,Ai):Tt(u?_i:xi,Ct,u?Ai:yi);y[x]=Si,tt[x]=Si-Ct}t.modifiersData[o]=tt}}var oo={name:"preventOverflow",enabled:!0,phase:"main",fn:vs,requiresIfExists:["offset"]};function ni(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ai(e){return e===A(e)||!R(e)?Vt(e):ni(e)}function gs(e){var t=e.getBoundingClientRect(),i=ht(t.width)/e.offsetWidth||1,o=ht(t.height)/e.offsetHeight||1;return i!==1||o!==1}function li(e,t,i){i===void 0&&(i=!1);var o=R(t),s=R(t)&&gs(t),r=H(t),n=J(e,s,i),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!i)&&((M(t)!=="body"||Bt(r))&&(l=ai(t)),R(t)?(a=J(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):r&&(a.x=Rt(r))),{x:n.left+l.scrollLeft-a.x,y:n.top+l.scrollTop-a.y,width:n.width,height:n.height}}function bs(e){var t=new Map,i=new Set,o=[];e.forEach(function(r){t.set(r.name,r)});function s(r){i.add(r.name);var n=[].concat(r.requires||[],r.requiresIfExists||[]);n.forEach(function(l){if(!i.has(l)){var a=t.get(l);a&&s(a)}}),o.push(r)}return e.forEach(function(r){i.has(r.name)||s(r)}),o}function di(e){var t=bs(e);return Fi.reduce(function(i,o){return i.concat(t.filter(function(s){return s.phase===o}))},[])}function ci(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}function hi(e){var t=e.reduce(function(i,o){var s=i[o.name];return i[o.name]=s?Object.assign({},s,o,{options:Object.assign({},s.options,o.options),data:Object.assign({},s.data,o.data)}):o,i},{});return Object.keys(t).map(function(i){return t[i]})}var so={placement:"bottom",modifiers:[],strategy:"absolute"};function ro(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function no(e){e===void 0&&(e={});var t=e,i=t.defaultModifiers,o=i===void 0?[]:i,s=t.defaultOptions,r=s===void 0?so:s;return function(l,a,c){c===void 0&&(c=r);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},so,r),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},p=[],f=!1,u={state:d,setOptions:function(_){var E=typeof _=="function"?_(d.options):_;g(),d.options=Object.assign({},r,d.options,E),d.scrollParents={reference:Y(l)?bt(l):l.contextElement?bt(l.contextElement):[],popper:bt(a)};var P=di(hi([].concat(o,d.options.modifiers)));return d.orderedModifiers=P.filter(function(m){return m.enabled}),b(),u.update()},forceUpdate:function(){if(!f){var _=d.elements,E=_.reference,P=_.popper;if(ro(E,P)){d.rects={reference:li(E,st(P),d.options.strategy==="fixed"),popper:Lt(P)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(D){return d.modifiersData[D.name]=Object.assign({},D.data)});for(var m=0;m<d.orderedModifiers.length;m++){if(d.reset===!0){d.reset=!1,m=-1;continue}var x=d.orderedModifiers[m],y=x.fn,C=x.options,N=C===void 0?{}:C,B=x.name;typeof y=="function"&&(d=y({state:d,options:N,name:B,instance:u})||d)}}}},update:ci(function(){return new Promise(function(v){u.forceUpdate(),v(d)})}),destroy:function(){g(),f=!0}};if(!ro(l,a))return u;u.setOptions(c).then(function(v){!f&&c.onFirstUpdate&&c.onFirstUpdate(v)});function b(){d.orderedModifiers.forEach(function(v){var _=v.name,E=v.options,P=E===void 0?{}:E,m=v.effect;if(typeof m=="function"){var x=m({state:d,name:_,instance:u,options:P}),y=function(){};p.push(x||y)}})}function g(){p.forEach(function(v){return v()}),p=[]}return u}}var xs=[Xi,io,Gi,qi,eo,Ji,oo,ji,to],pi=no({defaultModifiers:xs});var z=e=>e??w;var ys=":host{display:inline-block;font-size:13px;line-height:20px;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;color:#111;contain:content}:host([hidden]){display:none!important}:host([level=warn i]){color:#555}:host([level=suggest i]){color:#bf8800}:host([level=error i]){color:#cc0017}:host([level=warn]){color:#555}:host([level=suggest]){color:#bf8800}:host([level=error]){color:#cc0017}.icon{height:12px;width:12px;padding-right:4px;margin-bottom:-1px}",ws="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cstyle%20id='style3'%3e%20.st0{fill:%23fff}.st1{fill:%23c00}%20%3c/style%3e%3cg%20id='g5'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20id='path9'/%3e%3c/g%3e%3cg%20id='g11'%3e%3cpath%20class='st0'%20id='rect13'%20d='M5.5%202.5h1v4h-1z'/%3e%3cpath%20class='st1'%20d='M6%203v3-3m1-1H5v5h2V2z'%20id='path15'/%3e%3c/g%3e%3cg%20id='g17'%3e%3cpath%20class='st0'%20id='rect19'%20d='M5.5%208.5h1v1h-1z'/%3e%3cpath%20class='st1'%20id='polygon21'%20d='M7%208H5v2h2V8z'/%3e%3c/g%3e%3c/svg%3e",_s="data:image/svg+xml,%3csvg%20id='Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cstyle%3e%20.st0{fill:%23bf8800}%20%3c/style%3e%3cpath%20class='st0'%20d='M12%20.8l11%2019.8v1.3H1v-1.3L12%20.8zm.8-.6h-1.6L0%2020v3h24v-3L12.8.2z'/%3e%3cpath%20class='st0'%20d='M11%208h2v8h-2zm0%2010h2v2h-2z'/%3e%3c/svg%3e",As="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20fill='%23555'/%3e%3cpath%20d='M6%209V6v3m-1%201h2V5H5v5zm2-8H5v2h2z'%20class='st1'%20fill='%23555'/%3e%3c/svg%3e",Ss=Object.defineProperty,fi=(e,t,i,o)=>{for(var s=void 0,r=e.length-1,n;r>=0;r--)(n=e[r])&&(s=n(t,i,s)||s);return s&&Ss(t,i,s),s},Kt,pe=(Kt=class extends W{static parseLevel(e){if(e){let t=Object.keys(ue).find(i=>i.toLowerCase()===e.toLowerCase());return t&&ue[t]}}static get styles(){return[it`
|
|
4
|
+
${X(ys)}
|
|
5
|
+
`]}render(){return T`${this.iconToUse&&T`<img class="icon" src="${this.iconToUse}">`}${this.message}`}get iconToUse(){return this.icon||this._defaultIconPath}shouldUpdate(e){return e.has("level")&&(this._defaultIconPath=this.iconForLevel,!this.icon)?!0:super.shouldUpdate(e)}get iconForLevel(){switch(Kt.parseLevel(this.level)){case"warn":return As;case"suggest":return _s;case"error":return ws;default:return null}}},Kt.ID="sd-field-validation-message",Kt.levelConverter={fromAttribute(e){return Kt.parseLevel(e)},toAttribute(e){return e&&e.toLowerCase()}},Kt);fi([h({type:String,attribute:!0})],pe.prototype,"message");fi([h({type:String,attribute:!0})],pe.prototype,"icon");fi([h({converter:pe.levelConverter,reflect:!0})],pe.prototype,"level");var ui=pe,ue=(e=>(e.Warn="warn",e.Suggest="suggest",e.Error="error",e))(ue||{});customElements.get(ui.ID)||customElements.define(ui.ID,ui);var Cs=":host{display:inline-flex;position:relative;cursor:text;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;color:#111;contain:layout style;flex-direction:column}:host([hidden]),:host([type=hidden]){display:none!important}:host([effective-disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([effective-disabled]) .unfocused-line,:host([effective-disabled]) .focused-line{border-bottom-style:dashed}:host(:not([effective-disabled]):focus) .focused-line,:host(:not([effective-disabled])[focused]) .focused-line{transform:none;transition:transform .25s}:host(:not([effective-disabled]):focus) .label.float,:host(:not([effective-disabled])[focused]) .label.float{color:var(--sd-input-focused-color, #1467ba)}:host([inactive]) .input{pointer-events:none}:host([effective-disabled]:focus),:host([effective-disabled][focused]){box-shadow:0 0 0 1px #111}:host(:not([effective-disabled])[validationlevel]) .focused-line,:host(:not([effective-disabled]):invalid) .focused-line{transform:none;transition:transform .25s}:host([validationlevel=warn i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn i]) .label,:host([validationlevel=warn i]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest i]) .label,:host([validationlevel=suggest i]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error i]) .focused-line,:host(:not([validationlevel]):invalid) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error i]) .label,:host([validationlevel=error i]) .validation-message,:host(:not([validationlevel]):invalid) .label,:host(:not([validationlevel]):invalid) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}.validation-message-wrapper{min-height:var(--sd-input-validation-message-minheight, 0px);position:relative;font-size:0}.validation-message{position:relative;position:var(--sd-input-validation-message-minheight, absolute);left:0;right:0}.label.float{transform:translateY(-75%) scale(.75);width:133%}.label:not(.float){max-width:100%}.floated-label-placeholder{height:20px;width:100%}.label{position:absolute;top:0;left:0;line-height:24px;pointer-events:none;color:var(--sd-input-color, #767676);transition:transform .25s,width .25s;transform-origin:left top}.input-wrapper{position:relative;display:flex;flex-direction:row;align-items:center;background-color:var(--input-wrapper-background-color)}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-wrapper{flex-direction:column;align-items:baseline}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-container{width:100%}:host([extended-prefix]:not(:focus-within)) .input-container,:host([extended-prefix][effective-disabled]) .input-container{width:0px}.input-container{line-height:var(--sd-input-line-height, 24px);flex:1 1 auto}.input{width:100%;background:var(--sd-input-background, transparent);font-family:inherit;font-size:inherit;text-align:inherit;color:inherit;border:none;outline:none;resize:none;padding-left:0;padding-right:0}.input:-webkit-autofill{animation-name:onautofillstart}.input:not(:-webkit-autofill){animation-name:onautofillcancel}@keyframes onautofillstart{0%{outline:none}}@keyframes onautofillcancel{0%{outline:none}}.label,input.input{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}.validation-message{text-overflow:ellipsis;overflow-x:hidden;white-space:normal;white-space:var(--sd-input-validation-message-minheight, nowrap)}.input::placeholder{color:var(--sd-input-color, #767676)}.underline{height:2px;width:100%;position:relative}.unfocused-line,.focused-line{position:absolute;inset:0}.unfocused-line{border-bottom:1px solid var(--sd-input-underline-color, #959595)}.focused-line{border-bottom:2px solid var(--sd-input-focused-color, #1467ba);transform-origin:center center;transform:scale3d(0,1,1)}.prefix,.suffix{display:flex;flex-wrap:nowrap;max-width:100%}.prefix ::slotted(*),.suffix ::slotted(*){display:flex}",Is=Object.defineProperty,$=(e,t,i,o)=>{for(var s=void 0,r=e.length-1,n;r>=0;r--)(n=e[r])&&(s=n(t,i,s)||s);return s&&Is(t,i,s),s},$s="sd-lit-input",ao="delegatesFocus"in window.ShadowRoot.prototype,Es=0,nt,S=(nt=class extends W{constructor(){super(),this.rows=1,this.effectiveDisabled=!1,this.type="text",this.autocomplete="off";let e=Es++;this._validationMessageId=nt.ID+"_message_"+e,this._inputId=nt.ID+"_input_"+e,this.attachInternals&&!this.activeShadyDOM&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabIndex")||(this.tabIndex=0)}firstUpdated(e){super.firstUpdated(e),this.initAutocompleted(this.inputElement),this.updateInitialValue(),this.updateFormValidity(),this.hasAttribute("disabled")&&(this.disabled=!0),this.inputElement.oninput=t=>{this.autocompleted=t.inputType==="insertReplacementText"||!("data"in t),this.currentText=this.inputElement.value,this.fireValueChange(!0)},this.inputElement.onchange=()=>this.fireValueChange(),ao||(this.inputElement.onfocus=()=>this.setAttribute("focused",""),this.inputElement.onblur=()=>this.removeAttribute("focused"),this.addEventListener("focus",t=>{t.target===this&&this.inputElement.focus()})),this.inputElement.addEventListener("keyup",()=>{this.updateFormValidity()}),this.addEventListener("keydown",t=>{t.key=="Enter"&&this._internals?.form?.requestSubmit()}),this._initialized=!0}initAutocompleted(e){let t=i=>{/^onautofillstart(-sd-lit-input-\d+|\s?)$/.test(i.animationName)?this.autocompleted=!0:/^onautofillcancel(-sd-lit-input-\d+|\s?)$/.test(i.animationName)&&(this.autocompleted=!1)};this.activeShadyDOM?(this._needsAutocompletedCheck=!0,this.activeShadyDOM.nativeMethods.addEventListener.call(e,"animationstart",t)):e.addEventListener("animationstart",t)}get activeShadyDOM(){let e=window.ShadyDOM;return e&&e.inUse?e:null}updateInitialValue(){typeof this.currentText<"u"?this.value=this.currentText:this.value=this.getAttribute("value"),this.value&&(this.currentText=this.inputElement.value),this._initialValue=this.value}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this._internals||(this.effectiveDisabled=e)}get inputElement(){return this.shadowRoot&&!this._inputElement&&(this._inputElement=this.shadowRoot.querySelector(".input")),this._inputElement}get value(){return this.inputElement&&this.inputElement.value}set value(e){this.currentText=e||"",this.inputElement&&(this.inputElement.value=this.currentText),this.setFormValue(this.currentText)}get selectionStart(){return this.inputElement?this.inputElement.selectionStart:0}focus(){this.inputElement?this.inputElement.focus():super.focus()}select(){this.inputElement&&this.inputElement.select()}setSelectionRange(e,t){this.updateComplete.then(()=>{this.inputElement&&this.inputElement.setSelectionRange(e,t)})}static get styles(){return[it`
|
|
6
|
+
${X(Cs)}
|
|
7
|
+
`]}render(){let e,t=this.validationMessage||this.inputElement?.validationMessage,i=t||this.validationLevel!=null;return this.rows===1?e=T`
|
|
8
8
|
<input
|
|
9
9
|
id=${this._inputId}
|
|
10
10
|
class="input"
|
|
@@ -18,13 +18,13 @@ var window;(window||={})["@cas-smartdesign/combo-box"]=(()=>{var Ne=Object.defin
|
|
|
18
18
|
?required=${this.required}
|
|
19
19
|
maxlength=${this.maxlength>0?this.maxlength:nt.DEFAULT_MAX_LENGTH}
|
|
20
20
|
aria-describedby=${this._validationMessageId}
|
|
21
|
-
aria-invalid=${z(
|
|
21
|
+
aria-invalid=${z(i)}
|
|
22
22
|
aria-label=${z(this.sdAriaLabel||void 0)}
|
|
23
23
|
min=${z(this.min||void 0)}
|
|
24
24
|
max=${z(this.max||void 0)}
|
|
25
25
|
pattern=${z(this.pattern||void 0)}
|
|
26
26
|
/>
|
|
27
|
-
`:
|
|
27
|
+
`:e=T`
|
|
28
28
|
<textarea
|
|
29
29
|
id=${this._inputId}
|
|
30
30
|
class="input"
|
|
@@ -38,11 +38,11 @@ var window;(window||={})["@cas-smartdesign/combo-box"]=(()=>{var Ne=Object.defin
|
|
|
38
38
|
maxlength=${this.maxlength>0?this.maxlength:nt.DEFAULT_MAX_LENGTH}
|
|
39
39
|
rows=${this.rows}
|
|
40
40
|
aria-describedby=${this._validationMessageId}
|
|
41
|
-
aria-invalid=${z(
|
|
41
|
+
aria-invalid=${z(i)}
|
|
42
42
|
aria-label=${z(this.sdAriaLabel||void 0)}
|
|
43
43
|
></textarea>
|
|
44
44
|
`,T`
|
|
45
|
-
${this.label?T` <div class="floated-label-placeholder" aria-hidden="true"> </div> `:
|
|
45
|
+
${this.label?T` <div class="floated-label-placeholder" aria-hidden="true"> </div> `:w}
|
|
46
46
|
<div class="input-wrapper">
|
|
47
47
|
<span class="prefix"><slot name="prefix"></slot></span>
|
|
48
48
|
<div class="input-container" style="position:${this.shouldFloat()?"static":"relative"};">
|
|
@@ -51,7 +51,7 @@ var window;(window||={})["@cas-smartdesign/combo-box"]=(()=>{var Ne=Object.defin
|
|
|
51
51
|
>${this.label}</label
|
|
52
52
|
>
|
|
53
53
|
`}
|
|
54
|
-
${
|
|
54
|
+
${e}
|
|
55
55
|
</div>
|
|
56
56
|
<span class="suffix"><slot name="suffix"></slot></span>
|
|
57
57
|
</div>
|
|
@@ -60,19 +60,19 @@ var window;(window||={})["@cas-smartdesign/combo-box"]=(()=>{var Ne=Object.defin
|
|
|
60
60
|
<div class="focused-line"></div>
|
|
61
61
|
</div>
|
|
62
62
|
<div class="validation-message-wrapper" aria-hidden="true">
|
|
63
|
-
${(
|
|
63
|
+
${(t||this.validationIconSrc)&&T`
|
|
64
64
|
<sd-field-validation-message
|
|
65
65
|
id=${this._validationMessageId}
|
|
66
66
|
class="validation-message"
|
|
67
|
-
.message=${
|
|
67
|
+
.message=${t}
|
|
68
68
|
.icon=${this.validationIconSrc}
|
|
69
69
|
.level=${this.validationLevel}
|
|
70
70
|
>
|
|
71
71
|
</sd-field-validation-message>
|
|
72
72
|
`}
|
|
73
73
|
</div>
|
|
74
|
-
`}updated(e){super.updated(e),this._needsAutocompletedCheck&&!this.autocompleted&&setTimeout(()=>{try{this.autocompleted=this.autocompleted||!!this.shadowRoot.querySelector(":-webkit-autofill")}catch{}},0),this.rows>1&&((e.has("min")||e.has("max")||e.has("pattern"))&&console.warn("min, max & pattern attributes are not supported with multiple rows configuration."),this.type!="text"&&console.warn(`type: ${this.type} is not supported with multiple rows configuration.`))}update(e){
|
|
75
|
-
${X(
|
|
74
|
+
`}updated(e){super.updated(e),this._needsAutocompletedCheck&&!this.autocompleted&&setTimeout(()=>{try{this.autocompleted=this.autocompleted||!!this.shadowRoot.querySelector(":-webkit-autofill")}catch{}},0),this.rows>1&&((e.has("min")||e.has("max")||e.has("pattern"))&&console.warn("min, max & pattern attributes are not supported with multiple rows configuration."),this.type!="text"&&console.warn(`type: ${this.type} is not supported with multiple rows configuration.`))}update(e){if(super.update(e),e.has("validationMessage")&&(this.validationMessage?this._internals?.setValidity({customError:!0},this.validationMessage):this._internals?.setValidity(this.inputElement.validity,this.inputElement.validationMessage)),this._initialized&&e.has("rows"))throw Error("rows attribute cannot be changed after the input is attached to the DOM")}fireValueChange(e){this.dispatchEvent(new CustomEvent(`${e?"immediate-":""}value-change`,{detail:{value:this.value}})),this.setFormValue(this.value),this.updateFormValidity()}updateFormValidity(){if(this.validationMessage==null){this._internals.setValidity(this.inputElement.validity,this.inputElement.validationMessage);let e=this.shadowRoot.querySelector("sd-field-validation-message");this.requestUpdate("validationMessage",e==null?null:e.message)}}shouldFloat(){return this.alwaysFloatLabel||this.currentText||this.placeholder||this.autocompleted||this.type==="date"}setFormValue(e){this._internals?.setFormValue(e)}formResetCallback(){this.value=this._initialValue}formDisabledCallback(e){this.effectiveDisabled=e||this.hasAttribute("disabled")}formAssociatedCallback(e){this._needsAutocompletedCheck=!0}formStateRestoreCallback(e,t){typeof e=="string"&&(this.value=e)}},nt.ID=$s,nt.DEFAULT_MAX_LENGTH=524288,nt.formAssociated=!0,nt.shadowRootOptions={...W.shadowRootOptions,delegatesFocus:ao},nt);$([h({type:String,reflect:!0})],S.prototype,"label");$([h({type:String,attribute:!0})],S.prototype,"validationMessage");$([h({type:String,attribute:!0})],S.prototype,"validationIconSrc");$([h({type:ue,attribute:!0,reflect:!0})],S.prototype,"validationLevel");$([h({type:String,hasChanged(e,t){return t!=null&&t!=e}})],S.prototype,"currentText");$([h({type:Boolean,attribute:!0})],S.prototype,"alwaysFloatLabel");$([h({type:Boolean,attribute:!0})],S.prototype,"autocompleted");$([h({type:Number,attribute:!0})],S.prototype,"rows");$([h({type:Boolean,reflect:!0,attribute:"effective-disabled"})],S.prototype,"effectiveDisabled");$([h({type:Boolean,reflect:!0,attribute:"extended-prefix"})],S.prototype,"extendedPrefix");$([h({type:String,reflect:!0})],S.prototype,"type");$([h({type:String,reflect:!0})],S.prototype,"placeholder");$([h({type:String,reflect:!0})],S.prototype,"sdAriaLabel");$([h({type:Number,reflect:!0})],S.prototype,"maxlength");$([h({type:Boolean,reflect:!0})],S.prototype,"readonly");$([h({type:Boolean,reflect:!0})],S.prototype,"required");$([h({type:String,reflect:!0})],S.prototype,"name");$([h({type:Boolean,reflect:!0})],S.prototype,"inactive");$([h({type:String,attribute:!0})],S.prototype,"autocomplete");$([h({type:String,attribute:!0})],S.prototype,"min");$([h({type:String,attribute:!0})],S.prototype,"max");$([h({type:String,attribute:!0})],S.prototype,"pattern");var fe=S;customElements.get(fe.ID)||customElements.define(fe.ID,fe);var lo={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},co=e=>(...t)=>({_$litDirective$:e,values:t}),De=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,o){this._$Ct=t,this._$AM=i,this._$Ci=o}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}};var me=class extends De{constructor(t){if(super(t),this.it=w,t.type!==lo.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===w||t==null)return this._t=void 0,this.it=t;if(t===dt)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let i=[t];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}};me.directiveName="unsafeHTML",me.resultType=1;var ho=co(me);var Gt=class{static showImage(t,i,o,s){let r;if(s||!(t instanceof HTMLImageElement)?r=n=>t.style.backgroundImage=this.prepareSrc(n):r=n=>t.src=n,r(o),i){let n=()=>{r(i)},l=new Image;l.addEventListener("load",n),l.src=i,l.complete&&(l.removeEventListener("load",n),n())}}static prepareSrc(t){return t?t.startsWith("url")?t:`url("${t}")`:null}};var Ps=':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;overflow-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}',Os=Object.defineProperty,K=(e,t,i,o)=>{for(var s=void 0,r=e.length-1,n;r>=0;r--)(n=e[r])&&(s=n(t,i,s)||s);return s&&Os(t,i,s),s},Mt,q=(Mt=class extends W{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[it`
|
|
75
|
+
${X(Ps)}
|
|
76
76
|
`]}render(){return T`
|
|
77
77
|
<div class="container">
|
|
78
78
|
${this.getLevelIndicators().map((e,t)=>T` <div class="level-indicator level-${t}"></div> `)}
|
|
@@ -99,31 +99,31 @@ var window;(window||={})["@cas-smartdesign/combo-box"]=(()=>{var Ne=Object.defin
|
|
|
99
99
|
>
|
|
100
100
|
<div class="icon"></div>
|
|
101
101
|
</div>
|
|
102
|
-
`}return
|
|
102
|
+
`}return w}renderLabel(e,t,i){return t?T`
|
|
103
103
|
<div class="${e}" title="${z(i)}">
|
|
104
|
-
${this.contentMode==="html"?
|
|
104
|
+
${this.contentMode==="html"?ho(t):t}
|
|
105
105
|
</div>
|
|
106
|
-
`:
|
|
107
|
-
${X(
|
|
106
|
+
`:w}updated(e){super.updated(e),(e.has("icon")||e.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&Gt.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),e.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){let e=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let t=0,i=this.shadowRoot.querySelector(".caption");i&&(t+=i.scrollWidth-i.clientWidth);let o=this.shadowRoot.querySelector(".description");return o&&(t=Math.max(t,o.scrollWidth-o.clientWidth)),t>0&&t++,e&&this.setAttribute("enable-line-clamp",""),t}handleIconClick(e){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",e))&&e.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},Mt.ID="sd-list-item",Mt.ensureDefined=()=>{customElements.get(Mt.ID)||customElements.define(Mt.ID,Mt)},Mt);K([h({type:String})],q.prototype,"caption");K([h({type:String})],q.prototype,"description");K([h({type:Boolean})],q.prototype,"selected");K([h({type:String})],q.prototype,"icon");K([h({type:String})],q.prototype,"iconBackgroundColor");K([h({type:String})],q.prototype,"iconPlaceholder");K([h({type:Number})],q.prototype,"level");K([h()],q.prototype,"contentMode");K([h({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],q.prototype,"enableLineClamp");K([h({converter:{fromAttribute:e=>e=="true",toAttribute:e=>e},reflect:!0,attribute:"aria-disabled"})],q.prototype,"disabled");K([h({type:String,attribute:"icon-attr-aria-label"})],q.prototype,"iconAttrAriaLabel");K([h({type:String,reflect:!0})],q.prototype,"role");K([h({type:String,attribute:"caption-attr-title"})],q.prototype,"captionAttrTitle");K([h({type:String,attribute:"description-attr-title"})],q.prototype,"descriptionAttrTitle");K([h({type:String,attribute:"icon-attr-title"})],q.prototype,"iconAttrTitle");var kt=q,Te=(e,t)=>{let i=document.createElement(kt.ID);if(e){if(i.caption=e.caption,i.description=e.description,i.icon=e.icon,i.iconBackgroundColor=e.iconBackgroundColor,i.iconPlaceholder=e.iconPlaceholder,i.level=e.level,i.disabled=e.disabled,e.contentMode&&(i.contentMode=e.contentMode),e.leftContentGenerator){let o=e.leftContentGenerator(e,i);o&&(o.slot="left-content",i.appendChild(o))}if(e.rightContentGenerator){let o=e.rightContentGenerator(e,i);o&&(o.slot="right-content",i.appendChild(o))}}return i};kt.ensureDefined();var mi=class{getOffsetForIndexAndAlignment(t,i,o,s,r,n){let l=Math.max(0,n*s),a=Math.min(l,t*s),c=Math.max(0,t*s-r+s);switch(i){case"start":return a;case"end":return c;case"center":{let d=Math.round(c+(a-c)/2);return d<Math.ceil(r/2)?0:d>l+Math.floor(r/2)?l:d}case"auto":default:return o>=c&&o<=a?o:o<c?c:a}}debounce(t){let i;return(...o)=>{i&&window.cancelAnimationFrame(i),i=window.requestAnimationFrame(()=>{t(...o),i=null})}}},Ls=new mi,Ve=class{constructor(t=100,i=5){this.pageSize=t,this.preloadedItemsCount=i,this._finalSizeIsKnown=!1,this._itemCache=[],this._lastRequestedFirstIndex=0,this._lastRequestedLastIndex=0,this._lastLoadedIndex=0,this.handleListDataRequest=o=>{let{startIndex:s,stopIndex:r}=o.detail;this._lastRequestedFirstIndex=s,this._lastRequestedLastIndex=r,this._list.items=this._itemCache.slice(s,r+1),!this.finalSizeIsKnown&&this._lastLoadedIndex<r+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")}},Ds=":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}",Ts=Object.defineProperty,Vs=Object.getOwnPropertyDescriptor,yt=(e,t,i,o)=>{for(var s=o>1?void 0:o?Vs(t,i):t,r=e.length-1,n;r>=0;r--)(n=e[r])&&(s=(o?n(t,i,s):n(s))||s);return o&&s&&Ts(t,i,s),s},Xt=(e=>(e.TriggerOnly="trigger-only",e.Single="single",e.Multi="multi",e))(Xt||{}),Rs=0,xt,ut=(xt=class extends W{constructor(){super(),this.items=[],this.selectionType="trigger-only",this.id=xt.ID+"_"+Rs++,this.role="listbox",this.itemGenerator=Te,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 e=this._lastRenderedScrollTop-this._lastKnownScrollTop;Math.abs(e)>=this.itemHeight&&(this._lastRenderedScrollTop=this._lastKnownScrollTop,this.requestUpdate())},this.handleKeyDown=e=>{let t=!0;switch(e.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,e.metaKey||e.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&&(e.preventDefault(),e.stopPropagation())},this._resizeObserver=new ResizeObserver(()=>{this._lastKnownHeight!==this.offsetHeight&&(this._lastKnownHeight=this.offsetHeight,this.requestUpdate())})}get focusTarget(){return this.hasAttribute("focus-target")}set focusTarget(e){this.toggleAttribute("focus-target",e)}get focusIndex(){return this._focusIndex}set focusIndex(e){if(e>=-1&&e<this.itemCount){let t=this._focusIndex;this._focusIndex=e,(e<=this._firstVisibleIndex||this._lastVisibleIndex<=e)&&this.scrollToItem(e),t!=e&&(e==-1&&this.removeAttribute("aria-activedescendant"),this.requestUpdate("focusIndex",t))}}get selectedIndices(){return this._selectedIndices}set selectedIndices(e){e?this._selectedIndices=e.map(t=>Number(t)):this._selectedIndices=[],this.requestUpdate("selectedIndices")}scrollToItem(e,t="auto"){this.scrollTop=Ls.getOffsetForIndexAndAlignment(this.normalizeIndex(e),t,this.scrollTop,this.itemHeight,this.height,this.itemCount),this._lastKnownScrollTop=this.scrollTop}getListItem(e){return!this.shadowRoot||e<this._firstVisibleIndex||this._lastVisibleIndex<e?null:this.querySelector(`[item-index="${e}"]`)}connectedCallback(){super.connectedCallback(),this._resizeObserver.observe(this),this.scrollTop!==this._lastKnownScrollTop&&(this.scrollTop=this._lastKnownScrollTop,this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.disconnect()}firstUpdated(e){super.firstUpdated(e),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 e=this.getListItem(this.focusIndex);e&&(this.focusTarget||document.activeElement==this?(e.setAttribute("focused",""),this.setAttribute("aria-activedescendant",e.id)):(e.removeAttribute("focused"),this.removeAttribute("aria-activedescendant")))}static get styles(){return[it`
|
|
107
|
+
${X(Ds)}
|
|
108
108
|
`]}render(){return this.updateItemsRenderData(),T`
|
|
109
109
|
<div class="container" style="height: ${this.itemCount*this.itemHeight}px">
|
|
110
110
|
<slot name="items"></slot>
|
|
111
111
|
</div>
|
|
112
|
-
`}updated(e){if(super.updated(e),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 e=Number.parseInt(getComputedStyle(this).maxWidth)-this.offsetWidth;if(e==0)this._reachedMaxWidth=!0,this.enableLineClampOnItemsIfNeeded();else{this._reachedMaxWidth=!1;let t=[...this.querySelectorAll("[item-index]")].map(o=>{if(o instanceof Mt){o.enableLineClamp=!1;let s=o.missingWidthForTexts;return s>e&&(o.enableLineClamp=!0),s}}),i=Math.max(...t);i>0&&(this.style.width=`${this.offsetWidth+i}px`)}})):this._reachedMaxWidth&&this.enableLineClampOnItemsIfNeeded()}enableLineClampOnItemsIfNeeded(){this.querySelectorAll("[item-index]").forEach(e=>{e instanceof Mt&&(e.enableLineClamp=e.enableLineClamp||e.missingWidthForTexts>0)})}increaseWidthOnNextRenderIfNeeded(){this._increaseWidthOnNextRenderIfNeeded=!0}updateItems(){let e=[...this.querySelectorAll("[item-index]")],t=new Map,i=document.createDocumentFragment();for(let o of this._itemsRenderData){let s=this.renderItem(o);s.parentElement||i.appendChild(s),t.set(o.dataHash,s);let r=e.indexOf(s);r!==-1&&e.splice(r,1)}this.appendChild(i);for(let o of e)o instanceof Mt&&(o.enableLineClamp=!1),this.removeChild(o);t.forEach((o,s)=>{this._elementCache.set(s,o)})}renderItem({index:e,top:t,dataHash:i,data:o}){let s;return o?this._elementCache.has(i)?(s=this._elementCache.get(i),this._elementCache.delete(i)):(s=this.itemGenerator(o,e),s.setAttribute("slot","items")):(s=document.createElement("div"),s.setAttribute("placeholder-item",""),s.setAttribute("slot","items")),Object.assign(s.style,{transform:`translateY(${t}px)`,height:`${this.itemHeight}px`}),s.setAttribute("item-index",e.toString()),s.setAttribute("aria-setsize",String(this.finalSizeIsKnown?this.itemCount:-1)),s.setAttribute("aria-posinset",String(e+1)),(!s.id||s.id.startsWith(this.id+"_item_"))&&(s.id=this.id+"_item_"+e),this.itemCount-1==e?s.setAttribute("last",""):s.removeAttribute("last"),this.updateSelectedAttribute(e,s),this.updateFocusedAttribute(e,s),s}updateFocusedAttribute(e,t){this.focusIndex==e&&(this.focusTarget||document.activeElement==this)?(t.setAttribute("focused",""),this.setAttribute("aria-activedescendant",t.id)):t.removeAttribute("focused")}updateSelectedAttribute(e,t){let i=this.selectedIndices.indexOf(e)!==-1;i?t.setAttribute("selected",""):t.removeAttribute("selected"),t.setAttribute("aria-selected",String(i))}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 e=this.normalizeIndex(this._firstVisibleIndex-2),t=this.normalizeIndex(this._lastVisibleIndex+2);this.requestData(e,t);for(let i=e;i<=t;i++){let o=i-e,s=this.items[o],r;s?r=JSON.stringify(s):r=`placeholder-${o}`,this._itemsRenderData.push({index:i,top:this.itemHeight*i,physicalIndex:o,dataHash:r,data:s})}}else this._firstVisibleIndex=0,this._lastVisibleIndex=0}normalizeIndex(e){return Math.max(0,Math.min(e,this.itemCount-1))}get height(){return this.offsetHeight}requestData(e,t){!Number.isNaN(e)&&!Number.isNaN(t)&&this.dispatchEvent(new CustomEvent("data-request",{detail:{startIndex:e,stopIndex:t}}))}handleSelection(e,t){if(e<0||this.itemCount<=e)return;let i=this.getListItem(e);if(i.getAttribute("aria-disabled")=="true"||i.hasAttribute("disabled"))return;let o=!0;if(this.selectionType!=="trigger-only"){let s=this.selectedIndices.indexOf(e);o=s==-1,o?this.selectionType==="single"?this.selectedIndices=[e]:this.selectedIndices.push(e):this.selectedIndices.splice(s,1),this.requestUpdate("selectedIndices")}this.focusIndex=e,this.dispatchSelectionEvent(e,o,t)}dispatchSelectionEvent(e,t,i){this.dispatchEvent(new CustomEvent("selection",{detail:{index:e,selected:t,hasModifier:i}}))}handleClick(e){let t=e.composedPath().find(i=>i.hasAttribute&&i.hasAttribute("item-index"));if(t){let i=parseInt(t.getAttribute("item-index"));if(Number.isInteger(i)){if(e.button==0||e.button==1){let o=e.type=="auxclick"&&e.button==1||e.metaKey||e.ctrlKey;this.handleSelection(i,o)}this.focusIndex=i}}}},xt.ID="sd-virtual-list",xt.ensureDefined=()=>{Mt.ensureDefined(),customElements.get(xt.ID)||customElements.define(xt.ID,xt)},xt);yt([h({type:Number,attribute:"item-height",reflect:!0})],ut.prototype,"itemHeight",2);yt([h({type:Number})],ut.prototype,"itemCount",2);yt([h({type:Array,attribute:!1})],ut.prototype,"items",2);yt([h({type:String,attribute:"selection-type",reflect:!0,noAccessor:!0})],ut.prototype,"selectionType",2);yt([h({type:String,attribute:!0,reflect:!0})],ut.prototype,"id",2);yt([h({type:String,reflect:!0})],ut.prototype,"role",2);yt([h({type:Number,attribute:"focus-index",reflect:!0})],ut.prototype,"focusIndex",1);yt([h({type:Array,attribute:!1})],ut.prototype,"selectedIndices",1);var Ve=ut;Ve.ensureDefined();var ks=":host{display:inline-flex;position:relative;cursor:text;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;color:#111;contain:layout style;flex-direction:column}:host([hidden]),:host([type=hidden]){display:none!important}:host([effective-disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([effective-disabled]) .unfocused-line,:host([effective-disabled]) .focused-line{border-bottom-style:dashed}:host(:not([effective-disabled]):focus) .focused-line,:host(:not([effective-disabled])[focused]) .focused-line{transform:none;transition:transform .25s}:host(:not([effective-disabled]):focus) .label.float,:host(:not([effective-disabled])[focused]) .label.float{color:var(--sd-input-focused-color, #1467ba)}:host([inactive]) .input{pointer-events:none}:host([effective-disabled]:focus),:host([effective-disabled][focused]){box-shadow:0 0 0 1px #111}:host(:not([effective-disabled])[validationlevel]) .focused-line,:host(:not([effective-disabled]):invalid) .focused-line{transform:none;transition:transform .25s}:host([validationlevel=warn i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn i]) .label,:host([validationlevel=warn i]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest i]) .label,:host([validationlevel=suggest i]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error i]) .focused-line,:host(:not([validationlevel]):invalid) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error i]) .label,:host([validationlevel=error i]) .validation-message,:host(:not([validationlevel]):invalid) .label,:host(:not([validationlevel]):invalid) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}.validation-message-wrapper{min-height:var(--sd-input-validation-message-minheight, 0px);position:relative;font-size:0}.validation-message{position:relative;position:var(--sd-input-validation-message-minheight, absolute);left:0;right:0}.label.float{transform:translateY(-75%) scale(.75);width:133%}.label:not(.float){max-width:100%}.floated-label-placeholder{height:20px;width:100%}.label{position:absolute;top:0;left:0;line-height:24px;pointer-events:none;color:var(--sd-input-color, #767676);transition:transform .25s,width .25s;transform-origin:left top}.input-wrapper{position:relative;display:flex;flex-direction:row;align-items:center;background-color:var(--input-wrapper-background-color)}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-wrapper{flex-direction:column;align-items:baseline}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-container{width:100%}:host([extended-prefix]:not(:focus-within)) .input-container,:host([extended-prefix][effective-disabled]) .input-container{width:0px}.input-container{line-height:var(--sd-input-line-height, 24px);flex:1 1 auto}.input{width:100%;background:var(--sd-input-background, transparent);font-family:inherit;font-size:inherit;text-align:inherit;color:inherit;border:none;outline:none;resize:none;padding-left:0;padding-right:0}.input:-webkit-autofill{animation-name:onautofillstart}.input:not(:-webkit-autofill){animation-name:onautofillcancel}@keyframes onautofillstart{0%{outline:none}}@keyframes onautofillcancel{0%{outline:none}}.label,input.input{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}.validation-message{text-overflow:ellipsis;overflow-x:hidden;white-space:normal;white-space:var(--sd-input-validation-message-minheight, nowrap)}.input::placeholder{color:var(--sd-input-color, #767676)}.underline{height:2px;width:100%;position:relative}.unfocused-line,.focused-line{position:absolute;top:0;right:0;bottom:0;left:0}.unfocused-line{border-bottom:1px solid var(--sd-input-underline-color, #959595)}.focused-line{border-bottom:2px solid var(--sd-input-focused-color, #1467ba);transform-origin:center center;transform:scale3d(0,1,1)}.prefix,.suffix{display:flex;flex-wrap:nowrap;max-width:100%}.prefix ::slotted(*),.suffix ::slotted(*){display:flex}:host(:focus){outline:none}.suffix ::slotted(.clear-button),.suffix ::slotted(.toggle-button){cursor:pointer;width:16px;height:32px;padding:0 8px;margin-top:-8px;margin-bottom:-8px;fill:#666;outline:none;flex-shrink:0}.suffix ::slotted(.toggle-button){transition:transform .2s}:host([opened]) .suffix ::slotted(.toggle-button){transform:rotate(180deg)}:host([disabled]) .suffix ::slotted(.clear-button),:host([disabled]) .suffix ::slotted(.toggle-button){display:none!important}.prefix ::slotted(.icon-wrapper){width:32px;height:32px;padding-right:4px;margin-top:-8px;margin-bottom:-8px;display:flex;align-items:center;justify-content:center;flex-shrink:0}:host(:not([has-value])) .suffix ::slotted(.clear-button),:host([null-setting-disallowed]) .suffix ::slotted(.clear-button){display:none!important}:host(:not([allow-custom-value]):not([trigger-only])) .input{caret-color:transparent}:host(:not([allow-custom-value]):not([disabled])) .input{cursor:pointer}#default-slot{display:none}",Ms=`<svg xmlns="http://www.w3.org/2000/svg" class="toggle-button" slot="suffix" viewBox="0 0 16 16">\r
|
|
112
|
+
`}updated(e){if(super.updated(e),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 e=Number.parseInt(getComputedStyle(this).maxWidth)-this.offsetWidth;if(e==0)this._reachedMaxWidth=!0,this.enableLineClampOnItemsIfNeeded();else{this._reachedMaxWidth=!1;let t=[...this.querySelectorAll("[item-index]")].map(o=>{if(o instanceof kt){o.enableLineClamp=!1;let s=o.missingWidthForTexts;return s>e&&(o.enableLineClamp=!0),s}}),i=Math.max(...t);i>0&&(this.style.width=`${this.offsetWidth+i}px`)}})):this._reachedMaxWidth&&this.enableLineClampOnItemsIfNeeded()}enableLineClampOnItemsIfNeeded(){this.querySelectorAll("[item-index]").forEach(e=>{e instanceof kt&&(e.enableLineClamp=e.enableLineClamp||e.missingWidthForTexts>0)})}increaseWidthOnNextRenderIfNeeded(){this._increaseWidthOnNextRenderIfNeeded=!0}updateItems(){let e=[...this.querySelectorAll("[item-index]")],t=new Map,i=document.createDocumentFragment();for(let o of this._itemsRenderData){let s=this.renderItem(o);s.parentElement||i.appendChild(s),t.set(o.dataHash,s);let r=e.indexOf(s);r!==-1&&e.splice(r,1)}this.appendChild(i);for(let o of e)o instanceof kt&&(o.enableLineClamp=!1),this.removeChild(o);t.forEach((o,s)=>{this._elementCache.set(s,o)})}renderItem({index:e,top:t,dataHash:i,data:o}){let s;return o?this._elementCache.has(i)?(s=this._elementCache.get(i),this._elementCache.delete(i)):(s=this.itemGenerator(o,e),s.setAttribute("slot","items")):(s=document.createElement("div"),s.setAttribute("placeholder-item",""),s.setAttribute("slot","items")),Object.assign(s.style,{transform:`translateY(${t}px)`,height:`${this.itemHeight}px`}),s.setAttribute("item-index",e.toString()),s.setAttribute("aria-setsize",String(this.finalSizeIsKnown?this.itemCount:-1)),s.setAttribute("aria-posinset",String(e+1)),(!s.id||s.id.startsWith(this.id+"_item_"))&&(s.id=this.id+"_item_"+e),this.itemCount-1==e?s.setAttribute("last",""):s.removeAttribute("last"),this.updateSelectedAttribute(e,s),this.updateFocusedAttribute(e,s),s}updateFocusedAttribute(e,t){this.focusIndex==e&&(this.focusTarget||document.activeElement==this)?(t.setAttribute("focused",""),this.setAttribute("aria-activedescendant",t.id)):t.removeAttribute("focused")}updateSelectedAttribute(e,t){let i=this.selectedIndices.indexOf(e)!==-1;i?t.setAttribute("selected",""):t.removeAttribute("selected"),t.setAttribute("aria-selected",String(i))}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 e=this.normalizeIndex(this._firstVisibleIndex-2),t=this.normalizeIndex(this._lastVisibleIndex+2);this.requestData(e,t);for(let i=e;i<=t;i++){let o=i-e,s=this.items[o],r;s?r=JSON.stringify(s):r=`placeholder-${o}`,this._itemsRenderData.push({index:i,top:this.itemHeight*i,physicalIndex:o,dataHash:r,data:s})}}else this._firstVisibleIndex=0,this._lastVisibleIndex=0}normalizeIndex(e){return Math.max(0,Math.min(e,this.itemCount-1))}get height(){return this.offsetHeight}requestData(e,t){!Number.isNaN(e)&&!Number.isNaN(t)&&this.dispatchEvent(new CustomEvent("data-request",{detail:{startIndex:e,stopIndex:t}}))}handleSelection(e,t){if(e<0||this.itemCount<=e)return;let i=this.getListItem(e);if(i.getAttribute("aria-disabled")=="true"||i.hasAttribute("disabled"))return;let o=!0;if(this.selectionType!=="trigger-only"){let s=this.selectedIndices.indexOf(e);o=s==-1,o?this.selectionType==="single"?this.selectedIndices=[e]:this.selectedIndices.push(e):this.selectedIndices.splice(s,1),this.requestUpdate("selectedIndices")}this.focusIndex=e,this.dispatchSelectionEvent(e,o,t)}dispatchSelectionEvent(e,t,i){this.dispatchEvent(new CustomEvent("selection",{detail:{index:e,selected:t,hasModifier:i}}))}handleClick(e){let t=e.composedPath().find(i=>i.hasAttribute&&i.hasAttribute("item-index"));if(t){let i=parseInt(t.getAttribute("item-index"));if(Number.isInteger(i)){if(e.button==0||e.button==1){let o=e.type=="auxclick"&&e.button==1||e.metaKey||e.ctrlKey;this.handleSelection(i,o)}this.focusIndex=i}}}},xt.ID="sd-virtual-list",xt.ensureDefined=()=>{kt.ensureDefined(),customElements.get(xt.ID)||customElements.define(xt.ID,xt)},xt);yt([h({type:Number,attribute:"item-height",reflect:!0})],ut.prototype,"itemHeight",2);yt([h({type:Number})],ut.prototype,"itemCount",2);yt([h({type:Array,attribute:!1})],ut.prototype,"items",2);yt([h({type:String,attribute:"selection-type",reflect:!0,noAccessor:!0})],ut.prototype,"selectionType",2);yt([h({type:String,attribute:!0,reflect:!0})],ut.prototype,"id",2);yt([h({type:String,reflect:!0})],ut.prototype,"role",2);yt([h({type:Number,attribute:"focus-index",reflect:!0})],ut.prototype,"focusIndex",1);yt([h({type:Array,attribute:!1})],ut.prototype,"selectedIndices",1);var Re=ut;Re.ensureDefined();var Bs=":host{display:inline-flex;position:relative;cursor:text;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;color:#111;contain:layout style;flex-direction:column}:host([hidden]),:host([type=hidden]){display:none!important}:host([effective-disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([effective-disabled]) .unfocused-line,:host([effective-disabled]) .focused-line{border-bottom-style:dashed}:host(:not([effective-disabled]):focus) .focused-line,:host(:not([effective-disabled])[focused]) .focused-line{transform:none;transition:transform .25s}:host(:not([effective-disabled]):focus) .label.float,:host(:not([effective-disabled])[focused]) .label.float{color:var(--sd-input-focused-color, #1467ba)}:host([inactive]) .input{pointer-events:none}:host([effective-disabled]:focus),:host([effective-disabled][focused]){box-shadow:0 0 0 1px #111}:host(:not([effective-disabled])[validationlevel]) .focused-line,:host(:not([effective-disabled]):invalid) .focused-line{transform:none;transition:transform .25s}:host([validationlevel=warn i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn i]) .label,:host([validationlevel=warn i]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest i]) .label,:host([validationlevel=suggest i]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error i]) .focused-line,:host(:not([validationlevel]):invalid) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error i]) .label,:host([validationlevel=error i]) .validation-message,:host(:not([validationlevel]):invalid) .label,:host(:not([validationlevel]):invalid) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}.validation-message-wrapper{min-height:var(--sd-input-validation-message-minheight, 0px);position:relative;font-size:0}.validation-message{position:relative;position:var(--sd-input-validation-message-minheight, absolute);left:0;right:0}.label.float{transform:translateY(-75%) scale(.75);width:133%}.label:not(.float){max-width:100%}.floated-label-placeholder{height:20px;width:100%}.label{position:absolute;top:0;left:0;line-height:24px;pointer-events:none;color:var(--sd-input-color, #767676);transition:transform .25s,width .25s;transform-origin:left top}.input-wrapper{position:relative;display:flex;flex-direction:row;align-items:center;background-color:var(--input-wrapper-background-color)}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-wrapper{flex-direction:column;align-items:baseline}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-container{width:100%}:host([extended-prefix]:not(:focus-within)) .input-container,:host([extended-prefix][effective-disabled]) .input-container{width:0px}.input-container{line-height:var(--sd-input-line-height, 24px);flex:1 1 auto}.input{width:100%;background:var(--sd-input-background, transparent);font-family:inherit;font-size:inherit;text-align:inherit;color:inherit;border:none;outline:none;resize:none;padding-left:0;padding-right:0}.input:-webkit-autofill{animation-name:onautofillstart}.input:not(:-webkit-autofill){animation-name:onautofillcancel}@keyframes onautofillstart{0%{outline:none}}@keyframes onautofillcancel{0%{outline:none}}.label,input.input{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}.validation-message{text-overflow:ellipsis;overflow-x:hidden;white-space:normal;white-space:var(--sd-input-validation-message-minheight, nowrap)}.input::placeholder{color:var(--sd-input-color, #767676)}.underline{height:2px;width:100%;position:relative}.unfocused-line,.focused-line{position:absolute;inset:0}.unfocused-line{border-bottom:1px solid var(--sd-input-underline-color, #959595)}.focused-line{border-bottom:2px solid var(--sd-input-focused-color, #1467ba);transform-origin:center center;transform:scale3d(0,1,1)}.prefix,.suffix{display:flex;flex-wrap:nowrap;max-width:100%}.prefix ::slotted(*),.suffix ::slotted(*){display:flex}:host(:focus){outline:none}.suffix ::slotted(.clear-button),.suffix ::slotted(.toggle-button){cursor:pointer;width:16px;height:32px;padding:0 8px;margin-top:-8px;margin-bottom:-8px;fill:#666;outline:none;flex-shrink:0}.suffix ::slotted(.toggle-button){transition:transform .2s}:host([opened]) .suffix ::slotted(.toggle-button){transform:rotate(180deg)}:host([disabled]) .suffix ::slotted(.clear-button),:host([disabled]) .suffix ::slotted(.toggle-button){display:none!important}.prefix ::slotted(.icon-wrapper){width:32px;height:32px;padding-right:4px;margin-top:-8px;margin-bottom:-8px;display:flex;align-items:center;justify-content:center;flex-shrink:0}:host(:not([has-value])) .suffix ::slotted(.clear-button),:host([null-setting-disallowed]) .suffix ::slotted(.clear-button){display:none!important}:host(:not([allow-custom-value]):not([trigger-only])) .input{caret-color:transparent}:host(:not([allow-custom-value]):not([disabled])) .input{cursor:pointer}#default-slot{display:none}",Ms=`<svg xmlns="http://www.w3.org/2000/svg" class="toggle-button" slot="suffix" viewBox="0 0 16 16">\r
|
|
113
113
|
<path d="M13 4v2l-5 5-5-5v-2l5 5z"/>\r
|
|
114
114
|
</svg>\r
|
|
115
|
-
`,
|
|
115
|
+
`,ks=`<svg xmlns="http://www.w3.org/2000/svg" class="clear-button" slot="suffix" viewBox="0 0 16 16">\r
|
|
116
116
|
<path d="M12.96 4.46l-1.42-1.42-3.54 3.55-3.54-3.55-1.42 1.42 3.55 3.54-3.55 3.54 1.42 1.42 3.54-3.55 3.54 3.55 1.42-1.42-3.55-3.54 3.55-3.54z"/>\r
|
|
117
117
|
</svg>\r
|
|
118
|
-
`,
|
|
119
|
-
${X(
|
|
118
|
+
`,Ns=Object.defineProperty,ft=(e,t,i,o)=>{for(var s=void 0,r=e.length-1,n;r>=0;r--)(n=e[r])&&(s=n(t,i,s)||s);return s&&Ns(t,i,s),s},Hs="sd-combo-box";function po(e,t){let i;return function(...o){i!=null&&clearTimeout(i),i=window.setTimeout(()=>e(...o),t)}}var zs=0,Z,at=(Z=class extends fe{constructor(){super(),this.opened=!1,this.itemHeight=50,this.displayValuePath="caption",this.id=Z.ID+"_"+zs++,this.inMemoryFilter=(e,t)=>{if(!e)return!0;let i=e.toLowerCase();return!!(typeof t.caption=="string"&&t.caption.toLowerCase().includes(i)||typeof t.description=="string"&&t.description.toLowerCase().includes(i))},this.minimumOverlayWidth=250,this._itemGenerator=Te,this._itemCache=[],this.debouncedFilterItemsInMemory=po(this.filterItemsInMemory.bind(this),200),this.handleSelection=e=>{let t=this._dataProvider.items[e.detail.index];e.detail.selected||(this._list.selectedIndices=[e.detail.index]),this.comboBoxValue={index:this._itemCache.indexOf(t),item:t},this.dispatchSelectionChangeEvent(),this.opened=!1},this.handleWindowPointerDown=e=>{!(e.target instanceof Node&&this.contains(e.target))&&this.opened&&e.composedPath().indexOf(this._list)===-1&&(this.triggerOnly&&(this.value=null),this.opened=!1)},this.handleKeyDown=e=>{switch(e.key){case"Down":case"ArrowDown":{e.preventDefault(),this.navigateInList(1);break}case"Up":case"ArrowUp":{e.preventDefault(),this.navigateInList(-1);break}case"Enter":{this.opened&&(e.preventDefault(),e.stopPropagation(),this.opened=!1);break}case"Escape":{this.opened&&(e.preventDefault(),e.stopPropagation(),this._list.selectedIndices.indexOf(this._list.focusIndex)>-1&&this._dataProvider.items.length>this._list.focusIndex?this.opened=!1:(this.clearFilter(),this.updateInputValue(null),this.updateFocusAndSelectedIndexFromValue(),this._list.selectedIndices.includes(this._list.focusIndex)||this._list.selectedIndices.push(this._list.focusIndex)));break}case"Tab":{this.opened&&(this.triggerOnly&&(this.value=null),this.opened=!1);break}}},this.debouncedRequestData=po(this.requestData.bind(this),250),this._dataProvider=new Ve,this._dataProvider.finalSizeIsKnown=!0}get clearFilterOnLazyLoadedSelection(){return this.triggerOnly}set clearFilterOnLazyLoadedSelection(e){console.warn("Using clearFilterOnLazyLoadedSelection setting on a combo-box is deprecated. Use triggerOnly instead."),this.triggerOnly=e}get itemGenerator(){return this._itemGenerator}set itemGenerator(e){this._itemGenerator=e,this._list&&(this._list.itemGenerator=this._itemGenerator)}get items(){return this._itemCache}set items(e){this._itemCache=e,this.isLazyLoadConfigured&&(this._dataProvider.items=e,this._lastRequestedPage=null),this.value&&!this.comboBoxValue&&this.updateComboBoxValueFromValue(),this.filterItemsInMemory(),this.opened&&this._popper&&this._popper.update()}get finalSizeIsKnown(){return this._dataProvider.finalSizeIsKnown}set finalSizeIsKnown(e){this._dataProvider.finalSizeIsKnown=e}configureLazyLoad(e){if(!e)throw new Error("It is not possible to configure lazy load without a given onDataRequest calback.");this._dataProvider.finalSizeIsKnown=!1,this._onDataRequest=e,this._dataProvider.onDataRequest=t=>{this.requestData(t,!1)}}get comboBoxValue(){return this._comboBoxValue}set comboBoxValue(e){this._comboBoxValue=e,this.updateInputValue(null),this.updateHasValue()}get selectedIndex(){return this.isCustomValue(this.comboBoxValue)||!this.comboBoxValue?-1:this.comboBoxValue.index}get displayValue(){return this.value}open(){this.opened=!0}static get styles(){return[it`
|
|
119
|
+
${X(Bs)}
|
|
120
120
|
`]}disconnectedCallback(){super.disconnectedCallback(),this._popper&&(this._popper.destroy(),this._popper=null)}render(){return T`
|
|
121
121
|
${super.render()}
|
|
122
122
|
<slot @slotchange=${this.onDefaultSlotChange} id="default-slot"></slot>
|
|
123
|
-
`}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),t!==i)switch(e){case"opened":{this.handleOpenedStateChange();break}case"item-height":{this._list&&(this._list.itemHeight=this.itemHeight);break}case"id":{this.updateListId();break}}}firstUpdated(e){super.firstUpdated(e),this.value&&!this.comboBoxValue&&this.updateComboBoxValueFromValue(),window.requestAnimationFrame(()=>{this.initClearButtton(),this.initToggleButtton(),this.updateHasValue(),this.addEventListener("click",()=>{this.disabled||(this.opened=!this.opened)}),this.addEventListener("keydown",t=>{this.disabled||this.handleKeyDown(t)})}),this.inputElement.setAttribute("role","combobox"),this.inputElement.setAttribute("aria-autocomplete","list")}updateComboBoxValueFromValue(){if(this.value){let e=this._itemCache.findIndex(t=>(t[this.displayValuePath]??"")===this.value);e>-1?this._comboBoxValue={index:e,item:this._itemCache[e]}:this.allowCustomValue?this._comboBoxValue=this.value:this._comboBoxValue=null,this.updateHasValue(),this.updateIconFromCurrentValue()}}updated(e){super.updated(e),e.has("showIcon")&&(this.showIcon?this._icon==null&&this.initIconWrapper():this._icon!=null&&(this._icon.remove(),this._icon=null)),e.has("currentText")&&this.updateHasValue(),e.has("triggerOnly")&&this._list&&(this._list.selectionType=this.triggerOnly?
|
|
123
|
+
`}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),t!==i)switch(e){case"opened":{this.handleOpenedStateChange();break}case"item-height":{this._list&&(this._list.itemHeight=this.itemHeight);break}case"id":{this.updateListId();break}}}firstUpdated(e){super.firstUpdated(e),this.value&&!this.comboBoxValue&&this.updateComboBoxValueFromValue(),window.requestAnimationFrame(()=>{this.initClearButtton(),this.initToggleButtton(),this.updateHasValue(),this.addEventListener("click",()=>{this.disabled||(this.opened=!this.opened)}),this.addEventListener("keydown",t=>{this.disabled||this.handleKeyDown(t)})}),this.inputElement.setAttribute("role","combobox"),this.inputElement.setAttribute("aria-autocomplete","list")}updateComboBoxValueFromValue(){if(this.value){let e=this._itemCache.findIndex(t=>(t[this.displayValuePath]??"")===this.value);e>-1?this._comboBoxValue={index:e,item:this._itemCache[e]}:this.allowCustomValue?this._comboBoxValue=this.value:this._comboBoxValue=null,this.updateHasValue(),this.updateIconFromCurrentValue()}}updated(e){super.updated(e),e.has("showIcon")&&(this.showIcon?this._icon==null&&this.initIconWrapper():this._icon!=null&&(this._icon.remove(),this._icon=null)),e.has("currentText")&&this.updateHasValue(),e.has("triggerOnly")&&this._list&&(this._list.selectionType=this.triggerOnly?Xt.TriggerOnly:Xt.Single)}initIconWrapper(){this._icon=document.createElement("div"),this._icon.className="icon-wrapper",this._icon.role="img";let e=document.createElement("div");e.style.backgroundRepeat="no-repeat",e.style.backgroundPosition="center",e.style.backgroundSize="cover",e.style.height="24px",e.style.width="24px",this._icon.appendChild(e),this._icon.slot="prefix",this.appendChild(this._icon),this.updateIconFromCurrentValue()}updateIconFromCurrentValue(){this.isCustomValue(this.comboBoxValue)?this.updateIcon(null):this.updateIcon(this.comboBoxValue?.item)}updateIcon(e){if(this._icon)if(e&&(e.icon||e.iconPlaceholder)){let t=e;t.attributes==null?(this._icon.title="",this._icon.ariaLabel=""):(this._icon.title=t.attributes["icon-attr-title"]??"",this._icon.ariaLabel=t.attributes["icon-attr-aria-label"]??""),this._icon.style.backgroundColor=t.iconBackgroundColor,this._icon.style.display="",Gt.showImage(this._icon.querySelector("div"),e.icon,e.iconPlaceholder)}else this._icon&&(this._icon.style.display="none")}updateHasValue(){this.currentText||this.comboBoxValue!=null&&this.comboBoxValue!=""?(this.setAttribute("has-value",""),this._clearButton&&(this._clearButton.style.display="")):this.removeAttribute("has-value")}shouldFloat(){return super.shouldFloat()||this.comboBoxValue!=null&&this.comboBoxValue!=""}initClearButtton(){let e=document.createElement("template");e.innerHTML=ks,this._clearButton=e.content.firstChild,this.appendChild(this._clearButton),this._clearButton.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),this.opened=!1,this.clearValue()})}initToggleButtton(){let e=document.createElement("template");e.innerHTML=Ms,this._toggleButton=e.content.firstChild,this.appendChild(this._toggleButton),this._toggleButton.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),this.opened=!this.opened,this.select()})}filterItemsInMemory(){if(this.isLazyLoadConfigured)return;let e=!1;if(this.filterText&&(this.filterProperty?(this._dataProvider.items=this._itemCache.filter(t=>t[this.filterProperty]&&String(t[this.filterProperty]).indexOf(this.filterText)>-1),e=!0):this.inMemoryFilter&&(this._dataProvider.items=this._itemCache.filter(t=>this.inMemoryFilter(this.filterText,t)),e=!0)),!e)this._dataProvider.items=this._itemCache,this._list&&this.updateFocusAndSelectedIndexFromValue();else if(this._list)if(this.comboBoxValue&&!this.isCustomValue(this.comboBoxValue)){let t=this._dataProvider.items.indexOf(this.comboBoxValue.item);if(t==-1){let i=this.comboBoxValue.item.id;i!=null&&(t=this._dataProvider.items.findIndex(o=>o.id==i))}this._list.focusIndex=t,this._list.selectedIndices=t==-1?[]:[t]}else this._list.focusIndex=null;this.opened&&this._popper&&this._popper.update()}ensureListAndPopperInitialized(){if(this._list||(this._list=document.createElement(Re.ID),this.updateListId(),this._list.classList.add("combo-box-dropdown"),this._list.itemHeight=this.itemHeight,this._list.itemGenerator=this.itemGenerator,this._list.selectionType=this.triggerOnly?Xt.TriggerOnly:Xt.Single,this._list.setAttribute("focus-target",""),Object.assign(this._list.style,{zIndex:"21000",boxShadow:`rgba(0, 0, 0, 0.14) 0px 2px 2px 0px,
|
|
124
124
|
rgba(0, 0, 0, 0.12) 0px 1px 5px 0px,
|
|
125
|
-
rgba(0, 0, 0, 0.2) 0px 3px 1px -2px`,background:"white",overflowY:"auto"}),this._list.addEventListener("selection",this.handleSelection),this._dataProvider.connectList(this._list)),!this._popper){let e=this;this._popper=
|
|
126
|
-
${o}`),this._dataProvider.finalSizeIsKnown=!0,this.items.length==0?this.opened=!1:this._list&&(this._list.itemCount=this.items.length),this.removeAttribute("loading")),this._pendingDataRequest=null})}}get defaultSlot(){return this.shadowRoot.querySelector("#default-slot")}onDefaultSlotChange(){this._declarativeItems=this.defaultSlot.assignedElements(),this._declarativeItems.length>0&&(this.finalSizeIsKnown=!0,this.itemGenerator=(e,t)=>this._declarativeItems[t].cloneNode(!0),this.items=this._declarativeItems.map(e=>{let t={caption:e.getAttribute("caption"),description:e.getAttribute("description")};return this.displayValuePath!="caption"&&this.displayValuePath!="description"&&(t[this.displayValuePath]=e[this.displayValuePath]||e.getAttribute(this.displayValuePath)),t}))}},Z.ID=
|
|
125
|
+
rgba(0, 0, 0, 0.2) 0px 3px 1px -2px`,background:"white",overflowY:"auto"}),this._list.addEventListener("selection",this.handleSelection),this._dataProvider.connectList(this._list)),!this._popper){let e=this;this._popper=pi(this,this._list,{placement:"bottom-start",modifiers:[{name:"computeStyles",options:{gpuAcceleration:!0}},{name:"hide",enabled:!1},{name:"closeIfReferenceHidden",enabled:!0,phase:"afterWrite",fn({state:t}){t.elements.reference.closeIfNotVisible()}},{name:"offset",options:{offset:({placement:t})=>t.indexOf("top")>-1?[0,-parseInt(getComputedStyle(e).paddingTop,10)]:t.indexOf("bottom")>-1?[0,-parseInt(getComputedStyle(e).paddingBottom,10)-(this.shadowRoot.querySelector(".validation-message-wrapper")?.offsetHeight??0)]:[0,0]}},{name:"adjustWidthIfNeeded",enabled:!0,phase:"read",fn({state:t}){t.elements.popper.increaseWidthOnNextRenderIfNeeded()}}]})}}closeIfNotVisible(){let e=this.elementFromMiddleOfComboBox();!this.contains(e)&&!this.shadowRoot.contains(e)&&e!==this._list&&(this.triggerOnly&&(this.value=null),this.opened=!1)}elementFromMiddleOfComboBox(){let e=this.getBoundingClientRect();return document.elementFromPoint(e.left+e.width/2,e.top+e.height/2)}async handleOpenedStateChange(){if(this.inputElement.setAttribute("aria-expanded",String(this.opened)),this.opened){if(!this.disabled){this.ensureListAndPopperInitialized();let e=(this.filterText??"")!==(this._lastRequestedFilterText??"");this.isLazyLoadConfigured&&(this.items.length==0||e)&&this.requestData(0,e),this.updateDropdownSizes(),this.ownerDocument.body.appendChild(this._list),this.updateFocusAndSelectedIndexFromValue(),window.requestAnimationFrame(()=>{this._popper&&this._popper.update()}),window.addEventListener("pointerdown",this.handleWindowPointerDown),!this.allowCustomValue&&!this._openedByFilterTextChange&&this.select()}this._openedByFilterTextChange=!1}else await this._list.updateComplete,this._popper&&await this._popper.update,this.ownerDocument.body.removeChild(this._list),window.removeEventListener("pointerdown",this.handleWindowPointerDown),this.updateValueOnClose(),this.clearFilter(),this.setSelectionRange(0,0),this.inputElement.removeAttribute("aria-activedescendant"),this._popper&&(this._popper.destroy(),this._popper=null)}updateValueOnClose(){let e=this.comboBoxValue??"";if(this.nullSettingDisallowed&&!this.value&&this.comboBoxValue)this.restorePreviousSelection();else if(this.value!==(this.convertToDisplayValue(null)??"")){let t=this._dataProvider.items[this._list.focusIndex];if(t&&(t[this.displayValuePath]??"")===this.value){if(t.disabled){this.restorePreviousSelection();return}this.comboBoxValue={index:this._itemCache.indexOf(t),item:t}}else if(this.allowCustomValue||!this.value)this.comboBoxValue=this.value;else{let i=this._itemCache.findIndex(o=>(o[this.displayValuePath]??"")===this.value&&!o.disabled);i>-1?this.comboBoxValue={index:i,item:this._itemCache[i]}:this.restorePreviousSelection()}}else{let t=this._dataProvider.items[this._list.focusIndex];if(t&&t.id!=null){if(t.disabled){this.restorePreviousSelection();return}(!this.comboBoxValue||this.isCustomValue(this.comboBoxValue)||this.comboBoxValue.item.id!=t.id)&&(this.comboBoxValue={index:this._itemCache.indexOf(t),item:t})}}e!==(this.comboBoxValue??"")&&this.dispatchSelectionChangeEvent(),this.updateIcon(this.isCustomValue(this.comboBoxValue)?null:this.comboBoxValue?.item)}restorePreviousSelection(){this.updateInputValue(null)}updateFocusAndSelectedIndexFromValue(){if(this.comboBoxValue&&!this.isCustomValue(this.comboBoxValue)&&!this._openedByFilterTextChange){let e=this.comboBoxValue.index;if((e==-1||this.isLazyLoadConfigured)&&(e=this.items.indexOf(this.comboBoxValue.item),e==-1)){let t=this.comboBoxValue.item.id;t!=null&&(e=this.items.findIndex(i=>i.id==t))}this._list.focusIndex=e,this._list.selectedIndices=e==-1?[]:[e]}else this._list.focusIndex=-1,this._list.selectedIndices=[];this.updateActiveDescendant()}navigateInList(e){this.opened?(this._list.focusIndex==null?e>0?this._list.focusIndex=0:this._list.focusIndex=Math.max(0,this._dataProvider.items.length-1):this._list.focusIndex=Math.max(0,Math.min(this._dataProvider.items.length-1,this._list.focusIndex+e)),this.updateInputValue(this._dataProvider.items[this._list.focusIndex]),this.updateActiveDescendant(),this.allowCustomValue||this.select()):this.opened=!0}updateActiveDescendant(){let e=this._list&&this._list.getListItem(this._list.focusIndex);e?this.inputElement.setAttribute("aria-activedescendant",e.id):this.inputElement.removeAttribute("aria-activedescendant")}updateInputValue(e){this.updateComplete.then(()=>{this.value=this.convertToDisplayValue(e),e?this.updateIcon(e):this.updateIconFromCurrentValue()})}convertToDisplayValue(e){return e?e[this.displayValuePath]:this.comboBoxValue?this.isCustomValue(this.comboBoxValue)?this.comboBoxValue:this.comboBoxValue.item[this.displayValuePath]:null}fireValueChange(e){if(e&&this.filterText!==this.value){let t=(this.filterText??"")!==this.value;this.filterText=this.value,this.updateIcon(null),this.opened||(this._openedByFilterTextChange=!0,this.opened=!0),t&&(this.dispatchFilterChangeEvent(),this.debouncedFilterItemsInMemory())}}clearValue(){this.nullSettingDisallowed||(this.value=null,this.inputElement.removeAttribute("aria-activedescendant"),this._list&&(this._list.selectedIndices=[]),this.clearFilter(),this.comboBoxValue&&(this.comboBoxValue=null,this.dispatchSelectionChangeEvent()),this.requestUpdate())}clearFilter(){this.filterText!=null&&(this.filterText=void 0,this.filterItemsInMemory(),this.dispatchFilterChangeEvent(),this.updateIconFromCurrentValue())}updateDropdownSizes(){let e=((window.innerHeight||document.documentElement.clientHeight)-this.offsetHeight)*.5;Object.assign(this._list.style,{maxHeight:`${e}px`,minWidth:`${Math.max(this.offsetWidth,this.minimumOverlayWidth)}px`,maxWidth:`max(50vw, ${this.offsetWidth}px)`})}updateListId(){this.inputElement&&this._list&&(this._list.id=this.id+"_list",this.inputElement.setAttribute("aria-controls",this._list.id))}isCustomValue(e){return typeof e=="string"}dispatchSelectionChangeEvent(){this.updateComplete.then(()=>{if(this.dispatchEvent(new CustomEvent("selection-change",{detail:{selection:this.comboBoxValue,isCustomValue:this.isCustomValue(this.comboBoxValue)}})),this.triggerOnly)this.comboBoxValue=null;else{let e=this.comboBoxValue;this.isCustomValue(e)?this.setFormValue(e):this.setFormValue(e?.item?.caption)}}).catch(e=>{console.error("Could not dispatch selection change event due to:",e)})}dispatchFilterChangeEvent(){this.dispatchEvent(new CustomEvent("filter-change",{detail:{value:this.filterText},composed:!0})),this.debouncedRequestData(0)}get isLazyLoadConfigured(){return!!this._onDataRequest}requestData(e,t){if(t==null&&(t=(this.filterText??"")!==(this._lastRequestedFilterText??"")),this.isLazyLoadConfigured){if(!this.opened){t&&(this._dataProvider.items=[],this._itemCache=[]);return}if(this._lastRequestedPage==e&&!t)return;this._pendingDataRequest&&this._pendingDataRequest.cancel(Z.DATA_REQUEST_CANCELLED);let i=new Promise((o,s)=>{this._pendingDataRequest={cancel:s}});this._lastRequestedPage=e,this._lastRequestedFilterText=this.filterText,this.setAttribute("loading",""),Promise.race([i,this._onDataRequest(this._lastRequestedFilterText,e)]).then(o=>{if(this.filterText==this._lastRequestedFilterText&&this._lastRequestedPage==e&&(this._dataProvider.finalSizeIsKnown=o.finalSizeIsKnown,t?(this._dataProvider.items=o.items,this._itemCache=o.items):(this._dataProvider.addItems(o.items),this._itemCache=this._dataProvider.items),this._list&&(this._list.itemCount=this._dataProvider.items.length),this._popper&&this.opened)){if(this.comboBoxValue&&!this.isCustomValue(this.comboBoxValue)){let s=this.comboBoxValue.item;if(this._list.selectedIndices.length==0||this.items[this._list.selectedIndices[0]]!=s){let r=this.items.indexOf(s);if(r==-1){let n=s.id;n!=null&&(r=this.items.findIndex(l=>l.id==n))}this.comboBoxValue.index=r,this._list.selectedIndices=r==-1?[]:[r]}}this.updateDropdownSizes(),this._popper.update()}this._pendingDataRequest=null,this.removeAttribute("loading")}).catch(o=>{o!==Z.DATA_REQUEST_CANCELLED&&(console.error(`Data could not be loaded for filter "${this._lastRequestedFilterText}" and page number "${e}" due to the following error:
|
|
126
|
+
${o}`),this._dataProvider.finalSizeIsKnown=!0,this.items.length==0?this.opened=!1:this._list&&(this._list.itemCount=this.items.length),this.removeAttribute("loading")),this._pendingDataRequest=null})}}get defaultSlot(){return this.shadowRoot.querySelector("#default-slot")}onDefaultSlotChange(){this._declarativeItems=this.defaultSlot.assignedElements(),this._declarativeItems.length>0&&(this.finalSizeIsKnown=!0,this.itemGenerator=(e,t)=>this._declarativeItems[t].cloneNode(!0),this.items=this._declarativeItems.map(e=>{let t={caption:e.getAttribute("caption"),description:e.getAttribute("description")};return this.displayValuePath!="caption"&&this.displayValuePath!="description"&&(t[this.displayValuePath]=e[this.displayValuePath]||e.getAttribute(this.displayValuePath)),t}))}},Z.ID=Hs,Z.ensureDefined=()=>{Re.ensureDefined(),customElements.get(Z.ID)||customElements.define(Z.ID,Z)},Z.formAssociated=!0,Z.DATA_REQUEST_CANCELLED="cancel_data_request",Z);ft([h({type:Boolean,reflect:!0})],at.prototype,"opened");ft([h({type:Number,attribute:"item-height"})],at.prototype,"itemHeight");ft([h({type:Boolean,attribute:"allow-custom-value",reflect:!0})],at.prototype,"allowCustomValue");ft([h({type:Boolean,attribute:"trigger-only",reflect:!0})],at.prototype,"triggerOnly");ft([h({type:Boolean,attribute:"null-setting-disallowed",reflect:!0})],at.prototype,"nullSettingDisallowed");ft([h({type:Boolean,attribute:"show-icon",reflect:!0})],at.prototype,"showIcon");ft([h({type:String,attribute:"display-value-path",noAccessor:!0})],at.prototype,"displayValuePath");ft([h({type:String,attribute:"filter-property",noAccessor:!0})],at.prototype,"filterProperty");ft([h({type:String,attribute:!0,reflect:!0})],at.prototype,"id");var uo=at;uo.ensureDefined();return Co(Fs);})();
|
|
127
127
|
/*! Bundled license information:
|
|
128
128
|
|
|
129
129
|
@lit/reactive-element/css-tag.js:
|
|
@@ -134,20 +134,11 @@ ${o}`),this._dataProvider.finalSizeIsKnown=!0,this.items.length==0?this.opened=!
|
|
|
134
134
|
*)
|
|
135
135
|
|
|
136
136
|
@lit/reactive-element/reactive-element.js:
|
|
137
|
-
(**
|
|
138
|
-
* @license
|
|
139
|
-
* Copyright 2017 Google LLC
|
|
140
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
141
|
-
*)
|
|
142
|
-
|
|
143
137
|
lit-html/lit-html.js:
|
|
144
|
-
(**
|
|
145
|
-
* @license
|
|
146
|
-
* Copyright 2017 Google LLC
|
|
147
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
148
|
-
*)
|
|
149
|
-
|
|
150
138
|
lit-element/lit-element.js:
|
|
139
|
+
@lit/reactive-element/decorators/property.js:
|
|
140
|
+
lit-html/directive.js:
|
|
141
|
+
lit-html/directives/unsafe-html.js:
|
|
151
142
|
(**
|
|
152
143
|
* @license
|
|
153
144
|
* Copyright 2017 Google LLC
|
|
@@ -161,32 +152,11 @@ lit-html/is-server.js:
|
|
|
161
152
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
162
153
|
*)
|
|
163
154
|
|
|
164
|
-
@lit/reactive-element/decorators/property.js:
|
|
165
|
-
(**
|
|
166
|
-
* @license
|
|
167
|
-
* Copyright 2017 Google LLC
|
|
168
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
169
|
-
*)
|
|
170
|
-
|
|
171
155
|
lit-html/directives/if-defined.js:
|
|
172
156
|
(**
|
|
173
157
|
* @license
|
|
174
158
|
* Copyright 2018 Google LLC
|
|
175
159
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
176
160
|
*)
|
|
177
|
-
|
|
178
|
-
lit-html/directive.js:
|
|
179
|
-
(**
|
|
180
|
-
* @license
|
|
181
|
-
* Copyright 2017 Google LLC
|
|
182
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
183
|
-
*)
|
|
184
|
-
|
|
185
|
-
lit-html/directives/unsafe-html.js:
|
|
186
|
-
(**
|
|
187
|
-
* @license
|
|
188
|
-
* Copyright 2017 Google LLC
|
|
189
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
190
|
-
*)
|
|
191
161
|
*/
|
|
192
162
|
//# sourceMappingURL=combo-box-with-externals.js.map
|