@vscode-elements/elements 2.1.1-pre.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/custom-elements.json +1053 -986
  2. package/dist/bundled.js +147 -76
  3. package/dist/includes/VscElement.js +1 -1
  4. package/dist/includes/VscElement.js.map +1 -1
  5. package/dist/includes/test-helpers.d.ts +2 -2
  6. package/dist/includes/test-helpers.d.ts.map +1 -1
  7. package/dist/includes/test-helpers.js +2 -1
  8. package/dist/includes/test-helpers.js.map +1 -1
  9. package/dist/vscode-button/vscode-button.d.ts +8 -0
  10. package/dist/vscode-button/vscode-button.d.ts.map +1 -1
  11. package/dist/vscode-button/vscode-button.js +37 -12
  12. package/dist/vscode-button/vscode-button.js.map +1 -1
  13. package/dist/vscode-button/vscode-button.styles.d.ts.map +1 -1
  14. package/dist/vscode-button/vscode-button.styles.js +47 -54
  15. package/dist/vscode-button/vscode-button.styles.js.map +1 -1
  16. package/dist/vscode-button-group/vscode-button-group.styles.d.ts.map +1 -1
  17. package/dist/vscode-button-group/vscode-button-group.styles.js +2 -0
  18. package/dist/vscode-button-group/vscode-button-group.styles.js.map +1 -1
  19. package/dist/vscode-checkbox/vscode-checkbox.d.ts +5 -2
  20. package/dist/vscode-checkbox/vscode-checkbox.d.ts.map +1 -1
  21. package/dist/vscode-checkbox/vscode-checkbox.js +14 -9
  22. package/dist/vscode-checkbox/vscode-checkbox.js.map +1 -1
  23. package/dist/vscode-checkbox/vscode-checkbox.styles.d.ts.map +1 -1
  24. package/dist/vscode-checkbox/vscode-checkbox.styles.js +71 -0
  25. package/dist/vscode-checkbox/vscode-checkbox.styles.js.map +1 -1
  26. package/package.json +1 -1
  27. package/vscode.css-custom-data.json +19 -15
  28. package/vscode.html-custom-data.json +23 -18
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,i=Symbol(),s=new WeakMap;let o=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const i=this.t;if(e&&void 0===t){const e=void 0!==i&&1===i.length;e&&(t=s.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&s.set(i,t))}return t}toString(){return this.cssText}};const r=t=>new o("string"==typeof t?t:t+"",void 0,i),n=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,i,s)=>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.")})(i)+t[s+1]),t[0]);return new o(s,t,i)},l=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return r(e)})(t):t,{is:h,defineProperty:a,getOwnPropertyDescriptor:c,getOwnPropertyNames:d,getOwnPropertySymbols:u,getPrototypeOf:p}=Object,v=globalThis,b=v.trustedTypes,f=b?b.emptyScript:"",g=v.reactiveElementPolyfillSupport,m=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},w=(t,e)=>!h(t,e),y={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:w};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;let k=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=y){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&a(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const r=s?.call(this);o?.call(this,e),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(m("elementProperties")))return;const t=p(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(m("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m("properties"))){const t=this.properties,e=[...d(t),...u(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"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 i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((i,s)=>{if(e)i.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of s){const s=document.createElement("style"),o=t.litNonce;void 0!==o&&s.setAttribute("nonce",o),s.textContent=e.cssText,i.appendChild(s)}})(i,this.constructor.elementStyles),i}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,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:x).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=s,this[s]=o.fromAttribute(e,t.type)??this._$Ej?.get(s)??null,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){const s=this.constructor,o=this[t];if(i??=s.getPropertyOptions(t),!((i.hasChanged??w)(o,e)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??e??this[t]),!0!==o||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){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,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,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._$EM()}catch(e){throw t=!1,this._$EM(),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)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[m("elementProperties")]=new Map,k[m("finalized")]=new Map,g?.({ReactiveElement:k}),(v.reactiveElementVersions??=[]).push("2.1.0");const $=globalThis,_=$.trustedTypes,S=_?_.createPolicy("lit-html",{createHTML:t=>t}):void 0,B="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,O="?"+C,z=`<${O}>`,A=document,E=()=>A.createComment(""),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,M="[ \t\n\f\r]",P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,F=/>/g,V=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),N=/'/g,T=/"/g,R=/^(?:script|style|textarea|title)$/i,L=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),U=L(1),G=L(2),H=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),W=new WeakMap,K=A.createTreeWalker(A,129);function J(t,e){if(!j(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==S?S.createHTML(e):e}const Y=(t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=P;for(let e=0;e<i;e++){const i=t[e];let l,h,a=-1,c=0;for(;c<i.length&&(n.lastIndex=c,h=n.exec(i),null!==h);)c=n.lastIndex,n===P?"!--"===h[1]?n=D:void 0!==h[1]?n=F:void 0!==h[2]?(R.test(h[2])&&(o=RegExp("</"+h[2],"g")),n=V):void 0!==h[3]&&(n=V):n===V?">"===h[0]?(n=o??P,a=-1):void 0===h[1]?a=-2:(a=n.lastIndex-h[2].length,l=h[1],n=void 0===h[3]?V:'"'===h[3]?T:N):n===T||n===N?n=V:n===D||n===F?n=P:(n=V,o=void 0);const d=n===V&&t[e+1].startsWith("/>")?" ":"";r+=n===P?i+z:a>=0?(s.push(l),i.slice(0,a)+B+i.slice(a)+C+d):i+C+(-2===a?e:d)}return[J(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class X{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,l=this.parts,[h,a]=Y(t,e);if(this.el=X.createElement(h,i),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=K.nextNode())&&l.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(B)){const e=a[r++],i=s.getAttribute(t).split(C),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?et:"?"===n[1]?it:"@"===n[1]?st:tt}),s.removeAttribute(t)}else t.startsWith(C)&&(l.push({type:6,index:o}),s.removeAttribute(t));if(R.test(s.tagName)){const t=s.textContent.split(C),e=t.length-1;if(e>0){s.textContent=_?_.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],E()),K.nextNode(),l.push({type:2,index:++o});s.append(t[e],E())}}}else if(8===s.nodeType)if(s.data===O)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(C,t+1));)l.push({type:7,index:o}),t+=C.length-1}o++}}static createElement(t,e){const i=A.createElement("template");return i.innerHTML=t,i}}function Z(t,e,i=t,s){if(e===H)return e;let o=void 0!==s?i._$Co?.[s]:i._$Cl;const r=I(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,i,s)),void 0!==s?(i._$Co??=[])[s]=o:i._$Cl=o),void 0!==o&&(e=Z(t,o._$AS(t,e.values),o,s)),e}class Q{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.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=Z(this,t,e),I(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==H&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>j(t)||"function"==typeof t?.[Symbol.iterator])(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&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=X.createElement(J(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??A).importNode(e,!0);K.currentNode=s;let o=K.nextNode(),r=0,n=0,l=i[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new Q(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new ot(o,this,t)),this._$AV.push(e),l=i[++n]}r!==l?.index&&(o=K.nextNode(),r++)}return K.currentNode=A,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=W.get(t.strings);return void 0===e&&W.set(t.strings,e=new X(t)),e}k(t){j(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new Q(this.O(E()),this.O(E()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$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._$Cv=t,this._$AP?.(t))}}class tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=q}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=Z(this,t,e,0),r=!I(t)||t!==this._$AH&&t!==H,r&&(this._$AH=t);else{const s=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=Z(this,s[i+n],e,n),l===H&&(l=this._$AH[n]),r||=!I(l)||l!==this._$AH[n],l===q?t=q:t!==q&&(t+=(l??"")+o[n+1]),this._$AH[n]=l}r&&!s&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class it extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class st extends tt{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=Z(this,t,e,0)??q)===H)return;const i=this._$AH,s=t===q&&i!==q||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==q&&(i===q||s);s&&this.element.removeEventListener(this.name,this,i),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 ot{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const rt={I:Q},nt=$.litHtmlPolyfillSupport;nt?.(X,Q),($.litHtmlVersions??=[]).push("3.3.0");const lt=(t,e,i)=>{const s=i?.renderBefore??e;let o=s._$litPart$;if(void 0===o){const t=i?.renderBefore??null;s._$litPart$=o=new Q(e.insertBefore(E(),t),t,void 0,i??{})}return o._$AI(t),o},ht=globalThis;let at=class extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=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._$Do=lt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return H}};at._$litElement$=!0,at.finalized=!0,ht.litElementHydrateSupport?.({LitElement:at});const ct=ht.litElementPolyfillSupport;ct?.({LitElement:at}),(ht.litElementVersions??=[]).push("4.2.0");const dt={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:w},ut=(t=dt,e,i)=>{const{kind:s,metadata:o}=i;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),r.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const o=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,o,t)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const o=this[s];e.call(this,i),this.requestUpdate(s,o,t)}}throw Error("Unsupported decorator location: "+s)};function pt(t){return(e,i)=>"object"==typeof i?ut(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}function vt(t){return pt({...t,state:!0,attribute:!1})}const bt=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,i);function ft(t,e){return(i,s,o)=>{const r=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof s?i:o??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return bt(0,0,{get(){let i=t.call(this);return void 0===i&&(i=r(this),(null!==i||this.hasUpdated)&&e.call(this,i)),i}})}return bt(0,0,{get(){return r(this)}})}}let gt;function mt(t){return(e,i)=>{const{slot:s,selector:o}=t??{},r="slot"+(s?`[name=${s}]`:":not([name])");return bt(0,0,{get(){const e=this.renderRoot?.querySelector(r),i=e?.assignedElements(t)??[];return void 0===o?i:i.filter((t=>t.matches(o)))}})}}const xt="2.1.1-pre.0",wt="__vscodeElements_disableRegistryWarning__";class yt extends at{get version(){return xt}}const kt=t=>e=>{if(!customElements.get(t))return void customElements.define(t,e);if(wt in window)return;const i=document.createElement(t),s=i?.version;let o="";s?s!==xt?(o+="is already registered by a different version of VSCode Elements. ",o+=`This version is "${xt}", while the other one is "${s}".`):o+=`is already registered by the same version of VSCode Elements (${xt}).`:o+="is already registered by an unknown custom element handler class.",console.warn(`[VSCode Elements] ${t} ${o}\nTo suppress this warning, set window.${wt} to true`)};var $t=n`
1
+ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),s=new WeakMap;let o=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const i=this.t;if(e&&void 0===t){const e=void 0!==i&&1===i.length;e&&(t=s.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&s.set(i,t))}return t}toString(){return this.cssText}};const r=t=>new o("string"==typeof t?t:t+"",void 0,i),n=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,i,s)=>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.")})(i)+t[s+1]),t[0]);return new o(s,t,i)},l=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return r(e)})(t):t,{is:h,defineProperty:a,getOwnPropertyDescriptor:c,getOwnPropertyNames:d,getOwnPropertySymbols:u,getPrototypeOf:p}=Object,v=globalThis,b=v.trustedTypes,f=b?b.emptyScript:"",g=v.reactiveElementPolyfillSupport,m=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},w=(t,e)=>!h(t,e),y={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:w};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;let k=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=y){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&a(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const r=s?.call(this);o?.call(this,e),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(m("elementProperties")))return;const t=p(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(m("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m("properties"))){const t=this.properties,e=[...d(t),...u(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"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 i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((i,s)=>{if(e)i.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of s){const s=document.createElement("style"),o=t.litNonce;void 0!==o&&s.setAttribute("nonce",o),s.textContent=e.cssText,i.appendChild(s)}})(i,this.constructor.elementStyles),i}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,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:x).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=s,this[s]=o.fromAttribute(e,t.type)??this._$Ej?.get(s)??null,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){const s=this.constructor,o=this[t];if(i??=s.getPropertyOptions(t),!((i.hasChanged??w)(o,e)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??e??this[t]),!0!==o||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){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,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,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._$EM()}catch(e){throw t=!1,this._$EM(),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)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[m("elementProperties")]=new Map,k[m("finalized")]=new Map,g?.({ReactiveElement:k}),(v.reactiveElementVersions??=[]).push("2.1.0");const $=globalThis,_=$.trustedTypes,S=_?_.createPolicy("lit-html",{createHTML:t=>t}):void 0,B="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,O="?"+C,A=`<${O}>`,z=document,E=()=>z.createComment(""),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,M="[ \t\n\f\r]",P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,F=/>/g,V=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),N=/'/g,T=/"/g,R=/^(?:script|style|textarea|title)$/i,L=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),U=L(1),G=L(2),H=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),W=new WeakMap,K=z.createTreeWalker(z,129);function J(t,e){if(!j(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==S?S.createHTML(e):e}const Y=(t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=P;for(let e=0;e<i;e++){const i=t[e];let l,h,a=-1,c=0;for(;c<i.length&&(n.lastIndex=c,h=n.exec(i),null!==h);)c=n.lastIndex,n===P?"!--"===h[1]?n=D:void 0!==h[1]?n=F:void 0!==h[2]?(R.test(h[2])&&(o=RegExp("</"+h[2],"g")),n=V):void 0!==h[3]&&(n=V):n===V?">"===h[0]?(n=o??P,a=-1):void 0===h[1]?a=-2:(a=n.lastIndex-h[2].length,l=h[1],n=void 0===h[3]?V:'"'===h[3]?T:N):n===T||n===N?n=V:n===D||n===F?n=P:(n=V,o=void 0);const d=n===V&&t[e+1].startsWith("/>")?" ":"";r+=n===P?i+A:a>=0?(s.push(l),i.slice(0,a)+B+i.slice(a)+C+d):i+C+(-2===a?e:d)}return[J(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class X{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,l=this.parts,[h,a]=Y(t,e);if(this.el=X.createElement(h,i),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=K.nextNode())&&l.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(B)){const e=a[r++],i=s.getAttribute(t).split(C),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?et:"?"===n[1]?it:"@"===n[1]?st:tt}),s.removeAttribute(t)}else t.startsWith(C)&&(l.push({type:6,index:o}),s.removeAttribute(t));if(R.test(s.tagName)){const t=s.textContent.split(C),e=t.length-1;if(e>0){s.textContent=_?_.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],E()),K.nextNode(),l.push({type:2,index:++o});s.append(t[e],E())}}}else if(8===s.nodeType)if(s.data===O)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(C,t+1));)l.push({type:7,index:o}),t+=C.length-1}o++}}static createElement(t,e){const i=z.createElement("template");return i.innerHTML=t,i}}function Z(t,e,i=t,s){if(e===H)return e;let o=void 0!==s?i._$Co?.[s]:i._$Cl;const r=I(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,i,s)),void 0!==s?(i._$Co??=[])[s]=o:i._$Cl=o),void 0!==o&&(e=Z(t,o._$AS(t,e.values),o,s)),e}class Q{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.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=Z(this,t,e),I(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==H&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>j(t)||"function"==typeof t?.[Symbol.iterator])(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&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=X.createElement(J(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??z).importNode(e,!0);K.currentNode=s;let o=K.nextNode(),r=0,n=0,l=i[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new Q(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new ot(o,this,t)),this._$AV.push(e),l=i[++n]}r!==l?.index&&(o=K.nextNode(),r++)}return K.currentNode=z,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=W.get(t.strings);return void 0===e&&W.set(t.strings,e=new X(t)),e}k(t){j(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new Q(this.O(E()),this.O(E()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$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._$Cv=t,this._$AP?.(t))}}class tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=q}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=Z(this,t,e,0),r=!I(t)||t!==this._$AH&&t!==H,r&&(this._$AH=t);else{const s=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=Z(this,s[i+n],e,n),l===H&&(l=this._$AH[n]),r||=!I(l)||l!==this._$AH[n],l===q?t=q:t!==q&&(t+=(l??"")+o[n+1]),this._$AH[n]=l}r&&!s&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class it extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class st extends tt{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=Z(this,t,e,0)??q)===H)return;const i=this._$AH,s=t===q&&i!==q||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==q&&(i===q||s);s&&this.element.removeEventListener(this.name,this,i),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 ot{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const rt={I:Q},nt=$.litHtmlPolyfillSupport;nt?.(X,Q),($.litHtmlVersions??=[]).push("3.3.0");const lt=(t,e,i)=>{const s=i?.renderBefore??e;let o=s._$litPart$;if(void 0===o){const t=i?.renderBefore??null;s._$litPart$=o=new Q(e.insertBefore(E(),t),t,void 0,i??{})}return o._$AI(t),o},ht=globalThis;let at=class extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=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._$Do=lt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return H}};at._$litElement$=!0,at.finalized=!0,ht.litElementHydrateSupport?.({LitElement:at});const ct=ht.litElementPolyfillSupport;ct?.({LitElement:at}),(ht.litElementVersions??=[]).push("4.2.0");const dt={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:w},ut=(t=dt,e,i)=>{const{kind:s,metadata:o}=i;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),r.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const o=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,o,t)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const o=this[s];e.call(this,i),this.requestUpdate(s,o,t)}}throw Error("Unsupported decorator location: "+s)};function pt(t){return(e,i)=>"object"==typeof i?ut(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}function vt(t){return pt({...t,state:!0,attribute:!1})}const bt=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,i);function ft(t,e){return(i,s,o)=>{const r=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof s?i:o??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return bt(0,0,{get(){let i=t.call(this);return void 0===i&&(i=r(this),(null!==i||this.hasUpdated)&&e.call(this,i)),i}})}return bt(0,0,{get(){return r(this)}})}}let gt;function mt(t){return(e,i)=>{const{slot:s,selector:o}=t??{},r="slot"+(s?`[name=${s}]`:":not([name])");return bt(0,0,{get(){const e=this.renderRoot?.querySelector(r),i=e?.assignedElements(t)??[];return void 0===o?i:i.filter((t=>t.matches(o)))}})}}const xt="2.2.0",wt="__vscodeElements_disableRegistryWarning__";class yt extends at{get version(){return xt}}const kt=t=>e=>{if(!customElements.get(t))return void customElements.define(t,e);if(wt in window)return;const i=document.createElement(t),s=i?.version;let o="";s?s!==xt?(o+="is already registered by a different version of VSCode Elements. ",o+=`This version is "${xt}", while the other one is "${s}".`):o+=`is already registered by the same version of VSCode Elements (${xt}).`:o+="is already registered by an unknown custom element handler class.",console.warn(`[VSCode Elements] ${t} ${o}\nTo suppress this warning, set window.${wt} to true`)};var $t=n`
2
2
  :host([hidden]) {
3
3
  display: none;
4
4
  }
@@ -58,7 +58,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
58
58
  min-width: 16px;
59
59
  padding: 3px 5px;
60
60
  }
61
- `];var Bt=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Ct=class extends yt{constructor(){super(...arguments),this.variant="default"}render(){return U`<div class="root"><slot></slot></div>`}};Ct.styles=St,Bt([pt({reflect:!0})],Ct.prototype,"variant",void 0),Ct=Bt([kt("vscode-badge")],Ct);const Ot=1,zt=2,At=3,Et=t=>(...e)=>({_$litDirective$:t,values:e});let It=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};const jt=Et(class extends It{constructor(t){if(super(t),t.type!==Ot||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.st)t in e||(i.remove(t),this.st.delete(t));for(const t in e){const s=!!e[t];s===this.st.has(t)||this.nt?.has(t)||(s?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return H}}),Mt=t=>t??q;const Pt=Et(class extends It{constructor(t){if(super(t),this._prevProperties={},t.type!==At||"style"!==t.name)throw new Error("The `stylePropertyMap` directive must be used in the `style` property")}update(t,[e]){return Object.entries(e).forEach((([e,i])=>{this._prevProperties[e]!==i&&(e.startsWith("--")?t.element.style.setProperty(e,i):t.element.style[e]=i,this._prevProperties[e]=i)})),H}render(t){return H}}),Dt=[$t,n`
61
+ `];var Bt=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Ct=class extends yt{constructor(){super(...arguments),this.variant="default"}render(){return U`<div class="root"><slot></slot></div>`}};Ct.styles=St,Bt([pt({reflect:!0})],Ct.prototype,"variant",void 0),Ct=Bt([kt("vscode-badge")],Ct);const Ot=1,At=2,zt=3,Et=t=>(...e)=>({_$litDirective$:t,values:e});let It=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};const jt=Et(class extends It{constructor(t){if(super(t),t.type!==Ot||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.st)t in e||(i.remove(t),this.st.delete(t));for(const t in e){const s=!!e[t];s===this.st.has(t)||this.nt?.has(t)||(s?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return H}}),Mt=t=>t??q;const Pt=Et(class extends It{constructor(t){if(super(t),this._prevProperties={},t.type!==zt||"style"!==t.name)throw new Error("The `stylePropertyMap` directive must be used in the `style` property")}update(t,[e]){return Object.entries(e).forEach((([e,i])=>{this._prevProperties[e]!==i&&(e.startsWith("--")?t.element.style.setProperty(e,i):t.element.style[e]=i,this._prevProperties[e]=i)})),H}render(t){return H}}),Dt=[$t,n`
62
62
  :host {
63
63
  color: var(--vscode-icon-foreground, #cccccc);
64
64
  display: inline-block;
@@ -143,7 +143,8 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
143
143
  width: auto;
144
144
  }
145
145
 
146
- .root {
146
+ .base {
147
+ align-items: center;
147
148
  background-color: var(--vscode-button-background, #0078d4);
148
149
  border-bottom-left-radius: var(--vsc-border-left-radius, 2px);
149
150
  border-bottom-right-radius: var(--vsc-border-right-radius, 2px);
@@ -157,19 +158,42 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
157
158
  border-top-width: 1px;
158
159
  box-sizing: border-box;
159
160
  color: var(--vscode-button-foreground, #ffffff);
160
- display: inline-flex;
161
+ display: flex;
161
162
  font-family: var(--vscode-font-family, ${r(_t())});
162
163
  font-size: var(--vscode-font-size, 13px);
163
164
  font-weight: var(--vscode-font-weight, normal);
165
+ height: 100%;
166
+ justify-content: center;
164
167
  line-height: 22px;
165
168
  overflow: hidden;
166
- padding: 0;
169
+ padding: 1px calc(13px + var(--vsc-base-additional-right-padding, 0px))
170
+ 1px 13px;
171
+ position: relative;
167
172
  user-select: none;
168
173
  white-space: nowrap;
169
174
  width: 100%;
170
175
  }
171
176
 
172
- :host([secondary]) .root {
177
+ .base:after {
178
+ background-color: var(
179
+ --vscode-button-separator,
180
+ rgba(255, 255, 255, 0.4)
181
+ );
182
+ content: var(--vsc-base-after-content);
183
+ display: var(--vsc-divider-display, none);
184
+ position: absolute;
185
+ right: 0;
186
+ top: 4px;
187
+ bottom: 4px;
188
+ width: 1px;
189
+ }
190
+
191
+ :host([secondary]) .base:after {
192
+ background-color: var(--vscode-button-secondaryForeground, #cccccc);
193
+ opacity: 0.4;
194
+ }
195
+
196
+ :host([secondary]) .base {
173
197
  color: var(--vscode-button-secondaryForeground, #cccccc);
174
198
  background-color: var(--vscode-button-secondaryBackground, #313131);
175
199
  border-color: var(
@@ -184,19 +208,19 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
184
208
  pointer-events: none;
185
209
  }
186
210
 
187
- :host(:hover) .root {
211
+ :host(:hover) .base {
188
212
  background-color: var(--vscode-button-hoverBackground, #026ec1);
189
213
  }
190
214
 
191
- :host([disabled]:hover) .root {
215
+ :host([disabled]:hover) .base {
192
216
  background-color: var(--vscode-button-background, #0078d4);
193
217
  }
194
218
 
195
- :host([secondary]:hover) .root {
219
+ :host([secondary]:hover) .base {
196
220
  background-color: var(--vscode-button-secondaryHoverBackground, #3c3c3c);
197
221
  }
198
222
 
199
- :host([secondary][disabled]:hover) .root {
223
+ :host([secondary][disabled]:hover) .base {
200
224
  background-color: var(--vscode-button-secondaryBackground, #313131);
201
225
  }
202
226
 
@@ -205,22 +229,22 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
205
229
  outline: none;
206
230
  }
207
231
 
208
- :host(:focus) .root {
232
+ :host(:focus) .base {
209
233
  background-color: var(--vscode-button-hoverBackground, #026ec1);
210
234
  outline: 1px solid var(--vscode-focusBorder, #0078d4);
211
235
  outline-offset: 2px;
212
236
  }
213
237
 
214
- :host([disabled]:focus) .root {
238
+ :host([disabled]:focus) .base {
215
239
  background-color: var(--vscode-button-background, #0078d4);
216
240
  outline: 0;
217
241
  }
218
242
 
219
- :host([secondary]:focus) .root {
243
+ :host([secondary]:focus) .base {
220
244
  background-color: var(--vscode-button-secondaryHoverBackground, #3c3c3c);
221
245
  }
222
246
 
223
- :host([secondary][disabled]:focus) .root {
247
+ :host([secondary][disabled]:focus) .base {
224
248
  background-color: var(--vscode-button-secondaryBackground, #313131);
225
249
  }
226
250
 
@@ -243,20 +267,17 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
243
267
  }
244
268
 
245
269
  .content {
246
- align-items: center;
247
- box-sizing: border-box;
248
270
  display: flex;
249
- justify-content: center;
250
271
  position: relative;
251
272
  width: 100%;
252
273
  height: 100%;
253
274
  padding: 1px 13px;
254
275
  }
255
276
 
256
- :host(:empty) .content,
257
- :host([icon-only]) .content {
277
+ :host(:empty) .base,
278
+ .base.icon-only {
258
279
  min-height: 24px;
259
- min-width: 16px;
280
+ min-width: 26px;
260
281
  padding: 1px 4px;
261
282
  }
262
283
 
@@ -266,6 +287,14 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
266
287
  height: 100%;
267
288
  }
268
289
 
290
+ .has-content-before slot[name='content-before'] {
291
+ margin-right: 4px;
292
+ }
293
+
294
+ .has-content-after slot[name='content-after'] {
295
+ margin-left: 4px;
296
+ }
297
+
269
298
  .icon,
270
299
  .icon-after {
271
300
  color: inherit;
@@ -280,43 +309,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
280
309
  :host([icon]) .icon-after {
281
310
  margin-left: 3px;
282
311
  }
283
-
284
- .divider {
285
- display: var(--vsc-divider-display, none);
286
- background-color: transparent;
287
- padding: 4px 0;
288
- box-sizing: border-box;
289
- }
290
-
291
- :host(:hover) .divider,
292
- :host(:focus) .divider {
293
- background-color: var(--vscode-button-hoverBackground, #026ec1);
294
- }
295
-
296
- :host([secondary]) .divider {
297
- background-color: var(--vscode-button-secondaryBackground, #313131);
298
- }
299
-
300
- :host([secondary]:hover) .divider,
301
- :host([secondary]:focus) .divider {
302
- background-color: var(--vscode-button-secondaryHoverBackground, #3c3c3c);
303
- }
304
-
305
- .divider > div {
306
- background-color: var(
307
- --vscode-button-separator,
308
- rgba(255, 255, 255, 0.4)
309
- );
310
- height: 100%;
311
- width: 1px;
312
- margin: 0;
313
- }
314
-
315
- :host([secondary]) .divider > div {
316
- background-color: var(--vscode-button-secondaryForeground, #cccccc);
317
- opacity: 0.4;
318
- }
319
- `];var Rt=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Lt=class extends yt{get form(){return this._internals.form}constructor(){super(),this.autofocus=!1,this.tabIndex=0,this.secondary=!1,this.role="button",this.disabled=!1,this.icon="",this.iconSpin=!1,this.iconAfter="",this.iconAfterSpin=!1,this.focused=!1,this.name=void 0,this.iconOnly=!1,this.type="button",this.value="",this._prevTabindex=0,this._handleFocus=()=>{this.focused=!0},this._handleBlur=()=>{this.focused=!1},this.addEventListener("keydown",this._handleKeyDown.bind(this)),this.addEventListener("click",this._handleClick.bind(this)),this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.autofocus&&(this.tabIndex<0&&(this.tabIndex=0),this.updateComplete.then((()=>{this.focus(),this.requestUpdate()}))),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}update(t){super.update(t),t.has("value")&&this._internals.setFormValue(this.value),t.has("disabled")&&(this.disabled?(this._prevTabindex=this.tabIndex,this.tabIndex=-1):this.tabIndex=this._prevTabindex)}_executeAction(){"submit"===this.type&&this._internals.form&&this._internals.form.requestSubmit(),"reset"===this.type&&this._internals.form&&this._internals.form.reset()}_handleKeyDown(t){if(("Enter"===t.key||" "===t.key)&&!this.hasAttribute("disabled")){const t=new MouseEvent("click",{bubbles:!0,cancelable:!0});t.synthetic=!0,this.dispatchEvent(t),this._executeAction()}}_handleClick(t){t.synthetic||this.hasAttribute("disabled")||this._executeAction()}render(){const t=""!==this.icon,e=""!==this.iconAfter,i={content:!0,"has-icon-before":t,"has-icon-after":e,"icon-only":this.iconOnly},s=t?U`<vscode-icon
312
+ `];var Rt=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Lt=class extends yt{get form(){return this._internals.form}constructor(){super(),this.autofocus=!1,this.tabIndex=0,this.secondary=!1,this.role="button",this.disabled=!1,this.icon="",this.iconSpin=!1,this.iconAfter="",this.iconAfterSpin=!1,this.focused=!1,this.name=void 0,this.iconOnly=!1,this.type="button",this.value="",this._prevTabindex=0,this._hasContentBefore=!1,this._hasContentAfter=!1,this._handleFocus=()=>{this.focused=!0},this._handleBlur=()=>{this.focused=!1},this.addEventListener("keydown",this._handleKeyDown.bind(this)),this.addEventListener("click",this._handleClick.bind(this)),this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.autofocus&&(this.tabIndex<0&&(this.tabIndex=0),this.updateComplete.then((()=>{this.focus(),this.requestUpdate()}))),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}update(t){super.update(t),t.has("value")&&this._internals.setFormValue(this.value),t.has("disabled")&&(this.disabled?(this._prevTabindex=this.tabIndex,this.tabIndex=-1):this.tabIndex=this._prevTabindex)}_executeAction(){"submit"===this.type&&this._internals.form&&this._internals.form.requestSubmit(),"reset"===this.type&&this._internals.form&&this._internals.form.reset()}_handleKeyDown(t){if(("Enter"===t.key||" "===t.key)&&!this.hasAttribute("disabled")){const t=new MouseEvent("click",{bubbles:!0,cancelable:!0});t.synthetic=!0,this.dispatchEvent(t),this._executeAction()}}_handleClick(t){t.synthetic||this.hasAttribute("disabled")||this._executeAction()}_handleSlotChange(t){const e=t.target;"content-before"===e.name&&(this._hasContentBefore=e.assignedElements().length>0),"content-after"===e.name&&(this._hasContentAfter=e.assignedElements().length>0)}render(){const t=""!==this.icon,e=""!==this.iconAfter,i={base:!0,"icon-only":this.iconOnly,"has-content-before":this._hasContentBefore,"has-content-after":this._hasContentAfter},s=t?U`<vscode-icon
320
313
  name=${this.icon}
321
314
  ?spin=${this.iconSpin}
322
315
  spin-duration=${Mt(this.iconSpinDuration)}
@@ -327,15 +320,18 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
327
320
  spin-duration=${Mt(this.iconAfterSpinDuration)}
328
321
  class="icon-after"
329
322
  ></vscode-icon>`:q;return U`
330
- <div class="root" part="base">
331
- <div class=${jt(i)}>
332
- ${s}
333
- <slot></slot>
334
- ${o}
335
- </div>
336
- <div class="divider"><div></div></div>
323
+ <div
324
+ class=${jt(i)}
325
+ part="base"
326
+ @slotchange=${this._handleSlotChange}
327
+ >
328
+ <slot name="content-before"></slot>
329
+ ${s}
330
+ <slot></slot>
331
+ ${o}
332
+ <slot name="content-after"></slot>
337
333
  </div>
338
- `}};Lt.styles=Tt,Lt.formAssociated=!0,Rt([pt({type:Boolean,reflect:!0})],Lt.prototype,"autofocus",void 0),Rt([pt({type:Number,reflect:!0})],Lt.prototype,"tabIndex",void 0),Rt([pt({type:Boolean,reflect:!0})],Lt.prototype,"secondary",void 0),Rt([pt({reflect:!0})],Lt.prototype,"role",void 0),Rt([pt({type:Boolean,reflect:!0})],Lt.prototype,"disabled",void 0),Rt([pt()],Lt.prototype,"icon",void 0),Rt([pt({type:Boolean,reflect:!0,attribute:"icon-spin"})],Lt.prototype,"iconSpin",void 0),Rt([pt({type:Number,reflect:!0,attribute:"icon-spin-duration"})],Lt.prototype,"iconSpinDuration",void 0),Rt([pt({attribute:"icon-after"})],Lt.prototype,"iconAfter",void 0),Rt([pt({type:Boolean,reflect:!0,attribute:"icon-after-spin"})],Lt.prototype,"iconAfterSpin",void 0),Rt([pt({type:Number,reflect:!0,attribute:"icon-after-spin-duration"})],Lt.prototype,"iconAfterSpinDuration",void 0),Rt([pt({type:Boolean,reflect:!0})],Lt.prototype,"focused",void 0),Rt([pt({type:String,reflect:!0})],Lt.prototype,"name",void 0),Rt([pt({type:Boolean,reflect:!0,attribute:"icon-only"})],Lt.prototype,"iconOnly",void 0),Rt([pt({reflect:!0})],Lt.prototype,"type",void 0),Rt([pt()],Lt.prototype,"value",void 0),Lt=Rt([kt("vscode-button")],Lt);const Ut=[$t,n`
334
+ `}};Lt.styles=Tt,Lt.formAssociated=!0,Rt([pt({type:Boolean,reflect:!0})],Lt.prototype,"autofocus",void 0),Rt([pt({type:Number,reflect:!0})],Lt.prototype,"tabIndex",void 0),Rt([pt({type:Boolean,reflect:!0})],Lt.prototype,"secondary",void 0),Rt([pt({reflect:!0})],Lt.prototype,"role",void 0),Rt([pt({type:Boolean,reflect:!0})],Lt.prototype,"disabled",void 0),Rt([pt()],Lt.prototype,"icon",void 0),Rt([pt({type:Boolean,reflect:!0,attribute:"icon-spin"})],Lt.prototype,"iconSpin",void 0),Rt([pt({type:Number,reflect:!0,attribute:"icon-spin-duration"})],Lt.prototype,"iconSpinDuration",void 0),Rt([pt({attribute:"icon-after"})],Lt.prototype,"iconAfter",void 0),Rt([pt({type:Boolean,reflect:!0,attribute:"icon-after-spin"})],Lt.prototype,"iconAfterSpin",void 0),Rt([pt({type:Number,reflect:!0,attribute:"icon-after-spin-duration"})],Lt.prototype,"iconAfterSpinDuration",void 0),Rt([pt({type:Boolean,reflect:!0})],Lt.prototype,"focused",void 0),Rt([pt({type:String,reflect:!0})],Lt.prototype,"name",void 0),Rt([pt({type:Boolean,reflect:!0,attribute:"icon-only"})],Lt.prototype,"iconOnly",void 0),Rt([pt({reflect:!0})],Lt.prototype,"type",void 0),Rt([pt()],Lt.prototype,"value",void 0),Rt([vt()],Lt.prototype,"_hasContentBefore",void 0),Rt([vt()],Lt.prototype,"_hasContentAfter",void 0),Lt=Rt([kt("vscode-button")],Lt);const Ut=[$t,n`
339
335
  :host {
340
336
  display: inline-block;
341
337
  }
@@ -354,6 +350,8 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
354
350
 
355
351
  ::slotted(vscode-button:not(:last-child)) {
356
352
  --vsc-divider-display: block;
353
+ --vsc-base-additional-right-padding: 1px;
354
+ --vsc-base-after-content: '';
357
355
  --vsc-border-right-width: 0;
358
356
  --vsc-border-right-radius: 0;
359
357
  --vsc-border-right-width: 0;
@@ -476,7 +474,78 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
476
474
  outline: 1px solid var(--vscode-focusBorder, #0078d4);
477
475
  outline-offset: -1px;
478
476
  }
479
- `];var Zt=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Qt=class extends(Jt(Wt)){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 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.value="",this.disabled=!1,this.indeterminate=!1,this._required=!1,this.type="checkbox",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}))}_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=jt({icon:!0,checked:this.checked,indeterminate:this.indeterminate}),e=jt({"label-inner":!0}),i=U`<svg
477
+
478
+ /* Toggle appearance */
479
+ :host([toggle]) .icon {
480
+ /* Track */
481
+ width: 36px;
482
+ height: 20px;
483
+ border-radius: 999px;
484
+ background-color: var(--vscode-button-secondaryBackground, #313131);
485
+ border-color: var(--vscode-button-border, transparent);
486
+ justify-content: flex-start;
487
+ position: absolute;
488
+ }
489
+
490
+ :host(:focus):host([toggle]):host(:not([disabled])) .icon {
491
+ outline-offset: 2px;
492
+ }
493
+
494
+ /* Reserve space for the wider toggle track so text doesn't overlap */
495
+ :host([toggle]) .label-inner {
496
+ padding-left: 45px; /* 36px track + 9px spacing */
497
+ }
498
+
499
+ :host([toggle]) .label {
500
+ min-height: 20px;
501
+ }
502
+
503
+ :host([toggle]) .wrapper {
504
+ min-height: 20px;
505
+ line-height: 20px;
506
+ }
507
+
508
+ :host([toggle]) .thumb {
509
+ /* Thumb */
510
+ box-sizing: border-box;
511
+ display: block;
512
+ width: 16px;
513
+ height: 16px;
514
+ border-radius: 50%;
515
+ background-color: var(--vscode-button-secondaryForeground, #cccccc);
516
+ margin-left: 1px;
517
+ transition: transform 120ms ease-in-out;
518
+ }
519
+
520
+ :host([toggle][checked]) .icon {
521
+ background-color: var(--vscode-button-background, #04395e);
522
+ border-color: var(--vscode-button-border, transparent);
523
+ }
524
+
525
+ :host([toggle][checked]) .thumb {
526
+ transform: translateX(16px);
527
+ background-color: var(--vscode-button-foreground, #ffffff);
528
+ }
529
+
530
+ :host([toggle]):host(:invalid) .icon {
531
+ background-color: var(--vscode-inputValidation-errorBackground, #5a1d1d);
532
+ border-color: var(--vscode-inputValidation-errorBorder, #be1100);
533
+ }
534
+
535
+ :host([toggle]):host(:invalid) .thumb {
536
+ background-color: var(--vscode-inputValidation-errorBorder, #be1100);
537
+ }
538
+
539
+ :host([toggle]) .check-icon,
540
+ :host([toggle]) .indeterminate-icon {
541
+ display: none;
542
+ }
543
+
544
+ :host([toggle]:focus):host(:not([disabled])) .icon {
545
+ outline: 1px solid var(--vscode-focusBorder, #0078d4);
546
+ outline-offset: -1px;
547
+ }
548
+ `];var Zt=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Qt=class extends(Jt(Wt)){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 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.toggle=!1,this.value="",this.disabled=!1,this.indeterminate=!1,this._required=!1,this.type="checkbox",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)}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}))}_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=jt({icon:!0,checked:this.checked,indeterminate:this.indeterminate}),e=jt({"label-inner":!0}),i=U`<svg
480
549
  width="16"
481
550
  height="16"
482
551
  viewBox="0 0 16 16"
@@ -489,7 +558,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
489
558
  clip-rule="evenodd"
490
559
  d="M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z"
491
560
  />
492
- </svg>`,s=this.checked&&!this.indeterminate?i:q,o=this.indeterminate?U`<span class="indeterminate-icon"></span>`:q;return U`
561
+ </svg>`,s=this.checked&&!this.indeterminate?i:q,o=this.indeterminate?U`<span class="indeterminate-icon"></span>`:q,r=this.toggle?U`<span class="thumb"></span>`:U`${o}${s}`;return U`
493
562
  <div class="wrapper">
494
563
  <input
495
564
  ?autofocus=${this.autofocus}
@@ -497,9 +566,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
497
566
  class="checkbox"
498
567
  type="checkbox"
499
568
  ?checked=${this.checked}
569
+ role=${Mt(this.toggle?"switch":void 0)}
570
+ aria-checked=${Mt(this.toggle?this.checked?"true":"false":void 0)}
500
571
  value=${this.value}
501
572
  >
502
- <div class=${t}>${o}${s}</div>
573
+ <div class=${t}>${r}</div>
503
574
  <label for="input" class="label" @click=${this._handleClick}>
504
575
  <span class=${e}>
505
576
  ${this._renderLabelAttribute()}
@@ -507,7 +578,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
507
578
  </span>
508
579
  </label>
509
580
  </div>
510
- `}};Qt.styles=Xt,Qt.formAssociated=!0,Qt.shadowRootOptions={...at.shadowRootOptions,delegatesFocus:!0},Zt([pt({type:Boolean,reflect:!0})],Qt.prototype,"autofocus",void 0),Zt([pt({type:Boolean,reflect:!0})],Qt.prototype,"checked",null),Zt([pt({type:Boolean,reflect:!0,attribute:"default-checked"})],Qt.prototype,"defaultChecked",void 0),Zt([pt({type:Boolean,reflect:!0})],Qt.prototype,"invalid",void 0),Zt([pt({reflect:!0})],Qt.prototype,"name",void 0),Zt([pt()],Qt.prototype,"value",void 0),Zt([pt({type:Boolean,reflect:!0})],Qt.prototype,"disabled",void 0),Zt([pt({type:Boolean,reflect:!0})],Qt.prototype,"indeterminate",void 0),Zt([pt({type:Boolean,reflect:!0})],Qt.prototype,"required",null),Zt([pt()],Qt.prototype,"type",void 0),Zt([ft("#input")],Qt.prototype,"_inputEl",void 0),Qt=Zt([kt("vscode-checkbox")],Qt);const te=[$t,n`
581
+ `}};Qt.styles=Xt,Qt.formAssociated=!0,Qt.shadowRootOptions={...at.shadowRootOptions,delegatesFocus:!0},Zt([pt({type:Boolean,reflect:!0})],Qt.prototype,"autofocus",void 0),Zt([pt({type:Boolean,reflect:!0})],Qt.prototype,"checked",null),Zt([pt({type:Boolean,reflect:!0,attribute:"default-checked"})],Qt.prototype,"defaultChecked",void 0),Zt([pt({type:Boolean,reflect:!0})],Qt.prototype,"invalid",void 0),Zt([pt({reflect:!0})],Qt.prototype,"name",void 0),Zt([pt({type:Boolean,reflect:!0})],Qt.prototype,"toggle",void 0),Zt([pt()],Qt.prototype,"value",void 0),Zt([pt({type:Boolean,reflect:!0})],Qt.prototype,"disabled",void 0),Zt([pt({type:Boolean,reflect:!0})],Qt.prototype,"indeterminate",void 0),Zt([pt({type:Boolean,reflect:!0})],Qt.prototype,"required",null),Zt([pt()],Qt.prototype,"type",void 0),Zt([ft("#input")],Qt.prototype,"_inputEl",void 0),Qt=Zt([kt("vscode-checkbox")],Qt);const te=[$t,n`
511
582
  :host {
512
583
  display: block;
513
584
  }
@@ -940,13 +1011,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
940
1011
  color: var(--vscode-foreground, #cccccc);
941
1012
  opacity: 0.9;
942
1013
  }
943
- `];var ze=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Ae=class extends yt{constructor(){super(...arguments),this.required=!1,this._id="",this._htmlFor="",this._connected=!1}set htmlFor(t){this._htmlFor=t,this.setAttribute("for",t),this._connected&&this._connectWithTarget()}get htmlFor(){return this._htmlFor}set id(t){this._id=t}get id(){return this._id}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i)}connectedCallback(){super.connectedCallback(),this._connected=!0,""===this._id&&(this._id=Ce("vscode-label-"),this.setAttribute("id",this._id)),this._connectWithTarget()}_getTarget(){let t=null;if(this._htmlFor){const e=this.getRootNode({composed:!1});e&&(t=e.querySelector(`#${this._htmlFor}`))}return t}async _connectWithTarget(){await this.updateComplete;const t=this._getTarget();["vscode-radio-group","vscode-checkbox-group"].includes(t?.tagName.toLowerCase()??"")&&t.setAttribute("aria-labelledby",this._id);let e="";this.textContent&&(e=this.textContent.trim()),t&&"label"in t&&["vscode-textfield","vscode-textarea","vscode-single-select","vscode-multi-select"].includes(t?.tagName.toLowerCase()??"")&&(t.label=e)}_handleClick(){const t=this._getTarget();t&&"focus"in t&&t.focus()}render(){return U`
1014
+ `];var Ae=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let ze=class extends yt{constructor(){super(...arguments),this.required=!1,this._id="",this._htmlFor="",this._connected=!1}set htmlFor(t){this._htmlFor=t,this.setAttribute("for",t),this._connected&&this._connectWithTarget()}get htmlFor(){return this._htmlFor}set id(t){this._id=t}get id(){return this._id}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i)}connectedCallback(){super.connectedCallback(),this._connected=!0,""===this._id&&(this._id=Ce("vscode-label-"),this.setAttribute("id",this._id)),this._connectWithTarget()}_getTarget(){let t=null;if(this._htmlFor){const e=this.getRootNode({composed:!1});e&&(t=e.querySelector(`#${this._htmlFor}`))}return t}async _connectWithTarget(){await this.updateComplete;const t=this._getTarget();["vscode-radio-group","vscode-checkbox-group"].includes(t?.tagName.toLowerCase()??"")&&t.setAttribute("aria-labelledby",this._id);let e="";this.textContent&&(e=this.textContent.trim()),t&&"label"in t&&["vscode-textfield","vscode-textarea","vscode-single-select","vscode-multi-select"].includes(t?.tagName.toLowerCase()??"")&&(t.label=e)}_handleClick(){const t=this._getTarget();t&&"focus"in t&&t.focus()}render(){return U`
944
1015
  <label
945
1016
  class=${jt({wrapper:!0,required:this.required})}
946
1017
  @click=${this._handleClick}
947
1018
  ><slot></slot
948
1019
  ></label>
949
- `}};Ae.styles=Oe,ze([pt({reflect:!0,attribute:"for"})],Ae.prototype,"htmlFor",null),ze([pt()],Ae.prototype,"id",null),ze([pt({type:Boolean,reflect:!0})],Ae.prototype,"required",void 0),Ae=ze([kt("vscode-label")],Ae);const Ee=U`
1020
+ `}};ze.styles=Oe,Ae([pt({reflect:!0,attribute:"for"})],ze.prototype,"htmlFor",null),Ae([pt()],ze.prototype,"id",null),Ae([pt({type:Boolean,reflect:!0})],ze.prototype,"required",void 0),ze=Ae([kt("vscode-label")],ze);const Ee=U`
950
1021
  <span class="icon">
951
1022
  <svg
952
1023
  width="16"
@@ -974,7 +1045,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
974
1045
  clip-rule="evenodd"
975
1046
  d="M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z"
976
1047
  />
977
- </svg>`,{I:je}=rt,Me=()=>document.createComment(""),Pe=(t,e,i)=>{const s=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Me(),o),r=s.insertBefore(Me(),o);i=new je(e,r,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,n=r!==t;if(n){let e;i._$AQ?.(t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==o||n){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,o),t=e}}}return i},De=(t,e,i=t)=>(t._$AI(e,i),t),Fe={},Ve=t=>{t._$AP?.(!1,!0);let e=t._$AA;const i=t._$AB.nextSibling;for(;e!==i;){const t=e.nextSibling;e.remove(),e=t}},Ne=(t,e,i)=>{const s=new Map;for(let o=e;o<=i;o++)s.set(t[o],o);return s},Te=Et(class extends It{constructor(t){if(super(t),t.type!==zt)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let s;void 0===i?i=e:void 0!==e&&(s=e);const o=[],r=[];let n=0;for(const e of t)o[n]=s?s(e,n):n,r[n]=i(e,n),n++;return{values:r,keys:o}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,s]){const o=(t=>t._$AH)(t),{values:r,keys:n}=this.dt(e,i,s);if(!Array.isArray(o))return this.ut=n,r;const l=this.ut??=[],h=[];let a,c,d=0,u=o.length-1,p=0,v=r.length-1;for(;d<=u&&p<=v;)if(null===o[d])d++;else if(null===o[u])u--;else if(l[d]===n[p])h[p]=De(o[d],r[p]),d++,p++;else if(l[u]===n[v])h[v]=De(o[u],r[v]),u--,v--;else if(l[d]===n[v])h[v]=De(o[d],r[v]),Pe(t,h[v+1],o[d]),d++,v--;else if(l[u]===n[p])h[p]=De(o[u],r[p]),Pe(t,o[d],o[u]),u--,p++;else if(void 0===a&&(a=Ne(n,p,v),c=Ne(l,d,u)),a.has(l[d]))if(a.has(l[u])){const e=c.get(n[p]),i=void 0!==e?o[e]:null;if(null===i){const e=Pe(t,o[d]);De(e,r[p]),h[p]=e}else h[p]=De(i,r[p]),Pe(t,o[d],i),o[e]=null;p++}else Ve(o[u]),u--;else Ve(o[d]),d++;for(;p<=v;){const e=Pe(t,h[v+1]);De(e,r[p]),h[p++]=e}for(;d<=u;){const t=o[d++];null!==t&&Ve(t)}return this.ut=n,((t,e=Fe)=>{t._$AH=e})(t,h),H}});var Re=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Le=class extends yt{constructor(){super(...arguments),this.description="",this.selected=!1,this.disabled=!1,this._initialized=!1,this._handleSlotChange=()=>{this._initialized&&this.dispatchEvent(new Event("vsc-option-state-change",{bubbles:!0}))}}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._initialized=!0}))}willUpdate(t){this._initialized&&(t.has("description")||t.has("value")||t.has("selected")||t.has("disabled"))&&this.dispatchEvent(new Event("vsc-option-state-change",{bubbles:!0}))}render(){return U`<slot @slotchange=${this._handleSlotChange}></slot>`}};Le.styles=$t,Re([pt({type:String})],Le.prototype,"value",void 0),Re([pt({type:String})],Le.prototype,"description",void 0),Re([pt({type:Boolean,reflect:!0})],Le.prototype,"selected",void 0),Re([pt({type:Boolean,reflect:!0})],Le.prototype,"disabled",void 0),Le=Re([kt("vscode-option")],Le);const Ue=(t,e)=>{const i={match:!1,ranges:[]},s=t.toLowerCase(),o=e.toLowerCase(),r=s.split(" ");let n=0;return r.forEach(((e,s)=>{if(s>0&&(n+=r[s-1].length+1),i.match)return;const l=e.indexOf(o),h=o.length;0===l&&(i.match=!0,i.ranges.push([n+l,Math.min(n+l+h,t.length)]))})),i},Ge=(t,e)=>{const i={match:!1,ranges:[]};return 0===t.toLowerCase().indexOf(e.toLowerCase())&&(i.match=!0,i.ranges=[[0,e.length]]),i},He=(t,e)=>{const i={match:!1,ranges:[]},s=t.toLowerCase().indexOf(e.toLowerCase());return s>-1&&(i.match=!0,i.ranges=[[s,s+e.length]]),i},qe=(t,e)=>{const i={match:!1,ranges:[]};let s=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],s),-1===o)return{match:!1,ranges:[]};i.match=!0,i.ranges.push([o,o+1]),s=o+1}return i},We=t=>{const e=[];return" "===t?(e.push(U`&nbsp;`),e):(0===t.indexOf(" ")&&e.push(U`&nbsp;`),e.push(U`${t.trimStart().trimEnd()}`),t.lastIndexOf(" ")===t.length-1&&e.push(U`&nbsp;`),e)};class Ke{constructor(t){this._activeIndex=-1,this._options=[],this._filterPattern="",this._filterMethod="fuzzy",this._combobox=!1,this._indexByValue=new Map,this._indexByLabel=new Map,this._selectedIndex=-1,this._selectedIndexes=new Set,this._multiSelect=!1,this._numOfVisibleOptions=0,(this._host=t).addController(this)}hostConnected(){}get activeIndex(){return this._activeIndex}set activeIndex(t){this._activeIndex=t,this._host.requestUpdate()}get relativeActiveIndex(){return this._options[this._activeIndex]?.filteredIndex??-1}set comboboxMode(t){this._combobox=t,this._host.requestUpdate()}get comboboxMode(){return this._combobox}get multiSelect(){return this._multiSelect}set multiSelect(t){this._selectedIndex=-1,this._selectedIndexes.clear(),this._multiSelect=t,this._host.requestUpdate()}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){-1!==this._selectedIndex&&(this._options[this._selectedIndex].selected??=!1);const e=this.getOptionByIndex(t);this._selectedIndex=e?t:-1,this._host.requestUpdate()}get selectedIndexes(){return Array.from(this._selectedIndexes)}set selectedIndexes(t){this._selectedIndexes.forEach((t=>{this._options[t].selected=!1})),this._selectedIndexes=new Set(t),t.forEach((t=>{void 0!==this._options[t]&&(this._options[t].selected=!0)})),this._host.requestUpdate()}set value(t){if(this._multiSelect){const e=t.map((t=>this._indexByValue.get(t))).filter((t=>void 0!==t));this._selectedIndexes=new Set(e)}else this._selectedIndex=this._indexByValue.get(t)??-1;this._host.requestUpdate()}get value(){return this._multiSelect?this._selectedIndexes.size>0?Array.from(this._selectedIndexes).map((t=>this._options[t].value)):[]:this._selectedIndex>-1?this._options[this._selectedIndex].value:""}set multiSelectValue(t){const e=t.map((t=>this._indexByValue.get(t))).filter((t=>void 0!==t));this._selectedIndexes=new Set(e)}get multiSelectValue(){return this._selectedIndexes.size>0?Array.from(this._selectedIndexes).map((t=>this._options[t].value)):[]}get filterPattern(){return this._filterPattern}set filterPattern(t){t!==this._filterPattern&&(this._filterPattern=t,this._updateState())}get filterMethod(){return this._filterMethod}set filterMethod(t){t!==this._filterMethod&&(this._filterMethod=t,this._updateState())}get options(){return this._options}get numOfVisibleOptions(){return this._numOfVisibleOptions}get numOptions(){return this._options.length}populate(t){this._indexByValue.clear(),this._indexByLabel.clear(),this._options=t.map(((t,e)=>(this._indexByValue.set(t.value??"",e),this._indexByLabel.set(t.label??"",e),{description:t.description??"",disabled:t.disabled??!1,label:t.label??"",selected:t.selected??!1,value:t.value??"",index:e,filteredIndex:e,ranges:[],visible:!0}))),this._numOfVisibleOptions=this._options.length}add(t){const e=this._options.length,{description:i,disabled:s,label:o,selected:r,value:n}=t;let l=!0,h=[];if(this._combobox&&""!==this._filterPattern){const t=this._searchByPattern(o??"");l=t.match,h=t.ranges}this._indexByValue.set(n??"",e),this._indexByLabel.set(o??"",e),r&&(this._selectedIndex=e,this._selectedIndexes.add(e),this._activeIndex=e),this._options.push({index:e,filteredIndex:e,description:i??"",disabled:s??!1,label:o??"",selected:r??!1,value:n??"",visible:l,ranges:h}),l&&(this._numOfVisibleOptions+=1)}clear(){this._options=[],this._indexByValue.clear(),this._indexByLabel.clear(),this._numOfVisibleOptions=0}getIsIndexSelected(t){return this._multiSelect?this._selectedIndexes.has(t):this._selectedIndex===t}expandMultiSelection(t){t.forEach((t=>{const e=this._indexByValue.get(t)??-1;-1!==e&&this._selectedIndexes.add(e)})),this._host.requestUpdate()}toggleActiveMultiselectOption(){const t=this._options[this._activeIndex]??null;if(!t)return;this._selectedIndexes.has(t.index)?this._selectedIndexes.delete(t.index):this._selectedIndexes.add(t.index),this._host.requestUpdate()}toggleOptionSelected(t){const e=this._selectedIndexes.has(t);this._options[t].selected=!this._options[t].selected,e?this._selectedIndexes.delete(t):this._selectedIndexes.add(t),this._host.requestUpdate()}getActiveOption(){return this._options[this._activeIndex]??null}getSelectedOption(){return this._options[this._selectedIndex]??null}getOptionByIndex(t){return this._options[t]??null}findOptionIndex(t){return this._indexByValue.get(t)??-1}getOptionByValue(t,e=!1){const i=this._indexByValue.get(t)??-1;return-1===i?null:e||this._options[i].visible?this._options[i]:null}getOptionByLabel(t){const e=this._indexByLabel.get(t)??-1;return-1===e?null:this._options[e]}next(t){let e=-1;for(let i=(t??this._activeIndex)+1;i<this._options.length;i++)if(this._options[i]&&!this._options[i].disabled&&this._options[i].visible){e=i;break}return e>-1?this._options[e]:null}prev(t){let e=-1;for(let i=(t??this._activeIndex)-1;i>=0;i--)if(this._options[i]&&!this._options[i].disabled&&this._options[i].visible){e=i;break}return e>-1?this._options[e]:null}activateDefault(){if(this._multiSelect){if(this._selectedIndexes.size>0){const t=this._selectedIndexes.values().next();this._activeIndex=t.value?t.value:0}}else this._selectedIndex>-1?this._activeIndex=this._selectedIndex:this._activeIndex=0;this._host.requestUpdate()}selectAll(){this._multiSelect&&(this._options.forEach(((t,e)=>{this._options[e].selected=!0,this._selectedIndexes.add(e)})),this._host.requestUpdate())}selectNone(){this._multiSelect&&(this._options.forEach(((t,e)=>{this._options[e].selected=!1})),this._selectedIndexes.clear(),this._host.requestUpdate())}_searchByPattern(t){let e;switch(this._filterMethod){case"startsWithPerTerm":e=Ue(t,this._filterPattern);break;case"startsWith":e=Ge(t,this._filterPattern);break;case"contains":e=He(t,this._filterPattern);break;default:e=qe(t,this._filterPattern)}return e}_updateState(){if(this._combobox&&""!==this._filterPattern){let t=-1;this._numOfVisibleOptions=0,this._options.forEach((({label:e},i)=>{const s=this._searchByPattern(e);this._options[i].visible=s.match,this._options[i].ranges=s.ranges,this._options[i].filteredIndex=s.match?++t:-1,s.match&&(this._numOfVisibleOptions+=1)}))}else this._options.forEach(((t,e)=>{this._options[e].visible=!0,this._options[e].ranges=[]})),this._numOfVisibleOptions=this._options.length;this._host.requestUpdate()}}const Je=[$t,n`
1048
+ </svg>`,{I:je}=rt,Me=()=>document.createComment(""),Pe=(t,e,i)=>{const s=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Me(),o),r=s.insertBefore(Me(),o);i=new je(e,r,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,n=r!==t;if(n){let e;i._$AQ?.(t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==o||n){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,o),t=e}}}return i},De=(t,e,i=t)=>(t._$AI(e,i),t),Fe={},Ve=t=>{t._$AP?.(!1,!0);let e=t._$AA;const i=t._$AB.nextSibling;for(;e!==i;){const t=e.nextSibling;e.remove(),e=t}},Ne=(t,e,i)=>{const s=new Map;for(let o=e;o<=i;o++)s.set(t[o],o);return s},Te=Et(class extends It{constructor(t){if(super(t),t.type!==At)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let s;void 0===i?i=e:void 0!==e&&(s=e);const o=[],r=[];let n=0;for(const e of t)o[n]=s?s(e,n):n,r[n]=i(e,n),n++;return{values:r,keys:o}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,s]){const o=(t=>t._$AH)(t),{values:r,keys:n}=this.dt(e,i,s);if(!Array.isArray(o))return this.ut=n,r;const l=this.ut??=[],h=[];let a,c,d=0,u=o.length-1,p=0,v=r.length-1;for(;d<=u&&p<=v;)if(null===o[d])d++;else if(null===o[u])u--;else if(l[d]===n[p])h[p]=De(o[d],r[p]),d++,p++;else if(l[u]===n[v])h[v]=De(o[u],r[v]),u--,v--;else if(l[d]===n[v])h[v]=De(o[d],r[v]),Pe(t,h[v+1],o[d]),d++,v--;else if(l[u]===n[p])h[p]=De(o[u],r[p]),Pe(t,o[d],o[u]),u--,p++;else if(void 0===a&&(a=Ne(n,p,v),c=Ne(l,d,u)),a.has(l[d]))if(a.has(l[u])){const e=c.get(n[p]),i=void 0!==e?o[e]:null;if(null===i){const e=Pe(t,o[d]);De(e,r[p]),h[p]=e}else h[p]=De(i,r[p]),Pe(t,o[d],i),o[e]=null;p++}else Ve(o[u]),u--;else Ve(o[d]),d++;for(;p<=v;){const e=Pe(t,h[v+1]);De(e,r[p]),h[p++]=e}for(;d<=u;){const t=o[d++];null!==t&&Ve(t)}return this.ut=n,((t,e=Fe)=>{t._$AH=e})(t,h),H}});var Re=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Le=class extends yt{constructor(){super(...arguments),this.description="",this.selected=!1,this.disabled=!1,this._initialized=!1,this._handleSlotChange=()=>{this._initialized&&this.dispatchEvent(new Event("vsc-option-state-change",{bubbles:!0}))}}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._initialized=!0}))}willUpdate(t){this._initialized&&(t.has("description")||t.has("value")||t.has("selected")||t.has("disabled"))&&this.dispatchEvent(new Event("vsc-option-state-change",{bubbles:!0}))}render(){return U`<slot @slotchange=${this._handleSlotChange}></slot>`}};Le.styles=$t,Re([pt({type:String})],Le.prototype,"value",void 0),Re([pt({type:String})],Le.prototype,"description",void 0),Re([pt({type:Boolean,reflect:!0})],Le.prototype,"selected",void 0),Re([pt({type:Boolean,reflect:!0})],Le.prototype,"disabled",void 0),Le=Re([kt("vscode-option")],Le);const Ue=(t,e)=>{const i={match:!1,ranges:[]},s=t.toLowerCase(),o=e.toLowerCase(),r=s.split(" ");let n=0;return r.forEach(((e,s)=>{if(s>0&&(n+=r[s-1].length+1),i.match)return;const l=e.indexOf(o),h=o.length;0===l&&(i.match=!0,i.ranges.push([n+l,Math.min(n+l+h,t.length)]))})),i},Ge=(t,e)=>{const i={match:!1,ranges:[]};return 0===t.toLowerCase().indexOf(e.toLowerCase())&&(i.match=!0,i.ranges=[[0,e.length]]),i},He=(t,e)=>{const i={match:!1,ranges:[]},s=t.toLowerCase().indexOf(e.toLowerCase());return s>-1&&(i.match=!0,i.ranges=[[s,s+e.length]]),i},qe=(t,e)=>{const i={match:!1,ranges:[]};let s=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],s),-1===o)return{match:!1,ranges:[]};i.match=!0,i.ranges.push([o,o+1]),s=o+1}return i},We=t=>{const e=[];return" "===t?(e.push(U`&nbsp;`),e):(0===t.indexOf(" ")&&e.push(U`&nbsp;`),e.push(U`${t.trimStart().trimEnd()}`),t.lastIndexOf(" ")===t.length-1&&e.push(U`&nbsp;`),e)};class Ke{constructor(t){this._activeIndex=-1,this._options=[],this._filterPattern="",this._filterMethod="fuzzy",this._combobox=!1,this._indexByValue=new Map,this._indexByLabel=new Map,this._selectedIndex=-1,this._selectedIndexes=new Set,this._multiSelect=!1,this._numOfVisibleOptions=0,(this._host=t).addController(this)}hostConnected(){}get activeIndex(){return this._activeIndex}set activeIndex(t){this._activeIndex=t,this._host.requestUpdate()}get relativeActiveIndex(){return this._options[this._activeIndex]?.filteredIndex??-1}set comboboxMode(t){this._combobox=t,this._host.requestUpdate()}get comboboxMode(){return this._combobox}get multiSelect(){return this._multiSelect}set multiSelect(t){this._selectedIndex=-1,this._selectedIndexes.clear(),this._multiSelect=t,this._host.requestUpdate()}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){-1!==this._selectedIndex&&(this._options[this._selectedIndex].selected??=!1);const e=this.getOptionByIndex(t);this._selectedIndex=e?t:-1,this._host.requestUpdate()}get selectedIndexes(){return Array.from(this._selectedIndexes)}set selectedIndexes(t){this._selectedIndexes.forEach((t=>{this._options[t].selected=!1})),this._selectedIndexes=new Set(t),t.forEach((t=>{void 0!==this._options[t]&&(this._options[t].selected=!0)})),this._host.requestUpdate()}set value(t){if(this._multiSelect){const e=t.map((t=>this._indexByValue.get(t))).filter((t=>void 0!==t));this._selectedIndexes=new Set(e)}else this._selectedIndex=this._indexByValue.get(t)??-1;this._host.requestUpdate()}get value(){return this._multiSelect?this._selectedIndexes.size>0?Array.from(this._selectedIndexes).map((t=>this._options[t].value)):[]:this._selectedIndex>-1?this._options[this._selectedIndex].value:""}set multiSelectValue(t){const e=t.map((t=>this._indexByValue.get(t))).filter((t=>void 0!==t));this._selectedIndexes=new Set(e)}get multiSelectValue(){return this._selectedIndexes.size>0?Array.from(this._selectedIndexes).map((t=>this._options[t].value)):[]}get filterPattern(){return this._filterPattern}set filterPattern(t){t!==this._filterPattern&&(this._filterPattern=t,this._updateState())}get filterMethod(){return this._filterMethod}set filterMethod(t){t!==this._filterMethod&&(this._filterMethod=t,this._updateState())}get options(){return this._options}get numOfVisibleOptions(){return this._numOfVisibleOptions}get numOptions(){return this._options.length}populate(t){this._indexByValue.clear(),this._indexByLabel.clear(),this._options=t.map(((t,e)=>(this._indexByValue.set(t.value??"",e),this._indexByLabel.set(t.label??"",e),{description:t.description??"",disabled:t.disabled??!1,label:t.label??"",selected:t.selected??!1,value:t.value??"",index:e,filteredIndex:e,ranges:[],visible:!0}))),this._numOfVisibleOptions=this._options.length}add(t){const e=this._options.length,{description:i,disabled:s,label:o,selected:r,value:n}=t;let l=!0,h=[];if(this._combobox&&""!==this._filterPattern){const t=this._searchByPattern(o??"");l=t.match,h=t.ranges}this._indexByValue.set(n??"",e),this._indexByLabel.set(o??"",e),r&&(this._selectedIndex=e,this._selectedIndexes.add(e),this._activeIndex=e),this._options.push({index:e,filteredIndex:e,description:i??"",disabled:s??!1,label:o??"",selected:r??!1,value:n??"",visible:l,ranges:h}),l&&(this._numOfVisibleOptions+=1)}clear(){this._options=[],this._indexByValue.clear(),this._indexByLabel.clear(),this._numOfVisibleOptions=0}getIsIndexSelected(t){return this._multiSelect?this._selectedIndexes.has(t):this._selectedIndex===t}expandMultiSelection(t){t.forEach((t=>{const e=this._indexByValue.get(t)??-1;-1!==e&&this._selectedIndexes.add(e)})),this._host.requestUpdate()}toggleActiveMultiselectOption(){const t=this._options[this._activeIndex]??null;if(!t)return;this._selectedIndexes.has(t.index)?this._selectedIndexes.delete(t.index):this._selectedIndexes.add(t.index),this._host.requestUpdate()}toggleOptionSelected(t){const e=this._selectedIndexes.has(t);this._options[t].selected=!this._options[t].selected,e?this._selectedIndexes.delete(t):this._selectedIndexes.add(t),this._host.requestUpdate()}getActiveOption(){return this._options[this._activeIndex]??null}getSelectedOption(){return this._options[this._selectedIndex]??null}getOptionByIndex(t){return this._options[t]??null}findOptionIndex(t){return this._indexByValue.get(t)??-1}getOptionByValue(t,e=!1){const i=this._indexByValue.get(t)??-1;return-1===i?null:e||this._options[i].visible?this._options[i]:null}getOptionByLabel(t){const e=this._indexByLabel.get(t)??-1;return-1===e?null:this._options[e]}next(t){let e=-1;for(let i=(t??this._activeIndex)+1;i<this._options.length;i++)if(this._options[i]&&!this._options[i].disabled&&this._options[i].visible){e=i;break}return e>-1?this._options[e]:null}prev(t){let e=-1;for(let i=(t??this._activeIndex)-1;i>=0;i--)if(this._options[i]&&!this._options[i].disabled&&this._options[i].visible){e=i;break}return e>-1?this._options[e]:null}activateDefault(){if(this._multiSelect){if(this._selectedIndexes.size>0){const t=this._selectedIndexes.values().next();this._activeIndex=t.value?t.value:0}}else this._selectedIndex>-1?this._activeIndex=this._selectedIndex:this._activeIndex=0;this._host.requestUpdate()}selectAll(){this._multiSelect&&(this._options.forEach(((t,e)=>{this._options[e].selected=!0,this._selectedIndexes.add(e)})),this._host.requestUpdate())}selectNone(){this._multiSelect&&(this._options.forEach(((t,e)=>{this._options[e].selected=!1})),this._selectedIndexes.clear(),this._host.requestUpdate())}_searchByPattern(t){let e;switch(this._filterMethod){case"startsWithPerTerm":e=Ue(t,this._filterPattern);break;case"startsWith":e=Ge(t,this._filterPattern);break;case"contains":e=He(t,this._filterPattern);break;default:e=qe(t,this._filterPattern)}return e}_updateState(){if(this._combobox&&""!==this._filterPattern){let t=-1;this._numOfVisibleOptions=0,this._options.forEach((({label:e},i)=>{const s=this._searchByPattern(e);this._options[i].visible=s.match,this._options[i].ranges=s.ranges,this._options[i].filteredIndex=s.match?++t:-1,s.match&&(this._numOfVisibleOptions+=1)}))}else this._options.forEach(((t,e)=>{this._options[e].visible=!0,this._options[e].ranges=[]})),this._numOfVisibleOptions=this._options.length;this._host.requestUpdate()}}const Je=[$t,n`
978
1049
  :host {
979
1050
  display: block;
980
1051
  position: relative;
@@ -2108,7 +2179,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
2108
2179
  ::slotted(vscode-table-row:nth-child(odd)) {
2109
2180
  background-color: var(--vsc-row-odd-background);
2110
2181
  }
2111
- `];var zi=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Ai=class extends yt{constructor(){super(...arguments),this.role="rowgroup"}render(){return U` <slot></slot> `}};Ai.styles=Oi,zi([pt({reflect:!0})],Ai.prototype,"role",void 0),Ai=zi([kt("vscode-table-body")],Ai);const Ei=[$t,n`
2182
+ `];var Ai=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let zi=class extends yt{constructor(){super(...arguments),this.role="rowgroup"}render(){return U` <slot></slot> `}};zi.styles=Oi,Ai([pt({reflect:!0})],zi.prototype,"role",void 0),zi=Ai([kt("vscode-table-body")],zi);const Ei=[$t,n`
2112
2183
  :host {
2113
2184
  border-bottom-color: var(
2114
2185
  --vscode-editorGroup-border,
@@ -2872,9 +2943,9 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
2872
2943
  --internal-defaultIndentGuideDisplay: block;
2873
2944
  --internal-highlightedIndentGuideDisplay: block;
2874
2945
  }
2875
- `],gs="vscode-list",ms=Symbol("configContext"),xs=t=>t instanceof Element&&t.matches("vscode-tree-item"),ws=(t,e)=>{const i=e.length,s=(o=t)instanceof Element&&o.matches("vscode-tree")?-1:t.level;var o;"branch"in t&&(t.branch=i>0),e.forEach(((e,i)=>{e.path="path"in t?[...t.path,i]:[i],e.level=s+1,e.dataset.path=e.path.join(".")}))},ys=t=>{const e=t.lastElementChild;return e&&xs(e)?e.branch&&e.open?ys(e):e:t},ks=t=>{if(!t.parentElement)return null;if(!xs(t.parentElement))return null;const e=$s(t.parentElement);return e||ks(t.parentElement)},$s=t=>{let e=t.nextElementSibling;for(;e&&!xs(e);)e=e.nextElementSibling;return e};function _s(t){return t.parentElement&&xs(t.parentElement)?t.parentElement:null}var Ss=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const Bs="singleClick",Cs="doubleClick",Os="none",zs=[" ","ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter","Escape","Shift"];let As=class extends yt{constructor(){super(),this.expandMode="singleClick",this.hideArrows=!1,this.indent=8,this.indentGuides="onHover",this.multiSelect=!1,this._treeContextState={isShiftPressed:!1,activeItem:null,selectedItems:new Set,allItems:null,itemListUpToDate:!1,focusedItem:null,prevFocusedItem:null,hasBranchItem:!1,rootElement:this,highlightedItems:new Set,highlightIndentGuides:()=>{this._highlightIndentGuides()},emitSelectEvent:()=>{this._emitSelectEvent()}},this._configContext={hideArrows:this.hideArrows,expandMode:this.expandMode,indent:this.indent,indentGuides:this.indentGuides,multiSelect:this.multiSelect},this._handleComponentKeyDown=t=>{const e=t.key;switch(zs.includes(e)&&(t.stopPropagation(),t.preventDefault()),e){case" ":case"Enter":this._handleEnterPress();break;case"ArrowDown":this._handleArrowDownPress();break;case"ArrowLeft":this._handleArrowLeftPress(t);break;case"ArrowRight":this._handleArrowRightPress();break;case"ArrowUp":this._handleArrowUpPress();break;case"Shift":this._handleShiftPress()}},this._handleComponentKeyUp=t=>{"Shift"===t.key&&(this._treeContextState.isShiftPressed=!1)},this._handleSlotChange=()=>{this._treeContextState.itemListUpToDate=!1,ws(this,this._assignedTreeItems),this.updateComplete.then((()=>{if(null===this._treeContextState.activeItem){const t=this.querySelector(":scope > vscode-tree-item");t&&(t.active=!0)}}))},this.addEventListener("keyup",this._handleComponentKeyUp),this.addEventListener("keydown",this._handleComponentKeyDown)}connectedCallback(){super.connectedCallback(),this.role="tree"}willUpdate(t){this._updateConfigContext(t),t.has("multiSelect")&&(this.ariaMultiSelectable=this.multiSelect?"true":"false")}expandAll(){this.querySelectorAll("vscode-tree-item").forEach((t=>{t.branch&&(t.open=!0)}))}collapseAll(){this.querySelectorAll("vscode-tree-item").forEach((t=>{t.branch&&(t.open=!1)}))}updateHasBranchItemFlag(){const t=this._assignedTreeItems.some((t=>t.branch));this._treeContextState={...this._treeContextState,hasBranchItem:t}}_emitSelectEvent(){const t=new CustomEvent("vsc-tree-select",{detail:Array.from(this._treeContextState.selectedItems)});this.dispatchEvent(t)}_highlightIndentGuideOfItem(t){if(t.branch&&t.open)t.highlightedGuides=!0,this._treeContextState.highlightedItems?.add(t);else{const e=_s(t);e&&(e.highlightedGuides=!0,this._treeContextState.highlightedItems?.add(e))}}_highlightIndentGuides(){this.indentGuides!==Os&&(this._treeContextState.highlightedItems?.forEach((t=>t.highlightedGuides=!1)),this._treeContextState.highlightedItems?.clear(),this._treeContextState.activeItem&&this._highlightIndentGuideOfItem(this._treeContextState.activeItem),this._treeContextState.selectedItems.forEach((t=>{this._highlightIndentGuideOfItem(t)})))}_updateConfigContext(t){const{hideArrows:e,expandMode:i,indent:s,indentGuides:o,multiSelect:r}=this;t.has("hideArrows")&&(this._configContext={...this._configContext,hideArrows:e}),t.has("expandMode")&&(this._configContext={...this._configContext,expandMode:i}),t.has("indent")&&(this._configContext={...this._configContext,indent:s}),t.has("indentGuides")&&(this._configContext={...this._configContext,indentGuides:o}),t.has("multiSelect")&&(this._configContext={...this._configContext,multiSelect:r})}_focusItem(t){t.active=!0,t.updateComplete.then((()=>{t.focus(),this._highlightIndentGuides()}))}_focusPrevItem(){if(this._treeContextState.focusedItem){const t=(t=>{const{parentElement:e}=t;if(!e||!xs(t))return null;let i=t.previousElementSibling;for(;i&&!xs(i);)i=i.previousElementSibling;if(!i&&xs(e))return e;if(i&&i.branch&&i.open)return ys(i);return i})(this._treeContextState.focusedItem);t&&(this._focusItem(t),this._treeContextState.isShiftPressed&&this.multiSelect&&(t.selected=!t.selected,this._emitSelectEvent()))}}_focusNextItem(){if(this._treeContextState.focusedItem){const t=(t=>{const{parentElement:e}=t;if(!e||!xs(t))return null;let i;if(t.branch&&t.open){const e=t.querySelector("vscode-tree-item");e?i=e:(i=$s(t),i||(i=ks(t)))}else i=$s(t),i||(i=ks(t));return i||t})(this._treeContextState.focusedItem);t&&(this._focusItem(t),this._treeContextState.isShiftPressed&&this.multiSelect&&(t.selected=!t.selected,this._emitSelectEvent()))}}_handleArrowRightPress(){if(!this._treeContextState.focusedItem)return;const{focusedItem:t}=this._treeContextState;t.branch&&(t.open?this._focusNextItem():t.open=!0)}_handleArrowLeftPress(t){if(t.ctrlKey)return void this.collapseAll();if(!this._treeContextState.focusedItem)return;const{focusedItem:e}=this._treeContextState,i=_s(e);e.branch&&e.open?e.open=!1:i&&i.branch&&this._focusItem(i)}_handleArrowDownPress(){this._treeContextState.focusedItem?this._focusNextItem():this._focusItem(this._assignedTreeItems[0])}_handleArrowUpPress(){this._treeContextState.focusedItem?this._focusPrevItem():this._focusItem(this._assignedTreeItems[0])}_handleEnterPress(){const{focusedItem:t}=this._treeContextState;t&&(this._treeContextState.selectedItems.forEach((t=>t.selected=!1)),this._treeContextState.selectedItems.clear(),this._highlightIndentGuides(),t.selected=!0,this._emitSelectEvent(),t.branch&&(t.open=!t.open))}_handleShiftPress(){this._treeContextState.isShiftPressed=!0}render(){return U`<div>
2946
+ `],gs="vscode-list",ms=Symbol("configContext"),xs=t=>t instanceof Element&&t.matches("vscode-tree-item"),ws=(t,e)=>{const i=e.length,s=(o=t)instanceof Element&&o.matches("vscode-tree")?-1:t.level;var o;"branch"in t&&(t.branch=i>0),e.forEach(((e,i)=>{e.path="path"in t?[...t.path,i]:[i],e.level=s+1,e.dataset.path=e.path.join(".")}))},ys=t=>{const e=t.lastElementChild;return e&&xs(e)?e.branch&&e.open?ys(e):e:t},ks=t=>{if(!t.parentElement)return null;if(!xs(t.parentElement))return null;const e=$s(t.parentElement);return e||ks(t.parentElement)},$s=t=>{let e=t.nextElementSibling;for(;e&&!xs(e);)e=e.nextElementSibling;return e};function _s(t){return t.parentElement&&xs(t.parentElement)?t.parentElement:null}var Ss=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const Bs="singleClick",Cs="doubleClick",Os="none",As=[" ","ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter","Escape","Shift"];let zs=class extends yt{constructor(){super(),this.expandMode="singleClick",this.hideArrows=!1,this.indent=8,this.indentGuides="onHover",this.multiSelect=!1,this._treeContextState={isShiftPressed:!1,activeItem:null,selectedItems:new Set,allItems:null,itemListUpToDate:!1,focusedItem:null,prevFocusedItem:null,hasBranchItem:!1,rootElement:this,highlightedItems:new Set,highlightIndentGuides:()=>{this._highlightIndentGuides()},emitSelectEvent:()=>{this._emitSelectEvent()}},this._configContext={hideArrows:this.hideArrows,expandMode:this.expandMode,indent:this.indent,indentGuides:this.indentGuides,multiSelect:this.multiSelect},this._handleComponentKeyDown=t=>{const e=t.key;switch(As.includes(e)&&(t.stopPropagation(),t.preventDefault()),e){case" ":case"Enter":this._handleEnterPress();break;case"ArrowDown":this._handleArrowDownPress();break;case"ArrowLeft":this._handleArrowLeftPress(t);break;case"ArrowRight":this._handleArrowRightPress();break;case"ArrowUp":this._handleArrowUpPress();break;case"Shift":this._handleShiftPress()}},this._handleComponentKeyUp=t=>{"Shift"===t.key&&(this._treeContextState.isShiftPressed=!1)},this._handleSlotChange=()=>{this._treeContextState.itemListUpToDate=!1,ws(this,this._assignedTreeItems),this.updateComplete.then((()=>{if(null===this._treeContextState.activeItem){const t=this.querySelector(":scope > vscode-tree-item");t&&(t.active=!0)}}))},this.addEventListener("keyup",this._handleComponentKeyUp),this.addEventListener("keydown",this._handleComponentKeyDown)}connectedCallback(){super.connectedCallback(),this.role="tree"}willUpdate(t){this._updateConfigContext(t),t.has("multiSelect")&&(this.ariaMultiSelectable=this.multiSelect?"true":"false")}expandAll(){this.querySelectorAll("vscode-tree-item").forEach((t=>{t.branch&&(t.open=!0)}))}collapseAll(){this.querySelectorAll("vscode-tree-item").forEach((t=>{t.branch&&(t.open=!1)}))}updateHasBranchItemFlag(){const t=this._assignedTreeItems.some((t=>t.branch));this._treeContextState={...this._treeContextState,hasBranchItem:t}}_emitSelectEvent(){const t=new CustomEvent("vsc-tree-select",{detail:Array.from(this._treeContextState.selectedItems)});this.dispatchEvent(t)}_highlightIndentGuideOfItem(t){if(t.branch&&t.open)t.highlightedGuides=!0,this._treeContextState.highlightedItems?.add(t);else{const e=_s(t);e&&(e.highlightedGuides=!0,this._treeContextState.highlightedItems?.add(e))}}_highlightIndentGuides(){this.indentGuides!==Os&&(this._treeContextState.highlightedItems?.forEach((t=>t.highlightedGuides=!1)),this._treeContextState.highlightedItems?.clear(),this._treeContextState.activeItem&&this._highlightIndentGuideOfItem(this._treeContextState.activeItem),this._treeContextState.selectedItems.forEach((t=>{this._highlightIndentGuideOfItem(t)})))}_updateConfigContext(t){const{hideArrows:e,expandMode:i,indent:s,indentGuides:o,multiSelect:r}=this;t.has("hideArrows")&&(this._configContext={...this._configContext,hideArrows:e}),t.has("expandMode")&&(this._configContext={...this._configContext,expandMode:i}),t.has("indent")&&(this._configContext={...this._configContext,indent:s}),t.has("indentGuides")&&(this._configContext={...this._configContext,indentGuides:o}),t.has("multiSelect")&&(this._configContext={...this._configContext,multiSelect:r})}_focusItem(t){t.active=!0,t.updateComplete.then((()=>{t.focus(),this._highlightIndentGuides()}))}_focusPrevItem(){if(this._treeContextState.focusedItem){const t=(t=>{const{parentElement:e}=t;if(!e||!xs(t))return null;let i=t.previousElementSibling;for(;i&&!xs(i);)i=i.previousElementSibling;if(!i&&xs(e))return e;if(i&&i.branch&&i.open)return ys(i);return i})(this._treeContextState.focusedItem);t&&(this._focusItem(t),this._treeContextState.isShiftPressed&&this.multiSelect&&(t.selected=!t.selected,this._emitSelectEvent()))}}_focusNextItem(){if(this._treeContextState.focusedItem){const t=(t=>{const{parentElement:e}=t;if(!e||!xs(t))return null;let i;if(t.branch&&t.open){const e=t.querySelector("vscode-tree-item");e?i=e:(i=$s(t),i||(i=ks(t)))}else i=$s(t),i||(i=ks(t));return i||t})(this._treeContextState.focusedItem);t&&(this._focusItem(t),this._treeContextState.isShiftPressed&&this.multiSelect&&(t.selected=!t.selected,this._emitSelectEvent()))}}_handleArrowRightPress(){if(!this._treeContextState.focusedItem)return;const{focusedItem:t}=this._treeContextState;t.branch&&(t.open?this._focusNextItem():t.open=!0)}_handleArrowLeftPress(t){if(t.ctrlKey)return void this.collapseAll();if(!this._treeContextState.focusedItem)return;const{focusedItem:e}=this._treeContextState,i=_s(e);e.branch&&e.open?e.open=!1:i&&i.branch&&this._focusItem(i)}_handleArrowDownPress(){this._treeContextState.focusedItem?this._focusNextItem():this._focusItem(this._assignedTreeItems[0])}_handleArrowUpPress(){this._treeContextState.focusedItem?this._focusPrevItem():this._focusItem(this._assignedTreeItems[0])}_handleEnterPress(){const{focusedItem:t}=this._treeContextState;t&&(this._treeContextState.selectedItems.forEach((t=>t.selected=!1)),this._treeContextState.selectedItems.clear(),this._highlightIndentGuides(),t.selected=!0,this._emitSelectEvent(),t.branch&&(t.open=!t.open))}_handleShiftPress(){this._treeContextState.isShiftPressed=!0}render(){return U`<div>
2876
2947
  <slot @slotchange=${this._handleSlotChange}></slot>
2877
- </div>`}};As.styles=fs,Ss([pt({type:String,attribute:"expand-mode"})],As.prototype,"expandMode",void 0),Ss([pt({type:Boolean,reflect:!0,attribute:"hide-arrows"})],As.prototype,"hideArrows",void 0),Ss([pt({type:Number,reflect:!0})],As.prototype,"indent",void 0),Ss([pt({type:String,attribute:"indent-guides",useDefault:!0,reflect:!0})],As.prototype,"indentGuides",void 0),Ss([pt({type:Boolean,reflect:!0,attribute:"multi-select"})],As.prototype,"multiSelect",void 0),Ss([vs({context:gs})],As.prototype,"_treeContextState",void 0),Ss([vs({context:ms})],As.prototype,"_configContext",void 0),Ss([mt({selector:"vscode-tree-item"})],As.prototype,"_assignedTreeItems",void 0),As=Ss([kt("vscode-tree")],As);const Es=[$t,n`
2948
+ </div>`}};zs.styles=fs,Ss([pt({type:String,attribute:"expand-mode"})],zs.prototype,"expandMode",void 0),Ss([pt({type:Boolean,reflect:!0,attribute:"hide-arrows"})],zs.prototype,"hideArrows",void 0),Ss([pt({type:Number,reflect:!0})],zs.prototype,"indent",void 0),Ss([pt({type:String,attribute:"indent-guides",useDefault:!0,reflect:!0})],zs.prototype,"indentGuides",void 0),Ss([pt({type:Boolean,reflect:!0,attribute:"multi-select"})],zs.prototype,"multiSelect",void 0),Ss([vs({context:gs})],zs.prototype,"_treeContextState",void 0),Ss([vs({context:ms})],zs.prototype,"_configContext",void 0),Ss([mt({selector:"vscode-tree-item"})],zs.prototype,"_assignedTreeItems",void 0),zs=Ss([kt("vscode-tree")],zs);const Es=[$t,n`
2878
2949
  :host {
2879
2950
  --hover-outline-color: transparent;
2880
2951
  --hover-outline-style: solid;
@@ -3073,4 +3144,4 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
3073
3144
  @slotchange=${this._handleChildrenSlotChange}
3074
3145
  ></slot>
3075
3146
  </div>
3076
- </div>`}};Ps.styles=Es,Is([pt({type:Boolean})],Ps.prototype,"active",void 0),Is([pt({type:Boolean,reflect:!0})],Ps.prototype,"branch",void 0),Is([pt({type:Boolean})],Ps.prototype,"hasActiveItem",void 0),Is([pt({type:Boolean})],Ps.prototype,"hasSelectedItem",void 0),Is([pt({type:Boolean})],Ps.prototype,"highlightedGuides",void 0),Is([pt({type:Boolean,reflect:!0})],Ps.prototype,"open",void 0),Is([pt({type:Number,reflect:!0})],Ps.prototype,"level",void 0),Is([pt({type:Boolean,reflect:!0})],Ps.prototype,"selected",null),Is([vt()],Ps.prototype,"_hasBranchIcon",void 0),Is([vt()],Ps.prototype,"_hasBranchOpenedIcon",void 0),Is([vt()],Ps.prototype,"_hasLeafIcon",void 0),Is([bs({context:gs,subscribe:!0})],Ps.prototype,"_treeContextState",void 0),Is([bs({context:ms,subscribe:!0})],Ps.prototype,"_configContext",void 0),Is([mt({selector:"vscode-tree-item"})],Ps.prototype,"_initiallyAssignedTreeItems",void 0),Is([mt({selector:"vscode-tree-item",slot:"children"})],Ps.prototype,"_childrenTreeItems",void 0),Ps=Is([kt("vscode-tree-item")],Ps);export{Ct as VscodeBadge,Lt as VscodeButton,Ht as VscodeButtonGroup,Qt as VscodeCheckbox,ie as VscodeCheckboxGroup,re as VscodeCollapsible,de as VscodeContextMenu,he as VscodeContextMenuItem,ve as VscodeDivider,me as VscodeFormContainer,ye as VscodeFormGroup,Se as VscodeFormHelper,Nt as VscodeIcon,Ae as VscodeLabel,si as VscodeMultiSelect,Le as VscodeOption,ni as VscodeProgressRing,ai as VscodeRadio,ui as VscodeRadioGroup,Xe as VscodeScrollable,vi as VscodeSingleSelect,yi as VscodeSplitLayout,_i as VscodeTabHeader,Ci as VscodeTabPanel,qi as VscodeTable,Ai as VscodeTableBody,ji as VscodeTableCell,Di as VscodeTableHeader,Ni as VscodeTableHeaderCell,Li as VscodeTableRow,Ji as VscodeTabs,Zi as VscodeTextarea,is as VscodeTextfield,rs as VscodeToolbarButton,hs as VscodeToolbarContainer,As as VscodeTree,Ps as VscodeTreeItem};
3147
+ </div>`}};Ps.styles=Es,Is([pt({type:Boolean})],Ps.prototype,"active",void 0),Is([pt({type:Boolean,reflect:!0})],Ps.prototype,"branch",void 0),Is([pt({type:Boolean})],Ps.prototype,"hasActiveItem",void 0),Is([pt({type:Boolean})],Ps.prototype,"hasSelectedItem",void 0),Is([pt({type:Boolean})],Ps.prototype,"highlightedGuides",void 0),Is([pt({type:Boolean,reflect:!0})],Ps.prototype,"open",void 0),Is([pt({type:Number,reflect:!0})],Ps.prototype,"level",void 0),Is([pt({type:Boolean,reflect:!0})],Ps.prototype,"selected",null),Is([vt()],Ps.prototype,"_hasBranchIcon",void 0),Is([vt()],Ps.prototype,"_hasBranchOpenedIcon",void 0),Is([vt()],Ps.prototype,"_hasLeafIcon",void 0),Is([bs({context:gs,subscribe:!0})],Ps.prototype,"_treeContextState",void 0),Is([bs({context:ms,subscribe:!0})],Ps.prototype,"_configContext",void 0),Is([mt({selector:"vscode-tree-item"})],Ps.prototype,"_initiallyAssignedTreeItems",void 0),Is([mt({selector:"vscode-tree-item",slot:"children"})],Ps.prototype,"_childrenTreeItems",void 0),Ps=Is([kt("vscode-tree-item")],Ps);export{Ct as VscodeBadge,Lt as VscodeButton,Ht as VscodeButtonGroup,Qt as VscodeCheckbox,ie as VscodeCheckboxGroup,re as VscodeCollapsible,de as VscodeContextMenu,he as VscodeContextMenuItem,ve as VscodeDivider,me as VscodeFormContainer,ye as VscodeFormGroup,Se as VscodeFormHelper,Nt as VscodeIcon,ze as VscodeLabel,si as VscodeMultiSelect,Le as VscodeOption,ni as VscodeProgressRing,ai as VscodeRadio,ui as VscodeRadioGroup,Xe as VscodeScrollable,vi as VscodeSingleSelect,yi as VscodeSplitLayout,_i as VscodeTabHeader,Ci as VscodeTabPanel,qi as VscodeTable,zi as VscodeTableBody,ji as VscodeTableCell,Di as VscodeTableHeader,Ni as VscodeTableHeaderCell,Li as VscodeTableRow,Ji as VscodeTabs,Zi as VscodeTextarea,is as VscodeTextfield,rs as VscodeToolbarButton,hs as VscodeToolbarContainer,zs as VscodeTree,Ps as VscodeTreeItem};
@@ -1,5 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
- const VERSION = '2.1.1-pre.0';
2
+ const VERSION = '2.2.0';
3
3
  const CONFIG_KEY = '__vscodeElements_disableRegistryWarning__';
4
4
  export class VscElement extends LitElement {
5
5
  /** VSCode Elements version */