monaco-editor 0.58.0-dev-20261103 → 0.58.0-dev-20261104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dev/vs/assets/{css.worker-BXibjW7G.js → css.worker-DESIYBwQ.js} +20 -8
  3. package/dev/vs/assets/{editor.worker-rm-mUaEO.js → editor.worker-CppF1oFi.js} +20 -8
  4. package/dev/vs/assets/{editorWebWorkerMain-BYRxwar0.js → editorWebWorkerMain-DyiGQOs1.js} +20 -8
  5. package/dev/vs/assets/{html.worker-CrmruGcV.js → html.worker-DY_H8Rph.js} +20 -8
  6. package/dev/vs/assets/{json.worker-CsrWcsbY.js → json.worker-oX8QwmNq.js} +20 -8
  7. package/dev/vs/assets/{ts.worker-BsddPuAD.js → ts.worker-DUEl_a37.js} +20 -8
  8. package/dev/vs/basic-languages/monaco.contribution.js +18 -18
  9. package/dev/vs/{css.worker-Cbj6Lgyl.js → css.worker-DFHtiq4d.js} +2 -2
  10. package/dev/vs/{cssMode-DDsK7kN3.js → cssMode-Guam2rGs.js} +1 -1
  11. package/dev/vs/editor/editor.main.js +2 -2
  12. package/dev/vs/editor/editor.worker.js +1 -1
  13. package/dev/vs/{editor-DKS349od.js → editor-DF6tMWQk.js} +54 -15
  14. package/dev/vs/editor.js +1 -1
  15. package/dev/vs/{editorWorkerHost-C8IUfXRE.js → editorWorkerHost-BrD97KZc.js} +21 -9
  16. package/dev/vs/{freemarker2-mKL_tDAS.js → freemarker2-DrGcYj_K.js} +1 -1
  17. package/dev/vs/{handlebars-0cbIdUh5.js → handlebars-Bmcjf2xK.js} +1 -1
  18. package/dev/vs/{html-B7tWGiS1.js → html-BgW5PWQR.js} +1 -1
  19. package/dev/vs/{html.worker-8rO_Ej2A.js → html.worker-BeohPVLi.js} +2 -2
  20. package/dev/vs/{htmlMode-CY_haO3T.js → htmlMode-DyvGKX8J.js} +1 -1
  21. package/dev/vs/{index-3iBj28Mi.js → index-BRU9aHBj.js} +1 -1
  22. package/dev/vs/index.js +1 -1
  23. package/dev/vs/{initialize-ItNUYCgW.js → initialize-BSHQu8w-.js} +1 -1
  24. package/dev/vs/{javascript-BPzI8Zuf.js → javascript-Ctf5wke0.js} +1 -1
  25. package/dev/vs/{json.worker-Bza_nH_U.js → json.worker-9rCOnos8.js} +2 -2
  26. package/dev/vs/{jsonMode-BMa6sTpi.js → jsonMode-CYkEX0Ie.js} +1 -1
  27. package/dev/vs/language/css/css.worker.js +1 -1
  28. package/dev/vs/language/css/monaco.contribution.js +1 -1
  29. package/dev/vs/language/html/html.worker.js +1 -1
  30. package/dev/vs/language/html/monaco.contribution.js +1 -1
  31. package/dev/vs/language/json/json.worker.js +1 -1
  32. package/dev/vs/language/json/monaco.contribution.js +1 -1
  33. package/dev/vs/language/typescript/monaco.contribution.js +1 -1
  34. package/dev/vs/language/typescript/ts.worker.js +1 -1
  35. package/dev/vs/{liquid-TWvvsWgh.js → liquid-BV9lgBju.js} +1 -1
  36. package/dev/vs/{lspLanguageFeatures-CAQu2Ud8.js → lspLanguageFeatures-B9p3JwAQ.js} +1 -1
  37. package/dev/vs/{mdx-D72RTe8f.js → mdx-CSxdJtqM.js} +1 -1
  38. package/dev/vs/{monaco.contribution-b4fF5a-f.js → monaco.contribution-BN8B6XbA.js} +2 -2
  39. package/dev/vs/{monaco.contribution-B_1bsLaH.js → monaco.contribution-D17crWJI.js} +2 -2
  40. package/dev/vs/{monaco.contribution-39YZ4VV2.js → monaco.contribution-D71RVSWA.js} +2 -2
  41. package/dev/vs/{monaco.contribution-D7iHvEWH.js → monaco.contribution-fpT5dkmM.js} +2 -2
  42. package/dev/vs/nls/lang/cs.js +1 -1
  43. package/dev/vs/nls/lang/de.js +1 -1
  44. package/dev/vs/nls/lang/es.js +1 -1
  45. package/dev/vs/nls/lang/fr.js +1 -1
  46. package/dev/vs/nls/lang/it.js +1 -1
  47. package/dev/vs/nls/lang/ja.js +1 -1
  48. package/dev/vs/nls/lang/ko.js +1 -1
  49. package/dev/vs/nls/lang/pl.js +1 -1
  50. package/dev/vs/nls/lang/pt-br.js +1 -1
  51. package/dev/vs/nls/lang/ru.js +1 -1
  52. package/dev/vs/nls/lang/tr.js +1 -1
  53. package/dev/vs/nls/lang/zh-cn.js +1 -1
  54. package/dev/vs/nls/lang/zh-tw.js +1 -1
  55. package/dev/vs/{python-BEA_VDf5.js → python-gCVTY2As.js} +1 -1
  56. package/dev/vs/{razor-B_Y4fRDb.js → razor-MTyQNNGT.js} +1 -1
  57. package/dev/vs/{toggleHighContrast-CgFa878v.js → toggleHighContrast-Dfvc48QX.js} +7 -3
  58. package/dev/vs/{ts.worker-CMIpX4_0.js → ts.worker-0RUqlvnL.js} +2 -2
  59. package/dev/vs/{tsMode-BhOzGsil.js → tsMode-lNfx3LCH.js} +1 -1
  60. package/dev/vs/{typescript-CW5I38Ex.js → typescript-gtYyab66.js} +1 -1
  61. package/dev/vs/{workers-DcW-LZDs.js → workers-lYFND6u7.js} +1 -1
  62. package/dev/vs/{xml-BJKDlWxj.js → xml-DnrNJXZW.js} +1 -1
  63. package/dev/vs/{yaml-DcAjn74d.js → yaml-CAyBlbtS.js} +1 -1
  64. package/esm/vs/base/common/htmlContent.js +58 -12
  65. package/esm/vs/editor/browser/services/openerService.js +1 -0
  66. package/esm/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +22 -9
  67. package/esm/vs/editor/contrib/hover/browser/contentHoverController.js +7 -1
  68. package/esm/vs/editor/contrib/links/browser/links.js +3 -2
  69. package/esm/vs/nls/lang/cs.js +1 -1
  70. package/esm/vs/nls/lang/de.js +1 -1
  71. package/esm/vs/nls/lang/es.js +1 -1
  72. package/esm/vs/nls/lang/fr.js +1 -1
  73. package/esm/vs/nls/lang/it.js +1 -1
  74. package/esm/vs/nls/lang/ja.js +1 -1
  75. package/esm/vs/nls/lang/ko.js +1 -1
  76. package/esm/vs/nls/lang/pl.js +1 -1
  77. package/esm/vs/nls/lang/pt-br.js +1 -1
  78. package/esm/vs/nls/lang/ru.js +1 -1
  79. package/esm/vs/nls/lang/tr.js +1 -1
  80. package/esm/vs/nls/lang/zh-cn.js +1 -1
  81. package/esm/vs/nls/lang/zh-tw.js +1 -1
  82. package/esm/vs/platform/contextkey/common/contextkey.js +19 -5
  83. package/min/vs/assets/{css.worker-Dcv39cro.js → css.worker-a7umI0D1.js} +18 -18
  84. package/min/vs/assets/{editor.worker-Ds78qao_.js → editor.worker-CC6lDIxY.js} +16 -16
  85. package/min/vs/assets/{editorWebWorkerMain-BKhlQlwl.js → editorWebWorkerMain-BWlaP2f4.js} +16 -16
  86. package/min/vs/assets/{html.worker-CRx6sQRc.js → html.worker-zP8vHgN3.js} +21 -21
  87. package/min/vs/assets/{json.worker-DUgsMPK4.js → json.worker-DE2TCxpt.js} +18 -18
  88. package/min/vs/assets/{ts.worker-BsBMEI-E.js → ts.worker-vInZejeo.js} +69 -69
  89. package/min/vs/basic-languages/monaco.contribution.js +1 -1
  90. package/min/vs/css.worker-QzHgaAJ7.js +1 -0
  91. package/min/vs/{cssMode-x3bYRp97.js → cssMode-21aQyB2V.js} +1 -1
  92. package/min/vs/editor/editor.main.js +1 -1
  93. package/min/vs/editor/editor.worker.js +1 -1
  94. package/min/vs/{editor-DCqhdM2J.js → editor-CVVSB8S-.js} +81 -81
  95. package/min/vs/editor.js +1 -1
  96. package/min/vs/{editorWorkerHost-D_Q8nkQ1.js → editorWorkerHost-DCgdFL1U.js} +19 -19
  97. package/min/vs/{freemarker2-DLRyyVzK.js → freemarker2-BabxpVbD.js} +1 -1
  98. package/min/vs/{handlebars-AlA7PZUi.js → handlebars-zr3bo0Ub.js} +1 -1
  99. package/min/vs/{html-BsRVzZQ5.js → html-pPvg34jI.js} +1 -1
  100. package/min/vs/html.worker-J7edfwz2.js +1 -0
  101. package/min/vs/{htmlMode-B3eOM2eK.js → htmlMode-BTqXNuP4.js} +1 -1
  102. package/min/vs/{index-B0VP4pSX.js → index-DDqjZ0I3.js} +1 -1
  103. package/min/vs/index.js +1 -1
  104. package/min/vs/{initialize-Dm2jEtk_.js → initialize-pMMwcb-F.js} +1 -1
  105. package/min/vs/{javascript-BlVqaSgt.js → javascript-CiU4wPNE.js} +1 -1
  106. package/min/vs/json.worker-gZro_g3b.js +1 -0
  107. package/min/vs/{jsonMode-B_kyvD_h.js → jsonMode-BwbdsVhd.js} +1 -1
  108. package/min/vs/language/css/css.worker.js +1 -1
  109. package/min/vs/language/css/monaco.contribution.js +1 -1
  110. package/min/vs/language/html/html.worker.js +1 -1
  111. package/min/vs/language/html/monaco.contribution.js +1 -1
  112. package/min/vs/language/json/json.worker.js +1 -1
  113. package/min/vs/language/json/monaco.contribution.js +1 -1
  114. package/min/vs/language/typescript/monaco.contribution.js +1 -1
  115. package/min/vs/language/typescript/ts.worker.js +1 -1
  116. package/min/vs/{liquid-C-80sK-s.js → liquid-DjX2Xx5z.js} +1 -1
  117. package/min/vs/{lspLanguageFeatures-Dchqf_5B.js → lspLanguageFeatures-Bp5xeULG.js} +1 -1
  118. package/min/vs/{mdx-CsCH1P23.js → mdx-BZFOM-qD.js} +1 -1
  119. package/min/vs/{monaco.contribution-CgWraPpD.js → monaco.contribution-BG-08Y3Q.js} +1 -1
  120. package/min/vs/{monaco.contribution-BBOWNKe4.js → monaco.contribution-CT0TePjC.js} +1 -1
  121. package/min/vs/{monaco.contribution-CQMdDc0R.js → monaco.contribution-D_KLW_2C.js} +1 -1
  122. package/min/vs/{monaco.contribution-B0e4tKKO.js → monaco.contribution-tfii8wBX.js} +1 -1
  123. package/min/vs/nls/lang/cs.js +1 -1
  124. package/min/vs/nls/lang/de.js +1 -1
  125. package/min/vs/nls/lang/es.js +1 -1
  126. package/min/vs/nls/lang/fr.js +1 -1
  127. package/min/vs/nls/lang/it.js +1 -1
  128. package/min/vs/nls/lang/ja.js +1 -1
  129. package/min/vs/nls/lang/ko.js +1 -1
  130. package/min/vs/nls/lang/pl.js +1 -1
  131. package/min/vs/nls/lang/pt-br.js +1 -1
  132. package/min/vs/nls/lang/ru.js +1 -1
  133. package/min/vs/nls/lang/tr.js +1 -1
  134. package/min/vs/nls/lang/zh-cn.js +1 -1
  135. package/min/vs/nls/lang/zh-tw.js +1 -1
  136. package/min/vs/{python-CpaqYDlz.js → python-Slsham_D.js} +1 -1
  137. package/min/vs/{razor-5aUqxT5R.js → razor-D6InWGBH.js} +1 -1
  138. package/min/vs/{toggleHighContrast-Si6AE5-d.js → toggleHighContrast-D0EBu6So.js} +3 -3
  139. package/min/vs/ts.worker-BNzmpWTW.js +1 -0
  140. package/min/vs/{tsMode-DnNOhxB1.js → tsMode-CJhgeMjf.js} +1 -1
  141. package/min/vs/{typescript-CbCtrC5M.js → typescript-DzDVJEDO.js} +1 -1
  142. package/min/vs/{workers-BvZSPxig.js → workers-DKVfNyNO.js} +1 -1
  143. package/min/vs/{xml-CpsiMgp1.js → xml-DF-kq5UK.js} +1 -1
  144. package/min/vs/{yaml-BsiS2ov2.js → yaml-fw0wdumt.js} +1 -1
  145. package/package.json +5 -5
  146. package/min/vs/css.worker-zn-SRDmD.js +0 -1
  147. package/min/vs/html.worker-DgjxB0R_.js +0 -1
  148. package/min/vs/json.worker-wUA-Y1Kg.js +0 -1
  149. package/min/vs/ts.worker-D3mizVFr.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Monaco Editor Changelog
