Files

11 lines
54 KiB
JavaScript
Raw Permalink Normal View History

2025-05-09 16:55:09 +08:00
"use strict";var __getOwnPropNames=Object.getOwnPropertyNames,__commonJS=(g,h)=>function(){return h||(0,g[__getOwnPropNames(g)[0]])((h={exports:{}}).exports,h),h.exports},require_performance=__commonJS({"out-build/vs/base/common/performance.js"(g,h){"use strict";(function(){function S(u){const m=[];typeof u=="number"&&m.push("code/timeOrigin",u);function d(c){m.push(c,Date.now())}function v(){const c=[];for(let o=0;o<m.length;o+=2)c.push({name:m[o],startTime:m[o+1]});return c}return{mark:d,getMarks:v}}function P(){if(typeof performance=="object"&&typeof performance.mark=="function"&&!performance.nodeTiming)return typeof performance.timeOrigin!="number"&&!performance.timing?S():{mark(u){performance.mark(u)},getMarks(){let u=performance.timeOrigin;typeof u!="number"&&(u=performance.timing.navigationStart||performance.timing.redirectStart||performance.timing.fetchStart);const m=[{name:"code/timeOrigin",startTime:Math.round(u)}];for(const d of performance.getEntriesByType("mark"))m.push({name:d.name,startTime:Math.round(u+d.startTime)});return m}};if(typeof process=="object"){const u=Math.round((require.__$__nodeRequire||require)("perf_hooks").performance.timeOrigin);return S(u)}else return console.trace("perf-util loaded in UNKNOWN environment"),S()}function w(u){return u.MonacoPerformanceMarks||(u.MonacoPerformanceMarks=P()),u.MonacoPerformanceMarks}var y;typeof global=="object"?y=global:typeof self=="object"?y=self:y={},typeof define=="function"?define([],function(){return w(y)}):typeof h=="object"&&typeof h.exports=="object"?h.exports=w(y):(console.trace("perf-util defined in UNKNOWN context (neither requirejs or commonjs)"),y.perf=w(y))})()}}),require_bootstrap=__commonJS({"out-build/bootstrap.js"(g,h){"use strict";(function(S,P){typeof g=="object"?h.exports=P():S.MonacoBootstrap=P()})(g,function(){const S=typeof require=="function"?require("module"):void 0,P=typeof require=="function"?require("path"):void 0,w=typeof require=="function"?require("fs"):void 0;Error.stackTraceLimit=100,typeof process<"u"&&!process.env.VSCODE_HANDLES_SIGPIPE&&process.on("SIGPIPE",()=>{console.error(new Error("Unexpected SIGPIPE"))});function y(i){if(!P||!S||typeof process>"u"){console.warn("enableASARSupport() is only available in node.js environments");return}const t=i?P.join(i,"node_modules"):P.join(__dirname,"../node_modules");let e;if(i&&process.platform==="win32"){const a=i.substr(0,1);let l;a.toLowerCase()!==a?l=a.toLowerCase():l=a.toUpperCase(),e=l+t.substr(1)}else e=void 0;const r=`${t}.asar`,s=e?`${e}.asar`:void 0,n=S._resolveLookupPaths;S._resolveLookupPaths=function(a,l){const f=n(a,l);if(Array.isArray(f)){let p=!1;for(let b=0,C=f.length;b<C;b++)if(f[b]===t){p=!0,f.splice(b,0,r);break}else if(f[b]===e){p=!0,f.splice(b,0,s);break}!p&&i&&f.push(r)}return f}}function u(i,t){let e=i.replace(/\\/g,"/");e.length>0&&e.charAt(0)!=="/"&&(e=`/${e}`);let r;return t.isWindows&&e.startsWith("//")?r=encodeURI(`${t.scheme||"file"}:${e}`):r=encodeURI(`${t.scheme||"file"}://${t.fallbackAuthority||""}${e}`),r.replace(/#/g,"%23")}function m(){const i=v();let t={availableLanguages:{}};if(i&&i.env.VSCODE_NLS_CONFIG)try{t=JSON.parse(i.env.VSCODE_NLS_CONFIG)}catch{}if(t._resolvedLanguagePackCoreLocation){const e=Object.create(null);t.loadBundle=function(r,s,n){const a=e[r];if(a){n(void 0,a);return}o(t._resolvedLanguagePackCoreLocation,`${r.replace(/\//g,"!")}.nls.json`).then(function(l){const f=JSON.parse(l);e[r]=f,n(void 0,f)}).catch(l=>{try{t._corruptedFile&&_(t._corruptedFile,"corrupted").catch(function(f){console.error(f)})}finally{n(l,void 0)}})}}return t}function d(){return(typeof self=="object"?self:typeof global=="object"?global:{}).vscode}function v(){const i=d();if(i)return i.process;if(typeof process<"u")return process}function c(){const i=d();if(i)return i.ipcRenderer}async function o(...i){const t=c();if(t)return t.invoke("vscode:readNlsFile",...i);if(w&&P)return(await w.promises.readFile(P.join(...i))).toString();throw new Error("Unsupported operation (read NLS files)")}function _(i,t){const e=c();if(e)return e.invoke("vscode:writeNlsFil
`?t[r-2]==="\r"?`\r
`:`
`:""}else return e?c.substring(1):c})}return{stripComments:d}}typeof define=="function"?define([],function(){return S()}):typeof h=="object"&&typeof h.exports=="object"?h.exports=S():console.trace("strip comments defined in UNKNOWN context (neither requirejs or commonjs)")})()}}),require_languagePacks=__commonJS({"out-build/vs/base/node/languagePacks.js"(g,h){"use strict";(function(){"use strict";function S(P,w,y){function u(e){return new Promise(r=>w.exists(e,r))}function m(e){return new Promise((r,s)=>{const n=new Date;w.utimes(e,n,n,a=>a?s(a):r())})}function d(e){return new Promise((r,s)=>w.mkdir(e,{recursive:!0},n=>n&&n.code!=="EEXIST"?s(n):r(e)))}function v(e){return new Promise((r,s)=>w.rm(e,{recursive:!0,force:!0,maxRetries:3},n=>n?s(n):r()))}function c(e){return new Promise((r,s)=>w.readFile(e,"utf8",(n,a)=>n?s(n):r(a)))}function o(e,r){return new Promise((s,n)=>w.writeFile(e,r,"utf8",a=>a?n(a):s()))}async function _(e){const r=P.join(e,"languagepacks.json");try{return JSON.parse(await c(r))}catch{}}function i(e,r){try{for(;r;){if(e[r])return r;{const s=r.lastIndexOf("-");if(s>0)r=r.substring(0,s);else return}}}catch(s){console.error("Resolving language pack configuration failed.",s)}}function t(e,r,s,n){if(n==="pseudo")return Promise.resolve({locale:n,availableLanguages:{},pseudo:!0});if(process.env.VSCODE_DEV)return Promise.resolve({locale:n,availableLanguages:{}});if(n&&(n==="en"||n==="en-us"))return Promise.resolve({locale:n,availableLanguages:{}});const a=n;y.mark("code/willGenerateNls");const l=function(f){return y.mark("code/didGenerateNls"),Promise.resolve({locale:f,availableLanguages:{}})};try{return e?_(r).then(f=>{if(!f||(n=i(f,n),!n))return l(a);const p=f[n];let b;return!p||typeof p.hash!="string"||!p.translations||typeof(b=p.translations.vscode)!="string"?l(a):u(b).then(C=>{if(!C)return l(a);const E=p.hash+"."+n,O=P.join(r,"clp",E),D=P.join(O,e),I=P.join(O,"tcf.json"),R=P.join(O,"corrupted.info"),L={locale:a,availableLanguages:{"*":n},_languagePackId:E,_translationsConfigFile:I,_cacheRoot:O,_resolvedLanguagePackCoreLocation:D,_corruptedFile:R};return u(R).then(U=>{let k;return U?k=v(O):k=Promise.resolve(void 0),k.then(()=>u(D).then(A=>A?(m(D).catch(()=>{}),y.mark("code/didGenerateNls"),L):d(D).then(()=>Promise.all([c(s),c(b)])).then(N=>{const T=JSON.parse(N[0]),F=JSON.parse(N[1]).contents,X=Object.keys(T.bundles),j=[];for(const B of X){const J=T.bundles[B],$=Object.create(null);for(const q of J){const H=T.keys[q],G=T.messages[q],z=F[q];let x;if(z){x=[];for(let M=0;M<H.length;M++){const W=H[M],Q=typeof W=="string"?W:W.key;let V=z[Q];V===void 0&&(V=G[M]),x.push(V)}}else x=G;$[q]=x}j.push(o(P.join(D,B.replace(/\//g,"!")+".nls.json"),JSON.stringify($)))}return j.push(o(I,JSON.stringify(p.translations))),Promise.all(j)}).then(()=>(y.mark("code/didGenerateNls"),L)).catch(N=>(console.error("Generating translation files failed.",N),l(n)))))})})}):l(a)}catch(f){return console.error("Generating translation files failed.",f),l(n)}}return{getNLSConfiguration:t}}if(typeof define=="function")define(["path","fs","vs/base/common/performance"],function(P,w,y){return S(P,w,y)});else if(typeof h=="object"&&typeof h.exports=="object"){const P=require("path"),w=require("fs"),y=require_performance();h.exports=S(P,w,y)}else throw new Error("Unknown context")})()}}),require_loader=__commonJS({"out-build/vs/loader.js"(g,h){"use strict";var S=g,P=typeof global=="object"?global:{},y;(function(u){u.global=S;var m=function(){function d(){this._detected=!1,this._isWindows=!1,this._isNode=!1,this._isElectronRenderer=!1,this._isWebWorker=!1,this._isElectronNodeIntegrationWebWorker=!1}return Object.defineProperty(d.prototype,"isWindows",{get:function(){return this._detect(),this._isWindows},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isNode",{get:function(){return this._detect(),this._isNode},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isElectronRenderer",{get:function(){return this._detect(),this._isElectronRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"is
//# sourceURL=`+r;var O=b?self.eval(b.createScript("",E)):new Function(E);O.call(self),s()}).then(void 0,n);return}try{b&&(r=b.createScriptURL(r)),importScripts(r),s()}catch(E){n(E)}}},t}(),o=function(){function t(e){this._env=e,this._didInitialize=!1,this._didPatchNodeRequire=!1}return t.prototype._init=function(e){this._didInitialize||(this._didInitialize=!0,this._fs=e("fs"),this._vm=e("vm"),this._path=e("path"),this._crypto=e("crypto"))},t.prototype._initNodeRequire=function(e,r){var s=r.getConfig().getOptionsLiteral().nodeCachedData;if(!s||this._didPatchNodeRequire)return;this._didPatchNodeRequire=!0;var n=this,a=e("module");function l(f){var p=f.constructor,b=function(E){try{return f.require(E)}finally{}};return b.resolve=function(E,O){return p._resolveFilename(E,f,!1,O)},b.resolve.paths=function(E){return p._resolveLookupPaths(E,f)},b.main=process.mainModule,b.extensions=p._extensions,b.cache=p._cache,b}a.prototype._compile=function(f,p){var b=a.wrap(f.replace(/^#!.*/,"")),C=r.getRecorder(),E=n._getCachedDataPath(s,p),O={filename:p},D;try{var I=n._fs.readFileSync(E);D=I.slice(0,16),O.cachedData=I.slice(16),C.record(60,E)}catch{C.record(61,E)}var R=new n._vm.Script(b,O),L=R.runInThisContext(O),U=n._path.dirname(p),k=l(this),A=[this.exports,k,this,p,U,process,P,Buffer],N=L.apply(this.exports,A);return n._handleCachedData(R,b,E,!O.cachedData,r),n._verifyCachedData(R,b,E,D,r),N}},t.prototype.load=function(e,r,s,n){var a=this,l=e.getConfig().getOptionsLiteral(),f=_(e.getRecorder(),l.nodeRequire||u.global.nodeRequire),p=l.nodeInstrumenter||function(L){return L};this._init(f),this._initNodeRequire(f,e);var b=e.getRecorder();if(/^node\|/.test(r)){var C=r.split("|"),E=null;try{E=f(C[1])}catch(L){n(L);return}e.enqueueDefineAnonymousModule([],function(){return E}),s()}else{r=u.Utilities.fileUriToFilePath(this._env.isWindows,r);var O=this._path.normalize(r),D=this._getElectronRendererScriptPathOrUri(O),I=Boolean(l.nodeCachedData),R=I?this._getCachedDataPath(l.nodeCachedData,r):void 0;this._readSourceAndCachedData(O,R,b,function(L,U,k,A){if(L){n(L);return}var N;U.charCodeAt(0)===t._BOM?N=t._PREFIX+U.substring(1)+t._SUFFIX:N=t._PREFIX+U+t._SUFFIX,N=p(N,O);var T={filename:D,cachedData:k},F=a._createAndEvalScript(e,N,T,s,n);a._handleCachedData(F,N,R,I&&!k,e),a._verifyCachedData(F,N,R,A,e)})}},t.prototype._createAndEvalScript=function(e,r,s,n,a){var l=e.getRecorder();l.record(31,s.filename);var f=new this._vm.Script(r,s),p=f.runInThisContext(s),b=e.getGlobalAMDDefineFunc(),C=!1,E=function(){return C=!0,b.apply(null,arguments)};return E.amd=b.amd,p.call(u.global,e.getGlobalAMDRequireFunc(),E,s.filename,this._path.dirname(s.filename)),l.record(32,s.filename),C?n():a(new Error("Didn't receive define call in "+s.filename+"!")),f},t.prototype._getElectronRendererScriptPathOrUri=function(e){if(!this._env.isElectronRenderer)return e;var r=e.match(/^([a-z])\:(.*)/i);return r?"file:///"+(r[1].toUpperCase()+":"+r[2]).replace(/\\/g,"/"):"file://"+e},t.prototype._getCachedDataPath=function(e,r){var s=this._crypto.createHash("md5").update(r,"utf8").update(e.seed,"utf8").update(process.arch,"").digest("hex"),n=this._path.basename(r).replace(/\.js$/,"");return this._path.join(e.path,n+"-"+s+".code")},t.prototype._handleCachedData=function(e,r,s,n,a){var l=this;e.cachedDataRejected?this._fs.unlink(s,function(f){a.getRecorder().record(62,s),l._createAndWriteCachedData(e,r,s,a),f&&a.getConfig().onError(f)}):n&&this._createAndWriteCachedData(e,r,s,a)},t.prototype._createAndWriteCachedData=function(e,r,s,n){var a=this,l=Math.ceil(n.getConfig().getOptionsLiteral().nodeCachedData.writeDelay*(1+Math.random())),f=-1,p=0,b=void 0,C=function(){setTimeout(function(){b||(b=a._crypto.createHash("md5").update(r,"utf8").digest());var E=e.createCachedData();if(!(E.length===0||E.length===f||p>=5)){if(E.length<f){C();return}f=E.length,a._fs.writeFile(s,Buffer.concat([b,E]),function(O){O&&n.getConfig().onError(O),n.getRecorder().record(63,s),C()})}},l*Math.pow(4,p++))};C()},t.prototype._readSourceAndCachedData=function(e,r,s,n){if(!r)this._fs.readFile(e,{encoding:"
});`,t}();function _(t,e){if(e.__$__isRecorded)return e;var r=function(n){t.record(33,n);try{return e(n)}finally{t.record(34,n)}};return r.__$__isRecorded=!0,r}u.ensureRecordedNodeRequire=_;function i(t){return new m(t)}u.createScriptLoader=i})(y||(y={}));var y;(function(u){var m=function(){function i(t){var e=t.lastIndexOf("/");e!==-1?this.fromModulePath=t.substr(0,e+1):this.fromModulePath=""}return i._normalizeModuleId=function(t){var e=t,r;for(r=/\/\.\//;r.test(e);)e=e.replace(r,"/");for(e=e.replace(/^\.\//g,""),r=/\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;r.test(e);)e=e.replace(r,"/");return e=e.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//,""),e},i.prototype.resolveModule=function(t){var e=t;return u.Utilities.isAbsolutePath(e)||(u.Utilities.startsWith(e,"./")||u.Utilities.startsWith(e,"../"))&&(e=i._normalizeModuleId(this.fromModulePath+e)),e},i.ROOT=new i(""),i}();u.ModuleIdResolver=m;var d=function(){function i(t,e,r,s,n,a){this.id=t,this.strId=e,this.dependencies=r,this._callback=s,this._errorback=n,this.moduleIdResolver=a,this.exports={},this.error=null,this.exportsPassedIn=!1,this.unresolvedDependenciesCount=this.dependencies.length,this._isComplete=!1}return i._safeInvokeFunction=function(t,e){try{return{returnedValue:t.apply(u.global,e),producedError:null}}catch(r){return{returnedValue:null,producedError:r}}},i._invokeFactory=function(t,e,r,s){return t.shouldInvokeFactory(e)?t.shouldCatchError()?this._safeInvokeFunction(r,s):{returnedValue:r.apply(u.global,s),producedError:null}:{returnedValue:null,producedError:null}},i.prototype.complete=function(t,e,r,s){this._isComplete=!0;var n=null;if(this._callback)if(typeof this._callback=="function"){t.record(21,this.strId);var a=i._invokeFactory(e,this.strId,this._callback,r);n=a.producedError,t.record(22,this.strId),!n&&typeof a.returnedValue<"u"&&(!this.exportsPassedIn||u.Utilities.isEmpty(this.exports))&&(this.exports=a.returnedValue)}else this.exports=this._callback;if(n){var l=u.ensureError(n);l.phase="factory",l.moduleId=this.strId,l.neededBy=s(this.id),this.error=l,e.onError(l)}this.dependencies=null,this._callback=null,this._errorback=null,this.moduleIdResolver=null},i.prototype.onDependencyError=function(t){return this._isComplete=!0,this.error=t,this._errorback?(this._errorback(t),!0):!1},i.prototype.isComplete=function(){return this._isComplete},i}();u.Module=d;var v=function(){function i(){this._nextId=0,this._strModuleIdToIntModuleId=new Map,this._intModuleIdToStrModuleId=[],this.getModuleId("exports"),this.getModuleId("module"),this.getModuleId("require")}return i.prototype.getMaxModuleId=function(){return this._nextId},i.prototype.getModuleId=function(t){var e=this._strModuleIdToIntModuleId.get(t);return typeof e>"u"&&(e=this._nextId++,this._strModuleIdToIntModuleId.set(t,e),this._intModuleIdToStrModuleId[e]=t),e},i.prototype.getStrModuleId=function(t){return this._intModuleIdToStrModuleId[t]},i}(),c=function(){function i(t){this.id=t}return i.EXPORTS=new i(0),i.MODULE=new i(1),i.REQUIRE=new i(2),i}();u.RegularDependency=c;var o=function(){function i(t,e,r){this.id=t,this.pluginId=e,this.pluginParam=r}return i}();u.PluginDependency=o;var _=function(){function i(t,e,r,s,n){n===void 0&&(n=0),this._env=t,this._scriptLoader=e,this._loaderAvailableTimestamp=n,this._defineFunc=r,this._requireFunc=s,this._moduleIdProvider=new v,this._config=new u.Configuration(this._env),this._hasDependencyCycle=!1,this._modules2=[],this._knownModules2=[],this._inverseDependencies2=[],this._inversePluginDependencies2=new Map,this._currentAnonymousDefineCall=null,this._recorder=null,this._buildInfoPath=[],this._buildInfoDefineStack=[],this._buildInfoDependencies=[]}return i.prototype.reset=function(){return new i(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)},i.prototype.getGlobalAMDDefineFunc=function(){return this._defineFunc},i.prototype.getGlobalAMDRequireFunc=function(){return this._requireFunc},i._findRelevantLocationInStack=function(t,e){for(var r=function(O)
`)),t.unresolvedDependenciesCount--;continue}if(this._inverseDependencies2[a.id]=this._inverseDependencies2[a.id]||[],this._inverseDependencies2[a.id].push(t.id),a instanceof o){var p=this._modules2[a.pluginId];if(p&&p.isComplete()){this._loadPluginDependency(p.exports,a);continue}var b=this._inversePluginDependencies2.get(a.pluginId);b||(b=[],this._inversePluginDependencies2.set(a.pluginId,b)),b.push(a),this._loadModule(a.pluginId);continue}this._loadModule(a.id)}t.unresolvedDependenciesCount===0&&this._onModuleComplete(t)},i.prototype._onModuleComplete=function(t){var e=this,r=this.getRecorder();if(!t.isComplete()){var s=t.dependencies,n=[];if(s)for(var a=0,l=s.length;a<l;a++){var f=s[a];if(f===c.EXPORTS){n[a]=t.exports;continue}if(f===c.MODULE){n[a]={id:t.strId,config:function(){return e._config.getConfigForModule(t.strId)}};continue}if(f===c.REQUIRE){n[a]=this._createRequire(t.moduleIdResolver);continue}var p=this._modules2[f.id];if(p){n[a]=p.exports;continue}n[a]=null}var b=function(I){return(e._inverseDependencies2[I]||[]).map(function(R){return e._moduleIdProvider.getStrModuleId(R)})};t.complete(r,this._config,n,b);var C=this._inverseDependencies2[t.id];if(this._inverseDependencies2[t.id]=null,C)for(var a=0,l=C.length;a<l;a++){var E=C[a],O=this._modules2[E];O.unresolvedDependenciesCount--,O.unresolvedDependenciesCount===0&&this._onModuleComplete(O)}var D=this._inversePluginDependencies2.get(t.id);if(D){this._inversePluginDependencies2.delete(t.id);for(var a=0,l=D.length;a<l;a++)this._loadPluginDependency(t.exports,D[a])}}},i}();u.ModuleManager=_})(y||(y={}));var w,y;(function(u){var m=new u.Environment,d=null,v=function(i,t,e){typeof i!="string"&&(e=t,t=i,i=null),(typeof t!="object"||!Array.isArray(t))&&(e=t,t=null),t||(t=["require","exports","module"]),i?d.defineModule(i,t,e,null,null):d.enqueueDefineAnonymousModule(t,e)};v.amd={jQuery:!0};var c=function(i,t){t===void 0&&(t=!1),d.configure(i,t)},o=function(){if(arguments.length===1){if(arguments[0]instanceof Object&&!Array.isArray(arguments[0])){c(arguments[0]);return}if(typeof arguments[0]=="string")return d.synchronousRequire(arguments[0])}if((arguments.length===2||arguments.length===3)&&Array.isArray(arguments[0])){d.defineModule(u.Utilities.generateAnonymousModule(),arguments[0],arguments[1],arguments[2],null);return}throw new Error("Unrecognized require call")};o.config=c,o.getConfig=function(){return d.getConfig().getOptionsLiteral()},o.reset=function(){d=d.reset()},o.getBuildInfo=function(){return d.getBuildInfo()},o.getStats=function(){return d.getLoaderEvents()},o.define=v;function _(){if(typeof u.global.require<"u"||typeof require<"u"){var i=u.global.require||require;if(typeof i=="function"&&typeof i.resolve=="function"){var t=u.ensureRecordedNodeRequire(d.getRecorder(),i);u.global.nodeRequire=t,o.nodeRequire=t,o.__$__nodeRequire=t}}m.isNode&&!m.isElectronRenderer&&!m.isElectronNodeIntegrationWebWorker?h.exports=o:(m.isElectronRenderer||(u.global.define=v),u.global.require=o)}u.init=_,(typeof u.global.define!="function"||!u.global.define.amd)&&(d=new u.ModuleManager(m,u.createScriptLoader(m),v,o,u.Utilities.getHighPerformanceTimestamp()),typeof u.global.require<"u"&&typeof u.global.require!="function"&&o.config(u.global.require),w=function(){return v.apply(null,arguments)},w.amd=v.amd,typeof doNotInitLoader>"u"&&_())})(y||(y={})),w("vs/css",["require","exports"],function(u,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.load=void 0;function d(i,t,e,r){if(r=r||{},(r["vs/css"]||{}).disabled){e({});return}const n=t.toUrl(i+".css");v(i,n,()=>{e({})},a=>{typeof e.error=="function"&&e.error("Could not find "+n+".")})}m.load=d;function v(i,t,e,r){if(c(i,t)){e();return}o(i,t,e,r)}function c(i,t){const e=document.getElementsByTagName("link");for(let r=0,s=e.length;r<s;r++){const n=e[r].getAttribute("data-name"),a=e[r].getAttribute("href");if(n===i||a===t)return!0}return!1}function o(i,t,e,r){const s=document.createElement("link");s.setAttribute("rel","stylesheet"),s.setAttribute("type","text/css"),s.setAttribute("data-name",i),_(i,s,e,r),s.se
`))}catch(h){console.error(`Unable to create argv.json configuration file in ${g}, falling back to defaults (${h})`)}}function getArgvConfigPath(){const g=process.env.VSCODE_PORTABLE;if(g)return path.join(g,"argv.json");let h=product.dataFolderName;return process.env.VSCODE_DEV&&(h=`${h}-dev`),path.join(os.homedir(),h,"argv.json")}function configureCrashReporter(){let g=args["crash-reporter-directory"],h="";if(g){if(g=path.normalize(g),path.isAbsolute(g)||(console.error(`The path '${g}' specified for --crash-reporter-directory must be absolute.`),app.exit(1)),!fs.existsSync(g))try{fs.mkdirSync(g,{recursive:!0})}catch{console.error(`The path '${g}' specified for --crash-reporter-directory does not seem to exist or cannot be created.`),app.exit(1)}console.log(`Found --crash-reporter-directory argument. Setting crashDumps directory to be '${g}'`),app.setPath("crashDumps",g)}else{const y=product.appCenter;if(y){const u=process.platform==="win32",m=process.platform==="linux",d=process.platform==="darwin",v=argvConfig["crash-reporter-id"];if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(v)){if(u)switch(process.arch){case"ia32":h=y["win32-ia32"];break;case"x64":h=y["win32-x64"];break;case"arm64":h=y["win32-arm64"];break}else if(d)if(product.darwinUniversalAssetId)h=y["darwin-universal"];else switch(process.arch){case"x64":h=y.darwin;break;case"arm64":h=y["darwin-arm64"];break}else m&&(h=y["linux-x64"]);h=h.concat("&uid=",v,"&iid=",v,"&sid=",v);const o=process.argv,_=o.indexOf("--");_===-1?o.push("--crash-reporter-id",v):o.splice(_,0,"--crash-reporter-id",v)}}}const S=(product.crashReporter?product.crashReporter.productName:void 0)||product.nameShort,P=(product.crashReporter?product.crashReporter.companyName:void 0)||"Microsoft",w=Boolean(!process.env.VSCODE_DEV&&h&&!g);crashReporter.start({companyName:P,productName:process.env.VSCODE_DEV?`${S} Dev`:S,submitURL:h,uploadToServer:w,compress:!0})}function getJSFlags(g){const h=[];return g["js-flags"]&&h.push(g["js-flags"]),g["max-memory"]&&!/max_old_space_size=(\d+)/g.exec(g["js-flags"]??"")&&h.push(`--max_old_space_size=${g["max-memory"]}`),h.length>0?h.join(" "):null}function parseCLIArgs(){return require("minimist")(process.argv,{string:["user-data-dir","locale","js-flags","max-memory","crash-reporter-directory"]})}function registerListeners(){const g=[];global.macOpenFiles=g,app.on("open-file",function(P,w){g.push(w)});const h=[],S=function(P,w){P.preventDefault(),h.push(w)};app.on("will-finish-launching",function(){app.on("open-url",S)}),global.getOpenUrls=function(){return app.removeListener("open-url",S),h}}function getCodeCachePath(){if(process.argv.indexOf("--no-cached-data")>0||process.env.VSCODE_DEV)return;const g=product.commit;if(!!g)return path.join(userDataPath,"CachedData",g)}function mkdirp(g){return new Promise((h,S)=>{fs.mkdir(g,{recursive:!0},P=>P&&P.code!=="EEXIST"?S(P):h(g))})}async function mkdirpIgnoreError(g){if(typeof g=="string")try{return await mkdirp(g),g}catch{}}async function resolveNlsConfiguration(){let g=nlsConfigurationPromise?await nlsConfigurationPromise:void 0;if(!g){let h=app.getLocale();if("getPreferredSystemLanguages"in app&&typeof app.getPreferredSystemLanguages=="function"&&app.getPreferredSystemLanguages().length&&(h=app.getPreferredSystemLanguages()[0]),!h)g={locale:"en",availableLanguages:{}};else{h=h.toLowerCase();const{getNLSConfiguration:S}=require_languagePacks();g=await S(product.commit,userDataPath,metaDataFile,h),g||(g={locale:h,availableLanguages:{}})}}return g}function getUserDefinedLocale(g){const h=args.locale;return h?h.toLowerCase():g.locale&&typeof g.locale=="string"?g.locale.toLowerCase():void 0}
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/5235c6bb189b60b01b1f49062f4ffa42384f8c91/core/main.js.map