@vscode-elements/elements 1.15.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +151 -4
- package/dist/bundled.js +234 -156
- package/dist/includes/VscElement.js +1 -1
- package/dist/includes/VscElement.js.map +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -1
- package/dist/vscode-button/vscode-button.d.ts +1 -0
- package/dist/vscode-button/vscode-button.d.ts.map +1 -1
- package/dist/vscode-button/vscode-button.js +6 -0
- package/dist/vscode-button/vscode-button.js.map +1 -1
- package/dist/vscode-button/vscode-button.styles.d.ts.map +1 -1
- package/dist/vscode-button/vscode-button.styles.js +59 -7
- package/dist/vscode-button/vscode-button.styles.js.map +1 -1
- package/dist/vscode-button-group/index.d.ts +2 -0
- package/dist/vscode-button-group/index.d.ts.map +1 -0
- package/dist/vscode-button-group/index.js +2 -0
- package/dist/vscode-button-group/index.js.map +1 -0
- package/dist/vscode-button-group/vscode-button-group.d.ts +29 -0
- package/dist/vscode-button-group/vscode-button-group.d.ts.map +1 -0
- package/dist/vscode-button-group/vscode-button-group.js +38 -0
- package/dist/vscode-button-group/vscode-button-group.js.map +1 -0
- package/dist/vscode-button-group/vscode-button-group.styles.d.ts +4 -0
- package/dist/vscode-button-group/vscode-button-group.styles.d.ts.map +1 -0
- package/dist/vscode-button-group/vscode-button-group.styles.js +33 -0
- package/dist/vscode-button-group/vscode-button-group.styles.js.map +1 -0
- package/dist/vscode-context-menu/vscode-context-menu.d.ts +1 -1
- package/dist/vscode-context-menu/vscode-context-menu.d.ts.map +1 -1
- package/dist/vscode-context-menu/vscode-context-menu.js.map +1 -1
- package/dist/vscode-split-layout/vscode-split-layout.d.ts +3 -1
- package/dist/vscode-split-layout/vscode-split-layout.d.ts.map +1 -1
- package/dist/vscode-split-layout/vscode-split-layout.js +3 -1
- package/dist/vscode-split-layout/vscode-split-layout.js.map +1 -1
- package/dist/vscode-split-layout/vscode-split-layout.styles.js +3 -3
- package/dist/vscode-split-layout/vscode-split-layout.styles.js.map +1 -1
- package/package.json +3 -3
- package/vscode.css-custom-data.json +18 -1
- package/vscode.html-custom-data.json +8 -1
package/dist/bundled.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),i=new WeakMap;let o=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=i.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&i.set(s,t))}return t}toString(){return this.cssText}};const r=t=>new o("string"==typeof t?t:t+"",void 0,s),n=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new o(i,t,s)},l=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t,{is:a,defineProperty:c,getOwnPropertyDescriptor:h,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 s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},y=(t,e)=>!a(t,e),w={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:y};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;class k 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=w){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&c(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=h(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);o.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??w}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 s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const s=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((s,i)=>{if(e)s.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of i){const i=document.createElement("style"),o=t.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i)}})(s,this.constructor.elementStyles),s}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const o=(void 0!==s.converter?.toAttribute?s.converter:x).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=i,this[i]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??y)(this[t],e))return;this.P(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[m("elementProperties")]=new Map,k[m("finalized")]=new Map,g?.({ReactiveElement:k}),(v.reactiveElementVersions??=[]).push("2.0.4");const $=globalThis,_=$.trustedTypes,C=_?_.createPolicy("lit-html",{createHTML:t=>t}):void 0,B="$lit$",S=`lit$${Math.random().toFixed(9).slice(2)}$`,z="?"+S,O=`<${z}>`,A=document,E=()=>A.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,M="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,N=/>/g,D=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),V=/'/g,T=/"/g,R=/^(?:script|style|textarea|title)$/i,L=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),U=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),H=new WeakMap,K=A.createTreeWalker(A,129);function W(t,e){if(!I(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==C?C.createHTML(e):e}class G{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const n=t.length-1,l=this.parts,[a,c]=((t,e)=>{const s=t.length-1,i=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=F;for(let e=0;e<s;e++){const s=t[e];let l,a,c=-1,h=0;for(;h<s.length&&(n.lastIndex=h,a=n.exec(s),null!==a);)h=n.lastIndex,n===F?"!--"===a[1]?n=P:void 0!==a[1]?n=N:void 0!==a[2]?(R.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=D):void 0!==a[3]&&(n=D):n===D?">"===a[0]?(n=o??F,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?D:'"'===a[3]?T:V):n===T||n===V?n=D:n===P||n===N?n=F:(n=D,o=void 0);const d=n===D&&t[e+1].startsWith("/>")?" ":"";r+=n===F?s+O:c>=0?(i.push(l),s.slice(0,c)+B+s.slice(c)+S+d):s+S+(-2===c?e:d)}return[W(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]})(t,e);if(this.el=G.createElement(a,s),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=K.nextNode())&&l.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(B)){const e=c[r++],s=i.getAttribute(t).split(S),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?Q:"?"===n[1]?tt:"@"===n[1]?et:Z}),i.removeAttribute(t)}else t.startsWith(S)&&(l.push({type:6,index:o}),i.removeAttribute(t));if(R.test(i.tagName)){const t=i.textContent.split(S),e=t.length-1;if(e>0){i.textContent=_?_.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],E()),K.nextNode(),l.push({type:2,index:++o});i.append(t[e],E())}}}else if(8===i.nodeType)if(i.data===z)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(S,t+1));)l.push({type:7,index:o}),t+=S.length-1}o++}}static createElement(t,e){const s=A.createElement("template");return s.innerHTML=t,s}}function J(t,e,s=t,i){if(e===U)return e;let o=void 0!==i?s.o?.[i]:s.l;const r=j(e)?void 0:e._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),void 0===r?o=void 0:(o=new r(t),o._$AT(t,s,i)),void 0!==i?(s.o??=[])[i]=o:s.l=o),void 0!==o&&(e=J(t,o._$AS(t,e.values),o,i)),e}class Y{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??A).importNode(e,!0);K.currentNode=i;let o=K.nextNode(),r=0,n=0,l=s[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new X(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new st(o,this,t)),this._$AV.push(e),l=s[++n]}r!==l?.index&&(o=K.nextNode(),r++)}return K.currentNode=A,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}let X=class t{get _$AU(){return this._$AM?._$AU??this.v}constructor(t,e,s,i){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this.v=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=J(this,t,e),j(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>I(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&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=G.createElement(W(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Y(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=H.get(t.strings);return void 0===e&&H.set(t.strings,e=new G(t)),e}k(e){I(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,o=0;for(const r of e)o===s.length?s.push(i=new t(this.O(E()),this.O(E()),this,this.options)):i=s[o],i._$AI(r),o++;o<s.length&&(this._$AR(i&&i._$AB.nextSibling,o),s.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this.v=t,this._$AP?.(t))}};class Z{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=q}_$AI(t,e=this,s,i){const o=this.strings;let r=!1;if(void 0===o)t=J(this,t,e,0),r=!j(t)||t!==this._$AH&&t!==U,r&&(this._$AH=t);else{const i=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=J(this,i[s+n],e,n),l===U&&(l=this._$AH[n]),r||=!j(l)||l!==this._$AH[n],l===q?t=q:t!==q&&(t+=(l??"")+o[n+1]),this._$AH[n]=l}r&&!i&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Q extends Z{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class tt extends Z{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class et extends Z{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=J(this,t,e,0)??q)===U)return;const s=this._$AH,i=t===q&&s!==q||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==q&&(s===q||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class st{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){J(this,t)}}const it={I:X},ot=$.litHtmlPolyfillSupport;ot?.(G,X),($.litHtmlVersions??=[]).push("3.2.0");const rt=(t,e,s)=>{const i=s?.renderBefore??e;let o=i._$litPart$;if(void 0===o){const t=s?.renderBefore??null;i._$litPart$=o=new X(e.insertBefore(E(),t),t,void 0,s??{})}return o._$AI(t),o};class nt extends k{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=rt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return U}}nt._$litElement$=!0,nt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:nt});const lt=globalThis.litElementPolyfillSupport;lt?.({LitElement:nt}),(globalThis.litElementVersions??=[]).push("4.1.0");const at={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:y},ct=(t=at,e,s)=>{const{kind:i,metadata:o}=s;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),r.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const o=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,o,t)},init(e){return void 0!==e&&this.P(i,void 0,t),e}}}if("setter"===i){const{name:i}=s;return function(s){const o=this[i];e.call(this,s),this.requestUpdate(i,o,t)}}throw Error("Unsupported decorator location: "+i)};function ht(t){return(e,s)=>"object"==typeof s?ct(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}function dt(t){return ht({...t,state:!0,attribute:!1})}const ut=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,s);function pt(t,e){return(s,i,o)=>{const r=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof i?s:o??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return ut(0,0,{get(){let s=t.call(this);return void 0===s&&(s=r(this),(null!==s||this.hasUpdated)&&e.call(this,s)),s}})}return ut(0,0,{get(){return r(this)}})}}let vt;function bt(t){return(e,s)=>{const{slot:i,selector:o}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return ut(0,0,{get(){const e=this.renderRoot?.querySelector(r),s=e?.assignedElements(t)??[];return void 0===o?s:s.filter((t=>t.matches(o)))}})}}const ft="1.15.0",gt="__vscodeElements_disableRegistryWarning__";class mt extends nt{get version(){return ft}}const xt=t=>e=>{if(!customElements.get(t))return void customElements.define(t,e);if(gt in window)return;const s=document.createElement(t),i=s?.version;let o="";i?i!==ft?(o+="is already registered by a different version of VSCode Elements. ",o+=`This version is "${ft}", while the other one is "${i}".`):o+="is already registered by the same version of VSCode Elements. ":(console.warn(t,"is already registered by an unknown custom element handler class."),o+="is already registered by an unknown custom element handler class."),console.warn(`[VSCode Elements] ${t} ${o}\nTo suppress this warning, set window.${gt} to true`)};var yt=n`
|
|
1
|
+
const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),i=new WeakMap;let o=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=i.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&i.set(s,t))}return t}toString(){return this.cssText}};const r=t=>new o("string"==typeof t?t:t+"",void 0,s),n=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new o(i,t,s)},a=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t,{is:c,defineProperty:l,getOwnPropertyDescriptor:h,getOwnPropertyNames:d,getOwnPropertySymbols:u,getPrototypeOf:v}=Object,p=globalThis,b=p.trustedTypes,f=b?b.emptyScript:"",g=p.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 s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},y=(t,e)=>!c(t,e),w={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:y};Symbol.metadata??=Symbol("metadata"),p.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=w){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 s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&l(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=h(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const r=i?.call(this);o?.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??w}static _$Ei(){if(this.hasOwnProperty(m("elementProperties")))return;const t=v(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 s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const s=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((s,i)=>{if(e)s.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of i){const i=document.createElement("style"),o=t.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i)}})(s,this.constructor.elementStyles),s}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const o=(void 0!==s.converter?.toAttribute?s.converter:x).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=i,this[i]=o.fromAttribute(e,t.type)??this._$Ej?.get(i)??null,this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){const i=this.constructor,o=this[t];if(s??=i.getPropertyOptions(t),!((s.hasChanged??y)(o,e)||s.useDefault&&s.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:o},r){s&&!(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||s||(e=void 0),this._$AL.set(t,e)),!0===i&&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,s]of t){const{wrapped:t}=s,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,s,i)}}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}),(p.reactiveElementVersions??=[]).push("2.1.0");const $=globalThis,_=$.trustedTypes,C=_?_.createPolicy("lit-html",{createHTML:t=>t}):void 0,B="$lit$",S=`lit$${Math.random().toFixed(9).slice(2)}$`,z="?"+S,O=`<${z}>`,A=document,E=()=>A.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,M="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,N=/>/g,D=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),V=/'/g,R=/"/g,T=/^(?:script|style|textarea|title)$/i,L=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),U=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),H=new WeakMap,K=A.createTreeWalker(A,129);function W(t,e){if(!I(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==C?C.createHTML(e):e}const G=(t,e)=>{const s=t.length-1,i=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=F;for(let e=0;e<s;e++){const s=t[e];let a,c,l=-1,h=0;for(;h<s.length&&(n.lastIndex=h,c=n.exec(s),null!==c);)h=n.lastIndex,n===F?"!--"===c[1]?n=P:void 0!==c[1]?n=N:void 0!==c[2]?(T.test(c[2])&&(o=RegExp("</"+c[2],"g")),n=D):void 0!==c[3]&&(n=D):n===D?">"===c[0]?(n=o??F,l=-1):void 0===c[1]?l=-2:(l=n.lastIndex-c[2].length,a=c[1],n=void 0===c[3]?D:'"'===c[3]?R:V):n===R||n===V?n=D:n===P||n===N?n=F:(n=D,o=void 0);const d=n===D&&t[e+1].startsWith("/>")?" ":"";r+=n===F?s+O:l>=0?(i.push(a),s.slice(0,l)+B+s.slice(l)+S+d):s+S+(-2===l?e:d)}return[W(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class J{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const n=t.length-1,a=this.parts,[c,l]=G(t,e);if(this.el=J.createElement(c,s),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=K.nextNode())&&a.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(B)){const e=l[r++],s=i.getAttribute(t).split(S),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?Q:"?"===n[1]?tt:"@"===n[1]?et:Z}),i.removeAttribute(t)}else t.startsWith(S)&&(a.push({type:6,index:o}),i.removeAttribute(t));if(T.test(i.tagName)){const t=i.textContent.split(S),e=t.length-1;if(e>0){i.textContent=_?_.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],E()),K.nextNode(),a.push({type:2,index:++o});i.append(t[e],E())}}}else if(8===i.nodeType)if(i.data===z)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(S,t+1));)a.push({type:7,index:o}),t+=S.length-1}o++}}static createElement(t,e){const s=A.createElement("template");return s.innerHTML=t,s}}function Y(t,e,s=t,i){if(e===U)return e;let o=void 0!==i?s._$Co?.[i]:s._$Cl;const r=j(e)?void 0:e._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),void 0===r?o=void 0:(o=new r(t),o._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=o:s._$Cl=o),void 0!==o&&(e=Y(t,o._$AS(t,e.values),o,i)),e}class X{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Y(this,t,e),j(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>I(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&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=J.createElement(W(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new 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:s}=this._$AD,i=(t?.creationScope??A).importNode(e,!0);K.currentNode=i;let o=K.nextNode(),r=0,n=0,a=s[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new X(o,o.nextSibling,this,t):1===a.type?e=new a.ctor(o,a.name,a.strings,this,t):6===a.type&&(e=new st(o,this,t)),this._$AV.push(e),a=s[++n]}r!==a?.index&&(o=K.nextNode(),r++)}return K.currentNode=A,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=H.get(t.strings);return void 0===e&&H.set(t.strings,e=new J(t)),e}k(t){I(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new X(this.O(E()),this.O(E()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$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 Z{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=q}_$AI(t,e=this,s,i){const o=this.strings;let r=!1;if(void 0===o)t=Y(this,t,e,0),r=!j(t)||t!==this._$AH&&t!==U,r&&(this._$AH=t);else{const i=t;let n,a;for(t=o[0],n=0;n<o.length-1;n++)a=Y(this,i[s+n],e,n),a===U&&(a=this._$AH[n]),r||=!j(a)||a!==this._$AH[n],a===q?t=q:t!==q&&(t+=(a??"")+o[n+1]),this._$AH[n]=a}r&&!i&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Q extends Z{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class tt extends Z{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class et extends Z{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=Y(this,t,e,0)??q)===U)return;const s=this._$AH,i=t===q&&s!==q||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==q&&(s===q||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class st{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Y(this,t)}}const it={I:X},ot=$.litHtmlPolyfillSupport;ot?.(J,X),($.litHtmlVersions??=[]).push("3.3.0");const rt=(t,e,s)=>{const i=s?.renderBefore??e;let o=i._$litPart$;if(void 0===o){const t=s?.renderBefore??null;i._$litPart$=o=new X(e.insertBefore(E(),t),t,void 0,s??{})}return o._$AI(t),o},nt=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=rt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U}};at._$litElement$=!0,at.finalized=!0,nt.litElementHydrateSupport?.({LitElement:at});const ct=nt.litElementPolyfillSupport;ct?.({LitElement:at}),(nt.litElementVersions??=[]).push("4.2.0");const lt={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:y},ht=(t=lt,e,s)=>{const{kind:i,metadata:o}=s;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),r.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const o=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,o,t)},init(e){return void 0!==e&&this.C(i,void 0,t,e),e}}}if("setter"===i){const{name:i}=s;return function(s){const o=this[i];e.call(this,s),this.requestUpdate(i,o,t)}}throw Error("Unsupported decorator location: "+i)};function dt(t){return(e,s)=>"object"==typeof s?ht(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}function ut(t){return dt({...t,state:!0,attribute:!1})}const vt=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,s);function pt(t,e){return(s,i,o)=>{const r=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof i?s:o??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return vt(0,0,{get(){let s=t.call(this);return void 0===s&&(s=r(this),(null!==s||this.hasUpdated)&&e.call(this,s)),s}})}return vt(0,0,{get(){return r(this)}})}}let bt;function ft(t){return(e,s)=>{const{slot:i,selector:o}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return vt(0,0,{get(){const e=this.renderRoot?.querySelector(r),s=e?.assignedElements(t)??[];return void 0===o?s:s.filter((t=>t.matches(o)))}})}}const gt="1.16.0",mt="__vscodeElements_disableRegistryWarning__";class xt extends at{get version(){return gt}}const yt=t=>e=>{if(!customElements.get(t))return void customElements.define(t,e);if(mt in window)return;const s=document.createElement(t),i=s?.version;let o="";i?i!==gt?(o+="is already registered by a different version of VSCode Elements. ",o+=`This version is "${gt}", while the other one is "${i}".`):o+="is already registered by the same version of VSCode Elements. ":(console.warn(t,"is already registered by an unknown custom element handler class."),o+="is already registered by an unknown custom element handler class."),console.warn(`[VSCode Elements] ${t} ${o}\nTo suppress this warning, set window.${mt} to true`)};var wt=n`
|
|
2
2
|
:host([hidden]) {
|
|
3
3
|
display: none;
|
|
4
4
|
}
|
|
@@ -9,7 +9,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
9
9
|
opacity: 0.4;
|
|
10
10
|
pointer-events: none;
|
|
11
11
|
}
|
|
12
|
-
`;function
|
|
12
|
+
`;function kt(){return navigator.userAgent.indexOf("Linux")>-1?'system-ui, "Ubuntu", "Droid Sans", sans-serif':navigator.userAgent.indexOf("Mac")>-1?"-apple-system, BlinkMacSystemFont, sans-serif":navigator.userAgent.indexOf("Windows")>-1?'"Segoe WPC", "Segoe UI", sans-serif':"sans-serif"}const $t=[wt,n`
|
|
13
13
|
:host {
|
|
14
14
|
background-color: var(--vscode-badge-background, #616161);
|
|
15
15
|
border: 1px solid var(--vscode-contrastBorder, transparent);
|
|
@@ -17,7 +17,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
17
17
|
box-sizing: border-box;
|
|
18
18
|
color: var(--vscode-badge-foreground, #f8f8f8);
|
|
19
19
|
display: inline-block;
|
|
20
|
-
font-family: var(--vscode-font-family, ${r(
|
|
20
|
+
font-family: var(--vscode-font-family, ${r(kt())});
|
|
21
21
|
font-size: 11px;
|
|
22
22
|
font-weight: 400;
|
|
23
23
|
line-height: 14px;
|
|
@@ -54,7 +54,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
54
54
|
min-width: 16px;
|
|
55
55
|
padding: 3px 5px;
|
|
56
56
|
}
|
|
57
|
-
`];var
|
|
57
|
+
`];var _t=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Ct=class extends xt{constructor(){super(...arguments),this.variant="default"}render(){return L` <slot></slot> `}};Ct.styles=$t,_t([dt({reflect:!0})],Ct.prototype,"variant",void 0),Ct=_t([yt("vscode-badge")],Ct);const Bt=1,St=2,zt=3,Ot=t=>(...e)=>({_$litDirective$:t,values:e});class At{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const Et=Ot(class extends At{constructor(t){if(super(t),t.type!==Bt||"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 s=t.element.classList;for(const t of this.st)t in e||(s.remove(t),this.st.delete(t));for(const t in e){const i=!!e[t];i===this.st.has(t)||this.nt?.has(t)||(i?(s.add(t),this.st.add(t)):(s.remove(t),this.st.delete(t)))}return U}}),jt=t=>t??q;const It=Ot(class extends At{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,s])=>{this._prevProperties[e]!==s&&(e.startsWith("--")?t.element.style.setProperty(e,s):t.element.style[e]=s,this._prevProperties[e]=s)})),U}render(t){return U}}),Mt=[wt,n`
|
|
58
58
|
:host {
|
|
59
59
|
color: var(--vscode-icon-foreground, #cccccc);
|
|
60
60
|
display: inline-block;
|
|
@@ -114,9 +114,9 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
114
114
|
animation-timing-function: linear;
|
|
115
115
|
animation-iteration-count: infinite;
|
|
116
116
|
}
|
|
117
|
-
`];var
|
|
118
|
-
class=${
|
|
119
|
-
.style=${
|
|
117
|
+
`];var Ft,Pt=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Nt=Ft=class extends xt{constructor(){super(...arguments),this.label="",this.name="",this.size=16,this.spin=!1,this.spinDuration=1.5,this.actionIcon=!1,this._onButtonClick=t=>{this.dispatchEvent(new CustomEvent("vsc-click",{detail:{originalEvent:t}}))}}connectedCallback(){super.connectedCallback();const{href:t,nonce:e}=this._getStylesheetConfig();Ft.stylesheetHref=t,Ft.nonce=e}_getStylesheetConfig(){const t=document.getElementById("vscode-codicon-stylesheet"),e=t?.getAttribute("href")||void 0,s=t?.nonce||void 0;if(!t){let t="[VSCode Elements] To use the Icon component, the codicons.css file must be included in the page with the id `vscode-codicon-stylesheet`! ";t+="See https://vscode-elements.github.io/components/icon/ for more details.",console.warn(t)}return{nonce:s,href:e}}render(){const{stylesheetHref:t,nonce:e}=Ft,s=L`<span
|
|
118
|
+
class=${Et({codicon:!0,["codicon-"+this.name]:!0,spin:this.spin})}
|
|
119
|
+
.style=${It({animationDuration:String(this.spinDuration)+"s",fontSize:this.size+"px",height:this.size+"px",width:this.size+"px"})}
|
|
120
120
|
></span>`,i=this.actionIcon?L` <button
|
|
121
121
|
class="button"
|
|
122
122
|
@click=${this._onButtonClick}
|
|
@@ -128,11 +128,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
128
128
|
>`;return L`
|
|
129
129
|
<link
|
|
130
130
|
rel="stylesheet"
|
|
131
|
-
href=${
|
|
132
|
-
nonce=${
|
|
131
|
+
href=${jt(t)}
|
|
132
|
+
nonce=${jt(e)}
|
|
133
133
|
>
|
|
134
134
|
${i}
|
|
135
|
-
`}};
|
|
135
|
+
`}};Nt.styles=Mt,Nt.stylesheetHref="",Nt.nonce="",Pt([dt()],Nt.prototype,"label",void 0),Pt([dt({type:String})],Nt.prototype,"name",void 0),Pt([dt({type:Number})],Nt.prototype,"size",void 0),Pt([dt({type:Boolean,reflect:!0})],Nt.prototype,"spin",void 0),Pt([dt({type:Number,attribute:"spin-duration"})],Nt.prototype,"spinDuration",void 0),Pt([dt({type:Boolean,reflect:!0,attribute:"action-icon"})],Nt.prototype,"actionIcon",void 0),Nt=Ft=Pt([yt("vscode-icon")],Nt);const Dt=[wt,n`
|
|
136
136
|
:host {
|
|
137
137
|
background-color: var(--vscode-button-background, #0078d4);
|
|
138
138
|
border-color: var(--vscode-button-border, transparent);
|
|
@@ -141,13 +141,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
141
141
|
border-width: 1px;
|
|
142
142
|
color: var(--vscode-button-foreground, #ffffff);
|
|
143
143
|
cursor: pointer;
|
|
144
|
-
display: inline-
|
|
145
|
-
font-family: var(--vscode-font-family, ${r(
|
|
144
|
+
display: inline-flex;
|
|
145
|
+
font-family: var(--vscode-font-family, ${r(kt())});
|
|
146
146
|
font-size: var(--vscode-font-size, 13px);
|
|
147
147
|
font-weight: var(--vscode-font-weight, normal);
|
|
148
148
|
line-height: 22px;
|
|
149
149
|
overflow: hidden;
|
|
150
|
-
padding:
|
|
150
|
+
padding: 0;
|
|
151
151
|
user-select: none;
|
|
152
152
|
white-space: nowrap;
|
|
153
153
|
}
|
|
@@ -188,7 +188,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
188
188
|
outline: none;
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
:host(:focus) {
|
|
191
|
+
:host(:focus-visible) {
|
|
192
192
|
background-color: var(--vscode-button-hoverBackground, #026ec1);
|
|
193
193
|
outline: 1px solid var(--vscode-focusBorder, #0078d4);
|
|
194
194
|
outline-offset: 2px;
|
|
@@ -217,6 +217,10 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
217
217
|
margin-left: 0;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
+
::slotted(*:last-child) {
|
|
221
|
+
margin-right: 0;
|
|
222
|
+
}
|
|
223
|
+
|
|
220
224
|
::slotted(vscode-icon) {
|
|
221
225
|
color: inherit;
|
|
222
226
|
}
|
|
@@ -228,6 +232,15 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
228
232
|
justify-content: center;
|
|
229
233
|
position: relative;
|
|
230
234
|
width: 100%;
|
|
235
|
+
height: 100%;
|
|
236
|
+
padding: 1px 13px;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
:host(:empty) .wrapper,
|
|
240
|
+
:host([icon-only]) .wrapper {
|
|
241
|
+
min-height: 24px;
|
|
242
|
+
min-width: 16px;
|
|
243
|
+
padding: 1px 5px;
|
|
231
244
|
}
|
|
232
245
|
|
|
233
246
|
slot {
|
|
@@ -236,34 +249,99 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
236
249
|
height: 100%;
|
|
237
250
|
}
|
|
238
251
|
|
|
239
|
-
.icon
|
|
252
|
+
.icon,
|
|
253
|
+
.icon-after {
|
|
240
254
|
color: inherit;
|
|
241
255
|
display: block;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
:host(:not(:empty)) .icon {
|
|
242
259
|
margin-right: 3px;
|
|
243
260
|
}
|
|
244
261
|
|
|
245
|
-
.icon-after
|
|
246
|
-
|
|
247
|
-
display: block;
|
|
262
|
+
:host(:not(:empty)) .icon-after,
|
|
263
|
+
:host([icon]) .icon-after {
|
|
248
264
|
margin-left: 3px;
|
|
249
265
|
}
|
|
250
|
-
|
|
266
|
+
|
|
267
|
+
.divider {
|
|
268
|
+
display: var(--divider-display, none);
|
|
269
|
+
background-color: transparent;
|
|
270
|
+
padding: 4px 0;
|
|
271
|
+
box-sizing: border-box;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
:host(:hover) .divider,
|
|
275
|
+
:host(:focus-visible) .divider {
|
|
276
|
+
background-color: var(--vscode-button-hoverBackground, #026ec1);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
:host([secondary]) .divider {
|
|
280
|
+
background-color: var(--vscode-button-secondaryBackground, #313131);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
:host([secondary]:hover) .divider,
|
|
284
|
+
:host([secondary]:focus-visible) .divider {
|
|
285
|
+
background-color: var(--vscode-button-secondaryHoverBackground, #3c3c3c);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.divider > div {
|
|
289
|
+
background-color: var(
|
|
290
|
+
--vscode-button-separator,
|
|
291
|
+
rgba(255, 255, 255, 0.4)
|
|
292
|
+
);
|
|
293
|
+
height: 100%;
|
|
294
|
+
width: 1px;
|
|
295
|
+
margin: 0;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
:host([secondary]) .divider > div {
|
|
299
|
+
background-color: var(--vscode-button-secondaryForeground, #cccccc);
|
|
300
|
+
opacity: 0.4;
|
|
301
|
+
}
|
|
302
|
+
`];var Vt=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Rt=class extends xt{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")){this.dispatchEvent(new CustomEvent("vsc-click",{detail:{originalEvent:new MouseEvent("click")}}));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.dispatchEvent(new CustomEvent("vsc-click",{detail:{originalEvent:t}})),this._executeAction())}render(){const t=""!==this.icon,e=""!==this.iconAfter,s={wrapper:!0,"has-icon-before":t,"has-icon-after":e,"icon-only":this.iconOnly},i=t?L`<vscode-icon
|
|
251
303
|
name=${this.icon}
|
|
252
304
|
?spin=${this.iconSpin}
|
|
253
|
-
spin-duration=${
|
|
305
|
+
spin-duration=${jt(this.iconSpinDuration)}
|
|
254
306
|
class="icon"
|
|
255
307
|
></vscode-icon>`:q,o=e?L`<vscode-icon
|
|
256
308
|
name=${this.iconAfter}
|
|
257
309
|
?spin=${this.iconAfterSpin}
|
|
258
|
-
spin-duration=${
|
|
310
|
+
spin-duration=${jt(this.iconAfterSpinDuration)}
|
|
259
311
|
class="icon-after"
|
|
260
312
|
></vscode-icon>`:q;return L`
|
|
261
|
-
<span class=${
|
|
313
|
+
<span class=${Et(s)}>
|
|
262
314
|
${i}
|
|
263
315
|
<slot></slot>
|
|
264
316
|
${o}
|
|
265
317
|
</span>
|
|
266
|
-
|
|
318
|
+
<div class="divider"><div></div></div>
|
|
319
|
+
`}};Rt.styles=Dt,Rt.formAssociated=!0,Vt([dt({type:Boolean,reflect:!0})],Rt.prototype,"autofocus",void 0),Vt([dt({type:Number,reflect:!0})],Rt.prototype,"tabIndex",void 0),Vt([dt({type:Boolean,reflect:!0})],Rt.prototype,"secondary",void 0),Vt([dt({reflect:!0})],Rt.prototype,"role",void 0),Vt([dt({type:Boolean,reflect:!0})],Rt.prototype,"disabled",void 0),Vt([dt()],Rt.prototype,"icon",void 0),Vt([dt({type:Boolean,reflect:!0,attribute:"icon-spin"})],Rt.prototype,"iconSpin",void 0),Vt([dt({type:Number,reflect:!0,attribute:"icon-spin-duration"})],Rt.prototype,"iconSpinDuration",void 0),Vt([dt({attribute:"icon-after"})],Rt.prototype,"iconAfter",void 0),Vt([dt({type:Boolean,reflect:!0,attribute:"icon-after-spin"})],Rt.prototype,"iconAfterSpin",void 0),Vt([dt({type:Number,reflect:!0,attribute:"icon-after-spin-duration"})],Rt.prototype,"iconAfterSpinDuration",void 0),Vt([dt({type:Boolean,reflect:!0})],Rt.prototype,"focused",void 0),Vt([dt({type:String,reflect:!0})],Rt.prototype,"name",void 0),Vt([dt({type:Boolean,reflect:!0,attribute:"icon-only"})],Rt.prototype,"iconOnly",void 0),Vt([dt({reflect:!0})],Rt.prototype,"type",void 0),Vt([dt()],Rt.prototype,"value",void 0),Rt=Vt([yt("vscode-button")],Rt);const Tt=[wt,n`
|
|
320
|
+
:host {
|
|
321
|
+
display: inline-flex;
|
|
322
|
+
align-items: stretch;
|
|
323
|
+
padding: 0;
|
|
324
|
+
border: none;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
::slotted(vscode-button:not(:first-child)) {
|
|
328
|
+
border-top-left-radius: 0;
|
|
329
|
+
border-bottom-left-radius: 0;
|
|
330
|
+
border-left-width: 0;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
::slotted(vscode-button:not(:last-child)) {
|
|
334
|
+
--divider-display: block;
|
|
335
|
+
|
|
336
|
+
border-top-right-radius: 0;
|
|
337
|
+
border-bottom-right-radius: 0;
|
|
338
|
+
border-right-width: 0;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
::slotted(vscode-button:focus) {
|
|
342
|
+
z-index: 1;
|
|
343
|
+
}
|
|
344
|
+
`];var Lt=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Ut=class extends xt{render(){return L` <slot></slot> `}};Ut.styles=Tt,Ut=Lt([(t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)})("vscode-button-group")],Ut);var qt=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};class Ht extends xt{constructor(){super(),this.focused=!1,this._prevTabindex=0,this._handleFocus=()=>{this.focused=!0},this._handleBlur=()=>{this.focused=!1}}connectedCallback(){super.connectedCallback(),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s),"disabled"===t&&this.hasAttribute("disabled")?(this._prevTabindex=this.tabIndex,this.tabIndex=-1):"disabled"!==t||this.hasAttribute("disabled")||(this.tabIndex=this._prevTabindex)}}qt([dt({type:Boolean,reflect:!0})],Ht.prototype,"focused",void 0);var Kt=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};const Wt=t=>{class e extends t{constructor(){super(...arguments),this._label="",this._slottedText=""}set label(t){this._label=t,""===this._slottedText&&this.setAttribute("aria-label",t)}get label(){return this._label}_handleSlotChange(){this._slottedText=this.textContent?this.textContent.trim():"",""!==this._slottedText&&this.setAttribute("aria-label",this._slottedText)}_renderLabelAttribute(){return""===this._slottedText?L`<span class="label-attr">${this._label}</span>`:L`${q}`}}return Kt([dt()],e.prototype,"label",null),e};var Gt=[n`
|
|
267
345
|
:host {
|
|
268
346
|
color: var(--vscode-foreground, #cccccc);
|
|
269
347
|
display: inline-block;
|
|
@@ -352,7 +430,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
352
430
|
:host([disabled]) .label {
|
|
353
431
|
cursor: default;
|
|
354
432
|
}
|
|
355
|
-
`];const
|
|
433
|
+
`];const Jt=[wt,Gt,n`
|
|
356
434
|
:host(:invalid) .icon,
|
|
357
435
|
:host([invalid]) .icon {
|
|
358
436
|
background-color: var(--vscode-inputValidation-errorBackground, #5a1d1d);
|
|
@@ -374,7 +452,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
374
452
|
outline: 1px solid var(--vscode-focusBorder, #0078d4);
|
|
375
453
|
outline-offset: -1px;
|
|
376
454
|
}
|
|
377
|
-
`];var
|
|
455
|
+
`];var Yt=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Xt=class extends(Wt(Ht)){set checked(t){this._checked=t,this._manageRequired(),this.requestUpdate()}get checked(){return this._checked}set required(t){this._required=t,this._manageRequired(),this.requestUpdate()}get required(){return this._required}get form(){return this._internals.form}get 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})),this.dispatchEvent(new CustomEvent("vsc-change",{detail:{checked:this.checked,label:this.label,value:this.value},bubbles:!0,composed:!0}))}_manageRequired(){!this.checked&&this.required?this._internals.setValidity({valueMissing:!0},"Please check this box if you want to proceed.",this._inputEl??void 0):this._internals.setValidity({})}render(){const t=Et({icon:!0,checked:this.checked,indeterminate:this.indeterminate}),e=Et({"label-inner":!0}),s=L`<svg
|
|
378
456
|
width="16"
|
|
379
457
|
height="16"
|
|
380
458
|
viewBox="0 0 16 16"
|
|
@@ -405,7 +483,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
405
483
|
</span>
|
|
406
484
|
</label>
|
|
407
485
|
</div>
|
|
408
|
-
`}};
|
|
486
|
+
`}};Xt.styles=Jt,Xt.formAssociated=!0,Xt.shadowRootOptions={...at.shadowRootOptions,delegatesFocus:!0},Yt([dt({type:Boolean,reflect:!0})],Xt.prototype,"autofocus",void 0),Yt([dt({type:Boolean,reflect:!0})],Xt.prototype,"checked",null),Yt([dt({type:Boolean,reflect:!0,attribute:"default-checked"})],Xt.prototype,"defaultChecked",void 0),Yt([dt({type:Boolean,reflect:!0})],Xt.prototype,"invalid",void 0),Yt([dt({reflect:!0})],Xt.prototype,"name",void 0),Yt([dt()],Xt.prototype,"value",void 0),Yt([dt({type:Boolean,reflect:!0})],Xt.prototype,"disabled",void 0),Yt([dt({type:Boolean,reflect:!0})],Xt.prototype,"indeterminate",void 0),Yt([dt({type:Boolean,reflect:!0})],Xt.prototype,"required",null),Yt([dt()],Xt.prototype,"type",void 0),Yt([pt("#input")],Xt.prototype,"_inputEl",void 0),Xt=Yt([yt("vscode-checkbox")],Xt);const Zt=[wt,n`
|
|
409
487
|
:host {
|
|
410
488
|
display: block;
|
|
411
489
|
}
|
|
@@ -435,11 +513,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
435
513
|
:host([variant='vertical']) ::slotted(vscode-checkbox:last-child) {
|
|
436
514
|
margin-bottom: 0;
|
|
437
515
|
}
|
|
438
|
-
`];var
|
|
516
|
+
`];var Qt=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let te=class extends xt{constructor(){super(...arguments),this.role="group",this.variant="horizontal"}render(){return L`
|
|
439
517
|
<div class="wrapper">
|
|
440
518
|
<slot></slot>
|
|
441
519
|
</div>
|
|
442
|
-
`}};
|
|
520
|
+
`}};te.styles=Zt,Qt([dt({reflect:!0})],te.prototype,"role",void 0),Qt([dt({reflect:!0})],te.prototype,"variant",void 0),te=Qt([yt("vscode-checkbox-group")],te);const ee=[wt,n`
|
|
443
521
|
.collapsible {
|
|
444
522
|
background-color: var(--vscode-sideBar-background, #181818);
|
|
445
523
|
}
|
|
@@ -528,7 +606,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
528
606
|
.collapsible.open .collapsible-body {
|
|
529
607
|
display: block;
|
|
530
608
|
}
|
|
531
|
-
`];var
|
|
609
|
+
`];var se=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let ie=class extends xt{constructor(){super(...arguments),this.title="",this.description="",this.open=!1}_emitToggleEvent(){this.dispatchEvent(new CustomEvent("vsc-collapsible-toggle",{detail:{open:this.open}}))}_onHeaderClick(){this.open=!this.open,this._emitToggleEvent()}_onHeaderKeyDown(t){"Enter"===t.key&&(this.open=!this.open,this._emitToggleEvent())}render(){const t=Et({collapsible:!0,open:this.open}),e=L`<svg
|
|
532
610
|
width="16"
|
|
533
611
|
height="16"
|
|
534
612
|
viewBox="0 0 16 16"
|
|
@@ -561,7 +639,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
561
639
|
<slot></slot>
|
|
562
640
|
</div>
|
|
563
641
|
</div>
|
|
564
|
-
`}};
|
|
642
|
+
`}};ie.styles=ee,se([dt({type:String})],ie.prototype,"title",void 0),se([dt()],ie.prototype,"description",void 0),se([dt({type:Boolean,reflect:!0})],ie.prototype,"open",void 0),ie=se([yt("vscode-collapsible")],ie);const oe=[wt,n`
|
|
565
643
|
:host {
|
|
566
644
|
display: block;
|
|
567
645
|
font-family: var(--vscode-font-family, sans-serif);
|
|
@@ -630,7 +708,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
630
708
|
padding: 0 22px;
|
|
631
709
|
text-align: right;
|
|
632
710
|
}
|
|
633
|
-
`];var
|
|
711
|
+
`];var re=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let ne=class extends xt{constructor(){super(...arguments),this.label="",this.keybinding="",this.value="",this.separator=!1,this.tabindex=0}onItemClick(){this.dispatchEvent(new CustomEvent("vsc-click",{detail:{label:this.label,keybinding:this.keybinding,value:this.value||this.label,separator:this.separator,tabindex:this.tabindex},bubbles:!0,composed:!0}))}render(){return L`
|
|
634
712
|
${this.separator?L`
|
|
635
713
|
<div class="context-menu-item separator">
|
|
636
714
|
<span class="ruler"></span>
|
|
@@ -643,7 +721,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
643
721
|
</a>
|
|
644
722
|
</div>
|
|
645
723
|
`}
|
|
646
|
-
`}};
|
|
724
|
+
`}};ne.styles=oe,re([dt({type:String})],ne.prototype,"label",void 0),re([dt({type:String})],ne.prototype,"keybinding",void 0),re([dt({type:String})],ne.prototype,"value",void 0),re([dt({type:Boolean,reflect:!0})],ne.prototype,"separator",void 0),re([dt({type:Number})],ne.prototype,"tabindex",void 0),ne=re([yt("vscode-context-menu-item")],ne);const ae=[wt,n`
|
|
647
725
|
:host {
|
|
648
726
|
display: block;
|
|
649
727
|
font-family: var(--vscode-font-family, sans-serif);
|
|
@@ -668,7 +746,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
668
746
|
.context-menu:focus {
|
|
669
747
|
outline: 0;
|
|
670
748
|
}
|
|
671
|
-
`];var
|
|
749
|
+
`];var ce=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let le=class extends xt{set data(t){this._data=t;const e=[];t.forEach(((t,s)=>{t.separator||e.push(s)})),this._clickableItemIndexes=e}get data(){return this._data}set show(t){this._show=t,this._selectedClickableItemIndex=-1,t&&this.updateComplete.then((()=>{this._wrapperEl&&this._wrapperEl.focus(),requestAnimationFrame((()=>{document.addEventListener("click",this._onClickOutsideBound,{once:!0})}))}))}get show(){return this._show}constructor(){super(),this.preventClose=!1,this.tabIndex=0,this._selectedClickableItemIndex=-1,this._show=!1,this._data=[],this._clickableItemIndexes=[],this._onClickOutsideBound=this._onClickOutside.bind(this),this.addEventListener("keydown",this._onKeyDown)}_onClickOutside(t){t.composedPath().includes(this)||(this.show=!1)}_onKeyDown(t){const{key:e}=t;switch("ArrowUp"!==e&&"ArrowDown"!==e&&"Escape"!==e&&"Enter"!==e||t.preventDefault(),e){case"ArrowUp":this._handleArrowUp();break;case"ArrowDown":this._handleArrowDown();break;case"Escape":this._handleEscape();break;case"Enter":this._handleEnter()}}_handleArrowUp(){0===this._selectedClickableItemIndex?this._selectedClickableItemIndex=this._clickableItemIndexes.length-1:this._selectedClickableItemIndex-=1}_handleArrowDown(){this._selectedClickableItemIndex+1<this._clickableItemIndexes.length?this._selectedClickableItemIndex+=1:this._selectedClickableItemIndex=0}_handleEscape(){this.show=!1,document.removeEventListener("click",this._onClickOutsideBound)}_dispatchSelectEvent(t){const{keybinding:e,label:s,value:i,separator:o,tabindex:r}=t;this.dispatchEvent(new CustomEvent("vsc-context-menu-select",{detail:{keybinding:e,label:s,separator:o,tabindex:r,value:i}}))}_dispatchLegacySelectEvent(t){const{keybinding:e,label:s,value:i,separator:o,tabindex:r}=t,n={keybinding:e,label:s,value:i,separator:o,tabindex:r};this.dispatchEvent(new CustomEvent("vsc-select",{detail:n,bubbles:!0,composed:!0}))}_handleEnter(){if(-1===this._selectedClickableItemIndex)return;const t=this._clickableItemIndexes[this._selectedClickableItemIndex],e=this._wrapperEl.querySelectorAll("vscode-context-menu-item")[t];this._dispatchLegacySelectEvent(e),this._dispatchSelectEvent(e),this.preventClose||(this.show=!1,document.removeEventListener("click",this._onClickOutsideBound))}_onItemClick(t){const e=t.currentTarget;this._dispatchLegacySelectEvent(e),this._dispatchSelectEvent(e),this.preventClose||(this.show=!1)}_onItemMouseOver(t){const e=t.target,s=e.dataset.index?+e.dataset.index:-1,i=this._clickableItemIndexes.findIndex((t=>t===s));-1!==i&&(this._selectedClickableItemIndex=i)}_onItemMouseOut(){this._selectedClickableItemIndex=-1}render(){if(!this._show)return L`${q}`;const t=this._clickableItemIndexes[this._selectedClickableItemIndex];return L`
|
|
672
750
|
<div class="context-menu" tabindex="0">
|
|
673
751
|
${this.data?this.data.map((({label:e="",keybinding:s="",value:i="",separator:o=!1,tabindex:r=0},n)=>L`
|
|
674
752
|
<vscode-context-menu-item
|
|
@@ -685,7 +763,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
685
763
|
></vscode-context-menu-item>
|
|
686
764
|
`)):L`<slot></slot>`}
|
|
687
765
|
</div>
|
|
688
|
-
`}};
|
|
766
|
+
`}};le.styles=ae,ce([dt({type:Array,attribute:!1})],le.prototype,"data",null),ce([dt({type:Boolean,reflect:!0,attribute:"prevent-close"})],le.prototype,"preventClose",void 0),ce([dt({type:Boolean,reflect:!0})],le.prototype,"show",null),ce([dt({type:Number,reflect:!0})],le.prototype,"tabIndex",void 0),ce([ut()],le.prototype,"_selectedClickableItemIndex",void 0),ce([ut()],le.prototype,"_show",void 0),ce([pt(".context-menu")],le.prototype,"_wrapperEl",void 0),le=ce([yt("vscode-context-menu")],le);const he=[wt,n`
|
|
689
767
|
:host {
|
|
690
768
|
background-color: var(--vscode-foreground, #cccccc);
|
|
691
769
|
display: block;
|
|
@@ -694,16 +772,16 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
694
772
|
margin-top: 10px;
|
|
695
773
|
opacity: 0.4;
|
|
696
774
|
}
|
|
697
|
-
`];var
|
|
775
|
+
`];var de=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let ue=class extends xt{constructor(){super(...arguments),this.role="separator"}render(){return L``}};ue.styles=he,de([dt({reflect:!0})],ue.prototype,"role",void 0),ue=de([yt("vscode-divider")],ue);const ve=[wt,n`
|
|
698
776
|
:host {
|
|
699
777
|
display: block;
|
|
700
778
|
max-width: 727px;
|
|
701
779
|
}
|
|
702
|
-
`];var
|
|
780
|
+
`];var pe,be=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};!function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(pe||(pe={}));const fe=t=>"vscode-checkbox"===t.tagName.toLocaleLowerCase(),ge=t=>"vscode-radio"===t.tagName.toLocaleLowerCase();let me=class extends xt{constructor(){super(...arguments),this.breakpoint=490,this._responsive=!1,this._firstUpdateComplete=!1,this._resizeObserverCallbackBound=this._resizeObserverCallback.bind(this)}set responsive(t){this._responsive=t,this._firstUpdateComplete&&(t?this._activateResponsiveLayout():this._deactivateResizeObserver())}get responsive(){return this._responsive}get data(){return this._collectFormData()}_collectFormData(){const t=["vscode-textfield","vscode-textarea","vscode-single-select","vscode-multi-select","vscode-checkbox","vscode-radio"].join(","),e=this.querySelectorAll(t),s={};return e.forEach((t=>{if(!t.hasAttribute("name"))return;const e=t.getAttribute("name");e&&(fe(t)&&t.checked?s[e]=Array.isArray(s[e])?[...s[e],t.value]:[t.value]:"vscode-multi-select"===t.tagName.toLocaleLowerCase()?s[e]=t.value:fe(t)&&!t.checked?s[e]=Array.isArray(s[e])?s[e]:[]:ge(t)&&t.checked||(t=>["vscode-textfield","vscode-textarea"].includes(t.tagName.toLocaleLowerCase()))(t)||(t=>"vscode-single-select"===t.tagName.toLocaleLowerCase())(t)?s[e]=t.value:ge(t)&&!t.checked&&(s[e]=s[e]?s[e]:""))})),s}_toggleCompactLayout(t){this._assignedFormGroups.forEach((e=>{e.dataset.originalVariant||(e.dataset.originalVariant=e.variant);const s=e.dataset.originalVariant;t===pe.VERTICAL&&"horizontal"===s?e.variant="vertical":e.variant=s;e.querySelectorAll("vscode-checkbox-group, vscode-radio-group").forEach((e=>{e.dataset.originalVariant||(e.dataset.originalVariant=e.variant);const s=e.dataset.originalVariant;t===pe.HORIZONTAL&&s===pe.HORIZONTAL?e.variant="horizontal":e.variant="vertical"}))}))}_resizeObserverCallback(t){let e=0;for(const s of t)e=s.contentRect.width;const s=e<this.breakpoint?pe.VERTICAL:pe.HORIZONTAL;s!==this._currentFormGroupLayout&&(this._toggleCompactLayout(s),this._currentFormGroupLayout=s)}_activateResponsiveLayout(){this._resizeObserver=new ResizeObserver(this._resizeObserverCallbackBound),this._resizeObserver.observe(this._wrapperElement)}_deactivateResizeObserver(){this._resizeObserver?.disconnect(),this._resizeObserver=null}firstUpdated(){this._firstUpdateComplete=!0,this._responsive&&this._activateResponsiveLayout()}render(){return L`
|
|
703
781
|
<div class="wrapper">
|
|
704
782
|
<slot></slot>
|
|
705
783
|
</div>
|
|
706
|
-
`}};
|
|
784
|
+
`}};me.styles=ve,be([dt({type:Boolean,reflect:!0})],me.prototype,"responsive",null),be([dt({type:Number})],me.prototype,"breakpoint",void 0),be([dt({type:Object})],me.prototype,"data",null),be([pt(".wrapper")],me.prototype,"_wrapperElement",void 0),be([ft({selector:"vscode-form-group"})],me.prototype,"_assignedFormGroups",void 0),me=be([yt("vscode-form-container")],me);const xe=[wt,n`
|
|
707
785
|
:host {
|
|
708
786
|
--label-right-margin: 14px;
|
|
709
787
|
--label-width: 150px;
|
|
@@ -788,11 +866,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
788
866
|
::slotted(vscode-button) {
|
|
789
867
|
margin-right: 4px;
|
|
790
868
|
}
|
|
791
|
-
`];var
|
|
869
|
+
`];var ye=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let we=class extends xt{constructor(){super(...arguments),this.variant="horizontal"}render(){return L`
|
|
792
870
|
<div class="wrapper">
|
|
793
871
|
<slot></slot>
|
|
794
872
|
</div>
|
|
795
|
-
`}};
|
|
873
|
+
`}};we.styles=xe,ye([dt({reflect:!0})],we.prototype,"variant",void 0),we=ye([yt("vscode-form-group")],we);const ke=[wt,n`
|
|
796
874
|
:host {
|
|
797
875
|
display: block;
|
|
798
876
|
line-height: 1.4em;
|
|
@@ -805,7 +883,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
805
883
|
:host([vertical]) {
|
|
806
884
|
margin-left: 0;
|
|
807
885
|
}
|
|
808
|
-
`];var
|
|
886
|
+
`];var $e=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};const _e=new CSSStyleSheet;_e.replaceSync("\n vscode-form-helper * {\n margin: 0;\n }\n\n vscode-form-helper *:not(:last-child) {\n margin-bottom: 8px;\n }\n");let Ce=class extends xt{constructor(){super(),this._injectLightDOMStyles()}_injectLightDOMStyles(){const t=document.adoptedStyleSheets.find((t=>t===_e));t||document.adoptedStyleSheets.push(_e)}render(){return L`<slot></slot>`}};Ce.styles=ke,Ce=$e([yt("vscode-form-helper")],Ce);let Be=0;const Se=(t="")=>(Be++,`${t}${Be}`),ze=[wt,n`
|
|
809
887
|
:host {
|
|
810
888
|
display: block;
|
|
811
889
|
}
|
|
@@ -835,14 +913,14 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
835
913
|
:host([variant='vertical']) ::slotted(vscode-radio:last-child) {
|
|
836
914
|
margin-bottom: 0;
|
|
837
915
|
}
|
|
838
|
-
`];var
|
|
916
|
+
`];var Oe=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Ae=class extends xt{constructor(){super(...arguments),this.variant="horizontal",this.role="radiogroup",this._focusedRadio=-1,this._checkedRadio=-1,this._firstContentLoaded=!1,this._onKeyDownBound=this._onKeyDown.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._onKeyDownBound)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._onKeyDownBound)}_uncheckPreviousChecked(t,e){-1!==t&&(this._radios[t].checked=!1),-1!==e&&(this._radios[e].tabIndex=-1)}_afterCheck(){this._focusedRadio=this._checkedRadio,this._radios[this._checkedRadio].checked=!0,this._radios[this._checkedRadio].tabIndex=0,this._radios[this._checkedRadio].focus()}_checkPrev(){const t=this._radios.findIndex((t=>t.checked)),e=this._radios.findIndex((t=>t.focused)),s=-1!==e?e:t;this._uncheckPreviousChecked(t,e),this._checkedRadio=-1===s?this._radios.length-1:s-1>=0?s-1:this._radios.length-1,this._afterCheck()}_checkNext(){const t=this._radios.findIndex((t=>t.checked)),e=this._radios.findIndex((t=>t.focused)),s=-1!==e?e:t;this._uncheckPreviousChecked(t,e),-1===s?this._checkedRadio=0:s+1<this._radios.length?this._checkedRadio=s+1:this._checkedRadio=0,this._afterCheck()}_onKeyDown(t){const{key:e}=t;["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"].includes(e)&&t.preventDefault(),"ArrowRight"!==e&&"ArrowDown"!==e||this._checkNext(),"ArrowLeft"!==e&&"ArrowUp"!==e||this._checkPrev()}_onChange(t){const e=this._radios.findIndex((e=>e===t.target));-1!==e&&(-1!==this._focusedRadio&&(this._radios[this._focusedRadio].tabIndex=-1),-1!==this._checkedRadio&&this._checkedRadio!==e&&(this._radios[this._checkedRadio].checked=!1),this._focusedRadio=e,this._checkedRadio=e,this._radios[e].tabIndex=0)}_onSlotChange(){if(!this._firstContentLoaded){const t=this._radios.findIndex((t=>t.autofocus));t>-1&&(this._focusedRadio=t),this._firstContentLoaded=!0}this._radios.forEach(((t,e)=>{this._focusedRadio>-1?t.tabIndex=e===this._focusedRadio?0:-1:t.tabIndex=0===e?0:-1}))}render(){return L`
|
|
839
917
|
<div class="wrapper">
|
|
840
918
|
<slot
|
|
841
919
|
@slotchange=${this._onSlotChange}
|
|
842
920
|
@vsc-change=${this._onChange}
|
|
843
921
|
></slot>
|
|
844
922
|
</div>
|
|
845
|
-
`}};
|
|
923
|
+
`}};Ae.styles=ze,Oe([dt({reflect:!0})],Ae.prototype,"variant",void 0),Oe([dt({reflect:!0})],Ae.prototype,"role",void 0),Oe([ft({selector:"vscode-radio"})],Ae.prototype,"_radios",void 0),Oe([ut()],Ae.prototype,"_focusedRadio",void 0),Oe([ut()],Ae.prototype,"_checkedRadio",void 0),Ae=Oe([yt("vscode-radio-group")],Ae);const Ee=[wt,n`
|
|
846
924
|
:host {
|
|
847
925
|
display: inline-block;
|
|
848
926
|
height: 40px;
|
|
@@ -973,25 +1051,25 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
973
1051
|
background-repeat: no-repeat;
|
|
974
1052
|
background-position: right bottom;
|
|
975
1053
|
}
|
|
976
|
-
`];var
|
|
1054
|
+
`];var je=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Ie=class extends xt{set value(t){this._value=t,this._internals.setFormValue(t)}get value(){return this._value}get wrappedElement(){return this._textareaEl}get form(){return this._internals.form}get type(){return"textarea"}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}set minlength(t){this.minLength=t}get minlength(){return this.minLength}set maxlength(t){this.maxLength=t}get maxlength(){return this.maxLength}constructor(){super(),this.autocomplete=void 0,this.autofocus=!1,this.defaultValue="",this.disabled=!1,this.invalid=!1,this.label="",this.maxLength=void 0,this.minLength=void 0,this.rows=void 0,this.cols=void 0,this.name=void 0,this.placeholder=void 0,this.readonly=!1,this.resize="none",this.required=!1,this.spellcheck=!1,this.monospace=!1,this._value="",this._textareaPointerCursor=!1,this._shadow=!1,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._textareaEl.checkValidity(),this._setValidityFromInput(),this._internals.setFormValue(this._textareaEl.value)}))}updated(t){const e=["maxLength","minLength","required"];for(const s of t.keys())if(e.includes(String(s))){this.updateComplete.then((()=>{this._setValidityFromInput()}));break}}formResetCallback(){this.value=this.defaultValue}formStateRestoreCallback(t,e){this.updateComplete.then((()=>{this._value=t}))}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}_setValidityFromInput(){this._internals.setValidity(this._textareaEl.validity,this._textareaEl.validationMessage,this._textareaEl)}_dataChanged(){this._value=this._textareaEl.value,this._internals.setFormValue(this._textareaEl.value)}_handleChange(t){this._dataChanged(),this._setValidityFromInput(),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("vsc-change",{detail:{data:this.value,originalEvent:t}}))}_handleInput(t){this._dataChanged(),this._setValidityFromInput(),this.dispatchEvent(new CustomEvent("vsc-input",{detail:{data:t.data,originalEvent:t}}))}_handleMouseMove(t){if(this._textareaEl.clientHeight>=this._textareaEl.scrollHeight)return void(this._textareaPointerCursor=!1);const e=this._textareaEl.getBoundingClientRect(),s=t.clientX;this._textareaPointerCursor=s>=e.left+e.width-14-2}_handleScroll(){this._shadow=this._textareaEl.scrollTop>0}render(){return L`
|
|
977
1055
|
<div
|
|
978
|
-
class=${
|
|
1056
|
+
class=${Et({shadow:!0,visible:this._shadow})}
|
|
979
1057
|
></div>
|
|
980
1058
|
<textarea
|
|
981
|
-
autocomplete=${
|
|
1059
|
+
autocomplete=${jt(this.autocomplete)}
|
|
982
1060
|
?autofocus=${this.autofocus}
|
|
983
1061
|
?disabled=${this.disabled}
|
|
984
1062
|
aria-label=${this.label}
|
|
985
1063
|
id="textarea"
|
|
986
|
-
class=${
|
|
987
|
-
maxlength=${
|
|
988
|
-
minlength=${
|
|
989
|
-
rows=${
|
|
990
|
-
cols=${
|
|
991
|
-
name=${
|
|
992
|
-
placeholder=${
|
|
1064
|
+
class=${Et({monospace:this.monospace,"cursor-pointer":this._textareaPointerCursor})}
|
|
1065
|
+
maxlength=${jt(this.maxLength)}
|
|
1066
|
+
minlength=${jt(this.minLength)}
|
|
1067
|
+
rows=${jt(this.rows)}
|
|
1068
|
+
cols=${jt(this.cols)}
|
|
1069
|
+
name=${jt(this.name)}
|
|
1070
|
+
placeholder=${jt(this.placeholder)}
|
|
993
1071
|
?readonly=${this.readonly}
|
|
994
|
-
.style=${
|
|
1072
|
+
.style=${It({resize:this.resize})}
|
|
995
1073
|
?required=${this.required}
|
|
996
1074
|
spellcheck=${this.spellcheck}
|
|
997
1075
|
@change=${this._handleChange}
|
|
@@ -1000,7 +1078,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1000
1078
|
@scroll=${this._handleScroll}
|
|
1001
1079
|
.value=${this._value}
|
|
1002
1080
|
></textarea>
|
|
1003
|
-
`}};
|
|
1081
|
+
`}};Ie.styles=Ee,Ie.formAssociated=!0,Ie.shadowRootOptions={...at.shadowRootOptions,delegatesFocus:!0},je([dt()],Ie.prototype,"autocomplete",void 0),je([dt({type:Boolean,reflect:!0})],Ie.prototype,"autofocus",void 0),je([dt({attribute:"default-value"})],Ie.prototype,"defaultValue",void 0),je([dt({type:Boolean,reflect:!0})],Ie.prototype,"disabled",void 0),je([dt({type:Boolean,reflect:!0})],Ie.prototype,"invalid",void 0),je([dt({attribute:!1})],Ie.prototype,"label",void 0),je([dt({type:Number})],Ie.prototype,"maxLength",void 0),je([dt({type:Number})],Ie.prototype,"minLength",void 0),je([dt({type:Number})],Ie.prototype,"rows",void 0),je([dt({type:Number})],Ie.prototype,"cols",void 0),je([dt()],Ie.prototype,"name",void 0),je([dt()],Ie.prototype,"placeholder",void 0),je([dt({type:Boolean,reflect:!0})],Ie.prototype,"readonly",void 0),je([dt()],Ie.prototype,"resize",void 0),je([dt({type:Boolean,reflect:!0})],Ie.prototype,"required",void 0),je([dt({type:Boolean})],Ie.prototype,"spellcheck",void 0),je([dt({type:Boolean,reflect:!0})],Ie.prototype,"monospace",void 0),je([dt()],Ie.prototype,"value",null),je([pt("#textarea")],Ie.prototype,"_textareaEl",void 0),je([ut()],Ie.prototype,"_value",void 0),je([ut()],Ie.prototype,"_textareaPointerCursor",void 0),je([ut()],Ie.prototype,"_shadow",void 0),Ie=je([yt("vscode-textarea")],Ie);const Me=r(kt()),Fe=[wt,n`
|
|
1004
1082
|
:host {
|
|
1005
1083
|
align-items: center;
|
|
1006
1084
|
background-color: var(--vscode-settings-textInputBackground, #313131);
|
|
@@ -1055,7 +1133,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1055
1133
|
box-sizing: border-box;
|
|
1056
1134
|
color: var(--vscode-settings-textInputForeground, #cccccc);
|
|
1057
1135
|
display: block;
|
|
1058
|
-
font-family: var(--vscode-font-family, ${
|
|
1136
|
+
font-family: var(--vscode-font-family, ${Me});
|
|
1059
1137
|
font-size: var(--vscode-font-size, 13px);
|
|
1060
1138
|
font-weight: var(--vscode-font-weight, 'normal');
|
|
1061
1139
|
line-height: 18px;
|
|
@@ -1089,7 +1167,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1089
1167
|
border-radius: 2px;
|
|
1090
1168
|
color: var(--vscode-button-foreground, #ffffff);
|
|
1091
1169
|
cursor: pointer;
|
|
1092
|
-
font-family: var(--vscode-font-family, ${
|
|
1170
|
+
font-family: var(--vscode-font-family, ${Me});
|
|
1093
1171
|
font-size: var(--vscode-font-size, 13px);
|
|
1094
1172
|
font-weight: var(--vscode-font-weight, 'normal');
|
|
1095
1173
|
line-height: 20px;
|
|
@@ -1099,26 +1177,26 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1099
1177
|
input[type='file']::file-selector-button:hover {
|
|
1100
1178
|
background-color: var(--vscode-button-hoverBackground, #026ec1);
|
|
1101
1179
|
}
|
|
1102
|
-
`];var
|
|
1180
|
+
`];var Pe=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Ne=class extends xt{set type(t){this._type=["color","date","datetime-local","email","file","month","number","password","search","tel","text","time","url","week"].includes(t)?t:"text"}get type(){return this._type}set value(t){"file"!==this.type&&(this._value=t,this._internals.setFormValue(t)),this.updateComplete.then((()=>{this._setValidityFromInput()}))}get value(){return this._value}set minlength(t){this.minLength=t}get minlength(){return this.minLength}set maxlength(t){this.maxLength=t}get maxlength(){return this.maxLength}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._setValidityFromInput(),this._internals.checkValidity()}reportValidity(){return this._setValidityFromInput(),this._internals.reportValidity()}get wrappedElement(){return this._inputEl}constructor(){super(),this.autocomplete=void 0,this.autofocus=!1,this.defaultValue="",this.disabled=!1,this.focused=!1,this.invalid=!1,this.label="",this.max=void 0,this.maxLength=void 0,this.min=void 0,this.minLength=void 0,this.multiple=!1,this.name=void 0,this.pattern=void 0,this.placeholder=void 0,this.readonly=!1,this.required=!1,this.step=void 0,this._value="",this._type="text",this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._inputEl.checkValidity(),this._setValidityFromInput(),this._internals.setFormValue(this._inputEl.value)}))}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s);["max","maxlength","min","minlength","pattern","required","step"].includes(t)&&this.updateComplete.then((()=>{this._setValidityFromInput()}))}formResetCallback(){this.value=this.defaultValue,this.requestUpdate()}formStateRestoreCallback(t,e){this.value=t}_dataChanged(){if(this._value=this._inputEl.value,"file"===this.type&&this._inputEl.files)for(const t of this._inputEl.files)this._internals.setFormValue(t);else this._internals.setFormValue(this._inputEl.value)}_setValidityFromInput(){this._inputEl&&this._internals.setValidity(this._inputEl.validity,this._inputEl.validationMessage,this._inputEl)}_onInput(t){this._dataChanged(),this._setValidityFromInput(),this.dispatchEvent(new CustomEvent("vsc-input",{detail:{data:t.data,originalEvent:t}}))}_onChange(t){this._dataChanged(),this._setValidityFromInput(),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("vsc-change",{detail:{data:this.value,originalEvent:t}}))}_onFocus(){this.focused=!0}_onBlur(){this.focused=!1}_onKeyDown(t){"Enter"===t.key&&this._internals.form&&this._internals.form?.requestSubmit()}render(){return L`
|
|
1103
1181
|
<slot name="content-before"></slot>
|
|
1104
1182
|
<input
|
|
1105
1183
|
id="input"
|
|
1106
1184
|
type=${this.type}
|
|
1107
1185
|
?autofocus=${this.autofocus}
|
|
1108
|
-
autocomplete=${
|
|
1186
|
+
autocomplete=${jt(this.autocomplete)}
|
|
1109
1187
|
aria-label=${this.label}
|
|
1110
1188
|
?disabled=${this.disabled}
|
|
1111
|
-
max=${
|
|
1112
|
-
maxlength=${
|
|
1113
|
-
min=${
|
|
1114
|
-
minlength=${
|
|
1189
|
+
max=${jt(this.max)}
|
|
1190
|
+
maxlength=${jt(this.maxLength)}
|
|
1191
|
+
min=${jt(this.min)}
|
|
1192
|
+
minlength=${jt(this.minLength)}
|
|
1115
1193
|
?multiple=${this.multiple}
|
|
1116
|
-
name=${
|
|
1117
|
-
pattern=${
|
|
1118
|
-
placeholder=${
|
|
1194
|
+
name=${jt(this.name)}
|
|
1195
|
+
pattern=${jt(this.pattern)}
|
|
1196
|
+
placeholder=${jt(this.placeholder)}
|
|
1119
1197
|
?readonly=${this.readonly}
|
|
1120
1198
|
?required=${this.required}
|
|
1121
|
-
step=${
|
|
1199
|
+
step=${jt(this.step)}
|
|
1122
1200
|
.value=${this._value}
|
|
1123
1201
|
@blur=${this._onBlur}
|
|
1124
1202
|
@change=${this._onChange}
|
|
@@ -1127,7 +1205,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1127
1205
|
@keydown=${this._onKeyDown}
|
|
1128
1206
|
>
|
|
1129
1207
|
<slot name="content-after"></slot>
|
|
1130
|
-
`}};
|
|
1208
|
+
`}};Ne.styles=Fe,Ne.formAssociated=!0,Ne.shadowRootOptions={...at.shadowRootOptions,delegatesFocus:!0},Pe([dt()],Ne.prototype,"autocomplete",void 0),Pe([dt({type:Boolean,reflect:!0})],Ne.prototype,"autofocus",void 0),Pe([dt({attribute:"default-value"})],Ne.prototype,"defaultValue",void 0),Pe([dt({type:Boolean,reflect:!0})],Ne.prototype,"disabled",void 0),Pe([dt({type:Boolean,reflect:!0})],Ne.prototype,"focused",void 0),Pe([dt({type:Boolean,reflect:!0})],Ne.prototype,"invalid",void 0),Pe([dt({attribute:!1})],Ne.prototype,"label",void 0),Pe([dt({type:Number})],Ne.prototype,"max",void 0),Pe([dt({type:Number})],Ne.prototype,"maxLength",void 0),Pe([dt({type:Number})],Ne.prototype,"min",void 0),Pe([dt({type:Number})],Ne.prototype,"minLength",void 0),Pe([dt({type:Boolean,reflect:!0})],Ne.prototype,"multiple",void 0),Pe([dt({reflect:!0})],Ne.prototype,"name",void 0),Pe([dt()],Ne.prototype,"pattern",void 0),Pe([dt()],Ne.prototype,"placeholder",void 0),Pe([dt({type:Boolean,reflect:!0})],Ne.prototype,"readonly",void 0),Pe([dt({type:Boolean,reflect:!0})],Ne.prototype,"required",void 0),Pe([dt({type:Number})],Ne.prototype,"step",void 0),Pe([dt({reflect:!0})],Ne.prototype,"type",null),Pe([dt()],Ne.prototype,"value",null),Pe([pt("#input")],Ne.prototype,"_inputEl",void 0),Pe([ut()],Ne.prototype,"_value",void 0),Pe([ut()],Ne.prototype,"_type",void 0),Ne=Pe([yt("vscode-textfield")],Ne);const De=[wt,n`
|
|
1131
1209
|
:host {
|
|
1132
1210
|
color: var(--vscode-foreground, #cccccc);
|
|
1133
1211
|
font-family: var(--vscode-font-family, sans-serif);
|
|
@@ -1155,13 +1233,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1155
1233
|
color: var(--vscode-foreground, #cccccc);
|
|
1156
1234
|
opacity: 0.9;
|
|
1157
1235
|
}
|
|
1158
|
-
`];var
|
|
1236
|
+
`];var Ve=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Re=class extends xt{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,s){super.attributeChangedCallback(t,e,s)}connectedCallback(){super.connectedCallback(),this._connected=!0,""===this._id&&(this._id=Se("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();(t instanceof Ae||t instanceof te)&&t.setAttribute("aria-labelledby",this._id);let e="";this.textContent&&(e=this.textContent.trim()),(t instanceof Ne||t instanceof Ie)&&(t.label=e)}_handleClick(){const t=this._getTarget();t&&"focus"in t&&t.focus()}render(){return L`
|
|
1159
1237
|
<label
|
|
1160
|
-
class=${
|
|
1238
|
+
class=${Et({wrapper:!0,required:this.required})}
|
|
1161
1239
|
@click=${this._handleClick}
|
|
1162
1240
|
><slot></slot
|
|
1163
1241
|
></label>
|
|
1164
|
-
`}};
|
|
1242
|
+
`}};Re.styles=De,Ve([dt({reflect:!0,attribute:"for"})],Re.prototype,"htmlFor",null),Ve([dt()],Re.prototype,"id",null),Ve([dt({type:Boolean,reflect:!0})],Re.prototype,"required",void 0),Re=Ve([yt("vscode-label")],Re);const Te=L`
|
|
1165
1243
|
<span class="icon">
|
|
1166
1244
|
<svg
|
|
1167
1245
|
width="16"
|
|
@@ -1177,26 +1255,26 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1177
1255
|
/>
|
|
1178
1256
|
</svg>
|
|
1179
1257
|
</span>
|
|
1180
|
-
`,{I:De}=it,Ve=()=>document.createComment(""),Te=(t,e,s)=>{const i=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=i.insertBefore(Ve(),o),r=i.insertBefore(Ve(),o);s=new De(e,r,t,t.options)}else{const e=s._$AB.nextSibling,r=s._$AM,n=r!==t;if(n){let e;s._$AQ?.(t),s._$AM=t,void 0!==s._$AP&&(e=t._$AU)!==r._$AU&&s._$AP(e)}if(e!==o||n){let t=s._$AA;for(;t!==e;){const e=t.nextSibling;i.insertBefore(t,o),t=e}}}return s},Re=(t,e,s=t)=>(t._$AI(e,s),t),Le={},Ue=t=>{t._$AP?.(!1,!0);let e=t._$AA;const s=t._$AB.nextSibling;for(;e!==s;){const t=e.nextSibling;e.remove(),e=t}},qe=(t,e,s)=>{const i=new Map;for(let o=e;o<=s;o++)i.set(t[o],o);return i},He=zt(class extends Ot{constructor(t){if(super(t),t.type!==Bt)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let i;void 0===s?s=e:void 0!==e&&(i=e);const o=[],r=[];let n=0;for(const e of t)o[n]=i?i(e,n):n,r[n]=s(e,n),n++;return{values:r,keys:o}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,i]){const o=(t=>t._$AH)(t),{values:r,keys:n}=this.dt(e,s,i);if(!Array.isArray(o))return this.ut=n,r;const l=this.ut??=[],a=[];let c,h,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])a[p]=Re(o[d],r[p]),d++,p++;else if(l[u]===n[v])a[v]=Re(o[u],r[v]),u--,v--;else if(l[d]===n[v])a[v]=Re(o[d],r[v]),Te(t,a[v+1],o[d]),d++,v--;else if(l[u]===n[p])a[p]=Re(o[u],r[p]),Te(t,o[d],o[u]),u--,p++;else if(void 0===c&&(c=qe(n,p,v),h=qe(l,d,u)),c.has(l[d]))if(c.has(l[u])){const e=h.get(n[p]),s=void 0!==e?o[e]:null;if(null===s){const e=Te(t,o[d]);Re(e,r[p]),a[p]=e}else a[p]=Re(s,r[p]),Te(t,o[d],s),o[e]=null;p++}else Ue(o[u]),u--;else Ue(o[d]),d++;for(;p<=v;){const e=Te(t,a[v+1]);Re(e,r[p]),a[p++]=e}for(;d<=u;){const t=o[d++];null!==t&&Ue(t)}return this.ut=n,((t,e=Le)=>{t._$AH=e})(t,a),U}});var Ke=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let We=class extends mt{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 L`<slot @slotchange=${this._handleSlotChange}></slot>`}};We.styles=yt,Ke([ht({type:String})],We.prototype,"value",void 0),Ke([ht({type:String})],We.prototype,"description",void 0),Ke([ht({type:Boolean,reflect:!0})],We.prototype,"selected",void 0),Ke([ht({type:Boolean,reflect:!0})],We.prototype,"disabled",void 0),We=Ke([xt("vscode-option")],We);const Ge=(t,e,s)=>{const i=[];return t.forEach((t=>{let o;switch(s){case"startsWithPerTerm":o=((t,e)=>{const s={match:!1,ranges:[]},i=t.toLowerCase(),o=e.toLowerCase(),r=i.split(" ");let n=0;return r.forEach(((e,i)=>{if(i>0&&(n+=r[i-1].length+1),s.match)return;const l=e.indexOf(o),a=o.length;0===l&&(s.match=!0,s.ranges.push([n+l,Math.min(n+l+a,t.length)]))})),s})(t.label,e);break;case"startsWith":o=((t,e)=>{const s={match:!1,ranges:[]};return 0===t.toLowerCase().indexOf(e.toLowerCase())&&(s.match=!0,s.ranges=[[0,e.length]]),s})(t.label,e);break;case"contains":o=((t,e)=>{const s={match:!1,ranges:[]},i=t.toLowerCase().indexOf(e.toLowerCase());return i>-1&&(s.match=!0,s.ranges=[[i,i+e.length]]),s})(t.label,e);break;default:o=((t,e)=>{const s={match:!1,ranges:[]};let i=0,o=0;const r=e.length-1,n=t.toLowerCase(),l=e.toLowerCase();for(let t=0;t<=r;t++){if(o=n.indexOf(l[t],i),-1===o)return{match:!1,ranges:[]};s.match=!0,s.ranges.push([o,o+1]),i=o+1}return s})(t.label,e)}o.match&&i.push({...t,ranges:o.ranges})})),i},Je=t=>{const e=[];return" "===t?(e.push(L` `),e):(0===t.indexOf(" ")&&e.push(L` `),e.push(L`${t.trimStart().trimEnd()}`),t.lastIndexOf(" ")===t.length-1&&e.push(L` `),e)};function Ye(t,e){let s=0;if(e<0||!t[e]||!t[e+1])return s;for(let i=e+1;i<t.length;i++)if(!t[i].disabled){s=i;break}return s}function Xe(t,e){let s=0;if(e<0||!t[e]||!t[e-1])return s;for(let i=e-1;i>=0;i--)if(!t[i].disabled){s=i;break}return s}var Ze=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};const Qe=22;class ts extends mt{set disabled(t){this._disabled=t,this.ariaDisabled=t?"true":"false",!0===t?(this._originalTabIndex=this.tabIndex,this.tabIndex=-1):(this.tabIndex=this._originalTabIndex??0,this._originalTabIndex=void 0),this.requestUpdate()}get disabled(){return this._disabled}set filter(t){["contains","fuzzy","startsWith","startsWithPerTerm"].includes(t)?this._filter=t:(this._filter="fuzzy",console.warn(`[VSCode Webview Elements] Invalid filter: "${t}", fallback to default. Valid values are: "contains", "fuzzy", "startsWith", "startsWithPerm".`,this))}get filter(){return this._filter}set options(t){this._options=t.map(((t,e)=>({...t,index:e})))}get options(){return this._options.map((({label:t,value:e,description:s,selected:i,disabled:o})=>({label:t,value:e,description:s,selected:i,disabled:o})))}constructor(){super(),this.ariaExpanded="false",this.creatable=!1,this.combobox=!1,this.invalid=!1,this.focused=!1,this.open=!1,this.position="below",this.tabIndex=0,this._firstUpdateCompleted=!1,this._activeIndex=-1,this._currentDescription="",this._filter="fuzzy",this._filterPattern="",this._selectedIndex=-1,this._selectedIndexes=[],this._options=[],this._value="",this._values=[],this._listScrollTop=0,this._isPlaceholderOptionActive=!1,this._isBeingFiltered=!1,this._multiple=!1,this._valueOptionIndexMap={},this._isHoverForbidden=!1,this._disabled=!1,this._originalTabIndex=void 0,this._onClickOutside=t=>{const e=t.composedPath().findIndex((t=>t===this));-1===e&&(this._toggleDropdown(!1),window.removeEventListener("click",this._onClickOutside))},this._onMouseMove=()=>{this._isHoverForbidden=!1,window.removeEventListener("mousemove",this._onMouseMove)},this._onComponentKeyDown=t=>{[" ","ArrowUp","ArrowDown","Escape"].includes(t.key)&&(t.stopPropagation(),t.preventDefault()),"Enter"===t.key&&this._onEnterKeyDown(t)," "===t.key&&this._onSpaceKeyDown(),"Escape"===t.key&&this._toggleDropdown(!1),"ArrowUp"===t.key&&this._onArrowUpKeyDown(),"ArrowDown"===t.key&&this._onArrowDownKeyDown()},this._onComponentFocus=()=>{this.focused=!0},this._onComponentBlur=()=>{this.focused=!1},this.addEventListener("vsc-option-state-change",(t=>{t.stopPropagation(),this._setStateFromSlottedElements(),this.requestUpdate()}))}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._onComponentKeyDown),this.addEventListener("focus",this._onComponentFocus),this.addEventListener("blur",this._onComponentBlur)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._onComponentKeyDown),this.removeEventListener("focus",this._onComponentFocus),this.removeEventListener("blur",this._onComponentBlur)}firstUpdated(t){this._firstUpdateCompleted=!0}willUpdate(t){t.has("required")&&this._firstUpdateCompleted&&this._manageRequired()}get _filteredOptions(){return this.combobox&&""!==this._filterPattern?Ge(this._options,this._filterPattern,this._filter):this._options}get _currentOptions(){return this.combobox?this._filteredOptions:this._options}get _isSuggestedOptionVisible(){if(!this.combobox||!this.creatable)return!1;const t=void 0!==this._valueOptionIndexMap[this._filterPattern],e=this._filterPattern.length>0;return!t&&e}_manageRequired(){}_setStateFromSlottedElements(){const t=[];let e=0;const s=this._assignedOptions??[],i=[],o=[];this._valueOptionIndexMap={},s.forEach(((s,r)=>{const{innerText:n,description:l,disabled:a}=s,c="string"==typeof s.value?s.value:n.trim(),h=s.selected??!1,d={label:n.trim(),value:c,description:l,selected:h,index:e,disabled:a};e=t.push(d),h&&!this._multiple&&(this._activeIndex=r),h&&(i.push(t.length-1),o.push(c)),this._valueOptionIndexMap[d.value]=d.index})),this._options=t,i.length>0&&(this._selectedIndex=i[0],this._selectedIndexes=i,this._value=o[0],this._values=o),this._multiple||this.combobox||0!==i.length||(this._selectedIndex=this._options.length>0?0:-1)}async _toggleDropdown(t){this.open=t,this.ariaExpanded=String(t),t&&!this._multiple&&(this._activeIndex=this._selectedIndex),!t||this._multiple||this.combobox||(this._activeIndex=this._selectedIndex,this._activeIndex>9&&(await this.updateComplete,this._listElement.scrollTop=Math.floor(this._activeIndex*Qe))),t?window.addEventListener("click",this._onClickOutside):window.removeEventListener("click",this._onClickOutside)}_createSuggestedOption(){const t=this._options.length,e=document.createElement("vscode-option");return e.value=this._filterPattern,rt(this._filterPattern,e),this.appendChild(e),t}_dispatchChangeEvent(){this._multiple?this.dispatchEvent(new CustomEvent("vsc-change",{detail:{selectedIndexes:this._selectedIndexes,value:this._values}})):this.dispatchEvent(new CustomEvent("vsc-change",{detail:{selectedIndex:this._selectedIndex,value:this._value}})),this.dispatchEvent(new Event("change")),this.dispatchEvent(new Event("input"))}async _createAndSelectSuggestedOption(){}_onFaceClick(){this._toggleDropdown(!this.open),this._multiple&&(this._activeIndex=0)}_toggleComboboxDropdown(){this._filterPattern="",this._toggleDropdown(!this.open),this._multiple&&(this._activeIndex=-1)}_onComboboxButtonClick(){this._toggleComboboxDropdown()}_onComboboxButtonKeyDown(t){"Enter"===t.key&&this._toggleComboboxDropdown()}_onOptionMouseOver(t){if(this._isHoverForbidden)return;const e=t.target;e.matches(".option")&&(e.matches(".placeholder")?(this._isPlaceholderOptionActive=!0,this._activeIndex=-1):(this._isPlaceholderOptionActive=!1,this._activeIndex=Number(this.combobox?e.dataset.filteredIndex:e.dataset.index)))}_onPlaceholderOptionMouseOut(){this._isPlaceholderOptionActive=!1}_onNoOptionsClick(t){t.stopPropagation()}_onEnterKeyDown(t){this._isBeingFiltered=!1;if(!!t?.composedPath&&t.composedPath().find((t=>!!t.matches&&t.matches("vscode-button.button-accept"))))return;const e=this.combobox?this._filteredOptions:this._options,s=!this.open;this._toggleDropdown(s),this._multiple||s||this._selectedIndex===this._activeIndex||(this._selectedIndex=this._activeIndex>-1?e[this._activeIndex].index:-1,this._value=this._selectedIndex>-1?this._options[this._selectedIndex].value:"",this._dispatchChangeEvent()),this.combobox&&(this._isPlaceholderOptionActive?this._createAndSelectSuggestedOption():(this._multiple||s||(this._selectedIndex=this._activeIndex>-1?this._filteredOptions[this._activeIndex].index:-1),!this._multiple&&s&&this.updateComplete.then((()=>{this._scrollActiveElementToTop()})))),this._multiple&&s&&(this._activeIndex=0)}_onSpaceKeyDown(){if(this.open){if(this.open&&this._multiple&&this._activeIndex>-1){const t=this.combobox?this._filteredOptions:this._options,e=t[this._activeIndex],s=[];this._options[e.index].selected=!e.selected,t.forEach((({index:t})=>{const{selected:e}=this._options[t];e&&s.push(t)})),this._selectedIndexes=s}}else this._toggleDropdown(!0)}_scrollActiveElementToTop(){this._listElement.scrollTop=Math.floor(this._activeIndex*Qe)}async _adjustOptionListScrollPos(t,e){let s=this.combobox?this._filteredOptions.length:this._options.length;if(this._isSuggestedOptionVisible&&(s+=1),s<=10)return;this._isHoverForbidden=!0,window.addEventListener("mousemove",this._onMouseMove);const i=this._listElement.scrollTop,o=e*Qe,r=o>=i&&o<=i+220-Qe;"down"===t&&(r||(this._listElement.scrollTop=e*Qe-198)),"up"===t&&(r||(this._listElement.scrollTop=Math.floor(this._activeIndex*Qe)))}_onArrowUpKeyDown(){if(this.open){if(this._activeIndex<=0&&(!this.combobox||!this.creatable))return;if(this._isPlaceholderOptionActive){const t=this._currentOptions.length-1;this._activeIndex=t,this._isPlaceholderOptionActive=!1}else{const t=Xe(this.combobox?this._filteredOptions:this._options,this._activeIndex);t>-1&&(this._activeIndex=t,this._adjustOptionListScrollPos("up",t))}}}_onArrowDownKeyDown(){let t=this.combobox?this._filteredOptions.length:this._options.length;const e=this.combobox?this._filteredOptions:this._options,s=this._isSuggestedOptionVisible;if(s&&(t+=1),this.open){if(this._isPlaceholderOptionActive&&-1===this._activeIndex)return;if(s&&this._activeIndex===t-2)this._isPlaceholderOptionActive=!0,this._adjustOptionListScrollPos("down",t-1),this._activeIndex=-1;else if(this._activeIndex<t-1){const t=Ye(e,this._activeIndex);t>-1&&(this._activeIndex=t,this._adjustOptionListScrollPos("down",t))}}}_onSlotChange(){this._setStateFromSlottedElements(),this.requestUpdate()}_onComboboxInputFocus(t){t.target.select(),this._isBeingFiltered=!1,this._filterPattern=""}_onComboboxInputBlur(){this._isBeingFiltered=!1}_onComboboxInputInput(t){this._isBeingFiltered=!0,this._filterPattern=t.target.value,this._activeIndex=-1,this._toggleDropdown(!0)}_onComboboxInputClick(){this._isBeingFiltered=""!==this._filterPattern,this._toggleDropdown(!0)}_onOptionClick(t){this._isBeingFiltered=!1}_renderOptions(){const t=this.combobox?this._filteredOptions:this._options;return L`
|
|
1258
|
+
`,{I:Le}=it,Ue=()=>document.createComment(""),qe=(t,e,s)=>{const i=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=i.insertBefore(Ue(),o),r=i.insertBefore(Ue(),o);s=new Le(e,r,t,t.options)}else{const e=s._$AB.nextSibling,r=s._$AM,n=r!==t;if(n){let e;s._$AQ?.(t),s._$AM=t,void 0!==s._$AP&&(e=t._$AU)!==r._$AU&&s._$AP(e)}if(e!==o||n){let t=s._$AA;for(;t!==e;){const e=t.nextSibling;i.insertBefore(t,o),t=e}}}return s},He=(t,e,s=t)=>(t._$AI(e,s),t),Ke={},We=t=>{t._$AP?.(!1,!0);let e=t._$AA;const s=t._$AB.nextSibling;for(;e!==s;){const t=e.nextSibling;e.remove(),e=t}},Ge=(t,e,s)=>{const i=new Map;for(let o=e;o<=s;o++)i.set(t[o],o);return i},Je=Ot(class extends At{constructor(t){if(super(t),t.type!==St)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let i;void 0===s?s=e:void 0!==e&&(i=e);const o=[],r=[];let n=0;for(const e of t)o[n]=i?i(e,n):n,r[n]=s(e,n),n++;return{values:r,keys:o}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,i]){const o=(t=>t._$AH)(t),{values:r,keys:n}=this.dt(e,s,i);if(!Array.isArray(o))return this.ut=n,r;const a=this.ut??=[],c=[];let l,h,d=0,u=o.length-1,v=0,p=r.length-1;for(;d<=u&&v<=p;)if(null===o[d])d++;else if(null===o[u])u--;else if(a[d]===n[v])c[v]=He(o[d],r[v]),d++,v++;else if(a[u]===n[p])c[p]=He(o[u],r[p]),u--,p--;else if(a[d]===n[p])c[p]=He(o[d],r[p]),qe(t,c[p+1],o[d]),d++,p--;else if(a[u]===n[v])c[v]=He(o[u],r[v]),qe(t,o[d],o[u]),u--,v++;else if(void 0===l&&(l=Ge(n,v,p),h=Ge(a,d,u)),l.has(a[d]))if(l.has(a[u])){const e=h.get(n[v]),s=void 0!==e?o[e]:null;if(null===s){const e=qe(t,o[d]);He(e,r[v]),c[v]=e}else c[v]=He(s,r[v]),qe(t,o[d],s),o[e]=null;v++}else We(o[u]),u--;else We(o[d]),d++;for(;v<=p;){const e=qe(t,c[p+1]);He(e,r[v]),c[v++]=e}for(;d<=u;){const t=o[d++];null!==t&&We(t)}return this.ut=n,((t,e=Ke)=>{t._$AH=e})(t,c),U}});var Ye=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Xe=class extends xt{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 L`<slot @slotchange=${this._handleSlotChange}></slot>`}};Xe.styles=wt,Ye([dt({type:String})],Xe.prototype,"value",void 0),Ye([dt({type:String})],Xe.prototype,"description",void 0),Ye([dt({type:Boolean,reflect:!0})],Xe.prototype,"selected",void 0),Ye([dt({type:Boolean,reflect:!0})],Xe.prototype,"disabled",void 0),Xe=Ye([yt("vscode-option")],Xe);const Ze=(t,e,s)=>{const i=[];return t.forEach((t=>{let o;switch(s){case"startsWithPerTerm":o=((t,e)=>{const s={match:!1,ranges:[]},i=t.toLowerCase(),o=e.toLowerCase(),r=i.split(" ");let n=0;return r.forEach(((e,i)=>{if(i>0&&(n+=r[i-1].length+1),s.match)return;const a=e.indexOf(o),c=o.length;0===a&&(s.match=!0,s.ranges.push([n+a,Math.min(n+a+c,t.length)]))})),s})(t.label,e);break;case"startsWith":o=((t,e)=>{const s={match:!1,ranges:[]};return 0===t.toLowerCase().indexOf(e.toLowerCase())&&(s.match=!0,s.ranges=[[0,e.length]]),s})(t.label,e);break;case"contains":o=((t,e)=>{const s={match:!1,ranges:[]},i=t.toLowerCase().indexOf(e.toLowerCase());return i>-1&&(s.match=!0,s.ranges=[[i,i+e.length]]),s})(t.label,e);break;default:o=((t,e)=>{const s={match:!1,ranges:[]};let i=0,o=0;const r=e.length-1,n=t.toLowerCase(),a=e.toLowerCase();for(let t=0;t<=r;t++){if(o=n.indexOf(a[t],i),-1===o)return{match:!1,ranges:[]};s.match=!0,s.ranges.push([o,o+1]),i=o+1}return s})(t.label,e)}o.match&&i.push({...t,ranges:o.ranges})})),i},Qe=t=>{const e=[];return" "===t?(e.push(L` `),e):(0===t.indexOf(" ")&&e.push(L` `),e.push(L`${t.trimStart().trimEnd()}`),t.lastIndexOf(" ")===t.length-1&&e.push(L` `),e)};function ts(t,e){let s=0;if(e<0||!t[e]||!t[e+1])return s;for(let i=e+1;i<t.length;i++)if(!t[i].disabled){s=i;break}return s}function es(t,e){let s=0;if(e<0||!t[e]||!t[e-1])return s;for(let i=e-1;i>=0;i--)if(!t[i].disabled){s=i;break}return s}var ss=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};const is=22;class os extends xt{set disabled(t){this._disabled=t,this.ariaDisabled=t?"true":"false",!0===t?(this._originalTabIndex=this.tabIndex,this.tabIndex=-1):(this.tabIndex=this._originalTabIndex??0,this._originalTabIndex=void 0),this.requestUpdate()}get disabled(){return this._disabled}set filter(t){["contains","fuzzy","startsWith","startsWithPerTerm"].includes(t)?this._filter=t:(this._filter="fuzzy",console.warn(`[VSCode Webview Elements] Invalid filter: "${t}", fallback to default. Valid values are: "contains", "fuzzy", "startsWith", "startsWithPerm".`,this))}get filter(){return this._filter}set options(t){this._options=t.map(((t,e)=>({...t,index:e})))}get options(){return this._options.map((({label:t,value:e,description:s,selected:i,disabled:o})=>({label:t,value:e,description:s,selected:i,disabled:o})))}constructor(){super(),this.ariaExpanded="false",this.creatable=!1,this.combobox=!1,this.invalid=!1,this.focused=!1,this.open=!1,this.position="below",this.tabIndex=0,this._firstUpdateCompleted=!1,this._activeIndex=-1,this._currentDescription="",this._filter="fuzzy",this._filterPattern="",this._selectedIndex=-1,this._selectedIndexes=[],this._options=[],this._value="",this._values=[],this._listScrollTop=0,this._isPlaceholderOptionActive=!1,this._isBeingFiltered=!1,this._multiple=!1,this._valueOptionIndexMap={},this._isHoverForbidden=!1,this._disabled=!1,this._originalTabIndex=void 0,this._onClickOutside=t=>{-1===t.composedPath().findIndex((t=>t===this))&&(this._toggleDropdown(!1),window.removeEventListener("click",this._onClickOutside))},this._onMouseMove=()=>{this._isHoverForbidden=!1,window.removeEventListener("mousemove",this._onMouseMove)},this._onComponentKeyDown=t=>{[" ","ArrowUp","ArrowDown","Escape"].includes(t.key)&&(t.stopPropagation(),t.preventDefault()),"Enter"===t.key&&this._onEnterKeyDown(t)," "===t.key&&this._onSpaceKeyDown(),"Escape"===t.key&&this._toggleDropdown(!1),"ArrowUp"===t.key&&this._onArrowUpKeyDown(),"ArrowDown"===t.key&&this._onArrowDownKeyDown()},this._onComponentFocus=()=>{this.focused=!0},this._onComponentBlur=()=>{this.focused=!1},this.addEventListener("vsc-option-state-change",(t=>{t.stopPropagation(),this._setStateFromSlottedElements(),this.requestUpdate()}))}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._onComponentKeyDown),this.addEventListener("focus",this._onComponentFocus),this.addEventListener("blur",this._onComponentBlur)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._onComponentKeyDown),this.removeEventListener("focus",this._onComponentFocus),this.removeEventListener("blur",this._onComponentBlur)}firstUpdated(t){this._firstUpdateCompleted=!0}willUpdate(t){t.has("required")&&this._firstUpdateCompleted&&this._manageRequired()}get _filteredOptions(){return this.combobox&&""!==this._filterPattern?Ze(this._options,this._filterPattern,this._filter):this._options}get _currentOptions(){return this.combobox?this._filteredOptions:this._options}get _isSuggestedOptionVisible(){if(!this.combobox||!this.creatable)return!1;const t=void 0!==this._valueOptionIndexMap[this._filterPattern],e=this._filterPattern.length>0;return!t&&e}_manageRequired(){}_setStateFromSlottedElements(){const t=[];let e=0;const s=this._assignedOptions??[],i=[],o=[];this._valueOptionIndexMap={},s.forEach(((s,r)=>{const{innerText:n,description:a,disabled:c}=s,l="string"==typeof s.value?s.value:n.trim(),h=s.selected??!1,d={label:n.trim(),value:l,description:a,selected:h,index:e,disabled:c};e=t.push(d),h&&!this._multiple&&(this._activeIndex=r),h&&(i.push(t.length-1),o.push(l)),this._valueOptionIndexMap[d.value]=d.index})),this._options=t,i.length>0&&(this._selectedIndex=i[0],this._selectedIndexes=i,this._value=o[0],this._values=o),this._multiple||this.combobox||0!==i.length||(this._selectedIndex=this._options.length>0?0:-1)}async _toggleDropdown(t){this.open=t,this.ariaExpanded=String(t),t&&!this._multiple&&(this._activeIndex=this._selectedIndex),!t||this._multiple||this.combobox||(this._activeIndex=this._selectedIndex,this._activeIndex>9&&(await this.updateComplete,this._listElement.scrollTop=Math.floor(this._activeIndex*is))),t?window.addEventListener("click",this._onClickOutside):window.removeEventListener("click",this._onClickOutside)}_createSuggestedOption(){const t=this._options.length,e=document.createElement("vscode-option");return e.value=this._filterPattern,rt(this._filterPattern,e),this.appendChild(e),t}_dispatchChangeEvent(){this._multiple?this.dispatchEvent(new CustomEvent("vsc-change",{detail:{selectedIndexes:this._selectedIndexes,value:this._values}})):this.dispatchEvent(new CustomEvent("vsc-change",{detail:{selectedIndex:this._selectedIndex,value:this._value}})),this.dispatchEvent(new Event("change")),this.dispatchEvent(new Event("input"))}async _createAndSelectSuggestedOption(){}_onFaceClick(){this._toggleDropdown(!this.open),this._multiple&&(this._activeIndex=0)}_toggleComboboxDropdown(){this._filterPattern="",this._toggleDropdown(!this.open),this._multiple&&(this._activeIndex=-1)}_onComboboxButtonClick(){this._toggleComboboxDropdown()}_onComboboxButtonKeyDown(t){"Enter"===t.key&&this._toggleComboboxDropdown()}_onOptionMouseOver(t){if(this._isHoverForbidden)return;const e=t.target;e.matches(".option")&&(e.matches(".placeholder")?(this._isPlaceholderOptionActive=!0,this._activeIndex=-1):(this._isPlaceholderOptionActive=!1,this._activeIndex=Number(this.combobox?e.dataset.filteredIndex:e.dataset.index)))}_onPlaceholderOptionMouseOut(){this._isPlaceholderOptionActive=!1}_onNoOptionsClick(t){t.stopPropagation()}_onEnterKeyDown(t){this._isBeingFiltered=!1;if(!!t?.composedPath&&t.composedPath().find((t=>!!t.matches&&t.matches("vscode-button.button-accept"))))return;const e=this.combobox?this._filteredOptions:this._options,s=!this.open;this._toggleDropdown(s),this._multiple||s||this._selectedIndex===this._activeIndex||(this._selectedIndex=this._activeIndex>-1?e[this._activeIndex].index:-1,this._value=this._selectedIndex>-1?this._options[this._selectedIndex].value:"",this._dispatchChangeEvent()),this.combobox&&(this._isPlaceholderOptionActive?this._createAndSelectSuggestedOption():(this._multiple||s||(this._selectedIndex=this._activeIndex>-1?this._filteredOptions[this._activeIndex].index:-1),!this._multiple&&s&&this.updateComplete.then((()=>{this._scrollActiveElementToTop()})))),this._multiple&&s&&(this._activeIndex=0)}_onSpaceKeyDown(){if(this.open){if(this.open&&this._multiple&&this._activeIndex>-1){const t=this.combobox?this._filteredOptions:this._options,e=t[this._activeIndex],s=[];this._options[e.index].selected=!e.selected,t.forEach((({index:t})=>{const{selected:e}=this._options[t];e&&s.push(t)})),this._selectedIndexes=s}}else this._toggleDropdown(!0)}_scrollActiveElementToTop(){this._listElement.scrollTop=Math.floor(this._activeIndex*is)}async _adjustOptionListScrollPos(t,e){let s=this.combobox?this._filteredOptions.length:this._options.length;if(this._isSuggestedOptionVisible&&(s+=1),s<=10)return;this._isHoverForbidden=!0,window.addEventListener("mousemove",this._onMouseMove);const i=this._listElement.scrollTop,o=e*is,r=o>=i&&o<=i+220-is;"down"===t&&(r||(this._listElement.scrollTop=e*is-198)),"up"===t&&(r||(this._listElement.scrollTop=Math.floor(this._activeIndex*is)))}_onArrowUpKeyDown(){if(this.open){if(this._activeIndex<=0&&(!this.combobox||!this.creatable))return;if(this._isPlaceholderOptionActive){const t=this._currentOptions.length-1;this._activeIndex=t,this._isPlaceholderOptionActive=!1}else{const t=es(this.combobox?this._filteredOptions:this._options,this._activeIndex);t>-1&&(this._activeIndex=t,this._adjustOptionListScrollPos("up",t))}}}_onArrowDownKeyDown(){let t=this.combobox?this._filteredOptions.length:this._options.length;const e=this.combobox?this._filteredOptions:this._options,s=this._isSuggestedOptionVisible;if(s&&(t+=1),this.open){if(this._isPlaceholderOptionActive&&-1===this._activeIndex)return;if(s&&this._activeIndex===t-2)this._isPlaceholderOptionActive=!0,this._adjustOptionListScrollPos("down",t-1),this._activeIndex=-1;else if(this._activeIndex<t-1){const t=ts(e,this._activeIndex);t>-1&&(this._activeIndex=t,this._adjustOptionListScrollPos("down",t))}}}_onSlotChange(){this._setStateFromSlottedElements(),this.requestUpdate()}_onComboboxInputFocus(t){t.target.select(),this._isBeingFiltered=!1,this._filterPattern=""}_onComboboxInputBlur(){this._isBeingFiltered=!1}_onComboboxInputInput(t){this._isBeingFiltered=!0,this._filterPattern=t.target.value,this._activeIndex=-1,this._toggleDropdown(!0)}_onComboboxInputClick(){this._isBeingFiltered=""!==this._filterPattern,this._toggleDropdown(!0)}_onOptionClick(t){this._isBeingFiltered=!1}_renderOptions(){const t=this.combobox?this._filteredOptions:this._options;return L`
|
|
1181
1259
|
<ul
|
|
1182
1260
|
class="options"
|
|
1183
1261
|
@click=${this._onOptionClick}
|
|
1184
1262
|
@mouseover=${this._onOptionMouseOver}
|
|
1185
1263
|
>
|
|
1186
|
-
${
|
|
1264
|
+
${Je(t,(t=>t.index),((t,e)=>{const s={active:e===this._activeIndex&&!t.disabled,disabled:t.disabled,option:!0,selected:t.selected},i={"checkbox-icon":!0,checked:t.selected},o=t.ranges?.length?((t,e)=>{const s=[],i=e.length;return i<1?L`${t}`:(e.forEach(((o,r)=>{const n=t.substring(o[0],o[1]);0===r&&0!==o[0]&&s.push(...Qe(t.substring(0,e[0][0]))),r>0&&r<i&&o[0]-e[r-1][1]!=0&&s.push(...Qe(t.substring(e[r-1][1],o[0]))),s.push(L`<b>${Qe(n)}</b>`),r===i-1&&o[1]<t.length&&s.push(...Qe(t.substring(o[1],t.length)))})),s)})(t.label,t.ranges??[]):t.label;return L`
|
|
1187
1265
|
<li
|
|
1188
|
-
class=${
|
|
1266
|
+
class=${Et(s)}
|
|
1189
1267
|
data-index=${t.index}
|
|
1190
1268
|
data-filtered-index=${e}
|
|
1191
1269
|
>
|
|
1192
|
-
${this._multiple?L`<span class=${
|
|
1270
|
+
${this._multiple?L`<span class=${Et(i)}></span
|
|
1193
1271
|
><span class="option-label">${o}</span>`:o}
|
|
1194
1272
|
</li>
|
|
1195
1273
|
`}))}
|
|
1196
1274
|
${this._renderPlaceholderOption(t.length<1)}
|
|
1197
1275
|
</ul>
|
|
1198
1276
|
`}_renderPlaceholderOption(t){return this.combobox?this._valueOptionIndexMap[this._filterPattern]?q:this.creatable&&this._filterPattern.length>0?L`<li
|
|
1199
|
-
class=${
|
|
1277
|
+
class=${Et({option:!0,placeholder:!0,active:this._isPlaceholderOptionActive})}
|
|
1200
1278
|
@mouseout=${this._onPlaceholderOptionMouseOut}
|
|
1201
1279
|
>
|
|
1202
1280
|
Add "${this._filterPattern}"
|
|
@@ -1226,10 +1304,10 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1226
1304
|
@click=${this._onComboboxButtonClick}
|
|
1227
1305
|
@keydown=${this._onComboboxButtonKeyDown}
|
|
1228
1306
|
>
|
|
1229
|
-
${
|
|
1307
|
+
${Te}
|
|
1230
1308
|
</button>
|
|
1231
1309
|
</div>
|
|
1232
|
-
`}_renderDropdownControls(){return L`${q}`}_renderDropdown(){const t=
|
|
1310
|
+
`}_renderDropdownControls(){return L`${q}`}_renderDropdown(){const t=Et({dropdown:!0,multiple:this._multiple});return L`
|
|
1233
1311
|
<div class=${t}>
|
|
1234
1312
|
${"above"===this.position?this._renderDescription():q}
|
|
1235
1313
|
${this._renderOptions()} ${this._renderDropdownControls()}
|
|
@@ -1239,7 +1317,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1239
1317
|
<slot class="main-slot" @slotchange=${this._onSlotChange}></slot>
|
|
1240
1318
|
${this.combobox?this._renderComboboxFace():this._renderSelectFace()}
|
|
1241
1319
|
${this.open?this._renderDropdown():q}
|
|
1242
|
-
`}}
|
|
1320
|
+
`}}ss([dt({type:String,reflect:!0,attribute:"aria-expanded"})],os.prototype,"ariaExpanded",void 0),ss([dt({type:Boolean,reflect:!0})],os.prototype,"creatable",void 0),ss([dt({type:Boolean,reflect:!0})],os.prototype,"combobox",void 0),ss([dt({type:Boolean,reflect:!0})],os.prototype,"disabled",null),ss([dt({type:Boolean,reflect:!0})],os.prototype,"invalid",void 0),ss([dt()],os.prototype,"filter",null),ss([dt({type:Boolean,reflect:!0})],os.prototype,"focused",void 0),ss([dt({type:Boolean,reflect:!0})],os.prototype,"open",void 0),ss([dt({type:Array})],os.prototype,"options",null),ss([dt({reflect:!0})],os.prototype,"position",void 0),ss([dt({type:Number,attribute:!0,reflect:!0})],os.prototype,"tabIndex",void 0),ss([ft({flatten:!0,selector:"vscode-option"})],os.prototype,"_assignedOptions",void 0),ss([ut()],os.prototype,"_activeIndex",void 0),ss([ut()],os.prototype,"_currentDescription",void 0),ss([ut()],os.prototype,"_filter",void 0),ss([ut()],os.prototype,"_filteredOptions",null),ss([ut()],os.prototype,"_filterPattern",void 0),ss([ut()],os.prototype,"_selectedIndex",void 0),ss([ut()],os.prototype,"_selectedIndexes",void 0),ss([ut()],os.prototype,"_options",void 0),ss([ut()],os.prototype,"_value",void 0),ss([ut()],os.prototype,"_values",void 0),ss([ut()],os.prototype,"_listScrollTop",void 0),ss([ut()],os.prototype,"_isPlaceholderOptionActive",void 0),ss([ut()],os.prototype,"_isBeingFiltered",void 0),ss([pt(".options")],os.prototype,"_listElement",void 0);var rs=[wt,n`
|
|
1243
1321
|
:host {
|
|
1244
1322
|
display: inline-block;
|
|
1245
1323
|
max-width: 100%;
|
|
@@ -1626,7 +1704,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1626
1704
|
:host([position='above']) .description {
|
|
1627
1705
|
border-width: 0 0 1px;
|
|
1628
1706
|
}
|
|
1629
|
-
`],
|
|
1707
|
+
`],ns=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let as=class extends os{set selectedIndexes(t){const e=[];t.forEach((t=>{void 0!==this._options[t]&&(e.includes(t)||(this._options[t].selected=!0,e.push(t)))})),this._selectedIndexes=e}get selectedIndexes(){return this._selectedIndexes}set value(t){const e=Array.isArray(t)?t.map((t=>String(t))):[String(t)];this._values=[],this._selectedIndexes.forEach((t=>{this._options[t].selected=!1})),this._selectedIndexes=[],e.forEach((t=>{"number"==typeof this._valueOptionIndexMap[t]&&(this._selectedIndexes.push(this._valueOptionIndexMap[t]),this._options[this._valueOptionIndexMap[t]].selected=!0,this._values.push(t))})),this._selectedIndexes.length>0?this._requestedValueToSetLater=[]:this._requestedValueToSetLater=Array.isArray(t)?t:[t],this._setFormValue(),this._manageRequired()}get value(){return this._values}get form(){return this._internals.form}get type(){return"select-multiple"}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}constructor(){super(),this.defaultValue=[],this.required=!1,this.name=void 0,this._requestedValueToSetLater=[],this._onOptionClick=t=>{const e=t.composedPath().find((t=>"matches"in t&&t.matches("li.option")));if(!e)return;if(e.classList.contains("placeholder"))return void this._createAndSelectSuggestedOption();const s=Number(e.dataset.index);if(this._options[s]){if(this._options[s].disabled)return;this._options[s].selected=!this._options[s].selected}this._selectedIndexes=[],this._values=[],this._options.forEach((t=>{t.selected&&(this._selectedIndexes.push(t.index),this._values.push(t.value))})),this._setFormValue(),this._manageRequired(),this._dispatchChangeEvent()},this._multiple=!0,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._setDefaultValue(),this._manageRequired()}))}formResetCallback(){this.updateComplete.then((()=>{this.value=this.defaultValue}))}formStateRestoreCallback(t,e){const s=Array.from(t.entries()).map((t=>String(t[1])));this.updateComplete.then((()=>{this.value=s}))}_setDefaultValue(){if(Array.isArray(this.defaultValue)&&this.defaultValue.length>0){const t=this.defaultValue.map((t=>String(t)));this.value=t}}_manageRequired(){const{value:t}=this;0===t.length&&this.required?this._internals.setValidity({valueMissing:!0},"Please select an item in the list.",this._faceElement):this._internals.setValidity({})}_setFormValue(){const t=new FormData;this._values.forEach((e=>{t.append(this.name??"",e)})),this._internals.setFormValue(t)}async _createAndSelectSuggestedOption(){super._createAndSelectSuggestedOption();const t=this._createSuggestedOption();await this.updateComplete,this.selectedIndexes=[...this.selectedIndexes,t],this._dispatchChangeEvent();const e=new CustomEvent("vsc-multi-select-create-option",{detail:{value:this._options[t]?.value??""}});this.dispatchEvent(e),this._toggleDropdown(!1),this._isPlaceholderOptionActive=!1}_onSlotChange(){super._onSlotChange(),this._requestedValueToSetLater.length>0&&this.options.forEach(((t,e)=>{this._requestedValueToSetLater.includes(t.value)&&(this._selectedIndexes.push(e),this._values.push(t.value),this._options[e].selected=!0,this._requestedValueToSetLater=this._requestedValueToSetLater.filter((e=>e!==t.value)))}))}_onMultiAcceptClick(){this._toggleDropdown(!1)}_onMultiDeselectAllClick(){this._selectedIndexes=[],this._values=[],this._options=this._options.map((t=>({...t,selected:!1}))),this._manageRequired(),this._dispatchChangeEvent()}_onMultiSelectAllClick(){this._selectedIndexes=[],this._values=[],this._options=this._options.map((t=>({...t,selected:!0}))),this._options.forEach(((t,e)=>{this._selectedIndexes.push(e),this._values.push(t.value),this._dispatchChangeEvent()})),this._setFormValue(),this._manageRequired()}_renderLabel(){switch(this._selectedIndexes.length){case 0:return L`<span class="select-face-badge no-item"
|
|
1630
1708
|
>No items selected</span
|
|
1631
1709
|
>`;case 1:return L`<span class="select-face-badge">1 item selected</span>`;default:return L`<span class="select-face-badge"
|
|
1632
1710
|
>${this._selectedIndexes.length} items selected</span
|
|
@@ -1636,7 +1714,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1636
1714
|
@click=${this._onFaceClick}
|
|
1637
1715
|
tabindex=${this.tabIndex>-1?0:-1}
|
|
1638
1716
|
>
|
|
1639
|
-
${this._renderLabel()} ${
|
|
1717
|
+
${this._renderLabel()} ${Te}
|
|
1640
1718
|
</div>
|
|
1641
1719
|
`}_renderDropdownControls(){return this._filteredOptions.length>0?L`
|
|
1642
1720
|
<div class="dropdown-controls">
|
|
@@ -1664,7 +1742,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1664
1742
|
>OK</vscode-button
|
|
1665
1743
|
>
|
|
1666
1744
|
</div>
|
|
1667
|
-
`:L`${q}`}};
|
|
1745
|
+
`:L`${q}`}};as.styles=rs,as.shadowRootOptions={...at.shadowRootOptions,delegatesFocus:!0},as.formAssociated=!0,ns([dt({type:Array,attribute:"default-value"})],as.prototype,"defaultValue",void 0),ns([dt({type:Boolean,reflect:!0})],as.prototype,"required",void 0),ns([dt({reflect:!0})],as.prototype,"name",void 0),ns([dt({type:Array,attribute:!1})],as.prototype,"selectedIndexes",null),ns([dt({type:Array})],as.prototype,"value",null),ns([pt(".face")],as.prototype,"_faceElement",void 0),as=ns([yt("vscode-multi-select")],as);const cs=[wt,n`
|
|
1668
1746
|
:host {
|
|
1669
1747
|
align-items: center;
|
|
1670
1748
|
display: block;
|
|
@@ -1710,7 +1788,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1710
1788
|
transform: rotate(1080deg);
|
|
1711
1789
|
}
|
|
1712
1790
|
}
|
|
1713
|
-
`];var
|
|
1791
|
+
`];var ls=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let hs=class extends xt{constructor(){super(...arguments),this.ariaLabel="Loading",this.ariaLive="assertive",this.role="alert"}render(){return L`<svg class="progress" part="progress" viewBox="0 0 16 16">
|
|
1714
1792
|
<circle
|
|
1715
1793
|
class="background"
|
|
1716
1794
|
part="background"
|
|
@@ -1725,7 +1803,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1725
1803
|
cy="8px"
|
|
1726
1804
|
r="7px"
|
|
1727
1805
|
></circle>
|
|
1728
|
-
</svg>`}};
|
|
1806
|
+
</svg>`}};hs.styles=cs,ls([dt({reflect:!0,attribute:"aria-label"})],hs.prototype,"ariaLabel",void 0),ls([dt({reflect:!0,attribute:"aria-live"})],hs.prototype,"ariaLive",void 0),ls([dt({reflect:!0})],hs.prototype,"role",void 0),hs=ls([yt("vscode-progress-ring")],hs);const ds=[wt,Gt,n`
|
|
1729
1807
|
:host(:invalid) .icon,
|
|
1730
1808
|
:host([invalid]) .icon {
|
|
1731
1809
|
background-color: var(--vscode-inputValidation-errorBackground, #5a1d1d);
|
|
@@ -1752,7 +1830,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1752
1830
|
outline: 1px solid var(--vscode-focusBorder, #0078d4);
|
|
1753
1831
|
outline-offset: -1px;
|
|
1754
1832
|
}
|
|
1755
|
-
`];var
|
|
1833
|
+
`];var us=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let vs=class extends(Wt(Ht)){constructor(){super(),this.autofocus=!1,this.checked=!1,this.defaultChecked=!1,this.invalid=!1,this.name="",this.value="",this.disabled=!1,this.required=!1,this.role="radio",this.tabIndex=0,this._slottedText="",this.type="radio",this._handleClick=()=>{this.disabled||this.checked||(this._checkButton(),this._handleValueChange(),this._dispatchCustomEvent(),this.dispatchEvent(new Event("change",{bubbles:!0})))},this._handleKeyDown=t=>{this.disabled||"Enter"!==t.key&&" "!==t.key||(t.preventDefault()," "!==t.key||this.checked||(this.checked=!0,this._handleValueChange(),this._dispatchCustomEvent(),this.dispatchEvent(new Event("change",{bubbles:!0}))),"Enter"===t.key&&this._internals.form?.requestSubmit())},this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("click",this._handleClick),this._handleValueChange()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("click",this._handleClick)}update(t){super.update(t),t.has("checked")&&this._handleValueChange(),t.has("required")&&this._handleValueChange()}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()}formResetCallback(){this._getRadios().forEach((t=>{t.checked=t.defaultChecked})),this.updateComplete.then((()=>{this._handleValueChange()}))}formStateRestoreCallback(t,e){this.value===t&&""!==t&&(this.checked=!0)}_dispatchCustomEvent(){this.dispatchEvent(new CustomEvent("vsc-change",{detail:{checked:this.checked,label:this.label,value:this.value},bubbles:!0,composed:!0}))}_getRadios(){const t=this.getRootNode({composed:!0});if(!t)return[];const e=t.querySelectorAll(`vscode-radio[name="${this.name}"]`);return Array.from(e)}_uncheckOthers(t){t.forEach((t=>{t!==this&&(t.checked=!1)}))}_checkButton(){const t=this._getRadios();this.checked=!0,t.forEach((t=>{t!==this&&(t.checked=!1)}))}setComponentValidity(t){t?this._internals.setValidity({}):this._internals.setValidity({valueMissing:!0},"Please select one of these options.",this._inputEl)}_setGroupValidity(t,e){this.updateComplete.then((()=>{t.forEach((t=>{t.setComponentValidity(e)}))}))}_setActualFormValue(){let t="";t=this.checked?this.value?this.value:"on":null,this._internals.setFormValue(t)}_handleValueChange(){const t=this._getRadios(),e=t.some((t=>t.required));if(this._setActualFormValue(),this.checked)this._uncheckOthers(t),this._setGroupValidity(t,!0);else{const s=!!t.find((t=>t.checked)),i=e&&!s;this._setGroupValidity(t,!i)}}render(){const t=Et({icon:!0,checked:this.checked}),e=Et({"label-inner":!0,"is-slot-empty":""===this._slottedText});return L`
|
|
1756
1834
|
<div class="wrapper">
|
|
1757
1835
|
<input
|
|
1758
1836
|
?autofocus=${this.autofocus}
|
|
@@ -1771,15 +1849,15 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1771
1849
|
</span>
|
|
1772
1850
|
</label>
|
|
1773
1851
|
</div>
|
|
1774
|
-
`}};
|
|
1852
|
+
`}};vs.styles=ds,vs.formAssociated=!0,vs.shadowRootOptions={...at.shadowRootOptions,delegatesFocus:!0},us([dt({type:Boolean,reflect:!0})],vs.prototype,"autofocus",void 0),us([dt({type:Boolean,reflect:!0})],vs.prototype,"checked",void 0),us([dt({type:Boolean,reflect:!0,attribute:"default-checked"})],vs.prototype,"defaultChecked",void 0),us([dt({type:Boolean,reflect:!0})],vs.prototype,"invalid",void 0),us([dt({reflect:!0})],vs.prototype,"name",void 0),us([dt()],vs.prototype,"value",void 0),us([dt({type:Boolean,reflect:!0})],vs.prototype,"disabled",void 0),us([dt({type:Boolean,reflect:!0})],vs.prototype,"required",void 0),us([dt({reflect:!0})],vs.prototype,"role",void 0),us([dt({type:Number,reflect:!0})],vs.prototype,"tabIndex",void 0),us([ut()],vs.prototype,"_slottedText",void 0),us([pt("#input")],vs.prototype,"_inputEl",void 0),us([dt()],vs.prototype,"type",void 0),vs=us([yt("vscode-radio")],vs);var ps=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let bs=class extends os{set selectedIndex(t){this._selectedIndex=t,this._options[t]?(this._activeIndex=t,this._value=this._options[t].value,this._internals.setFormValue(this._value),this._manageRequired()):(this._value="",this._internals.setFormValue(""),this._manageRequired())}get selectedIndex(){return this._selectedIndex}set value(t){this._options[this._selectedIndex]&&(this._options[this._selectedIndex].selected=!1),this._selectedIndex=this._options.findIndex((e=>e.value===t)),this._selectedIndex>-1?(this._options[this._selectedIndex].selected=!0,this._value=t,this._requestedValueToSetLater=""):(this._value="",this._requestedValueToSetLater=t),this._internals.setFormValue(this._value),this._manageRequired()}get value(){return this._options[this._selectedIndex]?this._options[this._selectedIndex]?.value??"":""}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}updateInputValue(){if(!this.combobox)return;const t=this.renderRoot.querySelector(".combobox-input");t&&(t.value=this._options[this._selectedIndex]?this._options[this._selectedIndex].label:"")}constructor(){super(),this.defaultValue="",this.role="listbox",this.name=void 0,this.required=!1,this._requestedValueToSetLater="",this._multiple=!1,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._manageRequired()}))}formResetCallback(){this.value=this.defaultValue}formStateRestoreCallback(t,e){this.updateComplete.then((()=>{this.value=t}))}get type(){return"select-one"}get form(){return this._internals.form}async _createAndSelectSuggestedOption(){const t=this._createSuggestedOption();await this.updateComplete,this.selectedIndex=t,this._dispatchChangeEvent();const e=new CustomEvent("vsc-single-select-create-option",{detail:{value:this._options[t]?.value??""}});this.dispatchEvent(e),this._toggleDropdown(!1),this._isPlaceholderOptionActive=!1}_onSlotChange(){if(super._onSlotChange(),this._requestedValueToSetLater){const t=this._options.findIndex((t=>t.value===this._requestedValueToSetLater));t>0&&(this._selectedIndex=t,this._requestedValueToSetLater="")}this._selectedIndex>-1&&this._options.length>0?(this._internals.setFormValue(this._options[this._selectedIndex].value),this._manageRequired()):(this._internals.setFormValue(null),this._manageRequired())}_onArrowUpKeyDown(){if(super._onArrowUpKeyDown(),this.open||this._selectedIndex<=0)return;const t=es(this.combobox?this._filteredOptions:this._options,this._activeIndex);this._filterPattern="",this._selectedIndex=t,this._activeIndex=t,this._value=t>-1?this._options[t].value:"",this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent()}_onArrowDownKeyDown(){if(super._onArrowDownKeyDown(),this.open||this._selectedIndex>=this._options.length-1)return;const t=ts(this.combobox?this._filteredOptions:this._options,this._activeIndex);this._filterPattern="",this._selectedIndex=t,this._activeIndex=t,this._value=t>-1?this._options[t].value:"",this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent()}_onEnterKeyDown(t){super._onEnterKeyDown(t),this.updateInputValue(),this._internals.setFormValue(this._value),this._manageRequired()}_onOptionClick(t){super._onOptionClick(t);const e=t.composedPath().find((t=>{if("matches"in t)return t.matches("li.option")}));if(!e||e.matches(".disabled"))return;e.classList.contains("placeholder")?this.creatable&&this._createAndSelectSuggestedOption():(this._selectedIndex=Number(e.dataset.index),this._value=this._options[this._selectedIndex].value,this._toggleDropdown(!1),this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_manageRequired(){const{value:t}=this;""===t&&this.required?this._internals.setValidity({valueMissing:!0},"Please select an item in the list.",this._face):this._internals.setValidity({})}_renderSelectFace(){const t=this._options[this._selectedIndex]?.label??"";return L`
|
|
1775
1853
|
<div
|
|
1776
1854
|
class="select-face face"
|
|
1777
1855
|
@click=${this._onFaceClick}
|
|
1778
1856
|
tabindex=${this.tabIndex>-1?0:-1}
|
|
1779
1857
|
>
|
|
1780
|
-
<span class="text">${t}</span> ${
|
|
1858
|
+
<span class="text">${t}</span> ${Te}
|
|
1781
1859
|
</div>
|
|
1782
|
-
`}};
|
|
1860
|
+
`}};bs.styles=rs,bs.shadowRootOptions={...at.shadowRootOptions,delegatesFocus:!0},bs.formAssociated=!0,ps([dt({attribute:"default-value"})],bs.prototype,"defaultValue",void 0),ps([dt({type:String,attribute:!0,reflect:!0})],bs.prototype,"role",void 0),ps([dt({reflect:!0})],bs.prototype,"name",void 0),ps([dt({type:Number,attribute:"selected-index"})],bs.prototype,"selectedIndex",null),ps([dt({type:String})],bs.prototype,"value",null),ps([dt({type:Boolean,reflect:!0})],bs.prototype,"required",void 0),ps([pt(".face")],bs.prototype,"_face",void 0),bs=ps([yt("vscode-single-select")],bs);const fs=[wt,n`
|
|
1783
1861
|
:host {
|
|
1784
1862
|
display: block;
|
|
1785
1863
|
position: relative;
|
|
@@ -1882,22 +1960,22 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1882
1960
|
.content {
|
|
1883
1961
|
overflow: hidden;
|
|
1884
1962
|
}
|
|
1885
|
-
`];var
|
|
1963
|
+
`];var gs=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let ms=class extends xt{constructor(){super(...arguments),this.shadow=!0,this.scrolled=!1,this._isDragging=!1,this._thumbHeight=0,this._thumbY=0,this._thumbVisible=!1,this._thumbFade=!1,this._thumbActive=!1,this._scrollThumbStartY=0,this._mouseStartY=0,this._scrollbarVisible=!0,this._scrollbarTrackZ=0,this._resizeObserverCallback=()=>{this._updateScrollbar()},this._onSlotChange=()=>{this._zIndexFix()},this._onScrollThumbMouseMoveBound=this._onScrollThumbMouseMove.bind(this),this._onScrollThumbMouseUpBound=this._onScrollThumbMouseUp.bind(this),this._onComponentMouseOverBound=this._onComponentMouseOver.bind(this),this._onComponentMouseOutBound=this._onComponentMouseOut.bind(this)}set scrollPos(t){this._scrollableContainer.scrollTop=t}get scrollPos(){return this._scrollableContainer?this._scrollableContainer.scrollTop:0}get scrollMax(){return this._scrollableContainer?this._scrollableContainer.scrollHeight:0}connectedCallback(){super.connectedCallback(),this._hostResizeObserver=new ResizeObserver(this._resizeObserverCallback),this._contentResizeObserver=new ResizeObserver(this._resizeObserverCallback),this.requestUpdate(),this.updateComplete.then((()=>{this._scrollableContainer.addEventListener("scroll",this._onScrollableContainerScroll.bind(this)),this._hostResizeObserver.observe(this),this._contentResizeObserver.observe(this._contentElement)})),this.addEventListener("mouseover",this._onComponentMouseOverBound),this.addEventListener("mouseout",this._onComponentMouseOutBound)}disconnectedCallback(){super.disconnectedCallback(),this._hostResizeObserver.unobserve(this),this._hostResizeObserver.disconnect(),this._contentResizeObserver.unobserve(this._contentElement),this._contentResizeObserver.disconnect(),this.removeEventListener("mouseover",this._onComponentMouseOverBound),this.removeEventListener("mouseout",this._onComponentMouseOutBound)}_updateScrollbar(){const t=this.getBoundingClientRect(),e=this._contentElement.getBoundingClientRect();t.height>=e.height?this._scrollbarVisible=!1:(this._scrollbarVisible=!0,this._thumbHeight=t.height*(t.height/e.height)),this.requestUpdate()}_zIndexFix(){let t=0;this._assignedElements.forEach((e=>{if("style"in e){const s=window.getComputedStyle(e).zIndex;/([0-9-])+/g.test(s)&&(t=Number(s)>t?Number(s):t)}})),this._scrollbarTrackZ=t+1,this.requestUpdate()}_onScrollThumbMouseDown(t){const e=this.getBoundingClientRect(),s=this._scrollThumbElement.getBoundingClientRect();this._mouseStartY=t.screenY,this._scrollThumbStartY=s.top-e.top,this._isDragging=!0,this._thumbActive=!0,document.addEventListener("mousemove",this._onScrollThumbMouseMoveBound),document.addEventListener("mouseup",this._onScrollThumbMouseUpBound)}_onScrollThumbMouseMove(t){const e=this._scrollThumbStartY+(t.screenY-this._mouseStartY);let s=0;const i=this.getBoundingClientRect().height,o=this._scrollThumbElement.getBoundingClientRect().height,r=this._contentElement.getBoundingClientRect().height;s=e<0?0:e>i-o?i-o:e,this._thumbY=s,this._scrollableContainer.scrollTop=s/(i-o)*(r-i)}_onScrollThumbMouseUp(t){this._isDragging=!1,this._thumbActive=!1;const e=this.getBoundingClientRect(),{x:s,y:i,width:o,height:r}=e,{pageX:n,pageY:a}=t;(n>s+o||n<s||a>i+r||a<i)&&(this._thumbFade=!0,this._thumbVisible=!1),document.removeEventListener("mousemove",this._onScrollThumbMouseMoveBound),document.removeEventListener("mouseup",this._onScrollThumbMouseUpBound)}_onScrollableContainerScroll(){const t=this._scrollableContainer.scrollTop;this.scrolled=t>0;const e=this.getBoundingClientRect().height,s=this._scrollThumbElement.getBoundingClientRect().height,i=t/(this._contentElement.getBoundingClientRect().height-e);this._thumbY=i*(e-s)}_onComponentMouseOver(){this._thumbVisible=!0,this._thumbFade=!1}_onComponentMouseOut(){this._thumbActive||(this._thumbVisible=!1,this._thumbFade=!0)}render(){return L`
|
|
1886
1964
|
<div
|
|
1887
1965
|
class="scrollable-container"
|
|
1888
|
-
.style=${
|
|
1966
|
+
.style=${It({userSelect:this._isDragging?"none":"auto"})}
|
|
1889
1967
|
>
|
|
1890
1968
|
<div
|
|
1891
|
-
class=${
|
|
1892
|
-
.style=${
|
|
1969
|
+
class=${Et({shadow:!0,visible:this.scrolled})}
|
|
1970
|
+
.style=${It({zIndex:String(this._scrollbarTrackZ)})}
|
|
1893
1971
|
></div>
|
|
1894
1972
|
${this._isDragging?L`<div class="prevent-interaction"></div>`:q}
|
|
1895
1973
|
<div
|
|
1896
|
-
class=${
|
|
1974
|
+
class=${Et({"scrollbar-track":!0,hidden:!this._scrollbarVisible})}
|
|
1897
1975
|
>
|
|
1898
1976
|
<div
|
|
1899
|
-
class=${
|
|
1900
|
-
.style=${
|
|
1977
|
+
class=${Et({"scrollbar-thumb":!0,visible:this._thumbVisible,fade:this._thumbFade,active:this._thumbActive})}
|
|
1978
|
+
.style=${It({height:`${this._thumbHeight}px`,top:`${this._thumbY}px`})}
|
|
1901
1979
|
@mousedown=${this._onScrollThumbMouseDown}
|
|
1902
1980
|
></div>
|
|
1903
1981
|
</div>
|
|
@@ -1905,11 +1983,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1905
1983
|
<slot @slotchange=${this._onSlotChange}></slot>
|
|
1906
1984
|
</div>
|
|
1907
1985
|
</div>
|
|
1908
|
-
`}};
|
|
1986
|
+
`}};ms.styles=fs,gs([dt({type:Boolean,reflect:!0})],ms.prototype,"shadow",void 0),gs([dt({type:Boolean,reflect:!0})],ms.prototype,"scrolled",void 0),gs([dt({type:Number,attribute:"scroll-pos"})],ms.prototype,"scrollPos",null),gs([dt({type:Number,attribute:"scroll-max"})],ms.prototype,"scrollMax",null),gs([ut()],ms.prototype,"_isDragging",void 0),gs([ut()],ms.prototype,"_thumbHeight",void 0),gs([ut()],ms.prototype,"_thumbY",void 0),gs([ut()],ms.prototype,"_thumbVisible",void 0),gs([ut()],ms.prototype,"_thumbFade",void 0),gs([ut()],ms.prototype,"_thumbActive",void 0),gs([pt(".content")],ms.prototype,"_contentElement",void 0),gs([pt(".scrollbar-thumb",!0)],ms.prototype,"_scrollThumbElement",void 0),gs([pt(".scrollable-container")],ms.prototype,"_scrollableContainer",void 0),gs([ft()],ms.prototype,"_assignedElements",void 0),ms=gs([yt("vscode-scrollable")],ms);const xs=[wt,n`
|
|
1909
1987
|
:host {
|
|
1910
|
-
--separator-border: var(--vscode-editorWidget-border,
|
|
1988
|
+
--separator-border: var(--vscode-editorWidget-border, #454545);
|
|
1911
1989
|
|
|
1912
|
-
border: 1px solid var(--vscode-editorWidget-border);
|
|
1990
|
+
border: 1px solid var(--vscode-editorWidget-border, #454545);
|
|
1913
1991
|
display: block;
|
|
1914
1992
|
overflow: hidden;
|
|
1915
1993
|
position: relative;
|
|
@@ -1995,7 +2073,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1995
2073
|
|
|
1996
2074
|
.handle.hover {
|
|
1997
2075
|
transition: background-color 0.1s ease-out 0.3s;
|
|
1998
|
-
background-color: var(--vscode-sash-hoverBorder);
|
|
2076
|
+
background-color: var(--vscode-sash-hoverBorder, #0078d4);
|
|
1999
2077
|
}
|
|
2000
2078
|
|
|
2001
2079
|
.handle.hide {
|
|
@@ -2012,25 +2090,25 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2012
2090
|
cursor: ns-resize;
|
|
2013
2091
|
width: 100%;
|
|
2014
2092
|
}
|
|
2015
|
-
`];var
|
|
2016
|
-
<div class=${
|
|
2017
|
-
<div class="start" .style=${
|
|
2093
|
+
`];var ys,ws=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};const ks=t=>{if(!t)return{value:0,unit:"pixel"};let e,s;t.endsWith("%")?(e="percent",s=+t.substring(0,t.length-1)):t.endsWith("px")?(e="pixel",s=+t.substring(0,t.length-2)):(e="pixel",s=+t);return{unit:e,value:isNaN(s)?0:s}},$s=(t,e)=>0===e?0:Math.min(100,t/e*100),_s=(t,e)=>e*(t/100);let Cs=ys=class extends xt{set split(t){this._split!==t&&(this._split=t,this.resetHandlePosition())}get split(){return this._split}set handlePosition(t){this._rawHandlePosition=t,this._handlePositionPropChanged()}get handlePosition(){return this._rawHandlePosition}set fixedPane(t){this._fixedPane=t,this._fixedPanePropChanged()}get fixedPane(){return this._fixedPane}constructor(){super(),this._split="vertical",this.resetOnDblClick=!1,this.handleSize=4,this.initialHandlePosition="50%",this._fixedPane="none",this._handlePosition=0,this._isDragActive=!1,this._hover=!1,this._hide=!1,this._boundRect=new DOMRect,this._handleOffset=0,this._wrapperObserved=!1,this._fixedPaneSize=0,this._handleResize=t=>{const e=t[0].contentRect,{width:s,height:i}=e;this._boundRect=e;const o="vertical"===this.split?s:i;"start"===this.fixedPane&&(this._handlePosition=this._fixedPaneSize),"end"===this.fixedPane&&(this._handlePosition=o-this._fixedPaneSize)},this._handleMouseUp=t=>{this._isDragActive=!1,t.target!==this&&(this._hover=!1,this._hide=!0),window.removeEventListener("mouseup",this._handleMouseUp),window.removeEventListener("mousemove",this._handleMouseMove);const{width:e,height:s}=this._boundRect,i="vertical"===this.split?e:s,o=$s(this._handlePosition,i);this.dispatchEvent(new CustomEvent("vsc-split-layout-change",{detail:{position:this._handlePosition,positionInPercentage:o},composed:!0}))},this._handleMouseMove=t=>{const{clientX:e,clientY:s}=t,{left:i,top:o,height:r,width:n}=this._boundRect,a="vertical"===this.split,c=a?n:r,l=a?e-i:s-o;this._handlePosition=Math.max(0,Math.min(l-this._handleOffset+this.handleSize/2,c)),"start"===this.fixedPane&&(this._fixedPaneSize=this._handlePosition),"end"===this.fixedPane&&(this._fixedPaneSize=c-this._handlePosition)},this._resizeObserver=new ResizeObserver(this._handleResize)}resetHandlePosition(){if(!this._wrapperEl)return void(this._handlePosition=0);const{width:t,height:e}=this._wrapperEl.getBoundingClientRect(),s="vertical"===this.split?t:e,{value:i,unit:o}=ks(this.initialHandlePosition??"50%");this._handlePosition="percent"===o?_s(i,s):i}connectedCallback(){super.connectedCallback()}firstUpdated(t){"none"!==this.fixedPane&&(this._resizeObserver.observe(this._wrapperEl),this._wrapperObserved=!0),this._boundRect=this._wrapperEl.getBoundingClientRect();const{value:e,unit:s}=this.handlePosition?ks(this.handlePosition):ks(this.initialHandlePosition);this._setPosition(e,s),this._initFixedPane()}_handlePositionPropChanged(){if(this.handlePosition&&this._wrapperEl){this._boundRect=this._wrapperEl.getBoundingClientRect();const{value:t,unit:e}=ks(this.handlePosition);this._setPosition(t,e)}}_fixedPanePropChanged(){this._wrapperEl&&this._initFixedPane()}_initFixedPane(){if("none"===this.fixedPane)this._wrapperObserved&&(this._resizeObserver.unobserve(this._wrapperEl),this._wrapperObserved=!1);else{const{width:t,height:e}=this._boundRect,s="vertical"===this.split?t:e;this._fixedPaneSize="start"===this.fixedPane?this._handlePosition:s-this._handlePosition,this._wrapperObserved||(this._resizeObserver.observe(this._wrapperEl),this._wrapperObserved=!0)}}_setPosition(t,e){const{width:s,height:i}=this._boundRect,o="vertical"===this.split?s:i;this._handlePosition="percent"===e?_s(t,o):t}_handleMouseOver(){this._hover=!0,this._hide=!1}_handleMouseOut(t){1!==t.buttons&&(this._hover=!1,this._hide=!0)}_handleMouseDown(t){t.stopPropagation(),t.preventDefault(),this._boundRect=this._wrapperEl.getBoundingClientRect();const{left:e,top:s}=this._boundRect,{left:i,top:o}=this._handleEl.getBoundingClientRect(),r=t.clientX-e,n=t.clientY-s;"vertical"===this.split&&(this._handleOffset=r-(i-e)),"horizontal"===this.split&&(this._handleOffset=n-(o-s)),this._isDragActive=!0,window.addEventListener("mouseup",this._handleMouseUp),window.addEventListener("mousemove",this._handleMouseMove)}_handleDblClick(){this.resetOnDblClick&&this.resetHandlePosition()}_handleSlotChange(){[...this._nestedLayoutsAtStart,...this._nestedLayoutsAtEnd].forEach((t=>{t instanceof ys&&t.resetHandlePosition()}))}render(){const{width:t,height:e}=this._boundRect,s="vertical"===this.split?t:e,i="none"!==this.fixedPane?`${this._handlePosition}px`:`${$s(this._handlePosition,s)}%`;let o="";o="start"===this.fixedPane?`0 0 ${this._fixedPaneSize}px`:`1 1 ${$s(this._handlePosition,s)}%`;let r="";r="end"===this.fixedPane?`0 0 ${this._fixedPaneSize}px`:`1 1 ${$s(s-this._handlePosition,s)}%`;const n={left:"vertical"===this.split?i:"0",top:"vertical"===this.split?"0":i},a=this.handleSize??4;"vertical"===this.split&&(n.marginLeft=0-a/2+"px",n.width=`${a}px`),"horizontal"===this.split&&(n.height=`${a}px`,n.marginTop=0-a/2+"px");const c=Et({"handle-overlay":!0,active:this._isDragActive,"split-vertical":"vertical"===this.split,"split-horizontal":"horizontal"===this.split}),l=Et({handle:!0,hover:this._hover,hide:this._hide,"split-vertical":"vertical"===this.split,"split-horizontal":"horizontal"===this.split}),h={wrapper:!0,horizontal:"horizontal"===this.split};return L`
|
|
2094
|
+
<div class=${Et(h)}>
|
|
2095
|
+
<div class="start" .style=${It({flex:o})}>
|
|
2018
2096
|
<slot name="start" @slotchange=${this._handleSlotChange}></slot>
|
|
2019
2097
|
</div>
|
|
2020
|
-
<div class="end" .style=${
|
|
2098
|
+
<div class="end" .style=${It({flex:r})}>
|
|
2021
2099
|
<slot name="end" @slotchange=${this._handleSlotChange}></slot>
|
|
2022
2100
|
</div>
|
|
2023
|
-
<div class=${
|
|
2101
|
+
<div class=${c}></div>
|
|
2024
2102
|
<div
|
|
2025
|
-
class=${
|
|
2026
|
-
.style=${
|
|
2103
|
+
class=${l}
|
|
2104
|
+
.style=${It(n)}
|
|
2027
2105
|
@mouseover=${this._handleMouseOver}
|
|
2028
2106
|
@mouseout=${this._handleMouseOut}
|
|
2029
2107
|
@mousedown=${this._handleMouseDown}
|
|
2030
2108
|
@dblclick=${this._handleDblClick}
|
|
2031
2109
|
></div>
|
|
2032
2110
|
</div>
|
|
2033
|
-
`}};
|
|
2111
|
+
`}};Cs.styles=xs,ws([dt({reflect:!0})],Cs.prototype,"split",null),ws([dt({type:Boolean,reflect:!0,attribute:"reset-on-dbl-click"})],Cs.prototype,"resetOnDblClick",void 0),ws([dt({type:Number,reflect:!0,attribute:"handle-size"})],Cs.prototype,"handleSize",void 0),ws([dt({reflect:!0,attribute:"initial-handle-position"})],Cs.prototype,"initialHandlePosition",void 0),ws([dt({attribute:"handle-position"})],Cs.prototype,"handlePosition",null),ws([dt({attribute:"fixed-pane"})],Cs.prototype,"fixedPane",null),ws([ut()],Cs.prototype,"_handlePosition",void 0),ws([ut()],Cs.prototype,"_isDragActive",void 0),ws([ut()],Cs.prototype,"_hover",void 0),ws([ut()],Cs.prototype,"_hide",void 0),ws([pt(".wrapper")],Cs.prototype,"_wrapperEl",void 0),ws([pt(".handle")],Cs.prototype,"_handleEl",void 0),ws([ft({slot:"start",selector:"vscode-split-layout"})],Cs.prototype,"_nestedLayoutsAtStart",void 0),ws([ft({slot:"end",selector:"vscode-split-layout"})],Cs.prototype,"_nestedLayoutsAtEnd",void 0),Cs=ys=ws([yt("vscode-split-layout")],Cs);const Bs=[wt,n`
|
|
2034
2112
|
:host {
|
|
2035
2113
|
border-bottom: 1px solid transparent;
|
|
2036
2114
|
cursor: pointer;
|
|
@@ -2122,18 +2200,18 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2122
2200
|
slot[name='content-after']::slotted(vscode-badge) {
|
|
2123
2201
|
margin-left: 8px;
|
|
2124
2202
|
}
|
|
2125
|
-
`];var
|
|
2203
|
+
`];var Ss=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let zs=class extends xt{constructor(){super(...arguments),this.active=!1,this.ariaControls="",this.panel=!1,this.role="tab",this.tabId=-1}attributeChangedCallback(t,e,s){if(super.attributeChangedCallback(t,e,s),"active"===t){const t=null!==s;this.ariaSelected=t?"true":"false",this.tabIndex=t?0:-1}}render(){return L`
|
|
2126
2204
|
<div
|
|
2127
|
-
class=${
|
|
2205
|
+
class=${Et({wrapper:!0,active:this.active,panel:this.panel})}
|
|
2128
2206
|
>
|
|
2129
2207
|
<div class="before"><slot name="content-before"></slot></div>
|
|
2130
2208
|
<div class="main"><slot></slot></div>
|
|
2131
2209
|
<div class="after"><slot name="content-after"></slot></div>
|
|
2132
2210
|
<span
|
|
2133
|
-
class=${
|
|
2211
|
+
class=${Et({"active-indicator":!0,active:this.active,panel:this.panel})}
|
|
2134
2212
|
></span>
|
|
2135
2213
|
</div>
|
|
2136
|
-
`}};
|
|
2214
|
+
`}};zs.styles=Bs,Ss([dt({type:Boolean,reflect:!0})],zs.prototype,"active",void 0),Ss([dt({reflect:!0,attribute:"aria-controls"})],zs.prototype,"ariaControls",void 0),Ss([dt({type:Boolean,reflect:!0})],zs.prototype,"panel",void 0),Ss([dt({reflect:!0})],zs.prototype,"role",void 0),Ss([dt({type:Number,reflect:!0,attribute:"tab-id"})],zs.prototype,"tabId",void 0),zs=Ss([yt("vscode-tab-header")],zs);const Os=[wt,n`
|
|
2137
2215
|
:host {
|
|
2138
2216
|
display: block;
|
|
2139
2217
|
overflow: hidden;
|
|
@@ -2149,7 +2227,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2149
2227
|
:host([panel]) {
|
|
2150
2228
|
background-color: var(--vscode-panel-background);
|
|
2151
2229
|
}
|
|
2152
|
-
`];var
|
|
2230
|
+
`];var As=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Es=class extends xt{constructor(){super(...arguments),this.hidden=!1,this.ariaLabelledby="",this.panel=!1,this.role="tabpanel",this.tabIndex=0}render(){return L` <slot></slot> `}};Es.styles=Os,As([dt({type:Boolean,reflect:!0})],Es.prototype,"hidden",void 0),As([dt({reflect:!0,attribute:"aria-labelledby"})],Es.prototype,"ariaLabelledby",void 0),As([dt({type:Boolean,reflect:!0})],Es.prototype,"panel",void 0),As([dt({reflect:!0})],Es.prototype,"role",void 0),As([dt({type:Number,reflect:!0})],Es.prototype,"tabIndex",void 0),Es=As([yt("vscode-tab-panel")],Es);const js=[wt,n`
|
|
2153
2231
|
:host {
|
|
2154
2232
|
display: table;
|
|
2155
2233
|
table-layout: fixed;
|
|
@@ -2163,7 +2241,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2163
2241
|
::slotted(vscode-table-row:nth-child(odd)) {
|
|
2164
2242
|
background-color: var(--vsc-row-odd-background);
|
|
2165
2243
|
}
|
|
2166
|
-
`];var
|
|
2244
|
+
`];var Is=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Ms=class extends xt{constructor(){super(...arguments),this.role="rowgroup"}render(){return L` <slot></slot> `}};Ms.styles=js,Is([dt({reflect:!0})],Ms.prototype,"role",void 0),Ms=Is([yt("vscode-table-body")],Ms);const Fs=[wt,n`
|
|
2167
2245
|
:host {
|
|
2168
2246
|
border-bottom-color: var(--vscode-editorGroup-border);
|
|
2169
2247
|
border-bottom-style: solid;
|
|
@@ -2206,21 +2284,21 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2206
2284
|
.column-label {
|
|
2207
2285
|
font-weight: bold;
|
|
2208
2286
|
}
|
|
2209
|
-
`];var
|
|
2287
|
+
`];var Ps=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Ns=class extends xt{constructor(){super(...arguments),this.role="cell",this.columnLabel="",this.compact=!1}render(){const t=this.columnLabel?L`<div class="column-label" role="presentation">
|
|
2210
2288
|
${this.columnLabel}
|
|
2211
2289
|
</div>`:q;return L`
|
|
2212
2290
|
<div class="wrapper">
|
|
2213
2291
|
${t}
|
|
2214
2292
|
<slot></slot>
|
|
2215
2293
|
</div>
|
|
2216
|
-
`}};
|
|
2294
|
+
`}};Ns.styles=Fs,Ps([dt({reflect:!0})],Ns.prototype,"role",void 0),Ps([dt({attribute:"column-label"})],Ns.prototype,"columnLabel",void 0),Ps([dt({type:Boolean,reflect:!0})],Ns.prototype,"compact",void 0),Ns=Ps([yt("vscode-table-cell")],Ns);const Ds=[wt,n`
|
|
2217
2295
|
:host {
|
|
2218
2296
|
background-color: var(--vscode-keybindingTable-headerBackground);
|
|
2219
2297
|
display: table;
|
|
2220
2298
|
table-layout: fixed;
|
|
2221
2299
|
width: 100%;
|
|
2222
2300
|
}
|
|
2223
|
-
`];var
|
|
2301
|
+
`];var Vs=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Rs=class extends xt{constructor(){super(...arguments),this.role="rowgroup"}render(){return L` <slot></slot> `}};Rs.styles=Ds,Vs([dt({reflect:!0})],Rs.prototype,"role",void 0),Rs=Vs([yt("vscode-table-header")],Rs);const Ts=[wt,n`
|
|
2224
2302
|
:host {
|
|
2225
2303
|
box-sizing: border-box;
|
|
2226
2304
|
color: var(--vscode-foreground);
|
|
@@ -2245,11 +2323,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2245
2323
|
white-space: inherit;
|
|
2246
2324
|
width: 100%;
|
|
2247
2325
|
}
|
|
2248
|
-
`];var
|
|
2326
|
+
`];var Ls=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Us=class extends xt{constructor(){super(...arguments),this.role="columnheader"}render(){return L`
|
|
2249
2327
|
<div class="wrapper">
|
|
2250
2328
|
<slot></slot>
|
|
2251
2329
|
</div>
|
|
2252
|
-
`}};
|
|
2330
|
+
`}};Us.styles=Ts,Ls([dt({reflect:!0})],Us.prototype,"role",void 0),Us=Ls([yt("vscode-table-header-cell")],Us);const qs=[wt,n`
|
|
2253
2331
|
:host {
|
|
2254
2332
|
border-top-color: var(--vscode-editorGroup-border);
|
|
2255
2333
|
border-top-style: solid;
|
|
@@ -2257,7 +2335,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2257
2335
|
display: var(--vsc-row-display);
|
|
2258
2336
|
width: 100%;
|
|
2259
2337
|
}
|
|
2260
|
-
`];var
|
|
2338
|
+
`];var Hs=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Ks=class extends xt{constructor(){super(...arguments),this.role="row"}render(){return L` <slot></slot> `}};Ks.styles=qs,Hs([dt({reflect:!0})],Ks.prototype,"role",void 0),Ks=Hs([yt("vscode-table-row")],Ks);const Ws=(t,e)=>{if("number"!=typeof t||Number.isNaN(t)){if("string"==typeof t&&/^[0-9.]+$/.test(t)){return Number(t)/e*100}if("string"==typeof t&&/^[0-9.]+%$/.test(t))return Number(t.substring(0,t.length-1));if("string"==typeof t&&/^[0-9.]+px$/.test(t)){return Number(t.substring(0,t.length-2))/e*100}return null}return t/e*100},Gs=[wt,n`
|
|
2261
2339
|
:host {
|
|
2262
2340
|
display: block;
|
|
2263
2341
|
--vsc-row-even-background: transparent;
|
|
@@ -2380,11 +2458,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2380
2458
|
position: absolute;
|
|
2381
2459
|
width: 5px;
|
|
2382
2460
|
}
|
|
2383
|
-
`];var
|
|
2461
|
+
`];var Js=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Ys=class extends xt{constructor(){super(...arguments),this.role="table",this.resizable=!1,this.responsive=!1,this.bordered=!1,this.borderedColumns=!1,this.borderedRows=!1,this.breakpoint=300,this.minColumnWidth="50px",this.delayedResizing=!1,this.compact=!1,this.zebra=!1,this.zebraOdd=!1,this._sashPositions=[],this._isDragging=!1,this._sashHovers=[],this._columns=[],this._activeSashElementIndex=-1,this._activeSashCursorOffset=0,this._componentX=0,this._componentH=0,this._componentW=0,this._headerCells=[],this._cellsOfFirstRow=[],this._prevHeaderHeight=0,this._prevComponentHeight=0,this._componentResizeObserverCallback=()=>{this._memoizeComponentDimensions(),this._updateResizeHandlersSize(),this.responsive&&this._toggleCompactView(),this._resizeTableBody()},this._headerResizeObserverCallback=()=>{this._updateResizeHandlersSize()},this._bodyResizeObserverCallback=()=>{this._resizeTableBody()},this._onResizingMouseMove=t=>{t.stopPropagation(),this._updateActiveSashPosition(t.pageX),this.delayedResizing?this._resizeColumns(!1):this._resizeColumns(!0)},this._onResizingMouseUp=t=>{this._resizeColumns(!0),this._updateActiveSashPosition(t.pageX),this._sashHovers[this._activeSashElementIndex]=!1,this._isDragging=!1,this._activeSashElementIndex=-1,document.removeEventListener("mousemove",this._onResizingMouseMove),document.removeEventListener("mouseup",this._onResizingMouseUp)}}set columns(t){this._columns=t,this.isConnected&&this._initDefaultColumnSizes()}get columns(){return this._columns}connectedCallback(){super.connectedCallback(),this._memoizeComponentDimensions(),this._initDefaultColumnSizes()}disconnectedCallback(){super.disconnectedCallback(),this._componentResizeObserver?.unobserve(this),this._componentResizeObserver?.disconnect(),this._bodyResizeObserver?.disconnect()}_px2Percent(t){return t/this._componentW*100}_percent2Px(t){return this._componentW*t/100}_memoizeComponentDimensions(){const t=this.getBoundingClientRect();this._componentH=t.height,this._componentW=t.width,this._componentX=t.x}_queryHeaderCells(){const t=this._assignedHeaderElements;return t&&t[0]?Array.from(t[0].querySelectorAll("vscode-table-header-cell")):[]}_getHeaderCells(){return this._headerCells.length||(this._headerCells=this._queryHeaderCells()),this._headerCells}_queryCellsOfFirstRow(){const t=this._assignedBodyElements;return t&&t[0]?Array.from(t[0].querySelectorAll("vscode-table-row:first-child vscode-table-cell")):[]}_getCellsOfFirstRow(){return this._cellsOfFirstRow.length||(this._cellsOfFirstRow=this._queryCellsOfFirstRow()),this._cellsOfFirstRow}_resizeTableBody(){let t=0,e=0;const s=this.getBoundingClientRect().height;this._assignedHeaderElements&&this._assignedHeaderElements.length&&(t=this._assignedHeaderElements[0].getBoundingClientRect().height),this._assignedBodyElements&&this._assignedBodyElements.length&&(e=this._assignedBodyElements[0].getBoundingClientRect().height);const i=e-t-s;this._scrollableElement.style.height=i>0?s-t+"px":"auto"}_initResizeObserver(){this._componentResizeObserver=new ResizeObserver(this._componentResizeObserverCallback),this._componentResizeObserver.observe(this),this._headerResizeObserver=new ResizeObserver(this._headerResizeObserverCallback),this._headerResizeObserver.observe(this._headerElement)}_calcColWidthPercentages(){const t=this._getHeaderCells().length;let e=this.columns.slice(0,t);const s=e.filter((t=>"auto"===t)).length+t-e.length;let i=100;if(e=e.map((t=>{const e=Ws(t,this._componentW);return null===e?"auto":(i-=e,e)})),e.length<t)for(let s=e.length;s<t;s++)e.push("auto");return e=e.map((t=>"auto"===t?i/s:t)),e}_initHeaderCellSizes(t){this._getHeaderCells().forEach(((e,s)=>{e.style.width=`${t[s]}%`}))}_initBodyColumnSizes(t){this._getCellsOfFirstRow().forEach(((e,s)=>{e.style.width=`${t[s]}%`}))}_initSashes(t){const e=t.length;let s=0;this._sashPositions=[],t.forEach(((t,i)=>{if(i<e-1){const e=s+t;this._sashPositions.push(e),s=e}}))}_initDefaultColumnSizes(){const t=this._calcColWidthPercentages();this._initHeaderCellSizes(t),this._initBodyColumnSizes(t),this._initSashes(t)}_updateResizeHandlersSize(){const t=this._headerElement.getBoundingClientRect();if(t.height===this._prevHeaderHeight&&this._componentH===this._prevComponentHeight)return;this._prevHeaderHeight=t.height,this._prevComponentHeight=this._componentH;const e=this._componentH-t.height;this._sashVisibleElements.forEach((s=>{s.style.height=`${e}px`,s.style.top=`${t.height}px`}))}_applyCompactViewColumnLabels(){const t=this._getHeaderCells().map((t=>t.innerText));this.querySelectorAll("vscode-table-row").forEach((e=>{e.querySelectorAll("vscode-table-cell").forEach(((e,s)=>{e.columnLabel=t[s],e.compact=!0}))}))}_clearCompactViewColumnLabels(){this.querySelectorAll("vscode-table-cell").forEach((t=>{t.columnLabel="",t.compact=!1}))}_toggleCompactView(){const t=this.getBoundingClientRect().width<this.breakpoint;this.compact!==t&&(this.compact=t,t?this._applyCompactViewColumnLabels():this._clearCompactViewColumnLabels())}_onDefaultSlotChange(){this._assignedElements.forEach((t=>{"vscode-table-header"!==t.tagName.toLowerCase()?"vscode-table-body"!==t.tagName.toLowerCase()||(t.slot="body"):t.slot="header"}))}_onHeaderSlotChange(){this._headerCells=this._queryHeaderCells()}_onBodySlotChange(){if(this._initDefaultColumnSizes(),this._initResizeObserver(),this._updateResizeHandlersSize(),!this._bodyResizeObserver){const t=this._assignedBodyElements[0]??null;t&&(this._bodyResizeObserver=new ResizeObserver(this._bodyResizeObserverCallback),this._bodyResizeObserver.observe(t))}}_onSashMouseOver(t){if(this._isDragging)return;const e=t.currentTarget,s=Number(e.dataset.index);this._sashHovers[s]=!0,this.requestUpdate()}_onSashMouseOut(t){if(t.stopPropagation(),this._isDragging)return;const e=t.currentTarget,s=Number(e.dataset.index);this._sashHovers[s]=!1,this.requestUpdate()}_onSashMouseDown(t){t.stopPropagation();const{pageX:e,currentTarget:s}=t,i=s,o=Number(i.dataset.index),r=i.getBoundingClientRect().x;this._isDragging=!0,this._activeSashElementIndex=o,this._sashHovers[this._activeSashElementIndex]=!0,this._activeSashCursorOffset=this._px2Percent(e-r);const n=this._getHeaderCells();this._headerCellsToResize=[],this._headerCellsToResize.push(n[o]),n[o+1]&&(this._headerCellsToResize[1]=n[o+1]);const a=this._bodySlot.assignedElements()[0].querySelectorAll("vscode-table-row:first-child > vscode-table-cell");this._cellsToResize=[],this._cellsToResize.push(a[o]),a[o+1]&&this._cellsToResize.push(a[o+1]),document.addEventListener("mousemove",this._onResizingMouseMove),document.addEventListener("mouseup",this._onResizingMouseUp)}_updateActiveSashPosition(t){const{prevSashPos:e,nextSashPos:s}=this._getSashPositions();let i=Ws(this.minColumnWidth,this._componentW);null===i&&(i=0);const o=e?e+i:i,r=s?s-i:100-i;let n=this._px2Percent(t-this._componentX-this._percent2Px(this._activeSashCursorOffset));n=Math.max(n,o),n=Math.min(n,r),this._sashPositions[this._activeSashElementIndex]=n,this.requestUpdate()}_getSashPositions(){return{sashPos:this._sashPositions[this._activeSashElementIndex],prevSashPos:this._sashPositions[this._activeSashElementIndex-1]||0,nextSashPos:this._sashPositions[this._activeSashElementIndex+1]||100}}_resizeColumns(t=!0){const{sashPos:e,prevSashPos:s,nextSashPos:i}=this._getSashPositions(),o=`${e-s}%`,r=`${i-e}%`;this._headerCellsToResize[0].style.width=o,this._headerCellsToResize[1]&&(this._headerCellsToResize[1].style.width=r),t&&(this._cellsToResize[0].style.width=o,this._cellsToResize[1]&&(this._cellsToResize[1].style.width=r))}render(){const t=this._sashPositions.map(((t,e)=>{const s=Et({sash:!0,hover:this._sashHovers[e],resizable:this.resizable}),i=`${t}%`;return this.resizable?L`
|
|
2384
2462
|
<div
|
|
2385
2463
|
class=${s}
|
|
2386
2464
|
data-index=${e}
|
|
2387
|
-
.style=${
|
|
2465
|
+
.style=${It({left:i})}
|
|
2388
2466
|
@mousedown=${this._onSashMouseDown}
|
|
2389
2467
|
@mouseover=${this._onSashMouseOver}
|
|
2390
2468
|
@mouseout=${this._onSashMouseOut}
|
|
@@ -2395,10 +2473,10 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2395
2473
|
`:L`<div
|
|
2396
2474
|
class=${s}
|
|
2397
2475
|
data-index=${e}
|
|
2398
|
-
.style=${
|
|
2476
|
+
.style=${It({left:i})}
|
|
2399
2477
|
>
|
|
2400
2478
|
<div class="sash-visible"></div>
|
|
2401
|
-
</div>`})),e=
|
|
2479
|
+
</div>`})),e=Et({wrapper:!0,"select-disabled":this._isDragging,"resize-cursor":this._isDragging,"compact-view":this.compact});return L`
|
|
2402
2480
|
<div class=${e}>
|
|
2403
2481
|
<div class="header">
|
|
2404
2482
|
<slot name="caption"></slot>
|
|
@@ -2414,7 +2492,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2414
2492
|
${t}
|
|
2415
2493
|
<slot @slotchange=${this._onDefaultSlotChange}></slot>
|
|
2416
2494
|
</div>
|
|
2417
|
-
`}};
|
|
2495
|
+
`}};Ys.styles=Gs,Js([dt({reflect:!0})],Ys.prototype,"role",void 0),Js([dt({type:Boolean,reflect:!0})],Ys.prototype,"resizable",void 0),Js([dt({type:Boolean,reflect:!0})],Ys.prototype,"responsive",void 0),Js([dt({type:Boolean,reflect:!0})],Ys.prototype,"bordered",void 0),Js([dt({type:Boolean,reflect:!0,attribute:"bordered-columns"})],Ys.prototype,"borderedColumns",void 0),Js([dt({type:Boolean,reflect:!0,attribute:"bordered-rows"})],Ys.prototype,"borderedRows",void 0),Js([dt({type:Number})],Ys.prototype,"breakpoint",void 0),Js([dt({type:Array})],Ys.prototype,"columns",null),Js([dt({attribute:"min-column-width"})],Ys.prototype,"minColumnWidth",void 0),Js([dt({type:Boolean,reflect:!0,attribute:"delayed-resizing"})],Ys.prototype,"delayedResizing",void 0),Js([dt({type:Boolean,reflect:!0})],Ys.prototype,"compact",void 0),Js([dt({type:Boolean,reflect:!0})],Ys.prototype,"zebra",void 0),Js([dt({type:Boolean,reflect:!0,attribute:"zebra-odd"})],Ys.prototype,"zebraOdd",void 0),Js([pt('slot[name="body"]')],Ys.prototype,"_bodySlot",void 0),Js([pt(".header")],Ys.prototype,"_headerElement",void 0),Js([pt(".scrollable")],Ys.prototype,"_scrollableElement",void 0),Js([function(t){return(e,s)=>vt(0,0,{get(){return(this.renderRoot??(bt??=document.createDocumentFragment())).querySelectorAll(t)}})}(".sash-visible")],Ys.prototype,"_sashVisibleElements",void 0),Js([ft({flatten:!0,selector:"vscode-table-header, vscode-table-body"})],Ys.prototype,"_assignedElements",void 0),Js([ft({slot:"header",flatten:!0,selector:"vscode-table-header"})],Ys.prototype,"_assignedHeaderElements",void 0),Js([ft({slot:"body",flatten:!0,selector:"vscode-table-body"})],Ys.prototype,"_assignedBodyElements",void 0),Js([ut()],Ys.prototype,"_sashPositions",void 0),Js([ut()],Ys.prototype,"_isDragging",void 0),Ys=Js([yt("vscode-table")],Ys);const Xs=[wt,n`
|
|
2418
2496
|
:host {
|
|
2419
2497
|
display: block;
|
|
2420
2498
|
}
|
|
@@ -2446,9 +2524,9 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2446
2524
|
display: block;
|
|
2447
2525
|
margin-left: auto;
|
|
2448
2526
|
}
|
|
2449
|
-
`];var
|
|
2527
|
+
`];var Zs=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Qs=class extends xt{constructor(){super(),this.panel=!1,this.role="tablist",this.selectedIndex=0,this._tabHeaders=[],this._tabPanels=[],this._componentId="",this._tabFocus=0,this._componentId=Se()}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s),"selected-index"===t&&this._setActiveTab(),"panel"===t&&(this._tabHeaders.forEach((t=>t.panel=null!==s)),this._tabPanels.forEach((t=>t.panel=null!==s)))}_dispatchSelectEvent(){this.dispatchEvent(new CustomEvent("vsc-select",{detail:{selectedIndex:this.selectedIndex},composed:!0})),this.dispatchEvent(new CustomEvent("vsc-tabs-select",{detail:{selectedIndex:this.selectedIndex},composed:!0}))}_setActiveTab(){this._tabFocus=this.selectedIndex,this._tabPanels.forEach(((t,e)=>{t.hidden=e!==this.selectedIndex})),this._tabHeaders.forEach(((t,e)=>{t.active=e===this.selectedIndex}))}_focusPrevTab(){0===this._tabFocus?this._tabFocus=this._tabHeaders.length-1:this._tabFocus-=1}_focusNextTab(){this._tabFocus===this._tabHeaders.length-1?this._tabFocus=0:this._tabFocus+=1}_onHeaderKeyDown(t){"ArrowLeft"!==t.key&&"ArrowRight"!==t.key||(t.preventDefault(),this._tabHeaders[this._tabFocus].setAttribute("tabindex","-1"),"ArrowLeft"===t.key?this._focusPrevTab():"ArrowRight"===t.key&&this._focusNextTab(),this._tabHeaders[this._tabFocus].setAttribute("tabindex","0"),this._tabHeaders[this._tabFocus].focus()),"Enter"===t.key&&(t.preventDefault(),this.selectedIndex=this._tabFocus,this._dispatchSelectEvent())}_moveHeadersToHeaderSlot(){const t=this._mainSlotElements.filter((t=>t instanceof zs));t.length>0&&t.forEach((t=>t.setAttribute("slot","header")))}_onMainSlotChange(){this._moveHeadersToHeaderSlot(),this._tabPanels=this._mainSlotElements.filter((t=>t instanceof Es)),this._tabPanels.forEach(((t,e)=>{t.ariaLabelledby=`t${this._componentId}-h${e}`,t.id=`t${this._componentId}-p${e}`,t.panel=this.panel})),this._setActiveTab()}_onHeaderSlotChange(){this._tabHeaders=this._headerSlotElements.filter((t=>t instanceof zs)),this._tabHeaders.forEach(((t,e)=>{t.tabId=e,t.id=`t${this._componentId}-h${e}`,t.ariaControls=`t${this._componentId}-p${e}`,t.panel=this.panel,t.active=e===this.selectedIndex}))}_onHeaderClick(t){const e=t.composedPath().find((t=>t instanceof zs));e&&(this.selectedIndex=e.tabId,this._setActiveTab(),this._dispatchSelectEvent())}render(){return L`
|
|
2450
2528
|
<div
|
|
2451
|
-
class=${
|
|
2529
|
+
class=${Et({header:!0,panel:this.panel})}
|
|
2452
2530
|
@click=${this._onHeaderClick}
|
|
2453
2531
|
@keydown=${this._onHeaderKeyDown}
|
|
2454
2532
|
>
|
|
@@ -2456,7 +2534,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2456
2534
|
<slot name="addons"></slot>
|
|
2457
2535
|
</div>
|
|
2458
2536
|
<slot @slotchange=${this._onMainSlotChange}></slot>
|
|
2459
|
-
`}};
|
|
2537
|
+
`}};Qs.styles=Xs,Zs([dt({type:Boolean,reflect:!0})],Qs.prototype,"panel",void 0),Zs([dt({reflect:!0})],Qs.prototype,"role",void 0),Zs([dt({type:Number,reflect:!0,attribute:"selected-index"})],Qs.prototype,"selectedIndex",void 0),Zs([ft({slot:"header"})],Qs.prototype,"_headerSlotElements",void 0),Zs([ft()],Qs.prototype,"_mainSlotElements",void 0),Qs=Zs([yt("vscode-tabs")],Qs);const ti=[wt,n`
|
|
2460
2538
|
:host {
|
|
2461
2539
|
display: inline-flex;
|
|
2462
2540
|
}
|
|
@@ -2525,28 +2603,28 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2525
2603
|
slot.textOnly:not(.empty) {
|
|
2526
2604
|
padding: 0 5px;
|
|
2527
2605
|
}
|
|
2528
|
-
`];var
|
|
2606
|
+
`];var ei=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let si=class extends xt{constructor(){super(...arguments),this.icon="",this.label=void 0,this.toggleable=!1,this.checked=!1,this._isSlotEmpty=!0}_handleSlotChange(){this._isSlotEmpty=!((this._assignedNodes?.length??0)>0)}_handleButtonClick(){this.toggleable&&(this.checked=!this.checked,this.dispatchEvent(new Event("change")))}render(){const t=this.checked?"true":"false";return L`
|
|
2529
2607
|
<button
|
|
2530
2608
|
type="button"
|
|
2531
|
-
aria-label=${
|
|
2532
|
-
role=${
|
|
2533
|
-
aria-checked=${
|
|
2534
|
-
class=${
|
|
2609
|
+
aria-label=${jt(this.label)}
|
|
2610
|
+
role=${jt(this.toggleable?"switch":void 0)}
|
|
2611
|
+
aria-checked=${jt(this.toggleable?t:void 0)}
|
|
2612
|
+
class=${Et({checked:this.toggleable&&this.checked})}
|
|
2535
2613
|
@click=${this._handleButtonClick}
|
|
2536
2614
|
>
|
|
2537
2615
|
${this.icon?L`<vscode-icon name=${this.icon}></vscode-icon>`:q}
|
|
2538
2616
|
<slot
|
|
2539
2617
|
@slotchange=${this._handleSlotChange}
|
|
2540
|
-
class=${
|
|
2618
|
+
class=${Et({empty:this._isSlotEmpty,textOnly:!this.icon})}
|
|
2541
2619
|
></slot>
|
|
2542
2620
|
</button>
|
|
2543
|
-
`}};
|
|
2621
|
+
`}};si.styles=ti,ei([dt({reflect:!0})],si.prototype,"icon",void 0),ei([dt()],si.prototype,"label",void 0),ei([dt({type:Boolean,reflect:!0})],si.prototype,"toggleable",void 0),ei([dt({type:Boolean,reflect:!0})],si.prototype,"checked",void 0),ei([ut()],si.prototype,"_isSlotEmpty",void 0),ei([function(t){return(e,s)=>{const{slot:i}={},o="slot"+(i?`[name=${i}]`:":not([name])");return vt(0,0,{get(){const e=this.renderRoot?.querySelector(o);return e?.assignedNodes(t)??[]}})}}()],si.prototype,"_assignedNodes",void 0),si=ei([yt("vscode-toolbar-button")],si);const ii=[wt,n`
|
|
2544
2622
|
:host {
|
|
2545
2623
|
gap: 4px;
|
|
2546
2624
|
display: flex;
|
|
2547
2625
|
align-items: center;
|
|
2548
2626
|
}
|
|
2549
|
-
`];var
|
|
2627
|
+
`];var oi=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let ri=class extends xt{render(){return L` <slot></slot> `}};ri.styles=ii,ri=oi([yt("vscode-toolbar-container")],ri);const ni=[wt,n`
|
|
2550
2628
|
:host {
|
|
2551
2629
|
--hover-outline-color: transparent;
|
|
2552
2630
|
--hover-outline-style: solid;
|
|
@@ -2792,65 +2870,65 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2792
2870
|
:host([indent-guides]) ul ul.has-active-item:before {
|
|
2793
2871
|
background-color: var(--vscode-tree-indentGuidesStroke);
|
|
2794
2872
|
}
|
|
2795
|
-
`];var
|
|
2873
|
+
`];var ai=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};const ci=(t,e=[])=>{const s=[];return t.forEach(((t,i)=>{const o=[...e,i],r={...t,path:o};t.subItems&&(r.subItems=ci(t.subItems,o)),s.push(r)})),s},li=t=>!!(t.subItems&&Array.isArray(t.subItems)&&t?.subItems?.length>0);let hi=class extends xt{constructor(){super(...arguments),this.indent=8,this.arrows=!1,this.multiline=!1,this.tabindex=0,this.indentGuides=!1,this._data=[],this._selectedItem=null,this._focusedItem=null,this._selectedBranch=null,this._focusedBranch=null,this._handleComponentKeyDownBound=this._handleComponentKeyDown.bind(this)}set data(t){const e=this._data;this._data=ci(t),this.requestUpdate("data",e)}get data(){return this._data}closeAll(){this._closeSubTreeRecursively(this.data),this.requestUpdate()}deselectAll(){this._deselectItemsRecursively(this.data),this.requestUpdate()}getItemByPath(t){return this._getItemByPath(t)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleComponentKeyDownBound)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleComponentKeyDownBound)}_getItemByPath(t){let e=this._data,s=null;return t.forEach(((i,o)=>{o===t.length-1?s=e[i]:e=e[i].subItems})),s}_handleActionClick(t){t.stopPropagation();const e=t.target,s=e.dataset.itemPath,i=e.dataset.index;let o=null,r="",n="";if(s){const t=s.split("/").map((t=>Number(t)));if(o=this._getItemByPath(t),o?.actions){const t=Number(i);o.actions[t]&&(r=o.actions[t].actionId)}o?.value&&(n=o.value)}this.dispatchEvent(new CustomEvent("vsc-run-action",{detail:{actionId:r,item:o,value:n}})),this.dispatchEvent(new CustomEvent("vsc-tree-action",{detail:{actionId:r,item:o,value:n}}))}_renderIconVariant(t){const{type:e,value:s}=t;return"themeicon"===e?L`<vscode-icon name=${s} class="theme-icon"></vscode-icon>`:L`<span
|
|
2796
2874
|
class="image-icon"
|
|
2797
|
-
.style=${
|
|
2798
|
-
></span>`}_renderIcon(t){const e={branch:{value:"folder",type:"themeicon"},open:{value:"folder-opened",type:"themeicon"},leaf:{value:"file",type:"themeicon"}};if(t.iconUrls)t.iconUrls.branch&&(e.branch={value:t.iconUrls.branch,type:"image"}),t.iconUrls.leaf&&(e.leaf={value:t.iconUrls.leaf,type:"image"}),t.iconUrls.open&&(e.open={value:t.iconUrls.open,type:"image"});else if("object"==typeof t.icons)t.icons.branch&&(e.branch={value:t.icons.branch,type:"themeicon"}),t.icons.leaf&&(e.leaf={value:t.icons.leaf,type:"themeicon"}),t.icons.open&&(e.open={value:t.icons.open,type:"themeicon"});else if(!t.icons)return L`${q}`;return
|
|
2875
|
+
.style=${It({backgroundImage:`url(${s})`})}
|
|
2876
|
+
></span>`}_renderIcon(t){const e={branch:{value:"folder",type:"themeicon"},open:{value:"folder-opened",type:"themeicon"},leaf:{value:"file",type:"themeicon"}};if(t.iconUrls)t.iconUrls.branch&&(e.branch={value:t.iconUrls.branch,type:"image"}),t.iconUrls.leaf&&(e.leaf={value:t.iconUrls.leaf,type:"image"}),t.iconUrls.open&&(e.open={value:t.iconUrls.open,type:"image"});else if("object"==typeof t.icons)t.icons.branch&&(e.branch={value:t.icons.branch,type:"themeicon"}),t.icons.leaf&&(e.leaf={value:t.icons.leaf,type:"themeicon"}),t.icons.open&&(e.open={value:t.icons.open,type:"themeicon"});else if(!t.icons)return L`${q}`;return li(t)?t.open?this._renderIconVariant(e.open):this._renderIconVariant(e.branch):this._renderIconVariant(e.leaf)}_renderArrow(t){if(!this.arrows||!li(t))return L`${q}`;const{open:e=!1}=t;return L`
|
|
2799
2877
|
<div class="arrow-container">
|
|
2800
2878
|
<vscode-icon name=${e?"chevron-down":"chevron-right"} class="icon-arrow"></vscode-icon>
|
|
2801
2879
|
</div>
|
|
2802
2880
|
`}_renderActions(t){const e=[];return t.actions&&Array.isArray(t.actions)&&t.actions.forEach(((s,i)=>{if(s.icon){const o=L`<vscode-icon
|
|
2803
2881
|
name=${s.icon}
|
|
2804
2882
|
action-icon
|
|
2805
|
-
title=${
|
|
2806
|
-
data-item-path=${
|
|
2883
|
+
title=${jt(s.tooltip)}
|
|
2884
|
+
data-item-path=${jt(t.path?.join("/"))}
|
|
2807
2885
|
data-index=${i}
|
|
2808
2886
|
class="action-icon"
|
|
2809
2887
|
@click=${this._handleActionClick}
|
|
2810
|
-
></vscode-icon>`;e.push(o)}})),e.length>0?L`<div class="actions">${e}</div>`:L`${q}`}_renderDecorations(t){const e=[];return t.decorations&&Array.isArray(t.decorations)&&t.decorations.forEach((t=>{const{appearance:s="text",visibleWhen:i="always",content:o="",color:r="",focusedColor:n="",hoverColor:
|
|
2888
|
+
></vscode-icon>`;e.push(o)}})),e.length>0?L`<div class="actions">${e}</div>`:L`${q}`}_renderDecorations(t){const e=[];return t.decorations&&Array.isArray(t.decorations)&&t.decorations.forEach((t=>{const{appearance:s="text",visibleWhen:i="always",content:o="",color:r="",focusedColor:n="",hoverColor:a="",selectedColor:c=""}=t,l=`visible-when-${i}`,h={};switch(r&&(h["--color"]=r),n&&(h["--focused-color"]=n),a&&(h["--hover-color"]=a),c&&(h["--selected-color"]=c),s){case"counter-badge":e.push(L`<vscode-badge
|
|
2811
2889
|
variant="counter"
|
|
2812
|
-
class=${["counter-badge",
|
|
2890
|
+
class=${["counter-badge",l].join(" ")}
|
|
2813
2891
|
part="counter-badge-decoration"
|
|
2814
2892
|
>${o}</vscode-badge
|
|
2815
2893
|
>`);break;case"filled-circle":e.push(L`<vscode-icon
|
|
2816
2894
|
name="circle-filled"
|
|
2817
2895
|
size="14"
|
|
2818
|
-
class=${["filled-circle",
|
|
2896
|
+
class=${["filled-circle",l].join(" ")}
|
|
2819
2897
|
part="filled-circle-decoration"
|
|
2820
|
-
.style=${
|
|
2898
|
+
.style=${It(h)}
|
|
2821
2899
|
></vscode-icon>`);break;case"text":e.push(L`<div
|
|
2822
|
-
class=${["decoration-text",
|
|
2900
|
+
class=${["decoration-text",l].join(" ")}
|
|
2823
2901
|
part="caption-decoration"
|
|
2824
|
-
.style=${
|
|
2902
|
+
.style=${It(h)}
|
|
2825
2903
|
>
|
|
2826
2904
|
${o}
|
|
2827
2905
|
</div>`)}})),e.length>0?L`<div class="decorations" part="decorations">
|
|
2828
2906
|
${e}
|
|
2829
|
-
</div>`:L`${q}`}_renderTreeItem(t,e){const{open:s=!1,label:i,description:o="",tooltip:r,selected:n=!1,focused:
|
|
2830
|
-
.style=${
|
|
2831
|
-
class=${
|
|
2907
|
+
</div>`:L`${q}`}_renderTreeItem(t,e){const{open:s=!1,label:i,description:o="",tooltip:r,selected:n=!1,focused:a=!1,subItems:c=[]}=t,{path:l,itemType:h,hasFocusedItem:d=!1,hasSelectedItem:u=!1}=e,v=["contents"],p=s?["open"]:[],b=(l.length-1)*this.indent,f=this.arrows&&"leaf"===h?30+b:b,g=this._renderArrow(t),m=this._renderIcon(t),x=this.arrows?b+16:b+3,y=s&&"branch"===h?L`<ul
|
|
2908
|
+
.style=${It({"--indent-guide-pos":`${x}px`})}
|
|
2909
|
+
class=${Et({"has-active-item":d||u})}
|
|
2832
2910
|
>
|
|
2833
|
-
${this._renderTree(
|
|
2834
|
-
</ul>`:q,w=o?L`<span class="description" part="description">${o}</span>`:q,k=this._renderActions(t),$=this._renderDecorations(t);return
|
|
2835
|
-
<li data-path=${
|
|
2911
|
+
${this._renderTree(c,l)}
|
|
2912
|
+
</ul>`:q,w=o?L`<span class="description" part="description">${o}</span>`:q,k=this._renderActions(t),$=this._renderDecorations(t);return p.push(h),n&&v.push("selected"),a&&v.push("focused"),L`
|
|
2913
|
+
<li data-path=${l.join("/")} class=${p.join(" ")}>
|
|
2836
2914
|
<div
|
|
2837
|
-
class=${
|
|
2838
|
-
.style=${
|
|
2915
|
+
class=${v.join(" ")}
|
|
2916
|
+
.style=${It({paddingLeft:`${f+3}px`})}
|
|
2839
2917
|
>
|
|
2840
2918
|
${g}${m}<span
|
|
2841
2919
|
class="text-content"
|
|
2842
2920
|
part="text-content"
|
|
2843
|
-
title=${
|
|
2921
|
+
title=${jt(r)}
|
|
2844
2922
|
>${i}${w}</span
|
|
2845
2923
|
>
|
|
2846
2924
|
${k} ${$}
|
|
2847
2925
|
</div>
|
|
2848
2926
|
${y}
|
|
2849
2927
|
</li>
|
|
2850
|
-
`}_renderTree(t,e=[]){const s=[];return t?(t.forEach(((t,i)=>{const o=[...e,i],r=
|
|
2928
|
+
`}_renderTree(t,e=[]){const s=[];return t?(t.forEach(((t,i)=>{const o=[...e,i],r=li(t)?"branch":"leaf",{selected:n=!1,focused:a=!1,hasFocusedItem:c=!1,hasSelectedItem:l=!1}=t;n&&(this._selectedItem=t),a&&(this._focusedItem=t),s.push(this._renderTreeItem(t,{path:o,itemType:r,hasFocusedItem:c,hasSelectedItem:l}))})),s):q}_selectItem(t){this._selectedItem&&(this._selectedItem.selected=!1),this._focusedItem&&(this._focusedItem.focused=!1),this._selectedItem=t,t.selected=!0,this._focusedItem=t,t.focused=!0,this._selectedBranch&&(this._selectedBranch.hasSelectedItem=!1);let e=null;if(t.path?.length&&t.path.length>1&&(e=this._getItemByPath(t.path.slice(0,-1))),li(t))this._selectedBranch=t,t.hasSelectedItem=!0,t.open=!t.open,t.open?(this._selectedBranch=t,t.hasSelectedItem=!0):e&&(this._selectedBranch=e,e.hasSelectedItem=!0);else if(t.path?.length&&t.path.length>1){const e=this._getItemByPath(t.path.slice(0,-1));e&&(this._selectedBranch=e,e.hasSelectedItem=!0)}else this._selectedBranch=t,t.hasSelectedItem=!0;this._emitSelectEvent(this._selectedItem,this._selectedItem.path.join("/")),this.requestUpdate()}_focusItem(t){this._focusedItem&&(this._focusedItem.focused=!1),this._focusedItem=t,t.focused=!0;const e=!!t?.subItems?.length;this._focusedBranch&&(this._focusedBranch.hasFocusedItem=!1);let s=null;t.path?.length&&t.path.length>1&&(s=this._getItemByPath(t.path.slice(0,-1))),e?t.open?(this._focusedBranch=t,t.hasFocusedItem=!0):!t.open&&s&&(this._focusedBranch=s,s.hasFocusedItem=!0):s&&(this._focusedBranch=s,s.hasFocusedItem=!0)}_closeSubTreeRecursively(t){t.forEach((t=>{t.open=!1,t.subItems&&t.subItems.length>0&&this._closeSubTreeRecursively(t.subItems)}))}_deselectItemsRecursively(t){t.forEach((t=>{t.selected&&(t.selected=!1),t.subItems&&t.subItems.length>0&&this._deselectItemsRecursively(t.subItems)}))}_emitSelectEvent(t,e){const{icons:s,label:i,open:o,value:r}=t,n={icons:s,itemType:li(t)?"branch":"leaf",label:i,open:o||!1,value:r||i,path:e};this.dispatchEvent(new CustomEvent("vsc-select",{bubbles:!0,composed:!0,detail:n})),this.dispatchEvent(new CustomEvent("vsc-tree-select",{detail:n}))}_focusPrevItem(){if(!this._focusedItem)return void this._focusItem(this._data[0]);const{path:t}=this._focusedItem;if(t&&t?.length>0){const e=t[t.length-1],s=t.length>1;if(e>0){const s=[...t];s[s.length-1]=e-1;const i=this._getItemByPath(s);let o=i;if(i?.open&&i.subItems?.length){const{subItems:t}=i;o=t[t.length-1]}this._focusItem(o)}else if(s){const e=[...t];e.pop(),this._focusItem(this._getItemByPath(e))}}else this._focusItem(this._data[0])}_focusNextItem(){if(!this._focusedItem)return void this._focusItem(this._data[0]);const{path:t,open:e}=this._focusedItem;if(e&&Array.isArray(this._focusedItem.subItems)&&this._focusedItem.subItems.length>0)return void this._focusItem(this._focusedItem.subItems[0]);const s=[...t];s[s.length-1]+=1;let i=this._getItemByPath(s);i?this._focusItem(i):(s.pop(),s.length>0&&(s[s.length-1]+=1,i=this._getItemByPath(s),i&&this._focusItem(i)))}_handleClick(t){const e=t.composedPath().find((t=>t.tagName&&"LI"===t.tagName.toUpperCase()));if(e){const t=(e.dataset.path||"").split("/").map((t=>Number(t))),s=this._getItemByPath(t);this._selectItem(s)}else this._focusedItem&&(this._focusedItem.focused=!1),this._focusedItem=null}_handleComponentKeyDown(t){const e=t.key;[" ","ArrowDown","ArrowUp","Enter","Escape"].includes(t.key)&&(t.stopPropagation(),t.preventDefault()),"Escape"===e&&(this._focusedItem=null),"ArrowUp"===e&&this._focusPrevItem(),"ArrowDown"===e&&this._focusNextItem(),"Enter"!==e&&" "!==e||this._focusedItem&&this._selectItem(this._focusedItem)}render(){const t=Et({multi:this.multiline,single:!this.multiline,wrapper:!0,"has-not-focused-item":!this._focusedItem,"selection-none":!this._selectedItem,"selection-single":null!==this._selectedItem});return L`
|
|
2851
2929
|
<div @click=${this._handleClick} class=${t}>
|
|
2852
2930
|
<ul>
|
|
2853
2931
|
${this._renderTree(this._data)}
|
|
2854
2932
|
</ul>
|
|
2855
2933
|
</div>
|
|
2856
|
-
`}};
|
|
2934
|
+
`}};hi.styles=ni,ai([dt({type:Array,reflect:!1})],hi.prototype,"data",null),ai([dt({type:Number})],hi.prototype,"indent",void 0),ai([dt({type:Boolean,reflect:!0})],hi.prototype,"arrows",void 0),ai([dt({type:Boolean,reflect:!0})],hi.prototype,"multiline",void 0),ai([dt({type:Number,reflect:!0})],hi.prototype,"tabindex",void 0),ai([dt({type:Boolean,reflect:!0,attribute:"indent-guides"})],hi.prototype,"indentGuides",void 0),ai([ut()],hi.prototype,"_selectedItem",void 0),ai([ut()],hi.prototype,"_focusedItem",void 0),ai([ut()],hi.prototype,"_selectedBranch",void 0),ai([ut()],hi.prototype,"_focusedBranch",void 0),hi=ai([yt("vscode-tree")],hi);export{Ct as VscodeBadge,Rt as VscodeButton,Ut as VscodeButtonGroup,Xt as VscodeCheckbox,te as VscodeCheckboxGroup,ie as VscodeCollapsible,le as VscodeContextMenu,ne as VscodeContextMenuItem,ue as VscodeDivider,me as VscodeFormContainer,we as VscodeFormGroup,Ce as VscodeFormHelper,Nt as VscodeIcon,Re as VscodeLabel,as as VscodeMultiSelect,Xe as VscodeOption,hs as VscodeProgressRing,vs as VscodeRadio,Ae as VscodeRadioGroup,ms as VscodeScrollable,bs as VscodeSingleSelect,Cs as VscodeSplitLayout,zs as VscodeTabHeader,Es as VscodeTabPanel,Ys as VscodeTable,Ms as VscodeTableBody,Ns as VscodeTableCell,Rs as VscodeTableHeader,Us as VscodeTableHeaderCell,Ks as VscodeTableRow,Qs as VscodeTabs,Ie as VscodeTextarea,Ne as VscodeTextfield,si as VscodeToolbarButton,ri as VscodeToolbarContainer,hi as VscodeTree};
|