2
2
 
3
+ ## [0.57.1]
4
+
5
+ ### Breaking Changes
6
+
7
+ - Markdown rendered by the editor (hovers, suggestion details, parameter hints, inline completion warnings, editor messages) no longer loads remote images by default. `data:` images are still shown. Use the new `markdownImages.allowedOrigins` editor option to allow images from specific origins (for example `['https://img.shields.io']`), or set it to `true` to allow all remote images as before.
8
+
9
+ ### Updates
10
+
11
+ - Updates the editor core to VS Code commit `3bc96745d6414f97cd0c09e753ecf698b7829101`, validated in `0.58.0-dev-20261103`.
12
+ - Updates bundled DOMPurify from 3.4.15 to 3.4.17.
13
+
3
14
  ## [0.57.0]
4
15
 
5
16
  ### New Features and APIs
@@ -12153,14 +12153,17 @@
12153
12153
  this.myersDiffingAlgorithm = new MyersDiffAlgorithm();
12154
12154
  }
12155
12155
  computeDiff(originalLines, modifiedLines, options) {
12156
+ return this._computeDiff(originalLines, modifiedLines, options);
12157
+ }
12158
+ _computeDiff(originalLines, modifiedLines, options, rawChanges) {
12156
12159
  if (originalLines.length <= 1 && equals(originalLines, modifiedLines, (a2, b) => a2 === b)) {
12157
12160
  return new LinesDiff([], [], false);
12158
12161
  }
12159
12162
  if (originalLines.length === 1 && originalLines[0].length === 0 || modifiedLines.length === 1 && modifiedLines[0].length === 0) {
12163
+ const rangeMapping = new RangeMapping(new Range$1(1, 1, originalLines.length, originalLines[originalLines.length - 1].length + 1), new Range$1(1, 1, modifiedLines.length, modifiedLines[modifiedLines.length - 1].length + 1));
12164
+ rawChanges?.push(rangeMapping);
12160
12165
  return new LinesDiff([
12161
- new DetailedLineRangeMapping(new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [
12162
- new RangeMapping(new Range$1(1, 1, originalLines.length, originalLines[originalLines.length - 1].length + 1), new Range$1(1, 1, modifiedLines.length, modifiedLines[modifiedLines.length - 1].length + 1))
12163
- ])
12166
+ new DetailedLineRangeMapping(new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [rangeMapping])
12164
12167
  ], [], false);
12165
12168
  }
12166
12169
  const timeout = options.maxComputationTimeMs === 0 ? InfiniteTimeout.instance : new DateTimeout(options.maxComputationTimeMs);
@@ -12197,7 +12200,7 @@
12197
12200
  const seq1Offset = seq1LastStart + i;
12198
12201
  const seq2Offset = seq2LastStart + i;
12199
12202
  if (originalLines[seq1Offset] !== modifiedLines[seq2Offset]) {
12200
- const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges, options);
12203
+ const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges, options, rawChanges);
12201
12204
  for (const a2 of characterDiffs.mappings) {
12202
12205
  alignments.push(a2);
12203
12206
  }
