UNPKG

use-monaco

Version:

[![npm](https://img.shields.io/npm/v/use-monaco)](https://npm.im/use-monaco)

3 lines 94.8 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("scope-eval"),r=require("use-debounce"),o=require("react"),t=require("dequal"),n=require("create-hook-context"),i=require("deepmerge"),a=require("color"),s=require("dot-object"),u=require("onigasm"),c=require("monaco-textmate");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=d(e),g=d(o),f=d(i),p=d(a),m=d(s);function h(e,r){for(var o=0;o<r.length;o++){var t=r[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function v(e,r,o){return r&&h(e.prototype,r),o&&h(e,o),e}function b(){return(b=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e}).apply(this,arguments)}function y(e,r){if(null==e)return{};var o,t,n={},i=Object.keys(e);for(t=0;t<i.length;t++)r.indexOf(o=i[t])>=0||(n[o]=e[o]);return n}function k(e,r){(null==r||r>e.length)&&(r=e.length);for(var o=0,t=new Array(r);o<r;o++)t[o]=e[o];return t}function S(e,r){var o;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(o=function(e,r){if(e){if("string"==typeof e)return k(e,void 0);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?k(e,void 0):void 0}}(e))||r&&e&&"number"==typeof e.length){o&&(e=o);var t=0;return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(o=e[Symbol.iterator]()).next.bind(o)}const C=function(){function e(){}return e.prototype.then=function(r,o){const t=new e,n=this.s;if(n){const e=1&n?r:o;if(e){try{B(t,1,e(this.v))}catch(e){B(t,2,e)}return t}return this}return this.o=function(e){try{const n=e.v;1&e.s?B(t,1,r?r(n):n):o?B(t,1,o(n)):B(t,2,n)}catch(e){B(t,2,e)}},t},e}();function B(e,r,o){if(!e.s){if(o instanceof C){if(!o.s)return void(o.o=B.bind(null,e,r));1&r&&(r=o.s),o=o.v}if(o&&o.then)return void o.then(B.bind(null,e,r),B.bind(null,e,2));e.s=r,e.v=o;const t=e.o;t&&t(e)}}function w(e,r,o){var t=[];for(var n in e)t.push(n);return function(e,r,o){var t,n,i=-1;return function a(s){try{for(;++i<e.length&&(!o||!o());)if((s=r(i))&&s.then){if(!((u=s)instanceof C&&1&u.s))return void s.then(a,n||(n=B.bind(null,t=new C,2)));s=s.v}t?B(t,1,s):t=s}catch(e){B(t||(t=new C),2,e)}var u}(),t}(t,(function(e){return r(t[e])}),o)}function O(e,r){try{var o=e()}catch(e){return r(e)}return o&&o.then?o.then(void 0,r):o}function D(e){var r,o,t,n,i=/"|(\/\*)|(\*\/)|(\/\/)|\n|\r/g,a=!1,s=!1,u=!1,c=[],d=0,l=0;for(i.lastIndex=0;r=i.exec(e);)t=RegExp.leftContext,n=RegExp.rightContext,s||u||(o=t.substring(l),a||(o=o.replace(/(\n|\r|\s)*/g,"")),c[d++]=o),l=i.lastIndex,'"'!=r[0]||s||u?"/*"!=r[0]||a||s||u?"*/"!=r[0]||a||!s||u?"//"!=r[0]||a||s||u?"\n"!=r[0]&&"\r"!=r[0]||a||s||!u?s||u||/\n|\r|\s/.test(r[0])||(c[d++]=r[0]):u=!1:u=!0:s=!1:s=!0:(o=t.match(/(\\)*$/),a&&o&&o[0].length%2!=0||(a=!a),l--,n=e.substring(l));return c[d++]=n,c.join("").replace(/,}/,"}")}"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var E=function(e){return e.startsWith("/")?e:"/"+e},j=function(e){return e.endsWith("/")?e:e+"/"},x=function(e){return e.endsWith("/")?e.substr(0,e.length-1):e};function M(e){return{dispose:function(){var r;return Array.isArray(e)?T(e.filter(Boolean)):"function"==typeof(null==e?void 0:e.dispose)?null==e||null===(r=e.dispose)||void 0===r?void 0:r.call(e):{}}}}function T(e){for(;e.length;){var r,o;null===(r=e.pop())||void 0===r||null===(o=r.dispose)||void 0===o||o.call(r)}}function F(e){return e=String(e),/^\d+$/.test(e)?e+"px":e}function P(){}var V=function(e){var r=e.url,o=e.fetchOptions,t=void 0===o?{}:o;try{return Promise.resolve(fetch(r,Object.assign({},t))).then((function(e){return Promise.resolve(e.text()).then((function(e){var o=e;return function(e){try{!function(e,r,o){var t={};l.default(e,Object.assign({module:{exports:t},exports:t,require:function(e){return o[e]}},r))}(o,{monaco:e},{"monaco-editor-core":e,"monaco-editor":e,"use-monaco":e})}catch(e){console.log("[monaco] Error installing plugin from",r)}return{dispose:function(){}}}}))}))}catch(e){return Promise.reject(e)}},_=function(e,r){var o=e.dependencies,t=e.name;return y(e,["dependencies","name","format"]),r.dependencies=o,r.label=t,r},A=function(e){var r=e.url,o=e.fetchOptions,t=void 0===o?{}:o;return _({name:e.name,dependencies:e.dependencies},(function(e){try{return console.log("[monaco] fetching plugin from",r),Promise.resolve(V({url:r,fetchOptions:t})).then((function(r){return r(e)}))}catch(e){return Promise.reject(e)}}))},G={},R={},I=function(){function e(e){var r=this;this._languageId=void 0,this._loadingTriggered=void 0,this._lazyLoadPromise=void 0,this._lazyLoadPromiseResolve=void 0,this._lazyLoadPromiseReject=void 0,this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((function(e,o){r._lazyLoadPromiseResolve=e,r._lazyLoadPromiseReject=o}))}e.getOrCreate=function(r){return R[r]||(R[r]=new e(r)),R[r]};var r=e.prototype;return r.whenLoaded=function(){return this._lazyLoadPromise},r.load=function(){var e,r,o=this;return this._loadingTriggered||(this._loadingTriggered=!0,null===(e=G[this._languageId])||void 0===e||null===(r=e.loader)||void 0===r||r.call(e).then((function(e){return o._lazyLoadPromiseResolve(e)}),(function(e){return o._lazyLoadPromiseReject(e)}))),this._lazyLoadPromise},e}(),U=_({name:"core.languages",dependencies:["core.workers"]},(function(e){var r=e.languages.register;e.languages.register=function(o){var t=o.id,n=e.languages.getLanguages().find((function(e){return e.id===t}));if(n?(console.log("[monaco] replacing language:",t),Object.assign(n,o),G[t]=o):(G[t]=o,console.log("[monaco] registering language:",t)),r(o),o.loader){var i=I.getOrCreate(t);e.languages.setMonarchTokensProvider(t,i.whenLoaded().then((function(e){return e.language})).catch((function(e){console.error(e)}))),e.languages.onLanguage(t,(function(){i.load().then((function(r){r&&r.conf&&e.languages.setLanguageConfiguration(t,r.conf)})).catch((function(e){console.error(e)}))}))}o.worker&&e.worker.register(Object.assign({languageId:t},"object"==typeof o.worker?o.worker:{}))}})),J=_({name:"core.themes",dependencies:["core.editors"]},(function(e){var r=e.editor.setTheme,o={},t=new e.Emitter;e.editor.onDidChangeTheme=t.event;var n=e.editor.defineTheme;e.editor.defineTheme=function(e,r){n(e,r),o[e]=r},e.editor.setTheme=function(n){if("string"==typeof n)try{var i=JSON.parse(D(n));if("object"==typeof i&&(null==i?void 0:i.colors))return void e.editor.setTheme(i);console.log("[monaco] setting theme:",n),r(n),t.fire({name:n,theme:o[n]})}catch(e){console.log("[monaco] setting theme:",n),r(n),t.fire({name:n,theme:o[n]})}else if("object"==typeof n)try{e.editor.defineTheme("custom",n),console.log("[monaco] setting theme:",n),r("custom"),t.fire({name:"custom",theme:n})}catch(e){console.warn("[monaco] error setting theme: "+e)}},e.editor.getDefinedThemes=function(){return o},e.editor.defineThemes=function(r){Object.keys(r).forEach((function(o){e.editor.defineTheme(o,r[o])}))},e.editor.getTheme=function(r){var o;return null===(o=e.editor.getFocusedEditor())||void 0===o?void 0:o._themeService}})),L=_({name:"core.editors",dependencies:[]},(function(e){var r=e.editor.create,o=new e.Emitter;e.editor.onDidCreateEditor=o.event,e.editor.create=function(e,t,n){var i=r(e,t,n);return o.fire(i),i};var t=[],n=null;return e.editor.getFocusedEditor=function(){return n},e.editor.getEditors=function(){return t},e.editor.onDidCreateEditor((function(e){t.push(e),n||(n=e),e.onDidFocusEditorText((function(){n=e})),e.onDidDispose((function(){t=t.filter((function(r){return r!==e}))}))}))})),q=_({name:"core.shortcuts",dependencies:["core.editors"]},(function(e){return e.editor.onDidCreateEditor((function(r){var o;(null===(o=r.getRawOptions())||void 0===o?void 0:o.formatOnSave)&&r.addCommand(e.KeyMod.CtrlCmd|e.KeyCode.KEY_S,(function(){null==r||r.trigger("ctrl-s","editor.action.formatDocument",null)}))}))})),H={reference:!0,rename:!0,signatureHelp:!0,hover:!0,documentSymbol:!0,documentHighlight:!0,definition:!0,implementation:!0,typeDefinition:!0,codeLens:!0,codeAction:!0,documentFormattingEdit:!0,documentRangeFormattingEdit:!0,onTypeFormattingEdit:!0,link:!0,completionItem:!0,color:!0,foldingRange:!0,declaration:!0,selectionRange:!0,diagnostics:!0,documentSemanticTokens:!0,documentRangeSemanticTokens:!0},W=function(e,r){return function(o){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];try{var a=o.uri;return Promise.resolve(O((function(){return Promise.resolve(e(a)).then((function(e){return Promise.resolve(e.provide.apply(e,[r,a.toString()].concat(n.slice(0,n.length-1))))}))}),(function(e){return console.error(e),null})))}catch(e){return Promise.reject(e)}}},N=function(e){return function(r,o,t,n){try{var i=r.uri;return Promise.resolve(O((function(){return Promise.resolve(e(i)).then((function(e){return Promise.resolve(e.provide("signatureHelp",i.toString(),o,n))}))}),(function(e){return console.error(e),null})))}catch(e){return Promise.reject(e)}}},K=function(e,r){return function(o){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];try{var a=o.uri;return Promise.resolve(O((function(){return Promise.resolve(e(a)).then((function(e){return Promise.resolve(e.resolve.apply(e,[r,a.toString()].concat(n.slice(0,n.length-1))))}))}),(function(e){return console.error(e),null})))}catch(e){return Promise.reject(e)}}},z=function(e){return function(r,o){try{return Promise.resolve(O((function(){return Promise.resolve(e()).then((function(e){return Promise.resolve(e.resolve("completionItem",r,o))}))}),(function(e){return console.error(e),null})))}catch(e){return Promise.reject(e)}}},Q=function(){var e=r.prototype;function r(e,r){var o=this;this.client=e,this._disposables=[],this._listener=Object.create(null),this._editor=void 0,this._client=void 0,this.monaco=void 0,this._client=e,this.monaco=r,this._disposables.push(r.editor.onDidCreateEditor((function(e){o._editor=e})));var t=function(r){var t,n=r.getModeId();n===e.config.languageId&&(o._listener[r.uri.toString()]=r.onDidChangeContent((function(){clearTimeout(t),t=setTimeout((function(){o._doValidate(r.uri,n)}),500)})),o._doValidate(r.uri,n))},n=function(t){var n;r.editor.setModelMarkers(t,null!==(n=e.config.languageId)&&void 0!==n?n:"",[]);var i=t.uri.toString(),a=o._listener[i];a&&(a.dispose(),delete o._listener[i])};this._disposables.push(r.editor.onDidCreateModel(t)),this._disposables.push(r.editor.onWillDisposeModel((function(e){n(e)}))),this._disposables.push(r.editor.onDidChangeModelLanguage((function(e){n(e.model),t(e.model)}))),this._disposables.push(e.onConfigDidChange((function(o){r.editor.getModels().forEach((function(r){r.getModeId()===e.config.languageId&&(n(r),t(r))}))}))),this._disposables.push({dispose:function(){for(var e in o._listener)o._listener[e].dispose()}})}return e.isActiveModel=function(e){if(this._editor){var r=this._editor.getModel();if(r&&r.uri.toString()===e.uri.toString())return!0}return!1},e.dispose=function(){this._disposables.forEach((function(e){return e&&e.dispose()})),this._disposables=[]},e._doValidate=function(e,r){try{var o=this;return Promise.resolve(O((function(){return Promise.resolve(o.client.getSyncedWorker(e)).then((function(t){return Promise.resolve(t.doValidation(e.toString())).then((function(t){o.monaco.editor.setModelMarkers(o.monaco.editor.getModel(e),r,t)}))}))}),(function(e){return console.error(e),null})))}catch(e){return Promise.reject(e)}},r}(),Y=function(){function e(e,r){this._monaco=void 0,this._onDidChange=void 0,this._config=void 0,this._config=e,this._monaco=r,this._onDidChange=new this._monaco.Emitter}var r=e.prototype;return r.dispose=function(){this._onDidChange.dispose()},r.setConfig=function(e){this._config=Object.assign({},this._config,e),this._onDidChange.fire(this._config)},r.setOptions=function(e){this._config.options=Object.assign({},this._config.options,e),this._onDidChange.fire(this._config)},v(e,[{key:"onDidChange",get:function(){return this._onDidChange.event}},{key:"config",get:function(){return this._config}},{key:"languageId",get:function(){return this._config.languageId}},{key:"label",get:function(){return this._config.label}},{key:"providers",get:function(){return this._config.providers}},{key:"options",get:function(){return this._config.options}}]),e}(),$=function(){function e(e,r){var o=this,t=e.languageId,n=e.label,i=void 0===n?t:n,a=e.src,s=e.options,u=e.providers,c=void 0===u?H:u,d=e.timeoutDelay,l=void 0===d?6e5:d;this._config=void 0,this._idleCheckInterval=void 0,this._lastUsedTime=void 0,this._worker=void 0,this._client=void 0,this._providerDisposables=void 0,this._disposables=void 0,this._monaco=void 0,this._config=new Y({languageId:t,label:i,src:a,options:s,providers:c,timeoutDelay:l},r),this._monaco=r,this._idleCheckInterval=window.setInterval((function(){return o._checkIfIdle()}),3e4),this._lastUsedTime=0,this._worker=null,this._client=null;var g=this._config.onDidChange((function(){return o._stopWorker()})),f=this._config.onDidChange((function(){return o._registerProviders()}));this._providerDisposables=[],this._disposables=[g,f,this._config],this._registerProviders()}var r=e.prototype;return r._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},r.dispose=function(){clearInterval(this._idleCheckInterval),T(this._disposables),this._stopWorker()},r._registerProviders=function(){this.config.languageId&&(T(this._providerDisposables),this._providerDisposables=function(e,r,o,t){void 0===r&&(r=H);var n=[];if(!r)return[];var i=function(){try{return Promise.resolve(o.getSyncedWorker.apply(o,arguments))}catch(e){return Promise.reject(e)}};return(r="boolean"==typeof r&&r?H:r).diagnostics&&n.push(new Q(o,t)),r.reference&&n.push(t.languages.registerReferenceProvider(e,{provideReferences:W(i,"references")})),r.rename&&n.push(t.languages.registerRenameProvider(e,{provideRenameEdits:W(i,"renameEdits"),resolveRenameLocation:K(i,"renameLocation")})),r.signatureHelp&&n.push(t.languages.registerSignatureHelpProvider(e,{provideSignatureHelp:N(i)})),r.hover&&n.push(t.languages.registerHoverProvider(e,{provideHover:W(i,"hover")})),r.documentSymbol&&n.push(t.languages.registerDocumentSymbolProvider(e,{provideDocumentSymbols:W(i,"documentSymbols")})),r.documentHighlight&&n.push(t.languages.registerDocumentHighlightProvider(e,{provideDocumentHighlights:W(i,"documentHighlights")})),r.definition&&n.push(t.languages.registerDefinitionProvider(e,{provideDefinition:W(i,"definition")})),r.implementation&&n.push(t.languages.registerImplementationProvider(e,{provideImplementation:W(i,"implementation")})),r.typeDefinition&&n.push(t.languages.registerTypeDefinitionProvider(e,{provideTypeDefinition:W(i,"typeDefinition")})),r.codeLens&&n.push(t.languages.registerCodeLensProvider(e,{provideCodeLenses:W(i,"codeLenses"),resolveCodeLens:K(i,"codeLens")})),r.codeAction&&n.push(t.languages.registerCodeActionProvider(e,{provideCodeActions:W(i,"codeActions")})),r.documentFormattingEdit&&n.push(t.languages.registerDocumentFormattingEditProvider(e,{provideDocumentFormattingEdits:W(i,"documentFormattingEdits")})),r.documentRangeFormattingEdit&&n.push(t.languages.registerDocumentRangeFormattingEditProvider(e,{provideDocumentRangeFormattingEdits:W(i,"documentRangeFormattingEdits")})),r.link&&n.push(t.languages.registerLinkProvider(e,{provideLinks:W(i,"links")})),r.completionItem&&n.push(t.languages.registerCompletionItemProvider(e,{triggerCharacters:r.completionTriggerCharacters||[],provideCompletionItems:W(i,"completionItems"),resolveCompletionItem:z(i)})),r.color&&n.push(t.languages.registerColorProvider(e,{provideDocumentColors:W(i,"documentColors"),provideColorPresentations:W(i,"colorPresentations")})),r.foldingRange&&n.push(t.languages.registerFoldingRangeProvider(e,{provideFoldingRanges:W(i,"foldingRanges")})),r.declaration&&n.push(t.languages.registerDeclarationProvider(e,{provideDeclaration:W(i,"declaration")})),r.selectionRange&&n.push(t.languages.registerSelectionRangeProvider(e,{provideSelectionRanges:W(i,"selectionRanges")})),n}(this.config.languageId,this.config.providers,this,this._monaco),this._disposables.push(M(this._providerDisposables)))},r._checkIfIdle=function(){this._worker&&Date.now()-this._lastUsedTime>this.timeoutDelay&&this._stopWorker()},r._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=this._monaco.editor.createWebWorker({moduleId:this.config.label,label:this.config.label,createData:Object.assign({},this.config.options)}),this._client=this._worker.getProxy()),this._client},r.getSyncedWorker=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];try{var t=this;return Promise.resolve(t._getClient()).then((function(e){var o;return Promise.resolve(null===(o=t._worker)||void 0===o?void 0:o.withSyncedResources(r)).then((function(){return e}))}))}catch(e){return Promise.reject(e)}},v(e,[{key:"src",get:function(){return this._config.config.src}},{key:"timeoutDelay",get:function(){return this._config.config.timeoutDelay}},{key:"config",get:function(){return this._config}},{key:"onConfigDidChange",get:function(){return this._config.onDidChange}}]),e}(),X=_({name:"core.workers",dependencies:["core.editors","core.loader"]},(function(e){var r,o,t,n;console.log("[monaco] base worker path:",e.loader.workersPath);var i={getSyncedWorker:function(){for(var r=arguments.length,o=new Array(r),t=0;t<r;t++)o[t]=arguments[t];try{var n;return Promise.resolve(null===(n=e.languages.typescript)||void 0===n?void 0:n.getJavaScriptWorker()).then((function(e){return Promise.resolve(e.apply(void 0,o))}))}catch(e){return Promise.reject(e)}},src:e.loader.workersPath+"ts.monaco.worker.js",config:null!==(r=null===(o=e.languages.typescript)||void 0===o?void 0:o.javascriptDefaults)&&void 0!==r?r:{}},a={getSyncedWorker:function(){for(var r=arguments.length,o=new Array(r),t=0;t<r;t++)o[t]=arguments[t];try{var n;return Promise.resolve(null===(n=e.languages.typescript)||void 0===n?void 0:n.getTypeScriptWorker()).then((function(e){return Promise.resolve(e.apply(void 0,o))}))}catch(e){return Promise.reject(e)}},src:e.loader.workersPath+"ts.monaco.worker.js",config:null!==(t=null===(n=e.languages.typescript)||void 0===n?void 0:n.typescriptDefaults)&&void 0!==t?t:{}},s=function(e){return{typescript:Object.assign({},a,{src:e+"ts.monaco.worker.js"}),javascript:Object.assign({},i,{src:e+"ts.monaco.worker.js"}),editorWorkerService:{src:e+"editor.monaco.worker.js"},html:{src:e+"html.monaco.worker.js"},css:{src:e+"css.monaco.worker.js"},json:{src:e+"json.monaco.worker.js"}}},u=function(){function r(){var r=this;this.workerClients=s,this.environment=void 0,this._workers={},this.workerClients=Object.assign({},this.workerClients,s(j(e.loader.workersPath))),this.setEnvironment({getWorker:function(e){var o=r.workerClients[e].src;if(console.log("[monaco] loading worker: "+e),"string"==typeof o){var t=function(e){var r;return r=new Blob([e],{type:"text/javascript"}),window.URL.createObjectURL(r)}('importScripts("'+o+'")');return new Worker(t,{name:e})}return o()}})}var o=r.prototype;return o._registerWorker=function(r){var o,t=r.onRegister,n=y(r,["onRegister"]);console.log("[monaco] registering worker: "+n.label,n);var i=new $(n,e);return this.workerClients[null!==(o=n.label)&&void 0!==o?o:""]=i,t&&t(i,e),i},o.register=function(e){return this._registerWorker(e)},o.getClient=function(e){if(!this.workerClients[e])throw new Error("Worker "+e+" not registered!");return this.workerClients[e]},o.getWorker=function(r){try{for(var o,t=this,n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];if(0===i.length){var s,u,c=null===(s=e.editor.getFocusedEditor())||void 0===s||null===(u=s.getModel())||void 0===u?void 0:u.uri;c&&i.push(c)}return Promise.resolve((o=t.getClient(r)).getSyncedWorker.apply(o,i))}catch(e){return Promise.reject(e)}},o.setConfig=function(e,r){this.getClient(e).config.setConfig(r)},o.updateOptions=function(e,r){this.getClient(e).config.setOptions(r)},o.setEnvironment=function(e){var r=e.getWorkerUrl,o=void 0===r?P:r,t=e.getWorker,n=void 0===t?P:t,i=e.baseUrl,a=void 0===i?void 0:i;(a||n||o)&&(window.MonacoEnvironment={getWorker:function(e){function r(r,o){return e.apply(this,arguments)}return r.toString=function(){return e.toString()},r}((function(e,r){var t=null==n?void 0:n(r);if(t)return t;var i=function(e,r){var t=null==o?void 0:o(r);if(t)return t}(0,r);return i?new Worker(i,{name:r}):null}))}),this.environment={baseUrl:a,getWorker:n,getWorkerUrl:o}},r}();Object.assign(e,{worker:new u})}));function Z(e,r,o,t){return""+j(e)+r+"@"+o+t}function ee(e){var r=e.monacoVersion,o=void 0===r?"0.21.2":r,t=e.monacoCorePkg,n=void 0===t?"monaco-editor-core":t,i=e.cdn,a=void 0===i?"https://cdn.jsdelivr.net/npm":i,s=e.monacoPath,u=void 0===s?j(Z(a,n,o,"/")):s,c=e.workersPath,d=void 0===c?j(Z(a,"use-monaco","0.0.40","/dist/workers/")):c,l=e.languagesPath,g=void 0===l?j(Z(a,"use-monaco","0.0.40","/dist/languages/")):l,f=e.plugins,p=void 0===f?[]:f,m=e.languages,h=void 0===m?[]:m,v=_({name:"core.loader"},(function(e){e.loader={monacoCorePkg:n,monacoVersion:o,cdn:a,monacoPath:j(u),workersPath:j(d),languagesPath:j(g),plugins:p,languages:h}}));console.log("[monaco] loading monaco from",u,"...");var b,y=oe.init({paths:{vs:j(u)+"min/vs"}}),k=y.then((function(e){try{var r;return console.log("[monaco] loaded monaco"),e=function(e){var r=function(e){try{var r,o;return null===(r=e.dependencies)||void 0===r||r.forEach((function(r){t[r]||(n[r]||(n[r]=[]),n[r].push(e),o=!0)})),Promise.resolve(!o)}catch(e){return Promise.reject(e)}},o=function(r){try{var o;return console.log("[monaco] installing plugin: "+(null!==(o=r.label)&&void 0!==o?o:r.name)),Promise.resolve(r(e)).then((function(e){var o;return t[null!==(o=r.label)&&void 0!==o?o:r.name]=r,r.label?M([e,i(r.label)].filter(Boolean)):e}))}catch(e){return Promise.reject(e)}},t={},n={};function i(e){if(n[e]){var r=n[e].map((function(e){var r;return e.dependencies.forEach((function(e){t[e]||(r=!0)})),r?null:o(e)}));return delete n[e],M(r.filter(Boolean))}}return Object.assign(e,{plugin:{isInstalled:function(e){return!!t[e]},install:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];try{var a=!1,s=function(e){return a?e:M(u.filter(Boolean))},u=[],c=w(n,(function(e){function i(e){var n;if(!(s=e))throw new Error("Could'nt resolve plugin, "+s);return s.label=null!==(n=s.label)&&void 0!==n?n:s.name,t[s.label]?(console.log("[monaco] skipped installing "+s.label+" (already installed)"),void(a=!0)):Promise.resolve(r(s)).then((function(e){if(e){var r=u.push;return Promise.resolve(o(s)).then((function(e){r.call(u,e)}))}}))}var s=n[e],c="function"==typeof s,d=c||s.url;return c||!d?i(c?s:d?V(s):null):Promise.resolve(c?s:d?V(s):null).then(i)}),(function(){return a}));return Promise.resolve(c&&c.then?c.then(s):s(c))}catch(e){return Promise.reject(e)}}}}),e}(e),Promise.resolve((r=e.plugin).install.apply(r,[v,U,J,L,q,X].concat(p,h))).then((function(r){return b=r,e}))}catch(e){return Promise.reject(e)}})).catch((function(e){return console.error("An error occurred during initialization of Monaco:",e)}));return k.cancel=function(){var e,r,o;null===(e=y.cancel)||void 0===e||e.call(y),null===(r=b)||void 0===r||null===(o=r.dispose)||void 0===o||o.call(r)},k}var re=function(){function e(){var e=this;this.config=void 0,this.resolve=void 0,this.reject=void 0,this.handleMainScriptLoad=function(){document.removeEventListener("monaco_init",e.handleMainScriptLoad),e.resolve(window.monaco)},this.isInitialized=!1,this.wrapperPromise=new Promise((function(r,o){e.resolve=r,e.reject=o})),this.config={}}var r=e.prototype;return r.injectScripts=function(e){document.body.appendChild(e)},r.createScript=function(e){var r=document.createElement("script");return e&&(r.src=e),r},r.createMonacoLoaderScript=function(e){var r=this,o=this.createScript(x(this.config.paths.vs)+"/loader.js");return o.onload=function(){return r.injectScripts(e)},o.onerror=this.reject,o},r.createMainScript=function(){var e=this.createScript();return e.innerHTML="\n      require.config("+JSON.stringify(this.config)+");\n      require(['vs/editor/editor.main'], function() {\n        document.dispatchEvent(new Event('monaco_init'));\n      });\n    ",e.onerror=this.reject,e},r.init=function(e){if(!this.isInitialized){if(window.monaco&&window.monaco.editor)return new Promise((function(e,r){return e(window.monaco)}));this.config=function e(r,o){return Object.keys(o).forEach((function(t){o[t]instanceof Object&&r[t]&&Object.assign(o[t],e(r[t],o[t]))})),Object.assign({},r,o)}(this.config,e),document.addEventListener("monaco_init",this.handleMainScriptLoad);var r=this.createMainScript(),o=this.createMonacoLoaderScript(r);this.injectScripts(o)}return this.isInitialized=!0,t=this.wrapperPromise,n=!1,i=new Promise((function(e,r){t.then((function(o){return n?r("operation is manually canceled"):e(o)})),t.catch((function(e){return r(e)}))})),Object.assign(i,{cancel:function(){return n=!0}});var t,n,i},e}(),oe=new re,te=["typescript","css","html","json"],ne={javascript:"typescript"},ie=["abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dart","dockerfile","fsharp","go","graphql","handlebars","hcl","html","ini","java","javascript","julia","kotlin","less","lexon","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scala","scheme","scss","shell","solidity","sophia","sql","st","swift","systemverilog","tcl","twig","typescript","vb","xml","yaml"],ae=[].concat(ie,["json"]),se=Object.fromEntries(ae.map((function(e){return[e,_({name:"language."+e},(function(r){try{var o=function(){function o(){var o=function(){if(ne[e])return Promise.resolve(r.plugin.install(A({name:"language."+ne[e]+".service",dependencies:[],url:r.loader.languagesPath+(ne[e]+".service.js")}))).then((function(){}))}();if(o&&o.then)return o.then((function(){}))}var t=function(){if(te.includes(e))return Promise.resolve(r.plugin.install(A({name:"language."+e+".service",dependencies:[],url:r.loader.languagesPath+(e+".service.js")}))).then((function(){}))}();return t&&t.then?t.then(o):o()},t=function(){if(ie.includes(e))return Promise.resolve(r.plugin.install(A({name:"language."+e+".basic",dependencies:[],url:r.loader.languagesPath+(e+".basic.js")}))).then((function(){}))}();return Promise.resolve(t&&t.then?t.then(o):o())}catch(e){return Promise.reject(e)}}))]})));function ue(e,r,n){return void 0===n&&(n=[]),o.useEffect(e,[].concat((i=r,a=o.useRef(),s=o.useRef(0),t.dequal(i,a.current)||(a.current=i,s.current+=1),[s.current]),n));var i,a,s}var ce={base:"vs",inherit:!0,rules:[{token:"",foreground:"555555"},{token:"invalid",foreground:"ff3333"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"397D13"},{token:"variable.parameter",foreground:"397D13"},{token:"variable.predefined",foreground:"D2054E"},{token:"entity",foreground:"D2054E"},{token:"constant",foreground:"f08c36"},{token:"constant.language",foreground:"D47509"},{token:"constant.enum",foreground:"0B7FC7"},{token:"comment",foreground:"abb0b6",fontStyle:"italic"},{token:"number",foreground:"2882F9"},{token:"number.hex",foreground:"f08c36"},{token:"regexp",foreground:"4dbf99"},{token:"annotation",foreground:"B33086"},{token:"type.identifier",foreground:"CA9800"},{token:"type",foreground:"1F61A0"},{token:"delimiter",foreground:"555555"},{token:"delimiter.html",foreground:"555555"},{token:"delimiter.xml",foreground:"555555"},{token:"tag",foreground:"e7c547"},{token:"tag.id.jade",foreground:"e7c547"},{token:"tag.class.jade",foreground:"e7c547"},{token:"meta.scss",foreground:"e7c547"},{token:"metatag",foreground:"e7c547"},{token:"metatag.content.html",foreground:"D64292"},{token:"metatag.html",foreground:"e7c547"},{token:"metatag.xml",foreground:"e7c547"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"1F61A0"},{token:"string.key.json",foreground:"41a6d9"},{token:"string.value.json",foreground:"D64292"},{token:"attribute.name",foreground:"8B2BB9"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"abb0b6"},{token:"attribute.value.unit",foreground:"D64292"},{token:"attribute.value.html",foreground:"D64292"},{token:"attribute.value.xml",foreground:"D64292"},{token:"string",foreground:"D64292"},{token:"string.html",foreground:"D64292"},{token:"string.sql",foreground:"D64292"},{token:"string.yaml",foreground:"D64292"},{token:"keyword",foreground:"B11A04"},{token:"keyword.json",foreground:"f2590c"},{token:"keyword.flow",foreground:"f2590c"},{token:"keyword.flow.scss",foreground:"f2590c"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{"editor.background":"#ffffff","editor.foreground":"#555555","editorIndentGuide.background":"#ecebec","editorIndentGuide.activeBackground":"#e0e0e0"}},de={javascript:"babel",typescript:"babel-ts",markdown:"markdown",graphql:"graphql",json:"json",mdx:"mdx",html:"html",angular:"angular",vue:"vue"},le={babel:["parser-babel"],"babel-ts":["parser-babel"],markdown:["parser-markdown"],graphql:["parser-graphql"],mdx:["parser-markdown"],html:["parser-html"],angular:["parser-html"],vue:["parser-html"],json:["parser-babel"],css:[""]},ge=function(e,r){void 0===e&&(e={});var o=(void 0===r?{}:r).workerSrc;return _({name:"prettier",dependencies:["core.workers"]},(function(r){var t=null!=o?o:r.loader.workersPath+"prettier.monaco.worker.js";r.plugin.prettier={enable:function(o,n){void 0===n&&(n=e);var i=n.parser,a=void 0===i?de[o]:i,s=n.plugins,u=void 0===s?le[a]:s,c=y(n,["parser","plugins"]);return r.worker.register({languageId:o,label:"prettier",src:t,providers:{documentFormattingEdit:!0},options:Object.assign({workerSrc:t,parser:a,plugins:u},c)})}};var n=r.languages.register;r.languages.register=function(o){n(o),de[o.id]&&r.plugin.prettier.enable(o.id,e)}}))},fe=function(e){return _({name:"language.graphql.service",dependencies:["core.workers","language.graphql"]},(function(r){return r.worker.register({label:"graphql",languageId:"graphql",options:{languageConfig:{schemaConfig:e}},src:r.loader.workersPath+"graphql.monaco.worker.js",providers:{hover:!0,documentFormattingEdit:!r.plugin.isInstalled("prettier"),completionItem:!0,diagnostics:!0}})}))},pe=function(e){return void 0===e&&(e={}),_({name:"typescript.typings",dependencies:["core.workers","language.typescript"]},(function(r){var o=new Map;if(r.languages.typescript){var t=r.worker.register({label:"typings",src:r.loader.workersPath+"typings.monaco.worker.js",options:{},providers:!1});r.languages.typescript.typescriptDefaults.setEagerModelSync(!0),r.languages.typescript.javascriptDefaults.setEagerModelSync(!0);var n=Object.assign({allowJs:!0,allowSyntheticDefaultImports:!0,alwaysStrict:!0,noLib:!1,esModuleInterop:!0,forceConsistentCasingInFileNames:!0,jsx:r.languages.typescript.JsxEmit.React,module:r.languages.typescript.ModuleKind.ESNext,moduleResolution:r.languages.typescript.ModuleResolutionKind.NodeJs,noEmit:!0,lib:["dom","dom.iterable","esnext"],resolveJsonModule:!0,strict:!1,target:r.languages.typescript.ScriptTarget.ESNext},e);r.languages.typescript.typescriptDefaults.setCompilerOptions(n),r.languages.typescript.typescriptDefaults.setCompilerOptions(n);var i=["// stub\n      import * as useMonaco from 'use-monaco'"],a=[],s=function(){var e=i.join("\n")+"\n\n\n          declare global {\n            "+a.join("\n")+"\n          }";console.log("[typings] setting global.d.ts",{code:e});var t=o.get("global.d.ts");t&&t.dispose();var n=r.languages.typescript.typescriptDefaults.addExtraLib(e,"file:///global.d.ts"),s=r.languages.typescript.javascriptDefaults.addExtraLib(e,"file:///global.d.ts");o.set("global.d.ts",{dispose:function(){n.dispose(),s.dispose()}})};return Object.assign(r.languages.typescript,{loadTypes:function(e,t){try{return Promise.resolve(r.worker.getWorker("typings")).then((function(n){return Promise.resolve(n.fetchTypings(e,t)).then((function(e){var t=e.typings;return Object.keys(t).forEach((function(e){var n=o.get(e);n&&n.dispose();var i=r.languages.typescript.typescriptDefaults.addExtraLib(t[e],"file:///"+e),a=r.languages.typescript.javascriptDefaults.addExtraLib(t[e],"file:///"+e);o.set(e,{dispose:function(){i.dispose(),a.dispose()}})})),t}))}))}catch(e){return Promise.reject(e)}},exposeGlobal:function(e,r){i=[].concat(i,[e]),a=[].concat(a,[r]),s()}}),s(),t}console.warn("Couldn't install typescript.typings since the typescript worker is not registered")}))};function me(e){return s.object(JSON.parse(JSON.stringify(e)))}var he={black:"#000",white:"#fff",rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},lightBlue:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},warmGray:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},trueGray:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},gray:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},coolGray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},blueGray:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"}},ve={name:"CodeSandbox Black",type:"dark",colors:m.default.dot({contrastBorder:he.blueGray[600],contrastActiveBorder:null,errorForeground:he.red[500],focusBorder:he.blueGray[600],foreground:he.blueGray[200],activityBar:{background:he.blueGray[700],border:he.blueGray[600]},activityBarBadge:{background:he.blueGray[500]},button:{background:he.blue[600],foreground:he.white,border:he.blue[600]},dropdown:{background:he.blueGray[700],border:he.blueGray[600],foreground:he.white},editor:{background:he.blueGray[700],foreground:he.blueGray[300],hoverHighlightBackground:he.blueGray[500],inactiveSelectionBackground:he.blueGray[500],lineHighlightBackground:he.blueGray[600],lineHighlightBorder:he.blueGray[600],rangeHighlightBackground:he.blueGray[600],selectionBackground:he.blue[500]+"33",selectionHighlightBackground:he.blueGray[600],wordHighlightStrongBackground:he.blueGray[600],wordHighlightBackground:he.blueGray[600]},editorBracketMatch:{background:he.blueGray[600]},editorCodeLens:{foreground:he.blueGray[600]},editorCursor:{background:he.blueGray[700],foreground:he.white},editorError:{border:he.blueGray[600],foreground:he.red[500]},editorGroup:{background:he.blueGray[700],border:he.blueGray[600],dropBackground:he.blue[500]+"1a"},editorGroupHeader:{noTabsBackground:null,tabsBackground:he.blueGray[700],tabsBorder:he.blueGray[600]},editorGutter:{background:he.blueGray[700],deletedBackground:he.red[500],modifiedBackground:he.blueGray[700]},editorHoverWidget:{background:he.blueGray[700],border:he.blueGray[600]},editorIndentGuide:{background:he.blueGray[700]},editorLink:{activeForeground:he.blueGray[300]},editorLineNumber:{foreground:he.blueGray[600],activeForeground:he.blueGray[400]},editorRuler:{foreground:he.white},editorMarkerNavigation:{background:he.blueGray[700]},editorMarkerNavigationWarning:{background:he.blueGray[600]},editorMarkerNavigationError:{background:he.blueGray[700]},editorOverviewRuler:{border:he.blueGray[600],commonContentForeground:he.blueGray[600],currentContentForeground:he.red[500],incomingContentForeground:he.green},editorSuggestWidget:{background:he.blueGray[700],border:he.blueGray[600],foreground:he.blueGray[300],selectedBackground:he.blueGray[600]},editorWarning:{border:he.blueGray[600],foreground:he.red[300]},editorWhitespace:{foreground:he.blueGray[500]},editorWidget:{background:he.blueGray[700],border:he.blueGray[600]},extensionButton:{prominentBackground:he.blueGray[600],prominentForeground:he.white,prominentHoverBackground:he.blueGray[600]},input:{background:he.blueGray[600],foreground:he.white,border:he.blueGray[900],placeholderForeground:he.blueGray[300]},inputOption:{activeBorder:he.blueGray[500]},inputValidation:{infoForeground:null,infoBackground:null,infoBorder:he.purple,warningForeground:null,warningBackground:null,warningBorder:he.yellow,errorForeground:null,errorBackground:null,errorBorder:he.red[500]},list:{dropBackground:he.blueGray[700],highlightForeground:he.blue[300],hoverBackground:he.blueGray[600],focusBackground:he.blueGray[600],activeSelectionBackground:he.blueGray[600],activeSelectionForeground:he.white,inactiveSelectionBackground:he.blueGray[600],inactiveSelectionForeground:he.white,warningForeground:he.yellow,errorForeground:he.red[500],hoverForeground:null,focusForeground:null},menu:{background:he.blueGray[700],selectionBackground:he.blueGray[600]},peekView:{border:he.blueGray[500]},peekViewEditor:{background:he.blueGray[600],matchHighlightBackground:he.blue[500]+"33"},peekViewEditorGutter:{background:null},peekViewResult:{background:he.blueGray[600],fileForeground:he.white,lineForeground:he.white,matchHighlightBackground:he.blue[500]+"33",selectionBackground:he.blueGray[600],selectionForeground:he.white},peekViewTitle:{background:he.blueGray[600]},peekViewTitleDescription:{foreground:he.blue[700]},peekViewTitleLabel:{foreground:he.white},scrollbarSlider:{activeBackground:he.white,border:he.blueGray[600],background:null,hoverBackground:null},selection:{background:he.blue[500]+"40"},separator:{background:he.blueGray[900],foreground:he.white},sideBar:{background:he.blueGray[700],hoverBackground:he.blueGray[600],border:he.blueGray[600],foreground:he.blueGray[200]},sideBarSectionHeader:{background:he.blueGray[700],foreground:he.white,border:he.blueGray[600]},sideBarTitle:{foreground:he.white},statusBar:{background:he.blueGray[600],foreground:he.white,debuggingBackground:he.red[500],debuggingForeground:he.blueGray[600],noFolderBackground:he.blueGray[600],noFolderForeground:he.white,border:he.blueGray[600]},statusBarItem:{activeBackground:null,hoverBackground:null,prominentBackground:he.red[500],prominentHoverBackground:he.yellow,remoteForeground:he.blueGray[100],remoteBackground:he.purple},tab:{activeBackground:he.blueGray[700],activeForeground:he.white,border:he.blueGray[600],activeBorder:he.blue[300],unfocusedActiveBorder:null,inactiveBackground:he.blueGray[700],inactiveForeground:he.blueGray[400],unfocusedActiveForeground:he.white,unfocusedInactiveForeground:he.blueGray[400]},terminal:{background:he.blueGray[700],foreground:he.white,ansiBrightBlack:he.blue[700],ansiBrightRed:he.red[500],ansiBrightGreen:he.green,ansiBrightYellow:he.yellow,ansiBlack:he.blueGray[600],ansiRed:he.red[500],ansiGreen:he.green,ansiYellow:he.yellow,ansiBlue:he.blue[700],ansiMagenta:he.purple,ansiCyan:he.blue[300],ansiWhite:he.white},titleBar:{background:he.blueGray[700],activeBackground:he.blueGray[700],activeForeground:he.white,border:he.blueGray[600],inactiveBackground:he.blueGray[700],inactiveForeground:he.blueGray[300]}}),tokenColors:[{name:"Comment",scope:["comment"],settings:{foreground:"#5C6370",fontStyle:"italic"}},{name:"Comment Markup Link",scope:["comment markup.link"],settings:{foreground:"#5C6370"}},{name:"Entity Name Type",scope:["entity.name.type"],settings:{foreground:"#E5C07B"}},{name:"Entity Other Inherited Class",scope:["entity.other.inherited-class"],settings:{foreground:"#98C379"}},{name:"Keyword",scope:["keyword"],settings:{foreground:"#C678DD"}},{name:"Keyword Control",scope:["keyword.control"],settings:{foreground:"#C678DD"}},{name:"Keyword Operator",scope:["keyword.operator"],settings:{foreground:"#ABB2BF"}},{name:"Keyword Other Special Method",scope:["keyword.other.special-method"],settings:{foreground:"#61AFEF"}},{name:"Keyword Other Unit",scope:["keyword.other.unit"],settings:{foreground:"#D19A66"}},{name:"Storage",scope:["storage"],settings:{foreground:"#C678DD"}},{name:"Storage Type Annotation,storage Type Primitive",scope:["storage.type.annotation","storage.type.primitive"],settings:{foreground:"#C678DD"}},{name:"Storage Modifier Package,storage Modifier Import",scope:["storage.modifier.package","storage.modifier.import"],settings:{foreground:"#ABB2BF"}},{name:"Constant",scope:["constant"],settings:{foreground:"#D19A66"}},{name:"Constant Variable",scope:["constant.variable"],settings:{foreground:"#D19A66"}},{name:"Constant Character Escape",scope:["constant.character.escape"],settings:{foreground:"#56B6C2"}},{name:"Constant Numeric",scope:["constant.numeric"],settings:{foreground:"#D19A66"}},{name:"Constant Other Color",scope:["constant.other.color"],settings:{foreground:"#56B6C2"}},{name:"Constant Other Symbol",scope:["constant.other.symbol"],settings:{foreground:"#56B6C2"}},{name:"Variable",scope:["variable"],settings:{foreground:"#E06C75"}},{name:"Variable Interpolation",scope:["variable.interpolation"],settings:{foreground:"#BE5046"}},{name:"Variable Parameter",scope:["variable.parameter"],settings:{foreground:"#ABB2BF"}},{name:"String",scope:["string"],settings:{foreground:"#98C379"}},{name:"String Regexp",scope:["string.regexp"],settings:{foreground:"#56B6C2"}},{name:"String Regexp Source Ruby Embedded",scope:["string.regexp source.ruby.embedded"],settings:{foreground:"#E5C07B"}},{name:"String Other Link",scope:["string.other.link"],settings:{foreground:"#E06C75"}},{name:"Punctuation Definition Comment",scope:["punctuation.definition.comment"],settings:{foreground:"#5C6370"}},{name:"Punctuation Definition Method Parameters,punctuation Definition Function Parameters,punctuation Definition Parameters,punctuation Definition Separator,punctuation Definition Seperator,punctuation Definition Array",scope:["punctuation.definition.method-parameters","punctuation.definition.function-parameters","punctuation.definition.parameters","punctuation.definition.separator","punctuation.definition.seperator","punctuation.definition.array"],settings:{foreground:"#ABB2BF"}},{name:"Punctuation Definition Heading,punctuation Definition Identity",scope:["punctuation.definition.heading","punctuation.definition.identity"],settings:{foreground:"#61AFEF"}},{name:"Punctuation Definition Bold",scope:["punctuation.definition.bold"],settings:{foreground:"#E5C07B",fontStyle:"bold"}},{name:"Punctuation Definition Italic",scope:["punctuation.definition.italic"],settings:{foreground:"#C678DD",fontStyle:"italic"}},{name:"Punctuation Section Embedded",scope:["punctuation.section.embedded"],settings:{foreground:"#BE5046"}},{name:"Punctuation Section Method,punctuation Section Class,punctuation Section Inner Class",scope:["punctuation.section.method","punctuation.section.class","punctuation.section.inner-class"],settings:{foreground:"#ABB2BF"}},{name:"Support Class",scope:["support.class"],settings:{foreground:"#E5C07B"}},{name:"Support Type",scope:["support.type"],settings:{foreground:"#56B6C2"}},{name:"Support Function",scope:["support.function"],settings:{foreground:"#56B6C2"}},{name:"Support Function Any Method",scope:["support.function.any-method"],settings:{foreground:"#61AFEF"}},{name:"Entity Name Function",scope:["entity.name.function"],settings:{foreground:"#61AFEF"}},{name:"Entity Name Class,entity Name Type Class",scope:["entity.name.class","entity.name.type.class"],settings:{foreground:"#E5C07B"}},{name:"Entity Name Section",scope:["entity.name.section"],settings:{foreground:"#61AFEF"}},{name:"Entity Name Tag",scope:["entity.name.tag"],settings:{foreground:"#E06C75"}},{name:"Entity Other Attribute Name",scope:["entity.other.attribute-name"],settings:{foreground:"#D19A66"}},{name:"Entity Other Attribute Name Id",scope:["entity.other.attribute-name.id"],settings:{foreground:"#61AFEF"}},{name:"Meta Class",scope:["meta.class"],settings:{foreground:"#E5C07B"}},{name:"Meta Class Body",scope:["meta.class.body"],settings:{foreground:"#ABB2BF"}},{name:"Meta Method Call,meta Method",scope:["meta.method-call","meta.method"],settings:{foreground:"#ABB2BF"}},{name:"Meta Definition Variable",scope:["meta.definition.variable"],settings:{foreground:"#E06C75"}},{name:"Meta Link",scope:["meta.link"],settings:{foreground:"#D19A66"}},{name:"Meta Require",scope:["meta.require"],settings:{foreground:"#61AFEF"}},{name:"Meta Selector",scope:["meta.selector"],settings:{foreground:"#C678DD"}},{name:"Meta Separator",scope:["meta.separator"],settings:{background:"#373B41",foreground:"#ABB2BF"}},{name:"Meta Tag",scope:["meta.tag"],settings:{foreground:"#ABB2BF"}},{name:"Underline",scope:["underline"],settings:{"text-decoration":"underline"}},{name:"None",scope:["none"],settings:{foreground:"#ABB2BF"}},{name:"Invalid Deprecated",scope:["invalid.deprecated"],settings:{foreground:"#523D14",background:"#E0C285"}},{name:"Invalid Illegal",scope:["invalid.illegal"],settings:{foreground:"white",background:"#E05252"}},{name:"Markup Bold",scope:["markup.bold"],settings:{foreground:"#D19A66",fontStyle:"bold"}},{name:"Markup Changed",scope:["markup.changed"],settings:{foreground:"#C678DD"}},{name:"Markup Deleted",scope:["markup.deleted"],settings:{foreground:"#E06C75"}},{name:"Markup Italic",scope:["markup.italic"],settings:{foreground:"#C678DD",fontStyle:"italic"}},{name:"Markup Heading",scope:["markup.heading"],settings:{foreground:"#E06C75"}},{name:"Markup Heading Punctuation Definition Heading",scope:["markup.heading punctuation.definition.heading"],settings:{foreground:"#61AFEF"}},{name:"Markup Link",scope:["markup.link"],settings:{foreground:"#C678DD"}},{name:"Markup Inserted",scope:["markup.inserted"],settings:{foreground:"#98C379"}},{name:"Markup Quote",scope:["markup.quote"],settings:{foreground:"#D19A66"}},{name:"Markup Raw",scope:["markup.raw"],settings:{foreground:"#98C379"}},{name:"Source C Keyword Operator",scope:["source.c keyword.operator"],settings:{foreground:"#C678DD"}},{name:"Source Cpp Keyword Operator",scope:["source.cpp keyword.operator"],settings:{foreground:"#C678DD"}},{name:"Source Cs Keyword Operator",scope:["source.cs keyword.operator"],settings:{foreground:"#C678DD"}},{name:"Source Css Property Name,source Css Property Value",scope:["source.css property-name","source.css property-value"],settings:{foreground:"#828997"}},{name:"Source Css Property Name Support,source Css Property Value Support",scope:["source.css property-name.support","source.css property-value.support"],settings:{foreground:"#ABB2BF"}},{name:"Source Gfm Markup",scope:["source.gfm markup"],settings:{"-webkit-font-smoothing":"auto"}},{name:"Source Gfm Link Entity",scope:["source.gfm link entity"],settings:{foreground:"#61AFEF"}},{name:"Source Go Storage Type String",scope:["source.go storage.type.string"],settings:{foreground:"#C678DD"}},{name:"Source Ini Keyword Other Definition Ini",scope:["source.ini keyword.other.definition.ini"],settings:{foreground:"#E06C75"}},{name:"Source Java Storage Modifier Import",scope:["source.java storage.modifier.import"],settings:{foreground:"#E5C07B"}},{name:"Source Java Storage Type",scope:["source.java storage.type"],settings:{foreground:"#E5C07B"}},{name:"Source Java Keyword Operator Instanceof",scope:["source.java keyword.operator.instanceof"],settings:{foreground:"#C678DD"}},{name:"Source Java Properties Meta Key Pair",scope:["source.java-properties meta.key-pair"],settings:{foreground:"#E06C75"}},{name:"Source Java Properties Meta Key Pair > Punctuation",scope:["source.java-properties meta.key-pair > punctuation"],settings:{foreground:"#ABB2BF"}},{name:"Source Js Keyword Operator",scope:["source.js keyword.operator"],settings:{foreground:"#56B6C2"}},{name:"Source Js Keyword Operator Delete,source Js Keyword Operator In,source Js Keyword Operator Of,source Js Keyword Operator Instanceof,source Js Keyword Operator New,source Js Keyword Operator Typeof,source Js Keyword Operator Void",scope:["source.js keyword.operator.delete","source.js keyword.operator.in","source.js keyword.operator.of","source.js keyword.operator.instanceof","source.js keyword.operator.new","source.js keyword.operator.typeof","source.js keyword.operator.void"],settings:{foreground:"#C678DD"}},{name:"Source Json Meta Structure Dictionary Json > String Quoted Json",scope:["source.json meta.structure.dictionary.json > string.quoted.json"],settings:{foreground:"#E06C75"}},{name:"Source Json Meta Structure Dictionary Json > String Quoted Json > Punctuation String",scope:["source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string"],settings:{foreground:"#E06C75"}},{name:"Source Json Meta Structure Dictionary Json > Value Json > String Quoted Json,source Json Meta Structure Array Json > Value Json > String Quoted Json,source Json Meta Structure Dictionary Json > Value Json > String Quoted Json > Punctuation,source Json Meta Structure Array Json > Value Json > String Quoted Json > Punctuation",scope:["source.json meta.structure.dictionary.json > value.json > string.quoted.json","source.json meta.structure.array.json > value.json > string.quoted.json","source.json meta.structure.dictionary.json > value.json > string.quoted.json > punctuation","source.json meta.structure.array.json > value.json > string.quoted.json > punctuation"],settings:{foreground:"#98C379"}},{name:"Source Json Meta Structure Dictionary Json > Constant Language Json,source Json Meta Structure Array Json > Constant Language Json",scope:["source.json meta.structure.dictionary.json > constant.language.json","source.json meta.structure.array.json > constant.language.json"],settings:{foreground:"#56B6C2"}},{name:"Source Ruby Constant Other Symbol > Punctuation",scope:["source.ruby constant.other.symbol > punctuation"],settings:{foreground:"inherit"}},{name:"Source Python Keyword Operator Logical Python",scope:["source.python keyword.operator.logical.python"],settings:{foreground:"#C678DD"}},{name:"Source Python Variable Parameter",scope:["source.python variable.parameter"],settings:{foreground:"#D19A66"}},{name:"Meta Attribute Rust",scope:["meta.attribute.rust"],settings:{foreground:"#BCC199"}},{name:"Storage Modifier Lifetime Rust,entity Name Lifetime Rust",scope:["storage.modifier.lifetime.rust","entity.name.lifetime.rust"],settings:{foreground:"#33E8EC"}},{name:"Keyword Unsafe Rust",scope:["keyword.unsafe.rust"],settings:{foreground:"#CC6B73"}},{name:"customrule",scope:"customrule",settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] Support Type Property Name",scope:"support.type.property-name",settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] Punctuation for Quoted String",scope:"string.quoted.double punctuation",settings:{foreground:"#98C379"}},{name:"[VSCODE-CUSTOM] Support Constant",scope:"support.constant",settings:{foreground:"#D19A66"}},{name:"[VSCODE-CUSTOM] JSON Property Name",scope:"support.type.property-name.json",settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] JSON Punctuation for Property Name",scope:"support.type.property-name.json punctuation",settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] JS/TS Punctuation for key-value",scope:["punctuation.separator.key-value.ts","punctuation.separator.key-value.js","punctuation.separator.key-value.tsx"],settings:{foreground:"#56B6C2"}},{name:"[VSCODE-CUSTOM] JS/TS Embedded Operator",scope:["source.js.embedded.html keyword.operator","source.ts.embedded.html keyword.operator"],settings:{foreground:"#56B6C2"}},{name:"[VSCODE-CUSTOM] JS/TS Variable Other Readwrite",scope:["variable.other.readwrite.js","variable.other.readwrite.ts","variable.other.readwrite.tsx"],settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] JS/TS Support Variable Dom",scope:["support.variable.dom.js","support.variable.dom.ts"],settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] JS/TS Support Variable Property Dom",scope:["support.variable.property.dom.js","support.variable.property.dom.ts"],settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] JS/TS Interpolation String Punctuation",scope:["meta.template.expression.js punctuation.definition","meta.template.expression.ts punctuation.definition"],settings:{foreground:"#BE5046"}},{name:"[VSCODE-CUSTOM] JS/TS Punctuation Type Parameters",scope:["source.ts punctuation.definition.typeparameters","source.js punctuation.definition.typeparameters","source.tsx punctuation.definition.typeparameters"],settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] JS/TS Definition Block",scope:["source.ts punctuation.definition.block","source.js punctuation.definition.block","source.tsx punctuation.definition.block"],settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] JS/TS Punctuation Separator Comma",scope:["source.ts punctuation.separator.comma","source.js punctuation.separator.comma","source.tsx punctuation.separator.comma"],settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] JS/TS Variable Property",scope:["support.variable.property.js","support.variable.property.ts","support.variable.property.tsx"],settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] JS/TS Default Keyword",scope:["keyword.control.default.js","keyword.control.default.ts","keyword.control.default.tsx"],settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] JS/TS Instanceof Keyword",scope:["keyword.operator.expression.instanceof.js","keyword.operator.expression.instanceof.ts","keyword.operator.expression.instanceof.tsx"],settings:{foreground:"#C678DD"}},{name:"[VSCODE-CUSTOM] JS/TS Of Keyword",scope:["keyword.operator.expression.of.js","keyword.operator.expression.of.ts","keyword.operator.expression.of.tsx"],settings:{foreground:"#C678DD"}},{name:"[VSCODE-CUSTOM] JS/TS Braces/Brackets",scope:["meta.brace.round.js","meta.array-binding-pattern-variable.js","meta.brace.square.js","meta.brace.round.ts","meta.array-binding-pattern-variable.ts","meta.brace.square.ts","meta.brace.round.tsx","meta.array-binding-pattern-variable.tsx","meta.brace.square.tsx"],settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] JS/TS Punctuation Accessor",scope:["source.js punctuation.accessor","source.ts punctuation.accessor","source.tsx punctuation.accessor"],settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] JS/TS Punctuation Terminator Statement",scope:["punctuation.terminator.statement.js","punctuation.terminator.statement.ts","punctuation.terminator.statement.tsx"],settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] JS/TS Array variables",scope:["meta.array-binding-pattern-variable.js variable.other.readwrite.js","meta.array-binding-pattern-variable.ts variable.other.readwrite.ts","meta.array-binding-pattern-variable.tsx variable.other.readwrite.tsx"],settings:{foreground:"#D19A66"}},{name:"[VSCODE-CUSTOM] JS/TS Support Variables",scope:["source.js support.variable","source.ts support.variable","source.tsx support.variable"],settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] JS/TS Support Variables",scope:["variable.other.constant.property.js","variable.other.constant.property.ts","variable.other.constant.property.tsx"],settings:{foreground:"#D19A66"}},{name:"[VSCODE-CUSTOM] JS/TS Keyword New",scope:["keyword.operator.new.ts","keyword.operator.new.j","keyword.operator.new.tsx"],settings:{foreground:"#C678DD"}},{name:"[VSCODE-CUSTOM] TS Keyword Operator",scope:["source.ts keyword.operator","source.tsx keyword.operator"],settings:{foreground:"#56B6C2"}},{name:"[VSCODE-CUSTOM] JS/TS Punctuation Parameter Separator",scope:["punctuation.separator.parameter.js","punctuation.separator.parameter.ts","punctuation.separator.parameter.tsx "],settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] JS/TS Import",scope:["constant.language.import-export-all.js","constant.language.import-export-all.ts"],settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] JSX/TSX Import",scope:["constant.language.import-export-all.jsx","constant.language.import-export-all.tsx"],settings:{foreground:"#56B6C2"}},{name:"[VSCODE-CUSTOM] JS/TS Keyword Control As",scope:["keyword.control.as.js","keyword.control.as.ts","keyword.control.as.jsx","keyword.control.as.tsx"],settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] JS/TS Variable Alias",scope:["variable.other.readwrite.alias.js","variable.other.readwrite.alias.ts","variable.other.readwrite.alias.jsx","variable.other.readwrite.alias.tsx"],settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] JS/TS Constants",scope:["variable.other.constant.js","variable.other.constant.ts","variable.other.constant.jsx","variable.other.constant.tsx"],settings:{foreground:"#D19A66"}},{name:"[VSCODE-CUSTOM] JS/TS Export Variable",scope:["meta.export.default.js variable.other.readwrite.js","meta.export.default.ts variable.other.readwrite.ts"],settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] JS/TS Template Strings Punctuation Accessor",scope:["source.js meta.template.expression.js punctuation.accessor","source.ts meta.template.expression.ts punctuation.accessor","source.tsx meta.template.expression.tsx punctuation.accessor"],settings:{foreground:"#98C379"}},{name:"[VSCODE-CUSTOM] JS/TS Import equals",scope:["source.js meta.import-equals.external.js keyword.operator","source.jsx meta.import-equals.external.jsx keyword.operator","source.ts meta.import-equals.external.ts keyword.operator","source.tsx meta.import-equals.external.tsx keyword.operator"],settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] JS/TS Type Module",scope:"entity.name.type.module.js,entity.name.type.module.ts,entity.name.type.module.jsx,entity.name.type.module.tsx",settings:{foreground:"#98C379"}},{name:"[VSCODE-CUSTOM] JS/TS Meta Class",scope:"meta.class.js,meta.class.ts,meta.class.jsx,meta.class.tsx",settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] JS/TS Property Definition Variable",scope:["meta.definition.property.js variable","meta.definition.property.ts variable","meta.definition.property.jsx variable","meta.definition.property.tsx variable"],settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] JS/TS Meta Type Parameters Type",scope:["meta.type.parameters.js support.type","meta.type.parameters.jsx support.type","meta.type.parameters.ts support.type","meta.type.parameters.tsx support.type"],settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] JS/TS Meta Tag Keyword Operator",scope:["source.js meta.tag.js keyword.operator","source.jsx meta.tag.jsx keyword.operator","source.ts meta.tag.ts keyword.operator","source.tsx meta.tag.tsx keyword.operator"],settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] JS/TS Meta Tag Punctuation",scope:["meta.tag.js punctuation.section.embedded","meta.tag.jsx punctuation.section.embedded","meta.tag.ts punctuation.section.embedded","meta.tag.tsx punctuation.section.embedded"],settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] JS/TS Meta Array Literal Variable",scope:["meta.array.literal.js variable","meta.array.literal.jsx variable","meta.array.literal.ts variable","meta.array.literal.tsx variable"],settings:{foreground:"#E5C07B"}},{name:"[VSCODE-CUSTOM] JS/TS Module Exports",scope:["support.type.object.module.js","support.type.object.module.jsx","support.type.object.module.ts","support.type.object.module.tsx"],settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] JSON Constants",scope:["constant.language.json"],settings:{foreground:"#56B6C2"}},{name:"[VSCODE-CUSTOM] JS/TS Object Constants",scope:["variable.other.constant.object.js","variable.other.constant.object.jsx","variable.other.constant.object.ts","variable.other.constant.object.tsx"],settings:{foreground:"#D19A66"}},{name:"[VSCODE-CUSTOM] JS/TS Properties Keyword",scope:["storage.type.property.js","storage.type.property.jsx","storage.type.property.ts","storage.type.property.tsx"],settings:{foreground:"#56B6C2"}},{name:"[VSCODE-CUSTOM] JS/TS Single Quote Inside Templated String",scope:["meta.template.expression.js string.quoted punctuation.definition","meta.template.expression.jsx string.quoted punctuation.definition","meta.template.expression.ts string.quoted punctuation.definition","meta.template.expression.tsx string.quoted punctuation.definition"],settings:{foreground:"#98C379"}},{name:"[VSCODE-CUSTOM] JS/TS Backtick inside Templated String",scope:["meta.template.expression.js string.template punctuation.definition.string.template","meta.template.expression.jsx string.template punctuation.definition.string.template","meta.template.expression.ts string.template punctuation.definition.string.template","meta.template.expression.tsx string.template punctuation.definition.string.template"],settings:{foreground:"#98C379"}},{name:"[VSCODE-CUSTOM] JS/TS In Keyword for Loops",scope:["keyword.operator.expression.in.js","keyword.operator.expression.in.jsx","keyword.operator.expression.in.ts","keyword.operator.expression.in.tsx"],settings:{foreground:"#C678DD"}},{name:"[VSCODE-CUSTOM] Python Constants Other",scope:"source.python constant.other",settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] Python Constants",scope:"source.python constant",settings:{foreground:"#D19A66"}},{name:"[VSCODE-CUSTOM] Python Placeholder Character",scope:"constant.character.format.placeholder.other.python storage",settings:{foreground:"#D19A66"}},{name:"[VSCODE-CUSTOM] Python Magic",scope:"support.variable.magic.python",settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] Python Meta Function Parameters",scope:"meta.function.parameters.python",settings:{foreground:"#D19A66"}},{name:"[VSCODE-CUSTOM] Python Function Separator Annotation",scope:"punctuation.separator.annotation.python",settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] Python Function Separator Punctuation",scope:"punctuation.separator.parameters.python",settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] CSharp Fields",scope:"entity.name.variable.field.cs",settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] CSharp Keyword Operators",scope:"source.cs keyword.operator",settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] CSharp Variables",scope:"variable.other.readwrite.cs",settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] CSharp Variables Other",scope:"variable.other.object.cs",settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] CSharp Property Other",scope:"variable.other.object.property.cs",settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] CSharp Property",scope:"entity.name.variable.property.cs",settings:{foreground:"#61AFEF"}},{name:"[VSCODE-CUSTOM] CSharp Storage Type",scope:"storage.type.cs",settings:{foreground:"#E5C07B"}},{name:"[VSCODE-CUSTOM] Rust Unsafe Keyword",scope:"keyword.other.unsafe.rust",settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] Markdown Raw Block",scope:"markup.raw.block.markdown",settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] Shell Variables Punctuation Definition",scope:"punctuation.definition.variable.shell",settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] Css Support Constant Value",scope:"support.constant.property-value.css",settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] Css Punctuation Definition Constant",scope:"punctuation.definition.constant.css",settings:{foreground:"#D19A66"}},{name:"[VSCODE-CUSTOM] Sass Punctuation for key-value",scope:"punctuation.separator.key-value.scss",settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] Sass Punctuation for constants",scope:"punctuation.definition.constant.scss",settings:{foreground:"#D19A66"}},{name:"[VSCODE-CUSTOM] Sass Punctuation for key-value",scope:"meta.property-list.scss punctuation.separator.key-value.scss",settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] Java Storage Type Primitive Array",scope:"storage.type.primitive.array.java",settings:{foreground:"#E5C07B"}},{name:"[VSCODE-CUSTOM] Markdown headings",scope:"entity.name.section.markdown",settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] Markdown heading Punctuation Definition",scope:"punctuation.definition.heading.markdown",settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] Markdown heading setext",scope:"markup.heading.setext",settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] Markdown Punctuation Definition Bold",scope:"punctuation.definition.bold.markdown",settings:{foreground:"#D19A66"}},{name:"[VSCODE-CUSTOM] Markdown Inline Raw",scope:"markup.inline.raw.markdown",settings:{foreground:"#98C379"}},{name:"[VSCODE-CUSTOM] Markdown List Punctuation Definition",scope:"beginning.punctuation.definition.list.markdown",settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] Markdown Quote",scope:"markup.quote.markdown",settings:{foreground:"#5C6370",fontStyle:"italic"}},{name:"[VSCODE-CUSTOM] Markdown Punctuation Definition String",scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","punctuation.definition.metadata.markdown"],settings:{foreground:"#ABB2BF"}},{name:"[VSCODE-CUSTOM] Markdown Punctuation Definition Link",scope:"punctuation.definition.metadata.markdown",settings:{foreground:"#C678DD"}},{name:"[VSCODE-CUSTOM] Markdown Underline Link/Image",scope:["markup.underline.link.markdown","markup.underline.link.image.markdown"],settings:{foreground:"#C678DD"}},{name:"[VSCODE-CUSTOM] Markdown Link Title/Description",scope:["string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:"#61AFEF"}},{name:"[VSCODE-CUSTOM] Ruby Punctuation Separator Variable",scope:"punctuation.separator.variable.ruby",settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] Ruby Other Constant Variable",scope:"variable.other.constant.ruby",settings:{foreground:"#D19A66"}},{name:"[VSCODE-CUSTOM] Ruby Keyword Operator Other",scope:"keyword.operator.other.ruby",settings:{foreground:"#98C379"}},{name:"[VSCODE-CUSTOM] PHP Punctuation Variable Definition",scope:"punctuation.definition.variable.php",settings:{foreground:"#E06C75"}},{name:"[VSCODE-CUSTOM] PHP Meta Class",scope:"meta.class.php",settings:{foreground:"#ABB2BF"}},{scope:"token.info-token",settings:{foreground:"#6796e6"}},{scope:"token.warn-token",settings:{foreground:"#cd9731"}},{scope:"token.error-token",settings:{foreground:"#f44747"}},{scope:"token.debug-token",settings:{foreground:"#b267e6"}}]},be={"activityBarBadge.background":"#007acc","editor.background":"#ffffff","editor.foreground":"#040404","editor.inactiveSelectionBackground":"#e5ebf1","editor.selectionHighlightBackground":"#add6ff4d","editorIndentGuide.activeBackground":"#939393","editorIndentGuide.background":"#d3d3d3","editorSuggestWidget.background":"#f3f3f3","input.placeholderForeground":"#adadad","list.hoverBackground":"#e8e8e8","activityBar.background":"#2c2c2c","activityBar.dropBackground":"#ffffff1f","activityBar.foreground":"#ffffff","activityBarBadge.foreground":"#ffffff","badge.background":"#bebebe","badge.foreground":"#ffffff","button.background":"#007acc","button.foreground":"#ffffff","button.hoverBackground":"#0062a3","debugExceptionWidget.background":"#f1dfde","debugExceptionWidget.border":"#a31515","debugToolBar.background":"#f3f3f3",descriptionForeground:"#6c6c6cb3","diffEditor.insertedTextBackground":"#9bb95533","diffEditor.removedTextBackground":"#ff000033","dropdown.background":"#ffffff","dropdown.border":"#cecece","editor.findMatchBackground":"#a8ac94","editor.findMatchHighlightBackground":"#ea5c0055","editor.findRangeHighlightBackground":"#b4b4b44d","editor.hoverHighlightBackground":"#add6ff26","editor.lineHighlightBackground":"#E6E6E6","editor.lineHighlightBorder":"#E6E6E6","editor.selectionBackground":"#E6E6E6","editor.rangeHighlightBackground":"#fdff0033","editor.wordHighlightBackground":"#57575740","editor.wordHighlightStrongBackground":"#0e639c40","editorActiveLineNumber.foreground":"#0b216f","editorBracketMatch.background":"#0064001a","editorBracketMatch.border":"#b9b9b9","editorCodeLens.foreground":"#999999","editorCursor.foreground":"#040404","editorError.foreground":"#d60a0a","editorGroup.border":"#e7e7e7","editorGroup.dropBackground":"#3399ff2e","editorGroupHeader.noTabsBackground":"#ffffff","editorGroupHeader.tabsBackground":"#ffffff","editorGutter.addedBackground":"#81b88b","editorGutter.background":"#ffffff","editorGutter.deletedBackground":"#ca4b51","editorGutter.modifiedBackground":"#66afe0","editorHint.foreground":"#6c6c6c","editorHoverWidget.background":"#efeff2","editorHoverWidget.border":"#c8c8c8","editorInfo.foreground":"#008000","editorLineNumber.activeForeground":"#757575","editorLineNumber.foreground":"#e6e6e6","editorLink.activeForeground":"#0971f1","editorMarkerNavigation.background":"#ffffff","editorMarkerNavigationError.background":"#d60a0a","editorMarkerNavigationInfo.background":"#008000","editorMarkerNavigationWarning.background":"#117711","editorOverviewRuler.addedForeground":"#007acc99","editorOverviewRuler.border":"#7f7f7f4d","editorOverviewRuler.bracketMatchForeground":"#a0a0a0","editorOverviewRuler.commonContentForeground":"#60606066","editorOverviewRuler.currentContentForeground":"#40c8ae80","editorOverviewRuler.deletedForeground":"#007acc99","editorOverviewRuler.errorForeground":"#ff1212b3","editorOverviewRuler.findMatchForeground":"#f6b94db3","editorOverviewRuler.incomingContentForeground":"#40a6ff80","editorOverviewRuler.infoForeground":"#121288b3","editorOverviewRuler.modifiedForeground":"#007acc99","editorOverviewRuler.rangeHighlightForeground":"#007acc99","editorOverviewRuler.selectionHighlightForeground":"#a0a0a0cc","editorOverviewRuler.warningForeground":"#128812b3","editorOverviewRuler.wordHighlightForeground":"#a0a0a0cc","editorOverviewRuler.wordHighlightStrongForeground":"#c0a0c0cc","editorPane.background":"#ffffff","editorRuler.foreground":"#d3d3d3","editorSuggestWidget.border":"#c8c8c8","editorSuggestWidget.foreground":"#040404","editorSuggestWidget.highlightForeground":"#007acc","editorSuggestWidget.selectedBackground":"#dcebfc","editorUnnecessaryCode.opacity":"#04040477","editorWarning.foreground":"#117711","editorWhitespace.foreground":"#33333333","editorWidget.background":"#efeff2","editorWidget.border":"#c8c8c8",errorForeground:"#a1260d","extensionButton.prominentBackground":"#327e36","extensionButton.prominentForeground":"#ffffff","extensionButton.prominentHoverBackground":"#28632b",focusBorder:"#007acc66",foreground:"#6c6c6c","gitDecoration.addedResourceForeground":"#587c0c","gitDecoration.conflictingResourceForeground":"#6c6cc4","gitDecoration.deletedResourceForeground":"#ad0707","gitDecoration.ignoredResourceForeground":"#8e8e90","gitDecoration.modifiedResourceForeground":"#a76e12","gitDecoration.submoduleResourceForeground":"#1258a7","gitDecoration.untrackedResourceForeground":"#019001","input.background":"#E6E6E6","input.foreground":"#6c6c6c","inputOption.activeBorder":"#007acc","inputValidation.errorBackground":"#f2dede","inputValidation.errorBorder":"#be1100","inputValidation.infoBackground":"#d6ecf2","inputValidation.infoBorder":"#007acc","inputValidation.warningBackground":"#f6f5d2","inputValidation.warningBorder":"#b89500","list.activeSelectionBackground":"#3399ff","list.activeSelectionForeground":"#ffffff","list.dropBackground":"#dcebfc","list.errorForeground":"#d60a0a","list.focusBackground":"#dcebfc","list.highlightForeground":"#007acc","list.inactiveFocusBackground":"#d8dae6","list.inactiveSelectionBackground":"#cccedb","list.invalidItemForeground":"#b89500","list.warningForeground":"#117711","merge.commonContentBackground":"#60606029","merge.commonHeaderBackground":"#60606066","merge.currentContentBackground":"#40c8ae33","merge.currentHeaderBackground":"#40c8ae80","merge.incomingContentBackground":"#40a6ff33","merge.incomingHeaderBackground":"#40a6ff80","notificationCenterHeader.background":"#e2e2e7","notificationLink.foreground":"#4080d0","notifications.background":"#efeff2","notifications.border":"#e2e2e7","panel.background":"#ffffff","panel.border":"#80808059","panel.dropBackground":"#3399ff2e","panelTitle.activeBorder":"#80808059","panelTitle.activeForeground":"#424242","panelTitle.inactiveForeground":"#424242bf","peekView.border":"#007acc","peekViewEditor.background":"#f2f8fc","peekViewEditor.matchHighlightBackground":"#f5d802de","peekViewEditorGutter.background":"#f2f8fc","peekViewResult.background":"#f3f3f3","peekViewResult.fileForeground":"#1e1e1e","peekViewResult.lineForeground":"#646465","peekViewResult.matchHighlightBackground":"#ea5c004d","peekViewResult.selectionBackground":"#3399ff33","peekViewResult.selectionForeground":"#6c6c6c","peekViewTitle.background":"#ffffff","peekViewTitleDescription.foreground":"#6c6c6cb3","peekViewTitleLabel.foreground":"#333333","pickerGroup.border":"#cccedb","pickerGroup.foreground":"#007acc99","progressBar.background":"#0e70c0","scrollbar.shadow":"#dddddd","scrollbarSlider.activeBackground":"#04040499","scrollbarSlider.background":"#64646466","scrollbarSlider.hoverBackground":"#646464b3","settings.modifiedItemForeground":"#019001","separator.background":"#dddddd","separator.foreground":"#757575","sideBar.background":"#ffffff","sideBar.dropBackground":"#e6e6e6","sideBar.foreground":"#151515","sideBar.border":"#e6e6e6","sideBarSectionHeader.background":"#80808033","sideBarTitle.foreground":"#6f6f6f","statusBar.background":"#ffffff","statusBar.debuggingBackground":"#cc6633","statusBar.debuggingForeground":"#ffffff","statusBar.foreground":"#ffffff","statusBar.noFolderBackground":"#68217a","statusBar.noFolderForeground":"#ffffff","statusBarItem.activeBackground":"#ffffff2e","statusBarItem.hoverBackground":"#ffffff1f","statusBarItem.prominentBackground":"#388a34","statusBarItem.prominentHoverBackground":"#369432","tab.activeBackground":"#ffffff","tab.activeForeground":"#333333","tab.hoverForeground":"#040404","tab.border":"#e6e6e6","tab.activeBorder":"#6CC7F6","tab.inactiveBackground":"#ffffff","tab.inactiveForeground":"#999999","tab.unfocusedActiveForeground":"#333333b3","tab.unfocusedInactiveForeground":"#33333340","terminal.ansiBlack":"#040404","terminal.ansiBlue":"#0451a5","terminal.ansiBrightBlack":"#666666","terminal.ansiBrightBlue":"#0451a5","terminal.ansiBrightCyan":"#0598bc","terminal.ansiBrightGreen":"#14ce14","terminal.ansiBrightMagenta":"#bc05bc","terminal.ansiBrightRed":"#cd3131","terminal.ansiBrightWhite":"#a5a5a5","terminal.ansiBrightYellow":"#b5ba00","terminal.ansiCyan":"#0598bc","terminal.ansiGreen":"#00bc00","terminal.ansiMagenta":"#bc05bc","terminal.ansiRed":"#cd3131","terminal.ansiWhite":"#555555","terminal.ansiYellow":"#949800","terminal.foreground":"#333333","terminal.selectionBackground":"#04040440","textBlockQuote.background":"#7f7f7f1a","textBlockQuote.border":"#007acc80","textCodeBlock.background":"#dcdcdc66","textLink.activeForeground":"#4080d0","textLink.foreground":"#4080d0","textPreformat.foreground":"#a31515","textSeparator.foreground":"#0404042e","titleBar.activeBackground":"#dddddd","titleBar.activeForeground":"#333333","titleBar.inactiveBackground":"#dddddd99","titleBar.inactiveForeground":"#33333399","widget.shadow":"#a8a8a8"},ye=function(e){var r={editor:{},button:{},input:{},inputOption:{},list:{},sideBar:{},activityBar:{},titleBar:{},quickInput:{},editorHoverWidget:{},menuList:{},dialog:{},tab:{}},o=e.type||ke(e),t=me(e.colors||{});r=f.default(r,t);var n=["dark","lc"].includes(o)?me(ve.colors):me(be);r.foreground=r.foreground||n.foreground,r.errorForeground=r.errorForeground||n.errorForeground,r.sideBar={background:r.sideBar.background||r.editor.background||n.sideBar.background,foreground:r.sideBar.foreground||r.editor.foreground||n.sideBar.foreground,border:r.sideBar.border||r.editor.lineHighlightBackground||n.sideBar.border},r.input={background:r.input.background||r.sideBar.border,foreground:r.input.foreground||r.sideBar.foreground,border:r.input.border||r.sideBar.border,placeholderForeground:r.input.placeholderForeground||n.input.placeholderForeground},r.quickInput={background:r.quickInput.background||r.sideBar.background,foreground:r.quickInput.foreground||r.sideBar.foreground},r.editorHoverWidget={background:r.editorHoverWidget.background||r.sideBar.background,foreground:r.editorHoverWidget.foreground||r.sideBar.foreground,border:r.editorHoverWidget.border||r.sideBar.border},r.inputOption.activeBorder=r.inputOption.activeBorder||r.input.placeholderForeground,r.button={background:r.button.background||n.button.background,foreground:r.button.foreground||n.button.foreground};var i="dark"===o?Se:Ce,a=Be(r.input.placeholderForeground,r.sideBar.background,o);r.sideBar.border===r.sideBar.background&&(r.sideBar.border=i(r.sideBar.background,.25)),r.sideBar.hoverBackground===r.sideBar.background&&(r.sideBar.hoverBackground=i(r.sideBar.background,.25)),r.list.hoverBackground===r.sideBar.background&&(r.list.hoverBackground=r.list.inactiveSelectionBackground&&r.list.hoverBackground!==r.list.inactiveSelectionBackground?r.list.inactiveSelectionBackground:i(r.sideBar.background,.25)),r.list.foreground=r.list.foreground||a,r.list.hoverForeground=r.list.hoverForeground||r.sideBar.foreground,r.list.hoverBackground=r.list.hoverBackground||r.sideBar.hoverBackground,r.titleBar.activeBackground=r.titleBar.activeBackground||r.sideBar.background,r.titleBar.activeForeground=r.titleBar.activeForeground||r.sideBar.foreground,r.titleBar.border=r.titleBar.border||r.sideBar.border,(r=f.default(r,{mutedForeground:a,activityBar:{selectedForeground:r.sideBar.foreground,inactiveForeground:a,hoverBackground:r.sideBar.border},avatar:{border:r.sideBar.border},sideBar:{hoverBackground:r.sideBar.border},button:{},secondaryButton:{background:r.input.background,foreground:r.input.foreground},dangerButton:{background:he.red[300],foreground:"#FFFFFF"},icon:{foreground:r.foreground},dialog:{background:r.quickInput.background,foreground:r.quickInput.foreground,border:r.sideBar.border},menuList:{background:r.sideBar.background,border:r.sideBar.border,hoverBackground:r.sideBar.border,hoverForeground:he.white}})).activityBar.selectedForeground=Be(r.activityBar.selectedForeground,r.activityBar.inactiveForeground,o,"icon");var s={};return Object.keys(r).forEach((function(e){"object"==typeof r[e]?Object.keys(r[e]).forEach((function(o){s[e+"."+o]=r[e][o]})):s[""+e]=r[e]})),s},ke=function(e){return e.name&&e.name.toLowerCase().includes("light")||p.default(e.colors["editor.background"]).isLight()?"light":"dark"},Se=function(e,r){return p.default(e).lighten(r).hex()},Ce=function(e,r){return p.default(e).darken(r).hex()},Be=function e(r,o,t,n){void 0===n&&(n="text");var i={text:4.5,icon:1.6}[n];return p.default(r).contrast(p.default(o))>i||"#FFFFFF"===r||"#000000"===r?r:e(("dark"===t?Se:Ce)(r,.1),o,t,n)};function we(e){return p.default(e).hex()}var Oe=function(e){var r=(void 0===e?{}:e).transformTheme,o=void 0===r?function(e){return e}:r;return _({name:"vscode.themes",dependencies:["core.themes"]},(function(e){var r=e.editor.defineTheme;e.editor.defineTheme=function(e,t){if("$schema"in t&&"vscode://schemas/color-theme"===t.$schema){var n=function(e){var r,o,t,n=Object.fromEntries(Object.entries(null!==(r=e.colors)&&void 0!==r?r:{}).map((function(e){var r=e[0],o=e[1];try{return 2===r.split(".").length?[r,we(o)]:null}catch(e){return null}})).filter(Boolean)),i=[{token:"unmatched",foreground:null!==(o=null!==(t=n["editor.foreground"])&&void 0!==t?t:n.foreground)&&void 0!==o?o:"#bbbbbb"}],a={inherit:!1,base:"vs-dark",colors:n,rules:i,encodedTokensColors:[]};return e.tokenColors.map((function(e){if("string"==typeof e.scope){var r=e.scope.split(/[, ]/g);return r.length>1?(e.scope=r,void o()):void i.push(Object.assign({},Object.fromEntries(Object.entries(e.settings).map((function(e){var r=e[0],o=e[1];return[r,["foreground","background"].includes(r)?we(o):o]}))),{token:e.scope}))}function o(){e.scope.map((function(r){i.push(Object.assign({},Object.fromEntries(Object.entries(e.settings).map((function(e){var r=e[0],o=e[1];return[r,["foreground","background"].includes(r)?we(o):o]}))),{token:r}))}))}e.scope&&o()})),a}(t),i=ye(n);r(e,null==o?void 0:o(Object.assign({},n,{colors:i})))}else r(e,t)}}))},De=function(e,r){for(var o="",t=r[0].length-1;t>=0;t-=1){var n=r[0][t];if("."===n)break;o=n+o}for(var i=r.length-1;i>=0;i-=1){for(var a=r[i],s=a.length-1;s>=0;s-=1)if("."===a[s]){var u=a.slice(0,s);if(e._themeService.getColorTheme()._tokenTheme._match(u+"."+o)._foreground>1)return u}for(var c=a.length-1;c>=0;c-=1)if("."===a[c]){var d=a.slice(0,c);if(e._themeService.getColorTheme()._tokenTheme._match(d)._foreground>1)return d}}return"unmatched"},Ee=function(){function e(e){this._ruleStack=e}var r=e.prototype;return r.clone=function(){return new e(this._ruleStack)},r.equals=function(r){return!!(r&&r instanceof e&&r===this&&r._ruleStack===this._ruleStack)},v(e,[{key:"ruleStack",get:function(){return this._ruleStack}}]),e}(),je={"source.graphql":{format:"url",responseFormat:"json",scopeName:"source.graphql",url:"https://raw.githubusercontent.com/codesandbox/codesandbox-client/master/standalone-packages/vscode-extensions/out/extensions/kumar-harsh.graphql-for-vscode-1.13.0/syntaxes/graphql.json"},"source.json.comments":{format:"url",scopeName:"source.json.comments",responseFormat:"json",url:"https://raw.githubusercontent.com/codesandbox/codesandbox-client/master/standalone-packages/vscode-extensions/out/extensions/json/syntaxes/JSONC.tmLanguage.json"},"source.tsx":{format:"url",scopeName:"source.tsx",responseFormat:"plist",url:"https://raw.githubusercontent.com/microsoft/TypeScript-TmLanguage/master/TypeScriptReact.tmLanguage"},"source.css":{format:"url",scopeName:"source.css",responseFormat:"json",url:"https://raw.githubusercontent.com/codesandbox/codesandbox-client/master/standalone-packages/vscode-extensions/out/extensions/css/syntaxes/css.tmLanguage.json"},"text.html.basic":{format:"url",scopeName:"text.html.basic",responseFormat:"json",url:"https://raw.githubusercontent.com/codesandbox/codesandbox-client/master/standalone-packages/vscode-extensions/out/extensions/html/syntaxes/html.tmLanguage.json"}},xe={graphql:"source.graphql",json:"source.json.comments",typescript:"source.tsx",javascript:"source.tsx",css:"source.css",html:"text.html.basic"},Me=function(){return _({name:"textmate",dependencies:["core.editors"]},(function(e){try{return Promise.resolve(u.loadWASM("https://www.unpkg.com/onigasm/lib/onigasm.wasm")).then((function(){var r=Object.assign({},je),o={},t=new c.Registry({getGrammarDefinition:function(e){try{var o=r[e];if(!o)return Promise.resolve({format:"json",content:"{}"});if("url"===o.format){var t=o.responseFormat;return Promise.resolve(fetch(o.url)).then((function(e){return Promise.resolve(e.text()).then((function(e){return{format:t,content:e}}))}))}return Promise.resolve(o)}catch(e){return Promise.reject(e)}}});e.languages.registerSyntax=function(n,i){return function(n,i,a){try{return void 0===i&&(i=xe[n]),void 0===a&&(a=je[i]),r[i]=a=a.format?a:je[i],o[n]=i,Promise.resolve(t.loadGrammar(i)).then((function(r){e.languages.setTokensProvider(n,{getInitialState:function(){return new Ee(c.INITIAL)},tokenize:function(o,t){var n=t.ruleStack;try{var i=r.tokenizeLine(o,t.ruleStack),a=e.editor.getFocusedEditor();return{endState:new Ee(i.ruleStack),tokens:i.tokens.map((function(e){return Object.assign({},e,{scopes:a?De(a,e.scopes):e.scopes.join(" ")})}))}}catch(e){return{endState:new Ee(n),tokens:[]}}}})}))}catch(e){return Promise.reject(e)}}(n,null==i?void 0:i.scopeName,i)};var n=e.languages.register;e.languages.register=function(r){var o,t;xe[r.id]&&r.loader&&delete r.loader,n(r),"json"===r.id&&(null===(o=e.languages.json)||void 0===o||null===(t=o.jsonDefaults)||void 0===t||t.setModeConfiguration({tokens:!1})),xe[r.id]&&e.languages.registerSyntax(r.id)}}))}catch(e){return Promise.reject(e)}}))},Te={prettier:ge,graphql:fe,typings:pe,"vscode-themes":Oe,textmate:Me},Fe={__proto__:null,pluginMap:Te,prettier:ge,graphql:fe,typings:pe,vscodeThemes:Oe,textmate:Me},Pe=n.createContext((function(e){return Re(e)}),void 0,"Monaco"),Ve=Pe[0],_e=Pe[3];function Ae(){return g.default.useContext(_e)}var Ge=!1,Re=function(e){void 0===e&&(e={});var r=e.themes,o=e.onThemeChange,t=void 0===o?function(){}:o,n=e.onLoad,i=e.defaultEditorOptions,a=void 0===i?{automaticLayout:!0,minimap:{enabled:!1}}:i,s=e.theme,u=void 0===s?"ayu-light":s,c=e.plugins,d=void 0===c?[]:c,l=e.languages,f=void 0===l?["javascript","typescript","html","css","json"]:l,p=y(e,["themes","onThemeChange","onLoad","defaultEditorOptions","theme","plugins","languages"]),m=Ae(),h=g.default.useState(void 0===m?null:m.monaco),v=h[0],b=h[1],k=Ie(v),S=k[0],C=k[1];return S.current=(null==m?void 0:m.monaco)||v,g.default.useEffect((function(){var e,r=function(r,o,t){try{var i;return Promise.resolve((i=r.plugin).install.apply(i,o.map((function(e){return"string"==typeof e||Array.isArray(e)&&2===e.length?Te[Array.isArray(e)?e[0]:e]?Te[Array.isArray(e)?e[0]:e](Array.isArray(e)?e[1]:{}):void 0:e})).filter(Boolean).concat(t.map((function(e){return"string"==typeof e?se[e]?se[e]:void 0:e})).filter(Boolean)))).then((function(o){function t(t){e=M([o,t].filter(Boolean)),window.monaco=r}return r.editor.defineTheme("ayu-light",ce),b(r),n?Promise.resolve(n(r)).then(t):t(null)}))}catch(e){return Promise.reject(e)}};if(void 0!==m||!Ge){if(!S.current&&window.monaco)return r(window.monaco,d,f),function(){var r,o;null===(r=e)||void 0===r||null===(o=r.dispose)||void 0===o||o.call(r)};if(void 0===m&&!S.current){Ge=!0;var o=ee(null!=p?p:{});return o.then((function(e){try{return Promise.resolve(r(e,d,f)).then((function(){return e}))}catch(e){return Promise.reject(e)}})).catch((function(e){return console.error("An error occurred during initialization of Monaco:",e)})),function(){var r,t,n;null===(r=e)||void 0===r||null===(t=r.dispose)||void 0===t||t.call(r),null===(n=o.cancel)||void 0===n||n.call(o)}}}}),[]),C((function(e){if(r)return e.editor.defineThemes(r),function(){}}),[r]),C((function(e){if(t){var r=e.editor.onDidChangeTheme((function(r){t(r,e)}));return function(){var e;null==r||null===(e=r.dispose)||void 0===e||e.call(r)}}}),[t]),C((function(e){if("function"==typeof u){var r=u();r.then?r.then((function(r){e.editor.setTheme(r)})):e.editor.setTheme(r)}else u&&e.editor.setTheme(u)}),[u]),{monaco:S.current,useMonacoEffect:C,defaultEditorOptions:a,isLoading:Boolean(S.current)}};function Ie(e){var r=g.default.useRef(e);return[r,function(e,o){g.default.useEffect((function(){if(r.current)return e(r.current)}),[r.current].concat(o))}]}var Ue=function(e){var r=e.options,o=void 0===r?{}:r,t=e.onEditorDidMount,n=void 0===t?P:t,i=e.model,a=e.monaco,s=e.overrideServices,u=e.onChange,c=void 0===u?P:u,d=Ae(),l=a||(null==d?void 0:d.monaco),f=g.default.useRef(null==d?void 0:d.defaultEditorOptions);f.current=null==d?void 0:d.defaultEditorOptions;var p,m,h=g.default.useState(),v=h[0],b=h[1],y=(p=g.default.useState(),[m=p[0],p[1],function(e,r){g.default.useEffect((function(){if(m)return e(m)}),[m].concat(r))}]),k=y[0],S=y[1],C=y[2];g.default.useRef(k).current=k;var B,w,O=(B=function(e){e!==v&&b(e)},w=g.default.useRef(null),g.default.useRef((function(e){var r;null===(r=w.current)||void 0===r||r.call(w),w.current=e?B(e):null})).current),D=g.default.useRef(null);return g.default.useEffect((function(){if(l&&v&&0===v.getElementsByClassName("monaco-editor").length){var e;for(console.log("[monaco] creating editor",{options:o,container:v});v.firstChild;)v.removeChild(v.firstChild);var r,t=l.editor.create(v,Object.assign({},null!==(e=f.current)&&void 0!==e?e:{},o),"function"==typeof s?s(l):s),i=n(t,l);return i&&Array.isArray(i)&&(r=M(i)),S(t),function(){r&&r.dispose()}}}),[l,v,S]),g.default.useEffect((function(){return function(){var e;k&&(null==k||null===(e=k.dispose)||void 0===e||e.call(k))}}),[]),C((function(e){i&&e.setModel(i)}),[i]),C((function(e){return D.current=e.onDidChangeModelContent((function(r){e&&c(null==e?void 0:e.getValue(),e,r,l)})),function(){D.current&&D.current.dispose()}}),[c]),ue((function(){k&&k.updateOptions(o)}),[o],[k]),{containerRef:O,useEditorEffect:C,editor:k}},Je=function(e){var r,o,t,n,i,a=e.monaco,s=e.contents,u=e.language,c=e.modelOptions,d=void 0===c?{}:c,l=e.onChange,f=void 0===l?P:l,p=e.defaultContents,m=void 0===p?"":p,h=e.path,v=null===(r=Ae())||void 0===r?void 0:r.monaco,b=a||v;h=null!==(o=h)&&void 0!==o?o:"model"+(null!==(t=null==b||null===(n=b.languages.getLanguages().find((function(e){return e.id===u})))||void 0===n||null===(i=n.extensions)||void 0===i?void 0:i[0])&&void 0!==t?t:".js");var y=E(h),k=g.default.useState(),S=k[0],C=k[1],B=null!=s?s:m,w=g.default.useRef(B);return w.current=B,g.default.useEffect((function(){if(b){var e=function(e,r,o,t){var n,i=function(e,r){return null==e?void 0:e.editor.getModel(e.Uri.file(E(r)))}(e,r=E(r));return i?o&&i.pushEditOperations([],[{range:i.getFullModelRange(),text:o}],(function(){return null})):(console.log("[monaco] creating model:",r,{value:o,language:void 0}),null===(n=i=null==e?void 0:e.editor.createModel(o||"",void 0,null==e?void 0:e.Uri.file(r)))||void 0===n||n.updateOptions({tabSize:2,insertSpaces:!0})),i}(b,y,w.current);e&&C(e)}}),[b,y]),g.default.useEffect((function(){if(S){var e=S.onDidChangeContent((function(e){f(S.getValue(),e,S)}));return function(){var r;null==e||null===(r=e.dispose)||void 0===r||r.call(e)}}}),[S,f]),g.default.useEffect((function(){b&&u&&S&&(console.log("[monaco] setting language for "+S.uri.path+": "+u),b.editor.setModelLanguage(S,u))}),[b,S,u]),g.default.useEffect((function(){var e=B;S&&e&&e!==S.getValue()&&S.pushEditOperations([],[{range:S.getFullModelRange(),text:e}],(function(){return null}))}),[S,B]),ue((function(){S&&S.updateOptions(d)}),[d],[S]),S};Object.keys(r).forEach((function(e){"default"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return r[e]}})})),exports.MonacoLoader=re,exports.MonacoProvider=Ve,exports.asDisposable=M,exports.basicLanguagePlugins=se,exports.basicLanguages=ae,exports.compose=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return function(e){for(var o,t=S(r);!(o=t()).done;)(0,o.value)(e)}},exports.createPlugin=_,exports.createRemotePlugin=A,exports.disposeAll=T,exports.endingSlash=j,exports.fixPath=E,exports.knonwLanguageServices=te,exports.knownBasicLanguages=ie,exports.languageServiceAliases=ne,exports.loadMonaco=ee,exports.monacoLoader=oe,exports.noEndingSlash=x,exports.noop=P,exports.parseJSONWithComments=D,exports.plugins=Fe,exports.processDimensions=function(e,r){return{width:F(e),height:F(r)}},exports.processSize=F,exports.useEditor=Ue,exports.useLocalStorage=function(e,r){var t=o.useState((function(){try{var o="undefined"!=typeof window&&window.localStorage.getItem("use-monaco:"+e)||r;return JSON.parse(o)}catch(e){return r}})),n=t[0],i=t[1];return[n,function(r){try{var o=r instanceof Function?r(n):r;i(o),"undefined"!=typeof window&&window.localStorage.setItem("use-monaco:"+e,JSON.stringify(o))}catch(e){console.log(e)}}]},exports.useMonaco=Re,exports.useMonacoContext=Ae,exports.useMonacoEditor=function(e){var r,o;void 0===e&&(e={});var t=e.modelOptions,n=e.path,i=e.defaultContents,a=e.contents,s=e.language,u=e.onEditorDidMount,c=e.options,d=e.overrideServices,l=e.onChange,g=y(e,["modelOptions","path","defaultContents","contents","language","onEditorDidMount","options","overrideServices","onChange"]),f=Re(Object.assign({},g,{languages:(null!==(r=null==g?void 0:g.languages)&&void 0!==r?r:[]).includes(s)?null==g?void 0:g.languages:[].concat(null!==(o=null==g?void 0:g.languages)&&void 0!==o?o:[],[s])})),p=f.monaco,m=f.isLoading,h=Je({path:n,contents:a,defaultContents:i,language:s,modelOptions:t,monaco:p}),v=Ue({model:h,monaco:p,onEditorDidMount:u,onChange:l,overrideServices:d,options:c});return{monaco:p,isLoading:m,model:h,containerRef:v.containerRef,editor:v.editor}},exports.useRefWithEffect=Ie,exports.useTextModel=Je,exports.version="0.0.40",exports.withMonaco=function(e,r){return function(o){var t=b({},o);return g.default.createElement(Ve,e,g.default.createElement(r,t))}};
//# sourceMappingURL=use-monaco.js.map