@vscode-elements/elements 1.7.1-pre.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/custom-elements.json +115 -160
  2. package/dist/bundled.js +15 -15
  3. package/dist/includes/VscElement.d.ts.map +1 -1
  4. package/dist/includes/VscElement.js +1 -1
  5. package/dist/includes/VscElement.js.map +1 -1
  6. package/dist/includes/vscode-select/vscode-select-base.d.ts +2 -3
  7. package/dist/includes/vscode-select/vscode-select-base.d.ts.map +1 -1
  8. package/dist/includes/vscode-select/vscode-select-base.js +16 -17
  9. package/dist/includes/vscode-select/vscode-select-base.js.map +1 -1
  10. package/dist/vscode-checkbox/vscode-checkbox.d.ts +5 -0
  11. package/dist/vscode-checkbox/vscode-checkbox.d.ts.map +1 -1
  12. package/dist/vscode-checkbox/vscode-checkbox.js +8 -4
  13. package/dist/vscode-checkbox/vscode-checkbox.js.map +1 -1
  14. package/dist/vscode-multi-select/vscode-multi-select.d.ts +1 -0
  15. package/dist/vscode-multi-select/vscode-multi-select.d.ts.map +1 -1
  16. package/dist/vscode-multi-select/vscode-multi-select.js +8 -6
  17. package/dist/vscode-multi-select/vscode-multi-select.js.map +1 -1
  18. package/dist/vscode-radio/vscode-radio.d.ts +3 -0
  19. package/dist/vscode-radio/vscode-radio.d.ts.map +1 -1
  20. package/dist/vscode-radio/vscode-radio.js +3 -0
  21. package/dist/vscode-radio/vscode-radio.js.map +1 -1
  22. package/dist/vscode-radio-group/vscode-radio-group.d.ts +3 -0
  23. package/dist/vscode-radio-group/vscode-radio-group.d.ts.map +1 -1
  24. package/dist/vscode-radio-group/vscode-radio-group.js +3 -0
  25. package/dist/vscode-radio-group/vscode-radio-group.js.map +1 -1
  26. package/dist/vscode-single-select/vscode-single-select.d.ts +1 -0
  27. package/dist/vscode-single-select/vscode-single-select.d.ts.map +1 -1
  28. package/dist/vscode-single-select/vscode-single-select.js +7 -4
  29. package/dist/vscode-single-select/vscode-single-select.js.map +1 -1
  30. package/package.json +1 -1
  31. package/vscode.css-custom-data.json +1 -1
  32. package/vscode.html-custom-data.json +7 -7
package/dist/bundled.js CHANGED
@@ -1,4 +1,4 @@
1
- const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),i=new WeakMap;let o=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=i.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&i.set(s,t))}return t}toString(){return this.cssText}};const r=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new o(i,t,s)},n=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new o("string"==typeof t?t:t+"",void 0,s))(e)})(t):t,{is:l,defineProperty:a,getOwnPropertyDescriptor:c,getOwnPropertyNames:h,getOwnPropertySymbols:d,getPrototypeOf:u}=Object,v=globalThis,p=v.trustedTypes,b=p?p.emptyScript:"",f=v.reactiveElementPolyfillSupport,g=(t,e)=>t,m={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},x=(t,e)=>!l(t,e),y={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;class w 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,e=y){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&a(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);o.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(g("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(g("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(g("properties"))){const t=this.properties,e=[...h(t),...d(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(n(t))}else void 0!==t&&e.push(n(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?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),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const s=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((s,i)=>{if(e)s.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of i){const i=document.createElement("style"),o=t.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i)}})(s,this.constructor.elementStyles),s}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,e,s){this._$AK(t,s)}_$EC(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const o=(void 0!==s.converter?.toAttribute?s.converter:m).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:m;this._$Em=i,this[i]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??x)(this[t],e))return;this.P(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[g("elementProperties")]=new Map,w[g("finalized")]=new Map,f?.({ReactiveElement:w}),(v.reactiveElementVersions??=[]).push("2.0.4");const k=globalThis,$=k.trustedTypes,_=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,C="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,S="?"+B,z=`<${S}>`,A=document,O=()=>A.createComment(""),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,I=t=>j(t)||"function"==typeof t?.[Symbol.iterator],M="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,N=/>/g,T=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),P=/'/g,V=/"/g,R=/^(?:script|style|textarea|title)$/i,L=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),U=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),H=new WeakMap,K=A.createTreeWalker(A,129);function W(t,e){if(!j(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==_?_.createHTML(e):e}const G=(t,e)=>{const s=t.length-1,i=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=F;for(let e=0;e<s;e++){const s=t[e];let l,a,c=-1,h=0;for(;h<s.length&&(n.lastIndex=h,a=n.exec(s),null!==a);)h=n.lastIndex,n===F?"!--"===a[1]?n=D:void 0!==a[1]?n=N:void 0!==a[2]?(R.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=T):void 0!==a[3]&&(n=T):n===T?">"===a[0]?(n=o??F,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?T:'"'===a[3]?V:P):n===V||n===P?n=T:n===D||n===N?n=F:(n=T,o=void 0);const d=n===T&&t[e+1].startsWith("/>")?" ":"";r+=n===F?s+z:c>=0?(i.push(l),s.slice(0,c)+C+s.slice(c)+B+d):s+B+(-2===c?e:d)}return[W(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class J{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const n=t.length-1,l=this.parts,[a,c]=G(t,e);if(this.el=J.createElement(a,s),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=K.nextNode())&&l.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(C)){const e=c[r++],s=i.getAttribute(t).split(B),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?tt:"?"===n[1]?et:"@"===n[1]?st:Q}),i.removeAttribute(t)}else t.startsWith(B)&&(l.push({type:6,index:o}),i.removeAttribute(t));if(R.test(i.tagName)){const t=i.textContent.split(B),e=t.length-1;if(e>0){i.textContent=$?$.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],O()),K.nextNode(),l.push({type:2,index:++o});i.append(t[e],O())}}}else if(8===i.nodeType)if(i.data===S)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(B,t+1));)l.push({type:7,index:o}),t+=B.length-1}o++}}static createElement(t,e){const s=A.createElement("template");return s.innerHTML=t,s}}function Y(t,e,s=t,i){if(e===U)return e;let o=void 0!==i?s.o?.[i]:s.l;const r=E(e)?void 0:e._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),void 0===r?o=void 0:(o=new r(t),o._$AT(t,s,i)),void 0!==i?(s.o??=[])[i]=o:s.l=o),void 0!==o&&(e=Y(t,o._$AS(t,e.values),o,i)),e}class X{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??A).importNode(e,!0);K.currentNode=i;let o=K.nextNode(),r=0,n=0,l=s[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new Z(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new it(o,this,t)),this._$AV.push(e),l=s[++n]}r!==l?.index&&(o=K.nextNode(),r++)}return K.currentNode=A,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}let Z=class t{get _$AU(){return this._$AM?._$AU??this.v}constructor(t,e,s,i){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this.v=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Y(this,t,e),E(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):I(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!==q&&E(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=J.createElement(W(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new X(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=H.get(t.strings);return void 0===e&&H.set(t.strings,e=new J(t)),e}k(e){j(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,o=0;for(const r of e)o===s.length?s.push(i=new t(this.O(O()),this.O(O()),this,this.options)):i=s[o],i._$AI(r),o++;o<s.length&&(this._$AR(i&&i._$AB.nextSibling,o),s.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this.v=t,this._$AP?.(t))}};class Q{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=q}_$AI(t,e=this,s,i){const o=this.strings;let r=!1;if(void 0===o)t=Y(this,t,e,0),r=!E(t)||t!==this._$AH&&t!==U,r&&(this._$AH=t);else{const i=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=Y(this,i[s+n],e,n),l===U&&(l=this._$AH[n]),r||=!E(l)||l!==this._$AH[n],l===q?t=q:t!==q&&(t+=(l??"")+o[n+1]),this._$AH[n]=l}r&&!i&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class tt extends Q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class et extends Q{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class st extends Q{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=Y(this,t,e,0)??q)===U)return;const s=this._$AH,i=t===q&&s!==q||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==q&&(s===q||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class it{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Y(this,t)}}const ot={M:C,P:B,A:S,C:1,L:G,R:X,D:I,V:Y,I:Z,H:Q,N:et,U:st,B:tt,F:it},rt=k.litHtmlPolyfillSupport;rt?.(J,Z),(k.litHtmlVersions??=[]).push("3.2.0");class nt extends w{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=((t,e,s)=>{const i=s?.renderBefore??e;let o=i._$litPart$;if(void 0===o){const t=s?.renderBefore??null;i._$litPart$=o=new Z(e.insertBefore(O(),t),t,void 0,s??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return U}}nt._$litElement$=!0,nt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:nt});const lt=globalThis.litElementPolyfillSupport;lt?.({LitElement:nt}),(globalThis.litElementVersions??=[]).push("4.1.0");const at=t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},ct={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x},ht=(t=ct,e,s)=>{const{kind:i,metadata:o}=s;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),r.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const o=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,o,t)},init(e){return void 0!==e&&this.P(i,void 0,t),e}}}if("setter"===i){const{name:i}=s;return function(s){const o=this[i];e.call(this,s),this.requestUpdate(i,o,t)}}throw Error("Unsupported decorator location: "+i)};function dt(t){return(e,s)=>"object"==typeof s?ht(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}function ut(t){return dt({...t,state:!0,attribute:!1})}const vt=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,s);function pt(t,e){return(e,s,i)=>vt(0,0,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}let bt;function ft(t){return(e,s)=>{const{slot:i,selector:o}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return vt(0,0,{get(){const e=this.renderRoot?.querySelector(r),s=e?.assignedElements(t)??[];return void 0===o?s:s.filter((t=>t.matches(o)))}})}}class gt extends nt{constructor(){super(...arguments),this._version="1.7.1-pre.0"}get version(){return this._version}}var mt=r`
1
+ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),i=new WeakMap;let o=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=i.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&i.set(s,t))}return t}toString(){return this.cssText}};const r=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new o(i,t,s)},n=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new o("string"==typeof t?t:t+"",void 0,s))(e)})(t):t,{is:l,defineProperty:a,getOwnPropertyDescriptor:c,getOwnPropertyNames:h,getOwnPropertySymbols:d,getPrototypeOf:u}=Object,v=globalThis,p=v.trustedTypes,b=p?p.emptyScript:"",f=v.reactiveElementPolyfillSupport,g=(t,e)=>t,m={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},x=(t,e)=>!l(t,e),y={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;class w 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,e=y){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&a(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);o.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(g("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(g("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(g("properties"))){const t=this.properties,e=[...h(t),...d(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(n(t))}else void 0!==t&&e.push(n(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?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),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const s=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((s,i)=>{if(e)s.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of i){const i=document.createElement("style"),o=t.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i)}})(s,this.constructor.elementStyles),s}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,e,s){this._$AK(t,s)}_$EC(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const o=(void 0!==s.converter?.toAttribute?s.converter:m).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:m;this._$Em=i,this[i]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??x)(this[t],e))return;this.P(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[g("elementProperties")]=new Map,w[g("finalized")]=new Map,f?.({ReactiveElement:w}),(v.reactiveElementVersions??=[]).push("2.0.4");const k=globalThis,$=k.trustedTypes,_=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,C="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,S="?"+B,z=`<${S}>`,A=document,O=()=>A.createComment(""),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,I=t=>j(t)||"function"==typeof t?.[Symbol.iterator],M="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,N=/>/g,T=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),P=/'/g,V=/"/g,R=/^(?:script|style|textarea|title)$/i,L=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),U=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),H=new WeakMap,K=A.createTreeWalker(A,129);function W(t,e){if(!j(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==_?_.createHTML(e):e}const G=(t,e)=>{const s=t.length-1,i=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=F;for(let e=0;e<s;e++){const s=t[e];let l,a,c=-1,h=0;for(;h<s.length&&(n.lastIndex=h,a=n.exec(s),null!==a);)h=n.lastIndex,n===F?"!--"===a[1]?n=D:void 0!==a[1]?n=N:void 0!==a[2]?(R.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=T):void 0!==a[3]&&(n=T):n===T?">"===a[0]?(n=o??F,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?T:'"'===a[3]?V:P):n===V||n===P?n=T:n===D||n===N?n=F:(n=T,o=void 0);const d=n===T&&t[e+1].startsWith("/>")?" ":"";r+=n===F?s+z:c>=0?(i.push(l),s.slice(0,c)+C+s.slice(c)+B+d):s+B+(-2===c?e:d)}return[W(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class J{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const n=t.length-1,l=this.parts,[a,c]=G(t,e);if(this.el=J.createElement(a,s),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=K.nextNode())&&l.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(C)){const e=c[r++],s=i.getAttribute(t).split(B),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?tt:"?"===n[1]?et:"@"===n[1]?st:Q}),i.removeAttribute(t)}else t.startsWith(B)&&(l.push({type:6,index:o}),i.removeAttribute(t));if(R.test(i.tagName)){const t=i.textContent.split(B),e=t.length-1;if(e>0){i.textContent=$?$.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],O()),K.nextNode(),l.push({type:2,index:++o});i.append(t[e],O())}}}else if(8===i.nodeType)if(i.data===S)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(B,t+1));)l.push({type:7,index:o}),t+=B.length-1}o++}}static createElement(t,e){const s=A.createElement("template");return s.innerHTML=t,s}}function Y(t,e,s=t,i){if(e===U)return e;let o=void 0!==i?s.o?.[i]:s.l;const r=E(e)?void 0:e._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),void 0===r?o=void 0:(o=new r(t),o._$AT(t,s,i)),void 0!==i?(s.o??=[])[i]=o:s.l=o),void 0!==o&&(e=Y(t,o._$AS(t,e.values),o,i)),e}class X{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??A).importNode(e,!0);K.currentNode=i;let o=K.nextNode(),r=0,n=0,l=s[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new Z(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new it(o,this,t)),this._$AV.push(e),l=s[++n]}r!==l?.index&&(o=K.nextNode(),r++)}return K.currentNode=A,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}let Z=class t{get _$AU(){return this._$AM?._$AU??this.v}constructor(t,e,s,i){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this.v=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Y(this,t,e),E(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):I(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!==q&&E(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=J.createElement(W(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new X(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=H.get(t.strings);return void 0===e&&H.set(t.strings,e=new J(t)),e}k(e){j(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,o=0;for(const r of e)o===s.length?s.push(i=new t(this.O(O()),this.O(O()),this,this.options)):i=s[o],i._$AI(r),o++;o<s.length&&(this._$AR(i&&i._$AB.nextSibling,o),s.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this.v=t,this._$AP?.(t))}};class Q{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=q}_$AI(t,e=this,s,i){const o=this.strings;let r=!1;if(void 0===o)t=Y(this,t,e,0),r=!E(t)||t!==this._$AH&&t!==U,r&&(this._$AH=t);else{const i=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=Y(this,i[s+n],e,n),l===U&&(l=this._$AH[n]),r||=!E(l)||l!==this._$AH[n],l===q?t=q:t!==q&&(t+=(l??"")+o[n+1]),this._$AH[n]=l}r&&!i&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class tt extends Q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class et extends Q{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class st extends Q{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=Y(this,t,e,0)??q)===U)return;const s=this._$AH,i=t===q&&s!==q||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==q&&(s===q||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class it{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Y(this,t)}}const ot={M:C,P:B,A:S,C:1,L:G,R:X,D:I,V:Y,I:Z,H:Q,N:et,U:st,B:tt,F:it},rt=k.litHtmlPolyfillSupport;rt?.(J,Z),(k.litHtmlVersions??=[]).push("3.2.0");class nt extends w{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=((t,e,s)=>{const i=s?.renderBefore??e;let o=i._$litPart$;if(void 0===o){const t=s?.renderBefore??null;i._$litPart$=o=new Z(e.insertBefore(O(),t),t,void 0,s??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return U}}nt._$litElement$=!0,nt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:nt});const lt=globalThis.litElementPolyfillSupport;lt?.({LitElement:nt}),(globalThis.litElementVersions??=[]).push("4.1.0");const at=t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},ct={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x},ht=(t=ct,e,s)=>{const{kind:i,metadata:o}=s;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),r.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const o=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,o,t)},init(e){return void 0!==e&&this.P(i,void 0,t),e}}}if("setter"===i){const{name:i}=s;return function(s){const o=this[i];e.call(this,s),this.requestUpdate(i,o,t)}}throw Error("Unsupported decorator location: "+i)};function dt(t){return(e,s)=>"object"==typeof s?ht(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}function ut(t){return dt({...t,state:!0,attribute:!1})}const vt=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,s);function pt(t,e){return(e,s,i)=>vt(0,0,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}let bt;function ft(t){return(e,s)=>{const{slot:i,selector:o}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return vt(0,0,{get(){const e=this.renderRoot?.querySelector(r),s=e?.assignedElements(t)??[];return void 0===o?s:s.filter((t=>t.matches(o)))}})}}class gt extends nt{constructor(){super(...arguments),this._version="1.7.1"}get version(){return this._version}}var mt=r`
2
2
  :host([hidden]) {
3
3
  display: none;
4
4
  }