@@ -12215,7 +12218,7 @@
12215
12218
  scanForWhitespaceChanges(equalLinesCount);
12216
12219
  seq1LastStart = diff.seq1Range.endExclusive;
12217
12220
  seq2LastStart = diff.seq2Range.endExclusive;
12218
- const characterDiffs = this.refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options);
12221
+ const characterDiffs = this.refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options, rawChanges);
12219
12222
  if (characterDiffs.hitTimeout) {
12220
12223
  hitTimeout = true;
12221
12224
  }
@@ -12278,12 +12281,21 @@
12278
12281
  });
12279
12282
  return movesWithDiffs;
12280
12283
  }
12281
- refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options) {
12284
+ refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options, rawChanges) {
12282
12285
  const lineRangeMapping = toLineRangeMapping(diff);
12283
12286
  const rangeMapping = lineRangeMapping.toRangeMapping2(originalLines, modifiedLines);
12284
12287
  const slice1 = new LinesSliceCharSequence(originalLines, rangeMapping.originalRange, considerWhitespaceChanges);
12285
12288
  const slice2 = new LinesSliceCharSequence(modifiedLines, rangeMapping.modifiedRange, considerWhitespaceChanges);
12286
- const diffResult = slice1.length + slice2.length < 500 ? this.dynamicProgrammingDiffing.compute(slice1, slice2, timeout) : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout);
12289
+ const useDynamicProgramming = slice1.length + slice2.length < 500;
12290
+ const diffResult = useDynamicProgramming ? this.dynamicProgrammingDiffing.compute(slice1, slice2, timeout) : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout);
12291
+ let hitTimeout = diffResult.hitTimeout;
12292
+ if (rawChanges) {
12293
+ const rawResult = useDynamicProgramming && !hitTimeout ? this.myersDiffingAlgorithm.compute(slice1, slice2, timeout) : diffResult;
12294
+ hitTimeout ||= rawResult.hitTimeout;
12295
+ for (const change of rawResult.diffs) {
12296
+ rawChanges.push(new RangeMapping(slice1.translateRange(change.seq1Range), slice2.translateRange(change.seq2Range)));
12297
+ }
12298
+ }
12287
12299
  let diffs = diffResult.diffs;
12288
12300
  diffs = optimizeSequenceDiffs(slice1, slice2, diffs);
12289
12301
  diffs = extendDiffsToEntireWordIfAppropriate(slice1, slice2, diffs, (seq, idx) => seq.findWordContaining(idx));
@@ -12295,7 +12307,7 @@
12295
12307
  const result = diffs.map((d) => new RangeMapping(slice1.translateRange(d.seq1Range), slice2.translateRange(d.seq2Range)));
12296
12308
  return {
12297
12309
  mappings: result,
12298
- hitTimeout: diffResult.hitTimeout
12310
+ hitTimeout
12299
12311
  };
12300
12312
  }
12301
12313
  }
@@ -12158,14 +12158,17 @@
12158
12158
  this.myersDiffingAlgorithm = new MyersDiffAlgorithm();
12159
12159
  }
12160
12160
  computeDiff(originalLines, modifiedLines, options) {
12161
+ return this._computeDiff(originalLines, modifiedLines, options);
12162
+ }
12163
+ _computeDiff(originalLines, modifiedLines, options, rawChanges) {
12161
12164
  if (originalLines.length <= 1 && equals(originalLines, modifiedLines, (a, b) => a === b)) {
12162
12165
  return new LinesDiff([], [], false);
12163
12166
  }
12164
12167
  if (originalLines.length === 1 && originalLines[0].length === 0 || modifiedLines.length === 1 && modifiedLines[0].length === 0) {
12168
+ const rangeMapping = new RangeMapping(new Range(1, 1, originalLines.length, originalLines[originalLines.length - 1].length + 1), new Range(1, 1, modifiedLines.length, modifiedLines[modifiedLines.length - 1].length + 1));
12169
+ rawChanges?.push(rangeMapping);
12165
12170
  return new LinesDiff([
12166
- new DetailedLineRangeMapping(new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [
12167
- new RangeMapping(new Range(1, 1, originalLines.length, originalLines[originalLines.length - 1].length + 1), new Range(1, 1, modifiedLines.length, modifiedLines[modifiedLines.length - 1].length + 1))
12168
- ])
12171
+ new DetailedLineRangeMapping(new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [rangeMapping])
12169
12172
  ], [], false);
12170
12173
  }
12171
12174
  const timeout = options.maxComputationTimeMs === 0 ? InfiniteTimeout.instance : new DateTimeout(options.maxComputationTimeMs);
@@ -12202,7 +12205,7 @@
12202
12205
  const seq1Offset = seq1LastStart + i;
12203
12206
  const seq2Offset = seq2LastStart + i;
12204
12207
  if (originalLines[seq1Offset] !== modifiedLines[seq2Offset]) {
12205
- const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges, options);
12208
+ const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges, options, rawChanges);
12206
12209
  for (const a of characterDiffs.mappings) {
12207
12210
  alignments.push(a);
12208
12211
  }
