@vscode-elements/elements 1.13.2-pre.0 → 1.13.2-pre.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +112 -505
- package/dist/bundled.js +188 -182
- package/dist/includes/VscElement.d.ts +9 -1
- package/dist/includes/VscElement.d.ts.map +1 -1
- package/dist/includes/VscElement.js +36 -5
- package/dist/includes/VscElement.js.map +1 -1
- package/dist/includes/form-button-widget/base.styles.js +8 -8
- package/dist/includes/form-button-widget/base.styles.js.map +1 -1
- package/dist/vscode-badge/vscode-badge.d.ts.map +1 -1
- package/dist/vscode-badge/vscode-badge.js +2 -2
- package/dist/vscode-badge/vscode-badge.js.map +1 -1
- package/dist/vscode-button/vscode-button.d.ts.map +1 -1
- package/dist/vscode-button/vscode-button.js +2 -2
- 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 +1 -4
- package/dist/vscode-button/vscode-button.styles.js.map +1 -1
- package/dist/vscode-checkbox/vscode-checkbox.d.ts +10 -8
- package/dist/vscode-checkbox/vscode-checkbox.d.ts.map +1 -1
- package/dist/vscode-checkbox/vscode-checkbox.js +12 -9
- package/dist/vscode-checkbox/vscode-checkbox.js.map +1 -1
- package/dist/vscode-checkbox/vscode-checkbox.styles.js +2 -2
- package/dist/vscode-checkbox/vscode-checkbox.styles.js.map +1 -1
- package/dist/vscode-checkbox-group/vscode-checkbox-group.d.ts.map +1 -1
- package/dist/vscode-checkbox-group/vscode-checkbox-group.js +2 -2
- package/dist/vscode-checkbox-group/vscode-checkbox-group.js.map +1 -1
- package/dist/vscode-collapsible/vscode-collapsible.d.ts +6 -6
- package/dist/vscode-collapsible/vscode-collapsible.d.ts.map +1 -1
- package/dist/vscode-collapsible/vscode-collapsible.js +8 -8
- package/dist/vscode-collapsible/vscode-collapsible.js.map +1 -1
- package/dist/vscode-collapsible/vscode-collapsible.styles.js +6 -6
- package/dist/vscode-collapsible/vscode-collapsible.styles.js.map +1 -1
- package/dist/vscode-context-menu/vscode-context-menu.d.ts.map +1 -1
- package/dist/vscode-context-menu/vscode-context-menu.js +2 -2
- package/dist/vscode-context-menu/vscode-context-menu.js.map +1 -1
- package/dist/vscode-context-menu-item/vscode-context-menu-item.d.ts.map +1 -1
- package/dist/vscode-context-menu-item/vscode-context-menu-item.js +2 -2
- package/dist/vscode-context-menu-item/vscode-context-menu-item.js.map +1 -1
- package/dist/vscode-divider/vscode-divider.d.ts.map +1 -1
- package/dist/vscode-divider/vscode-divider.js +2 -2
- package/dist/vscode-divider/vscode-divider.js.map +1 -1
- package/dist/vscode-form-container/vscode-form-container.d.ts.map +1 -1
- package/dist/vscode-form-container/vscode-form-container.js +2 -2
- package/dist/vscode-form-container/vscode-form-container.js.map +1 -1
- package/dist/vscode-form-group/vscode-form-group.d.ts.map +1 -1
- package/dist/vscode-form-group/vscode-form-group.js +2 -2
- package/dist/vscode-form-group/vscode-form-group.js.map +1 -1
- package/dist/vscode-form-helper/vscode-form-helper.d.ts.map +1 -1
- package/dist/vscode-form-helper/vscode-form-helper.js +1 -2
- package/dist/vscode-form-helper/vscode-form-helper.js.map +1 -1
- package/dist/vscode-icon/vscode-icon.d.ts.map +1 -1
- package/dist/vscode-icon/vscode-icon.js +2 -2
- package/dist/vscode-icon/vscode-icon.js.map +1 -1
- package/dist/vscode-label/vscode-label.d.ts +3 -3
- package/dist/vscode-label/vscode-label.d.ts.map +1 -1
- package/dist/vscode-label/vscode-label.js +5 -5
- package/dist/vscode-label/vscode-label.js.map +1 -1
- package/dist/vscode-label/vscode-label.styles.js +4 -4
- package/dist/vscode-label/vscode-label.styles.js.map +1 -1
- package/dist/vscode-multi-select/vscode-multi-select.d.ts.map +1 -1
- package/dist/vscode-multi-select/vscode-multi-select.js +2 -1
- package/dist/vscode-multi-select/vscode-multi-select.js.map +1 -1
- package/dist/vscode-option/vscode-option.d.ts.map +1 -1
- package/dist/vscode-option/vscode-option.js +2 -2
- package/dist/vscode-option/vscode-option.js.map +1 -1
- package/dist/vscode-progress-ring/vscode-progress-ring.d.ts.map +1 -1
- package/dist/vscode-progress-ring/vscode-progress-ring.js +2 -2
- package/dist/vscode-progress-ring/vscode-progress-ring.js.map +1 -1
- package/dist/vscode-radio/vscode-radio.d.ts.map +1 -1
- package/dist/vscode-radio/vscode-radio.js +2 -1
- package/dist/vscode-radio/vscode-radio.js.map +1 -1
- package/dist/vscode-radio-group/vscode-radio-group.d.ts.map +1 -1
- package/dist/vscode-radio-group/vscode-radio-group.js +2 -2
- package/dist/vscode-radio-group/vscode-radio-group.js.map +1 -1
- package/dist/vscode-scrollable/vscode-scrollable.d.ts.map +1 -1
- package/dist/vscode-scrollable/vscode-scrollable.js +2 -2
- package/dist/vscode-scrollable/vscode-scrollable.js.map +1 -1
- package/dist/vscode-single-select/vscode-single-select.d.ts.map +1 -1
- package/dist/vscode-single-select/vscode-single-select.js +2 -1
- package/dist/vscode-single-select/vscode-single-select.js.map +1 -1
- package/dist/vscode-split-layout/vscode-split-layout.d.ts.map +1 -1
- package/dist/vscode-split-layout/vscode-split-layout.js +5 -2
- package/dist/vscode-split-layout/vscode-split-layout.js.map +1 -1
- package/dist/vscode-tab-header/vscode-tab-header.d.ts.map +1 -1
- package/dist/vscode-tab-header/vscode-tab-header.js +2 -2
- package/dist/vscode-tab-header/vscode-tab-header.js.map +1 -1
- package/dist/vscode-tab-panel/vscode-tab-panel.d.ts.map +1 -1
- package/dist/vscode-tab-panel/vscode-tab-panel.js +2 -2
- package/dist/vscode-tab-panel/vscode-tab-panel.js.map +1 -1
- package/dist/vscode-table/vscode-table.d.ts.map +1 -1
- package/dist/vscode-table/vscode-table.js +2 -2
- package/dist/vscode-table/vscode-table.js.map +1 -1
- package/dist/vscode-table-body/vscode-table-body.d.ts.map +1 -1
- package/dist/vscode-table-body/vscode-table-body.js +2 -2
- package/dist/vscode-table-body/vscode-table-body.js.map +1 -1
- package/dist/vscode-table-cell/vscode-table-cell.d.ts.map +1 -1
- package/dist/vscode-table-cell/vscode-table-cell.js +2 -2
- package/dist/vscode-table-cell/vscode-table-cell.js.map +1 -1
- package/dist/vscode-table-header/vscode-table-header.d.ts.map +1 -1
- package/dist/vscode-table-header/vscode-table-header.js +2 -2
- package/dist/vscode-table-header/vscode-table-header.js.map +1 -1
- package/dist/vscode-table-header-cell/vscode-table-header-cell.d.ts.map +1 -1
- package/dist/vscode-table-header-cell/vscode-table-header-cell.js +2 -2
- package/dist/vscode-table-header-cell/vscode-table-header-cell.js.map +1 -1
- package/dist/vscode-table-row/vscode-table-row.d.ts.map +1 -1
- package/dist/vscode-table-row/vscode-table-row.js +2 -2
- package/dist/vscode-table-row/vscode-table-row.js.map +1 -1
- package/dist/vscode-tabs/vscode-tabs.d.ts.map +1 -1
- package/dist/vscode-tabs/vscode-tabs.js +2 -2
- package/dist/vscode-tabs/vscode-tabs.js.map +1 -1
- package/dist/vscode-textarea/vscode-textarea.d.ts +18 -18
- package/dist/vscode-textarea/vscode-textarea.d.ts.map +1 -1
- package/dist/vscode-textarea/vscode-textarea.js +20 -20
- package/dist/vscode-textarea/vscode-textarea.js.map +1 -1
- package/dist/vscode-textarea/vscode-textarea.styles.d.ts.map +1 -1
- package/dist/vscode-textarea/vscode-textarea.styles.js +31 -22
- package/dist/vscode-textarea/vscode-textarea.styles.js.map +1 -1
- package/dist/vscode-textfield/vscode-textfield.d.ts.map +1 -1
- package/dist/vscode-textfield/vscode-textfield.js +2 -2
- package/dist/vscode-textfield/vscode-textfield.js.map +1 -1
- package/dist/vscode-tree/vscode-tree.d.ts.map +1 -1
- package/dist/vscode-tree/vscode-tree.js +2 -2
- package/dist/vscode-tree/vscode-tree.js.map +1 -1
- package/package.json +20 -20
- package/vscode.css-custom-data.json +3 -5
- package/vscode.html-custom-data.json +4 -4
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: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)=>!a(t,e),w={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:y};Symbol.metadata??=Symbol("metadata"),p.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=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(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}),(p.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,A=`<${z}>`,O=document,E=()=>O.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,M=t=>I(t)||"function"==typeof t?.[Symbol.iterator],F="[ \t\n\f\r]",P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,N=/>/g,V=RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),R=/'/g,T=/"/g,L=/^(?:script|style|textarea|title)$/i,U=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),q=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),K=new WeakMap,W=O.createTreeWalker(O,129);function G(t,e){if(!I(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==C?C.createHTML(e):e}const J=(t,e)=>{const s=t.length-1,i=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=P;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===P?"!--"===a[1]?n=D:void 0!==a[1]?n=N:void 0!==a[2]?(L.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=V):void 0!==a[3]&&(n=V):n===V?">"===a[0]?(n=o??P,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?V:'"'===a[3]?T:R):n===T||n===R?n=V:n===D||n===N?n=P:(n=V,o=void 0);const d=n===V&&t[e+1].startsWith("/>")?" ":"";r+=n===P?s+A:c>=0?(i.push(l),s.slice(0,c)+B+s.slice(c)+S+d):s+S+(-2===c?e:d)}return[G(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class Y{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]=J(t,e);if(this.el=Y.createElement(a,s),W.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=W.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]?et:"?"===n[1]?st:"@"===n[1]?it:tt}),i.removeAttribute(t)}else t.startsWith(S)&&(l.push({type:6,index:o}),i.removeAttribute(t));if(L.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()),W.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=O.createElement("template");return s.innerHTML=t,s}}function X(t,e,s=t,i){if(e===q)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=X(t,o._$AS(t,e.values),o,i)),e}class Z{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??O).importNode(e,!0);W.currentNode=i;let o=W.nextNode(),r=0,n=0,l=s[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new Q(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new ot(o,this,t)),this._$AV.push(e),l=s[++n]}r!==l?.index&&(o=W.nextNode(),r++)}return W.currentNode=O,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 Q=class t{get _$AU(){return this._$AM?._$AU??this.v}constructor(t,e,s,i){this.type=2,this._$AH=H,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=X(this,t,e),j(t)?t===H||null==t||""===t?(this._$AH!==H&&this._$AR(),this._$AH=H):t!==this._$AH&&t!==q&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):M(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!==H&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(O.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=Y.createElement(G(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Z(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=K.get(t.strings);return void 0===e&&K.set(t.strings,e=new Y(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 tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=H,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=H}_$AI(t,e=this,s,i){const o=this.strings;let r=!1;if(void 0===o)t=X(this,t,e,0),r=!j(t)||t!==this._$AH&&t!==q,r&&(this._$AH=t);else{const i=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=X(this,i[s+n],e,n),l===q&&(l=this._$AH[n]),r||=!j(l)||l!==this._$AH[n],l===H?t=H:t!==H&&(t+=(l??"")+o[n+1]),this._$AH[n]=l}r&&!i&&this.j(t)}j(t){t===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===H?void 0:t}}class st extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==H)}}class it extends tt{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=X(this,t,e,0)??H)===q)return;const s=this._$AH,i=t===H&&s!==H||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==H&&(s===H||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 ot{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){X(this,t)}}const rt={M:B,P:S,A:z,C:1,L:J,R:Z,D:M,V:X,I:Q,H:tt,N:st,U:it,B:et,F:ot},nt=$.litHtmlPolyfillSupport;nt?.(Y,Q),($.litHtmlVersions??=[]).push("3.2.0");class lt 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=((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 Q(e.insertBefore(E(),t),t,void 0,s??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return q}}lt._$litElement$=!0,lt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:lt});const at=globalThis.litElementPolyfillSupport;at?.({LitElement:lt}),(globalThis.litElementVersions??=[]).push("4.1.0");const ct=t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},ht={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:y},dt=(t=ht,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 ut(t){return(e,s)=>"object"==typeof s?dt(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 vt(t){return ut({...t,state:!0,attribute:!1})}const pt=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,s);function bt(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 pt(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 pt(0,0,{get(){return r(this)}})}}let ft;function gt(t){return(e,s)=>{const{slot:i,selector:o}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return pt(0,0,{get(){const e=this.renderRoot?.querySelector(r),s=e?.assignedElements(t)??[];return void 0===o?s:s.filter((t=>t.matches(o)))}})}}class mt extends lt{constructor(){super(...arguments),this._version="1.13.2-pre.0"}get version(){return this._version}}var xt=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)},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: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)=>!a(t,e),w={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:y};Symbol.metadata??=Symbol("metadata"),p.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=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(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}),(p.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,A=`<${z}>`,E=document,O=()=>E.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,D=/>/g,N=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=E.createTreeWalker(E,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=D:void 0!==a[2]?(R.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=N):void 0!==a[3]&&(n=N):n===N?">"===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]?N:'"'===a[3]?T:V):n===T||n===V?n=N:n===P||n===D?n=F:(n=N,o=void 0);const d=n===N&&t[e+1].startsWith("/>")?" ":"";r+=n===F?s+A: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],O()),K.nextNode(),l.push({type:2,index:++o});i.append(t[e],O())}}}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=E.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??E).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=E,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(E.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(O()),this.O(O()),this,this.options)):i=s[o],i._$AI(r),o++;o<s.length&&(this._$AR(i&&i._$AB.nextSibling,o),s.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this.v=t,this._$AP?.(t))}};class 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");class rt 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=((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(O(),t),t,void 0,s??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return U}}rt._$litElement$=!0,rt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:rt});const nt=globalThis.litElementPolyfillSupport;nt?.({LitElement:rt}),(globalThis.litElementVersions??=[]).push("4.1.0");const lt={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:y},at=(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),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 ct(t){return(e,s)=>"object"==typeof s?at(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 ht(t){return ct({...t,state:!0,attribute:!1})}const dt=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,s);function ut(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 dt(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 dt(0,0,{get(){return r(this)}})}}let vt;function pt(t){return(e,s)=>{const{slot:i,selector:o}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return dt(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 bt="1.13.2-pre.1",ft="__vscodeElements_disableRegistryWarning__";class gt extends rt{get version(){return bt}}const mt=t=>e=>{if(!customElements.get(t))return void customElements.define(t,e);if(ft in window)return;const s=document.createElement(t),i=s?.version;let o="";i?i!==bt?(o+="is already registered by a different version of VSCode Elements. ",o+=`This version is "${bt}", 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.${ft} to true`)};var xt=n`
|
|
2
2
|
:host([hidden]) {
|
|
3
3
|
display: none;
|
|
4
4
|
}
|
|
@@ -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 kt=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 $t=class extends
|
|
57
|
+
`];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,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 $t=class extends gt{constructor(){super(...arguments),this.variant="default"}render(){return L` <slot></slot> `}};$t.styles=wt,kt([ct({reflect:!0})],$t.prototype,"variant",void 0),$t=kt([mt("vscode-badge")],$t);const _t=1,Ct=2,Bt=3,St=t=>(...e)=>({_$litDirective$:t,values:e});class zt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this.t=t,this._$AM=e,this.i=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const At=St(class extends zt{constructor(t){if(super(t),t.type!==_t||"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}}),Et=t=>t??q;const Ot=St(class extends zt{constructor(t){if(super(t),this._prevProperties={},t.type!==Bt||"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}}),jt=[xt,n`
|
|
58
58
|
:host {
|
|
59
59
|
color: var(--vscode-icon-foreground);
|
|
60
60
|
display: inline-block;
|
|
@@ -108,31 +108,28 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
108
108
|
animation-timing-function: linear;
|
|
109
109
|
animation-iteration-count: infinite;
|
|
110
110
|
}
|
|
111
|
-
`];var It,Mt=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 Ft=It=class extends
|
|
111
|
+
`];var It,Mt=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 Ft=It=class extends gt{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();It.stylesheetHref=t,It.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}=It,s=L`<span
|
|
112
112
|
class=${At({codicon:!0,["codicon-"+this.name]:!0,spin:this.spin})}
|
|
113
|
-
.style=${
|
|
114
|
-
></span>`,i=this.actionIcon?
|
|
113
|
+
.style=${Ot({animationDuration:String(this.spinDuration)+"s",fontSize:this.size+"px",height:this.size+"px",width:this.size+"px"})}
|
|
114
|
+
></span>`,i=this.actionIcon?L` <button
|
|
115
115
|
class="button"
|
|
116
116
|
@click=${this._onButtonClick}
|
|
117
117
|
aria-label=${this.label}
|
|
118
118
|
>
|
|
119
119
|
${s}
|
|
120
|
-
</button>`:
|
|
120
|
+
</button>`:L` <span class="icon" aria-hidden="true" role="presentation"
|
|
121
121
|
>${s}</span
|
|
122
|
-
>`;return
|
|
122
|
+
>`;return L`
|
|
123
123
|
<link
|
|
124
124
|
rel="stylesheet"
|
|
125
|
-
href=${
|
|
126
|
-
nonce=${
|
|
125
|
+
href=${Et(t)}
|
|
126
|
+
nonce=${Et(e)}
|
|
127
127
|
>
|
|
128
128
|
${i}
|
|
129
|
-
`}};Ft.styles=jt,Ft.stylesheetHref="",Ft.nonce="",Mt([
|
|
129
|
+
`}};Ft.styles=jt,Ft.stylesheetHref="",Ft.nonce="",Mt([ct()],Ft.prototype,"label",void 0),Mt([ct({type:String})],Ft.prototype,"name",void 0),Mt([ct({type:Number})],Ft.prototype,"size",void 0),Mt([ct({type:Boolean,reflect:!0})],Ft.prototype,"spin",void 0),Mt([ct({type:Number,attribute:"spin-duration"})],Ft.prototype,"spinDuration",void 0),Mt([ct({type:Boolean,reflect:!0,attribute:"action-icon"})],Ft.prototype,"actionIcon",void 0),Ft=It=Mt([mt("vscode-icon")],Ft);const Pt=[xt,n`
|
|
130
130
|
:host {
|
|
131
131
|
background-color: var(--vscode-button-background, #0078d4);
|
|
132
|
-
border-color: var(
|
|
133
|
-
--vscode-button-border,
|
|
134
|
-
var(--vscode-button-background, rgba(255, 255, 255, 0.07))
|
|
135
|
-
);
|
|
132
|
+
border-color: var(--vscode-button-border, transparent);
|
|
136
133
|
border-style: solid;
|
|
137
134
|
border-radius: 2px;
|
|
138
135
|
border-width: 1px;
|
|
@@ -244,29 +241,29 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
244
241
|
display: block;
|
|
245
242
|
margin-left: 3px;
|
|
246
243
|
}
|
|
247
|
-
`];var Dt=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 Nt=class extends
|
|
244
|
+
`];var Dt=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 Nt=class extends gt{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.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},i=t?L`<vscode-icon
|
|
248
245
|
name=${this.icon}
|
|
249
246
|
?spin=${this.iconSpin}
|
|
250
|
-
spin-duration=${
|
|
247
|
+
spin-duration=${Et(this.iconSpinDuration)}
|
|
251
248
|
class="icon"
|
|
252
|
-
></vscode-icon>`:
|
|
249
|
+
></vscode-icon>`:q,o=e?L`<vscode-icon
|
|
253
250
|
name=${this.iconAfter}
|
|
254
251
|
?spin=${this.iconAfterSpin}
|
|
255
|
-
spin-duration=${
|
|
252
|
+
spin-duration=${Et(this.iconAfterSpinDuration)}
|
|
256
253
|
class="icon-after"
|
|
257
|
-
></vscode-icon>`:
|
|
254
|
+
></vscode-icon>`:q;return L`
|
|
258
255
|
<span class=${At(s)}>
|
|
259
256
|
${i}
|
|
260
257
|
<slot></slot>
|
|
261
258
|
${o}
|
|
262
259
|
</span>
|
|
263
|
-
`}};Nt.styles=Pt,Nt.formAssociated=!0,Dt([
|
|
260
|
+
`}};Nt.styles=Pt,Nt.formAssociated=!0,Dt([ct({type:Boolean,reflect:!0})],Nt.prototype,"autofocus",void 0),Dt([ct({type:Number,reflect:!0})],Nt.prototype,"tabIndex",void 0),Dt([ct({type:Boolean,reflect:!0})],Nt.prototype,"secondary",void 0),Dt([ct({reflect:!0})],Nt.prototype,"role",void 0),Dt([ct({type:Boolean,reflect:!0})],Nt.prototype,"disabled",void 0),Dt([ct()],Nt.prototype,"icon",void 0),Dt([ct({type:Boolean,reflect:!0,attribute:"icon-spin"})],Nt.prototype,"iconSpin",void 0),Dt([ct({type:Number,reflect:!0,attribute:"icon-spin-duration"})],Nt.prototype,"iconSpinDuration",void 0),Dt([ct({attribute:"icon-after"})],Nt.prototype,"iconAfter",void 0),Dt([ct({type:Boolean,reflect:!0,attribute:"icon-after-spin"})],Nt.prototype,"iconAfterSpin",void 0),Dt([ct({type:Number,reflect:!0,attribute:"icon-after-spin-duration"})],Nt.prototype,"iconAfterSpinDuration",void 0),Dt([ct({type:Boolean,reflect:!0})],Nt.prototype,"focused",void 0),Dt([ct({type:String,reflect:!0})],Nt.prototype,"name",void 0),Dt([ct({reflect:!0})],Nt.prototype,"type",void 0),Dt([ct()],Nt.prototype,"value",void 0),Nt=Dt([mt("vscode-button")],Nt);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,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};class Tt extends gt{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)}}Vt([ct({type:Boolean,reflect:!0})],Tt.prototype,"focused",void 0);var Rt=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 Lt=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 Rt([ct()],e.prototype,"label",null),e};var Ut=[n`
|
|
264
261
|
:host {
|
|
265
|
-
color: var(--
|
|
262
|
+
color: var(--vscode-foreground, #cccccc);
|
|
266
263
|
display: inline-block;
|
|
267
|
-
font-family: var(--vscode-font-family);
|
|
268
|
-
font-size: var(--vscode-font-size);
|
|
269
|
-
font-weight: var(--vscode-font-weight);
|
|
264
|
+
font-family: var(--vscode-font-family, sans-serif);
|
|
265
|
+
font-size: var(--vscode-font-size, 13px);
|
|
266
|
+
font-weight: var(--vscode-font-weight, normal);
|
|
270
267
|
line-height: 18px;
|
|
271
268
|
}
|
|
272
269
|
|
|
@@ -281,7 +278,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
281
278
|
.wrapper {
|
|
282
279
|
cursor: pointer;
|
|
283
280
|
display: block;
|
|
284
|
-
font-size: var(--vscode-font-size);
|
|
281
|
+
font-size: var(--vscode-font-size, 13px);
|
|
285
282
|
margin-bottom: 4px;
|
|
286
283
|
margin-top: 4px;
|
|
287
284
|
min-height: 18px;
|
|
@@ -307,11 +304,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
307
304
|
|
|
308
305
|
.icon {
|
|
309
306
|
align-items: center;
|
|
310
|
-
background-color: var(--vscode-settings-checkboxBackground);
|
|
307
|
+
background-color: var(--vscode-settings-checkboxBackground, #313131);
|
|
311
308
|
background-size: 16px;
|
|
312
|
-
border: 1px solid var(--vscode-settings-checkboxBorder);
|
|
309
|
+
border: 1px solid var(--vscode-settings-checkboxBorder, #3c3c3c);
|
|
313
310
|
box-sizing: border-box;
|
|
314
|
-
color: var(--vscode-settings-checkboxForeground);
|
|
311
|
+
color: var(--vscode-settings-checkboxForeground, #cccccc);
|
|
315
312
|
display: flex;
|
|
316
313
|
height: 18px;
|
|
317
314
|
justify-content: center;
|
|
@@ -352,7 +349,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
352
349
|
`];const qt=[xt,Ut,n`
|
|
353
350
|
:host(:invalid) .icon,
|
|
354
351
|
:host([invalid]) .icon {
|
|
355
|
-
background-color: var(--vscode-inputValidation-errorBackground);
|
|
352
|
+
background-color: var(--vscode-inputValidation-errorBackground, #5a1d1d);
|
|
356
353
|
border-color: var(--vscode-inputValidation-errorBorder, #be1100);
|
|
357
354
|
}
|
|
358
355
|
|
|
@@ -368,10 +365,10 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
368
365
|
}
|
|
369
366
|
|
|
370
367
|
:host(:focus):host(:not([disabled])) .icon {
|
|
371
|
-
outline: 1px solid var(--vscode-focusBorder);
|
|
368
|
+
outline: 1px solid var(--vscode-focusBorder, #0078d4);
|
|
372
369
|
outline-offset: -1px;
|
|
373
370
|
}
|
|
374
|
-
`];var Ht=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 Kt=class extends(Lt(
|
|
371
|
+
`];var Ht=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 Kt=class extends(Lt(Tt)){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.role="checkbox",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=At({icon:!0,checked:this.checked,indeterminate:this.indeterminate}),e=At({"label-inner":!0}),s=L`<svg
|
|
375
372
|
width="16"
|
|
376
373
|
height="16"
|
|
377
374
|
viewBox="0 0 16 16"
|
|
@@ -384,7 +381,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
384
381
|
clip-rule="evenodd"
|
|
385
382
|
d="M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z"
|
|
386
383
|
/>
|
|
387
|
-
</svg>`,i=this.checked&&!this.indeterminate?s:
|
|
384
|
+
</svg>`,i=this.checked&&!this.indeterminate?s:q,o=this.indeterminate?L`<span class="indeterminate-icon"></span>`:q;return L`
|
|
388
385
|
<div class="wrapper">
|
|
389
386
|
<input
|
|
390
387
|
?autofocus=${this.autofocus}
|
|
@@ -402,7 +399,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
402
399
|
</span>
|
|
403
400
|
</label>
|
|
404
401
|
</div>
|
|
405
|
-
`}};Kt.styles=qt,Kt.formAssociated=!0,Kt.shadowRootOptions={...
|
|
402
|
+
`}};Kt.styles=qt,Kt.formAssociated=!0,Kt.shadowRootOptions={...rt.shadowRootOptions,delegatesFocus:!0},Ht([ct({type:Boolean,reflect:!0})],Kt.prototype,"autofocus",void 0),Ht([ct({type:Boolean,reflect:!0})],Kt.prototype,"checked",null),Ht([ct({type:Boolean,reflect:!0,attribute:"default-checked"})],Kt.prototype,"defaultChecked",void 0),Ht([ct({type:Boolean,reflect:!0})],Kt.prototype,"invalid",void 0),Ht([ct({reflect:!0})],Kt.prototype,"name",void 0),Ht([ct({reflect:!0})],Kt.prototype,"role",void 0),Ht([ct()],Kt.prototype,"value",void 0),Ht([ct({type:Boolean,reflect:!0})],Kt.prototype,"disabled",void 0),Ht([ct({type:Boolean,reflect:!0})],Kt.prototype,"indeterminate",void 0),Ht([ct({type:Boolean,reflect:!0})],Kt.prototype,"required",null),Ht([ct()],Kt.prototype,"type",void 0),Ht([ut("#input")],Kt.prototype,"_inputEl",void 0),Kt=Ht([mt("vscode-checkbox")],Kt);const Wt=[xt,n`
|
|
406
403
|
:host {
|
|
407
404
|
display: block;
|
|
408
405
|
}
|
|
@@ -432,18 +429,18 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
432
429
|
:host([variant='vertical']) ::slotted(vscode-checkbox:last-child) {
|
|
433
430
|
margin-bottom: 0;
|
|
434
431
|
}
|
|
435
|
-
`];var Gt=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 Jt=class extends
|
|
432
|
+
`];var Gt=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 Jt=class extends gt{constructor(){super(...arguments),this.role="group",this.variant="horizontal"}render(){return L`
|
|
436
433
|
<div class="wrapper">
|
|
437
434
|
<slot></slot>
|
|
438
435
|
</div>
|
|
439
|
-
`}};Jt.styles=Wt,Gt([
|
|
436
|
+
`}};Jt.styles=Wt,Gt([ct({reflect:!0})],Jt.prototype,"role",void 0),Gt([ct({reflect:!0})],Jt.prototype,"variant",void 0),Jt=Gt([mt("vscode-checkbox-group")],Jt);const Yt=[xt,n`
|
|
440
437
|
.collapsible {
|
|
441
|
-
background-color: var(--vscode-sideBar-background);
|
|
438
|
+
background-color: var(--vscode-sideBar-background, #181818);
|
|
442
439
|
}
|
|
443
440
|
|
|
444
441
|
.collapsible-header {
|
|
445
442
|
align-items: center;
|
|
446
|
-
background-color: var(--vscode-sideBarSectionHeader-background);
|
|
443
|
+
background-color: var(--vscode-sideBarSectionHeader-background, #181818);
|
|
447
444
|
cursor: pointer;
|
|
448
445
|
display: flex;
|
|
449
446
|
height: 22px;
|
|
@@ -456,13 +453,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
456
453
|
outline-offset: -1px;
|
|
457
454
|
outline-style: solid;
|
|
458
455
|
outline-width: 1px;
|
|
459
|
-
outline-color: var(--vscode-focusBorder);
|
|
456
|
+
outline-color: var(--vscode-focusBorder, #0078d4);
|
|
460
457
|
}
|
|
461
458
|
|
|
462
459
|
.title {
|
|
463
|
-
color: var(--vscode-sideBarTitle-foreground);
|
|
460
|
+
color: var(--vscode-sideBarTitle-foreground, #cccccc);
|
|
464
461
|
display: block;
|
|
465
|
-
font-family: var(--vscode-font-family);
|
|
462
|
+
font-family: var(--vscode-font-family, sans-serif);
|
|
466
463
|
font-size: 11px;
|
|
467
464
|
font-weight: 700;
|
|
468
465
|
margin: 0;
|
|
@@ -480,7 +477,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
480
477
|
}
|
|
481
478
|
|
|
482
479
|
.header-icon {
|
|
483
|
-
color: var(--vscode-icon-foreground);
|
|
480
|
+
color: var(--vscode-icon-foreground, #cccccc);
|
|
484
481
|
display: block;
|
|
485
482
|
flex-shrink: 0;
|
|
486
483
|
margin: 0 3px;
|
|
@@ -525,7 +522,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
525
522
|
.collapsible.open .collapsible-body {
|
|
526
523
|
display: block;
|
|
527
524
|
}
|
|
528
|
-
`];var Xt=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Zt=class extends
|
|
525
|
+
`];var Xt=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Zt=class extends gt{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=At({collapsible:!0,open:this.open}),e=L`<svg
|
|
529
526
|
width="16"
|
|
530
527
|
height="16"
|
|
531
528
|
viewBox="0 0 16 16"
|
|
@@ -538,7 +535,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
538
535
|
clip-rule="evenodd"
|
|
539
536
|
d="M10.072 8.024L5.715 3.667l.618-.62L11 7.716v.618L6.333 13l-.618-.619 4.357-4.357z"
|
|
540
537
|
/>
|
|
541
|
-
</svg>`,s=this.description?
|
|
538
|
+
</svg>`,s=this.description?L`<span class="description">${this.description}</span>`:q;return L`
|
|
542
539
|
<div class=${t}>
|
|
543
540
|
<div
|
|
544
541
|
class="collapsible-header"
|
|
@@ -558,7 +555,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
558
555
|
<slot></slot>
|
|
559
556
|
</div>
|
|
560
557
|
</div>
|
|
561
|
-
`}};Zt.styles=Yt,Xt([
|
|
558
|
+
`}};Zt.styles=Yt,Xt([ct({type:String})],Zt.prototype,"title",void 0),Xt([ct()],Zt.prototype,"description",void 0),Xt([ct({type:Boolean,reflect:!0})],Zt.prototype,"open",void 0),Zt=Xt([mt("vscode-collapsible")],Zt);const Qt=[xt,n`
|
|
562
559
|
:host {
|
|
563
560
|
display: block;
|
|
564
561
|
font-family: var(--vscode-font-family);
|
|
@@ -630,20 +627,20 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
630
627
|
padding: 0 22px;
|
|
631
628
|
text-align: right;
|
|
632
629
|
}
|
|
633
|
-
`];var te=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 ee=class extends
|
|
634
|
-
${this.separator?
|
|
630
|
+
`];var te=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 ee=class extends gt{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`
|
|
631
|
+
${this.separator?L`
|
|
635
632
|
<div class="context-menu-item separator">
|
|
636
633
|
<span class="ruler"></span>
|
|
637
634
|
</div>
|
|
638
|
-
`:
|
|
635
|
+
`:L`
|
|
639
636
|
<div class="context-menu-item">
|
|
640
637
|
<a @click=${this.onItemClick}>
|
|
641
|
-
${this.label?
|
|
642
|
-
${this.keybinding?
|
|
638
|
+
${this.label?L`<span class="label">${this.label}</span>`:q}
|
|
639
|
+
${this.keybinding?L`<span class="keybinding">${this.keybinding}</span>`:q}
|
|
643
640
|
</a>
|
|
644
641
|
</div>
|
|
645
642
|
`}
|
|
646
|
-
`}};ee.styles=Qt,te([
|
|
643
|
+
`}};ee.styles=Qt,te([ct({type:String})],ee.prototype,"label",void 0),te([ct({type:String})],ee.prototype,"keybinding",void 0),te([ct({type:String})],ee.prototype,"value",void 0),te([ct({type:Boolean,reflect:!0})],ee.prototype,"separator",void 0),te([ct({type:Number})],ee.prototype,"tabindex",void 0),ee=te([mt("vscode-context-menu-item")],ee);const se=[xt,n`
|
|
647
644
|
:host {
|
|
648
645
|
display: block;
|
|
649
646
|
font-family: var(--vscode-font-family);
|
|
@@ -668,9 +665,9 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
668
665
|
.context-menu:focus {
|
|
669
666
|
outline: 0;
|
|
670
667
|
}
|
|
671
|
-
`];var ie=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 oe=class extends
|
|
668
|
+
`];var ie=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 oe=class extends gt{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
669
|
<div class="context-menu" tabindex="0">
|
|
673
|
-
${this.data?this.data.map((({label:e="",keybinding:s="",value:i="",separator:o=!1,tabindex:r=0},n)=>
|
|
670
|
+
${this.data?this.data.map((({label:e="",keybinding:s="",value:i="",separator:o=!1,tabindex:r=0},n)=>L`
|
|
674
671
|
<vscode-context-menu-item
|
|
675
672
|
label=${e}
|
|
676
673
|
keybinding=${s}
|
|
@@ -683,9 +680,9 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
683
680
|
@mouseout=${this._onItemMouseOut}
|
|
684
681
|
data-index=${n}
|
|
685
682
|
></vscode-context-menu-item>
|
|
686
|
-
`)):
|
|
683
|
+
`)):L`<slot></slot>`}
|
|
687
684
|
</div>
|
|
688
|
-
`}};oe.styles=se,ie([
|
|
685
|
+
`}};oe.styles=se,ie([ct({type:Array,attribute:!1})],oe.prototype,"data",null),ie([ct({type:Boolean,reflect:!0,attribute:"prevent-close"})],oe.prototype,"preventClose",void 0),ie([ct({type:Boolean,reflect:!0})],oe.prototype,"show",null),ie([ct({type:Number,reflect:!0})],oe.prototype,"tabIndex",void 0),ie([ht()],oe.prototype,"_selectedClickableItemIndex",void 0),ie([ht()],oe.prototype,"_show",void 0),ie([ut(".context-menu")],oe.prototype,"_wrapperEl",void 0),oe=ie([mt("vscode-context-menu")],oe);const re=[xt,n`
|
|
689
686
|
:host {
|
|
690
687
|
background-color: var(--vscode-foreground);
|
|
691
688
|
display: block;
|
|
@@ -694,16 +691,16 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
694
691
|
margin-top: 10px;
|
|
695
692
|
opacity: 0.4;
|
|
696
693
|
}
|
|
697
|
-
`];var ne=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 le=class extends
|
|
694
|
+
`];var ne=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 le=class extends gt{constructor(){super(...arguments),this.role="separator"}render(){return L``}};le.styles=re,ne([ct({reflect:!0})],le.prototype,"role",void 0),le=ne([mt("vscode-divider")],le);const ae=[xt,n`
|
|
698
695
|
:host {
|
|
699
696
|
display: block;
|
|
700
697
|
max-width: 727px;
|
|
701
698
|
}
|
|
702
|
-
`];var ce,he=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};!function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(ce||(ce={}));const de=t=>"vscode-checkbox"===t.tagName.toLocaleLowerCase(),ue=t=>"vscode-radio"===t.tagName.toLocaleLowerCase();let ve=class extends
|
|
699
|
+
`];var ce,he=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};!function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(ce||(ce={}));const de=t=>"vscode-checkbox"===t.tagName.toLocaleLowerCase(),ue=t=>"vscode-radio"===t.tagName.toLocaleLowerCase();let ve=class extends gt{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&&(de(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:de(t)&&!t.checked?s[e]=Array.isArray(s[e])?s[e]:[]:ue(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:ue(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===ce.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===ce.HORIZONTAL&&s===ce.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?ce.VERTICAL:ce.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
700
|
<div class="wrapper">
|
|
704
701
|
<slot></slot>
|
|
705
702
|
</div>
|
|
706
|
-
`}};ve.styles=ae,he([
|
|
703
|
+
`}};ve.styles=ae,he([ct({type:Boolean,reflect:!0})],ve.prototype,"responsive",null),he([ct({type:Number})],ve.prototype,"breakpoint",void 0),he([ct({type:Object})],ve.prototype,"data",null),he([ut(".wrapper")],ve.prototype,"_wrapperElement",void 0),he([pt({selector:"vscode-form-group"})],ve.prototype,"_assignedFormGroups",void 0),ve=he([mt("vscode-form-container")],ve);const pe=[xt,n`
|
|
707
704
|
:host {
|
|
708
705
|
--label-right-margin: 14px;
|
|
709
706
|
--label-width: 150px;
|
|
@@ -788,11 +785,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
788
785
|
::slotted(vscode-button) {
|
|
789
786
|
margin-right: 4px;
|
|
790
787
|
}
|
|
791
|
-
`];var be=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 fe=class extends
|
|
788
|
+
`];var be=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 fe=class extends gt{constructor(){super(...arguments),this.variant="horizontal"}render(){return L`
|
|
792
789
|
<div class="wrapper">
|
|
793
790
|
<slot></slot>
|
|
794
791
|
</div>
|
|
795
|
-
`}};fe.styles=pe,be([
|
|
792
|
+
`}};fe.styles=pe,be([ct({reflect:!0})],fe.prototype,"variant",void 0),fe=be([mt("vscode-form-group")],fe);const ge=[xt,n`
|
|
796
793
|
:host {
|
|
797
794
|
display: block;
|
|
798
795
|
line-height: 1.4em;
|
|
@@ -805,7 +802,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
805
802
|
:host([vertical]) {
|
|
806
803
|
margin-left: 0;
|
|
807
804
|
}
|
|
808
|
-
`];var me=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 xe=new CSSStyleSheet;xe.replaceSync("\n vscode-form-helper * {\n margin: 0;\n }\n\n vscode-form-helper *:not(:last-child) {\n margin-bottom: 8px;\n }\n");let ye=class extends
|
|
805
|
+
`];var me=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 xe=new CSSStyleSheet;xe.replaceSync("\n vscode-form-helper * {\n margin: 0;\n }\n\n vscode-form-helper *:not(:last-child) {\n margin-bottom: 8px;\n }\n");let ye=class extends gt{constructor(){super(),this._injectLightDOMStyles()}_injectLightDOMStyles(){const t=document.adoptedStyleSheets.find((t=>t===xe));t||document.adoptedStyleSheets.push(xe)}render(){return L`<slot></slot>`}};ye.styles=ge,ye=me([mt("vscode-form-helper")],ye);let we=0;const ke=(t="")=>(we++,`${t}${we}`),$e=[xt,n`
|
|
809
806
|
:host {
|
|
810
807
|
display: block;
|
|
811
808
|
}
|
|
@@ -835,14 +832,14 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
835
832
|
:host([variant='vertical']) ::slotted(vscode-radio:last-child) {
|
|
836
833
|
margin-bottom: 0;
|
|
837
834
|
}
|
|
838
|
-
`];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,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 Ce=class extends
|
|
835
|
+
`];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,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 Ce=class extends gt{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
836
|
<div class="wrapper">
|
|
840
837
|
<slot
|
|
841
838
|
@slotchange=${this._onSlotChange}
|
|
842
839
|
@vsc-change=${this._onChange}
|
|
843
840
|
></slot>
|
|
844
841
|
</div>
|
|
845
|
-
`}};Ce.styles=$e,_e([
|
|
842
|
+
`}};Ce.styles=$e,_e([ct({reflect:!0})],Ce.prototype,"variant",void 0),_e([ct({reflect:!0})],Ce.prototype,"role",void 0),_e([pt({selector:"vscode-radio"})],Ce.prototype,"_radios",void 0),_e([ht()],Ce.prototype,"_focusedRadio",void 0),_e([ht()],Ce.prototype,"_checkedRadio",void 0),Ce=_e([mt("vscode-radio-group")],Ce);const Be=[xt,n`
|
|
846
843
|
:host {
|
|
847
844
|
display: inline-block;
|
|
848
845
|
height: 40px;
|
|
@@ -859,7 +856,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
859
856
|
}
|
|
860
857
|
|
|
861
858
|
.shadow {
|
|
862
|
-
box-shadow: var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset;
|
|
859
|
+
box-shadow: var(--vscode-scrollbar-shadow, #000000) 0 6px 6px -6px inset;
|
|
863
860
|
display: none;
|
|
864
861
|
inset: 0 0 auto 0;
|
|
865
862
|
height: 6px;
|
|
@@ -873,20 +870,17 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
873
870
|
}
|
|
874
871
|
|
|
875
872
|
textarea {
|
|
876
|
-
background-color: var(--vscode-settings-textInputBackground);
|
|
877
|
-
border-color: var(
|
|
878
|
-
--vscode-settings-textInputBorder,
|
|
879
|
-
var(--vscode-settings-textInputBackground)
|
|
880
|
-
);
|
|
873
|
+
background-color: var(--vscode-settings-textInputBackground, #313131);
|
|
874
|
+
border-color: var(--vscode-settings-textInputBorder, transparent);
|
|
881
875
|
border-radius: 2px;
|
|
882
876
|
border-style: solid;
|
|
883
877
|
border-width: 1px;
|
|
884
878
|
box-sizing: border-box;
|
|
885
|
-
color: var(--vscode-settings-textInputForeground);
|
|
879
|
+
color: var(--vscode-settings-textInputForeground, #cccccc);
|
|
886
880
|
display: block;
|
|
887
|
-
font-family: var(--vscode-font-family);
|
|
888
|
-
font-size: var(--vscode-font-size);
|
|
889
|
-
font-weight: var(--vscode-font-weight);
|
|
881
|
+
font-family: var(--vscode-font-family, sans-serif);
|
|
882
|
+
font-size: var(--vscode-font-size, 13px);
|
|
883
|
+
font-weight: var(--vscode-font-weight, normal);
|
|
890
884
|
height: 100%;
|
|
891
885
|
width: 100%;
|
|
892
886
|
}
|
|
@@ -901,20 +895,23 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
901
895
|
|
|
902
896
|
:host([invalid]) textarea,
|
|
903
897
|
:host(:invalid) textarea {
|
|
904
|
-
background-color: var(--vscode-inputValidation-errorBackground);
|
|
898
|
+
background-color: var(--vscode-inputValidation-errorBackground, #5a1d1d);
|
|
905
899
|
border-color: var(--vscode-inputValidation-errorBorder, #be1100);
|
|
906
900
|
}
|
|
907
901
|
|
|
908
902
|
textarea.monospace {
|
|
909
|
-
background-color: var(--vscode-editor-background);
|
|
910
|
-
color: var(--vscode-editor-foreground);
|
|
911
|
-
font-family: var(--vscode-editor-font-family);
|
|
912
|
-
font-size: var(--vscode-editor-font-size);
|
|
913
|
-
font-weight: var(--vscode-editor-font-weight);
|
|
903
|
+
background-color: var(--vscode-editor-background, #1f1f1f);
|
|
904
|
+
color: var(--vscode-editor-foreground, #cccccc);
|
|
905
|
+
font-family: var(--vscode-editor-font-family, monospace);
|
|
906
|
+
font-size: var(--vscode-editor-font-size, 14px);
|
|
907
|
+
font-weight: var(--vscode-editor-font-weight, normal);
|
|
914
908
|
}
|
|
915
909
|
|
|
916
910
|
.textarea.monospace::placeholder {
|
|
917
|
-
color: var(
|
|
911
|
+
color: var(
|
|
912
|
+
--vscode-editor-inlineValuesForeground,
|
|
913
|
+
rgba(255, 255, 255, 0.5)
|
|
914
|
+
);
|
|
918
915
|
}
|
|
919
916
|
|
|
920
917
|
textarea.cursor-pointer {
|
|
@@ -922,12 +919,12 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
922
919
|
}
|
|
923
920
|
|
|
924
921
|
textarea:focus {
|
|
925
|
-
border-color: var(--vscode-focusBorder);
|
|
922
|
+
border-color: var(--vscode-focusBorder, #0078d4);
|
|
926
923
|
outline: none;
|
|
927
924
|
}
|
|
928
925
|
|
|
929
926
|
textarea::placeholder {
|
|
930
|
-
color: var(--vscode-input-placeholderForeground);
|
|
927
|
+
color: var(--vscode-input-placeholderForeground, #989898);
|
|
931
928
|
opacity: 1;
|
|
932
929
|
}
|
|
933
930
|
|
|
@@ -944,15 +941,24 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
944
941
|
}
|
|
945
942
|
|
|
946
943
|
textarea:hover::-webkit-scrollbar-thumb {
|
|
947
|
-
background-color: var(
|
|
944
|
+
background-color: var(
|
|
945
|
+
--vscode-scrollbarSlider-background,
|
|
946
|
+
rgba(121, 121, 121, 0.4)
|
|
947
|
+
);
|
|
948
948
|
}
|
|
949
949
|
|
|
950
950
|
textarea::-webkit-scrollbar-thumb:hover {
|
|
951
|
-
background-color: var(
|
|
951
|
+
background-color: var(
|
|
952
|
+
--vscode-scrollbarSlider-hoverBackground,
|
|
953
|
+
rgba(100, 100, 100, 0.7)
|
|
954
|
+
);
|
|
952
955
|
}
|
|
953
956
|
|
|
954
957
|
textarea::-webkit-scrollbar-thumb:active {
|
|
955
|
-
background-color: var(
|
|
958
|
+
background-color: var(
|
|
959
|
+
--vscode-scrollbarSlider-activeBackground,
|
|
960
|
+
rgba(191, 191, 191, 0.4)
|
|
961
|
+
);
|
|
956
962
|
}
|
|
957
963
|
|
|
958
964
|
textarea::-webkit-scrollbar-corner {
|
|
@@ -964,25 +970,25 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
964
970
|
background-repeat: no-repeat;
|
|
965
971
|
background-position: right bottom;
|
|
966
972
|
}
|
|
967
|
-
`];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,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 ze=class extends
|
|
973
|
+
`];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,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 ze=class extends gt{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`
|
|
968
974
|
<div
|
|
969
975
|
class=${At({shadow:!0,visible:this._shadow})}
|
|
970
976
|
></div>
|
|
971
977
|
<textarea
|
|
972
|
-
autocomplete=${
|
|
978
|
+
autocomplete=${Et(this.autocomplete)}
|
|
973
979
|
?autofocus=${this.autofocus}
|
|
974
980
|
?disabled=${this.disabled}
|
|
975
981
|
aria-label=${this.label}
|
|
976
982
|
id="textarea"
|
|
977
983
|
class=${At({monospace:this.monospace,"cursor-pointer":this._textareaPointerCursor})}
|
|
978
|
-
maxlength=${
|
|
979
|
-
minlength=${
|
|
980
|
-
rows=${
|
|
981
|
-
cols=${
|
|
982
|
-
name=${
|
|
983
|
-
placeholder=${
|
|
984
|
+
maxlength=${Et(this.maxLength)}
|
|
985
|
+
minlength=${Et(this.minLength)}
|
|
986
|
+
rows=${Et(this.rows)}
|
|
987
|
+
cols=${Et(this.cols)}
|
|
988
|
+
name=${Et(this.name)}
|
|
989
|
+
placeholder=${Et(this.placeholder)}
|
|
984
990
|
?readonly=${this.readonly}
|
|
985
|
-
.style=${
|
|
991
|
+
.style=${Ot({resize:this.resize})}
|
|
986
992
|
?required=${this.required}
|
|
987
993
|
spellcheck=${this.spellcheck}
|
|
988
994
|
@change=${this._handleChange}
|
|
@@ -991,7 +997,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
991
997
|
@scroll=${this._handleScroll}
|
|
992
998
|
.value=${this._value}
|
|
993
999
|
></textarea>
|
|
994
|
-
`}};ze.styles=Be,ze.formAssociated=!0,ze.shadowRootOptions={...
|
|
1000
|
+
`}};ze.styles=Be,ze.formAssociated=!0,ze.shadowRootOptions={...rt.shadowRootOptions,delegatesFocus:!0},Se([ct()],ze.prototype,"autocomplete",void 0),Se([ct({type:Boolean,reflect:!0})],ze.prototype,"autofocus",void 0),Se([ct({attribute:"default-value"})],ze.prototype,"defaultValue",void 0),Se([ct({type:Boolean,reflect:!0})],ze.prototype,"disabled",void 0),Se([ct({type:Boolean,reflect:!0})],ze.prototype,"invalid",void 0),Se([ct({attribute:!1})],ze.prototype,"label",void 0),Se([ct({type:Number})],ze.prototype,"maxLength",void 0),Se([ct({type:Number})],ze.prototype,"minLength",void 0),Se([ct({type:Number})],ze.prototype,"rows",void 0),Se([ct({type:Number})],ze.prototype,"cols",void 0),Se([ct()],ze.prototype,"name",void 0),Se([ct()],ze.prototype,"placeholder",void 0),Se([ct({type:Boolean,reflect:!0})],ze.prototype,"readonly",void 0),Se([ct()],ze.prototype,"resize",void 0),Se([ct({type:Boolean,reflect:!0})],ze.prototype,"required",void 0),Se([ct({type:Boolean})],ze.prototype,"spellcheck",void 0),Se([ct({type:Boolean,reflect:!0})],ze.prototype,"monospace",void 0),Se([ct()],ze.prototype,"value",null),Se([ut("#textarea")],ze.prototype,"_textareaEl",void 0),Se([ht()],ze.prototype,"_value",void 0),Se([ht()],ze.prototype,"_textareaPointerCursor",void 0),Se([ht()],ze.prototype,"_shadow",void 0),ze=Se([mt("vscode-textarea")],ze);const Ae=r(yt()),Ee=[xt,n`
|
|
995
1001
|
:host {
|
|
996
1002
|
align-items: center;
|
|
997
1003
|
background-color: var(--vscode-settings-textInputBackground, #313131);
|
|
@@ -1090,26 +1096,26 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1090
1096
|
input[type='file']::file-selector-button:hover {
|
|
1091
1097
|
background-color: var(--vscode-button-hoverBackground, #026ec1);
|
|
1092
1098
|
}
|
|
1093
|
-
`];var
|
|
1099
|
+
`];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,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 je=class extends gt{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`
|
|
1094
1100
|
<slot name="content-before"></slot>
|
|
1095
1101
|
<input
|
|
1096
1102
|
id="input"
|
|
1097
1103
|
type=${this.type}
|
|
1098
1104
|
?autofocus=${this.autofocus}
|
|
1099
|
-
autocomplete=${
|
|
1105
|
+
autocomplete=${Et(this.autocomplete)}
|
|
1100
1106
|
aria-label=${this.label}
|
|
1101
1107
|
?disabled=${this.disabled}
|
|
1102
|
-
max=${
|
|
1103
|
-
maxlength=${
|
|
1104
|
-
min=${
|
|
1105
|
-
minlength=${
|
|
1108
|
+
max=${Et(this.max)}
|
|
1109
|
+
maxlength=${Et(this.maxLength)}
|
|
1110
|
+
min=${Et(this.min)}
|
|
1111
|
+
minlength=${Et(this.minLength)}
|
|
1106
1112
|
?multiple=${this.multiple}
|
|
1107
|
-
name=${
|
|
1108
|
-
pattern=${
|
|
1109
|
-
placeholder=${
|
|
1113
|
+
name=${Et(this.name)}
|
|
1114
|
+
pattern=${Et(this.pattern)}
|
|
1115
|
+
placeholder=${Et(this.placeholder)}
|
|
1110
1116
|
?readonly=${this.readonly}
|
|
1111
1117
|
?required=${this.required}
|
|
1112
|
-
step=${
|
|
1118
|
+
step=${Et(this.step)}
|
|
1113
1119
|
.value=${this._value}
|
|
1114
1120
|
@blur=${this._onBlur}
|
|
1115
1121
|
@change=${this._onChange}
|
|
@@ -1118,11 +1124,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1118
1124
|
@keydown=${this._onKeyDown}
|
|
1119
1125
|
>
|
|
1120
1126
|
<slot name="content-after"></slot>
|
|
1121
|
-
`}};je.styles=
|
|
1127
|
+
`}};je.styles=Ee,je.formAssociated=!0,je.shadowRootOptions={...rt.shadowRootOptions,delegatesFocus:!0},Oe([ct()],je.prototype,"autocomplete",void 0),Oe([ct({type:Boolean,reflect:!0})],je.prototype,"autofocus",void 0),Oe([ct({attribute:"default-value"})],je.prototype,"defaultValue",void 0),Oe([ct({type:Boolean,reflect:!0})],je.prototype,"disabled",void 0),Oe([ct({type:Boolean,reflect:!0})],je.prototype,"focused",void 0),Oe([ct({type:Boolean,reflect:!0})],je.prototype,"invalid",void 0),Oe([ct({attribute:!1})],je.prototype,"label",void 0),Oe([ct({type:Number})],je.prototype,"max",void 0),Oe([ct({type:Number})],je.prototype,"maxLength",void 0),Oe([ct({type:Number})],je.prototype,"min",void 0),Oe([ct({type:Number})],je.prototype,"minLength",void 0),Oe([ct({type:Boolean,reflect:!0})],je.prototype,"multiple",void 0),Oe([ct({reflect:!0})],je.prototype,"name",void 0),Oe([ct()],je.prototype,"pattern",void 0),Oe([ct()],je.prototype,"placeholder",void 0),Oe([ct({type:Boolean,reflect:!0})],je.prototype,"readonly",void 0),Oe([ct({type:Boolean,reflect:!0})],je.prototype,"required",void 0),Oe([ct({type:Number})],je.prototype,"step",void 0),Oe([ct({reflect:!0})],je.prototype,"type",null),Oe([ct()],je.prototype,"value",null),Oe([ut("#input")],je.prototype,"_inputEl",void 0),Oe([ht()],je.prototype,"_value",void 0),Oe([ht()],je.prototype,"_type",void 0),je=Oe([mt("vscode-textfield")],je);const Ie=[xt,n`
|
|
1122
1128
|
:host {
|
|
1123
|
-
color: var(--vscode-foreground);
|
|
1124
|
-
font-family: var(--vscode-font-family);
|
|
1125
|
-
font-size: var(--vscode-font-size);
|
|
1129
|
+
color: var(--vscode-foreground, #cccccc);
|
|
1130
|
+
font-family: var(--vscode-font-family, sans-serif);
|
|
1131
|
+
font-size: var(--vscode-font-size, 13px);
|
|
1126
1132
|
font-weight: 600;
|
|
1127
1133
|
line-height: ${1.2307692307692308};
|
|
1128
1134
|
cursor: default;
|
|
@@ -1143,16 +1149,16 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1143
1149
|
}
|
|
1144
1150
|
|
|
1145
1151
|
::slotted(.lightened) {
|
|
1146
|
-
color: var(--vscode-foreground);
|
|
1152
|
+
color: var(--vscode-foreground, #cccccc);
|
|
1147
1153
|
opacity: 0.9;
|
|
1148
1154
|
}
|
|
1149
|
-
`];var Me=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 Fe=class extends
|
|
1155
|
+
`];var Me=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 Fe=class extends gt{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=ke("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 Ce||t instanceof Jt)&&t.setAttribute("aria-labelledby",this._id);let e="";this.textContent&&(e=this.textContent.trim()),(t instanceof je||t instanceof ze)&&(t.label=e)}_handleClick(){const t=this._getTarget();t&&"focus"in t&&t.focus()}render(){return L`
|
|
1150
1156
|
<label
|
|
1151
1157
|
class=${At({wrapper:!0,required:this.required})}
|
|
1152
1158
|
@click=${this._handleClick}
|
|
1153
1159
|
><slot></slot
|
|
1154
1160
|
></label>
|
|
1155
|
-
`}};Fe.styles=Ie,Me([
|
|
1161
|
+
`}};Fe.styles=Ie,Me([ct({reflect:!0,attribute:"for"})],Fe.prototype,"htmlFor",null),Me([ct()],Fe.prototype,"id",null),Me([ct({type:Boolean,reflect:!0})],Fe.prototype,"required",void 0),Fe=Me([mt("vscode-label")],Fe);const{I:Pe}=it,De=()=>document.createComment(""),Ne=(t,e,s)=>{const i=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=i.insertBefore(De(),o),r=i.insertBefore(De(),o);s=new Pe(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},Ve=(t,e,s=t)=>(t._$AI(e,s),t),Te={},Re=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}},Le=(t,e,s)=>{const i=new Map;for(let o=e;o<=s;o++)i.set(t[o],o);return i},Ue=St(class extends zt{constructor(t){if(super(t),t.type!==Ct)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,v=0,p=r.length-1;for(;d<=u&&v<=p;)if(null===o[d])d++;else if(null===o[u])u--;else if(l[d]===n[v])a[v]=Ve(o[d],r[v]),d++,v++;else if(l[u]===n[p])a[p]=Ve(o[u],r[p]),u--,p--;else if(l[d]===n[p])a[p]=Ve(o[d],r[p]),Ne(t,a[p+1],o[d]),d++,p--;else if(l[u]===n[v])a[v]=Ve(o[u],r[v]),Ne(t,o[d],o[u]),u--,v++;else if(void 0===c&&(c=Le(n,v,p),h=Le(l,d,u)),c.has(l[d]))if(c.has(l[u])){const e=h.get(n[v]),s=void 0!==e?o[e]:null;if(null===s){const e=Ne(t,o[d]);Ve(e,r[v]),a[v]=e}else a[v]=Ve(s,r[v]),Ne(t,o[d],s),o[e]=null;v++}else Re(o[u]),u--;else Re(o[d]),d++;for(;v<=p;){const e=Ne(t,a[p+1]);Ve(e,r[v]),a[v++]=e}for(;d<=u;){const t=o[d++];null!==t&&Re(t)}return this.ut=n,((t,e=Te)=>{t._$AH=e})(t,a),U}}),qe=L`
|
|
1156
1162
|
<span class="icon">
|
|
1157
1163
|
<svg
|
|
1158
1164
|
width="16"
|
|
@@ -1168,17 +1174,17 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1168
1174
|
/>
|
|
1169
1175
|
</svg>
|
|
1170
1176
|
</span>
|
|
1171
|
-
`;var He=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 Ke=class extends
|
|
1177
|
+
`;var He=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 Ke=class extends gt{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>`}};Ke.styles=xt,He([ct({type:String})],Ke.prototype,"value",void 0),He([ct({type:String})],Ke.prototype,"description",void 0),He([ct({type:Boolean,reflect:!0})],Ke.prototype,"selected",void 0),He([ct({type:Boolean,reflect:!0})],Ke.prototype,"disabled",void 0),Ke=He([mt("vscode-option")],Ke);const We=(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},Ge=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)},Je=(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(...Ge(t.substring(0,e[0][0]))),r>0&&r<i&&o[0]-e[r-1][1]!=0&&s.push(...Ge(t.substring(e[r-1][1],o[0]))),s.push(L`<b>${Ge(n)}</b>`),r===i-1&&o[1]<t.length&&s.push(...Ge(t.substring(o[1],t.length)))})),s)};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,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 Xe=22;class Ze extends gt{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.combobox=!1,this.invalid=!1,this.focused=!1,this.open=!1,this.position="below",this.tabIndex=0,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._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.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)}get _filteredOptions(){return this.combobox&&""!==this._filterPattern?We(this._options,this._filterPattern,this._filter):this._options}get _currentOptions(){return this.combobox?this._filteredOptions:this._options}_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.combobox||(this._activeIndex=this._selectedIndex,this._activeIndex>9&&(await this.updateComplete,this._listElement.scrollTop=Math.floor(this._activeIndex*Xe))),t?window.addEventListener("click",this._onClickOutside):window.removeEventListener("click",this._onClickOutside)}_dispatchChangeEvent(){this._multiple?this.dispatchEvent(new CustomEvent("vsc-change",{detail:{selectedIndexes:this._selectedIndexes,value:this._values}})):this.dispatchEvent(new CustomEvent("vsc-change",{detail:{selectedIndex:this._selectedIndex,value:this._value}})),this.dispatchEvent(new Event("change")),this.dispatchEvent(new Event("input"))}_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")&&(this._activeIndex=Number(this.combobox?e.dataset.filteredIndex:e.dataset.index))}_onEnterKeyDown(){const t=this.combobox?this._filteredOptions:this._options,e=!this.open;this._toggleDropdown(e),this._multiple||e||this._selectedIndex===this._activeIndex||(this._selectedIndex=this._activeIndex>-1?t[this._activeIndex].index:-1,this._value=this._selectedIndex>-1?this._options[this._selectedIndex].value:"",this._dispatchChangeEvent()),this.combobox&&(this._multiple||e||(this._selectedIndex=this._activeIndex>-1?this._filteredOptions[this._activeIndex].index:-1),!this._multiple&&e&&this.updateComplete.then((()=>{this._scrollActiveElementToTop()}))),this._multiple&&e&&(this._activeIndex=0)}_onSpaceKeyDown(){if(this.open){if(this.open&&this._multiple&&this._activeIndex>-1){const t=this.combobox?this._filteredOptions:this._options,{selected:e}=t[this._activeIndex];t[this._activeIndex].selected=!e,this._selectedIndexes=[],t.forEach((({index:t,selected:e})=>{e&&this._selectedIndexes.push(t)}))}}else this._toggleDropdown(!0)}_scrollActiveElementToTop(){this._listElement.scrollTop=Math.floor(this._activeIndex*Xe)}async _adjustOptionListScrollPos(t){if((this.combobox?this._filteredOptions.length:this._options.length)<=10)return;this._isHoverForbidden=!0,window.addEventListener("mousemove",this._onMouseMove),this._listElement||await this.updateComplete;const e=this._listElement.scrollTop,s=this._activeIndex*Xe;"down"===t&&s+Xe>=34+e&&(this._listElement.scrollTop=(this._activeIndex-9)*Xe),"up"===t&&s<=e-Xe&&this._scrollActiveElementToTop()}_onArrowUpKeyDown(){if(this.open){if(this._activeIndex<=0)return;this._activeIndex-=1,this._adjustOptionListScrollPos("up")}}_onArrowDownKeyDown(){if(this.open){if(this._activeIndex>=this._currentOptions.length-1)return;this._activeIndex+=1,this._adjustOptionListScrollPos("down")}}_onComponentKeyDown(t){[" ","ArrowUp","ArrowDown","Escape"].includes(t.key)&&(t.stopPropagation(),t.preventDefault()),"Enter"===t.key&&this._onEnterKeyDown()," "===t.key&&this._onSpaceKeyDown(),"Escape"===t.key&&this._toggleDropdown(!1),"ArrowUp"===t.key&&this._onArrowUpKeyDown(),"ArrowDown"===t.key&&this._onArrowDownKeyDown()}_onComponentFocus(){this.focused=!0}_onComponentBlur(){this.focused=!1}_onSlotChange(){this._setStateFromSlottedElements(),this.requestUpdate()}_onComboboxInputFocus(t){t.target.select()}_onComboboxInputInput(t){this._filterPattern=t.target.value,this._activeIndex=-1,this._toggleDropdown(!0)}_onComboboxInputClick(){this._toggleDropdown(!0)}_renderOptions(){return[]}_renderDescription(){if(!this._options[this._activeIndex])return q;const{description:t}=this._options[this._activeIndex];return t?L`<div class="description">${t}</div>`:q}_renderSelectFace(){return L`${q}`}_renderComboboxFace(){return L`${q}`}_renderDropdownControls(){return L`${q}`}_renderDropdown(){const t=At({dropdown:!0,multiple:this._multiple});return L`
|
|
1172
1178
|
<div class=${t}>
|
|
1173
|
-
${"above"===this.position?this._renderDescription():
|
|
1179
|
+
${"above"===this.position?this._renderDescription():q}
|
|
1174
1180
|
${this._renderOptions()} ${this._renderDropdownControls()}
|
|
1175
|
-
${"below"===this.position?this._renderDescription():
|
|
1181
|
+
${"below"===this.position?this._renderDescription():q}
|
|
1176
1182
|
</div>
|
|
1177
|
-
`}render(){return
|
|
1183
|
+
`}render(){return L`
|
|
1178
1184
|
<slot class="main-slot" @slotchange=${this._onSlotChange}></slot>
|
|
1179
1185
|
${this.combobox?this._renderComboboxFace():this._renderSelectFace()}
|
|
1180
|
-
${this.open?this._renderDropdown():
|
|
1181
|
-
`}}Ye([
|
|
1186
|
+
${this.open?this._renderDropdown():q}
|
|
1187
|
+
`}}Ye([ct({type:String,reflect:!0,attribute:"aria-expanded"})],Ze.prototype,"ariaExpanded",void 0),Ye([ct({type:Boolean,reflect:!0})],Ze.prototype,"combobox",void 0),Ye([ct({type:Boolean,reflect:!0})],Ze.prototype,"disabled",null),Ye([ct({type:Boolean,reflect:!0})],Ze.prototype,"invalid",void 0),Ye([ct()],Ze.prototype,"filter",null),Ye([ct({type:Boolean,reflect:!0})],Ze.prototype,"focused",void 0),Ye([ct({type:Boolean,reflect:!0})],Ze.prototype,"open",void 0),Ye([ct({type:Array})],Ze.prototype,"options",null),Ye([ct({reflect:!0})],Ze.prototype,"position",void 0),Ye([ct({type:Number,attribute:!0,reflect:!0})],Ze.prototype,"tabIndex",void 0),Ye([pt({flatten:!0,selector:"vscode-option"})],Ze.prototype,"_assignedOptions",void 0),Ye([ht()],Ze.prototype,"_activeIndex",void 0),Ye([ht()],Ze.prototype,"_currentDescription",void 0),Ye([ht()],Ze.prototype,"_filter",void 0),Ye([ht()],Ze.prototype,"_filteredOptions",null),Ye([ht()],Ze.prototype,"_filterPattern",void 0),Ye([ht()],Ze.prototype,"_selectedIndex",void 0),Ye([ht()],Ze.prototype,"_selectedIndexes",void 0),Ye([ht()],Ze.prototype,"_options",void 0),Ye([ht()],Ze.prototype,"_value",void 0),Ye([ht()],Ze.prototype,"_values",void 0),Ye([ht()],Ze.prototype,"_listScrollTop",void 0),Ye([ut(".options")],Ze.prototype,"_listElement",void 0);var Qe=[xt,n`
|
|
1182
1188
|
:host {
|
|
1183
1189
|
display: inline-block;
|
|
1184
1190
|
max-width: 100%;
|
|
@@ -1516,11 +1522,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1516
1522
|
:host([position='above']) .description {
|
|
1517
1523
|
border-width: 0 0 1px;
|
|
1518
1524
|
}
|
|
1519
|
-
`],ts=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let es=class extends Ze{set selectedIndexes(t){this._selectedIndexes=t}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._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)}_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)))}))}_onOptionClick(t){const e=t.composedPath().find((t=>"matches"in t&&t.matches("li.option")));if(!e)return;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()}_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
|
|
1525
|
+
`],ts=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let es=class extends Ze{set selectedIndexes(t){this._selectedIndexes=t}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._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)}_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)))}))}_onOptionClick(t){const e=t.composedPath().find((t=>"matches"in t&&t.matches("li.option")));if(!e)return;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()}_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"
|
|
1520
1526
|
>No items selected</span
|
|
1521
|
-
>`;case 1:return
|
|
1527
|
+
>`;case 1:return L`<span class="select-face-badge">1 item selected</span>`;default:return L`<span class="select-face-badge"
|
|
1522
1528
|
>${this._selectedIndexes.length} items selected</span
|
|
1523
|
-
>`}}_renderSelectFace(){return
|
|
1529
|
+
>`}}_renderSelectFace(){return L`
|
|
1524
1530
|
<div
|
|
1525
1531
|
class="select-face face multiselect"
|
|
1526
1532
|
@click=${this._onFaceClick}
|
|
@@ -1528,7 +1534,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1528
1534
|
>
|
|
1529
1535
|
${this._renderLabel()} ${qe}
|
|
1530
1536
|
</div>
|
|
1531
|
-
`}_renderComboboxFace(){const t=this._selectedIndex>-1?this._options[this._selectedIndex].label:"";return
|
|
1537
|
+
`}_renderComboboxFace(){const t=this._selectedIndex>-1?this._options[this._selectedIndex].label:"";return L`
|
|
1532
1538
|
<div class="combobox-face face">
|
|
1533
1539
|
${this._renderLabel()}
|
|
1534
1540
|
<input
|
|
@@ -1550,13 +1556,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1550
1556
|
${qe}
|
|
1551
1557
|
</button>
|
|
1552
1558
|
</div>
|
|
1553
|
-
`}_renderOptions(){const t=this.combobox?this._filteredOptions:this._options;return
|
|
1559
|
+
`}_renderOptions(){const t=this.combobox?this._filteredOptions:this._options;return L`
|
|
1554
1560
|
<ul
|
|
1555
1561
|
class="options"
|
|
1556
1562
|
@click=${this._onOptionClick}
|
|
1557
1563
|
@mouseover=${this._onOptionMouseOver}
|
|
1558
1564
|
>
|
|
1559
|
-
${Ue(t,(t=>t.index),((t,e)=>{const s=this._selectedIndexes.includes(t.index),i=At({active:e===this._activeIndex&&!t.disabled,option:!0,selected:s,disabled:t.disabled}),o=At({"checkbox-icon":!0,checked:s});return
|
|
1565
|
+
${Ue(t,(t=>t.index),((t,e)=>{const s=this._selectedIndexes.includes(t.index),i=At({active:e===this._activeIndex&&!t.disabled,option:!0,selected:s,disabled:t.disabled}),o=At({"checkbox-icon":!0,checked:s});return L`
|
|
1560
1566
|
<li
|
|
1561
1567
|
class=${i}
|
|
1562
1568
|
data-index=${t.index}
|
|
@@ -1569,7 +1575,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1569
1575
|
</li>
|
|
1570
1576
|
`}))}
|
|
1571
1577
|
</ul>
|
|
1572
|
-
`}_renderDropdownControls(){return
|
|
1578
|
+
`}_renderDropdownControls(){return L`
|
|
1573
1579
|
<div class="dropdown-controls">
|
|
1574
1580
|
<button
|
|
1575
1581
|
type="button"
|
|
@@ -1593,7 +1599,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1593
1599
|
>OK</vscode-button
|
|
1594
1600
|
>
|
|
1595
1601
|
</div>
|
|
1596
|
-
`}};es.styles=Qe,es.shadowRootOptions={...
|
|
1602
|
+
`}};es.styles=Qe,es.shadowRootOptions={...rt.shadowRootOptions,delegatesFocus:!0},es.formAssociated=!0,ts([ct({type:Array,attribute:"default-value"})],es.prototype,"defaultValue",void 0),ts([ct({type:Boolean,reflect:!0})],es.prototype,"required",void 0),ts([ct({reflect:!0})],es.prototype,"name",void 0),ts([ct({type:Array,attribute:!1})],es.prototype,"selectedIndexes",null),ts([ct({type:Array})],es.prototype,"value",null),ts([ut(".face")],es.prototype,"_faceElement",void 0),es=ts([mt("vscode-multi-select")],es);const ss=[xt,n`
|
|
1597
1603
|
:host {
|
|
1598
1604
|
align-items: center;
|
|
1599
1605
|
display: block;
|
|
@@ -1639,7 +1645,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1639
1645
|
transform: rotate(1080deg);
|
|
1640
1646
|
}
|
|
1641
1647
|
}
|
|
1642
|
-
`];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,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 os=class extends
|
|
1648
|
+
`];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,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 os=class extends gt{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">
|
|
1643
1649
|
<circle
|
|
1644
1650
|
class="background"
|
|
1645
1651
|
part="background"
|
|
@@ -1654,7 +1660,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1654
1660
|
cy="8px"
|
|
1655
1661
|
r="7px"
|
|
1656
1662
|
></circle>
|
|
1657
|
-
</svg>`}};os.styles=ss,is([
|
|
1663
|
+
</svg>`}};os.styles=ss,is([ct({reflect:!0,attribute:"aria-label"})],os.prototype,"ariaLabel",void 0),is([ct({reflect:!0,attribute:"aria-live"})],os.prototype,"ariaLive",void 0),is([ct({reflect:!0})],os.prototype,"role",void 0),os=is([mt("vscode-progress-ring")],os);const rs=[xt,Ut,n`
|
|
1658
1664
|
:host(:invalid) .icon,
|
|
1659
1665
|
:host([invalid]) .icon {
|
|
1660
1666
|
background-color: var(--vscode-inputValidation-errorBackground);
|
|
@@ -1681,7 +1687,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1681
1687
|
outline: 1px solid var(--vscode-focusBorder);
|
|
1682
1688
|
outline-offset: -1px;
|
|
1683
1689
|
}
|
|
1684
|
-
`];var ns=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 ls=class extends(Lt(
|
|
1690
|
+
`];var ns=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 ls=class extends(Lt(Tt)){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=At({icon:!0,checked:this.checked}),e=At({"label-inner":!0,"is-slot-empty":""===this._slottedText});return L`
|
|
1685
1691
|
<div class="wrapper">
|
|
1686
1692
|
<input
|
|
1687
1693
|
?autofocus=${this.autofocus}
|
|
@@ -1700,7 +1706,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1700
1706
|
</span>
|
|
1701
1707
|
</label>
|
|
1702
1708
|
</div>
|
|
1703
|
-
`}};ls.styles=rs,ls.formAssociated=!0,ls.shadowRootOptions={...
|
|
1709
|
+
`}};ls.styles=rs,ls.formAssociated=!0,ls.shadowRootOptions={...rt.shadowRootOptions,delegatesFocus:!0},ns([ct({type:Boolean,reflect:!0})],ls.prototype,"autofocus",void 0),ns([ct({type:Boolean,reflect:!0})],ls.prototype,"checked",void 0),ns([ct({type:Boolean,reflect:!0,attribute:"default-checked"})],ls.prototype,"defaultChecked",void 0),ns([ct({type:Boolean,reflect:!0})],ls.prototype,"invalid",void 0),ns([ct({reflect:!0})],ls.prototype,"name",void 0),ns([ct()],ls.prototype,"value",void 0),ns([ct({type:Boolean,reflect:!0})],ls.prototype,"disabled",void 0),ns([ct({type:Boolean,reflect:!0})],ls.prototype,"required",void 0),ns([ct({reflect:!0})],ls.prototype,"role",void 0),ns([ct({type:Number,reflect:!0})],ls.prototype,"tabIndex",void 0),ns([ht()],ls.prototype,"_slottedText",void 0),ns([ut("#input")],ls.prototype,"_inputEl",void 0),ns([ct()],ls.prototype,"type",void 0),ls=ns([mt("vscode-radio")],ls);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,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 cs=class extends Ze{set selectedIndex(t){this._selectedIndex=t,this._value=this._options[this._selectedIndex]?this._options[this._selectedIndex].value:""}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)}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}_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._internals.setFormValue(null)}_onArrowUpKeyDown(){super._onArrowUpKeyDown(),this.open||this._selectedIndex<=0||(this._filterPattern="",this._selectedIndex-=1,this._activeIndex=this._selectedIndex,this._value=this._options[this._selectedIndex].value,this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_onArrowDownKeyDown(){super._onArrowDownKeyDown(),this.open||this._selectedIndex>=this._options.length-1||(this._filterPattern="",this._selectedIndex+=1,this._activeIndex=this._selectedIndex,this._value=this._options[this._selectedIndex].value,this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_onEnterKeyDown(){super._onEnterKeyDown(),this.updateInputValue(),this._internals.setFormValue(this._value),this._manageRequired()}_onOptionClick(t){const e=t.composedPath().find((t=>t?.matches("li.option")));e&&!e.matches(".disabled")&&(this._selectedIndex=Number(e.dataset.index),this._value=this._options[this._selectedIndex].value,this._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`
|
|
1704
1710
|
<div
|
|
1705
1711
|
class="select-face face"
|
|
1706
1712
|
@click=${this._onFaceClick}
|
|
@@ -1708,7 +1714,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1708
1714
|
>
|
|
1709
1715
|
<span class="text">${t}</span> ${qe}
|
|
1710
1716
|
</div>
|
|
1711
|
-
`}_renderComboboxFace(){const t=this._selectedIndex>-1?this._options[this._selectedIndex].label:"";return
|
|
1717
|
+
`}_renderComboboxFace(){const t=this._selectedIndex>-1?this._options[this._selectedIndex].label:"";return L`
|
|
1712
1718
|
<div class="combobox-face face">
|
|
1713
1719
|
<input
|
|
1714
1720
|
class="combobox-input"
|
|
@@ -1729,7 +1735,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1729
1735
|
${qe}
|
|
1730
1736
|
</button>
|
|
1731
1737
|
</div>
|
|
1732
|
-
`}_renderOptions(){const t=(this.combobox?this._filteredOptions:this._options).map(((t,e)=>{const s=At({option:!0,disabled:t.disabled,selected:t.selected,active:e===this._activeIndex&&!t.disabled});return
|
|
1738
|
+
`}_renderOptions(){const t=(this.combobox?this._filteredOptions:this._options).map(((t,e)=>{const s=At({option:!0,disabled:t.disabled,selected:t.selected,active:e===this._activeIndex&&!t.disabled});return L`
|
|
1733
1739
|
<li
|
|
1734
1740
|
class=${s}
|
|
1735
1741
|
data-index=${t.index}
|
|
@@ -1737,7 +1743,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1737
1743
|
>
|
|
1738
1744
|
${t.ranges?.length?Je(t.label,t.ranges??[]):t.label}
|
|
1739
1745
|
</li>
|
|
1740
|
-
`}));return
|
|
1746
|
+
`}));return L`
|
|
1741
1747
|
<ul
|
|
1742
1748
|
class="options"
|
|
1743
1749
|
@mouseover=${this._onOptionMouseOver}
|
|
@@ -1745,7 +1751,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1745
1751
|
>
|
|
1746
1752
|
${t}
|
|
1747
1753
|
</ul>
|
|
1748
|
-
`}};cs.styles=Qe,cs.shadowRootOptions={...
|
|
1754
|
+
`}};cs.styles=Qe,cs.shadowRootOptions={...rt.shadowRootOptions,delegatesFocus:!0},cs.formAssociated=!0,as([ct({attribute:"default-value"})],cs.prototype,"defaultValue",void 0),as([ct({type:String,attribute:!0,reflect:!0})],cs.prototype,"role",void 0),as([ct({reflect:!0})],cs.prototype,"name",void 0),as([ct({type:Number,attribute:"selected-index"})],cs.prototype,"selectedIndex",null),as([ct({type:String})],cs.prototype,"value",null),as([ct({type:Boolean,reflect:!0})],cs.prototype,"required",void 0),as([ut(".face")],cs.prototype,"_face",void 0),cs=as([mt("vscode-single-select")],cs);const hs=[xt,n`
|
|
1749
1755
|
:host {
|
|
1750
1756
|
display: block;
|
|
1751
1757
|
position: relative;
|
|
@@ -1836,22 +1842,22 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1836
1842
|
.content {
|
|
1837
1843
|
overflow: hidden;
|
|
1838
1844
|
}
|
|
1839
|
-
`];var ds=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 us=class extends
|
|
1845
|
+
`];var ds=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 us=class extends gt{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:l}=t;(n>s+o||n<s||l>i+r||l<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`
|
|
1840
1846
|
<div
|
|
1841
1847
|
class="scrollable-container"
|
|
1842
|
-
.style=${
|
|
1848
|
+
.style=${Ot({userSelect:this._isDragging?"none":"auto"})}
|
|
1843
1849
|
>
|
|
1844
1850
|
<div
|
|
1845
1851
|
class=${At({shadow:!0,visible:this.scrolled})}
|
|
1846
|
-
.style=${
|
|
1852
|
+
.style=${Ot({zIndex:String(this._scrollbarTrackZ)})}
|
|
1847
1853
|
></div>
|
|
1848
|
-
${this._isDragging?
|
|
1854
|
+
${this._isDragging?L`<div class="prevent-interaction"></div>`:q}
|
|
1849
1855
|
<div
|
|
1850
1856
|
class=${At({"scrollbar-track":!0,hidden:!this._scrollbarVisible})}
|
|
1851
1857
|
>
|
|
1852
1858
|
<div
|
|
1853
1859
|
class=${At({"scrollbar-thumb":!0,visible:this._thumbVisible,fade:this._thumbFade,active:this._thumbActive})}
|
|
1854
|
-
.style=${
|
|
1860
|
+
.style=${Ot({height:`${this._thumbHeight}px`,top:`${this._thumbY}px`})}
|
|
1855
1861
|
@mousedown=${this._onScrollThumbMouseDown}
|
|
1856
1862
|
></div>
|
|
1857
1863
|
</div>
|
|
@@ -1859,7 +1865,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1859
1865
|
<slot @slotchange=${this._onSlotChange}></slot>
|
|
1860
1866
|
</div>
|
|
1861
1867
|
</div>
|
|
1862
|
-
`}};us.styles=hs,ds([
|
|
1868
|
+
`}};us.styles=hs,ds([ct({type:Boolean,reflect:!0})],us.prototype,"shadow",void 0),ds([ct({type:Boolean,reflect:!0})],us.prototype,"scrolled",void 0),ds([ct({type:Number,attribute:"scroll-pos"})],us.prototype,"scrollPos",null),ds([ct({type:Number,attribute:"scroll-max"})],us.prototype,"scrollMax",null),ds([ht()],us.prototype,"_isDragging",void 0),ds([ht()],us.prototype,"_thumbHeight",void 0),ds([ht()],us.prototype,"_thumbY",void 0),ds([ht()],us.prototype,"_thumbVisible",void 0),ds([ht()],us.prototype,"_thumbFade",void 0),ds([ht()],us.prototype,"_thumbActive",void 0),ds([ut(".content")],us.prototype,"_contentElement",void 0),ds([ut(".scrollbar-thumb",!0)],us.prototype,"_scrollThumbElement",void 0),ds([ut(".scrollable-container")],us.prototype,"_scrollableContainer",void 0),ds([pt()],us.prototype,"_assignedElements",void 0),us=ds([mt("vscode-scrollable")],us);const vs=[xt,n`
|
|
1863
1869
|
:host {
|
|
1864
1870
|
--separator-border: var(--vscode-editorWidget-border, transparent);
|
|
1865
1871
|
|
|
@@ -1966,25 +1972,25 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1966
1972
|
cursor: ns-resize;
|
|
1967
1973
|
width: 100%;
|
|
1968
1974
|
}
|
|
1969
|
-
`];var ps,bs=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 fs=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}},gs=(t,e)=>0===e?0:Math.min(100,t/e*100),ms=(t,e)=>e*(t/100);let xs=ps=class extends
|
|
1975
|
+
`];var ps,bs=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 fs=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}},gs=(t,e)=>0===e?0:Math.min(100,t/e*100),ms=(t,e)=>e*(t/100);let xs=ps=class extends gt{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=gs(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,l="vertical"===this.split,a=l?n:r,c=l?e-i:s-o;this._handlePosition=Math.max(0,Math.min(c-this._handleOffset+this.handleSize/2,a)),"start"===this.fixedPane&&(this._fixedPaneSize=this._handlePosition),"end"===this.fixedPane&&(this._fixedPaneSize=a-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}=fs(this.initialHandlePosition??"50%");this._handlePosition="percent"===o?ms(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?fs(this.handlePosition):fs(this.initialHandlePosition);this._setPosition(e,s),this._initFixedPane()}_handlePositionPropChanged(){if(this.handlePosition&&this._wrapperEl){this._boundRect=this._wrapperEl.getBoundingClientRect();const{value:t,unit:e}=fs(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?ms(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 ps&&t.resetHandlePosition()}))}render(){const{width:t,height:e}=this._boundRect,s="vertical"===this.split?t:e,i="none"!==this.fixedPane?`${this._handlePosition}px`:`${gs(this._handlePosition,s)}%`;let o="";o="start"===this.fixedPane?`0 0 ${this._fixedPaneSize}px`:`1 1 ${gs(this._handlePosition,s)}%`;let r="";r="end"===this.fixedPane?`0 0 ${this._fixedPaneSize}px`:`1 1 ${gs(s-this._handlePosition,s)}%`;const n={left:"vertical"===this.split?i:"0",top:"vertical"===this.split?"0":i},l=this.handleSize??4;"vertical"===this.split&&(n.marginLeft=0-l/2+"px",n.width=`${l}px`),"horizontal"===this.split&&(n.height=`${l}px`,n.marginTop=0-l/2+"px");const a=At({"handle-overlay":!0,active:this._isDragActive,"split-vertical":"vertical"===this.split,"split-horizontal":"horizontal"===this.split}),c=At({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`
|
|
1970
1976
|
<div class=${At(h)}>
|
|
1971
|
-
<div class="start" .style=${
|
|
1977
|
+
<div class="start" .style=${Ot({flex:o})}>
|
|
1972
1978
|
<slot name="start" @slotchange=${this._handleSlotChange}></slot>
|
|
1973
1979
|
</div>
|
|
1974
|
-
<div class="end" .style=${
|
|
1980
|
+
<div class="end" .style=${Ot({flex:r})}>
|
|
1975
1981
|
<slot name="end" @slotchange=${this._handleSlotChange}></slot>
|
|
1976
1982
|
</div>
|
|
1977
1983
|
<div class=${a}></div>
|
|
1978
1984
|
<div
|
|
1979
1985
|
class=${c}
|
|
1980
|
-
.style=${
|
|
1986
|
+
.style=${Ot(n)}
|
|
1981
1987
|
@mouseover=${this._handleMouseOver}
|
|
1982
1988
|
@mouseout=${this._handleMouseOut}
|
|
1983
1989
|
@mousedown=${this._handleMouseDown}
|
|
1984
1990
|
@dblclick=${this._handleDblClick}
|
|
1985
1991
|
></div>
|
|
1986
1992
|
</div>
|
|
1987
|
-
`}};xs.styles=vs,bs([
|
|
1993
|
+
`}};xs.styles=vs,bs([ct({reflect:!0})],xs.prototype,"split",null),bs([ct({type:Boolean,reflect:!0,attribute:"reset-on-dbl-click"})],xs.prototype,"resetOnDblClick",void 0),bs([ct({type:Number,reflect:!0,attribute:"handle-size"})],xs.prototype,"handleSize",void 0),bs([ct({reflect:!0,attribute:"initial-handle-position"})],xs.prototype,"initialHandlePosition",void 0),bs([ct({attribute:"handle-position"})],xs.prototype,"handlePosition",null),bs([ct({attribute:"fixed-pane"})],xs.prototype,"fixedPane",null),bs([ht()],xs.prototype,"_handlePosition",void 0),bs([ht()],xs.prototype,"_isDragActive",void 0),bs([ht()],xs.prototype,"_hover",void 0),bs([ht()],xs.prototype,"_hide",void 0),bs([ut(".wrapper")],xs.prototype,"_wrapperEl",void 0),bs([ut(".handle")],xs.prototype,"_handleEl",void 0),bs([pt({slot:"start",selector:"vscode-split-layout"})],xs.prototype,"_nestedLayoutsAtStart",void 0),bs([pt({slot:"end",selector:"vscode-split-layout"})],xs.prototype,"_nestedLayoutsAtEnd",void 0),xs=ps=bs([mt("vscode-split-layout")],xs);const ys=[xt,n`
|
|
1988
1994
|
:host {
|
|
1989
1995
|
border-bottom: 1px solid transparent;
|
|
1990
1996
|
cursor: pointer;
|
|
@@ -2076,7 +2082,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2076
2082
|
slot[name='content-after']::slotted(vscode-badge) {
|
|
2077
2083
|
margin-left: 8px;
|
|
2078
2084
|
}
|
|
2079
|
-
`];var ws=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 ks=class extends
|
|
2085
|
+
`];var ws=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 ks=class extends gt{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`
|
|
2080
2086
|
<div
|
|
2081
2087
|
class=${At({wrapper:!0,active:this.active,panel:this.panel})}
|
|
2082
2088
|
>
|
|
@@ -2087,7 +2093,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2087
2093
|
class=${At({"active-indicator":!0,active:this.active,panel:this.panel})}
|
|
2088
2094
|
></span>
|
|
2089
2095
|
</div>
|
|
2090
|
-
`}};ks.styles=ys,ws([
|
|
2096
|
+
`}};ks.styles=ys,ws([ct({type:Boolean,reflect:!0})],ks.prototype,"active",void 0),ws([ct({reflect:!0,attribute:"aria-controls"})],ks.prototype,"ariaControls",void 0),ws([ct({type:Boolean,reflect:!0})],ks.prototype,"panel",void 0),ws([ct({reflect:!0})],ks.prototype,"role",void 0),ws([ct({type:Number,reflect:!0,attribute:"tab-id"})],ks.prototype,"tabId",void 0),ks=ws([mt("vscode-tab-header")],ks);const $s=[xt,n`
|
|
2091
2097
|
:host {
|
|
2092
2098
|
display: block;
|
|
2093
2099
|
overflow: hidden;
|
|
@@ -2103,7 +2109,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2103
2109
|
:host([panel]) {
|
|
2104
2110
|
background-color: var(--vscode-panel-background);
|
|
2105
2111
|
}
|
|
2106
|
-
`];var _s=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 Cs=class extends
|
|
2112
|
+
`];var _s=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 Cs=class extends gt{constructor(){super(...arguments),this.hidden=!1,this.ariaLabelledby="",this.panel=!1,this.role="tabpanel",this.tabIndex=0}render(){return L` <slot></slot> `}};Cs.styles=$s,_s([ct({type:Boolean,reflect:!0})],Cs.prototype,"hidden",void 0),_s([ct({reflect:!0,attribute:"aria-labelledby"})],Cs.prototype,"ariaLabelledby",void 0),_s([ct({type:Boolean,reflect:!0})],Cs.prototype,"panel",void 0),_s([ct({reflect:!0})],Cs.prototype,"role",void 0),_s([ct({type:Number,reflect:!0})],Cs.prototype,"tabIndex",void 0),Cs=_s([mt("vscode-tab-panel")],Cs);const Bs=[xt,n`
|
|
2107
2113
|
:host {
|
|
2108
2114
|
display: table;
|
|
2109
2115
|
table-layout: fixed;
|
|
@@ -2117,7 +2123,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2117
2123
|
::slotted(vscode-table-row:nth-child(odd)) {
|
|
2118
2124
|
background-color: var(--vsc-row-odd-background);
|
|
2119
2125
|
}
|
|
2120
|
-
`];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,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 zs=class extends
|
|
2126
|
+
`];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,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 zs=class extends gt{constructor(){super(...arguments),this.role="rowgroup"}render(){return L` <slot></slot> `}};zs.styles=Bs,Ss([ct({reflect:!0})],zs.prototype,"role",void 0),zs=Ss([mt("vscode-table-body")],zs);const As=[xt,n`
|
|
2121
2127
|
:host {
|
|
2122
2128
|
border-bottom-color: var(--vscode-editorGroup-border);
|
|
2123
2129
|
border-bottom-style: solid;
|
|
@@ -2160,21 +2166,21 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2160
2166
|
.column-label {
|
|
2161
2167
|
font-weight: bold;
|
|
2162
2168
|
}
|
|
2163
|
-
`];var
|
|
2169
|
+
`];var Es=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 Os=class extends gt{constructor(){super(...arguments),this.role="cell",this.columnLabel="",this.compact=!1}render(){const t=this.columnLabel?L`<div class="column-label" role="presentation">
|
|
2164
2170
|
${this.columnLabel}
|
|
2165
|
-
</div>`:
|
|
2171
|
+
</div>`:q;return L`
|
|
2166
2172
|
<div class="wrapper">
|
|
2167
2173
|
${t}
|
|
2168
2174
|
<slot></slot>
|
|
2169
2175
|
</div>
|
|
2170
|
-
`}};
|
|
2176
|
+
`}};Os.styles=As,Es([ct({reflect:!0})],Os.prototype,"role",void 0),Es([ct({attribute:"column-label"})],Os.prototype,"columnLabel",void 0),Es([ct({type:Boolean,reflect:!0})],Os.prototype,"compact",void 0),Os=Es([mt("vscode-table-cell")],Os);const js=[xt,n`
|
|
2171
2177
|
:host {
|
|
2172
2178
|
background-color: var(--vscode-keybindingTable-headerBackground);
|
|
2173
2179
|
display: table;
|
|
2174
2180
|
table-layout: fixed;
|
|
2175
2181
|
width: 100%;
|
|
2176
2182
|
}
|
|
2177
|
-
`];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,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 Ms=class extends
|
|
2183
|
+
`];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,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 Ms=class extends gt{constructor(){super(...arguments),this.role="rowgroup"}render(){return L` <slot></slot> `}};Ms.styles=js,Is([ct({reflect:!0})],Ms.prototype,"role",void 0),Ms=Is([mt("vscode-table-header")],Ms);const Fs=[xt,n`
|
|
2178
2184
|
:host {
|
|
2179
2185
|
box-sizing: border-box;
|
|
2180
2186
|
color: var(--vscode-foreground);
|
|
@@ -2199,11 +2205,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2199
2205
|
white-space: inherit;
|
|
2200
2206
|
width: 100%;
|
|
2201
2207
|
}
|
|
2202
|
-
`];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,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 Ds=class extends
|
|
2208
|
+
`];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,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 Ds=class extends gt{constructor(){super(...arguments),this.role="columnheader"}render(){return L`
|
|
2203
2209
|
<div class="wrapper">
|
|
2204
2210
|
<slot></slot>
|
|
2205
2211
|
</div>
|
|
2206
|
-
`}};Ds.styles=Fs,Ps([
|
|
2212
|
+
`}};Ds.styles=Fs,Ps([ct({reflect:!0})],Ds.prototype,"role",void 0),Ds=Ps([mt("vscode-table-header-cell")],Ds);const Ns=[xt,n`
|
|
2207
2213
|
:host {
|
|
2208
2214
|
border-top-color: var(--vscode-editorGroup-border);
|
|
2209
2215
|
border-top-style: solid;
|
|
@@ -2211,7 +2217,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2211
2217
|
display: var(--vsc-row-display);
|
|
2212
2218
|
width: 100%;
|
|
2213
2219
|
}
|
|
2214
|
-
`];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,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
|
|
2220
|
+
`];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,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 Ts=class extends gt{constructor(){super(...arguments),this.role="row"}render(){return L` <slot></slot> `}};Ts.styles=Ns,Vs([ct({reflect:!0})],Ts.prototype,"role",void 0),Ts=Vs([mt("vscode-table-row")],Ts);const Rs=(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},Ls=[xt,n`
|
|
2215
2221
|
:host {
|
|
2216
2222
|
display: block;
|
|
2217
2223
|
--vsc-row-even-background: transparent;
|
|
@@ -2334,11 +2340,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2334
2340
|
position: absolute;
|
|
2335
2341
|
width: 5px;
|
|
2336
2342
|
}
|
|
2337
|
-
`];var Us=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let qs=class extends
|
|
2343
|
+
`];var Us=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let qs=class extends gt{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._headerResizeObserverCallback=()=>{this._updateResizeHandlersSize()},this._bodyResizeObserverCallback=()=>{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"},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}_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=Rs(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 l=this._bodySlot.assignedElements()[0].querySelectorAll("vscode-table-row:first-child > vscode-table-cell");this._cellsToResize=[],this._cellsToResize.push(l[o]),l[o+1]&&this._cellsToResize.push(l[o+1]),document.addEventListener("mousemove",this._onResizingMouseMove),document.addEventListener("mouseup",this._onResizingMouseUp)}_updateActiveSashPosition(t){const{prevSashPos:e,nextSashPos:s}=this._getSashPositions();let i=Rs(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=At({sash:!0,hover:this._sashHovers[e],resizable:this.resizable}),i=`${t}%`;return this.resizable?L`
|
|
2338
2344
|
<div
|
|
2339
2345
|
class=${s}
|
|
2340
2346
|
data-index=${e}
|
|
2341
|
-
.style=${
|
|
2347
|
+
.style=${Ot({left:i})}
|
|
2342
2348
|
@mousedown=${this._onSashMouseDown}
|
|
2343
2349
|
@mouseover=${this._onSashMouseOver}
|
|
2344
2350
|
@mouseout=${this._onSashMouseOut}
|
|
@@ -2346,13 +2352,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2346
2352
|
<div class="sash-visible"></div>
|
|
2347
2353
|
<div class="sash-clickable"></div>
|
|
2348
2354
|
</div>
|
|
2349
|
-
`:
|
|
2355
|
+
`:L`<div
|
|
2350
2356
|
class=${s}
|
|
2351
2357
|
data-index=${e}
|
|
2352
|
-
.style=${
|
|
2358
|
+
.style=${Ot({left:i})}
|
|
2353
2359
|
>
|
|
2354
2360
|
<div class="sash-visible"></div>
|
|
2355
|
-
</div>`})),e=At({wrapper:!0,"select-disabled":this._isDragging,"resize-cursor":this._isDragging,"compact-view":this.compact});return
|
|
2361
|
+
</div>`})),e=At({wrapper:!0,"select-disabled":this._isDragging,"resize-cursor":this._isDragging,"compact-view":this.compact});return L`
|
|
2356
2362
|
<div class=${e}>
|
|
2357
2363
|
<div class="header">
|
|
2358
2364
|
<slot name="caption"></slot>
|
|
@@ -2368,7 +2374,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2368
2374
|
${t}
|
|
2369
2375
|
<slot @slotchange=${this._onDefaultSlotChange}></slot>
|
|
2370
2376
|
</div>
|
|
2371
|
-
`}};qs.styles=Ls,Us([
|
|
2377
|
+
`}};qs.styles=Ls,Us([ct({reflect:!0})],qs.prototype,"role",void 0),Us([ct({type:Boolean,reflect:!0})],qs.prototype,"resizable",void 0),Us([ct({type:Boolean,reflect:!0})],qs.prototype,"responsive",void 0),Us([ct({type:Boolean,reflect:!0})],qs.prototype,"bordered",void 0),Us([ct({type:Boolean,reflect:!0,attribute:"bordered-columns"})],qs.prototype,"borderedColumns",void 0),Us([ct({type:Boolean,reflect:!0,attribute:"bordered-rows"})],qs.prototype,"borderedRows",void 0),Us([ct({type:Number})],qs.prototype,"breakpoint",void 0),Us([ct({type:Array})],qs.prototype,"columns",null),Us([ct({attribute:"min-column-width"})],qs.prototype,"minColumnWidth",void 0),Us([ct({type:Boolean,reflect:!0,attribute:"delayed-resizing"})],qs.prototype,"delayedResizing",void 0),Us([ct({type:Boolean,reflect:!0})],qs.prototype,"compact",void 0),Us([ct({type:Boolean,reflect:!0})],qs.prototype,"zebra",void 0),Us([ct({type:Boolean,reflect:!0,attribute:"zebra-odd"})],qs.prototype,"zebraOdd",void 0),Us([ut('slot[name="body"]')],qs.prototype,"_bodySlot",void 0),Us([ut(".header")],qs.prototype,"_headerElement",void 0),Us([ut(".scrollable")],qs.prototype,"_scrollableElement",void 0),Us([function(t){return(e,s)=>dt(0,0,{get(){return(this.renderRoot??(vt??=document.createDocumentFragment())).querySelectorAll(t)}})}(".sash-visible")],qs.prototype,"_sashVisibleElements",void 0),Us([pt({flatten:!0,selector:"vscode-table-header, vscode-table-body"})],qs.prototype,"_assignedElements",void 0),Us([pt({slot:"header",flatten:!0,selector:"vscode-table-header"})],qs.prototype,"_assignedHeaderElements",void 0),Us([pt({slot:"body",flatten:!0,selector:"vscode-table-body"})],qs.prototype,"_assignedBodyElements",void 0),Us([ht()],qs.prototype,"_sashPositions",void 0),Us([ht()],qs.prototype,"_isDragging",void 0),qs=Us([mt("vscode-table")],qs);const Hs=[xt,n`
|
|
2372
2378
|
:host {
|
|
2373
2379
|
display: block;
|
|
2374
2380
|
}
|
|
@@ -2400,7 +2406,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2400
2406
|
display: block;
|
|
2401
2407
|
margin-left: auto;
|
|
2402
2408
|
}
|
|
2403
|
-
`];var Ks=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 Ws=class extends
|
|
2409
|
+
`];var Ks=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 Ws=class extends gt{constructor(){super(),this.panel=!1,this.role="tablist",this.selectedIndex=0,this._tabHeaders=[],this._tabPanels=[],this._componentId="",this._tabFocus=0,this._componentId=ke()}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 ks));t.length>0&&t.forEach((t=>t.setAttribute("slot","header")))}_onMainSlotChange(){this._moveHeadersToHeaderSlot(),this._tabPanels=this._mainSlotElements.filter((t=>t instanceof Cs)),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 ks)),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 ks));e&&(this.selectedIndex=e.tabId,this._setActiveTab(),this._dispatchSelectEvent())}render(){return L`
|
|
2404
2410
|
<div
|
|
2405
2411
|
class=${At({header:!0,panel:this.panel})}
|
|
2406
2412
|
@click=${this._onHeaderClick}
|
|
@@ -2410,7 +2416,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2410
2416
|
<slot name="addons"></slot>
|
|
2411
2417
|
</div>
|
|
2412
2418
|
<slot @slotchange=${this._onMainSlotChange}></slot>
|
|
2413
|
-
`}};Ws.styles=Hs,Ks([
|
|
2419
|
+
`}};Ws.styles=Hs,Ks([ct({type:Boolean,reflect:!0})],Ws.prototype,"panel",void 0),Ks([ct({reflect:!0})],Ws.prototype,"role",void 0),Ks([ct({type:Number,reflect:!0,attribute:"selected-index"})],Ws.prototype,"selectedIndex",void 0),Ks([pt({slot:"header"})],Ws.prototype,"_headerSlotElements",void 0),Ks([pt()],Ws.prototype,"_mainSlotElements",void 0),Ws=Ks([mt("vscode-tabs")],Ws);const Gs=[xt,n`
|
|
2414
2420
|
:host {
|
|
2415
2421
|
--hover-outline-color: transparent;
|
|
2416
2422
|
--hover-outline-style: solid;
|
|
@@ -2656,65 +2662,65 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2656
2662
|
:host([indent-guides]) ul ul.has-active-item:before {
|
|
2657
2663
|
background-color: var(--vscode-tree-indentGuidesStroke);
|
|
2658
2664
|
}
|
|
2659
|
-
`];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,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 Ys=(t,e=[])=>{const s=[];return t.forEach(((t,i)=>{const o=[...e,i],r={...t,path:o};t.subItems&&(r.subItems=Ys(t.subItems,o)),s.push(r)})),s},Xs=t=>!!(t.subItems&&Array.isArray(t.subItems)&&t?.subItems?.length>0);let Zs=class extends
|
|
2665
|
+
`];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,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 Ys=(t,e=[])=>{const s=[];return t.forEach(((t,i)=>{const o=[...e,i],r={...t,path:o};t.subItems&&(r.subItems=Ys(t.subItems,o)),s.push(r)})),s},Xs=t=>!!(t.subItems&&Array.isArray(t.subItems)&&t?.subItems?.length>0);let Zs=class extends gt{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=Ys(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
|
|
2660
2666
|
class="image-icon"
|
|
2661
|
-
.style=${
|
|
2662
|
-
></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
|
|
2667
|
+
.style=${Ot({backgroundImage:`url(${s})`})}
|
|
2668
|
+
></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 Xs(t)?t.open?this._renderIconVariant(e.open):this._renderIconVariant(e.branch):this._renderIconVariant(e.leaf)}_renderArrow(t){if(!this.arrows||!Xs(t))return L`${q}`;const{open:e=!1}=t;return L`
|
|
2663
2669
|
<div class="arrow-container">
|
|
2664
2670
|
<vscode-icon name=${e?"chevron-down":"chevron-right"} class="icon-arrow"></vscode-icon>
|
|
2665
2671
|
</div>
|
|
2666
|
-
`}_renderActions(t){const e=[];return t.actions&&Array.isArray(t.actions)&&t.actions.forEach(((s,i)=>{if(s.icon){const o=
|
|
2672
|
+
`}_renderActions(t){const e=[];return t.actions&&Array.isArray(t.actions)&&t.actions.forEach(((s,i)=>{if(s.icon){const o=L`<vscode-icon
|
|
2667
2673
|
name=${s.icon}
|
|
2668
2674
|
action-icon
|
|
2669
|
-
title=${
|
|
2670
|
-
data-item-path=${
|
|
2675
|
+
title=${Et(s.tooltip)}
|
|
2676
|
+
data-item-path=${Et(t.path?.join("/"))}
|
|
2671
2677
|
data-index=${i}
|
|
2672
2678
|
class="action-icon"
|
|
2673
2679
|
@click=${this._handleActionClick}
|
|
2674
|
-
></vscode-icon>`;e.push(o)}})),e.length>0?
|
|
2680
|
+
></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:l="",selectedColor:a=""}=t,c=`visible-when-${i}`,h={};switch(r&&(h["--color"]=r),n&&(h["--focused-color"]=n),l&&(h["--hover-color"]=l),a&&(h["--selected-color"]=a),s){case"counter-badge":e.push(L`<vscode-badge
|
|
2675
2681
|
variant="counter"
|
|
2676
2682
|
class=${["counter-badge",c].join(" ")}
|
|
2677
2683
|
part="counter-badge-decoration"
|
|
2678
2684
|
>${o}</vscode-badge
|
|
2679
|
-
>`);break;case"filled-circle":e.push(
|
|
2685
|
+
>`);break;case"filled-circle":e.push(L`<vscode-icon
|
|
2680
2686
|
name="circle-filled"
|
|
2681
2687
|
size="14"
|
|
2682
2688
|
class=${["filled-circle",c].join(" ")}
|
|
2683
2689
|
part="filled-circle-decoration"
|
|
2684
|
-
.style=${
|
|
2685
|
-
></vscode-icon>`);break;case"text":e.push(
|
|
2690
|
+
.style=${Ot(h)}
|
|
2691
|
+
></vscode-icon>`);break;case"text":e.push(L`<div
|
|
2686
2692
|
class=${["decoration-text",c].join(" ")}
|
|
2687
2693
|
part="caption-decoration"
|
|
2688
|
-
.style=${
|
|
2694
|
+
.style=${Ot(h)}
|
|
2689
2695
|
>
|
|
2690
2696
|
${o}
|
|
2691
|
-
</div>`)}})),e.length>0?
|
|
2697
|
+
</div>`)}})),e.length>0?L`<div class="decorations" part="decorations">
|
|
2692
2698
|
${e}
|
|
2693
|
-
</div>`:
|
|
2694
|
-
.style=${
|
|
2699
|
+
</div>`:L`${q}`}_renderTreeItem(t,e){const{open:s=!1,label:i,description:o="",tooltip:r,selected:n=!1,focused:l=!1,subItems:a=[]}=t,{path:c,itemType:h,hasFocusedItem:d=!1,hasSelectedItem:u=!1}=e,v=["contents"],p=s?["open"]:[],b=(c.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
|
|
2700
|
+
.style=${Ot({"--indent-guide-pos":`${x}px`})}
|
|
2695
2701
|
class=${At({"has-active-item":d||u})}
|
|
2696
2702
|
>
|
|
2697
2703
|
${this._renderTree(a,c)}
|
|
2698
|
-
</ul>`:
|
|
2704
|
+
</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"),l&&v.push("focused"),L`
|
|
2699
2705
|
<li data-path=${c.join("/")} class=${p.join(" ")}>
|
|
2700
2706
|
<div
|
|
2701
2707
|
class=${v.join(" ")}
|
|
2702
|
-
.style=${
|
|
2708
|
+
.style=${Ot({paddingLeft:`${f+3}px`})}
|
|
2703
2709
|
>
|
|
2704
2710
|
${g}${m}<span
|
|
2705
2711
|
class="text-content"
|
|
2706
2712
|
part="text-content"
|
|
2707
|
-
title=${
|
|
2713
|
+
title=${Et(r)}
|
|
2708
2714
|
>${i}${w}</span
|
|
2709
2715
|
>
|
|
2710
2716
|
${k} ${$}
|
|
2711
2717
|
</div>
|
|
2712
2718
|
${y}
|
|
2713
2719
|
</li>
|
|
2714
|
-
`}_renderTree(t,e=[]){const s=[];return t?(t.forEach(((t,i)=>{const o=[...e,i],r=Xs(t)?"branch":"leaf",{selected:n=!1,focused:l=!1,hasFocusedItem:a=!1,hasSelectedItem:c=!1}=t;n&&(this._selectedItem=t),l&&(this._focusedItem=t),s.push(this._renderTreeItem(t,{path:o,itemType:r,hasFocusedItem:a,hasSelectedItem:c}))})),s):
|
|
2720
|
+
`}_renderTree(t,e=[]){const s=[];return t?(t.forEach(((t,i)=>{const o=[...e,i],r=Xs(t)?"branch":"leaf",{selected:n=!1,focused:l=!1,hasFocusedItem:a=!1,hasSelectedItem:c=!1}=t;n&&(this._selectedItem=t),l&&(this._focusedItem=t),s.push(this._renderTreeItem(t,{path:o,itemType:r,hasFocusedItem:a,hasSelectedItem:c}))})),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))),Xs(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:Xs(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=At({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`
|
|
2715
2721
|
<div @click=${this._handleClick} class=${t}>
|
|
2716
2722
|
<ul>
|
|
2717
2723
|
${this._renderTree(this._data)}
|
|
2718
2724
|
</ul>
|
|
2719
2725
|
</div>
|
|
2720
|
-
`}};Zs.styles=Gs,Js([
|
|
2726
|
+
`}};Zs.styles=Gs,Js([ct({type:Array,reflect:!1})],Zs.prototype,"data",null),Js([ct({type:Number})],Zs.prototype,"indent",void 0),Js([ct({type:Boolean,reflect:!0})],Zs.prototype,"arrows",void 0),Js([ct({type:Boolean,reflect:!0})],Zs.prototype,"multiline",void 0),Js([ct({type:Number,reflect:!0})],Zs.prototype,"tabindex",void 0),Js([ct({type:Boolean,reflect:!0,attribute:"indent-guides"})],Zs.prototype,"indentGuides",void 0),Js([ht()],Zs.prototype,"_selectedItem",void 0),Js([ht()],Zs.prototype,"_focusedItem",void 0),Js([ht()],Zs.prototype,"_selectedBranch",void 0),Js([ht()],Zs.prototype,"_focusedBranch",void 0),Zs=Js([mt("vscode-tree")],Zs);export{$t as VscodeBadge,Nt as VscodeButton,Kt as VscodeCheckbox,Jt as VscodeCheckboxGroup,Zt as VscodeCollapsible,oe as VscodeContextMenu,ee as VscodeContextMenuItem,le as VscodeDivider,ve as VscodeFormContainer,fe as VscodeFormGroup,ye as VscodeFormHelper,Ft as VscodeIcon,Fe as VscodeLabel,es as VscodeMultiSelect,Ke as VscodeOption,os as VscodeProgressRing,ls as VscodeRadio,Ce as VscodeRadioGroup,us as VscodeScrollable,cs as VscodeSingleSelect,xs as VscodeSplitLayout,ks as VscodeTabHeader,Cs as VscodeTabPanel,qs as VscodeTable,zs as VscodeTableBody,Os as VscodeTableCell,Ms as VscodeTableHeader,Ds as VscodeTableHeaderCell,Ts as VscodeTableRow,Ws as VscodeTabs,ze as VscodeTextarea,je as VscodeTextfield,Zs as VscodeTree};
|