@@ -372,7 +372,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
372
372
  outline: 1px solid var(--focus-border);
373
373
  outline-offset: -1px;
374
374
  }
375
- `,Jt];var Xt=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Zt=class extends(Wt(Ht)){set checked(t){this._checked=t,this._manageRequired(),this.requestUpdate()}get checked(){return this._checked}set required(t){this._required=t,this._manageRequired(),this.requestUpdate()}get required(){return this._required}get form(){return this._internals.form}get type(){return"checkbox"}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}constructor(){super(),this.autofocus=!1,this._checked=!1,this.defaultChecked=!1,this.invalid=!1,this.name=void 0,this.role="checkbox",this.value="",this.disabled=!1,this.indeterminate=!1,this._required=!1,this._handleClick=()=>{this.disabled||this._toggleState()},this._handleKeyDown=t=>{this.disabled||"Enter"!==t.key&&" "!==t.key||(t.preventDefault()," "===t.key&&this._toggleState(),"Enter"===t.key&&this._internals.form?.requestSubmit())},this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("click",this._handleClick),this.updateComplete.then((()=>{this._manageRequired(),this._setActualFormValue()}))}disconnectedCallback(){this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("click",this._handleClick)}update(t){super.update(t),t.has("checked")&&(this.ariaChecked=this.checked?"true":"false")}formResetCallback(){this.checked=this.defaultChecked}formStateRestoreCallback(t,e){t&&(this.checked=!0)}_setActualFormValue(){let t="";t=this.checked?this.value?this.value:"on":null,this._internals.setFormValue(t)}_toggleState(){this.checked=!this.checked,this.indeterminate=!1,this._setActualFormValue(),this._manageRequired(),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("vsc-change",{detail:{checked:this.checked,label:this.label,value:this.value},bubbles:!0,composed:!0}))}_manageRequired(){!this.checked&&this.required?this._internals.setValidity({valueMissing:!0},"Please check this box if you want to proceed.",this._inputEl??void 0):this._internals.setValidity({})}render(){const t=Bt({icon:!0,checked:this.checked,indeterminate:this.indeterminate}),e=Bt({"label-inner":!0}),s=L`<svg
375
+ `,Jt];var Xt=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Zt=class extends(Wt(Ht)){set checked(t){this._checked=t,this._manageRequired(),this.requestUpdate()}get checked(){return this._checked}set required(t){this._required=t,this._manageRequired(),this.requestUpdate()}get required(){return this._required}get form(){return this._internals.form}get type(){return"checkbox"}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}constructor(){super(),this.autofocus=!1,this._checked=!1,this.defaultChecked=!1,this.invalid=!1,this.name=void 0,this.role="checkbox",this.value="",this.disabled=!1,this.indeterminate=!1,this._required=!1,this._handleClick=t=>{t.preventDefault(),this.disabled||this._toggleState()},this._handleKeyDown=t=>{this.disabled||"Enter"!==t.key&&" "!==t.key||(t.preventDefault()," "===t.key&&this._toggleState(),"Enter"===t.key&&this._internals.form?.requestSubmit())},this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyDown),this.updateComplete.then((()=>{this._manageRequired(),this._setActualFormValue()}))}disconnectedCallback(){this.removeEventListener("keydown",this._handleKeyDown)}update(t){super.update(t),t.has("checked")&&(this.ariaChecked=this.checked?"true":"false")}formResetCallback(){this.checked=this.defaultChecked}formStateRestoreCallback(t,e){t&&(this.checked=!0)}_setActualFormValue(){let t="";t=this.checked?this.value?this.value:"on":null,this._internals.setFormValue(t)}_toggleState(){this.checked=!this.checked,this.indeterminate=!1,this._setActualFormValue(),this._manageRequired(),this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new CustomEvent("vsc-change",{detail:{checked:this.checked,label:this.label,value:this.value},bubbles:!0,composed:!0}))}_manageRequired(){!this.checked&&this.required?this._internals.setValidity({valueMissing:!0},"Please check this box if you want to proceed.",this._inputEl??void 0):this._internals.setValidity({})}render(){const t=Bt({icon:!0,checked:this.checked,indeterminate:this.indeterminate}),e=Bt({"label-inner":!0}),s=L`<svg
376
376
  width="16"
377
377
  height="16"
378
378
  viewBox="0 0 16 16"
@@ -1158,7 +1158,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1158
1158
  />
1159
1159
  </svg>
1160
1160
  </span>