@@ -12220,7 +12223,7 @@
12220
12223
  scanForWhitespaceChanges(equalLinesCount);
12221
12224
  seq1LastStart = diff.seq1Range.endExclusive;
12222
12225
  seq2LastStart = diff.seq2Range.endExclusive;
12223
- const characterDiffs = this.refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options);
12226
+ const characterDiffs = this.refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options, rawChanges);
12224
12227
  if (characterDiffs.hitTimeout) {
12225
12228
  hitTimeout = true;
12226
12229
  }
@@ -12283,12 +12286,21 @@
12283
12286
  });
12284
12287
  return movesWithDiffs;
12285
12288
  }
12286
- refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options) {
12289
+ refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options, rawChanges) {
12287
12290
  const lineRangeMapping = toLineRangeMapping(diff);
12288
12291
  const rangeMapping = lineRangeMapping.toRangeMapping2(originalLines, modifiedLines);
12289
12292
  const slice1 = new LinesSliceCharSequence(originalLines, rangeMapping.originalRange, considerWhitespaceChanges);
12290
12293
  const slice2 = new LinesSliceCharSequence(modifiedLines, rangeMapping.modifiedRange, considerWhitespaceChanges);
12291
- const diffResult = slice1.length + slice2.length < 500 ? this.dynamicProgrammingDiffing.compute(slice1, slice2, timeout) : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout);
12294
+ const useDynamicProgramming = slice1.length + slice2.length < 500;
12295
+ const diffResult = useDynamicProgramming ? this.dynamicProgrammingDiffing.compute(slice1, slice2, timeout) : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout);
12296
+ let hitTimeout = diffResult.hitTimeout;
12297
+ if (rawChanges) {
12298
+ const rawResult = useDynamicProgramming && !hitTimeout ? this.myersDiffingAlgorithm.compute(slice1, slice2, timeout) : diffResult;
12299
+ hitTimeout ||= rawResult.hitTimeout;
12300
+ for (const change of rawResult.diffs) {
12301
+ rawChanges.push(new RangeMapping(slice1.translateRange(change.seq1Range), slice2.translateRange(change.seq2Range)));
12302
+ }
12303
+ }
12292
12304
  let diffs = diffResult.diffs;
12293
12305
  diffs = optimizeSequenceDiffs(slice1, slice2, diffs);
12294
12306
  diffs = extendDiffsToEntireWordIfAppropriate(slice1, slice2, diffs, (seq, idx) => seq.findWordContaining(idx));
@@ -12300,7 +12312,7 @@
12300
12312
  const result = diffs.map((d) => new RangeMapping(slice1.translateRange(d.seq1Range), slice2.translateRange(d.seq2Range)));
12301
12313
  return {
12302
12314
  mappings: result,
12303
- hitTimeout: diffResult.hitTimeout
12315
+ hitTimeout
12304
12316
  };
12305
12317
  }
12306
12318
  }
@@ -12165,14 +12165,17 @@
12165
12165
  this.myersDiffingAlgorithm = new MyersDiffAlgorithm();
12166
12166
  }
12167
12167
  computeDiff(originalLines, modifiedLines, options) {
12168
+ return this._computeDiff(originalLines, modifiedLines, options);
12169
+ }
12170
+ _computeDiff(originalLines, modifiedLines, options, rawChanges) {
12168
12171
  if (originalLines.length <= 1 && equals(originalLines, modifiedLines, (a, b) => a === b)) {
12169
12172
  return new LinesDiff([], [], false);
12170
12173
  }
12171
12174
  if (originalLines.length === 1 && originalLines[0].length === 0 || modifiedLines.length === 1 && modifiedLines[0].length === 0) {
12175
+ const rangeMapping = new RangeMapping(new Range(1, 1, originalLines.length, originalLines[originalLines.length - 1].length + 1), new Range(1, 1, modifiedLines.length, modifiedLines[modifiedLines.length - 1].length + 1));
12176
+ rawChanges?.push(rangeMapping);
12172
12177
  return new LinesDiff([
12173
- new DetailedLineRangeMapping(new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [
12174
- new RangeMapping(new Range(1, 1, originalLines.length, originalLines[originalLines.length - 1].length + 1), new Range(1, 1, modifiedLines.length, modifiedLines[modifiedLines.length - 1].length + 1))
12175
- ])
12178
+ new DetailedLineRangeMapping(new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [rangeMapping])
12176
12179
  ], [], false);
12177
12180
  }
12178
12181
  const timeout = options.maxComputationTimeMs === 0 ? InfiniteTimeout.instance : new DateTimeout(options.maxComputationTimeMs);
@@ -12209,7 +12212,7 @@
12209
12212
  const seq1Offset = seq1LastStart + i;
12210
12213
  const seq2Offset = seq2LastStart + i;
12211
12214
  if (originalLines[seq1Offset] !== modifiedLines[seq2Offset]) {
12212
- const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges, options);
12215
+ const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges, options, rawChanges);
12213
12216
  for (const a of characterDiffs.mappings) {
12214
12217
  alignments.push(a);
12215
12218
  }
@@ -12227,7 +12230,7 @@
12227
12230
  scanForWhitespaceChanges(equalLinesCount);
12228
12231
  seq1LastStart = diff.seq1Range.endExclusive;
12229
12232
  seq2LastStart = diff.seq2Range.endExclusive;
12230
- const characterDiffs = this.refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options);
12233
+ const characterDiffs = this.refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options, rawChanges);
12231
12234
  if (characterDiffs.hitTimeout) {
12232
12235
  hitTimeout = true;
12233
12236
  }
@@ -12290,12 +12293,21 @@
12290
12293
  });
12291
12294
  return movesWithDiffs;
12292
12295
  }
