mirror of
https://github.com/mentos1386/zdravko.git
synced 2025-02-21 16:33:37 +00:00
27 lines
332 KiB
JavaScript
27 lines
332 KiB
JavaScript
|
/*!-----------------------------------------------------------
|
||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
|
* Version: 0.46.0(21007360cad28648bdf46282a2592cb47c3a7a6f)
|
||
|
* Released under the MIT license
|
||
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||
|
*-----------------------------------------------------------*/(function(){var X=["require","exports","vs/editor/common/core/range","vs/editor/common/core/offsetRange","vs/editor/common/core/position","vs/base/common/errors","vs/base/common/strings","vs/base/common/arrays","vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm","vs/base/common/event","vs/editor/common/core/lineRange","vs/base/common/arraysFind","vs/base/common/assert","vs/base/common/lifecycle","vs/base/common/objects","vs/editor/common/diff/defaultLinesDiffComputer/utils","vs/editor/common/diff/rangeMapping","vs/base/common/platform","vs/base/common/uri","vs/nls","vs/base/common/functional","vs/base/common/iterator","vs/base/common/linkedList","vs/base/common/stopwatch","vs/base/common/diff/diff","vs/base/common/types","vs/base/common/uint","vs/editor/common/core/characterClassifier","vs/editor/common/core/wordHelper","vs/editor/common/diff/defaultLinesDiffComputer/algorithms/myersDiffAlgorithm","vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence","vs/editor/common/diff/linesDiffComputer","vs/base/common/cache","vs/base/common/color","vs/base/common/diff/diffChange","vs/base/common/keyCodes","vs/base/common/lazy","vs/base/common/map","vs/base/common/cancellation","vs/base/common/hash","vs/base/common/codicons","vs/editor/common/core/selection","vs/editor/common/core/wordCharacterClassifier","vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations","vs/editor/common/diff/defaultLinesDiffComputer/lineSequence","vs/editor/common/diff/defaultLinesDiffComputer/algorithms/dynamicProgrammingDiffing","vs/editor/common/diff/defaultLinesDiffComputer/computeMovedLines","vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer","vs/editor/common/diff/legacyLinesDiffComputer","vs/editor/common/diff/linesDiffComputers","vs/editor/common/languages/defaultDocumentColorsComputer","vs/editor/common/languages/linkComputer","vs/editor/common/languages/supports/inplaceReplaceSupport","vs/editor/common/model","vs/editor/common/model/prefixSumComputer","vs/editor/common/model/mirrorTextModel","vs/editor/common/model/textModelSearch","vs/editor/common/services/unicodeTextModelHighlighter","vs/editor/common/standalone/standaloneEnums","vs/editor/common/tokenizationRegistry","vs/nls!vs/base/common/platform","vs/nls!vs/base/common/worker/simpleWorker","vs/base/common/process","vs/base/common/path","vs/nls!vs/editor/common/languages","vs/editor/common/languages","vs/editor/common/services/editorBaseApi","vs/base/common/worker/simpleWorker","vs/editor/common/services/editorSimpleWorker"],J=function(q){for(var n=[],M=0,A=q.length;M<A;M++)n[M]=X[q[M]];return n};const Ne=this,Re=typeof global=="object"?global:{};var le;(function(q){q.global=Ne;class n{get isWindows(){return this._detect(),this._isWindows}get isNode(){return this._detect(),this._isNode}get isElectronRenderer(){return this._detect(),this._isElectronRenderer}get isWebWorker(){return this._detect(),this._isWebWorker}get isElectronNodeIntegrationWebWorker(){return this._detect(),this._isElectronNodeIntegrationWebWorker}constructor(){this._detected=!1,this._isWindows=!1,this._isNode=!1,this._isElectronRenderer=!1,this._isWebWorker=!1,this._isElectronNodeIntegrationWebWorker=!1}_detect(){this._detected||(this._detected=!0,this._isWindows=n._isWindows(),this._isNode=typeof module<"u"&&!!module.exports,this._isElectronRenderer=typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.electron<"u"&&process.type==="renderer",this._isWebWorker=typeof q.global.importScripts=="function",this._isElectronNodeIntegrationWebWorker=this._isWebWorker&&typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.electron<"u"&&process.type==="worker")}static _isWindows(){return typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.indexOf("Windows")>=0?!0:typeof process<"u"?process.platform==="win32":!1}}q.Environment=n})(le||(le={}));var le;(function(q){class n{constructor(d,b,p){this.type=d,this.detail=b,this.timestamp=p}}q.Load
|
||
|
//# sourceURL=${L}`,(u?self.eval(u.createScript("",m)):new Function(m)).call(self),e()}).then(void 0,a);return}try{u&&(L=u.createScriptURL(L)),importScripts(L),e()}catch(m){a(m)}}}}class d{constructor(o){this._env=o,this._didInitialize=!1,this._didPatchNodeRequire=!1}_init(o){this._didInitialize||(this._didInitialize=!0,this._fs=o("fs"),this._vm=o("vm"),this._path=o("path"),this._crypto=o("crypto"))}_initNodeRequire(o,L){const{nodeCachedData:e}=L.getConfig().getOptionsLiteral();if(!e||this._didPatchNodeRequire)return;this._didPatchNodeRequire=!0;const a=this,u=o("module");function c(m){const f=m.constructor;let y=function(E){try{return m.require(E)}finally{}};return y.resolve=function(E,S){return f._resolveFilename(E,m,!1,S)},y.resolve.paths=function(E){return f._resolveLookupPaths(E,m)},y.main=process.mainModule,y.extensions=f._extensions,y.cache=f._cache,y}u.prototype._compile=function(m,f){const y=u.wrap(m.replace(/^#!.*/,"")),w=L.getRecorder(),E=a._getCachedDataPath(e,f),S={filename:f};let C;try{const R=a._fs.readFileSync(E);C=R.slice(0,16),S.cachedData=R.slice(16),w.record(60,E)}catch{w.record(61,E)}const r=new a._vm.Script(y,S),s=r.runInThisContext(S),l=a._path.dirname(f),_=c(this),g=[this.exports,_,this,f,l,process,Re,Buffer],v=s.apply(this.exports,g);return a._handleCachedData(r,y,E,!S.cachedData,L),a._verifyCachedData(r,y,E,C,L),v}}load(o,L,e,a){const u=o.getConfig().getOptionsLiteral(),c=b(o.getRecorder(),u.nodeRequire||q.global.nodeRequire),m=u.nodeInstrumenter||function(y){return y};this._init(c),this._initNodeRequire(c,o);let f=o.getRecorder();if(/^node\|/.test(L)){let y=L.split("|"),w=null;try{w=c(y[1])}catch(E){a(E);return}o.enqueueDefineAnonymousModule([],()=>w),e()}else{L=q.Utilities.fileUriToFilePath(this._env.isWindows,L);const y=this._path.normalize(L),w=this._getElectronRendererScriptPathOrUri(y),E=!!u.nodeCachedData,S=E?this._getCachedDataPath(u.nodeCachedData,L):void 0;this._readSourceAndCachedData(y,S,f,(C,r,s,l)=>{if(C){a(C);return}let _;r.charCodeAt(0)===d._BOM?_=d._PREFIX+r.substring(1)+d._SUFFIX:_=d._PREFIX+r+d._SUFFIX,_=m(_,y);const g={filename:w,cachedData:s},v=this._createAndEvalScript(o,_,g,e,a);this._handleCachedData(v,_,S,E&&!s,o),this._verifyCachedData(v,_,S,l,o)})}}_createAndEvalScript(o,L,e,a,u){const c=o.getRecorder();c.record(31,e.filename);const m=new this._vm.Script(L,e),f=m.runInThisContext(e),y=o.getGlobalAMDDefineFunc();let w=!1;const E=function(){return w=!0,y.apply(null,arguments)};return E.amd=y.amd,f.call(q.global,o.getGlobalAMDRequireFunc(),E,e.filename,this._path.dirname(e.filename)),c.record(32,e.filename),w?a():u(new Error(`Didn't receive define call in ${e.filename}!`)),m}_getElectronRendererScriptPathOrUri(o){if(!this._env.isElectronRenderer)return o;let L=o.match(/^([a-z])\:(.*)/i);return L?`file:///${(L[1].toUpperCase()+":"+L[2]).replace(/\\/g,"/")}`:`file://${o}`}_getCachedDataPath(o,L){const e=this._crypto.createHash("md5").update(L,"utf8").update(o.seed,"utf8").update(process.arch,"").digest("hex"),a=this._path.basename(L).replace(/\.js$/,"");return this._path.join(o.path,`${a}-${e}.code`)}_handleCachedData(o,L,e,a,u){o.cachedDataRejected?this._fs.unlink(e,c=>{u.getRecorder().record(62,e),this._createAndWriteCachedData(o,L,e,u),c&&u.getConfig().onError(c)}):a&&this._createAndWriteCachedData(o,L,e,u)}_createAndWriteCachedData(o,L,e,a){let u=Math.ceil(a.getConfig().getOptionsLiteral().nodeCachedData.writeDelay*(1+Math.random())),c=-1,m=0,f;const y=()=>{setTimeout(()=>{f||(f=this._crypto.createHash("md5").update(L,"utf8").digest());const w=o.createCachedData();if(!(w.length===0||w.length===c||m>=5)){if(w.length<c){y();return}c=w.length,this._fs.writeFile(e,Buffer.concat([f,w]),E=>{E&&a.getConfig().onError(E),a.getRecorder().record(63,e),y()})}},u*Math.pow(4,m++))};y()}_readSourceAndCachedData(o,L,e,a){if(!L)this._fs.readFile(o,{encoding:"utf8"},a);else{let u,c,m,f=2;const y=w=>{w?a(w):--f===0&&a(void 0,u,c,m)};this._fs.readFile(o,{encoding:"utf8"},(w,E)=>{u=E,y(w)}),this._fs.readFile(L,(w,E)=>{!w&&E&&E.length>0?(m=E.slice(0,16),c=E.slice(16),e.record(60,L)):e.recor
|
||
|
});`;function b(h,o){if(o.__$__isRecorded)return o;const L=function(a){h.record(33,a);try{return o(a)}finally{h.record(34,a)}};return L.__$__isRecorded=!0,L}q.ensureRecordedNodeRequire=b;function p(h){return new n(h)}q.createScriptLoader=p})(le||(le={}));var le;(function(q){class n{constructor(h){let o=h.lastIndexOf("/");o!==-1?this.fromModulePath=h.substr(0,o+1):this.fromModulePath=""}static _normalizeModuleId(h){let o=h,L;for(L=/\/\.\//;L.test(o);)o=o.replace(L,"/");for(o=o.replace(/^\.\//g,""),L=/\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;L.test(o);)o=o.replace(L,"/");return o=o.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//,""),o}resolveModule(h){let o=h;return q.Utilities.isAbsolutePath(o)||(q.Utilities.startsWith(o,"./")||q.Utilities.startsWith(o,"../"))&&(o=n._normalizeModuleId(this.fromModulePath+o)),o}}n.ROOT=new n(""),q.ModuleIdResolver=n;class M{constructor(h,o,L,e,a,u){this.id=h,this.strId=o,this.dependencies=L,this._callback=e,this._errorback=a,this.moduleIdResolver=u,this.exports={},this.error=null,this.exportsPassedIn=!1,this.unresolvedDependenciesCount=this.dependencies.length,this._isComplete=!1}static _safeInvokeFunction(h,o){try{return{returnedValue:h.apply(q.global,o),producedError:null}}catch(L){return{returnedValue:null,producedError:L}}}static _invokeFactory(h,o,L,e){return h.shouldInvokeFactory(o)?h.shouldCatchError()?this._safeInvokeFunction(L,e):{returnedValue:L.apply(q.global,e),producedError:null}:{returnedValue:null,producedError:null}}complete(h,o,L,e){this._isComplete=!0;let a=null;if(this._callback)if(typeof this._callback=="function"){h.record(21,this.strId);let u=M._invokeFactory(o,this.strId,this._callback,L);a=u.producedError,h.record(22,this.strId),!a&&typeof u.returnedValue<"u"&&(!this.exportsPassedIn||q.Utilities.isEmpty(this.exports))&&(this.exports=u.returnedValue)}else this.exports=this._callback;if(a){let u=q.ensureError(a);u.phase="factory",u.moduleId=this.strId,u.neededBy=e(this.id),this.error=u,o.onError(u)}this.dependencies=null,this._callback=null,this._errorback=null,this.moduleIdResolver=null}onDependencyError(h){return this._isComplete=!0,this.error=h,this._errorback?(this._errorback(h),!0):!1}isComplete(){return this._isComplete}}q.Module=M;class A{constructor(){this._nextId=0,this._strModuleIdToIntModuleId=new Map,this._intModuleIdToStrModuleId=[],this.getModuleId("exports"),this.getModuleId("module"),this.getModuleId("require")}getMaxModuleId(){return this._nextId}getModuleId(h){let o=this._strModuleIdToIntModuleId.get(h);return typeof o>"u"&&(o=this._nextId++,this._strModuleIdToIntModuleId.set(h,o),this._intModuleIdToStrModuleId[o]=h),o}getStrModuleId(h){return this._intModuleIdToStrModuleId[h]}}class i{constructor(h){this.id=h}}i.EXPORTS=new i(0),i.MODULE=new i(1),i.REQUIRE=new i(2),q.RegularDependency=i;class d{constructor(h,o,L){this.id=h,this.pluginId=o,this.pluginParam=L}}q.PluginDependency=d;class b{constructor(h,o,L,e,a=0){this._env=h,this._scriptLoader=o,this._loaderAvailableTimestamp=a,this._defineFunc=L,this._requireFunc=e,this._moduleIdProvider=new A,this._config=new q.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=[],this._requireFunc.moduleManager=this}reset(){return new b(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)}getGlobalAMDDefineFunc(){return this._defineFunc}getGlobalAMDRequireFunc(){return this._requireFunc}static _findRelevantLocationInStack(h,o){let L=u=>u.replace(/\\/g,"/"),e=L(h),a=o.split(/\n/);for(let u=0;u<a.length;u++){let c=a[u].match(/(.*):(\d+):(\d+)\)?$/);if(c){let m=c[1],f=c[2],y=c[3],w=Math.max(m.lastIndexOf(" ")+1,m.lastIndexOf("(")+1);if(m=m.substr(w),m=L(m),m===e){let E={line:parseInt(f,10),col:parseInt(y,10)};return E.line===1&&(E.col-=53),E}}}throw new Error("Could no
|
||
|
`)),h.unresolvedDependenciesCount--;continue}if(this._inverseDependencies2[a.id]=this._inverseDependencies2[a.id]||[],this._inverseDependencies2[a.id].push(h.id),a instanceof d){let c=this._modules2[a.pluginId];if(c&&c.isComplete()){this._loadPluginDependency(c.exports,a);continue}let m=this._inversePluginDependencies2.get(a.pluginId);m||(m=[],this._inversePluginDependencies2.set(a.pluginId,m)),m.push(a),this._loadModule(a.pluginId);continue}this._loadModule(a.id)}h.unresolvedDependenciesCount===0&&this._onModuleComplete(h)}_onModuleComplete(h){let o=this.getRecorder();if(h.isComplete())return;let L=h.dependencies,e=[];if(L)for(let m=0,f=L.length;m<f;m++){let y=L[m];if(y===i.EXPORTS){e[m]=h.exports;continue}if(y===i.MODULE){e[m]={id:h.strId,config:()=>this._config.getConfigForModule(h.strId)};continue}if(y===i.REQUIRE){e[m]=this._createRequire(h.moduleIdResolver);continue}let w=this._modules2[y.id];if(w){e[m]=w.exports;continue}e[m]=null}const a=m=>(this._inverseDependencies2[m]||[]).map(f=>this._moduleIdProvider.getStrModuleId(f));h.complete(o,this._config,e,a);let u=this._inverseDependencies2[h.id];if(this._inverseDependencies2[h.id]=null,u)for(let m=0,f=u.length;m<f;m++){let y=u[m],w=this._modules2[y];w.unresolvedDependenciesCount--,w.unresolvedDependenciesCount===0&&this._onModuleComplete(w)}let c=this._inversePluginDependencies2.get(h.id);if(c){this._inversePluginDependencies2.delete(h.id);for(let m=0,f=c.length;m<f;m++)this._loadPluginDependency(h.exports,c[m])}}}q.ModuleManager=b})(le||(le={}));var Y,le;(function(q){const n=new q.Environment;let M=null;const A=function(p,h,o){typeof p!="string"&&(o=h,h=p,p=null),(typeof h!="object"||!Array.isArray(h))&&(o=h,h=null),h||(h=["require","exports","module"]),p?M.defineModule(p,h,o,null,null):M.enqueueDefineAnonymousModule(h,o)};A.amd={jQuery:!0};const i=function(p,h=!1){M.configure(p,h)},d=function(){if(arguments.length===1){if(arguments[0]instanceof Object&&!Array.isArray(arguments[0])){i(arguments[0]);return}if(typeof arguments[0]=="string")return M.synchronousRequire(arguments[0])}if((arguments.length===2||arguments.length===3)&&Array.isArray(arguments[0])){M.defineModule(q.Utilities.generateAnonymousModule(),arguments[0],arguments[1],arguments[2],null);return}throw new Error("Unrecognized require call")};d.config=i,d.getConfig=function(){return M.getConfig().getOptionsLiteral()},d.reset=function(){M=M.reset()},d.getBuildInfo=function(){return M.getBuildInfo()},d.getStats=function(){return M.getLoaderEvents()},d.define=A;function b(){if(typeof q.global.require<"u"||typeof require<"u"){const p=q.global.require||require;if(typeof p=="function"&&typeof p.resolve=="function"){const h=q.ensureRecordedNodeRequire(M.getRecorder(),p);q.global.nodeRequire=h,d.nodeRequire=h,d.__$__nodeRequire=h}}n.isNode&&!n.isElectronRenderer&&!n.isElectronNodeIntegrationWebWorker?module.exports=d:(n.isElectronRenderer||(q.global.define=A),q.global.require=d)}q.init=b,(typeof q.global.define!="function"||!q.global.define.amd)&&(M=new q.ModuleManager(n,q.createScriptLoader(n),A,d,q.Utilities.getHighPerformanceTimestamp()),typeof q.global.require<"u"&&typeof q.global.require!="function"&&d.config(q.global.require),Y=function(){return A.apply(null,arguments)},Y.amd=A.amd,typeof doNotInitLoader>"u"&&b())})(le||(le={})),Y(X[19],J([0,1]),function(q,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.load=n.create=n.setPseudoTranslation=n.getConfiguredDefaultLocale=n.localize2=n.localize=void 0;let M=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;const A="i-default";function i(f,y){let w;return y.length===0?w=f:w=f.replace(/\{(\d+)\}/g,(E,S)=>{const C=S[0],r=y[C];let s=E;return typeof r=="string"?s=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(s=String(r)),s}),M&&(w="\uFF3B"+w.replace(/[aouei]/g,"$&$&")+"\uFF3D"),w}function d(f,y){let w=f[y];return w||(w=f["*"],w)?w:null}function b(f){return f.charAt(f.length-1)==="/"?f:f+"/"}async function p(f,y,w){const E=b(f)+b(y)+"vscode/"+b(w),S=await fetch(E);if(S.ok)return await S
|
||
|
})`}});function i(){try{return(A?globalThis.eval(A.createScript("","true")):new Function("true")).call(globalThis),!0}catch{return!1}}function d(){return new Promise((L,e)=>{if(typeof globalThis.define=="function"&&globalThis.define.amd)return L();const a=n+"vs/loader.js";if(!(/^((http:)|(https:)|(file:))/.test(a)&&a.substring(0,globalThis.origin.length)!==globalThis.origin)&&i()){fetch(a).then(c=>{if(c.status!==200)throw new Error(c.statusText);return c.text()}).then(c=>{c=`${c}
|
||
|
//# sourceURL=${a}`,(A?globalThis.eval(A.createScript("",c)):new Function(c)).call(globalThis),L()}).then(void 0,e);return}A?importScripts(A.createScriptURL(a)):importScripts(a),L()})}function b(){require.config({baseUrl:n,catchError:!0,trustedTypesPolicy:A,amdModulesPattern:/^vs\//})}function p(L){d().then(()=>{b(),require([L],function(e){setTimeout(function(){const a=e.create((u,c)=>{globalThis.postMessage(u,c)},null);for(globalThis.onmessage=u=>a.onmessage(u.data,u.ports);o.length>0;){const u=o.shift();a.onmessage(u.data,u.ports)}},0)})})}typeof globalThis.define=="function"&&globalThis.define.amd&&b();let h=!0;const o=[];globalThis.onmessage=L=>{if(!h){o.push(L);return}h=!1,p(L.data)}}(),Y(X[7],J([0,1]),function(q,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CallbackIterable=n.ArrayQueue=n.reverseOrder=n.booleanComparator=n.numberComparator=n.tieBreakComparators=n.compareBy=n.CompareResult=n.splice=n.insertInto=n.asArray=n.pushMany=n.pushToEnd=n.pushToStart=n.arrayInsert=n.range=n.firstOrDefault=n.distinct=n.isNonEmptyArray=n.isFalsyOrEmpty=n.coalesceInPlace=n.coalesce=n.forEachWithNeighbors=n.forEachAdjacent=n.groupAdjacentBy=n.groupBy=n.quickSelect=n.binarySearch2=n.binarySearch=n.removeFastWithoutKeepingOrder=n.equals=n.tail2=n.tail=void 0;function M(k,O=0){return k[k.length-(1+O)]}n.tail=M;function A(k){if(k.length===0)throw new Error("Invalid tail call");return[k.slice(0,k.length-1),k[k.length-1]]}n.tail2=A;function i(k,O,I=(W,z)=>W===z){if(k===O)return!0;if(!k||!O||k.length!==O.length)return!1;for(let W=0,z=k.length;W<z;W++)if(!I(k[W],O[W]))return!1;return!0}n.equals=i;function d(k,O){const I=k.length-1;O<I&&(k[O]=k[I]),k.pop()}n.removeFastWithoutKeepingOrder=d;function b(k,O,I){return p(k.length,W=>I(k[W],O))}n.binarySearch=b;function p(k,O){let I=0,W=k-1;for(;I<=W;){const z=(I+W)/2|0,G=O(z);if(G<0)I=z+1;else if(G>0)W=z-1;else return z}return-(I+1)}n.binarySearch2=p;function h(k,O,I){if(k=k|0,k>=O.length)throw new TypeError("invalid index");const W=O[Math.floor(O.length*Math.random())],z=[],G=[],t=[];for(const se of O){const ce=I(se,W);ce<0?z.push(se):ce>0?G.push(se):t.push(se)}return k<z.length?h(k,z,I):k<z.length+t.length?t[0]:h(k-(z.length+t.length),G,I)}n.quickSelect=h;function o(k,O){const I=[];let W;for(const z of k.slice(0).sort(O))!W||O(W[0],z)!==0?(W=[z],I.push(W)):W.push(z);return I}n.groupBy=o;function*L(k,O){let I,W;for(const z of k)W!==void 0&&O(W,z)?I.push(z):(I&&(yield I),I=[z]),W=z;I&&(yield I)}n.groupAdjacentBy=L;function e(k,O){for(let I=0;I<=k.length;I++)O(I===0?void 0:k[I-1],I===k.length?void 0:k[I])}n.forEachAdjacent=e;function a(k,O){for(let I=0;I<k.length;I++)O(I===0?void 0:k[I-1],k[I],I+1===k.length?void 0:k[I+1])}n.forEachWithNeighbors=a;function u(k){return k.filter(O=>!!O)}n.coalesce=u;function c(k){let O=0;for(let I=0;I<k.length;I++)k[I]&&(k[O]=k[I],O+=1);k.length=O}n.coalesceInPlace=c;function m(k){return!Array.isArray(k)||k.length===0}n.isFalsyOrEmpty=m;function f(k){return Array.isArray(k)&&k.length>0}n.isNonEmptyArray=f;function y(k,O=I=>I){const I=new Set;return k.filter(W=>{const z=O(W);return I.has(z)?!1:(I.add(z),!0)})}n.distinct=y;function w(k,O){return k.length>0?k[0]:O}n.firstOrDefault=w;function E(k,O){let I=typeof O=="number"?k:0;typeof O=="number"?I=k:(I=0,O=k);const W=[];if(I<=O)for(let z=I;z<O;z++)W.push(z);else for(let z=I;z>O;z--)W.push(z);return W}n.range=E;function S(k,O,I){const W=k.slice(0,O),z=k.slice(O);return W.concat(I,z)}n.arrayInsert=S;function C(k,O){const I=k.indexOf(O);I>-1&&(k.splice(I,1),k.unshift(O))}n.pushToStart=C;function r(k,O){const I=k.indexOf(O);I>-1&&(k.splice(I,1),k.push(O))}n.pushToEnd=r;function s(k,O){for(const I of O)k.push(I)}n.pushMany=s;function l(k){return Array.isArray(k)?k:[k]}n.asArray=l;function _(k,O,I){const W=v(k,O),z=k.length,G=I.length;k.length=z+G;for(let t=z-1;t>=W;t--)k[t+G]=k[t];for(let t=0;t<G;t++)k[t+W]=I[t]}n.insertInto=_;function g(k,O,I,W){const z=v(k,O);let G=k.splice(z,I);return G===void 0&&(G=[]),_(k,z,W),G}n.splice=g;function v(k,O){return O<0?Math.max(O+k.length,0):Math.min(O,k.length)}v
|
||
|
|
||
|
`+f.stack):new Error(f.message+`
|
||
|
|
||
|
`+f.stack):f},0)}}emit(f){this.listeners.forEach(y=>{y(f)})}onUnexpectedError(f){this.unexpectedErrorHandler(f),this.emit(f)}onUnexpectedExternalError(f){this.unexpectedErrorHandler(f)}}n.ErrorHandler=M,n.errorHandler=new M;function A(m){p(m)||n.errorHandler.onUnexpectedError(m)}n.onUnexpectedError=A;function i(m){p(m)||n.errorHandler.onUnexpectedExternalError(m)}n.onUnexpectedExternalError=i;function d(m){if(m instanceof Error){const{name:f,message:y}=m,w=m.stacktrace||m.stack;return{$isError:!0,name:f,message:y,stack:w,noTelemetry:u.isErrorNoTelemetry(m)}}return m}n.transformErrorForSerialization=d;const b="Canceled";function p(m){return m instanceof h?!0:m instanceof Error&&m.name===b&&m.message===b}n.isCancellationError=p;class h extends Error{constructor(){super(b),this.name=this.message}}n.CancellationError=h;function o(){const m=new Error(b);return m.name=m.message,m}n.canceled=o;function L(m){return m?new Error(`Illegal argument: ${m}`):new Error("Illegal argument")}n.illegalArgument=L;function e(m){return m?new Error(`Illegal state: ${m}`):new Error("Illegal state")}n.illegalState=e;class a extends Error{constructor(f){super("NotSupported"),f&&(this.message=f)}}n.NotSupportedError=a;class u extends Error{constructor(f){super(f),this.name="CodeExpectedError"}static fromError(f){if(f instanceof u)return f;const y=new u;return y.message=f.message,y.stack=f.stack,y}static isErrorNoTelemetry(f){return f.name==="CodeExpectedError"}}n.ErrorNoTelemetry=u;class c extends Error{constructor(f){super(f||"An unexpected bug occurred."),Object.setPrototypeOf(this,c.prototype)}}n.BugIndicatingError=c}),Y(X[12],J([0,1,5]),function(q,n,M){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkAdjacentItems=n.assertFn=n.softAssert=n.assertNever=n.ok=void 0;function A(h,o){if(!h)throw new Error(o?`Assertion failed (${o})`:"Assertion Failed")}n.ok=A;function i(h,o="Unreachable"){throw new Error(o)}n.assertNever=i;function d(h){h||(0,M.onUnexpectedError)(new M.BugIndicatingError("Assertion Failed"))}n.softAssert=d;function b(h){if(!h()){debugger;h(),(0,M.onUnexpectedError)(new M.BugIndicatingError("Assertion Failed"))}}n.assertFn=b;function p(h,o){let L=0;for(;L<h.length-1;){const e=h[L],a=h[L+1];if(!o(e,a))return!1;L++}return!0}n.checkAdjacentItems=p}),Y(X[20],J([0,1]),function(q,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createSingleCallFunction=void 0;function M(A,i){const d=this;let b=!1,p;return function(){if(b)return p;if(b=!0,i)try{p=A.apply(d,arguments)}finally{i()}else p=A.apply(d,arguments);return p}}n.createSingleCallFunction=M}),Y(X[21],J([0,1]),function(q,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Iterable=void 0;var M;(function(A){function i(r){return r&&typeof r=="object"&&typeof r[Symbol.iterator]=="function"}A.is=i;const d=Object.freeze([]);function b(){return d}A.empty=b;function*p(r){yield r}A.single=p;function h(r){return i(r)?r:p(r)}A.wrap=h;function o(r){return r||d}A.from=o;function*L(r){for(let s=r.length-1;s>=0;s--)yield r[s]}A.reverse=L;function e(r){return!r||r[Symbol.iterator]().next().done===!0}A.isEmpty=e;function a(r){return r[Symbol.iterator]().next().value}A.first=a;function u(r,s){for(const l of r)if(s(l))return!0;return!1}A.some=u;function c(r,s){for(const l of r)if(s(l))return l}A.find=c;function*m(r,s){for(const l of r)s(l)&&(yield l)}A.filter=m;function*f(r,s){let l=0;for(const _ of r)yield s(_,l++)}A.map=f;function*y(...r){for(const s of r)yield*s}A.concat=y;function w(r,s,l){let _=l;for(const g of r)_=s(_,g);return _}A.reduce=w;function*E(r,s,l=r.length){for(s<0&&(s+=r.length),l<0?l+=r.length:l>r.length&&(l=r.length);s<l;s++)yield r[s]}A.slice=E;function S(r,s=Number.POSITIVE_INFINITY){const l=[];if(s===0)return[l,r];const _=r[Symbol.iterator]();for(let g=0;g<s;g++){const v=_.next();if(v.done)return[l,A.empty()];l.push(v.value)}return[l,{[Symbol.iterator](){return _}}]}A.consume=S;async function C(r){const s=[];for await(const l of r)s.push(l);return Promise.resolve(s)}A.asyncToArray=C})(M||(n.Iterable=M={}))}),Y(X[35],J([0,1]),func
|
||
|
`).slice(2).join(`
|
||
|
`))}}class c{constructor(v){this.value=v}}const m=2,f=(g,v)=>{if(g instanceof c)v(g);else for(let R=0;R<g.length;R++){const N=g[R];N&&v(N)}};class y{constructor(v){var R,N,D,x,T;this._size=0,this._options=v,this._leakageMon=e>0||!((R=this._options)===null||R===void 0)&&R.leakWarningThreshold?new a((D=(N=this._options)===null||N===void 0?void 0:N.leakWarningThreshold)!==null&&D!==void 0?D:e):void 0,this._perfMon=!((x=this._options)===null||x===void 0)&&x._profName?new L(this._options._profName):void 0,this._deliveryQueue=(T=this._options)===null||T===void 0?void 0:T.deliveryQueue}dispose(){var v,R,N,D;if(!this._disposed){if(this._disposed=!0,((v=this._deliveryQueue)===null||v===void 0?void 0:v.current)===this&&this._deliveryQueue.reset(),this._listeners){if(p){const x=this._listeners;queueMicrotask(()=>{f(x,T=>{var F;return(F=T.stack)===null||F===void 0?void 0:F.print()})})}this._listeners=void 0,this._size=0}(N=(R=this._options)===null||R===void 0?void 0:R.onDidRemoveLastListener)===null||N===void 0||N.call(R),(D=this._leakageMon)===null||D===void 0||D.dispose()}}get event(){var v;return(v=this._event)!==null&&v!==void 0||(this._event=(R,N,D)=>{var x,T,F,B,V;if(this._leakageMon&&this._size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),i.Disposable.None;if(this._disposed)return i.Disposable.None;N&&(R=R.bind(N));const k=new c(R);let O,I;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(k.stack=u.create(),O=this._leakageMon.check(k.stack,this._size+1)),p&&(k.stack=I??u.create()),this._listeners?this._listeners instanceof c?((V=this._deliveryQueue)!==null&&V!==void 0||(this._deliveryQueue=new E),this._listeners=[this._listeners,k]):this._listeners.push(k):((T=(x=this._options)===null||x===void 0?void 0:x.onWillAddFirstListener)===null||T===void 0||T.call(x,this),this._listeners=k,(B=(F=this._options)===null||F===void 0?void 0:F.onDidAddFirstListener)===null||B===void 0||B.call(F,this)),this._size++;const W=(0,i.toDisposable)(()=>{O?.(),this._removeListener(k)});return D instanceof i.DisposableStore?D.add(W):Array.isArray(D)&&D.push(W),W}),this._event}_removeListener(v){var R,N,D,x;if((N=(R=this._options)===null||R===void 0?void 0:R.onWillRemoveListener)===null||N===void 0||N.call(R,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(x=(D=this._options)===null||D===void 0?void 0:D.onDidRemoveLastListener)===null||x===void 0||x.call(D,this),this._size=0;return}const T=this._listeners,F=T.indexOf(v);if(F===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,T[F]=void 0;const B=this._deliveryQueue.current===this;if(this._size*m<=T.length){let V=0;for(let k=0;k<T.length;k++)T[k]?T[V++]=T[k]:B&&(this._deliveryQueue.end--,V<this._deliveryQueue.i&&this._deliveryQueue.i--);T.length=V}}_deliver(v,R){var N;if(!v)return;const D=((N=this._options)===null||N===void 0?void 0:N.onListenerError)||M.onUnexpectedError;if(!D){v.value(R);return}try{v.value(R)}catch(x){D(x)}}_deliverQueue(v){const R=v.current._listeners;for(;v.i<v.end;)this._deliver(R[v.i++],v.value);v.reset()}fire(v){var R,N,D,x;if(!((R=this._deliveryQueue)===null||R===void 0)&&R.current&&(this._deliverQueue(this._deliveryQueue),(N=this._perfMon)===null||N===void 0||N.stop()),(D=this._perfMon)===null||D===void 0||D.start(this._size),this._listeners)if(this._listeners instanceof c)this._deliver(this._listeners,v);else{const T=this._deliveryQueue;T.enqueue(this,v,this._listeners.length),this._deliverQueue(T)}(x=this._perfMon)===null||x===void 0||x.stop()}hasListeners(){return this._size>0}}n.Emitter=y;const w=()=>new E;n.createEventDeliveryQueue=w;class E{constructor(){this.i=-1,this.end=0}enqueue(v,R,N){this.i=0,this.end=N,this.current=v,this.value=R}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class S extends y{constructor(v){super(v),this._isPaused=0,this._eventQueue=n
|
||
|
`)}isStronglyEqual(d,b){return this.lines[d]===this.lines[b]}}n.LineSequence=M;function A(i){let d=0;for(;d<i.length&&(i.charCodeAt(d)===32||i.charCodeAt(d)===9);)d++;return d}}),Y(X[15],J([0,1]),function(q,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LineRangeFragment=n.isSpace=n.Array2D=void 0;class M{constructor(b,p){this.width=b,this.height=p,this.array=[],this.array=new Array(b*p)}get(b,p){return this.array[b+p*this.width]}set(b,p,h){this.array[b+p*this.width]=h}}n.Array2D=M;function A(d){return d===32||d===9}n.isSpace=A;class i{static getKey(b){let p=this.chrKeys.get(b);return p===void 0&&(p=this.chrKeys.size,this.chrKeys.set(b,p)),p}constructor(b,p,h){this.range=b,this.lines=p,this.source=h,this.histogram=[];let o=0;for(let L=b.startLineNumber-1;L<b.endLineNumberExclusive-1;L++){const e=p[L];for(let u=0;u<e.length;u++){o++;const c=e[u],m=i.getKey(c);this.histogram[m]=(this.histogram[m]||0)+1}o++;const a=i.getKey(`
|
||
|
`);this.histogram[a]=(this.histogram[a]||0)+1}this.totalCount=o}computeSimilarity(b){var p,h;let o=0;const L=Math.max(this.histogram.length,b.histogram.length);for(let e=0;e<L;e++)o+=Math.abs(((p=this.histogram[e])!==null&&p!==void 0?p:0)-((h=b.histogram[e])!==null&&h!==void 0?h:0));return 1-o/(this.totalCount+b.totalCount)}}n.LineRangeFragment=i,i.chrKeys=new Map}),Y(X[45],J([0,1,3,8,15]),function(q,n,M,A,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DynamicProgrammingDiffing=void 0;class d{compute(p,h,o=A.InfiniteTimeout.instance,L){if(p.length===0||h.length===0)return A.DiffAlgorithmResult.trivial(p,h);const e=new i.Array2D(p.length,h.length),a=new i.Array2D(p.length,h.length),u=new i.Array2D(p.length,h.length);for(let S=0;S<p.length;S++)for(let C=0;C<h.length;C++){if(!o.isValid())return A.DiffAlgorithmResult.trivialTimedOut(p,h);const r=S===0?0:e.get(S-1,C),s=C===0?0:e.get(S,C-1);let l;p.getElement(S)===h.getElement(C)?(S===0||C===0?l=0:l=e.get(S-1,C-1),S>0&&C>0&&a.get(S-1,C-1)===3&&(l+=u.get(S-1,C-1)),l+=L?L(S,C):1):l=-1;const _=Math.max(r,s,l);if(_===l){const g=S>0&&C>0?u.get(S-1,C-1):0;u.set(S,C,g+1),a.set(S,C,3)}else _===r?(u.set(S,C,0),a.set(S,C,1)):_===s&&(u.set(S,C,0),a.set(S,C,2));e.set(S,C,_)}const c=[];let m=p.length,f=h.length;function y(S,C){(S+1!==m||C+1!==f)&&c.push(new A.SequenceDiff(new M.OffsetRange(S+1,m),new M.OffsetRange(C+1,f))),m=S,f=C}let w=p.length-1,E=h.length-1;for(;w>=0&&E>=0;)a.get(w,E)===3?(y(w,E),w--,E--):a.get(w,E)===1?w--:E--;return y(-1,-1),c.reverse(),new A.DiffAlgorithmResult(c,!1)}}n.DynamicProgrammingDiffing=d}),Y(X[30],J([0,1,11,3,4,2,15]),function(q,n,M,A,i,d,b){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LinesSliceCharSequence=void 0;class p{constructor(u,c,m){this.lines=u,this.considerWhitespaceChanges=m,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let f=!1;c.start>0&&c.endExclusive>=u.length&&(c=new A.OffsetRange(c.start-1,c.endExclusive),f=!0),this.lineRange=c,this.firstCharOffsetByLine[0]=0;for(let y=this.lineRange.start;y<this.lineRange.endExclusive;y++){let w=u[y],E=0;if(f)E=w.length,w="",f=!1;else if(!m){const S=w.trimStart();E=w.length-S.length,w=S.trimEnd()}this.additionalOffsetByLine.push(E);for(let S=0;S<w.length;S++)this.elements.push(w.charCodeAt(S));y<u.length-1&&(this.elements.push(`
|
||
|
`.charCodeAt(0)),this.firstCharOffsetByLine[y-this.lineRange.start+1]=this.elements.length)}this.additionalOffsetByLine.push(0)}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new A.OffsetRange(0,this.length))}getText(u){return this.elements.slice(u.start,u.endExclusive).map(c=>String.fromCharCode(c)).join("")}getElement(u){return this.elements[u]}get length(){return this.elements.length}getBoundaryScore(u){const c=e(u>0?this.elements[u-1]:-1),m=e(u<this.elements.length?this.elements[u]:-1);if(c===7&&m===8)return 0;if(c===8)return 150;let f=0;return c!==m&&(f+=10,c===0&&m===1&&(f+=1)),f+=L(c),f+=L(m),f}translateOffset(u){if(this.lineRange.isEmpty)return new i.Position(this.lineRange.start+1,1);const c=(0,M.findLastIdxMonotonous)(this.firstCharOffsetByLine,m=>m<=u);return new i.Position(this.lineRange.start+c+1,u-this.firstCharOffsetByLine[c]+this.additionalOffsetByLine[c]+1)}translateRange(u){return d.Range.fromPositions(this.translateOffset(u.start),this.translateOffset(u.endExclusive))}findWordContaining(u){if(u<0||u>=this.elements.length||!h(this.elements[u]))return;let c=u;for(;c>0&&h(this.elements[c-1]);)c--;let m=u;for(;m<this.elements.length&&h(this.elements[m]);)m++;return new A.OffsetRange(c,m)}countLinesIn(u){return this.translateOffset(u.endExclusive).lineNumber-this.translateOffset(u.start).lineNumber}isStronglyEqual(u,c){return this.elements[u]===this.elements[c]}extendToFullLines(u){var c,m;const f=(c=(0,M.findLastMonotonous)(this.firstCharOffsetByLine,w=>w<=u.start))!==null&&c!==void 0?c:0,y=(m=(0,M.findFirstMonotonous)(this.firstCharOffsetByLine,w=>u.endExclusive<=w))!==null&&m!==void 0?m:this.elements.length;return new A.OffsetRange(f,y)}}n.LinesSliceCharSequence=p;function h(a){return a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57}const o={[0]:0,[1]:0,[2]:0,[3]:10,[4]:2,[5]:30,[6]:3,[7]:10,[8]:10};function L(a){return o[a]}function e(a){return a===10?8:a===13?7:(0,b.isSpace)(a)?6:a>=97&&a<=122?0:a>=65&&a<=90?1:a>=48&&a<=57?2:a===-1?3:a===44||a===59?5:4}}),Y(X[31],J([0,1]),function(q,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MovedText=n.LinesDiff=void 0;class M{constructor(d,b,p){this.changes=d,this.moves=b,this.hitTimeout=p}}n.LinesDiff=M;class A{constructor(d,b){this.lineRangeMapping=d,this.changes=b}}n.MovedText=A}),Y(X[16],J([0,1,10]),function(q,n,M){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RangeMapping=n.DetailedLineRangeMapping=n.LineRangeMapping=void 0;class A{static inverse(p,h,o){const L=[];let e=1,a=1;for(const c of p){const m=new A(new M.LineRange(e,c.original.startLineNumber),new M.LineRange(a,c.modified.startLineNumber));m.modified.isEmpty||L.push(m),e=c.original.endLineNumberExclusive,a=c.modified.endLineNumberExclusive}const u=new A(new M.LineRange(e,h+1),new M.LineRange(a,o+1));return u.modified.isEmpty||L.push(u),L}static clip(p,h,o){const L=[];for(const e of p){const a=e.original.intersect(h),u=e.modified.intersect(o);a&&!a.isEmpty&&u&&!u.isEmpty&&L.push(new A(a,u))}return L}constructor(p,h){this.original=p,this.modified=h}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new A(this.modified,this.original)}join(p){return new A(this.original.join(p.original),this.modified.join(p.modified))}}n.LineRangeMapping=A;class i extends A{constructor(p,h,o){super(p,h),this.innerChanges=o}flip(){var p;return new i(this.modified,this.original,(p=this.innerChanges)===null||p===void 0?void 0:p.map(h=>h.flip()))}}n.DetailedLineRangeMapping=i;class d{constructor(p,h){this.originalRange=p,this.modifiedRange=h}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new d(this.modifiedRange,this.originalRange)}}n.RangeMapping=d}),Y(X[46],J([0,1,8,16,7,11,37,10,3,30,15,29]),function(q,n,M,A,i,d,b,p,h,o,L,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.computeMovedLines=void 0;function a(E,S,C,r,s,l){let{moves:_,excludedChanges:g}=c(E,S,C,l);if(!l.isValid())return[];const v=E.filter(N=>!g.has(N)),R=m(v,r,s,S,C,l);return(0,i.pushMany)(_,
|
||
|
`).length>=15&&u(D,T=>T.length>=2)>=2}),_=w(E,_),_}n.computeMovedLines=a;function u(E,S){let C=0;for(const r of E)S(r)&&C++;return C}function c(E,S,C,r){const s=[],l=E.filter(v=>v.modified.isEmpty&&v.original.length>=3).map(v=>new L.LineRangeFragment(v.original,S,v)),_=new Set(E.filter(v=>v.original.isEmpty&&v.modified.length>=3).map(v=>new L.LineRangeFragment(v.modified,C,v))),g=new Set;for(const v of l){let R=-1,N;for(const D of _){const x=v.computeSimilarity(D);x>R&&(R=x,N=D)}if(R>.9&&N&&(_.delete(N),s.push(new A.LineRangeMapping(v.range,N.range)),g.add(v.source),g.add(N.source)),!r.isValid())return{moves:s,excludedChanges:g}}return{moves:s,excludedChanges:g}}function m(E,S,C,r,s,l){const _=[],g=new b.SetMap;for(const x of E)for(let T=x.original.startLineNumber;T<x.original.endLineNumberExclusive-2;T++){const F=`${S[T-1]}:${S[T+1-1]}:${S[T+2-1]}`;g.add(F,{range:new p.LineRange(T,T+3)})}const v=[];E.sort((0,i.compareBy)(x=>x.modified.startLineNumber,i.numberComparator));for(const x of E){let T=[];for(let F=x.modified.startLineNumber;F<x.modified.endLineNumberExclusive-2;F++){const B=`${C[F-1]}:${C[F+1-1]}:${C[F+2-1]}`,V=new p.LineRange(F,F+3),k=[];g.forEach(B,({range:O})=>{for(const W of T)if(W.originalLineRange.endLineNumberExclusive+1===O.endLineNumberExclusive&&W.modifiedLineRange.endLineNumberExclusive+1===V.endLineNumberExclusive){W.originalLineRange=new p.LineRange(W.originalLineRange.startLineNumber,O.endLineNumberExclusive),W.modifiedLineRange=new p.LineRange(W.modifiedLineRange.startLineNumber,V.endLineNumberExclusive),k.push(W);return}const I={modifiedLineRange:V,originalLineRange:O};v.push(I),k.push(I)}),T=k}if(!l.isValid())return[]}v.sort((0,i.reverseOrder)((0,i.compareBy)(x=>x.modifiedLineRange.length,i.numberComparator)));const R=new p.LineRangeSet,N=new p.LineRangeSet;for(const x of v){const T=x.modifiedLineRange.startLineNumber-x.originalLineRange.startLineNumber,F=R.subtractFrom(x.modifiedLineRange),B=N.subtractFrom(x.originalLineRange).getWithDelta(T),V=F.getIntersection(B);for(const k of V.ranges){if(k.length<3)continue;const O=k,I=k.delta(-T);_.push(new A.LineRangeMapping(I,O)),R.addRange(O),N.addRange(I)}}_.sort((0,i.compareBy)(x=>x.original.startLineNumber,i.numberComparator));const D=new d.MonotonousArray(E);for(let x=0;x<_.length;x++){const T=_[x],F=D.findLastMonotonous(G=>G.original.startLineNumber<=T.original.startLineNumber),B=(0,d.findLastMonotonous)(E,G=>G.modified.startLineNumber<=T.modified.startLineNumber),V=Math.max(T.original.startLineNumber-F.original.startLineNumber,T.modified.startLineNumber-B.modified.startLineNumber),k=D.findLastMonotonous(G=>G.original.startLineNumber<T.original.endLineNumberExclusive),O=(0,d.findLastMonotonous)(E,G=>G.modified.startLineNumber<T.modified.endLineNumberExclusive),I=Math.max(k.original.endLineNumberExclusive-T.original.endLineNumberExclusive,O.modified.endLineNumberExclusive-T.modified.endLineNumberExclusive);let W;for(W=0;W<V;W++){const G=T.original.startLineNumber-W-1,t=T.modified.startLineNumber-W-1;if(G>r.length||t>s.length||R.contains(t)||N.contains(G)||!f(r[G-1],s[t-1],l))break}W>0&&(N.addRange(new p.LineRange(T.original.startLineNumber-W,T.original.startLineNumber)),R.addRange(new p.LineRange(T.modified.startLineNumber-W,T.modified.startLineNumber)));let z;for(z=0;z<I;z++){const G=T.original.endLineNumberExclusive+z,t=T.modified.endLineNumberExclusive+z;if(G>r.length||t>s.length||R.contains(t)||N.contains(G)||!f(r[G-1],s[t-1],l))break}z>0&&(N.addRange(new p.LineRange(T.original.endLineNumberExclusive,T.original.endLineNumberExclusive+z)),R.addRange(new p.LineRange(T.modified.endLineNumberExclusive,T.modified.endLineNumberExclusive+z))),(W>0||z>0)&&(_[x]=new A.LineRangeMapping(new p.LineRange(T.original.startLineNumber-W,T.original.endLineNumberExclusive+z),new p.LineRange(T.modified.startLineNumber-W,T.modified.endLineNumberExclusive+z)))}return _}function f(E,S,C){if(E.trim()===S.trim())return!0;if(E.length>300&&S.length>300)return!1;const s=new e.MyersDiffAlgorithm().compute(new o.LinesSliceCharSequence([E],new h.OffsetRange(0,1),!1),new o
|
||
|
`)>=0;let E=null;try{E=M.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:w,global:!0,unicode:!0})}catch{return null}if(!E)return null;let S=!this.isRegex&&!w;return S&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(S=this.matchCase),new b.SearchData(E,this.wordSeparators?(0,A.getMapForWordSeparators)(this.wordSeparators):null,S?this.searchString:null)}}n.SearchParams=h;function o(y){if(!y||y.length===0)return!1;for(let w=0,E=y.length;w<E;w++){const S=y.charCodeAt(w);if(S===10)return!0;if(S===92){if(w++,w>=E)break;const C=y.charCodeAt(w);if(C===110||C===114||C===87)return!0}}return!1}n.isMultilineRegexSource=o;function L(y,w,E){if(!E)return new b.FindMatch(y,null);const S=[];for(let C=0,r=w.length;C<r;C++)S[C]=w[C];return new b.FindMatch(y,S)}n.createFindMatch=L;class e{constructor(w){const E=[];let S=0;for(let C=0,r=w.length;C<r;C++)w.charCodeAt(C)===10&&(E[S++]=C);this._lineFeedsOffsets=E}findLineFeedCountBeforeOffset(w){const E=this._lineFeedsOffsets;let S=0,C=E.length-1;if(C===-1||w<=E[0])return 0;for(;S<C;){const r=S+((C-S)/2>>0);E[r]>=w?C=r-1:E[r+1]>=w?(S=r,C=r):S=r+1}return S+1}}class a{static findMatches(w,E,S,C,r){const s=E.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(w,S,new f(s.wordSeparators,s.regex),C,r):this._doFindMatchesLineByLine(w,S,s,C,r):[]}static _getMultilineMatchRange(w,E,S,C,r,s){let l,_=0;C?(_=C.findLineFeedCountBeforeOffset(r),l=E+r+_):l=E+r;let g;if(C){const D=C.findLineFeedCountBeforeOffset(r+s.length)-_;g=l+s.length+D}else g=l+s.length;const v=w.getPositionAt(l),R=w.getPositionAt(g);return new d.Range(v.lineNumber,v.column,R.lineNumber,R.column)}static _doFindMatchesMultiline(w,E,S,C,r){const s=w.getOffsetAt(E.getStartPosition()),l=w.getValueInRange(E,1),_=w.getEOL()===`\r
|
||
|
`?new e(l):null,g=[];let v=0,R;for(S.reset(0);R=S.next(l);)if(g[v++]=L(this._getMultilineMatchRange(w,s,l,_,R.index,R[0]),R,C),v>=r)return g;return g}static _doFindMatchesLineByLine(w,E,S,C,r){const s=[];let l=0;if(E.startLineNumber===E.endLineNumber){const g=w.getLineContent(E.startLineNumber).substring(E.startColumn-1,E.endColumn-1);return l=this._findMatchesInLine(S,g,E.startLineNumber,E.startColumn-1,l,s,C,r),s}const _=w.getLineContent(E.startLineNumber).substring(E.startColumn-1);l=this._findMatchesInLine(S,_,E.startLineNumber,E.startColumn-1,l,s,C,r);for(let g=E.startLineNumber+1;g<E.endLineNumber&&l<r;g++)l=this._findMatchesInLine(S,w.getLineContent(g),g,0,l,s,C,r);if(l<r){const g=w.getLineContent(E.endLineNumber).substring(0,E.endColumn-1);l=this._findMatchesInLine(S,g,E.endLineNumber,0,l,s,C,r)}return s}static _findMatchesInLine(w,E,S,C,r,s,l,_){const g=w.wordSeparators;if(!l&&w.simpleSearch){const N=w.simpleSearch,D=N.length,x=E.length;let T=-D;for(;(T=E.indexOf(N,T+D))!==-1;)if((!g||m(g,E,x,T,D))&&(s[r++]=new b.FindMatch(new d.Range(S,T+1+C,S,T+1+D+C),null),r>=_))return r;return r}const v=new f(w.wordSeparators,w.regex);let R;v.reset(0);do if(R=v.next(E),R&&(s[r++]=L(new d.Range(S,R.index+1+C,S,R.index+1+R[0].length+C),R,l),r>=_))return r;while(R);return r}static findNextMatch(w,E,S,C){const r=E.parseSearchRequest();if(!r)return null;const s=new f(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(w,S,s,C):this._doFindNextMatchLineByLine(w,S,s,C)}static _doFindNextMatchMultiline(w,E,S,C){const r=new i.Position(E.lineNumber,1),s=w.getOffsetAt(r),l=w.getLineCount(),_=w.getValueInRange(new d.Range(r.lineNumber,r.column,l,w.getLineMaxColumn(l)),1),g=w.getEOL()===`\r
|
||
|
`?new e(_):null;S.reset(E.column-1);const v=S.next(_);return v?L(this._getMultilineMatchRange(w,s,_,g,v.index,v[0]),v,C):E.lineNumber!==1||E.column!==1?this._doFindNextMatchMultiline(w,new i.Position(1,1),S,C):null}static _doFindNextMatchLineByLine(w,E,S,C){const r=w.getLineCount(),s=E.lineNumber,l=w.getLineContent(s),_=this._findFirstMatchInLine(S,l,s,E.column,C);if(_)return _;for(let g=1;g<=r;g++){const v=(s+g-1)%r,R=w.getLineContent(v+1),N=this._findFirstMatchInLine(S,R,v+1,1,C);if(N)return N}return null}static _findFirstMatchInLine(w,E,S,C,r){w.reset(C-1);const s=w.next(E);return s?L(new d.Range(S,s.index+1,S,s.index+1+s[0].length),s,r):null}static findPreviousMatch(w,E,S,C){const r=E.parseSearchRequest();if(!r)return null;const s=new f(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(w,S,s,C):this._doFindPreviousMatchLineByLine(w,S,s,C)}static _doFindPreviousMatchMultiline(w,E,S,C){const r=this._doFindMatchesMultiline(w,new d.Range(1,1,E.lineNumber,E.column),S,C,10*p);if(r.length>0)return r[r.length-1];const s=w.getLineCount();return E.lineNumber!==s||E.column!==w.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(w,new i.Position(s,w.getLineMaxColumn(s)),S,C):null}static _doFindPreviousMatchLineByLine(w,E,S,C){const r=w.getLineCount(),s=E.lineNumber,l=w.getLineContent(s).substring(0,E.column-1),_=this._findLastMatchInLine(S,l,s,C);if(_)return _;for(let g=1;g<=r;g++){const v=(r+s-g-1)%r,R=w.getLineContent(v+1),N=this._findLastMatchInLine(S,R,v+1,C);if(N)return N}return null}static _findLastMatchInLine(w,E,S,C){let r=null,s;for(w.reset(0);s=w.next(E);)r=L(new d.Range(S,s.index+1,S,s.index+1+s[0].length),s,C);return r}}n.TextModelSearch=a;function u(y,w,E,S,C){if(S===0)return!0;const r=w.charCodeAt(S-1);if(y.get(r)!==0||r===13||r===10)return!0;if(C>0){const s=w.charCodeAt(S);if(y.get(s)!==0)return!0}return!1}function c(y,w,E,S,C){if(S+C===E)return!0;const r=w.charCodeAt(S+C);if(y.get(r)!==0||r===13||r===10)return!0;if(C>0){const s=w.charCodeAt(S+C-1);if(y.get(s)!==0)return!0}return!1}function m(y,w,E,S,C){return u(y,w,E,S,C)&&c(y,w,E,S,C)}n.isValidMatch=m;class f{constructor(w,E){this._wordSeparators=w,this._searchRegex=E,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(w){this._searchRegex.lastIndex=w,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(w){const E=w.length;let S;do{if(this._prevMatchStartIndex+this._prevMatchLength===E||(S=this._searchRegex.exec(w),!S))return null;const C=S.index,r=S[0].length;if(C===this._prevMatchStartIndex&&r===this._prevMatchLength){if(r===0){M.getNextCodePoint(w,E,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=C,this._prevMatchLength=r,!this._wordSeparators||m(this._wordSeparators,w,E,C,r))return S}while(S);return null}}n.Searcher=f}),Y(X[57],J([0,1,2,56,6,12,28]),function(q,n,M,A,i,d,b){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeTextModelHighlighter=void 0;class p{static computeUnicodeHighlights(a,u,c){const m=c?c.startLineNumber:1,f=c?c.endLineNumber:a.getLineCount(),y=new o(u),w=y.getCandidateCodePoints();let E;w==="allNonBasicAscii"?E=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):E=new RegExp(`${h(Array.from(w))}`,"g");const S=new A.Searcher(null,E),C=[];let r=!1,s,l=0,_=0,g=0;e:for(let v=m,R=f;v<=R;v++){const N=a.getLineContent(v),D=N.length;S.reset(0);do if(s=S.next(N),s){let x=s.index,T=s.index+s[0].length;if(x>0){const k=N.charCodeAt(x-1);i.isHighSurrogate(k)&&x--}if(T+1<D){const k=N.charCodeAt(T-1);i.isHighSurrogate(k)&&T++}const F=N.substring(x,T);let B=(0,b.getWordAtText)(x+1,b.DEFAULT_WORD_REGEXP,N,0);B&&B.endColumn<=x+1&&(B=null);const V=y.shouldHighlightNonBasicASCII(F,B?B.word:null);if(V!==0){V===3?l++:V===2?_++:V===1?g++:(0,d.assertNever)(V);const k=1e3;if(C.length>=k){r=!0;break e}C.push(new M.Range(v,x+1,v,T+1))}}while(s)}return{ranges:C,hasMore:r,ambiguousCharacterCount:l,invisibleCharacterCount:_,nonBasicAsciiCharacterCount:g}}static computeUnicodeHighlightReason(a,u){const c=new o
|
||
|
`||e===" "}}),Y(X[58],J([0,1]),function(q,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WrappingIndent=n.TrackedRangeStickiness=n.TextEditorCursorStyle=n.TextEditorCursorBlinkingStyle=n.SymbolTag=n.SymbolKind=n.SignatureHelpTriggerKind=n.ShowLightbulbIconMode=n.SelectionDirection=n.ScrollbarVisibility=n.ScrollType=n.RenderMinimap=n.RenderLineNumbersType=n.PositionAffinity=n.OverviewRulerLane=n.OverlayWidgetPositionPreference=n.MouseTargetType=n.MinimapPosition=n.MarkerTag=n.MarkerSeverity=n.KeyCode=n.InlineCompletionTriggerKind=n.InlayHintKind=n.InjectedTextCursorStops=n.IndentAction=n.GlyphMarginLane=n.EndOfLineSequence=n.EndOfLinePreference=n.EditorOption=n.EditorAutoIndentStrategy=n.DocumentHighlightKind=n.DefaultEndOfLine=n.CursorChangeReason=n.ContentWidgetPositionPreference=n.CompletionTriggerKind=n.CompletionItemTag=n.CompletionItemKind=n.CompletionItemInsertTextRule=n.CodeActionTriggerType=n.AccessibilitySupport=void 0;var M;(function(t){t[t.Unknown=0]="Unknown",t[t.Disabled=1]="Disabled",t[t.Enabled=2]="Enabled"})(M||(n.AccessibilitySupport=M={}));var A;(function(t){t[t.Invoke=1]="Invoke",t[t.Auto=2]="Auto"})(A||(n.CodeActionTriggerType=A={}));var i;(function(t){t[t.None=0]="None",t[t.KeepWhitespace=1]="KeepWhitespace",t[t.InsertAsSnippet=4]="InsertAsSnippet"})(i||(n.CompletionItemInsertTextRule=i={}));var d;(function(t){t[t.Method=0]="Method",t[t.Function=1]="Function",t[t.Constructor=2]="Constructor",t[t.Field=3]="Field",t[t.Variable=4]="Variable",t[t.Class=5]="Class",t[t.Struct=6]="Struct",t[t.Interface=7]="Interface",t[t.Module=8]="Module",t[t.Property=9]="Property",t[t.Event=10]="Event",t[t.Operator=11]="Operator",t[t.Unit=12]="Unit",t[t.Value=13]="Value",t[t.Constant=14]="Constant",t[t.Enum=15]="Enum",t[t.EnumMember=16]="EnumMember",t[t.Keyword=17]="Keyword",t[t.Text=18]="Text",t[t.Color=19]="Color",t[t.File=20]="File",t[t.Reference=21]="Reference",t[t.Customcolor=22]="Customcolor",t[t.Folder=23]="Folder",t[t.TypeParameter=24]="TypeParameter",t[t.User=25]="User",t[t.Issue=26]="Issue",t[t.Snippet=27]="Snippet"})(d||(n.CompletionItemKind=d={}));var b;(function(t){t[t.Deprecated=1]="Deprecated"})(b||(n.CompletionItemTag=b={}));var p;(function(t){t[t.Invoke=0]="Invoke",t[t.TriggerCharacter=1]="TriggerCharacter",t[t.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(p||(n.CompletionTriggerKind=p={}));var h;(function(t){t[t.EXACT=0]="EXACT",t[t.ABOVE=1]="ABOVE",t[t.BELOW=2]="BELOW"})(h||(n.ContentWidgetPositionPreference=h={}));var o;(function(t){t[t.NotSet=0]="NotSet",t[t.ContentFlush=1]="ContentFlush",t[t.RecoverFromMarkers=2]="RecoverFromMarkers",t[t.Explicit=3]="Explicit",t[t.Paste=4]="Paste",t[t.Undo=5]="Undo",t[t.Redo=6]="Redo"})(o||(n.CursorChangeReason=o={}));var L;(function(t){t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(L||(n.DefaultEndOfLine=L={}));var e;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(e||(n.DocumentHighlightKind=e={}));var a;(function(t){t[t.None=0]="None",t[t.Keep=1]="Keep",t[t.Brackets=2]="Brackets",t[t.Advanced=3]="Advanced",t[t.Full=4]="Full"})(a||(n.EditorAutoIndentStrategy=a={}));var u;(function(t){t[t.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",t[t.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",t[t.accessibilitySupport=2]="accessibilitySupport",t[t.accessibilityPageSize=3]="accessibilityPageSize",t[t.ariaLabel=4]="ariaLabel",t[t.ariaRequired=5]="ariaRequired",t[t.autoClosingBrackets=6]="autoClosingBrackets",t[t.autoClosingComments=7]="autoClosingComments",t[t.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",t[t.autoClosingDelete=9]="autoClosingDelete",t[t.autoClosingOvertype=10]="autoClosingOvertype",t[t.autoClosingQuotes=11]="autoClosingQuotes",t[t.autoIndent=12]="autoIndent",t[t.automaticLayout=13]="automaticLayout",t[t.autoSurround=14]="autoSurround",t[t.bracketPairColorization=15]="bracketPairColorization",t[t.guides=16]="guides",t[t.codeLens=17]="codeLens",t[t.codeLensFontFamily=18]="codeLensFontFamily",t[t.codeLensFontSize=19]="codeLensFontSize",t[t.
|
||
|
|
||
|
//# sourceMappingURL=../../../../min-maps/vs/base/worker/workerMain.js.map
|