1161
- `,Je=(t,e,s)=>{const i=[];return t.forEach((t=>{let o;switch(s){case"startsWithPerTerm":o=((t,e)=>{const s={match:!1,ranges:[]},i=t.toLowerCase(),o=e.toLowerCase(),r=i.split(" ");let n=0;return r.forEach(((e,i)=>{if(i>0&&(n+=r[i-1].length+1),s.match)return;const l=e.indexOf(o),a=o.length;0===l&&(s.match=!0,s.ranges.push([n+l,Math.min(n+l+a,t.length)]))})),s})(t.label,e);break;case"startsWith":o=((t,e)=>{const s={match:!1,ranges:[]};return 0===t.toLowerCase().indexOf(e.toLowerCase())&&(s.match=!0,s.ranges=[[0,e.length]]),s})(t.label,e);break;case"contains":o=((t,e)=>{const s={match:!1,ranges:[]},i=t.toLowerCase().indexOf(e.toLowerCase());return i>-1&&(s.match=!0,s.ranges=[[i,i+e.length]]),s})(t.label,e);break;default:o=((t,e)=>{const s={match:!1,ranges:[]};let i=0,o=0;const r=e.length-1,n=t.toLowerCase(),l=e.toLowerCase();for(let t=0;t<=r;t++){if(o=n.indexOf(l[t],i),-1===o)return{match:!1,ranges:[]};s.match=!0,s.ranges.push([o,o+1]),i=o+1}return s})(t.label,e)}o.match&&i.push({...t,ranges:o.ranges})})),i},Ye=t=>{const e=[];return" "===t?(e.push(L`&nbsp;`),e):(0===t.indexOf(" ")&&e.push(L`&nbsp;`),e.push(L`${t.trimStart().trimEnd()}`),t.lastIndexOf(" ")===t.length-1&&e.push(L`&nbsp;`),e)},Xe=(t,e)=>{const s=[],i=e.length;return i<1?L`${t}`:(e.forEach(((o,r)=>{const n=t.substring(o[0],o[1]);0===r&&0!==o[0]&&s.push(...Ye(t.substring(0,e[0][0]))),r>0&&r<i&&o[0]-e[r-1][1]!=0&&s.push(...Ye(t.substring(e[r-1][1],o[0]))),s.push(L`<b>${Ye(n)}</b>`),r===i-1&&o[1]<t.length&&s.push(...Ye(t.substring(o[1],t.length)))})),s)};var Ze=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};const Qe=22;class ts extends gt{constructor(){super(...arguments),this.ariaExpanded="false",this.combobox=!1,this.invalid=!1,this.focused=!1,this.position="below",this.tabIndex=0,this._activeIndex=-1,this._currentDescription="",this._filter="fuzzy",this._filterPattern="",this._selectedIndex=-1,this._selectedIndexes=[],this._showDropdown=!1,this._options=[],this._value="",this._values=[],this._listScrollTop=0,this._multiple=!1,this._valueOptionIndexMap={},this._isHoverForbidden=!1,this._disabled=!1,this._originalTabIndex=void 0,this._onClickOutsideBound=this._onClickOutside.bind(this),this._onMouseMoveBound=this._onMouseMove.bind(this)}set disabled(t){this._disabled=t,this.ariaDisabled=t?"true":"false",!0===t?(this._originalTabIndex=this.tabIndex,this.tabIndex=-1):(this.tabIndex=this._originalTabIndex??0,this._originalTabIndex=void 0),this.requestUpdate()}get disabled(){return this._disabled}set filter(t){["contains","fuzzy","startsWith","startsWithPerTerm"].includes(t)?this._filter=t:(this._filter="fuzzy",console.warn(`[VSCode Webview Elements] Invalid filter: "${t}", fallback to default. Valid values are: "contains", "fuzzy", "startsWith", "startsWithPerm".`,this))}get filter(){return this._filter}set options(t){this._options=t.map(((t,e)=>({...t,index:e})))}get options(){return this._options.map((({label:t,value:e,description:s,selected:i,disabled:o})=>({label:t,value:e,description:s,selected:i,disabled:o})))}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._onComponentKeyDown),this.addEventListener("focus",this._onComponentFocus),this.addEventListener("blur",this._onComponentBlur)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._onComponentKeyDown),this.removeEventListener("focus",this._onComponentFocus),this.removeEventListener("blur",this._onComponentBlur)}get _filteredOptions(){return this.combobox&&""!==this._filterPattern?Je(this._options,this._filterPattern,this._filter):this._options}get _currentOptions(){return this.combobox?this._filteredOptions:this._options}_addOptionsFromSlottedElements(){const t=[];let e=0;const s=this._assignedOptions??[],i={selectedIndexes:[],values:[]};return this._valueOptionIndexMap={},s.forEach((s=>{const{innerText:o,description:r,disabled:n}=s,l=s.value?s.value:o.trim(),a=s.selected??!1,c={label:o.trim(),value:l,description:r,selected:a,index:e,disabled:n};e=t.push(c),a&&(i.selectedIndexes.push(t.length-1),i.values.push(l)),this._valueOptionIndexMap[c.value]=c.index})),this._options=t,i}async _toggleDropdown(t){this._showDropdown=t,this.ariaExpanded=String(t),!t||this._multiple||this.combobox||(this._activeIndex=this._selectedIndex,this._activeIndex>9&&(await this.updateComplete,this._listElement.scrollTop=Math.floor(this._activeIndex*Qe))),t?window.addEventListener("click",this._onClickOutsideBound):window.removeEventListener("click",this._onClickOutsideBound)}_dispatchChangeEvent(){this._multiple?this.dispatchEvent(new CustomEvent("vsc-change",{detail:{selectedIndexes:this._selectedIndexes,value:this._values}})):this.dispatchEvent(new CustomEvent("vsc-change",{detail:{selectedIndex:this._selectedIndex,value:this._value}})),this.dispatchEvent(new Event("change"))}_onFaceClick(){this._toggleDropdown(!this._showDropdown),this._multiple&&(this._activeIndex=0)}_onClickOutside(t){const e=t.composedPath().findIndex((t=>t===this));-1===e&&(this._toggleDropdown(!1),window.removeEventListener("click",this._onClickOutsideBound))}_onMouseMove(){this._isHoverForbidden=!1,window.removeEventListener("mousemove",this._onMouseMoveBound)}_toggleComboboxDropdown(){this._filterPattern="",this._toggleDropdown(!this._showDropdown),this._multiple&&(this._activeIndex=-1)}_onComboboxButtonClick(){this._toggleComboboxDropdown()}_onComboboxButtonKeyDown(t){"Enter"===t.key&&this._toggleComboboxDropdown()}_onOptionMouseOver(t){if(this._isHoverForbidden)return;const e=t.target;e.matches(".option")&&(this._activeIndex=Number(this.combobox?e.dataset.filteredIndex:e.dataset.index))}_onEnterKeyDown(){const t=this.combobox?this._filteredOptions:this._options,e=!this._showDropdown;this._toggleDropdown(e),this._multiple||e||this._selectedIndex===this._activeIndex||(this._selectedIndex=t[this._activeIndex].index,this._value=this._options[this._selectedIndex].value,this._dispatchChangeEvent()),this.combobox&&(this._multiple||e||(this._selectedIndex=this._filteredOptions[this._activeIndex].index),!this._multiple&&e&&this.updateComplete.then((()=>{this._scrollActiveElementToTop()}))),this._multiple&&e&&(this._activeIndex=0)}_onSpaceKeyDown(){if(this._showDropdown){if(this._showDropdown&&this._multiple&&this._activeIndex>-1){const t=this.combobox?this._filteredOptions:this._options,{selected:e}=t[this._activeIndex];t[this._activeIndex].selected=!e,this._selectedIndexes=[],t.forEach((({index:t,selected:e})=>{e&&this._selectedIndexes.push(t)}))}}else this._toggleDropdown(!0)}_scrollActiveElementToTop(){this._listElement.scrollTop=Math.floor(this._activeIndex*Qe)}async _adjustOptionListScrollPos(t){if((this.combobox?this._filteredOptions.length:this._options.length)<=10)return;this._isHoverForbidden=!0,window.addEventListener("mousemove",this._onMouseMoveBound),this._listElement||await this.updateComplete;const e=this._listElement.scrollTop,s=this._activeIndex*Qe;"down"===t&&s+Qe>=34+e&&(this._listElement.scrollTop=(this._activeIndex-9)*Qe),"up"===t&&s<=e-Qe&&this._scrollActiveElementToTop()}_onArrowUpKeyDown(){if(this._showDropdown){if(this._activeIndex<=0)return;this._activeIndex-=1,this._adjustOptionListScrollPos("up")}}_onArrowDownKeyDown(){if(this._showDropdown){if(this._activeIndex>=this._currentOptions.length-1)return;this._activeIndex+=1,this._adjustOptionListScrollPos("down")}}_onComponentKeyDown(t){[" ","ArrowUp","ArrowDown","Escape"].includes(t.key)&&(t.stopPropagation(),t.preventDefault()),"Enter"===t.key&&this._onEnterKeyDown()," "===t.key&&this._onSpaceKeyDown(),"Escape"===t.key&&this._toggleDropdown(!1),"ArrowUp"===t.key&&this._onArrowUpKeyDown(),"ArrowDown"===t.key&&this._onArrowDownKeyDown()}_onComponentFocus(){this.focused=!0}_onComponentBlur(){this.focused=!1}_onSlotChange(){const t=this._addOptionsFromSlottedElements();t.selectedIndexes.length>0&&(this._selectedIndex=t.selectedIndexes[0],this._selectedIndexes=t.selectedIndexes,this._value=t.values[0],this._values=t.values),this._multiple||this.combobox||0!==t.selectedIndexes.length||(this._selectedIndex=0),this.requestUpdate()}_onComboboxInputFocus(t){t.target.select()}_onComboboxInputInput(t){this._filterPattern=t.target.value,this._activeIndex=-1,this._toggleDropdown(!0)}_onComboboxInputClick(){this._toggleDropdown(!0)}_renderOptions(){return[]}_renderDescription(){if(!this._options[this._activeIndex])return q;const{description:t}=this._options[this._activeIndex];return t?L`<div class="description">${t}</div>`:q}_renderSelectFace(){return L`${q}`}_renderComboboxFace(){return L`${q}`}_renderDropdownControls(){return L`${q}`}_renderDropdown(){const t=Bt({dropdown:!0,multiple:this._multiple});return L`
1161
+ `;var Je=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Ye=class extends gt{constructor(){super(...arguments),this.value="",this.description="",this.selected=!1,this.disabled=!1}render(){return L`<slot></slot>`}};Ye.styles=mt,Je([dt({type:String})],Ye.prototype,"value",void 0),Je([dt({type:String})],Ye.prototype,"description",void 0),Je([dt({type:Boolean,reflect:!0})],Ye.prototype,"selected",void 0),Je([dt({type:Boolean,reflect:!0})],Ye.prototype,"disabled",void 0),Ye=Je([at("vscode-option")],Ye);const Xe=(t,e,s)=>{const i=[];return t.forEach((t=>{let o;switch(s){case"startsWithPerTerm":o=((t,e)=>{const s={match:!1,ranges:[]},i=t.toLowerCase(),o=e.toLowerCase(),r=i.split(" ");let n=0;return r.forEach(((e,i)=>{if(i>0&&(n+=r[i-1].length+1),s.match)return;const l=e.indexOf(o),a=o.length;0===l&&(s.match=!0,s.ranges.push([n+l,Math.min(n+l+a,t.length)]))})),s})(t.label,e);break;case"startsWith":o=((t,e)=>{const s={match:!1,ranges:[]};return 0===t.toLowerCase().indexOf(e.toLowerCase())&&(s.match=!0,s.ranges=[[0,e.length]]),s})(t.label,e);break;case"contains":o=((t,e)=>{const s={match:!1,ranges:[]},i=t.toLowerCase().indexOf(e.toLowerCase());return i>-1&&(s.match=!0,s.ranges=[[i,i+e.length]]),s})(t.label,e);break;default:o=((t,e)=>{const s={match:!1,ranges:[]};let i=0,o=0;const r=e.length-1,n=t.toLowerCase(),l=e.toLowerCase();for(let t=0;t<=r;t++){if(o=n.indexOf(l[t],i),-1===o)return{match:!1,ranges:[]};s.match=!0,s.ranges.push([o,o+1]),i=o+1}return s})(t.label,e)}o.match&&i.push({...t,ranges:o.ranges})})),i},Ze=t=>{const e=[];return" "===t?(e.push(L`&nbsp;`),e):(0===t.indexOf(" ")&&e.push(L`&nbsp;`),e.push(L`${t.trimStart().trimEnd()}`),t.lastIndexOf(" ")===t.length-1&&e.push(L`&nbsp;`),e)},Qe=(t,e)=>{const s=[],i=e.length;return i<1?L`${t}`:(e.forEach(((o,r)=>{const n=t.substring(o[0],o[1]);0===r&&0!==o[0]&&s.push(...Ze(t.substring(0,e[0][0]))),r>0&&r<i&&o[0]-e[r-1][1]!=0&&s.push(...Ze(t.substring(e[r-1][1],o[0]))),s.push(L`<b>${Ze(n)}</b>`),r===i-1&&o[1]<t.length&&s.push(...Ze(t.substring(o[1],t.length)))})),s)};var ts=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};const es=22;class ss extends gt{constructor(){super(...arguments),this.ariaExpanded="false",this.combobox=!1,this.invalid=!1,this.focused=!1,this.position="below",this.tabIndex=0,this._activeIndex=-1,this._currentDescription="",this._filter="fuzzy",this._filterPattern="",this._selectedIndex=-1,this._selectedIndexes=[],this._showDropdown=!1,this._options=[],this._value="",this._values=[],this._listScrollTop=0,this._multiple=!1,this._valueOptionIndexMap={},this._isHoverForbidden=!1,this._disabled=!1,this._originalTabIndex=void 0,this._onClickOutside=t=>{const e=t.composedPath().findIndex((t=>t===this));-1===e&&(this._toggleDropdown(!1),window.removeEventListener("click",this._onClickOutside))},this._onMouseMove=()=>{this._isHoverForbidden=!1,window.removeEventListener("mousemove",this._onMouseMove)}}set disabled(t){this._disabled=t,this.ariaDisabled=t?"true":"false",!0===t?(this._originalTabIndex=this.tabIndex,this.tabIndex=-1):(this.tabIndex=this._originalTabIndex??0,this._originalTabIndex=void 0),this.requestUpdate()}get disabled(){return this._disabled}set filter(t){["contains","fuzzy","startsWith","startsWithPerTerm"].includes(t)?this._filter=t:(this._filter="fuzzy",console.warn(`[VSCode Webview Elements] Invalid filter: "${t}", fallback to default. Valid values are: "contains", "fuzzy", "startsWith", "startsWithPerm".`,this))}get filter(){return this._filter}set options(t){this._options=t.map(((t,e)=>({...t,index:e})))}get options(){return this._options.map((({label:t,value:e,description:s,selected:i,disabled:o})=>({label:t,value:e,description:s,selected:i,disabled:o})))}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._onComponentKeyDown),this.addEventListener("focus",this._onComponentFocus),this.addEventListener("blur",this._onComponentBlur)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._onComponentKeyDown),this.removeEventListener("focus",this._onComponentFocus),this.removeEventListener("blur",this._onComponentBlur)}get _filteredOptions(){return this.combobox&&""!==this._filterPattern?Xe(this._options,this._filterPattern,this._filter):this._options}get _currentOptions(){return this.combobox?this._filteredOptions:this._options}_addOptionsFromSlottedElements(){const t=[];let e=0;const s=this._assignedOptions??[],i={selectedIndexes:[],values:[]};return this._valueOptionIndexMap={},s.forEach((s=>{const{innerText:o,description:r,disabled:n}=s,l=s.value?s.value:o.trim(),a=s.selected??!1,c={label:o.trim(),value:l,description:r,selected:a,index:e,disabled:n};e=t.push(c),a&&(i.selectedIndexes.push(t.length-1),i.values.push(l)),this._valueOptionIndexMap[c.value]=c.index})),this._options=t,i}async _toggleDropdown(t){this._showDropdown=t,this.ariaExpanded=String(t),!t||this._multiple||this.combobox||(this._activeIndex=this._selectedIndex,this._activeIndex>9&&(await this.updateComplete,this._listElement.scrollTop=Math.floor(this._activeIndex*es))),t?window.addEventListener("click",this._onClickOutside):window.removeEventListener("click",this._onClickOutside)}_dispatchChangeEvent(){this._multiple?this.dispatchEvent(new CustomEvent("vsc-change",{detail:{selectedIndexes:this._selectedIndexes,value:this._values}})):this.dispatchEvent(new CustomEvent("vsc-change",{detail:{selectedIndex:this._selectedIndex,value:this._value}})),this.dispatchEvent(new Event("change"))}_onFaceClick(){this._toggleDropdown(!this._showDropdown),this._multiple&&(this._activeIndex=0)}_toggleComboboxDropdown(){this._filterPattern="",this._toggleDropdown(!this._showDropdown),this._multiple&&(this._activeIndex=-1)}_onComboboxButtonClick(){this._toggleComboboxDropdown()}_onComboboxButtonKeyDown(t){"Enter"===t.key&&this._toggleComboboxDropdown()}_onOptionMouseOver(t){if(this._isHoverForbidden)return;const e=t.target;e.matches(".option")&&(this._activeIndex=Number(this.combobox?e.dataset.filteredIndex:e.dataset.index))}_onEnterKeyDown(){const t=this.combobox?this._filteredOptions:this._options,e=!this._showDropdown;this._toggleDropdown(e),this._multiple||e||this._selectedIndex===this._activeIndex||(this._selectedIndex=t[this._activeIndex].index,this._value=this._options[this._selectedIndex].value,this._dispatchChangeEvent()),this.combobox&&(this._multiple||e||(this._selectedIndex=this._filteredOptions[this._activeIndex].index),!this._multiple&&e&&this.updateComplete.then((()=>{this._scrollActiveElementToTop()}))),this._multiple&&e&&(this._activeIndex=0)}_onSpaceKeyDown(){if(this._showDropdown){if(this._showDropdown&&this._multiple&&this._activeIndex>-1){const t=this.combobox?this._filteredOptions:this._options,{selected:e}=t[this._activeIndex];t[this._activeIndex].selected=!e,this._selectedIndexes=[],t.forEach((({index:t,selected:e})=>{e&&this._selectedIndexes.push(t)}))}}else this._toggleDropdown(!0)}_scrollActiveElementToTop(){this._listElement.scrollTop=Math.floor(this._activeIndex*es)}async _adjustOptionListScrollPos(t){if((this.combobox?this._filteredOptions.length:this._options.length)<=10)return;this._isHoverForbidden=!0,window.addEventListener("mousemove",this._onMouseMove),this._listElement||await this.updateComplete;const e=this._listElement.scrollTop,s=this._activeIndex*es;"down"===t&&s+es>=34+e&&(this._listElement.scrollTop=(this._activeIndex-9)*es),"up"===t&&s<=e-es&&this._scrollActiveElementToTop()}_onArrowUpKeyDown(){if(this._showDropdown){if(this._activeIndex<=0)return;this._activeIndex-=1,this._adjustOptionListScrollPos("up")}}_onArrowDownKeyDown(){if(this._showDropdown){if(this._activeIndex>=this._currentOptions.length-1)return;this._activeIndex+=1,this._adjustOptionListScrollPos("down")}}_onComponentKeyDown(t){[" ","ArrowUp","ArrowDown","Escape"].includes(t.key)&&(t.stopPropagation(),t.preventDefault()),"Enter"===t.key&&this._onEnterKeyDown()," "===t.key&&this._onSpaceKeyDown(),"Escape"===t.key&&this._toggleDropdown(!1),"ArrowUp"===t.key&&this._onArrowUpKeyDown(),"ArrowDown"===t.key&&this._onArrowDownKeyDown()}_onComponentFocus(){this.focused=!0}_onComponentBlur(){this.focused=!1}_onSlotChange(){const t=this._addOptionsFromSlottedElements();t.selectedIndexes.length>0&&(this._selectedIndex=t.selectedIndexes[0],this._selectedIndexes=t.selectedIndexes,this._value=t.values[0],this._values=t.values),this._multiple||this.combobox||0!==t.selectedIndexes.length||(this._selectedIndex=0),this.requestUpdate()}_onComboboxInputFocus(t){t.target.select()}_onComboboxInputInput(t){this._filterPattern=t.target.value,this._activeIndex=-1,this._toggleDropdown(!0)}_onComboboxInputClick(){this._toggleDropdown(!0)}_renderOptions(){return[]}_renderDescription(){if(!this._options[this._activeIndex])return q;const{description:t}=this._options[this._activeIndex];return t?L`<div class="description">${t}</div>`:q}_renderSelectFace(){return L`${q}`}_renderComboboxFace(){return L`${q}`}_renderDropdownControls(){return L`${q}`}_renderDropdown(){const t=Bt({dropdown:!0,multiple:this._multiple});return L`
1162
1162
  <div class="${t}">