12293
- refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options) {
12296
+ refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options, rawChanges) {
12294
12297
  const lineRangeMapping = toLineRangeMapping(diff);
12295
12298
  const rangeMapping = lineRangeMapping.toRangeMapping2(originalLines, modifiedLines);
12296
12299
  const slice1 = new LinesSliceCharSequence(originalLines, rangeMapping.originalRange, considerWhitespaceChanges);
12297
12300
  const slice2 = new LinesSliceCharSequence(modifiedLines, rangeMapping.modifiedRange, considerWhitespaceChanges);
12298
- const diffResult = slice1.length + slice2.length < 500 ? this.dynamicProgrammingDiffing.compute(slice1, slice2, timeout) : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout);
12301
+ const useDynamicProgramming = slice1.length + slice2.length < 500;
12302
+ const diffResult = useDynamicProgramming ? this.dynamicProgrammingDiffing.compute(slice1, slice2, timeout) : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout);
12303
+ let hitTimeout = diffResult.hitTimeout;
12304
+ if (rawChanges) {
12305
+ const rawResult = useDynamicProgramming && !hitTimeout ? this.myersDiffingAlgorithm.compute(slice1, slice2, timeout) : diffResult;
12306
+ hitTimeout ||= rawResult.hitTimeout;
12307
+ for (const change of rawResult.diffs) {
12308
+ rawChanges.push(new RangeMapping(slice1.translateRange(change.seq1Range), slice2.translateRange(change.seq2Range)));
12309
+ }
12310
+ }
12299
12311
  let diffs = diffResult.diffs;
12300
12312
  diffs = optimizeSequenceDiffs(slice1, slice2, diffs);
12301
12313
  diffs = extendDiffsToEntireWordIfAppropriate(slice1, slice2, diffs, (seq, idx) => seq.findWordContaining(idx));
@@ -12307,7 +12319,7 @@
12307
12319
  const result = diffs.map((d) => new RangeMapping(slice1.translateRange(d.seq1Range), slice2.translateRange(d.seq2Range)));
12308
12320
  return {
12309
12321
  mappings: result,
12310
- hitTimeout: diffResult.hitTimeout
12322
+ hitTimeout
12311
12323
  };
12312
12324
  }
12313
12325
  }
@@ -12153,14 +12153,17 @@
12153
12153
  this.myersDiffingAlgorithm = new MyersDiffAlgorithm();
12154
12154
  }
12155
12155
  computeDiff(originalLines, modifiedLines, options) {
12156
+ return this._computeDiff(originalLines, modifiedLines, options);
12157
+ }
12158
+ _computeDiff(originalLines, modifiedLines, options, rawChanges) {
12156
12159
  if (originalLines.length <= 1 && equals(originalLines, modifiedLines, (a, b) => a === b)) {
12157
12160
  return new LinesDiff([], [], false);
12158
12161
  }
12159
12162
  if (originalLines.length === 1 && originalLines[0].length === 0 || modifiedLines.length === 1 && modifiedLines[0].length === 0) {
12163
+ const rangeMapping = new RangeMapping(new Range$1(1, 1, originalLines.length, originalLines[originalLines.length - 1].length + 1), new Range$1(1, 1, modifiedLines.length, modifiedLines[modifiedLines.length - 1].length + 1));
12164
+ rawChanges?.push(rangeMapping);
12160
12165
  return new LinesDiff([
12161
- new DetailedLineRangeMapping(new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [
12162
- new RangeMapping(new Range$1(1, 1, originalLines.length, originalLines[originalLines.length - 1].length + 1), new Range$1(1, 1, modifiedLines.length, modifiedLines[modifiedLines.length - 1].length + 1))
12163
- ])
12166
+ new DetailedLineRangeMapping(new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [rangeMapping])
12164
12167
  ], [], false);
12165
12168
  }
12166
12169
  const timeout = options.maxComputationTimeMs === 0 ? InfiniteTimeout.instance : new DateTimeout(options.maxComputationTimeMs);
@@ -12197,7 +12200,7 @@
12197
12200
  const seq1Offset = seq1LastStart + i;
12198
12201
  const seq2Offset = seq2LastStart + i;
12199
12202
  if (originalLines[seq1Offset] !== modifiedLines[seq2Offset]) {
12200
- const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges, options);
12203
+ const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges, options, rawChanges);
12201
12204
  for (const a of characterDiffs.mappings) {
12202
12205
  alignments.push(a);
12203
12206
  }
@@ -12215,7 +12218,7 @@
12215
12218
  scanForWhitespaceChanges(equalLinesCount);
12216
12219
  seq1LastStart = diff.seq1Range.endExclusive;
12217
12220
  seq2LastStart = diff.seq2Range.endExclusive;
12218
- const characterDiffs = this.refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options);
12221
+ const characterDiffs = this.refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options, rawChanges);
12219
12222
  if (characterDiffs.hitTimeout) {
12220
12223
  hitTimeout = true;
12221
12224
  }
@@ -12278,12 +12281,21 @@
12278
12281
  });
12279
12282
  return movesWithDiffs;
12280
12283
  }
12281
- refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options) {
12284
+ refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options, rawChanges) {
12282
12285
  const lineRangeMapping = toLineRangeMapping(diff);
12283
12286
  const rangeMapping = lineRangeMapping.toRangeMapping2(originalLines, modifiedLines);
12284
12287
  const slice1 = new LinesSliceCharSequence(originalLines, rangeMapping.originalRange, considerWhitespaceChanges);
12285
12288
  const slice2 = new LinesSliceCharSequence(modifiedLines, rangeMapping.modifiedRange, considerWhitespaceChanges);
12286
- const diffResult = slice1.length + slice2.length < 500 ? this.dynamicProgrammingDiffing.compute(slice1, slice2, timeout) : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout);
12289
+ const useDynamicProgramming = slice1.length + slice2.length < 500;
12290
+ const diffResult = useDynamicProgramming ? this.dynamicProgrammingDiffing.compute(slice1, slice2, timeout) : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout);
12291
+ let hitTimeout = diffResult.hitTimeout;
12292
+ if (rawChanges) {
12293
+ const rawResult = useDynamicProgramming && !hitTimeout ? this.myersDiffingAlgorithm.compute(slice1, slice2, timeout) : diffResult;
12294
+ hitTimeout ||= rawResult.hitTimeout;
12295
+ for (const change of rawResult.diffs) {
12296
+ rawChanges.push(new RangeMapping(slice1.translateRange(change.seq1Range), slice2.translateRange(change.seq2Range)));
12297
+ }
12298
+ }
12287
12299
  let diffs = diffResult.diffs;
12288
12300
  diffs = optimizeSequenceDiffs(slice1, slice2, diffs);
12289
12301
  diffs = extendDiffsToEntireWordIfAppropriate(slice1, slice2, diffs, (seq, idx) => seq.findWordContaining(idx));
@@ -12295,7 +12307,7 @@
12295
12307
  const result = diffs.map((d) => new RangeMapping(slice1.translateRange(d.seq1Range), slice2.translateRange(d.seq2Range)));
12296
12308
  return {
12297
12309
  mappings: result,
12298
- hitTimeout: diffResult.hitTimeout
12310
+ hitTimeout
12299
12311
  };
12300
12312
  }
12301
12313
  }
@@ -12155,14 +12155,17 @@
12155
12155
  this.myersDiffingAlgorithm = new MyersDiffAlgorithm();
12156
12156
  }
12157
12157
  computeDiff(originalLines, modifiedLines, options) {
12158
+ return this._computeDiff(originalLines, modifiedLines, options);
12159
+ }
12160
+ _computeDiff(originalLines, modifiedLines, options, rawChanges) {
12158
12161
  if (originalLines.length <= 1 && equals$1(originalLines, modifiedLines, (a2, b) => a2 === b)) {
12159
12162
  return new LinesDiff([], [], false);
12160
12163
  }
12161
12164
  if (originalLines.length === 1 && originalLines[0].length === 0 || modifiedLines.length === 1 && modifiedLines[0].length === 0) {
12165
+ const rangeMapping = new RangeMapping(new Range$1(1, 1, originalLines.length, originalLines[originalLines.length - 1].length + 1), new Range$1(1, 1, modifiedLines.length, modifiedLines[modifiedLines.length - 1].length + 1));
12166
+ rawChanges?.push(rangeMapping);
12162
12167
  return new LinesDiff([
12163
- new DetailedLineRangeMapping(new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [
12164
- new RangeMapping(new Range$1(1, 1, originalLines.length, originalLines[originalLines.length - 1].length + 1), new Range$1(1, 1, modifiedLines.length, modifiedLines[modifiedLines.length - 1].length + 1))
12165
- ])
12168
+ new DetailedLineRangeMapping(new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [rangeMapping])
12166
12169
  ], [], false);
12167
12170
  }
12168
12171
  const timeout = options.maxComputationTimeMs === 0 ? InfiniteTimeout.instance : new DateTimeout(options.maxComputationTimeMs);
@@ -12199,7 +12202,7 @@
12199
12202
  const seq1Offset = seq1LastStart + i;
12200
12203
  const seq2Offset = seq2LastStart + i;
12201
12204
  if (originalLines[seq1Offset] !== modifiedLines[seq2Offset]) {
12202
- const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges, options);
12205
+ const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges, options, rawChanges);
12203
12206
  for (const a2 of characterDiffs.mappings) {
12204
12207
  alignments.push(a2);
12205
12208
  }
@@ -12217,7 +12220,7 @@
12217
12220
  scanForWhitespaceChanges(equalLinesCount);
12218
12221
  seq1LastStart = diff.seq1Range.endExclusive;
12219
12222
  seq2LastStart = diff.seq2Range.endExclusive;
12220
- const characterDiffs = this.refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options);
12223
+ const characterDiffs = this.refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options, rawChanges);
12221
12224
  if (characterDiffs.hitTimeout) {
12222
12225
  hitTimeout = true;
12223
12226
  }
@@ -12280,12 +12283,21 @@
12280
12283
  });
12281
12284
  return movesWithDiffs;
12282
12285
  }
12283
- refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options) {
12286
+ refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options, rawChanges) {
12284
12287
  const lineRangeMapping = toLineRangeMapping(diff);
12285
12288
  const rangeMapping = lineRangeMapping.toRangeMapping2(originalLines, modifiedLines);
12286
12289
  const slice1 = new LinesSliceCharSequence(originalLines, rangeMapping.originalRange, considerWhitespaceChanges);
12287
12290
  const slice2 = new LinesSliceCharSequence(modifiedLines, rangeMapping.modifiedRange, considerWhitespaceChanges);
12288
- const diffResult = slice1.length + slice2.length < 500 ? this.dynamicProgrammingDiffing.compute(slice1, slice2, timeout) : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout);
12291
+ const useDynamicProgramming = slice1.length + slice2.length < 500;
12292
+ const diffResult = useDynamicProgramming ? this.dynamicProgrammingDiffing.compute(slice1, slice2, timeout) : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout);
12293
+ let hitTimeout = diffResult.hitTimeout;
12294
+ if (rawChanges) {
12295
+ const rawResult = useDynamicProgramming && !hitTimeout ? this.myersDiffingAlgorithm.compute(slice1, slice2, timeout) : diffResult;
12296
+ hitTimeout ||= rawResult.hitTimeout;
12297
+ for (const change of rawResult.diffs) {
12298
+ rawChanges.push(new RangeMapping(slice1.translateRange(change.seq1Range), slice2.translateRange(change.seq2Range)));
12299
+ }
12300
+ }
12289
12301
  let diffs = diffResult.diffs;
12290
12302
  diffs = optimizeSequenceDiffs(slice1, slice2, diffs);
12291
12303
  diffs = extendDiffsToEntireWordIfAppropriate(slice1, slice2, diffs, (seq, idx) => seq.findWordContaining(idx));
@@ -12297,7 +12309,7 @@
12297
12309
  const result = diffs.map((d) => new RangeMapping(slice1.translateRange(d.seq1Range), slice2.translateRange(d.seq2Range)));
12298
12310
  return {
12299
12311
  mappings: result,
12300
- hitTimeout: diffResult.hitTimeout
12312
+ hitTimeout
12301
12313
  };
12302
12314
  }
12303
12315
  }
@@ -12158,14 +12158,17 @@
12158
12158
  this.myersDiffingAlgorithm = new MyersDiffAlgorithm();
12159
12159
  }
12160
12160
  computeDiff(originalLines, modifiedLines, options) {
12161
+ return this._computeDiff(originalLines, modifiedLines, options);
12162
+ }
12163
+ _computeDiff(originalLines, modifiedLines, options, rawChanges) {
12161
12164
  if (originalLines.length <= 1 && equals(originalLines, modifiedLines, (a, b) => a === b)) {
12162
12165
  return new LinesDiff([], [], false);
12163
12166
  }
12164
12167
  if (originalLines.length === 1 && originalLines[0].length === 0 || modifiedLines.length === 1 && modifiedLines[0].length === 0) {
12168
+ const rangeMapping = new RangeMapping(new Range(1, 1, originalLines.length, originalLines[originalLines.length - 1].length + 1), new Range(1, 1, modifiedLines.length, modifiedLines[modifiedLines.length - 1].length + 1));
12169
+ rawChanges?.push(rangeMapping);
12165
12170
  return new LinesDiff([
12166
- new DetailedLineRangeMapping(new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [
12167
- new RangeMapping(new Range(1, 1, originalLines.length, originalLines[originalLines.length - 1].length + 1), new Range(1, 1, modifiedLines.length, modifiedLines[modifiedLines.length - 1].length + 1))
12168
- ])
12171
+ new DetailedLineRangeMapping(new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [rangeMapping])
12169
12172
  ], [], false);
12170
12173
  }
12171
12174
  const timeout = options.maxComputationTimeMs === 0 ? InfiniteTimeout.instance : new DateTimeout(options.maxComputationTimeMs);
@@ -12202,7 +12205,7 @@
12202
12205
  const seq1Offset = seq1LastStart + i;
12203
12206
  const seq2Offset = seq2LastStart + i;
12204
12207
  if (originalLines[seq1Offset] !== modifiedLines[seq2Offset]) {
12205
- const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges, options);
12208
+ const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges, options, rawChanges);
12206
12209
  for (const a of characterDiffs.mappings) {
12207
12210
  alignments.push(a);
12208
12211
  }
@@ -12220,7 +12223,7 @@
12220
12223
  scanForWhitespaceChanges(equalLinesCount);