1163
1163
  ${"above"===this.position?this._renderDescription():q}
1164
1164
  ${this._renderOptions()} ${this._renderDropdownControls()}
@@ -1168,7 +1168,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1168
1168
  <slot class="main-slot" @slotchange="${this._onSlotChange}"></slot>
1169
1169
  ${this.combobox?this._renderComboboxFace():this._renderSelectFace()}
1170
1170
  ${this._showDropdown?this._renderDropdown():q}
1171
- `}}Ze([dt({type:String,reflect:!0,attribute:"aria-expanded"})],ts.prototype,"ariaExpanded",void 0),Ze([dt({type:Boolean,reflect:!0})],ts.prototype,"combobox",void 0),Ze([dt({type:Boolean,reflect:!0})],ts.prototype,"disabled",null),Ze([dt({type:Boolean,reflect:!0})],ts.prototype,"invalid",void 0),Ze([dt()],ts.prototype,"filter",null),Ze([dt({type:Boolean,reflect:!0})],ts.prototype,"focused",void 0),Ze([dt({type:Array})],ts.prototype,"options",null),Ze([dt({reflect:!0})],ts.prototype,"position",void 0),Ze([dt({type:Number,attribute:!0,reflect:!0})],ts.prototype,"tabIndex",void 0),Ze([ft({flatten:!0,selector:"vscode-option"})],ts.prototype,"_assignedOptions",void 0),Ze([ut()],ts.prototype,"_activeIndex",void 0),Ze([ut()],ts.prototype,"_currentDescription",void 0),Ze([ut()],ts.prototype,"_filter",void 0),Ze([ut()],ts.prototype,"_filteredOptions",null),Ze([ut()],ts.prototype,"_filterPattern",void 0),Ze([ut()],ts.prototype,"_selectedIndex",void 0),Ze([ut()],ts.prototype,"_selectedIndexes",void 0),Ze([ut()],ts.prototype,"_showDropdown",void 0),Ze([ut()],ts.prototype,"_options",void 0),Ze([ut()],ts.prototype,"_value",void 0),Ze([ut()],ts.prototype,"_values",void 0),Ze([ut()],ts.prototype,"_listScrollTop",void 0),Ze([pt(".options")],ts.prototype,"_listElement",void 0);var es=[mt,r`
1171
+ `}}ts([dt({type:String,reflect:!0,attribute:"aria-expanded"})],ss.prototype,"ariaExpanded",void 0),ts([dt({type:Boolean,reflect:!0})],ss.prototype,"combobox",void 0),ts([dt({type:Boolean,reflect:!0})],ss.prototype,"disabled",null),ts([dt({type:Boolean,reflect:!0})],ss.prototype,"invalid",void 0),ts([dt()],ss.prototype,"filter",null),ts([dt({type:Boolean,reflect:!0})],ss.prototype,"focused",void 0),ts([dt({type:Array})],ss.prototype,"options",null),ts([dt({reflect:!0})],ss.prototype,"position",void 0),ts([dt({type:Number,attribute:!0,reflect:!0})],ss.prototype,"tabIndex",void 0),ts([ft({flatten:!0,selector:"vscode-option"})],ss.prototype,"_assignedOptions",void 0),ts([ut()],ss.prototype,"_activeIndex",void 0),ts([ut()],ss.prototype,"_currentDescription",void 0),ts([ut()],ss.prototype,"_filter",void 0),ts([ut()],ss.prototype,"_filteredOptions",null),ts([ut()],ss.prototype,"_filterPattern",void 0),ts([ut()],ss.prototype,"_selectedIndex",void 0),ts([ut()],ss.prototype,"_selectedIndexes",void 0),ts([ut()],ss.prototype,"_showDropdown",void 0),ts([ut()],ss.prototype,"_options",void 0),ts([ut()],ss.prototype,"_value",void 0),ts([ut()],ss.prototype,"_values",void 0),ts([ut()],ss.prototype,"_listScrollTop",void 0),ts([pt(".options")],ss.prototype,"_listElement",void 0);var is=[mt,r`
1172
1172
  :host {
1173
1173
  display: inline-block;
1174
1174
  max-width: 100%;
@@ -1508,20 +1508,20 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1508
1508
  :host([position="above"]) .description {
1509
1509
  border-width: 0 0 1px;
1510
1510
  }
1511
- `],ss=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let is=class extends ts{set selectedIndexes(t){this._selectedIndexes=t}get selectedIndexes(){return this._selectedIndexes}set value(t){const e=t.map((t=>String(t)));this._values=e,this._selectedIndexes.forEach((t=>{this._options[t].selected=!1})),this._selectedIndexes=[],e.forEach((t=>{this._valueOptionIndexMap[t]&&(this._selectedIndexes.push(this._valueOptionIndexMap[t]),this._options[this._valueOptionIndexMap[t]].selected=!0)})),this._setFormValue(),this._manageRequired()}get value(){return this._values}get form(){return this._internals.form}get type(){return"select-multiple"}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}constructor(){super(),this.defaultValue=[],this.required=!1,this.name=void 0,this._multiple=!0,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this._manageRequired(),this.updateComplete.then((()=>{this._setDefaultValue(),this._manageRequired()}))}formResetCallback(){this.updateComplete.then((()=>{this.value=this.defaultValue}))}formStateRestoreCallback(t,e){const s=Array.from(t.entries()).map((t=>String(t[1])));this.updateComplete.then((()=>{this.value=s}))}_setDefaultValue(){if(Array.isArray(this.defaultValue)&&this.defaultValue.length>0){const t=this.defaultValue.map((t=>String(t)));this.value=t}}_manageRequired(){const{value:t}=this;0===t.length&&this.required?this._internals.setValidity({valueMissing:!0},"Please select an item in the list."):this._internals.setValidity({})}_setFormValue(){const t=new FormData;this._values.forEach((e=>{t.append(this.name??"",e)})),this._internals.setFormValue(t)}_onOptionClick(t){const e=t.composedPath().find((t=>"matches"in t&&t.matches("li.option")));if(!e)return;const s=Number(e.dataset.index);this._options[s]&&(this._options[s].selected=!this._options[s].selected),this._selectedIndexes=[],this._values=[],this._options.forEach((t=>{t.selected&&(this._selectedIndexes.push(t.index),this._values.push(t.value))})),this._setFormValue(),this._manageRequired(),this._dispatchChangeEvent()}_onMultiAcceptClick(){this._toggleDropdown(!1)}_onMultiDeselectAllClick(){this._selectedIndexes=[],this._values=[],this._options=this._options.map((t=>({...t,selected:!1}))),this._manageRequired(),this._dispatchChangeEvent()}_onMultiSelectAllClick(){this._selectedIndexes=[],this._values=[],this._options=this._options.map((t=>({...t,selected:!0}))),this._options.forEach(((t,e)=>{this._selectedIndexes.push(e),this._values.push(t.value),this._dispatchChangeEvent()})),this._setFormValue(),this._manageRequired()}_renderLabel(){switch(this._selectedIndexes.length){case 0:return L`<span class="select-face-badge no-item"
1511
+ `],os=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let rs=class extends ss{set selectedIndexes(t){this._selectedIndexes=t}get selectedIndexes(){return this._selectedIndexes}set value(t){const e=t.map((t=>String(t)));this._values=e,this._selectedIndexes.forEach((t=>{this._options[t].selected=!1})),this._selectedIndexes=[],e.forEach((t=>{this._valueOptionIndexMap[t]&&(this._selectedIndexes.push(this._valueOptionIndexMap[t]),this._options[this._valueOptionIndexMap[t]].selected=!0)})),this._setFormValue(),this._manageRequired()}get value(){return this._values}get form(){return this._internals.form}get type(){return"select-multiple"}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}constructor(){super(),this.defaultValue=[],this.required=!1,this.name=void 0,this._multiple=!0,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._setDefaultValue(),this._manageRequired()}))}formResetCallback(){this.updateComplete.then((()=>{this.value=this.defaultValue}))}formStateRestoreCallback(t,e){const s=Array.from(t.entries()).map((t=>String(t[1])));this.updateComplete.then((()=>{this.value=s}))}_setDefaultValue(){if(Array.isArray(this.defaultValue)&&this.defaultValue.length>0){const t=this.defaultValue.map((t=>String(t)));this.value=t}}_manageRequired(){const{value:t}=this;0===t.length&&this.required?this._internals.setValidity({valueMissing:!0},"Please select an item in the list.",this._faceElement):this._internals.setValidity({})}_setFormValue(){const t=new FormData;this._values.forEach((e=>{t.append(this.name??"",e)})),this._internals.setFormValue(t)}_onOptionClick(t){const e=t.composedPath().find((t=>"matches"in t&&t.matches("li.option")));if(!e)return;const s=Number(e.dataset.index);this._options[s]&&(this._options[s].selected=!this._options[s].selected),this._selectedIndexes=[],this._values=[],this._options.forEach((t=>{t.selected&&(this._selectedIndexes.push(t.index),this._values.push(t.value))})),this._setFormValue(),this._manageRequired(),this._dispatchChangeEvent()}_onMultiAcceptClick(){this._toggleDropdown(!1)}_onMultiDeselectAllClick(){this._selectedIndexes=[],this._values=[],this._options=this._options.map((t=>({...t,selected:!1}))),this._manageRequired(),this._dispatchChangeEvent()}_onMultiSelectAllClick(){this._selectedIndexes=[],this._values=[],this._options=this._options.map((t=>({...t,selected:!0}))),this._options.forEach(((t,e)=>{this._selectedIndexes.push(e),this._values.push(t.value),this._dispatchChangeEvent()})),this._setFormValue(),this._manageRequired()}_renderLabel(){switch(this._selectedIndexes.length){case 0:return L`<span class="select-face-badge no-item"
1512
1512
  >No items selected</span
1513
1513
  >`;case 1:return L`<span class="select-face-badge">1 item selected</span>`;default:return L`<span class="select-face-badge"
1514
1514
  >${this._selectedIndexes.length} items selected</span
1515
1515
  >`}}_renderSelectFace(){return L`
1516
1516
  <div
1517
- class="select-face multiselect"
1517
+ class="select-face face multiselect"
1518
1518
  @click="${this._onFaceClick}"
1519
1519
  tabindex="${this.tabIndex>-1?0:-1}"
1520
1520
  >
1521
1521
  ${this._renderLabel()} ${Ge}
1522
1522
  </div>
1523
1523
  `}_renderComboboxFace(){const t=this._selectedIndex>-1?this._options[this._selectedIndex].label:"";return L`
1524
- <div class="combobox-face">
1524
+ <div class="combobox-face face">
1525
1525
  ${this._renderLabel()}
1526
1526
  <input
1527
1527
  class="combobox-input"
@@ -1555,7 +1555,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1555
1555
  >
1556
1556
  <span class="${o}"></span>
1557
1557
  <span class="option-label"
1558
- >${t.ranges?.length?Xe(t.label,t.ranges??[]):t.label}</span
1558
+ >${t.ranges?.length?Qe(t.label,t.ranges??[]):t.label}</span
1559
1559
  >
1560
1560
  </li>
1561
1561
  `}))}
@@ -1586,7 +1586,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1586
1586
  >OK</vscode-button
1587
1587
  >
1588
1588
  </div>
1589
- `}};is.styles=es,is.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},is.formAssociated=!0,ss([dt({type:Array,attribute:"default-value"})],is.prototype,"defaultValue",void 0),ss([dt({type:Boolean,reflect:!0})],is.prototype,"required",void 0),ss([dt({reflect:!0})],is.prototype,"name",void 0),ss([dt({type:Array,attribute:!1})],is.prototype,"selectedIndexes",null),ss([dt({type:Array})],is.prototype,"value",null),is=ss([at("vscode-multi-select")],is);var os=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let rs=class extends gt{constructor(){super(...arguments),this.value="",this.description="",this.selected=!1,this.disabled=!1}render(){return L`<slot></slot>`}};rs.styles=mt,os([dt({type:String})],rs.prototype,"value",void 0),os([dt({type:String})],rs.prototype,"description",void 0),os([dt({type:Boolean,reflect:!0})],rs.prototype,"selected",void 0),os([dt({type:Boolean,reflect:!0})],rs.prototype,"disabled",void 0),rs=os([at("vscode-option")],rs);const ns=[mt,r`
1589
+ `}};rs.styles=is,rs.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},rs.formAssociated=!0,os([dt({type:Array,attribute:"default-value"})],rs.prototype,"defaultValue",void 0),os([dt({type:Boolean,reflect:!0})],rs.prototype,"required",void 0),os([dt({reflect:!0})],rs.prototype,"name",void 0),os([dt({type:Array,attribute:!1})],rs.prototype,"selectedIndexes",null),os([dt({type:Array})],rs.prototype,"value",null),os([pt(".face")],rs.prototype,"_faceElement",void 0),rs=os([at("vscode-multi-select")],rs);const ns=[mt,r`
1590
1590
  :host {
1591
1591
  align-items: center;
1592
1592
  display: block;
@@ -1693,16 +1693,16 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1693
1693
  </span>
1694
1694
  </label>
1695
1695
  </div>
1696
- `}};ds.styles=cs,ds.formAssociated=!0,ds.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},hs([dt({type:Boolean,reflect:!0})],ds.prototype,"autofocus",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"checked",void 0),hs([dt({type:Boolean,reflect:!0,attribute:"default-checked"})],ds.prototype,"defaultChecked",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"invalid",void 0),hs([dt({reflect:!0})],ds.prototype,"name",void 0),hs([dt()],ds.prototype,"value",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"disabled",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"required",void 0),hs([dt({reflect:!0})],ds.prototype,"role",void 0),hs([dt({type:Number,reflect:!0})],ds.prototype,"tabIndex",void 0),hs([ut()],ds.prototype,"_slottedText",void 0),hs([pt("#input")],ds.prototype,"_inputEl",void 0),ds=hs([at("vscode-radio")],ds);var us=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let vs=class extends ts{set selectedIndex(t){this._selectedIndex=t,this._value=this._options[this._selectedIndex]?this._options[this._selectedIndex].value:"",this._labelText=this._options[this._selectedIndex]?this._options[this._selectedIndex].label:""}get selectedIndex(){return this._selectedIndex}set value(t){this._options[this._selectedIndex]&&(this._options[this._selectedIndex].selected=!1),this._selectedIndex=this._options.findIndex((e=>e.value===t)),this._selectedIndex>-1?(this._options[this._selectedIndex].selected=!0,this._labelText=this._options[this._selectedIndex].label,this._value=t):(this._labelText="",this._value="")}get value(){return this._options[this._selectedIndex]?this._options[this._selectedIndex]?.value??"":""}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}updateInputValue(){if(!this.combobox)return;const t=this.renderRoot.querySelector(".combobox-input");t&&(t.value=this._options[this._selectedIndex]?this._options[this._selectedIndex].label:"")}constructor(){super(),this.defaultValue="",this.role="listbox",this.name=void 0,this.required=!1,this._labelText="",this._multiple=!1,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._manageRequired()}))}formResetCallback(){this.value=this.defaultValue}formStateRestoreCallback(t,e){this.updateComplete.then((()=>{this.value=t}))}get type(){return"select-one"}get form(){return this._internals.form}_onSlotChange(){super._onSlotChange(),this._selectedIndex>-1&&(this._labelText=this._options[this._selectedIndex]?.label??""),this._selectedIndex>-1&&this._options.length>0?this._internals.setFormValue(this._options[this._selectedIndex].value):this._internals.setFormValue(null)}_onArrowUpKeyDown(){super._onArrowUpKeyDown(),this._showDropdown||this._selectedIndex<=0||(this._filterPattern="",this._selectedIndex-=1,this._activeIndex=this._selectedIndex,this._labelText=this._options[this._selectedIndex].label,this._value=this._options[this._selectedIndex].value,this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_onArrowDownKeyDown(){super._onArrowDownKeyDown(),this._showDropdown||this._selectedIndex>=this._options.length-1||(this._filterPattern="",this._selectedIndex+=1,this._activeIndex=this._selectedIndex,this._labelText=this._options[this._selectedIndex].label,this._value=this._options[this._selectedIndex].value,this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_onEnterKeyDown(){super._onEnterKeyDown(),this._selectedIndex>-1&&(this._labelText=this._options[this._selectedIndex].label),this.updateInputValue(),this._internals.setFormValue(this._value),this._manageRequired()}_onOptionClick(t){const e=t.composedPath().find((t=>t?.matches("li.option")));e&&!e.matches(".disabled")&&(this._selectedIndex=Number(e.dataset.index),this._value=this._options[this._selectedIndex].value,this._selectedIndex>-1&&(this._labelText=this._options[this._selectedIndex].label),this._toggleDropdown(!1),this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_manageRequired(){const{value:t}=this;""===t&&this.required?this._internals.setValidity({valueMissing:!0},"Please select an item in the list."):this._internals.setValidity({})}_renderLabel(){const t=this._labelText||L`<span class="empty-label-placeholder"></span>`;return L`<span class="text">${t}</span>`}_renderSelectFace(){return L`
1696
+ `}};ds.styles=cs,ds.formAssociated=!0,ds.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},hs([dt({type:Boolean,reflect:!0})],ds.prototype,"autofocus",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"checked",void 0),hs([dt({type:Boolean,reflect:!0,attribute:"default-checked"})],ds.prototype,"defaultChecked",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"invalid",void 0),hs([dt({reflect:!0})],ds.prototype,"name",void 0),hs([dt()],ds.prototype,"value",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"disabled",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"required",void 0),hs([dt({reflect:!0})],ds.prototype,"role",void 0),hs([dt({type:Number,reflect:!0})],ds.prototype,"tabIndex",void 0),hs([ut()],ds.prototype,"_slottedText",void 0),hs([pt("#input")],ds.prototype,"_inputEl",void 0),ds=hs([at("vscode-radio")],ds);var us=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let vs=class extends ss{set selectedIndex(t){this._selectedIndex=t,this._value=this._options[this._selectedIndex]?this._options[this._selectedIndex].value:"",this._labelText=this._options[this._selectedIndex]?this._options[this._selectedIndex].label:""}get selectedIndex(){return this._selectedIndex}set value(t){this._options[this._selectedIndex]&&(this._options[this._selectedIndex].selected=!1),this._selectedIndex=this._options.findIndex((e=>e.value===t)),this._selectedIndex>-1?(this._options[this._selectedIndex].selected=!0,this._labelText=this._options[this._selectedIndex].label,this._value=t):(this._labelText="",this._value="")}get value(){return this._options[this._selectedIndex]?this._options[this._selectedIndex]?.value??"":""}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}updateInputValue(){if(!this.combobox)return;const t=this.renderRoot.querySelector(".combobox-input");t&&(t.value=this._options[this._selectedIndex]?this._options[this._selectedIndex].label:"")}constructor(){super(),this.defaultValue="",this.role="listbox",this.name=void 0,this.required=!1,this._labelText="",this._multiple=!1,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._manageRequired()}))}formResetCallback(){this.value=this.defaultValue}formStateRestoreCallback(t,e){this.updateComplete.then((()=>{this.value=t}))}get type(){return"select-one"}get form(){return this._internals.form}_onSlotChange(){super._onSlotChange(),this._selectedIndex>-1&&(this._labelText=this._options[this._selectedIndex]?.label??""),this._selectedIndex>-1&&this._options.length>0?this._internals.setFormValue(this._options[this._selectedIndex].value):this._internals.setFormValue(null)}_onArrowUpKeyDown(){super._onArrowUpKeyDown(),this._showDropdown||this._selectedIndex<=0||(this._filterPattern="",this._selectedIndex-=1,this._activeIndex=this._selectedIndex,this._labelText=this._options[this._selectedIndex].label,this._value=this._options[this._selectedIndex].value,this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_onArrowDownKeyDown(){super._onArrowDownKeyDown(),this._showDropdown||this._selectedIndex>=this._options.length-1||(this._filterPattern="",this._selectedIndex+=1,this._activeIndex=this._selectedIndex,this._labelText=this._options[this._selectedIndex].label,this._value=this._options[this._selectedIndex].value,this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_onEnterKeyDown(){super._onEnterKeyDown(),this._selectedIndex>-1&&(this._labelText=this._options[this._selectedIndex].label),this.updateInputValue(),this._internals.setFormValue(this._value),this._manageRequired()}_onOptionClick(t){const e=t.composedPath().find((t=>t?.matches("li.option")));e&&!e.matches(".disabled")&&(this._selectedIndex=Number(e.dataset.index),this._value=this._options[this._selectedIndex].value,this._selectedIndex>-1&&(this._labelText=this._options[this._selectedIndex].label),this._toggleDropdown(!1),this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_manageRequired(){const{value:t}=this;""===t&&this.required?this._internals.setValidity({valueMissing:!0},"Please select an item in the list.",this._face):this._internals.setValidity({})}_renderLabel(){const t=this._labelText||L`<span class="empty-label-placeholder"></span>`;return L`<span class="text">${t}</span>`}_renderSelectFace(){return L`
1697
1697
  <div
1698
- class="select-face"
1698
+ class="select-face face"
1699
1699
  @click="${this._onFaceClick}"
1700
1700
  tabindex="${this.tabIndex>-1?0:-1}"
1701
1701
  >
1702
1702
  ${this._renderLabel()} ${Ge}
1703
1703
  </div>
1704
1704
  `}_renderComboboxFace(){const t=this._selectedIndex>-1?this._options[this._selectedIndex].label:"";return L`
1705
- <div class="combobox-face">
1705
+ <div class="combobox-face face">
1706
1706
  <input
1707
1707
  class="combobox-input"
1708
1708
  spellcheck="false"
@@ -1727,7 +1727,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1727
1727
  data-index="${t.index}"
1728
1728
  data-filtered-index="${e}"
1729
1729
  >
1730
- ${t.ranges?.length?Xe(t.label,t.ranges??[]):t.label}
1730
+ ${t.ranges?.length?Qe(t.label,t.ranges??[]):t.label}
1731
1731
  </li>
1732
1732
  `}));return L`
1733
1733
  <ul
@@ -1737,7 +1737,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1737
1737
  >
1738
1738
  ${t}
1739
1739
  </ul>
1740
- `}};vs.styles=es,vs.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},vs.formAssociated=!0,us([dt({attribute:"default-value"})],vs.prototype,"defaultValue",void 0),us([dt({type:String,attribute:!0,reflect:!0})],vs.prototype,"role",void 0),us([dt({reflect:!0})],vs.prototype,"name",void 0),us([dt({type:Number,attribute:"selected-index"})],vs.prototype,"selectedIndex",null),us([dt({type:String})],vs.prototype,"value",null),us([dt({type:Boolean,reflect:!0})],vs.prototype,"required",void 0),us([ut()],vs.prototype,"_labelText",void 0),vs=us([at("vscode-single-select")],vs);const ps=[mt,r`
1740
+ `}};vs.styles=is,vs.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},vs.formAssociated=!0,us([dt({attribute:"default-value"})],vs.prototype,"defaultValue",void 0),us([dt({type:String,attribute:!0,reflect:!0})],vs.prototype,"role",void 0),us([dt({reflect:!0})],vs.prototype,"name",void 0),us([dt({type:Number,attribute:"selected-index"})],vs.prototype,"selectedIndex",null),us([dt({type:String})],vs.prototype,"value",null),us([dt({type:Boolean,reflect:!0})],vs.prototype,"required",void 0),us([ut()],vs.prototype,"_labelText",void 0),us([pt(".face")],vs.prototype,"_face",void 0),vs=us([at("vscode-single-select")],vs);const ps=[mt,r`
1741
1741
  :host {
1742
1742
  display: block;
1743
1743
  position: relative;
@@ -2684,4 +2684,4 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
2684
2684
  ${this._renderTree(this._data)}
2685
2685
  </ul>
2686
2686
  </div>
2687
- `}};Qs.styles=Js,Ys([dt({type:Array,reflect:!1})],Qs.prototype,"data",null),Ys([dt({type:Number})],Qs.prototype,"indent",void 0),Ys([dt({type:Boolean,reflect:!0})],Qs.prototype,"arrows",void 0),Ys([dt({type:Boolean,reflect:!0})],Qs.prototype,"multiline",void 0),Ys([dt({type:Number,reflect:!0})],Qs.prototype,"tabindex",void 0),Ys([dt({type:Boolean,reflect:!0,attribute:"indent-guides"})],Qs.prototype,"indentGuides",void 0),Ys([ut()],Qs.prototype,"_selectedItem",void 0),Ys([ut()],Qs.prototype,"_focusedItem",void 0),Ys([ut()],Qs.prototype,"_selectedBranch",void 0),Ys([ut()],Qs.prototype,"_focusedBranch",void 0),Qs=Ys([at("vscode-tree")],Qs);export{wt as VscodeBadge,Nt as VscodeButton,Zt as VscodeCheckbox,ee as VscodeCheckboxGroup,oe as VscodeCollapsible,he as VscodeContextMenu,le as VscodeContextMenuItem,ve as VscodeDivider,xe as VscodeFormContainer,ke as VscodeFormGroup,Ce as VscodeFormHelper,Mt as VscodeIcon,Pe as VscodeLabel,is as VscodeMultiSelect,rs as VscodeOption,as as VscodeProgressRing,ds as VscodeRadio,Oe as VscodeRadioGroup,fs as VscodeScrollable,vs as VscodeSingleSelect,ys as VscodeSplitLayout,$s as VscodeTabHeader,Bs as VscodeTabPanel,Hs as VscodeTable,As as VscodeTableBody,js as VscodeTableCell,Fs as VscodeTableHeader,Ts as VscodeTableHeaderCell,Rs as VscodeTableRow,Gs as VscodeTabs,Ie as VscodeTextarea,De as VscodeTextfield,Qs as VscodeTree};
2687
+ `}};Qs.styles=Js,Ys([dt({type:Array,reflect:!1})],Qs.prototype,"data",null),Ys([dt({type:Number})],Qs.prototype,"indent",void 0),Ys([dt({type:Boolean,reflect:!0})],Qs.prototype,"arrows",void 0),Ys([dt({type:Boolean,reflect:!0})],Qs.prototype,"multiline",void 0),Ys([dt({type:Number,reflect:!0})],Qs.prototype,"tabindex",void 0),Ys([dt({type:Boolean,reflect:!0,attribute:"indent-guides"})],Qs.prototype,"indentGuides",void 0),Ys([ut()],Qs.prototype,"_selectedItem",void 0),Ys([ut()],Qs.prototype,"_focusedItem",void 0),Ys([ut()],Qs.prototype,"_selectedBranch",void 0),Ys([ut()],Qs.prototype,"_focusedBranch",void 0),Qs=Ys([at("vscode-tree")],Qs);export{wt as VscodeBadge,Nt as VscodeButton,Zt as VscodeCheckbox,ee as VscodeCheckboxGroup,oe as VscodeCollapsible,he as VscodeContextMenu,le as VscodeContextMenuItem,ve as VscodeDivider,xe as VscodeFormContainer,ke as VscodeFormGroup,Ce as VscodeFormHelper,Mt as VscodeIcon,Pe as VscodeLabel,rs as VscodeMultiSelect,Ye as VscodeOption,as as VscodeProgressRing,ds as VscodeRadio,Oe as VscodeRadioGroup,fs as VscodeScrollable,vs as VscodeSingleSelect,ys as VscodeSplitLayout,$s as VscodeTabHeader,Bs as VscodeTabPanel,Hs as VscodeTable,As as VscodeTableBody,js as VscodeTableCell,Fs as VscodeTableHeader,Ts as VscodeTableHeaderCell,Rs as VscodeTableRow,Gs as VscodeTabs,Ie as VscodeTextarea,De as VscodeTextfield,Qs as VscodeTree};
@@ -1 +1 @@
1
- {"version":3,"file":"VscElement.d.ts","sourceRoot":"","sources":["../../src/includes/VscElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AAE/B,qBAAa,UAAW,SAAQ,UAAU;IACxC,OAAO,CAAC,QAAQ,CAAiB;IAEjC,0BAA0B;IAC1B,IAAI,OAAO,WAEV;CACF"}
1
+ {"version":3,"file":"VscElement.d.ts","sourceRoot":"","sources":["../../src/includes/VscElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AAE/B,qBAAa,UAAW,SAAQ,UAAU;IACxC,OAAO,CAAC,QAAQ,CAAW;IAE3B,0BAA0B;IAC1B,IAAI,OAAO,WAEV;CACF"}
@@ -2,7 +2,7 @@ import { LitElement } from 'lit';
2
2
  export class VscElement extends LitElement {
3
3
  constructor() {
4
4
  super(...arguments);
5
- this._version = '1.7.1-pre.0';
5
+ this._version = '1.7.1';
6
6
  }
7
7
  /** VSC Element version */
8
8
  get version() {
@@ -1 +1 @@
1
- {"version":3,"file":"VscElement.js","sourceRoot":"","sources":["../../src/includes/VscElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AAE/B,MAAM,OAAO,UAAW,SAAQ,UAAU;IAA1C;;QACU,aAAQ,GAAG,aAAa,CAAC;IAMnC,CAAC;IAJC,0BAA0B;IAC1B,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF","sourcesContent":["import {LitElement} from 'lit';\n\nexport class VscElement extends LitElement {\n private _version = '1.7.1-pre.0';\n\n /** VSC Element version */\n get version() {\n return this._version;\n }\n}\n"]}
1
+ {"version":3,"file":"VscElement.js","sourceRoot":"","sources":["../../src/includes/VscElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AAE/B,MAAM,OAAO,UAAW,SAAQ,UAAU;IAA1C;;QACU,aAAQ,GAAG,OAAO,CAAC;IAM7B,CAAC;IAJC,0BAA0B;IAC1B,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF","sourcesContent":["import {LitElement} from 'lit';\n\nexport class VscElement extends LitElement {\n private _version = '1.7.1';\n\n /** VSC Element version */\n get version() {\n return this._version;\n }\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import { TemplateResult } from 'lit';
2
2
  import '../../vscode-button';
3
+ import '../../vscode-option';
3
4
  import type { InternalOption, Option, SearchMethod } from './types.js';
4
5
  import { VscElement } from '../VscElement.js';
5
6
  interface OptionListStat {
@@ -78,10 +79,8 @@ export declare class VscodeSelectBase extends VscElement {
78
79
  protected _toggleDropdown(visible: boolean): Promise<void>;
79
80
  protected _dispatchChangeEvent(): void;
80
81
  protected _onFaceClick(): void;
81
- protected _onClickOutside(event: MouseEvent): void;
82
- protected _onClickOutsideBound: (event: MouseEvent) => void;
82
+ private _onClickOutside;
83
83
  private _onMouseMove;
84
- private _onMouseMoveBound;
85
84
  private _toggleComboboxDropdown;
86
85
  protected _onComboboxButtonClick(): void;
87
86
  protected _onComboboxButtonKeyDown(ev: KeyboardEvent): void;
@@ -1 +1 @@
1
- {"version":3,"file":"vscode-select-base.d.ts","sourceRoot":"","sources":["../../../src/includes/vscode-select/vscode-select-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,cAAc,EAAC,MAAM,KAAK,CAAC;AAGlD,OAAO,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAC,cAAc,EAAE,MAAM,EAAE,YAAY,EAAC,MAAM,YAAY,CAAC;AAErE,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAE5C,UAAU,cAAc;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAMD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAC9C,gBAAgB;IAEhB,YAAY,SAAW;IAGvB,QAAQ,UAAS;IAEjB,IACI,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAa7B;IAED,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;OAEG;IAEH,OAAO,UAAS;IAEhB;;;;;;;;;OASG;IACH,IACI,MAAM,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,mBAAmB,EAiBxE;IACD,IAAI,MAAM,IAAI,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,mBAAmB,CAEtE;IAGD,OAAO,UAAS;IAEhB;;;OAGG;IACH,IACI,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAEzB;IACD,IAAI,OAAO,IAAI,MAAM,EAAE,CAUtB;IAED;;OAE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gB;IAIxB,SAAS,CAAC,aAAa,IAAI,IAAI;IAqB/B,SAAS,CAAC,qBAAqB,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI;IAIrD,SAAS,CAAC,qBAAqB,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI;IAMrD,SAAS,CAAC,qBAAqB,IAAI,IAAI;IAIvC,SAAS,CAAC,cAAc,IAAI,cAAc,GAAG,cAAc,EAAE;IAI7D,OAAO,CAAC,kBAAkB;IAY1B,SAAS,CAAC,iBAAiB,IAAI,cAAc;IAI7C,SAAS,CAAC,mBAAmB,IAAI,cAAc;IAI/C,SAAS,CAAC,uBAAuB,IAAI,cAAc;IAInD,OAAO,CAAC,eAAe;IAevB,MAAM,IAAI,cAAc;CAOzB"}
@@ -8,6 +8,7 @@ import { html, nothing } from 'lit';
8
8
  import { property, query, queryAssignedElements, state } from 'lit/decorators.js';
9
9
  import { classMap } from 'lit/directives/class-map.js';
10
10
  import '../../vscode-button';
11
+ import '../../vscode-option';
11
12
  import { filterOptionsByPattern } from './helpers.js';
12
13
  import { VscElement } from '../VscElement.js';
13
14
  const VISIBLE_OPTS = 10;
@@ -55,8 +56,18 @@ export class VscodeSelectBase extends VscElement {
55
56
  this._isHoverForbidden = false;
56
57
  this._disabled = false;
57
58
  this._originalTabIndex = undefined;
58
- this._onClickOutsideBound = this._onClickOutside.bind(this);
59
- this._onMouseMoveBound = this._onMouseMove.bind(this);
59
+ this._onClickOutside = (event) => {
60
+ const path = event.composedPath();
61
+ const found = path.findIndex((et) => et === this);
62
+ if (found === -1) {
63
+ this._toggleDropdown(false);
64
+ window.removeEventListener('click', this._onClickOutside);
65
+ }
66
+ };
67
+ this._onMouseMove = () => {
68
+ this._isHoverForbidden = false;
69
+ window.removeEventListener('mousemove', this._onMouseMove);
70
+ };
60
71
  }
61
72
  set disabled(newState) {
62
73
  this._disabled = newState;
@@ -181,10 +192,10 @@ export class VscodeSelectBase extends VscElement {
181
192
  }
182
193
  }
183
194
  if (visible) {
184
- window.addEventListener('click', this._onClickOutsideBound);
195
+ window.addEventListener('click', this._onClickOutside);
185
196
  }
186
197
  else {
187
- window.removeEventListener('click', this._onClickOutsideBound);
198
+ window.removeEventListener('click', this._onClickOutside);
188
199
  }
189
200
  }
190
201
  _dispatchChangeEvent() {
@@ -214,18 +225,6 @@ export class VscodeSelectBase extends VscElement {
214
225
  this._activeIndex = 0;
215
226
  }
216
227
  }
217
- _onClickOutside(event) {
218
- const path = event.composedPath();
219
- const found = path.findIndex((et) => et === this);
220
- if (found === -1) {
221
- this._toggleDropdown(false);
222
- window.removeEventListener('click', this._onClickOutsideBound);
223
- }
224
- }
225
- _onMouseMove() {
226
- this._isHoverForbidden = false;
227
- window.removeEventListener('mousemove', this._onMouseMoveBound);
228
- }
229
228
  _toggleComboboxDropdown() {
230
229
  this._filterPattern = '';
231
230
  this._toggleDropdown(!this._showDropdown);
@@ -304,7 +303,7 @@ export class VscodeSelectBase extends VscElement {
304
303
  return;
305
304
  }
306
305
  this._isHoverForbidden = true;
307
- window.addEventListener('mousemove', this._onMouseMoveBound);
306
+ window.addEventListener('mousemove', this._onMouseMove);
308
307
  if (!this._listElement) {
309
308
  await this.updateComplete;
310
309
  }
@@ -1 +1 @@
1
- {"version":3,"file":"vscode-select-base.js","sourceRoot":"","sources":["../../../src/includes/vscode-select/vscode-select-base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,IAAI,EAAE,OAAO,EAAiB,MAAM,KAAK,CAAC;AAClD,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,qBAAqB,CAAC;AAG7B,OAAO,EAAC,sBAAsB,EAAC,MAAM,cAAc,CAAC;AACpD,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAO5C,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MA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sB","sourcesContent":["import {html, nothing, TemplateResult} from 'lit';\nimport {property, query, queryAssignedElements, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport '../../vscode-button';\nimport {VscodeOption} from '../../vscode-option/index.js';\nimport type {InternalOption, Option, SearchMethod} from './types.js';\nimport {filterOptionsByPattern} from './helpers.js';\nimport {VscElement} from '../VscElement.js';\n\ninterface OptionListStat {\n selectedIndexes: number[];\n values: string[];\n}\n\nconst VISIBLE_OPTS = 10;\nconst OPT_HEIGHT = 22;\nconst LIST_HEIGHT = VISIBLE_OPTS + OPT_HEIGHT + 2;\n\n/**\n * @cssprop --dropdown-z-index - workaround for dropdown z-index issues\n */\nexport class VscodeSelectBase extends VscElement {\n /** @internal */\n @property({type: String, reflect: true, attribute: 'aria-expanded'})\n ariaExpanded = 'false';\n\n @property({type: Boolean, reflect: true})\n combobox = false;\n\n @property({type: Boolean, reflect: true})\n set disabled(newState: boolean) {\n this._disabled = newState;\n this.ariaDisabled = newState ? 'true' : 'false';\n\n if (newState === true) {\n this._originalTabIndex = this.tabIndex;\n this.tabIndex = -1;\n } else {\n this.tabIndex = this._originalTabIndex ?? 0;\n this._originalTabIndex = undefined;\n }\n\n this.requestUpdate();\n }\n\n get disabled(): boolean {\n return this._disabled;\n }\n\n /**\n * Sets the invalid state manually.\n */\n @property({type: Boolean, reflect: true})\n invalid = false;\n\n /**\n * Search method in the filtered list within the combobox mode.\n *\n * - contains - The list item includes the searched pattern at any position.\n * - fuzzy - The list item contains the letters of the search pattern in the same order, but at any position.\n * - startsWith - The search pattern matches the beginning of the searched text.\n * - startsWithPerTerm - The search pattern matches the beginning of any word in the searched text.\n *\n * @default 'fuzzy'\n */\n @property()\n set filter(val: 'contains' | 'fuzzy' | 'startsWith' | 'startsWithPerTerm') {\n const validValues: SearchMethod[] = [\n 'contains',\n 'fuzzy',\n 'startsWith',\n 'startsWithPerTerm',\n ];\n\n if (validValues.includes(val as SearchMethod)) {\n this._filter = val as SearchMethod;\n } else {\n this._filter = 'fuzzy';\n console.warn(\n `[VSCode Webview Elements] Invalid filter: \"${val}\", fallback to default. Valid values are: \"contains\", \"fuzzy\", \"startsWith\", \"startsWithPerm\".`,\n this\n );\n }\n }\n get filter(): 'contains' | 'fuzzy' | 'startsWith' | 'startsWithPerTerm' {\n return this._filter;\n }\n\n @property({type: Boolean, reflect: true})\n focused = false;\n\n /**\n * @attr [options=[]]\n * @type {Option[]}\n */\n @property({type: Array})\n set options(opts: Option[]) {\n this._options = opts.map((op, index) => ({...op, index}));\n }\n get options(): Option[] {\n return this._options.map(\n ({label, value, description, selected, disabled}) => ({\n label,\n value,\n description,\n selected,\n disabled,\n })\n );\n }\n\n /**\n * Position of the options list when visible.\n */\n @property({reflect: true})\n position: 'above' | 'below' = 'below';\n\n /** @internal */\n @property({type: Number, attribute: true, reflect: true})\n tabIndex = 0;\n\n @queryAssignedElements({\n flatten: true,\n selector: 'vscode-option',\n })\n private _assignedOptions!: VscodeOption[];\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('keydown', this._onComponentKeyDown);\n this.addEventListener('focus', this._onComponentFocus);\n this.addEventListener('blur', this._onComponentBlur);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('keydown', this._onComponentKeyDown);\n this.removeEventListener('focus', this._onComponentFocus);\n this.removeEventListener('blur', this._onComponentBlur);\n }\n\n @state()\n protected _activeIndex = -1;\n\n @state()\n protected _currentDescription = '';\n\n @state()\n protected _filter: SearchMethod = 'fuzzy';\n\n @state()\n protected get _filteredOptions(): InternalOption[] {\n if (!this.combobox || this._filterPattern === '') {\n return this._options;\n }\n\n return filterOptionsByPattern(\n this._options,\n this._filterPattern,\n this._filter\n );\n }\n\n @state()\n protected _filterPattern = '';\n\n @state()\n protected _selectedIndex = -1;\n\n @state()\n protected _selectedIndexes: number[] = [];\n\n @state()\n protected _showDropdown = false;\n\n @state()\n protected _options: InternalOption[] = [];\n\n @state()\n protected _value = '';\n\n @state()\n protected _values: string[] = [];\n\n @state()\n protected _listScrollTop = 0;\n\n @query('.options')\n private _listElement!: HTMLUListElement;\n\n /** @internal */\n protected _multiple = false;\n\n /**\n * @internal\n * Quick-searchable map for searching a value in the options list.\n * Keys are the options values, values are the option indexes.\n */\n protected _valueOptionIndexMap: {[key: string]: number} = {};\n\n private _isHoverForbidden = false;\n private _disabled = false;\n private _originalTabIndex: number | undefined = undefined;\n\n protected get _currentOptions(): InternalOption[] {\n return this.combobox ? this._filteredOptions : this._options;\n }\n\n protected _addOptionsFromSlottedElements(): OptionListStat {\n const options: InternalOption[] = [];\n let nextIndex = 0;\n const optionElements = this._assignedOptions ?? [];\n const optionsListStat: OptionListStat = {\n selectedIndexes: [],\n values: [],\n };\n this._valueOptionIndexMap = {};\n\n optionElements.forEach((el) => {\n const {innerText, description, disabled} = el;\n const value = (el.value ?? '') ? el.value : innerText.trim();\n const selected = el.selected ?? false;\n const op: InternalOption = {\n label: innerText.trim(),\n value,\n description,\n selected,\n index: nextIndex,\n disabled,\n };\n\n nextIndex = options.push(op);\n\n if (selected) {\n optionsListStat.selectedIndexes.push(options.length - 1);\n optionsListStat.values.push(value);\n }\n\n this._valueOptionIndexMap[op.value] = op.index;\n });\n\n this._options = options;\n\n return optionsListStat;\n }\n\n protected async _toggleDropdown(visible: boolean): Promise<void> {\n this._showDropdown = visible;\n this.ariaExpanded = String(visible);\n\n if (visible && !this._multiple && !this.combobox) {\n this._activeIndex = this._selectedIndex;\n\n if (this._activeIndex > VISIBLE_OPTS - 1) {\n await this.updateComplete;\n\n this._listElement.scrollTop = Math.floor(\n this._activeIndex * OPT_HEIGHT\n );\n }\n }\n\n if (visible) {\n window.addEventListener('click', this._onClickOutsideBound);\n } else {\n window.removeEventListener('click', this._onClickOutsideBound);\n }\n }\n\n protected _dispatchChangeEvent(): void {\n if (!this._multiple) {\n /** @deprecated */\n this.dispatchEvent(\n new CustomEvent('vsc-change', {\n detail: {\n selectedIndex: this._selectedIndex,\n value: this._value,\n },\n })\n );\n } else {\n /** @deprecated */\n this.dispatchEvent(\n new CustomEvent('vsc-change', {\n detail: {\n selectedIndexes: this._selectedIndexes,\n value: this._values,\n },\n })\n );\n }\n this.dispatchEvent(new Event('change'));\n }\n\n protected _onFaceClick(): void {\n this._toggleDropdown(!this._showDropdown);\n\n if (this._multiple) {\n this._activeIndex = 0;\n }\n }\n\n protected _onClickOutside(event: MouseEvent): void {\n const path = event.composedPath();\n const found = path.findIndex((et) => et === this);\n\n if (found === -1) {\n this._toggleDropdown(false);\n window.removeEventListener('click', this._onClickOutsideBound);\n }\n }\n\n protected _onClickOutsideBound = this._onClickOutside.bind(this);\n\n private _onMouseMove() {\n this._isHoverForbidden = false;\n window.removeEventListener('mousemove', this._onMouseMoveBound);\n }\n\n private _onMouseMoveBound = this._onMouseMove.bind(this);\n\n private _toggleComboboxDropdown() {\n this._filterPattern = '';\n this._toggleDropdown(!this._showDropdown);\n\n if (this._multiple) {\n this._activeIndex = -1;\n }\n }\n\n protected _onComboboxButtonClick(): void {\n this._toggleComboboxDropdown();\n }\n\n protected _onComboboxButtonKeyDown(ev: KeyboardEvent): void {\n if (ev.key === 'Enter') {\n this._toggleComboboxDropdown();\n }\n }\n\n protected _onOptionMouseOver(ev: MouseEvent): void {\n if (this._isHoverForbidden) {\n return;\n }\n\n const el = ev.target as HTMLElement;\n\n if (!el.matches('.option')) {\n return;\n }\n\n this._activeIndex = Number(\n this.combobox ? el.dataset.filteredIndex : el.dataset.index\n );\n }\n\n protected _onEnterKeyDown(): void {\n const list = this.combobox ? this._filteredOptions : this._options;\n const showDropdownNext = !this._showDropdown;\n\n this._toggleDropdown(showDropdownNext);\n\n if (\n !this._multiple &&\n !showDropdownNext &&\n this._selectedIndex !== this._activeIndex\n ) {\n this._selectedIndex = list[this._activeIndex].index;\n this._value = this._options[this._selectedIndex].value;\n this._dispatchChangeEvent();\n }\n\n if (this.combobox) {\n if (!this._multiple && !showDropdownNext) {\n this._selectedIndex = this._filteredOptions[this._activeIndex].index;\n }\n\n if (!this._multiple && showDropdownNext) {\n this.updateComplete.then(() => {\n this._scrollActiveElementToTop();\n });\n }\n }\n\n if (this._multiple && showDropdownNext) {\n this._activeIndex = 0;\n }\n }\n\n private _onSpaceKeyDown() {\n if (!this._showDropdown) {\n this._toggleDropdown(true);\n return;\n }\n\n if (this._showDropdown && this._multiple && this._activeIndex > -1) {\n const opts = this.combobox ? this._filteredOptions : this._options;\n const {selected} = opts[this._activeIndex];\n\n opts[this._activeIndex].selected = !selected;\n this._selectedIndexes = [];\n\n opts.forEach(({index, selected}) => {\n if (selected) {\n this._selectedIndexes.push(index);\n }\n });\n }\n }\n\n private _scrollActiveElementToTop() {\n this._listElement.scrollTop = Math.floor(this._activeIndex * OPT_HEIGHT);\n }\n\n private async _adjustOptionListScrollPos(direction: 'down' | 'up') {\n const numOpts = this.combobox\n ? this._filteredOptions.length\n : this._options.length;\n\n if (numOpts <= VISIBLE_OPTS) {\n return;\n }\n\n this._isHoverForbidden = true;\n window.addEventListener('mousemove', this._onMouseMoveBound);\n\n if (!this._listElement) {\n await this.updateComplete;\n }\n\n const ulScrollTop = this._listElement.scrollTop;\n const liPosY = this._activeIndex * OPT_HEIGHT;\n\n if (direction === 'down') {\n if (liPosY + OPT_HEIGHT >= LIST_HEIGHT + ulScrollTop) {\n this._listElement.scrollTop =\n (this._activeIndex - (VISIBLE_OPTS - 1)) * OPT_HEIGHT;\n }\n }\n\n if (direction === 'up') {\n if (liPosY <= ulScrollTop - OPT_HEIGHT) {\n this._scrollActiveElementToTop();\n }\n }\n }\n\n protected _onArrowUpKeyDown(): void {\n if (this._showDropdown) {\n if (this._activeIndex <= 0) {\n return;\n }\n\n this._activeIndex -= 1;\n this._adjustOptionListScrollPos('up');\n }\n }\n\n protected _onArrowDownKeyDown(): void {\n if (this._showDropdown) {\n if (this._activeIndex >= this._currentOptions.length - 1) {\n return;\n }\n\n this._activeIndex += 1;\n this._adjustOptionListScrollPos('down');\n }\n }\n\n private _onComponentKeyDown(event: KeyboardEvent) {\n if ([' ', 'ArrowUp', 'ArrowDown', 'Escape'].includes(event.key)) {\n event.stopPropagation();\n event.preventDefault();\n }\n\n if (event.key === 'Enter') {\n this._onEnterKeyDown();\n }\n\n if (event.key === ' ') {\n this._onSpaceKeyDown();\n }\n\n if (event.key === 'Escape') {\n this._toggleDropdown(false);\n }\n\n if (event.key === 'ArrowUp') {\n this._onArrowUpKeyDown();\n }\n\n if (event.key === 'ArrowDown') {\n this._onArrowDownKeyDown();\n }\n }\n\n private _onComponentFocus() {\n this.focused = true;\n }\n\n private _onComponentBlur() {\n this.focused = false;\n }\n\n protected _onSlotChange(): void {\n const stat = this._addOptionsFromSlottedElements();\n\n if (stat.selectedIndexes.length > 0) {\n this._selectedIndex = stat.selectedIndexes[0];\n this._selectedIndexes = stat.selectedIndexes;\n this._value = stat.values[0];\n this._values = stat.values;\n }\n\n if (\n !this._multiple &&\n !this.combobox &&\n stat.selectedIndexes.length === 0\n ) {\n this._selectedIndex = 0;\n }\n\n this.requestUpdate();\n }\n\n protected _onComboboxInputFocus(ev: FocusEvent): void {\n (ev.target as HTMLInputElement).select();\n }\n\n protected _onComboboxInputInput(ev: InputEvent): void {\n this._filterPattern = (ev.target as HTMLInputElement).value;\n this._activeIndex = -1;\n this._toggleDropdown(true);\n }\n\n protected _onComboboxInputClick(): void {\n this._toggleDropdown(true);\n }\n\n protected _renderOptions(): TemplateResult | TemplateResult[] {\n return [];\n }\n\n private _renderDescription() {\n if (!this._options[this._activeIndex]) {\n return nothing;\n }\n\n const {description} = this._options[this._activeIndex];\n\n return description\n ? html`<div class=\"description\">${description}</div>`\n : nothing;\n }\n\n protected _renderSelectFace(): TemplateResult {\n return html`${nothing}`;\n }\n\n protected _renderComboboxFace(): TemplateResult {\n return html`${nothing}`;\n }\n\n protected _renderDropdownControls(): TemplateResult {\n return html`${nothing}`;\n }\n\n private _renderDropdown() {\n const classes = classMap({\n dropdown: true,\n multiple: this._multiple,\n });\n\n return html`\n <div class=\"${classes}\">\n ${this.position === \"above\" ? this._renderDescription() : nothing}\n ${this._renderOptions()} ${this._renderDropdownControls()}\n ${this.position === \"below\" ? this._renderDescription() : nothing}\n </div>\n `;\n }\n\n render(): TemplateResult {\n return html`\n <slot class=\"main-slot\" @slotchange=\"${this._onSlotChange}\"></slot>\n ${this.combobox ? this._renderComboboxFace() : this._renderSelectFace()}\n ${this._showDropdown ? this._renderDropdown() : nothing}\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"vscode-select-base.js","sourceRoot":"","sources":["../../../src/includes/vscode-select/vscode-select-base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,IAAI,EAAE,OAAO,EAAiB,MAAM,KAAK,CAAC;AAClD,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,qBAAqB,CAAC;AAG7B,OAAO,EAAC,sBAAsB,EAAC,MAAM,cAAc,CAAC;AACpD,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAO5C,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,UAAU,GAAG,EAAE,CAAC;AACtB,MAAM,WAAW,GAAG,YAAY,GAAG,UAAU,GAAG,CAAC,CAAC;AAElD;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IAAhD;;QACE,gBAAgB;QAEhB,iBAAY,GAAG,OAAO,CAAC;QAGvB,aAAQ,GAAG,KAAK,CAAC;QAsBjB;;WAEG;QAEH,YAAO,GAAG,KAAK,CAAC;QAoChB,YAAO,GAAG,KAAK,CAAC;QAsBhB;;WAEG;QAEH,aAAQ,GAAsB,OAAO,CAAC;QAEtC,gBAAgB;QAEhB,aAAQ,GAAG,CAAC,CAAC;QAuBH,iBAAY,GAAG,CAAC,CAAC,CAAC;QAG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IADC,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;kDACY;AAItC;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;kDAC5C;AAML;IAJP,qBAAqB,CAAC;QACrB,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,eAAe;KAC1B,CAAC;0DACwC;AAiBhC;IADT,KAAK,EAAE;sDACoB;AAGlB;IADT,KAAK,EAAE;6DAC2B;AAGzB;IADT,KAAK,EAAE;iDACkC;AAG1C;IADC,KAAK,EAAE;wDAWP;AAGS;IADT,KAAK,EAAE;wDACsB;AAGpB;IADT,KAAK,EAAE;wDACsB;AAGpB;IADT,KAAK,EAAE;0DACkC;AAGhC;IADT,KAAK,EAAE;uDACwB;AAGtB;IADT,KAAK,EAAE;kDACkC;AAGhC;IADT,KAAK,EAAE;gDACc;AAGZ;IADT,KAAK,EAAE;iDACyB;AAGvB;IADT,KAAK,EAAE;wDACqB;AAGrB;IADP,KAAK,CAAC,UAAU,CAAC;sDACsB","sourcesContent":["import {html, nothing, TemplateResult} from 'lit';\nimport {property, query, queryAssignedElements, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport '../../vscode-button';\nimport '../../vscode-option';\nimport {VscodeOption} from '../../vscode-option/index.js';\nimport type {InternalOption, Option, SearchMethod} from './types.js';\nimport {filterOptionsByPattern} from './helpers.js';\nimport {VscElement} from '../VscElement.js';\n\ninterface OptionListStat {\n selectedIndexes: number[];\n values: string[];\n}\n\nconst VISIBLE_OPTS = 10;\nconst OPT_HEIGHT = 22;\nconst LIST_HEIGHT = VISIBLE_OPTS + OPT_HEIGHT + 2;\n\n/**\n * @cssprop --dropdown-z-index - workaround for dropdown z-index issues\n */\nexport class VscodeSelectBase extends VscElement {\n /** @internal */\n @property({type: String, reflect: true, attribute: 'aria-expanded'})\n ariaExpanded = 'false';\n\n @property({type: Boolean, reflect: true})\n combobox = false;\n\n @property({type: Boolean, reflect: true})\n set disabled(newState: boolean) {\n this._disabled = newState;\n this.ariaDisabled = newState ? 'true' : 'false';\n\n if (newState === true) {\n this._originalTabIndex = this.tabIndex;\n this.tabIndex = -1;\n } else {\n this.tabIndex = this._originalTabIndex ?? 0;\n this._originalTabIndex = undefined;\n }\n\n this.requestUpdate();\n }\n\n get disabled(): boolean {\n return this._disabled;\n }\n\n /**\n * Sets the invalid state manually.\n */\n @property({type: Boolean, reflect: true})\n invalid = false;\n\n /**\n * Search method in the filtered list within the combobox mode.\n *\n * - contains - The list item includes the searched pattern at any position.\n * - fuzzy - The list item contains the letters of the search pattern in the same order, but at any position.\n * - startsWith - The search pattern matches the beginning of the searched text.\n * - startsWithPerTerm - The search pattern matches the beginning of any word in the searched text.\n *\n * @default 'fuzzy'\n */\n @property()\n set filter(val: 'contains' | 'fuzzy' | 'startsWith' | 'startsWithPerTerm') {\n const validValues: SearchMethod[] = [\n 'contains',\n 'fuzzy',\n 'startsWith',\n 'startsWithPerTerm',\n ];\n\n if (validValues.includes(val as SearchMethod)) {\n this._filter = val as SearchMethod;\n } else {\n this._filter = 'fuzzy';\n console.warn(\n `[VSCode Webview Elements] Invalid filter: \"${val}\", fallback to default. Valid values are: \"contains\", \"fuzzy\", \"startsWith\", \"startsWithPerm\".`,\n this\n );\n }\n }\n get filter(): 'contains' | 'fuzzy' | 'startsWith' | 'startsWithPerTerm' {\n return this._filter;\n }\n\n @property({type: Boolean, reflect: true})\n focused = false;\n\n /**\n * @attr [options=[]]\n * @type {Option[]}\n */\n @property({type: Array})\n set options(opts: Option[]) {\n this._options = opts.map((op, index) => ({...op, index}));\n }\n get options(): Option[] {\n return this._options.map(\n ({label, value, description, selected, disabled}) => ({\n label,\n value,\n description,\n selected,\n disabled,\n })\n );\n }\n\n /**\n * Position of the options list when visible.\n */\n @property({reflect: true})\n position: 'above' | 'below' = 'below';\n\n /** @internal */\n @property({type: Number, attribute: true, reflect: true})\n tabIndex = 0;\n\n @queryAssignedElements({\n flatten: true,\n selector: 'vscode-option',\n })\n private _assignedOptions!: VscodeOption[];\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('keydown', this._onComponentKeyDown);\n this.addEventListener('focus', this._onComponentFocus);\n this.addEventListener('blur', this._onComponentBlur);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('keydown', this._onComponentKeyDown);\n this.removeEventListener('focus', this._onComponentFocus);\n this.removeEventListener('blur', this._onComponentBlur);\n }\n\n @state()\n protected _activeIndex = -1;\n\n @state()\n protected _currentDescription = '';\n\n @state()\n protected _filter: SearchMethod = 'fuzzy';\n\n @state()\n protected get _filteredOptions(): InternalOption[] {\n if (!this.combobox || this._filterPattern === '') {\n return this._options;\n }\n\n return filterOptionsByPattern(\n this._options,\n this._filterPattern,\n this._filter\n );\n }\n\n @state()\n protected _filterPattern = '';\n\n @state()\n protected _selectedIndex = -1;\n\n @state()\n protected _selectedIndexes: number[] = [];\n\n @state()\n protected _showDropdown = false;\n\n @state()\n protected _options: InternalOption[] = [];\n\n @state()\n protected _value = '';\n\n @state()\n protected _values: string[] = [];\n\n @state()\n protected _listScrollTop = 0;\n\n @query('.options')\n private _listElement!: HTMLUListElement;\n\n /** @internal */\n protected _multiple = false;\n\n /**\n * @internal\n * Quick-searchable map for searching a value in the options list.\n * Keys are the options values, values are the option indexes.\n */\n protected _valueOptionIndexMap: {[key: string]: number} = {};\n\n private _isHoverForbidden = false;\n private _disabled = false;\n private _originalTabIndex: number | undefined = undefined;\n\n protected get _currentOptions(): InternalOption[] {\n return this.combobox ? this._filteredOptions : this._options;\n }\n\n protected _addOptionsFromSlottedElements(): OptionListStat {\n const options: InternalOption[] = [];\n let nextIndex = 0;\n const optionElements = this._assignedOptions ?? [];\n const optionsListStat: OptionListStat = {\n selectedIndexes: [],\n values: [],\n };\n this._valueOptionIndexMap = {};\n\n optionElements.forEach((el) => {\n const {innerText, description, disabled} = el;\n const value = (el.value ?? '') ? el.value : innerText.trim();\n const selected = el.selected ?? false;\n const op: InternalOption = {\n label: innerText.trim(),\n value,\n description,\n selected,\n index: nextIndex,\n disabled,\n };\n\n nextIndex = options.push(op);\n\n if (selected) {\n optionsListStat.selectedIndexes.push(options.length - 1);\n optionsListStat.values.push(value);\n }\n\n this._valueOptionIndexMap[op.value] = op.index;\n });\n\n this._options = options;\n\n return optionsListStat;\n }\n\n protected async _toggleDropdown(visible: boolean): Promise<void> {\n this._showDropdown = visible;\n this.ariaExpanded = String(visible);\n\n if (visible && !this._multiple && !this.combobox) {\n this._activeIndex = this._selectedIndex;\n\n if (this._activeIndex > VISIBLE_OPTS - 1) {\n await this.updateComplete;\n\n this._listElement.scrollTop = Math.floor(\n this._activeIndex * OPT_HEIGHT\n );\n }\n }\n\n if (visible) {\n window.addEventListener('click', this._onClickOutside);\n } else {\n window.removeEventListener('click', this._onClickOutside);\n }\n }\n\n protected _dispatchChangeEvent(): void {\n if (!this._multiple) {\n /** @deprecated */\n this.dispatchEvent(\n new CustomEvent('vsc-change', {\n detail: {\n selectedIndex: this._selectedIndex,\n value: this._value,\n },\n })\n );\n } else {\n /** @deprecated */\n this.dispatchEvent(\n new CustomEvent('vsc-change', {\n detail: {\n selectedIndexes: this._selectedIndexes,\n value: this._values,\n },\n })\n );\n }\n this.dispatchEvent(new Event('change'));\n }\n\n protected _onFaceClick(): void {\n this._toggleDropdown(!this._showDropdown);\n\n if (this._multiple) {\n this._activeIndex = 0;\n }\n }\n\n private _onClickOutside = (event: MouseEvent): void => {\n const path = event.composedPath();\n const found = path.findIndex((et) => et === this);\n\n if (found === -1) {\n this._toggleDropdown(false);\n window.removeEventListener('click', this._onClickOutside);\n }\n }\n\n private _onMouseMove = () => {\n this._isHoverForbidden = false;\n window.removeEventListener('mousemove', this._onMouseMove);\n }\n\n private _toggleComboboxDropdown() {\n this._filterPattern = '';\n this._toggleDropdown(!this._showDropdown);\n\n if (this._multiple) {\n this._activeIndex = -1;\n }\n }\n\n protected _onComboboxButtonClick(): void {\n this._toggleComboboxDropdown();\n }\n\n protected _onComboboxButtonKeyDown(ev: KeyboardEvent): void {\n if (ev.key === 'Enter') {\n this._toggleComboboxDropdown();\n }\n }\n\n protected _onOptionMouseOver(ev: MouseEvent): void {\n if (this._isHoverForbidden) {\n return;\n }\n\n const el = ev.target as HTMLElement;\n\n if (!el.matches('.option')) {\n return;\n }\n\n this._activeIndex = Number(\n this.combobox ? el.dataset.filteredIndex : el.dataset.index\n );\n }\n\n protected _onEnterKeyDown(): void {\n const list = this.combobox ? this._filteredOptions : this._options;\n const showDropdownNext = !this._showDropdown;\n\n this._toggleDropdown(showDropdownNext);\n\n if (\n !this._multiple &&\n !showDropdownNext &&\n this._selectedIndex !== this._activeIndex\n ) {\n this._selectedIndex = list[this._activeIndex].index;\n this._value = this._options[this._selectedIndex].value;\n this._dispatchChangeEvent();\n }\n\n if (this.combobox) {\n if (!this._multiple && !showDropdownNext) {\n this._selectedIndex = this._filteredOptions[this._activeIndex].index;\n }\n\n if (!this._multiple && showDropdownNext) {\n this.updateComplete.then(() => {\n this._scrollActiveElementToTop();\n });\n }\n }\n\n if (this._multiple && showDropdownNext) {\n this._activeIndex = 0;\n }\n }\n\n private _onSpaceKeyDown() {\n if (!this._showDropdown) {\n this._toggleDropdown(true);\n return;\n }\n\n if (this._showDropdown && this._multiple && this._activeIndex > -1) {\n const opts = this.combobox ? this._filteredOptions : this._options;\n const {selected} = opts[this._activeIndex];\n\n opts[this._activeIndex].selected = !selected;\n this._selectedIndexes = [];\n\n opts.forEach(({index, selected}) => {\n if (selected) {\n this._selectedIndexes.push(index);\n }\n });\n }\n }\n\n private _scrollActiveElementToTop() {\n this._listElement.scrollTop = Math.floor(this._activeIndex * OPT_HEIGHT);\n }\n\n private async _adjustOptionListScrollPos(direction: 'down' | 'up') {\n const numOpts = this.combobox\n ? this._filteredOptions.length\n : this._options.length;\n\n if (numOpts <= VISIBLE_OPTS) {\n return;\n }\n\n this._isHoverForbidden = true;\n window.addEventListener('mousemove', this._onMouseMove);\n\n if (!this._listElement) {\n await this.updateComplete;\n }\n\n const ulScrollTop = this._listElement.scrollTop;\n const liPosY = this._activeIndex * OPT_HEIGHT;\n\n if (direction === 'down') {\n if (liPosY + OPT_HEIGHT >= LIST_HEIGHT + ulScrollTop) {\n this._listElement.scrollTop =\n (this._activeIndex - (VISIBLE_OPTS - 1)) * OPT_HEIGHT;\n }\n }\n\n if (direction === 'up') {\n if (liPosY <= ulScrollTop - OPT_HEIGHT) {\n this._scrollActiveElementToTop();\n }\n }\n }\n\n protected _onArrowUpKeyDown(): void {\n if (this._showDropdown) {\n if (this._activeIndex <= 0) {\n return;\n }\n\n this._activeIndex -= 1;\n this._adjustOptionListScrollPos('up');\n }\n }\n\n protected _onArrowDownKeyDown(): void {\n if (this._showDropdown) {\n if (this._activeIndex >= this._currentOptions.length - 1) {\n return;\n }\n\n this._activeIndex += 1;\n this._adjustOptionListScrollPos('down');\n }\n }\n\n private _onComponentKeyDown(event: KeyboardEvent) {\n if ([' ', 'ArrowUp', 'ArrowDown', 'Escape'].includes(event.key)) {\n event.stopPropagation();\n event.preventDefault();\n }\n\n if (event.key === 'Enter') {\n this._onEnterKeyDown();\n }\n\n if (event.key === ' ') {\n this._onSpaceKeyDown();\n }\n\n if (event.key === 'Escape') {\n this._toggleDropdown(false);\n }\n\n if (event.key === 'ArrowUp') {\n this._onArrowUpKeyDown();\n }\n\n if (event.key === 'ArrowDown') {\n this._onArrowDownKeyDown();\n }\n }\n\n private _onComponentFocus() {\n this.focused = true;\n }\n\n private _onComponentBlur() {\n this.focused = false;\n }\n\n protected _onSlotChange(): void {\n const stat = this._addOptionsFromSlottedElements();\n\n if (stat.selectedIndexes.length > 0) {\n this._selectedIndex = stat.selectedIndexes[0];\n this._selectedIndexes = stat.selectedIndexes;\n this._value = stat.values[0];\n this._values = stat.values;\n }\n\n if (\n !this._multiple &&\n !this.combobox &&\n stat.selectedIndexes.length === 0\n ) {\n this._selectedIndex = 0;\n }\n\n this.requestUpdate();\n }\n\n protected _onComboboxInputFocus(ev: FocusEvent): void {\n (ev.target as HTMLInputElement).select();\n }\n\n protected _onComboboxInputInput(ev: InputEvent): void {\n this._filterPattern = (ev.target as HTMLInputElement).value;\n this._activeIndex = -1;\n this._toggleDropdown(true);\n }\n\n protected _onComboboxInputClick(): void {\n this._toggleDropdown(true);\n }\n\n protected _renderOptions(): TemplateResult | TemplateResult[] {\n return [];\n }\n\n private _renderDescription() {\n if (!this._options[this._activeIndex]) {\n return nothing;\n }\n\n const {description} = this._options[this._activeIndex];\n\n return description\n ? html`<div class=\"description\">${description}</div>`\n : nothing;\n }\n\n protected _renderSelectFace(): TemplateResult {\n return html`${nothing}`;\n }\n\n protected _renderComboboxFace(): TemplateResult {\n return html`${nothing}`;\n }\n\n protected _renderDropdownControls(): TemplateResult {\n return html`${nothing}`;\n }\n\n private _renderDropdown() {\n const classes = classMap({\n dropdown: true,\n multiple: this._multiple,\n });\n\n return html`\n <div class=\"${classes}\">\n ${this.position === \"above\" ? this._renderDescription() : nothing}\n ${this._renderOptions()} ${this._renderDropdownControls()}\n ${this.position === \"below\" ? this._renderDescription() : nothing}\n </div>\n `;\n }\n\n render(): TemplateResult {\n return html`\n <slot class=\"main-slot\" @slotchange=\"${this._onSlotChange}\"></slot>\n ${this.combobox ? this._renderComboboxFace() : this._renderSelectFace()}\n ${this._showDropdown ? this._renderDropdown() : nothing}\n `;\n }\n}\n"]}
@@ -10,6 +10,11 @@ declare const VscodeCheckbox_base: (new (...args: any[]) => import("../includes/
10
10
  * @attr label - Attribute pair of the `label` property.
11
11
  * @prop label - Label text. It is only applied if component's innerHTML doesn't contain any text.
12
12
  *
13
+ * @fires {Event} change - Dispatched when checked state is changed. The event is bubbled, so it can be listened on a parent element like the `CheckboxGroup`.
14
+ * @fires {Event} invalid - Dispatched when the element is invalid and `checkValidity()` has been called or the form containing this element is submitted.
15
+ *
16
+ * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event)
17
+ *
13
18
  * @cssprop --vscode-font-family
14
19
  * @cssprop --vscode-font-size
15
20
  * @cssprop --vscode-font-weight