12221
12224
  seq1LastStart = diff.seq1Range.endExclusive;
12222
12225
  seq2LastStart = diff.seq2Range.endExclusive;
12223
- const characterDiffs = this.refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options);
12226
+ const characterDiffs = this.refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options, rawChanges);
12224
12227
  if (characterDiffs.hitTimeout) {
12225
12228
  hitTimeout = true;
12226
12229
  }
@@ -12283,12 +12286,21 @@
12283
12286
  });
12284
12287
  return movesWithDiffs;
12285
12288
  }
12286
- refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options) {
12289
+ refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges, options, rawChanges) {
12287
12290
  const lineRangeMapping = toLineRangeMapping(diff);
12288
12291
  const rangeMapping = lineRangeMapping.toRangeMapping2(originalLines, modifiedLines);
12289
12292
  const slice1 = new LinesSliceCharSequence(originalLines, rangeMapping.originalRange, considerWhitespaceChanges);
12290
12293
  const slice2 = new LinesSliceCharSequence(modifiedLines, rangeMapping.modifiedRange, considerWhitespaceChanges);
12291
- const diffResult = slice1.length + slice2.length < 500 ? this.dynamicProgrammingDiffing.compute(slice1, slice2, timeout) : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout);
12294
+ const useDynamicProgramming = slice1.length + slice2.length < 500;
12295
+ const diffResult = useDynamicProgramming ? this.dynamicProgrammingDiffing.compute(slice1, slice2, timeout) : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout);
12296
+ let hitTimeout = diffResult.hitTimeout;
12297
+ if (rawChanges) {
12298
+ const rawResult = useDynamicProgramming && !hitTimeout ? this.myersDiffingAlgorithm.compute(slice1, slice2, timeout) : diffResult;
12299
+ hitTimeout ||= rawResult.hitTimeout;
12300
+ for (const change of rawResult.diffs) {
12301
+ rawChanges.push(new RangeMapping(slice1.translateRange(change.seq1Range), slice2.translateRange(change.seq2Range)));
12302
+ }
12303
+ }
12292
12304
  let diffs = diffResult.diffs;
12293
12305
  diffs = optimizeSequenceDiffs(slice1, slice2, diffs);
12294
12306
  diffs = extendDiffsToEntireWordIfAppropriate(slice1, slice2, diffs, (seq, idx) => seq.findWordContaining(idx));
@@ -12300,7 +12312,7 @@
12300
12312
  const result = diffs.map((d) => new RangeMapping(slice1.translateRange(d.seq1Range), slice2.translateRange(d.seq2Range)));
12301
12313
  return {
12302
12314
  mappings: result,
12303
- hitTimeout: diffResult.hitTimeout
12315
+ hitTimeout
12304
12316
  };
12305
12317
  }
12306
12318
  }
@@ -1,4 +1,4 @@
1
- define("vs/basic-languages/monaco.contribution", ["require", "../editor-DKS349od"], (function(require, editor) {
1
+ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DF6tMWQk"], (function(require, editor) {
2
2
  "use strict";
3
3
  const languageDefinitions = {};
4
4
  const lazyLanguageLoaders = {};
@@ -174,49 +174,49 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DKS349od
174
174
  extensions: [".ftl", ".ftlh", ".ftlx"],
175
175
  aliases: ["FreeMarker2", "Apache FreeMarker2"],
176
176
  loader: () => {
177
- return new Promise((resolve, reject) => require(["../freemarker2-mKL_tDAS"], resolve, reject)).then((m) => m.TagAutoInterpolationDollar);
177
+ return new Promise((resolve, reject) => require(["../freemarker2-DrGcYj_K"], resolve, reject)).then((m) => m.TagAutoInterpolationDollar);
178
178
  }
179
179
  });
180
180
  registerLanguage({
181
181
  id: "freemarker2.tag-angle.interpolation-dollar",
182
182
  aliases: ["FreeMarker2 (Angle/Dollar)", "Apache FreeMarker2 (Angle/Dollar)"],
183
183
  loader: () => {
184
- return new Promise((resolve, reject) => require(["../freemarker2-mKL_tDAS"], resolve, reject)).then((m) => m.TagAngleInterpolationDollar);
184
+ return new Promise((resolve, reject) => require(["../freemarker2-DrGcYj_K"], resolve, reject)).then((m) => m.TagAngleInterpolationDollar);
185
185
  }
186
186
  });
187
187
  registerLanguage({
188
188
  id: "freemarker2.tag-bracket.interpolation-dollar",
189
189
  aliases: ["FreeMarker2 (Bracket/Dollar)", "Apache FreeMarker2 (Bracket/Dollar)"],
190
190
  loader: () => {
191
- return new Promise((resolve, reject) => require(["../freemarker2-mKL_tDAS"], resolve, reject)).then((m) => m.TagBracketInterpolationDollar);
191
+ return new Promise((resolve, reject) => require(["../freemarker2-DrGcYj_K"], resolve, reject)).then((m) => m.TagBracketInterpolationDollar);
192
192
  }
193
193
  });
194
194
  registerLanguage({
195
195
  id: "freemarker2.tag-angle.interpolation-bracket",
196
196
  aliases: ["FreeMarker2 (Angle/Bracket)", "Apache FreeMarker2 (Angle/Bracket)"],
197
197
  loader: () => {
198
- return new Promise((resolve, reject) => require(["../freemarker2-mKL_tDAS"], resolve, reject)).then((m) => m.TagAngleInterpolationBracket);
198
+ return new Promise((resolve, reject) => require(["../freemarker2-DrGcYj_K"], resolve, reject)).then((m) => m.TagAngleInterpolationBracket);
199
199
  }
200
200
  });
201
201
  registerLanguage({
202
202
  id: "freemarker2.tag-bracket.interpolation-bracket",
203
203
  aliases: ["FreeMarker2 (Bracket/Bracket)", "Apache FreeMarker2 (Bracket/Bracket)"],
204
204
  loader: () => {
205
- return new Promise((resolve, reject) => require(["../freemarker2-mKL_tDAS"], resolve, reject)).then((m) => m.TagBracketInterpolationBracket);
205
+ return new Promise((resolve, reject) => require(["../freemarker2-DrGcYj_K"], resolve, reject)).then((m) => m.TagBracketInterpolationBracket);
206
206
  }
207
207
  });
208
208
  registerLanguage({
209
209
  id: "freemarker2.tag-auto.interpolation-dollar",
210
210
  aliases: ["FreeMarker2 (Auto/Dollar)", "Apache FreeMarker2 (Auto/Dollar)"],
211
211
  loader: () => {
212
- return new Promise((resolve, reject) => require(["../freemarker2-mKL_tDAS"], resolve, reject)).then((m) => m.TagAutoInterpolationDollar);
212
+ return new Promise((resolve, reject) => require(["../freemarker2-DrGcYj_K"], resolve, reject)).then((m) => m.TagAutoInterpolationDollar);
213
213
  }
214
214
  });
215
215
  registerLanguage({
216
216
  id: "freemarker2.tag-auto.interpolation-bracket",
217
217
  aliases: ["FreeMarker2 (Auto/Bracket)", "Apache FreeMarker2 (Auto/Bracket)"],
218
218
  loader: () => {
219
- return new Promise((resolve, reject) => require(["../freemarker2-mKL_tDAS"], resolve, reject)).then((m) => m.TagAutoInterpolationBracket);
219
+ return new Promise((resolve, reject) => require(["../freemarker2-DrGcYj_K"], resolve, reject)).then((m) => m.TagAutoInterpolationBracket);
220
220
  }
221
221
  });
222
222
  registerLanguage({
@@ -237,7 +237,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DKS349od
237
237
  extensions: [".handlebars", ".hbs"],
238
238
  aliases: ["Handlebars", "handlebars", "hbs"],
239
239
  mimetypes: ["text/x-handlebars-template"],
240
- loader: () => new Promise((resolve, reject) => require(["../handlebars-0cbIdUh5"], resolve, reject))
240
+ loader: () => new Promise((resolve, reject) => require(["../handlebars-Bmcjf2xK"], resolve, reject))
241
241
  });
242
242
  registerLanguage({
243
243
  id: "hcl",
@@ -250,7 +250,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DKS349od
250
250
  extensions: [".html", ".htm", ".shtml", ".xhtml", ".mdoc", ".jsp", ".asp", ".aspx", ".jshtm"],
251
251
  aliases: ["HTML", "htm", "html", "xhtml"],
252
252
  mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
253
- loader: () => new Promise((resolve, reject) => require(["../html-B7tWGiS1"], resolve, reject))
253
+ loader: () => new Promise((resolve, reject) => require(["../html-BgW5PWQR"], resolve, reject))
254
254
  });
255
255
  registerLanguage({
256
256
  id: "ini",
@@ -273,7 +273,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DKS349od
273
273
  filenames: ["jakefile"],
274
274
  aliases: ["JavaScript", "javascript", "js"],
275
275
  mimetypes: ["text/javascript"],
276
- loader: () => new Promise((resolve, reject) => require(["../javascript-BPzI8Zuf"], resolve, reject))
276
+ loader: () => new Promise((resolve, reject) => require(["../javascript-Ctf5wke0"], resolve, reject))
277
277
  });
278
278
  registerLanguage({
279
279
  id: "julia",
@@ -312,7 +312,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DKS349od
312
312
  extensions: [".liquid", ".html.liquid"],
313
313
  aliases: ["Liquid", "liquid"],
314
314
  mimetypes: ["application/liquid"],
315
- loader: () => new Promise((resolve, reject) => require(["../liquid-TWvvsWgh"], resolve, reject))
315
+ loader: () => new Promise((resolve, reject) => require(["../liquid-BV9lgBju"], resolve, reject))
316
316
  });
317
317
  registerLanguage({
318
318
  id: "m3",
@@ -330,7 +330,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DKS349od
330
330
  id: "mdx",
331
331
  extensions: [".mdx"],
332
332
  aliases: ["MDX", "mdx"],
333
- loader: () => new Promise((resolve, reject) => require(["../mdx-D72RTe8f"], resolve, reject))
333
+ loader: () => new Promise((resolve, reject) => require(["../mdx-CSxdJtqM"], resolve, reject))
334
334
  });
335
335
  registerLanguage({
336
336
  id: "mips",
@@ -429,7 +429,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DKS349od
429
429
  extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"],
430
430
  aliases: ["Python", "py"],
431
431
  firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
432
- loader: () => new Promise((resolve, reject) => require(["../python-BEA_VDf5"], resolve, reject))
432
+ loader: () => new Promise((resolve, reject) => require(["../python-gCVTY2As"], resolve, reject))
433
433
  });
434
434
  registerLanguage({
435
435
  id: "qsharp",
@@ -448,7 +448,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DKS349od
448
448
  extensions: [".cshtml"],
449
449
  aliases: ["Razor", "razor"],
450
450
  mimetypes: ["text/x-cshtml"],
451
- loader: () => new Promise((resolve, reject) => require(["../razor-B_Y4fRDb"], resolve, reject))
451
+ loader: () => new Promise((resolve, reject) => require(["../razor-MTyQNNGT"], resolve, reject))
452
452
  });
453
453
  registerLanguage({
454
454
  id: "redis",
@@ -581,7 +581,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DKS349od
581
581
  aliases: ["TypeScript", "ts", "typescript"],
582
582
  mimetypes: ["text/typescript"],
583
583
  loader: () => {
584
- return new Promise((resolve, reject) => require(["../typescript-CW5I38Ex"], resolve, reject));
584
+ return new Promise((resolve, reject) => require(["../typescript-gtYyab66"], resolve, reject));
585
585
  }
586
586
  });
587
587
  registerLanguage({
@@ -626,13 +626,13 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DKS349od
626
626
  firstLine: "(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",
627
627
  aliases: ["XML", "xml"],
628
628
  mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
629
- loader: () => new Promise((resolve, reject) => require(["../xml-BJKDlWxj"], resolve, reject))
629
+ loader: () => new Promise((resolve, reject) => require(["../xml-DnrNJXZW"], resolve, reject))
630
630
  });
631
631
  registerLanguage({
632
632
  id: "yaml",
633
633
  extensions: [".yaml", ".yml"],
634
634
  aliases: ["YAML", "yaml", "YML", "yml"],
635
635
  mimetypes: ["application/x-yaml", "text/x-yaml"],
636
- loader: () => new Promise((resolve, reject) => require(["../yaml-DcAjn74d"], resolve, reject))
636
+ loader: () => new Promise((resolve, reject) => require(["../yaml-CAyBlbtS"], resolve, reject))
637
637
  });
638
638
  }));
@@ -1,5 +1,5 @@
1
- define("vs/css.worker-Cbj6Lgyl", ["require", "exports"], (function(require, exports) {
1
+ define("vs/css.worker-DFHtiq4d", ["require", "exports"], (function(require, exports) {
2
2
  "use strict";
3
- const __worker_url_0__ = "" + new URL(require.toUrl("./assets/css.worker-BXibjW7G.js"), document.baseURI).href;
3
+ const __worker_url_0__ = "" + new URL(require.toUrl("./assets/css.worker-DESIYBwQ.js"), document.baseURI).href;
4
4
  exports.__worker_url_0__ = __worker_url_0__;
5
5
  }));
@@ -1,4 +1,4 @@
1
- define("vs/cssMode-DDsK7kN3", ["exports", "./css.worker-Cbj6Lgyl", "./workers-DcW-LZDs", "./lspLanguageFeatures-CAQu2Ud8", "./editor-DKS349od"], (function(exports, css_worker, workers, lspLanguageFeatures, editor) {
1
+ define("vs/cssMode-Guam2rGs", ["exports", "./css.worker-DFHtiq4d", "./workers-lYFND6u7", "./lspLanguageFeatures-B9p3JwAQ", "./editor-DF6tMWQk"], (function(exports, css_worker, workers, lspLanguageFeatures, editor) {
2
2
  "use strict";
3
3
  const STOP_WHEN_IDLE_FOR = 2 * 60 * 1e3;
4
4
  class WorkerManager {